summaryrefslogtreecommitdiff
path: root/build-aux/useless-if-before-free
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* maint: Update copyright noticesPaul Eggert2022-01-271-2/+2
| | | | | | | | | | * build-aux/announce-gen, build-aux/declared.sh: * build-aux/git-version-gen, build-aux/gitlog-to-changelog: * build-aux/gnu-web-doc-update, build-aux/gnupload: * build-aux/increment-serial, build-aux/libtool-next-version: * build-aux/useless-if-before-free: Update some copyright notices by hand, that were not updated automatically.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* useless-if-before-free: Implement --version option according to GCS.Bruno Haible2021-04-111-2/+16
| | | | | | * build-aux/useless-if-before-free (copyright_year): New variable. (GetOptions): Print also a short copyright and license notice and author statement.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: remove a stray inter-word space in a 6x-repeated commentJim Meyering2020-04-041-2/+2
| | | | | | | | | | | Induce the changes by running this: re='by perl'; g grep -l "$re"|xargs perl -pi -e "s/$re/by perl/" * build-aux/announce-gen: Change "by perl" to "by perl". * build-aux/gitlog-to-changelog: Likewise. * build-aux/prefix-gnulib-mk: Likewise. * build-aux/update-copyright: Likewise. * build-aux/useless-if-before-free: Likewise. * tests/test-update-copyright.sh: Likewise.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* Reorder pieces of header in perl scripts.Bruno Haible2019-06-191-20/+21
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Restore Emacs time-stamp hook applicability.Bruno Haible2019-06-161-0/+1
| | | | | | | | | | Reported by Darshit Shah <darnir@gnu.org>. * build-aux/useless-if-before-free: Bump time-stamp-line-limit to 50. * build-aux/announce-gen: Likewise. * build-aux/gitlog-to-changelog: Likewise. * build-aux/prefix-gnulib-mk: Likewise. * build-aux/update-copyright: Likewise.
* Fix comments in last commit.Bruno Haible2019-06-151-6/+6
| | | | | | | | | | | Reported by Paul Eggert. * build-aux/useless-if-before-free: Fix comment regarding the second line. * build-aux/announce-gen: Likewise. * build-aux/gitlog-to-changelog: Likewise. * build-aux/prefix-gnulib-mk: Likewise. * build-aux/update-copyright: Likewise. * tests/test-update-copyright.sh: Update test program accordingly.
* Fix scripts to have valid executable format on Alpine Linux.Bruno Haible2019-06-151-3/+17
| | | | | | | | | | | | | Reported by Tim Rühsen <tim.ruehsen@gmx.de>. Idea by Paul Eggert. * build-aux/useless-if-before-free: Use a prologue that starts with '#!/bin/sh'. * build-aux/announce-gen: Likewise. * build-aux/gitlog-to-changelog: Likewise. * build-aux/prefix-gnulib-mk: Likewise. * build-aux/update-copyright: Likewise. * tests/test-update-copyright.sh: Update test program accordingly.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: write-file-hooks -> before-save-hookPaul Eggert2018-03-071-2/+2
| | | | | | | | | | | | | | | write-file-hooks is obsolete since Emacs 22.1 (released June 2007) and it's time to use the recommended replacement. Problem reported by Glenn Morris in: https://lists.gnu.org/r/bug-gnulib/2018-03/msg00008.html * build-aux/announce-gen, build-aux/bootstrap: * build-aux/do-release-commit-and-tag, build-aux/gendocs.sh: * build-aux/git-version-gen, build-aux/gitlog-to-changelog: * build-aux/gnu-web-doc-update, build-aux/gnupload: * build-aux/move-if-change, build-aux/prefix-gnulib-mk: * build-aux/update-copyright, build-aux/useless-if-before-free: * build-aux/vc-list-files: Update hook usage for files where Gnulib is the canonical source.
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: Replace many more http URLs by https URLs. Update stale URLs.Bruno Haible2017-09-141-1/+1
| | | | | * users.txt: Remove mention of 'newts'. * lib/localename.c: Update comment about LANG_SOTHO.
* all: prefer https: URLsPaul Eggert2017-09-131-2/+2
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* useless-if-before-free: skip non-matching lines earlyJán Tomko2016-08-021-1/+4
| | | | | | | * build-aux/useless-if-before-free: First match each line with the simple/quick /\bif\b/ and reject if there is no match. This often saves the cost of the much more involved regular expression. For libvirt, this decreases the cost from 1.44s to 1.02s.
* Port "$@" to OpenIndiana ksh93Paul Eggert2016-01-121-2/+2
| | | | | | | | | | | | In http://lists.gnu.org/archive/html/bug-autoconf/2015-12/msg00000.html Pavel Raiskup reports that ${1+"$@"} runs afoul of a bug in /bin/sh (derived from ksh 93t+ 2010-03-05). ${1+"$@"} works around an ancient bug long-dead shells, so remove the workaround. * build-aux/announce-gen, build-aux/do-release-commit-and-tag: * build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update: * build-aux/prefix-gnulib-mk, build-aux/update-copyright: * build-aux/useless-if-before-free, tests/test-update-copyright.sh: Use "$@" instead of ${1+"$@"}.
* Port Universal Time settings to strict POSIXPaul Eggert2016-01-121-2/+2
| | | | | | | | | | | | * build-aux/announce-gen, build-aux/bootstrap: * build-aux/do-release-commit-and-tag, build-aux/git-version-gen: * build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update: * build-aux/gnupload, build-aux/mkinstalldirs: * build-aux/move-if-change, build-aux/prefix-gnulib-mk: * build-aux/update-copyright, build-aux/useless-if-before-free: * build-aux/vc-list-files, tests/test-strftime.c: Use TZ="UTC0", not TZ="UTC". Either works on GNU platforms, but POSIX says the behavior of TZ="UTC" is undefined.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* Use ', not `, for quoting output.Paul Eggert2012-01-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build-aux/announce-gen (usage, sizes, print_news_deltas) (print_changelog_deltas, get_tool_versions, main program): * build-aux/git-version-gen: * build-aux/gitlog-to-changelog (usage, parse_amend_file): * build-aux/move-if-change (help): * build-aux/useless-if-before-free (usage, main program): * check-module (parse_module_file, usage) (find_included_lib_files, check_module): * lib/argmatch.c (main) [TEST]: * lib/argp-help.c (_help): * lib/getopt1.c (main) [TEST]: * lib/git-merge-changelog.c (usage): * lib/xstrtol-error.c (xstrtol_error): * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): * m4/argz.m4 (gl_FUNC_ARGZ): * m4/bison.m4 (gl_BISON): * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER): * m4/fpending.m4 (gl_PREREQ_FPENDING): * m4/gc-random.m4 (gl_GC_RANDOM): * m4/intl.m4 (gt_CHECK_DECL): * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT) (AC_TYPE_UNSIGNED_LONG_LONG_INT): * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): * m4/onceonly.m4 (AC_CHECK_FUNCS_ONCE): * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): * tests/test-dirname.c (main): * tests/test-getpass.c (main): * tests/test-iconvme.c (main): * tests/test-parse-datetime.c (LOG): * tests/test-xstrtoimax.sh: * tests/test-xstrtol.sh: * tests/test-xstrtoll.sh: * tests/test-xstrtoumax.sh: * tests/unigbrk/test-uc-is-grapheme-break.c (main): * top/GNUmakefile (abort-due-to-no-makefile): Quote 'like this', not `like this', as per the recent change to the GNU coding standards.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* useless-if-before-free: avoid false-positiveJim Meyering2011-04-201-3/+3
| | | | | | | | | * build-aux/useless-if-before-free: Adjust regexp for the non-brace disjunct so that it too requires a terminating ";". Without that, this script would identify as useless one statement from gcc that was not: if (aligned_ptr) free (((void **) aligned_ptr) [-1]);
* useless-if-before-free: fix typo in --help and make the internal,Karl Heuer2011-01-091-5/+3
| | | | | | | | | | | automatic version date update process work once again. --help output contained a NUL character instead of the backslash-zero that was intended. Also, the "must lie within the first 8 lines" line is on line 9, and hence not getting automatically updated. * build-aux/useless-if-before-free: Fix the former by adding a backslash, and the latter by condensing the three lines of what-it-does to a single line, leaving one line of slack for the future.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* update nearly all FSF copyright year lists to include 2009Jim Meyering2009-12-291-1/+1
| | | | | | | | | | | | | | | | | | The files named by the following are exempted: grep -v '^#' config/srclist.txt|grep -v '^$' \ | while read src dst; do test -f "$dst" && { echo "$dst"; continue; } test -d "$dst" || continue echo "$dst"/$(basename "$src") done > exempt git ls-files tests/unictype >> exempt In the remaining files, convert to all-interval notation if - there is already at least one year interval like 2000-2003 - the file is maintained by me - the file is in lib/uni*/, where that style already prevails Otherwise, use update-copyright's default.
* perl scripts: remove #!/usr/bin/perl in favor of more portable...Jim Meyering2009-10-301-1/+4
| | | | | | | | | | | | | Rather than putting #!/usr/bin/perl on the first line, start with a variant of what's recommended by "man perlrun" that invokes the first "perl" program from your shell's search path. * build-aux/gitlog-to-changelog: Replace #!... as above. Add a "Local Variables" perl mode setting. Prompted by a patch from Ludovic Courtès. Improved by Eric Blake. * build-aux/useless-if-before-free: Likewise. * build-aux/announce-gen: Likewise. * build-aux/update-copyright: Likewise.
* useless-if-before-free: improve conversion codeJim Meyering2009-04-161-5/+7
| | | | | * build-aux/useless-if-before-free: Adjust code-in-comment to match "...!= 0" as well as "...!= NULL". emacs has one of the former.
* useless-if-before-free: show how to remove braced useless free, tooJim Meyering2009-04-071-3/+9
| | | | * build-aux/useless-if-before-free: still only in a comment, though.
* useless-if-before-free: correctionJim Meyering2009-01-281-5/+3
| | | | | It does *not* recognize "if (p != (void*)0) free(p);", since the RHS in this example may not contain ")"
* useless-if-before-free: recognize more variantsJim Meyering2009-01-281-10/+30
| | | | | * build-aux/useless-if-before-free: Also recognize e.g., if (NULL != p) free (p);
* useless-if-before-free: freed expr may have white-space differencesJim Meyering2008-05-251-8/+16
| | | | | | | | * build-aux/useless-if-before-free: Recognize cases in which the freed expression differs from the tested one in embedded white space, e.g., if (p[i + 1]) free(p[i+1]). Correct thinko in prev: $1 was used, so we can't make any regexp shy. Improved tests now detect this.
* useless-if-before-free: accept white space in the expression.Jim Meyering2008-05-251-2/+2
| | | | | * build-aux/useless-if-before-free: For now, any white space in the expression must be identical in the free argument.
* Make the *outer* regexp shy, not the expr-matching one.Jim Meyering2008-05-251-2/+2
|
* useless-if-before-free: efficiency tweakJim Meyering2008-05-251-4/+4
| | | | | * build-aux/useless-if-before-free: Make the expression-matching regexp "shy".
* update code-in-comment to accept cast of free argJim Meyering2008-05-251-5/+5
| | | | * build-aux/useless-if-before-free: Update regexp.
* useless-if-before-free: correct --help's exit status descriptionJim Meyering2008-05-011-3/+3
| | | | | * build-aux/useless-if-before-free (usage): Like grep, exit 0 for one or more matches, etc. Reported by Bruno Haible.
* When the is more than one match in a block, match all of them.Jim Meyering2008-04-291-3/+3
| | | | | * build-aux/useless-if-before-free: Iterate through each block until there are no more matches.
* Fix broken useless-if-before-free script.Jim Meyering2008-04-291-3/+3
| | | | | * build-aux/useless-if-before-free: Fix typo: missing "?" after the expression to match cast of argument to free-like function.
* Recognize optional cast of the argument to free.Jim Meyering2008-03-121-3/+3
| | | | * build-aux/useless-if-before-free: Update regexps.
* useless-if-before-free: Fix reversed exit values.Jim Meyering2008-02-111-3/+3
| | | | | * build-aux/useless-if-before-free: Use correct values for EXIT_MATCH and EXIT_NO_MATCH.
* useless-if-before-free: Close stdout carefully.Jim Meyering2008-02-111-1/+9
|
* useless-if-before-free: New option: --list (-l).Jim Meyering2008-02-101-2/+15
|
* * build-aux/useless-if-before-free: Exit 2 for errors.Jim Meyering2008-02-101-7/+21
| | | | | Upon failure to open a file, don't exit immediately. Rather, just warn and continue with any remaining files.
* New script and module: useless-if-before-freeJim Meyering2008-02-101-0/+137
* MODULES.html.sh (maint+release support): Add useless-if-before-free. * build-aux/useless-if-before-free: New file. * modules/useless-if-before-free: New file.