Initial class construction
This commit is contained in:
BIN
Git/mingw64/bin/WhoUses.exe
Normal file
BIN
Git/mingw64/bin/WhoUses.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/acountry.exe
Normal file
BIN
Git/mingw64/bin/acountry.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/adig.exe
Normal file
BIN
Git/mingw64/bin/adig.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/ahost.exe
Normal file
BIN
Git/mingw64/bin/ahost.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/antiword.exe
Normal file
BIN
Git/mingw64/bin/antiword.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/blocked-file-util.exe
Normal file
BIN
Git/mingw64/bin/blocked-file-util.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/bunzip2.exe
Normal file
BIN
Git/mingw64/bin/bunzip2.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/bzcat.exe
Normal file
BIN
Git/mingw64/bin/bzcat.exe
Normal file
Binary file not shown.
76
Git/mingw64/bin/bzcmp
Normal file
76
Git/mingw64/bin/bzcmp
Normal file
@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
|
||||
|
||||
# Bzcmp/diff wrapped for bzip2,
|
||||
# adapted from zdiff by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
||||
|
||||
# Bzcmp and bzdiff are used to invoke the cmp or the diff pro-
|
||||
# gram on compressed files. All options specified are passed
|
||||
# directly to cmp or diff. If only 1 file is specified, then
|
||||
# the files compared are file1 and an uncompressed file1.gz.
|
||||
# If two files are specified, then they are uncompressed (if
|
||||
# necessary) and fed to cmp or diff. The exit status from cmp
|
||||
# or diff is preserved.
|
||||
|
||||
PATH="/usr/bin:/bin:$PATH"; export PATH
|
||||
prog=`echo $0 | sed 's|.*/||'`
|
||||
case "$prog" in
|
||||
*cmp) comp=${CMP-cmp} ;;
|
||||
*) comp=${DIFF-diff} ;;
|
||||
esac
|
||||
|
||||
OPTIONS=
|
||||
FILES=
|
||||
for ARG
|
||||
do
|
||||
case "$ARG" in
|
||||
-*) OPTIONS="$OPTIONS $ARG";;
|
||||
*) if test -f "$ARG"; then
|
||||
FILES="$FILES $ARG"
|
||||
else
|
||||
echo "${prog}: $ARG not found or not a regular file"
|
||||
exit 1
|
||||
fi ;;
|
||||
esac
|
||||
done
|
||||
if test -z "$FILES"; then
|
||||
echo "Usage: $prog [${comp}_options] file [file]"
|
||||
exit 1
|
||||
fi
|
||||
tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || {
|
||||
echo 'cannot create a temporary file' >&2
|
||||
exit 1
|
||||
}
|
||||
set $FILES
|
||||
if test $# -eq 1; then
|
||||
FILE=`echo "$1" | sed 's/.bz2$//'`
|
||||
bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE"
|
||||
STAT="$?"
|
||||
|
||||
elif test $# -eq 2; then
|
||||
case "$1" in
|
||||
*.bz2)
|
||||
case "$2" in
|
||||
*.bz2)
|
||||
F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
|
||||
bzip2 -cdfq "$2" > $tmp
|
||||
bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
|
||||
STAT="$?"
|
||||
/bin/rm -f $tmp;;
|
||||
|
||||
*) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
|
||||
STAT="$?";;
|
||||
esac;;
|
||||
*) case "$2" in
|
||||
*.bz2)
|
||||
bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
|
||||
STAT="$?";;
|
||||
*) $comp $OPTIONS "$1" "$2"
|
||||
STAT="$?";;
|
||||
esac;;
|
||||
esac
|
||||
exit "$STAT"
|
||||
else
|
||||
echo "Usage: $prog [${comp}_options] file [file]"
|
||||
exit 1
|
||||
fi
|
76
Git/mingw64/bin/bzdiff
Normal file
76
Git/mingw64/bin/bzdiff
Normal file
@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
|
||||
|
||||
# Bzcmp/diff wrapped for bzip2,
|
||||
# adapted from zdiff by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
||||
|
||||
# Bzcmp and bzdiff are used to invoke the cmp or the diff pro-
|
||||
# gram on compressed files. All options specified are passed
|
||||
# directly to cmp or diff. If only 1 file is specified, then
|
||||
# the files compared are file1 and an uncompressed file1.gz.
|
||||
# If two files are specified, then they are uncompressed (if
|
||||
# necessary) and fed to cmp or diff. The exit status from cmp
|
||||
# or diff is preserved.
|
||||
|
||||
PATH="/usr/bin:/bin:$PATH"; export PATH
|
||||
prog=`echo $0 | sed 's|.*/||'`
|
||||
case "$prog" in
|
||||
*cmp) comp=${CMP-cmp} ;;
|
||||
*) comp=${DIFF-diff} ;;
|
||||
esac
|
||||
|
||||
OPTIONS=
|
||||
FILES=
|
||||
for ARG
|
||||
do
|
||||
case "$ARG" in
|
||||
-*) OPTIONS="$OPTIONS $ARG";;
|
||||
*) if test -f "$ARG"; then
|
||||
FILES="$FILES $ARG"
|
||||
else
|
||||
echo "${prog}: $ARG not found or not a regular file"
|
||||
exit 1
|
||||
fi ;;
|
||||
esac
|
||||
done
|
||||
if test -z "$FILES"; then
|
||||
echo "Usage: $prog [${comp}_options] file [file]"
|
||||
exit 1
|
||||
fi
|
||||
tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || {
|
||||
echo 'cannot create a temporary file' >&2
|
||||
exit 1
|
||||
}
|
||||
set $FILES
|
||||
if test $# -eq 1; then
|
||||
FILE=`echo "$1" | sed 's/.bz2$//'`
|
||||
bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE"
|
||||
STAT="$?"
|
||||
|
||||
elif test $# -eq 2; then
|
||||
case "$1" in
|
||||
*.bz2)
|
||||
case "$2" in
|
||||
*.bz2)
|
||||
F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
|
||||
bzip2 -cdfq "$2" > $tmp
|
||||
bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
|
||||
STAT="$?"
|
||||
/bin/rm -f $tmp;;
|
||||
|
||||
*) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
|
||||
STAT="$?";;
|
||||
esac;;
|
||||
*) case "$2" in
|
||||
*.bz2)
|
||||
bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
|
||||
STAT="$?";;
|
||||
*) $comp $OPTIONS "$1" "$2"
|
||||
STAT="$?";;
|
||||
esac;;
|
||||
esac
|
||||
exit "$STAT"
|
||||
else
|
||||
echo "Usage: $prog [${comp}_options] file [file]"
|
||||
exit 1
|
||||
fi
|
132
Git/mingw64/bin/bzegrep
Normal file
132
Git/mingw64/bin/bzegrep
Normal file
@ -0,0 +1,132 @@
|
||||
#!/bin/sh
|
||||
|
||||
# bzgrep -- a wrapper around a grep program that decompresses files as needed
|
||||
# Adapted from zgrep of the Debian gzip package by Anibal Monsalve Salazar.
|
||||
# Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
|
||||
|
||||
# Copyright (C) 1998, 2001, 2002 Free Software Foundation
|
||||
# Copyright (C) 1993 Jean-loup Gailly
|
||||
|
||||
# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
PATH="/usr/bin:$PATH"; export PATH
|
||||
|
||||
prog=`echo "$0" | sed 's|.*/||'`
|
||||
case "$prog" in
|
||||
*egrep) grep=${EGREP-egrep} ;;
|
||||
*fgrep) grep=${FGREP-fgrep} ;;
|
||||
*) grep=${GREP-grep} ;;
|
||||
esac
|
||||
|
||||
pat=""
|
||||
after_dash_dash=""
|
||||
files_with_matches=0
|
||||
files_without_matches=0
|
||||
no_filename=0
|
||||
with_filename=0
|
||||
|
||||
while test $# -ne 0; do
|
||||
case "$after_dash_dash$1" in
|
||||
--d* | --rec*) echo >&2 "$0: $1: option not supported"; exit 2;;
|
||||
--files-with-*) files_with_matches=1;;
|
||||
--files-witho*) files_without_matches=1;;
|
||||
--no-f*) no_filename=1;;
|
||||
--wi*) with_filename=1;;
|
||||
--*) ;;
|
||||
-*)
|
||||
case "$1" in
|
||||
-*[dr]*) echo >&2 "$0: $1: option not supported"; exit 2;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*H*) with_filename=1;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*h*) no_filename=1;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*L*) files_without_matches=1;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*l*) files_with_matches=1;;
|
||||
esac;;
|
||||
esac
|
||||
case "$after_dash_dash$1" in
|
||||
-[ef]) opt="$opt $1"; shift; pat="$1"
|
||||
if test "$grep" = grep; then # grep is buggy with -e on SVR4
|
||||
grep=egrep
|
||||
fi;;
|
||||
-[ABCdm])opt="$opt $1 $2"; shift;;
|
||||
--) opt="$opt $1"; after_dash_dash=1;;
|
||||
-*) opt="$opt $1";;
|
||||
*) if test -z "$pat"; then
|
||||
pat="$1"
|
||||
else
|
||||
break;
|
||||
fi;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$pat"; then
|
||||
echo "grep through bzip2 files"
|
||||
echo "usage: $prog [grep_options] pattern [files]"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
bzip2 -cdfq | $grep $opt "$pat"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
res=0
|
||||
for i do
|
||||
bzip2 -cdfq -- "$i" |
|
||||
if test $files_with_matches -eq 1; then
|
||||
$grep $opt "$pat" > /dev/null && printf "%s\n" "$i"
|
||||
elif test $files_without_matches -eq 1; then
|
||||
$grep $opt "$pat" > /dev/null || printf "%s\n" "$i"
|
||||
elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then
|
||||
$grep $opt "$pat"
|
||||
else
|
||||
i=$(echo "$i" | sed -e 's/[\\|&]/\\&/g')
|
||||
if test $with_filename -eq 1; then
|
||||
sed_script="s|^[^:]*:|${i}:|"
|
||||
else
|
||||
sed_script="s|^|${i}:|"
|
||||
fi
|
||||
# Hack adapted from GPLed code at
|
||||
# http://home.comcast.net/~j.p.h/cus-faq-2
|
||||
# Has the same effect as the following two lines of bash:
|
||||
#
|
||||
# $grep $opt "$pat" | sed "$sed_script"
|
||||
# exit ${PIPESTATUS[0]}
|
||||
#
|
||||
# Inside the `...`, fd4 goes to the pipe whose other end is read
|
||||
# and passed to eval; fd1 is the normal standard output
|
||||
# preserved the line before with exec 3>&1
|
||||
exec 3>&1
|
||||
eval `
|
||||
exec 4>&1 >&3 3>&-
|
||||
{
|
||||
$grep $opt "$pat" 4>&-; echo "r=$?;" >&4
|
||||
} | sed "$sed_script"
|
||||
`
|
||||
exit $r
|
||||
fi
|
||||
r=$?
|
||||
test $res -lt $r && res=$r
|
||||
done
|
||||
exit $res
|
132
Git/mingw64/bin/bzfgrep
Normal file
132
Git/mingw64/bin/bzfgrep
Normal file
@ -0,0 +1,132 @@
|
||||
#!/bin/sh
|
||||
|
||||
# bzgrep -- a wrapper around a grep program that decompresses files as needed
|
||||
# Adapted from zgrep of the Debian gzip package by Anibal Monsalve Salazar.
|
||||
# Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
|
||||
|
||||
# Copyright (C) 1998, 2001, 2002 Free Software Foundation
|
||||
# Copyright (C) 1993 Jean-loup Gailly
|
||||
|
||||
# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
PATH="/usr/bin:$PATH"; export PATH
|
||||
|
||||
prog=`echo "$0" | sed 's|.*/||'`
|
||||
case "$prog" in
|
||||
*egrep) grep=${EGREP-egrep} ;;
|
||||
*fgrep) grep=${FGREP-fgrep} ;;
|
||||
*) grep=${GREP-grep} ;;
|
||||
esac
|
||||
|
||||
pat=""
|
||||
after_dash_dash=""
|
||||
files_with_matches=0
|
||||
files_without_matches=0
|
||||
no_filename=0
|
||||
with_filename=0
|
||||
|
||||
while test $# -ne 0; do
|
||||
case "$after_dash_dash$1" in
|
||||
--d* | --rec*) echo >&2 "$0: $1: option not supported"; exit 2;;
|
||||
--files-with-*) files_with_matches=1;;
|
||||
--files-witho*) files_without_matches=1;;
|
||||
--no-f*) no_filename=1;;
|
||||
--wi*) with_filename=1;;
|
||||
--*) ;;
|
||||
-*)
|
||||
case "$1" in
|
||||
-*[dr]*) echo >&2 "$0: $1: option not supported"; exit 2;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*H*) with_filename=1;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*h*) no_filename=1;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*L*) files_without_matches=1;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*l*) files_with_matches=1;;
|
||||
esac;;
|
||||
esac
|
||||
case "$after_dash_dash$1" in
|
||||
-[ef]) opt="$opt $1"; shift; pat="$1"
|
||||
if test "$grep" = grep; then # grep is buggy with -e on SVR4
|
||||
grep=egrep
|
||||
fi;;
|
||||
-[ABCdm])opt="$opt $1 $2"; shift;;
|
||||
--) opt="$opt $1"; after_dash_dash=1;;
|
||||
-*) opt="$opt $1";;
|
||||
*) if test -z "$pat"; then
|
||||
pat="$1"
|
||||
else
|
||||
break;
|
||||
fi;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$pat"; then
|
||||
echo "grep through bzip2 files"
|
||||
echo "usage: $prog [grep_options] pattern [files]"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
bzip2 -cdfq | $grep $opt "$pat"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
res=0
|
||||
for i do
|
||||
bzip2 -cdfq -- "$i" |
|
||||
if test $files_with_matches -eq 1; then
|
||||
$grep $opt "$pat" > /dev/null && printf "%s\n" "$i"
|
||||
elif test $files_without_matches -eq 1; then
|
||||
$grep $opt "$pat" > /dev/null || printf "%s\n" "$i"
|
||||
elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then
|
||||
$grep $opt "$pat"
|
||||
else
|
||||
i=$(echo "$i" | sed -e 's/[\\|&]/\\&/g')
|
||||
if test $with_filename -eq 1; then
|
||||
sed_script="s|^[^:]*:|${i}:|"
|
||||
else
|
||||
sed_script="s|^|${i}:|"
|
||||
fi
|
||||
# Hack adapted from GPLed code at
|
||||
# http://home.comcast.net/~j.p.h/cus-faq-2
|
||||
# Has the same effect as the following two lines of bash:
|
||||
#
|
||||
# $grep $opt "$pat" | sed "$sed_script"
|
||||
# exit ${PIPESTATUS[0]}
|
||||
#
|
||||
# Inside the `...`, fd4 goes to the pipe whose other end is read
|
||||
# and passed to eval; fd1 is the normal standard output
|
||||
# preserved the line before with exec 3>&1
|
||||
exec 3>&1
|
||||
eval `
|
||||
exec 4>&1 >&3 3>&-
|
||||
{
|
||||
$grep $opt "$pat" 4>&-; echo "r=$?;" >&4
|
||||
} | sed "$sed_script"
|
||||
`
|
||||
exit $r
|
||||
fi
|
||||
r=$?
|
||||
test $res -lt $r && res=$r
|
||||
done
|
||||
exit $res
|
132
Git/mingw64/bin/bzgrep
Normal file
132
Git/mingw64/bin/bzgrep
Normal file
@ -0,0 +1,132 @@
|
||||
#!/bin/sh
|
||||
|
||||
# bzgrep -- a wrapper around a grep program that decompresses files as needed
|
||||
# Adapted from zgrep of the Debian gzip package by Anibal Monsalve Salazar.
|
||||
# Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
|
||||
|
||||
# Copyright (C) 1998, 2001, 2002 Free Software Foundation
|
||||
# Copyright (C) 1993 Jean-loup Gailly
|
||||
|
||||
# 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 2, 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., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
PATH="/usr/bin:$PATH"; export PATH
|
||||
|
||||
prog=`echo "$0" | sed 's|.*/||'`
|
||||
case "$prog" in
|
||||
*egrep) grep=${EGREP-egrep} ;;
|
||||
*fgrep) grep=${FGREP-fgrep} ;;
|
||||
*) grep=${GREP-grep} ;;
|
||||
esac
|
||||
|
||||
pat=""
|
||||
after_dash_dash=""
|
||||
files_with_matches=0
|
||||
files_without_matches=0
|
||||
no_filename=0
|
||||
with_filename=0
|
||||
|
||||
while test $# -ne 0; do
|
||||
case "$after_dash_dash$1" in
|
||||
--d* | --rec*) echo >&2 "$0: $1: option not supported"; exit 2;;
|
||||
--files-with-*) files_with_matches=1;;
|
||||
--files-witho*) files_without_matches=1;;
|
||||
--no-f*) no_filename=1;;
|
||||
--wi*) with_filename=1;;
|
||||
--*) ;;
|
||||
-*)
|
||||
case "$1" in
|
||||
-*[dr]*) echo >&2 "$0: $1: option not supported"; exit 2;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*H*) with_filename=1;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*h*) no_filename=1;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*L*) files_without_matches=1;;
|
||||
esac
|
||||
case "$1" in
|
||||
-*l*) files_with_matches=1;;
|
||||
esac;;
|
||||
esac
|
||||
case "$after_dash_dash$1" in
|
||||
-[ef]) opt="$opt $1"; shift; pat="$1"
|
||||
if test "$grep" = grep; then # grep is buggy with -e on SVR4
|
||||
grep=egrep
|
||||
fi;;
|
||||
-[ABCdm])opt="$opt $1 $2"; shift;;
|
||||
--) opt="$opt $1"; after_dash_dash=1;;
|
||||
-*) opt="$opt $1";;
|
||||
*) if test -z "$pat"; then
|
||||
pat="$1"
|
||||
else
|
||||
break;
|
||||
fi;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$pat"; then
|
||||
echo "grep through bzip2 files"
|
||||
echo "usage: $prog [grep_options] pattern [files]"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
bzip2 -cdfq | $grep $opt "$pat"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
res=0
|
||||
for i do
|
||||
bzip2 -cdfq -- "$i" |
|
||||
if test $files_with_matches -eq 1; then
|
||||
$grep $opt "$pat" > /dev/null && printf "%s\n" "$i"
|
||||
elif test $files_without_matches -eq 1; then
|
||||
$grep $opt "$pat" > /dev/null || printf "%s\n" "$i"
|
||||
elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then
|
||||
$grep $opt "$pat"
|
||||
else
|
||||
i=$(echo "$i" | sed -e 's/[\\|&]/\\&/g')
|
||||
if test $with_filename -eq 1; then
|
||||
sed_script="s|^[^:]*:|${i}:|"
|
||||
else
|
||||
sed_script="s|^|${i}:|"
|
||||
fi
|
||||
# Hack adapted from GPLed code at
|
||||
# http://home.comcast.net/~j.p.h/cus-faq-2
|
||||
# Has the same effect as the following two lines of bash:
|
||||
#
|
||||
# $grep $opt "$pat" | sed "$sed_script"
|
||||
# exit ${PIPESTATUS[0]}
|
||||
#
|
||||
# Inside the `...`, fd4 goes to the pipe whose other end is read
|
||||
# and passed to eval; fd1 is the normal standard output
|
||||
# preserved the line before with exec 3>&1
|
||||
exec 3>&1
|
||||
eval `
|
||||
exec 4>&1 >&3 3>&-
|
||||
{
|
||||
$grep $opt "$pat" 4>&-; echo "r=$?;" >&4
|
||||
} | sed "$sed_script"
|
||||
`
|
||||
exit $r
|
||||
fi
|
||||
r=$?
|
||||
test $res -lt $r && res=$r
|
||||
done
|
||||
exit $res
|
BIN
Git/mingw64/bin/bzip2.exe
Normal file
BIN
Git/mingw64/bin/bzip2.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/bzip2recover.exe
Normal file
BIN
Git/mingw64/bin/bzip2recover.exe
Normal file
Binary file not shown.
61
Git/mingw64/bin/bzless
Normal file
61
Git/mingw64/bin/bzless
Normal file
@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Bzmore wrapped for bzip2,
|
||||
# adapted from zmore by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
||||
|
||||
PATH="/usr/bin:$PATH"; export PATH
|
||||
|
||||
prog=`echo $0 | sed 's|.*/||'`
|
||||
case "$prog" in
|
||||
*less) more=less ;;
|
||||
*) more=more ;;
|
||||
esac
|
||||
|
||||
if test "`echo -n a`" = "-n a"; then
|
||||
# looks like a SysV system:
|
||||
n1=''; n2='\c'
|
||||
else
|
||||
n1='-n'; n2=''
|
||||
fi
|
||||
oldtty=`stty -g 2>/dev/null`
|
||||
if stty -cbreak 2>/dev/null; then
|
||||
cb='cbreak'; ncb='-cbreak'
|
||||
else
|
||||
# 'stty min 1' resets eof to ^a on both SunOS and SysV!
|
||||
cb='min 1 -icanon'; ncb='icanon eof ^d'
|
||||
fi
|
||||
if test $? -eq 0 && test -n "$oldtty"; then
|
||||
trap 'stty $oldtty 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM
|
||||
else
|
||||
trap 'stty $ncb echo 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM
|
||||
fi
|
||||
|
||||
if test $# = 0; then
|
||||
if test -t 0; then
|
||||
echo usage: $prog files...
|
||||
else
|
||||
bzip2 -cdfq | eval $more
|
||||
fi
|
||||
else
|
||||
FIRST=1
|
||||
for FILE
|
||||
do
|
||||
if test $FIRST -eq 0; then
|
||||
echo $n1 "--More--(Next file: $FILE)$n2"
|
||||
stty $cb -echo 2>/dev/null
|
||||
ANS=`dd bs=1 count=1 2>/dev/null`
|
||||
stty $ncb echo 2>/dev/null
|
||||
echo " "
|
||||
if test "$ANS" = 'e' || test "$ANS" = 'q'; then
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
if test "$ANS" != 's'; then
|
||||
echo "------> $FILE <------"
|
||||
bzip2 -cdfq "$FILE" | eval $more
|
||||
fi
|
||||
if test -t; then
|
||||
FIRST=0
|
||||
fi
|
||||
done
|
||||
fi
|
61
Git/mingw64/bin/bzmore
Normal file
61
Git/mingw64/bin/bzmore
Normal file
@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Bzmore wrapped for bzip2,
|
||||
# adapted from zmore by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
|
||||
|
||||
PATH="/usr/bin:$PATH"; export PATH
|
||||
|
||||
prog=`echo $0 | sed 's|.*/||'`
|
||||
case "$prog" in
|
||||
*less) more=less ;;
|
||||
*) more=more ;;
|
||||
esac
|
||||
|
||||
if test "`echo -n a`" = "-n a"; then
|
||||
# looks like a SysV system:
|
||||
n1=''; n2='\c'
|
||||
else
|
||||
n1='-n'; n2=''
|
||||
fi
|
||||
oldtty=`stty -g 2>/dev/null`
|
||||
if stty -cbreak 2>/dev/null; then
|
||||
cb='cbreak'; ncb='-cbreak'
|
||||
else
|
||||
# 'stty min 1' resets eof to ^a on both SunOS and SysV!
|
||||
cb='min 1 -icanon'; ncb='icanon eof ^d'
|
||||
fi
|
||||
if test $? -eq 0 && test -n "$oldtty"; then
|
||||
trap 'stty $oldtty 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM
|
||||
else
|
||||
trap 'stty $ncb echo 2>/dev/null; exit' 0 INT QUIT TRAP USR1 PIPE TERM
|
||||
fi
|
||||
|
||||
if test $# = 0; then
|
||||
if test -t 0; then
|
||||
echo usage: $prog files...
|
||||
else
|
||||
bzip2 -cdfq | eval $more
|
||||
fi
|
||||
else
|
||||
FIRST=1
|
||||
for FILE
|
||||
do
|
||||
if test $FIRST -eq 0; then
|
||||
echo $n1 "--More--(Next file: $FILE)$n2"
|
||||
stty $cb -echo 2>/dev/null
|
||||
ANS=`dd bs=1 count=1 2>/dev/null`
|
||||
stty $ncb echo 2>/dev/null
|
||||
echo " "
|
||||
if test "$ANS" = 'e' || test "$ANS" = 'q'; then
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
if test "$ANS" != 's'; then
|
||||
echo "------> $FILE <------"
|
||||
bzip2 -cdfq "$FILE" | eval $more
|
||||
fi
|
||||
if test -t; then
|
||||
FIRST=0
|
||||
fi
|
||||
done
|
||||
fi
|
BIN
Git/mingw64/bin/certtool.exe
Normal file
BIN
Git/mingw64/bin/certtool.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/connect.exe
Normal file
BIN
Git/mingw64/bin/connect.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/create-shortcut.exe
Normal file
BIN
Git/mingw64/bin/create-shortcut.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/curl.exe
Normal file
BIN
Git/mingw64/bin/curl.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/edit.dll
Normal file
BIN
Git/mingw64/bin/edit.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/edit_test.exe
Normal file
BIN
Git/mingw64/bin/edit_test.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/edit_test_dll.exe
Normal file
BIN
Git/mingw64/bin/edit_test_dll.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/envsubst.exe
Normal file
BIN
Git/mingw64/bin/envsubst.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/gettext.exe
Normal file
BIN
Git/mingw64/bin/gettext.exe
Normal file
Binary file not shown.
121
Git/mingw64/bin/gettext.sh
Normal file
121
Git/mingw64/bin/gettext.sh
Normal file
@ -0,0 +1,121 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2003, 2005-2007, 2011, 2015-2016 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Find a way to echo strings without interpreting backslash.
|
||||
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
|
||||
echo='echo'
|
||||
else
|
||||
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
|
||||
echo='printf %s\n'
|
||||
else
|
||||
echo_func () {
|
||||
cat <<EOT
|
||||
$*
|
||||
EOT
|
||||
}
|
||||
echo='echo_func'
|
||||
fi
|
||||
fi
|
||||
|
||||
# This script is primarily a shell function library. In order for
|
||||
# ". gettext.sh" to find it, we install it in $PREFIX/bin (that is usually
|
||||
# contained in $PATH), rather than in some other location such as
|
||||
# $PREFIX/share/sh-scripts or $PREFIX/share/gettext. In order to not violate
|
||||
# the Filesystem Hierarchy Standard when doing so, this script is executable.
|
||||
# Therefore it needs to support the standard --help and --version.
|
||||
if test -z "${ZSH_VERSION+set}"; then
|
||||
# zsh is not POSIX compliant: By default, while ". gettext.sh" is executed,
|
||||
# it sets $0 to "gettext.sh", defeating the purpose of this test. But
|
||||
# fortunately we know that when running under zsh, this script is always
|
||||
# being sourced, not executed, because hardly anyone is crazy enough to
|
||||
# install zsh as /bin/sh.
|
||||
case "$0" in
|
||||
gettext.sh | */gettext.sh | *\\gettext.sh)
|
||||
progname=$0
|
||||
package=gettext-runtime
|
||||
version=0.19.8.1
|
||||
# func_usage
|
||||
# outputs to stdout the --help usage message.
|
||||
func_usage ()
|
||||
{
|
||||
echo "GNU gettext shell script function library version $version"
|
||||
echo "Usage: . gettext.sh"
|
||||
}
|
||||
# func_version
|
||||
# outputs to stdout the --version message.
|
||||
func_version ()
|
||||
{
|
||||
echo "$progname (GNU $package) $version"
|
||||
echo "Copyright (C) 2003-2007 Free Software Foundation, Inc.
|
||||
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
echo "Written by" "Bruno Haible"
|
||||
}
|
||||
if test $# = 1; then
|
||||
case "$1" in
|
||||
--help | --hel | --he | --h )
|
||||
func_usage; exit 0 ;;
|
||||
--version | --versio | --versi | --vers | --ver | --ve | --v )
|
||||
func_version; exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
func_usage 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# eval_gettext MSGID
|
||||
# looks up the translation of MSGID and substitutes shell variables in the
|
||||
# result.
|
||||
eval_gettext () {
|
||||
gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1")
|
||||
}
|
||||
|
||||
# eval_ngettext MSGID MSGID-PLURAL COUNT
|
||||
# looks up the translation of MSGID / MSGID-PLURAL for COUNT and substitutes
|
||||
# shell variables in the result.
|
||||
eval_ngettext () {
|
||||
ngettext "$1" "$2" "$3" | (export PATH `envsubst --variables "$1 $2"`; envsubst "$1 $2")
|
||||
}
|
||||
|
||||
# Note: This use of envsubst is much safer than using the shell built-in 'eval'
|
||||
# would be.
|
||||
# 1) The security problem with Chinese translations that happen to use a
|
||||
# character such as \xe0\x60 is avoided.
|
||||
# 2) The security problem with malevolent translators who put in command lists
|
||||
# like "$(...)" or "`...`" is avoided.
|
||||
# 3) The translations can only refer to shell variables that are already
|
||||
# mentioned in MSGID or MSGID-PLURAL.
|
||||
#
|
||||
# Note: "export PATH" above is a dummy; this is for the case when
|
||||
# `envsubst --variables ...` returns nothing.
|
||||
#
|
||||
# Note: In eval_ngettext above, "$1 $2" means a string whose variables set is
|
||||
# the union of the variables set of "$1" and "$2".
|
||||
#
|
||||
# Note: The minimal use of backquote above ensures that trailing newlines are
|
||||
# not dropped, not from the gettext invocation and not from the value of any
|
||||
# shell variable.
|
||||
#
|
||||
# Note: Field splitting on the `envsubst --variables ...` result is desired,
|
||||
# since envsubst outputs the variables, separated by newlines. Pathname
|
||||
# wildcard expansion or tilde expansion has no effect here, since the words
|
||||
# output by "envsubst --variables ..." consist solely of alphanumeric
|
||||
# characters and underscore.
|
1347
Git/mingw64/bin/gettextize
Normal file
1347
Git/mingw64/bin/gettextize
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Git/mingw64/bin/git-lfs.exe
Normal file
BIN
Git/mingw64/bin/git-lfs.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/git-receive-pack.exe
Normal file
BIN
Git/mingw64/bin/git-receive-pack.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/git-upload-archive.exe
Normal file
BIN
Git/mingw64/bin/git-upload-archive.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/git-upload-pack.exe
Normal file
BIN
Git/mingw64/bin/git-upload-pack.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/git.exe
Normal file
BIN
Git/mingw64/bin/git.exe
Normal file
Binary file not shown.
12645
Git/mingw64/bin/gitk
Normal file
12645
Git/mingw64/bin/gitk
Normal file
File diff suppressed because it is too large
Load Diff
9
Git/mingw64/bin/jemalloc.sh
Normal file
9
Git/mingw64/bin/jemalloc.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
prefix=/mingw64
|
||||
exec_prefix=/mingw64
|
||||
libdir=${exec_prefix}/lib
|
||||
|
||||
LD_PRELOAD=${libdir}/libjemalloc.dll
|
||||
export LD_PRELOAD
|
||||
exec "$@"
|
5624
Git/mingw64/bin/jeprof
Normal file
5624
Git/mingw64/bin/jeprof
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Git/mingw64/bin/libatomic-1.dll
Normal file
BIN
Git/mingw64/bin/libatomic-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libbz2-1.dll
Normal file
BIN
Git/mingw64/bin/libbz2-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libcares-3.dll
Normal file
BIN
Git/mingw64/bin/libcares-3.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libcharset-1.dll
Normal file
BIN
Git/mingw64/bin/libcharset-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libcrypto-1_1-x64.dll
Normal file
BIN
Git/mingw64/bin/libcrypto-1_1-x64.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libcurl-4.dll
Normal file
BIN
Git/mingw64/bin/libcurl-4.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libeay32.dll
Normal file
BIN
Git/mingw64/bin/libeay32.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libexpat-1.dll
Normal file
BIN
Git/mingw64/bin/libexpat-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libffi-6.dll
Normal file
BIN
Git/mingw64/bin/libffi-6.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libgcc_s_seh-1.dll
Normal file
BIN
Git/mingw64/bin/libgcc_s_seh-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libgmp-10.dll
Normal file
BIN
Git/mingw64/bin/libgmp-10.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libgmpxx-4.dll
Normal file
BIN
Git/mingw64/bin/libgmpxx-4.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libgnutls-30.dll
Normal file
BIN
Git/mingw64/bin/libgnutls-30.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libgomp-1.dll
Normal file
BIN
Git/mingw64/bin/libgomp-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libhogweed-4.dll
Normal file
BIN
Git/mingw64/bin/libhogweed-4.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libiconv-2.dll
Normal file
BIN
Git/mingw64/bin/libiconv-2.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libidn2-0.dll
Normal file
BIN
Git/mingw64/bin/libidn2-0.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libidn2-4.dll
Normal file
BIN
Git/mingw64/bin/libidn2-4.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libintl-8.dll
Normal file
BIN
Git/mingw64/bin/libintl-8.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libjansson-4.dll
Normal file
BIN
Git/mingw64/bin/libjansson-4.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libjemalloc.dll
Normal file
BIN
Git/mingw64/bin/libjemalloc.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/liblzma-5.dll
Normal file
BIN
Git/mingw64/bin/liblzma-5.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libmetalink-3.dll
Normal file
BIN
Git/mingw64/bin/libmetalink-3.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libminizip-1.dll
Normal file
BIN
Git/mingw64/bin/libminizip-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libnettle-6.dll
Normal file
BIN
Git/mingw64/bin/libnettle-6.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libnghttp2-14.dll
Normal file
BIN
Git/mingw64/bin/libnghttp2-14.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libpcre-1.dll
Normal file
BIN
Git/mingw64/bin/libpcre-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libpcre2-16-0.dll
Normal file
BIN
Git/mingw64/bin/libpcre2-16-0.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libpcre2-32-0.dll
Normal file
BIN
Git/mingw64/bin/libpcre2-32-0.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libpcre2-8-0.dll
Normal file
BIN
Git/mingw64/bin/libpcre2-8-0.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libpcre2-posix-1.dll
Normal file
BIN
Git/mingw64/bin/libpcre2-posix-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libpcreposix-0.dll
Normal file
BIN
Git/mingw64/bin/libpcreposix-0.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libssh2-1.dll
Normal file
BIN
Git/mingw64/bin/libssh2-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libssl-1_1-x64.dll
Normal file
BIN
Git/mingw64/bin/libssl-1_1-x64.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libssp-0.dll
Normal file
BIN
Git/mingw64/bin/libssp-0.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libstdc++-6.dll
Normal file
BIN
Git/mingw64/bin/libstdc++-6.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libsystre-0.dll
Normal file
BIN
Git/mingw64/bin/libsystre-0.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libtasn1-6.dll
Normal file
BIN
Git/mingw64/bin/libtasn1-6.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libtre-5.dll
Normal file
BIN
Git/mingw64/bin/libtre-5.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libunistring-2.dll
Normal file
BIN
Git/mingw64/bin/libunistring-2.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libwinpthread-1.dll
Normal file
BIN
Git/mingw64/bin/libwinpthread-1.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/libzip.dll
Normal file
BIN
Git/mingw64/bin/libzip.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/lzmadec.exe
Normal file
BIN
Git/mingw64/bin/lzmadec.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/lzmainfo.exe
Normal file
BIN
Git/mingw64/bin/lzmainfo.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/odt2txt.exe
Normal file
BIN
Git/mingw64/bin/odt2txt.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/openssl.exe
Normal file
BIN
Git/mingw64/bin/openssl.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/p11tool.exe
Normal file
BIN
Git/mingw64/bin/p11tool.exe
Normal file
Binary file not shown.
121
Git/mingw64/bin/pcre2-config
Normal file
121
Git/mingw64/bin/pcre2-config
Normal file
@ -0,0 +1,121 @@
|
||||
#!/bin/sh
|
||||
|
||||
prefix=/mingw64
|
||||
exec_prefix=${prefix}
|
||||
exec_prefix_set=no
|
||||
|
||||
cflags="[--cflags]"
|
||||
libs=
|
||||
|
||||
if test yes = yes ; then
|
||||
libs="[--libs16] $libs"
|
||||
fi
|
||||
|
||||
if test yes = yes ; then
|
||||
libs="[--libs32] $libs"
|
||||
fi
|
||||
|
||||
if test yes = yes ; then
|
||||
libs="[--libs8] [--libs-posix] $libs"
|
||||
cflags="$cflags [--cflags-posix]"
|
||||
fi
|
||||
|
||||
usage="Usage: pcre2-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
libR=
|
||||
case `uname -s` in
|
||||
*SunOS*)
|
||||
libR=" -R${exec_prefix}/lib"
|
||||
;;
|
||||
*BSD*)
|
||||
libR=" -Wl,-R${exec_prefix}/lib"
|
||||
;;
|
||||
esac
|
||||
|
||||
libS=
|
||||
if test ${exec_prefix}/lib != /usr/lib ; then
|
||||
libS=-L${exec_prefix}/lib
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
if test $exec_prefix_set = no ; then
|
||||
exec_prefix=$optarg
|
||||
fi
|
||||
;;
|
||||
--prefix)
|
||||
echo $prefix
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
exec_prefix_set=yes
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo $exec_prefix
|
||||
;;
|
||||
--version)
|
||||
echo 10.23
|
||||
;;
|
||||
--cflags)
|
||||
if test ${prefix}/include != /usr/include ; then
|
||||
includes=-I${prefix}/include
|
||||
fi
|
||||
echo $includes
|
||||
;;
|
||||
--cflags-posix)
|
||||
if test yes = yes ; then
|
||||
if test ${prefix}/include != /usr/include ; then
|
||||
includes=-I${prefix}/include
|
||||
fi
|
||||
echo $includes
|
||||
else
|
||||
echo "${usage}" 1>&2
|
||||
fi
|
||||
;;
|
||||
--libs-posix)
|
||||
if test yes = yes ; then
|
||||
echo $libS$libR -lpcre2-posix -lpcre2-8
|
||||
else
|
||||
echo "${usage}" 1>&2
|
||||
fi
|
||||
;;
|
||||
--libs8)
|
||||
if test yes = yes ; then
|
||||
echo $libS$libR -lpcre2-8
|
||||
else
|
||||
echo "${usage}" 1>&2
|
||||
fi
|
||||
;;
|
||||
--libs16)
|
||||
if test yes = yes ; then
|
||||
echo $libS$libR -lpcre2-16
|
||||
else
|
||||
echo "${usage}" 1>&2
|
||||
fi
|
||||
;;
|
||||
--libs32)
|
||||
if test yes = yes ; then
|
||||
echo $libS$libR -lpcre2-32
|
||||
else
|
||||
echo "${usage}" 1>&2
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
BIN
Git/mingw64/bin/pdftotext.exe
Normal file
BIN
Git/mingw64/bin/pdftotext.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/pkcs1-conv.exe
Normal file
BIN
Git/mingw64/bin/pkcs1-conv.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/proxy-lookup.exe
Normal file
BIN
Git/mingw64/bin/proxy-lookup.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/psktool.exe
Normal file
BIN
Git/mingw64/bin/psktool.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/recode-sr-latin.exe
Normal file
BIN
Git/mingw64/bin/recode-sr-latin.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/sexp-conv.exe
Normal file
BIN
Git/mingw64/bin/sexp-conv.exe
Normal file
Binary file not shown.
896
Git/mingw64/bin/sqlite3_analyzer.sh
Normal file
896
Git/mingw64/bin/sqlite3_analyzer.sh
Normal file
@ -0,0 +1,896 @@
|
||||
#! /bin/sh
|
||||
# restart with tclsh \
|
||||
exec tclsh "$0" ${1+"$@"}
|
||||
package require sqlite3
|
||||
|
||||
# Run this TCL script using an SQLite-enabled TCL interpreter to get a report
|
||||
# on how much disk space is used by a particular data to actually store data
|
||||
# versus how much space is unused.
|
||||
#
|
||||
# The dbstat virtual table is required.
|
||||
#
|
||||
|
||||
if {[catch {
|
||||
|
||||
# Argument $tname is the name of a table within the database opened by
|
||||
# database handle [db]. Return true if it is a WITHOUT ROWID table, or
|
||||
# false otherwise.
|
||||
#
|
||||
proc is_without_rowid {tname} {
|
||||
set t [string map {' ''} $tname]
|
||||
db eval "PRAGMA index_list = '$t'" o {
|
||||
if {$o(origin) == "pk"} {
|
||||
set n $o(name)
|
||||
if {0==[db one { SELECT count(*) FROM sqlite_master WHERE name=$n }]} {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
# Read and run TCL commands from standard input. Used to implement
|
||||
# the --tclsh option.
|
||||
#
|
||||
proc tclsh {} {
|
||||
set line {}
|
||||
while {![eof stdin]} {
|
||||
if {$line!=""} {
|
||||
puts -nonewline "> "
|
||||
} else {
|
||||
puts -nonewline "% "
|
||||
}
|
||||
flush stdout
|
||||
append line [gets stdin]
|
||||
if {[info complete $line]} {
|
||||
if {[catch {uplevel #0 $line} result]} {
|
||||
puts stderr "Error: $result"
|
||||
} elseif {$result!=""} {
|
||||
puts $result
|
||||
}
|
||||
set line {}
|
||||
} else {
|
||||
append line \n
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Get the name of the database to analyze
|
||||
#
|
||||
proc usage {} {
|
||||
set argv0 [file rootname [file tail [info script]]]
|
||||
puts stderr "Usage: $argv0 ?--pageinfo? ?--stats? database-filename"
|
||||
puts stderr {
|
||||
Analyze the SQLite3 database file specified by the "database-filename"
|
||||
argument and output a report detailing size and storage efficiency
|
||||
information for the database and its constituent tables and indexes.
|
||||
|
||||
Options:
|
||||
|
||||
--pageinfo Show how each page of the database-file is used
|
||||
|
||||
--stats Output SQL text that creates a new database containing
|
||||
statistics about the database that was analyzed
|
||||
|
||||
--tclsh Run the built-in TCL interpreter interactively (for debugging)
|
||||
|
||||
--version Show the version number of SQLite
|
||||
}
|
||||
exit 1
|
||||
}
|
||||
set file_to_analyze {}
|
||||
set flags(-pageinfo) 0
|
||||
set flags(-stats) 0
|
||||
set flags(-debug) 0
|
||||
append argv {}
|
||||
foreach arg $argv {
|
||||
if {[regexp {^-+pageinfo$} $arg]} {
|
||||
set flags(-pageinfo) 1
|
||||
} elseif {[regexp {^-+stats$} $arg]} {
|
||||
set flags(-stats) 1
|
||||
} elseif {[regexp {^-+debug$} $arg]} {
|
||||
set flags(-debug) 1
|
||||
} elseif {[regexp {^-+tclsh$} $arg]} {
|
||||
tclsh
|
||||
exit 0
|
||||
} elseif {[regexp {^-+version$} $arg]} {
|
||||
sqlite3 mem :memory:
|
||||
puts [mem one {SELECT sqlite_version()||' '||sqlite_source_id()}]
|
||||
mem close
|
||||
exit 0
|
||||
} elseif {[regexp {^-} $arg]} {
|
||||
puts stderr "Unknown option: $arg"
|
||||
usage
|
||||
} elseif {$file_to_analyze!=""} {
|
||||
usage
|
||||
} else {
|
||||
set file_to_analyze $arg
|
||||
}
|
||||
}
|
||||
if {$file_to_analyze==""} usage
|
||||
set root_filename $file_to_analyze
|
||||
regexp {^file:(//)?([^?]*)} $file_to_analyze all x1 root_filename
|
||||
if {![file exists $root_filename]} {
|
||||
puts stderr "No such file: $root_filename"
|
||||
exit 1
|
||||
}
|
||||
if {![file readable $root_filename]} {
|
||||
puts stderr "File is not readable: $root_filename"
|
||||
exit 1
|
||||
}
|
||||
set true_file_size [file size $root_filename]
|
||||
if {$true_file_size<512} {
|
||||
puts stderr "Empty or malformed database: $root_filename"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Compute the total file size assuming test_multiplexor is being used.
|
||||
# Assume that SQLITE_ENABLE_8_3_NAMES might be enabled
|
||||
#
|
||||
set extension [file extension $root_filename]
|
||||
set pattern $root_filename
|
||||
append pattern {[0-3][0-9][0-9]}
|
||||
foreach f [glob -nocomplain $pattern] {
|
||||
incr true_file_size [file size $f]
|
||||
set extension {}
|
||||
}
|
||||
if {[string length $extension]>=2 && [string length $extension]<=4} {
|
||||
set pattern [file rootname $root_filename]
|
||||
append pattern {.[0-3][0-9][0-9]}
|
||||
foreach f [glob -nocomplain $pattern] {
|
||||
incr true_file_size [file size $f]
|
||||
}
|
||||
}
|
||||
|
||||
# Open the database
|
||||
#
|
||||
if {[catch {sqlite3 db $file_to_analyze -uri 1} msg]} {
|
||||
puts stderr "error trying to open $file_to_analyze: $msg"
|
||||
exit 1
|
||||
}
|
||||
if {$flags(-debug)} {
|
||||
proc dbtrace {txt} {puts $txt; flush stdout;}
|
||||
db trace ::dbtrace
|
||||
}
|
||||
|
||||
# Make sure all required compile-time options are available
|
||||
#
|
||||
if {![db exists {SELECT 1 FROM pragma_compile_options
|
||||
WHERE compile_options='ENABLE_DBSTAT_VTAB'}]} {
|
||||
puts "The SQLite database engine linked with this application\
|
||||
lacks required capabilities. Recompile using the\
|
||||
-DSQLITE_ENABLE_DBSTAT_VTAB compile-time option to fix\
|
||||
this problem."
|
||||
exit 1
|
||||
}
|
||||
|
||||
db eval {SELECT count(*) FROM sqlite_master}
|
||||
set pageSize [expr {wide([db one {PRAGMA page_size}])}]
|
||||
|
||||
if {$flags(-pageinfo)} {
|
||||
db eval {CREATE VIRTUAL TABLE temp.stat USING dbstat}
|
||||
db eval {SELECT name, path, pageno FROM temp.stat ORDER BY pageno} {
|
||||
puts "$pageno $name $path"
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
if {$flags(-stats)} {
|
||||
db eval {CREATE VIRTUAL TABLE temp.stat USING dbstat}
|
||||
puts "BEGIN;"
|
||||
puts "CREATE TABLE stats("
|
||||
puts " name STRING, /* Name of table or index */"
|
||||
puts " path INTEGER, /* Path to page from root */"
|
||||
puts " pageno INTEGER, /* Page number */"
|
||||
puts " pagetype STRING, /* 'internal', 'leaf' or 'overflow' */"
|
||||
puts " ncell INTEGER, /* Cells on page (0 for overflow) */"
|
||||
puts " payload INTEGER, /* Bytes of payload on this page */"
|
||||
puts " unused INTEGER, /* Bytes of unused space on this page */"
|
||||
puts " mx_payload INTEGER, /* Largest payload size of all cells */"
|
||||
puts " pgoffset INTEGER, /* Offset of page in file */"
|
||||
puts " pgsize INTEGER /* Size of the page */"
|
||||
puts ");"
|
||||
db eval {SELECT quote(name) || ',' ||
|
||||
quote(path) || ',' ||
|
||||
quote(pageno) || ',' ||
|
||||
quote(pagetype) || ',' ||
|
||||
quote(ncell) || ',' ||
|
||||
quote(payload) || ',' ||
|
||||
quote(unused) || ',' ||
|
||||
quote(mx_payload) || ',' ||
|
||||
quote(pgoffset) || ',' ||
|
||||
quote(pgsize) AS x FROM stat} {
|
||||
puts "INSERT INTO stats VALUES($x);"
|
||||
}
|
||||
puts "COMMIT;"
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
# In-memory database for collecting statistics. This script loops through
|
||||
# the tables and indices in the database being analyzed, adding a row for each
|
||||
# to an in-memory database (for which the schema is shown below). It then
|
||||
# queries the in-memory db to produce the space-analysis report.
|
||||
#
|
||||
sqlite3 mem :memory:
|
||||
if {$flags(-debug)} {
|
||||
proc dbtrace {txt} {puts $txt; flush stdout;}
|
||||
mem trace ::dbtrace
|
||||
}
|
||||
set tabledef {CREATE TABLE space_used(
|
||||
name clob, -- Name of a table or index in the database file
|
||||
tblname clob, -- Name of associated table
|
||||
is_index boolean, -- TRUE if it is an index, false for a table
|
||||
is_without_rowid boolean, -- TRUE if WITHOUT ROWID table
|
||||
nentry int, -- Number of entries in the BTree
|
||||
leaf_entries int, -- Number of leaf entries
|
||||
depth int, -- Depth of the b-tree
|
||||
payload int, -- Total amount of data stored in this table or index
|
||||
ovfl_payload int, -- Total amount of data stored on overflow pages
|
||||
ovfl_cnt int, -- Number of entries that use overflow
|
||||
mx_payload int, -- Maximum payload size
|
||||
int_pages int, -- Number of interior pages used
|
||||
leaf_pages int, -- Number of leaf pages used
|
||||
ovfl_pages int, -- Number of overflow pages used
|
||||
int_unused int, -- Number of unused bytes on interior pages
|
||||
leaf_unused int, -- Number of unused bytes on primary pages
|
||||
ovfl_unused int, -- Number of unused bytes on overflow pages
|
||||
gap_cnt int, -- Number of gaps in the page layout
|
||||
compressed_size int -- Total bytes stored on disk
|
||||
);}
|
||||
mem eval $tabledef
|
||||
|
||||
# Create a temporary "dbstat" virtual table.
|
||||
#
|
||||
db eval {CREATE VIRTUAL TABLE temp.stat USING dbstat}
|
||||
db eval {CREATE TEMP TABLE dbstat AS SELECT * FROM temp.stat
|
||||
ORDER BY name, path}
|
||||
db eval {DROP TABLE temp.stat}
|
||||
|
||||
set isCompressed 0
|
||||
set compressOverhead 0
|
||||
set depth 0
|
||||
set sql { SELECT name, tbl_name FROM sqlite_master WHERE rootpage>0 }
|
||||
foreach {name tblname} [concat sqlite_master sqlite_master [db eval $sql]] {
|
||||
|
||||
set is_index [expr {$name!=$tblname}]
|
||||
set is_without_rowid [is_without_rowid $name]
|
||||
db eval {
|
||||
SELECT
|
||||
sum(ncell) AS nentry,
|
||||
sum((pagetype=='leaf')*ncell) AS leaf_entries,
|
||||
sum(payload) AS payload,
|
||||
sum((pagetype=='overflow') * payload) AS ovfl_payload,
|
||||
sum(path LIKE '%+000000') AS ovfl_cnt,
|
||||
max(mx_payload) AS mx_payload,
|
||||
sum(pagetype=='internal') AS int_pages,
|
||||
sum(pagetype=='leaf') AS leaf_pages,
|
||||
sum(pagetype=='overflow') AS ovfl_pages,
|
||||
sum((pagetype=='internal') * unused) AS int_unused,
|
||||
sum((pagetype=='leaf') * unused) AS leaf_unused,
|
||||
sum((pagetype=='overflow') * unused) AS ovfl_unused,
|
||||
sum(pgsize) AS compressed_size,
|
||||
max((length(CASE WHEN path LIKE '%+%' THEN '' ELSE path END)+3)/4)
|
||||
AS depth
|
||||
FROM temp.dbstat WHERE name = $name
|
||||
} break
|
||||
|
||||
set total_pages [expr {$leaf_pages+$int_pages+$ovfl_pages}]
|
||||
set storage [expr {$total_pages*$pageSize}]
|
||||
if {!$isCompressed && $storage>$compressed_size} {
|
||||
set isCompressed 1
|
||||
set compressOverhead 14
|
||||
}
|
||||
|
||||
# Column 'gap_cnt' is set to the number of non-contiguous entries in the
|
||||
# list of pages visited if the b-tree structure is traversed in a top-down
|
||||
# fashion (each node visited before its child-tree is passed). Any overflow
|
||||
# chains present are traversed from start to finish before any child-tree
|
||||
# is.
|
||||
#
|
||||
set gap_cnt 0
|
||||
set prev 0
|
||||
db eval {
|
||||
SELECT pageno, pagetype FROM temp.dbstat
|
||||
WHERE name=$name
|
||||
ORDER BY pageno
|
||||
} {
|
||||
if {$prev>0 && $pagetype=="leaf" && $pageno!=$prev+1} {
|
||||
incr gap_cnt
|
||||
}
|
||||
set prev $pageno
|
||||
}
|
||||
mem eval {
|
||||
INSERT INTO space_used VALUES(
|
||||
$name,
|
||||
$tblname,
|
||||
$is_index,
|
||||
$is_without_rowid,
|
||||
$nentry,
|
||||
$leaf_entries,
|
||||
$depth,
|
||||
$payload,
|
||||
$ovfl_payload,
|
||||
$ovfl_cnt,
|
||||
$mx_payload,
|
||||
$int_pages,
|
||||
$leaf_pages,
|
||||
$ovfl_pages,
|
||||
$int_unused,
|
||||
$leaf_unused,
|
||||
$ovfl_unused,
|
||||
$gap_cnt,
|
||||
$compressed_size
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
proc integerify {real} {
|
||||
if {[string is double -strict $real]} {
|
||||
return [expr {wide($real)}]
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
mem function int integerify
|
||||
|
||||
# Quote a string for use in an SQL query. Examples:
|
||||
#
|
||||
# [quote {hello world}] == {'hello world'}
|
||||
# [quote {hello world's}] == {'hello world''s'}
|
||||
#
|
||||
proc quote {txt} {
|
||||
return [string map {' ''} $txt]
|
||||
}
|
||||
|
||||
# Output a title line
|
||||
#
|
||||
proc titleline {title} {
|
||||
if {$title==""} {
|
||||
puts [string repeat * 79]
|
||||
} else {
|
||||
set len [string length $title]
|
||||
set stars [string repeat * [expr 79-$len-5]]
|
||||
puts "*** $title $stars"
|
||||
}
|
||||
}
|
||||
|
||||
# Generate a single line of output in the statistics section of the
|
||||
# report.
|
||||
#
|
||||
proc statline {title value {extra {}}} {
|
||||
set len [string length $title]
|
||||
set dots [string repeat . [expr 50-$len]]
|
||||
set len [string length $value]
|
||||
set sp2 [string range { } $len end]
|
||||
if {$extra ne ""} {
|
||||
set extra " $extra"
|
||||
}
|
||||
puts "$title$dots $value$sp2$extra"
|
||||
}
|
||||
|
||||
# Generate a formatted percentage value for $num/$denom
|
||||
#
|
||||
proc percent {num denom {of {}}} {
|
||||
if {$denom==0.0} {return ""}
|
||||
set v [expr {$num*100.0/$denom}]
|
||||
set of {}
|
||||
if {$v==100.0 || $v<0.001 || ($v>1.0 && $v<99.0)} {
|
||||
return [format {%5.1f%% %s} $v $of]
|
||||
} elseif {$v<0.1 || $v>99.9} {
|
||||
return [format {%7.3f%% %s} $v $of]
|
||||
} else {
|
||||
return [format {%6.2f%% %s} $v $of]
|
||||
}
|
||||
}
|
||||
|
||||
proc divide {num denom} {
|
||||
if {$denom==0} {return 0.0}
|
||||
return [format %.2f [expr double($num)/double($denom)]]
|
||||
}
|
||||
|
||||
# Generate a subreport that covers some subset of the database.
|
||||
# the $where clause determines which subset to analyze.
|
||||
#
|
||||
proc subreport {title where showFrag} {
|
||||
global pageSize file_pgcnt compressOverhead
|
||||
|
||||
# Query the in-memory database for the sum of various statistics
|
||||
# for the subset of tables/indices identified by the WHERE clause in
|
||||
# $where. Note that even if the WHERE clause matches no rows, the
|
||||
# following query returns exactly one row (because it is an aggregate).
|
||||
#
|
||||
# The results of the query are stored directly by SQLite into local
|
||||
# variables (i.e. $nentry, $payload etc.).
|
||||
#
|
||||
mem eval "
|
||||
SELECT
|
||||
int(sum(
|
||||
CASE WHEN (is_without_rowid OR is_index) THEN nentry
|
||||
ELSE leaf_entries
|
||||
END
|
||||
)) AS nentry,
|
||||
int(sum(payload)) AS payload,
|
||||
int(sum(ovfl_payload)) AS ovfl_payload,
|
||||
max(mx_payload) AS mx_payload,
|
||||
int(sum(ovfl_cnt)) as ovfl_cnt,
|
||||
int(sum(leaf_pages)) AS leaf_pages,
|
||||
int(sum(int_pages)) AS int_pages,
|
||||
int(sum(ovfl_pages)) AS ovfl_pages,
|
||||
int(sum(leaf_unused)) AS leaf_unused,
|
||||
int(sum(int_unused)) AS int_unused,
|
||||
int(sum(ovfl_unused)) AS ovfl_unused,
|
||||
int(sum(gap_cnt)) AS gap_cnt,
|
||||
int(sum(compressed_size)) AS compressed_size,
|
||||
int(max(depth)) AS depth,
|
||||
count(*) AS cnt
|
||||
FROM space_used WHERE $where" {} {}
|
||||
|
||||
# Output the sub-report title, nicely decorated with * characters.
|
||||
#
|
||||
puts ""
|
||||
titleline $title
|
||||
puts ""
|
||||
|
||||
# Calculate statistics and store the results in TCL variables, as follows:
|
||||
#
|
||||
# total_pages: Database pages consumed.
|
||||
# total_pages_percent: Pages consumed as a percentage of the file.
|
||||
# storage: Bytes consumed.
|
||||
# payload_percent: Payload bytes used as a percentage of $storage.
|
||||
# total_unused: Unused bytes on pages.
|
||||
# avg_payload: Average payload per btree entry.
|
||||
# avg_fanout: Average fanout for internal pages.
|
||||
# avg_unused: Average unused bytes per btree entry.
|
||||
# avg_meta: Average metadata overhead per entry.
|
||||
# ovfl_cnt_percent: Percentage of btree entries that use overflow pages.
|
||||
#
|
||||
set total_pages [expr {$leaf_pages+$int_pages+$ovfl_pages}]
|
||||
set total_pages_percent [percent $total_pages $file_pgcnt]
|
||||
set storage [expr {$total_pages*$pageSize}]
|
||||
set payload_percent [percent $payload $storage {of storage consumed}]
|
||||
set total_unused [expr {$ovfl_unused+$int_unused+$leaf_unused}]
|
||||
set avg_payload [divide $payload $nentry]
|
||||
set avg_unused [divide $total_unused $nentry]
|
||||
set total_meta [expr {$storage - $payload - $total_unused}]
|
||||
set total_meta [expr {$total_meta + 4*($ovfl_pages - $ovfl_cnt)}]
|
||||
set meta_percent [percent $total_meta $storage {of metadata}]
|
||||
set avg_meta [divide $total_meta $nentry]
|
||||
if {$int_pages>0} {
|
||||
# TODO: Is this formula correct?
|
||||
set nTab [mem eval "
|
||||
SELECT count(*) FROM (
|
||||
SELECT DISTINCT tblname FROM space_used WHERE $where AND is_index=0
|
||||
)
|
||||
"]
|
||||
set avg_fanout [mem eval "
|
||||
SELECT (sum(leaf_pages+int_pages)-$nTab)/sum(int_pages) FROM space_used
|
||||
WHERE $where
|
||||
"]
|
||||
set avg_fanout [format %.2f $avg_fanout]
|
||||
}
|
||||
set ovfl_cnt_percent [percent $ovfl_cnt $nentry {of all entries}]
|
||||
|
||||
# Print out the sub-report statistics.
|
||||
#
|
||||
statline {Percentage of total database} $total_pages_percent
|
||||
statline {Number of entries} $nentry
|
||||
statline {Bytes of storage consumed} $storage
|
||||
if {$compressed_size!=$storage} {
|
||||
set compressed_size [expr {$compressed_size+$compressOverhead*$total_pages}]
|
||||
set pct [expr {$compressed_size*100.0/$storage}]
|
||||
set pct [format {%5.1f%%} $pct]
|
||||
statline {Bytes used after compression} $compressed_size $pct
|
||||
}
|
||||
statline {Bytes of payload} $payload $payload_percent
|
||||
statline {Bytes of metadata} $total_meta $meta_percent
|
||||
if {$cnt==1} {statline {B-tree depth} $depth}
|
||||
statline {Average payload per entry} $avg_payload
|
||||
statline {Average unused bytes per entry} $avg_unused
|
||||
statline {Average metadata per entry} $avg_meta
|
||||
if {[info exists avg_fanout]} {
|
||||
statline {Average fanout} $avg_fanout
|
||||
}
|
||||
if {$showFrag && $total_pages>1} {
|
||||
set fragmentation [percent $gap_cnt [expr {$total_pages-1}]]
|
||||
statline {Non-sequential pages} $gap_cnt $fragmentation
|
||||
}
|
||||
statline {Maximum payload per entry} $mx_payload
|
||||
statline {Entries that use overflow} $ovfl_cnt $ovfl_cnt_percent
|
||||
if {$int_pages>0} {
|
||||
statline {Index pages used} $int_pages
|
||||
}
|
||||
statline {Primary pages used} $leaf_pages
|
||||
statline {Overflow pages used} $ovfl_pages
|
||||
statline {Total pages used} $total_pages
|
||||
if {$int_unused>0} {
|
||||
set int_unused_percent [
|
||||
percent $int_unused [expr {$int_pages*$pageSize}] {of index space}]
|
||||
statline "Unused bytes on index pages" $int_unused $int_unused_percent
|
||||
}
|
||||
statline "Unused bytes on primary pages" $leaf_unused [
|
||||
percent $leaf_unused [expr {$leaf_pages*$pageSize}] {of primary space}]
|
||||
statline "Unused bytes on overflow pages" $ovfl_unused [
|
||||
percent $ovfl_unused [expr {$ovfl_pages*$pageSize}] {of overflow space}]
|
||||
statline "Unused bytes on all pages" $total_unused [
|
||||
percent $total_unused $storage {of all space}]
|
||||
return 1
|
||||
}
|
||||
|
||||
# Calculate the overhead in pages caused by auto-vacuum.
|
||||
#
|
||||
# This procedure calculates and returns the number of pages used by the
|
||||
# auto-vacuum 'pointer-map'. If the database does not support auto-vacuum,
|
||||
# then 0 is returned. The two arguments are the size of the database file in
|
||||
# pages and the page size used by the database (in bytes).
|
||||
proc autovacuum_overhead {filePages pageSize} {
|
||||
|
||||
# Set $autovacuum to non-zero for databases that support auto-vacuum.
|
||||
set autovacuum [db one {PRAGMA auto_vacuum}]
|
||||
|
||||
# If the database is not an auto-vacuum database or the file consists
|
||||
# of one page only then there is no overhead for auto-vacuum. Return zero.
|
||||
if {0==$autovacuum || $filePages==1} {
|
||||
return 0
|
||||
}
|
||||
|
||||
# The number of entries on each pointer map page. The layout of the
|
||||
# database file is one pointer-map page, followed by $ptrsPerPage other
|
||||
# pages, followed by a pointer-map page etc. The first pointer-map page
|
||||
# is the second page of the file overall.
|
||||
set ptrsPerPage [expr double($pageSize/5)]
|
||||
|
||||
# Return the number of pointer map pages in the database.
|
||||
return [expr wide(ceil( ($filePages-1.0)/($ptrsPerPage+1.0) ))]
|
||||
}
|
||||
|
||||
|
||||
# Calculate the summary statistics for the database and store the results
|
||||
# in TCL variables. They are output below. Variables are as follows:
|
||||
#
|
||||
# pageSize: Size of each page in bytes.
|
||||
# file_bytes: File size in bytes.
|
||||
# file_pgcnt: Number of pages in the file.
|
||||
# file_pgcnt2: Number of pages in the file (calculated).
|
||||
# av_pgcnt: Pages consumed by the auto-vacuum pointer-map.
|
||||
# av_percent: Percentage of the file consumed by auto-vacuum pointer-map.
|
||||
# inuse_pgcnt: Data pages in the file.
|
||||
# inuse_percent: Percentage of pages used to store data.
|
||||
# free_pgcnt: Free pages calculated as (<total pages> - <in-use pages>)
|
||||
# free_pgcnt2: Free pages in the file according to the file header.
|
||||
# free_percent: Percentage of file consumed by free pages (calculated).
|
||||
# free_percent2: Percentage of file consumed by free pages (header).
|
||||
# ntable: Number of tables in the db.
|
||||
# nindex: Number of indices in the db.
|
||||
# nautoindex: Number of indices created automatically.
|
||||
# nmanindex: Number of indices created manually.
|
||||
# user_payload: Number of bytes of payload in table btrees
|
||||
# (not including sqlite_master)
|
||||
# user_percent: $user_payload as a percentage of total file size.
|
||||
|
||||
### The following, setting $file_bytes based on the actual size of the file
|
||||
### on disk, causes this tool to choke on zipvfs databases. So set it based
|
||||
### on the return of [PRAGMA page_count] instead.
|
||||
if 0 {
|
||||
set file_bytes [file size $file_to_analyze]
|
||||
set file_pgcnt [expr {$file_bytes/$pageSize}]
|
||||
}
|
||||
set file_pgcnt [db one {PRAGMA page_count}]
|
||||
set file_bytes [expr {$file_pgcnt * $pageSize}]
|
||||
|
||||
set av_pgcnt [autovacuum_overhead $file_pgcnt $pageSize]
|
||||
set av_percent [percent $av_pgcnt $file_pgcnt]
|
||||
|
||||
set sql {SELECT sum(leaf_pages+int_pages+ovfl_pages) FROM space_used}
|
||||
set inuse_pgcnt [expr wide([mem eval $sql])]
|
||||
set inuse_percent [percent $inuse_pgcnt $file_pgcnt]
|
||||
|
||||
set free_pgcnt [expr {$file_pgcnt-$inuse_pgcnt-$av_pgcnt}]
|
||||
set free_percent [percent $free_pgcnt $file_pgcnt]
|
||||
set free_pgcnt2 [db one {PRAGMA freelist_count}]
|
||||
set free_percent2 [percent $free_pgcnt2 $file_pgcnt]
|
||||
|
||||
set file_pgcnt2 [expr {$inuse_pgcnt+$free_pgcnt2+$av_pgcnt}]
|
||||
|
||||
set ntable [db eval {SELECT count(*)+1 FROM sqlite_master WHERE type='table'}]
|
||||
set nindex [db eval {SELECT count(*) FROM sqlite_master WHERE type='index'}]
|
||||
set sql {SELECT count(*) FROM sqlite_master WHERE name LIKE 'sqlite_autoindex%'}
|
||||
set nautoindex [db eval $sql]
|
||||
set nmanindex [expr {$nindex-$nautoindex}]
|
||||
|
||||
# set total_payload [mem eval "SELECT sum(payload) FROM space_used"]
|
||||
set user_payload [mem one {SELECT int(sum(payload)) FROM space_used
|
||||
WHERE NOT is_index AND name NOT LIKE 'sqlite_master'}]
|
||||
set user_percent [percent $user_payload $file_bytes]
|
||||
|
||||
# Output the summary statistics calculated above.
|
||||
#
|
||||
puts "/** Disk-Space Utilization Report For $root_filename"
|
||||
puts ""
|
||||
statline {Page size in bytes} $pageSize
|
||||
statline {Pages in the whole file (measured)} $file_pgcnt
|
||||
statline {Pages in the whole file (calculated)} $file_pgcnt2
|
||||
statline {Pages that store data} $inuse_pgcnt $inuse_percent
|
||||
statline {Pages on the freelist (per header)} $free_pgcnt2 $free_percent2
|
||||
statline {Pages on the freelist (calculated)} $free_pgcnt $free_percent
|
||||
statline {Pages of auto-vacuum overhead} $av_pgcnt $av_percent
|
||||
statline {Number of tables in the database} $ntable
|
||||
statline {Number of indices} $nindex
|
||||
statline {Number of defined indices} $nmanindex
|
||||
statline {Number of implied indices} $nautoindex
|
||||
if {$isCompressed} {
|
||||
statline {Size of uncompressed content in bytes} $file_bytes
|
||||
set efficiency [percent $true_file_size $file_bytes]
|
||||
statline {Size of compressed file on disk} $true_file_size $efficiency
|
||||
} else {
|
||||
statline {Size of the file in bytes} $file_bytes
|
||||
}
|
||||
statline {Bytes of user payload stored} $user_payload $user_percent
|
||||
|
||||
# Output table rankings
|
||||
#
|
||||
puts ""
|
||||
titleline "Page counts for all tables with their indices"
|
||||
puts ""
|
||||
mem eval {SELECT tblname, count(*) AS cnt,
|
||||
int(sum(int_pages+leaf_pages+ovfl_pages)) AS size
|
||||
FROM space_used GROUP BY tblname ORDER BY size+0 DESC, tblname} {} {
|
||||
statline [string toupper $tblname] $size [percent $size $file_pgcnt]
|
||||
}
|
||||
puts ""
|
||||
titleline "Page counts for all tables and indices separately"
|
||||
puts ""
|
||||
mem eval {
|
||||
SELECT
|
||||
upper(name) AS nm,
|
||||
int(int_pages+leaf_pages+ovfl_pages) AS size
|
||||
FROM space_used
|
||||
ORDER BY size+0 DESC, name} {} {
|
||||
statline $nm $size [percent $size $file_pgcnt]
|
||||
}
|
||||
if {$isCompressed} {
|
||||
puts ""
|
||||
titleline "Bytes of disk space used after compression"
|
||||
puts ""
|
||||
set csum 0
|
||||
mem eval {SELECT tblname,
|
||||
int(sum(compressed_size)) +
|
||||
$compressOverhead*sum(int_pages+leaf_pages+ovfl_pages)
|
||||
AS csize
|
||||
FROM space_used GROUP BY tblname ORDER BY csize+0 DESC, tblname} {} {
|
||||
incr csum $csize
|
||||
statline [string toupper $tblname] $csize [percent $csize $true_file_size]
|
||||
}
|
||||
set overhead [expr {$true_file_size - $csum}]
|
||||
if {$overhead>0} {
|
||||
statline {Header and free space} $overhead [percent $overhead $true_file_size]
|
||||
}
|
||||
}
|
||||
|
||||
# Output subreports
|
||||
#
|
||||
if {$nindex>0} {
|
||||
subreport {All tables and indices} 1 0
|
||||
}
|
||||
subreport {All tables} {NOT is_index} 0
|
||||
if {$nindex>0} {
|
||||
subreport {All indices} {is_index} 0
|
||||
}
|
||||
foreach tbl [mem eval {SELECT DISTINCT tblname name FROM space_used
|
||||
ORDER BY name}] {
|
||||
set qn [quote $tbl]
|
||||
set name [string toupper $tbl]
|
||||
set n [mem eval {SELECT count(*) FROM space_used WHERE tblname=$tbl}]
|
||||
if {$n>1} {
|
||||
set idxlist [mem eval "SELECT name FROM space_used
|
||||
WHERE tblname='$qn' AND is_index
|
||||
ORDER BY 1"]
|
||||
subreport "Table $name and all its indices" "tblname='$qn'" 0
|
||||
subreport "Table $name w/o any indices" "name='$qn'" 1
|
||||
if {[llength $idxlist]>1} {
|
||||
subreport "Indices of table $name" "tblname='$qn' AND is_index" 0
|
||||
}
|
||||
foreach idx $idxlist {
|
||||
set qidx [quote $idx]
|
||||
subreport "Index [string toupper $idx] of table $name" "name='$qidx'" 1
|
||||
}
|
||||
} else {
|
||||
subreport "Table $name" "name='$qn'" 1
|
||||
}
|
||||
}
|
||||
|
||||
# Output instructions on what the numbers above mean.
|
||||
#
|
||||
puts ""
|
||||
titleline Definitions
|
||||
puts {
|
||||
Page size in bytes
|
||||
|
||||
The number of bytes in a single page of the database file.
|
||||
Usually 1024.
|
||||
|
||||
Number of pages in the whole file
|
||||
}
|
||||
puts " The number of $pageSize-byte pages that go into forming the complete
|
||||
database"
|
||||
puts {
|
||||
Pages that store data
|
||||
|
||||
The number of pages that store data, either as primary B*Tree pages or
|
||||
as overflow pages. The number at the right is the data pages divided by
|
||||
the total number of pages in the file.
|
||||
|
||||
Pages on the freelist
|
||||
|
||||
The number of pages that are not currently in use but are reserved for
|
||||
future use. The percentage at the right is the number of freelist pages
|
||||
divided by the total number of pages in the file.
|
||||
|
||||
Pages of auto-vacuum overhead
|
||||
|
||||
The number of pages that store data used by the database to facilitate
|
||||
auto-vacuum. This is zero for databases that do not support auto-vacuum.
|
||||
|
||||
Number of tables in the database
|
||||
|
||||
The number of tables in the database, including the SQLITE_MASTER table
|
||||
used to store schema information.
|
||||
|
||||
Number of indices
|
||||
|
||||
The total number of indices in the database.
|
||||
|
||||
Number of defined indices
|
||||
|
||||
The number of indices created using an explicit CREATE INDEX statement.
|
||||
|
||||
Number of implied indices
|
||||
|
||||
The number of indices used to implement PRIMARY KEY or UNIQUE constraints
|
||||
on tables.
|
||||
|
||||
Size of the file in bytes
|
||||
|
||||
The total amount of disk space used by the entire database files.
|
||||
|
||||
Bytes of user payload stored
|
||||
|
||||
The total number of bytes of user payload stored in the database. The
|
||||
schema information in the SQLITE_MASTER table is not counted when
|
||||
computing this number. The percentage at the right shows the payload
|
||||
divided by the total file size.
|
||||
|
||||
Percentage of total database
|
||||
|
||||
The amount of the complete database file that is devoted to storing
|
||||
information described by this category.
|
||||
|
||||
Number of entries
|
||||
|
||||
The total number of B-Tree key/value pairs stored under this category.
|
||||
|
||||
Bytes of storage consumed
|
||||
|
||||
The total amount of disk space required to store all B-Tree entries
|
||||
under this category. The is the total number of pages used times
|
||||
the pages size.
|
||||
|
||||
Bytes of payload
|
||||
|
||||
The amount of payload stored under this category. Payload is the data
|
||||
part of table entries and the key part of index entries. The percentage
|
||||
at the right is the bytes of payload divided by the bytes of storage
|
||||
consumed.
|
||||
|
||||
Bytes of metadata
|
||||
|
||||
The amount of formatting and structural information stored in the
|
||||
table or index. Metadata includes the btree page header, the cell pointer
|
||||
array, the size field for each cell, the left child pointer or non-leaf
|
||||
cells, the overflow pointers for overflow cells, and the rowid value for
|
||||
rowid table cells. In other words, metadata is everything that is neither
|
||||
unused space nor content. The record header in the payload is counted as
|
||||
content, not metadata.
|
||||
|
||||
Average payload per entry
|
||||
|
||||
The average amount of payload on each entry. This is just the bytes of
|
||||
payload divided by the number of entries.
|
||||
|
||||
Average unused bytes per entry
|
||||
|
||||
The average amount of free space remaining on all pages under this
|
||||
category on a per-entry basis. This is the number of unused bytes on
|
||||
all pages divided by the number of entries.
|
||||
|
||||
Non-sequential pages
|
||||
|
||||
The number of pages in the table or index that are out of sequence.
|
||||
Many filesystems are optimized for sequential file access so a small
|
||||
number of non-sequential pages might result in faster queries,
|
||||
especially for larger database files that do not fit in the disk cache.
|
||||
Note that after running VACUUM, the root page of each table or index is
|
||||
at the beginning of the database file and all other pages are in a
|
||||
separate part of the database file, resulting in a single non-
|
||||
sequential page.
|
||||
|
||||
Maximum payload per entry
|
||||
|
||||
The largest payload size of any entry.
|
||||
|
||||
Entries that use overflow
|
||||
|
||||
The number of entries that user one or more overflow pages.
|
||||
|
||||
Total pages used
|
||||
|
||||
This is the number of pages used to hold all information in the current
|
||||
category. This is the sum of index, primary, and overflow pages.
|
||||
|
||||
Index pages used
|
||||
|
||||
This is the number of pages in a table B-tree that hold only key (rowid)
|
||||
information and no data.
|
||||
|
||||
Primary pages used
|
||||
|
||||
This is the number of B-tree pages that hold both key and data.
|
||||
|
||||
Overflow pages used
|
||||
|
||||
The total number of overflow pages used for this category.
|
||||
|
||||
Unused bytes on index pages
|
||||
|
||||
The total number of bytes of unused space on all index pages. The
|
||||
percentage at the right is the number of unused bytes divided by the
|
||||
total number of bytes on index pages.
|
||||
|
||||
Unused bytes on primary pages
|
||||
|
||||
The total number of bytes of unused space on all primary pages. The
|
||||
percentage at the right is the number of unused bytes divided by the
|
||||
total number of bytes on primary pages.
|
||||
|
||||
Unused bytes on overflow pages
|
||||
|
||||
The total number of bytes of unused space on all overflow pages. The
|
||||
percentage at the right is the number of unused bytes divided by the
|
||||
total number of bytes on overflow pages.
|
||||
|
||||
Unused bytes on all pages
|
||||
|
||||
The total number of bytes of unused space on all primary and overflow
|
||||
pages. The percentage at the right is the number of unused bytes
|
||||
divided by the total number of bytes.
|
||||
}
|
||||
|
||||
# Output a dump of the in-memory database. This can be used for more
|
||||
# complex offline analysis.
|
||||
#
|
||||
titleline {}
|
||||
puts "The entire text of this report can be sourced into any SQL database"
|
||||
puts "engine for further analysis. All of the text above is an SQL comment."
|
||||
puts "The data used to generate this report follows:"
|
||||
puts "*/"
|
||||
puts "BEGIN;"
|
||||
puts $tabledef
|
||||
unset -nocomplain x
|
||||
mem eval {SELECT * FROM space_used} x {
|
||||
puts -nonewline "INSERT INTO space_used VALUES"
|
||||
set sep (
|
||||
foreach col $x(*) {
|
||||
set v $x($col)
|
||||
if {$v=="" || ![string is double $v]} {set v '[quote $v]'}
|
||||
puts -nonewline $sep$v
|
||||
set sep ,
|
||||
}
|
||||
puts ");"
|
||||
}
|
||||
puts "COMMIT;"
|
||||
|
||||
} err]} {
|
||||
puts "ERROR: $err"
|
||||
puts $errorInfo
|
||||
exit 1
|
||||
}
|
BIN
Git/mingw64/bin/srptool.exe
Normal file
BIN
Git/mingw64/bin/srptool.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/ssleay32.dll
Normal file
BIN
Git/mingw64/bin/ssleay32.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/tcl86.dll
Normal file
BIN
Git/mingw64/bin/tcl86.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/tclsh.exe
Normal file
BIN
Git/mingw64/bin/tclsh.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/tclsh86.exe
Normal file
BIN
Git/mingw64/bin/tclsh86.exe
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/tk86.dll
Normal file
BIN
Git/mingw64/bin/tk86.dll
Normal file
Binary file not shown.
BIN
Git/mingw64/bin/unxz.exe
Normal file
BIN
Git/mingw64/bin/unxz.exe
Normal file
Binary file not shown.
18
Git/mingw64/bin/update-ca-trust
Normal file
18
Git/mingw64/bin/update-ca-trust
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
#set -vx
|
||||
|
||||
# At this time, while this script is trivial, we ignore any parameters given.
|
||||
# However, for backwards compatibility reasons, future versions of this script must
|
||||
# support the syntax "update-ca-trust extract" trigger the generation of output
|
||||
# files in $DEST.
|
||||
|
||||
DEST=/mingw64/etc/pki/ca-trust/extracted
|
||||
|
||||
# OpenSSL PEM bundle that includes trust flags
|
||||
# (BEGIN TRUSTED CERTIFICATE)
|
||||
/mingw64/bin/p11-kit extract --format=openssl-bundle --filter=certificates --overwrite --comment $DEST/openssl/ca-bundle.trust.crt
|
||||
/mingw64/bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --comment --purpose server-auth $DEST/pem/tls-ca-bundle.pem
|
||||
/mingw64/bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --comment --purpose email $DEST/pem/email-ca-bundle.pem
|
||||
/mingw64/bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --comment --purpose code-signing $DEST/pem/objsign-ca-bundle.pem
|
||||
/mingw64/bin/p11-kit extract --format=java-cacerts --filter=ca-anchors --overwrite --purpose server-auth $DEST/java/cacerts
|
BIN
Git/mingw64/bin/wintoast.exe
Normal file
BIN
Git/mingw64/bin/wintoast.exe
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user