Commit 891e0a4c authored by Pietro Battiston's avatar Pietro Battiston

Imported Upstream version 5.6.5

parent 66c8b0b4
2015-06-06 Giulio Bottazzi <bottazzi@sssup.it>
* ALL: Tagged with CVS using
#cvs tag gbutils-5-6-5
* gbkreg2d.c, gbkreg.c, gbker2d.c, gbhisto2d.c, gbacorr.c,
gbstat.c : fixed typos
2015-05-30 Giulio Bottazzi <bottazzi@sssup.it>
* gbget.c: set the expression 'x0l1' to the row number of the
previous row, consistently with general notation.
* configure.ac: added automatic manual creation for gbget
2015-05-29 Giulio Bottazzi <bottazzi@sssup.it>
* tools.c: updated copyright dates
* configure.ac: Source package version updated to 5.6.5.
* Makefile.am: removed redundant script gbkeys2values: it gets
replaced by gbconvtable.
* gbconvtable, gbenv, Makefile.am: added man pages for gbconvtable
and gbenv.
2015-05-12 Giulio Bottazzi <bottazzi@sssup.it>
* ALL: Tagged with CVS using
......
......@@ -2,9 +2,9 @@
SUBDIRS = lib
#--------------------
dist_bin_SCRIPTS = gbkeys2values gbconvtable gbdummyfy gbplot
dist_bin_SCRIPTS = gbconvtable gbdummyfy gbplot
EXTRA_SCRIPTS = gbkeys2values gbconvtable gbdummyfy gbplot
EXTRA_SCRIPTS = gbconvtable gbdummyfy gbplot
bin_PROGRAMS = gbbin gbdist gbhisto gbmave gbstat gbtest gbnear gbker2d gbhisto2d gbkreg2d gbquant gbboot gbenv gbgcorr gbfilternear gbmstat gbxcorr @GBGET@ @GBKER@ @GBKREG@ @GBMODES@ @GBINTERP@ @GBFUN@ @GBLREG@ @GBGRID@ @GBGLREG@ @GBNLREG@ @GBNLPANEL@ @GBNLQREG@ @GBRAND@ @GBHILL@ @GBNLMULT@ @GBNLPROBIT@ @GBNLPOLYIT@ @GBACORR@
......@@ -63,7 +63,7 @@ gbnlpolyit_LDADD = -lmatheval -lfl
endif
#Possibly build man pages
dist_man1_MANS = gbplot.1 gbhisto.1 gbbin.1 gbdist.1 gbmave.1 gbstat.1 gbtest.1 gbnear.1 gbker2d.1 gbhisto2d.1 gbkreg2d.1 gbquant.1 gbboot.1 gbgcorr.1 gbfilternear.1 gbmstat.1 gbxcorr.1 @GBGETMAN@ @GBKERMAN@ @GBKREGMAN@ @GBMODESMAN@ @GBINTERPMAN@ @GBFUNMAN@ @GBLREGMAN@ @GBGRIDMAN@ @GBGLREGMAN@ @GBNLREGMAN@ @GBNLPANELMAN@ @GBNLQREGMAN@ @GBRANDMAN@ @GBHILLMAN@ @GBNLMULTMAN@ @GBNLPROBITMAN@ @GBNLPOLYITMAN@ @GBACORRMAN@ gbdummyfy.1
dist_man1_MANS = gbplot.1 gbhisto.1 gbbin.1 gbdist.1 gbmave.1 gbstat.1 gbtest.1 gbnear.1 gbker2d.1 gbhisto2d.1 gbkreg2d.1 gbquant.1 gbboot.1 gbgcorr.1 gbfilternear.1 gbmstat.1 gbxcorr.1 @GBGETMAN@ @GBKERMAN@ @GBKREGMAN@ @GBMODESMAN@ @GBINTERPMAN@ @GBFUNMAN@ @GBLREGMAN@ @GBGRIDMAN@ @GBGLREGMAN@ @GBNLREGMAN@ @GBNLPANELMAN@ @GBNLQREGMAN@ @GBRANDMAN@ @GBHILLMAN@ @GBNLMULTMAN@ @GBNLPROBITMAN@ @GBNLPOLYITMAN@ @GBACORRMAN@ gbdummyfy.1 gbenv.1 gbconvtable.1
#Possibly build man pages
if H2M
......@@ -174,7 +174,13 @@ gbplot.1: gbplot
$(HELP2MAN) -n "gnuplot command line interface" -N --output=$@ ./gbplot
gbdummyfy.1: gbdummyfy
$(HELP2MAN) -n "produce dummies from labels" -N --output=$@ ./gbdummyfy
$(HELP2MAN) -n "Produce dummies from labels" -N --output=$@ ./gbdummyfy
gbenv.1: gbenv
$(HELP2MAN) -n "Floating point locale, and gbutils settings" -N --output=$@ ./gbenv
gbconvtable.1: gbconvtable
$(HELP2MAN) -n "Replace keys with values" -N --output=$@ ./gbconvtable
endif
......
......@@ -563,8 +563,8 @@ top_srcdir = @top_srcdir@
#Addition from gnulib
SUBDIRS = lib
#--------------------
dist_bin_SCRIPTS = gbkeys2values gbconvtable gbdummyfy gbplot
EXTRA_SCRIPTS = gbkeys2values gbconvtable gbdummyfy gbplot
dist_bin_SCRIPTS = gbconvtable gbdummyfy gbplot
EXTRA_SCRIPTS = gbconvtable gbdummyfy gbplot
gbget_SOURCES = gbget.c tools.c
gbbin_SOURCES = gbbin.c tools.c
gbdist_SOURCES = gbdist.c tools.c
......@@ -613,7 +613,7 @@ gbacorr_SOURCES = gbacorr.c tools.c
@ISCYGWIN_TRUE@gbnlpolyit_LDADD = -lmatheval -lfl
#Possibly build man pages
dist_man1_MANS = gbplot.1 gbhisto.1 gbbin.1 gbdist.1 gbmave.1 gbstat.1 gbtest.1 gbnear.1 gbker2d.1 gbhisto2d.1 gbkreg2d.1 gbquant.1 gbboot.1 gbgcorr.1 gbfilternear.1 gbmstat.1 gbxcorr.1 @GBGETMAN@ @GBKERMAN@ @GBKREGMAN@ @GBMODESMAN@ @GBINTERPMAN@ @GBFUNMAN@ @GBLREGMAN@ @GBGRIDMAN@ @GBGLREGMAN@ @GBNLREGMAN@ @GBNLPANELMAN@ @GBNLQREGMAN@ @GBRANDMAN@ @GBHILLMAN@ @GBNLMULTMAN@ @GBNLPROBITMAN@ @GBNLPOLYITMAN@ @GBACORRMAN@ gbdummyfy.1
dist_man1_MANS = gbplot.1 gbhisto.1 gbbin.1 gbdist.1 gbmave.1 gbstat.1 gbtest.1 gbnear.1 gbker2d.1 gbhisto2d.1 gbkreg2d.1 gbquant.1 gbboot.1 gbgcorr.1 gbfilternear.1 gbmstat.1 gbxcorr.1 @GBGETMAN@ @GBKERMAN@ @GBKREGMAN@ @GBMODESMAN@ @GBINTERPMAN@ @GBFUNMAN@ @GBLREGMAN@ @GBGRIDMAN@ @GBGLREGMAN@ @GBNLREGMAN@ @GBNLPANELMAN@ @GBNLQREGMAN@ @GBRANDMAN@ @GBHILLMAN@ @GBNLMULTMAN@ @GBNLPROBITMAN@ @GBNLPOLYITMAN@ @GBACORRMAN@ gbdummyfy.1 gbenv.1 gbconvtable.1
#extra file to be distributed with the package
EXTRA_DIST = tools.h multimin.h gbhill.h test.dat test.dat.gz doc/cygwin_install.pdf doc/cygwin_install.txt doc/gbget.pdf doc/gbget.txt doc/intro.pdf doc/intro.txt doc/overview.pdf doc/overview.txt
......@@ -1536,7 +1536,13 @@ uninstall-man: uninstall-man1
@H2M_TRUE@ $(HELP2MAN) -n "gnuplot command line interface" -N --output=$@ ./gbplot
@H2M_TRUE@gbdummyfy.1: gbdummyfy
@H2M_TRUE@ $(HELP2MAN) -n "produce dummies from labels" -N --output=$@ ./gbdummyfy
@H2M_TRUE@ $(HELP2MAN) -n "Produce dummies from labels" -N --output=$@ ./gbdummyfy
@H2M_TRUE@gbenv.1: gbenv
@H2M_TRUE@ $(HELP2MAN) -n "Floating point locale, and gbutils settings" -N --output=$@ ./gbenv
@H2M_TRUE@gbconvtable.1: gbconvtable
@H2M_TRUE@ $(HELP2MAN) -n "Replace keys with values" -N --output=$@ ./gbconvtable
#--------------------
# Tell versions [3.59,3.63) of GNU make to not export all variables.
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for gbutils 5.6.4.
# Generated by GNU Autoconf 2.69 for gbutils 5.6.5.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
......@@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gbutils'
PACKAGE_TARNAME='gbutils'
PACKAGE_VERSION='5.6.4'
PACKAGE_STRING='gbutils 5.6.4'
PACKAGE_VERSION='5.6.5'
PACKAGE_STRING='gbutils 5.6.5'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
......@@ -1319,7 +1319,7 @@ if test "$ac_init_help" = "long"; then
# 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 gbutils 5.6.4 to adapt to many kinds of systems.
\`configure' configures gbutils 5.6.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1389,7 +1389,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of gbutils 5.6.4:";;
short | recursive ) echo "Configuration of gbutils 5.6.5:";;
esac
cat <<\_ACEOF
......@@ -1480,7 +1480,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
gbutils configure 5.6.4
gbutils configure 5.6.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1945,7 +1945,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gbutils $as_me 5.6.4, which was
It was created by gbutils $as_me 5.6.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2809,7 +2809,7 @@ fi
# Define the identity of the package.
PACKAGE='gbutils'
VERSION='5.6.4'
VERSION='5.6.5'
cat >>confdefs.h <<_ACEOF
......@@ -5622,6 +5622,7 @@ GBNLQREG='gbnlqreg$(EXEEXT)'
GBNLMULT='gbnlmult$(EXEEXT)'
GBNLPROBIT='gbnlprobit$(EXEEXT)'
GBNLPOLYIT='gbnlpolyit$(EXEEXT)'
GBGETMAN='gbget.1'
GBNLREGMAN='gbnlreg.1'
GBNLPANELMAN='gbnlpanel.1'
GBNLQREGMAN='gbnlqreg.1'
......@@ -6219,7 +6220,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by gbutils $as_me 5.6.4, which was
This file was extended by gbutils $as_me 5.6.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -6285,7 +6286,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
gbutils config.status 5.6.4
gbutils config.status 5.6.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
# Process this file with autoconf to produce a configure script.
AC_INIT([gbutils],[5.6.4])
AC_INIT([gbutils],[5.6.5])
AC_CONFIG_SRCDIR([tools.c])
AM_INIT_AUTOMAKE
......@@ -114,6 +114,7 @@ GBNLQREG='gbnlqreg$(EXEEXT)'
GBNLMULT='gbnlmult$(EXEEXT)'
GBNLPROBIT='gbnlprobit$(EXEEXT)'
GBNLPOLYIT='gbnlpolyit$(EXEEXT)'
GBGETMAN='gbget.1'
GBNLREGMAN='gbnlreg.1'
GBNLPANELMAN='gbnlpanel.1'
GBNLQREGMAN='gbnlqreg.1'
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH GBACORR "1" "January 2015" "gbacorr 5.6.1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBACORR "1" "June 2015" "gbacorr 5.6.5" "User Commands"
.SH NAME
gbacorr \- Compute auto/cross-correlation coefficients
.SH SYNOPSIS
......@@ -39,7 +39,7 @@ set range of t (default '0,10'), accept negative integers
\fB\-p\fR
specify the confidence level in (0,1). Interval ac_low,ac_hi has a
probability 1\-confidence to contain the true value. With this option
the ouput becomes: lag ac ac_low ac_hi.
the output becomes: lag ac ac_low ac_hi.
.TP
\fB\-F\fR
specify the input fields separators (default " \et")
......@@ -62,7 +62,7 @@ Report bugs to <gbutils@googlegroups.com>
.br
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
.SH COPYRIGHT
Copyright \(co 2001\-2014 Giulio Bottazzi
Copyright \(co 2001\-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation;
......
......@@ -76,7 +76,7 @@ int main(int argc,char* argv[]){
fprintf(stdout," -t set range of t (default '0,10'), accept negative integers\n");
fprintf(stdout," -p specify the confidence level in (0,1). Interval ac_low,ac_hi has a \n");
fprintf(stdout," probability 1-confidence to contain the true value. With this option\n");
fprintf(stdout," the ouput becomes: lag ac ac_low ac_hi.\n");
fprintf(stdout," the output becomes: lag ac ac_low ac_hi.\n");
fprintf(stdout," -F specify the input fields separators (default \" \\t\") \n");
fprintf(stdout," -h this help\n");
fprintf(stdout,"Examples:\n");
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH GBBIN "1" "January 2015" "gbbin 5.6.1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBBIN "1" "June 2015" "gbbin 5.6.5" "User Commands"
.SH NAME
gbbin \- A program to bin data
.SH SYNOPSIS
......@@ -61,7 +61,7 @@ Report bugs to <gbutils@googlegroups.com>
.br
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
.SH COPYRIGHT
Copyright \(co 2001\-2014 Giulio Bottazzi
Copyright \(co 2001\-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation;
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH GBBOOT "1" "January 2015" "gbboot 5.6.1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBBOOT "1" "June 2015" "gbboot 5.6.5" "User Commands"
.SH NAME
gbboot \- Bootstrap user provided data
.SH SYNOPSIS
......@@ -60,7 +60,7 @@ Report bugs to <gbutils@googlegroups.com>
.br
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
.SH COPYRIGHT
Copyright \(co 2001\-2014 Giulio Bottazzi
Copyright \(co 2001\-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation;
......
#!/bin/sh
# gbconvtable ver. .2 Copyright (C) 2010-2012 Giulio Bottazzi
# gbconvtable ver. 5.6 Copyright (C) 2010-2015 Giulio Bottazzi
#default settings
pos=1
......@@ -8,9 +8,14 @@ dictfile=""
#read command line options; the position of the last option is saved
#in OPTIND
while getopts "d:c:f:h" opt
while getopts "d:c:f:h-:" opt
do
case $opt in
-)
case "${OPTARG}" in
help) help=yes;;
version) version=yes;;
esac;;
d) dictfile=$OPTARG;;
c) pos=$OPTARG;;
f) force=yes ; fstring=$OPTARG ;;
......@@ -19,45 +24,61 @@ do
esac
done
if [ "$help" = "yes" ]; then
if [ "$version" = "yes" ]; then
cat - <<EOF
gbconvtable ver. 5.6
Copyright (C) 2010-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation.
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.
Written by Giulio Bottazzi
Report bugs to <gbutils@googlegroups.com>
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
EOF
gbconvtable Copyright (C) 2010 Giulio Bottazzi
exit
fi
if [ "$help" = "yes" ]; then
cat - <<EOF
Replace keys with values at a given position of the input file. The
name of the dictionary file is provided on the command line with the
option 'dictfile'. It is a simple text file organized in two
columns. The first column contains the keys and the second column the
values, like:
key1 val1
key2 val2
key3 val3
...
Obviously the values can be equal, but the keys should be all
different. Data are read from standard input and all fields at
position 'pos' are considered keys of the built dictionary and
replaced with the associated keys. If 'pos' is not specified it is
assumed equal to 1. If it is larger than the number of fields, no
replacement takes place. If the option 'force' is not set, only those
fields which appears as keys in the dictionary file are replaced.
respective values. Obviously the values can be equal, but the keys
should be all different. Data are read from standard input and all
fields at position 'pos' are considered keys of the provided
dictionary and replaced with the associated keys. If 'pos' is not
specified it is assumed equal to 1. If 'pos' is larger than the number
of fields, no replacement takes place. If the option 'force' is not
set, only those fields which appears as keys in the dictionary file
are replaced.
Options:
-d name of the dictionary file
-c position of the column of keys to be replaced
-f forced look-up: substitute provided string to non defined keys
Usage: gbconvtable [options]
Example: A standard invocation can be:
Options:
-d name of the dictionary file
-c position of the column of keys to be replaced
-f forced look-up: substitute provided string for non defined keys
gbconvtable -d dict_file.txt -c 3 < input_file'
Examples:
gbconvtable -d dict_file -c 3 -f 'none' < input_file
where 'dict_file.txt' contains the key-value pairs and the third
column of the input file is replaced
This program requires awk or gawk.
EOF
exit
fi
......@@ -69,7 +90,6 @@ if ! [ -e "$dictfile" ]; then
fi
awk -v dictfile=$dictfile -v pos=$pos -v force=$force -v fstring=$fstring '
BEGIN {
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBCONVTABLE "1" "June 2015" "gbconvtable ver. 5.6" "User Commands"
.SH NAME
gbconvtable \- Replace keys with values
.SH SYNOPSIS
.B gbconvtable
[\fIoptions\fR]
.SH DESCRIPTION
Replace keys with values at a given position of the input file. The
name of the dictionary file is provided on the command line with the
option 'dictfile'. It is a simple text file organized in two
columns. The first column contains the keys and the second column the
respective values. Obviously the values can be equal, but the keys
should be all different. Data are read from standard input and all
fields at position 'pos' are considered keys of the provided
dictionary and replaced with the associated keys. If 'pos' is not
specified it is assumed equal to 1. If 'pos' is larger than the number
of fields, no replacement takes place. If the option 'force' is not
set, only those fields which appears as keys in the dictionary file
are replaced.
.SH OPTIONS
.HP
\fB\-d\fR name of the dictionary file
.HP
\fB\-c\fR position of the column of keys to be replaced
.HP
\fB\-f\fR forced look\-up: substitute provided string for non defined keys
.SH EXAMPLES
.IP
gbconvtable \-d dict_file \-c 3 \-f 'none' < input_file
.PP
This program requires awk or gawk.
.SH AUTHOR
Written by Giulio Bottazzi
.SH "REPORTING BUGS"
Report bugs to <gbutils@googlegroups.com>
.PP
.br
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
.SH COPYRIGHT
Copyright \(co 2010\-2015 Giulio Bottazzi
.PP
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation.
.PP
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.
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH GBDIST "1" "January 2015" "gbdist 5.6.1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBDIST "1" "June 2015" "gbdist 5.6.5" "User Commands"
.SH NAME
gbdist \- Produce cumulative distribution from data
.SH SYNOPSIS
......@@ -37,7 +37,7 @@ Report bugs to <gbutils@googlegroups.com>
.br
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
.SH COPYRIGHT
Copyright \(co 2001\-2014 Giulio Bottazzi
Copyright \(co 2001\-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation;
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH GBDUMMYFY "1" "January 2015" "gbdummyfy ver. 5.6" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBDUMMYFY "1" "June 2015" "gbdummyfy ver. 5.6" "User Commands"
.SH NAME
gbdummyfy \- produce dummies from labels
gbdummyfy \- Produce dummies from labels
.SH SYNOPSIS
.B gbdummyfy
[\fIoptions\fR]
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBENV "1" "June 2015" "gbenv 5.6.5" "User Commands"
.SH NAME
gbenv \- Floating point locale, and gbutils settings
.SH DESCRIPTION
Show floating point environment, locale and gbutils settings.
.SS "Information about the floating point environment includes:"
.IP
if the environment is the default environment of the machine;
if the precision is single, double or extended;
if the rounding is nearest, upward, downward or toward zero;
the list of exceptions whose interrupts are ignored (masked).
.SS "Information about the locale includes:"
.IP
decimal point;
thousand separator;
the relative position of the thousand separator (grouping).
.SS "Information about gbutils environment include:"
.IP
if the error handler is activated;
the value of the environment variables dictating the output format;
the output format of integers and floating point numbers.
.SH OPTIONS
.TP
\fB\-h\fR
print this help message
.SH AUTHOR
Written by Giulio Bottazzi
.SH "REPORTING BUGS"
Report bugs to <gbutils@googlegroups.com>
.PP
.br
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
.SH COPYRIGHT
Copyright \(co 2001\-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation;
.PP
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.
/*
gbenv (ver. 5.5) -- Show floating point and gbutils settings
Copyright (C) 2006-2012 Giulio Bottazzi
gbenv (ver. 5.6) -- Floating point locale, and gbutils settings
Copyright (C) 2006-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
......@@ -28,6 +28,46 @@
int main(int argc,char* argv[]){
/* variables for reading command line options */
/* ------------------------------------------ */
char opt;
/* ------------------------------------------ */
/* COMMAND LINE PROCESSING */
while((opt=getopt_long(argc,argv,"h",gb_long_options, &gb_option_index))!=EOF){
if(opt==0){
gbutils_header(argv[0],stdout);
exit(0);
}
else if(opt=='?'){
fprintf(stderr,"option %c not recognized\n",optopt);
return(-1);
}
else if(opt=='h'){
/*print help*/
fprintf(stdout,"Show floating point environment, locale and gbutils settings.\n");
fprintf(stdout," \n");
fprintf(stdout,"Information about the floating point environment includes:\n");
fprintf(stdout," if the environment is the default environment of the machine;\n");
fprintf(stdout," if the precision is single, double or extended;\n");
fprintf(stdout," if the rounding is nearest, upward, downward or toward zero;\n");
fprintf(stdout," the list of exceptions whose interrupts are ignored (masked).\n");
fprintf(stdout,"Information about the locale includes: \n");
fprintf(stdout," decimal point;\n");
fprintf(stdout," thousand separator;\n");
fprintf(stdout," the relative position of the thousand separator (grouping).\n");
fprintf(stdout,"Information about gbutils environment include:\n");
fprintf(stdout," if the error handler is activated;\n");
fprintf(stdout," the value of the environment variables dictating the output format;\n");
fprintf(stdout," the output format of integers and floating point numbers.\n");
fprintf(stdout,"Options: \n");
fprintf(stdout," -h print this help message \n");
return(0);
}
}
/* END OF COMMAND LINE PROCESSING */
/* ---- linux implementation ---- */
#ifdef linux
......@@ -101,6 +141,35 @@ int main(int argc,char* argv[]){
/* ------------------------------ */
printf(" locale definitions --------------------------------\n");
{
if (setlocale(LC_NUMERIC,"") == NULL)
fprintf(stderr,"WARNING:Cannot set LC_NUMERIC to default locale\n");
printf(" decimal point \"%s\"\n",nl_langinfo(RADIXCHAR));
printf(" thousands separator \"%s\"\n",nl_langinfo(THOUSEP));
printf(" grouping ");
{/* code snippet stolen from locale.c in glibc */
struct lconv *locale = localeconv();
const char *val = locale->grouping;
int cnt = val ? strlen (val) : 0;
while (cnt > 1){
printf ("%d;", *val == '\177' ? -1 : *val);
--cnt;
++val;
}
printf ("%d\n", cnt == 0 || *val == '\177' ? -1 : *val);
}
}
printf("\n");
#if defined HAVE_LIBGSL
printf(" gsl environment -----------------------------------\n");
......@@ -150,34 +219,5 @@ int main(int argc,char* argv[]){
printf(" empty field \"%s\"\n",EMPTY);
printf(" separation string \"%s\"\n",SEP);
printf("\n");
printf(" locale definitions --------------------------------\n");
{
if (setlocale(LC_NUMERIC,"") == NULL)
fprintf(stderr,"WARNING:Cannot set LC_NUMERIC to default locale\n");
printf(" decimal point \"%s\"\n",nl_langinfo(RADIXCHAR));
printf(" thousands separator \"%s\"\n",nl_langinfo(THOUSEP));
printf(" grouping ");
{/* code snippet stolen from locale.c in glibc */
struct lconv *locale = localeconv();
const char *val = locale->grouping;
int cnt = val ? strlen (val) : 0;
while (cnt > 1){
printf ("%d;", *val == '\177' ? -1 : *val);
--cnt;
++val;
}
printf ("%d\n", cnt == 0 || *val == '\177' ? -1 : *val);
}
}
return 0;
}
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH GBFILTERNEAR "1" "January 2015" "gbfilternear 5.6.1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBFILTERNEAR "1" "June 2015" "gbfilternear 5.6.5" "User Commands"
.SH NAME
gbfilternear \- Filter too near data point in Euclidean metric
.SH SYNOPSIS
......@@ -32,7 +32,7 @@ Report bugs to <gbutils@googlegroups.com>
.br
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
.SH COPYRIGHT
Copyright \(co 2001\-2014 Giulio Bottazzi
Copyright \(co 2001\-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation;
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH GBFUN "1" "January 2015" "gbfun 5.6.1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBFUN "1" "June 2015" "gbfun 5.6.5" "User Commands"
.SH NAME
gbfun \- Apply functions to table of data
.SH SYNOPSIS
......@@ -59,7 +59,7 @@ Report bugs to <gbutils@googlegroups.com>
.br
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
.SH COPYRIGHT
Copyright \(co 2001\-2014 Giulio Bottazzi
Copyright \(co 2001\-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation;
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH GBGCORR "1" "January 2015" "gbgcorr 5.6.1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBGCORR "1" "June 2015" "gbgcorr 5.6.5" "User Commands"
.SH NAME
gbgcorr \- Gaussian kernel correlation dimension
.SH SYNOPSIS
......@@ -48,7 +48,7 @@ Report bugs to <gbutils@googlegroups.com>
.br
Package home page <http://cafim.sssup.it/~giulio/software/gbutils/index.html>
.SH COPYRIGHT
Copyright \(co 2001\-2014 Giulio Bottazzi
Copyright \(co 2001\-2015 Giulio Bottazzi
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
(version 2) as published by the Free Software Foundation;
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1.
.TH GBGET "1" "June 2015" "gbget 5.6.5" "User Commands"
.SH NAME
gbget \- Basic data extraction and manipulation tool
.SH SYNOPSIS
.B gbget
[\fIoptions\fR] \fI'filename\fR[\fIindex\fR]\fI(C,R)trans'\fR
.SH DESCRIPTION
Print slices of tabular data from files and apply transformations. Data
are read from text files with fields separated by space (use option \fB\-F\fR
to specify a different separator). Inside data file, data\-blocks are
separated by two empty lines. File can be compressed with zlib (.gz).
.TP
filename
is the input file. If not specified it default to stdin or
the last specified filename if any.
.TP
index
stands for a data\-block index.
.TP
index
stands for a data\-block index.
.TP
C,R
stands for columns and rows spec given as "min:max:skip" to
select from "min" to "max" every "skip" steps. If negative
min and max are counted from the end. By default all data
are printed ("1:\-1:1"). If min>max then count is reversed
and skip must be negative (\fB\-1\fR by default). Different specs
are separated by semicolon ';' and considered sequentially.
.TP
trans
is a list of transformations applied to selected data: 'd'
take the diff of subsequent columns; 'D' remove all rows with
at least one Not\-A\-Number (NAN) entry; 'f' flatten the output
piling all columns; 'l' take log of all entries, 'P' print all
entries collected as a data\-block; 't' transpose the matrix
of data; 'z' subtract from the entries in each column their
mean; 'Z' replace the entry in each column with their zscore;
\&'w' divide the entry in each columns by their mean.
.IP
\&'<..;..>' functions separated by semicolons in angle brackets
can be used for generic data transformation; the function is
computed for each row of data. Variables names are 'x' followed
by the number of the column and optionally by 'l' and the number
of lags. For instance 'x2+x3l1' means the sum of the entries in
the 2nd column plus the entries in the 3rd column in the previous
row. 'x0' stands for the row number and 'x' is equal to 'x1'
.IP
\&'<@..;..>' if the functions specification starts with a '@' the
functions are computed recursively along the columns. In this
case the number after the 'x' is the relative column counted
starting from the one considered at each step.
.IP
\&'{...}' a function in curly brackets can be use to select data:
only rows that return a non\-negative value are retained
.SH OPTIONS
.TP
\fB\-F\fR
set the input fields separators (default ' \et')
.TP
\fB\-o\fR
set the output format (default '%12.6e')
.TP
\fB\-e\fR
set the output format for empty fields (default '%13s')
.TP