diff -Nru datamash-1.1.1/aclocal.m4 datamash-1.2.0/aclocal.m4 --- datamash-1.1.1/aclocal.m4 2017-01-19 19:34:01.000000000 +0000 +++ datamash-1.2.0/aclocal.m4 2017-08-22 23:17:32.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,283 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29) +dnl +dnl Copyright © 2004 Scott James Remnant . +dnl Copyright © 2012-2015 Dan Nicholson +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])dnl PKG_PROG_PKG_CONFIG + +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl have to call PKG_CHECK_EXISTS manually +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])dnl _PKG_CONFIG + +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])dnl _PKG_SHORT_ERRORS_SUPPORTED + + +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])dnl PKG_CHECK_MODULES + + +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +])dnl PKG_INSTALLDIR + + +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +])dnl PKG_NOARCH_INSTALLDIR + + +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR + +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +308,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,74 +327,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_AR([ACT-IF-FAIL]) -# ------------------------- -# Try to determine the archiver interface, and trigger the ar-lib wrapper -# if it is needed. If the detection of archiver interface fails, run -# ACT-IF-FAIL (default is to abort configure with a proper error message). -AC_DEFUN([AM_PROG_AR], -[AC_BEFORE([$0], [LT_INIT])dnl -AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([ar-lib])dnl -AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) -: ${AR=ar} - -AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [AC_LANG_PUSH([C]) - am_cv_ar_interface=ar - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], - [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([am_ar_try]) - if test "$ac_status" -eq 0; then - am_cv_ar_interface=ar - else - am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([am_ar_try]) - if test "$ac_status" -eq 0; then - am_cv_ar_interface=lib - else - am_cv_ar_interface=unknown - fi - fi - rm -f conftest.lib libconftest.a - ]) - AC_LANG_POP([C])]) - -case $am_cv_ar_interface in -ar) - ;; -lib) - # Microsoft lib, so override with the ar-lib wrapper script. - # FIXME: It is wrong to rewrite AR. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__AR in this case, - # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something - # similar. - AR="$am_aux_dir/ar-lib $AR" - ;; -unknown) - m4_default([$1], - [AC_MSG_ERROR([could not determine $AR interface])]) - ;; -esac -AC_SUBST([AR])dnl -]) - # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -163,15 +379,14 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -202,7 +417,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -393,7 +608,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -469,7 +684,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -559,8 +774,8 @@ # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -633,7 +848,11 @@ END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -662,7 +881,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -673,7 +892,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -683,7 +902,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -704,7 +923,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -754,7 +973,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -793,7 +1012,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -822,7 +1041,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -869,7 +1088,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -888,7 +1107,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -969,7 +1188,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1029,7 +1248,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1057,7 +1276,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1076,7 +1295,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru datamash-1.1.1/build-aux/compile datamash-1.2.0/build-aux/compile --- datamash-1.1.1/build-aux/compile 2017-01-19 19:34:08.000000000 +0000 +++ datamash-1.2.0/build-aux/compile 2017-08-22 23:17:39.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff -Nru datamash-1.1.1/build-aux/config.guess datamash-1.2.0/build-aux/config.guess --- datamash-1.1.1/build-aux/config.guess 2017-01-10 19:44:08.000000000 +0000 +++ datamash-1.2.0/build-aux/config.guess 2017-08-22 19:22:42.000000000 +0000 @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2017-08-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -259,6 +259,9 @@ *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; + *:Redox:*:*) + echo ${UNAME_MACHINE}-unknown-redox + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -837,10 +840,11 @@ UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -1303,14 +1307,21 @@ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub @@ -1334,15 +1345,18 @@ *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) + NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; - NSR-?:NONSTOP_KERNEL:*:*) + NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; @@ -1418,8 +1432,8 @@ $0: unable to guess system type This script (version $timestamp), has failed to recognize the -operating system you are using. If your script is old, overwrite -config.guess and config.sub with the latest versions from: +operating system you are using. If your script is old, overwrite *all* +copies of config.guess and config.sub with the latest versions from: http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess and diff -Nru datamash-1.1.1/build-aux/config.sub datamash-1.2.0/build-aux/config.sub --- datamash-1.1.1/build-aux/config.sub 2017-01-10 19:44:08.000000000 +0000 +++ datamash-1.2.0/build-aux/config.sub 2017-05-03 21:43:05.000000000 +0000 @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2017-04-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -263,7 +263,7 @@ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ @@ -315,6 +315,7 @@ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ + | wasm32 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -388,7 +389,7 @@ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ @@ -446,6 +447,7 @@ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -948,6 +950,9 @@ nsr-tandem) basic_machine=nsr-tandem ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -1243,6 +1248,9 @@ basic_machine=a29k-wrs os=-vxworks ;; + wasm32) + basic_machine=wasm32-unknown + ;; w65*) basic_machine=w65-wdc os=-none diff -Nru datamash-1.1.1/build-aux/gen-coverage-report.sh datamash-1.2.0/build-aux/gen-coverage-report.sh --- datamash-1.1.1/build-aux/gen-coverage-report.sh 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/build-aux/gen-coverage-report.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -#!/bin/sh - -## Copyright (C) 2014-2017 Assaf Gordon -## -## This file is part of GNU Datamash. -## -## GNU Datamash 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. -## -## GNU Datamash 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 GNU Datamash. If not, see . - - -## -## A small helper script to re-generate coverage report. -## - -die() -{ - BASE=$(basename "$0") - echo "$BASE error: $@" >&2 - exit 1 -} - -cd $(dirname "$0")/.. || die "failed to set directory" - -GCDAFILES=$(find -name "*.gcda") || die "failed to search for *.gcda files" -GCNOFILES=$(find -name "*.gcno") || die "failed to search for *.gcno files" -[ -z "$GCDAFILES" -o -z "$GCNOFILES" ] && - die "No coverage files found (*.gcda/*.gcno) - did you rebuild with " \ - "coverage instrumentation? try ./build-aux/rebuild-coverage.sh" - -PROJECT=datamash -LCOVFILE="$PROJECT.lcov" -REPORTDIR="$PROJECT-cov" - -rm -f "./$LCOVFILE" -rm -rf "./$REPORTDIR" - -## Then generate the coverage report -lcov -t "$PROJECT" -q -d src -c -o "$LCOVFILE" || die "lcov failed" -genhtml -t "$PROJECT" --output-directory "$REPORTDIR" "$LCOVFILE" || - die "genhtml failed" - -echo -echo -echo "Initial coverage report: ./$REPORTDIR/index.html" -echo "" -echo "To accumulate more coverage information, run '$PROJECT' again," -echo "then, re-generate the coverage report by re-running $0" -echo "" diff -Nru datamash-1.1.1/build-aux/git-version-gen datamash-1.2.0/build-aux/git-version-gen --- datamash-1.1.1/build-aux/git-version-gen 2017-01-10 20:00:58.000000000 +0000 +++ datamash-1.2.0/build-aux/git-version-gen 2017-08-22 19:23:19.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # Print a version string. -scriptversion=2017-01-09.19; # UTC +scriptversion=2017-08-20.18; # UTC # Copyright (C) 2007-2017 Free Software Foundation, Inc. # @@ -167,9 +167,10 @@ # tag or the previous older version that did not? # Newer: v6.10-77-g0f8faeb # Older: v6.10-g0f8faeb - case $v in - *-*-*) : git describe is okay three part flavor ;; - *-*) + vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v + case $vprefix in + *-*) : git describe is probably okay three part flavor ;; + *) : git describe is older two part flavor # Recreate the number of commits and rewrite such that the # result is the same as if we were using the newer version @@ -184,9 +185,9 @@ ;; esac - # Change the first '-' to a '.', so version-comparing tools work properly. - # Remove the "g" in git describe's output string, to save a byte. - v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; + # Change the penultimate "-" to ".", for version-comparing tools. + # Remove the "g" to save a byte. + v=`echo "$v" | sed 's/-\([^-]*\)-g\([^-]*\)$/.\1-\2/'`; v_from_git=1 elif test "x$fallback" = x || git --version >/dev/null 2>&1; then v=UNKNOWN diff -Nru datamash-1.1.1/build-aux/missing datamash-1.2.0/build-aux/missing --- datamash-1.1.1/build-aux/missing 2017-01-19 19:34:08.000000000 +0000 +++ datamash-1.2.0/build-aux/missing 2017-08-22 23:17:39.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru datamash-1.1.1/build-aux/prerelease-checks.sh datamash-1.2.0/build-aux/prerelease-checks.sh --- datamash-1.1.1/build-aux/prerelease-checks.sh 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/build-aux/prerelease-checks.sh 2017-08-22 23:05:11.000000000 +0000 @@ -0,0 +1,61 @@ +#!/bin/sh + +## Copyright (C) 2014-2017 Assaf Gordon +## +## This file is part of GNU Datamash. +## +## GNU Datamash 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. +## +## GNU Datamash 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 GNU Datamash. If not, see . + + +## +## A small helper script to easily copy, build and check +## the current repository in several different environments and configurations. +## +PACKAGE=datamash + +die() +{ + BASE=$(basename "$0") + echo "$BASE: error: $*" >&2 + exit 1 +} + +## +## Clean, rebuild and test locally +## + +make maintainer-clean # ignore failure +./bootstrap || die "./bootstrap failed" +./configure || die "./configure failed" +make || die "make failed" + +for TYPE in check-very-expensive \ + syntax-check \ + html info pdf \ + clean deb-hard \ + clean coverage \ + clean distcheck ; +do + make $TYPE || die "make $TYPE failed" +done + +## +## Build with non-root installation prefix +## +DIR=$(mktemp -d tmp-install.XXXXXX) || die "mktemp failed" +DIR=$(realpath "$DIR") || die "realpath failed on '$DIR'" +make distclean || die "make distclean failed (before non-root install)" +./configure --prefix "$DIR" || die "./configure --prefix=$DIR failed" +make || die "make failed (for non-root install)" +make install || die "make install failed (for non-root install)" diff -Nru datamash-1.1.1/build-aux/rebuild-coverage.sh datamash-1.2.0/build-aux/rebuild-coverage.sh --- datamash-1.1.1/build-aux/rebuild-coverage.sh 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/build-aux/rebuild-coverage.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -#!/bin/sh - -## Copyright (C) 2014-2017 Assaf Gordon -## -## This file is part of Compute. -## -## Compute 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. -## -## Compute 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 Compute. If not, see . - - -## -## A small helper script to rebuild the project with coverage instrumentation. -## - -die() -{ - BASE=$(basename "$0") - echo "$BASE error: $@" >&2 - exit 1 -} - -cd $(dirname "$0")/.. || die "failed to set directory" - -find "$PWD" \( -name "*.gcda" -o -name "*.gcno" \) -delete || - die "deleting existing gcda/gcno files failed" - -./configure CFLAGS="-g -fprofile-arcs -ftest-coverage" || - die "./configure failed" -make clean || die "make clean failed" -make || die "make failed" - -## Automatically run the basic checks, at least once. -make check || die "make check failed" - -## Generate the initial coverage report -DIR=$(dirname "$0") || die "failed to detect script's directory" -GEN="$DIR/gen-coverage-report.sh" -[ -e "$GEN" ] || die "Required script '$GEN' not found" - -"$GEN" || die "failed to generate coverage report" diff -Nru datamash-1.1.1/build-aux/snippet/arg-nonnull.h datamash-1.2.0/build-aux/snippet/arg-nonnull.h --- datamash-1.1.1/build-aux/snippet/arg-nonnull.h 2017-01-10 20:00:58.000000000 +0000 +++ datamash-1.2.0/build-aux/snippet/arg-nonnull.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2017 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 . */ - -/* _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 -Nru datamash-1.1.1/build-aux/snippet/c++defs.h datamash-1.2.0/build-aux/snippet/c++defs.h --- datamash-1.1.1/build-aux/snippet/c++defs.h 2017-01-10 20:00:58.000000000 +0000 +++ datamash-1.2.0/build-aux/snippet/c++defs.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,316 +0,0 @@ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2017 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 . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ diff -Nru datamash-1.1.1/build-aux/snippet/_Noreturn.h datamash-1.2.0/build-aux/snippet/_Noreturn.h --- datamash-1.1.1/build-aux/snippet/_Noreturn.h 2014-07-05 20:14:51.000000000 +0000 +++ datamash-1.2.0/build-aux/snippet/_Noreturn.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#if !defined _Noreturn && __STDC_VERSION__ < 201112 -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif diff -Nru datamash-1.1.1/build-aux/snippet/unused-parameter.h datamash-1.2.0/build-aux/snippet/unused-parameter.h --- datamash-1.1.1/build-aux/snippet/unused-parameter.h 2017-01-10 20:00:58.000000000 +0000 +++ datamash-1.2.0/build-aux/snippet/unused-parameter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -/* A C macro for declaring that specific function parameters are not used. - Copyright (C) 2008-2017 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 . */ - -/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter - declarations for parameters that are not used. This helps to reduce - warnings, such as from GCC -Wunused-parameter. The syntax is as follows: - type param _GL_UNUSED_PARAMETER - or more generally - param_decl _GL_UNUSED_PARAMETER - For example: - int param _GL_UNUSED_PARAMETER - int *(*param)(void) _GL_UNUSED_PARAMETER - Other possible, but obscure and discouraged syntaxes: - int _GL_UNUSED_PARAMETER *(*param)(void) - _GL_UNUSED_PARAMETER int *(*param)(void) - */ -#ifndef _GL_UNUSED_PARAMETER -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) -# else -# define _GL_UNUSED_PARAMETER -# endif -#endif diff -Nru datamash-1.1.1/build-aux/snippet/warn-on-use.h datamash-1.2.0/build-aux/snippet/warn-on-use.h --- datamash-1.1.1/build-aux/snippet/warn-on-use.h 2017-01-10 20:00:58.000000000 +0000 +++ datamash-1.2.0/build-aux/snippet/warn-on-use.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2017 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 . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - This macro is useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. However, one of the reasons that a function is a - portability trap is if it has the wrong signature. Declaring - FUNCTION with a different signature in C is a compilation error, so - this macro must use the same type as any existing declaration so - that programs that avoid the problematic FUNCTION do not fail to - compile merely because they included a header that poisoned the - function. But this implies that _GL_WARN_ON_USE is only safe to - use if FUNCTION is known to already have a declaration. Use of - this macro implies that there must not be any other macro hiding - the declaration of FUNCTION; but undefining FUNCTION first is part - of the poisoning process anyway (although for symbols that are - provided only via a macro, the result is a compilation error rather - than a warning containing "literal string"). Also note that in - C++, it is only safe to use if FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char ***rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that the function is - declared with the given prototype, consisting of return type, parameters, - and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif diff -Nru datamash-1.1.1/build-aux/tag-new-version.sh datamash-1.2.0/build-aux/tag-new-version.sh --- datamash-1.1.1/build-aux/tag-new-version.sh 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/build-aux/tag-new-version.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,167 +0,0 @@ -#!/bin/sh - -## Copyright (C) 2014-2017 Assaf Gordon -## -## This file is part of GNU Datamash. -## -## GNU Datamash 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. -## -## GNU Datamash 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 GNU Datamash. If not, see . - - -## -## This scripts lists the existing Git Tags, and asks to set a new git tag. -## Git tags are used to automatically set the program version. -## - -die() -{ - BASE=$(basename "$0") - echo "$BASE error: $@" >&2 - exit 1 -} - -cd $(dirname "$0")/.. || die "failed to set directory" - - -## -## Show existing tags, revisions and dates -## -echo "Existing Git Tags:" -echo -for TAG in $(git tag) ; -do - echo " Tag: $TAG" - git log --format=\ - "format: Rev: %H%n Subj: %s%n Date: %ad (%ar)" \ - -n 1 "$TAG" - echo -done - -## -## Show the current git tag, -## which could be something like "3.0.3-112-abcd-dirty" -## -echo "Current Git ID:" -GITID=$(./build-aux/git-version-gen .tarball-version) || - die "Failed to get git id" -echo " $GITID" -echo - -## -## On auto-tag the 'master' branch. -## For more complicated releases, do them manually -BRANCH=$(git branch | awk '/^\*/{print $2}') -[ "$BRANCH" = "master" ] || - die "Seems like this is not the 'master' branch. Aborting" - -## -## Ensure no un-commited changes -## -UNCOMMITED=$(git status -uno -s) || die "failed to get git status" -[ -z "$UNCOMMITED" ] || die "There are uncommited changes. Aborting" - - -## -## Ask if the user wants to create a new git tag -## -echo "Do you want to create a new git tag (i.e. mark a new version)?" -printf "Type 'yes' + enter to continue, or CTRL-C to stop: " -read NEWTAG -[ "$NEWTAG" = "yes" ] || { echo "Aborting." >&2 ; exit 1 ; } -echo -echo - - -## -## Ask for the git tag -## -printf "Enter new git tag, in the form of 'vX.Y.Z' (e.g. 'v2.1.13'): " -read NEWVERSION -echo "$NEWVERSION" | grep -E -q '^v[0-9]+\.[0-9]+\.[0-9]+$' || - { echo "invalid version format ($NEWVERSION), expecting 'vX.Y.Z'" >&2 ; - exit 1 ; } - -## -## Add this tag to the git repository -## -git tag -a "$NEWVERSION" -m "New Version $NEWVERSION" -echo - -## Verify updated tag -NEWGITID=$(./build-aux/git-version-gen .tarball-version) || - die "Failed to get new git id" -[ "v$NEWGITID" = "$NEWVERSION" ] || - die "Failed to set new git ID " \ - "(./build-aux/git-version-gen did not return '$NEWVERSION')" - -echo -## Re-generate 'configure' with the new tagged version -echo "Rebuilding package..." -./bootstrap || die "bootstrap failed" -./configure || die "configure failed" -make clean || die "make clean failed" -make -j || die "make failed" -make dist || die "make dist failed" -make distcheck || die "make distcheck failed" - - -## -## Suggest further action -## -TARBALL=compute-$NEWGITID.tar.gz -SRCURL=https://s3.amazonaws.com/agordon/compute/src/$TARBALL -SHA1=$(sha1sum "$TARBALL" | cut -f1 -d" ") -echo " - -Further actions: - 1. Upload source tarball to S3: - ./build-aux/aws-upload.sh "$TARBALL" src - - 2. Update DEB package - ssh deb7 ./make_deb.sh $SRCURL - - 3. Update RPM package - ssh centos ./make_rpm.sh $SRCURL - - 4. Update FreeBSD binary - ssh fbsd ./make_bsd.sh $SRCURL - - 5. Update Homebrew Formula - URL: $SRCURL - SHA1: $SHA1 - - 6. Update Travis-CI MacOSX - git checkout -b macosx1 master - cp .travis.yml.MAC .travis.yml - git add .travis.yml - git commit -m "Travis Mac OS X Update" - git push --set-upstream origin macosx1 - git checkout master - - 7. Create static binary: - ./build-aux/make_bin_dist.sh - - 8. Update GitHub-pages (and website) to version $NEWGITID - git co gh-pages - vi _config.yml - - 9. Push new tag to GitHub: | To remove local git tag: - git push --tags | git tag -d $NEWVERSION - | To remove Remote GitHub tag: - | git tag -d $NEWVERSION - | git push origin :refs/tags/$NEWVERSION - - 10. Upload source tarball to GitHub Releases: - https://github.com/agordon/compute/releases - -" diff -Nru datamash-1.1.1/build-aux/test-driver datamash-1.2.0/build-aux/test-driver --- datamash-1.1.1/build-aux/test-driver 2017-01-19 19:34:08.000000000 +0000 +++ datamash-1.2.0/build-aux/test-driver 2017-08-22 23:17:40.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 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 @@ -106,11 +106,14 @@ # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -119,6 +122,12 @@ *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" diff -Nru datamash-1.1.1/build-aux/texinfo.tex datamash-1.2.0/build-aux/texinfo.tex --- datamash-1.1.1/build-aux/texinfo.tex 2017-01-19 15:31:35.000000000 +0000 +++ datamash-1.2.0/build-aux/texinfo.tex 2017-08-22 19:22:42.000000000 +0000 @@ -3,11 +3,11 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2017-01-14.15} +\def\texinfoversion{2017-08-20.20} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 % Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or @@ -5493,17 +5493,15 @@ \let\indexlbrace\{ % Likewise, set these sequences for braces \let\indexrbrace\} % used in the sort key. \begindoublecolumns - \let\entrywidowpenalty=\indexwidowpenalty + \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty % % Read input from the index file line by line. \loopdo - \ifeof1 - \let\firsttoken\relax - \else + \ifeof1 \else \read 1 to \nextline - \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% - \act \fi + % + \indexinputprocessing \thisline % \ifeof1\else @@ -5515,12 +5513,20 @@ \fi \closein 1 \endgroup} +\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} +\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} +\def\indexinputprocessing{% + \ifeof1 + \let\firsttoken\relax + \else + \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% + \act + \fi +} \def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} \long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} -\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} -\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. @@ -5597,7 +5603,7 @@ % For pdfTeX and XeTeX. % The redefinition of \domark stops marks being added in \pdflink to % preserve coloured links across page boundaries. Otherwise the marks - % would get in the way of \lastbox in \insertindexentrybox. + % would get in the way of \lastbox in \insertentrybox. \let\domark\relax % % Start a new paragraph if necessary, so our assignments below can't @@ -5658,9 +5664,9 @@ \fi \egroup % end \boxA \ifdim\wd\boxB = 0pt - \global\setbox\entryindexbox=\vbox{\unhbox\boxA}% + \global\setbox\entrybox=\vbox{\unhbox\boxA}% \else - \global\setbox\entryindexbox=\vbox\bgroup + \global\setbox\entrybox=\vbox\bgroup % We want the text of the entries to be aligned to the left, and the % page numbers to be aligned to the right. % @@ -5722,19 +5728,20 @@ \egroup % The \vbox \fi \endgroup - % delay text of entry until after penalty - \bgroup\aftergroup\insertindexentrybox - \entrywidowpenalty + \dotheinsertentrybox }} \newskip\thinshrinkable \skip\thinshrinkable=.15em minus .15em -\newbox\entryindexbox -\def\insertindexentrybox{% - \ourunvbox\entryindexbox +\newbox\entrybox +\def\insertentrybox{% + \ourunvbox\entrybox } +% default definition +\let\dotheinsertentrybox\insertentrybox + % Use \lastbox to take apart vbox box by box, and add each sub-box % to the current vertical list. \def\ourunvbox#1{% @@ -5757,21 +5764,18 @@ \newbox\delayedbox \newbox\interbox -% Default is no penalty -\let\entrywidowpenalty\egroup - % Used from \printindex. \firsttoken should be the first token % after the \entry. If it's not another \entry, we are at the last % line of a group of index entries, so insert a penalty to discourage % widowed index entries. -\long\def\indexwidowpenalty{% - \def\isentry{\entry}% +\def\dotheinsertentryboxwithpenalty{% \ifx\firsttoken\isentry \else \penalty 9000 \fi - \egroup % now comes the box added with \aftergroup + \insertentrybox } +\def\isentry{\entry}% % Like plain.tex's \dotfill, except uses up at least 1 em. % The filll stretch here overpowers both the fil and fill stretch to push @@ -5888,8 +5892,8 @@ \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % - % Double the \vsize as well. (We don't need a separate register here, - % since nobody clobbers \vsize.) + % Double the \vsize as well. + \advance\vsize by -\ht\partialpage \vsize = 2\vsize % % For the benefit of balancing columns @@ -5907,12 +5911,12 @@ % previous page. \dimen@ = \vsize \divide\dimen@ by 2 - \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. - \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ + \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@ + \global\advance\vsize by 2\ht\partialpage \onepageout\pagesofar - \unvbox255 + \unvbox\PAGE \penalty\outputpenalty } % @@ -5976,9 +5980,9 @@ % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column - % typesetting, so reset \pagegoal to the normal \vsize (after the - % \endgroup where \vsize got restored). - \pagegoal = \vsize + % typesetting, so reset \pagegoal to the normal \vsize. + \global\vsize = \txipageheight % + \pagegoal = \txipageheight % } \newbox\balancedcolumns \setbox\balancedcolumns=\vbox{shouldnt see this}% @@ -5986,7 +5990,7 @@ % Only called for the last of the double column material. \doublecolumnout % does the others. \def\balancecolumns{% - \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. + \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip @@ -6939,7 +6943,15 @@ % exist, with an empty box. Let's hope all the numbers have the same width. % Also ignore the page number, which is conventionally not printed. \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} -\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +\def\partentry#1#2#3#4{% + % Add stretch and a bonus for breaking the page before the part heading. + % This reduces the chance of the page being broken immediately after the + % part heading, before a following chapter heading. + \vskip 0pt plus 5\baselineskip + \penalty-300 + \vskip 0pt plus -5\baselineskip + \dochapentry{\numeralbox\labelspace#1}{}% +} % % Parts, in the short toc. \def\shortpartentry#1#2#3#4{% @@ -9118,7 +9130,13 @@ \xdef\safexrefname{#1}% }% % - \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref + \bgroup + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% + \egroup + % We put the \gdef inside a group to avoid the definitions building up on + % TeX's save stack, which can cause it to run out of space for aux files with + % thousands of lines. \gdef doesn't use the save stack, but \csname does + % when it defines an unknown control sequence as \relax. % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname @@ -10999,7 +11017,6 @@ \DeclareUnicodeCharacter{2113}{\ensuremath\ell}% \DeclareUnicodeCharacter{2118}{\ensuremath\wp}% \DeclareUnicodeCharacter{211C}{\ensuremath\Re}% - \DeclareUnicodeCharacter{2127}{\ensuremath\mho}% \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}% \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}% \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}% @@ -11015,7 +11032,6 @@ \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}% \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}% \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}% - \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright}% \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}% \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}% \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}% @@ -11024,8 +11040,6 @@ \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}% \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}% \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}% - \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto}% - \DeclareUnicodeCharacter{2201}{\ensuremath\complement}% \DeclareUnicodeCharacter{2202}{\ensuremath\partial}% \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}% \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}% @@ -11059,8 +11073,6 @@ \DeclareUnicodeCharacter{2283}{\ensuremath\supset}% \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}% \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}% - \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset}% - \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}% \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}% \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}% \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}% @@ -11075,8 +11087,6 @@ \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}% \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}% \DeclareUnicodeCharacter{22A8}{\ensuremath\models}% - \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd}% - \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd}% \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}% \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}% \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}% @@ -11092,12 +11102,11 @@ \DeclareUnicodeCharacter{2322}{\ensuremath\frown}% \DeclareUnicodeCharacter{2323}{\ensuremath\smile}% % - \DeclareUnicodeCharacter{25A1}{\ensuremath\Box}% \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}% \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}% \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}% \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}% - \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond}% + \DeclareUnicodeCharacter{25C7}{\ensuremath\diamond}% \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}% \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}% \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}% @@ -11119,7 +11128,6 @@ \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}% \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}% \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}% - \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join}% \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}% \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}% \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}% @@ -11274,6 +11282,7 @@ \pdfvorigin = 1 true in \else \ifx\XeTeXrevision\thisisundefined + \special{papersize=#8,#7}% \else \pdfpageheight #7\relax \pdfpagewidth #8\relax @@ -11311,7 +11320,6 @@ % \lispnarrowing = 0.3in \tolerance = 700 - \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} @@ -11329,7 +11337,6 @@ % \lispnarrowing = 0.25in \tolerance = 700 - \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} @@ -11355,7 +11362,6 @@ {297mm}{210mm}% % \tolerance = 700 - \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} @@ -11374,7 +11380,6 @@ % \lispnarrowing = 0.2in \tolerance = 800 - \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm @@ -11430,6 +11435,9 @@ % \letterpaper +% Default value of \hfuzz, for suppressing warnings about overfull hboxes. +\hfuzz = 1pt + \message{and turning on texinfo input format.} @@ -11595,6 +11603,9 @@ @def ^^M{@let^^M@secondlinenl}% % Definition for a newline in the main Texinfo file. @gdef @secondlinenl{@fixbackslash}% + % In case the first line has a whole-line command on it + @let@originalparsearg@parsearg + @def@parsearg{@fixbackslash@originalparsearg} }} {@catcode`@^=7 @catcode`@^^M=13% @@ -11615,6 +11626,7 @@ @catcode13=5 % regular end of line @enableemergencynewline @let@c=@texinfoc + @let@parsearg@originalparsearg % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. @catcode`+=@active diff -Nru datamash-1.1.1/build-aux/vc-list-files datamash-1.2.0/build-aux/vc-list-files --- datamash-1.1.1/build-aux/vc-list-files 2017-01-10 20:00:58.000000000 +0000 +++ datamash-1.2.0/build-aux/vc-list-files 2017-08-22 19:23:19.000000000 +0000 @@ -2,7 +2,7 @@ # List version-controlled file names. # Print a version string. -scriptversion=2016-01-11.22; # UTC +scriptversion=2017-08-21.19; # UTC # Copyright (C) 2006-2017 Free Software Foundation, Inc. @@ -65,7 +65,7 @@ for dir do - if test -d .git; then + if test -d .git || test -f .git; then test "x$dir" = x. \ && dir= sed_esc= \ || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; } diff -Nru datamash-1.1.1/ChangeLog datamash-1.2.0/ChangeLog --- datamash-1.1.1/ChangeLog 2017-01-19 20:05:43.000000000 +0000 +++ datamash-1.2.0/ChangeLog 2017-08-22 23:19:42.000000000 +0000 @@ -1,3 +1,291 @@ +2017-08-22 Assaf Gordon + + version 1.2 + * NEWS: Record release date. + + maint: remove missing files from Makefile.am + * Makefile.am: Remove files (which were deleted in previous commit). + + maint: remove outdated build-aux scripts + * build-aux/check-remote-make-all.sh, + build-aux/check-remote-make-extra.sh, + build-aux/check-remote-make-git.sh, + build-aux/check-remote-make.sh: Precursors the http://pretest.nongnu.org, + no need for standalone scripts any more. + * build-aux/gen-coverage-report.sh, + build-aux/rebuild-coverage.sh: obsoleted by 'make coverage'. + * build-aux/tag-new-version.sh: Removed. + + maint: update prerelease checks script + * build-aix/prerelease-checks.sh: Remove outdated checks, add + non-root-installation check. + + maint: fix 'syntax-check' errors + * src/crosstab.c: space-before-parens. + * src/datamash.c: double-word. + + gnulib: update to latest + +2017-08-20 Assaf Gordon + + tests: skip tests if paste(1) is not found + On Alpine linux, paste(1) is not installed by default - skip instead + of failing. + + * init.cfg (require_paste_): New shell function. + * tests/datamash-rand.sh, + tests/datamash-sort-errors.sh: Skip if paste(1) is not found. + +2017-08-20 Assaf Gordon + + tests: quote '^' in shell commands + The '^' character has special meaning in older shells (e.g. OpenSolaris + 10/sparc). Quote it to prevent test failures. + +2017-08-20 Assaf Gordon + + tests: accept '-nan' under OpenBSD + OpenBSD systems return '-nan' instead of 'nan' for two tests. + Ignore the '-' prefix. + + * tests/datamash-tests-2.pl (narm12,narm15): Discard '-' prefix. + +2017-08-20 Assaf Gordon + + datamash: fix incorrect int size for percetiles + On SunOS 5.11/i86pc, sizeof(size_t)==4 while sizeof(uintmax_t)==8. + This leads to incorrect printf output. + Reported by Dagobert Michelseni in + https://lists.gnu.org/archive/html/bug-datamash/2017-08/msg00004.html . + + A better long term solution is to switch entirely from size_t to uintmax_t. + + * src/op-parser.c, + src/datamash.c: use PRIuMAX for printf, and convert to uintmax_t. + +2017-08-09 Assaf Gordon + + maint: improve bash-completion script installation (again) + Reported by Bruno Haible in + https://lists.gnu.org/archive/html/bug-datamash/2017-08/msg00002.html: + the current installation defaults to global location + (e.g /usr/share/bash-completion.d) and does not work with non-root + installation. Change default to local installation, with option to + auto-detect the system's global location. + Usage: + ./configure --with-bash-completion-dir=[no|local|global|PATH] + See README for more details. + + * configure.ac: Change --with-bash-copmletion-dir processing. + * NEWS: Mention this. + * README: Document this. + +2017-08-07 Assaf Gordon + + bash-completion: add range,perc operations + * contrib/bash-completion/datamash: Add range/perc (percentile) + operations to list of suggested completions. + +2017-06-07 Assaf Gordon + + datamash: add lines/fields option to 'check' operation + Datamash will fail with non-zero exit code if the input does not + have the expected number of lines/fields. + + Typical usage: + + $ seq 10 | paste - - | datamash check 2 fields && echo ok + 5 lines, 2 fields + ok + + $ seq 10 | paste - - | datamash check 6 fields && echo ok + line 1 (2 fields): + 1 2 + datamash: check failed: line 1 has 2 fields (expecting 6) + + $ seq 10 | datamash check 11 lines + datamash: check failed: input had 10 lines (expecting 11) + + * NEWS: Mention new options. + * src/datamash.c (tabular_check_file): Implement additional checks. + * src/op-parser.h (struct mode_check_params_t): New struct to hold + options. (struct datamash_ops): Add new struct. + * src/op-parser.c (parse_check_line_or_field, parse_mode_check): New + functions to parse 'check' options. + (parse_mode): Parse option in 'check' mode. + * tests/datamash-parser.pl: Add parsing tests. + * tests/datamash-check.pl: Add 'check' tests. + * Makefile.am: Add 'datamash-check.pl' test script. + * man/datamash.x: Add 'check' examples. + * doc/datamash.texi: Expand 'check' section. + +2017-06-06 Assaf Gordon + + maint: mark more lines as LCOV_EXCL_LINE for more accurate coverage + +2017-05-25 Assaf Gordon + + gnulib: update to latest + +2017-05-25 Assaf Gordon + + datamash: free crosstab memory if LINT + Detected by Covrity scan (CID 72245, 72246). + + * src/crosstab.c (print_crosstab): Call free() if lint is enabled. + +2017-05-25 Assaf Gordon + + build: add lint option to configure script + Usage: ./configure --enable-lint + + Use during development to supress non-critical warnings. + + * configure.ac: Add --enable-lint option. + * HACKING: Mention this option. + +2017-05-08 Assaf Gordon + + build: add src/die.h to source files list + Omitted from previous commit v1.1.1-10-gedab279 + "datamash: use die() instead of error()". + + * Makefile.am (datamash_SOURCES): Add missing file. + +2017-05-08 Assaf Gordon + + datamash: new operation 'range' + Calculate the range of values in the group: + + $ printf '%s\n' 5 3 14 6 | datamash range 1 + 11 + + Using 'range' is equivalent to: + $ printf '%s\n' 5 3 14 6 | datamash min 1 max 1 | awk '{print $2-$1}' + 11 + + Suggested by Kingsley G. Morse Jr. in + https://lists.gnu.org/archive/html/bug-datamash/2017-05/msg00000.html . + + * NEWS: Mention new operation. + * src/datamash.c: (usage): Add new op. + * src/op-defs.{h,c}: Define new OP_RANGE. + * src/field-ops.{h,c}: Implement new OP_RANGE. + * tests/datamash-stats.pl: Test new operation. + * tests/datamash-tests-2.pl: Test new operation with various inputs. + * doc/datamash.texi, man/datamash.x: Mention new operation. + +2017-05-08 Assaf Gordon + + build: add 'fallthrough' comments to supress gcc-7.1 warnings + gcc-7.1 warns about: + src/op-parser.c:491:10: error: this statement may fall through + [-Werror=implicit-fallthrough=] + if (scan_val_int>0) + ^ + + The fallthrough is intentional - add an explicit comment that will + detected by the compiler and supress the warnings. + + * src/op-parser.c: Add explicit 'fallthrough' comment in two intentional + fall through cases. + +2017-05-08 Assaf Gordon + + datamash: use die() instead of error() + Copied from GNU coreutils v8.25-79-g492dcb2, + http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=492dcb2eb1: + "die() has the advantage of being apparent to the compiler + that it doesn't return, which will avoid warnings in some cases, + and possibly generate better code." + + * src/die.h: Copied from GNU coreutils. + * src/op-parser.c, + src/op-scanner.c, + src/field-ops.c, + src/datamash.c: Changed 'error(EXIT_FAILURE,...)' to 'die(...)'. + +2017-05-08 Assaf Gordon + + build: require pkg-config>=0.28 when building from git + configure.ac uses the PKG_CHECK_VALUE macro from the pkg-config' pkg.m4 + file for bash-completion directory detection. This macro is not + available in older pkg-config versions. + Does is only required when building from git and running ./bootstrap. + Building from tarball does not require pkg-config at all. + + * bootstrap.conf: Specify minimum version for pkg-config. + +2017-05-02 Assaf Gordon + + build: remove bashcompdir from Makefile.am + It is already defined in configure.ac (warning generated by autoreconf). + + * Makefile.am: Remove bashcompdir. + +2017-04-18 Assaf Gordon + + doc: expand build instructions in README and HACKING.md + Explain how to build from git. + +2017-04-18 Assaf Gordon + + build: require 'pkg-config' when bootstrapping + pkg-config is used to detect the bash-completion directory. + It is optional during ./configure (and ./configure will succeed even if + pkg-config is not installed), but pkg.m4 is required by ./bootstrap + for the PKG_CHECK_VAR in 'configure.ac'. + + * bootstrap.conf: Add pkg-config requirement. + +2017-04-05 Assaf Gordon + + gnulib: update to latest + +2017-03-23 Barry Nisly + + datamash: new operation 'perc' (percentiles) + Usage: + $ seq 100 | datamash --header-out perc:95 1 + perc:95(field-1) + 95.05 + + See https://lists.gnu.org/archive/html/bug-datamash/2017-03/msg00000.html . + + * NEWS: Mention new operation. + * src/datamash.c: (usage): Add new op. + (print_column_headers): Print percentile value in headers. + * src/op-defs.{h,c}: Define new OP_PERCENTILE. + * src/field-ops.{h,c}: Implement new OP_PERCENTILE. + * src/op-parser.c: (set_op_params): Handle 'perc:N' paramater. + * tests/datamash-stats.pl: Test new operation. + * tests/datamash-tests.pl: Test 'perc' headers. + * doc/datamash.texi, man/datamash.x: Mention new operation. + * tests/datamash-error-msgs.pl: Test 'perc' parameter error messages. + +2017-03-16 Assaf Gordon + + build: install bash-completion script by default (if possible) + If the 'bash-completion' package is instaleld with pkg-config support, + detect the default bash-completion directory and install the datamash + completion script there (typically: /usr/share/bash-completion/completions). + Otherwise, install in /usr/local/share/datamash/bash-completion.d (as + before). + + Disable with `./configure ---with-bash-completion-dir=no`. + Set custom path with `./configure ---with-bash-completion-dir=PATH`. + + * README: Mention bash-completion options to './configure'. + * configure.ac: Add --with-bash-completion-dir=DIR option, and + autodetect bash-completion directory using pkg-config. + * Makefile.am: Add bash-completion target (if enabled). + +2017-03-16 Assaf Gordon + + maint: update .gitignore + + gnulib: update to latest + 2017-01-19 Assaf Gordon maint: update bootstrap script to latest @@ -597,7 +885,7 @@ * bootstrap.conf: remove SKIP_PO * .gitignore: ignore fetched po/ files -2014-11-27 A. Gordon +2014-11-26 A. Gordon datamash: new option '--narm': ignore NA/NaN values Suggested by Brandon Invergo: @@ -709,7 +997,7 @@ add new tests for this feature. * man/datamash.x: add named-columns examples. -2014-08-12 Assaf Gordon +2014-08-11 Assaf Gordon maint: improve 'syntax-check' @@ -1587,12 +1875,12 @@ calc: add stub input reading +2013-04-02 Assaf Gordon + calc: create field/op structures calc: parse operation arguments -2013-04-02 Assaf Gordon - calc: set GNU coding styles for VIM calc: process -z and --debug diff -Nru datamash-1.1.1/config.in datamash-1.2.0/config.in --- datamash-1.1.1/config.in 2017-01-19 19:34:06.000000000 +0000 +++ datamash-1.2.0/config.in 2017-08-22 23:17:37.000000000 +0000 @@ -78,6 +78,10 @@ whether the gnulib module fscanf shall be considered present. */ #undef GNULIB_FSCANF +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module msvc-nothrow shall be considered present. */ +#undef GNULIB_MSVC_NOTHROW + /* Define to 1 if printf and friends should be labeled with attribute "__gnu_printf__" instead of "__printf__" */ #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU @@ -263,6 +267,9 @@ libc. */ #undef HAVE_COPYSIGN_IN_LIBC +/* Define to 1 if you have the header file. */ +#undef HAVE_CRTDEFS_H + /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT @@ -335,9 +342,9 @@ don't. */ #undef HAVE_DECL_GETC_UNLOCKED -/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. - */ -#undef HAVE_DECL_GETENV +/* Define to 1 if you have the declaration of `initstate', and to 0 if you + don't. */ +#undef HAVE_DECL_INITSTATE /* Define to 1 if you have the declaration of `isfinite', and to 0 if you don't. */ @@ -387,6 +394,10 @@ */ #undef HAVE_DECL_ROUNDL +/* Define to 1 if you have the declaration of `setstate', and to 0 if you + don't. */ +#undef HAVE_DECL_SETSTATE + /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R @@ -991,6 +1002,9 @@ /* Define to 1 if readlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINKAT +/* Define to 1 if reallocarray is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REALLOCARRAY + /* Define to 1 if realpath is declared even after undefining macros. */ #undef HAVE_RAW_DECL_REALPATH @@ -1159,6 +1173,9 @@ /* Define to 1 if trunc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TRUNC +/* Define to 1 if truncate is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TRUNCATE + /* Define to 1 if truncf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TRUNCF @@ -1222,6 +1239,9 @@ /* Define to 1 if wcsdup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSDUP +/* Define to 1 if wcsftime is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSFTIME + /* Define to 1 if wcslen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSLEN @@ -1364,6 +1384,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CDEFS_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INTTYPES_H @@ -1556,6 +1579,14 @@ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif +/* Enable NetBSD extensions on NetBSD. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD extensions on NetBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -1662,6 +1693,9 @@ /* Define to 1 if you need to in order for 'stat' and other things to work. */ #undef _POSIX_SOURCE +/* For standard stat data types on VMS. */ +#undef _USE_STD_STAT + /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX @@ -1783,6 +1817,9 @@ # define __GNUC_STDC_INLINE__ 1 #endif +/* Define to 1 if the compiler is checking for lint. */ +#undef lint + /* Define to a type if does not define. */ #undef mbstate_t diff -Nru datamash-1.1.1/configure datamash-1.2.0/configure --- datamash-1.1.1/configure 2017-01-19 19:34:05.000000000 +0000 +++ datamash-1.2.0/configure 2017-08-22 23:17:36.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for GNU datamash 1.1.1. +# Generated by GNU Autoconf 2.69 for GNU datamash 1.2. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='GNU datamash' PACKAGE_TARNAME='datamash' -PACKAGE_VERSION='1.1.1' -PACKAGE_STRING='GNU datamash 1.1.1' +PACKAGE_VERSION='1.2' +PACKAGE_STRING='GNU datamash 1.2' PACKAGE_BUGREPORT='assafgordon@gmail.com' PACKAGE_URL='http://www.gnu.org/software/datamash' @@ -631,7 +631,6 @@ gl_floor_required=plain ac_header_list= gl_getopt_required=POSIX -gl_getopt_required=POSIX ac_func_list= gl_modf_required=plain gl_trunc_required=plain @@ -672,7 +671,10 @@ BUILD_FROM_GIT_TRUE ENABLE_BASH_COMPLETION_FALSE ENABLE_BASH_COMPLETION_TRUE -BASH_COMPLETION_DIR +bashcompdir +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG WERROR_CFLAGS WARN_CFLAGS LIBDATAMASH_LTLIBDEPS @@ -693,6 +695,7 @@ HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H +WINDOWS_STAT_INODES WINDOWS_64_BIT_OFF_T NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H NEXT_SYS_TYPES_H @@ -863,6 +866,7 @@ HAVE_MEMCHR HAVE_FFSLL HAVE_FFSL +HAVE_EXPLICIT_BZERO HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL @@ -901,9 +905,11 @@ GNULIB_MEMCHR GNULIB_FFSLL GNULIB_FFSL +GNULIB_EXPLICIT_BZERO LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA +REPLACE_WCSFTIME REPLACE_WCSWIDTH REPLACE_WCWIDTH REPLACE_WCSNRTOMBS @@ -919,6 +925,7 @@ REPLACE_MBSTATE_T HAVE_DECL_WCWIDTH HAVE_DECL_WCTOB +HAVE_WCSFTIME HAVE_WCSWIDTH HAVE_WCSTOK HAVE_WCSSTR @@ -956,6 +963,7 @@ HAVE_MBRTOWC HAVE_MBSINIT HAVE_BTOWC +GNULIB_WCSFTIME GNULIB_WCSWIDTH GNULIB_WCSTOK GNULIB_WCSSTR @@ -1024,6 +1032,7 @@ HAVE_WCTYPE_H NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H NEXT_WCTYPE_H +HAVE_CRTDEFS_H HAVE_WINT_T HAVE_ISWCNTRL REPLACE_ISWBLANK @@ -1104,7 +1113,9 @@ LTLIBINTL LIBINTL GNULIB_GL_UNISTD_H_GETOPT +GETOPT_CDEFS_H GETOPT_H +HAVE_SYS_CDEFS_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H NEXT_GETOPT_H @@ -1115,6 +1126,7 @@ REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R +REPLACE_TRUNCATE REPLACE_SYMLINKAT REPLACE_SYMLINK REPLACE_SLEEP @@ -1155,6 +1167,7 @@ HAVE_DECL_ENVIRON HAVE_USLEEP HAVE_UNLINKAT +HAVE_TRUNCATE HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP @@ -1191,6 +1204,7 @@ GNULIB_UNISTD_H_SIGPIPE GNULIB_UNISTD_H_NONBLOCKING GNULIB_TTYNAME_R +GNULIB_TRUNCATE GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP @@ -1273,7 +1287,6 @@ GNULIB_ISBLANK LIB_CRYPTO pkglibexecdir -runstatedir lispdir CEILL_LIBM HAVE_SAME_LONG_DOUBLE_AS_DOUBLE @@ -1567,11 +1580,13 @@ HAVE_STRTOULL HAVE_STRTOLL HAVE_STRTOD +HAVE_DECL_SETSTATE HAVE_DECL_SETENV HAVE_SETENV HAVE_SECURE_GETENV HAVE_RPMATCH HAVE_REALPATH +HAVE_REALLOCARRAY HAVE_RANDOM_R HAVE_RANDOM_H HAVE_RANDOM @@ -1584,6 +1599,7 @@ HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP +HAVE_DECL_INITSTATE HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG @@ -1602,6 +1618,7 @@ GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX +GNULIB_REALLOCARRAY GNULIB_RANDOM_R GNULIB_RANDOM GNULIB_QSORT_R @@ -1639,7 +1656,6 @@ build RANLIB ARFLAGS -ac_ct_AR AR EGREP GREP @@ -1707,6 +1723,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1739,6 +1756,7 @@ with_packager with_packager_version with_packager_bug_reports +enable_lint enable_werror with_bash_completion_dir enable_nls @@ -1752,7 +1770,11 @@ LDFLAGS LIBS CPPFLAGS -CPP' +CPP +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +bashcompdir' # Initialize some variables set by options. @@ -1791,6 +1813,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -2043,6 +2066,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -2180,7 +2212,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -2293,7 +2325,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU datamash 1.1.1 to adapt to many kinds of systems. +\`configure' configures GNU datamash 1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2333,6 +2365,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2363,7 +2396,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU datamash 1.1.1:";; + short | recursive ) echo "Configuration of GNU datamash 1.2:";; esac cat <<\_ACEOF @@ -2379,6 +2412,7 @@ speeds up one-time build --disable-assert turn off assertions --disable-rpath do not hardcode runtime library paths + --enable-lint enable lint --enable-werror treat compiler warnings as errors (for developers) --disable-nls do not use Native Language Support @@ -2397,9 +2431,8 @@ --with-packager-bug-reports Packager info for bug reports (URL/e-mail/...) --with-bash-completion-dir=PATH - Install the bash auto-completion script in this - directory. For example, /etc/bash_completion.d - [default=datarootdir] + Where to install the bash auto-completion script: + no|local|global|PATH. [default=local] --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir @@ -2412,6 +2445,13 @@ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + bashcompdir value of completionsdir for bash-completion, overriding + pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -2481,7 +2521,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU datamash configure 1.1.1 +GNU datamash configure 1.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3190,7 +3230,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU datamash $as_me 1.1.1, which was +It was created by GNU datamash $as_me 1.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3473,6 +3513,7 @@ as_fn_append ac_header_list " stdio_ext.h" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" +as_fn_append ac_header_list " sys/cdefs.h" as_fn_append ac_func_list " getprogname" as_fn_append ac_func_list " getexecname" as_fn_append ac_header_list " iconv.h" @@ -3482,6 +3523,7 @@ as_fn_append ac_header_list " inttypes.h" as_fn_append ac_func_list " isblank" as_fn_append ac_func_list " iswcntrl" +as_fn_append ac_header_list " crtdefs.h" as_fn_append ac_header_list " wctype.h" as_fn_append ac_func_list " iswblank" as_fn_append ac_header_list " unistd.h" @@ -3599,7 +3641,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -am__api_version='1.14' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3771,8 +3813,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -3791,7 +3833,7 @@ $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -4085,7 +4127,7 @@ # Define the identity of the package. PACKAGE='datamash' - VERSION='1.1.1' + VERSION='1.2' cat >>confdefs.h <<_ACEOF @@ -4119,8 +4161,8 @@ # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -4178,6 +4220,7 @@ fi fi + # Minimum Autoconf version required. @@ -5981,6 +6024,10 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h + + $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h @@ -6092,177 +6139,7 @@ ARFLAGS='-o' fi else - if test -n "$ac_tool_prefix"; then - for ac_prog in ar lib "link -lib" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar lib "link -lib" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 -$as_echo_n "checking the archiver ($AR) interface... " >&6; } -if ${am_cv_ar_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - am_cv_ar_interface=ar - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int some_variable = 0; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 - (eval $am_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - am_cv_ar_interface=ar - else - am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 - (eval $am_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - am_cv_ar_interface=lib - else - am_cv_ar_interface=unknown - fi - fi - rm -f conftest.lib libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 -$as_echo "$am_cv_ar_interface" >&6; } - -case $am_cv_ar_interface in -ar) - ;; -lib) - # Microsoft lib, so override with the ar-lib wrapper script. - # FIXME: It is wrong to rewrite AR. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__AR in this case, - # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something - # similar. - AR="$am_aux_dir/ar-lib $AR" - ;; -unknown) - as_fn_error $? "could not determine $AR interface" "$LINENO" 5 - ;; -esac - + : fi if test -n "$ac_tool_prefix"; then @@ -7033,6 +6910,7 @@ GNULIB_QSORT_R=0; GNULIB_RANDOM=0; GNULIB_RANDOM_R=0; + GNULIB_REALLOCARRAY=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; GNULIB_RPMATCH=0; @@ -7051,6 +6929,7 @@ HAVE_DECL_GETLOADAVG=1; HAVE_GETSUBOPT=1; HAVE_GRANTPT=1; + HAVE_DECL_INITSTATE=1; HAVE_MKDTEMP=1; HAVE_MKOSTEMP=1; HAVE_MKOSTEMPS=1; @@ -7063,11 +6942,13 @@ HAVE_RANDOM=1; HAVE_RANDOM_H=1; HAVE_RANDOM_R=1; + HAVE_REALLOCARRAY=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; HAVE_SECURE_GETENV=1; HAVE_SETENV=1; HAVE_DECL_SETENV=1; + HAVE_DECL_SETSTATE=1; HAVE_STRTOD=1; HAVE_STRTOLL=1; HAVE_STRTOULL=1; @@ -8494,8 +8375,29 @@ else if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) # Guess yes on mingw, no on MSVC. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __MINGW32__ + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : gl_cv_func_isnanl_works="guessing yes" else + gl_cv_func_isnanl_works="guessing no" +fi +rm -f conftest* + + ;; + *) gl_cv_func_isnanl_works="guessing yes" ;; + esac + +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8709,8 +8611,26 @@ LIBS="$LIBS $ROUND_LIBM" if test "$cross_compiling" = yes; then : case "$host_os" in - netbsd* | aix*) gl_cv_func_round_works="guessing no";; - *) gl_cv_func_round_works="guessing yes";; + netbsd* | aix*) gl_cv_func_round_works="guessing no" ;; + # Guess yes on MSVC, no on mingw. + mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _MSC_VER + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : + gl_cv_func_round_works="guessing yes" +else + gl_cv_func_round_works="guessing no" +fi +rm -f conftest* + + ;; + *) gl_cv_func_round_works="guessing yes" ;; esac else @@ -8740,7 +8660,7 @@ * (double) (1U << ((DBL_MANT_DIG + 3) / 5)) * (double) (1U << ((DBL_MANT_DIG + 4) / 5)); volatile double x = 0.5 - 0.5 / TWO_MANT_DIG; - exit (x < 0.5 && round (x) != 0.0); + return (x < 0.5 && round (x) != 0.0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -9329,8 +9249,10 @@ if test "$cross_compiling" = yes; then : case "$host_os" in - aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";; - *) gl_cv_func_ldexpl_works="guessing yes";; + aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_ldexpl_works="guessing yes" ;; + *) gl_cv_func_ldexpl_works="guessing yes" ;; esac else @@ -9519,8 +9441,26 @@ if test "$cross_compiling" = yes; then : case "$host_os" in - netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; - *) gl_cv_func_frexp_works="guessing yes";; + netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;; + mingw*) # Guess yes with MSVC, no with mingw. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _MSC_VER + Good +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Good" >/dev/null 2>&1; then : + gl_cv_func_frexp_works="guessing yes" +else + gl_cv_func_frexp_works="guessing no" +fi +rm -f conftest* + + ;; + *) gl_cv_func_frexp_works="guessing yes" ;; esac else @@ -9736,7 +9676,7 @@ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif -#if defined __i386__ && defined __FreeBSD__ +#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif @@ -9902,6 +9842,7 @@ GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; + GNULIB_TRUNCATE=0; GNULIB_TTYNAME_R=0; GNULIB_UNISTD_H_NONBLOCKING=0; GNULIB_UNISTD_H_SIGPIPE=0; @@ -9938,6 +9879,7 @@ HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; + HAVE_TRUNCATE=1; HAVE_UNLINKAT=1; HAVE_USLEEP=1; HAVE_DECL_ENVIRON=1; @@ -9978,6 +9920,7 @@ REPLACE_SLEEP=0; REPLACE_SYMLINK=0; REPLACE_SYMLINKAT=0; + REPLACE_TRUNCATE=0; REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; @@ -10596,35 +10539,6 @@ - REPLACE_GETOPT=0 - if test -n "$gl_replace_getopt"; then - REPLACE_GETOPT=1 - fi - - if test $REPLACE_GETOPT = 1; then - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - fi - -ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_getenv" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV $ac_have_decl -_ACEOF - - - - for ac_func in $ac_func_list do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -10679,38 +10593,12 @@ } fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 +$as_echo_n "checking for ld... " >&6; } +elif test "$GCC" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` - while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } @@ -10718,44 +10606,106 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if ${acl_cv_path_LD+:} false; then : +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else - if test -z "$LD"; then - acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$acl_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 &5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; esac fi - done - IFS="$acl_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + yes + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + # The compiler produces 64-bit code. Add option '-b64' so that the + # linker groks 64-bit object files. + case "$acl_cv_path_LD " in + *" -b64 "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; + esac + fi +rm -f conftest* + + ;; + esac + fi -LD="$acl_cv_path_LD" + LD="$acl_cv_path_LD" +fi if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : @@ -10812,11 +10762,16 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 +$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; } +if ${acl_cv_libdirstems+:} false; then : + $as_echo_n "(cached) " >&6 +else acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 + acl_libdirstem2= + case "$host_os" in + solaris*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 @@ -10841,37 +10796,51 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(if test -f /usr/bin/gcc \ + && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ + LC_ALL=C /usr/bin/gcc -print-search-dirs; \ + else \ + LC_ALL=C $CC -print-search-dirs; \ + fi) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 +$as_echo "$acl_cv_libdirstems" >&6; } + # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` @@ -11560,15 +11529,27 @@ #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } return result; ; @@ -12413,7 +12394,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if test "$cross_compiling" = yes; then : - gl_cv_header_working_stdint_h=yes + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; + # In general, assume it works. + *) gl_cv_header_working_stdint_h="guessing yes" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12513,15 +12499,16 @@ HAVE_SYS_BITYPES_H=0 HAVE_SYS_INTTYPES_H=0 STDINT_H=stdint.h - if test "$gl_cv_header_working_stdint_h" = yes; then - HAVE_C99_STDINT_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 + case "$gl_cv_header_working_stdint_h" in + *yes) + HAVE_C99_STDINT_H=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 $as_echo_n "checking whether stdint.h predates C++11... " >&6; } if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_stdint_predates_cxx11_h=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12559,29 +12546,29 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; } - if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then + if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; } if ${gl_cv_header_stdint_width+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_stdint_width=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 - #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ - #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 - #endif - #include + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 + #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ + #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 + #endif + #include /* BSD/OS 4.0.1 has a bug: , and must be included before . */ @@ -12593,7 +12580,7 @@ # include #endif - int iw = UINTMAX_WIDTH; + int iw = UINTMAX_WIDTH; int main () @@ -12610,11 +12597,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5 $as_echo "$gl_cv_header_stdint_width" >&6; } - if test "$gl_cv_header_stdint_width" = yes; then - STDINT_H= - fi - else - for ac_header in sys/inttypes.h sys/bitypes.h + if test "$gl_cv_header_stdint_width" = yes; then + STDINT_H= + fi + ;; + *) + for ac_header in sys/inttypes.h sys/bitypes.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12627,12 +12615,12 @@ done - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - fi + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + fi + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + fi if test $APPLE_UNIVERSAL_BUILD = 0; then @@ -12932,7 +12920,8 @@ BITSIZEOF_WINT_T=32 fi - fi + ;; + esac LIMITS_H=limits.h if test -n "$LIMITS_H"; then @@ -13637,6 +13626,17 @@ + if test $ac_cv_header_crtdefs_h = yes; then + HAVE_CRTDEFS_H=1 + else + HAVE_CRTDEFS_H=0 + fi + + + + + + @@ -13664,6 +13664,8 @@ + + if test $gl_cv_have_include_next = yes; then gl_cv_next_wctype_h='<'wctype.h'>' else @@ -13742,7 +13744,7 @@ else if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 @@ -14047,7 +14049,12 @@ $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gl_cv_header_working_fcntl_h=cross-compiling + case "$host_os" in + # Guess 'no' on native Windows. + mingw*) gl_cv_header_working_fcntl_h='no' ;; + *) gl_cv_header_working_fcntl_h=cross-compiling ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14158,6 +14165,7 @@ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 $as_echo "$gl_cv_header_working_fcntl_h" >&6; } @@ -14642,6 +14650,7 @@ GNULIB_WCSSTR=0; GNULIB_WCSTOK=0; GNULIB_WCSWIDTH=0; + GNULIB_WCSFTIME=0; HAVE_BTOWC=1; HAVE_MBSINIT=1; HAVE_MBRTOWC=1; @@ -14679,6 +14688,7 @@ HAVE_WCSSTR=1; HAVE_WCSTOK=1; HAVE_WCSWIDTH=1; + HAVE_WCSFTIME=1; HAVE_DECL_WCTOB=1; HAVE_DECL_WCWIDTH=1; REPLACE_MBSTATE_T=0; @@ -14694,6 +14704,7 @@ REPLACE_WCSNRTOMBS=0; REPLACE_WCWIDTH=0; REPLACE_WCSWIDTH=0; + REPLACE_WCSFTIME=0; @@ -15100,6 +15111,7 @@ + GNULIB_EXPLICIT_BZERO=0; GNULIB_FFSL=0; GNULIB_FFSLL=0; GNULIB_MEMCHR=0; @@ -15138,7 +15150,8 @@ GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; - HAVE_FFSL=1; + HAVE_EXPLICIT_BZERO=1; + HAVE_FFSL=1; HAVE_FFSLL=1; HAVE_MEMCHR=1; HAVE_DECL_MEMMEM=1; @@ -15321,6 +15334,7 @@ + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. @@ -15400,7 +15414,13 @@ $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gl_cv_func_memchr_works="guessing no" + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_memchr_works="guessing yes" ;; + # Be pessimistic for now. + *) gl_cv_func_memchr_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15466,12 +15486,14 @@ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 $as_echo "$gl_cv_func_memchr_works" >&6; } - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi + case "$gl_cv_func_memchr_works" in + *yes) ;; + *) REPLACE_MEMCHR=1 ;; + esac fi @@ -15704,8 +15726,10 @@ if test "$cross_compiling" = yes; then : case "$host_os" in - osf4*) gl_cv_func_truncl_works="guessing no";; - *) gl_cv_func_truncl_works="guessing yes";; + osf4*) gl_cv_func_truncl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_truncl_works="guessing yes" ;; + *) gl_cv_func_truncl_works="guessing yes" ;; esac else @@ -15769,6 +15793,28 @@ +ac_fn_c_check_decl "$LINENO" "initstate" "ac_cv_have_decl_initstate" "$ac_includes_default" +if test "x$ac_cv_have_decl_initstate" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INITSTATE $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "setstate" "ac_cv_have_decl_setstate" "$ac_includes_default" +if test "x$ac_cv_have_decl_setstate" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SETSTATE $ac_have_decl +_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : @@ -15978,6 +16024,8 @@ case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_strerror_0_works="guessing no" ;; esac @@ -16214,6 +16262,10 @@ +$as_echo "#define _USE_STD_STAT 1" >>confdefs.h + + + @@ -16293,6 +16345,11 @@ + WINDOWS_STAT_INODES=0 + + + + @@ -16658,6 +16715,8 @@ case "$host_os" in # Guess yes on glibc systems. *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; + # Guess yes on native Windows. + mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; # If we don't know, assume the worst. *) ac_cv_func_calloc_0_nonnull="guessing no" ;; esac @@ -16968,10 +17027,13 @@ save_LIBS="$LIBS" LIBS="$CEILL_LIBM" if test "$cross_compiling" = yes; then : - case $host_os in - openbsd*) gl_cv_func_ceill_buggy="guessing yes";; - *) gl_cv_func_ceill_buggy="guessing no";; + case "$host_os" in + openbsd*) gl_cv_func_ceill_buggy="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_ceill_buggy="guessing no" ;; + *) gl_cv_func_ceill_buggy="guessing no" ;; esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17785,9 +17847,12 @@ LIBS="$EXPL_LIBM" if test "$cross_compiling" = yes; then : case $host_os in - openbsd*) gl_cv_func_expl_buggy="guessing yes";; - *) gl_cv_func_expl_buggy="guessing no";; + openbsd*) gl_cv_func_expl_buggy="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_expl_buggy="guessing no" ;; + *) gl_cv_func_expl_buggy="guessing no" ;; esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18115,8 +18180,10 @@ if test "$cross_compiling" = yes; then : case "$host_os" in - irix*) gl_cv_func_fabsl_works="guessing no";; - *) gl_cv_func_fabsl_works="guessing yes";; + irix*) gl_cv_func_fabsl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_fabsl_works="guessing yes" ;; + *) gl_cv_func_fabsl_works="guessing yes" ;; esac else @@ -18205,7 +18272,7 @@ aix* | beos* | openbsd* | mirbsd* | irix*) FLOAT_H=float.h ;; - freebsd*) + freebsd* | dragonfly*) case "$host_cpu" in i[34567]86 ) FLOAT_H=float.h @@ -18239,7 +18306,7 @@ ;; esac case "$host_os" in - aix* | freebsd* | linux*) + aix* | freebsd* | dragonfly* | linux*) if test -n "$FLOAT_H"; then REPLACE_FLOAT_LDBL=1 fi @@ -18271,7 +18338,9 @@ rm -f conftest* ;; - *) gl_cv_func_itold_works="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_itold_works="guessing yes" ;; + *) gl_cv_func_itold_works="guessing yes" ;; esac else @@ -18765,34 +18834,6 @@ - if test $REPLACE_GETOPT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - - - - - GNULIB_GL_UNISTD_H_GETOPT=1 - fi - - @@ -18804,10 +18845,20 @@ if test $REPLACE_GETOPT = 1; then - GETOPT_H=getopt.h + + if test $ac_cv_header_sys_cdefs_h = yes; then + HAVE_SYS_CDEFS_H=1 + else + HAVE_SYS_CDEFS_H=0 + fi + + $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + GETOPT_H=getopt.h + GETOPT_CDEFS_H=getopt-cdefs.h + fi @@ -18833,9 +18884,6 @@ gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - - - GNULIB_GL_UNISTD_H_GETOPT=1 fi @@ -19533,7 +19581,12 @@ else if test "$cross_compiling" = yes; then : - gl_cv_func_isfinitel_works="guessing yes" + case "$host_os" in + # Guess no on native Windows. + mingw*) gl_cv_func_isfinitel_works="guessing no" ;; + *) gl_cv_func_isfinitel_works="guessing yes" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19755,8 +19808,31 @@ else if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) # Guess yes on mingw, no on MSVC. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __MINGW32__ + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : gl_cv_func_isinfl_works="guessing yes" else + gl_cv_func_isinfl_works="guessing no" +fi +rm -f conftest* + + ;; + *) + gl_cv_func_isinfl_works="guessing yes" + ;; + esac + +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20029,8 +20105,26 @@ if test "$cross_compiling" = yes; then : case "$host_os" in - irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; - *) gl_cv_func_isnanf_works="guessing yes";; + irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;; + mingw*) # Guess yes on mingw, no on MSVC. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __MINGW32__ + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : + gl_cv_func_isnanf_works="guessing yes" +else + gl_cv_func_isnanf_works="guessing no" +fi +rm -f conftest* + + ;; + *) gl_cv_func_isnanf_works="guessing yes" ;; esac else @@ -20342,8 +20436,29 @@ $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - gl_cv_func_isnanl_works="guessing yes" + if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) # Guess yes on mingw, no on MSVC. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __MINGW32__ + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : + gl_cv_func_isnanl_works="guessing yes" +else + gl_cv_func_isnanl_works="guessing no" +fi +rm -f conftest* + + ;; + *) gl_cv_func_isnanl_works="guessing yes" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20500,7 +20615,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } if ${gl_cv_cc_long_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 @@ -20509,6 +20624,39 @@ if test "$cross_compiling" = yes; then : gl_cv_cc_long_double_expbit0="unknown" + case "$host_os" in + mingw*) # On native Windows (little-endian), we know the result + # in two cases: mingw, MSVC. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __MINGW32__ + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : + gl_cv_cc_long_double_expbit0="word 2 bit 0" +fi +rm -f conftest* + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _MSC_VER + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : + gl_cv_cc_long_double_expbit0="word 1 bit 20" +fi +rm -f conftest* + + ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20681,8 +20829,29 @@ else if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) # Guess yes on mingw, no on MSVC. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __MINGW32__ + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : gl_cv_func_isnanl_works="guessing yes" else + gl_cv_func_isnanl_works="guessing no" +fi +rm -f conftest* + + ;; + *) gl_cv_func_isnanl_works="guessing yes" ;; + esac + +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20835,7 +21004,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } if ${gl_cv_cc_long_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 @@ -20844,6 +21013,39 @@ if test "$cross_compiling" = yes; then : gl_cv_cc_long_double_expbit0="unknown" + case "$host_os" in + mingw*) # On native Windows (little-endian), we know the result + # in two cases: mingw, MSVC. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __MINGW32__ + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : + gl_cv_cc_long_double_expbit0="word 2 bit 0" +fi +rm -f conftest* + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _MSC_VER + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : + gl_cv_cc_long_double_expbit0="word 1 bit 20" +fi +rm -f conftest* + + ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21168,8 +21370,10 @@ if test "$cross_compiling" = yes; then : case "$host_os" in - aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";; - *) gl_cv_func_ldexpl_works="guessing yes";; + aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_ldexpl_works="guessing yes" ;; + *) gl_cv_func_ldexpl_works="guessing yes" ;; esac else @@ -22334,9 +22538,11 @@ else case "$host_os" in - # Guess no on AIX and glibc systems. + # Guess no on AIX and glibc systems. aix* | *-gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; esac if test "$cross_compiling" = yes; then : @@ -22369,7 +22575,7 @@ $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; } if ${gl_cv_C_locale_sans_EILSEQ+:} false; then : $as_echo_n "(cached) " >&6 @@ -22378,7 +22584,11 @@ gl_cv_C_locale_sans_EILSEQ="guessing no" if test "$cross_compiling" = yes; then : - : + case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22418,6 +22628,7 @@ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5 $as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; } @@ -23474,6 +23685,13 @@ fi +cat >>confdefs.h <<_ACEOF +#define GNULIB_MSVC_NOTHROW 1 +_ACEOF + + + + # Extract the first word of "pmccabe", so it can be a program name with args. set dummy pmccabe; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -23568,6 +23786,16 @@ HAVE_RANDOM=0 fi + + if test $ac_cv_have_decl_initstate = no; then + HAVE_DECL_INITSTATE=0 + fi + + + if test $ac_cv_have_decl_setstate = no; then + HAVE_DECL_SETSTATE=0 + fi + if test $HAVE_RANDOM = 0; then @@ -23895,8 +24123,26 @@ LIBS="$LIBS $ROUND_LIBM" if test "$cross_compiling" = yes; then : case "$host_os" in - netbsd* | aix*) gl_cv_func_round_works="guessing no";; - *) gl_cv_func_round_works="guessing yes";; + netbsd* | aix*) gl_cv_func_round_works="guessing no" ;; + # Guess yes on MSVC, no on mingw. + mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _MSC_VER + Known +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Known" >/dev/null 2>&1; then : + gl_cv_func_round_works="guessing yes" +else + gl_cv_func_round_works="guessing no" +fi +rm -f conftest* + + ;; + *) gl_cv_func_round_works="guessing yes" ;; esac else @@ -23926,7 +24172,7 @@ * (double) (1U << ((DBL_MANT_DIG + 3) / 5)) * (double) (1U << ((DBL_MANT_DIG + 4) / 5)); volatile double x = 0.5 - 0.5 / TWO_MANT_DIG; - exit (x < 0.5 && round (x) != 0.0); + return (x < 0.5 && round (x) != 0.0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -24400,6 +24646,8 @@ case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_signbit="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_signbit="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_signbit="guessing no" ;; esac @@ -24518,6 +24766,13 @@ case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;; + # Guess yes on mingw, no on MSVC. + mingw*) if test -n "$GCC"; then + gl_cv_func_signbit_gcc="guessing yes" + else + gl_cv_func_signbit_gcc="guessing no" + fi + ;; # If we don't know, assume the worst. *) gl_cv_func_signbit_gcc="guessing no" ;; esac @@ -24672,6 +24927,7 @@ { /* More than one bit difference. */ fprintf (fp, "unknown"); + fclose (fp); return 2; } if (x) @@ -24684,6 +24940,7 @@ { /* No difference. */ fprintf (fp, "unknown"); + fclose (fp); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ @@ -24692,6 +24949,7 @@ /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); + fclose (fp); return 4; } for (i = 0; ; i++) @@ -24776,6 +25034,7 @@ { /* More than one bit difference. */ fprintf (fp, "unknown"); + fclose (fp); return 2; } if (x) @@ -24788,6 +25047,7 @@ { /* No difference. */ fprintf (fp, "unknown"); + fclose (fp); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ @@ -24796,6 +25056,7 @@ /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); + fclose (fp); return 4; } for (i = 0; ; i++) @@ -24880,6 +25141,7 @@ { /* More than one bit difference. */ fprintf (fp, "unknown"); + fclose (fp); return 2; } if (x) @@ -24892,6 +25154,7 @@ { /* No difference. */ fprintf (fp, "unknown"); + fclose (fp); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ @@ -24900,6 +25163,7 @@ /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); + fclose (fp); return 4; } for (i = 0; ; i++) @@ -25356,8 +25620,10 @@ if test "$cross_compiling" = yes; then : case "$host_os" in - openbsd*) gl_cv_func_sqrtl_works="guessing no";; - *) gl_cv_func_sqrtl_works="guessing yes";; + openbsd*) gl_cv_func_sqrtl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_sqrtl_works="guessing yes" ;; + *) gl_cv_func_sqrtl_works="guessing yes" ;; esac else @@ -25541,8 +25807,8 @@ || (defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ : __GNUC__) \ - || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ - || __ICC || 0x5110 <= __SUNPRO_C \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 @@ -26196,7 +26462,7 @@ - for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do + for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } @@ -26243,7 +26509,13 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5 + + case "$host_os" in + cygwin*) + STDNORETURN_H='stdnoreturn.h' + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5 $as_echo_n "checking for working stdnoreturn.h... " >&6; } if ${gl_cv_header_working_stdnoreturn_h+:} false; then : $as_echo_n "(cached) " >&6 @@ -26251,18 +26523,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #include - /* Do not check for 'noreturn' after the return type. - C11 allows it, but it's rarely done that way - and circa-2012 bleeding-edge GCC rejects it when given - -Werror=old-style-declaration. */ - noreturn void foo1 (void) { exit (0); } - _Noreturn void foo2 (void) { exit (0); } - int testit (int argc, char **argv) { - if (argc & 1) - return 0; - (argv[0][0] ? foo1 : foo2) (); - } + #include + /* Do not check for 'noreturn' after the return type. + C11 allows it, but it's rarely done that way + and circa-2012 bleeding-edge GCC rejects it when given + -Werror=old-style-declaration. */ + noreturn void foo1 (void) { exit (0); } + _Noreturn void foo2 (void) { exit (0); } + int testit (int argc, char **argv) + { + if (argc & 1) + return 0; + (argv[0][0] ? foo1 : foo2) (); + } int main () @@ -26281,13 +26554,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5 $as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; } - - if test $gl_cv_header_working_stdnoreturn_h = yes; then - STDNORETURN_H='' - else - STDNORETURN_H='stdnoreturn.h' - fi - + if test $gl_cv_header_working_stdnoreturn_h = yes; then + STDNORETURN_H='' + else + STDNORETURN_H='stdnoreturn.h' + fi + ;; + esac if test -n "$STDNORETURN_H"; then GL_GENERATE_STDNORETURN_H_TRUE= @@ -27015,8 +27288,10 @@ if test "$cross_compiling" = yes; then : case "$host_os" in - osf4*) gl_cv_func_truncl_works="guessing no";; - *) gl_cv_func_truncl_works="guessing yes";; + osf4*) gl_cv_func_truncl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_truncl_works="guessing yes" ;; + *) gl_cv_func_truncl_works="guessing yes" ;; esac else @@ -27183,7 +27458,7 @@ - for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do + for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat truncate ttyname_r unlink unlinkat usleep; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } @@ -27588,7 +27863,9 @@ - for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do + + + for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime ; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } @@ -27667,6 +27944,8 @@ + + if test $gl_cv_have_include_next = yes; then gl_cv_next_wctype_h='<'wctype.h'>' else @@ -27745,7 +28024,7 @@ else if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 @@ -28191,6 +28470,14 @@ # Add extra compilation warnings. These will only apply to datamash.c not to # any gnulib modules). See $(WARN_CFLAGS) in Makefile.am + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; } if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then : @@ -28228,6 +28515,14 @@ gl_unknown_warnings_are_errors= fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wall" >&5 $as_echo_n "checking whether C compiler handles -Wall... " >&6; } @@ -28266,6 +28561,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wextra" >&5 $as_echo_n "checking whether C compiler handles -Wextra... " >&6; } if ${gl_cv_warn_c__Wextra+:} false; then : @@ -28303,6 +28599,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wformat-security" >&5 $as_echo_n "checking whether C compiler handles -Wformat-security... " >&6; } if ${gl_cv_warn_c__Wformat_security+:} false; then : @@ -28340,6 +28637,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wswitch-enum" >&5 $as_echo_n "checking whether C compiler handles -Wswitch-enum... " >&6; } if ${gl_cv_warn_c__Wswitch_enum+:} false; then : @@ -28377,6 +28675,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wswitch-default" >&5 $as_echo_n "checking whether C compiler handles -Wswitch-default... " >&6; } if ${gl_cv_warn_c__Wswitch_default+:} false; then : @@ -28414,6 +28713,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wformat-nonliteral" >&5 $as_echo_n "checking whether C compiler handles -Wformat-nonliteral... " >&6; } if ${gl_cv_warn_c__Wformat_nonliteral+:} false; then : @@ -28451,6 +28751,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wunused-parameter" >&5 $as_echo_n "checking whether C compiler handles -Wunused-parameter... " >&6; } if ${gl_cv_warn_c__Wunused_parameter+:} false; then : @@ -28488,6 +28789,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wfloat-equal" >&5 $as_echo_n "checking whether C compiler handles -Wfloat-equal... " >&6; } if ${gl_cv_warn_c__Wfloat_equal+:} false; then : @@ -28525,6 +28827,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; } if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then : @@ -28562,6 +28865,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; } if ${gl_cv_warn_c__funit_at_a_time+:} false; then : @@ -28599,6 +28903,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wmissing-format-attribute" >&5 $as_echo_n "checking whether C compiler handles -Wmissing-format-attribute... " >&6; } if ${gl_cv_warn_c__Wmissing_format_attribute+:} false; then : @@ -28636,6 +28941,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wstrict-overflow" >&5 $as_echo_n "checking whether C compiler handles -Wstrict-overflow... " >&6; } if ${gl_cv_warn_c__Wstrict_overflow+:} false; then : @@ -28673,6 +28979,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=const" >&5 $as_echo_n "checking whether C compiler handles -Wsuggest-attribute=const... " >&6; } if ${gl_cv_warn_c__Wsuggest_attribute_const+:} false; then : @@ -28710,6 +29017,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=pure" >&5 $as_echo_n "checking whether C compiler handles -Wsuggest-attribute=pure... " >&6; } if ${gl_cv_warn_c__Wsuggest_attribute_pure+:} false; then : @@ -28748,6 +29056,28 @@ + +# Enable lint checks, for coverage/static-analyzers. +# Check whether --enable-lint was given. +if test "${enable_lint+set}" = set; then : + enableval=$enable_lint; case $enableval in + yes|no) ;; + *) as_fn_error $? "bad value $enableval for lint option" "$LINENO" 5 ;; + esac + use_lint=$enableval +else + use_lint=no + +fi + +if test "$use_lint" = yes ; then + +$as_echo "#define lint 1" >>confdefs.h + +fi + + + ## Add --enable-werror option to ./configure, ## To enable/disable treating compiler warnings as errors. ## If not specified AND we're compiling from .git repository, @@ -28768,6 +29098,7 @@ if test "$werror" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5 $as_echo_n "checking whether C compiler handles -Werror... " >&6; } if ${gl_cv_warn_c__Werror+:} false; then : @@ -28820,19 +29151,167 @@ fi +## Check for bash-completion using pkg-config +## ./configure --with-bash-completion-dir=[no|local|global|PATH] . +## See README for details. + # Check whether --with-bash-completion-dir was given. if test "${with_bash_completion_dir+set}" = set; then : withval=$with_bash_completion_dir; else - with_bash_completion_dir=yes + with_bash_completion_dir=local +fi + + +if test "x$with_bash_completion_dir" = "xlocal" ; then + bashcompdir="$datarootdir/${PACKAGE}/bash-completion.d" +elif test "x$with_bash_completion_dir" = "xglobal"; then + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi fi +if test -n "$bashcompdir"; then + pkg_cv_bashcompdir="$bashcompdir" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bash-completion\""; } >&5 + ($PKG_CONFIG --exists --print-errors "bash-completion") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_bashcompdir=`$PKG_CONFIG --variable="completionsdir" "bash-completion" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +bashcompdir=$pkg_cv_bashcompdir -if test "x$with_bash_completion_dir" = "xyes"; then - BASH_COMPLETION_DIR="$datarootdir/${PACKAGE}/bash-completion.d" +if test "x$bashcompdir" = x""; then : + bashcompdir="$datarootdir/${PACKAGE}/bash-completion.d" +fi else - # either 'no', or a user-specified custom DIR - use it. - BASH_COMPLETION_DIR="$with_bash_completion_dir" + # either 'no', or a user-specified custom DIR - use it. + bashcompdir="$with_bash_completion_dir" fi if test "x$with_bash_completion_dir" != "xno"; then @@ -29602,15 +30081,27 @@ #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } return result; ; @@ -31005,7 +31496,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU datamash $as_me 1.1.1, which was +This file was extended by GNU datamash $as_me 1.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -31077,7 +31568,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU datamash config.status 1.1.1 +GNU datamash config.status 1.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -32116,7 +32607,12 @@ eval example_dir=${datarootdir}/${PACKAGE}/examples { $as_echo "$as_me:${as_lineno-$LINENO}: result: examples: ${example_dir}" >&5 $as_echo " examples: ${example_dir}" >&6; } -eval bash_comp_dir=$BASH_COMPLETION_DIR + +if test "x$with_bash_completion_dir" != "xno" ; then + eval bash_comp_dir=$bashcompdir +else + bash_comp_dir="Not installed" +fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: bash-comp: ${bash_comp_dir}" >&5 $as_echo " bash-comp: ${bash_comp_dir}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 diff -Nru datamash-1.1.1/configure.ac datamash-1.2.0/configure.ac --- datamash-1.1.1/configure.ac 2017-01-19 19:23:07.000000000 +0000 +++ datamash-1.2.0/configure.ac 2017-08-20 19:04:41.000000000 +0000 @@ -9,7 +9,7 @@ dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AC_INIT([GNU datamash], - [m4_esyscmd([build-aux/git-version-gen .tarball-version])], + [m4_esyscmd([build-aux/git-version-gen .tarball-version])], [assafgordon@gmail.com], [], [http://www.gnu.org/software/datamash]) @@ -59,6 +59,23 @@ gl_WARN_ADD([-Wsuggest-attribute=pure]) AC_SUBST([WARN_CFLAGS]) + +# Enable lint checks, for coverage/static-analyzers. +AC_ARG_ENABLE([lint], + [AS_HELP_STRING([--enable-lint],[enable lint])], + [case $enableval in + yes|no) ;; + *) AC_MSG_ERROR([bad value $enableval for lint option]) ;; + esac + use_lint=$enableval], + [use_lint=no] + ) +if test "$use_lint" = yes ; then + AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) +fi + + + ## Add --enable-werror option to ./configure, ## To enable/disable treating compiler warnings as errors. ## If not specified AND we're compiling from .git repository, @@ -91,20 +108,27 @@ [Define to 1 if strtold does not work properly (e.g. in cygwin)]) fi + +## Check for bash-completion using pkg-config +## ./configure --with-bash-completion-dir=[no|local|global|PATH] . +## See README for details. AC_ARG_WITH([bash-completion-dir], AS_HELP_STRING([--with-bash-completion-dir[=PATH]], - [Install the bash auto-completion script in this directory. - For example, /etc/bash_completion.d @<:@default=datarootdir@:>@]), + [Where to install the bash auto-completion script: no|local|global|PATH. + @<:@default=local@:>@]), [], - [with_bash_completion_dir=yes]) + [with_bash_completion_dir=local]) -if test "x$with_bash_completion_dir" = "xyes"; then - BASH_COMPLETION_DIR="$datarootdir/${PACKAGE}/bash-completion.d" +if test "x$with_bash_completion_dir" = "xlocal" ; then + bashcompdir="$datarootdir/${PACKAGE}/bash-completion.d" +elif test "x$with_bash_completion_dir" = "xglobal"; then + PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], , + bashcompdir="$datarootdir/${PACKAGE}/bash-completion.d") else - # either 'no', or a user-specified custom DIR - use it. - BASH_COMPLETION_DIR="$with_bash_completion_dir" + # either 'no', or a user-specified custom DIR - use it. + bashcompdir="$with_bash_completion_dir" fi -AC_SUBST([BASH_COMPLETION_DIR]) +AC_SUBST(bashcompdir) AM_CONDITIONAL([ENABLE_BASH_COMPLETION], [test "x$with_bash_completion_dir" != "xno"]) @@ -166,7 +190,12 @@ AC_MSG_RESULT([ program: ${prefix}/bin/ ]) eval example_dir=${datarootdir}/${PACKAGE}/examples AC_MSG_RESULT([ examples: ${example_dir}]) -eval bash_comp_dir=$BASH_COMPLETION_DIR + +if test "x$with_bash_completion_dir" != "xno" ; then + eval bash_comp_dir=$bashcompdir +else + bash_comp_dir="Not installed" +fi AC_MSG_RESULT([ bash-comp: ${bash_comp_dir}]) AC_MSG_RESULT([]) AC_MSG_RESULT([ To change installation path, re-run:]) diff -Nru datamash-1.1.1/contrib/bash-completion/datamash datamash-1.2.0/contrib/bash-completion/datamash --- datamash-1.1.1/contrib/bash-completion/datamash 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/contrib/bash-completion/datamash 2017-08-20 19:04:41.000000000 +0000 @@ -24,10 +24,10 @@ #NOTE: do not change the spaces (or indentation or backslashes) # or the regex will fail. - local groupby_ops="sum min max absmin absmax \ + local groupby_ops="sum min max absmin absmax range \ count first last rand \ unique collapse countunique \ -mean median q1 q3 iqr mode antimode \ +mean median q1 q3 iqr perc mode antimode \ pstdev sstdev pvar svar mad madraw \ pskew sskew pkurt skurt dpo jarque \ pcov scov ppearson spearson strbin" diff -Nru datamash-1.1.1/datamash.1 datamash-1.2.0/datamash.1 --- datamash-1.1.1/datamash.1 2017-01-19 20:05:39.000000000 +0000 +++ datamash-1.2.0/datamash.1 2017-08-22 23:19:32.000000000 +0000 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3. -.TH DATAMASH "1" "January 2017" "datamash 1.1.1" "User Commands" +.TH DATAMASH "1" "August 2017" "datamash 1.2" "User Commands" .SH NAME datamash - command-line calculations .SH SYNOPSIS @@ -27,13 +27,13 @@ bin, strbin, round, floor, ceil, trunc, frac .SS "Numeric Grouping operations:" .IP -sum, min, max, absmin, absmax +sum, min, max, absmin, absmax, range .SS "Textual/Numeric Grouping operations:" .IP count, first, last, rand, unique, collapse, countunique .SS "Statistical Grouping operations:" .IP -mean, median, q1, q3, iqr, mode, antimode, pstdev, sstdev, pvar, +mean, median, q1, q3, iqr, perc, mode, antimode, pstdev, sstdev, pvar, svar, mad, madraw, pskew, sskew, pkurt, skurt, dpo, jarque, scov, pcov, spearson, ppearson .SS "Grouping Options:" @@ -123,10 +123,12 @@ reverse field order in each line .TP -.B check -verify the input file has same number of fields in all lines. +.B check [N lines] [N fields] +verify the input file has same number of fields in all lines, +or the expected number of lines/fields. number of lines and fields are printed to STDOUT. Exits with non-zero code -and prints the offending line if there's a mismatch in the number of fields. +and prints the offending line if there's a mismatch in the number of lines/ +fields. .PP @@ -189,6 +191,10 @@ .TP .B absmax maximum of the absolute values + +.TP +.B range +the values range (max-min) .PP .SS "Textual/Numeric Grouping operations" @@ -251,6 +257,10 @@ inter-quartile range .TP +.B perc[:PERCENTILE] +percentile value \fPERCENTILE\fR (defaults to 95). + +.TP .B mode mode value (most common value) @@ -528,8 +538,8 @@ .SS "Check file structure" -Check the structure of the input file (ensure all lines -have the same number of fields): +Check the structure of the input file: ensure all lines +have the same number of fields, or expected number of lines/fields: .PP .nf .RS @@ -544,6 +554,17 @@ 13 datamash: check failed: line 5 has 2 fields (previous line had 3) fail + +$ seq 10 | paste \- \- | datamash check 2 fields 5 lines +5 lines, 2 fields + +$ seq 10 | paste \- \- | datamash check 4 fields +line 1 (2 fields): + 1 2 +datamash: check failed: line 1 has 2 fields (expecting 4) + +$ seq 10 | paste \- \- | datamash check 7 lines +datamash: check failed: input had 5 lines (expecting 7) .RE .fi .PP diff -Nru datamash-1.1.1/debian/changelog datamash-1.2.0/debian/changelog --- datamash-1.1.1/debian/changelog 2017-03-15 14:44:02.000000000 +0000 +++ datamash-1.2.0/debian/changelog 2017-09-13 18:37:23.000000000 +0000 @@ -1,3 +1,12 @@ +datamash (1.2.0-1) unstable; urgency=medium + + * Deleted debian/upstream-signing-key.pgp in order to update the package + with the new key and put it under upstream/signing-key.asc + * Updated d/control with the latest Standards-Version number. + * Create d/tests/* with one smoke test + + -- Alejandro Garrido Mota Wed, 13 Sep 2017 19:37:23 +0100 + datamash (1.1.1-1) unstable; urgency=low * New upstream release diff -Nru datamash-1.1.1/debian/control datamash-1.2.0/debian/control --- datamash-1.1.1/debian/control 2017-03-15 14:44:02.000000000 +0000 +++ datamash-1.2.0/debian/control 2017-09-13 18:37:23.000000000 +0000 @@ -4,10 +4,11 @@ Maintainer: Alejandro Garrido Mota Build-Depends: debhelper (>= 9), autotools-dev -Standards-Version: 3.9.8 +Standards-Version: 4.0.0 Homepage: https://savannah.gnu.org/projects/datamash/ Vcs-Git: https://anonscm.debian.org/git/collab-maint/datamash.git Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/datamash.git +Testsuite: autopkgtest Package: datamash Architecture: any diff -Nru datamash-1.1.1/debian/tests/control datamash-1.2.0/debian/tests/control --- datamash-1.1.1/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/debian/tests/control 2017-09-13 18:37:23.000000000 +0000 @@ -0,0 +1 @@ +Tests: smoke diff -Nru datamash-1.1.1/debian/tests/smoke datamash-1.2.0/debian/tests/smoke --- datamash-1.1.1/debian/tests/smoke 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/debian/tests/smoke 2017-09-13 18:37:23.000000000 +0000 @@ -0,0 +1 @@ +Test-Command: datamash diff -Nru datamash-1.1.1/debian/upstream/signing-key.asc datamash-1.2.0/debian/upstream/signing-key.asc --- datamash-1.1.1/debian/upstream/signing-key.asc 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/debian/upstream/signing-key.asc 2017-09-13 18:37:23.000000000 +0000 @@ -0,0 +1,97 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFO9m3oBEADS9z4i0LGkTrRstsnDPrZoOB0WvePFzycthJMWulqe6Sbnn462 +95fDNAwkcM2XjEU7yTGwyeAHFpKT4z3ydH+2Doc+z+D8gyh+jpNyaA5UlvpuJ/3e +w6l7ciB4dgXw8sASXpLxNNUPV3NQSKKiAYKzTpLmhfeYP1LuNUYKicjngD98lz8X +w15qGjSsZLGDqGUWVxm7eR33vWzYjdCItHVTKFDaPC0VJqi4P/wgCvu6IgiHBBRL +l8LEusHUJ2oxvpB2wxPjV6kabySpyhsK4siy77qCgTvAImEWZFgAJKGFc4fD7j3z +EchwID2N8gN4uQ413TWKlYriAZQVoRaBI7UKYkYtrAJweMc1m6ptKqgXKPc82DUP +Jrs/5LWdjBeJGpQWeMlYomluByEeWGJpQtVtoaTKogkTOxq81Y2cZmqrGuMEi7dL +wTmv9+3qmOPr0z3flYuICX01ffxzazms75nQRWJrL0iY0oIJjBP7voR8wVuoIkXN +8Ua/Omar84z6HWCvE3+kNE5DAGaurV8JUJ82JuO5aWkJhynDjVxzBMm0e4hu7xh+ +PEvppfP14t0aWtwee7WcFwbXMY5chskJ5mlRGhaX0QVfdiOnvL/eJhREYz0JRbHk ++yywucs9wFPClwZq1xNhPLIA5kNxMl20Dy3h5jstDfCpnzlcVVSC+XMDCQARAQAB +tCFBc3NhZiBHb3Jkb24gPGFnb3Jkb25Ad2kubWl0LmVkdT6JAj4EMAEKACgFAlXL +3i4hHSBObyBsb25nZXIgd29ya2luZyBhdCB3aS5taXQuZWR1AAoJECmnlP0icryG +W0MP/1VTNcimNurAoGdQ/MFRxmd4er9cOZDSzpfYAWYOShSzZbMM8Kng64TGTM7g +gADsNH/9spsFYOINihsjLYW/+QBUAbJKmKf8UBG8e6QG5kDkJLmS3ODl+CMkHNwK +nLSXlsedaNcW9Qy60a5jz8/7xsK643RFq8ObdY2ZmUxpoBJWy5mLqEcY5QYoQ2RC +AAY3AdMmxuVRvq2nBeN2+KT4vBvfwA7TJsQM9UyP+ySlE8TlWzjZcMDRmUM8AXk0 +n1JT3xZAnrDMPOQy9cemlEiTS2wh7kY9u0Bj8GgT/1Tgw0cv1TBKdpXvGf/UKXdk +Qhb+Tti0IKPOtrrokPzMy2ZAn4MW3AsMVL0TnUuiUNph0BS//K4JyDZ716QSmbLY +EG5RVkzqzNKRkY7lnvLDhAe4iUOytTMMrWXeC/NwrGArMqj41RXO69gta+vN0nEB +9EYuSZTKk7FpAhnZOZSIV3M4F64SrCTS476xwkhh2ECGu0enkS2jdzPQjnboDEer +bcsTcnoZCPtI1VwHSOl6d7GPcYLLpemcZk+FXrrdDCEG39+nmCzKaQKxUPPTPhkv +xgSFeIR8ze06uE2JYuKRE4HkZpm1MViO+gGwE3meD08Y5OU+5NkuqOKsmr27/XB+ +rN5gXqHidGGNvXyPPXADXlewKmhmivtHpbeMVL7bhZ+8feuHtCRBc3NhZiBHb3Jk +b24gPGFzc2FmZ29yZG9uQGdtYWlsLmNvbT6JAkAEEwEKACoCGwMFCwkIBwMFFQoJ +CAsFFgIDAQACHgECF4ACGQEFAliA5qoFCQakfoEACgkQKaeU/SJyvIZubw/+NyEY +rg1xNG1lGmk8LwVWRHLtda4xreTvPibwzG9NUl74l4M9Fa7N5BZ1r45bC4jXaTtm +z6/4AAtx6chgPDzx8HXGgtWZLt17kjS3T1gj7abbXr4s3ft8fon+RmZ25hB8f/xO +8PtDp1uup5lGTBhGxnh935u5NUNwQJ6HCYuTFZLLfL4a5KJL71jxnhdTELByo34z +6kJ3G7G47HJFe5RREUcE4cSjowmE/wxB0HZ5dM6wMa0oYi0r47pJKTy/awIpNAJ3 +DYpMKGmxbbLi5tSkR+81lQFYh8GFsR87D2rMMK4zAsRNa6fgY2n9LHtsxdjnFGVQ +oOjfPBWaxl+ryMuZX6Bz3WlDlzscvyIftsFsNBjoUchXztCjzhCaCZtxlL2OvUyy +hgcjj6n5xhQAo/X+e1wRJW+J6YeIcDpZNYGD1T3nmpsRtfysd+Na96xvkG9CCdBy +gYmSO8FJ3GOZmWShN5HrJfB8ZgCQg3f/+NUGtwtuIeIqmrkVPbSAsMlBgDNwDcFO +8YGTmYNPNfypqZhy/cO844lOTKZOsDlq1ReHKoZgVlcngBIAwTfzibHOIrJcJqDg +q4yBWfXQGTCMHtc5QP6zVgRDcZucDdBTR8XXs78++BICEBfiDSyF1Q0Us2aMkHe0 +KLd8B71B5annVB//v1QhdwlJ77DHvkr2GFNpQs25Ag0EU72begEQAMi/n06h1Ube +hgKLjFjZDObV0YxwVjKesZ94zPKCADSZARbHr+878+2r4gmob1M+ohMh6PTecZ6B +D/l5kdnf5azBL8LeGXQI5klosGGVfTJ15fs6RekQJeftSWLp+VPv39PSpqy6uDZG +01EXmd8r3xFflr16HTsktPOPueT8JTh42F1DVKLk54jDNMgOJ0tA/8+i3oM2UHgI +sXIfn20oPsBb1eNT2ii6eOVrss3UnQL71lz13spx+0KC1zZx1BivN65BUUsjGCJr +twyHW3cWDNt6w/LYg6kRiu19daAfDf/BzAb/JCs68osdT0tfznEXroppfjENWJ5y +w5P5+8KTRwW1skqS8UsEJwvh6PgtGLCK8GLTC703rfTXAwDDsVDwABOxi8DXx2Le +OvmSc3zAOWvBIGdTTSV4Ko+LV5jTvTfK5kyx9dCVqeL9d+OhsrrybJrymzkqIH+n +3BzoOLAqIf9zLD/6W29vwrrGlYoQ7LfzcidVayDyhgh1PLXleRf4F7g3rpNplSiE +Ne6FNGpYBDw4AgQhlEhj/j7nNa7GXKI07hUkpi2qAgr/PKKS4jtYg+w23d/PPRTv +DNYd8voK7dC8Zl92JXLOvX+cIio4hoa4Mahi14DJyCAdCPN5KqgTuQiZJl/OvNS/ +QUVuvDTFo1Z1iI+zf8OA51W/zEMdP15tABEBAAGJAiUEGAEKAA8CGwwFAliA5vAF +CQakfvQACgkQKaeU/SJyvIbbYA//UOZjj1mtxRwHDmITmAItBoWgMfJ1h5U8f9nq +OyndV9FtTOTyZH5PwS8Sm1lD7X2oREojhWXT7dLEuUyu5Jj1iNTTXaG7BMDV34Cy +9GEJpDsEcyH3M0RwfioPZt0ufEm/GF9cNQs/243/1usEQbqlaxQPRmM1vZkODM63 +MKpLpg+WC+c7q2QlSC4t1cKZ3te2wG0Qly29I9WzlzLZbPO4ZMBCf5Ya+rf8lv1U +wiXQkeHPS/zywILEkcAw6qpcf0eJfB1rZ5FiLHH+hXadCBsS1OqvfleBhj9KfVld +aqRKMJTTVthcPGy3tkIvtDbx9GMAoykPLqymPmj+7SB8AlA1Kbcvblogd2ouvB29 +tY3tNuf6D+u0j9nnV/qzB2zvV0QigxWLw/6T8Cj2FF0GqkVX5Dzl4r2j/0U03a6A +7kCkUhR86G04FAgcXpNOpaCtup+ZnfhuiiJ3V+YtLiXU0QZAg070s4lay/e8uGfl +FzvdMAD8+uc2tXz8phmfx8Ln/xZ2hEI2AeoLGLDfKp+cW/ZabCFKig/iGAecKdct +ye6HZ/ocjH5NRyshk8o3FUGoDw395Of+m02IKJvNdMxayBs3qOw+++qCPOSMusrc +nmVmDUex1m4FYIWIH7Skzsa2+3+wbmyL1+r3IAwmb5e8/WxOz7l25KS/p+WWLnrS +OhcCJ725Ag0EU72fjwEQAMhW3xWZCJcJobVbhpIXsdCJ81OJO64AiAM6STSjPskg ++YNjmA46/VZLDnZV/f7UBxpeq+4cOejsu8tDQtbOz8HUlYKnwOQnd+k3JkycMbfs +K1+qDuITGJf4rrc+1ruU8SvRbWK0x8+pKWO3Vlg2EJwGJVHydj9zIvCaBLwhS5ev +jqHcNDZ3qo+HdermfA1sTdFY8QWZSH8wCY909m+E8McMuDZGO0oamACNktggM6/S +DdRI4NBKbf9LlkLFSVlSfm86fKRj8e87GZy3rNhq4C6oXWEIYqviAWvgMnJB5+m4 +iDN8WXTxcdSr/VFfKcE7nozd7aGvFPTdZbRUj8Sv4G4qbzdi3j9irmd1Cyv0dAD/ +d5RD6Tjc+VRG1jEbp2i2fZLMjr3bTZjAmdlfn34iuLSCcUbmo8wLLqWNh4+nOAof +LuBWzsZ2ydx9tlyM+ZobcqSAZkzLJOL9ur1PHq2YnX5JN0p3qJb5/1Wvujm5D6U1 +MPF07CxmiMGWZ3Oc8l0MiOo8GQyufWm7LN7ENHordnN75Z7ewNbkz97ICA+9AVcf +UEMo/Gk87iyfGAFp4Q98gtiB4bWpOFcZDV06EPPgDA0YuoW/OUWbKyjcmQd8M8jd +zVXnkxAFlv+cYATomqVvf73j36YUfBfryYTiRhQWUJCZbQFKU675sq1G7KIRx/pF +ABEBAAGJBEQEGAEKAA8CGwIFAliA5yAFCQakew8CKcFdIAQZAQoABgUCU72fjwAK +CRAKEbYdNle5ASdhD/42y3EcotkCqpeaSiymeKDFo0sWnOoohaN98eVNnzN5FWlC +W5KxesHh5myxseAxqpg+W5qawOXnwz8nf3Go6+rfE8OVz71wb28Ql3wPZXsVwocW +ZdiceUoYG1Y5fpudm9AJSIkN5mHC1yBFoyvqQlZl8JED9oxpownRP/H3Cz+ueOpS +yqLAnkjiiocP4ey072dssKm3E3m37tXGiFUfTgftgpbpIcjFti72ENNzq/qIqAee +SXKrWUpC/OrrqzZMJPZZ3dkZgQ2auedC4RqXJJPoyhPuxZwW6BcR+X37+rc09Gr8 +WA1jSHeMipz9GTR2R+Vdm87zuoeWvAUKvUt6YI935T4Unga4uJoekf/1sSf4x4Nx +4rYrRLx0wUoLEWypbJQ0L1No/JEHddSyW+C9qVzb3VSLTDx8W9G4l8myuWh0TSiX +83gJ4ZYT4mcwm4fzbasNosUvNwL0w/4cWLfrnjUznw5eVxAvxScqXMF1nycb+utE +Ge30J6ZghN4GysgPu/jRoQHVkCYan6+ETItvZPQ+5IPfRTGpX5qGwuRT5/uAbf78 +fe6Hf9HRy4bTskdDv7NXyJrY90BK45MTFzikjeeIQ91/8nF/uai58leWCM0Ur7lk +IZHZcokeRgHZHt0q6dGqM1yBs7iyMUS7cCIZfiL3lIpI+JQiqzdjmtbAgTBTawkQ +KaeU/SJyvIZePA//YU5nUGeE0oFoWhnACpM24btm5onppCyIPAdPzCoJKDJ68QCq +V53hascxZBIEb4Dod9Zb7vVQR+rY6V/fOHNgsRf8StgtmtRdChUwwCxuFS498dy8 +KxBw0G5MzeQAoaKuaXUIIzItzT3KpNDsQH7UaJE0Ejm8uLXXB3r5Aakn3U2bRTze +Swmcr6Ky4toOfHlwb8DwJns61219vHcnrz/cOtk9+xHRz2STUr3w//lLgMvWd3Rl +panBZRBU4s1p/N0QxVWKzROf06IINyZuoL9HLRF4lfYO19HiXamCWPZGsw9M3IMp +QNKKINi22jeYCfc43a5KZHLt2+FbxMRmFyli7zcc8py64PZmaWYj/shj6TTckG5b +4ohRElyqnnoC8CAsU7dgTMPRMYFmJRHFunZRMLvi11UD+I2hlYJyqeLBEzN639r6 +KIaTN3x2IbeZqyUM4sSD/r3ErNdTDEldtkghi7XZhzoRtPHNxTdv5xwJCCJzL2oE +OYcqn3ovgrOn5Z8ZkoCOKeGg9rlpTtEijHY63de/2cSn38dyHE3YTgocJtGqeM4q +BQa6IYrB2Q2f77w0AuYK/8AC/CFyG08h7fkrBKsZH172JzHyNf6x7Jv0C1xz5ZRq +6fkxXPW7VkujiRUyxvpiC9RmoMc4D5K241sRenl8+ZyFOefi3Awg6pP+mys= +=kXoB +-----END PGP PUBLIC KEY BLOCK----- diff -Nru datamash-1.1.1/debian/upstream-signing-key.pgp datamash-1.2.0/debian/upstream-signing-key.pgp --- datamash-1.1.1/debian/upstream-signing-key.pgp 2017-03-15 14:44:02.000000000 +0000 +++ datamash-1.2.0/debian/upstream-signing-key.pgp 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1 - -mQINBFO9m3oBEADS9z4i0LGkTrRstsnDPrZoOB0WvePFzycthJMWulqe6Sbnn462 -95fDNAwkcM2XjEU7yTGwyeAHFpKT4z3ydH+2Doc+z+D8gyh+jpNyaA5UlvpuJ/3e -w6l7ciB4dgXw8sASXpLxNNUPV3NQSKKiAYKzTpLmhfeYP1LuNUYKicjngD98lz8X -w15qGjSsZLGDqGUWVxm7eR33vWzYjdCItHVTKFDaPC0VJqi4P/wgCvu6IgiHBBRL -l8LEusHUJ2oxvpB2wxPjV6kabySpyhsK4siy77qCgTvAImEWZFgAJKGFc4fD7j3z -EchwID2N8gN4uQ413TWKlYriAZQVoRaBI7UKYkYtrAJweMc1m6ptKqgXKPc82DUP -Jrs/5LWdjBeJGpQWeMlYomluByEeWGJpQtVtoaTKogkTOxq81Y2cZmqrGuMEi7dL -wTmv9+3qmOPr0z3flYuICX01ffxzazms75nQRWJrL0iY0oIJjBP7voR8wVuoIkXN -8Ua/Omar84z6HWCvE3+kNE5DAGaurV8JUJ82JuO5aWkJhynDjVxzBMm0e4hu7xh+ -PEvppfP14t0aWtwee7WcFwbXMY5chskJ5mlRGhaX0QVfdiOnvL/eJhREYz0JRbHk -+yywucs9wFPClwZq1xNhPLIA5kNxMl20Dy3h5jstDfCpnzlcVVSC+XMDCQARAQAB -tCFBc3NhZiBHb3Jkb24gPGFnb3Jkb25Ad2kubWl0LmVkdT6JAj0EEwEKACcFAlO9 -m3oCGwMFCQHhM4AFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQKaeU/SJyvIbx -JQ//QgjHnZELwKIMEWQfHOLpRVUDln2g3MrD++aOfXHHzFcc96Ri6pRvPq8IIaSv -pTW4SS/9y14DCLW/YVxH2wQ+0KSAfx4jIg0SZSTedHxKGxJ8DNgOIbXujgxvRdWx -PM2HFIvTzR+WeJ1/Q5+V/he38ohUv0U9jZMgYQ+7yPaYZiy5jfkMVi80toKbv7+j -vh+d5ULxq1qu3EKszy3/duSstHWHfVK/SYD8alqn4cRiodedv03ytfTx7j5Eccfo -VZukf2YRzV+YREd/e+xj/Bwm02uGR+cIEgprOgPuV/ARCrSWUfo7OX4eFtFBsUOr -7e5KW/w2MKncqFsBUdOBTfc4/lT4+qr1ivjsPLiP1KP+z0u+0S8NSfXVTgKytOiT -cG6YlmkMOmaV0xMwwa0Va1ifO3htKjNEasONqJx7tD4BXTuhxYemheZikiG+lOjK -wKNsT3k7QeBccsN5aXNESFHGKEmduRCAAtjwLCXKRrnjmWtwoLLR8fQDH4g+hbgt -G+5++uBsbd9Afo1RyVOHeuMj61vwo0cxcZ4QfaOGOF5/Lqml0swQAva0P5XM5hBx -mmqW+8MQMLBmfdnKP6qpuxh/JTVUkmi04c7KrnA1Xu3jewAx9ovwu4Vtv22CE+gL -jv5vBGVATjnKDjhO8Jqf2rgz2G1ivgx6HESrEOvNTvoKVKeJAkAEEwEKACoCGwMF -CQHhM4AFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AFAlO9nboCGQEACgkQKaeU/SJy -vIZpqw//ZY6E6Gq7KXHiFquENTzELYtjMP6v95RsoQCxQqXdpgHZPMvKsYjvVFgk -k/CvAvtCWHizHNBEmP7eQ9lMyBBN53GvyzmEK6fAdbWlrEE2n3kel32Mnbot211X -ZhqwN0S09weeb84gn2giK3hVm3Aai7DtlJ87seUFfn7f8PV3zCV+q9ycCYwTZr4v -6oOKNfR4zdDWUy4QFU3p2B8zakKflsl5/DP+EymdcjUtSAonM6fa3xwpn4/Y8vcI -WqTwxXv2NKVBoWEnTSDN2OLQFk5v0uixUMGCtjVmRP3OD5xc7AAUhzF0xw0NVz1G -oUL0d+POQboF7SrX3l835B7xO/WMZKv0OiZ2EUZGWUlMqEYOCNNukVDhq1iS7ToI -sjHwDrvBzcmhQQxTN4ZQBn/wevZjG8MHCRarcMfBeKHkAvm0rvb/BFPIp3mwRIqM -tnmTMizXEVoNIGJPqM6PGJiiZq9sjY7MXX++rJRsM5hL5V+LFXDls3X4rVwWM+Kh -nxudkOJvwkl8DdQwelyRgx/bK1fOhro4gfb1Grk2YaaXHa+flh4ORUBJGFHK2GQg -8I/HDXxQTTUYI+SPhkt7AOSrsNoXMuF5ICFRuFAFV4TONCERc7ry2XRnNS1tUfzq -97SjQG6gfm5RTkl06n375ImfnrYEjzcUmZey8BHXujfXfjqgAYi5Ag0EU72begEQ -AMi/n06h1UbehgKLjFjZDObV0YxwVjKesZ94zPKCADSZARbHr+878+2r4gmob1M+ -ohMh6PTecZ6BD/l5kdnf5azBL8LeGXQI5klosGGVfTJ15fs6RekQJeftSWLp+VPv -39PSpqy6uDZG01EXmd8r3xFflr16HTsktPOPueT8JTh42F1DVKLk54jDNMgOJ0tA -/8+i3oM2UHgIsXIfn20oPsBb1eNT2ii6eOVrss3UnQL71lz13spx+0KC1zZx1Biv -N65BUUsjGCJrtwyHW3cWDNt6w/LYg6kRiu19daAfDf/BzAb/JCs68osdT0tfznEX -roppfjENWJ5yw5P5+8KTRwW1skqS8UsEJwvh6PgtGLCK8GLTC703rfTXAwDDsVDw -ABOxi8DXx2LeOvmSc3zAOWvBIGdTTSV4Ko+LV5jTvTfK5kyx9dCVqeL9d+Ohsrry -bJrymzkqIH+n3BzoOLAqIf9zLD/6W29vwrrGlYoQ7LfzcidVayDyhgh1PLXleRf4 -F7g3rpNplSiENe6FNGpYBDw4AgQhlEhj/j7nNa7GXKI07hUkpi2qAgr/PKKS4jtY -g+w23d/PPRTvDNYd8voK7dC8Zl92JXLOvX+cIio4hoa4Mahi14DJyCAdCPN5KqgT -uQiZJl/OvNS/QUVuvDTFo1Z1iI+zf8OA51W/zEMdP15tABEBAAGJAiUEGAEKAA8F -AlO9m3oCGwwFCQHhM4AACgkQKaeU/SJyvIY4FBAAyeiRbfugYbn6CFwdYPeapRss -EcrFQ12Twn7XQEGTj8v358kDsI9Whhq9MEfnKXZA15D1r1Zp70mLBfMGSr/RM7Vk -5pNSxVmxYtfLg23W/Dnvgs1n41ddE0YNy4AnzHlFHPDMFhn1HZObM0QqcTweUL+9 -TNetcuDULvFMea9q8brHvqawu0oIYcOpFD5WBzWH0hKfRhX1FKRt3aXV56bGMJA0 -l313ONGLa+2D1bdQDCjZ75DgGpYorInrhjsGSfiNR/sO49MdLVmE4lmfFKUHs+sq -Tr2zlzVREAOBhA0Li1t3xefhPctECkYs+CgXYrNXgphytxggOm8gxT2Uu8X6klVl -9uXdrUL8/PdbymPPOdS8V0KUXGVfzIM4Ns8AlW9YILhs77sWGp1Ho0mj1amUmeue -WBon9pOoN26jdWVOoT5lyTJx5gFEiCGqy8uxY+NwsqgGNIca9h2SLAzdnT0isG1O -ROs8u07u+PYeFdlZJWiWY47+z8xgEPcZeCtBupA0SqTjZndDWGh0Cdc+aNKEmooR -yUAmd4NRxaVBUjyir6uqYsO4FhPvrnIWMhP2w5T3m5UNQlpg84JcDmDrtp7BBdNz -CqpC9CGl2BgW5VvXgAOz9oS0BqVqUe2sgC7JhKWH5Ax6Z3U3GHeOwG238q1SpxQW -H9fDT15M/qy/sxWtHrm5Ag0EU72fjwEQAMhW3xWZCJcJobVbhpIXsdCJ81OJO64A -iAM6STSjPskg+YNjmA46/VZLDnZV/f7UBxpeq+4cOejsu8tDQtbOz8HUlYKnwOQn -d+k3JkycMbfsK1+qDuITGJf4rrc+1ruU8SvRbWK0x8+pKWO3Vlg2EJwGJVHydj9z -IvCaBLwhS5evjqHcNDZ3qo+HdermfA1sTdFY8QWZSH8wCY909m+E8McMuDZGO0oa -mACNktggM6/SDdRI4NBKbf9LlkLFSVlSfm86fKRj8e87GZy3rNhq4C6oXWEIYqvi -AWvgMnJB5+m4iDN8WXTxcdSr/VFfKcE7nozd7aGvFPTdZbRUj8Sv4G4qbzdi3j9i -rmd1Cyv0dAD/d5RD6Tjc+VRG1jEbp2i2fZLMjr3bTZjAmdlfn34iuLSCcUbmo8wL -LqWNh4+nOAofLuBWzsZ2ydx9tlyM+ZobcqSAZkzLJOL9ur1PHq2YnX5JN0p3qJb5 -/1Wvujm5D6U1MPF07CxmiMGWZ3Oc8l0MiOo8GQyufWm7LN7ENHordnN75Z7ewNbk -z97ICA+9AVcfUEMo/Gk87iyfGAFp4Q98gtiB4bWpOFcZDV06EPPgDA0YuoW/OUWb -KyjcmQd8M8jdzVXnkxAFlv+cYATomqVvf73j36YUfBfryYTiRhQWUJCZbQFKU675 -sq1G7KIRx/pFABEBAAGJBEQEGAEKAA8FAlO9n48CGwIFCQHhM4ACKQkQKaeU/SJy -vIbBXSAEGQEKAAYFAlO9n48ACgkQChG2HTZXuQEnYQ/+NstxHKLZAqqXmkospnig -xaNLFpzqKIWjffHlTZ8zeRVpQluSsXrB4eZssbHgMaqYPluamsDl58M/J39xqOvq -3xPDlc+9cG9vEJd8D2V7FcKHFmXYnHlKGBtWOX6bnZvQCUiJDeZhwtcgRaMr6kJW -ZfCRA/aMaaMJ0T/x9ws/rnjqUsqiwJ5I4oqHD+HstO9nbLCptxN5t+7VxohVH04H -7YKW6SHIxbYu9hDTc6v6iKgHnklyq1lKQvzq66s2TCT2Wd3ZGYENmrnnQuEalyST -6MoT7sWcFugXEfl9+/q3NPRq/FgNY0h3jIqc/Rk0dkflXZvO87qHlrwFCr1LemCP -d+U+FJ4GuLiaHpH/9bEn+MeDceK2K0S8dMFKCxFsqWyUNC9TaPyRB3XUslvgvalc -291Ui0w8fFvRuJfJsrlodE0ol/N4CeGWE+JnMJuH822rDaLFLzcC9MP+HFi36541 -M58OXlcQL8UnKlzBdZ8nG/rrRBnt9CemYITeBsrID7v40aEB1ZAmGp+vhEyLb2T0 -PuSD30UxqV+ahsLkU+f7gG3+/H3uh3/R0cuG07JHQ7+zV8ia2PdASuOTExc4pI3n -iEPdf/Jxf7moufJXlgjNFK+5ZCGR2XKJHkYB2R7dKunRqjNcgbO4sjFEu3AiGX4i -95SKSPiUIqs3Y5rWwIEwU2tgThAAuh/ipbr2ySrzkMDIikyIGOxgYFLB3axlsmjG -m9U+AjepUU4Bp7SsjzgBG/iGqll2eJwozeCK37thQQc0/kmMef8AdqfVUY6Cyk87 -MB6pAbPhs3hX4weor1JZMyEpNTW+AZBk9vAtnp/x5Efj6qJ+C3R55YoLbGIwMt9C -0fQmGIxW/EvpgkQHJsom6/DjOdDTNQEhSpMM46nK10cTCXGj2TUm6yUd6lVeLXJ5 -dAMqgGAdc3SsKkosb3InWabgNbcO7+JkqdV5MhJYWG3tRoJHyopRH/otR7RNT1vH -uWbbxNl3NCU8OAGYsIePPq3cxV8yezQeHOFszWM9KQh5yrx3QbBjbyHNhNWlIyng -GfYGZctkrkrX9OoP1VWKMiaIAhbS2bi8Iv+5jYCYpn7+ArM7W3hk4hznaPDE0lJV -c1ELn8cyEl8K9kjEf6Wn/9Edtk3ze4UyWfIy85rPHiqUz0ZB5qVVPpqVxUE9hm16 -zjPNjEIk7JUmkiEVPPcEE3bq4xXVr3/cFziRvA9dFdaenQnTZLpZmMRoPrG+VuL6 -bmlGNo+efdb1xQqp987GnhVJvzjqihw1XcSDAIKcem+zlakR98gXd6ebQ3Ec2Ps3 -OLsDGekPXmE8tjVUy5TH1wzaplnPNo5cL1QYuxa6tnvKIBW4tCD1z2YixuLzV3Nx -N9GpEdQ= -=3CZU ------END PGP PUBLIC KEY BLOCK----- - diff -Nru datamash-1.1.1/doc/datamash.info datamash-1.2.0/doc/datamash.info --- datamash-1.1.1/doc/datamash.info 2017-01-19 19:34:41.000000000 +0000 +++ datamash-1.2.0/doc/datamash.info 2017-08-22 23:07:57.000000000 +0000 @@ -1,7 +1,7 @@ This is datamash.info, produced by makeinfo version 6.3 from datamash.texi. -This manual is for GNU Datamash (version 1.1.1, 17 January 2017), which +This manual is for GNU Datamash (version 1.2, 20 August 2017), which provides command-line computations on input files. Copyright (C) 2014-2017 Assaf Gordon. @@ -23,7 +23,7 @@ Datamash ******** -This manual is for GNU Datamash (version 1.1.1, 17 January 2017), which +This manual is for GNU Datamash (version 1.2, 20 August 2017), which provides command-line computations on input files. * Menu: @@ -119,17 +119,17 @@ 'strbin', 'round', 'floor', 'ceil', 'trunc', 'frac' Group-by Numeric operations: - 'sum', 'min', 'max', 'absmin', 'absmax' + 'sum', 'min', 'max', 'absmin', 'absmax', 'range' Group-by Textual/Numeric operations: 'count', 'first', 'last', 'rand', 'unique', 'collapse', 'countunique' Group-by Statistical operations: - 'mean', 'median', 'q1', 'q3', 'iqr', 'mode', 'antimode', 'pstdev', - 'sstdev', 'pvar', 'svar', 'mad', 'madraw', 'sskew', 'pskew', - 'skurt', 'pkurt', 'jarque', 'dpo', 'scov', 'pcov', 'spearson', - 'ppearson' + 'mean', 'mode', 'median', 'q1', 'q3', 'iqr', 'perc', 'antimode', + 'pstdev', 'sstdev', 'pvar', 'svar', 'mad', 'madraw', 'sskew', + 'pskew', 'skurt', 'pkurt', 'jarque', 'dpo', 'scov', 'pcov', + 'spearson', 'ppearson' Grouping options: @@ -271,6 +271,8 @@ minimum of the absolute values 'absmax' maximum of the absolute values + 'range' + range of values (maximum - minimum) Group-By Textual/Numeric operations: @@ -301,6 +303,8 @@ 3rd quartile value 'iqr' inter-quartile range + 'perc' + percentile value 'mode' mode value (most common value) 'antimode' @@ -833,10 +837,59 @@ datamash: check failed: line 3 has 2 fields (previous line had 3) fail - In pipeline/automation context, it is often beneficial to validate -files as early as possible (immediately after file is created, as in -fail-fast methodology (https://en.wikipedia.org/wiki/Fail-fast)). A -typical usage in a shell script would be: +5.7.1 Expected number of lines/fields +------------------------------------- + +'check' accepts optional LINES and FIELDS and will return failure if the +input does not have the requested number of lines/fields. + +The syntax is: + + datamash check [N lines] [N fields] + +Usage examples: + + $ cat file.txt + A 1 ww + B 2 xx + C 3 yy + D 4 zz + + $ datamash check 4 lines < file.txt && echo ok + 4 lines, 3 fields + ok + + $ datamash check 3 fields < file.txt && echo ok + 4 lines, 3 fields + ok + + $ datamash check 4 lines 3 fields < file.txt && echo ok + 4 lines, 3 fields + ok + + $ datamash check 7 fields < file.txt && echo ok + line 1 (3 fields): + A 1 ww + datamash: check failed: line 1 has 3 fields (expecting 22) + + $ datamash check 10 lines < file.txt && echo ok + datamash: check failed: input had 4 lines (expecting 10) + + For convenience, LINE,ROW,ROWS can be used instead of LINES; +FIELD,COLUMNS,COLUMN,COL can be used instead of FIELDS. The following +are all equivalent: + + datamash check 4 lines 10 fields < file.txt + datamash check 4 rows 10 columns < file.txt + datamash check 10 col 4 row < file.txt + +5.7.2 checks in automation scripts +---------------------------------- + +In pipeline/automation context, it is often beneficial to validate files +as early as possible (immediately after file is created, as in fail-fast +methodology (https://en.wikipedia.org/wiki/Fail-fast)). A typical usage +in a shell script would be: #!/bin/sh @@ -1547,7 +1600,7 @@ * bug reporting: Reporting bugs. (line 6) * ceil: Rounding numbers. (line 6) * check: Check. (line 6) -* check, in automation and shell scripts: Check. (line 39) +* check, in automation and shell scripts: Check. (line 88) * checking tabular structure: Check. (line 6) * checklist for bug reports: Reporting bugs. (line 9) * collapse: Groupby on /etc/passwd. @@ -1591,7 +1644,7 @@ * examples, standard deviation: Summary Statistics. (line 39) * examples, summary statistics: Summary Statistics. (line 6) * examples, usage: Usage Examples. (line 6) -* fail fast: Check. (line 39) +* fail fast: Check. (line 88) * field delimiters: Field Delimiters. (line 6) * field names: Header Lines and Column Names. (line 75) @@ -1639,11 +1692,11 @@ * operations, primary: Available Operations. (line 7) * operations, statistical: Available Operations. - (line 72) + (line 74) * operations, statistical <1>: Statistical Operations. (line 6) * operations, textual: Available Operations. - (line 55) + (line 57) * options: Invoking datamash. (line 6) * overview: Overview. (line 6) * patches, contributing: Reporting bugs. (line 26) @@ -1666,12 +1719,12 @@ (line 78) * round: Rounding numbers. (line 6) * rounding numbers: Rounding numbers. (line 6) -* shell scripts, check: Check. (line 39) +* shell scripts, check: Check. (line 88) * sorting: Overview. (line 30) * sorting <1>: Invoking datamash. (line 82) * standard devian, examples: Summary Statistics. (line 39) * Statistical operations: Available Operations. - (line 72) + (line 74) * statistical operations: Statistical Operations. (line 5) * statistics: Statistical Operations. @@ -1692,7 +1745,7 @@ * tac: Reverse and Transpose. (line 78) * Textual operations: Available Operations. - (line 55) + (line 57) * transpose: Reverse and Transpose. (line 9) * transpose, and reverse: Reverse and Transpose. @@ -1715,25 +1768,25 @@  Tag Table: -Node: Top754 -Node: Overview1413 -Node: Invoking datamash3302 -Node: Available Operations7435 -Node: Statistical Operations10376 -Node: Usage Examples10931 -Node: Summary Statistics11832 -Node: Header Lines and Column Names13906 -Node: Field Delimiters16886 -Node: Column Ranges18050 -Node: Reverse and Transpose18999 -Node: Groupby on /etc/passwd21866 -Node: Check24884 -Node: Crosstab26662 -Node: Rounding numbers27839 -Node: Binning numbers28867 -Node: Binning strings29328 -Node: Reporting bugs30173 -Node: GNU Free Documentation License31456 -Node: Concept index56614 +Node: Top751 +Node: Overview1407 +Node: Invoking datamash3296 +Node: Available Operations7446 +Node: Statistical Operations10485 +Node: Usage Examples11040 +Node: Summary Statistics11941 +Node: Header Lines and Column Names14015 +Node: Field Delimiters16995 +Node: Column Ranges18159 +Node: Reverse and Transpose19108 +Node: Groupby on /etc/passwd21975 +Node: Check24993 +Node: Crosstab28056 +Node: Rounding numbers29233 +Node: Binning numbers30261 +Node: Binning strings30722 +Node: Reporting bugs31567 +Node: GNU Free Documentation License32850 +Node: Concept index58008  End Tag Table diff -Nru datamash-1.1.1/doc/datamash.texi datamash-1.2.0/doc/datamash.texi --- datamash-1.1.1/doc/datamash.texi 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/doc/datamash.texi 2017-08-20 19:04:41.000000000 +0000 @@ -174,14 +174,15 @@ @code{frac} @item Group-by Numeric operations: -@code{sum}, @code{min}, @code{max}, @code{absmin}, @code{absmax} +@code{sum}, @code{min}, @code{max}, @code{absmin}, @code{absmax}, @code{range} @item Group-by Textual/Numeric operations: @code{count}, @code{first}, @code{last}, @code{rand}, @code{unique}, @code{collapse}, @code{countunique} @item Group-by Statistical operations: -@code{mean}, @code{median}, @code{q1}, @code{q3}, @code{iqr}, @code{mode}, +@code{mean}, @code{mode}, +@code{median}, @code{q1}, @code{q3}, @code{iqr}, @code{perc}, @code{antimode}, @code{pstdev}, @code{sstdev}, @code{pvar}, @code{svar}, @code{mad}, @code{madraw}, @code{sskew}, @code{pskew}, @code{skurt}, @code{pkurt}, @code{jarque}, @code{dpo}, @@ -375,6 +376,8 @@ minimum of the absolute values @item absmax maximum of the absolute values +@item range +range of values (maximum - minimum) @end table @item Group-By Textual/Numeric operations: @@ -413,6 +416,8 @@ 3rd quartile value @item iqr inter-quartile range +@item perc +percentile value @item mode mode value (most common value) @item antimode @@ -1081,6 +1086,62 @@ fail @end example +@subsection Expected number of lines/fields + +@option{check} accepts optional @var{lines} and @var{fields} and will +return failure if the input does not have the requested number of lines/fields. + +@exdent The syntax is: + +@example +datamash check [@var{N} lines] [@var{N} fields] +@end example + +@exdent Usage examples: + +@example +$ cat file.txt +A 1 ww +B 2 xx +C 3 yy +D 4 zz + +$ datamash check 4 lines < file.txt && echo ok +4 lines, 3 fields +ok + +$ datamash check 3 fields < file.txt && echo ok +4 lines, 3 fields +ok + +$ datamash check 4 lines 3 fields < file.txt && echo ok +4 lines, 3 fields +ok + +$ datamash check 7 fields < file.txt && echo ok +line 1 (3 fields): + A 1 ww +datamash: check failed: line 1 has 3 fields (expecting 22) + +$ datamash check 10 lines < file.txt && echo ok +datamash: check failed: input had 4 lines (expecting 10) +@end example + +For convenience, @var{line},@var{row},@var{rows} +can be used instead of @var{lines}; +@var{field},@var{columns},@var{column},@var{col} can be used +instead of @var{fields}. +The following are all equivalent: + +@example +datamash check 4 lines 10 fields < file.txt +datamash check 4 rows 10 columns < file.txt +datamash check 10 col 4 row < file.txt +@end example + + +@subsection checks in automation scripts + @cindex fail fast @cindex shell scripts, check @cindex check, in automation and shell scripts diff -Nru datamash-1.1.1/doc/stamp-vti datamash-1.2.0/doc/stamp-vti --- datamash-1.1.1/doc/stamp-vti 2017-01-19 19:34:40.000000000 +0000 +++ datamash-1.2.0/doc/stamp-vti 2017-08-22 23:19:23.000000000 +0000 @@ -1,4 +1,4 @@ -@set UPDATED 17 January 2017 -@set UPDATED-MONTH January 2017 -@set EDITION 1.1.1 -@set VERSION 1.1.1 +@set UPDATED 20 August 2017 +@set UPDATED-MONTH August 2017 +@set EDITION 1.2 +@set VERSION 1.2 diff -Nru datamash-1.1.1/doc/version.texi datamash-1.2.0/doc/version.texi --- datamash-1.1.1/doc/version.texi 2017-01-19 19:34:40.000000000 +0000 +++ datamash-1.2.0/doc/version.texi 2017-08-22 23:07:56.000000000 +0000 @@ -1,4 +1,4 @@ -@set UPDATED 17 January 2017 -@set UPDATED-MONTH January 2017 -@set EDITION 1.1.1 -@set VERSION 1.1.1 +@set UPDATED 20 August 2017 +@set UPDATED-MONTH August 2017 +@set EDITION 1.2 +@set VERSION 1.2 diff -Nru datamash-1.1.1/init.cfg datamash-1.2.0/init.cfg --- datamash-1.1.1/init.cfg 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/init.cfg 2017-08-22 23:05:11.000000000 +0000 @@ -36,6 +36,14 @@ skip_ "requires a working valgrind" } +# Skip the current test if 'paste' doesn't work. +# Alpine linux does not have 'paste' in the default minimal installation. +require_paste_() +{ + paste - /dev/null || + skip_ "requires a working paste(1)" +} + expensive_() diff -Nru datamash-1.1.1/lib/arg-nonnull.h datamash-1.2.0/lib/arg-nonnull.h --- datamash-1.1.1/lib/arg-nonnull.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/arg-nonnull.h 2017-05-03 21:43:30.000000000 +0000 @@ -0,0 +1,26 @@ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2017 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 . */ + +/* _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 -Nru datamash-1.1.1/lib/c-ctype.h datamash-1.2.0/lib/c-ctype.h --- datamash-1.1.1/lib/c-ctype.h 2017-01-10 20:00:58.000000000 +0000 +++ datamash-1.2.0/lib/c-ctype.h 2017-05-03 21:43:32.000000000 +0000 @@ -115,16 +115,16 @@ /* Cases for lowercase hex letters, and lowercase letters, all offset by N. */ -#define _C_CTYPE_LOWER_A_THRU_F_N(n) \ - case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \ - case 'e' + (n): case 'f' + (n) -#define _C_CTYPE_LOWER_N(n) \ - _C_CTYPE_LOWER_A_THRU_F_N(n): \ - case 'g' + (n): case 'h' + (n): case 'i' + (n): case 'j' + (n): \ - case 'k' + (n): case 'l' + (n): case 'm' + (n): case 'n' + (n): \ - case 'o' + (n): case 'p' + (n): case 'q' + (n): case 'r' + (n): \ - case 's' + (n): case 't' + (n): case 'u' + (n): case 'v' + (n): \ - case 'w' + (n): case 'x' + (n): case 'y' + (n): case 'z' + (n) +#define _C_CTYPE_LOWER_A_THRU_F_N(N) \ + case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \ + case 'e' + (N): case 'f' + (N) +#define _C_CTYPE_LOWER_N(N) \ + _C_CTYPE_LOWER_A_THRU_F_N(N): \ + case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \ + case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \ + case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \ + case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \ + case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N) /* Cases for hex letters, digits, lower, punct, and upper. */ diff -Nru datamash-1.1.1/lib/c++defs.h datamash-1.2.0/lib/c++defs.h --- datamash-1.1.1/lib/c++defs.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/c++defs.h 2017-05-03 21:43:30.000000000 +0000 @@ -0,0 +1,316 @@ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2017 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 . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !__OPTIMIZE__ +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !__OPTIMIZE__ +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ diff -Nru datamash-1.1.1/lib/closeout.c datamash-1.2.0/lib/closeout.c --- datamash-1.1.1/lib/closeout.c 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/closeout.c 2017-08-08 00:31:04.000000000 +0000 @@ -33,6 +33,16 @@ #include "exitfail.h" #include "quotearg.h" +#ifndef __has_feature +# define __has_feature(a) false +#endif + +#if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer) +enum { SANITIZE_ADDRESS = true }; +#else +enum { SANITIZE_ADDRESS = false }; +#endif + static const char *file_name; /* Set the file name to be reported in the event an error is detected @@ -119,6 +129,8 @@ _exit (exit_failure); } - if (close_stream (stderr) != 0) - _exit (exit_failure); + /* Close stderr only if not sanitizing, as sanitizers may report to + stderr after this function returns. */ + if (!SANITIZE_ADDRESS && close_stream (stderr) != 0) + _exit (exit_failure); } diff -Nru datamash-1.1.1/lib/error.c datamash-1.2.0/lib/error.c --- datamash-1.1.1/lib/error.c 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/error.c 2017-08-22 19:23:19.000000000 +0000 @@ -98,28 +98,32 @@ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ -# include "msvc-nothrow.h" +# if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +# else +# include +# endif # endif /* The gnulib override of fcntl is not needed in this file. */ # undef fcntl -# if !HAVE_DECL_STRERROR_R +# if !(GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R) # ifndef HAVE_DECL_STRERROR_R "this configure-time declaration test was not run" # endif # if STRERROR_R_CHAR_P -char *strerror_r (); +char *strerror_r (int errnum, char *buf, size_t buflen); # else -int strerror_r (); +int strerror_r (int errnum, char *buf, size_t buflen); # endif # endif #define program_name getprogname () -# if HAVE_STRERROR_R || defined strerror_r +# if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r -# endif /* HAVE_STRERROR_R || defined strerror_r */ +# endif /* GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r */ #endif /* not _LIBC */ #if !_LIBC @@ -172,9 +176,9 @@ { char const *s; -#if defined HAVE_STRERROR_R || _LIBC +#if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R char errbuf[1024]; -# if _LIBC || STRERROR_R_CHAR_P +# if _LIBC || (!GNULIB_STRERROR_R_POSIX && STRERROR_R_CHAR_P) s = __strerror_r (errnum, errbuf, sizeof errbuf); # else if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) @@ -268,7 +272,6 @@ else #endif vfprintf (stderr, message, args); - va_end (args); ++error_message_count; if (errnum) @@ -318,6 +321,7 @@ va_start (args, message); error_tail (status, errnum, message, args); + va_end (args); #ifdef _LIBC _IO_funlockfile (stderr); @@ -388,6 +392,7 @@ va_start (args, message); error_tail (status, errnum, message, args); + va_end (args); #ifdef _LIBC _IO_funlockfile (stderr); diff -Nru datamash-1.1.1/lib/float.in.h datamash-1.2.0/lib/float.in.h --- datamash-1.1.1/lib/float.in.h 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/float.in.h 2017-08-22 19:23:19.000000000 +0000 @@ -63,7 +63,7 @@ /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of precision in the compiler but 64 bits of precision at runtime. See . */ -#if defined __i386__ && defined __FreeBSD__ +#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 @@ -81,7 +81,7 @@ # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN -# define LDBL_MIN 3.3621031431120935E-4932L /* = 0x1p-16382L */ +# define LDBL_MIN 3.362103143112093506262677817321752E-4932L /* = 0x1p-16382L */ /* Maximum representable finite number. */ # undef LDBL_MAX /* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }. diff -Nru datamash-1.1.1/lib/fpending.c datamash-1.2.0/lib/fpending.c --- datamash-1.1.1/lib/fpending.c 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/fpending.c 2017-08-22 19:23:19.000000000 +0000 @@ -41,7 +41,7 @@ return fp->_ptr - fp->_buffer; #elif defined __minix /* Minix */ return fp_->_ptr - fp_->_buf; -#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */ +#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */ return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0); #elif defined __UCLIBC__ /* uClibc */ return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0); @@ -51,8 +51,6 @@ return fp->__bufp - fp->__buffer; #elif defined EPLAN9 /* Plan9 */ return fp->wp - fp->buf; -#elif defined __VMS /* VMS */ - return (*fp)->_ptr - (*fp)->_base; #else # error "Please port gnulib fpending.c to your platform!" return 1; diff -Nru datamash-1.1.1/lib/getopt1.c datamash-1.2.0/lib/getopt1.c --- datamash-1.1.1/lib/getopt1.c 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/getopt1.c 2017-08-08 00:31:04.000000000 +0000 @@ -1,56 +1,44 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - 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. + Copyright (C) 1987-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library 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, + The GNU C Library 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. + 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 . */ + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ -#ifdef _LIBC -# include -#else +#ifndef _LIBC # include -# include "getopt.h" #endif -#include "getopt_int.h" - -#include -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -#include -#endif - -#ifndef NULL -#define NULL 0 -#endif +#include "getopt.h" +#include "getopt_int.h" int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, - const struct option *long_options, int *opt_index) + const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 0, 0); + opt_index, 0, 0); } int _getopt_long_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) + const struct option *long_options, int *opt_index, + struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 0, d, 0); + 0, d, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. @@ -60,26 +48,27 @@ int getopt_long_only (int argc, char *__getopt_argv_const *argv, - const char *options, - const struct option *long_options, int *opt_index) + const char *options, + const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 1, 0); + opt_index, 1, 0); } int _getopt_long_only_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) + const struct option *long_options, int *opt_index, + struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 1, d, 0); + 1, d, 0); } #ifdef TEST #include +#include int main (int argc, char **argv) @@ -93,74 +82,74 @@ int option_index = 0; static const struct option long_options[] = { - {"add", 1, 0, 0}, - {"append", 0, 0, 0}, - {"delete", 1, 0, 0}, - {"verbose", 0, 0, 0}, - {"create", 0, 0, 0}, - {"file", 1, 0, 0}, - {0, 0, 0, 0} + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", - long_options, &option_index); + long_options, &option_index); if (c == -1) - break; + break; switch (c) - { - case 0: - printf ("option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value '%s'\n", optarg); - break; - - case 'd': - printf ("option d with value '%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } + { + case 0: + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value '%s'\n", optarg); + break; + + case 'd': + printf ("option d with value '%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) - printf ("%s ", argv[optind++]); + printf ("%s ", argv[optind++]); printf ("\n"); } diff -Nru datamash-1.1.1/lib/getopt.c datamash-1.2.0/lib/getopt.c --- datamash-1.1.1/lib/getopt.c 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/getopt.c 2017-08-08 00:31:04.000000000 +0000 @@ -1,23 +1,21 @@ /* Getopt for GNU. - NOTE: getopt is part of the C library, so if you don't know what - "Keep this file name-space clean" means, talk to drepper@gnu.org - before changing it! - Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - 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. + Copyright (C) 1987-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library 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, + The GNU C Library 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. + 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 . */ + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ #ifndef _LIBC # include @@ -31,30 +29,54 @@ #include #ifdef _LIBC +/* When used as part of glibc, error printing must be done differently + for standards compliance. getopt is not a cancellation point, so + it must not call functions that are, and it is specified by an + older standard than stdio locking, so it must not refer to + functions in the "user namespace" related to stdio locking. + Finally, it must use glibc's internal message translation so that + the messages are looked up in the proper text domain. */ # include +# define fprintf __fxprintf_nocancel +# define flockfile(fp) _IO_flockfile (fp) +# define funlockfile(fp) _IO_funlockfile (fp) #else # include "gettext.h" # define _(msgid) gettext (msgid) -#endif - -#if defined _LIBC && defined USE_IN_LIBIO -# include -#endif - -/* This version of 'getopt' appears to the caller like standard Unix 'getopt' - but it behaves differently for the user, since it allows the user - to intersperse the options with the other arguments. - - As 'getopt_long' works, it permutes the elements of ARGV so that, - when it is done, all the options precede everything else. Thus - all application programs are extended to handle flexible argument order. - - Using 'getopt' or setting the environment variable POSIXLY_CORRECT +/* When used standalone, flockfile and funlockfile might not be + available. */ +# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \ + || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) +# define flockfile(fp) /* nop */ +# define funlockfile(fp) /* nop */ +# endif +/* When used standalone, do not attempt to use alloca. */ +# define __libc_use_alloca(size) 0 +# undef alloca +# define alloca(size) (abort (), (void *)0) +#endif + +/* This implementation of 'getopt' has three modes for handling + options interspersed with non-option arguments. It can stop + scanning for options at the first non-option argument encountered, + as POSIX specifies. It can continue scanning for options after the + first non-option argument, but permute 'argv' as it goes so that, + after 'getopt' is done, all the options precede all the non-option + arguments and 'optind' points to the first non-option argument. + Or, it can report non-option arguments as if they were arguments to + the option character '\x01'. + + The default behavior of 'getopt_long' is to permute the argument list. + When this implementation is used standalone, the default behavior of + 'getopt' is to stop at the first non-option argument, but when it is + used as part of GNU libc it also permutes the argument list. In both + cases, setting the environment variable POSIXLY_CORRECT to any value disables permutation. - Then the behavior is completely standard. - GNU application programs can use a third alternative mode in which - they can distinguish the relative order of options and other arguments. */ + If the first character of the OPTSTRING argument to 'getopt' or + 'getopt_long' is '+', both functions will stop at the first + non-option argument. If it is '-', both functions will report + non-option arguments as arguments to the option character '\x01'. */ #include "getopt_int.h" @@ -95,42 +117,7 @@ /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; - - -#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV -extern char *getenv (); -#endif -#ifdef _LIBC -/* Stored original parameters. - XXX This is no good solution. We should rather copy the args so - that we can compare them later. But we must not use malloc(3). */ -extern int __libc_argc; -extern char **__libc_argv; - -/* Bash 2.0 gives us an environment variable containing flags - indicating ARGV elements that should not be considered arguments. */ - -# ifdef USE_NONOPTION_FLAGS -/* Defined in getopt_init.c */ -extern char *__getopt_nonoption_flags; -# endif - -# ifdef USE_NONOPTION_FLAGS -# define SWAP_FLAGS(ch1, ch2) \ - if (d->__nonoption_flags_len > 0) \ - { \ - char __tmp = __getopt_nonoption_flags[ch1]; \ - __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ - __getopt_nonoption_flags[ch2] = __tmp; \ - } -# else -# define SWAP_FLAGS(ch1, ch2) -# endif -#else /* !_LIBC */ -# define SWAP_FLAGS(ch1, ch2) -#endif /* _LIBC */ - /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. @@ -153,64 +140,40 @@ It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ -#if defined _LIBC && defined USE_NONOPTION_FLAGS - /* First make sure the handling of the '__getopt_nonoption_flags' - string can work normally. Our top argument must be in the range - of the string. */ - if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) - { - /* We must extend the array. The user plays games with us and - presents new arguments. */ - char *new_str = malloc (top + 1); - if (new_str == NULL) - d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; - else - { - memset (__mempcpy (new_str, __getopt_nonoption_flags, - d->__nonoption_flags_max_len), - '\0', top + 1 - d->__nonoption_flags_max_len); - d->__nonoption_flags_max_len = top + 1; - __getopt_nonoption_flags = new_str; - } - } -#endif - while (top > middle && middle > bottom) { if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - register int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[top - (middle - bottom) + i]; - argv[top - (middle - bottom) + i] = tem; - SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } else - { - /* Top segment is the short one. */ - int len = top - middle; - register int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[middle + i]; - argv[middle + i] = tem; - SWAP_FLAGS (bottom + i, middle + i); - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } + { + /* Top segment is the short one. */ + int len = top - middle; + int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } } /* Update records for the slots the non-options now occupy. */ @@ -219,25 +182,216 @@ d->__last_nonopt = d->optind; } -/* Initialize the internal data when the first call is made. */ +/* Process the argument starting with d->__nextchar as a long option. + d->optind should *not* have been advanced over this argument. + + If the value returned is -1, it was not actually a long option, the + state is unchanged, and the argument should be processed as a set + of short options (this can only happen when long_only is true). + Otherwise, the option (and its argument, if any) have been consumed + and the return value is the value to return from _getopt_internal_r. */ +static int +process_long_option (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, + int long_only, struct _getopt_data *d, + int print_errors, const char *prefix) +{ + char *nameend; + size_t namelen; + const struct option *p; + const struct option *pfound = NULL; + int n_options; + int option_index; + + for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + namelen = nameend - d->__nextchar; + + /* First look for an exact match, counting the options as a side + effect. */ + for (p = longopts, n_options = 0; p->name; p++, n_options++) + if (!strncmp (p->name, d->__nextchar, namelen) + && namelen == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + option_index = n_options; + break; + } + + if (pfound == NULL) + { + /* Didn't find an exact match, so look for abbreviations. */ + unsigned char *ambig_set = NULL; + int ambig_malloced = 0; + int ambig_fallback = 0; + int indfound = -1; + + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, d->__nextchar, namelen)) + { + if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + { + /* Second or later nonexact match found. */ + if (!ambig_fallback) + { + if (!print_errors) + /* Don't waste effort tracking the ambig set if + we're not going to print it anyway. */ + ambig_fallback = 1; + else if (!ambig_set) + { + if (__libc_use_alloca (n_options)) + ambig_set = alloca (n_options); + else if ((ambig_set = malloc (n_options)) == NULL) + /* Fall back to simpler error message. */ + ambig_fallback = 1; + else + ambig_malloced = 1; + + if (ambig_set) + { + memset (ambig_set, 0, n_options); + ambig_set[indfound] = 1; + } + } + if (ambig_set) + ambig_set[option_index] = 1; + } + } + } + + if (ambig_set || ambig_fallback) + { + if (print_errors) + { + if (ambig_fallback) + fprintf (stderr, _("%s: option '%s%s' is ambiguous\n"), + argv[0], prefix, d->__nextchar); + else + { + flockfile (stderr); + fprintf (stderr, + _("%s: option '%s%s' is ambiguous; possibilities:"), + argv[0], prefix, d->__nextchar); + + for (option_index = 0; option_index < n_options; option_index++) + if (ambig_set[option_index]) + fprintf (stderr, " '%s%s'", + prefix, longopts[option_index].name); + + /* This must use 'fprintf' even though it's only + printing a single character, so that it goes through + __fxprintf_nocancel when compiled as part of glibc. */ + fprintf (stderr, "\n"); + funlockfile (stderr); + } + } + if (ambig_malloced) + free (ambig_set); + d->__nextchar += strlen (d->__nextchar); + d->optind++; + d->optopt = 0; + return '?'; + } + + option_index = indfound; + } + + if (pfound == NULL) + { + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short option, + then it's an error. */ + if (!long_only || argv[d->optind][1] == '-' + || strchr (optstring, *d->__nextchar) == NULL) + { + if (print_errors) + fprintf (stderr, _("%s: unrecognized option '%s%s'\n"), + argv[0], prefix, d->__nextchar); + + d->__nextchar = NULL; + d->optind++; + d->optopt = 0; + return '?'; + } + + /* Otherwise interpret it as a short option. */ + return -1; + } + + /* We have found a matching long option. Consume it. */ + d->optind++; + d->__nextchar = NULL; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + fprintf (stderr, + _("%s: option '%s%s' doesn't allow an argument\n"), + argv[0], prefix, pfound->name); + + d->optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + fprintf (stderr, + _("%s: option '%s%s' requires an argument\n"), + argv[0], prefix, pfound->name); + + d->optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; +} + +/* Initialize internal data upon the first call to getopt. */ static const char * _getopt_initialize (int argc _GL_UNUSED, - char **argv _GL_UNUSED, const char *optstring, - struct _getopt_data *d, int posixly_correct) + char **argv _GL_UNUSED, const char *optstring, + struct _getopt_data *d, int posixly_correct) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ + if (d->optind == 0) + d->optind = 1; d->__first_nonopt = d->__last_nonopt = d->optind; - d->__nextchar = NULL; - d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); - /* Determine how to handle the ordering of options and nonoptions. */ - if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; @@ -248,41 +402,12 @@ d->__ordering = REQUIRE_ORDER; ++optstring; } - else if (d->__posixly_correct) + else if (posixly_correct || !!getenv ("POSIXLY_CORRECT")) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; -#if defined _LIBC && defined USE_NONOPTION_FLAGS - if (!d->__posixly_correct - && argc == __libc_argc && argv == __libc_argv) - { - if (d->__nonoption_flags_max_len == 0) - { - if (__getopt_nonoption_flags == NULL - || __getopt_nonoption_flags[0] == '\0') - d->__nonoption_flags_max_len = -1; - else - { - const char *orig_str = __getopt_nonoption_flags; - int len = d->__nonoption_flags_max_len = strlen (orig_str); - if (d->__nonoption_flags_max_len < argc) - d->__nonoption_flags_max_len = argc; - __getopt_nonoption_flags = - (char *) malloc (d->__nonoption_flags_max_len); - if (__getopt_nonoption_flags == NULL) - d->__nonoption_flags_max_len = -1; - else - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), - '\0', d->__nonoption_flags_max_len - len); - } - } - d->__nonoption_flags_len = d->__nonoption_flags_max_len; - } - else - d->__nonoption_flags_len = 0; -#endif - + d->__initialized = 1; return optstring; } @@ -344,8 +469,8 @@ int _getopt_internal_r (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, - int long_only, struct _getopt_data *d, int posixly_correct) + const struct option *longopts, int *longind, + int long_only, struct _getopt_data *d, int posixly_correct) { int print_errors = d->opterr; @@ -355,461 +480,129 @@ d->optarg = NULL; if (d->optind == 0 || !d->__initialized) - { - if (d->optind == 0) - d->optind = 1; /* Don't scan ARGV[0], the program name. */ - optstring = _getopt_initialize (argc, argv, optstring, d, - posixly_correct); - d->__initialized = 1; - } + optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); else if (optstring[0] == '-' || optstring[0] == '+') optstring++; + if (optstring[0] == ':') print_errors = 0; - /* Test whether ARGV[optind] points to a non-option argument. - Either it does not have option syntax, or there is an environment flag - from the shell indicating it is not an option. The later information - is only used when the used in the GNU libc. */ -#if defined _LIBC && defined USE_NONOPTION_FLAGS -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ - || (d->optind < d->__nonoption_flags_len \ - && __getopt_nonoption_flags[d->optind] == '1')) -#else -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') -#endif + /* Test whether ARGV[optind] points to a non-option argument. */ +#define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been - moved back by the user (who may also have changed the arguments). */ + moved back by the user (who may also have changed the arguments). */ if (d->__last_nonopt > d->optind) - d->__last_nonopt = d->optind; + d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) - d->__first_nonopt = d->optind; + d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__last_nonopt != d->optind) - d->__first_nonopt = d->optind; - - /* Skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (d->optind < argc && NONOPTION_P) - d->optind++; - d->__last_nonopt = d->optind; - } + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange (argv, d); + else if (d->__last_nonopt != d->optind) + d->__first_nonopt = d->optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (d->optind < argc && NONOPTION_P) + d->optind++; + d->__last_nonopt = d->optind; + } /* The special ARGV-element '--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ if (d->optind != argc && !strcmp (argv[d->optind], "--")) - { - d->optind++; + { + d->optind++; - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__first_nonopt == d->__last_nonopt) - d->__first_nonopt = d->optind; - d->__last_nonopt = argc; + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange (argv, d); + else if (d->__first_nonopt == d->__last_nonopt) + d->__first_nonopt = d->optind; + d->__last_nonopt = argc; - d->optind = argc; - } + d->optind = argc; + } /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ + and back over any non-options that we skipped and permuted. */ if (d->optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (d->__first_nonopt != d->__last_nonopt) - d->optind = d->__first_nonopt; - return -1; - } + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (d->__first_nonopt != d->__last_nonopt) + d->optind = d->__first_nonopt; + return -1; + } /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ + either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) - { - if (d->__ordering == REQUIRE_ORDER) - return -1; - d->optarg = argv[d->optind++]; - return 1; - } + { + if (d->__ordering == REQUIRE_ORDER) + return -1; + d->optarg = argv[d->optind++]; + return 1; + } /* We have found another option-ARGV-element. - Skip the initial punctuation. */ + Check whether it might be a long option. */ + if (longopts) + { + if (argv[d->optind][1] == '-') + { + /* "--foo" is always a long option. The special option + "--" was handled above. */ + d->__nextchar = argv[d->optind] + 2; + return process_long_option (argc, argv, optstring, longopts, + longind, long_only, d, + print_errors, "--"); + } + + /* If long_only and the ARGV-element has the form "-f", + where f is a valid short option, don't consider it an + abbreviated form of a long option that starts with f. + Otherwise there would be no way to give the -f short + option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an + abbreviation of the long option, just like "--fu", and + not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + if (long_only && (argv[d->optind][2] + || !strchr (optstring, argv[d->optind][1]))) + { + int code; + d->__nextchar = argv[d->optind] + 1; + code = process_long_option (argc, argv, optstring, longopts, + longind, long_only, d, + print_errors, "-"); + if (code != -1) + return code; + } + } - d->__nextchar = (argv[d->optind] + 1 - + (longopts != NULL && argv[d->optind][1] == '-')); - } - - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". - - This distinction seems to be the most useful approach. */ - - if (longopts != NULL - && (argv[d->optind][1] == '-' - || (long_only && (argv[d->optind][2] - || !strchr (optstring, argv[d->optind][1]))))) - { - char *nameend; - unsigned int namelen; - const struct option *p; - const struct option *pfound = NULL; - struct option_list - { - const struct option *p; - struct option_list *next; - } *ambig_list = NULL; -#ifdef _LIBC -/* malloc() not used for _LIBC to simplify failure messages. */ -# define free_option_list(l) -#else -# define free_option_list(l) \ - while (l != NULL) \ - { \ - struct option_list *pn = l->next; \ - free (l); \ - l = pn; \ - } -#endif - int exact = 0; - int ambig = 0; - int indfound = -1; - int option_index; - - for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - namelen = nameend - d->__nextchar; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, namelen)) - { - if (namelen == (unsigned int) strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else if (ambig) - ; /* Taking simpler path to handling ambiguities. */ - else if (long_only - || pfound->has_arg != p->has_arg - || pfound->flag != p->flag - || pfound->val != p->val) - { - /* Second or later nonexact match found. */ -#ifdef _LIBC - struct option_list *newp = alloca (sizeof (*newp)); -#else - struct option_list *newp = malloc (sizeof (*newp)); - if (newp == NULL) - { - free_option_list (ambig_list); - ambig_list = NULL; - ambig = 1; /* Use simpler fallback message. */ - } - else -#endif - { - newp->p = p; - newp->next = ambig_list; - ambig_list = newp; - } - } - } - - if ((ambig || ambig_list) && !exact) - { - if (print_errors && ambig_list) - { - struct option_list first; - first.p = pfound; - first.next = ambig_list; - ambig_list = &first; - -#if defined _LIBC && defined USE_IN_LIBIO - char *buf = NULL; - size_t buflen = 0; - - FILE *fp = open_memstream (&buf, &buflen); - if (fp != NULL) - { - fprintf (fp, - _("%s: option '%s' is ambiguous; possibilities:"), - argv[0], argv[d->optind]); - - do - { - fprintf (fp, " '--%s'", ambig_list->p->name); - ambig_list = ambig_list->next; - } - while (ambig_list != NULL); - - fputc_unlocked ('\n', fp); - - if (__builtin_expect (fclose (fp) != EOF, 1)) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } - } -#else - fprintf (stderr, - _("%s: option '%s' is ambiguous; possibilities:"), - argv[0], argv[d->optind]); - do - { - fprintf (stderr, " '--%s'", ambig_list->p->name); - ambig_list = ambig_list->next; - } - while (ambig_list != NULL); - - fputc ('\n', stderr); -#endif - } - else if (print_errors && ambig) - { - fprintf (stderr, - _("%s: option '%s' is ambiguous\n"), - argv[0], argv[d->optind]); - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - d->optopt = 0; - free_option_list (ambig_list); - return '?'; - } - - free_option_list (ambig_list); - - if (pfound != NULL) - { - option_index = indfound; - d->optind++; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind - 1][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option '--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#else - fprintf (stderr, _("\ -%s: option '--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option '%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#else - fprintf (stderr, _("\ -%s: option '%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - - d->__nextchar += strlen (d->__nextchar); - - d->optopt = pfound->val; - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '--%s' requires an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option '--%s' requires an argument\n"), - argv[0], pfound->name); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optopt = pfound->val; - return optstring[0] == ':' ? ':' : '?'; - } - } - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - /* Can't find it as a long option. If this is not getopt_long_only, - or the option starts with '--' or is not a valid short - option, then it's an error. - Otherwise interpret it as a short option. */ - if (!long_only || argv[d->optind][1] == '-' - || strchr (optstring, *d->__nextchar) == NULL) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), - argv[0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option '--%s'\n"), - argv[0], d->__nextchar); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->__nextchar = (char *) ""; - d->optind++; - d->optopt = 0; - return '?'; - } + /* It is not a long option. Skip the initial punctuation. */ + d->__nextchar = argv[d->optind] + 1; } /* Look at and handle the next short option-character. */ @@ -824,331 +617,83 @@ if (temp == NULL || c == ':' || c == ';') { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), - argv[0], c); -#else - fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); -#endif - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->optopt = c; - return '?'; + if (print_errors) + fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); + d->optopt = c; + return '?'; } + /* Convenience. Treat POSIX -W foo same as long option --foo */ - if (temp[0] == 'W' && temp[1] == ';') + if (temp[0] == 'W' && temp[1] == ';' && longopts != NULL) { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound = 0; - int option_index; - - if (longopts == NULL) - goto no_longs; - - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - return c; - } - else - /* We already incremented 'd->optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - - /* optarg is now the argument, see if it's in the - table of longopts. */ - - for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; - nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) - { - if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else if (long_only - || pfound->has_arg != p->has_arg - || pfound->flag != p->flag - || pfound->val != p->val) - /* Second or later nonexact match found. */ - ambig = 1; - } - if (ambig && !exact) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), - argv[0], d->optarg) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), - argv[0], d->optarg); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - return '?'; - } - if (pfound != NULL) - { - option_index = indfound; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '-W %s' doesn't allow an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("\ -%s: option '-W %s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - - d->__nextchar += strlen (d->__nextchar); - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '-W %s' requires an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("\ -%s: option '-W %s' requires an argument\n"), - argv[0], pfound->name); -#endif - } - d->__nextchar += strlen (d->__nextchar); - return optstring[0] == ':' ? ':' : '?'; - } - } - else - d->optarg = NULL; - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - no_longs: - d->__nextchar = NULL; - return 'W'; /* Let the application handle it. */ + /* This is an option that requires an argument. */ + if (*d->__nextchar != '\0') + d->optarg = d->__nextchar; + else if (d->optind == argc) + { + if (print_errors) + fprintf (stderr, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c); + + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + d->optarg = argv[d->optind]; + + d->__nextchar = d->optarg; + d->optarg = NULL; + return process_long_option (argc, argv, optstring, longopts, longind, + 0 /* long_only */, d, print_errors, "-W "); } if (temp[1] == ':') { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - d->optind++; - } - else - d->optarg = NULL; - d->__nextchar = NULL; - } - else - { - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option requires an argument -- '%c'\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - } - else - /* We already incremented 'optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - d->__nextchar = NULL; - } + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else + d->optarg = NULL; + d->__nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + fprintf (stderr, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c); + + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented 'optind' once; + increment it again when taking next ARGV-elt as argument. */ + d->optarg = argv[d->optind++]; + d->__nextchar = NULL; + } } return c; } @@ -1156,8 +701,8 @@ int _getopt_internal (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, int long_only, - int posixly_correct) + const struct option *longopts, int *longind, int long_only, + int posixly_correct) { int result; @@ -1165,8 +710,8 @@ getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, - longind, long_only, &getopt_data, - posixly_correct); + longind, long_only, &getopt_data, + posixly_correct); optind = getopt_data.optind; optarg = getopt_data.optarg; @@ -1175,32 +720,23 @@ return result; } -/* glibc gets a LSB-compliant getopt. - Standalone applications get a POSIX-compliant getopt. */ -#if _LIBC -enum { POSIXLY_CORRECT = 0 }; -#else -enum { POSIXLY_CORRECT = 1 }; -#endif - -int -getopt (int argc, char *const *argv, const char *optstring) -{ - return _getopt_internal (argc, (char **) argv, optstring, - (const struct option *) 0, - (int *) 0, - 0, POSIXLY_CORRECT); -} +/* glibc gets a LSB-compliant getopt and a POSIX-complaint __posix_getopt. + Standalone applications just get a POSIX-compliant getopt. + POSIX and LSB both require these functions to take 'char *const *argv' + even though this is incorrect (because of the permutation). */ +#define GETOPT_ENTRY(NAME, POSIXLY_CORRECT) \ + int \ + NAME (int argc, char *const *argv, const char *optstring) \ + { \ + return _getopt_internal (argc, (char **)argv, optstring, \ + 0, 0, 0, POSIXLY_CORRECT); \ + } #ifdef _LIBC -int -__posix_getopt (int argc, char *const *argv, const char *optstring) -{ - return _getopt_internal (argc, argv, optstring, - (const struct option *) 0, - (int *) 0, - 0, 1); -} +GETOPT_ENTRY(getopt, 0) +GETOPT_ENTRY(__posix_getopt, 1) +#else +GETOPT_ENTRY(getopt, 1) #endif @@ -1221,51 +757,51 @@ c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) - break; + break; switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value '%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value '%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) - printf ("%s ", argv[optind++]); + printf ("%s ", argv[optind++]); printf ("\n"); } diff -Nru datamash-1.1.1/lib/getopt-cdefs.in.h datamash-1.2.0/lib/getopt-cdefs.in.h --- datamash-1.1.1/lib/getopt-cdefs.in.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/getopt-cdefs.in.h 2017-08-08 00:31:04.000000000 +0000 @@ -0,0 +1,67 @@ +/* getopt-on-non-glibc compatibility macros. + Copyright (C) 1989-2017 Free Software Foundation, Inc. + This file is part of gnulib. + Unlike most of the getopt implementation, it is NOT shared + with the GNU C Library. + + gnulib 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. + + gnulib 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 gnulib; if not, see + . */ + +#ifndef _GETOPT_CDEFS_H +#define _GETOPT_CDEFS_H 1 + +/* This header should not be used directly; include getopt.h or + unistd.h instead. It does not have a protective #error, because + the guard macro for getopt.h in gnulib is not fixed. */ + +/* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect + a number of the internal macros supplied to GNU libc's headers by + sys/cdefs.h. Provide fallback definitions for all of them. */ +#if @HAVE_SYS_CDEFS_H@ +# include +#endif + +#ifndef __BEGIN_DECLS +# ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# else +# define __BEGIN_DECLS /* nothing */ +# endif +#endif +#ifndef __END_DECLS +# ifdef __cplusplus +# define __END_DECLS } +# else +# define __END_DECLS /* nothing */ +# endif +#endif + +#ifndef __GNUC_PREREQ +# if defined __GNUC__ && defined __GNUC_VERSION__ +# define __GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +# else +# define __GNUC_PREREQ(maj, min) 0 +# endif +#endif + +#ifndef __THROW +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif + +#endif /* _GETOPT_CDEFS_H */ diff -Nru datamash-1.1.1/lib/getopt-core.h datamash-1.2.0/lib/getopt-core.h --- datamash-1.1.1/lib/getopt-core.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/getopt-core.h 2017-08-08 00:31:04.000000000 +0000 @@ -0,0 +1,96 @@ +/* Declarations for getopt (basic, portable features only). + Copyright (C) 1989-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library 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 GNU C Library 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 the GNU C Library; if not, see + . */ + +#ifndef _GETOPT_CORE_H +#define _GETOPT_CORE_H 1 + +/* This header should not be used directly; include getopt.h or + unistd.h instead. Unlike most bits headers, it does not have + a protective #error, because the guard macro for getopt.h in + gnulib is not fixed. */ + +__BEGIN_DECLS + +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when 'ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to 'getopt'. + + On entry to 'getopt', zero means this is the first call; initialize. + + When 'getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, 'optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message 'getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, 'optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in 'optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU 'getopt'. + + The argument '--' causes premature termination of argument + scanning, explicitly telling 'getopt' that there are no more + options. + + If OPTS begins with '-', then non-option arguments are treated as + arguments to the option '\1'. This behavior is specific to the GNU + 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in + the environment, then do not permute arguments. + + For standards compliance, the 'argv' argument has the type + char *const *, but this is inaccurate; if argument permutation is + enabled, the argv array (not the strings it points to) must be + writable. */ + +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW _GL_ARG_NONNULL ((2, 3)); + +__END_DECLS + +#endif /* _GETOPT_CORE_H */ diff -Nru datamash-1.1.1/lib/getopt-ext.h datamash-1.2.0/lib/getopt-ext.h --- datamash-1.1.1/lib/getopt-ext.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/getopt-ext.h 2017-08-08 00:31:04.000000000 +0000 @@ -0,0 +1,77 @@ +/* Declarations for getopt (GNU extensions). + Copyright (C) 1989-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library 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 GNU C Library 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 the GNU C Library; if not, see + . */ + +#ifndef _GETOPT_EXT_H +#define _GETOPT_EXT_H 1 + +/* This header should not be used directly; include getopt.h instead. + Unlike most bits headers, it does not have a protective #error, + because the guard macro for getopt.h in gnulib is not fixed. */ + +__BEGIN_DECLS + +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of 'struct option' terminated by an element containing a name which is + zero. + + The field 'has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field 'flag' is not NULL, it points to a variable that is set + to the value given in the field 'val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an 'int' to + a compiled-in constant, such as set a value from 'optarg', set the + option's 'flag' field to zero and its 'val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero 'flag' field, 'getopt' + returns the contents of the 'val' field. */ + +struct option +{ + const char *name; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the 'has_arg' field of 'struct option'. */ + +#define no_argument 0 +#define required_argument 1 +#define optional_argument 2 + +extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); +extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); + +__END_DECLS + +#endif /* _GETOPT_EXT_H */ diff -Nru datamash-1.1.1/lib/getopt.in.h datamash-1.2.0/lib/getopt.in.h --- datamash-1.1.1/lib/getopt.in.h 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/getopt.in.h 2017-08-08 00:31:04.000000000 +0000 @@ -1,20 +1,22 @@ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - 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. + Copyright (C) 1989-2017 Free Software Foundation, Inc. + This file is part of gnulib. + Unlike most of the getopt implementation, it is NOT shared + with the GNU C Library, which supplies a different version of + this file. + + gnulib 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. + + gnulib 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 . */ + You should have received a copy of the GNU General Public + License along with gnulib; if not, see . */ #ifndef _@GUARD_PREFIX@_GETOPT_H @@ -32,230 +34,28 @@ # undef _GL_SYSTEM_GETOPT #endif -#ifndef _@GUARD_PREFIX@_GETOPT_H - -#ifndef __need_getopt -# define _@GUARD_PREFIX@_GETOPT_H 1 -#endif +#define _@GUARD_PREFIX@_GETOPT_H 1 /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables - defined in this header. When this happens, include the - headers that might declare getopt so that they will not cause - confusion if included after this file (if the system had , - we have already included it). Then systematically rename - identifiers so that they do not collide with the system functions - and variables. Renaming avoids problems with some compilers and - linkers. */ + defined in getopt-core.h and getopt-ext.h. When this happens, + include the headers that might declare getopt so that they will not + cause confusion if included after this file (if the system had + , we have already included it). */ #if defined __GETOPT_PREFIX -# if !defined __need_getopt -# if !@HAVE_GETOPT_H@ -# define __need_system_stdlib_h -# include -# undef __need_system_stdlib_h -# include -# include -# endif -# undef __need_getopt -# endif -# undef __GETOPT_CONCAT -# undef __GETOPT_XCONCAT -# undef __GETOPT_ID -# undef getopt -# undef getopt_long -# undef getopt_long_only -# undef optarg -# undef opterr -# undef optind -# undef optopt -# undef option -# undef _getopt_internal -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# define getopt __GETOPT_ID (getopt) -# define getopt_long __GETOPT_ID (getopt_long) -# define getopt_long_only __GETOPT_ID (getopt_long_only) -# define optarg __GETOPT_ID (optarg) -# define opterr __GETOPT_ID (opterr) -# define optind __GETOPT_ID (optind) -# define optopt __GETOPT_ID (optopt) -# define option __GETOPT_ID (option) -# define _getopt_internal __GETOPT_ID (getopt_internal) -#endif - -/* Standalone applications get correct prototypes for getopt_long and - getopt_long_only; they declare "char **argv". libc uses prototypes - with "char *const *argv" that are incorrect because getopt_long and - getopt_long_only can permute argv; this is required for backward - compatibility (e.g., for LSB 2.0.1). - - This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', - but it caused redefinition warnings if both unistd.h and getopt.h were - included, since unistd.h includes getopt.h having previously defined - __need_getopt. - - The only place where __getopt_argv_const is used is in definitions - of getopt_long and getopt_long_only below, but these are visible - only if __need_getopt is not defined, so it is quite safe to rewrite - the conditional as follows: -*/ -#if !defined __need_getopt -# if defined __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -# else -# define __getopt_argv_const const -# endif -#endif - -/* If __GNU_LIBRARY__ is not already defined, either we are being used - standalone, or this is the first header included in the source file. - If we are being used with glibc, we need to include , but - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is - not defined, include , which will pull in for us - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it - doesn't flood the namespace with stuff the way some other headers do.) */ -#if !defined __GNU_LIBRARY__ -# include -#endif - -#ifndef __THROW -# ifndef __GNUC_PREREQ -# define __GNUC_PREREQ(maj, min) (0) -# endif -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW +# if !@HAVE_GETOPT_H@ +# define __need_system_stdlib_h +# include +# undef __need_system_stdlib_h +# include +# include # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from 'getopt' to the caller. - When 'getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to 'getopt'. - - On entry to 'getopt', zero means this is the first call; initialize. - - When 'getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message 'getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -#ifndef __need_getopt -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of 'struct option' terminated by an element containing a name which is - zero. - - The field 'has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field 'flag' is not NULL, it points to a variable that is set - to the value given in the field 'val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an 'int' to - a compiled-in constant, such as set a value from 'optarg', set the - option's 'flag' field to zero and its 'val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero 'flag' field, 'getopt' - returns the contents of the 'val' field. */ - -# if !GNULIB_defined_struct_option -struct option -{ - const char *name; - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; -# define GNULIB_defined_struct_option 1 -# endif +#include +#include +#include -/* Names for the values of the 'has_arg' field of 'struct option'. */ - -# define no_argument 0 -# define required_argument 1 -# define optional_argument 2 -#endif /* need getopt */ - - -/* Get definitions and prototypes for functions to process the - arguments in ARGV (ARGC of them, minus the program name) for - options given in OPTS. - - Return the option character from OPTS just read. Return -1 when - there are no more options. For unrecognized options, or options - missing arguments, 'optopt' is set to the option letter, and '?' is - returned. - - The OPTS string is a list of characters which are recognized option - letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in 'optarg'. - - If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU 'getopt'. - - The argument '--' causes premature termination of argument - scanning, explicitly telling 'getopt' that there are no more - options. - - If OPTS begins with '-', then non-option arguments are treated as - arguments to the option '\1'. This behavior is specific to the GNU - 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in - the environment, then do not permute arguments. */ - -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#ifndef __need_getopt -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#endif - -#ifdef __cplusplus -} -#endif - -/* Make sure we later can get all the definitions and declarations. */ -#undef __need_getopt - -#endif /* _@GUARD_PREFIX@_GETOPT_H */ #endif /* _@GUARD_PREFIX@_GETOPT_H */ diff -Nru datamash-1.1.1/lib/getopt_int.h datamash-1.2.0/lib/getopt_int.h --- datamash-1.1.1/lib/getopt_int.h 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/getopt_int.h 2017-08-08 00:31:04.000000000 +0000 @@ -1,30 +1,31 @@ /* Internal declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - 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. + Copyright (C) 1989-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library 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, + The GNU C Library 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. + 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 . */ + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ #ifndef _GETOPT_INT_H -#define _GETOPT_INT_H 1 +#define _GETOPT_INT_H 1 #include extern int _getopt_internal (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, int __posixly_correct); + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, int __posixly_correct); /* Reentrant versions which can handle parsing multiple argument @@ -32,28 +33,20 @@ /* Describe how to deal with options that follow non-option ARGV-elements. - If the caller did not specify anything, - the default is REQUIRE_ORDER if the environment variable - POSIXLY_CORRECT is defined, PERMUTE otherwise. - - REQUIRE_ORDER means don't recognize them as options; - stop option processing when the first non-option is seen. - This is what Unix does. - This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using '+' as the first character - of the list of option characters, or by calling getopt. - - PERMUTE is the default. We permute the contents of ARGV as we - scan, so that eventually all the non-options are at the end. - This allows options to be given in any order, even with programs - that were not written to expect this. + REQUIRE_ORDER means don't recognize them as options; stop option + processing when the first non-option is seen. This is what POSIX + specifies should happen. + + PERMUTE means permute the contents of ARGV as we scan, so that + eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written + to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option - with character code 1. Using '-' as the first character of the - list of option characters selects this mode of operation. + with character code 1. The special argument '--' forces an end of option-scanning regardless of the value of 'ordering'. In the case of RETURN_IN_ORDER, only @@ -91,11 +84,6 @@ /* See __ord above. */ enum __ord __ordering; - /* If the POSIXLY_CORRECT environment variable is set - or getopt was called. */ - int __posixly_correct; - - /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have @@ -104,32 +92,27 @@ int __first_nonopt; int __last_nonopt; - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - int __nonoption_flags_max_len; - int __nonoption_flags_len; -#endif }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ -#define _GETOPT_DATA_INITIALIZER { 1, 1 } +#define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, struct _getopt_data *__data, - int __posixly_correct); + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, struct _getopt_data *__data, + int __posixly_correct); extern int _getopt_long_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - struct _getopt_data *__data); + const char *__shortopts, + const struct option *__longopts, int *__longind, + struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind, - struct _getopt_data *__data); + const char *__shortopts, + const struct option *__longopts, + int *__longind, + struct _getopt_data *__data); #endif /* getopt_int.h */ diff -Nru datamash-1.1.1/lib/getopt-pfx-core.h datamash-1.2.0/lib/getopt-pfx-core.h --- datamash-1.1.1/lib/getopt-pfx-core.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/getopt-pfx-core.h 2017-08-22 19:23:19.000000000 +0000 @@ -0,0 +1,59 @@ +/* getopt (basic, portable features) gnulib wrapper header. + Copyright (C) 1989-2017 Free Software Foundation, Inc. + This file is part of gnulib. + Unlike most of the getopt implementation, it is NOT shared + with the GNU C Library. + + gnulib 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. + + gnulib 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 gnulib; if not, see + . */ + +#ifndef _GETOPT_PFX_CORE_H +#define _GETOPT_PFX_CORE_H 1 + +/* This header should not be used directly; include getopt.h or + unistd.h instead. It does not have a protective #error, because + the guard macro for getopt.h in gnulib is not fixed. */ + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in getopt-core.h and getopt-ext.h. Systematically + rename identifiers so that they do not collide with the system + functions and variables. Renaming avoids problems with some + compilers and linkers. */ +#ifdef __GETOPT_PREFIX +# ifndef __GETOPT_ID +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# endif +# undef getopt +# undef optarg +# undef opterr +# undef optind +# undef optopt +# define getopt __GETOPT_ID (getopt) +# define optarg __GETOPT_ID (optarg) +# define opterr __GETOPT_ID (opterr) +# define optind __GETOPT_ID (optind) +# define optopt __GETOPT_ID (optopt) + +/* The system's getopt.h may have already included getopt-core.h to + declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that + getopt-core.h declares them with prefixes. */ +# undef _GETOPT_CORE_H +#endif + +#include + +#endif /* _GETOPT_PFX_CORE_H */ diff -Nru datamash-1.1.1/lib/getopt-pfx-ext.h datamash-1.2.0/lib/getopt-pfx-ext.h --- datamash-1.1.1/lib/getopt-pfx-ext.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/getopt-pfx-ext.h 2017-08-22 19:23:19.000000000 +0000 @@ -0,0 +1,71 @@ +/* getopt (GNU extensions) gnulib wrapper header. + Copyright (C) 1989-2017 Free Software Foundation, Inc. + This file is part of gnulib. + Unlike most of the getopt implementation, it is NOT shared + with the GNU C Library. + + gnulib 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. + + gnulib 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 gnulib; if not, see + . */ + +#ifndef _GETOPT_PFX_EXT_H +#define _GETOPT_PFX_EXT_H 1 + +/* This header should not be used directly; include getopt.h instead. + It does not have a protective #error, because the guard macro for + getopt.h in gnulib is not fixed. */ + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in getopt-core.h and getopt-ext.h. Systematically + rename identifiers so that they do not collide with the system + functions and variables. Renaming avoids problems with some + compilers and linkers. */ +#ifdef __GETOPT_PREFIX +# ifndef __GETOPT_ID +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# endif +# undef getopt_long +# undef getopt_long_only +# undef option +# undef _getopt_internal +# define getopt_long __GETOPT_ID (getopt_long) +# define getopt_long_only __GETOPT_ID (getopt_long_only) +# define option __GETOPT_ID (option) +# define _getopt_internal __GETOPT_ID (getopt_internal) + +/* The system's getopt.h may have already included getopt-ext.h to + declare the unprefixed identifiers. Undef _GETOPT_EXT_H so that + getopt-ext.h declares them with prefixes. */ +# undef _GETOPT_EXT_H +#endif + +/* Standalone applications get correct prototypes for getopt_long and + getopt_long_only; they declare "char **argv". For backward + compatibility with old applications, if __GETOPT_PREFIX is not + defined, we supply GNU-libc-compatible, but incorrect, prototypes + using "char *const *argv". (GNU libc is stuck with the incorrect + prototypes, as they are baked into older versions of LSB.) */ +#ifndef __getopt_argv_const +# if defined __GETOPT_PREFIX +# define __getopt_argv_const /* empty */ +# else +# define __getopt_argv_const const +# endif +#endif + +#include + +#endif /* _GETOPT_PFX_EXT_H */ diff -Nru datamash-1.1.1/lib/gettext.h datamash-1.2.0/lib/gettext.h --- datamash-1.1.1/lib/gettext.h 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/gettext.h 2017-08-22 19:23:19.000000000 +0000 @@ -18,8 +18,9 @@ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS +/* NLS can be disabled through the configure --disable-nls option + or through "#define ENABLE NLS 0" before including this file. */ +#if defined ENABLE_NLS && ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include @@ -184,7 +185,8 @@ #include #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || __STDC_VERSION__ >= 199901L */ ) + /* || __STDC_VERSION__ == 199901L + || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ ) # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 #else # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 diff -Nru datamash-1.1.1/lib/gnulib.mk datamash-1.2.0/lib/gnulib.mk --- datamash-1.1.1/lib/gnulib.mk 2017-01-19 19:33:53.000000000 +0000 +++ datamash-1.2.0/lib/gnulib.mk 2017-08-22 23:17:28.000000000 +0000 @@ -25,6 +25,7 @@ MOSTLYCLEANFILES += lib/core lib/*.stackdump +# No GNU Make output. noinst_LIBRARIES += lib/libdatamash.a @@ -459,11 +460,11 @@ ## begin gnulib module getopt-posix -BUILT_SOURCES += $(GETOPT_H) +BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. -lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) +lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @@ -476,9 +477,18 @@ < $(top_srcdir)/lib/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ -MOSTLYCLEANFILES += lib/getopt.h lib/getopt.h-t -EXTRA_DIST += lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h +lib/getopt-cdefs.h: lib/getopt-cdefs.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ + < $(top_srcdir)/lib/getopt-cdefs.in.h; \ + } > $@-t && \ + mv -f $@-t $@ + +MOSTLYCLEANFILES += lib/getopt.h lib/getopt.h-t lib/getopt-cdefs.h lib/getopt-cdefs.h-t + +EXTRA_DIST += lib/getopt-cdefs.in.h lib/getopt-core.h lib/getopt-ext.h lib/getopt-pfx-core.h lib/getopt-pfx-ext.h lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h EXTRA_lib_libdatamash_a_SOURCES += lib/getopt.c lib/getopt1.c @@ -536,12 +546,11 @@ ## begin gnulib module gnumakefile +EXTRA_DIST += $(top_srcdir)/GNUmakefile distclean-local: clean-GNUmakefile clean-GNUmakefile: test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile -EXTRA_DIST += $(top_srcdir)/GNUmakefile - ## end gnulib module gnumakefile ## begin gnulib module gnupload @@ -633,19 +642,19 @@ ## begin gnulib module iconv_open -lib/iconv_open-aix.h: lib/iconv_open-aix.gperf +$(top_srcdir)/lib/iconv_open-aix.h: $(top_srcdir)/lib/iconv_open-aix.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-aix.gperf > $(top_srcdir)/lib/iconv_open-aix.h-t && \ mv $(top_srcdir)/lib/iconv_open-aix.h-t $(top_srcdir)/lib/iconv_open-aix.h -lib/iconv_open-hpux.h: lib/iconv_open-hpux.gperf +$(top_srcdir)/lib/iconv_open-hpux.h: $(top_srcdir)/lib/iconv_open-hpux.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-hpux.gperf > $(top_srcdir)/lib/iconv_open-hpux.h-t && \ mv $(top_srcdir)/lib/iconv_open-hpux.h-t $(top_srcdir)/lib/iconv_open-hpux.h -lib/iconv_open-irix.h: lib/iconv_open-irix.gperf +$(top_srcdir)/lib/iconv_open-irix.h: $(top_srcdir)/lib/iconv_open-irix.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-irix.gperf > $(top_srcdir)/lib/iconv_open-irix.h-t && \ mv $(top_srcdir)/lib/iconv_open-irix.h-t $(top_srcdir)/lib/iconv_open-irix.h -lib/iconv_open-osf.h: lib/iconv_open-osf.gperf +$(top_srcdir)/lib/iconv_open-osf.h: $(top_srcdir)/lib/iconv_open-osf.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-osf.gperf > $(top_srcdir)/lib/iconv_open-osf.h-t && \ mv $(top_srcdir)/lib/iconv_open-osf.h-t $(top_srcdir)/lib/iconv_open-osf.h -lib/iconv_open-solaris.h: lib/iconv_open-solaris.gperf +$(top_srcdir)/lib/iconv_open-solaris.h: $(top_srcdir)/lib/iconv_open-solaris.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-solaris.gperf > $(top_srcdir)/lib/iconv_open-solaris.h-t && \ mv $(top_srcdir)/lib/iconv_open-solaris.h-t $(top_srcdir)/lib/iconv_open-solaris.h BUILT_SOURCES += lib/iconv_open-aix.h lib/iconv_open-hpux.h lib/iconv_open-irix.h lib/iconv_open-osf.h lib/iconv_open-solaris.h @@ -1444,13 +1453,6 @@ ## end gnulib module random_r -## begin gnulib module readme-release - - -EXTRA_DIST += $(top_srcdir)/README-release - -## end gnulib module readme-release - ## begin gnulib module realloc-gnu @@ -1505,106 +1507,60 @@ ## begin gnulib module snippet/_Noreturn # Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all Makefile.am that +# gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. -_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h +_NORETURN_H=$(top_srcdir)/lib/_Noreturn.h -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h +EXTRA_DIST += lib/_Noreturn.h ## end gnulib module snippet/_Noreturn ## begin gnulib module snippet/arg-nonnull -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += lib/arg-nonnull.h -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut -# off. -lib/arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += lib/arg-nonnull.h lib/arg-nonnull.h-t +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all makefiles that +# need it. This is ensured by the applicability 'all' defined above. -ARG_NONNULL_H=lib/arg-nonnull.h +ARG_NONNULL_H=$(top_srcdir)/lib/arg-nonnull.h -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h +EXTRA_DIST += lib/arg-nonnull.h ## end gnulib module snippet/arg-nonnull ## begin gnulib module snippet/c++defs -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += lib/c++defs.h -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. -lib/c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/snippet/c++defs.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += lib/c++defs.h lib/c++defs.h-t +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all makefiles that +# need it. This is ensured by the applicability 'all' defined above. -CXXDEFS_H=lib/c++defs.h +CXXDEFS_H=$(top_srcdir)/lib/c++defs.h -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h +EXTRA_DIST += lib/c++defs.h ## end gnulib module snippet/c++defs ## begin gnulib module snippet/unused-parameter -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += lib/unused-parameter.h -# The unused-parameter.h that gets inserted into generated .h files is the same -# as build-aux/snippet/unused-parameter.h, except that it has the copyright -# header cut off. -lib/unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ - < $(top_srcdir)/build-aux/snippet/unused-parameter.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += lib/unused-parameter.h lib/unused-parameter.h-t +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all makefiles that +# need it. This is ensured by the applicability 'all' defined above. -UNUSED_PARAMETER_H=lib/unused-parameter.h +UNUSED_PARAMETER_H=$(top_srcdir)/lib/unused-parameter.h -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h +EXTRA_DIST += lib/unused-parameter.h ## end gnulib module snippet/unused-parameter ## begin gnulib module snippet/warn-on-use -BUILT_SOURCES += lib/warn-on-use.h -# The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut -# off. -lib/warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += lib/warn-on-use.h lib/warn-on-use.h-t +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all makefiles that +# need it. This is ensured by the applicability 'all' defined above. -WARN_ON_USE_H=lib/warn-on-use.h +WARN_ON_USE_H=$(top_srcdir)/lib/warn-on-use.h -EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h +EXTRA_DIST += lib/warn-on-use.h ## end gnulib module snippet/warn-on-use @@ -1939,6 +1895,7 @@ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ + -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ @@ -1957,6 +1914,7 @@ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ + -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ @@ -1969,10 +1927,12 @@ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ + -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ + -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ @@ -2088,6 +2048,7 @@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ + -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ @@ -2126,7 +2087,8 @@ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(top_srcdir)/lib/string.in.h | \ - sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ + sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \ + -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ @@ -2241,6 +2203,7 @@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ + -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ < $(top_srcdir)/lib/sys_types.in.h; \ } > $@-t && \ mv $@-t $@ @@ -2342,6 +2305,7 @@ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ + -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ @@ -2379,6 +2343,7 @@ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ + -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ @@ -2420,6 +2385,7 @@ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ + -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ @@ -2569,6 +2535,7 @@ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ + -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ @@ -2609,6 +2576,7 @@ -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ + -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ < $(top_srcdir)/lib/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ @@ -2648,6 +2616,7 @@ -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ + -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ @@ -2664,6 +2633,7 @@ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ + -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ @@ -2691,6 +2661,7 @@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ + -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ diff -Nru datamash-1.1.1/lib/intprops.h datamash-1.2.0/lib/intprops.h --- datamash-1.1.1/lib/intprops.h 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/intprops.h 2017-08-08 00:31:04.000000000 +0000 @@ -21,7 +21,6 @@ #define _GL_INTPROPS_H #include -#include /* Return a value with the common real type of E and V and the value of V. */ #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) @@ -80,24 +79,7 @@ /* This include file assumes that signed types are two's complement without padding bits; the above macros have undefined behavior otherwise. If this is a problem for you, please let us know how to fix it for your host. - As a sanity check, test the assumption for some signed types that - bounds. */ -verify (TYPE_MINIMUM (signed char) == SCHAR_MIN); -verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX); -verify (TYPE_MINIMUM (short int) == SHRT_MIN); -verify (TYPE_MAXIMUM (short int) == SHRT_MAX); -verify (TYPE_MINIMUM (int) == INT_MIN); -verify (TYPE_MAXIMUM (int) == INT_MAX); -verify (TYPE_MINIMUM (long int) == LONG_MIN); -verify (TYPE_MAXIMUM (long int) == LONG_MAX); -#ifdef LLONG_MAX -verify (TYPE_MINIMUM (long long int) == LLONG_MIN); -verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); -#endif -/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ -#ifdef UINT_WIDTH -verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); -#endif + This assumption is tested by the intprops-tests module. */ /* Does the __typeof__ keyword work? This could be done by 'configure', but for now it's easier to do it by hand. */ @@ -237,7 +219,11 @@ : (max) >> (b) < (a)) /* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ -#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__) +#if 5 <= __GNUC__ && !defined __ICC +# define _GL_HAS_BUILTIN_OVERFLOW 1 +#else +# define _GL_HAS_BUILTIN_OVERFLOW 0 +#endif /* True if __builtin_add_overflow_p (A, B, C) works. */ #define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) @@ -389,10 +375,10 @@ (_Generic \ (*(r), \ signed char: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ signed char, SCHAR_MIN, SCHAR_MAX), \ short int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ short int, SHRT_MIN, SHRT_MAX), \ int: \ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ @@ -406,10 +392,10 @@ #else # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ (sizeof *(r) == sizeof (signed char) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ signed char, SCHAR_MIN, SCHAR_MAX) \ : sizeof *(r) == sizeof (short int) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ short int, SHRT_MIN, SHRT_MAX) \ : sizeof *(r) == sizeof (int) \ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ @@ -431,9 +417,8 @@ /* Store the low-order bits of A B into *R, where the operation is given by OP. Use the unsigned type UT for calculation to avoid - overflow problems. *R's type is T, with extremal values TMIN and - TMAX. T must be a signed integer type. Return 1 if the result - overflows. */ + overflow problems. *R's type is T, with extrema TMIN and TMAX. + T must be a signed integer type. Return 1 if the result overflows. */ #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ (sizeof ((a) op (b)) < sizeof (t) \ ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \ @@ -442,17 +427,27 @@ ((overflow (a, b) \ || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ || (tmax) < ((a) op (b))) \ - ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \ - : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0)) + ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \ + : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0)) + +/* Return the low-order bits of A B, where the operation is given + by OP. Use the unsigned type UT for calculation to avoid undefined + behavior on signed integer overflow, and convert the result to type T. + UT is at least as wide as T and is no narrower than unsigned int, + T is two's complement, and there is no padding or trap representations. + Assume that converting UT to T yields the low-order bits, as is + done in all known two's-complement C compilers. E.g., see: + https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html + + According to the C standard, converting UT to T yields an + implementation-defined result or signal for values outside T's + range. However, code that works around this theoretical problem + runs afoul of a compiler bug in Oracle Studio 12.3 x86. See: + http://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00049.html + As the compiler bug is real, don't try to work around the + theoretical problem. */ -/* Return A B, where the operation is given by OP. Use the - unsigned type UT for calculation to avoid overflow problems. - Convert the result to type T without overflow by subtracting TMIN - from large values before converting, and adding it afterwards. - Compilers can optimize all the operations except OP. */ -#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \ - (((ut) (a) op (ut) (b)) <= (tmax) \ - ? (t) ((ut) (a) op (ut) (b)) \ - : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin))) +#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \ + ((t) ((ut) (a) op (ut) (b))) #endif /* _GL_INTPROPS_H */ diff -Nru datamash-1.1.1/lib/limits.in.h datamash-1.2.0/lib/limits.in.h --- datamash-1.1.1/lib/limits.in.h 2017-01-10 20:00:58.000000000 +0000 +++ datamash-1.2.0/lib/limits.in.h 2017-05-03 21:43:34.000000000 +0000 @@ -28,6 +28,17 @@ #ifndef _@GUARD_PREFIX@_LIMITS_H #define _@GUARD_PREFIX@_LIMITS_H +/* For HP-UX 11.31. */ +#if defined LONG_LONG_MIN && !defined LLONG_MIN +# define LLONG_MIN LONG_LONG_MIN +#endif +#if defined LONG_LONG_MAX && !defined LLONG_MAX +# define LLONG_MAX LONG_LONG_MAX +#endif +#if defined ULONG_LONG_MAX && !defined ULLONG_MAX +# define ULLONG_MAX ULONG_LONG_MAX +#endif + /* The number of usable bits in an unsigned or signed integer type with minimum value MIN and maximum value MAX, as an int expression suitable in #if. Cover all known practical hosts. This diff -Nru datamash-1.1.1/lib/localcharset.c datamash-1.2.0/lib/localcharset.c --- datamash-1.1.1/lib/localcharset.c 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/localcharset.c 2017-08-08 00:31:05.000000000 +0000 @@ -32,7 +32,7 @@ # define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ #endif -#if defined _WIN32 || defined __WIN32__ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define WINDOWS_NATIVE # include #endif @@ -75,6 +75,7 @@ # include "relocatable.h" #else # define relocate(pathname) (pathname) +# define relocate2(pathname,allocatedp) (*(allocatedp) = NULL, (pathname)) #endif /* Get LIBDIR. */ @@ -129,6 +130,7 @@ if (cp == NULL) { #if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2) + char *malloc_dir = NULL; const char *dir; const char *base = "charset.alias"; char *file_name; @@ -137,7 +139,7 @@ necessary for running the testsuite before "make install". */ dir = getenv ("CHARSETALIASDIR"); if (dir == NULL || dir[0] == '\0') - dir = relocate (LIBDIR); + dir = relocate2 (LIBDIR, &malloc_dir); /* Concatenate dir and base into freshly allocated file_name. */ { @@ -154,6 +156,8 @@ } } + free (malloc_dir); + if (file_name == NULL) /* Out of memory. Treat the file as empty. */ cp = ""; diff -Nru datamash-1.1.1/lib/malloca.c datamash-1.2.0/lib/malloca.c --- datamash-1.1.1/lib/malloca.c 2017-01-10 20:00:59.000000000 +0000 +++ datamash-1.2.0/lib/malloca.c 2017-08-22 19:23:20.000000000 +0000 @@ -25,6 +25,16 @@ #include "verify.h" +/* Silence a warning from clang's MemorySanitizer. */ +#if defined __has_feature +# if __has_feature(memory_sanitizer) +# define NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory"))) +# endif +#endif +#ifndef NO_SANITIZE_MEMORY +# define NO_SANITIZE_MEMORY +#endif + /* The speed critical point in this file is freea() applied to an alloca() result: it must be fast, to match the speed of alloca(). The speed of mmalloca() and freea() in the other case are not critical, because they @@ -112,7 +122,7 @@ } #if HAVE_ALLOCA -void +void NO_SANITIZE_MEMORY freea (void *p) { /* mmalloca() may have returned NULL. */ diff -Nru datamash-1.1.1/lib/math.in.h datamash-1.2.0/lib/math.in.h --- datamash-1.1.1/lib/math.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/math.in.h 2017-08-22 19:23:20.000000000 +0000 @@ -28,6 +28,11 @@ #ifndef _@GUARD_PREFIX@_MATH_H #define _@GUARD_PREFIX@_MATH_H +/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ +#if defined __VMS && ! defined NAN +# include +#endif + #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif diff -Nru datamash-1.1.1/lib/mbrtowc.c datamash-1.2.0/lib/mbrtowc.c --- datamash-1.1.1/lib/mbrtowc.c 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/mbrtowc.c 2017-08-08 00:31:05.000000000 +0000 @@ -35,6 +35,13 @@ # include "streq.h" # include "verify.h" +#ifndef FALLTHROUGH +# if __GNUC__ < 7 +# define FALLTHROUGH ((void) 0) +# else +# define FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif +#endif verify (sizeof (mbstate_t) >= 4); @@ -74,10 +81,10 @@ break; case 3: buf[2] = pstate[3]; - /*FALLTHROUGH*/ + FALLTHROUGH; case 2: buf[1] = pstate[2]; - /*FALLTHROUGH*/ + FALLTHROUGH; case 1: buf[0] = pstate[1]; p = buf; diff -Nru datamash-1.1.1/lib/mbsinit.c datamash-1.2.0/lib/mbsinit.c --- datamash-1.1.1/lib/mbsinit.c 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/mbsinit.c 2017-08-08 00:31:05.000000000 +0000 @@ -22,17 +22,7 @@ #include "verify.h" -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - -/* On native Windows, 'mbstate_t' is defined as 'int'. */ - -int -mbsinit (const mbstate_t *ps) -{ - return ps == NULL || *ps == 0; -} - -#else +#if GNULIB_defined_mbstate_t /* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() and wcrtomb(), wcsrtombs(). @@ -45,6 +35,7 @@ We define the meaning of mbstate_t as follows: - In mb -> wc direction, mbstate_t's first byte contains the number of buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. + See mbrtowc.c. - In wc -> mb direction, mbstate_t contains no information. In other words, it is always in the initial state. */ @@ -58,4 +49,25 @@ return pstate == NULL || pstate[0] == 0; } +#else + +int +mbsinit (const mbstate_t *ps) +{ +# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* Native Windows. */ +# ifdef __MINGW32__ + /* On mingw, 'mbstate_t' is defined as 'int'. */ + return ps == NULL || *ps == 0; +# else + /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter. */ + return ps == NULL || *(const unsigned int *)ps == 0; +# endif +# else + /* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */ + /* Maybe this definition works, maybe not... */ + return ps == NULL || *(const char *)ps == 0; +# endif +} + #endif diff -Nru datamash-1.1.1/lib/md5.c datamash-1.2.0/lib/md5.c --- datamash-1.1.1/lib/md5.c 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/md5.c 2017-05-03 21:43:34.000000000 +0000 @@ -246,7 +246,8 @@ md5_process_block (ctx->buffer, ctx->buflen & ~63, ctx); ctx->buflen &= 63; - /* The regions in the following copy operation cannot overlap. */ + /* The regions in the following copy operation cannot overlap, + because ctx->buflen < 64 ≤ (left_over + add) & ~63. */ memcpy (ctx->buffer, &((char *) ctx->buffer)[(left_over + add) & ~63], ctx->buflen); @@ -288,6 +289,8 @@ { md5_process_block (ctx->buffer, 64, ctx); left_over -= 64; + /* The regions in the following copy operation cannot overlap, + because left_over ≤ 64. */ memcpy (ctx->buffer, &ctx->buffer[16], left_over); } ctx->buflen = left_over; diff -Nru datamash-1.1.1/lib/md5.h datamash-1.2.0/lib/md5.h --- datamash-1.1.1/lib/md5.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/md5.h 2017-05-03 21:43:34.000000000 +0000 @@ -74,8 +74,8 @@ uint32_t D; uint32_t total[2]; - uint32_t buflen; - uint32_t buffer[32]; + uint32_t buflen; /* ≥ 0, ≤ 128 */ + uint32_t buffer[32]; /* 128 bytes; the first buflen bytes are in use */ }; /* diff -Nru datamash-1.1.1/lib/msvc-nothrow.c datamash-1.2.0/lib/msvc-nothrow.c --- datamash-1.1.1/lib/msvc-nothrow.c 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/msvc-nothrow.c 2017-08-08 00:31:05.000000000 +0000 @@ -24,7 +24,9 @@ #define WIN32_LEAN_AND_MEAN #include -#include "msvc-inval.h" +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +# include "msvc-inval.h" +#endif #undef _get_osfhandle diff -Nru datamash-1.1.1/lib/_Noreturn.h datamash-1.2.0/lib/_Noreturn.h --- datamash-1.1.1/lib/_Noreturn.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/_Noreturn.h 2017-05-03 21:43:30.000000000 +0000 @@ -0,0 +1,10 @@ +#if !defined _Noreturn && __STDC_VERSION__ < 201112 +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif diff -Nru datamash-1.1.1/lib/quotearg.c datamash-1.2.0/lib/quotearg.c --- datamash-1.1.1/lib/quotearg.c 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/quotearg.c 2017-08-22 19:23:20.000000000 +0000 @@ -54,6 +54,14 @@ #define INT_BITS (sizeof (int) * CHAR_BIT) +#ifndef FALLTHROUGH +# if __GNUC__ < 7 +# define FALLTHROUGH ((void) 0) +# else +# define FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif +#endif + struct quoting_options { /* Basic quoting style. */ @@ -310,7 +318,7 @@ case c_maybe_quoting_style: quoting_style = c_quoting_style; elide_outer_quotes = true; - /* Fall through. */ + FALLTHROUGH; case c_quoting_style: if (!elide_outer_quotes) STORE ('"'); @@ -365,14 +373,14 @@ case shell_escape_quoting_style: backslash_escapes = true; - /* Fall through. */ + FALLTHROUGH; case shell_quoting_style: elide_outer_quotes = true; - /* Fall through. */ + FALLTHROUGH; case shell_escape_always_quoting_style: if (!elide_outer_quotes) backslash_escapes = true; - /* Fall through. */ + FALLTHROUGH; case shell_always_quoting_style: quoting_style = shell_always_quoting_style; if (!elide_outer_quotes) @@ -505,7 +513,7 @@ if (quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; - /* Fall through. */ + /* fall through */ c_escape: if (backslash_escapes) { @@ -517,14 +525,14 @@ case '{': case '}': /* sometimes special if isolated */ if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1)) break; - /* Fall through. */ + FALLTHROUGH; case '#': case '~': if (i != 0) break; - /* Fall through. */ + FALLTHROUGH; case ' ': c_and_shell_quote_compat = true; - /* Fall through. */ + FALLTHROUGH; case '!': /* special in bash */ case '"': case '$': case '&': case '(': case ')': case '*': case ';': diff -Nru datamash-1.1.1/lib/sha1.c datamash-1.2.0/lib/sha1.c --- datamash-1.1.1/lib/sha1.c 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/sha1.c 2017-05-03 21:43:35.000000000 +0000 @@ -233,7 +233,8 @@ sha1_process_block (ctx->buffer, ctx->buflen & ~63, ctx); ctx->buflen &= 63; - /* The regions in the following copy operation cannot overlap. */ + /* The regions in the following copy operation cannot overlap, + because ctx->buflen < 64 ≤ (left_over + add) & ~63. */ memcpy (ctx->buffer, &((char *) ctx->buffer)[(left_over + add) & ~63], ctx->buflen); @@ -275,6 +276,8 @@ { sha1_process_block (ctx->buffer, 64, ctx); left_over -= 64; + /* The regions in the following copy operation cannot overlap, + because left_over ≤ 64. */ memcpy (ctx->buffer, &ctx->buffer[16], left_over); } ctx->buflen = left_over; diff -Nru datamash-1.1.1/lib/sha1.h datamash-1.2.0/lib/sha1.h --- datamash-1.1.1/lib/sha1.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/sha1.h 2017-05-03 21:43:35.000000000 +0000 @@ -46,8 +46,8 @@ uint32_t E; uint32_t total[2]; - uint32_t buflen; - uint32_t buffer[32]; + uint32_t buflen; /* ≥ 0, ≤ 128 */ + uint32_t buffer[32]; /* 128 bytes; the first buflen bytes are in use */ }; /* Initialize structure containing state of computation. */ diff -Nru datamash-1.1.1/lib/sha256.c datamash-1.2.0/lib/sha256.c --- datamash-1.1.1/lib/sha256.c 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/sha256.c 2017-05-03 21:43:35.000000000 +0000 @@ -366,7 +366,8 @@ sha256_process_block (ctx->buffer, ctx->buflen & ~63, ctx); ctx->buflen &= 63; - /* The regions in the following copy operation cannot overlap. */ + /* The regions in the following copy operation cannot overlap, + because ctx->buflen < 64 ≤ (left_over + add) & ~63. */ memcpy (ctx->buffer, &((char *) ctx->buffer)[(left_over + add) & ~63], ctx->buflen); @@ -408,6 +409,8 @@ { sha256_process_block (ctx->buffer, 64, ctx); left_over -= 64; + /* The regions in the following copy operation cannot overlap, + because left_over ≤ 64. */ memcpy (ctx->buffer, &ctx->buffer[16], left_over); } ctx->buflen = left_over; diff -Nru datamash-1.1.1/lib/sha256.h datamash-1.2.0/lib/sha256.h --- datamash-1.1.1/lib/sha256.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/sha256.h 2017-05-03 21:43:35.000000000 +0000 @@ -44,8 +44,8 @@ uint32_t state[8]; uint32_t total[2]; - size_t buflen; - uint32_t buffer[32]; + size_t buflen; /* ≥ 0, ≤ 128 */ + uint32_t buffer[32]; /* 128 bytes; the first buflen bytes are in use */ }; /* Initialize structure containing state of computation. */ diff -Nru datamash-1.1.1/lib/sha512.c datamash-1.2.0/lib/sha512.c --- datamash-1.1.1/lib/sha512.c 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/sha512.c 2017-05-03 21:43:35.000000000 +0000 @@ -374,7 +374,8 @@ sha512_process_block (ctx->buffer, ctx->buflen & ~127, ctx); ctx->buflen &= 127; - /* The regions in the following copy operation cannot overlap. */ + /* The regions in the following copy operation cannot overlap, + because ctx->buflen < 128 ≤ (left_over + add) & ~127. */ memcpy (ctx->buffer, &((char *) ctx->buffer)[(left_over + add) & ~127], ctx->buflen); @@ -416,6 +417,8 @@ { sha512_process_block (ctx->buffer, 128, ctx); left_over -= 128; + /* The regions in the following copy operation cannot overlap, + because left_over ≤ 128. */ memcpy (ctx->buffer, &ctx->buffer[16], left_over); } ctx->buflen = left_over; diff -Nru datamash-1.1.1/lib/sha512.h datamash-1.2.0/lib/sha512.h --- datamash-1.1.1/lib/sha512.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/sha512.h 2017-05-03 21:43:35.000000000 +0000 @@ -44,8 +44,8 @@ u64 state[8]; u64 total[2]; - size_t buflen; - u64 buffer[32]; + size_t buflen; /* ≥ 0, ≤ 256 */ + u64 buffer[32]; /* 256 bytes; the first buflen bytes are in use */ }; /* Initialize structure containing state of computation. */ diff -Nru datamash-1.1.1/lib/stdalign.in.h datamash-1.2.0/lib/stdalign.in.h --- datamash-1.1.1/lib/stdalign.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/stdalign.in.h 2017-05-03 21:43:35.000000000 +0000 @@ -103,7 +103,7 @@ # elif ((defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ : __GNUC__) \ - || 061200 <= __HP_cc || 061200 <= __HP_aCC \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) # define _Alignas(a) __attribute__ ((__aligned__ (a))) # elif 1300 <= _MSC_VER diff -Nru datamash-1.1.1/lib/stdint.in.h datamash-1.2.0/lib/stdint.in.h --- datamash-1.1.1/lib/stdint.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/stdint.in.h 2017-05-03 21:43:35.000000000 +0000 @@ -128,8 +128,13 @@ Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ -# define _STDINT_MIN(signed, bits, zero) \ - ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero)) +/* These are separate macros, because if you try to merge these macros into + a single one, HP-UX cc rejects the resulting expression in constant + expressions. */ +# define _STDINT_UNSIGNED_MIN(bits, zero) \ + (zero) +# define _STDINT_SIGNED_MIN(bits, zero) \ + (~ _STDINT_MAX (1, bits, zero)) # define _STDINT_MAX(signed, bits, zero) \ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) @@ -512,15 +517,15 @@ # undef PTRDIFF_MAX # if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 -# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) +# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else -# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) +# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif # else # define PTRDIFF_MIN \ - _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) + _STDINT_SIGNED_MIN (@BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # endif @@ -528,9 +533,13 @@ /* sig_atomic_t limits */ # undef SIG_ATOMIC_MIN # undef SIG_ATOMIC_MAX -# define SIG_ATOMIC_MIN \ - _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) +# if @HAVE_SIGNED_SIG_ATOMIC_T@ +# define SIG_ATOMIC_MIN \ + _STDINT_SIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) +# else +# define SIG_ATOMIC_MIN \ + _STDINT_UNSIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) +# endif # define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) @@ -566,16 +575,26 @@ # endif # undef WCHAR_MIN # undef WCHAR_MAX -# define WCHAR_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) +# if @HAVE_SIGNED_WCHAR_T@ +# define WCHAR_MIN \ + _STDINT_SIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) +# else +# define WCHAR_MIN \ + _STDINT_UNSIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) +# endif # define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ # undef WINT_MIN # undef WINT_MAX -# define WINT_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +# if @HAVE_SIGNED_WINT_T@ +# define WINT_MIN \ + _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +# else +# define WINT_MIN \ + _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +# endif # define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) diff -Nru datamash-1.1.1/lib/stdio-impl.h datamash-1.2.0/lib/stdio-impl.h --- datamash-1.1.1/lib/stdio-impl.h 2017-01-10 20:00:58.000000000 +0000 +++ datamash-1.2.0/lib/stdio-impl.h 2017-08-22 19:23:20.000000000 +0000 @@ -99,6 +99,8 @@ int _file; \ unsigned int _flag; \ } *) fp) +# elif defined __VMS /* OpenVMS */ +# define fp_ ((struct _iobuf *) fp) # else # define fp_ fp # endif diff -Nru datamash-1.1.1/lib/stdio.in.h datamash-1.2.0/lib/stdio.in.h --- datamash-1.1.1/lib/stdio.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/stdio.in.h 2017-08-22 19:23:20.000000000 +0000 @@ -111,9 +111,9 @@ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -/* Solaris 10 declares renameat in , not in . */ +/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ /* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ +#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ && ! defined __GLIBC__ # include #endif diff -Nru datamash-1.1.1/lib/stdlib.in.h datamash-1.2.0/lib/stdlib.in.h --- datamash-1.1.1/lib/stdlib.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/stdlib.in.h 2017-08-22 19:23:20.000000000 +0000 @@ -597,7 +597,7 @@ #endif #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ +# if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@ _GL_FUNCDECL_SYS (initstate, char *, (unsigned int seed, char *buf, size_t buf_size) _GL_ARG_NONNULL ((2))); @@ -614,7 +614,7 @@ #endif #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ +# if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); @@ -765,6 +765,23 @@ "use gnulib module realloc-posix for portability"); #endif + +#if @GNULIB_REALLOCARRAY@ +# if ! @HAVE_REALLOCARRAY@ +_GL_FUNCDECL_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# endif +_GL_CXXALIAS_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIASWARN (reallocarray); +#elif defined GNULIB_POSIXCHECK +# undef reallocarray +# if HAVE_RAW_DECL_REALLOCARRAY +_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " + "use gnulib module reallocarray for portability"); +# endif +#endif + #if @GNULIB_REALPATH@ # if @REPLACE_REALPATH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff -Nru datamash-1.1.1/lib/stdnoreturn.in.h datamash-1.2.0/lib/stdnoreturn.in.h --- datamash-1.1.1/lib/stdnoreturn.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/stdnoreturn.in.h 2017-08-22 19:23:20.000000000 +0000 @@ -28,15 +28,25 @@ /* The definition of _Noreturn is copied here. */ -#if 1200 <= _MSC_VER -/* Standard include files on this platform contain declarations like - "__declspec (noreturn) void abort (void);". "#define noreturn - _Noreturn" would cause this declaration to be rewritten to the - invalid "__declspec (__declspec (noreturn)) void abort (void);". - Instead, define noreturn to empty, so that such declarations are - rewritten to "__declspec () void abort (void);", which is - equivalent to "void abort (void);"; this gives up on noreturn's - advice to the compiler but at least it is valid code. */ +#if 1200 <= _MSC_VER || defined __CYGWIN__ +/* On MSVC, standard include files contain declarations like + __declspec (noreturn) void abort (void); + "#define noreturn _Noreturn" would cause this declaration to be rewritten + to the invalid + __declspec (__declspec (noreturn)) void abort (void); + + Similarly, on Cygwin, standard include files contain declarations like + void __cdecl abort (void) __attribute__ ((noreturn)); + "#define noreturn _Noreturn" would cause this declaration to be rewritten + to the invalid + void __cdecl abort (void) __attribute__ ((__attribute__ ((__noreturn__)))); + + Instead, define noreturn to empty, so that such declarations are rewritten to + __declspec () void abort (void); + or + void __cdecl abort (void) __attribute__ (()); + respectively. This gives up on noreturn's advice to the compiler but at + least it is valid code. */ # define noreturn /*empty*/ #else # define noreturn _Noreturn diff -Nru datamash-1.1.1/lib/string.in.h datamash-1.2.0/lib/string.in.h --- datamash-1.1.1/lib/string.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/string.in.h 2017-08-22 19:23:20.000000000 +0000 @@ -74,6 +74,23 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ +/* Clear a block of memory. The compiler will not delete a call to + this function, even if the block is dead after the call. */ +#if @GNULIB_EXPLICIT_BZERO@ +# if ! @HAVE_EXPLICIT_BZERO@ +_GL_FUNCDECL_SYS (explicit_bzero, void, + (void *__dest, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n)); +_GL_CXXALIASWARN (explicit_bzero); +#elif defined GNULIB_POSIXCHECK +# undef explicit_bzero +# if HAVE_RAW_DECL_EXPLICIT_BZERO +_GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " + "use gnulib module explicit_bzero for portability"); +# endif +#endif + /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSL@ # if !@HAVE_FFSL@ diff -Nru datamash-1.1.1/lib/sys_types.in.h datamash-1.2.0/lib/sys_types.in.h --- datamash-1.1.1/lib/sys_types.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/sys_types.in.h 2017-08-08 00:31:05.000000000 +0000 @@ -42,6 +42,48 @@ # define _GL_WINDOWS_64_BIT_OFF_T 1 #endif +/* Override dev_t and ino_t if distinguishable inodes support is requested + on native Windows. */ +#if @WINDOWS_STAT_INODES@ + +# if @WINDOWS_STAT_INODES@ == 2 +/* Experimental, not useful in Windows 10. */ + +/* Define dev_t to a 64-bit type. */ +# if !defined GNULIB_defined_dev_t +typedef unsigned long long int rpl_dev_t; +# undef dev_t +# define dev_t rpl_dev_t +# define GNULIB_defined_dev_t 1 +# endif + +/* Define ino_t to a 128-bit type. */ +# if !defined GNULIB_defined_ino_t +/* MSVC does not have a 128-bit integer type. + GCC has a 128-bit integer type __int128, but only on 64-bit targets. */ +typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t; +# undef ino_t +# define ino_t rpl_ino_t +# define GNULIB_defined_ino_t 1 +# endif + +# else /* @WINDOWS_STAT_INODES@ == 1 */ + +/* Define ino_t to a 64-bit type. */ +# if !defined GNULIB_defined_ino_t +typedef unsigned long long int rpl_ino_t; +# undef ino_t +# define ino_t rpl_ino_t +# define GNULIB_defined_ino_t 1 +# endif + +# endif + +/* Indicator, for gnulib internal purposes. */ +# define _GL_WINDOWS_STAT_INODES @WINDOWS_STAT_INODES@ + +#endif + /* MSVC 9 defines size_t in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ diff -Nru datamash-1.1.1/lib/unistd.in.h datamash-1.2.0/lib/unistd.in.h --- datamash-1.1.1/lib/unistd.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/unistd.in.h 2017-08-08 00:31:05.000000000 +0000 @@ -127,11 +127,18 @@ # include #endif +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT -# define __need_getopt -# include +# include +# include #endif #ifndef _GL_INLINE_HEADER_BEGIN @@ -142,13 +149,6 @@ # define _GL_UNISTD_INLINE _GL_INLINE #endif -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - /* Hide some function declarations from . */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ @@ -1456,6 +1456,36 @@ # endif #endif + +#if @GNULIB_TRUNCATE@ +/* Change the size of the file designated by FILENAME to become equal to LENGTH. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if @REPLACE_TRUNCATE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef truncate +# define truncate rpl_truncate +# endif +_GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); +# else +# if !@HAVE_TRUNCATE@ +_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); +# endif +_GL_CXXALIASWARN (truncate); +#elif defined GNULIB_POSIXCHECK +# undef truncate +# if HAVE_RAW_DECL_TRUNCATE +_GL_WARN_ON_USE (truncate, "truncate is unportable - " + "use gnulib module truncate for portability"); +# endif +#endif + #if @GNULIB_TTYNAME_R@ /* Store at most BUFLEN characters of the pathname of the terminal FD is diff -Nru datamash-1.1.1/lib/unistr/u8-uctomb-aux.c datamash-1.2.0/lib/unistr/u8-uctomb-aux.c --- datamash-1.1.1/lib/unistr/u8-uctomb-aux.c 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/unistr/u8-uctomb-aux.c 2017-08-08 00:31:05.000000000 +0000 @@ -20,6 +20,14 @@ /* Specification. */ #include "unistr.h" +#ifndef FALLTHROUGH +# if __GNUC__ < 7 +# define FALLTHROUGH ((void) 0) +# else +# define FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif +#endif + int u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n) { @@ -48,9 +56,9 @@ switch (count) /* note: code falls through cases! */ { case 4: s[3] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x10000; - /* fallthrough */ + FALLTHROUGH; case 3: s[2] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x800; - /* fallthrough */ + FALLTHROUGH; case 2: s[1] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0xc0; /*case 1:*/ s[0] = uc; } diff -Nru datamash-1.1.1/lib/unused-parameter.h datamash-1.2.0/lib/unused-parameter.h --- datamash-1.1.1/lib/unused-parameter.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/unused-parameter.h 2017-05-03 21:43:30.000000000 +0000 @@ -0,0 +1,36 @@ +/* A C macro for declaring that specific function parameters are not used. + Copyright (C) 2008-2017 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 . */ + +/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter + declarations for parameters that are not used. This helps to reduce + warnings, such as from GCC -Wunused-parameter. The syntax is as follows: + type param _GL_UNUSED_PARAMETER + or more generally + param_decl _GL_UNUSED_PARAMETER + For example: + int param _GL_UNUSED_PARAMETER + int *(*param)(void) _GL_UNUSED_PARAMETER + Other possible, but obscure and discouraged syntaxes: + int _GL_UNUSED_PARAMETER *(*param)(void) + _GL_UNUSED_PARAMETER int *(*param)(void) + */ +#ifndef _GL_UNUSED_PARAMETER +# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) +# else +# define _GL_UNUSED_PARAMETER +# endif +#endif diff -Nru datamash-1.1.1/lib/verify.h datamash-1.2.0/lib/verify.h --- datamash-1.1.1/lib/verify.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/verify.h 2017-05-03 21:43:35.000000000 +0000 @@ -248,7 +248,12 @@ /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ -#define verify(R) _GL_VERIFY (R, "verify (" #R ")") +#ifdef __GNUC__ +# define verify(R) _GL_VERIFY (R, "verify (" #R ")") +#else +/* PGI barfs if R is long. Play it safe. */ +# define verify(R) _GL_VERIFY (R, "verify (...)") +#endif #ifndef __has_builtin # define __has_builtin(x) 0 diff -Nru datamash-1.1.1/lib/warn-on-use.h datamash-1.2.0/lib/warn-on-use.h --- datamash-1.1.1/lib/warn-on-use.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/lib/warn-on-use.h 2017-05-03 21:43:30.000000000 +0000 @@ -0,0 +1,109 @@ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2017 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 . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + This macro is useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. However, one of the reasons that a function is a + portability trap is if it has the wrong signature. Declaring + FUNCTION with a different signature in C is a compilation error, so + this macro must use the same type as any existing declaration so + that programs that avoid the problematic FUNCTION do not fail to + compile merely because they included a header that poisoned the + function. But this implies that _GL_WARN_ON_USE is only safe to + use if FUNCTION is known to already have a declaration. Use of + this macro implies that there must not be any other macro hiding + the declaration of FUNCTION; but undefining FUNCTION first is part + of the poisoning process anyway (although for symbols that are + provided only via a macro, the result is a compilation error rather + than a warning containing "literal string"). Also note that in + C++, it is only safe to use if FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char ***rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") + is like _GL_WARN_ON_USE (function, "string"), except that the function is + declared with the given prototype, consisting of return type, parameters, + and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif diff -Nru datamash-1.1.1/lib/wchar.in.h datamash-1.2.0/lib/wchar.in.h --- datamash-1.1.1/lib/wchar.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/wchar.in.h 2017-08-08 00:31:05.000000000 +0000 @@ -113,12 +113,16 @@ # define WEOF -1 # endif #else -/* mingw and MSVC define wint_t as 'unsigned short' in . - This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be - "unchanged by default argument promotions". Override it. */ +/* mingw and MSVC define wint_t as 'unsigned short' in or + . This is too small: ISO C 99 section 7.24.1.(2) says that + wint_t must be "unchanged by default argument promotions". Override it. */ # if @GNULIB_OVERRIDES_WINT_T@ # if !GNULIB_defined_wint_t -# include +# if @HAVE_CRTDEFS_H@ +# include +# else +# include +# endif typedef unsigned int rpl_wint_t; # undef wint_t # define wint_t rpl_wint_t @@ -1035,6 +1039,38 @@ # endif #endif + +/* Convert *TP to a date and time wide string. See + . */ +#if @GNULIB_WCSFTIME@ +# if @REPLACE_WCSFTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsftime +# define wcsftime rpl_wcsftime +# endif +_GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, + const wchar_t *__fmt, const struct tm *__tp) + _GL_ARG_NONNULL ((1, 3, 4))); +_GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, + const wchar_t *__fmt, const struct tm *__tp)); +# else +# if !@HAVE_WCSFTIME@ +_GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, + const wchar_t *__fmt, const struct tm *__tp) + _GL_ARG_NONNULL ((1, 3, 4))); +# endif +_GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, + const wchar_t *__fmt, const struct tm *__tp)); +# endif +_GL_CXXALIASWARN (wcsftime); +#elif defined GNULIB_POSIXCHECK +# undef wcsftime +# if HAVE_RAW_DECL_WCSFTIME +_GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " + "use gnulib module wcsftime for portability"); +# endif +#endif + #endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif /* _@GUARD_PREFIX@_WCHAR_H */ diff -Nru datamash-1.1.1/lib/wctype.in.h datamash-1.2.0/lib/wctype.in.h --- datamash-1.1.1/lib/wctype.in.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/wctype.in.h 2017-08-08 00:31:05.000000000 +0000 @@ -56,11 +56,13 @@ # include #endif -/* mingw has declarations of towupper and towlower in as - well . Include in advance to avoid rpl_ prefix - being added to the declarations. */ -#ifdef __MINGW32__ +/* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and + isw* functions in , as well as in . Include + , in advance to avoid rpl_ prefix being added to the + declarations. */ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include +# include #endif /* Include the original if it exists. @@ -105,12 +107,16 @@ # define WEOF -1 # endif #else -/* mingw and MSVC define wint_t as 'unsigned short' in . - This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be - "unchanged by default argument promotions". Override it. */ +/* mingw and MSVC define wint_t as 'unsigned short' in or + . This is too small: ISO C 99 section 7.24.1.(2) says that + wint_t must be "unchanged by default argument promotions". Override it. */ # if @GNULIB_OVERRIDES_WINT_T@ # if !GNULIB_defined_wint_t -# include +# if @HAVE_CRTDEFS_H@ +# include +# else +# include +# endif typedef unsigned int rpl_wint_t; # undef wint_t # define wint_t rpl_wint_t diff -Nru datamash-1.1.1/lib/xalloc.h datamash-1.2.0/lib/xalloc.h --- datamash-1.1.1/lib/xalloc.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/xalloc.h 2017-08-08 00:31:05.000000000 +0000 @@ -194,6 +194,8 @@ n = DEFAULT_MXFAST / s; n += !n; } + if (xalloc_oversized (n, s)) + xalloc_die (); } else { diff -Nru datamash-1.1.1/lib/xalloc-oversized.h datamash-1.2.0/lib/xalloc-oversized.h --- datamash-1.1.1/lib/xalloc-oversized.h 2017-01-10 20:01:00.000000000 +0000 +++ datamash-1.2.0/lib/xalloc-oversized.h 2017-08-22 19:23:20.000000000 +0000 @@ -44,7 +44,7 @@ #if 7 <= __GNUC__ # define xalloc_oversized(n, s) \ __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) -#elif 5 <= __GNUC__ && !__STRICT_ANSI__ +#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ # define xalloc_oversized(n, s) \ (__builtin_constant_p (n) && __builtin_constant_p (s) \ ? __xalloc_oversized (n, s) \ diff -Nru datamash-1.1.1/m4/calloc.m4 datamash-1.2.0/m4/calloc.m4 --- datamash-1.1.1/m4/calloc.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/calloc.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# calloc.m4 serial 16 +# calloc.m4 serial 17 # Copyright (C) 2004-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -40,6 +40,8 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; + # Guess yes on native Windows. + mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;; # If we don't know, assume the worst. *) ac_cv_func_calloc_0_nonnull="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/ceill.m4 datamash-1.2.0/m4/ceill.m4 --- datamash-1.1.1/m4/ceill.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/ceill.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# ceill.m4 serial 14 +# ceill.m4 serial 16 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,6 +9,7 @@ m4_divert_text([DEFAULTS], [gl_ceill_required=plain]) AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Persuade glibc to declare ceill(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) @@ -25,7 +26,6 @@ fi m4_ifdef([gl_FUNC_CEILL_IEEE], [ if test $gl_ceill_required = ieee && test $REPLACE_CEILL = 0; then - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether ceill works according to ISO C 99 with IEC 60559], [gl_cv_func_ceill_ieee], [ @@ -54,6 +54,8 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_ceill_ieee="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_ceill_ieee="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_ceill_ieee="guessing no" ;; esac @@ -83,10 +85,13 @@ long double d = 0.3L;]], [[return (!(ceill (d) == 1)); ]])], [gl_cv_func_ceill_buggy=no], [gl_cv_func_ceill_buggy=yes], - [case $host_os in - openbsd*) gl_cv_func_ceill_buggy="guessing yes";; - *) gl_cv_func_ceill_buggy="guessing no";; - esac]) + [case "$host_os" in + openbsd*) gl_cv_func_ceill_buggy="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_ceill_buggy="guessing no" ;; + *) gl_cv_func_ceill_buggy="guessing no" ;; + esac + ]) LIBS="$save_LIBS" ]) case "$gl_cv_func_ceill_buggy" in diff -Nru datamash-1.1.1/m4/ceil.m4 datamash-1.2.0/m4/ceil.m4 --- datamash-1.1.1/m4/ceil.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/ceil.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# ceil.m4 serial 9 +# ceil.m4 serial 10 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -48,6 +48,8 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_ceil_ieee="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_ceil_ieee="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_ceil_ieee="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/expl.m4 datamash-1.2.0/m4/expl.m4 --- datamash-1.1.1/m4/expl.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/expl.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# expl.m4 serial 8 +# expl.m4 serial 10 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,6 +8,7 @@ [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Persuade glibc to declare expl(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) @@ -70,9 +71,12 @@ isnan(expl(-0.4)); ]])], [gl_cv_func_expl_buggy=no], [gl_cv_func_expl_buggy=yes], [case $host_os in - openbsd*) gl_cv_func_expl_buggy="guessing yes";; - *) gl_cv_func_expl_buggy="guessing no";; - esac]) + openbsd*) gl_cv_func_expl_buggy="guessing yes" ;; + # Guess no on native Windows. + mingw*) gl_cv_func_expl_buggy="guessing no" ;; + *) gl_cv_func_expl_buggy="guessing no" ;; + esac + ]) LIBS="$save_LIBS" ]) case "$gl_cv_func_expl_buggy" in diff -Nru datamash-1.1.1/m4/exponentl.m4 datamash-1.2.0/m4/exponentl.m4 --- datamash-1.1.1/m4/exponentl.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/exponentl.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# exponentl.m4 serial 3 +# exponentl.m4 serial 4 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,7 @@ AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION], [ AC_REQUIRE([gl_BIGENDIAN]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([where to find the exponent in a 'long double'], [gl_cv_cc_long_double_expbit0], [ @@ -79,9 +80,24 @@ [gl_cv_cc_long_double_expbit0=`cat conftest.out`], [gl_cv_cc_long_double_expbit0="unknown"], [ - dnl When cross-compiling, we don't know. It depends on the + dnl When cross-compiling, in general we don't know. It depends on the dnl ABI and compiler version. There are too many cases. gl_cv_cc_long_double_expbit0="unknown" + case "$host_os" in + mingw*) # On native Windows (little-endian), we know the result + # in two cases: mingw, MSVC. + AC_EGREP_CPP([Known], [ +#ifdef __MINGW32__ + Known +#endif + ], [gl_cv_cc_long_double_expbit0="word 2 bit 0"]) + AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], [gl_cv_cc_long_double_expbit0="word 1 bit 20"]) + ;; + esac ]) rm -f conftest.out ]) diff -Nru datamash-1.1.1/m4/extensions.m4 datamash-1.2.0/m4/extensions.m4 --- datamash-1.1.1/m4/extensions.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/extensions.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# serial 15 -*- Autoconf -*- +# serial 17 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc. @@ -68,6 +68,14 @@ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif +/* Enable NetBSD extensions on NetBSD. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD extensions on NetBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -128,6 +136,8 @@ AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_GNU_SOURCE]) + AC_DEFINE([_NETBSD_SOURCE]) + AC_DEFINE([_OPENBSD_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) diff -Nru datamash-1.1.1/m4/fabsl.m4 datamash-1.2.0/m4/fabsl.m4 --- datamash-1.1.1/m4/fabsl.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/fabsl.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# fabsl.m4 serial 2 +# fabsl.m4 serial 3 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -66,8 +66,10 @@ [gl_cv_func_fabsl_works=yes], [gl_cv_func_fabsl_works=no], [case "$host_os" in - irix*) gl_cv_func_fabsl_works="guessing no";; - *) gl_cv_func_fabsl_works="guessing yes";; + irix*) gl_cv_func_fabsl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_fabsl_works="guessing yes" ;; + *) gl_cv_func_fabsl_works="guessing yes" ;; esac ]) ]) diff -Nru datamash-1.1.1/m4/fcntl-o.m4 datamash-1.2.0/m4/fcntl-o.m4 --- datamash-1.1.1/m4/fcntl-o.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/fcntl-o.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# fcntl-o.m4 serial 4 +# fcntl-o.m4 serial 5 dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -18,6 +18,7 @@ [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], [AC_REQUIRE([AC_GNU_SOURCE])]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_FUNCS_ONCE([symlink]) AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], @@ -116,7 +117,13 @@ 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac], - [gl_cv_header_working_fcntl_h=cross-compiling])]) + [case "$host_os" in + # Guess 'no' on native Windows. + mingw*) gl_cv_header_working_fcntl_h='no' ;; + *) gl_cv_header_working_fcntl_h=cross-compiling ;; + esac + ]) + ]) case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( diff -Nru datamash-1.1.1/m4/float_h.m4 datamash-1.2.0/m4/float_h.m4 --- datamash-1.1.1/m4/float_h.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/float_h.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# float_h.m4 serial 9 +# float_h.m4 serial 11 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ aix* | beos* | openbsd* | mirbsd* | irix*) FLOAT_H=float.h ;; - freebsd*) + freebsd* | dragonfly*) case "$host_cpu" in changequote(,)dnl i[34567]86 ) @@ -42,7 +42,7 @@ ;; esac case "$host_os" in - aix* | freebsd* | linux*) + aix* | freebsd* | dragonfly* | linux*) if test -n "$FLOAT_H"; then REPLACE_FLOAT_LDBL=1 fi @@ -76,7 +76,9 @@ [gl_cv_func_itold_works="guessing no"], [gl_cv_func_itold_works="guessing yes"]) ;; - *) gl_cv_func_itold_works="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_itold_works="guessing yes" ;; + *) gl_cv_func_itold_works="guessing yes" ;; esac ]) ]) diff -Nru datamash-1.1.1/m4/floor.m4 datamash-1.2.0/m4/floor.m4 --- datamash-1.1.1/m4/floor.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/floor.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# floor.m4 serial 8 +# floor.m4 serial 9 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -44,6 +44,8 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_floor_ieee="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_floor_ieee="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_floor_ieee="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/frexpl.m4 datamash-1.2.0/m4/frexpl.m4 --- datamash-1.1.1/m4/frexpl.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/frexpl.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# frexpl.m4 serial 20 +# frexpl.m4 serial 21 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -131,7 +131,7 @@ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif -#if defined __i386__ && defined __FreeBSD__ +#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif diff -Nru datamash-1.1.1/m4/frexp.m4 datamash-1.2.0/m4/frexp.m4 --- datamash-1.1.1/m4/frexp.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/frexp.m4 2017-08-22 19:23:20.000000000 +0000 @@ -1,4 +1,4 @@ -# frexp.m4 serial 15 +# frexp.m4 serial 16 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -164,8 +164,17 @@ [gl_cv_func_frexp_works=yes], [gl_cv_func_frexp_works=no], [case "$host_os" in - netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; - *) gl_cv_func_frexp_works="guessing yes";; + netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;; + mingw*) # Guess yes with MSVC, no with mingw. + AC_EGREP_CPP([Good], [ +#ifdef _MSC_VER + Good +#endif + ], + [gl_cv_func_frexp_works="guessing yes"], + [gl_cv_func_frexp_works="guessing no"]) + ;; + *) gl_cv_func_frexp_works="guessing yes" ;; esac ]) ]) diff -Nru datamash-1.1.1/m4/getopt.m4 datamash-1.2.0/m4/getopt.m4 --- datamash-1.1.1/m4/getopt.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/getopt.m4 2017-08-08 00:31:06.000000000 +0000 @@ -1,4 +1,4 @@ -# getopt.m4 serial 44 +# getopt.m4 serial 46 dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -32,9 +32,16 @@ # getopt_long_only. AC_DEFUN([gl_FUNC_GETOPT_GNU], [ + dnl Set the variable gl_getopt_required, so that all invocations of + dnl gl_GETOPT_CHECK_HEADERS in the scope of the current configure file + dnl will check for getopt with GNU extensions. + dnl This means that if one gnulib-tool invocation requests getopt-posix + dnl and another gnulib-tool invocation requests getopt-gnu, it is as if + dnl both had requested getopt-gnu. m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) - AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) + dnl No need to invoke gl_FUNC_GETOPT_POSIX here; this is automatically + dnl done through the module dependency getopt-gnu -> getopt-posix. ]) # Determine whether to replace the entire getopt facility. @@ -354,15 +361,19 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], [ - GETOPT_H=getopt.h + AC_CHECK_HEADERS_ONCE([sys/cdefs.h]) + if test $ac_cv_header_sys_cdefs_h = yes; then + HAVE_SYS_CDEFS_H=1 + else + HAVE_SYS_CDEFS_H=0 + fi + AC_SUBST([HAVE_SYS_CDEFS_H]) + AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], [Define to rpl_ if the getopt replacement functions and variables should be used.]) + GETOPT_H=getopt.h + GETOPT_CDEFS_H=getopt-cdefs.h AC_SUBST([GETOPT_H]) -]) - -# Prerequisites of lib/getopt*. -AC_DEFUN([gl_PREREQ_GETOPT], -[ - AC_CHECK_DECLS_ONCE([getenv]) + AC_SUBST([GETOPT_CDEFS_H]) ]) diff -Nru datamash-1.1.1/m4/gnulib-common.m4 datamash-1.2.0/m4/gnulib-common.m4 --- datamash-1.1.1/m4/gnulib-common.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/gnulib-common.m4 2017-05-03 21:43:36.000000000 +0000 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 36 +# gnulib-common.m4 serial 38 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -256,7 +256,8 @@ dnl library formats. In particular, the GNU binutils programs ar and ranlib dnl produce libraries that work only with gcc, not with cc. AC_REQUIRE([AC_PROG_CC]) - AC_BEFORE([$0], [AM_PROG_AR]) + dnl The '][' hides this use from 'aclocal'. + AC_BEFORE([$0], [A][M_PROG_AR]) AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], [ AC_EGREP_CPP([Amsterdam], @@ -288,7 +289,9 @@ dnl __ACK__. It may seem like its easier to avoid calling the macro here, dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good dnl default value and automake should usually know them). - m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:]) + dnl + dnl The '][' hides this use from 'aclocal'. + m4_ifdef([A][M_PROG_AR], [A][M_PROG_AR], [:]) fi dnl In case the code above has not helped with setting AR/ARFLAGS, use @@ -456,7 +459,9 @@ else ac_cv_path_SED=$SED fi + ]) SED="$ac_cv_path_SED" AC_SUBST([SED])dnl rm -f conftest.sed -])])]) +]) +]) diff -Nru datamash-1.1.1/m4/gnulib-comp.m4 datamash-1.2.0/m4/gnulib-comp.m4 --- datamash-1.1.1/m4/gnulib-comp.m4 2017-01-10 20:38:43.000000000 +0000 +++ datamash-1.2.0/m4/gnulib-comp.m4 2017-08-08 00:31:16.000000000 +0000 @@ -337,19 +337,13 @@ fi gl_MATH_MODULE_INDICATOR([frexpl]) gl_FUNC_GETOPT_GNU - if test $REPLACE_GETOPT = 1; then - AC_LIBOBJ([getopt]) - AC_LIBOBJ([getopt1]) - gl_PREREQ_GETOPT - dnl Arrange for unistd.h to include getopt.h. - GNULIB_GL_UNISTD_H_GETOPT=1 - fi - AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) + dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required + dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are + dnl done in the getopt-posix module. gl_FUNC_GETOPT_POSIX if test $REPLACE_GETOPT = 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) - gl_PREREQ_GETOPT dnl Arrange for unistd.h to include getopt.h. GNULIB_GL_UNISTD_H_GETOPT=1 fi @@ -511,6 +505,7 @@ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then AC_LIBOBJ([msvc-nothrow]) fi + gl_MODULE_INDICATOR([msvc-nothrow]) gl_MULTIARCH dnl Run our hack near the end, just before config.status creation. dnl It must happen late, i.e., after gl_LIBOBJS has been finalized. @@ -818,19 +813,16 @@ build-aux/pmccabe.css build-aux/pmccabe2html build-aux/prefix-gnulib-mk - build-aux/snippet/_Noreturn.h - build-aux/snippet/arg-nonnull.h - build-aux/snippet/c++defs.h - build-aux/snippet/unused-parameter.h - build-aux/snippet/warn-on-use.h build-aux/update-copyright build-aux/useless-if-before-free build-aux/vc-list-files doc/fdl.texi doc/gendocs_template doc/gendocs_template_min + lib/_Noreturn.h lib/alloca.in.h lib/anytostr.c + lib/arg-nonnull.h lib/assure.h lib/base64.c lib/base64.h @@ -838,6 +830,7 @@ lib/basename.c lib/bitrotate.c lib/bitrotate.h + lib/c++defs.h lib/c-ctype.c lib/c-ctype.h lib/c-strcase.h @@ -875,6 +868,11 @@ lib/fpucw.h lib/frexp.c lib/frexpl.c + lib/getopt-cdefs.in.h + lib/getopt-core.h + lib/getopt-ext.h + lib/getopt-pfx-core.h + lib/getopt-pfx-ext.h lib/getopt.c lib/getopt.in.h lib/getopt1.c @@ -1031,9 +1029,11 @@ lib/uniwidth/cjk.h lib/uniwidth/width.c lib/unlocked-io.h + lib/unused-parameter.h lib/verify.h lib/version-etc.c lib/version-etc.h + lib/warn-on-use.h lib/wchar.in.h lib/wctype-h.c lib/wctype.in.h diff -Nru datamash-1.1.1/m4/iconv.m4 datamash-1.2.0/m4/iconv.m4 --- datamash-1.1.1/m4/iconv.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/iconv.m4 2017-08-08 00:31:06.000000000 +0000 @@ -1,5 +1,5 @@ -# iconv.m4 serial 20 -dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. +# iconv.m4 serial 21 +dnl Copyright (C) 2000-2002, 2007-2014, 2016-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -167,15 +167,27 @@ #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } return result; ]])], [am_cv_func_iconv_works=yes], , diff -Nru datamash-1.1.1/m4/include_next.m4 datamash-1.2.0/m4/include_next.m4 --- datamash-1.1.1/m4/include_next.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/include_next.m4 2017-08-08 00:31:06.000000000 +0000 @@ -1,4 +1,4 @@ -# include_next.m4 serial 23 +# include_next.m4 serial 24 dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,8 @@ dnl From Paul Eggert and Derek Price. -dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. +dnl Sets INCLUDE_NEXT, INCLUDE_NEXT_AS_FIRST_DIRECTIVE, PRAGMA_SYSTEM_HEADER, +dnl and PRAGMA_COLUMNS. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl 'include' otherwise. diff -Nru datamash-1.1.1/m4/isfinite.m4 datamash-1.2.0/m4/isfinite.m4 --- datamash-1.1.1/m4/isfinite.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/isfinite.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# isfinite.m4 serial 15 +# isfinite.m4 serial 16 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -143,7 +143,14 @@ #endif return result; -}]])], [gl_cv_func_isfinitel_works=yes], [gl_cv_func_isfinitel_works=no], - [gl_cv_func_isfinitel_works="guessing yes"]) +}]])], + [gl_cv_func_isfinitel_works=yes], + [gl_cv_func_isfinitel_works=no], + [case "$host_os" in + # Guess no on native Windows. + mingw*) gl_cv_func_isfinitel_works="guessing no" ;; + *) gl_cv_func_isfinitel_works="guessing yes" ;; + esac + ]) ]) ]) diff -Nru datamash-1.1.1/m4/isinf.m4 datamash-1.2.0/m4/isinf.m4 --- datamash-1.1.1/m4/isinf.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/isinf.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# isinf.m4 serial 11 +# isinf.m4 serial 12 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -150,7 +150,23 @@ #endif return result; -}]])], [gl_cv_func_isinfl_works=yes], [gl_cv_func_isinfl_works=no], - [gl_cv_func_isinfl_works="guessing yes"]) +}]])], + [gl_cv_func_isinfl_works=yes], + [gl_cv_func_isinfl_works=no], + [case "$host_os" in + mingw*) # Guess yes on mingw, no on MSVC. + AC_EGREP_CPP([Known], [ +#ifdef __MINGW32__ + Known +#endif + ], + [gl_cv_func_isinfl_works="guessing yes"], + [gl_cv_func_isinfl_works="guessing no"]) + ;; + *) + gl_cv_func_isinfl_works="guessing yes" + ;; + esac + ]) ]) ]) diff -Nru datamash-1.1.1/m4/isnanf.m4 datamash-1.2.0/m4/isnanf.m4 --- datamash-1.1.1/m4/isnanf.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/isnanf.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# isnanf.m4 serial 14 +# isnanf.m4 serial 15 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -180,8 +180,17 @@ [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no], [case "$host_os" in - irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; - *) gl_cv_func_isnanf_works="guessing yes";; + irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;; + mingw*) # Guess yes on mingw, no on MSVC. + AC_EGREP_CPP([Known], [ +#ifdef __MINGW32__ + Known +#endif + ], + [gl_cv_func_isnanf_works="guessing yes"], + [gl_cv_func_isnanf_works="guessing no"]) + ;; + *) gl_cv_func_isnanf_works="guessing yes" ;; esac ]) ]) diff -Nru datamash-1.1.1/m4/isnanl.m4 datamash-1.2.0/m4/isnanl.m4 --- datamash-1.1.1/m4/isnanl.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/isnanl.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# isnanl.m4 serial 19 +# isnanl.m4 serial 20 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -231,6 +231,18 @@ }]])], [gl_cv_func_isnanl_works=yes], [gl_cv_func_isnanl_works=no], - [gl_cv_func_isnanl_works="guessing yes"]) + [case "$host_os" in + mingw*) # Guess yes on mingw, no on MSVC. + AC_EGREP_CPP([Known], [ +#ifdef __MINGW32__ + Known +#endif + ], + [gl_cv_func_isnanl_works="guessing yes"], + [gl_cv_func_isnanl_works="guessing no"]) + ;; + *) gl_cv_func_isnanl_works="guessing yes" ;; + esac + ]) ]) ]) diff -Nru datamash-1.1.1/m4/ldexpl.m4 datamash-1.2.0/m4/ldexpl.m4 --- datamash-1.1.1/m4/ldexpl.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/ldexpl.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# ldexpl.m4 serial 16 +# ldexpl.m4 serial 17 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -124,8 +124,10 @@ [ changequote(,)dnl case "$host_os" in - aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";; - *) gl_cv_func_ldexpl_works="guessing yes";; + aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_ldexpl_works="guessing yes" ;; + *) gl_cv_func_ldexpl_works="guessing yes" ;; esac changequote([,])dnl ]) diff -Nru datamash-1.1.1/m4/lib-ld.m4 datamash-1.2.0/m4/lib-ld.m4 --- datamash-1.1.1/m4/lib-ld.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/lib-ld.m4 2017-05-03 21:43:36.000000000 +0000 @@ -1,4 +1,4 @@ -# lib-ld.m4 serial 6 +# lib-ld.m4 serial 7 dnl Copyright (C) 1996-2003, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -47,73 +47,101 @@ } fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. +if test -n "$LD"; then + AC_MSG_CHECKING([for ld]) +elif test "$GCC" = yes; then AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` - while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi -AC_CACHE_VAL([acl_cv_path_LD], -[if test -z "$LD"; then - acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$acl_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 &5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; esac fi - done - IFS="$acl_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_cv_path_LD" + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 Solaris 64-bit Developer's Guide > The Development Environment - dnl . - dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." - dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the - dnl symlink is missing, so we set acl_libdirstem2 too. - AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], - [AC_EGREP_CPP([sixtyfour bits], [ + dnl Allow the user to override the result by setting acl_cv_libdirstems. + AC_CACHE_CHECK([for the common suffixes of directories in the library search path], + [acl_cv_libdirstems], + [acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif - ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) - ]) - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) + ]) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + dnl The result is a property of the system. However, non-system + dnl compilers sometimes have odd library search paths. Therefore + dnl prefer asking /usr/bin/gcc, if available, rather than $CC. + searchpath=`(if test -f /usr/bin/gcc \ + && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ + LC_ALL=C /usr/bin/gcc -print-search-dirs; \ + else \ + LC_ALL=C $CC -print-search-dirs; \ + fi) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" + ]) + # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` ]) diff -Nru datamash-1.1.1/m4/mbrtowc.m4 datamash-1.2.0/m4/mbrtowc.m4 --- datamash-1.1.1/m4/mbrtowc.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/mbrtowc.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# mbrtowc.m4 serial 27 -*- coding: utf-8 -*- +# mbrtowc.m4 serial 29 -*- coding: utf-8 -*- dnl Copyright (C) 2001-2002, 2004-2005, 2008-2017 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -563,9 +563,11 @@ dnl is present. changequote(,)dnl case "$host_os" in - # Guess no on AIX and glibc systems. + # Guess no on AIX and glibc systems. aix* | *-gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; esac changequote([,])dnl @@ -592,6 +594,7 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE], [ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether the C locale is free of encoding errors], [gl_cv_C_locale_sans_EILSEQ], [ @@ -622,7 +625,12 @@ ]])], [gl_cv_C_locale_sans_EILSEQ=yes], [gl_cv_C_locale_sans_EILSEQ=no], - [:])]) + [case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; + esac + ]) + ]) ]) # Prerequisites of lib/mbrtowc.c. @@ -639,7 +647,7 @@ [ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], - gl_cv_func_mbrtowc, + [gl_cv_func_mbrtowc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[/* Tru64 with Desktop Toolkit C has a bug: must be @@ -655,8 +663,8 @@ size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], - gl_cv_func_mbrtowc=yes, - gl_cv_func_mbrtowc=no)]) + [gl_cv_func_mbrtowc=yes], + [gl_cv_func_mbrtowc=no])]) if test $gl_cv_func_mbrtowc = yes; then AC_DEFINE([HAVE_MBRTOWC], [1], [Define to 1 if mbrtowc and mbstate_t are properly declared.]) diff -Nru datamash-1.1.1/m4/memchr.m4 datamash-1.2.0/m4/memchr.m4 --- datamash-1.1.1/m4/memchr.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/memchr.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# memchr.m4 serial 12 +# memchr.m4 serial 13 dnl Copyright (C) 2002-2004, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,8 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], [ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) @@ -73,12 +75,21 @@ result |= 4; } return result; -]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], - [dnl Be pessimistic for now. - gl_cv_func_memchr_works="guessing no"])]) - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi +]])], + [gl_cv_func_memchr_works=yes], + [gl_cv_func_memchr_works=no], + [case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_func_memchr_works="guessing yes" ;; + # Be pessimistic for now. + *) gl_cv_func_memchr_works="guessing no" ;; + esac + ]) + ]) + case "$gl_cv_func_memchr_works" in + *yes) ;; + *) REPLACE_MEMCHR=1 ;; + esac fi ]) diff -Nru datamash-1.1.1/m4/modfl.m4 datamash-1.2.0/m4/modfl.m4 --- datamash-1.1.1/m4/modfl.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/modfl.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# modfl.m4 serial 3 +# modfl.m4 serial 4 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -65,6 +65,15 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_modfl_ieee="guessing yes" ;; + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_modfl_ieee="guessing yes"], + [gl_cv_func_modfl_ieee="guessing no"]) + ;; # If we don't know, assume the worst. *) gl_cv_func_modfl_ieee="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/modf.m4 datamash-1.2.0/m4/modf.m4 --- datamash-1.1.1/m4/modf.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/modf.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# modf.m4 serial 3 +# modf.m4 serial 4 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -63,6 +63,15 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_modf_ieee="guessing yes" ;; + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_modf_ieee="guessing yes"], + [gl_cv_func_modf_ieee="guessing no"]) + ;; # If we don't know, assume the worst. *) gl_cv_func_modf_ieee="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/progtest.m4 datamash-1.2.0/m4/progtest.m4 --- datamash-1.1.1/m4/progtest.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/progtest.m4 2017-08-08 00:31:06.000000000 +0000 @@ -4,13 +4,13 @@ dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -dnl This file can can be used in projects which are not available under +dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. +dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: diff -Nru datamash-1.1.1/m4/random.m4 datamash-1.2.0/m4/random.m4 --- datamash-1.1.1/m4/random.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/random.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# random.m4 serial 1 +# random.m4 serial 2 dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -12,6 +12,16 @@ if test $ac_cv_func_random = no; then HAVE_RANDOM=0 fi + + AC_CHECK_DECLS_ONCE([initstate]) + if test $ac_cv_have_decl_initstate = no; then + HAVE_DECL_INITSTATE=0 + fi + + AC_CHECK_DECLS_ONCE([setstate]) + if test $ac_cv_have_decl_setstate = no; then + HAVE_DECL_SETSTATE=0 + fi ]) # Prerequisites of lib/random.c. diff -Nru datamash-1.1.1/m4/roundl.m4 datamash-1.2.0/m4/roundl.m4 --- datamash-1.1.1/m4/roundl.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/roundl.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# roundl.m4 serial 15 +# roundl.m4 serial 16 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -66,6 +66,8 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_roundl_ieee="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_roundl_ieee="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_roundl_ieee="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/round.m4 datamash-1.2.0/m4/round.m4 --- datamash-1.1.1/m4/round.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/round.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# round.m4 serial 16 +# round.m4 serial 18 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -57,11 +57,20 @@ * (double) (1U << ((DBL_MANT_DIG + 3) / 5)) * (double) (1U << ((DBL_MANT_DIG + 4) / 5)); volatile double x = 0.5 - 0.5 / TWO_MANT_DIG; - exit (x < 0.5 && round (x) != 0.0); + return (x < 0.5 && round (x) != 0.0); }]])], [gl_cv_func_round_works=yes], [gl_cv_func_round_works=no], [case "$host_os" in - netbsd* | aix*) gl_cv_func_round_works="guessing no";; - *) gl_cv_func_round_works="guessing yes";; + netbsd* | aix*) gl_cv_func_round_works="guessing no" ;; + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_round_works="guessing yes"], + [gl_cv_func_round_works="guessing no"]) + ;; + *) gl_cv_func_round_works="guessing yes" ;; esac ]) LIBS="$save_LIBS" @@ -106,6 +115,15 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_round_ieee="guessing yes" ;; + # Guess yes on MSVC, no on mingw. + mingw*) AC_EGREP_CPP([Known], [ +#ifdef _MSC_VER + Known +#endif + ], + [gl_cv_func_round_ieee="guessing yes"], + [gl_cv_func_round_ieee="guessing no"]) + ;; # If we don't know, assume the worst. *) gl_cv_func_round_ieee="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/signbit.m4 datamash-1.2.0/m4/signbit.m4 --- datamash-1.1.1/m4/signbit.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/signbit.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# signbit.m4 serial 13 +# signbit.m4 serial 15 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -31,6 +31,8 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_signbit="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_signbit="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_signbit="guessing no" ;; esac @@ -60,6 +62,13 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;; + # Guess yes on mingw, no on MSVC. + mingw*) if test -n "$GCC"; then + gl_cv_func_signbit_gcc="guessing yes" + else + gl_cv_func_signbit_gcc="guessing no" + fi + ;; # If we don't know, assume the worst. *) gl_cv_func_signbit_gcc="guessing no" ;; esac @@ -272,6 +281,7 @@ { /* More than one bit difference. */ fprintf (fp, "unknown"); + fclose (fp); return 2; } if (x) @@ -284,6 +294,7 @@ { /* No difference. */ fprintf (fp, "unknown"); + fclose (fp); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ @@ -292,6 +303,7 @@ /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); + fclose (fp); return 4; } for (i = 0; ; i++) diff -Nru datamash-1.1.1/m4/sqrtl.m4 datamash-1.2.0/m4/sqrtl.m4 --- datamash-1.1.1/m4/sqrtl.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/sqrtl.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# sqrtl.m4 serial 9 +# sqrtl.m4 serial 10 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -154,8 +154,10 @@ [gl_cv_func_sqrtl_works=yes], [gl_cv_func_sqrtl_works=no], [case "$host_os" in - openbsd*) gl_cv_func_sqrtl_works="guessing no";; - *) gl_cv_func_sqrtl_works="guessing yes";; + openbsd*) gl_cv_func_sqrtl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_sqrtl_works="guessing yes" ;; + *) gl_cv_func_sqrtl_works="guessing yes" ;; esac ]) ]) diff -Nru datamash-1.1.1/m4/stdalign.m4 datamash-1.2.0/m4/stdalign.m4 --- datamash-1.1.1/m4/stdalign.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/stdalign.m4 2017-05-03 21:43:36.000000000 +0000 @@ -35,8 +35,8 @@ || (defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ : __GNUC__) \ - || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ - || __ICC || 0x5110 <= __SUNPRO_C \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 diff -Nru datamash-1.1.1/m4/stdint.m4 datamash-1.2.0/m4/stdint.m4 --- datamash-1.1.1/m4/stdint.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/stdint.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# stdint.m4 serial 50 +# stdint.m4 serial 51 dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -10,6 +10,7 @@ AC_DEFUN_ONCE([gl_STDINT_H], [ AC_PREREQ([2.59])dnl + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_LIMITS_H]) AC_REQUIRE([gt_TYPE_WINT_T]) @@ -288,8 +289,12 @@ ]])], [gl_cv_header_working_stdint_h=yes], [], - [dnl When cross-compiling, assume it works. - gl_cv_header_working_stdint_h=yes + [case "$host_os" in + # Guess yes on native Windows. + mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; + # In general, assume it works. + *) gl_cv_header_working_stdint_h="guessing yes" ;; + esac ]) ]) ]) @@ -299,15 +304,16 @@ HAVE_SYS_BITYPES_H=0 HAVE_SYS_INTTYPES_H=0 STDINT_H=stdint.h - if test "$gl_cv_header_working_stdint_h" = yes; then - HAVE_C99_STDINT_H=1 - dnl Now see whether the system works without - dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. - AC_CACHE_CHECK([whether stdint.h predates C++11], - [gl_cv_header_stdint_predates_cxx11_h], - [gl_cv_header_stdint_predates_cxx11_h=yes - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ + case "$gl_cv_header_working_stdint_h" in + *yes) + HAVE_C99_STDINT_H=1 + dnl Now see whether the system works without + dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. + AC_CACHE_CHECK([whether stdint.h predates C++11], + [gl_cv_header_stdint_predates_cxx11_h], + [gl_cv_header_stdint_predates_cxx11_h=yes + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include ] @@ -315,45 +321,47 @@ [ intmax_t im = INTMAX_MAX; int32_t i32 = INT32_C (0x7fffffff); - ]])], - [gl_cv_header_stdint_predates_cxx11_h=no])]) + ]])], + [gl_cv_header_stdint_predates_cxx11_h=no])]) - if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then - AC_DEFINE([__STDC_CONSTANT_MACROS], [1], - [Define to 1 if the system predates C++11.]) - AC_DEFINE([__STDC_LIMIT_MACROS], [1], - [Define to 1 if the system predates C++11.]) - fi - AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], - [gl_cv_header_stdint_width], - [gl_cv_header_stdint_width=no - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 - #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ - #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 - #endif - #include - ]gl_STDINT_INCLUDES[ - int iw = UINTMAX_WIDTH; - ]])], - [gl_cv_header_stdint_width=yes])]) - if test "$gl_cv_header_stdint_width" = yes; then - STDINT_H= - fi - else - dnl Check for , and for - dnl (used in Linux libc4 >= 4.6.7 and libc5). - AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - fi - gl_STDINT_TYPE_PROPERTIES - fi + if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then + AC_DEFINE([__STDC_CONSTANT_MACROS], [1], + [Define to 1 if the system predates C++11.]) + AC_DEFINE([__STDC_LIMIT_MACROS], [1], + [Define to 1 if the system predates C++11.]) + fi + AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], + [gl_cv_header_stdint_width], + [gl_cv_header_stdint_width=no + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 + #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ + #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 + #endif + #include + ]gl_STDINT_INCLUDES[ + int iw = UINTMAX_WIDTH; + ]])], + [gl_cv_header_stdint_width=yes])]) + if test "$gl_cv_header_stdint_width" = yes; then + STDINT_H= + fi + ;; + *) + dnl Check for , and for + dnl (used in Linux libc4 >= 4.6.7 and libc5). + AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + fi + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + fi + gl_STDINT_TYPE_PROPERTIES + ;; + esac dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. LIMITS_H=limits.h diff -Nru datamash-1.1.1/m4/stdlib_h.m4 datamash-1.2.0/m4/stdlib_h.m4 --- datamash-1.1.1/m4/stdlib_h.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/stdlib_h.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 43 +# stdlib_h.m4 serial 44 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -21,9 +21,9 @@ #endif ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps - posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch - secure_getenv setenv setstate setstate_r srandom srandom_r - strtod strtoll strtoull unlockpt unsetenv]) + posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray + realpath rpmatch secure_getenv setenv setstate setstate_r srandom + srandom_r strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -58,6 +58,7 @@ GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R]) GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) + GNULIB_REALLOCARRAY=0; AC_SUBST([GNULIB_REALLOCARRAY]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) @@ -77,6 +78,7 @@ HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) + HAVE_DECL_INITSTATE=1; AC_SUBST([HAVE_DECL_INITSTATE]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) @@ -89,11 +91,13 @@ HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) + HAVE_REALLOCARRAY=1; AC_SUBST([HAVE_REALLOCARRAY]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) + HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) diff -Nru datamash-1.1.1/m4/stdnoreturn.m4 datamash-1.2.0/m4/stdnoreturn.m4 --- datamash-1.1.1/m4/stdnoreturn.m4 2017-01-10 20:01:01.000000000 +0000 +++ datamash-1.2.0/m4/stdnoreturn.m4 2017-08-22 19:23:21.000000000 +0000 @@ -9,33 +9,43 @@ AC_DEFUN([gl_STDNORETURN_H], [ - AC_CACHE_CHECK([for working stdnoreturn.h], - [gl_cv_header_working_stdnoreturn_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - /* Do not check for 'noreturn' after the return type. - C11 allows it, but it's rarely done that way - and circa-2012 bleeding-edge GCC rejects it when given - -Werror=old-style-declaration. */ - noreturn void foo1 (void) { exit (0); } - _Noreturn void foo2 (void) { exit (0); } - int testit (int argc, char **argv) { - if (argc & 1) - return 0; - (argv[0][0] ? foo1 : foo2) (); - } - ]])], - [gl_cv_header_working_stdnoreturn_h=yes], - [gl_cv_header_working_stdnoreturn_h=no])]) - - if test $gl_cv_header_working_stdnoreturn_h = yes; then - STDNORETURN_H='' - else - STDNORETURN_H='stdnoreturn.h' - fi - + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + cygwin*) + dnl Regardless whether a working exists or not, + dnl we need our own , because of the definition + dnl of _Noreturn done by gnulib-common.m4. + STDNORETURN_H='stdnoreturn.h' + ;; + *) + AC_CACHE_CHECK([for working stdnoreturn.h], + [gl_cv_header_working_stdnoreturn_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + /* Do not check for 'noreturn' after the return type. + C11 allows it, but it's rarely done that way + and circa-2012 bleeding-edge GCC rejects it when given + -Werror=old-style-declaration. */ + noreturn void foo1 (void) { exit (0); } + _Noreturn void foo2 (void) { exit (0); } + int testit (int argc, char **argv) + { + if (argc & 1) + return 0; + (argv[0][0] ? foo1 : foo2) (); + } + ]])], + [gl_cv_header_working_stdnoreturn_h=yes], + [gl_cv_header_working_stdnoreturn_h=no])]) + if test $gl_cv_header_working_stdnoreturn_h = yes; then + STDNORETURN_H='' + else + STDNORETURN_H='stdnoreturn.h' + fi + ;; + esac AC_SUBST([STDNORETURN_H]) AM_CONDITIONAL([GL_GENERATE_STDNORETURN_H], [test -n "$STDNORETURN_H"]) ]) diff -Nru datamash-1.1.1/m4/strerror.m4 datamash-1.2.0/m4/strerror.m4 --- datamash-1.1.1/m4/strerror.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/strerror.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# strerror.m4 serial 17 +# strerror.m4 serial 18 dnl Copyright (C) 2002, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -80,6 +80,8 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_strerror_0_works="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/string_h.m4 datamash-1.2.0/m4/string_h.m4 --- datamash-1.1.1/m4/string_h.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/string_h.m4 2017-08-22 19:23:21.000000000 +0000 @@ -43,6 +43,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ + GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO]) GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) @@ -82,6 +83,7 @@ GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO]) HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) diff -Nru datamash-1.1.1/m4/sys_types_h.m4 datamash-1.2.0/m4/sys_types_h.m4 --- datamash-1.1.1/m4/sys_types_h.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/sys_types_h.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# sys_types_h.m4 serial 6 +# sys_types_h.m4 serial 8 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,9 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H], [ + dnl Use sane struct stat types in OpenVMS 8.2 and later. + AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.]) + AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h]) @@ -17,6 +20,14 @@ dnl Whether to override the 'off_t' type. AC_REQUIRE([gl_TYPE_OFF_T]) + + dnl Whether to override the 'dev_t' and 'ino_t' types. + m4_ifdef([gl_WINDOWS_STAT_INODES], [ + AC_REQUIRE([gl_WINDOWS_STAT_INODES]) + ], [ + WINDOWS_STAT_INODES=0 + ]) + AC_SUBST([WINDOWS_STAT_INODES]) ]) AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], diff -Nru datamash-1.1.1/m4/truncl.m4 datamash-1.2.0/m4/truncl.m4 --- datamash-1.1.1/m4/truncl.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/truncl.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# truncl.m4 serial 11 +# truncl.m4 serial 12 dnl Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -62,8 +62,10 @@ [gl_cv_func_truncl_works=yes], [gl_cv_func_truncl_works=no], [case "$host_os" in - osf4*) gl_cv_func_truncl_works="guessing no";; - *) gl_cv_func_truncl_works="guessing yes";; + osf4*) gl_cv_func_truncl_works="guessing no" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_truncl_works="guessing yes" ;; + *) gl_cv_func_truncl_works="guessing yes" ;; esac ]) ]) @@ -103,6 +105,8 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_truncl_ieee="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_truncl_ieee="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_truncl_ieee="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/trunc.m4 datamash-1.2.0/m4/trunc.m4 --- datamash-1.1.1/m4/trunc.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/trunc.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# trunc.m4 serial 9 +# trunc.m4 serial 10 dnl Copyright (C) 2007, 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -72,6 +72,8 @@ [case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_trunc_ieee="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_trunc_ieee="guessing yes" ;; # If we don't know, assume the worst. *) gl_cv_func_trunc_ieee="guessing no" ;; esac diff -Nru datamash-1.1.1/m4/unistd_h.m4 datamash-1.2.0/m4/unistd_h.m4 --- datamash-1.1.1/m4/unistd_h.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/unistd_h.m4 2017-08-08 00:31:06.000000000 +0000 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 69 +# unistd_h.m4 serial 70 dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -46,8 +46,8 @@ gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite - readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r - unlink unlinkat usleep]) + readlink readlinkat rmdir sethostname sleep symlink symlinkat + truncate ttyname_r unlink unlinkat usleep]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], @@ -102,6 +102,7 @@ GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) + GNULIB_TRUNCATE=0; AC_SUBST([GNULIB_TRUNCATE]) GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) @@ -139,6 +140,7 @@ HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) + HAVE_TRUNCATE=1; AC_SUBST([HAVE_TRUNCATE]) HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) @@ -179,6 +181,7 @@ REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) + REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE]) REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) diff -Nru datamash-1.1.1/m4/warnings.m4 datamash-1.2.0/m4/warnings.m4 --- datamash-1.1.1/m4/warnings.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/warnings.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# warnings.m4 serial 11 +# warnings.m4 serial 12 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -20,10 +20,12 @@ # ----------------------------------------------------------------- # Check if the compiler supports OPTION when compiling PROGRAM. # -# FIXME: gl_Warn must be used unquoted until we can assume Autoconf -# 2.64 or newer. +# The effects of this macro depend on the current language (_AC_LANG). AC_DEFUN([gl_COMPILER_OPTION_IF], -[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl +[ +dnl FIXME: gl_Warn must be used unquoted until we can assume Autoconf +dnl 2.64 or newer. +AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl AS_LITERAL_IF([$1], [m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))], @@ -51,27 +53,50 @@ # ------------------------------ # Clang doesn't complain about unknown warning options unless one also # specifies -Wunknown-warning-option -Werror. Detect this. +# +# The effects of this macro depend on the current language (_AC_LANG). AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS], +[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) + +# Specialization for _AC_LANG = C. This macro can be AC_REQUIREd. +AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)], +[ + AC_LANG_PUSH([C]) + gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL + AC_LANG_POP([C]) +]) + +# Specialization for _AC_LANG = C++. This macro can be AC_REQUIREd. +AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)], +[ + AC_LANG_PUSH([C++]) + gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL + AC_LANG_POP([C++]) +]) + +AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL], [gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option], [gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'], [gl_unknown_warnings_are_errors=])]) -# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS], +# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS/WARN_CXXFLAGS], # [PROGRAM = AC_LANG_PROGRAM()]) -# --------------------------------------------- -# Adds parameter to WARN_CFLAGS if the compiler supports it when -# compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]). +# ----------------------------------------------------------- +# Adds parameter to WARN_CFLAGS/WARN_CXXFLAGS if the compiler supports it +# when compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]). # # If VARIABLE is a variable name, AC_SUBST it. +# +# The effects of this macro depend on the current language (_AC_LANG). AC_DEFUN([gl_WARN_ADD], -[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS]) +[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS(]_AC_LANG[)]) gl_COMPILER_OPTION_IF([$1], - [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])], + [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_]_AC_LANG_PREFIX[FLAGS]], [[$2]]), [" $1"])], [], [$3]) m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])])], - [AC_SUBST([WARN_CFLAGS])])dnl + [AC_SUBST([WARN_]_AC_LANG_PREFIX[FLAGS])])dnl ]) # Local Variables: diff -Nru datamash-1.1.1/m4/wchar_h.m4 datamash-1.2.0/m4/wchar_h.m4 --- datamash-1.1.1/m4/wchar_h.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/wchar_h.m4 2017-08-08 00:31:06.000000000 +0000 @@ -7,7 +7,7 @@ dnl Written by Eric Blake. -# wchar_h.m4 serial 40 +# wchar_h.m4 serial 42 AC_DEFUN([gl_WCHAR_H], [ @@ -35,6 +35,8 @@ fi AC_SUBST([HAVE_WINT_T]) + AC_REQUIRE([gl_TYPE_WINT_T_PREREQ]) + dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ @@ -53,7 +55,7 @@ wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr - wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth + wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime ]) ]) @@ -177,6 +179,7 @@ GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR]) GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK]) GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH]) + GNULIB_WCSFTIME=0; AC_SUBST([GNULIB_WCSFTIME]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) @@ -215,6 +218,7 @@ HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR]) HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) + HAVE_WCSFTIME=1; AC_SUBST([HAVE_WCSFTIME]) HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) @@ -230,4 +234,5 @@ REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH]) + REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME]) ]) diff -Nru datamash-1.1.1/m4/wctype_h.m4 datamash-1.2.0/m4/wctype_h.m4 --- datamash-1.1.1/m4/wctype_h.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/wctype_h.m4 2017-08-22 19:23:21.000000000 +0000 @@ -1,4 +1,4 @@ -# wctype_h.m4 serial 18 +# wctype_h.m4 serial 21 dnl A placeholder for ISO C99 , for platforms that lack it. @@ -30,6 +30,8 @@ fi AC_SUBST([HAVE_WINT_T]) + AC_REQUIRE([gl_TYPE_WINT_T_PREREQ]) + gl_CHECK_NEXT_HEADERS([wctype.h]) if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then @@ -51,7 +53,8 @@ int main () { return iswprint ('x') == 0; } ]])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + [dnl Guess no on Linux libc5, yes otherwise. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif]], [])], diff -Nru datamash-1.1.1/m4/wint_t.m4 datamash-1.2.0/m4/wint_t.m4 --- datamash-1.1.1/m4/wint_t.m4 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/m4/wint_t.m4 2017-08-08 00:31:06.000000000 +0000 @@ -1,4 +1,4 @@ -# wint_t.m4 serial 6 +# wint_t.m4 serial 7 dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -60,3 +60,15 @@ fi AC_SUBST([GNULIB_OVERRIDES_WINT_T]) ]) + +dnl Prerequisites of the 'wint_t' override. +AC_DEFUN([gl_TYPE_WINT_T_PREREQ], +[ + AC_CHECK_HEADERS_ONCE([crtdefs.h]) + if test $ac_cv_header_crtdefs_h = yes; then + HAVE_CRTDEFS_H=1 + else + HAVE_CRTDEFS_H=0 + fi + AC_SUBST([HAVE_CRTDEFS_H]) +]) diff -Nru datamash-1.1.1/maint.mk datamash-1.2.0/maint.mk --- datamash-1.1.1/maint.mk 2017-01-10 20:01:02.000000000 +0000 +++ datamash-1.2.0/maint.mk 2017-08-08 00:31:06.000000000 +0000 @@ -696,7 +696,7 @@ # Prohibit the inclusion of verify.h without an actual use. sc_prohibit_verify_without_use: @h='verify.h' \ - re='\<(verify(true|expr)?|static_assert) *\(' \ + re='\<(verify(true|expr)?|assume|static_assert) *\(' \ $(_sc_header_without_use) # Don't include xfreopen.h unless you use one of its functions. diff -Nru datamash-1.1.1/Makefile.am datamash-1.2.0/Makefile.am --- datamash-1.1.1/Makefile.am 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/Makefile.am 2017-08-22 23:05:48.000000000 +0000 @@ -13,10 +13,8 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src EXTRA_DIST = \ - build-aux/make_bin_dist.sh \ - build-aux/rebuild-coverage.sh \ - build-aux/gen-coverage-report.sh \ - build-aux/tag-new-version.sh \ + build-aux/make_bin_dist.sh \ + build-aux/prerelease-checks.sh \ build-aux/git-log-fix \ build-aux/create_small_file_system.sh \ build-aux/create_corrupted_file_system.sh \ @@ -31,6 +29,7 @@ bin_PROGRAMS = datamash datamash_SOURCES = src/system.h \ + src/die.h \ src/text-options.c src/text-options.h \ src/utils.c src/utils.h \ src/text-lines.c src/text-lines.h \ @@ -122,6 +121,7 @@ tests/datamash-stats.pl \ tests/datamash-transpose.pl \ tests/datamash-crosstab.pl \ + tests/datamash-check.pl \ tests/datamash-pair-tests.pl \ tests/datamash-check-tabular.pl \ tests/datamash-sort-header.sh \ @@ -174,8 +174,7 @@ EXTRA_DIST += $(dist_examples_DATA) if ENABLE_BASH_COMPLETION -bashcompletiondir = $(BASH_COMPLETION_DIR) -dist_bashcompletion_DATA = contrib/bash-completion/datamash +dist_bashcomp_DATA = contrib/bash-completion/datamash endif diff -Nru datamash-1.1.1/Makefile.in datamash-1.2.0/Makefile.in --- datamash-1.1.1/Makefile.in 2017-01-19 19:34:08.000000000 +0000 +++ datamash-1.2.0/Makefile.in 2017-08-22 23:17:40.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -84,7 +84,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -148,26 +158,6 @@ host_triplet = @host@ bin_PROGRAMS = datamash$(EXEEXT) @BUILD_FROM_GIT_TRUE@am__append_1 = $(man_MANS) -DIST_COMMON = $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk \ - $(top_srcdir)/doc/local.mk INSTALL NEWS README AUTHORS \ - ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.in ABOUT-NLS $(top_srcdir)/build-aux/depcomp \ - $(doc_datamash_TEXINFOS) $(top_srcdir)/build-aux/mdate-sh \ - $(srcdir)/doc/version.texi $(srcdir)/doc/stamp-vti \ - $(top_srcdir)/build-aux/texinfo.tex \ - $(am__dist_bashcompletion_DATA_DIST) $(dist_examples_DATA) \ - $(top_srcdir)/build-aux/test-driver COPYING THANKS TODO \ - build-aux/ar-lib build-aux/compile build-aux/config.guess \ - build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ - build-aux/install-sh build-aux/mdate-sh build-aux/missing \ - build-aux/texinfo.tex $(top_srcdir)/build-aux/ar-lib \ - $(top_srcdir)/build-aux/compile \ - $(top_srcdir)/build-aux/config.guess \ - $(top_srcdir)/build-aux/config.rpath \ - $(top_srcdir)/build-aux/config.sub \ - $(top_srcdir)/build-aux/install-sh \ - $(top_srcdir)/build-aux/missing @LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__append_2 = lib/unistr/u8-mbtoucr.c @LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__append_3 = lib/unistr/u8-uctomb.c lib/unistr/u8-uctomb-aux.c @LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_4 = lib/uniwidth/width.c @@ -254,6 +244,10 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/doc/version.texi \ + $(srcdir)/doc/stamp-vti $(am__dist_bashcomp_DATA_DIST) \ + $(dist_examples_DATA) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -324,7 +318,7 @@ lib/xstrtol-error.$(OBJEXT) lib/xstrtoumax.$(OBJEXT) lib_libdatamash_a_OBJECTS = $(am_lib_libdatamash_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(bashcompletiondir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(bashcompdir)" \ "$(DESTDIR)$(examplesdir)" PROGRAMS = $(bin_PROGRAMS) am_datamash_OBJECTS = src/datamash-text-options.$(OBJEXT) \ @@ -467,8 +461,8 @@ man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) -am__dist_bashcompletion_DATA_DIST = contrib/bash-completion/datamash -DATA = $(dist_bashcompletion_DATA) $(dist_examples_DATA) +am__dist_bashcomp_DATA_DIST = contrib/bash-completion/datamash +DATA = $(dist_bashcomp_DATA) $(dist_examples_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -674,6 +668,24 @@ SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(doc_datamash_TEXINFOS) $(srcdir)/Makefile.in \ + $(srcdir)/config.in $(srcdir)/lib/gnulib.mk \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.rpath \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/mdate-sh \ + $(top_srcdir)/build-aux/missing \ + $(top_srcdir)/build-aux/test-driver \ + $(top_srcdir)/build-aux/texinfo.tex $(top_srcdir)/doc/local.mk \ + $(top_srcdir)/lib/local.mk ABOUT-NLS AUTHORS COPYING ChangeLog \ + INSTALL NEWS README THANKS TODO build-aux/ar-lib \ + build-aux/compile build-aux/config.guess \ + build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/mdate-sh build-aux/missing \ + build-aux/texinfo.tex DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -729,7 +741,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ @@ -767,6 +778,7 @@ FLOOR_LIBM = @FLOOR_LIBM@ FREXPL_LIBM = @FREXPL_LIBM@ FREXP_LIBM = @FREXP_LIBM@ +GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ @@ -810,6 +822,7 @@ GNULIB_EXP2L = @GNULIB_EXP2L@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ GNULIB_EXPM1 = @GNULIB_EXPM1@ GNULIB_EXPM1F = @GNULIB_EXPM1F@ GNULIB_EXPM1L = @GNULIB_EXPM1L@ @@ -973,6 +986,7 @@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMAINDER = @GNULIB_REMAINDER@ @@ -1035,6 +1049,7 @@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ +GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ @@ -1066,6 +1081,7 @@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ +GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ @@ -1114,6 +1130,7 @@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ +HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ @@ -1147,6 +1164,7 @@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ @@ -1165,6 +1183,7 @@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -1192,6 +1211,7 @@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ HAVE_EXPM1 = @HAVE_EXPM1@ HAVE_EXPM1F = @HAVE_EXPM1F@ HAVE_FABSF = @HAVE_FABSF@ @@ -1283,6 +1303,7 @@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REMAINDER = @HAVE_REMAINDER@ HAVE_REMAINDERF = @HAVE_REMAINDERF@ @@ -1318,6 +1339,7 @@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ @@ -1325,6 +1347,7 @@ HAVE_TANF = @HAVE_TANF@ HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ +HAVE_TRUNCATE = @HAVE_TRUNCATE@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -1345,6 +1368,7 @@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ +HAVE_WCSFTIME = @HAVE_WCSFTIME@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ @@ -1466,6 +1490,9 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PMCCABE = @PMCCABE@ POSUB = @POSUB@ POW_LIBM = @POW_LIBM@ @@ -1649,6 +1676,7 @@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ +REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ @@ -1663,6 +1691,7 @@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ +REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ @@ -1699,6 +1728,7 @@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1707,13 +1737,13 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +bashcompdir = @bashcompdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -1776,8 +1806,7 @@ # enabled by default because the intl directory might not exist if # your project does not use "gettext --intl", and some compilers # complain about -I options applied to nonexistent directories. -EXTRA_DIST = build-aux/make_bin_dist.sh build-aux/rebuild-coverage.sh \ - build-aux/gen-coverage-report.sh build-aux/tag-new-version.sh \ +EXTRA_DIST = build-aux/make_bin_dist.sh build-aux/prerelease-checks.sh \ build-aux/git-log-fix build-aux/create_small_file_system.sh \ build-aux/create_corrupted_file_system.sh \ contrib/bash-completion/datamash m4/gnulib-cache.m4 \ @@ -1796,8 +1825,10 @@ lib/float.c lib/float.in.h lib/itold.c lib/floor.c lib/floor.c \ lib/floorl.c lib/fpending.c lib/fpending.h lib/stdio-impl.h \ lib/fpucw.h lib/frexp.c lib/frexp.c lib/frexpl.c \ - $(top_srcdir)/build-aux/gendocs.sh lib/getopt.c \ - lib/getopt.in.h lib/getopt1.c lib/getopt_int.h \ + $(top_srcdir)/build-aux/gendocs.sh lib/getopt-cdefs.in.h \ + lib/getopt-core.h lib/getopt-ext.h lib/getopt-pfx-core.h \ + lib/getopt-pfx-ext.h lib/getopt.c lib/getopt.in.h \ + lib/getopt1.c lib/getopt_int.h \ $(top_srcdir)/build-aux/config.rpath \ $(top_srcdir)/build-aux/git-version-gen \ $(top_srcdir)/build-aux/gitlog-to-changelog \ @@ -1828,16 +1859,13 @@ lib/msvc-nothrow.h $(top_srcdir)/build-aux/prefix-gnulib-mk \ $(top_srcdir)/build-aux/pmccabe2html \ $(top_srcdir)/build-aux/pmccabe.css lib/quote.h lib/quotearg.h \ - lib/random.c lib/random_r.c $(top_srcdir)/README-release \ - lib/realloc.c lib/realloc.c lib/round.c lib/round.c \ - lib/roundl.c lib/float+.h lib/signbitd.c lib/signbitf.c \ - lib/signbitl.c $(top_srcdir)/build-aux/snippet/_Noreturn.h \ - $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ - $(top_srcdir)/build-aux/snippet/c++defs.h \ - $(top_srcdir)/build-aux/snippet/unused-parameter.h \ - $(top_srcdir)/build-aux/snippet/warn-on-use.h lib/sqrtl.c \ - lib/stdalign.in.h lib/stdarg.in.h lib/stdbool.in.h \ - lib/stddef.in.h lib/stdint.in.h lib/stdio.in.h lib/stdlib.in.h \ + lib/random.c lib/random_r.c lib/realloc.c lib/realloc.c \ + lib/round.c lib/round.c lib/roundl.c lib/float+.h \ + lib/signbitd.c lib/signbitf.c lib/signbitl.c lib/_Noreturn.h \ + lib/arg-nonnull.h lib/c++defs.h lib/unused-parameter.h \ + lib/warn-on-use.h lib/sqrtl.c lib/stdalign.in.h \ + lib/stdarg.in.h lib/stdbool.in.h lib/stddef.in.h \ + lib/stdint.in.h lib/stdio.in.h lib/stdlib.in.h \ lib/stdnoreturn.in.h lib/stpcpy.c lib/streq.h lib/strerror.c \ lib/strerror-override.c lib/strerror-override.h \ lib/string.in.h lib/strndup.c lib/strnlen.c lib/strsep.c \ @@ -1853,6 +1881,7 @@ lib/xalloc-oversized.h lib/xstrtol.h doc/datamash-texinfo.css SUBDIRS = po datamash_SOURCES = src/system.h \ + src/die.h \ src/text-options.c src/text-options.h \ src/utils.c src/utils.h \ src/text-lines.c src/text-lines.h \ @@ -1902,6 +1931,7 @@ tests/datamash-stats.pl \ tests/datamash-transpose.pl \ tests/datamash-crosstab.pl \ + tests/datamash-check.pl \ tests/datamash-pair-tests.pl \ tests/datamash-check-tabular.pl \ tests/datamash-sort-header.sh \ @@ -1927,24 +1957,22 @@ examples/scores.txt examples/scores_h.txt \ examples/genes.txt examples/genes_h.txt -@ENABLE_BASH_COMPLETION_TRUE@bashcompletiondir = $(BASH_COMPLETION_DIR) -@ENABLE_BASH_COMPLETION_TRUE@dist_bashcompletion_DATA = contrib/bash-completion/datamash +@ENABLE_BASH_COMPLETION_TRUE@dist_bashcomp_DATA = contrib/bash-completion/datamash LOG_COMPILER = MAINTAINERCLEANFILES = lib/iconv_open-aix.h lib/iconv_open-hpux.h \ lib/iconv_open-irix.h lib/iconv_open-osf.h \ lib/iconv_open-solaris.h +# No GNU Make output. noinst_LIBRARIES = lib/libdatamash.a MOSTLYCLEANFILES = lib/core lib/*.stackdump lib/alloca.h \ lib/alloca.h-t lib/ctype.h lib/ctype.h-t lib/errno.h \ lib/errno.h-t lib/float.h lib/float.h-t lib/getopt.h \ - lib/getopt.h-t lib/iconv.h lib/iconv.h-t \ - lib/iconv_open-aix.h-t lib/iconv_open-hpux.h-t \ - lib/iconv_open-irix.h-t lib/iconv_open-osf.h-t \ - lib/iconv_open-solaris.h-t lib/inttypes.h lib/inttypes.h-t \ - lib/limits.h lib/limits.h-t lib/locale.h lib/locale.h-t \ - lib/math.h lib/math.h-t lib/arg-nonnull.h lib/arg-nonnull.h-t \ - lib/c++defs.h lib/c++defs.h-t lib/unused-parameter.h \ - lib/unused-parameter.h-t lib/warn-on-use.h lib/warn-on-use.h-t \ + lib/getopt.h-t lib/getopt-cdefs.h lib/getopt-cdefs.h-t \ + lib/iconv.h lib/iconv.h-t lib/iconv_open-aix.h-t \ + lib/iconv_open-hpux.h-t lib/iconv_open-irix.h-t \ + lib/iconv_open-osf.h-t lib/iconv_open-solaris.h-t \ + lib/inttypes.h lib/inttypes.h-t lib/limits.h lib/limits.h-t \ + lib/locale.h lib/locale.h-t lib/math.h lib/math.h-t \ lib/stdalign.h lib/stdalign.h-t lib/stdarg.h lib/stdarg.h-t \ lib/stdbool.h lib/stdbool.h-t lib/stddef.h lib/stddef.h-t \ lib/stdint.h lib/stdint.h-t lib/stdio.h lib/stdio.h-t \ @@ -1955,32 +1983,16 @@ lib/uniwidth.h lib/uniwidth.h-t lib/wchar.h lib/wchar.h-t \ lib/wctype.h lib/wctype.h-t MOSTLYCLEANDIRS = - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. BUILT_SOURCES = $(ALLOCA_H) lib/configmake.h lib/ctype.h $(ERRNO_H) \ - $(FLOAT_H) $(GETOPT_H) $(ICONV_H) lib/iconv_open-aix.h \ - lib/iconv_open-hpux.h lib/iconv_open-irix.h \ - lib/iconv_open-osf.h lib/iconv_open-solaris.h lib/inttypes.h \ - $(LIMITS_H) lib/locale.h lib/math.h lib/arg-nonnull.h \ - lib/c++defs.h lib/unused-parameter.h lib/warn-on-use.h \ - $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \ - lib/stdio.h lib/stdlib.h $(STDNORETURN_H) lib/string.h \ - lib/sys/types.h lib/unistd.h $(LIBUNISTRING_UNISTR_H) \ - $(LIBUNISTRING_UNITYPES_H) $(LIBUNISTRING_UNIWIDTH_H) \ - lib/wchar.h lib/wctype.h + $(FLOAT_H) $(GETOPT_H) $(GETOPT_CDEFS_H) $(ICONV_H) \ + lib/iconv_open-aix.h lib/iconv_open-hpux.h \ + lib/iconv_open-irix.h lib/iconv_open-osf.h \ + lib/iconv_open-solaris.h lib/inttypes.h $(LIMITS_H) \ + lib/locale.h lib/math.h $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) \ + $(STDDEF_H) $(STDINT_H) lib/stdio.h lib/stdlib.h \ + $(STDNORETURN_H) lib/string.h lib/sys/types.h lib/unistd.h \ + $(LIBUNISTRING_UNISTR_H) $(LIBUNISTRING_UNITYPES_H) \ + $(LIBUNISTRING_UNIWIDTH_H) lib/wchar.h lib/wctype.h gendocs = build-aux/gendocs.sh gendocs_envvars = GENDOCS_TEMPLATE_DIR=doc # @@ -2052,13 +2064,29 @@ charset_tmp = $(DESTDIR)$(libdir)/charset.tmp # Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all Makefile.am that +# gnulib Makefile snippets, it must be present in all makefiles that +# need it. This is ensured by the applicability 'all' defined above. +_NORETURN_H = $(top_srcdir)/lib/_Noreturn.h + +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all makefiles that +# need it. This is ensured by the applicability 'all' defined above. +ARG_NONNULL_H = $(top_srcdir)/lib/arg-nonnull.h + +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all makefiles that +# need it. This is ensured by the applicability 'all' defined above. +CXXDEFS_H = $(top_srcdir)/lib/c++defs.h + +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all makefiles that +# need it. This is ensured by the applicability 'all' defined above. +UNUSED_PARAMETER_H = $(top_srcdir)/lib/unused-parameter.h + +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all makefiles that # need it. This is ensured by the applicability 'all' defined above. -_NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h -ARG_NONNULL_H = lib/arg-nonnull.h -CXXDEFS_H = lib/c++defs.h -UNUSED_PARAMETER_H = lib/unused-parameter.h -WARN_ON_USE_H = lib/warn-on-use.h +WARN_ON_USE_H = $(top_srcdir)/lib/warn-on-use.h info_TEXINFOS = doc/datamash.texi # For the 'make html' target - generate a single HTML file @@ -2092,7 +2120,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -2102,7 +2129,7 @@ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; -$(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/doc/local.mk: +$(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/doc/local.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -2797,15 +2824,16 @@ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ - echo "@set VERSION $(VERSION)") > vti.tmp - @cmp -s vti.tmp $(srcdir)/doc/version.texi \ - || (echo "Updating $(srcdir)/doc/version.texi"; \ - cp vti.tmp $(srcdir)/doc/version.texi) - -@rm -f vti.tmp + echo "@set VERSION $(VERSION)") > vti.tmp$$$$ && \ + (cmp -s vti.tmp$$$$ $(srcdir)/doc/version.texi \ + || (echo "Updating $(srcdir)/doc/version.texi" && \ + cp vti.tmp$$$$ $(srcdir)/doc/version.texi.tmp$$$$ && \ + mv $(srcdir)/doc/version.texi.tmp$$$$ $(srcdir)/doc/version.texi)) && \ + rm -f vti.tmp$$$$ $(srcdir)/doc/version.texi.$$$$ @cp $(srcdir)/doc/version.texi $@ mostlyclean-vti: - -rm -f vti.tmp + -rm -f vti.tmp* $(srcdir)/doc/version.texi.tmp* maintainer-clean-vti: -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi @@ -2945,27 +2973,27 @@ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -install-dist_bashcompletionDATA: $(dist_bashcompletion_DATA) +install-dist_bashcompDATA: $(dist_bashcomp_DATA) @$(NORMAL_INSTALL) - @list='$(dist_bashcompletion_DATA)'; test -n "$(bashcompletiondir)" || list=; \ + @list='$(dist_bashcomp_DATA)'; test -n "$(bashcompdir)" || list=; \ if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bashcompletiondir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bashcompletiondir)" || exit 1; \ + echo " $(MKDIR_P) '$(DESTDIR)$(bashcompdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bashcompdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bashcompletiondir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(bashcompletiondir)" || exit $$?; \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bashcompdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(bashcompdir)" || exit $$?; \ done -uninstall-dist_bashcompletionDATA: +uninstall-dist_bashcompDATA: @$(NORMAL_UNINSTALL) - @list='$(dist_bashcompletion_DATA)'; test -n "$(bashcompletiondir)" || list=; \ + @list='$(dist_bashcomp_DATA)'; test -n "$(bashcompdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(bashcompletiondir)'; $(am__uninstall_files_from_dir) + dir='$(DESTDIR)$(bashcompdir)'; $(am__uninstall_files_from_dir) install-dist_examplesDATA: $(dist_examples_DATA) @$(NORMAL_INSTALL) @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ @@ -3124,7 +3152,7 @@ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ - else \ + elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ @@ -3348,15 +3376,15 @@ $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -3392,17 +3420,17 @@ esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -3463,7 +3491,7 @@ config.h all-local installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(examplesdir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(bashcompdir)" "$(DESTDIR)$(examplesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -3537,8 +3565,8 @@ info-am: $(INFO_DEPS) -install-data-am: install-dist_bashcompletionDATA \ - install-dist_examplesDATA install-info-am install-man +install-data-am: install-dist_bashcompDATA install-dist_examplesDATA \ + install-info-am install-man install-dvi: install-dvi-recursive @@ -3678,7 +3706,7 @@ ps-am: $(PSS) -uninstall-am: uninstall-binPROGRAMS uninstall-dist_bashcompletionDATA \ +uninstall-am: uninstall-binPROGRAMS uninstall-dist_bashcompDATA \ uninstall-dist_examplesDATA uninstall-dvi-am uninstall-html-am \ uninstall-info-am uninstall-local uninstall-man \ uninstall-pdf-am uninstall-ps-am @@ -3698,7 +3726,7 @@ distclean-local distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ - install-data-am install-dist_bashcompletionDATA \ + install-data-am install-dist_bashcompDATA \ install-dist_examplesDATA install-dvi install-dvi-am \ install-exec install-exec-am install-exec-local install-html \ install-html-am install-info install-info-am install-man \ @@ -3710,11 +3738,13 @@ mostlyclean-compile mostlyclean-generic mostlyclean-local \ mostlyclean-vti pdf pdf-am ps ps-am recheck tags tags-am \ uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-dist_bashcompletionDATA uninstall-dist_examplesDATA \ + uninstall-dist_bashcompDATA uninstall-dist_examplesDATA \ uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-local uninstall-man uninstall-man1 uninstall-pdf-am \ uninstall-ps-am +.PRECIOUS: Makefile + @BUILD_FROM_GIT_TRUE@datamash.1: datamash $(top_srcdir)/man/datamash.x @BUILD_FROM_GIT_TRUE@ PATH='$(abs_top_builddir)$(PATH_SEPARATOR)'$$PATH \ @@ -3858,7 +3888,7 @@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. -lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) +lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @@ -3872,6 +3902,13 @@ } > $@-t && \ mv -f $@-t $@ +lib/getopt-cdefs.h: lib/getopt-cdefs.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ + < $(top_srcdir)/lib/getopt-cdefs.in.h; \ + } > $@-t && \ + mv -f $@-t $@ distclean-local: clean-GNUmakefile clean-GNUmakefile: test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile @@ -3900,19 +3937,19 @@ @GL_GENERATE_ICONV_H_FALSE@lib/iconv.h: $(top_builddir)/config.status @GL_GENERATE_ICONV_H_FALSE@ rm -f $@ -lib/iconv_open-aix.h: lib/iconv_open-aix.gperf +$(top_srcdir)/lib/iconv_open-aix.h: $(top_srcdir)/lib/iconv_open-aix.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-aix.gperf > $(top_srcdir)/lib/iconv_open-aix.h-t && \ mv $(top_srcdir)/lib/iconv_open-aix.h-t $(top_srcdir)/lib/iconv_open-aix.h -lib/iconv_open-hpux.h: lib/iconv_open-hpux.gperf +$(top_srcdir)/lib/iconv_open-hpux.h: $(top_srcdir)/lib/iconv_open-hpux.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-hpux.gperf > $(top_srcdir)/lib/iconv_open-hpux.h-t && \ mv $(top_srcdir)/lib/iconv_open-hpux.h-t $(top_srcdir)/lib/iconv_open-hpux.h -lib/iconv_open-irix.h: lib/iconv_open-irix.gperf +$(top_srcdir)/lib/iconv_open-irix.h: $(top_srcdir)/lib/iconv_open-irix.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-irix.gperf > $(top_srcdir)/lib/iconv_open-irix.h-t && \ mv $(top_srcdir)/lib/iconv_open-irix.h-t $(top_srcdir)/lib/iconv_open-irix.h -lib/iconv_open-osf.h: lib/iconv_open-osf.gperf +$(top_srcdir)/lib/iconv_open-osf.h: $(top_srcdir)/lib/iconv_open-osf.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-osf.gperf > $(top_srcdir)/lib/iconv_open-osf.h-t && \ mv $(top_srcdir)/lib/iconv_open-osf.h-t $(top_srcdir)/lib/iconv_open-osf.h -lib/iconv_open-solaris.h: lib/iconv_open-solaris.gperf +$(top_srcdir)/lib/iconv_open-solaris.h: $(top_srcdir)/lib/iconv_open-solaris.gperf $(V_GPERF)$(GPERF) -m 10 $(top_srcdir)/lib/iconv_open-solaris.gperf > $(top_srcdir)/lib/iconv_open-solaris.h-t && \ mv $(top_srcdir)/lib/iconv_open-solaris.h-t $(top_srcdir)/lib/iconv_open-solaris.h @@ -4340,41 +4377,6 @@ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut -# off. -lib/arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. -lib/c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/snippet/c++defs.h \ - > $@-t && \ - mv $@-t $@ -# The unused-parameter.h that gets inserted into generated .h files is the same -# as build-aux/snippet/unused-parameter.h, except that it has the copyright -# header cut off. -lib/unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ - < $(top_srcdir)/build-aux/snippet/unused-parameter.h \ - > $@-t && \ - mv $@-t $@ -# The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut -# off. -lib/warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works. @@ -4625,6 +4627,7 @@ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ + -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ @@ -4643,6 +4646,7 @@ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ + -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ @@ -4655,10 +4659,12 @@ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ + -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ + -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ @@ -4711,6 +4717,7 @@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ + -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ @@ -4749,7 +4756,8 @@ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(top_srcdir)/lib/string.in.h | \ - sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ + sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \ + -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ @@ -4804,6 +4812,7 @@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ + -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ < $(top_srcdir)/lib/sys_types.in.h; \ } > $@-t && \ mv $@-t $@ @@ -4861,6 +4870,7 @@ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ + -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ @@ -4898,6 +4908,7 @@ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ + -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ @@ -4939,6 +4950,7 @@ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ + -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ @@ -4985,6 +4997,7 @@ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ + -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ @@ -5025,6 +5038,7 @@ -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ + -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ < $(top_srcdir)/lib/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ @@ -5064,6 +5078,7 @@ -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ + -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ @@ -5080,6 +5095,7 @@ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ + -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ @@ -5097,6 +5113,7 @@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ + -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ diff -Nru datamash-1.1.1/man/datamash.x datamash-1.2.0/man/datamash.x --- datamash-1.1.1/man/datamash.x 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/man/datamash.x 2017-08-20 19:04:41.000000000 +0000 @@ -37,10 +37,12 @@ reverse field order in each line .TP -.B check -verify the input file has same number of fields in all lines. +.B check [N lines] [N fields] +verify the input file has same number of fields in all lines, +or the expected number of lines/fields. number of lines and fields are printed to STDOUT. Exits with non-zero code -and prints the offending line if there's a mismatch in the number of fields. +and prints the offending line if there's a mismatch in the number of lines/ +fields. .PP @@ -103,6 +105,10 @@ .TP .B absmax maximum of the absolute values + +.TP +.B range +the values range (max-min) .PP .SS "Textual/Numeric Grouping operations" @@ -165,6 +171,10 @@ inter-quartile range .TP +.B perc[:PERCENTILE] +percentile value \fPERCENTILE\fR (defaults to 95). + +.TP .B mode mode value (most common value) @@ -445,8 +455,8 @@ .SS "Check file structure" -Check the structure of the input file (ensure all lines -have the same number of fields): +Check the structure of the input file: ensure all lines +have the same number of fields, or expected number of lines/fields: .PP .nf .RS @@ -461,6 +471,17 @@ 13 datamash: check failed: line 5 has 2 fields (previous line had 3) fail + +$ seq 10 | paste \- \- | datamash check 2 fields 5 lines +5 lines, 2 fields + +$ seq 10 | paste \- \- | datamash check 4 fields +line 1 (2 fields): + 1 2 +datamash: check failed: line 1 has 2 fields (expecting 4) + +$ seq 10 | paste \- \- | datamash check 7 lines +datamash: check failed: input had 5 lines (expecting 7) .RE .fi .PP diff -Nru datamash-1.1.1/NEWS datamash-1.2.0/NEWS --- datamash-1.1.1/NEWS 2017-01-19 18:34:28.000000000 +0000 +++ datamash-1.2.0/NEWS 2017-08-22 23:05:48.000000000 +0000 @@ -1,3 +1,19 @@ +* Noteworthy changes in release 1.2 (2017-08-22) [stable] + +** New Features + + New operations: + perc (percentile), + range (max-min of values in group/column) + + Improved 'check' operation: + Expected number of lines/fields can be specified as parameter. + +** Improvements + + Improved bash-completion script installation path (see README for details). + + * Noteworthy changes in release 1.1.1 (2017-01-19) [stable] ** Bug fixes Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/da.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/da.gmo differ diff -Nru datamash-1.1.1/po/da.po datamash-1.2.0/po/da.po --- datamash-1.1.1/po/da.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/da.po 2017-08-22 23:08:54.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: GNU datamash 1.0.7.58\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" "PO-Revision-Date: 2016-01-10 18:00+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" @@ -20,74 +20,49 @@ "X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "skrivefejl" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Ukendt systemfejl" -#: lib/getopt.c:575 lib/getopt.c:604 -#, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: tilvalg »%s« er tvetydigt: muligheder:" - -#: lib/getopt.c:619 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: lib/getopt.c:278 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous\n" msgstr "%s: tilvalget »%s« er tvetydigt\n" -#: lib/getopt.c:654 lib/getopt.c:658 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: tilvalget »--%s« tillader ikke et argument\n" +#: lib/getopt.c:284 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: tilvalg »%s« er tvetydigt: muligheder:" -#: lib/getopt.c:667 lib/getopt.c:672 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" +#: lib/getopt.c:319 +#, fuzzy, c-format +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: ikke genkendt tilvalg »%c%s«\n" + +#: lib/getopt.c:345 +#, fuzzy, c-format +msgid "%s: option '%s%s' doesn't allow an argument\n" msgstr "%s: tilvalget »%c%s« tillader ikke et argument\n" -#: lib/getopt.c:715 lib/getopt.c:734 -#, c-format -msgid "%s: option '--%s' requires an argument\n" +#: lib/getopt.c:360 +#, fuzzy, c-format +msgid "%s: option '%s%s' requires an argument\n" msgstr "%s: tilvalget »--%s« kræver et argument\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: ikke genkendt tilvalg »--%s«\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: ikke genkendt tilvalg »%c%s«\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ugyldigt tilvalg -- »%c«\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: tilvalget kræver et argument -- »%c«\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: tilvalget »-W %s« er tvetydigt\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: tilvalget »-W %s« tillader ikke et argument\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: tilvalget »-W %s« kræver et argument\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -109,11 +84,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "»" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "«" @@ -312,25 +287,25 @@ msgstr "%s%s-argument »%s« er for stor" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "kolonnenavnet %s blev ikke fundet i inddatafilen" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Brug: %s [TILVALG] op [felt] [op felt ...]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "Udfører numerisk/streng-operationer på inddata fra standardind." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" @@ -338,7 +313,7 @@ "»op« er operationen, der skal udføres. Hvis en primær operation bruges,\n" "så skal den angives først, valgfrit fulgt af andre operationer.\n" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" @@ -346,7 +321,7 @@ "»felt« er inddatafeltet der skal bruges. »felt« kan være et tal (1=første\n" "felt), eller et feltnavn når tilvalgene -H eller --header-in anvendes.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" @@ -356,35 +331,35 @@ "af felter kan vises med en bindestreg (f.eks. 2-8). Brug kolon for\n" "operationer som kræver et par af felter (f.eks. »pcov 2:6«).\n" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "Primære operationer:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Linjefiltreringsoperationer:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Per linje-operationer:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Numerisk grupperingsoperationer:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Tekstmæssig/numerisk grupperingsoperationer:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Statistiske grupperingsoperationer:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Grupperingsindstillinger:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -392,7 +367,7 @@ " -f, --full udskriv hel inddatalinje før op-resultater\n" " (standard: udskriv kun grupperede nøgler)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" @@ -400,21 +375,21 @@ " -g, --group=X[,Y,Z] gruppér via felter X,[Y,Z];\n" " svarer til primære operation »groupby«\n" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr "" " --header-in første inddatalinje er kolonneteksthoveder\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr "" " --header-out udskriv kolonneteksthoveder som første linje\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers samme som »--header-in --header-out«\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -424,7 +399,7 @@ " dette påvirker gruppering, og " "strengoperationer\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -436,35 +411,35 @@ "igennem\n" " kanalen »sort«\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Tilvalg for filoperationer:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" " --no-strict tillad linjer med varierende antal felter\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X udfyld manglende værdier med X (standard %s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Generelle tilvalg:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" " -t, --field-separator=X brug X i stedet for TABULATOR som feltafgrænser\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm udelad NA/NaN-værdier\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -473,31 +448,31 @@ "tabulatorer)\n" " for feltafgrænsere\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr " -z, --zero-terminated afslut linjer med 0 byte, ikke nylinje\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Eksempler:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "Udskriv summen og middelværdierne fra kolonne 1:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Omdan inddata:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "For detaljeret brugsinformation og eksempler, se\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "Manualen og flere eksempler er tilgængelige på\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -506,12 +481,12 @@ "ugyldige inddata: der blev anmodt om feltet %, linje % har " "kun % felter" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s i linje % felt %: »%s«" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -522,7 +497,7 @@ "havde %);\n" "se --help for at deaktivere strict-tilstand" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -534,7 +509,7 @@ "%);\n" "se --help for at deaktivere strict-tilstand" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" @@ -543,7 +518,15 @@ "linje % (% felter):\n" " " -#: src/datamash.c:849 +#: src/datamash.c:855 +#, fuzzy, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"kontrol mislykkedes: linje % har % felter (tidligere " +"linjer havde %)" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -552,62 +535,62 @@ "kontrol mislykkedes: linje % har % felter (tidligere " "linjer havde %)" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, fuzzy, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"kontrol mislykkedes: linje % har % felter (tidligere " +"linjer havde %)" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "% linje" msgstr[1] "% linjer" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "% felt" msgstr[1] "% felter" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "allokeringsfejl for hash-hukommelsen" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "" "sorteringskommandoen er for lang (rapporter venligst dette som en fejl)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "kunne ikke køre »sort«: popen mislykkedes" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "læsefejl" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "læsefejl (ved lukning)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "afgrænseren skal være et enkelt tegn" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "manglende operationspecifikationer" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "-H eller --header-in skal bruges med navngivne kolonner" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " @@ -616,81 +599,86 @@ "inddatafejl for operation %s: felterne %,% har forskelligt " "antal elementer" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "ugyldig numerisk værdi" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "ugyldig base64-værdi" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "for mange parametre for operation %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "Spandstørrelse for strbin skal være forskellig fra nul" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, fuzzy, c-format +msgid "invalid percentile value %" +msgstr "ugyldig numerisk værdi »%s«" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "manglende felt efter operation %s" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "ugyldigt feltinterval for operation %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "ugyldigt feltpar for operation %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" msgstr "ugyldig felt »%s« for operation %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "feltinterval for %s skal være numerisk" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "manglende parameter for operation %s" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "ugyldig parameter %s for operation %s" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" msgstr "operation %s kræver feltpar" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "operation %s kan ikke bruge et par af felter" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "modstridende operation %s" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "ugyldig operation %s" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -699,42 +687,61 @@ "operation i konflikt blev registreret: forventede %s operationer, men fandt " "%s operation %s" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, fuzzy, c-format +msgid "invalid option %s for operation check" +msgstr "ugyldig parameter %s for operation %s" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "crosstab kræver præcis 2 felter, fandt %" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "crosstab understøtter netop en operation, fandt %" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "manglende operation" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "ekstra operand %s" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "manglende skript (blandt argumenter)" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" msgstr "ugyldig numerisk værdi »%s«" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "ugyldig operand %s" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "ukendt symbol %d\n" @@ -751,3 +758,18 @@ #, c-format msgid "Try '%s --help' for more information.\n" msgstr "Prøv »%s --help« for yderligere information.\n" + +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: tilvalget »--%s« tillader ikke et argument\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: ikke genkendt tilvalg »--%s«\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: tilvalget »-W %s« er tvetydigt\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: tilvalget »-W %s« tillader ikke et argument\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: tilvalget »-W %s« kræver et argument\n" diff -Nru datamash-1.1.1/po/datamash.pot datamash-1.2.0/po/datamash.pot --- datamash-1.1.1/po/datamash.pot 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/datamash.pot 2017-08-22 23:08:54.000000000 +0000 @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the GNU datamash package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GNU datamash 1.1.1\n" +"Project-Id-Version: GNU datamash 1.2\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,74 +18,49 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "" -#: lib/getopt.c:575 lib/getopt.c:604 +#: lib/getopt.c:278 #, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" +msgid "%s: option '%s%s' is ambiguous\n" msgstr "" -#: lib/getopt.c:619 +#: lib/getopt.c:284 #, c-format -msgid "%s: option '%s' is ambiguous\n" +msgid "%s: option '%s%s' is ambiguous; possibilities:" msgstr "" -#: lib/getopt.c:654 lib/getopt.c:658 +#: lib/getopt.c:319 #, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" +msgid "%s: unrecognized option '%s%s'\n" msgstr "" -#: lib/getopt.c:667 lib/getopt.c:672 +#: lib/getopt.c:345 #, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" +msgid "%s: option '%s%s' doesn't allow an argument\n" msgstr "" -#: lib/getopt.c:715 lib/getopt.c:734 +#: lib/getopt.c:360 #, c-format -msgid "%s: option '--%s' requires an argument\n" +msgid "%s: option '%s%s' requires an argument\n" msgstr "" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -107,11 +82,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "" @@ -283,102 +258,102 @@ msgstr "" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "" -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" msgstr "" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" msgstr "" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" "which require a pair of fields (e.g. 'pcov 2:6').\n" msgstr "" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" msgstr "" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" msgstr "" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr "" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr "" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr "" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" msgstr "" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -386,74 +361,74 @@ "'sort'\n" msgstr "" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr "" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" msgstr "" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr "" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " "% fields" msgstr "" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -461,7 +436,7 @@ "see --help to disable strict mode" msgstr "" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -469,198 +444,226 @@ "see --help to disable strict mode" msgstr "" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" " " msgstr "" -#: src/datamash.c:849 +#: src/datamash.c:855 +#, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " "%)" msgstr "" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "" msgstr[1] "" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "" msgstr[1] "" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " "number of items" msgstr "" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, c-format +msgid "invalid percentile value %" +msgstr "" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" msgstr "" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" msgstr "" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " "%s" msgstr "" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, c-format +msgid "invalid option %s for operation check" +msgstr "" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" msgstr "" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/de.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/de.gmo differ diff -Nru datamash-1.1.1/po/de.po datamash-1.2.0/po/de.po --- datamash-1.1.1/po/de.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/de.po 2017-08-22 23:08:54.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GNU datamash 1.0.7.58\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" "PO-Revision-Date: 2016-01-01 15:40+0100\n" "Last-Translator: Mario Blättermann \n" "Language-Team: German \n" @@ -19,74 +19,49 @@ "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Poedit 1.8.5\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "Schreibfehler" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Unbekannter Systemfehler" -#: lib/getopt.c:575 lib/getopt.c:604 -#, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: Die Option »%s« ist nicht eindeutig; möglich wären:" - -#: lib/getopt.c:619 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: lib/getopt.c:278 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous\n" msgstr "%s: Die Option »%s« ist nicht eindeutig\n" -#: lib/getopt.c:654 lib/getopt.c:658 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: Die Option »--%s« erlaubt kein Argument\n" +#: lib/getopt.c:284 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: Die Option »%s« ist nicht eindeutig; möglich wären:" -#: lib/getopt.c:667 lib/getopt.c:672 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" +#: lib/getopt.c:319 +#, fuzzy, c-format +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: Unbekannte Option »%c%s«\n" + +#: lib/getopt.c:345 +#, fuzzy, c-format +msgid "%s: option '%s%s' doesn't allow an argument\n" msgstr "%s: Die Option »%c%s« erlaubt kein Argument\n" -#: lib/getopt.c:715 lib/getopt.c:734 -#, c-format -msgid "%s: option '--%s' requires an argument\n" +#: lib/getopt.c:360 +#, fuzzy, c-format +msgid "%s: option '%s%s' requires an argument\n" msgstr "%s: Die Option »%s« benötigt ein Argument\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: Unbekannte Option »--%s«\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: Unbekannte Option »%c%s«\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: Ungültige Option -- %c\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: Die Option benötigt ein Argument -- »%c«\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: Die Option »-W %s« ist nicht eindeutig\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: Die Option »-W %s« erlaubt kein Argument\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: Die Option »-W %s« benötigt ein Argument\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -108,11 +83,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "»" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "«" @@ -308,27 +283,27 @@ msgstr "%s%s Argument »%s« zu groß" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "Spaltenname %s wurde in der Eingabedatei nicht gefunden" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Aufruf: %s [OPTION] op [Feld] [op Feld …]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "" "Führt numerische bzw. Stringoperationen für Eingaben aus der Standardeingabe " "aus." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" @@ -338,7 +313,7 @@ "diese zuerst angegeben werden, gefolgt von anderen (optionalen) " "Operationen.\n" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" @@ -347,7 +322,7 @@ "(1=erstes Feld), oder ein Feldname, wenn die Optionen -H oder --header-in\n" "verwendet werden.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" @@ -357,35 +332,35 @@ "Ein Feldbereich kann mit Minuszeichen angegeben werden (z.B. 2-8).\n" "Ein Doppelpunkt gibt Feldpaare an (z.B. »pcov 2:6«).\n" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "Primäre Operationen:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Operationen zur Zeilenfilterung:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Zeilenweise Operationen:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Optionen zur numerischen Gruppierung:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Optionen zur textuellen/numerischen Gruppierung:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Optionen zur statistischen Gruppierung:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Gruppierungsoptionen:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -395,7 +370,7 @@ " ergebnissen aus (Voreinstellung: nur die\n" " gruppierten Schlüssel werden ausgegeben)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" @@ -404,21 +379,21 @@ " gleichbedeutend mit der primären Operation " "»groupby«\n" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr "" " --header-in erste Eingabezeile ist die Spaltenüberschrift\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr "" " --header-out gibt Spaltenüberschriften als erste Zeile aus\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers gleich wie »--header-in --header-out«\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -429,7 +404,7 @@ "Stringoperationen\n" " wirksam\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -442,37 +417,37 @@ "»sort«\n" " nicht mehr nötig\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Optionen für Dateioperationen:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" " --no-strict erlaubt Zeilen mit unterschiedlicher Feldanzahl\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X ersetzt fehlende Werte durch X\n" " (Voreinstellung ist %s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Allgemeine Optionen:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" " -t, --field-separator=X verwendet X anstelle von Tabulatoren\n" " als Feldtrenner\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm NA/NaN-Werte überspringen\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -481,35 +456,35 @@ "Leerzeichen\n" " und/oder Tabulatoren) für Feldtrenner\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr "" " -z, --zero-terminated beendet Zeilen mit einem Null-Byte, nicht\n" " mit einem Zeilenumbruch\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Beispiele:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "Die Summe und den Median der Werte aus Spalte 1 ausgeben:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Transponierte Eingabe:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "" "Detaillierte Informationen zur Verwendung und Beispiele\n" "finden Sie unter\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "Das Handbuch und weitere Beispiele sind verfügbar auf\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -518,12 +493,12 @@ "Ungültige Eingabe: Feld % angefragt, Zeile % hat aber nur " "% Felder" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s in Zeile %, Feld %: »%s«" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -534,7 +509,7 @@ "(vorherige Zeilen hatten % Felder);\n" "siehe --help für den strikten Modus" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -546,7 +521,7 @@ "Zeilen hatten %) Felder);\n" "siehe --help für den strikten Modus" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" @@ -555,7 +530,15 @@ "Zeile % (% Felder):\n" " " -#: src/datamash.c:849 +#: src/datamash.c:855 +#, fuzzy, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"Überprüfung fehlgeschlagen: Zeile % hat % Felder (vorige " +"Zeile hatte %)" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -564,61 +547,61 @@ "Überprüfung fehlgeschlagen: Zeile % hat % Felder (vorige " "Zeile hatte %)" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, fuzzy, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"Überprüfung fehlgeschlagen: Zeile % hat % Felder (vorige " +"Zeile hatte %)" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "% Zeile" msgstr[1] "% Zeilen" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "% Feld" msgstr[1] "% Felder" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "Speicherreservierung gescheitert" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "Sortierbefehl ist zu lang (bitte melden Sie dies als Fehler)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "»sort« kann nicht gestartet werden: »popen« fehlgeschlagen" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "Lesefehler" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "Lesefehler (beim Schließen)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "Trennzeichen muss ein einzelnes Zeichen sein" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "Operationsbezeichner fehlen" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "-H oder --header-in muss mit benannten Spalten verwendet werden" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " @@ -627,81 +610,86 @@ "Eingabefehler für Operation %s: Felder %,% haben " "unterschiedliche Anzahl der Einträge" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "Ungültiger numerischer Wert" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "Ungültiger Base64-Wert" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "Zu viele Parameter für Operation %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "Strbin-Bucket-Größe darf nicht Null sein" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, fuzzy, c-format +msgid "invalid percentile value %" +msgstr "Ungültiger numerischer Wert »%s«" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "Feld für Operation %s fehlt" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "Ungültiger Feldbereich für die Operation %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "Ungültiges Feldpaar für die Operation %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" msgstr "Ungültiges Feld »%s« für die Operation %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "Feldbereich für %s muss numerisch sein" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "Parameter für Operation %s fehlt" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "Ungültiger Parameter Spalte %s für Operation %s" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" msgstr "Option %s benötigt Feldpaare" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "Operation %s kann keine Feldpaare verarbeiten" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "Operationskonflikt für %s" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "Ungültige Operation %s" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -710,42 +698,61 @@ "Widersprüchliche Operationen gefunden: %s Operationen wurden erwartet, aber " "%s Operationen %s gefunden" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, fuzzy, c-format +msgid "invalid option %s for operation check" +msgstr "Ungültiger Parameter Spalte %s für Operation %s" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "Crosstab benötigt genau zwei Felder, % wurden gefunden" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "Crosstab unterstützt eine Operation, % wurden gefunden" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "Operation fehlt" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "Zusätzlicher Operand %s" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "Fehlendes Skript (zwischen Argumenten)" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" msgstr "Ungültiger numerischer Wert »%s«" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "Ungültiger Operand %s" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "Unbekannter Token %d\n" @@ -762,3 +769,18 @@ #, c-format msgid "Try '%s --help' for more information.\n" msgstr "»%s --help« gibt weitere Informationen.\n" + +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: Die Option »--%s« erlaubt kein Argument\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: Unbekannte Option »--%s«\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: Die Option »-W %s« ist nicht eindeutig\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: Die Option »-W %s« erlaubt kein Argument\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: Die Option »-W %s« benötigt ein Argument\n" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/eo.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/eo.gmo differ diff -Nru datamash-1.1.1/po/eo.po datamash-1.2.0/po/eo.po --- datamash-1.1.1/po/eo.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/eo.po 2017-08-22 23:08:54.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GNU datamash 1.0.7.58\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" "PO-Revision-Date: 2016-10-13 22:38-0300\n" "Last-Translator: Felipe Castro \n" "Language-Team: Esperanto \n" @@ -20,74 +20,49 @@ "X-Generator: Poedit 1.5.4\n" "X-Poedit-SourceCharset: UTF-8\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "skrib-eraro" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Nekonata sistem-eraro" -#: lib/getopt.c:575 lib/getopt.c:604 -#, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: modifilo '%s' estas plursenca; eblecoj:" - -#: lib/getopt.c:619 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: lib/getopt.c:278 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous\n" msgstr "%s: modifilo '%s' estas plursenca\n" -#: lib/getopt.c:654 lib/getopt.c:658 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: modifilo '--%s' ne permesas argumenton\n" +#: lib/getopt.c:284 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: modifilo '%s' estas plursenca; eblecoj:" -#: lib/getopt.c:667 lib/getopt.c:672 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" +#: lib/getopt.c:319 +#, fuzzy, c-format +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: nerekonata modifilo '%c%s'\n" + +#: lib/getopt.c:345 +#, fuzzy, c-format +msgid "%s: option '%s%s' doesn't allow an argument\n" msgstr "%s: modifilo '%c%s' ne permesas argumenton\n" -#: lib/getopt.c:715 lib/getopt.c:734 -#, c-format -msgid "%s: option '--%s' requires an argument\n" +#: lib/getopt.c:360 +#, fuzzy, c-format +msgid "%s: option '%s%s' requires an argument\n" msgstr "%s: modifilo '--%s' postulas argumenton\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: nerekonata modifilo '--%s'\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: nerekonata modifilo '%c%s'\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: malvalida modifilo -- '%c'\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: modifilo postulas argumenton -- '%c'\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: modifilo '-W %s' estas plursenca\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: modifilo '-W %s' ne permesas argumenton\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: modifilo '-W %s' postulas argumenton\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -109,11 +84,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "‘" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "’" @@ -312,25 +287,25 @@ msgstr "%s%s-argumento '%s' tro larĝas" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "kolumna nomo %s ne estis trovata en enig-dosiero" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Uzmaniero: %s [MODIFILO] op [kmp] [op kmp ...]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "Faras numerajn/ĉenajn operaciojn sur la enigo el la ĉefenigujo." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" @@ -338,7 +313,7 @@ "'op' estas la farota operacio. Se unua-ranga operacio estas uzata,\n" "ĝi devas esti listata unue, nedevige sekvata de aliaj operacioj.\n" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" @@ -347,7 +322,7 @@ "kampo),\n" "aŭ kamp-nomo dum uzo de modifiloj -H aŭ --header-in.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" @@ -357,35 +332,35 @@ "kampoj povas esti listataj per strekteto( ekz. 2-8). Uzu dupunktojn por\n" "operacioj kiuj postulas paron da kampoj (ekz. 'pcov 2:6').\n" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "Unua-rangaj operacioj:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Lini-filtraj operacioj:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Po-liniaj operacioj:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Numeraj grupigaj operacioj:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Tekstaj/numeraj grupigaj operacioj:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Statistikaj grupigaj operacioj:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Grupigaj modifiloj:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -394,7 +369,7 @@ "rezultoj\n" " (apriore: montri nur la grupitajn ŝlosilojn)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" @@ -402,20 +377,20 @@ " -g, --group=X[,Y,Z] grupigi laŭ kampoj X,[Y,Z];\n" " ekvivalenta al unua-ranga operacio 'groupby'\n" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr " --header-in unua enig-linio estas la kolumnaj kapoj\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr "" " --header-out montri kolumnajn kapojn kiel unuan linion\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers same ol '--header-in --header-out'\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -424,7 +399,7 @@ " tio ĉi influas grupigon, kaj ĉenajn " "operaciojn\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -435,35 +410,35 @@ "forigas la\n" " neceson mem dukti la enigon tra 'sort'\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Dosier-operaciaj modifiloj:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" " --no-strict permesas liniojn kun variebla nombro da kampoj\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X kompletigas mankantajn valorojn per X (aprioras " "%s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Ĝeneralaj modifiloj:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr " -t, --field-separator=X uzu X antataŭ TAB kiel kamp-disigilo\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm pretersalti valorojn NA/NaN\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -472,32 +447,32 @@ "aŭ taboj)\n" " por kamp-disigiloj\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr "" " -z, --zero-terminated fini liniojn per la bajto 0, ne novlini-signo\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Ekzemploj:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "Montri la sumon kaj la meznombran valoron el kolumno 1:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Transponi la enigon:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "Por detala uzmaniera informo kaj ekzemploj, konsultu\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "La gvidilo kaj pli ekzemploj disponeblas ĉe\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -506,12 +481,12 @@ "malvalida enigo: kampo % postulata, linio % havas nur " "% kampojn" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s en linio % kampo %: '%s'" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -522,7 +497,7 @@ "linioj havis %);\n" "konsultu --help por malebligi severan reĝimon" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -533,7 +508,7 @@ "linioj havis %);\n" "konsultu --help por malebligi severan reĝimon" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" @@ -542,7 +517,15 @@ "linio % (% kampoj):\n" " " -#: src/datamash.c:849 +#: src/datamash.c:855 +#, fuzzy, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"kontrolo malsukcesis: linio % havas % kampojn (antaŭa " +"linio havis %)" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -551,61 +534,61 @@ "kontrolo malsukcesis: linio % havas % kampojn (antaŭa " "linio havis %)" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, fuzzy, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"kontrolo malsukcesis: linio % havas % kampojn (antaŭa " +"linio havis %)" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "% linio" msgstr[1] "% linioj" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "% kampo" msgstr[1] "% kampoj" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "eraro de rezervo por haket-memoro" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "ordiga komando tro longas (bonvole raportu tiun ĉi program-mison)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "malsukcesis lanĉi 'sort': popen fiaskis" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "leg-eraro" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "leg-eraro (dum fermo)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "la disigilo devas esti ununura signo" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "mankas operaciaj indikiloj" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "-H aŭ --header-in devas esti uzataj kun nomigitaj kolumnoj" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " @@ -614,81 +597,86 @@ "eniga eraro por operacio %s: kampoj %,% havas malsamaj " "numbro da eroj" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "malvalida cifera valoro" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "malvalida valoro base64" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "tro multaj parametroj por la operacio %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "Grando de forgesujo 'strbin' ne devas esti nula" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, fuzzy, c-format +msgid "invalid percentile value %" +msgstr "malvalida cifera valoro '%s'" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "mankas kampo por la operacio %s" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "malvalidaj kamp-limoj por la operacio %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "malvalida paro da kampoj por la operacio %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" msgstr "malvalida kampo '%s' por la operacio %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "kampaj limoj por %s devas esti cifera" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "mankas parametro por la operacio %s" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "malvalida parametro %s por la operacio %s" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" msgstr "operacio %s postulas paron da kampoj" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "operacio %s ne povas uzi paro da kampoj" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "malakorda operacio %s" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "malvalida operacio %s" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -697,42 +685,61 @@ "konfliktanta operacio estis trovata: ni atendis operaciojn %s, sed trovis %s " "operacio %s" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, fuzzy, c-format +msgid "invalid option %s for operation check" +msgstr "malvalida parametro %s por la operacio %s" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "'crosstab' postulas precize 2 kampojn, ni trovis %" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "'crosstab' subtenas unu operacion, ni trovis %" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "mankas operacion" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "kroma operando %s" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "mankas skripto (inter argumentoj)" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" msgstr "malvalida cifera valoro '%s'" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "malvalida operando %s" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "nekonata ĵetono %d\n" @@ -750,6 +757,21 @@ msgid "Try '%s --help' for more information.\n" msgstr "Provu '%s --help' por pli da informo.\n" +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: modifilo '--%s' ne permesas argumenton\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: nerekonata modifilo '--%s'\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: modifilo '-W %s' estas plursenca\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: modifilo '-W %s' ne permesas argumenton\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: modifilo '-W %s' postulas argumenton\n" + #~ msgid "'op' is the operation to perform;\n" #~ msgstr "'op' estas la farota operacio;\n" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/fr.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/fr.gmo differ diff -Nru datamash-1.1.1/po/fr.po datamash-1.2.0/po/fr.po --- datamash-1.1.1/po/fr.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/fr.po 2017-08-22 23:08:54.000000000 +0000 @@ -1,14 +1,14 @@ # Messages français pour datamash -# Copyright (C) 2016 Free Software Foundation, Inc. +# Copyright (C) 2017 Free Software Foundation, Inc. # This file is distributed under the same license as the datamash package. -# Frédéric Marchal , 2015. +# Frédéric Marchal , 2017. # msgid "" msgstr "" -"Project-Id-Version: GNU datamash 1.0.7.58\n" +"Project-Id-Version: GNU datamash 1.1.1.19\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" -"PO-Revision-Date: 2016-01-01 20:15+0100\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" +"PO-Revision-Date: 2017-08-12 14:10+0200\n" "Last-Translator: Frédéric Marchal \n" "Language-Team: French \n" "Language: fr\n" @@ -16,76 +16,51 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=(n >= 2);\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "erreur d'écriture" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Erreur système inconnue" -#: lib/getopt.c:575 lib/getopt.c:604 +#: lib/getopt.c:278 #, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: l'option « %s » est ambiguë. Les possibilités sont:" +msgid "%s: option '%s%s' is ambiguous\n" +msgstr "%s: l'option « %s%s » est ambiguë\n" -#: lib/getopt.c:619 +#: lib/getopt.c:284 #, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: l'option « %s » est ambiguë\n" +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: l'option « %s%s » est ambiguë. Les possibilités sont:" -#: lib/getopt.c:654 lib/getopt.c:658 +#: lib/getopt.c:319 #, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: l'option « --%s » n'admet pas d'argument\n" +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: option « %s%s » non reconnue\n" -#: lib/getopt.c:667 lib/getopt.c:672 +#: lib/getopt.c:345 #, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: l'option « %c%s » n'admet pas d'argument\n" +msgid "%s: option '%s%s' doesn't allow an argument\n" +msgstr "%s: l'option « %s%s » n'admet pas d'argument\n" -#: lib/getopt.c:715 lib/getopt.c:734 +#: lib/getopt.c:360 #, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: l'option « --%s » requiert un argument\n" +msgid "%s: option '%s%s' requires an argument\n" +msgstr "%s: l'option « %s%s » requiert un argument\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: option « --%s » non reconnue\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: option « %c%s » non reconnue\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: option invalide -- « %c »\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: l'option requiert un argument -- « %c »\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: l'option « -W %s » est ambiguë\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: l'option « -W %s » n'admet pas d'argument\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: l'option « -W %s » requiert un argument\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -107,11 +82,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "« " -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr " »" @@ -313,27 +288,27 @@ msgstr "argument de %s%s « %s » trop grand" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "nom de colonne %s pas trouvé dans le fichier d'entrée" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Usage: %s [OPTION] op [fld] [op col ...]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "" "Réalise des opérations numériques/textuelles sur des entrées provenant de " "stdin." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" @@ -342,7 +317,7 @@ "elle doit être listée en premier. Elle peut être suivie d'autres " "opérations.\n" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" @@ -351,7 +326,7 @@ "(1=premier champ),\n" "ou un nom de champ lorsque les options -H ou --header-in sont utilisés.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" @@ -364,35 +339,35 @@ "pour les opérations qui requièrent une paire de champs (par ex « pcov " "2:6 »).\n" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "Opérations primaires:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Opérations de filtrage des lignes:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Opérations sur les lignes:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Opérations de groupement numériques:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Opérations de groupement Textuels/Numériques:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Opérations de groupement statistiques:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Options de groupement:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -402,7 +377,7 @@ " (par défaut: afficher uniquement les clés " "groupées)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" @@ -410,23 +385,23 @@ " -g, --group=X[,Y,Z] groupe selon les champs X,[Y,Z];\n" " équivalent à l'opération primaire « groupby »\n" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr "" " --header-in la première ligne d'entrée est un en-tête de " "colonnes\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr "" " --header-out afficher les en-têtes des colonnes en première " "ligne\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers identique à « --header-in --header-out »\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -436,7 +411,7 @@ " ceci affecte le groupement et les opérations " "textuelles\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -449,38 +424,38 @@ "entrées avec\n" " « sort »\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Options des opérations sur les fichiers:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" " --no-strict accepter des lignes avec des nombres variables " "de champs\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X remplir les valeurs manquantes avec X (%s par " "défaut)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Options générales:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" " -t, --field-separator=X utiliser X au lieu de la tabulation comme " "délimiteur de champs\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm passe outre les valeurs NA/NaN\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -489,35 +464,35 @@ "tabulations)\n" " comme délimiteurs de champs\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr "" " -z, --zero-terminated terminer les lignes avec l'octet 0, pas un saut " "de ligne\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Exemples:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "Afficher la somme et la moyenne des valeurs de la colonne 1:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Transposer l'entrée:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "" "Pour des informations détaillées sur l'utilisation et des exemples, " "consultez\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "Le manuel et plus d'exemples sont disponibles sur\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -526,12 +501,12 @@ "entrée invalide: champ % requis, ligne % a seulement " "% champs" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s à la ligne % champ %: « %s »" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -542,7 +517,7 @@ "(les lignes précédentes en avaient %);\n" "voyez --help pour désactiver le mode strict" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -553,7 +528,7 @@ "champs (les lignes précédentes en avaient %);\n" "voyez --help pour désactiver le mode strict" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" @@ -562,7 +537,15 @@ "ligne % (% champs):\n" " " -#: src/datamash.c:849 +#: src/datamash.c:855 +#, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"échec de vérification: ligne % a % champs (% " +"attendus)" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -571,61 +554,61 @@ "échec de vérification: ligne % a % champs (ligne " "précédente avait %)" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"échec de vérification: l'entrée avait % lignes (% " +"attendues)" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "% ligne" msgstr[1] "% lignes" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "% champ" msgstr[1] "% champs" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "erreur d'allocation de la mémoire de hachage" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "commande tri trop longue (veuillez signaler ce bogue)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "échec à l'exécution de « sort »: popen a échoué" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "erreur de lecture" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "erreur de lecture (à la fermeture)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "le délimiteur doit être un caractère unique" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "spécificateurs d'opération manquant" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "-H ou --header-in doit être utilisé avec des colonnes nommées" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " @@ -634,81 +617,86 @@ "erreur d'entrée pour l'opération %s: les champs %,% ont " "des nombres différents d'éléments" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "valeur numérique invalide" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "valeur base64 invalide" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "trop de paramètres pour l'opération %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "la taille des godets strbin ne doit pas être zéro" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, c-format +msgid "invalid percentile value %" +msgstr "valeur centile % invalide" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "champ manquant pour l'opération %s" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "plage de champs invalide pour l'opération %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "paire de champs invalide pour l'opération %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" msgstr "champ « %s » invalide pour l'opération %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "la plage de champs pour %s doit être numérique" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "paramètre manquant pour l'opération %s" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "paramètre %s invalide pour l'opération %s" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" msgstr "l'opération %s requiert des paires de champs" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "l'opération %s ne peut pas utiliser de paire de champs" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "opération %s conflictuelle" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "opération %s invalide" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -717,42 +705,61 @@ "opération conflictuelle rencontrée: opérations « %s » attendues mais " "opération « %s » %s trouvée" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, c-format +msgid "invalid option %s for operation check" +msgstr "option %s invalide pour la vérification de l'opération" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "nombre attendu après l'option dans l'opération « check »" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "valeur zéro invalide pour les lignes/champs dans l'opération « check »" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "nombre de lignes/rang déjà défini dans l'opération « check »" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "nombre de champs/colonne déjà défini dans l'opération « check »" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "crosstab requiert exactement 2 champs, % trouvés" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "crosstab supporte une opération, % trouvée" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "opération manquante" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "opérande en trop après %s" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "script manquant (parmi les arguments)" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" msgstr "valeur numérique invalide « %s »" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "opérande « %s » invalide" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "jeton %d inconnu\n" @@ -770,6 +777,21 @@ msgid "Try '%s --help' for more information.\n" msgstr "Essayez « %s --help » pour plus d'informations.\n" +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: l'option « --%s » n'admet pas d'argument\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: option « --%s » non reconnue\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: l'option « -W %s » est ambiguë\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: l'option « -W %s » n'admet pas d'argument\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: l'option « -W %s » requiert un argument\n" + #~ msgid "'op' is the operation to perform;\n" #~ msgstr "« op » est l'opération à réaliser;\n" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/nb.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/nb.gmo differ diff -Nru datamash-1.1.1/po/nb.po datamash-1.2.0/po/nb.po --- datamash-1.1.1/po/nb.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/nb.po 2017-08-22 23:08:54.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GNU datamash 1.0.6.54\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" "PO-Revision-Date: 2015-07-11 09:36+0100\n" "Last-Translator: Johnny A. Solbu \n" "Language-Team: Norwegian Bokmaal \n" @@ -19,74 +19,49 @@ "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 1.5.7\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "skrivefeil" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Ukjent systemfeil" -#: lib/getopt.c:575 lib/getopt.c:604 -#, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: valget «%s» er tvetydig; muligheter:" - -#: lib/getopt.c:619 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: lib/getopt.c:278 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous\n" msgstr "%s: valget «%s» er flertydig\n" -#: lib/getopt.c:654 lib/getopt.c:658 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: valg «--%s» tillater ikke argument\n" +#: lib/getopt.c:284 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: valget «%s» er tvetydig; muligheter:" -#: lib/getopt.c:667 lib/getopt.c:672 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" +#: lib/getopt.c:319 +#, fuzzy, c-format +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: ukjent valg «%c%s»\n" + +#: lib/getopt.c:345 +#, fuzzy, c-format +msgid "%s: option '%s%s' doesn't allow an argument\n" msgstr "%s: valg «%c%s» tillater ikke et argument\n" -#: lib/getopt.c:715 lib/getopt.c:734 -#, c-format -msgid "%s: option '--%s' requires an argument\n" +#: lib/getopt.c:360 +#, fuzzy, c-format +msgid "%s: option '%s%s' requires an argument\n" msgstr "%s: valg «--%s» behøver et argument\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: ukjent valg «--%s»\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: ukjent valg «%c%s»\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ugyldig alternativ -- «%c»\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: valget trenger et argument -- «%c»\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: valget '-W %s' er tvetydig\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: valg «-W %s» tillater ikke et argument\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: valg «-W %s» trenger et argument\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -108,11 +83,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "«" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "»" @@ -310,31 +285,31 @@ msgstr "%s%s-argument »%s« er for stort" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "kolonnenavnet %s ble ikke funnet i inndatafilen" -#: src/datamash.c:164 +#: src/datamash.c:165 #, fuzzy, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Bruk: %s [VALG] op [col] [op col ...]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "Utfører numerisk/strengoperasjoner på inndata fra standard inn." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" msgstr "" -#: src/datamash.c:173 +#: src/datamash.c:174 #, fuzzy msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" @@ -345,43 +320,43 @@ "«col» kan være et tall (1=første felt), eller et kolonnenavn når du bruker\n" "-H eller --header-in.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" "which require a pair of fields (e.g. 'pcov 2:6').\n" msgstr "" -#: src/datamash.c:181 +#: src/datamash.c:182 #, fuzzy msgid "Primary operations:\n" msgstr "Per-linje-operasjoner:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Linjefiltreringsoperasjoner:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Per-linje-operasjoner:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Numerisk grupperingsoperasjoner:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Tekstlig/numerisk grupperingsoperasjoner:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Statistisk grupperingsoperasjoner:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "grupperingsvalg:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -390,27 +365,27 @@ " (standard: skriv ut bare de grupperte " "nøklene)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" msgstr "" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr "" " --header-in første inndatalinje er kolonnetopptekster\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr "" " --header-out skriv ut kolonnetopptekster som første linje\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers samme som «--header-in --header-out»\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -420,7 +395,7 @@ " dette påvirker gruppering og " "strengoperasjoner\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -431,33 +406,33 @@ " behovet for å manuellt omdirigere inndata " "gjennom «sort»\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Filoperasjonsvalg:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr " --no-strict tillat linjer med varierende antall felt\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X fyll manglende verdier med X (standard %s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Generelle valg:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr " -t, --field-separator=X bruk X istedenfor TAB som feltskilletegn\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm hopp over NA/NaN-verdier\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -466,32 +441,32 @@ "eller tabulatorer)\n" " for feltskilletegn\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr "" " -z, --zero-terminated avslutt linjer med 0 byte, ikke linjeskift\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Eksempler:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "Skriv ut summen og gjennomsnittet av verdiene fra kolonne 1:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Transponere inndata:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "For detaljert bruksinformasjon og eksempler, se\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "Manualen og flere eksempler finnes på\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -500,12 +475,12 @@ "ugyldig inngang: feltet % etterspurt, linje % har bare " "% felt" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s i linje % felt %: «%s»" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -516,7 +491,7 @@ "linjer hadde %);\n" "se --help for å deaktivere streng modus" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -527,14 +502,23 @@ "(foregående linjer hadde %);\n" "se --help for å deaktivere streng modus" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, fuzzy, c-format msgid "" "line % (% fields):\n" " " msgstr "%s i linje % felt %: «%s»" -#: src/datamash.c:849 +#: src/datamash.c:855 +#, fuzzy, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"transponere inndatafeil: linje % har % felt (foregående " +"linjer hadde %);\n" +"se --help for å deaktivere streng modus" + +#: src/datamash.c:878 #, fuzzy, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -544,142 +528,148 @@ "linjer hadde %);\n" "se --help for å deaktivere streng modus" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, fuzzy, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"transponere inndatafeil: linje % har % felt (foregående " +"linjer hadde %);\n" +"se --help for å deaktivere streng modus" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "" msgstr[1] "" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "" msgstr[1] "" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "hashminnetildelingsfeil" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "sort-kommandoen for lang (vennligst rapporter denne feilen)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "mislyktes i å kjøre «sort»: popen feilet" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "lesefeil" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "lesefeil (ved lukking)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "skilletegnet må være et enkelt tegn" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "manglende operasjonsangivelser" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "-H or --header-in må brukes med navngitte kolonner" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " "number of items" msgstr "" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "ugyldig numerisk verdi" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "ugyldig base64-verdi" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, fuzzy, c-format msgid "too many parameters for operation %s" msgstr "ugyldig kolonne «%s» for operasjon %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, fuzzy, c-format +msgid "invalid percentile value %" +msgstr "ugyldig numerisk verdi" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, fuzzy, c-format msgid "missing field for operation %s" msgstr "manglende feltnummer etter operasjon '%s'" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, fuzzy, c-format msgid "invalid field range for operation %s" msgstr "ugyldig tom kolonne for operasjon %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, fuzzy, c-format msgid "invalid field pair for operation %s" msgstr "ugyldig kolonne «%s» for operasjon %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, fuzzy, c-format msgid "invalid field '%s' for operation %s" msgstr "ugyldig kolonne «%s» for operasjon %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, fuzzy, c-format msgid "missing parameter for operation %s" msgstr "manglende feltnummer etter operasjon '%s'" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, fuzzy, c-format msgid "invalid parameter %s for operation %s" msgstr "ugyldig kolonne «%s» for operasjon %s" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, fuzzy, c-format msgid "operation %s requires field pairs" msgstr "%s: valg «--%s» behøver et argument\n" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, fuzzy, c-format msgid "conflicting operation %s" msgstr "Ugyldig operasjon «%s»" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, fuzzy, c-format msgid "invalid operation %s" msgstr "Ugyldig operasjon «%s»" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -688,42 +678,62 @@ "motstridende operasjon funnet: forventer %s operasjoner, men fant %s " "operasjon %s" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, fuzzy, c-format +msgid "invalid option %s for operation check" +msgstr "ugyldig kolonne «%s» for operasjon %s" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "" -#: src/op-parser.c:559 -#, fuzzy, c-format +#: src/op-parser.c:650 +#, fuzzy msgid "missing operation" msgstr "manglende operasjonsangivelser" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, fuzzy, c-format msgid "extra operand %s" msgstr "ekstra operand-er etter «%s»" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, fuzzy, c-format msgid "invalid numeric value '%s'" msgstr "ugyldig numerisk verdi" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, fuzzy, c-format msgid "invalid operand %s" msgstr "Ugyldig operasjon «%s»" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "" @@ -741,6 +751,21 @@ msgid "Try '%s --help' for more information.\n" msgstr "Prøv «%s --help» for mer informasjon.\n" +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: valg «--%s» tillater ikke argument\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: ukjent valg «--%s»\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: valget '-W %s' er tvetydig\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: valg «-W %s» tillater ikke et argument\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: valg «-W %s» trenger et argument\n" + #~ msgid "'op' is the operation to perform;\n" #~ msgstr "«op» er operasjonen som skal utføres;\n" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/nl.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/nl.gmo differ diff -Nru datamash-1.1.1/po/nl.po datamash-1.2.0/po/nl.po --- datamash-1.1.1/po/nl.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/nl.po 2017-08-22 23:08:54.000000000 +0000 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: datamash-1.0.7.58\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" "PO-Revision-Date: 2016-08-09 19:49+0200\n" "Last-Translator: Benno Schulenberg \n" "Language-Team: Dutch \n" @@ -21,74 +21,49 @@ "X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "schrijffout" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Onbekende systeemfout" -#: lib/getopt.c:575 lib/getopt.c:604 -#, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: optie '%s' is niet eenduidig; mogelijkheden zijn:" - -#: lib/getopt.c:619 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: lib/getopt.c:278 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous\n" msgstr "%s: optie '%s' is niet eenduidig\n" -#: lib/getopt.c:654 lib/getopt.c:658 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: optie '--%s' staat geen argument toe\n" +#: lib/getopt.c:284 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: optie '%s' is niet eenduidig; mogelijkheden zijn:" -#: lib/getopt.c:667 lib/getopt.c:672 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" +#: lib/getopt.c:319 +#, fuzzy, c-format +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: onbekende optie '%c%s'\n" + +#: lib/getopt.c:345 +#, fuzzy, c-format +msgid "%s: option '%s%s' doesn't allow an argument\n" msgstr "%s: optie '%c%s' staat geen argument toe\n" -#: lib/getopt.c:715 lib/getopt.c:734 -#, c-format -msgid "%s: option '--%s' requires an argument\n" +#: lib/getopt.c:360 +#, fuzzy, c-format +msgid "%s: option '%s%s' requires an argument\n" msgstr "%s: optie '--%s' vereist een argument\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: onbekende optie '--%s'\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: onbekende optie '%c%s'\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ongeldige optie -- '%c'\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: optie vereist een argument -- '%c'\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: optie '-W %s' is niet eenduidig\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: optie '-W %s' staat geen argument toe\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: optie '-W %s' vereist een argument\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -110,11 +85,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "‘" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "’" @@ -316,25 +291,25 @@ msgstr "argument '%3$s' van %1$s%2$s is te groot" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "kolomnaam %s niet gevonden in invoerbestand" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Gebruik: %s [OPTIE...] OPERATIE [VELD] [OPERATIE VELD ...]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "Voert numerieke of tekenreeksbewerkingen uit op standaardinvoer." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" @@ -342,7 +317,7 @@ "OPERATIE is de te verrichten bewerking. Een primaire bewerking moet\n" "als eerste gegeven worden, eventueel gevolgd door andere bewerkingen.\n" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" @@ -351,7 +326,7 @@ "veld),\n" "of een veldnaam wanneer optie '-H' of '--header-in' gebruikt wordt.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" @@ -363,35 +338,35 @@ "voor\n" "bewerkingen die een veldenpaar vereisen (bijv. 'pcov 2:6').\n" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "Primaire bewerkingen:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Regelfilterbewerkingen:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Per-regel-bewerkingen:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Numerieke groeperingsbewerkingen:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Tekstuele en numerieke groeperingsbewerkingen:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Statistische groeperingsbewerkingen:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Groeperingsopties:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -400,7 +375,7 @@ "bewerkingsresultaten\n" " (standaard alleen de gegroepeerde sleutels)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" @@ -408,19 +383,19 @@ " -g, --group=X[,Y,Z] groeperen via de velden X,[Y,Z]; dit is\n" " hetzelfde als primaire bewerking 'groupby'\n" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr " --header-in eerste invoerregel zijn kolomkoppen\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr " --header-out kolomkoppen weergeven als eerste regel\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers hetzelfde als '--header-in --header-out'\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -431,7 +406,7 @@ "op\n" " groeperingen en tekenreeksbewerkingen\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -442,37 +417,37 @@ "maakt\n" " het handmatig door 'sort' sluizen overbodig\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Bestandsbewerkingsopties:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" " --no-strict regels met een variërend aantal velden toestaan\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=WAARDE ontbrekende waarden opvullen met deze (standaard " "%s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Algemene opties:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" " -t, --field-separator=X dit teken als veldscheider gebruiken i.p.v. tab\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr "" " --narm de waarden 'NA', 'N/A' en 'NaN' overslaan\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -480,33 +455,33 @@ " -W, --whitespace witruimte gebruiken om velden te scheiden\n" " (één of meer spaties en/of tabs) \n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr "" " -z, --zero-terminated regels afsluiten met 0-byte, niet met " "nieuweregel\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Voorbeelden:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "De som en het gemiddelde van de waarden in kolom 1 weergeven:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "De invoer transponeren:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "Voor gedetailleerde gebruiksinformatie en voorbeelden, zie\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "De handleiding en meer voorbeelden zijn beschikbaar op\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -515,12 +490,12 @@ "ongeldige invoer: veld % werd gevraagd, maar regel % heeft " "slechts % velden" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s in regel %, veld %: '%s'" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -531,7 +506,7 @@ "(eerdere regels hadden er %);\n" "zie --help om strikte modus uit schakelen" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -542,7 +517,7 @@ "(eerdere regels hadden er %);\n" "zie --help om strikte modus uit schakelen" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" @@ -551,7 +526,15 @@ "regel % (% velden):\n" " " -#: src/datamash.c:849 +#: src/datamash.c:855 +#, fuzzy, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"controle is mislukt: regel % heeft % velden (eerdere " +"regels hadden er %)" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -560,61 +543,61 @@ "controle is mislukt: regel % heeft % velden (eerdere " "regels hadden er %)" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, fuzzy, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"controle is mislukt: regel % heeft % velden (eerdere " +"regels hadden er %)" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "% regel" msgstr[1] "% regels" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "% veld" msgstr[1] "% velden" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "onvoldoende geheugen beschikbaar voor hash" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "het sorteercommando is te lang (rapporteer deze **programmafout**)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "het aanroepen van 'sort' is mislukt: 'popen()' faalde" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "fout bij lezen" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "leesfout (bij sluiten)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "het scheidingsteken moet een enkel teken zijn" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "ontbrekende bewerkingsaanduidingen" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "optie '-H' of '--header-in' moet samen met kolomnamen gebruikt worden" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " @@ -623,83 +606,88 @@ "invoerfout voor bewerking %s: velden %,% hebben een " "verschillend aantal items" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "ongeldige numerieke waarde" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "ongeldige base64-waarde" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "te veel parameters voor bewerking %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "de bucket-grootte voor 'strbin' mag niet nul zijn" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, fuzzy, c-format +msgid "invalid percentile value %" +msgstr "ongeldige numerieke waarde '%s'" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "ontbrekend veld voor bewerking %s" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "ongeldig veldbereik voor bewerking %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "ongeldig veldenpaar voor bewerking %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" msgstr "ongeldig veld '%s' voor bewerking %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "veldbereik voor %s moet numeriek zijn" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "ontbrekende parameter voor bewerking %s" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "ongeldige parameter %s voor bewerking %s" # FIXME: Does this require a single pair of fields? # FIXME: Or does it require multiple pairs? -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" msgstr "bewerking %s vereist veldparen" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "bewerking %s staat geen veldparen toe" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "conflicterende bewerking %s" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "ongeldige bewerking %s" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -708,42 +696,61 @@ "conflicterende bewerking gevonden: er werden %s-bewerkingen verwacht, maar " "%s-bewerking %s werd gevonden" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, fuzzy, c-format +msgid "invalid option %s for operation check" +msgstr "ongeldige parameter %s voor bewerking %s" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "'crosstab' vereist precies 2 velden; % gevonden" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "'crosstab' ondersteunt één bewerking; % gevonden" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "ontbrekende bewerking" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "overtollige operand %s" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "ontbrekend script (tussen argumenten)" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" msgstr "ongeldige numerieke waarde '%s'" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "ongeldige operand %s" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "onbekend token %d\n" @@ -761,6 +768,21 @@ msgid "Try '%s --help' for more information.\n" msgstr "Typ '%s --help' voor meer informatie.\n" +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: optie '--%s' staat geen argument toe\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: onbekende optie '--%s'\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: optie '-W %s' is niet eenduidig\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: optie '-W %s' staat geen argument toe\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: optie '-W %s' vereist een argument\n" + #~ msgid "'op' is the operation to perform;\n" #~ msgstr "OPERATIE is de uit te voeren bewerking.\n" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/pt_BR.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/pt_BR.gmo differ diff -Nru datamash-1.1.1/po/pt_BR.po datamash-1.2.0/po/pt_BR.po --- datamash-1.1.1/po/pt_BR.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/pt_BR.po 2017-08-22 23:08:54.000000000 +0000 @@ -1,14 +1,14 @@ -# Brazilian Portuguese translation for datamash. -# Copyright (C) 2015 Free Software Foundation, Inc. +# Brazilian Portuguese translations for datamash package +# Traduções em português brasileiro para o pacote datamash +# Copyright (C) 2017 Free Software Foundation, Inc. # This file is distributed under the same license as the datamash package. -# Rafael Fontenelle , 2014, 2015. -# +# Rafael Fontenelle , 2014, 2015, 2017. msgid "" msgstr "" -"Project-Id-Version: GNU datamash 1.0.7.58\n" +"Project-Id-Version: GNU datamash 1.1.1.19\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" -"PO-Revision-Date: 2016-01-01 15:00-0200\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" +"PO-Revision-Date: 2017-08-11 10:35-0200\n" "Last-Translator: Rafael Fontenelle \n" "Language-Team: Brazilian Portuguese \n" @@ -16,77 +16,52 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Bugs: Report translation errors to the Language-Team address.\n" -"X-Generator: Poedit 1.8.6\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Virtaal 1.0.0-beta1\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "erro de escrita" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Erro desconhecido de sistema" -#: lib/getopt.c:575 lib/getopt.c:604 -#, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: a opção '%s' é ambígua; possibilidades:" - -#: lib/getopt.c:619 +#: lib/getopt.c:278 #, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: a opção '%s' é ambígua\n" +msgid "%s: option '%s%s' is ambiguous\n" +msgstr "%s: a opção \"%s%s\" é ambígua\n" -#: lib/getopt.c:654 lib/getopt.c:658 +#: lib/getopt.c:284 #, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: a opção '%s' não permite um argumento\n" +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: a opção \"%s%s\" é ambígua; possibilidades:" -#: lib/getopt.c:667 lib/getopt.c:672 +#: lib/getopt.c:319 #, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: a opção '%c%s' não permite um argumento\n" +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: opção desconhecida \"%s%s\"\n" -#: lib/getopt.c:715 lib/getopt.c:734 +#: lib/getopt.c:345 #, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: a opção '--%s' requer um argumento\n" +msgid "%s: option '%s%s' doesn't allow an argument\n" +msgstr "%s: a opção \"%s%s\" não permite um argumento\n" -#: lib/getopt.c:772 lib/getopt.c:775 +#: lib/getopt.c:360 #, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: opção não reconhecida '--%s'\n" +msgid "%s: option '%s%s' requires an argument\n" +msgstr "%s: a opção \"%s%s\" exige um argumento\n" -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: opção não reconhecida '%c%s'\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: opção inválida -- '%c'\n" +msgstr "%s: opção inválida -- \"%c\"\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: a opção requer um argumento -- '%c'\n" - -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: a opção '-W %s' é ambígua\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: a opção '-W %s' não permite um argumento\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: a opção '-W %s' requer um argumento\n" +msgstr "%s: a opção exige um argumento -- \"%c\"\n" #. TRANSLATORS: #. Get translations for open and closing quotation marks. @@ -109,13 +84,13 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" -msgstr "\"" +msgstr "“" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" -msgstr "\"" +msgstr "”" #: lib/version-etc.c:74 #, c-format @@ -144,10 +119,10 @@ "\n" msgstr "" "\n" -"Licença GPLv3+: GNU GPL versão 3 ou superior .\n" -"Esse é um software livre: você é livre para modificá-lo e redistribuí-lo.\n" -"NÃO HÁ GARANTIA, na extensão permitida pela lei.\n" +"Licença GPLv3+: GNU GPL versão 3 ou posterior \n" +"Este é um software livre: você é livre para alterá-lo e redistribuí-lo.\n" +"NÃO HÁ QUALQUER GARANTIA, na máxima extensão permitida em lei.\n" "\n" #. TRANSLATORS: %s denotes an author name. @@ -270,6 +245,8 @@ msgstr "" "\n" "Relate erros para: %s\n" +"Relate erros de tradução para \n" #: lib/version-etc.c:247 #, c-format @@ -279,7 +256,7 @@ #: lib/version-etc.c:251 #, c-format msgid "%s home page: <%s>\n" -msgstr "Página inicial do %s: <%s>\n" +msgstr "Página do %s: <%s>\n" #: lib/version-etc.c:253 #, c-format @@ -297,38 +274,38 @@ #: lib/xstrtol-error.c:63 #, c-format msgid "invalid %s%s argument '%s'" -msgstr "argumento inválido %s%s para '%s'" +msgstr "argumento inválido para %s%s: \"%s\"" #: lib/xstrtol-error.c:68 #, c-format msgid "invalid suffix in %s%s argument '%s'" -msgstr "sufixo inválido em argumento %s%s '%s'" +msgstr "sufixo inválido no argumento para %s%s: \"%s\"" #: lib/xstrtol-error.c:72 #, c-format msgid "%s%s argument '%s' too large" -msgstr "argumento %s%s '%s' grande demais" +msgstr "argumento grande demais para %s%s: \"%s\"" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "coluna de nome %s não encontrada no arquivo de entrada" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Uso: %s [OPÇÃO] op [fld] [op fld ...]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "Realiza operações números/textuais em dados obtidos da entrada padrão." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" @@ -336,15 +313,15 @@ "'op' é a operação a ser realizada. Se uma operação primária for usada,\n" "ela deve ser listada primeiro, seguida opcionalmente por outras operações.\n" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" msgstr "" -"'fld' é o campo para usar; 'fld' pode ser um número (1=primeiro campo)\\n\n" +"\"fld\" é o campo para usar; \"fld\" pode ser um número (1=primeiro campo),\n" "ou um nome de campo ao usar as opções -H ou --header-in.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" @@ -352,37 +329,37 @@ msgstr "" "Múltiplos campos podem ser listados com vírgulas (ex.: 1,6,8). Um intervalo\n" "de campos podem ser listados com um traço (ex.: 2-8). Use dois-pontos para\n" -"operações quer requerem um par de campos (ex.: 'pcov 2:6').\n" +"operações quer requerem um par de campos (ex.: \"pcov 2:6\").\n" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "Operações primárias:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Operações de filtragem de linha:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Operações per-linha:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Operações de argumento numérico:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Operações de agrupamento numérico/textual:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Operações de agrupamento estatístico:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Opções de agrupamento:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -391,38 +368,38 @@ "op\n" " (padrão: exibe apenas as chaves agrupadas)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" msgstr "" " -g, --group=X[,Y,Z] agrupa por campos X,[Y,Z];\n" -" equivalente a operação primária 'groupby'\n" +" equivalente a operação primária \"groupby\"\n" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr "" " --header-in primeira linha de entrada é coluna de cabeçalho\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr "" " --header-out exibe cabeçalhos de coluna como primeira linha\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" -msgstr " -H, --headers mesmo que '--header-in --header-out'\n" +msgstr " -H, --headers mesmo que \"--header-in --header-out\"\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" msgstr "" " -i, --ignore-case ignora diferenciação maiúsculo/minúsculo ao\n" -" comparar textos; isso afeta agrupamento e\n" +" comparar textos; isso afeta agrupamento e\n" " operações textuais\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -431,37 +408,37 @@ msgstr "" " -s, --sort ordena a entrada antes de agrupamento;\n" " isso remove a necessidade de redirecionar\n" -" manualmente a entrada por meio de 'sort'\n" +" manualmente a entrada por meio de \"sort\"\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Opções de operações com arquivos:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" " --no-strict permite linhas com número variável de campos\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X preenche valores em falta com X (padrão %s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Opções gerais:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" " -t, --field-separator=X usa X ao invés de TAB como delimitador de campo\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm ignora valores NA/NaN\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -469,32 +446,32 @@ " -W, --whitespace usa espaço em branco (um ou mais espaços e/ou\n" " tabs) para delimitadores de campo\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr "" " -z, --zero-terminated finaliza linhas com 0 bytes, não nova linha\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Exemplos:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "Exibe a soma e o significado de valores da coluna 1:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Entrada da transposição:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "Para exemplos e informação detalhada de uso, veja\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "O manual e mais exemplos estão disponíveis em\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -503,23 +480,23 @@ "entrada inválida: campo % requisitado, linha % tem apenas " "% campos" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" -msgstr "%s na linha % campo %: '%s'" +msgstr "%s na linha % campo %: \"%s\"" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " "had %);\n" "see --help to disable strict mode" msgstr "" -"Erro na entrada da transposição: a linha % tem % campos " -"(linhas\n" -"anteriores tinham %); veja --help para desabilitar o modo estrito" +"erro na entrada da transposição: a linha % tem % campos " +"(linhas anteriores tinham %);\n" +"veja --help para desabilitar o modo estrito" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -527,10 +504,10 @@ "see --help to disable strict mode" msgstr "" "erro na entrada de campo-reverso: a linha % tem % campos " -"(linhas\n" -"anteriores tinham %); veja --help para desabilitar o modo estrito" +"(linhas anteriores tinham %);\n" +"veja --help para desabilitar o modo estrito" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" @@ -539,7 +516,15 @@ "linha % (% campos):\n" " " -#: src/datamash.c:849 +#: src/datamash.c:855 +#, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"verificação falhou: a linha % tem % campos (esperava " +"%)" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -548,61 +533,61 @@ "verificação falhou: a linha % tem % campos (linha anterior " "tinham %)" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"verificação falhou: a entrada tinha % linhas (esperava-se " +"%)" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "% linha" msgstr[1] "% linhas" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "% campo" msgstr[1] "% campos" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "erro de alocação de memória hash" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "comando sort grande demais (por favor, relate esse erro)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" -msgstr "falha ao executar 'sort': popen falhou" +msgstr "falha ao executar \"sort\": popen falhou" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "erro de leitura" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "erro de leitura (ao fechar)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "o delimitador deve ser um caractere singular" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "faltando especificadores de operação" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "-H ou --header-in devem ser usados com colunas nomeadas" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " @@ -611,82 +596,87 @@ "erro de entrada para a operação %s: campos %,% tem número " "diferente de itens" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "valor numérico inválido" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "valor base64 inválido" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "número excessivo de parâmetros para a operação %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "tamanho do balde (bucket) de strbin deve ser diferente de zero" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, c-format +msgid "invalid percentile value %" +msgstr "valor percentual inválido %" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "faltando campo para a operação %s" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "intervalo de campos inválido para a operação %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "par de campos inválido para a operação %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" -msgstr "'%s' de campo inválido para a operação %s" +msgstr "\"%s\" de campo inválido para a operação %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "intervalo de campos para %s deve ser numérico" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "faltando parâmetro para a operação %s" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "parâmetro %s inválido para a operação %s" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" -msgstr "a operação %s requer pares de campos" +msgstr "a operação %s exige pares de campos" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "a operação %s não pode usar par de campos" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "operação conflitante %s" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "operação inválida %s" -# primeira e segunda variáveis são modo, terceira é nome -#: src/op-parser.c:423 +# primeira e segunda %s são modo, terceira %s é nome +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -695,52 +685,71 @@ "operação conflitante encontrada: esperava operações de %s, mas foi " "encontrada operação de %s de nome %s" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, c-format +msgid "invalid option %s for operation check" +msgstr "opção %s inválida para a operação \"check\"" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "número esperado após a opção na operação \"check\"" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "valor zero inválido para linhas/campos na operação \"check\"" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "número de linhas já definidas na operação \"check\"" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "número de campos/colunas já definidas na operação \"check\"" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "crosstab requer exatamente 2 campos, encontrado(s) %" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "crosstab oferece suporte a apenas uma operação, encontradas %" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "faltando a operação" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "operando extra %s" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "faltando script (dentre argumentos)" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" -msgstr "valor numérico inválido '%s'" +msgstr "valor numérico inválido \"%s\"" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "operação inválida %s" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "token desconhecido %d\n" -# movi para frente para ajustar às demais mensagens do '--help' -- Rafael +# movi para frente para ajustar às demais mensagens do "--help" -- Rafael #: src/system.h:133 msgid " --help display this help and exit\n" msgstr " --help mostra esta ajuda e sai\n" -# movi para frente para ajustar às demais mensagens do '--help' -- Rafael +# movi para frente para ajustar às demais mensagens do "--help" -- Rafael #: src/system.h:135 msgid " --version output version information and exit\n" msgstr " --version mostra informação da versão e sai\n" @@ -748,7 +757,22 @@ #: src/system.h:140 #, c-format msgid "Try '%s --help' for more information.\n" -msgstr "Tente '%s --help' para mais informações.\n" +msgstr "Tente \"%s --help\" para mais informações.\n" + +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: a opção \"%s\" não permite um argumento\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: opção desconhecida \"--%s\"\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: a opção \"-W %s\" é ambígua\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: a opção \"-W %s\" não permite um argumento\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: a opção \"-W %s\" exige um argumento\n" #~ msgid "'op' is the operation to perform;\n" #~ msgstr "'op' é a operação a ser realizada;\n" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/sr.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/sr.gmo differ diff -Nru datamash-1.1.1/po/sr.po datamash-1.2.0/po/sr.po --- datamash-1.1.1/po/sr.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/sr.po 2017-08-22 23:08:54.000000000 +0000 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: datamash-1.0.7.58\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" "PO-Revision-Date: 2016-03-05 09:11+0200\n" "Last-Translator: Мирослав Николић \n" "Language-Team: Serbian <(nothing)>\n" @@ -18,74 +18,49 @@ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "грешка писања" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Непозната грешка система" -#: lib/getopt.c:575 lib/getopt.c:604 -#, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: опција „%s“ је нејасна; могућности:" - -#: lib/getopt.c:619 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: lib/getopt.c:278 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous\n" msgstr "%s: опција „%s“ је нејасна\n" -#: lib/getopt.c:654 lib/getopt.c:658 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: опција „--%s“ не дозвољава аргумент\n" +#: lib/getopt.c:284 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: опција „%s“ је нејасна; могућности:" -#: lib/getopt.c:667 lib/getopt.c:672 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" +#: lib/getopt.c:319 +#, fuzzy, c-format +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: непозната опција „%c%s“\n" + +#: lib/getopt.c:345 +#, fuzzy, c-format +msgid "%s: option '%s%s' doesn't allow an argument\n" msgstr "%s: опција „%c%s“ не дозвољава аргумент\n" -#: lib/getopt.c:715 lib/getopt.c:734 -#, c-format -msgid "%s: option '--%s' requires an argument\n" +#: lib/getopt.c:360 +#, fuzzy, c-format +msgid "%s: option '%s%s' requires an argument\n" msgstr "%s: опција „--%s“ захтева аргумент\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: непозната опција „--%s“\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: непозната опција „%c%s“\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: неисправна опција -- „%c“\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: опција захтева аргумент -- „%c“\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: опција „-W %s“ је нејасна\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: опција „-W %s“ не дозвољава аргумент\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: опција „-W %s“ захтева аргумент\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -107,11 +82,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "„" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "“" @@ -308,25 +283,25 @@ msgstr "%s%s аргумент „%s“ је превелик" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Асаф Гордон" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "нисам нашао назив ступца „%s“ у улазној датотеци" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Употреба: %s [ОПЦИЈА] op [fld] [op fld ...]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "Обавите радње бројева/ниски на улазу из стандардног улаза." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" @@ -334,7 +309,7 @@ "„op“ је радња за обављање. Ако се користи примарна радња,\n" "мора бити наведена прва, за којом по избору следе друге радње.\n" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" @@ -342,7 +317,7 @@ "„fld“ је улазно поље за коришћење; „fld“ може бити број (1=прво поље),\n" "или назив поља када се користе опције „-H“ или „--header-in“.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" @@ -352,35 +327,35 @@ "може бити наведен цртицом (нпр. 2-8). Користите двотачке за\n" "радње које захтевају пар поља (нпр. „pcov 2:6“).\n" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "Примарне радње:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Радње издвајања редова:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Радње над редовима:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Радње бројевног груписања:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Радње текстуалног/бројевног груписања:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Радње статистичког груписања:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Опције груписања:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -388,7 +363,7 @@ " -f, --full исписује читави улазни ред пре оп резултата\n" " (основно: исписује само груписане кључеве)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" @@ -396,19 +371,19 @@ " -g, --group=X[,Y,Z] групише путем поља X,[Y,Z];\n" " еквивалент примарној радњи „groupby“\n" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr " --header-in први улазни ред јесу заглавља ступца\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr " --header-out исписује заглавља ступца као први ред\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers исто као „--header-in --header-out“\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -416,7 +391,7 @@ " -i, --ignore-case занемарује велика/мала слова када пореди текст;\n" " ово утиче на груписање, и на радње ниске\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -426,36 +401,36 @@ " -s, --sort ређа улаз пре груписања; ово уклања потребу\n" " за ручним преспајањем улаза кроз „sort“\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Опције радње датотеке:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" " --no-strict допушта редове са променљивим бројем поља\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X попуњава недостајуће вредности са X (основно " "%s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Опште опције:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" " -t, --field-separator=X користи X уместо табулатора као граничника поља\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm прескаче вредности „NA/NaN“\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -464,31 +439,31 @@ "табулаторе)\n" " за граничнике поља\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr " -z, --zero-terminated завршава редове 0 бајтом, не новим редом\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Примери:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "Исписује збир и средње вредности из 1. ступца:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Улаз премештања:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "За више података о коришћењу и примере, видите\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "Приручник и још примера је доступно на\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -497,12 +472,12 @@ "неисправан улаз: затражено је поље %, %. ред има само " "% поља" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s у %. реду поље %: „%s“" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -513,7 +488,7 @@ "има %);\n" "видите „--help“ да искључите искључиви режим" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -524,7 +499,7 @@ "(претходни ред има %);\n" "видите „--help“ да искључите искључиви режим" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" @@ -533,7 +508,15 @@ "%. ред (поље %):\n" " " -#: src/datamash.c:849 +#: src/datamash.c:855 +#, fuzzy, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"провера није успела: %. ред има % поља (претходни ред има " +"%)" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -542,7 +525,14 @@ "провера није успела: %. ред има % поља (претходни ред има " "%)" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, fuzzy, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"провера није успела: %. ред има % поља (претходни ред има " +"%)" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" @@ -550,7 +540,7 @@ msgstr[1] "% реда" msgstr[2] "% редова" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" @@ -558,47 +548,40 @@ msgstr[1] "% поља" msgstr[2] "% поља" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "грешка доделе хеш меморије" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "наредба ређања је предуга (пријавите ову грешку)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "нисам успео да покренем „sort“: није успело „popen“" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "грешка читања" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "грешка читања (при затварању)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "граничник мора бити један знак" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "недостају одредници радње" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "„-H“ или „--header-in“ мора да се користи са именованим ступцима" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " @@ -607,123 +590,147 @@ "улазна грешка за радњу „%s“: поља %,% имају различит број " "ставки" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "неисправна бројевна вредност" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "неисправна вредност основе64" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "превише параметара за радњу „%s“" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "величина ведра „strbin“ не сме бити нула" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, fuzzy, c-format +msgid "invalid percentile value %" +msgstr "неисправна бројевна вредност „%s“" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "недостаје поље за радњу „%s“" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "неисправан опсег поља за радњу „%s“" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "неисправан пар поља за радњу „%s“" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" msgstr "неисправно поље „%s“ за радњу „%s“" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "опсег поља за „%s“ мора бити бројни" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "недостаје параметар за радњу „%s“" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "неисправан параметар „%s“ за радњу „%s“" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" msgstr "радња „%s“ захтева парове поља" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "радња „%s“ не може користити пар поља" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "сукобљавајућа радња „%s“" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "неисправна радња „%s“" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " "%s" msgstr "нађох сукобљавајућу радњу: очекивах %s радње, али нађох %s радње %s" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, fuzzy, c-format +msgid "invalid option %s for operation check" +msgstr "неисправан параметар „%s“ за радњу „%s“" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "„crosstab“ захтева тачно 2 поља, нађох %" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "„crosstab“ подржава једну радњу, нађох %" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "недостаје радња" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "додатни операнд „%s“" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "недостаје скрипт (око аргумената)" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" msgstr "неисправна бројевна вредност „%s“" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "неисправан операнд „%s“" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "непознат чинилац „%d“\n" @@ -741,6 +748,21 @@ msgid "Try '%s --help' for more information.\n" msgstr "Пробајте „%s --help“ за више података.\n" +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: опција „--%s“ не дозвољава аргумент\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: непозната опција „--%s“\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: опција „-W %s“ је нејасна\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: опција „-W %s“ не дозвољава аргумент\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: опција „-W %s“ захтева аргумент\n" + #~ msgid "'op' is the operation to perform;\n" #~ msgstr "„op“ је операција за обављање;\n" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/sv.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/sv.gmo differ diff -Nru datamash-1.1.1/po/sv.po datamash-1.2.0/po/sv.po --- datamash-1.1.1/po/sv.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/sv.po 2017-08-22 23:08:54.000000000 +0000 @@ -1,5 +1,5 @@ # Swedish messages for datamash. -# Copyright © 2015, 2016 Free Software Foundation, Inc. +# Copyright © 2015, 2016, 2017 Free Software Foundation, Inc. # This file is distributed under the same license as the datamash package. # Translations from Coreutils: # Peter Antman , 1997. @@ -8,14 +8,14 @@ # Göran Uddeborg , 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015. # # Datamash translation: -# Anders Jonsson , 2015, 2016. +# Anders Jonsson , 2015, 2016, 2017. # msgid "" msgstr "" -"Project-Id-Version: datamash 1.0.7.58\n" +"Project-Id-Version: datamash 1.1.1.19\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" -"PO-Revision-Date: 2016-01-18 20:31+0100\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" +"PO-Revision-Date: 2017-08-08 21:33+0200\n" "Last-Translator: Anders Jonsson \n" "Language-Team: Swedish \n" "Language: sv\n" @@ -24,76 +24,51 @@ "Content-Transfer-Encoding: 8bit\n" "X-Bugs: Report translation errors to the Language-Team address.\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.8.6\n" +"X-Generator: Poedit 2.0.3\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "skrivfel" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Okänt systemfel" -#: lib/getopt.c:575 lib/getopt.c:604 +#: lib/getopt.c:278 #, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: flaggan ”%s” är tvetydig; möjligheter:" +msgid "%s: option '%s%s' is ambiguous\n" +msgstr "%s: flaggan ”%s%s” är tvetydig\n" -#: lib/getopt.c:619 +#: lib/getopt.c:284 #, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: flaggan ”%s” är tvetydig\n" +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: flaggan ”%s%s” är tvetydig; möjligheter:" -#: lib/getopt.c:654 lib/getopt.c:658 +#: lib/getopt.c:319 #, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: flaggan ”--%s” tar inget argument\n" +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: okänd flagga ”%s%s”\n" -#: lib/getopt.c:667 lib/getopt.c:672 +#: lib/getopt.c:345 #, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: flaggan ”%c%s” tar inget argument\n" +msgid "%s: option '%s%s' doesn't allow an argument\n" +msgstr "%s: flaggan ”%s%s” tar inget argument\n" -#: lib/getopt.c:715 lib/getopt.c:734 +#: lib/getopt.c:360 #, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: flaggan ”--%s” kräver ett argument\n" +msgid "%s: option '%s%s' requires an argument\n" +msgstr "%s: flaggan ”%s%s” kräver ett argument\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: okänd flagga ”--%s”\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: okänd flagga ”%c%s”\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ogiltig flagga -- ”%c”\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: flaggan kräver ett argument -- ”%c”\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: flaggan ”-W %s” är tvetydig\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: flaggan ”-W %s” tar inget argument\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: flaggan ”-W %s” kräver ett argument\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -115,11 +90,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "”" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "”" @@ -320,25 +295,25 @@ msgstr "argument ”%3$s” till %1$s%2$s är för stort" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "kolumnnamnet %s hittades inte i indatafil" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Användning: %s [FLAGGA] åtg [flt] [åtg flt ...]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "Utför numeriska åtgärder eller strängåtgärder på indata från stdin." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" @@ -346,7 +321,7 @@ "”åtg” är åtgärden att utföra. Om en primär åtgärd används\n" "måste den listas först, möjligen följd av andra åtgärder.\n" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" @@ -356,7 +331,7 @@ "eller ett fältnamn då flaggorna -H eller --header-in används.\n" # Hyphen used in example rather than dash. -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" @@ -366,35 +341,35 @@ "av fält kan listas med ett tankstreck (t.ex. 2-8). Använd kolon för\n" "åtgärder som kräver ett par av fält (t.ex. ”pcov 2:6”).\n" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "Primära åtgärder:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Radfiltreringsåtgärder:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Per rads-åtgärder:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Numeriska grupperingsåtgärder:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Textuella/numeriska grupperingsåtgärder:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Statistiska grupperingsåtgärder:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Grupperingsflaggor:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -403,7 +378,7 @@ " (standard: skriv ut endast de grupperade\n" " nycklarna)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" @@ -411,19 +386,19 @@ " -g, --group=X[,Y,Z] gruppera via fälten X,[Y,Z];\n" " likvärdig med den primära åtgärden ”groupby”\n" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr " --header-in första indatarad är kolumnrubriker\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr " --header-out skriv ut kolumnrubriker som första rad\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers samma som ”--header-in --header-out”\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -431,7 +406,7 @@ " -i, --ignore-case ignorera skiftläge då text jämförs;\n" " detta påverkar gruppering och strängåtgärder\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -442,34 +417,34 @@ " behovet av att manuellt skicka indata genom " "”sort”\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Filåtgärdsflaggor:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr " --no-strict tillåt rader med varierande antal fält\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X fyll i saknade värden med X (standard %s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Allmänna flaggor:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" " -t, --field-separator=X använd X istället för TAB som fältseparator\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm hoppa över NA/NaN-värden\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -478,31 +453,31 @@ "eller\n" " tabulatorer) som fältseparatorer\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr " -z, --zero-terminated avsluta rader med nollbyte, inte nyrad\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Exempel:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "Skriv summan och medelvärdet av värden från kolumn 1:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Transponera indata:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "För utförlig användningsinformation och exempel, se\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "Handboken och fler exempel är tillgängliga på\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -511,12 +486,12 @@ "ogiltigt indata: fält % begärdes, rad % har bara " "% fält" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s i rad % fält %: ”%s”" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -527,7 +502,7 @@ "rader hade %);\n" "se --help för att inaktivera strikt läge" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -538,7 +513,7 @@ "rader hade %);\n" "se --help för att inaktivera strikt läge" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" @@ -547,7 +522,15 @@ "rad % (% fält):\n" " " -#: src/datamash.c:849 +#: src/datamash.c:855 +#, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"kontroll misslyckades: rad % har % fält (förväntar " +"%)" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -556,61 +539,60 @@ "kontroll misslyckades: rad % har % fält (föregående rad " "hade %)" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"kontroll misslyckades: indata hade % rader (förväntar %)" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "% rad" msgstr[1] "% rader" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "% fält" msgstr[1] "% fält" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "minnesallokeringsfel för hash" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "sorteringskommando för långt (rapportera gärna detta fel)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "misslyckades att köra ”sort”: popen misslyckades" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "läsfel" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "läsfel (vid stängning)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "avskiljaren måste vara endast ett tecken" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "saknar åtgärdsbeskrivning" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "-H eller --header-in måste användas med namngivna kolumner" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " @@ -619,81 +601,86 @@ "indatafel för åtgärden %s: fälten %,% har olika antal " "poster" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "ogiltigt numeriskt värde" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "ogiltigt base64-värde" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "för många parametrar för åtgärden %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "strbin-hinkstorlek får inte vara noll" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, c-format +msgid "invalid percentile value %" +msgstr "ogiltigt percentilvärde %" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "saknar fält för åtgärden %s" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "ogiltigt fältintervall för åtgärden %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "ogiltigt par av fält för åtgärden %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" msgstr "ogiltigt fält ”%s” för åtgärden %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "fältintervall för %s måste vara numeriskt" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "saknar parameter för åtgärden %s" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "ogiltig parameter %s för åtgärden %s" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" msgstr "åtgärden %s kräver par av fält" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "åtgärden %s kan inte använda par av fält" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "motstridig åtgärd %s" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "ogiltig åtgärd %s" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -701,42 +688,61 @@ msgstr "" "motstridig åtgärd funnen: förväntar %s-åtgärder, men fann %s-åtgärden %s" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, c-format +msgid "invalid option %s for operation check" +msgstr "ogiltig flagga %s för åtgärden ”check”" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "tal förväntades efter flagga i åtgärden ”check”" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "ogiltigt värde noll för rader/fält i åtgärden ”check”" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "antal rader redan inställda i åtgärden ”check”" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "antal fält/kolumner redan inställda i åtgärden ”check”" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "crosstab kräver exakt 2 fält, hittade %" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "crosstab stöder en åtgärd, hittade %" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "saknar åtgärd" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "extra operand %s" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "saknar skript (bland argument)" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" msgstr "ogiltigt numeriskt värde ”%s”" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "ogiltig operand %s" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "okänd symbol %d\n" @@ -754,6 +760,21 @@ msgid "Try '%s --help' for more information.\n" msgstr "Försök med ”%s --help” för mer information.\n" +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: flaggan ”--%s” tar inget argument\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: okänd flagga ”--%s”\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: flaggan ”-W %s” är tvetydig\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: flaggan ”-W %s” tar inget argument\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: flaggan ”-W %s” kräver ett argument\n" + #~ msgid "'op' is the operation to perform;\n" #~ msgstr "”åtg” är åtgärden att utföra;\n" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/uk.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/uk.gmo differ diff -Nru datamash-1.1.1/po/uk.po datamash-1.2.0/po/uk.po --- datamash-1.1.1/po/uk.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/uk.po 2017-08-22 23:08:54.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GNU datamash 1.0.7.58\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" "PO-Revision-Date: 2016-01-01 17:55+0200\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" @@ -20,74 +20,49 @@ "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Lokalize 1.5\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "помилка під час спроби запису" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Невідома системна помилка" -#: lib/getopt.c:575 lib/getopt.c:604 -#, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: неоднозначний параметр «%s»; можливі варіанти:" - -#: lib/getopt.c:619 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: lib/getopt.c:278 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous\n" msgstr "%s: параметр «%s» не є однозначним\n" -#: lib/getopt.c:654 lib/getopt.c:658 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: додавання аргументів до параметра «--%s» не передбачено\n" +#: lib/getopt.c:284 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: неоднозначний параметр «%s»; можливі варіанти:" -#: lib/getopt.c:667 lib/getopt.c:672 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" +#: lib/getopt.c:319 +#, fuzzy, c-format +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: невідомий параметр «%c%s»\n" + +#: lib/getopt.c:345 +#, fuzzy, c-format +msgid "%s: option '%s%s' doesn't allow an argument\n" msgstr "%s: додавання аргументів до параметра «%c%s» не передбачено\n" -#: lib/getopt.c:715 lib/getopt.c:734 -#, c-format -msgid "%s: option '--%s' requires an argument\n" +#: lib/getopt.c:360 +#, fuzzy, c-format +msgid "%s: option '%s%s' requires an argument\n" msgstr "%s: до параметра «--%s» слід додати аргумент\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: невідомий параметр «--%s»\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: невідомий параметр «%c%s»\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: некоректний параметр — «%c»\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: для параметра потрібен аргумент -- «%c»\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: параметр «-W %s» є неоднозначним\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: для параметра «-W %s» не передбачено аргументів\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: до параметра «-W %s» слід додати аргумент\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -109,11 +84,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "«" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "»" @@ -313,25 +288,25 @@ msgstr "%s%s, аргумент «%s» є занадто об'ємним" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "у файлі вхідних даних не знайдено стовпчика із назвою %s" -#: src/datamash.c:164 +#: src/datamash.c:165 #, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Користування: %s [ПАРАМЕТР] операція [поле] [операція поле ...]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "Виконує числові дії або дії з рядками над вхідними даними зі stdin." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" @@ -340,7 +315,7 @@ "операцію,\n" "вона має бути у списку першою, за нею може бути вказано інші операції.\n" -#: src/datamash.c:173 +#: src/datamash.c:174 msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" "or a field name when using the -H or --header-in options.\n" @@ -349,7 +324,7 @@ "бути число (1=перше поле) або назва поля, якщо використовуються параметри\n" "-H або --header-in.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" @@ -359,35 +334,35 @@ "Діапазон полів можна вказати за допомогою дефіса (наприклад 2-8).\n" "Пари полів слід вказувати за допомогою двокрапки (наприклад «pcov 2:6»).\n" -#: src/datamash.c:181 +#: src/datamash.c:182 msgid "Primary operations:\n" msgstr "Основні операції:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Дії з фільтрування рядків:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Дії над окремими рядками:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Дії з числового групування:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Дії з текстового або числового групування:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Дії зі статистичного групування:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Дії з групування:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -395,7 +370,7 @@ " -f, --full вивести рядок вхідних даних до результатів дії\n" " (типове: вивести лише згруповані дані)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" @@ -403,22 +378,22 @@ " -g, --group=X[,Y,Z] групувати за полями X,[Y,Z];\n" " рівнозначне основній операції «groupby»\n" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr "" " --header-in перший рядок вхідних даних є рядком заголовків " "стовпчиків\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr "" " --header-out вивести заголовки стовпчиків у першому рядку\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers те саме, що і --header-in --header-out\n" -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -428,7 +403,7 @@ " це стосується дій з групування та дій над " "рядками\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -440,36 +415,36 @@ " потребу у попередній обробці вхідних даних " "програмою sort\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Параметри дій над файлами:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" " --no-strict дозволяти рядки зі змінною кількістю полів\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X заповнити пропущені значення рядком X (типово " "%s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Загальні параметри:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" " -t, --field-separator=X використовувати роздільник полів X замість TAB\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm пропускати значення NA/NaN\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -478,35 +453,35 @@ "пробілів чи\n" " символів табуляцій) як роздільник полів\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr "" " -z, --zero-terminated завершувати рядки нульовим байтом, а не символом " "нового рядка\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Приклади:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "Вивести суму та середнє значення значень, починаючи зі стовпчика 1:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Транспонування вхідних даних:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "" "Щоб дізнатися більше про користування програмою та ознайомитися з " "прикладами, див.\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "Підручник і додаткові приклади можна знайти на цій сторінці:\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -515,12 +490,12 @@ "некоректні вхідні дані: потрібне поле %, але у рядку % " "лише % полів" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s у рядку %, поле %: «%s»" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -531,7 +506,7 @@ "% полів (у попередніх рядках було %);\n" "див. --help, щоб дізнатися про те, як вимкнути строгий режим." -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -542,7 +517,7 @@ "є % полів (у попередніх рядках було %);\n" "див. --help, щоб дізнатися про те, як вимкнути строгий режим." -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, c-format msgid "" "line % (% fields):\n" @@ -551,7 +526,15 @@ "рядок % (% полів):\n" " " -#: src/datamash.c:849 +#: src/datamash.c:855 +#, fuzzy, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"перевірку не пройдено: у рядку % маємо % полів (у " +"попередньому рядку було %)" + +#: src/datamash.c:878 #, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -560,7 +543,14 @@ "перевірку не пройдено: у рядку % маємо % полів (у " "попередньому рядку було %)" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, fuzzy, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"перевірку не пройдено: у рядку % маємо % полів (у " +"попередньому рядку було %)" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" @@ -569,7 +559,7 @@ msgstr[2] "% рядків" msgstr[3] "% рядок" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" @@ -578,49 +568,42 @@ msgstr[2] "% полів" msgstr[3] "% поле" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "помилка під час спроби отримання області пам’яті для хеш-сум" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "" "упорядковування за допомогою команди sort виконується надто довго (повідомте " "розробників про ваду)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "не вдалося виконати «sort»: помилка popen" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "помилка під час читання" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "помилка під час читання (під час закриття)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "розділювач повинен бути одним символом" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "не вказано специфікаторів дій" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "якщо стовпчики мають назви, слід використовувати -H або --header-in" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " @@ -629,81 +612,86 @@ "помилка у вхідних даних для операції %s: у полях %,% різна " "кількість записів" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "некоректне числове значення" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "некоректне значення base64" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, c-format msgid "too many parameters for operation %s" msgstr "забагато параметрів для операції %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "розмір сегмента strbin має бути ненульовим" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, fuzzy, c-format +msgid "invalid percentile value %" +msgstr "некоректне числове значення, «%s»" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, c-format msgid "missing field for operation %s" msgstr "пропущено поле для операції %s" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, c-format msgid "invalid field range for operation %s" msgstr "некоректний діапазон полів для операції %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, c-format msgid "invalid field pair for operation %s" msgstr "некоректна пара полів для операції %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, c-format msgid "invalid field '%s' for operation %s" msgstr "некоректне поле, «%s», для операції %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "діапазон полів для %s має бути числовим" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, c-format msgid "missing parameter for operation %s" msgstr "пропущено параметр для операції %s" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, c-format msgid "invalid parameter %s for operation %s" msgstr "некоректний параметр %s для операції %s" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, c-format msgid "operation %s requires field pairs" msgstr "для виконання операції %s слід вказати пари полів" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "у операції %s не можна використовувати пару полів" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, c-format msgid "conflicting operation %s" msgstr "конфлікт операції %s" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, c-format msgid "invalid operation %s" msgstr "некоректна операція, %s" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -712,43 +700,62 @@ "виявлено конфлікт операцій: мало бути %s операцій, але виявлено операцію %s " "%s" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, fuzzy, c-format +msgid "invalid option %s for operation check" +msgstr "некоректний параметр %s для операції %s" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "для crosstab слід вказати точно 2 поля, вказано ж %" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "" "у crosstab передбачено підтримку лише однієї операції, вказано ж %" -#: src/op-parser.c:559 -#, c-format +#: src/op-parser.c:650 msgid "missing operation" msgstr "пропущено операцію" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, c-format msgid "extra operand %s" msgstr "зайвий операнд %s" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "не вказано скрипт (серед аргументів)" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, c-format msgid "invalid numeric value '%s'" msgstr "некоректне числове значення, «%s»" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, c-format msgid "invalid operand %s" msgstr "некоректний операнд %s" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "невідомий ключ %d\n" @@ -766,6 +773,21 @@ msgid "Try '%s --help' for more information.\n" msgstr "Віддайте команду «%s --help», щоб дізнатися більше.\n" +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: додавання аргументів до параметра «--%s» не передбачено\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: невідомий параметр «--%s»\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: параметр «-W %s» є неоднозначним\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: для параметра «-W %s» не передбачено аргументів\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: до параметра «-W %s» слід додати аргумент\n" + #~ msgid "'op' is the operation to perform;\n" #~ msgstr "«дія» - дія, яку слід виконати;\n" Binary files /tmp/tmpGQcASD/mZ7X1zGZEv/datamash-1.1.1/po/vi.gmo and /tmp/tmpGQcASD/UHBIOX61gF/datamash-1.2.0/po/vi.gmo differ diff -Nru datamash-1.1.1/po/vi.po datamash-1.2.0/po/vi.po --- datamash-1.1.1/po/vi.po 2017-01-19 18:51:35.000000000 +0000 +++ datamash-1.2.0/po/vi.po 2017-08-22 23:08:54.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: datamash 1.0.6.54\n" "Report-Msgid-Bugs-To: bug-datamash@gnu.org\n" -"POT-Creation-Date: 2017-01-19 13:51-0500\n" +"POT-Creation-Date: 2017-08-22 17:08-0600\n" "PO-Revision-Date: 2015-06-06 15:26+0700\n" "Last-Translator: Trần Ngọc Quân \n" "Language-Team: Vietnamese \n" @@ -20,74 +20,49 @@ "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Gtranslator 2.91.7\n" -#: lib/closeout.c:112 +#: lib/closeout.c:122 msgid "write error" msgstr "lỗi ghi" -#: lib/error.c:191 +#: lib/error.c:195 msgid "Unknown system error" msgstr "Gặp lỗi hệ thống không rõ" -#: lib/getopt.c:575 lib/getopt.c:604 -#, c-format -msgid "%s: option '%s' is ambiguous; possibilities:" -msgstr "%s: tùy chọn “%s” chưa rõ ràng; khả năng là:" - -#: lib/getopt.c:619 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: lib/getopt.c:278 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous\n" msgstr "%s: Tùy chọn “-W %s” chưa rõ ràng\n" -#: lib/getopt.c:654 lib/getopt.c:658 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: tùy chọn “--%s” không nhận đối số\n" +#: lib/getopt.c:284 +#, fuzzy, c-format +msgid "%s: option '%s%s' is ambiguous; possibilities:" +msgstr "%s: tùy chọn “%s” chưa rõ ràng; khả năng là:" -#: lib/getopt.c:667 lib/getopt.c:672 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" +#: lib/getopt.c:319 +#, fuzzy, c-format +msgid "%s: unrecognized option '%s%s'\n" +msgstr "%s: không nhận ra tùy chọn “%c%s”\n" + +#: lib/getopt.c:345 +#, fuzzy, c-format +msgid "%s: option '%s%s' doesn't allow an argument\n" msgstr "%s: tùy chọn “%c%s” không cho phép có đối số\n" -#: lib/getopt.c:715 lib/getopt.c:734 -#, c-format -msgid "%s: option '--%s' requires an argument\n" +#: lib/getopt.c:360 +#, fuzzy, c-format +msgid "%s: option '%s%s' requires an argument\n" msgstr "%s: tùy chọn “--%s” cần một đối số\n" -#: lib/getopt.c:772 lib/getopt.c:775 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: không nhận ra tùy chọn “--%s”\n" - -#: lib/getopt.c:783 lib/getopt.c:786 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: không nhận ra tùy chọn “%c%s”\n" - -#: lib/getopt.c:835 lib/getopt.c:838 +#: lib/getopt.c:621 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: tùy chọn không hợp lệ -- “%c”\n" -#: lib/getopt.c:891 lib/getopt.c:908 lib/getopt.c:1118 lib/getopt.c:1136 +#: lib/getopt.c:636 lib/getopt.c:682 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: tùy chọn yêu cầu một đối số -- “%c”\n" -#: lib/getopt.c:964 lib/getopt.c:980 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: tùy chọn “-W %s” chưa rõ ràng\n" - -#: lib/getopt.c:1004 lib/getopt.c:1022 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: tùy chọn “-W %s” không cho phép đối số\n" - -#: lib/getopt.c:1043 lib/getopt.c:1061 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: tùy chọn “-W %s” cần một đối số\n" - #. TRANSLATORS: #. Get translations for open and closing quotation marks. #. The message catalog should translate "`" to a left @@ -109,11 +84,11 @@ #. If you don't know what to put here, please see #. #. and use glyphs suitable for your language. -#: lib/quotearg.c:354 +#: lib/quotearg.c:362 msgid "`" msgstr "“" -#: lib/quotearg.c:355 +#: lib/quotearg.c:363 msgid "'" msgstr "”" @@ -312,32 +287,32 @@ msgstr "%s%s đối số “%s” quá lớn" #. This is a proper name. See the gettext manual, section Names. -#: src/datamash.c:64 +#: src/datamash.c:65 msgid "Assaf Gordon" msgstr "Assaf Gordon" -#: src/datamash.c:151 src/datamash.c:467 +#: src/datamash.c:152 src/datamash.c:474 #, c-format msgid "column name %s not found in input file" msgstr "không tìm thấy cột tên %s trong tập tin đầu vào" -#: src/datamash.c:164 +#: src/datamash.c:165 #, fuzzy, c-format msgid "Usage: %s [OPTION] op [fld] [op fld ...]\n" msgstr "Cách dùng: %s [TÙY-CHỌN] op [cột] [op cột …]\n" -#: src/datamash.c:167 +#: src/datamash.c:168 msgid "Performs numeric/string operations on input from stdin." msgstr "" "Thực hiện các thao tác với số/chuỗi trên đầu vào từ đầu vào tiêu chuẩn." -#: src/datamash.c:170 +#: src/datamash.c:171 msgid "" "'op' is the operation to perform. If a primary operation is used,\n" "it must be listed first, optionally followed by other operations.\n" msgstr "" -#: src/datamash.c:173 +#: src/datamash.c:174 #, fuzzy msgid "" "'fld' is the input field to use. 'fld' can be a number (1=first field),\n" @@ -347,43 +322,43 @@ "“cột” có thể là số (1=cột đầu tiên), hoặc tên cột khi sử dụng\n" "tùy chọn -H hoặc --header-in.\n" -#: src/datamash.c:176 +#: src/datamash.c:177 msgid "" "Multiple fields can be listed with a comma (e.g. 1,6,8). A range of\n" "fields can be listed with a dash (e.g. 2-8). Use colons for operations\n" "which require a pair of fields (e.g. 'pcov 2:6').\n" msgstr "" -#: src/datamash.c:181 +#: src/datamash.c:182 #, fuzzy msgid "Primary operations:\n" msgstr "Thao tác trên-dòng:\n" -#: src/datamash.c:184 +#: src/datamash.c:185 msgid "Line-Filtering operations:\n" msgstr "Thao tác lọc-dòng:\n" -#: src/datamash.c:187 +#: src/datamash.c:188 msgid "Per-Line operations:\n" msgstr "Thao tác trên-dòng:\n" -#: src/datamash.c:191 +#: src/datamash.c:192 msgid "Numeric Grouping operations:\n" msgstr "Các thao tác nhóm số:\n" -#: src/datamash.c:194 +#: src/datamash.c:195 msgid "Textual/Numeric Grouping operations:\n" msgstr "Thao tác nhóm Số/Chữ:\n" -#: src/datamash.c:198 +#: src/datamash.c:199 msgid "Statistical Grouping operations:\n" msgstr "Thao tác nhóm thống kê:\n" -#: src/datamash.c:206 +#: src/datamash.c:207 msgid "Grouping Options:\n" msgstr "Tùy chọn nhóm:\n" -#: src/datamash.c:207 +#: src/datamash.c:208 msgid "" " -f, --full print entire input line before op results\n" " (default: print only the grouped keys)\n" @@ -391,27 +366,27 @@ " -f, --full in toàn bộ dòng đầu vào trước kết quả thao tác\n" " (mặc định: chỉ in các khóa được nhóm)\n" -#: src/datamash.c:211 +#: src/datamash.c:212 msgid "" " -g, --group=X[,Y,Z] group via fields X,[Y,Z];\n" " equivalent to primary operation 'groupby'\n" msgstr "" -#: src/datamash.c:215 +#: src/datamash.c:216 msgid " --header-in first input line is column headers\n" msgstr " --header-in dòng đầu vào đầu tiên là đầu cột\n" -#: src/datamash.c:218 +#: src/datamash.c:219 msgid " --header-out print column headers as first line\n" msgstr " --header-out in đầu cột cho dòng đầu tiên\n" -#: src/datamash.c:221 +#: src/datamash.c:222 msgid " -H, --headers same as '--header-in --header-out'\n" msgstr " -H, --headers giống với “--header-in --header-out”\n" # Ghi chú: # Thêm nút -#: src/datamash.c:224 +#: src/datamash.c:225 msgid "" " -i, --ignore-case ignore upper/lower case when comparing text;\n" " this affects grouping, and string operations\n" @@ -419,7 +394,7 @@ " -i, --ignore-case không phân biệt HOA/thường khi so sánh chữ;\n" " nó ảnh hưởng đến thao tác nhóm và chuỗi\n" -#: src/datamash.c:228 +#: src/datamash.c:229 msgid "" " -s, --sort sort the input before grouping; this removes " "the\n" @@ -431,35 +406,35 @@ " cần đến đường ống một cách thủ công thông qua " "lệnh “sort”\n" -#: src/datamash.c:233 +#: src/datamash.c:234 msgid "File Operation Options:\n" msgstr "Tùy chọn thao tác tập tin:\n" -#: src/datamash.c:234 +#: src/datamash.c:235 msgid " --no-strict allow lines with varying number of fields\n" msgstr "" " --no-strict cho phép các dòng với số lượng trường biến đổi\n" -#: src/datamash.c:237 +#: src/datamash.c:238 #, c-format msgid " --filler=X fill missing values with X (default %s)\n" msgstr "" " --filler=X điền đầy giá trị thiếu bằng X (mặc định %s)\n" -#: src/datamash.c:242 +#: src/datamash.c:243 msgid "General Options:\n" msgstr "Tùy chọn chung:\n" -#: src/datamash.c:243 +#: src/datamash.c:244 msgid " -t, --field-separator=X use X instead of TAB as field delimiter\n" msgstr "" " -t, --field-separator=X dùng X thay vì TAB làm bộ phân tách trường\n" -#: src/datamash.c:246 +#: src/datamash.c:247 msgid " --narm skip NA/NaN values\n" msgstr " --narm bỏ qua các giá trị NA/NaN\n" -#: src/datamash.c:249 +#: src/datamash.c:250 msgid "" " -W, --whitespace use whitespace (one or more spaces and/or tabs)\n" " for field delimiters\n" @@ -467,33 +442,33 @@ " -W, --whitespace dùng khoảng trắng (một hoặc nhiều khoảng trắng\n" " hoặc/và tab) cho bộ phân tách trường\n" -#: src/datamash.c:253 +#: src/datamash.c:254 msgid " -z, --zero-terminated end lines with 0 byte, not newline\n" msgstr "" " -z, --zero-terminated kết thúc dòng với byte 0, không phải ký tự dòng " "mới\n" -#: src/datamash.c:262 +#: src/datamash.c:263 msgid "Examples:" msgstr "Ví dụ:" -#: src/datamash.c:264 +#: src/datamash.c:265 msgid "Print the sum and the mean of values from column 1:" msgstr "In tổng và giá trị trung bình từ cột 1:" -#: src/datamash.c:269 +#: src/datamash.c:270 msgid "Transpose input:" msgstr "Chuyển vị đầu vào:" -#: src/datamash.c:276 +#: src/datamash.c:277 msgid "For detailed usage information and examples, see\n" msgstr "Để có thông tin chi tiết về cách dùng và ví dụ, xem\n" -#: src/datamash.c:278 +#: src/datamash.c:279 msgid "The manual and more examples are available at\n" msgstr "Hướng dẫn sử dụng và nhiều ví dụ sẵn có tại\n" -#: src/datamash.c:287 +#: src/datamash.c:288 #, c-format msgid "" "invalid input: field % requested, line % has only " @@ -502,12 +477,12 @@ "đầu vào không hợp lệ: đã yêu cầu trường %, dòng % chỉ có " "% trường" -#: src/datamash.c:357 +#: src/datamash.c:358 #, c-format msgid "%s in line % field %: '%s'" msgstr "%s ở dòng % trường %: “%s”" -#: src/datamash.c:676 +#: src/datamash.c:683 #, c-format msgid "" "transpose input error: line % has % fields (previous lines " @@ -518,7 +493,7 @@ "%);\n" "xem --help để tắt chế độ hạn chế" -#: src/datamash.c:733 +#: src/datamash.c:740 #, c-format msgid "" "reverse-field input error: line % has % fields (previous " @@ -529,14 +504,23 @@ "trước đó có %);\n" "xem --help để tắt chế độ hạn chế" -#: src/datamash.c:837 src/datamash.c:843 +#: src/datamash.c:849 src/datamash.c:866 src/datamash.c:872 #, fuzzy, c-format msgid "" "line % (% fields):\n" " " msgstr "%s ở dòng % trường %: “%s”" -#: src/datamash.c:849 +#: src/datamash.c:855 +#, fuzzy, c-format +msgid "" +"check failed: line % has % fields (expecting %)" +msgstr "" +"lỗi đầu vào hoán vị: dòng % có % trường (dòng trước đó có " +"%);\n" +"xem --help để tắt chế độ hạn chế" + +#: src/datamash.c:878 #, fuzzy, c-format msgid "" "check failed: line % has % fields (previous line had " @@ -546,140 +530,146 @@ "%);\n" "xem --help để tắt chế độ hạn chế" -#: src/datamash.c:861 +#: src/datamash.c:892 +#, fuzzy, c-format +msgid "check failed: input had % lines (expecting %)" +msgstr "" +"lỗi đầu vào hoán vị: dòng % có % trường (dòng trước đó có " +"%);\n" +"xem --help để tắt chế độ hạn chế" + +#: src/datamash.c:898 #, c-format msgid "% line" msgid_plural "% lines" msgstr[0] "" -#: src/datamash.c:864 +#: src/datamash.c:901 #, c-format msgid "% field" msgid_plural "% fields" msgstr[0] "" -#: src/datamash.c:965 -#, c-format +#: src/datamash.c:1002 msgid "hash memory allocation error" msgstr "lỗi phân bổ bộ nhớ mã băm" -#: src/datamash.c:1027 -#, c-format +#: src/datamash.c:1064 msgid "sort command too-long (please report this bug)" msgstr "lệnh sort quá dài (vui lòng báo cáo đây là lỗi)" -#: src/datamash.c:1033 -#, c-format +#: src/datamash.c:1070 msgid "failed to run 'sort': popen failed" msgstr "gặp lỗi khi chạy “sort”: popen bị lỗi" -#: src/datamash.c:1049 -#, c-format +#: src/datamash.c:1086 msgid "read error" msgstr "lỗi đọc" -#: src/datamash.c:1057 -#, c-format +#: src/datamash.c:1094 msgid "read error (on close)" msgstr "lỗi đọc (khi đóng)" -#: src/datamash.c:1133 -#, c-format +#: src/datamash.c:1170 msgid "the delimiter must be a single character" msgstr "dấu phân cách phải là một ký tự đơn" -#: src/datamash.c:1170 +#: src/datamash.c:1207 #, c-format msgid "missing operation specifiers" msgstr "thiếu bộ chỉ thị thao tác" -#: src/datamash.c:1184 -#, c-format +#: src/datamash.c:1221 msgid "-H or --header-in must be used with named columns" msgstr "-H hay --header-in phải được dùng cùng với tên của cột" -#: src/field-ops.c:319 +#: src/field-ops.c:323 #, c-format msgid "" "input error for operation %s: fields %,% have different " "number of items" msgstr "" -#: src/field-ops.c:999 +#: src/field-ops.c:1034 msgid "invalid numeric value" msgstr "giá trị số không hợp lệ" -#: src/field-ops.c:1001 +#: src/field-ops.c:1036 msgid "invalid base64 value" msgstr "giá trị base64 không hợp lệ" -#: src/op-parser.c:163 src/op-parser.c:177 src/op-parser.c:184 +#: src/op-parser.c:165 src/op-parser.c:179 src/op-parser.c:193 +#: src/op-parser.c:200 #, fuzzy, c-format msgid "too many parameters for operation %s" msgstr "cột “%s” không hợp lệ với thao tác %s" -#: src/op-parser.c:174 -#, c-format +#: src/op-parser.c:176 msgid "strbin bucket size must not be zero" msgstr "" -#: src/op-parser.c:205 src/op-parser.c:216 src/op-parser.c:472 +#: src/op-parser.c:190 +#, fuzzy, c-format +msgid "invalid percentile value %" +msgstr "giá trị số không hợp lệ" + +#: src/op-parser.c:221 src/op-parser.c:232 src/op-parser.c:490 #, fuzzy, c-format msgid "missing field for operation %s" msgstr "thiếu số trường sau thao tác “%s”" -#: src/op-parser.c:211 src/op-parser.c:220 src/op-parser.c:275 -#: src/op-parser.c:508 +#: src/op-parser.c:227 src/op-parser.c:236 src/op-parser.c:292 +#: src/op-parser.c:527 #, fuzzy, c-format msgid "invalid field range for operation %s" msgstr "cột trống không hợp lệ với thao tác %s" -#: src/op-parser.c:214 src/op-parser.c:224 src/op-parser.c:511 +#: src/op-parser.c:230 src/op-parser.c:240 src/op-parser.c:530 #, fuzzy, c-format msgid "invalid field pair for operation %s" msgstr "cột “%s” không hợp lệ với thao tác %s" -#: src/op-parser.c:238 src/op-parser.c:486 +#: src/op-parser.c:255 src/op-parser.c:505 #, fuzzy, c-format msgid "invalid field '%s' for operation %s" msgstr "cột “%s” không hợp lệ với thao tác %s" -#: src/op-parser.c:272 +#: src/op-parser.c:289 #, c-format msgid "field range for %s must be numeric" msgstr "" -#: src/op-parser.c:332 +#: src/op-parser.c:349 #, fuzzy, c-format msgid "missing parameter for operation %s" msgstr "thiếu số trường sau thao tác “%s”" -#: src/op-parser.c:340 +#: src/op-parser.c:357 #, fuzzy, c-format msgid "invalid parameter %s for operation %s" msgstr "cột “%s” không hợp lệ với thao tác %s" -#: src/op-parser.c:372 +#: src/op-parser.c:389 #, fuzzy, c-format msgid "operation %s requires field pairs" msgstr "%s: tùy chọn “--%s” cần một đối số\n" -#: src/op-parser.c:375 +#: src/op-parser.c:392 #, c-format msgid "operation %s cannot use pair of fields" msgstr "" -#: src/op-parser.c:415 +#: src/op-parser.c:432 #, fuzzy, c-format msgid "conflicting operation %s" msgstr "thao tác không hợp lệ “%s”" -#: src/op-parser.c:418 src/op-parser.c:597 +#: src/op-parser.c:435 src/op-parser.c:688 #, fuzzy, c-format msgid "invalid operation %s" msgstr "thao tác không hợp lệ “%s”" -#: src/op-parser.c:423 +#: src/op-parser.c:440 #, c-format msgid "" "conflicting operation found: expecting %s operations, but found %s operation " @@ -688,42 +678,62 @@ "tìm thấy có xung đột thao tác: cần thao tác %s, nhưng lại nhận được %s thao " "tác %s" -#: src/op-parser.c:537 +#: src/op-parser.c:544 +#, fuzzy, c-format +msgid "invalid option %s for operation check" +msgstr "cột “%s” không hợp lệ với thao tác %s" + +#: src/op-parser.c:572 +msgid "number expected after option in operation 'check'" +msgstr "" + +#: src/op-parser.c:578 +msgid "invalid value zero for lines/fields in operation 'check'" +msgstr "" + +#: src/op-parser.c:584 +msgid "number of lines/rows already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:591 +msgid "number of fields/columns already set in operation 'check'" +msgstr "" + +#: src/op-parser.c:628 #, c-format msgid "crosstab requires exactly 2 fields, found %" msgstr "" -#: src/op-parser.c:550 +#: src/op-parser.c:641 #, c-format msgid "crosstab supports one operation, found %" msgstr "" -#: src/op-parser.c:559 -#, fuzzy, c-format +#: src/op-parser.c:650 +#, fuzzy msgid "missing operation" msgstr "thiếu bộ chỉ thị thao tác" -#: src/op-parser.c:573 +#: src/op-parser.c:664 #, fuzzy, c-format msgid "extra operand %s" msgstr "có thao tác thừa nằm sau “%s”" -#: src/op-parser.c:710 src/op-scanner.c:210 -#, c-format +#: src/op-parser.c:801 src/op-scanner.c:211 msgid "missing script (among arguments)" msgstr "" -#: src/op-scanner.c:167 +#: src/op-scanner.c:168 #, fuzzy, c-format msgid "invalid numeric value '%s'" msgstr "giá trị số không hợp lệ" -#: src/op-scanner.c:188 +#: src/op-scanner.c:189 #, fuzzy, c-format msgid "invalid operand %s" msgstr "thao tác không hợp lệ “%s”" -#: src/op-scanner.c:244 +#: src/op-scanner.c:245 #, c-format msgid "unknown token %d\n" msgstr "" @@ -741,6 +751,21 @@ msgid "Try '%s --help' for more information.\n" msgstr "Hãy chạy lệnh “%s --help” để biết thêm thông tin.\n" +#~ msgid "%s: option '--%s' doesn't allow an argument\n" +#~ msgstr "%s: tùy chọn “--%s” không nhận đối số\n" + +#~ msgid "%s: unrecognized option '--%s'\n" +#~ msgstr "%s: không nhận ra tùy chọn “--%s”\n" + +#~ msgid "%s: option '-W %s' is ambiguous\n" +#~ msgstr "%s: tùy chọn “-W %s” chưa rõ ràng\n" + +#~ msgid "%s: option '-W %s' doesn't allow an argument\n" +#~ msgstr "%s: tùy chọn “-W %s” không cho phép đối số\n" + +#~ msgid "%s: option '-W %s' requires an argument\n" +#~ msgstr "%s: tùy chọn “-W %s” cần một đối số\n" + #~ msgid "'op' is the operation to perform;\n" #~ msgstr "“op” là thao tác cần thực hiện;\n" diff -Nru datamash-1.1.1/README datamash-1.2.0/README --- datamash-1.1.1/README 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/README 2017-08-20 19:04:41.000000000 +0000 @@ -74,6 +74,50 @@ http://www.gnu.org/software/datamash/download/ +To build from latest git sources, see the HACKING.md file. This file is +available when cloning from git, but is not distributed in the tar archive. +To clone the git repository run + git clone git://git.savannah.gnu.org/datamash.git +It is also available online at + https://git.savannah.gnu.org/cgit/datamash.git/tree/HACKING.md + + +BASH Auto-completion +==================== + +The datamash package inclueds a bash auto-completion script. +The installation location can be controlled using + + ./configure --with-bash-completion-dir=[no|local|global|PATH] + +The options are: + +* local - install under the package's $PREFIX path. + typically `/usr/local/share/datamash/bash-completion.d/` , + but can be changed with `./configure --prefix`. + This is the default. + +* no - do not install the bash completion script. + +* [PATH] - install into the PATH specified on the command line, e.g. + `./configure --with-bash-completion-dir=/for/bar/bash-completion.d/` + +* global - install into the system's global bash-completion directory, + as reported by `pkg-config`. This will be the result of: + `pkg-config --variable=completionsdir bash-completion` + Which is commonly `/usr/share/bash-completion/completions` + or `/etc/bash.d`. + If `pkg-config` is not found or if `pkg-config` does not have + the config (.pc) file for the bash-completion package, + defaults to 'local'. + +`local` is the default, and should be used particularly if installing under +a non-default `--prefix` without root permissions. +`global` should be used if you are installing to default location (/usr/local) +and have root permissions (e.g. `sudo make install`). +Using custom PATH or `global` should be used when packaging datamash for +further distribution. + Questions and Bug Reports ========================= diff -Nru datamash-1.1.1/README-release datamash-1.2.0/README-release --- datamash-1.1.1/README-release 2014-07-05 20:14:51.000000000 +0000 +++ datamash-1.2.0/README-release 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -Here are most of the steps we (maintainers) follow when making a release. - -* Start from a clean, up-to-date git directory on "master": - - make -k maintainer-clean || { ./configure && make maintainer-clean; } - git checkout master - git pull origin master - -* Ensure that the latest stable versions of autoconf, automake, etc. - are in your PATH. See the buildreq list in bootstrap.conf for - the complete list of tools. - -* Ensure that you have no uncommitted diffs. This should produce no - output: - - git diff - -* Ensure that you've pushed all changes that belong in the release: - - git push origin master - -* Check that the NixOS/Hydra autobuilder is reporting all is well: - - http://hydra.nixos.org/jobset/gnu/@PACKAGE@-master - -* Run the following command to download any new translations: - - ./bootstrap && ./configure - -* Pre-release testing: ensure that the following command succeeds: - - make check syntax-check distcheck - -* To (i) set the date, version number, and release TYPE on line 3 of - NEWS, (ii) commit that, and (iii) tag the release, run - - # "TYPE" must be stable, beta or alpha - make release-commit RELEASE='X.Y TYPE' - -* Run the following to create release tarballs. Your choice selects the - corresponding upload-to destination in the emitted gnupload command. - The different destinations are specified in cfg.mk. See the definitions - of gnu_ftp_host-{alpha,beta,stable}. - - make release RELEASE='X.Y TYPE' - -* Test the tarball. Copy it to a few odd-ball systems and ensure that - it builds and passes all tests. - -* While that's happening, write the release announcement that you will - soon post. Start with the template, $HOME/announce-@PACKAGE@-X.Y - that was just created by that "make" command. - -Once all the builds and tests have passed, - -* Run the gnupload command that was suggested by your "make release" - run above, or run - - make upload RELEASE='X.Y TYPE' - -* Wait a few minutes (maybe up to 30?) and then use the release URLs to - download all tarball/signature pairs and use gpg --verify to ensure - that they're all valid. - -* Push the NEWS-updating changes and the new tag: - - v=$(cat .prev-version) - git push origin master tag v$v - -* Announce it on Savannah first, so you can include the savannah.org - announcement link in the email message. - - Go to the news-submission form: - - https://savannah.gnu.org/news/submit.php?group=@PACKAGE@ - - If it does not work, then enable "News" for the project via this link: - - https://savannah.gnu.org/project/admin/editgroupfeatures.php?group=@PACKAGE@ - - Write something like the following: - - Subject: @PACKAGE@-X.Y released [stable] - +verbatim+ - ...paste the announcement here... - -verbatim- - - Then go here to approve it: - - https://savannah.gnu.org/news/approve.php?group=@PACKAGE@ - -* Send the announcement email message. - -* After each non-alpha release, run - - make web-manual-update - - to update the on-line manual accessible at - - http://www.gnu.org/software/@PACKAGE@/manual/ diff -Nru datamash-1.1.1/src/crosstab.c datamash-1.2.0/src/crosstab.c --- datamash-1.1.1/src/crosstab.c 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/src/crosstab.c 2017-08-22 23:05:11.000000000 +0000 @@ -181,6 +181,9 @@ print_line_separator (); } + + IF_LINT (free (rows_list)); + IF_LINT (free (cols_list)); } /* vim: set cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1: */ /* vim: set shiftwidth=2: */ diff -Nru datamash-1.1.1/src/datamash.c datamash-1.2.0/src/datamash.c --- datamash-1.1.1/src/datamash.c 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/src/datamash.c 2017-08-22 23:05:11.000000000 +0000 @@ -34,6 +34,7 @@ #include "system.h" +#include "die.h" #include "fpucw.h" #include "closeout.h" #include "hash.h" @@ -147,7 +148,7 @@ p->num = get_input_field_number (p->name); if (p->num == 0) - error (EXIT_FAILURE, 0, + die (EXIT_FAILURE, 0, _("column name %s not found in input file"), quote (p->name)); p->by_name = false; @@ -189,7 +190,7 @@ fputs (" bin, strbin, round, floor, ceil, trunc, frac\n", stdout); fputs (_("Numeric Grouping operations:\n"),stdout); - fputs (" sum, min, max, absmin, absmax\n",stdout); + fputs (" sum, min, max, absmin, absmax, range\n",stdout); fputs (_("Textual/Numeric Grouping operations:\n"),stdout); fputs (" count, first, last, rand, unique, collapse, countunique\n", @@ -197,7 +198,7 @@ fputs (_("Statistical Grouping operations:\n"),stdout); fputs ("\ - mean, median, q1, q3, iqr, mode, antimode, pstdev, sstdev, pvar,\n\ + mean, median, q1, q3, iqr, perc, mode, antimode, pstdev, sstdev, pvar,\n\ svar, mad, madraw, pskew, sskew, pkurt, skurt, dpo, jarque,\n\ scov, pcov, spearson, ppearson\n\ \n", stdout); @@ -353,7 +354,7 @@ char *tmp = xmalloc (len+1); memcpy (tmp,str,len); tmp[len] = 0 ; - error (EXIT_FAILURE, 0, + die (EXIT_FAILURE, 0, _("%s in line %"PRIuMAX" field %"PRIuMAX": '%s'"), field_op_collect_result_name (flocr), (uintmax_t)line_number, (uintmax_t)op->field, tmp); @@ -442,8 +443,14 @@ if (op->field > get_num_column_headers ()) error_not_enough_fields (op->field, get_num_column_headers ()); - printf ("%s" "(%s)",get_field_operation_name (op->op), - get_input_field_name (op->field)); + + printf ("%s", get_field_operation_name (op->op)); + + if (op->op == OP_PERCENTILE) { + printf (":%"PRIuMAX, (uintmax_t)op->params.percentile); + } + + printf ("(%s)", get_input_field_name (op->field)); if (i != dm->num_ops-1) print_field_separator (); @@ -463,7 +470,7 @@ continue; p->field = get_input_field_number (p->field_name); if (p->field == 0) - error (EXIT_FAILURE, 0, + die (EXIT_FAILURE, 0, _("column name %s not found in input file"), quote (p->field_name)); p->field_by_name = false; @@ -673,7 +680,7 @@ const size_t num_fields = line_record_num_fields (thisline); if (strict && line_number>1 && num_fields != prev_num_fields) - error (EXIT_FAILURE, 0, _("transpose input error: line %"PRIuMAX" " \ + die (EXIT_FAILURE, 0, _("transpose input error: line %"PRIuMAX" " \ "has %"PRIuMAX" fields (previous lines had %"PRIuMAX");\n" \ "see --help to disable strict mode"), (uintmax_t)line_number, (uintmax_t)num_fields, @@ -730,7 +737,7 @@ const size_t num_fields = line_record_num_fields (thisline); if (strict && line_number>1 && num_fields != prev_num_fields) - error (EXIT_FAILURE, 0, _("reverse-field input error: line " \ + die (EXIT_FAILURE, 0, _("reverse-field input error: line " \ "%"PRIuMAX" has %"PRIuMAX" fields (previous lines had " \ "%"PRIuMAX");\n" \ "see --help to disable strict mode"), @@ -818,6 +825,9 @@ struct line_record_t lb1, lb2; struct line_record_t *thisline, *prevline; + const uintmax_t n_lines = dm->mode_params.check_params.n_lines; + const uintmax_t n_fields = dm->mode_params.check_params.n_fields; + thisline = &lb1; prevline = &lb2; @@ -832,7 +842,26 @@ const size_t num_fields = line_record_num_fields (thisline); - if (line_number>1 && num_fields != prev_num_fields) + /* Check if the number of fields is different than expected/requested + on the command line (e.g. with 'datamash check 6 fields') */ + if (n_fields && n_fields != num_fields) + { + fprintf (stderr, _("line %"PRIuMAX" (%"PRIuMAX" fields):\n "), + (uintmax_t)(line_number), (uintmax_t)num_fields); + ignore_value (fwrite (line_record_buffer (thisline), + line_record_length (thisline), sizeof (char), + stderr)); + fputc ('\n', stderr); + die (EXIT_FAILURE, 0, _("check failed: line " \ + "%"PRIuMAX" has %"PRIuMAX" fields (expecting "\ + "%"PRIuMAX")"), + (uintmax_t)line_number, (uintmax_t)num_fields, + (uintmax_t)n_fields); + } + + /* Check if the number of fields changed from one line to the next + (only if no expected number of fields specified on the command line).*/ + else if (line_number>1 && num_fields != prev_num_fields) { fprintf (stderr, _("line %"PRIuMAX" (%"PRIuMAX" fields):\n "), (uintmax_t)(line_number-1), (uintmax_t)prev_num_fields); @@ -846,7 +875,7 @@ line_record_length (thisline), sizeof (char), stderr)); fputc ('\n', stderr); - error (EXIT_FAILURE, 0, _("check failed: line " \ + die (EXIT_FAILURE, 0, _("check failed: line " \ "%"PRIuMAX" has %"PRIuMAX" fields (previous line had "\ "%"PRIuMAX")"), (uintmax_t)line_number, (uintmax_t)num_fields, @@ -857,6 +886,14 @@ SWAP_LINES (prevline, thisline); } + /* Check if we read too many/few lines */ + if (n_lines && n_lines != line_number) + { + die (EXIT_FAILURE, 0, _("check failed: input had %"PRIuMAX" lines " \ + "(expecting %"PRIuMAX")"), + (uintmax_t)line_number, (uintmax_t)n_lines); + } + /* Print summary */ printf (ngettext ("%"PRIuMAX" line", "%"PRIuMAX" lines", select_plural (line_number)), (uintmax_t)line_number); @@ -962,7 +999,7 @@ /* Add key to buffer (if not found) */ const int i = hash_insert_if_absent (ht, next_key, NULL); if ( i == -1 ) - error (EXIT_FAILURE, errno, _("hash memory allocation error")); + die (EXIT_FAILURE, errno, _("hash memory allocation error")); if ( i == 1 ) { @@ -1023,14 +1060,14 @@ snprintf (tmp,sizeof (tmp),"-k%"PRIuMAX",%"PRIuMAX" ", (uintmax_t)col_num,(uintmax_t)col_num); if (strlen (tmp)+strlen (cmd)+1 >= sizeof (cmd)) - error (EXIT_FAILURE, 0, + die (EXIT_FAILURE, 0, _("sort command too-long (please report this bug)")); strcat (cmd,tmp); } input_stream = popen (cmd,"r"); if (input_stream == NULL) - error (EXIT_FAILURE, 0, _("failed to run 'sort': popen failed")); + die (EXIT_FAILURE, 0, _("failed to run 'sort': popen failed")); } else { @@ -1046,7 +1083,7 @@ int i; if (ferror (input_stream)) - error (EXIT_FAILURE, errno, _("read error")); + die (EXIT_FAILURE, errno, _("read error")); if (pipe_through_sort) i = pclose (input_stream); @@ -1054,7 +1091,7 @@ i = fclose (input_stream); if (i != 0) - error (EXIT_FAILURE, errno, _("read error (on close)")); + die (EXIT_FAILURE, errno, _("read error (on close)")); } int main (int argc, char* argv[]) @@ -1129,7 +1166,7 @@ case 't': if (optarg[0] == '\0' || optarg[1] != '\0') - error (EXIT_FAILURE, 0, + die (EXIT_FAILURE, 0, _("the delimiter must be a single character")); in_tab = out_tab = optarg[0]; break; @@ -1180,7 +1217,7 @@ /* If using named-columns, but no input header - abort */ if (dm->header_required && !input_header) - error (EXIT_FAILURE, 0, + die (EXIT_FAILURE, 0, _("-H or --header-in must be used with named columns")); open_input (); @@ -1223,8 +1260,8 @@ tabular_check_file (); break; - case MODE_INVALID: - default: + case MODE_INVALID: /* LCOV_EXCL_LINE */ + default: /* LCOV_EXCL_LINE */ internal_error ("op mode"); /* LCOV_EXCL_LINE */ } free_column_headers (); diff -Nru datamash-1.1.1/src/die.h datamash-1.2.0/src/die.h --- datamash-1.1.1/src/die.h 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/src/die.h 2017-08-20 19:04:41.000000000 +0000 @@ -0,0 +1,31 @@ +/* Report an error and exit. + Copyright 2016-2017 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, 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, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifndef DIE_H +# define DIE_H + +# include +# include +# include + +/* Like 'error (STATUS, ...)', except STATUS must be a nonzero constant. + This may pacify the compiler or help it generate better code. */ +# define die(status, ...) \ + verify_expr (status, (error (status, __VA_ARGS__), assume (false))) + +#endif /* DIE_H */ diff -Nru datamash-1.1.1/src/field-ops.c datamash-1.2.0/src/field-ops.c --- datamash-1.1.1/src/field-ops.c 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/src/field-ops.c 2017-08-20 19:04:41.000000000 +0000 @@ -32,7 +32,7 @@ #include #include -#include "error.h" +#include "die.h" #include "minmax.h" #include "linebuffer.h" #include "system.h" @@ -65,6 +65,8 @@ {NUMERIC_SCALAR, AUTO_SET_FIRST, NUMERIC_RESULT}, /* OP_ABSMAX */ {NUMERIC_SCALAR, AUTO_SET_FIRST, NUMERIC_RESULT}, + /* OP_RANGE */ + {NUMERIC_SCALAR, IGNORE_FIRST, NUMERIC_RESULT}, /* OP_FIRST */ {STRING_SCALAR, IGNORE_FIRST, STRING_RESULT}, /* OP_LAST */ @@ -81,6 +83,8 @@ {NUMERIC_VECTOR, IGNORE_FIRST, NUMERIC_RESULT}, /* OP_IQR */ {NUMERIC_VECTOR, IGNORE_FIRST, NUMERIC_RESULT}, + /* OP_PERCENTILE */ + {NUMERIC_VECTOR, IGNORE_FIRST, NUMERIC_RESULT}, /* OP_PSTDEV */ {NUMERIC_VECTOR, IGNORE_FIRST, NUMERIC_RESULT}, /* OP_SSTDEV */ @@ -316,7 +320,7 @@ assert (op && !op->slave && op->slave_op); /* LCOV_EXCL_LINE */ if (op->num_values != op->slave_op->num_values) - error (EXIT_FAILURE, 0, _("input error for operation %s: \ + die (EXIT_FAILURE, 0, _("input error for operation %s: \ fields %"PRIuMAX",%"PRIuMAX" have different number of items"), quote (get_field_operation_name (op->op)), (uintmax_t)op->slave_op->field, @@ -348,7 +352,7 @@ and returns invalid value. Make a copy of the input buffer and NULL-terminate it */ if (slen >= sizeof (tmpbuf)) - error (EXIT_FAILURE, 0, + die (EXIT_FAILURE, 0, "internal error: input field too long (%zu)", slen); memcpy (tmpbuf,str,slen); tmpbuf[slen]=0; @@ -412,6 +416,24 @@ } break; + case OP_RANGE: + /* Upon the first value, we store it twice + (once for min, once for max). + For subsequence values, we update the min/max entries directly. */ + if (op->first) + { + field_op_add_value (op, num_value); + field_op_add_value (op, num_value); + } + else + { + if (num_value < op->values[0]) + op->values[0] = num_value; + if (num_value > op->values[1]) + op->values[1] = num_value; + } + break; + case OP_FIRST: if (op->first) { @@ -465,6 +487,7 @@ case OP_QUARTILE_1: case OP_QUARTILE_3: case OP_IQR: + case OP_PERCENTILE: case OP_PSTDEV: case OP_SSTDEV: case OP_PVARIANCE: @@ -531,8 +554,8 @@ }; break; - case OP_INVALID: - default: + case OP_INVALID: /* LCOV_EXCL_LINE */ + default: /* LCOV_EXCL_LINE */ /* Should never happen */ internal_error ("bad op"); /* LCOV_EXCL_LINE */ } @@ -648,6 +671,7 @@ case OP_QUARTILE_1: case OP_QUARTILE_3: case OP_IQR: + case OP_PERCENTILE: case OP_MAD: case OP_MADRAW: case OP_PSTDEV: @@ -667,6 +691,7 @@ case OP_ROUND: case OP_TRUNCATE: case OP_FRACTION: + case OP_RANGE: numeric_result = nanl (""); break; @@ -705,8 +730,8 @@ strcpy (op->out_buf, ""); break; - case OP_INVALID: - default: + case OP_INVALID: /* LCOV_EXCL_LINE */ + default: /* LCOV_EXCL_LINE */ /* Should never happen */ internal_error ("bad op"); /* LCOV_EXCL_LINE */ } @@ -766,6 +791,10 @@ memcpy (op->out_buf, op->str_buf, op->str_buf_used); break; + case OP_RANGE: + numeric_result = op->values[1] - op->values[0]; + break; + case OP_MEDIAN: field_op_sort_values (op); numeric_result = median_value ( op->values, op->num_values ); @@ -787,6 +816,12 @@ - quartile1_value ( op->values, op->num_values ); break; + case OP_PERCENTILE: + field_op_sort_values (op); + numeric_result = percentile_value ( op->values, op->num_values, + op->params.percentile / 100.0 ); + break; + case OP_PSTDEV: numeric_result = stdev_value ( op->values, op->num_values, DF_POPULATION); break; @@ -917,8 +952,8 @@ field_op_to_hex (op, tmpbuf, 64); break; - case OP_INVALID: - default: + case OP_INVALID: /* LCOV_EXCL_LINE */ + default: /* LCOV_EXCL_LINE */ /* Should never happen */ internal_error ("bad op"); /* LCOV_EXCL_LINE */ } @@ -999,9 +1034,9 @@ return _("invalid numeric value"); case FLOCR_INVALID_BASE64: return _("invalid base64 value"); - case FLOCR_OK: - case FLOCR_OK_KEEP_LINE: - case FLOCR_OK_SKIPPED: + case FLOCR_OK: /* LCOV_EXCL_LINE */ + case FLOCR_OK_KEEP_LINE: /* LCOV_EXCL_LINE */ + case FLOCR_OK_SKIPPED: /* LCOV_EXCL_LINE */ default: internal_error ("op_collect_result_name"); /* LCOV_EXCL_LINE */ return ""; /* LCOV_EXCL_LINE */ diff -Nru datamash-1.1.1/src/field-ops.h datamash-1.2.0/src/field-ops.h --- datamash-1.1.1/src/field-ops.h 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/src/field-ops.h 2017-08-20 19:04:44.000000000 +0000 @@ -87,6 +87,7 @@ union { long double bin_bucket_size; size_t strbin_bucket_size; + size_t percentile; } params; /* Collected Data */ diff -Nru datamash-1.1.1/src/op-defs.c datamash-1.2.0/src/op-defs.c --- datamash-1.1.1/src/op-defs.c 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/src/op-defs.c 2017-08-20 19:04:41.000000000 +0000 @@ -41,6 +41,7 @@ {"max", OP_MAX, MODE_GROUPBY}, {"absmin", OP_ABSMIN, MODE_GROUPBY}, {"absmax", OP_ABSMAX, MODE_GROUPBY}, + {"range", OP_RANGE, MODE_GROUPBY}, {"first", OP_FIRST, MODE_GROUPBY}, {"last", OP_LAST, MODE_GROUPBY}, {"rand", OP_RAND, MODE_GROUPBY}, @@ -49,6 +50,7 @@ {"q1", OP_QUARTILE_1, MODE_GROUPBY}, {"q3", OP_QUARTILE_3, MODE_GROUPBY}, {"iqr", OP_IQR, MODE_GROUPBY}, + {"perc", OP_PERCENTILE, MODE_GROUPBY}, {"pstdev", OP_PSTDEV, MODE_GROUPBY}, {"sstdev", OP_SSTDEV, MODE_GROUPBY}, {"pvar", OP_PVARIANCE, MODE_GROUPBY}, diff -Nru datamash-1.1.1/src/op-defs.h datamash-1.2.0/src/op-defs.h --- datamash-1.1.1/src/op-defs.h 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/src/op-defs.h 2017-08-20 19:04:41.000000000 +0000 @@ -31,6 +31,7 @@ OP_MAX, OP_ABSMIN, OP_ABSMAX, + OP_RANGE, OP_FIRST, OP_LAST, OP_RAND, @@ -39,6 +40,7 @@ OP_QUARTILE_1, OP_QUARTILE_3, OP_IQR, /* Inter-quartile range */ + OP_PERCENTILE, OP_PSTDEV, /* Population Standard Deviation */ OP_SSTDEV, /* Sample Standard Deviation */ OP_PVARIANCE, /* Population Variance */ diff -Nru datamash-1.1.1/src/op-parser.c datamash-1.2.0/src/op-parser.c --- datamash-1.1.1/src/op-parser.c 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/src/op-parser.c 2017-08-22 23:05:11.000000000 +0000 @@ -24,6 +24,8 @@ #include "system.h" +#include "die.h" +#include "ignore-value.h" #include "op-scanner.h" #include "op-defs.h" #include "op-parser.h" @@ -160,7 +162,7 @@ op->params.bin_bucket_size = _params[0].f; /* TODO: in the future, accept offset as well? */ if (_params_used>1) - error (EXIT_FAILURE, 0, _("too many parameters for operation %s"), + die (EXIT_FAILURE, 0, _("too many parameters for operation %s"), quote (get_field_operation_name (op->op))); return; } @@ -171,17 +173,31 @@ if (_params_used==1) op->params.strbin_bucket_size = _params[0].u; if (op->params.strbin_bucket_size==0) - error (EXIT_FAILURE, 0, _("strbin bucket size must not be zero")); + die (EXIT_FAILURE, 0, _("strbin bucket size must not be zero")); /* TODO: in the future, accept offset as well? */ if (_params_used>1) - error (EXIT_FAILURE, 0, _("too many parameters for operation %s"), + die (EXIT_FAILURE, 0, _("too many parameters for operation %s"), + quote (get_field_operation_name (op->op))); + return; + } + + if (op->op==OP_PERCENTILE) + { + op->params.percentile = 95; /* default percentile */ + if (_params_used==1) + op->params.percentile = _params[0].u; + if (op->params.percentile==0 || op->params.percentile>100) + die (EXIT_FAILURE, 0, _("invalid percentile value %" PRIuMAX), + (uintmax_t)op->params.percentile); + if (_params_used>1) + die (EXIT_FAILURE, 0, _("too many parameters for operation %s"), quote (get_field_operation_name (op->op))); return; } /* All other operations do not take parameters */ if (_params_used>0) - error (EXIT_FAILURE, 0, _("too many parameters for operation %s"), + die (EXIT_FAILURE, 0, _("too many parameters for operation %s"), quote (get_field_operation_name (op->op))); } @@ -198,44 +214,45 @@ p->name = xstrdup (scanner_identifier); break; - case TOK_WHITESPACE: + case TOK_WHITESPACE: /* LCOV_EXCL_LINE */ internal_error ("whitespace"); /* LCOV_EXCL_LINE */ case TOK_COMMA: - error (EXIT_FAILURE, 0, _("missing field for operation %s"), - quote (get_field_operation_name (fop))); + die (EXIT_FAILURE, 0, _("missing field for operation %s"), + quote (get_field_operation_name (fop))); case TOK_END: /* informative error message depends on the context: */ if (in_range) - error (EXIT_FAILURE, 0, _("invalid field range for operation %s"), - quote (get_field_operation_name (fop))); + die (EXIT_FAILURE, 0, _("invalid field range for operation %s"), + quote (get_field_operation_name (fop))); if (in_pair) - error (EXIT_FAILURE, 0, _("invalid field pair for operation %s"), - quote (get_field_operation_name (fop))); - error (EXIT_FAILURE, 0, _("missing field for operation %s"), - quote (get_field_operation_name (fop))); + die (EXIT_FAILURE, 0, _("invalid field pair for operation %s"), + quote (get_field_operation_name (fop))); + die (EXIT_FAILURE, 0, _("missing field for operation %s"), + quote (get_field_operation_name (fop))); case TOK_DASH: - error (EXIT_FAILURE, 0, _("invalid field range for operation %s"), - quote (get_field_operation_name (fop))); + die (EXIT_FAILURE, 0, _("invalid field range for operation %s"), + quote (get_field_operation_name (fop))); case TOK_COLONS: - error (EXIT_FAILURE, 0, _("invalid field pair for operation %s"), - quote (get_field_operation_name (fop))); + die (EXIT_FAILURE, 0, _("invalid field pair for operation %s"), + quote (get_field_operation_name (fop))); case TOK_INTEGER: - /* Zero values will fall-thought to the error message below */ + /* Zero values will fall-through to the error message below */ if (scan_val_int>0) { p->by_name = false; p->num = scan_val_int; break; } + /* fallthrough */ case TOK_FLOAT: default: - error (EXIT_FAILURE, 0, _("invalid field '%s' for operation %s"), + die (EXIT_FAILURE, 0, _("invalid field '%s' for operation %s"), scanner_identifier, quote (get_field_operation_name (fop))); } @@ -269,10 +286,10 @@ parse_simple_operation_column (q, true, false); if (p->by_name || q->by_name) - error (EXIT_FAILURE, 0, _("field range for %s must be numeric"), + die (EXIT_FAILURE, 0, _("field range for %s must be numeric"), quote (get_field_operation_name (fop))); if (p->num >= q->num) - error (EXIT_FAILURE, 0, _("invalid field range for operation %s"), + die (EXIT_FAILURE, 0, _("invalid field range for operation %s"), quote (get_field_operation_name (fop))); } } @@ -329,7 +346,7 @@ case TOK_WHITESPACE: case TOK_END: - error (EXIT_FAILURE, 0, _("missing parameter for operation %s"), + die (EXIT_FAILURE, 0, _("missing parameter for operation %s"), quote (get_field_operation_name (fop))); case TOK_COMMA: @@ -337,7 +354,7 @@ case TOK_IDENTIFIER: case TOK_COLONS: default: - error (EXIT_FAILURE, 0, _("invalid parameter %s for operation %s"), + die (EXIT_FAILURE, 0, _("invalid parameter %s for operation %s"), scanner_identifier, quote (get_field_operation_name (fop))); @@ -369,10 +386,10 @@ set_op_params (op); if (OP_NEED_PAIR_PARAMS (fop) && !f->pair) - error (EXIT_FAILURE, 0, _("operation %s requires field pairs"), + die (EXIT_FAILURE, 0, _("operation %s requires field pairs"), quote (get_field_operation_name (fop))); if (!OP_NEED_PAIR_PARAMS (fop) && f->pair) - error (EXIT_FAILURE, 0, _("operation %s cannot use pair of fields"), + die (EXIT_FAILURE, 0, _("operation %s cannot use pair of fields"), quote (get_field_operation_name (fop))); if (f->range) @@ -412,15 +429,15 @@ { pm2 = get_processing_mode (scanner_identifier); if (pm2 != MODE_INVALID) - error (EXIT_FAILURE,0, _("conflicting operation %s"), + die (EXIT_FAILURE,0, _("conflicting operation %s"), quote (scanner_identifier)); - error (EXIT_FAILURE,0, _("invalid operation %s"), + die (EXIT_FAILURE,0, _("invalid operation %s"), quote (scanner_identifier)); } if (!compatible_operation_modes (pm,pm2)) - error (EXIT_FAILURE, 0, _("conflicting operation found: "\ + die (EXIT_FAILURE, 0, _("conflicting operation found: "\ "expecting %s operations, but found %s operation %s"), get_processing_mode_name (pm), get_processing_mode_name (pm2), @@ -465,12 +482,13 @@ ADD_NAMED_GROUP (scanner_identifier); break; - case TOK_WHITESPACE: + case TOK_WHITESPACE: /* LCOV_EXCL_LINE */ internal_error ("whitespace"); /* LCOV_EXCL_LINE */ + case TOK_COMMA: case TOK_END: - error (EXIT_FAILURE, 0, _("missing field for operation %s"), - quote (get_processing_mode_name (pm))); + die (EXIT_FAILURE, 0, _("missing field for operation %s"), + quote (get_processing_mode_name (pm))); case TOK_INTEGER: if (scan_val_int>0) @@ -478,12 +496,13 @@ ADD_NUMERIC_GROUP (scan_val_int); break; } + /* fallthrough */ case TOK_DASH: case TOK_COLONS: case TOK_FLOAT: default: - error (EXIT_FAILURE, 0, _("invalid field '%s' for operation %s"), + die (EXIT_FAILURE, 0, _("invalid field '%s' for operation %s"), scanner_identifier, quote (get_processing_mode_name (pm))); @@ -505,13 +524,82 @@ /* detect and warn about incorrect usage, field specification for groups can't handle dashes or colons (for now) */ if (tok == TOK_DASH) - error (EXIT_FAILURE, 0, _("invalid field range for operation %s"), + die (EXIT_FAILURE, 0, _("invalid field range for operation %s"), quote (get_processing_mode_name (pm))); if (tok == TOK_COLONS) - error (EXIT_FAILURE, 0, _("invalid field pair for operation %s"), + die (EXIT_FAILURE, 0, _("invalid field pair for operation %s"), quote (get_processing_mode_name (pm))); } +static bool +parse_check_line_or_field (const char* s) +{ + if (STREQ (s,"lines") || STREQ (s,"line") \ + || STREQ (s,"rows") || STREQ (s,"row")) + return true; + if (STREQ (s,"fields") || STREQ (s,"field") \ + || STREQ (s,"columns") || STREQ (s,"column") || STREQ (s,"col")) + return false; + + die (EXIT_FAILURE, 0, _("invalid option %s for operation check"), quote (s)); +} + +static void +parse_mode_check () +{ + bool set_lines = true; // false = set columns + uintmax_t value = 0; + + uintmax_t n_lines = 0; + uintmax_t n_fields = 0; + + enum TOKEN tok = scanner_peek_token (); + while (tok != TOK_END) + { + tok = scanner_get_token (); + if (tok == TOK_INTEGER) + { + value = scan_val_int; + + ignore_value (scanner_get_token ()); + set_lines = parse_check_line_or_field (scanner_identifier); + } + else + { + set_lines = parse_check_line_or_field (scanner_identifier); + tok = scanner_get_token (); + if (tok != TOK_INTEGER) + die (EXIT_FAILURE, 0, _("number expected after option in " \ + "operation 'check'")); + value = scan_val_int; + } + + if (value == 0) + die (EXIT_FAILURE, 0, _("invalid value zero for lines/fields in " \ + "operation 'check'")); + + if (set_lines) + { + if (n_lines>0) + die (EXIT_FAILURE, 0, _("number of lines/rows already set in " \ + "operation 'check'")); + n_lines = value; + } + else + { + if (n_fields>0) + die (EXIT_FAILURE, 0, _("number of fields/columns already set in " \ + "operation 'check'")); + n_fields = value; + } + + tok = scanner_peek_token (); + } + + dm->mode_params.check_params.n_lines = n_lines; + dm->mode_params.check_params.n_fields = n_fields; +} + static void parse_mode () { @@ -524,7 +612,10 @@ case MODE_TRANSPOSE: case MODE_NOOP: case MODE_REVERSE: + break; + case MODE_TABULAR_CHECK: + parse_mode_check (); break; case MODE_REMOVE_DUPS: @@ -534,7 +625,7 @@ case MODE_CROSSTAB: parse_mode_column_list (pm); if (dm->num_grps!=2) - error (EXIT_FAILURE,0, _("crosstab requires exactly 2 fields, " \ + die (EXIT_FAILURE,0, _("crosstab requires exactly 2 fields, " \ "found %"PRIuMAX), (uintmax_t)dm->num_grps); /* if the user didn't specify an operation, print counts */ @@ -547,7 +638,7 @@ } else if (dm->num_ops>1) { - error (EXIT_FAILURE,0, _("crosstab supports one operation, " \ + die (EXIT_FAILURE,0, _("crosstab supports one operation, " \ "found %"PRIuMAX), (uintmax_t)dm->num_ops); } break; @@ -556,21 +647,21 @@ parse_mode_column_list (pm); parse_operations (pm); if (dm->num_ops==0) - error (EXIT_FAILURE,0, _("missing operation")); + die (EXIT_FAILURE,0, _("missing operation")); break; - case MODE_PER_LINE: + case MODE_PER_LINE: /* LCOV_EXCL_LINE */ internal_error ("line mode used directly"); /* LCOV_EXCL_LINE */ break; - case MODE_INVALID: - default: + case MODE_INVALID: /* LCOV_EXCL_LINE */ + default: /* LCOV_EXCL_LINE */ internal_error ("wrong opmode"); /* LCOV_EXCL_LINE */ break; } if (scanner_peek_token ()!=TOK_END) - error (EXIT_FAILURE,0,_("extra operand %s"), quote (scanner_identifier)); + die (EXIT_FAILURE,0,_("extra operand %s"), quote (scanner_identifier)); } static void @@ -594,7 +685,7 @@ return ; } - error (EXIT_FAILURE,0, _("invalid operation %s"), + die (EXIT_FAILURE,0, _("invalid operation %s"), quote (scanner_identifier)); } @@ -707,7 +798,7 @@ int TESTMAIN (int argc, const char* argv[]) { if (argc<2) - error (EXIT_FAILURE, 0, _("missing script (among arguments)")); + die (EXIT_FAILURE, 0, _("missing script (among arguments)")); struct datamash_ops *o = datamash_ops_parse (argc-1, argv+1); datamash_ops_debug_print ( o ); diff -Nru datamash-1.1.1/src/op-parser.h datamash-1.2.0/src/op-parser.h --- datamash-1.1.1/src/op-parser.h 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/src/op-parser.h 2017-08-20 19:04:41.000000000 +0000 @@ -39,6 +39,12 @@ enum field_operation op; }; +struct mode_check_params_t +{ + uintmax_t n_lines; /* If not zero, require this number of lines */ + uintmax_t n_fields; /* if not zero, require this number of fields */ +}; + struct datamash_ops { enum processing_mode mode; /* the processing mode */ @@ -52,6 +58,14 @@ struct fieldop *ops; /* field operations */ size_t num_ops; size_t alloc_ops; + + /* Additional parameters for mode operatons + (i.e. ones relating to the operation mode, + not to specific field-ops) */ + union + { + struct mode_check_params_t check_params; + } mode_params; }; /* Parse the operations, return new datamash_ops structure. diff -Nru datamash-1.1.1/src/op-scanner.c datamash-1.2.0/src/op-scanner.c --- datamash-1.1.1/src/op-scanner.c 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/src/op-scanner.c 2017-08-20 19:04:41.000000000 +0000 @@ -31,6 +31,7 @@ #include "system.h" +#include "die.h" #include "op-scanner.h" /* Used by other modules */ @@ -164,7 +165,7 @@ rc = TOK_FLOAT; } if ((c_isalpha (*pend) || *pend=='_') || (errno == ERANGE)) - error (EXIT_FAILURE, 0, _("invalid numeric value '%s'"), + die (EXIT_FAILURE, 0, _("invalid numeric value '%s'"), scan_pos); set_identifier (scan_pos, pend-scan_pos); @@ -185,7 +186,7 @@ return TOK_IDENTIFIER; } - error (EXIT_FAILURE, 0, _("invalid operand %s"), quote (scan_pos)); + die (EXIT_FAILURE, 0, _("invalid operand %s"), quote (scan_pos)); return TOK_END; } @@ -207,7 +208,7 @@ int TESTMAIN (int argc, const char* argv[]) { if (argc<2) - error (EXIT_FAILURE, 0, _("missing script (among arguments)")); + die (EXIT_FAILURE, 0, _("missing script (among arguments)")); scanner_set_input_from_argv (argc-1, argv+1); @@ -241,7 +242,7 @@ break; default: - error (EXIT_FAILURE, 0 ,_("unknown token %d\n"),tok); + die (EXIT_FAILURE, 0 ,_("unknown token %d\n"),tok); } } diff -Nru datamash-1.1.1/.tarball-version datamash-1.2.0/.tarball-version --- datamash-1.1.1/.tarball-version 2017-01-19 20:05:43.000000000 +0000 +++ datamash-1.2.0/.tarball-version 2017-08-22 23:19:42.000000000 +0000 @@ -1 +1 @@ -1.1.1 +1.2 diff -Nru datamash-1.1.1/tests/datamash-check.pl datamash-1.2.0/tests/datamash-check.pl --- datamash-1.1.1/tests/datamash-check.pl 1970-01-01 00:00:00.000000000 +0000 +++ datamash-1.2.0/tests/datamash-check.pl 2017-08-20 19:04:41.000000000 +0000 @@ -0,0 +1,150 @@ +#!/usr/bin/env perl +=pod + Unit Tests for GNU Datamash - perform simple calculation on input data + Tests for 'check' operation mode + + Copyright (C) 2013-2017 Assaf Gordon + + This file is part of GNU Datamash. + + GNU Datamash 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. + + GNU Datamash 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 GNU Datamash. If not, see . + + Written by Assaf Gordon. +=cut +use strict; +use warnings; +use List::Util qw/max/; +use Data::Dumper; + +# Until a better way comes along to auto-use Coreutils Perl modules +# as in the coreutils' autotools system. +use Coreutils; +use CuSkip; +use CuTmpdir qw(datamash); + +(my $program_name = $0) =~ s|.*/||; +my $prog_bin = 'datamash'; + +## Cross-Compiling portability hack: +## under qemu/binfmt, argv[0] (which is used to report errors) will contain +## the full path of the binary, if the binary is on the $PATH. +## So we try to detect what is the actual returned value of the program +## in case of an error. +my $prog = `$prog_bin --foobar 2>&1 | head -n 1 | cut -f1 -d:`; +chomp $prog if $prog; +$prog = $prog_bin unless $prog; + +# Turn off localization of executable's output. +@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; + + +my $in1=<<'EOF'; +A 1 ! +B 2 @ +C 3 # +D 4 $ +E 5 % +EOF + +my $in2=<<'EOF'; +A 1 +B +C 3 +EOF + +my $in3=<<'EOF'; +A +EOF + + +my @Tests = +( + # Simple transpose and reverse + ['c1', 'check', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + + # Variations on command-line parsing + ['c2', 'check 3 field', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c3', 'check 3 fields', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c4', 'check 3 col', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c5', 'check 3 columns', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c6', 'check 3 column', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + + ['c7', 'check field 3', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c8', 'check fields 3', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c9', 'check col 3', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c10', 'check columns 3', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c11', 'check column 3', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + + ['c12', 'check 5 lines', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c13', 'check 5 line', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c14', 'check 5 rows', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c15', 'check 5 row', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + + ['c16', 'check lines 5', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c17', 'check line 5', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c18', 'check row 5', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + ['c19', 'check rows 5', {IN_PIPE=>$in1}, {OUT=>"5 lines, 3 fields\n"}], + + + # Duplicated options + ['e1', 'check rows 5 lines 6', {IN_PIPE=>$in1}, {EXIT=>1}, + {ERR=>"$prog: number of lines/rows already set in operation 'check'\n"}], + ['e2', 'check fields 6 fields 1', {IN_PIPE=>$in1}, {EXIT=>1}, + {ERR=>"$prog: number of fields/columns already set in operation 'check'\n"}], + + # Invalid values + ['e3', 'check 0 lines', {IN_PIPE=>$in1}, {EXIT=>1}, + {ERR=>"$prog: invalid value zero for lines/fields in operation 'check'\n"}], + ['e4', 'check 0 fields', {IN_PIPE=>$in1}, {EXIT=>1}, + {ERR=>"$prog: invalid value zero for lines/fields in operation 'check'\n"}], + + + + # Check lines + ['c40', 'check 4 lines', {IN_PIPE=>$in1}, {EXIT=>1}, + {ERR=>"$prog: check failed: input had 5 lines (expecting 4)\n"}], + ['c41', 'check 6 lines', {IN_PIPE=>$in1}, {EXIT=>1}, + {ERR=>"$prog: check failed: input had 5 lines (expecting 6)\n"}], + ['c42', 'check 6 lines', {IN_PIPE=>""}, {EXIT=>1}, + {ERR=>"$prog: check failed: input had 0 lines (expecting 6)\n"}], + + # Check fields + ['c60', 'check 2 fields', {IN_PIPE=>$in1}, {EXIT=>1}, + {ERR=>"line 1 (3 fields):\n" . + " A\t1\t!\n" . + "$prog: check failed: line 1 has 3 fields (expecting 2)\n"}], + + + # Check matrix structure, no expected number of fields + ['c61', 'check', {IN_PIPE=>$in2}, {EXIT=>1}, + {ERR=>"line 1 (2 fields):\n" . + " A\t1\n" . + "line 2 (1 fields):\n" . + " B\n" . + "$prog: check failed: line 2 has 1 fields (previous line had 2)\n"}], + + # With expected number of fields + ['c62', 'check 2 fields', {IN_PIPE=>$in2}, {EXIT=>1}, + {ERR=>"line 2 (1 fields):\n" . + " B\n" . + "$prog: check failed: line 2 has 1 fields (expecting 2)\n"}], + + +); + +my $save_temps = $ENV{SAVE_TEMPS}; +my $verbose = $ENV{VERBOSE}; + +my $fail = run_tests ($program_name, $prog_bin, \@Tests, $save_temps, $verbose); +exit $fail; diff -Nru datamash-1.1.1/tests/datamash-error-msgs.pl datamash-1.2.0/tests/datamash-error-msgs.pl --- datamash-1.1.1/tests/datamash-error-msgs.pl 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/tests/datamash-error-msgs.pl 2017-08-22 23:05:11.000000000 +0000 @@ -111,7 +111,7 @@ {ERR=>"$prog: invalid numeric value " . "'1234567890123456789012345678901234567'\n"}], # Invalid charcters - ['e65','sum foo^bar', {IN_PIPE=>""}, {EXIT=>1}, + ['e65','sum "foo^bar"', {IN_PIPE=>""}, {EXIT=>1}, {ERR=>"$prog: invalid operand '^bar'\n"}], # Empty columns @@ -180,6 +180,18 @@ ['e93','strbin:0 1', {IN_PIPE=>""}, {EXIT=>1}, {ERR=>"$prog: strbin bucket size must not be zero\n"}], + # values for percentile operation + ['e94','perc:0 1', {IN_PIPE=>""}, {EXIT=>1}, + {ERR=>"$prog: invalid percentile value 0\n"}], + ['e95','perc:101 1', {IN_PIPE=>""}, {EXIT=>1}, + {ERR=>"$prog: invalid percentile value 101\n"}], + ['e96','perc:foo 1', {IN_PIPE=>""}, {EXIT=>1}, + {ERR=>"$prog: invalid parameter foo for operation 'perc'\n"}], + ['e97','perc:-32 1', {IN_PIPE=>""}, {EXIT=>1}, + {ERR=>"$prog: invalid parameter - for operation 'perc'\n"}], + ['e98','perc:1:2 1', {IN_PIPE=>""}, {EXIT=>1}, + {ERR=>"$prog: too many parameters for operation 'perc'\n"}], + ); my $save_temps = $ENV{SAVE_TEMPS}; diff -Nru datamash-1.1.1/tests/datamash-parser.pl datamash-1.2.0/tests/datamash-parser.pl --- datamash-1.1.1/tests/datamash-parser.pl 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/tests/datamash-parser.pl 2017-08-22 23:05:11.000000000 +0000 @@ -123,6 +123,17 @@ ['p27','sum 1,2 sum 3-5', {IN_PIPE=>$in2}, {OUT=>$out2}], + # 'check' options + ['p30','check', {IN_PIPE=>""}, {OUT=>"0 lines, 0 fields\n"}], + ['p31','check foo', {IN_PIPE=>""}, {EXIT=>1}, {ERR_SUBST=>'s/.*//s'}], + ['p32','check 10', {IN_PIPE=>""}, {EXIT=>1}, {ERR_SUBST=>'s/.*//s'}], + ['p33','check lines lines', {IN_PIPE=>""}, {EXIT=>1}, {ERR_SUBST=>'s/.*//s'}], + ['p34','check 1 line fields', {IN_PIPE=>""}, {EXIT=>1}, + {ERR_SUBST=>'s/.*//s'}], + ['p35','check 10 foo', {IN_PIPE=>""}, {EXIT=>1}, {ERR_SUBST=>'s/.*//s'}], + + + # Field range with invalid syntax ['e20','sum 1-', {IN_PIPE=>""}, {EXIT=>1}, {ERR_SUBST=>'s/.*//s'}], ['e21','sum 1-x', {IN_PIPE=>""}, {EXIT=>1}, {ERR_SUBST=>'s/.*//s'}], @@ -159,7 +170,7 @@ {ERR_SUBST=>'s/.*//s'}], # Invalid charcters - ['e65','sum foo^bar', {IN_PIPE=>""}, {EXIT=>1}, {ERR_SUBST=>'s/.*//s'}], + ['e65','sum "foo^bar"', {IN_PIPE=>""}, {EXIT=>1}, {ERR_SUBST=>'s/.*//s'}], # Empty columns ['e66','sum 1,,', {IN_PIPE=>""}, {EXIT=>1}, {ERR_SUBST=>'s/.*//s'}], diff -Nru datamash-1.1.1/tests/datamash-rand.sh datamash-1.2.0/tests/datamash-rand.sh --- datamash-1.1.1/tests/datamash-rand.sh 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/tests/datamash-rand.sh 2017-08-22 23:05:11.000000000 +0000 @@ -28,11 +28,14 @@ fail=0 +require_paste_ + ## Ensure seq is useable ## (not installed on OpenBSD by default) seq 10 >/dev/null 2>/dev/null || skip_ "requires a working seq" + ## ## --- First test --- ## diff -Nru datamash-1.1.1/tests/datamash-sort-errors.sh datamash-1.2.0/tests/datamash-sort-errors.sh --- datamash-1.1.1/tests/datamash-sort-errors.sh 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/tests/datamash-sort-errors.sh 2017-08-22 23:05:11.000000000 +0000 @@ -28,6 +28,8 @@ fail=0 +require_paste_ + ## Ensure seq is useable ## (not installed on OpenBSD by default) seq 10 >/dev/null 2>/dev/null || diff -Nru datamash-1.1.1/tests/datamash-stats.pl datamash-1.2.0/tests/datamash-stats.pl --- datamash-1.1.1/tests/datamash-stats.pl 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/tests/datamash-stats.pl 2017-08-20 19:04:41.000000000 +0000 @@ -168,6 +168,18 @@ q1=function(x) { quantile(x, prob=0.25) } q3=function(x) { quantile(x, prob=0.75) } + # Helper function for 'range' + # R's built-in range() function returns a vector of min/max. + # datamash's range returns the actual range + dm_range=function(x) { t = range(x) ; return(t[2]-t[1]) } + + # Helper functions for quartiles + perc1=function(x) { quantile(x, prob=0.01) } + perc90=function(x) { quantile(x, prob=0.90) } + perc95=function(x) { quantile(x, prob=0.95) } + perc99=function(x) { quantile(x, prob=0.99) } + perc100=function(x) { quantile(x, prob=1) } + # Helper function for madraw madraw=function(x) { mad(x,constant=1.0) } @@ -223,10 +235,14 @@ } # Run tests + test(range) test(mean) test(median) test(q1) test(q3) + test(perc90) + test(perc95) + test(perc99) test(iqr) test(smp.sd) test(pop.sd) @@ -315,6 +331,96 @@ ['q3_12','q3 1' , {IN_PIPE=>$seq22}, {OUT => "70\n"},], ['q3_13','q3 1' , {IN_PIPE=>$seq23}, {OUT => "8\n"},], + # Test range + ['range_1', 'range 1' , {IN_PIPE=>$seq1}, {OUT => "3\n"}], + ['range_2', 'range 1' , {IN_PIPE=>$seq2}, {OUT => "2\n"}], + ['range_3', 'range 1' , {IN_PIPE=>$seq3}, {OUT => "0\n"}], + ['range_4', 'range 1' , {IN_PIPE=>$seq9}, {OUT => "21\n"}], + ['range_5', 'range 1' , {IN_PIPE=>$seq10}, {OUT => "27\n"}], + ['range_6', 'range 1' , {IN_PIPE=>$seq11}, {OUT => "29\n"}], + ['range_7', 'range 1' , {IN_PIPE=>$seq12}, {OUT => "35\n"}], + ['range_8', 'range 1' , {IN_PIPE=>$seq12_unsorted}, {OUT => "35\n"}], + ['range_9', '--sort range 1' , {IN_PIPE=>$seq12_unsorted}, {OUT => "35\n"}], + ['range_10','range 1' , {IN_PIPE=>$seq20}, {OUT => "42\n"},], + ['range_11','range 1' , {IN_PIPE=>$seq21}, {OUT => "168\n"},], + ['range_12','range 1' , {IN_PIPE=>$seq22}, {OUT => "12\n"},], + ['range_13','range 1' , {IN_PIPE=>$seq23}, {OUT => "11\n"},], + + + # Test perc:90 + ['perc90_1', 'perc:90 1' , {IN_PIPE=>$seq1}, {OUT => "3.7\n"}], + ['perc90_2', 'perc:90 1' , {IN_PIPE=>$seq2}, {OUT => "2.8\n"}], + ['perc90_3', 'perc:90 1' , {IN_PIPE=>$seq3}, {OUT => "2\n"}], + # sorted/unsorted should not change the result. + ['perc90_4', 'perc:90 1' , {IN_PIPE=>$seq9}, {OUT => "19.8\n"}], + ['perc90_5', 'perc:90 1' , {IN_PIPE=>$seq10}, {OUT => "23.6\n"}], + ['perc90_6', 'perc:90 1' , {IN_PIPE=>$seq11}, {OUT => "29\n"}], + ['perc90_7', 'perc:90 1' , {IN_PIPE=>$seq12}, {OUT => "30.8\n"}], + ['perc90_8', 'perc:90 1' , {IN_PIPE=>$seq12_unsorted}, {OUT => "30.8\n"}], + ['perc90_9', '--sort perc:90 1', + {IN_PIPE=>$seq12_unsorted}, {OUT => "30.8\n"}], + ['perc90_10','perc:90 1' , {IN_PIPE=>$seq20}, {OUT => "111\n"},], + ['perc90_11','perc:90 1' , {IN_PIPE=>$seq21}, {OUT => "84.2\n"},], + ['perc90_12','perc:90 1' , {IN_PIPE=>$seq22}, {OUT => "70\n"},], + ['perc90_13','perc:90 1' , {IN_PIPE=>$seq23}, {OUT => "9\n"},], + + # Test perc:95 + ['perc95_1', 'perc:95 1' , {IN_PIPE=>$seq1}, {OUT => "3.85\n"}], + ['perc95_2', 'perc:95 1' , {IN_PIPE=>$seq2}, {OUT => "2.9\n"}], + ['perc95_3', 'perc:95 1' , {IN_PIPE=>$seq3}, {OUT => "2\n"}], + # sorted/unsorted should not change the result. + ['perc95_4', 'perc:95 1' , {IN_PIPE=>$seq9}, {OUT => "21.4\n"}], + ['perc95_5', 'perc:95 1' , {IN_PIPE=>$seq10}, {OUT => "26.3\n"}], + ['perc95_6', 'perc:95 1' , {IN_PIPE=>$seq11}, {OUT => "30\n"}], + ['perc95_7', 'perc:95 1' , {IN_PIPE=>$seq12}, {OUT => "33.7\n"}], + ['perc95_8', 'perc:95 1' , {IN_PIPE=>$seq12_unsorted}, {OUT => "33.7\n"}], + ['perc95_9', '--sort perc:95 1', + {IN_PIPE=>$seq12_unsorted}, {OUT => "33.7\n"}], + ['perc95_10','perc:95 1' , {IN_PIPE=>$seq20}, {OUT => "114.15\n"},], + ['perc95_11','perc:95 1' , {IN_PIPE=>$seq21}, {OUT => "103.35\n"},], + ['perc95_12','perc:95 1' , {IN_PIPE=>$seq22}, {OUT => "73\n"},], + ['perc95_13','perc:95 1' , {IN_PIPE=>$seq23}, {OUT => "10\n"},], + + # Test perc:99 + ['perc99_1', 'perc:99 1' , {IN_PIPE=>$seq1}, {OUT => "3.97\n"}], + ['perc99_2', 'perc:99 1' , {IN_PIPE=>$seq2}, {OUT => "2.98\n"}], + ['perc99_3', 'perc:99 1' , {IN_PIPE=>$seq3}, {OUT => "2\n"}], + # sorted/unsorted should not change the result. + ['perc99_4', 'perc:99 1' , {IN_PIPE=>$seq9}, {OUT => "22.68\n"}], + ['perc99_5', 'perc:99 1' , {IN_PIPE=>$seq10}, {OUT => "28.46\n"}], + ['perc99_6', 'perc:99 1' , {IN_PIPE=>$seq11}, {OUT => "30.8\n"}], + ['perc99_7', 'perc:99 1' , {IN_PIPE=>$seq12}, {OUT => "36.34\n"}], + ['perc99_8', 'perc:99 1' , {IN_PIPE=>$seq12_unsorted}, {OUT => "36.34\n"}], + ['perc99_9', '--sort perc:99 1', + {IN_PIPE=>$seq12_unsorted}, {OUT => "36.34\n"}], + ['perc99_10','perc:99 1' , {IN_PIPE=>$seq20}, {OUT => "118.02\n"},], + ['perc99_11','perc:99 1' , {IN_PIPE=>$seq21}, {OUT => "120.49\n"},], + ['perc99_12','perc:99 1' , {IN_PIPE=>$seq22}, {OUT => "73\n"},], + ['perc99_13','perc:99 1' , {IN_PIPE=>$seq23}, {OUT => "11\n"},], + + # Test edge cases: perc:1 and perc:100 + ['perc1_1', 'perc:1 1', {IN_PIPE=>$seq20}, {OUT => "78\n"},], + ['perc100_1','perc:100 1', {IN_PIPE=>$seq20}, {OUT => "120\n"},], + + # Sanity check: percentile:50 should be equal to 'median' 'op' + ['perc50_1','perc:50 1' , {IN_PIPE=>$seq20}, {OUT => "100\n"},], + ['perc50_2','perc:50 1' , {IN_PIPE=>$seq21}, {OUT => "37\n"},], + ['perc50_3','perc:50 1' , {IN_PIPE=>$seq22}, {OUT => "67\n"},], + ['perc50_4','perc:50 1' , {IN_PIPE=>$seq23}, {OUT => "6\n"},], + + # Sanity check: percentile:25 should be equal to 'q1' op + ['perc25_1','perc:25 1' , {IN_PIPE=>$seq20}, {OUT => "93\n"},], + ['perc25_2','perc:25 1' , {IN_PIPE=>$seq21}, {OUT => "23\n"},], + ['perc25_3','perc:25 1' , {IN_PIPE=>$seq22}, {OUT => "67\n"},], + ['perc25_4','perc:25 1' , {IN_PIPE=>$seq23}, {OUT => "4\n"},], + + # Sanity check: percentile:75 should be equal to 'q3' op + ['perc75_10','perc:75 1' , {IN_PIPE=>$seq20}, {OUT => "107\n"},], + ['perc75_11','perc:75 1' , {IN_PIPE=>$seq21}, {OUT => "61.5\n"},], + ['perc75_12','perc:75 1' , {IN_PIPE=>$seq22}, {OUT => "70\n"},], + ['perc75_13','perc:75 1' , {IN_PIPE=>$seq23}, {OUT => "8\n"},], + + # Test IQR ['iqr_1', 'iqr 1' , {IN_PIPE=>$seq1}, {OUT => "1.5\n"}], ['iqr_2', 'iqr 1' , {IN_PIPE=>$seq2}, {OUT => "1\n"}], diff -Nru datamash-1.1.1/tests/datamash-tests-2.pl datamash-1.2.0/tests/datamash-tests-2.pl --- datamash-1.1.1/tests/datamash-tests-2.pl 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/tests/datamash-tests-2.pl 2017-08-22 23:05:11.000000000 +0000 @@ -358,13 +358,15 @@ ['narm10', '--narm sum 1', {IN_PIPE=>$na4}, {OUT=>"6\n"}], ['narm11', '--narm mean 1', {IN_PIPE=>$na4}, {OUT=>"2\n"}], # without --narm, 'nan' should be processed, not skipped - ['narm12', 'sum 1', {IN_PIPE=>$na4}, {OUT=>"$nan\n"}], + ['narm12', 'sum 1', {IN_PIPE=>$na4}, {OUT=>"$nan\n"}, + {OUT_SUBST=>'s/^-//'}], ## Test with 'nan' ['narm13', '--narm sum 1', {IN_PIPE=>$na5}, {OUT=>"6\n"}], ['narm14', '--narm mean 1', {IN_PIPE=>$na5}, {OUT=>"2\n"}], # without --narm, 'nan' should be processed, not skipped - ['narm15', 'sum 1', {IN_PIPE=>$na5}, {OUT=>"$nan\n"}], + ['narm15', 'sum 1', {IN_PIPE=>$na5}, {OUT=>"$nan\n"}, + {OUT_SUBST=>'s/^-//'}], # These input have strings starting with 'NA' or 'NAN' but should not # be mistaken for them. @@ -468,6 +470,14 @@ ['rnd1', '-H --full round 1 floor 1 ceil 1 trunc 1 frac 1', {IN_PIPE=>$round_in1}, {OUT=>$round_out1}], + # Test range + ['rng1', '-t" " -g 1 range 2',{IN_PIPE=>$in_full1}, {OUT=>"A 2\nB 8\n"}], + ['rng2', '-W range 2', {IN_PIPE=>$in_full1}, {OUT=>"8\n"}], + ['rng3', 'range 1', {IN_PIPE=>""}, {OUT=>""}], + # Skip invalid values + ['rng4', '--narm range 1', {IN_PIPE=>"19\nNA\n9\n"}, {OUT=>"10\n"}], + ['rng5', '--narm range 1', {IN_PIPE=>"NA\n"}, {OUT=>"$nan\n"}], + ); if ($have_stable_sort) { diff -Nru datamash-1.1.1/tests/datamash-tests.pl datamash-1.2.0/tests/datamash-tests.pl --- datamash-1.1.1/tests/datamash-tests.pl 2017-01-17 17:50:20.000000000 +0000 +++ datamash-1.2.0/tests/datamash-tests.pl 2017-08-20 19:04:41.000000000 +0000 @@ -602,6 +602,12 @@ ['hdr23', '-t: --header-in rmdup 1', {IN_PIPE=>""}, {OUT=>""}], ['hdr24', '-t: -H rmdup 1', {IN_PIPE=>""}, {OUT=>""}], + # percentile operation has special header handling (which includes + # the percentile value). + ['hdr25', '-W -H perc 2', {IN_PIPE=>$in_hdr1}, + {OUT=>"perc:95(y)\n8.45\n"},], + ['hdr26', '-W -H perc:50 2', {IN_PIPE=>$in_hdr1}, + {OUT=>"perc:50(y)\n4\n"}], # Test single line per group ['sl1', '-t" " -g 1 mean 2', {IN_PIPE=>$in_g4},