| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Reported by Coverity. The invocation chain is:
argp_help -> _help -> fill_in_uparams -> validate_uparams.
* lib/argp-help.c (validate_uparams): Don't crash if state == NULL.
|
|
|
|
|
| |
* lib/**.{h,c}: Use LGPLv3+ notice whenever the module description says
so.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a test-argp-2.sh test failure on macOS and FreeBSD.
Reported by Jeffrey Walton <noloader@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00085.html>.
* lib/argp-help.c (group_cmp): Remove third argument.
(hol_sibling_cluster_cmp, hol_cousin_cluster_cmp): New functions, based
upon hol_cluster_cmp.
(hol_cluster_cmp): Use hol_cousin_cluster_cmp.
(hol_entry_cmp): Rewritten to implement a total order.
|
|
|
|
|
|
|
|
|
|
| |
* lib/argp-help.c: Add sectioning comments. Write NULL to designate a
null pointer.
(struct hol_entry): Fix comment regarding sort order of group.
(hol_entry_short_iterate, hol_entry_long_iterate): Add comment.
(until_short, canon_doc_option, hol_entry_qcmp): Improve comment.
(hol_cluster_is_child, argp_hol): Move functions.
(HOL_ENTRY_PTRCMP): Remove unused macro.
|
|
|
|
|
| |
* lib/argp-help.c (canon_doc_option): Cast character to 'unsigned int'
before passing it to isspace() or isalnum().
|
|
|
|
|
|
|
|
| |
Patch by Eric Blake
<https://lists.gnu.org/archive/html/bug-gnulib/2009-09/msg00287.html>.
* lib/argp-help.c (hol_entry_cmp): Don't use _tolower on values that are
not upper-case. Pass correct range to tolower.
|
|
|
|
|
| |
* lib/argp-help.c (__argp_short_program_name): Use #warning also on
clang.
|
|
|
|
| |
* lib/argp-help.c: Include <strings.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/gnulib-common.m4 (_Noreturn): Use __attribute__ __noreturn__ also
on clang.
* lib/cdefs.h (__glibc_clang_has_attribute, __glibc_clang_has_builtin):
New macros.
(__THROW, __THROWNL, __NTH, __NTHNL): Use __attribute__ __nothrow__ also
on clang.
(__warndecl, __warnattr, __errordecl): Use __attribute__ __diagnose_if__
also on older clang versions.
(__attribute__): Don't define to empty on clang.
(__attribute_malloc__): Use __attribute__ __malloc__ also on clang.
(__attribute_pure__): Use __attribute__ __pure__ also on clang.
(__attribute_const__): Use __attribute__ __const__ also on clang.
(__attribute_used__): Use __attribute__ __used__ also on clang.
(__attribute_noinline__): Use __attribute__ __noinline__ also on clang.
(__attribute_deprecated__): Use __attribute__ __deprecated__ also on
clang.
(__attribute_format_arg__): Use __attribute__ __format_arg__ also on
clang.
(__attribute_format_strfmon__): Use __attribute__ __format__ __strfmon__
also on clang.
(__nonnull): Use __attribute__ __nonnull__ also on clang.
(__attribute_warn_unused_result__): Use __attribute__
__warn_unused_result__ also on clang.
(__always_inline): Use __attribute__ __always_inline__ also on clang.
(__attribute_artificial__): Use __attribute__ __artificial__ also on
clang >= 7.
(__glibc_unlikely, __glibc_likely): Use __builtin_expect also on older
clang versions.
(_Noreturn): Don't redefine on clang >= 3.5.
* lib/arg-nonnull.h (_GL_ARG_NONNULL): Use __attribute__ __nonnull__
also on clang.
* lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Use __attribute__ __pure__ also
on clang.
* lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Use __attribute__ __format__
also on clang.
* lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise.
* lib/textstyle.in.h (ostream_printf, ostream_vprintf): Likewise.
* lib/unitypes.in.h (_UC_ATTRIBUTE_CONST): Use __attribute__ __const__
also on clang.
(_UC_ATTRIBUTE_PURE): Use __attribute__ __pure__ also on clang.
* lib/noreturn.h (_GL_NORETURN_FUNC, _GL_NORETURN_FUNCPTR): Use
__attribute__ __noreturn__ also on clang.
* lib/obstack.h (__attribute_noreturn__): Likewise.
* lib/file-set.h (record_file): Use __attribute__ __nonnull__ also on
clang.
* lib/argp-help.c (hol_entry_long_iterate): Use __attribute__
always_inline also on clang.
* tests/test-printf-posix.c (func1, func2, func3, func4): Test also on
clang.
|
| |
|
|
|
|
|
| |
* lib/*.[hc]: Fix typos in comments.
* pygnulib/*.py: Fix typos in error messages and comments.
|
|
|
|
|
|
|
| |
Reported by He X <xw897002528@gmail.com>.
* lib/argp-help.c (print_header, argp_doc): Don't pass a NULL doc to
dgettext().
|
|
|
|
|
|
|
|
| |
Reported by He X <xw897002528@gmail.com>.
* lib/argp.h (struct argp): Clarify that the args_doc field may be NULL.
* lib/argp-help.c (argp_args_usage): Don't pass a NULL args_doc to
dgettext().
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* lib/argp-help.c (hol_append): Don’t subtract pointers to
different arrays, as this can run afoul of -fcheck-pointer-bounds.
See the thread containing Bruno Haible’s report in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-05/msg00171.html
|
|
|
|
|
| |
* lib/argp-help.c (__argp_failure): If GNULIB_STRERROR_R_POSIX is set,
assume that strerror_r returns 'int', not 'char *'.
|
|
|
|
| |
* lib/argp-help.c (argp_doc): Fix spelling mistake in comment.
|
|
|
|
|
|
|
| |
* modules/strerror_r-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/error.c: Test GNULIB_STRERROR_R_POSIX before testing
HAVE_DECL_STRERROR_R, HAVE_STRERROR_R, or STRERROR_R_CHAR_P.
* lib/argp-help.c (__argp_failure): Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* 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'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Among other things, this should fix problems found by a Coverity
scan and reported by Andrei Borzenkov:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00015.html
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00016.html
* lib/argp-ba.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h:
* lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h:
* lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c:
* lib/argp.h:
Merge changes from glibc.
* tests/test-argp-2.sh: Adjust to match new behavior.
|
|
|
|
|
|
|
|
|
|
| |
* 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'.
|
|
|
|
|
|
| |
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
|
|
|
| |
* lib/argp-help.c (argp_doc): Never translate the empty string,
when "\v" is the first or last character of the string, as that
has a reserved meaning to return the header info from a po file.
This also fixes a small memory leak in the !post case.
The issue can be seen with this command for example:
LC_MESSAGES=en_US grub2-mknetdir --help
|
|
|
|
|
|
| |
I ran 'make update-copyright'.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
| |
* lib/argp-help.c: Typo in comment.
|
|
|
|
|
|
| |
Run "make update-copyright". Compare to commit 1602f0a from last year.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
| |
* lib/argp-help.c: Include <strings.h>.
* lib/regex_internal.h: Likewise.
Reported and suggested by Joachim Schmitz <jojo@schmitz-digital.de>.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
|
|
| |
* lib/argp-help.c (hol_append): Reorder pointer subtractions so that
only pointers into the same memory block are subtracted. We cannot
assume that sizeof (ptrdiff_t) == sizeof (void *).
|
|
|
|
|
|
|
| |
* lib/argp-help.c (__argp_failure): If strerror_r is defined as a macro
(either to __xpg_strerror_r by glibc's <string.h> or to rpl_strerror_r
by gnulib's <string.h> replacement), assume it has the POSIX signature,
not the glibc signature.
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/intprops.texi: "a integer"
* doc/regex.texi: "a explanation"
* lib/alignof.h: "a object"
* lib/argmatch.h: "a explanation"
* lib/argp-help.c: "a option" and "a OPTION_DOC"
* lib/stdint.in.h: "a integer"
* lib/userspec.c: "a owner"
* doc/gnulib.texi: Fix "a idea", and reword.
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/regex.texi (Collating Symbol Operators): s/an close.../a close/
* lib/argp-help.c: "an docum...": s/an/a/
* lib/argp-parse.c: "An vector": s/An/A/
* lib/execute.c: "an native": s/an/a/
* lib/spawn-pipe.c: Likewise.
* lib/gc.h: "an Gc_rc": s/an/a/
* lib/unigbrk.in.h: "an grapheme": s/an/a/
* lib/fts.c: "an stat.st_dev": s/an/a/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/argp.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(argp_error, __argp_error, argp_failure, __argp_failure): Use it.
* lib/argp-fmtstream.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(__argp_fmtstream_printf, argp_fmtstream_printf): Use it.
* lib/argp-help.c (hol_entry_long_iterate): Use __attribute__ only for
GCC 3 or newer.
* lib/error.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(error, error_at_line): Use it.
* lib/hash.h (__attribute__): Remove definition.
(ATTRIBUTE_WUR): Update definition. Define always.
* lib/openat.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* lib/sigpipe-die.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* lib/vasnprintf.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(asnprintf, vasnprintf): Use it.
* lib/xalloc.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
(ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE): Define always.
* lib/xmemdup0.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* lib/xprintf.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(xprintf, xvprintf, xfprintf, xvfprintf): Use it.
* lib/xstrtol.h (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* lib/xvasprintf.h (__attribute__): Remove definition.
(_GL_ATTRIBUTE_FORMAT): New macro.
(xasprintf, xvasprintf): Use it.
* tests/test-argmatch.c (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
* tests/test-exclude.c (__attribute__): Remove definition.
(ATTRIBUTE_NORETURN): Update definition. Define always.
Reported by Paul Eggert.
|
|
|
|
| |
Run the new "make update-copyright" rule.
|
| |
|
|
|
|
|
| |
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
|
| |
|
|
|
|
|
|
|
| |
* lib/argp-help.c (hol_entry_cmp): Don't use _tolower on values
that are not upper-case. Pass correct range to tolower.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
| |
|
| |
|
|
|
|
|
| |
Otherwise, passing function as argument to `hol_entry_first_short'
fails on some systems.
|
|
|
|
|
| |
(HOL_ENTRY_PTRCMP): Use ord for comparison
(hol_sort): Initialize ord.
|
|
|
|
|
|
| |
assumes the sorting is stable, while most qsort implementations
are not. Use argument addresses to ensure they never compare as
equal.
|
| |
|