diff options
582 files changed, 0 insertions, 64070 deletions
diff --git a/0ad-svn/0ad.sh b/0ad-svn/0ad.sh deleted file mode 100644 index 539c48b..0000000 --- a/0ad-svn/0ad.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd /opt/0ad/system -LD_LIBRARY_PATH=/opt/0ad/system/spidermonkey/ ./pyrogenesis_dbg $* diff --git a/0ad-svn/PKGBUILD b/0ad-svn/PKGBUILD deleted file mode 100644 index 1596105..0000000 --- a/0ad-svn/PKGBUILD +++ /dev/null @@ -1,103 +0,0 @@ -# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org> -# Contributor: Jakob "flocke" Nixdorf <flocke@user-helfen-usern.de> - -pkgname=0ad-svn -pkgver=7146 -pkgrel=1 -pkgdesc="Cross-platform, 3D and historically-based real-time strategy game" -arch=('i686' 'x86_64') -url="http://wildfiregames.com/0ad" -license=('GPL2' 'CCPL') -depends=('binutils' 'boost' 'crypto++' 'devil' 'enet' 'gamin' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'mesa' 'nspr' 'nasm' 'openal' 'sdl' 'valgrind' 'wxgtk' 'zlib') -makedepends=('gcc' 'subversion') -source=(http://ftp.mozilla.org/pub/mozilla.org/js/js-1.60.tar.gz \ - 0ad.sh) - -md5sums=('bd8f021e43a8fbbec55ac2cd3d483243' - 'e44fcdb23628a6a2b6232a8171c38d13') - -_svntrunk="http://svn.wildfiregames.com/public/ps/trunk" -_svnmod="trunk" - -build() { - msg "Building SpiderMonkey 1.6..." - cd ${srcdir}/js/src - [ "$CARCH" = "x86_64" ] && sed -i -e "s:lib64:lib:g" config.mk - JS_THREADSAFE=1 INCLUDES=-I/usr/include/nspr OTHER_LIBS=-L/usr/lib make -j1 -f Makefile.ref || return 1 - make -j1 -f Makefile.ref export || return 1 - cd ../../dist/Linux_All_DBG.OBJ - - if [ -d ${srcdir}/spidermonkey ]; then - rm -rf ${srcdir}/spidermonkey - fi - - install -d ${srcdir}/spidermonkey/lib || return 1 - cp lib/* ${srcdir}/spidermonkey/lib || return 1 - - install -d ${srcdir}/spidermonkey/include/js || return 1 - cp include/* ${srcdir}/spidermonkey/include/js || return 1 - - msg "Starting SVN checkout..." - cd ${srcdir} - if [ -d $_svnmod/.svn ]; then - (cd $_svnmod && svn up -r $pkgver) - else - svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod - fi - msg "SVN checkout done or server timeout" - - msg "Starting make..." - if [ -d ${srcdir}/$_svnmod-build ]; then - rm -r $_svnmod-build - fi - cp -r $_svnmod $_svnmod-build - cd $_svnmod-build - - msg "Building FCollada..." - cd ${srcdir}/$_svnmod-build/libraries/fcollada/src || return 1 - make || return 1 - - msg "Building Premake..." - cd ${srcdir}/$_svnmod-build/build/premake/src || return 1 - make || return 1 - cp bin/premake .. || return 1 - - msg "Updating Workspaces..." - cd ${srcdir}/$_svnmod-build/build/workspaces - ./update-workspaces.sh || return 1 - - msg "Building 0 AD..." - cd ${srcdir}/$_svnmod-build/build/workspaces/gcc || return 1 - LDFLAGS="-L${srcdir}/spidermonkey/lib -ljs" CFLAGS="-I${srcdir}/spidermonkey/include" make || return 1 - - msg "Installing binaries..." - install -d ${pkgdir}/opt/0ad || return 1 - cp -r ${srcdir}/$_svnmod-build/binaries/* ${pkgdir}/opt/0ad || return 1 - install -d ${pkgdir}/opt/0ad/system/spidermonkey || return 1 - cp -r ${srcdir}/spidermonkey/lib/* ${pkgdir}/opt/0ad/system/spidermonkey/ || return 1 - - msg "Removing SVN stuff..." - cd ${pkgdir}/opt/0ad || return 1 - find -name ".svn" -type d -print0 | xargs -0 rm -rf || return 1 - - msg "Removing sucky windows stuff..." - cd ${pkgdir}/opt/0ad/system || return 1 - rm *.exe - rm *.dll - rm *.bat - rm Microsoft.VC* - rm *.sys - rm *.pdb - rm -rf ape - rm -rf textureconv - rm ../data/createzip.bat - - msg "Fixing file permissions..." - cd ${pkgdir}/opt/0ad/data || return 1 - chown -R root:games ${pkgdir}/opt/0ad || return 1 - chmod -R 664 ${pkgdir}/opt/0ad/data/cache || return 1 - chmod -R 664 ${pkgdir}/opt/0ad/logs || return 1 - - msg "Installing run script..." - install -D -m755 ${srcdir}/0ad.sh ${pkgdir}/usr/bin/0ad || return 1 -} diff --git a/0ad/0ad-editor.desktop b/0ad/0ad-editor.desktop deleted file mode 100644 index cded424..0000000 --- a/0ad/0ad-editor.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Categories=Application;Game; -Name=0 A.D. Editor -Name[es]=Editor de 0 A.D. -Name[gl]=Editor do 0 A.D. -Icon=0ad -Exec=0ad-editor -Terminal=false -Type=Application diff --git a/0ad/0ad-editor.sh b/0ad/0ad-editor.sh deleted file mode 100644 index 3568b28..0000000 --- a/0ad/0ad-editor.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd /opt/0ad/system -./pyrogenesis -editor diff --git a/0ad/0ad.desktop b/0ad/0ad.desktop deleted file mode 100644 index 0f527f3..0000000 --- a/0ad/0ad.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Categories=Application;Game; -Name=0 A.D. -Icon=0ad -Exec=0ad -Terminal=false -Type=Application diff --git a/0ad/0ad.install b/0ad/0ad.install deleted file mode 100644 index bdc8043..0000000 --- a/0ad/0ad.install +++ /dev/null @@ -1,21 +0,0 @@ -# arg 1: the new package version -post_install() { -cat << EOF -Note: -==> In order to play the game, execute it as follows: -==> 0ad -==> You can also run the game editor with this command: -==> 0ad-editor -==> Have fun! -EOF -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - post_install $1 -} - -op=$1 -shift -$op $*
\ No newline at end of file diff --git a/0ad/0ad.png b/0ad/0ad.png Binary files differdeleted file mode 100644 index 5708568..0000000 --- a/0ad/0ad.png +++ /dev/null diff --git a/0ad/0ad.sh b/0ad/0ad.sh deleted file mode 100644 index 56ff4d8..0000000 --- a/0ad/0ad.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd /opt/0ad/system -./pyrogenesis $* diff --git a/0ad/PKGBUILD b/0ad/PKGBUILD deleted file mode 100644 index e2fca24..0000000 --- a/0ad/PKGBUILD +++ /dev/null @@ -1,65 +0,0 @@ -# Maintainer: t3ddy <t3ddy1988 "at" gmail {dot} com> -# Contributor: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com> - -pkgname=0ad -pkgver=alpha_3 -_pkgver=r08832-alpha -pkgrel=1 -pkgdesc="Cross-platform, 3D and historically-based real-time strategy game" -arch=('i686' 'x86_64') -url="http://wildfiregames.com/0ad" -license=('GPL2' 'CCPL') -depends=('binutils' 'boost' 'crypto++' 'devil' 'enet-old' 'fam' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'mesa' 'nasm' 'openal' 'python' 'sdl' 'wxgtk' 'zip' 'zlib') -makedepends=('cmake') -conflicts=('0ad-svn' '0ad-ppa-wfg') -provides=('0ad') -source=("http://releases.wildfiregames.com/$pkgname-$_pkgver-unix-build.tar.xz" - "http://releases.wildfiregames.com/$pkgname-$_pkgver-unix-data.tar.xz" - "${pkgname}.install" - "${pkgname}.sh" - "${pkgname}-editor.sh" - "${pkgname}.desktop" - "${pkgname}-editor.desktop" - "${pkgname}.png") -md5sums=('b9df52751596633d9aab4cc3b253cb82' - '38abc29fc714946ed17ac86ac67fb614' - '92575ff82bd29369b7b0ee0ce307b39e' - '0a8abdb0fc32af6d48ea235c46be5b7c' - '1a54a2b4ab72424d14ffc42a01925ff3' - 'e56b164613ab929fbce76c83b766c6e9' - '51f83e2fd2f22764dbf775689aa155a4' - '51559438e79c0eb8576b98213a5d92d1') - -build(){ - cd "${srcdir}/${pkgname}-${_pkgver}/build/workspaces" - ./update-workspaces.sh - - cd ${srcdir}/${pkgname}-${_pkgver}/build/workspaces/gcc - - # Official recomendations about -j parameter. - if [[ $CARCH = 'x86_64' ]] - then - CONFIG=Release make -j3 - else - CONFIG=Release make -j2 - fi -} - -package(){ - install -d ${pkgdir}/opt/0ad - cp -r ${srcdir}/${pkgname}-${_pkgver}/binaries/* ${pkgdir}/opt/0ad - - # Removing useless stuff. - # This might change between releases: - rm -r ${pkgdir}/opt/0ad/system/*r - rm -r ${pkgdir}/opt/0ad/system/*.a - rm -r ${pkgdir}/opt/0ad/system/*t - rm -r ${pkgdir}/opt/0ad/system/*debug.so - - install -D -m755 ${srcdir}/${pkgname}.sh ${pkgdir}/usr/bin/${pkgname} - install -D -m755 ${srcdir}/${pkgname}-editor.sh ${pkgdir}/usr/bin/${pkgname}-editor - - install -D -m 0644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" - install -D -m 0644 "${srcdir}/${pkgname}-editor.desktop" "${pkgdir}/usr/share/applications/${pkgname}-editor.desktop" - install -D -m 0644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png" -}
\ No newline at end of file diff --git a/aacplusenc/PKGBUILD b/aacplusenc/PKGBUILD deleted file mode 100644 index 775541d..0000000 --- a/aacplusenc/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com> -pkgname=aacplusenc -pkgver=0.17.4 -pkgrel=1 -pkgdesc="An AAC+ encoder which outputs raw AAC" -arch=('i686' 'x86_64') -url="https://launchpad.net/~teknoraver/+archive/ppa" -license=('custom') -depends=('fftw') -source=(https://launchpad.net/~teknoraver/+archive/ppa/+files/aacplusenc_$pkgver.tar.gz) -md5sums=('234141f29add7ddf380ff6e49ec73b43') - -build() { - cd "$srcdir"/$pkgname-$pkgver - make || return 1 - make INSTDIR="$pkgdir"/usr install - - install -D -m644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT -} diff --git a/acct/PKGBUILD b/acct/PKGBUILD deleted file mode 100644 index b372d1b..0000000 --- a/acct/PKGBUILD +++ /dev/null @@ -1,36 +0,0 @@ -# Maintainer: SpepS <dreamspepser at yahoo dot it> -# Contributor: damir <damir@archlinux.org> -# Contributor: phrakture - -pkgname=acct -pkgver=6.5.5 -pkgrel=1 -pkgdesc="The GNU Accounting Utilities provide login and process accounting utilities for GNU/Linux and other systems." -arch=('i686' 'x86_64') -url="http://www.gnu.org/software/acct/" -license=('GPL') -depends=('glibc') -install="$pkgname.install" -source=("http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz") -md5sums=('554a9e9c6aa3482df07e80853eac0350') - -build() { - cd "$srcdir/$pkgname-$pkgver" - - ./configure --prefix=/usr - - make -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - - make DESTDIR="$pkgdir/" install - - rm $pkgdir/usr/share/info/dir - gzip $pkgdir/usr/share/info/* - - # Renaming last - mv "$pkgdir/usr/bin/last" "$pkgdir/usr/bin/last-acct" - mv "$pkgdir/usr/share/man/man1/last.1" "$pkgdir/usr/share/man/man1/last-acct.1" -} diff --git a/acct/acct.install b/acct/acct.install deleted file mode 100644 index 7007f0f..0000000 --- a/acct/acct.install +++ /dev/null @@ -1,20 +0,0 @@ -infodir=/usr/share/info -filelist=(accounting.info.gz) - -post_install() { - [ -x usr/bin/install-info ] || return 0 - for file in ${filelist[@]}; do - install-info $infodir/$file $infodir/dir 2> /dev/null - done -} - -post_upgrade() { - post_install $1 -} - -pre_remove() { - [ -x usr/bin/install-info ] || return 0 - for file in ${filelist[@]}; do - install-info --delete $infodir/$file $infodir/dir 2> /dev/null - done -} diff --git a/ack/PKGBUILD b/ack/PKGBUILD deleted file mode 100644 index 4472bae..0000000 --- a/ack/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Maintainer: TDY <tdy@gmx.com> -# Contributor: Michael S. Walker <barrucadu@localhost> - -pkgname=ack -pkgver=1.92 -pkgrel=1 -pkgdesc="A Perl-based grep replacement, aimed at programmers with large trees of heterogeneous source code" -arch=('any') -url="http://betterthangrep.com/" -license=('GPL' 'PerlArtistic') -depends=('perl-file-next') -options=('!emptydirs') -source=(http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/$pkgname-$pkgver.tar.gz) -md5sums=('c25b5a16d0a27386a75c91d531b86cea') - -build() { - cd "$srcdir/$pkgname-$pkgver" - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 - make || return 1 -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir" install -} diff --git a/ack/ack b/ack/ack deleted file mode 100644 index 614ae75..0000000 --- a/ack/ack +++ /dev/null @@ -1,2572 +0,0 @@ -#!/usr/bin/env perl -# -# This file, ack, is generated code. -# Please DO NOT EDIT or send patches for it. -# -# Please take a look at the source from -# http://code.google.com/p/ack/source -# and submit patches against the individual files -# that build ack. -# - -use warnings; -use strict; - -our $VERSION = '1.90'; -# Check http://betterthangrep.com/ for updates - -# These are all our globals. - - -MAIN: { - if ( $App::Ack::VERSION ne $main::VERSION ) { - App::Ack::die( "Program/library version mismatch\n\t$0 is $main::VERSION\n\t$INC{'App/Ack.pm'} is $App::Ack::VERSION" ); - } - - # Do preliminary arg checking; - my $env_is_usable = 1; - for ( @ARGV ) { - last if ( $_ eq '--' ); - - # Priorities! Get the --thpppt checking out of the way. - /^--th[pt]+t+$/ && App::Ack::_thpppt($_); - - # See if we want to ignore the environment. (Don't tell Al Gore.) - if ( $_ eq '--noenv' ) { - my @keys = ( 'ACKRC', grep { /^ACK_/ } keys %ENV ); - delete @ENV{@keys}; - $env_is_usable = 0; - } - } - unshift( @ARGV, App::Ack::read_ackrc() ) if $env_is_usable; - App::Ack::load_colors(); - - if ( exists $ENV{ACK_SWITCHES} ) { - App::Ack::warn( 'ACK_SWITCHES is no longer supported. Use ACK_OPTIONS.' ); - } - - if ( !@ARGV ) { - App::Ack::show_help(); - exit 1; - } - - main(); -} - -sub main { - my $opt = App::Ack::get_command_line_options(); - - $| = 1 if $opt->{flush}; # Unbuffer the output if flush mode - - if ( App::Ack::input_from_pipe() ) { - # We're going into filter mode - for ( qw( f g l ) ) { - $opt->{$_} and App::Ack::die( "Can't use -$_ when acting as a filter." ); - } - $opt->{show_filename} = 0; - $opt->{regex} = App::Ack::build_regex( defined $opt->{regex} ? $opt->{regex} : shift @ARGV, $opt ); - if ( my $nargs = @ARGV ) { - my $s = $nargs == 1 ? '' : 's'; - App::Ack::warn( "Ignoring $nargs argument$s on the command-line while acting as a filter." ); - } - my $res = App::Ack::Resource::Basic->new( '-' ); - App::Ack::search_resource( $res, $opt ); - $res->close(); - exit 0; - } - - my $file_matching = $opt->{f} || $opt->{lines}; - if ( !$file_matching ) { - @ARGV or App::Ack::die( 'No regular expression found.' ); - $opt->{regex} = App::Ack::build_regex( defined $opt->{regex} ? $opt->{regex} : shift @ARGV, $opt ); - } - - # check that all regexes do compile fine - App::Ack::check_regex( $_ ) for ( $opt->{regex}, $opt->{G} ); - - my $what = App::Ack::get_starting_points( \@ARGV, $opt ); - my $iter = App::Ack::get_iterator( $what, $opt ); - App::Ack::filetype_setup(); - - my $nmatches = 0; - - App::Ack::set_up_pager( $opt->{pager} ) if defined $opt->{pager}; - if ( $opt->{f} ) { - App::Ack::print_files( $iter, $opt ); - } - elsif ( $opt->{l} || $opt->{count} ) { - $nmatches = App::Ack::print_files_with_matches( $iter, $opt ); - } - else { - $nmatches = App::Ack::print_matches( $iter, $opt ); - } - close $App::Ack::fh; - exit ($nmatches ? 0 : 1); -} - -=head1 NAME - -ack - grep-like text finder - -=head1 SYNOPSIS - - ack [options] PATTERN [FILE...] - ack -f [options] [DIRECTORY...] - -=head1 DESCRIPTION - -Ack is designed as a replacement for 99% of the uses of F<grep>. - -Ack searches the named input FILEs (or standard input if no files are -named, or the file name - is given) for lines containing a match to the -given PATTERN. By default, ack prints the matching lines. - -Ack can also list files that would be searched, without actually searching -them, to let you take advantage of ack's file-type filtering capabilities. - -=head1 FILE SELECTION - -I<ack> is intelligent about the files it searches. It knows about -certain file types, based on both the extension on the file and, -in some cases, the contents of the file. These selections can be -made with the B<--type> option. - -With no file selections, I<ack> only searches files of types that -it recognizes. If you have a file called F<foo.wango>, and I<ack> -doesn't know what a .wango file is, I<ack> won't search it. - -The B<-a> option tells I<ack> to select all files, regardless of -type. - -Some files will never be selected by I<ack>, even with B<-a>, -including: - -=over 4 - -=item * Backup files: Files ending with F<~>, or F<#*#> - -=item * Coredumps: Files matching F<core.\d+> - -=back - -However, I<ack> always searches the files given on the command line, -no matter what type. Furthermore, by specifying the B<-u> option all -files will be searched. - -=head1 DIRECTORY SELECTION - -I<ack> descends through the directory tree of the starting directories -specified. However, it will ignore the shadow directories used by -many version control systems, and the build directories used by the -Perl MakeMaker system. You may add or remove a directory from this -list with the B<--[no]ignore-dir> option. The option may be repeated -to add/remove multiple directories from the ignore list. - -For a complete list of directories that do not get searched, run -F<ack --help>. - -=head1 WHEN TO USE GREP - -I<ack> trumps I<grep> as an everyday tool 99% of the time, but don't -throw I<grep> away, because there are times you'll still need it. - -E.g., searching through huge files looking for regexes that can be -expressed with I<grep> syntax should be quicker with I<grep>. - -If your script or parent program uses I<grep> C<--quiet> or -C<--silent> or needs exit 2 on IO error, use I<grep>. - -=head1 OPTIONS - -=over 4 - -=item B<-a>, B<--all> - -Operate on all files, regardless of type (but still skip directories -like F<blib>, F<CVS>, etc.) - -=item B<-A I<NUM>>, B<--after-context=I<NUM>> - -Print I<NUM> lines of trailing context after matching lines. - -=item B<-B I<NUM>>, B<--before-context=I<NUM>> - -Print I<NUM> lines of leading context before matching lines. - -=item B<-C [I<NUM>]>, B<--context[=I<NUM>]> - -Print I<NUM> lines (default 2) of context around matching lines. - -=item B<-c>, B<--count> - -Suppress normal output; instead print a count of matching lines for -each input file. If B<-l> is in effect, it will only show the -number of lines for each file that has lines matching. Without -B<-l>, some line counts may be zeroes. - -=item B<--color>, B<--nocolor> - -B<--color> highlights the matching text. B<--nocolor> supresses -the color. This is on by default unless the output is redirected. - -On Windows, this option is off by default unless the -L<Win32::Console::ANSI> module is installed or the C<ACK_PAGER_COLOR> -environment variable is used. - -=item B<--color-filename=I<color>> - -Sets the color to be used for filenames. - -=item B<--color-match=I<color>> - -Sets the color to be used for matches. - -=item B<--column> - -Show the column number of the first match. This is helpful for editors -that can place your cursor at a given position. - -=item B<--env>, B<--noenv> - -B<--noenv> disables all environment processing. No F<.ackrc> is read -and all environment variables are ignored. By default, F<ack> considers -F<.ackrc> and settings in the environment. - -=item B<--flush> - -B<--flush> flushes output immediately. This is off by default -unless ack is running interactively (when output goes to a pipe -or file). - -=item B<-f> - -Only print the files that would be searched, without actually doing -any searching. PATTERN must not be specified, or it will be taken as -a path to search. - -=item B<--follow>, B<--nofollow> - -Follow or don't follow symlinks, other than whatever starting files -or directories were specified on the command line. - -This is off by default. - -=item B<-G I<REGEX>> - -Only paths matching I<REGEX> are included in the search. The entire -path and filename are matched against I<REGEX>, and I<REGEX> is a -Perl regular expression, not a shell glob. - -The options B<-i>, B<-w>, B<-v>, and B<-Q> do not apply to this I<REGEX>. - -=item B<-g I<REGEX>> - -Print files where the relative path + filename matches I<REGEX>. This option is -a convenience shortcut for B<-f> B<-G I<REGEX>>. - -The options B<-i>, B<-w>, B<-v>, and B<-Q> do not apply to this I<REGEX>. - -=item B<--group>, B<--nogroup> - -B<--group> groups matches by file name with. This is the default when -used interactively. - -B<--nogroup> prints one result per line, like grep. This is the default -when output is redirected. - -=item B<-H>, B<--with-filename> - -Print the filename for each match. - -=item B<-h>, B<--no-filename> - -Suppress the prefixing of filenames on output when multiple files are -searched. - -=item B<--help> - -Print a short help statement. - -=item B<-i>, B<--ignore-case> - -Ignore case in the search strings. - -This applies only to the PATTERN, not to the regexes given for the B<-g> -and B<-G> options. - -=item B<--[no]ignore-dir=DIRNAME> - -Ignore directory (as CVS, .svn, etc are ignored). May be used multiple times -to ignore multiple directories. For example, mason users may wish to include -B<--ignore-dir=data>. The B<--noignore-dir> option allows users to search -directories which would normally be ignored (perhaps to research the contents -of F<.svn/props> directories). - -=item B<--line=I<NUM>> - -Only print line I<NUM> of each file. Multiple lines can be given with multiple -B<--line> options or as a comma separated list (B<--line=3,5,7>). B<--line=4-7> -also works. The lines are always output in ascending order, no matter the -order given on the command line. - -=item B<-l>, B<--files-with-matches> - -Only print the filenames of matching files, instead of the matching text. - -=item B<-L>, B<--files-without-matches> - -Only print the filenames of files that do I<NOT> match. This is equivalent -to specifying B<-l> and B<-v>. - -=item B<--match I<REGEX>> - -Specify the I<REGEX> explicitly. This is helpful if you don't want to put the -regex as your first argument, e.g. when executing multiple searches over the -same set of files. - - # search for foo and bar in given files - ack file1 t/file* --match foo - ack file1 t/file* --match bar - -=item B<-m=I<NUM>>, B<--max-count=I<NUM>> - -Stop reading a file after I<NUM> matches. - -=item B<--man> - -Print this manual page. - -=item B<-n> - -No descending into subdirectories. - -=item B<-o> - -Show only the part of each line matching PATTERN (turns off text -highlighting) - -=item B<--output=I<expr>> - -Output the evaluation of I<expr> for each line (turns off text -highlighting) - -=item B<--pager=I<program>> - -Direct ack's output through I<program>. This can also be specified -via the C<ACK_PAGER> and C<ACK_PAGER_COLOR> environment variables. - -Using --pager does not suppress grouping and coloring like piping -output on the command-line does. - -=item B<--passthru> - -Prints all lines, whether or not they match the expression. Highlighting -will still work, though, so it can be used to highlight matches while -still seeing the entire file, as in: - - # Watch a log file, and highlight a certain IP address - $ tail -f ~/access.log | ack --passthru 123.45.67.89 - -=item B<--print0> - -Only works in conjunction with -f, -g, -l or -c (filename output). The filenames -are output separated with a null byte instead of the usual newline. This is -helpful when dealing with filenames that contain whitespace, e.g. - - # remove all files of type html - ack -f --html --print0 | xargs -0 rm -f - -=item B<-Q>, B<--literal> - -Quote all metacharacters in PATTERN, it is treated as a literal. - -This applies only to the PATTERN, not to the regexes given for the B<-g> -and B<-G> options. - -=item B<--smart-case>, B<--no-smart-case> - -Ignore case in the search strings if PATTERN contains no uppercase -characters. This is similar to C<smartcase> in vim. This option is -off by default. - -B<-i> always overrides this option. - -This applies only to the PATTERN, not to the regexes given for the -B<-g> and B<-G> options. - -=item B<--sort-files> - -Sorts the found files lexically. Use this if you want your file -listings to be deterministic between runs of I<ack>. - -=item B<--thpppt> - -Display the all-important Bill The Cat logo. Note that the exact -spelling of B<--thpppppt> is not important. It's checked against -a regular expression. - -=item B<--type=TYPE>, B<--type=noTYPE> - -Specify the types of files to include or exclude from a search. -TYPE is a filetype, like I<perl> or I<xml>. B<--type=perl> can -also be specified as B<--perl>, and B<--type=noperl> can be done -as B<--noperl>. - -If a file is of both type "foo" and "bar", specifying --foo and ---nobar will exclude the file, because an exclusion takes precedence -over an inclusion. - -Type specifications can be repeated and are ORed together. - -See I<ack --help=types> for a list of valid types. - -=item B<--type-add I<TYPE>=I<.EXTENSION>[,I<.EXT2>[,...]]> - -Files with the given EXTENSION(s) are recognized as being of (the -existing) type TYPE. See also L</"Defining your own types">. - - -=item B<--type-set I<TYPE>=I<.EXTENSION>[,I<.EXT2>[,...]]> - -Files with the given EXTENSION(s) are recognized as being of type -TYPE. This replaces an existing definition for type TYPE. See also -L</"Defining your own types">. - -=item B<-u>, B<--unrestricted> - -All files and directories (including blib/, core.*, ...) are searched, -nothing is skipped. When both B<-u> and B<--ignore-dir> are used, the -B<--ignore-dir> option has no effect. - -=item B<-v>, B<--invert-match> - -Invert match: select non-matching lines - -This applies only to the PATTERN, not to the regexes given for the B<-g> -and B<-G> options. - -=item B<--version> - -Display version and copyright information. - -=item B<-w>, B<--word-regexp> - -Force PATTERN to match only whole words. The PATTERN is wrapped with -C<\b> metacharacters. - -This applies only to the PATTERN, not to the regexes given for the B<-g> -and B<-G> options. - -=item B<-1> - -Stops after reporting first match of any kind. This is different -from B<--max-count=1> or B<-m1>, where only one match per file is -shown. Also, B<-1> works with B<-f> and B<-g>, where B<-m> does -not. - -=back - -=head1 THE .ackrc FILE - -The F<.ackrc> file contains command-line options that are prepended -to the command line before processing. Multiple options may live -on multiple lines. Lines beginning with a # are ignored. A F<.ackrc> -might look like this: - - # Always sort the files - --sort-files - - # Always color, even if piping to a another program - --color - - # Use "less -r" as my pager - --pager=less -r - -Note that arguments with spaces in them do not need to be quoted, -as they are not interpreted by the shell. Basically, each I<line> -in the F<.ackrc> file is interpreted as one element of C<@ARGV>. - -F<ack> looks in your home directory for the F<.ackrc>. You can -specify another location with the F<ACKRC> variable, below. - -If B<--noenv> is specified on the command line, the F<.ackrc> file -is ignored. - -=head1 Defining your own types - -ack allows you to define your own types in addition to the predefined -types. This is done with command line options that are best put into -an F<.ackrc> file - then you do not have to define your types over and -over again. In the following examples the options will always be shown -on one command line so that they can be easily copy & pasted. - -I<ack --perl foo> searches for foo in all perl files. I<ack --help=types> -tells you, that perl files are files ending -in .pl, .pm, .pod or .t. So what if you would like to include .xs -files as well when searching for --perl files? I<ack --type-add perl=.xs --perl foo> -does this for you. B<--type-add> appends -additional extensions to an existing type. - -If you want to define a new type, or completely redefine an existing -type, then use B<--type-set>. I<ack --type-set -eiffel=.e,.eiffel> defines the type I<eiffel> to include files with -the extensions .e or .eiffel. So to search for all eiffel files -containing the word Bertrand use I<ack --type-set eiffel=.e,.eiffel --eiffel Bertrand>. -As usual, you can also write B<--type=eiffel> -instead of B<--eiffel>. Negation also works, so B<--noeiffel> excludes -all eiffel files from a search. Redefining also works: I<ack --type-set cc=.c,.h> -and I<.xs> files no longer belong to the type I<cc>. - -When defining your own types in the F<.ackrc> file you have to use -the following: - - --type-set=eiffel=.e,.eiffel - -or writing on separate lines - - --type-set - eiffel=.e,.eiffel - -The following does B<NOT> work in the F<.ackrc> file: - - --type-set eiffel=.e,.eiffel - - -In order to see all currently defined types, use I<--help types>, e.g. -I<ack --type-set backup=.bak --type-add perl=.perl --help types> - -Restrictions: - -=over 4 - -=item - -The types 'skipped', 'make', 'binary' and 'text' are considered "builtin" and -cannot be altered. - -=item - -The shebang line recognition of the types 'perl', 'ruby', 'php', 'python', -'shell' and 'xml' cannot be redefined by I<--type-set>, it is always -active. However, the shebang line is only examined for files where the -extension is not recognised. Therefore it is possible to say -I<ack --type-set perl=.perl --type-set foo=.pl,.pm,.pod,.t --perl --nofoo> and -only find your shiny new I<.perl> files (and all files with unrecognized extension -and perl on the shebang line). - -=back - -=head1 ENVIRONMENT VARIABLES - -For commonly-used ack options, environment variables can make life much easier. -These variables are ignored if B<--noenv> is specified on the command line. - -=over 4 - -=item ACKRC - -Specifies the location of the F<.ackrc> file. If this file doesn't -exist, F<ack> looks in the default location. - -=item ACK_OPTIONS - -This variable specifies default options to be placed in front of -any explicit options on the command line. - -=item ACK_COLOR_FILENAME - -Specifies the color of the filename when it's printed in B<--group> -mode. By default, it's "bold green". - -The recognized attributes are clear, reset, dark, bold, underline, -underscore, blink, reverse, concealed black, red, green, yellow, -blue, magenta, on_black, on_red, on_green, on_yellow, on_blue, -on_magenta, on_cyan, and on_white. Case is not significant. -Underline and underscore are equivalent, as are clear and reset. -The color alone sets the foreground color, and on_color sets the -background color. - -This option can also be set with B<--color-filename>. - -=item ACK_COLOR_MATCH - -Specifies the color of the matching text when printed in B<--color> -mode. By default, it's "black on_yellow". - -This option can also be set with B<--color-match>. - -See B<ACK_COLOR_FILENAME> for the color specifications. - -=item ACK_PAGER - -Specifies a pager program, such as C<more>, C<less> or C<most>, to which -ack will send its output. - -Using C<ACK_PAGER> does not suppress grouping and coloring like -piping output on the command-line does, except that on Windows -ack will assume that C<ACK_PAGER> does not support color. - -C<ACK_PAGER_COLOR> overrides C<ACK_PAGER> if both are specified. - -=item ACK_PAGER_COLOR - -Specifies a pager program that understands ANSI color sequences. -Using C<ACK_PAGER_COLOR> does not suppress grouping and coloring -like piping output on the command-line does. - -If you are not on Windows, you never need to use C<ACK_PAGER_COLOR>. - -=back - -=head1 ACK & OTHER TOOLS - -=head2 Vim integration - -F<ack> integrates easily with the Vim text editor. Set this in your -F<.vimrc> to use F<ack> instead of F<grep>: - - set grepprg=ack\ -a - -That examples uses C<-a> to search through all files, but you may -use other default flags. Now you can search with F<ack> and easily -step through the results in Vim: - - :grep Dumper perllib - -=head2 Emacs integration - -Phil Jackson put together an F<ack.el> extension that "provides a -simple compilation mode ... has the ability to guess what files you -want to search for based on the major-mode." - -L<http://www.shellarchive.co.uk/content/emacs.html> - -=head2 TextMate integration - -Pedro Melo is a TextMate user who writes "I spend my day mostly -inside TextMate, and the built-in find-in-project sucks with large -projects. So I hacked a TextMate command that was using find + -grep to use ack. The result is the Search in Project with ack, and -you can find it here: -L<http://www.simplicidade.org/notes/archives/2008/03/search_in_proje.html>" - -=head2 Shell and Return Code - -For greater compatibility with I<grep>, I<ack> in normal use returns -shell return or exit code of 0 only if something is found and 1 if -no match is found. - -(Shell exit code 1 is C<$?=256> in perl with C<system> or backticks.) - -The I<grep> code 2 for errors is not used. - -0 is returned if C<-f> or C<-g> are specified, irrespective of -number of files found. - -=cut - -=head1 DEBUGGING ACK PROBLEMS - -If ack gives you output you're not expecting, start with a few simple steps. - -=head2 Use B<--noenv> - -Your environment variables and F<.ackrc> may be doing things you're -not expecting, or forgotten you specified. Use B<--noenv> to ignore -your environment and F<.ackrc>. - -=head2 Use B<-f> to see what files you're scanning - -The reason I created B<-f> in the first place was as a debugging -tool. If ack is not finding matches you think it should find, run -F<ack -f> to see what files are being checked. - -=head1 TIPS - -=head2 Use the F<.ackrc> file. - -The F<.ackrc> is the place to put all your options you use most of -the time but don't want to remember. Put all your --type-add and ---type-set definitions in it. If you like --smart-case, set it -there, too. I also set --sort-files there. - -=head2 Use F<-f> for working with big codesets - -Ack does more than search files. C<ack -f --perl> will create a -list of all the Perl files in a tree, ideal for sending into F<xargs>. -For example: - - # Change all "this" to "that" in all Perl files in a tree. - ack -f --perl | xargs perl -p -i -e's/this/that/g' - -or if you prefer: - - perl -p -i -e's/this/thatg/' $(ack -f --perl) - -=head2 Use F<-Q> when in doubt about metacharacters - -If you're searching for something with a regular expression -metacharacter, most often a period in a filename or IP address, add -the -Q to avoid false positives without all the backslashing. See -the following example for more... - -=head2 Use ack to watch log files - -Here's one I used the other day to find trouble spots for a website -visitor. The user had a problem loading F<troublesome.gif>, so I -took the access log and scanned it with ack twice. - - ack -Q aa.bb.cc.dd /path/to/access.log | ack -Q -B5 troublesome.gif - -The first ack finds only the lines in the Apache log for the given -IP. The second finds the match on my troublesome GIF, and shows -the previous five lines from the log in each case. - -=head2 Share your knowledge - -Join the ack-users mailing list. Send me your tips and I may add -them here. - -=head1 FAQ - -=head2 Wouldn't it be great if F<ack> did search & replace? - -No, ack will always be read-only. Perl has a perfectly good way -to do search & replace in files, using the C<-i>, C<-p> and C<-n> -switches. - -You can certainly use ack to select your files to update. For -example, to change all "foo" to "bar" in all PHP files, you can do -this form the Unix shell: - - $ perl -i -p -e's/foo/bar/g' $(ack -f --php) - -=head1 AUTHOR - -Andy Lester, C<< <andy at petdance.com> >> - -=head1 BUGS - -Please report any bugs or feature requests to the issues list at -Google Code: L<http://code.google.com/p/ack/issues/list> - -=head1 ENHANCEMENTS - -All enhancement requests MUST first be posted to the ack-users -mailing list at L<http://groups.google.com/group/ack-users>. I -will not consider a request without it first getting seen by other -ack users. - -There is a list of enhancements I want to make to F<ack> in the ack -issues list at Google Code: L<http://code.google.com/p/ack/issues/list> - -Patches are always welcome, but patches with tests get the most -attention. - -=head1 SUPPORT - -Support for and information about F<ack> can be found at: - -=over 4 - -=item * The ack homepage - -L<http://betterthangrep.com/> - -=item * The ack issues list at Google Code - -L<http://code.google.com/p/ack/issues/list> - -=item * AnnoCPAN: Annotated CPAN documentation - -L<http://annocpan.org/dist/ack> - -=item * CPAN Ratings - -L<http://cpanratings.perl.org/d/ack> - -=item * Search CPAN - -L<http://search.cpan.org/dist/ack> - -=item * Subversion repository - -L<http://ack.googlecode.com/svn/> - -=back - -=head1 ACKNOWLEDGEMENTS - -How appropriate to have I<ack>nowledgements! - -Thanks to everyone who has contributed to ack in any way, including -Ryan Niebur, -Kent Fredric, -Mike Morearty, -Ingmar Vanhassel, -Eric Van Dewoestine, -Sitaram Chamarty, -Adam James, -Richard Carlsson, -Pedro Melo, -AJ Schuster, -Phil Jackson, -Michael Schwern, -Jan Dubois, -Christopher J. Madsen, -Matthew Wickline, -David Dyck, -Jason Porritt, -Jjgod Jiang, -Thomas Klausner, -Uri Guttman, -Peter Lewis, -Kevin Riggle, -Ori Avtalion, -Torsten Blix, -Nigel Metheringham, -GE<aacute>bor SzabE<oacute>, -Tod Hagan, -Michael Hendricks, -E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason, -Piers Cawley, -Stephen Steneker, -Elias Lutfallah, -Mark Leighton Fisher, -Matt Diephouse, -Christian Jaeger, -Bill Sully, -Bill Ricker, -David Golden, -Nilson Santos F. Jr, -Elliot Shank, -Merijn Broeren, -Uwe Voelker, -Rick Scott, -Ask BjE<oslash>rn Hansen, -Jerry Gay, -Will Coleda, -Mike O'Regan, -Slaven ReziE<0x107>, -Mark Stosberg, -David Alan Pisoni, -Adriano Ferreira, -James Keenan, -Leland Johnson, -Ricardo Signes -and Pete Krawczyk. - -=head1 COPYRIGHT & LICENSE - -Copyright 2005-2009 Andy Lester. - -This program is free software; you can redistribute it and/or modify -it under the terms of either: - -=over 4 - -=item * the GNU General Public License as published by the Free -Software Foundation; either version 1, or (at your option) any later -version, or - -=item * the Artistic License version 2.0. - -=back - -=cut -package File::Next; - -use strict; -use warnings; - - -our $VERSION = '1.06'; - - - -use File::Spec (); - - -our $name; # name of the current file -our $dir; # dir of the current file - -our %files_defaults; -our %skip_dirs; - -BEGIN { - %files_defaults = ( - file_filter => undef, - descend_filter => undef, - error_handler => sub { CORE::die @_ }, - sort_files => undef, - follow_symlinks => 1, - ); - %skip_dirs = map {($_,1)} (File::Spec->curdir, File::Spec->updir); -} - - -sub files { - ($_[0] eq __PACKAGE__) && die 'File::Next::files must not be invoked as File::Next->files'; - - my ($parms,@queue) = _setup( \%files_defaults, @_ ); - my $filter = $parms->{file_filter}; - - return sub { - while (@queue) { - my ($dir,$file,$fullpath) = splice( @queue, 0, 3 ); - if ( -f $fullpath ) { - if ( $filter ) { - local $_ = $file; - local $File::Next::dir = $dir; - local $File::Next::name = $fullpath; - next if not $filter->(); - } - return wantarray ? ($dir,$file,$fullpath) : $fullpath; - } - elsif ( -d _ ) { - unshift( @queue, _candidate_files( $parms, $fullpath ) ); - } - } # while - - return; - }; # iterator -} - - - - - - - -sub sort_standard($$) { return $_[0]->[1] cmp $_[1]->[1] } -sub sort_reverse($$) { return $_[1]->[1] cmp $_[0]->[1] } - -sub reslash { - my $path = shift; - - my @parts = split( /\//, $path ); - - return $path if @parts < 2; - - return File::Spec->catfile( @parts ); -} - - - -sub _setup { - my $defaults = shift; - my $passed_parms = ref $_[0] eq 'HASH' ? {%{+shift}} : {}; # copy parm hash - - my %passed_parms = %{$passed_parms}; - - my $parms = {}; - for my $key ( keys %{$defaults} ) { - $parms->{$key} = - exists $passed_parms{$key} - ? delete $passed_parms{$key} - : $defaults->{$key}; - } - - # Any leftover keys are bogus - for my $badkey ( keys %passed_parms ) { - my $sub = (caller(1))[3]; - $parms->{error_handler}->( "Invalid option passed to $sub(): $badkey" ); - } - - # If it's not a code ref, assume standard sort - if ( $parms->{sort_files} && ( ref($parms->{sort_files}) ne 'CODE' ) ) { - $parms->{sort_files} = \&sort_standard; - } - my @queue; - - for ( @_ ) { - my $start = reslash( $_ ); - if (-d $start) { - push @queue, ($start,undef,$start); - } - else { - push @queue, (undef,$start,$start); - } - } - - return ($parms,@queue); -} - - -sub _candidate_files { - my $parms = shift; - my $dir = shift; - - my $dh; - if ( !opendir $dh, $dir ) { - $parms->{error_handler}->( "$dir: $!" ); - return; - } - - my @newfiles; - my $descend_filter = $parms->{descend_filter}; - my $follow_symlinks = $parms->{follow_symlinks}; - my $sort_sub = $parms->{sort_files}; - - for my $file ( grep { !exists $skip_dirs{$_} } readdir $dh ) { - my $has_stat; - - # Only do directory checking if we have a descend_filter - my $fullpath = File::Spec->catdir( $dir, $file ); - if ( !$follow_symlinks ) { - next if -l $fullpath; - $has_stat = 1; - } - - if ( $descend_filter ) { - if ( $has_stat ? (-d _) : (-d $fullpath) ) { - local $File::Next::dir = $fullpath; - local $_ = $file; - next if not $descend_filter->(); - } - } - if ( $sort_sub ) { - push( @newfiles, [ $dir, $file, $fullpath ] ); - } - else { - push( @newfiles, $dir, $file, $fullpath ); - } - } - closedir $dh; - - if ( $sort_sub ) { - return map { @{$_} } sort $sort_sub @newfiles; - } - - return @newfiles; -} - - -1; # End of File::Next -package App::Ack; - -use warnings; -use strict; - - - - -our $VERSION; -our $COPYRIGHT; -BEGIN { - $VERSION = '1.90'; - $COPYRIGHT = 'Copyright 2005-2009 Andy Lester, all rights reserved.'; -} - -our $fh; - -BEGIN { - $fh = *STDOUT; -} - - -our %types; -our %type_wanted; -our %mappings; -our %ignore_dirs; - -our $input_from_pipe; -our $output_to_pipe; - -our $dir_sep_chars; -our $is_cygwin; -our $is_windows; - -use File::Spec (); -use File::Glob ':glob'; -use Getopt::Long (); - -BEGIN { - %ignore_dirs = ( - '.bzr' => 'Bazaar', - '.cdv' => 'Codeville', - '~.dep' => 'Interface Builder', - '~.dot' => 'Interface Builder', - '~.nib' => 'Interface Builder', - '~.plst' => 'Interface Builder', - '.git' => 'Git', - '.hg' => 'Mercurial', - '.pc' => 'quilt', - '.svn' => 'Subversion', - blib => 'Perl module building', - CVS => 'CVS', - RCS => 'RCS', - SCCS => 'SCCS', - _darcs => 'darcs', - _sgbak => 'Vault/Fortress', - 'autom4te.cache' => 'autoconf', - 'cover_db' => 'Devel::Cover', - _build => 'Module::Build', - ); - - %mappings = ( - actionscript => [qw( as mxml )], - ada => [qw( ada adb ads )], - asm => [qw( asm s )], - batch => [qw( bat cmd )], - binary => q{Binary files, as defined by Perl's -B op (default: off)}, - cc => [qw( c h xs )], - cfmx => [qw( cfc cfm cfml )], - cpp => [qw( cpp cc cxx m hpp hh h hxx )], - csharp => [qw( cs )], - css => [qw( css )], - elisp => [qw( el )], - erlang => [qw( erl hrl )], - fortran => [qw( f f77 f90 f95 f03 for ftn fpp )], - haskell => [qw( hs lhs )], - hh => [qw( h )], - html => [qw( htm html shtml xhtml )], - java => [qw( java properties )], - js => [qw( js )], - jsp => [qw( jsp jspx jhtm jhtml )], - lisp => [qw( lisp lsp )], - lua => [qw( lua )], - make => q{Makefiles}, - mason => [qw( mas mhtml mpl mtxt )], - objc => [qw( m h )], - objcpp => [qw( mm h )], - ocaml => [qw( ml mli )], - parrot => [qw( pir pasm pmc ops pod pg tg )], - perl => [qw( pl pm pod t )], - php => [qw( php phpt php3 php4 php5 )], - plone => [qw( pt cpt metadata cpy py )], - python => [qw( py )], - rake => q{Rakefiles}, - ruby => [qw( rb rhtml rjs rxml erb rake )], - scheme => [qw( scm ss )], - shell => [qw( sh bash csh tcsh ksh zsh )], - skipped => q{Files, but not directories, normally skipped by ack (default: off)}, - smalltalk => [qw( st )], - sql => [qw( sql ctl )], - tcl => [qw( tcl itcl itk )], - tex => [qw( tex cls sty )], - text => q{Text files, as defined by Perl's -T op (default: off)}, - tt => [qw( tt tt2 ttml )], - vb => [qw( bas cls frm ctl vb resx )], - vim => [qw( vim )], - yaml => [qw( yaml yml )], - xml => [qw( xml dtd xslt ent )], - ); - - while ( my ($type,$exts) = each %mappings ) { - if ( ref $exts ) { - for my $ext ( @{$exts} ) { - push( @{$types{$ext}}, $type ); - } - } - } - - # These have to be checked before any filehandle diddling. - $output_to_pipe = not -t *STDOUT; - $input_from_pipe = -p STDIN; - - $is_cygwin = ($^O eq 'cygwin'); - $is_windows = ($^O =~ /MSWin32/); - $dir_sep_chars = $is_windows ? quotemeta( '\\/' ) : quotemeta( File::Spec->catfile( '', '' ) ); -} - - -sub read_ackrc { - my @files = ( $ENV{ACKRC} ); - my @dirs = - $is_windows - ? ( $ENV{HOME}, $ENV{USERPROFILE} ) - : ( '~', $ENV{HOME} ); - for my $dir ( grep { defined } @dirs ) { - for my $file ( '.ackrc', '_ackrc' ) { - push( @files, bsd_glob( "$dir/$file", GLOB_TILDE ) ); - } - } - for my $filename ( @files ) { - if ( defined $filename && -e $filename ) { - open( my $fh, '<', $filename ) or App::Ack::die( "$filename: $!\n" ); - my @lines = grep { /./ && !/^\s*#/ } <$fh>; - chomp @lines; - close $fh or App::Ack::die( "$filename: $!\n" ); - - return @lines; - } - } - - return; -} - - -sub get_command_line_options { - my %opt = ( - pager => $ENV{ACK_PAGER_COLOR} || $ENV{ACK_PAGER}, - ); - - my $getopt_specs = { - 1 => sub { $opt{1} = $opt{m} = 1 }, - 'A|after-context=i' => \$opt{after_context}, - 'B|before-context=i' => \$opt{before_context}, - 'C|context:i' => sub { shift; my $val = shift; $opt{before_context} = $opt{after_context} = ($val || 2) }, - 'a|all-types' => \$opt{all}, - 'break!' => \$opt{break}, - c => \$opt{count}, - 'color|colour!' => \$opt{color}, - 'color-match=s' => \$ENV{ACK_COLOR_MATCH}, - 'color-filename=s' => \$ENV{ACK_COLOR_FILENAME}, - 'column!' => \$opt{column}, - count => \$opt{count}, - 'env!' => sub { }, # ignore this option, it is handled beforehand - f => \$opt{f}, - flush => \$opt{flush}, - 'follow!' => \$opt{follow}, - 'g=s' => sub { shift; $opt{G} = shift; $opt{f} = 1 }, - 'G=s' => \$opt{G}, - 'group!' => sub { shift; $opt{heading} = $opt{break} = shift }, - 'heading!' => \$opt{heading}, - 'h|no-filename' => \$opt{h}, - 'H|with-filename' => \$opt{H}, - 'i|ignore-case' => \$opt{i}, - 'lines=s' => sub { shift; my $val = shift; push @{$opt{lines}}, $val }, - 'l|files-with-matches' => \$opt{l}, - 'L|files-without-matches' => sub { $opt{l} = $opt{v} = 1 }, - 'm|max-count=i' => \$opt{m}, - 'match=s' => \$opt{regex}, - 'n|no-recurse' => \$opt{n}, - o => sub { $opt{output} = '$&' }, - 'output=s' => \$opt{output}, - 'pager=s' => \$opt{pager}, - 'nopager' => sub { $opt{pager} = undef }, - 'passthru' => \$opt{passthru}, - 'print0' => \$opt{print0}, - 'Q|literal' => \$opt{Q}, - 'r|R|recurse' => sub {}, - 'smart-case!' => \$opt{smart_case}, - 'sort-files' => \$opt{sort_files}, - 'u|unrestricted' => \$opt{u}, - 'v|invert-match' => \$opt{v}, - 'w|word-regexp' => \$opt{w}, - - 'ignore-dirs=s' => sub { shift; my $dir = remove_dir_sep( shift ); $ignore_dirs{$dir} = '--ignore-dirs' }, - 'noignore-dirs=s' => sub { shift; my $dir = remove_dir_sep( shift ); delete $ignore_dirs{$dir} }, - - 'version' => sub { print_version_statement(); exit 1; }, - 'help|?:s' => sub { shift; show_help(@_); exit; }, - 'help-types'=> sub { show_help_types(); exit; }, - 'man' => sub { require Pod::Usage; Pod::Usage::pod2usage({-verbose => 2}); exit; }, - - 'type=s' => sub { - # Whatever --type=xxx they specify, set it manually in the hash - my $dummy = shift; - my $type = shift; - my $wanted = ($type =~ s/^no//) ? 0 : 1; # must not be undef later - - if ( exists $type_wanted{ $type } ) { - $type_wanted{ $type } = $wanted; - } - else { - App::Ack::die( qq{Unknown --type "$type"} ); - } - }, # type sub - }; - - # Stick any default switches at the beginning, so they can be overridden - # by the command line switches. - unshift @ARGV, split( ' ', $ENV{ACK_OPTIONS} ) if defined $ENV{ACK_OPTIONS}; - - # first pass through options, looking for type definitions - def_types_from_ARGV(); - - for my $i ( filetypes_supported() ) { - $getopt_specs->{ "$i!" } = \$type_wanted{ $i }; - } - - - my $parser = Getopt::Long::Parser->new(); - $parser->configure( 'bundling', 'no_ignore_case', ); - $parser->getoptions( %{$getopt_specs} ) or - App::Ack::die( 'See ack --help or ack --man for options.' ); - - my $to_screen = not output_to_pipe(); - my %defaults = ( - all => 0, - color => $to_screen, - follow => 0, - break => $to_screen, - heading => $to_screen, - before_context => 0, - after_context => 0, - ); - if ( $is_windows && $defaults{color} && not $ENV{ACK_PAGER_COLOR} ) { - if ( $ENV{ACK_PAGER} || not eval { require Win32::Console::ANSI } ) { - $defaults{color} = 0; - } - } - if ( $to_screen && $ENV{ACK_PAGER_COLOR} ) { - $defaults{color} = 1; - } - - while ( my ($key,$value) = each %defaults ) { - if ( not defined $opt{$key} ) { - $opt{$key} = $value; - } - } - - if ( defined $opt{m} && $opt{m} <= 0 ) { - App::Ack::die( '-m must be greater than zero' ); - } - - for ( qw( before_context after_context ) ) { - if ( defined $opt{$_} && $opt{$_} < 0 ) { - App::Ack::die( "--$_ may not be negative" ); - } - } - - if ( defined( my $val = $opt{output} ) ) { - $opt{output} = eval qq[ sub { "$val" } ]; - } - if ( defined( my $l = $opt{lines} ) ) { - # --line=1 --line=5 is equivalent to --line=1,5 - my @lines = split( /,/, join( ',', @{$l} ) ); - - # --line=1-3 is equivalent to --line=1,2,3 - @lines = map { - my @ret; - if ( /-/ ) { - my ($from, $to) = split /-/, $_; - if ( $from > $to ) { - App::Ack::warn( "ignoring --line=$from-$to" ); - @ret = (); - } - else { - @ret = ( $from .. $to ); - } - } - else { - @ret = ( $_ ); - }; - @ret - } @lines; - - if ( @lines ) { - my %uniq; - @uniq{ @lines } = (); - $opt{lines} = [ sort { $a <=> $b } keys %uniq ]; # numerical sort and each line occurs only once! - } - else { - # happens if there are only ignored --line directives - App::Ack::die( 'All --line options are invalid.' ); - } - } - - return \%opt; -} - - -sub def_types_from_ARGV { - my @typedef; - - my $parser = Getopt::Long::Parser->new(); - # pass_through => leave unrecognized command line arguments alone - # no_auto_abbrev => otherwise -c is expanded and not left alone - $parser->configure( 'no_ignore_case', 'pass_through', 'no_auto_abbrev' ); - $parser->getoptions( - 'type-set=s' => sub { shift; push @typedef, ['c', shift] }, - 'type-add=s' => sub { shift; push @typedef, ['a', shift] }, - ) or App::Ack::die( 'See ack --help or ack --man for options.' ); - - for my $td (@typedef) { - my ($type, $ext) = split /=/, $td->[1]; - - if ( $td->[0] eq 'c' ) { - # type-set - if ( exists $mappings{$type} ) { - # can't redefine types 'make', 'skipped', 'text' and 'binary' - App::Ack::die( qq{--type-set: Builtin type "$type" cannot be changed.} ) - if ref $mappings{$type} ne 'ARRAY'; - - delete_type($type); - } - } - else { - # type-add - - # can't append to types 'make', 'skipped', 'text' and 'binary' - App::Ack::die( qq{--type-add: Builtin type "$type" cannot be changed.} ) - if exists $mappings{$type} && ref $mappings{$type} ne 'ARRAY'; - - App::Ack::warn( qq{--type-add: Type "$type" does not exist, creating with "$ext" ...} ) - unless exists $mappings{$type}; - } - - my @exts = split /,/, $ext; - s/^\.// for @exts; - - if ( !exists $mappings{$type} || ref($mappings{$type}) eq 'ARRAY' ) { - push @{$mappings{$type}}, @exts; - for my $e ( @exts ) { - push @{$types{$e}}, $type; - } - } - else { - App::Ack::die( qq{Cannot append to type "$type".} ); - } - } - - return; -} - - -sub delete_type { - my $type = shift; - - App::Ack::die( qq{Internal error: Cannot delete builtin type "$type".} ) - unless ref $mappings{$type} eq 'ARRAY'; - - delete $mappings{$type}; - delete $type_wanted{$type}; - for my $ext ( keys %types ) { - $types{$ext} = [ grep { $_ ne $type } @{$types{$ext}} ]; - } -} - - -sub ignoredir_filter { - return !exists $ignore_dirs{$_}; -} - - -sub remove_dir_sep { - my $path = shift; - $path =~ s/[$dir_sep_chars]$//; - - return $path; -} - - -use constant TEXT => 'text'; - -sub filetypes { - my $filename = shift; - - return 'skipped' unless is_searchable( $filename ); - - my $basename = $filename; - $basename =~ s{.*[$dir_sep_chars]}{}; - - my $lc_basename = lc $basename; - return ('make',TEXT) if $lc_basename eq 'makefile'; - return ('rake','ruby',TEXT) if $lc_basename eq 'rakefile'; - - # If there's an extension, look it up - if ( $filename =~ m{\.([^\.$dir_sep_chars]+)$}o ) { - my $ref = $types{lc $1}; - return (@{$ref},TEXT) if $ref; - } - - # At this point, we can't tell from just the name. Now we have to - # open it and look inside. - - return unless -e $filename; - # From Elliot Shank: - # I can't see any reason that -r would fail on these-- the ACLs look - # fine, and no program has any of them open, so the busted Windows - # file locking model isn't getting in there. If I comment the if - # statement out, everything works fine - # So, for cygwin, don't bother trying to check for readability. - if ( !$is_cygwin ) { - if ( !-r $filename ) { - App::Ack::warn( "$filename: Permission denied" ); - return; - } - } - - return 'binary' if -B $filename; - - # If there's no extension, or we don't recognize it, check the shebang line - my $fh; - if ( !open( $fh, '<', $filename ) ) { - App::Ack::warn( "$filename: $!" ); - return; - } - my $header = <$fh>; - close $fh; - - if ( $header =~ /^#!/ ) { - return ($1,TEXT) if $header =~ /\b(ruby|p(?:erl|hp|ython))\b/; - return ('shell',TEXT) if $header =~ /\b(?:ba|t?c|k|z)?sh\b/; - } - else { - return ('xml',TEXT) if $header =~ /\Q<?xml /i; - } - - return (TEXT); -} - - -sub is_searchable { - my $filename = shift; - - # If these are updated, update the --help message - return if $filename =~ /[.]bak$/; - return if $filename =~ /~$/; - return if $filename =~ m{[$dir_sep_chars]?(?:#.+#|core\.\d+|[._].*\.swp)$}o; - - return 1; -} - - -sub build_regex { - my $str = shift; - my $opt = shift; - - $str = quotemeta( $str ) if $opt->{Q}; - if ( $opt->{w} ) { - $str = "\\b$str" if $str =~ /^\w/; - $str = "$str\\b" if $str =~ /\w$/; - } - - my $regex_is_lc = $str eq lc $str; - if ( $opt->{i} || ($opt->{smart_case} && $regex_is_lc) ) { - $str = "(?i)$str"; - } - - return $str; -} - - -sub check_regex { - my $regex = shift; - - return unless defined $regex; - - eval { qr/$regex/ }; - if ($@) { - (my $error = $@) =~ s/ at \S+ line \d+.*//; - chomp($error); - App::Ack::die( "Invalid regex '$regex':\n $error" ); - } - - return; -} - - - - -sub warn { - return CORE::warn( _my_program(), ': ', @_, "\n" ); -} - - -sub die { - return CORE::die( _my_program(), ': ', @_, "\n" ); -} - -sub _my_program { - require File::Basename; - return File::Basename::basename( $0 ); -} - - - -sub filetypes_supported { - return keys %mappings; -} - -sub _get_thpppt { - my $y = q{_ /|,\\'!.x',=(www)=, U }; - $y =~ tr/,x!w/\nOo_/; - return $y; -} - -sub _thpppt { - my $y = _get_thpppt(); - App::Ack::print( "$y ack $_[0]!\n" ); - exit 0; -} - -sub _key { - my $str = lc shift; - $str =~ s/[^a-z]//g; - - return $str; -} - - -sub show_help { - my $help_arg = shift || 0; - - return show_help_types() if $help_arg =~ /^types?/; - - my $ignore_dirs = _listify( sort { _key($a) cmp _key($b) } keys %ignore_dirs ); - - App::Ack::print( <<"END_OF_HELP" ); -Usage: ack [OPTION]... PATTERN [FILE] - -Search for PATTERN in each source file in the tree from cwd on down. -If [FILES] is specified, then only those files/directories are checked. -ack may also search STDIN, but only if no FILE are specified, or if -one of FILES is "-". - -Default switches may be specified in ACK_OPTIONS environment variable or -an .ackrc file. If you want no dependency on the environment, turn it -off with --noenv. - -Example: ack -i select - -Searching: - -i, --ignore-case Ignore case distinctions in PATTERN - --[no]smart-case Ignore case distinctions in PATTERN, - only if PATTERN contains no upper case - Ignored if -i is specified - -v, --invert-match Invert match: select non-matching lines - -w, --word-regexp Force PATTERN to match only whole words - -Q, --literal Quote all metacharacters; PATTERN is literal - -Search output: - --line=NUM Only print line(s) NUM of each file - -l, --files-with-matches - Only print filenames containing matches - -L, --files-without-matches - Only print filenames with no matches - -o Show only the part of a line matching PATTERN - (turns off text highlighting) - --passthru Print all lines, whether matching or not - --output=expr Output the evaluation of expr for each line - (turns off text highlighting) - --match PATTERN Specify PATTERN explicitly. - -m, --max-count=NUM Stop searching in each file after NUM matches - -1 Stop searching after one match of any kind - -H, --with-filename Print the filename for each match - -h, --no-filename Suppress the prefixing filename on output - -c, --count Show number of lines matching per file - --column Show the column number of the first match - - -A NUM, --after-context=NUM - Print NUM lines of trailing context after matching - lines. - -B NUM, --before-context=NUM - Print NUM lines of leading context before matching - lines. - -C [NUM], --context[=NUM] - Print NUM lines (default 2) of output context. - - --print0 Print null byte as separator between filenames, - only works with -f, -g, -l, -L or -c. - -File presentation: - --pager=COMMAND Pipes all ack output through COMMAND. For example, - --pager="less -R". Ignored if output is redirected. - --nopager Do not send output through a pager. Cancels any - setting in ~/.ackrc, ACK_PAGER or ACK_PAGER_COLOR. - --[no]heading Print a filename heading above each file's results. - (default: on when used interactively) - --[no]break Print a break between results from different files. - (default: on when used interactively) - --group Same as --heading --break - --nogroup Same as --noheading --nobreak - --[no]color Highlight the matching text (default: on unless - output is redirected, or on Windows) - --[no]colour Same as --[no]color - --color-filename=COLOR - --color-match=COLOR Set the color for matches and filenames. - --flush Flush output immediately, even when ack is used - non-interactively (when output goes to a pipe or - file). - -File finding: - -f Only print the files found, without searching. - The PATTERN must not be specified. - -g REGEX Same as -f, but only print files matching REGEX. - --sort-files Sort the found files lexically. - -File inclusion/exclusion: - -a, --all-types All file types searched; - Ignores CVS, .svn and other ignored directories - -u, --unrestricted All files and directories searched - --[no]ignore-dir=name Add/Remove directory from the list of ignored dirs - -r, -R, --recurse Recurse into subdirectories (ack's default behavior) - -n, --no-recurse No descending into subdirectories - -G REGEX Only search files that match REGEX - - --perl Include only Perl files. - --type=perl Include only Perl files. - --noperl Exclude Perl files. - --type=noperl Exclude Perl files. - See "ack --help type" for supported filetypes. - - --type-set TYPE=.EXTENSION[,.EXT2[,...]] - Files with the given EXTENSION(s) are recognized as - being of type TYPE. This replaces an existing - definition for type TYPE. - --type-add TYPE=.EXTENSION[,.EXT2[,...]] - Files with the given EXTENSION(s) are recognized as - being of (the existing) type TYPE - - --[no]follow Follow symlinks. Default is off. - - Directories ignored by default: - $ignore_dirs - - Files not checked for type: - /~\$/ - Unix backup files - /#.+#\$/ - Emacs swap files - /[._].*\\.swp\$/ - Vi(m) swap files - /core\\.\\d+\$/ - core dumps - -Miscellaneous: - --noenv Ignore environment variables and ~/.ackrc - --help This help - --man Man page - --version Display version & copyright - --thpppt Bill the Cat - -Exit status is 0 if match, 1 if no match. - -This is version $VERSION of ack. -END_OF_HELP - - return; - } - - - -sub show_help_types { - App::Ack::print( <<'END_OF_HELP' ); -Usage: ack [OPTION]... PATTERN [FILES] - -The following is the list of filetypes supported by ack. You can -specify a file type with the --type=TYPE format, or the --TYPE -format. For example, both --type=perl and --perl work. - -Note that some extensions may appear in multiple types. For example, -.pod files are both Perl and Parrot. - -END_OF_HELP - - my @types = filetypes_supported(); - my $maxlen = 0; - for ( @types ) { - $maxlen = length if $maxlen < length; - } - for my $type ( sort @types ) { - next if $type =~ /^-/; # Stuff to not show - my $ext_list = $mappings{$type}; - - if ( ref $ext_list ) { - $ext_list = join( ' ', map { ".$_" } @{$ext_list} ); - } - App::Ack::print( sprintf( " --[no]%-*.*s %s\n", $maxlen, $maxlen, $type, $ext_list ) ); - } - - return; -} - -sub _listify { - my @whats = @_; - - return '' if !@whats; - - my $end = pop @whats; - my $str = @whats ? join( ', ', @whats ) . " and $end" : $end; - - no warnings 'once'; - require Text::Wrap; - $Text::Wrap::columns = 75; - return Text::Wrap::wrap( '', ' ', $str ); -} - - -sub get_version_statement { - require Config; - - my $copyright = get_copyright(); - my $this_perl = $Config::Config{perlpath}; - if ($^O ne 'VMS') { - my $ext = $Config::Config{_exe}; - $this_perl .= $ext unless $this_perl =~ m/$ext$/i; - } - my $ver = sprintf( '%vd', $^V ); - - return <<"END_OF_VERSION"; -ack $VERSION -Running under Perl $ver at $this_perl - -$copyright - -This program is free software; you can redistribute it and/or modify -it under the terms of either: the GNU General Public License as -published by the Free Software Foundation; or the Artistic License. -END_OF_VERSION -} - - -sub print_version_statement { - App::Ack::print( get_version_statement() ); - - return; -} - - -sub get_copyright { - return $COPYRIGHT; -} - - -sub load_colors { - eval 'use Term::ANSIColor ()'; - - $ENV{ACK_COLOR_MATCH} ||= 'black on_yellow'; - $ENV{ACK_COLOR_FILENAME} ||= 'bold green'; - - return; -} - - -sub is_interesting { - return if /^\./; - - my $include; - - for my $type ( filetypes( $File::Next::name ) ) { - if ( defined $type_wanted{$type} ) { - if ( $type_wanted{$type} ) { - $include = 1; - } - else { - return; - } - } - } - - return $include; -} - - - -# print subs added in order to make it easy for a third party -# module (such as App::Wack) to redefine the display methods -# and show the results in a different way. -sub print { print {$fh} @_ } -sub print_first_filename { App::Ack::print( $_[0], "\n" ) } -sub print_blank_line { App::Ack::print( "\n" ) } -sub print_separator { App::Ack::print( "--\n" ) } -sub print_filename { App::Ack::print( $_[0], $_[1] ) } -sub print_line_no { App::Ack::print( $_[0], $_[1] ) } -sub print_column_no { App::Ack::print( $_[0], $_[1] ) } -sub print_count { - my $filename = shift; - my $nmatches = shift; - my $ors = shift; - my $count = shift; - - App::Ack::print( $filename ); - App::Ack::print( ':', $nmatches ) if $count; - App::Ack::print( $ors ); -} - -sub print_count0 { - my $filename = shift; - my $ors = shift; - - App::Ack::print( $filename, ':0', $ors ); -} - - - -{ - my $filename; - my $regex; - my $display_filename; - - my $keep_context; - - my $last_output_line; # number of the last line that has been output - my $any_output; # has there been any output for the current file yet - my $context_overall_output_count; # has there been any output at all - -sub search_resource { - my $res = shift; - my $opt = shift; - - $filename = $res->name(); - - my $v = $opt->{v}; - my $passthru = $opt->{passthru}; - my $max = $opt->{m}; - my $nmatches = 0; - - $display_filename = undef; - - # for --line processing - my $has_lines = 0; - my @lines; - if ( defined $opt->{lines} ) { - $has_lines = 1; - @lines = ( @{$opt->{lines}}, -1 ); - undef $regex; # Don't match when printing matching line - } - else { - $regex = qr/$opt->{regex}/; - } - - # for context processing - $last_output_line = -1; - $any_output = 0; - my $before_context = $opt->{before_context}; - my $after_context = $opt->{after_context}; - - $keep_context = ($before_context || $after_context) && !$passthru; - - my @before; - my $before_starts_at_line; - my $after = 0; # number of lines still to print after a match - - while ( $res->next_text ) { - # XXX Optimize away the case when there are no more @lines to find. - # XXX $has_lines, $passthru and $v never change. Optimize. - if ( $has_lines - ? $. != $lines[0] # $lines[0] should be a scalar - : $v ? m/$regex/ : !m/$regex/ ) { - if ( $passthru ) { - App::Ack::print( $_ ); - next; - } - - if ( $keep_context ) { - if ( $after ) { - print_match_or_context( $opt, 0, $., $-[0], $+[0], $_ ); - $after--; - } - elsif ( $before_context ) { - if ( @before ) { - if ( @before >= $before_context ) { - shift @before; - ++$before_starts_at_line; - } - } - else { - $before_starts_at_line = $.; - } - push @before, $_; - } - last if $max && ( $nmatches >= $max ) && !$after; - } - next; - } # not a match - - ++$nmatches; - - # print an empty line as a divider before first line in each file (not before the first file) - if ( !$any_output && $opt->{show_filename} && $opt->{break} && defined( $context_overall_output_count ) ) { - App::Ack::print_blank_line(); - } - - shift @lines if $has_lines; - - if ( $res->is_binary ) { - App::Ack::print( "Binary file $filename matches\n" ); - last; - } - if ( $keep_context ) { - if ( @before ) { - print_match_or_context( $opt, 0, $before_starts_at_line, $-[0], $+[0], @before ); - @before = (); - $before_starts_at_line = 0; - } - if ( $max && $nmatches > $max ) { - --$after; - } - else { - $after = $after_context; - } - } - print_match_or_context( $opt, 1, $., $-[0], $+[0], $_ ); - - last if $max && ( $nmatches >= $max ) && !$after; - } # while - - return $nmatches; -} # search_resource() - - - -sub print_match_or_context { - my $opt = shift; # opts array - my $is_match = shift; # is there a match on the line? - my $line_no = shift; - my $match_start = shift; - my $match_end = shift; - - my $color = $opt->{color}; - my $heading = $opt->{heading}; - my $show_filename = $opt->{show_filename}; - my $show_column = $opt->{column}; - - if ( $show_filename ) { - if ( not defined $display_filename ) { - $display_filename = - $color - ? Term::ANSIColor::colored( $filename, $ENV{ACK_COLOR_FILENAME} ) - : $filename; - if ( $heading && !$any_output ) { - App::Ack::print_first_filename($display_filename); - } - } - } - - my $sep = $is_match ? ':' : '-'; - my $output_func = $opt->{output}; - for ( @_ ) { - if ( $keep_context && !$output_func ) { - if ( ( $last_output_line != $line_no - 1 ) && - ( $any_output || ( !$heading && defined( $context_overall_output_count ) ) ) ) { - App::Ack::print_separator(); - } - # to ensure separators between different files when --noheading - - $last_output_line = $line_no; - } - - if ( $show_filename ) { - App::Ack::print_filename($display_filename, $sep) if not $heading; - App::Ack::print_line_no($line_no, $sep); - } - - if ( $output_func ) { - while ( /$regex/go ) { - App::Ack::print( $output_func->() . "\n" ); - } - } - else { - if ( $color && $is_match && $regex && - s/$regex/Term::ANSIColor::colored( substr($_, $-[0], $+[0] - $-[0]), $ENV{ACK_COLOR_MATCH} )/eg ) { - # At the end of the line reset the color and remove newline - s/[\r\n]*\z/\e[0m\e[K/; - } - else { - # remove any kind of newline at the end of the line - s/[\r\n]*\z//; - } - if ( $show_column ) { - App::Ack::print_column_no( $match_start+1, $sep ); - } - App::Ack::print($_ . "\n"); - } - $any_output = 1; - ++$context_overall_output_count; - ++$line_no; - } - - return; -} # print_match_or_context() - -} # scope around search_resource() and print_match_or_context() - - - -sub search_and_list { - my $res = shift; - my $opt = shift; - - my $nmatches = 0; - my $count = $opt->{count}; - my $ors = $opt->{print0} ? "\0" : "\n"; # output record separator - - my $regex = qr/$opt->{regex}/; - - if ( $opt->{v} ) { - while ( $res->next_text ) { - if ( /$regex/ ) { - return 0 unless $count; - } - else { - ++$nmatches; - } - } - } - else { - while ( $res->next_text ) { - if ( /$regex/ ) { - ++$nmatches; - last unless $count; - } - } - } - - if ( $nmatches ) { - App::Ack::print_count( $res->name, $nmatches, $ors, $count ); - } - elsif ( $count && !$opt->{l} ) { - App::Ack::print_count0( $res->name, $ors ); - } - - return $nmatches ? 1 : 0; -} # search_and_list() - - - -sub filetypes_supported_set { - return grep { defined $type_wanted{$_} && ($type_wanted{$_} == 1) } filetypes_supported(); -} - - - -sub print_files { - my $iter = shift; - my $opt = shift; - - my $ors = $opt->{print0} ? "\0" : "\n"; - - while ( defined ( my $file = $iter->() ) ) { - App::Ack::print $file, $ors; - last if $opt->{1}; - } - - return; -} - - -sub print_files_with_matches { - my $iter = shift; - my $opt = shift; - - my $nmatches = 0; - while ( defined ( my $filename = $iter->() ) ) { - my $repo = App::Ack::Repository::Basic->new( $filename ); - my $res; - while ( $res = $repo->next_resource() ) { - $nmatches += search_and_list( $res, $opt ); - $res->close(); - last if $nmatches && $opt->{1}; - } - $repo->close(); - } - - return $nmatches; -} - - -sub print_matches { - my $iter = shift; - my $opt = shift; - - $opt->{show_filename} = 0 if $opt->{h}; - $opt->{show_filename} = 1 if $opt->{H}; - - my $nmatches = 0; - while ( defined ( my $filename = $iter->() ) ) { - my $repo; - my $tarballs_work = 0; - if ( $tarballs_work && $filename =~ /\.tar\.gz$/ ) { - App::Ack::die( 'Not working here yet' ); - require App::Ack::Repository::Tar; # XXX Error checking - $repo = App::Ack::Repository::Tar->new( $filename ); - } - else { - $repo = App::Ack::Repository::Basic->new( $filename ); - } - $repo or next; - - while ( my $res = $repo->next_resource() ) { - my $needs_line_scan; - if ( $opt->{regex} && !$opt->{passthru} ) { - $needs_line_scan = $res->needs_line_scan( $opt ); - if ( $needs_line_scan ) { - $res->reset(); - } - } - else { - $needs_line_scan = 1; - } - if ( $needs_line_scan ) { - $nmatches += search_resource( $res, $opt ); - } - $res->close(); - } - last if $nmatches && $opt->{1}; - $repo->close(); - } - return $nmatches; -} - - -sub filetype_setup { - my $filetypes_supported_set = filetypes_supported_set(); - # If anyone says --no-whatever, we assume all other types must be on. - if ( !$filetypes_supported_set ) { - for my $i ( keys %type_wanted ) { - $type_wanted{$i} = 1 unless ( defined( $type_wanted{$i} ) || $i eq 'binary' || $i eq 'text' || $i eq 'skipped' ); - } - } - return; -} - - -EXPAND_FILENAMES_SCOPE: { - my $filter; - - sub expand_filenames { - my $argv = shift; - - my $attr; - my @files; - - foreach my $pattern ( @{$argv} ) { - my @results = bsd_glob( $pattern ); - - if (@results == 0) { - @results = $pattern; # Glob didn't match, pass it thru unchanged - } - elsif ( (@results > 1) or ($results[0] ne $pattern) ) { - if (not defined $filter) { - eval 'require Win32::File;'; - if ($@) { - $filter = 0; - } - else { - $filter = Win32::File::HIDDEN()|Win32::File::SYSTEM(); - } - } # end unless we've tried to load Win32::File - if ( $filter ) { - # Filter out hidden and system files: - @results = grep { not(Win32::File::GetAttributes($_, $attr) and $attr & $filter) } @results; - App::Ack::warn( "$pattern: Matched only hidden files" ) unless @results; - } # end if we can filter by file attributes - } # end elsif this pattern got expanded - - push @files, @results; - } # end foreach pattern - - return \@files; - } # end expand_filenames -} # EXPAND_FILENAMES_SCOPE - - - -sub get_starting_points { - my $argv = shift; - my $opt = shift; - - my @what; - - if ( @{$argv} ) { - @what = @{ $is_windows ? expand_filenames($argv) : $argv }; - $_ = File::Next::reslash( $_ ) for @what; - - # Show filenames unless we've specified one single file - $opt->{show_filename} = (@what > 1) || (!-f $what[0]); - } - else { - @what = '.'; # Assume current directory - $opt->{show_filename} = 1; - } - - for my $start_point (@what) { - App::Ack::warn( "$start_point: No such file or directory" ) unless -e $start_point; - } - return \@what; -} - - - -sub get_iterator { - my $what = shift; - my $opt = shift; - - # Starting points are always searched, no matter what - my %starting_point = map { ($_ => 1) } @{$what}; - - my $g_regex = defined $opt->{G} ? qr/$opt->{G}/ : undef; - my $file_filter; - - if ( $g_regex ) { - $file_filter - = $opt->{u} ? sub { $File::Next::name =~ /$g_regex/ } # XXX Maybe this should be a 1, no? - : $opt->{all} ? sub { $starting_point{ $File::Next::name } || ( $File::Next::name =~ /$g_regex/ && is_searchable( $File::Next::name ) ) } - : sub { $starting_point{ $File::Next::name } || ( $File::Next::name =~ /$g_regex/ && is_interesting( @_ ) ) } - ; - } - else { - $file_filter - = $opt->{u} ? sub {1} - : $opt->{all} ? sub { $starting_point{ $File::Next::name } || is_searchable( $File::Next::name ) } - : sub { $starting_point{ $File::Next::name } || is_interesting( @_ ) } - ; - } - - my $descend_filter - = $opt->{n} ? sub {0} - : $opt->{u} ? sub {1} - : \&ignoredir_filter; - - my $iter = - File::Next::files( { - file_filter => $file_filter, - descend_filter => $descend_filter, - error_handler => sub { my $msg = shift; App::Ack::warn( $msg ) }, - sort_files => $opt->{sort_files}, - follow_symlinks => $opt->{follow}, - }, @{$what} ); - return $iter; -} - - -sub set_up_pager { - my $command = shift; - - return unless App::Ack::output_to_pipe(); - - my $pager; - if ( not open( $pager, '|-', $command ) ) { - App::Ack::die( qq{Unable to pipe to pager "$command": $!} ); - } - $fh = $pager; - - return; -} - - -sub input_from_pipe { - return $input_from_pipe; -} - - - -sub output_to_pipe { - return $output_to_pipe; -} - - - -1; # End of App::Ack -package App::Ack::Repository; - - -use warnings; -use strict; - -sub FAIL { - require Carp; - Carp::confess( 'Must be overloaded' ); -} - - -sub new { - FAIL(); -} - - -sub next_resource { - FAIL(); -} - - -sub close { - FAIL(); -} - -1; -package App::Ack::Resource; - - -use warnings; -use strict; - -sub FAIL { - require Carp; - Carp::confess( 'Must be overloaded' ); -} - - -sub new { - FAIL(); -} - - -sub name { - FAIL(); -} - - -sub is_binary { - FAIL(); -} - - - -sub needs_line_scan { - FAIL(); -} - - -sub reset { - FAIL(); -} - - -sub next_text { - FAIL(); -} - - -sub close { - FAIL(); -} - -1; -package App::Ack::Plugin::Basic; - - - -package App::Ack::Resource::Basic; - - -use warnings; -use strict; - - -our @ISA = qw( App::Ack::Resource ); - - -sub new { - my $class = shift; - my $filename = shift; - - my $self = bless { - filename => $filename, - fh => undef, - could_be_binary => undef, - opened => undef, - id => undef, - }, $class; - - if ( $self->{filename} eq '-' ) { - $self->{fh} = *STDIN; - $self->{could_be_binary} = 0; - } - else { - if ( !open( $self->{fh}, '<', $self->{filename} ) ) { - App::Ack::warn( "$self->{filename}: $!" ); - return; - } - $self->{could_be_binary} = 1; - } - - return $self; -} - - -sub name { - my $self = shift; - - return $self->{filename}; -} - - -sub is_binary { - my $self = shift; - - if ( $self->{could_be_binary} ) { - return -B $self->{filename}; - } - - return 0; -} - - - -sub needs_line_scan { - my $self = shift; - my $opt = shift; - - return 1 if $opt->{v}; - - my $size = -s $self->{fh}; - if ( $size == 0 ) { - return 0; - } - elsif ( $size > 100_000 ) { - return 1; - } - - my $buffer; - my $rc = sysread( $self->{fh}, $buffer, $size ); - if ( not defined $rc ) { - App::Ack::warn( "$self->{filename}: $!" ); - return 1; - } - return 0 unless $rc && ( $rc == $size ); - - my $regex = $opt->{regex}; - return $buffer =~ /$regex/m; -} - - -sub reset { - my $self = shift; - - seek( $self->{fh}, 0, 0 ) - or App::Ack::warn( "$self->{filename}: $!" ); - - return; -} - - -sub next_text { - if ( defined ($_ = readline $_[0]->{fh}) ) { - $. = ++$_[0]->{line}; - return 1; - } - - return; -} - - -sub close { - my $self = shift; - - if ( not close $self->{fh} ) { - App::Ack::warn( $self->name() . ": $!" ); - } - - return; -} - -package App::Ack::Repository::Basic; - - -our @ISA = qw( App::Ack::Repository ); - - -use warnings; -use strict; - -sub new { - my $class = shift; - my $filename = shift; - - my $self = bless { - filename => $filename, - nexted => 0, - }, $class; - - return $self; -} - - -sub next_resource { - my $self = shift; - - return if $self->{nexted}; - $self->{nexted} = 1; - - return App::Ack::Resource::Basic->new( $self->{filename} ); -} - - -sub close { -} - - - -1; diff --git a/amavisd-milter/PKGBUILD b/amavisd-milter/PKGBUILD deleted file mode 100644 index 1a96459..0000000 --- a/amavisd-milter/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Contributor: Florian "Bluewind" Pritz <flo@xssn.at> -pkgname=amavisd-milter -pkgver=1.4.0 -pkgrel=1 -pkgdesc="" -arch=('i686' 'x86_64') -url="http://amavisd-milter.sourceforge.net/" -license=('GPL') -groups=() -depends=() -makedepends=() -provides=() -conflicts=() -replaces=() -backup=() -options=() -install= -source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz) -noextract=() - -build() { - cd "$srcdir/$pkgname-$pkgver" - - ./configure --prefix=/usr - make || return 1 - make DESTDIR="$pkgdir/" install -} - -# vim:set ts=2 sw=2 et: -md5sums=('848e96dc5829fdc50344f87ee37564c5') -sha1sums=('d4cf66bbb486a4368b80ac26c812c246804b81a7') diff --git a/amavisd-new/PKGBUILD b/amavisd-new/PKGBUILD deleted file mode 100644 index 88f8c3d..0000000 --- a/amavisd-new/PKGBUILD +++ /dev/null @@ -1,47 +0,0 @@ -# Contributor: Piotr Beling <qwak@stud.ics.p.lodz.pl> -# Based on amavisd-new by: -# Contributor: Wael Nasreddine <wael@phoenixlinux.org> -# Maintainer: Guillermo A. Amaral <me@guillermoamaral.com> (thewonka) - -pkgname='amavisd-new' -pkgver='2.6.4' -pkgrel=2 -pkgdesc='A high-performance interface between mailer (MTA) and content checkers. Written in Perl for maintainability.' -url='http://www.ijs.si/software/amavisd/' -arch=('any') -privides=('amavisdnew') -conflicts=('amavisdnew') -replaces=('amavisdnew') -backup=('etc/amavisd/amavisd.conf') -depends=('perl' 'perl-mime-tools' 'perl-archive-tar' 'perl-archive-zip' 'perl-compress-zlib' 'perl-net-server' 'perl-io-stringy' 'perl-berkeleydb' 'perl-unix-syslog' 'perl-convert-tnef' 'perl-convert-uulib' 'perl-crypt-openssl-rsa') -#'perl-mail-dkim>0.31' #enable it when possible -source=("http://www.ijs.si/software/amavisd/amavisd-new-${pkgver}.tar.gz" 'amavisd') -install=${pkgname}.install -license=('GPL') - -build() -{ - cd ${startdir}/src/amavisd-new-${pkgver} - - sed -i \ - -e "s/\\\$daemon_user = 'vscan'/\\\$daemon_user = 'amavis'/g" \ - -e "s/\\\$daemon_group = 'vscan'/\\\$daemon_group = 'amavis'/g" \ - -e "sX# \\\$MYHOME = '/var/amavis'X\\\$MYHOME = '/home/amavis'Xg" \ - -e "sX\\\$QUARANTINEDIR = '/var/virusmails'X\\\$QUARANTINEDIR = '/home/amavis/quarantine'Xg" \ - amavisd.conf - - #must disable dkim ver. now becouse perl dkim package in comunity is old - sed -i \ - -e "s/\\\$enable_dkim_verification = 1/\\\$enable_dkim_verification = 0/g" \ - -e "s/\\\$enable_dkim_signing = 1/\\\$enable_dkim_signing = 0/g" \ - amavisd.conf - - install -D -m755 amavisd ${startdir}/pkg/usr/sbin/amavisd || return 1 - install -D -m644 amavisd.conf ${startdir}/pkg/etc/amavisd/amavisd.conf || return 1 - install -D -m644 amavisd.conf-default ${startdir}/pkg/etc/amavisd/amavisd.conf-default || return 1 - install -D -m644 amavisd.conf-sample ${startdir}/pkg/etc/amavisd/amavisd.conf-sample || return 1 - install -D -m755 ${startdir}/src/amavisd ${startdir}/pkg/etc/rc.d/amavisd || return 1 -} - -md5sums=('03d31657f14cd64c1cb38786214234b4' - '160b24ef7742babe70832ecdc44fcd52') diff --git a/amavisd-new/amavisd b/amavisd-new/amavisd deleted file mode 100644 index 3061535..0000000 --- a/amavisd-new/amavisd +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -DAEMON_CONF="/etc/amavisd/amavisd.conf" - -PID=`pidof -o %PPID amavisd` - -case "$1" in - - start) - - stat_busy "Starting amavisd" - - [ -z "$PID" ] && /usr/sbin/amavisd -c ${DAEMON_CONF} &> /dev/null - - if [ $? -gt 0 ]; then - - stat_fail - - else - - add_daemon amavisd - - stat_done - - fi - - ;; - - stop) - - stat_busy "Stopping amavisd" - - [ ! -z "$PID" ] && kill $PID &> /dev/null - - if [ $? -gt 0 ]; then - - stat_fail - - else - - rm_daemon amavisd - stat_done - - fi - - ;; - - restart) - - $0 stop - - sleep 3 - - $0 start - - ;; - - reload) - - stat_busy "Reloading amavisd" - - /usr/sbin/amavisd -c ${DAEMON_CONF} reload - - stat_done - - ;; - - *) - echo "usage: $0 {start|stop|restart|reload}" - ;; - -esac - -exit 0 diff --git a/amavisd-new/amavisd-new.install b/amavisd-new/amavisd-new.install deleted file mode 100644 index afa5b2e..0000000 --- a/amavisd-new/amavisd-new.install +++ /dev/null @@ -1,35 +0,0 @@ -post_install() -{ - - [ -z "`grep '^amavis::' /etc/group`" ] && groupadd -g 333 amavis >& /dev/null - - [ -z "`grep '^amavis:' /etc/passwd`" ] && useradd -u 333 -d /home/amavis -g amavis -s /bin/false amavis - - [ ! -d /home/amavis ] && mkdir /home/amavis - - [ ! -d /home/amavis/tmp ] && mkdir /home/amavis/tmp - - [ ! -d /home/amavis/var ] && mkdir /home/amavis/var - - [ ! -d /home/amavis/db ] && mkdir /home/amavis/db - - [ ! -d /home/amavis/quarantine ] && mkdir /home/amavis/quarantine - - chown -R amavis:amavis /home/amavis - - chmod -R 750 /home/amavis - -} - -post_upgrade() -{ - - post_install - -} - -op=$1 - -shift - -$op $* diff --git a/apcupsd-cli/PKGBUILD b/apcupsd-cli/PKGBUILD deleted file mode 100644 index ba47f08..0000000 --- a/apcupsd-cli/PKGBUILD +++ /dev/null @@ -1,36 +0,0 @@ -# $Id: PKGBUILD 8842 2010-01-21 22:55:25Z spupykin $ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> -# Maintainer: Todd Musall <tmusall@comcast.net> - -pkgname=apcupsd-cli -_orig=apcupsd -pkgver=3.14.8 -pkgrel=1 -pkgdesc="Apcupsd version without GUI and webinterface" -arch=(i686 x86_64) -url="http://www.apcupsd.org" -license=('GPL') -depends=('gcc-libs') -makedepends=('pkgconfig') -conflicts=('apcupsd') -backup=(etc/apcupsd/apcupsd.conf etc/apcupsd/hosts.conf \ - etc/apcupsd/multimon.conf) -source=(http://downloads.sourceforge.net/apcupsd/$_orig-$pkgver.tar.gz \ - apcupsd) -md5sums=('cd17f0a903dc2220e55ed54e242359d2' - '5eae3c4d921eeb81798a0250fe3dd111') - -build() { - cd $startdir/src/$_orig-$pkgver - ./configure --prefix=/usr --libexecdir=/usr/lib/$_orig \ - --enable-usb --enable-net \ - --with-upstype=usb --with-upscable=usb \ - --with-serial-dev=/dev/usb/hid/hiddev[0-9] \ - --enable-pthreads - - make || return 1 - make DESTDIR=$startdir/pkg install || return 1 - - install -D -m755 ../apcupsd $startdir/pkg/etc/rc.d/apcupsd && \ - chmod 755 $startdir/pkg/sbin/* -} diff --git a/apcupsd-cli/apcupsd b/apcupsd-cli/apcupsd deleted file mode 100755 index 3cd5c9d..0000000 --- a/apcupsd-cli/apcupsd +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /sbin/apcupsd` -case "$1" in - start) - stat_busy "Starting APCUPSD Daemon" - rm -f /etc/apcupsd/powerfail - rm -f /etc/nologin - [ -z "$PID" ] && /sbin/apcupsd -f /etc/apcupsd/apcupsd.conf - if [ $? -gt 0 ]; then - stat_fail - else - PID=`pidof -o %PPID /sbin/apcupsd` - echo $PID > /var/run/apcupsd.pid - add_daemon apcupsd - stat_done - fi - ;; - stop) - stat_busy "Stopping APCUPSD Daemon" - [ ! -z "$PID" ] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm /var/run/apcupsd.pid - rm_daemon apcupsd - stat_done - fi - ;; - restart) - $0 stop - sleep 2 - $0 start - ;; - status) - /sbin/apcaccess status - ;; - *) - echo "usage: $0 {start|stop|restart|status}" -esac -exit 0 diff --git a/apeinfo/PKGBUILD b/apeinfo/PKGBUILD deleted file mode 100644 index 54d9079..0000000 --- a/apeinfo/PKGBUILD +++ /dev/null @@ -1,37 +0,0 @@ -# Maintainer: Your Name <youremail@domain.com> -pkgname=apeinfo -pkgver=1.1 -pkgrel=1 -pkgdesc="display tag data and audio format information for APE (Monkey's Audio) files" -arch=(i686 x86_64) -url="http://www.legroom.net/software/apeinfo" -license=('GPL') -groups=() -depends=(mac) -makedepends=() -optdepends=() -provides=() -conflicts=() -replaces=() -backup=() -options=() -install= -changelog= -source=(http://www.legroom.net/files/software/apeinfo11_source.tgz) -noextract=() -md5sums=() #generate with 'makepkg -g' - -build() { - cd "$srcdir" - - g++ ${CXXFLAGS} -I/usr/include/mac/ -lmac apeinfo.cpp -o apeinfo -} - -package() { - cd "$srcdir" - - install -Dm755 apeinfo "$pkgdir/usr/bin/apeinfo" -} - -# vim:set ts=2 sw=2 et: -md5sums=('108476a3ec2e9d909dc0810204a2cbe9') diff --git a/arno-iptables-firewall/PKGBUILD b/arno-iptables-firewall/PKGBUILD deleted file mode 100644 index c6aa888..0000000 --- a/arno-iptables-firewall/PKGBUILD +++ /dev/null @@ -1,67 +0,0 @@ -# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org> -# Contributor: Arto Puranen <purcher@gmail.com> - -pkgname=arno-iptables-firewall -pkgver=1.9.2k -pkgrel=1 -pkgdesc="A secure stateful firewall for both single and multi-homed machine" -arch=('i686' 'x86_64') -url=("http://rocky.eld.leidenuniv.nl/joomla/") -license=('GPL') -depends=('iptables' 'iproute2') -makedepends=('patch') -backup=(etc/${pkgname}/firewall.conf - etc/${pkgname}/custom-rules - etc/${pkgname}/plugins/dmz-dnat.conf - etc/${pkgname}/plugins/dsl-ppp-modem.conf - etc/${pkgname}/plugins/dyndns-host-open.conf - etc/${pkgname}/plugins/ids-protection.conf - etc/${pkgname}/plugins/ipsec-vpn.conf - etc/${pkgname}/plugins/ipv6-over-ipv4.conf - etc/${pkgname}/plugins/linux-upnp-igd.conf - etc/${pkgname}/plugins/mac-address-filter.conf - etc/${pkgname}/plugins/multiroute.conf - etc/${pkgname}/plugins/sip-voip.conf - etc/${pkgname}/plugins/ssh-brute-force-protection.conf - etc/${pkgname}/plugins/traffic-accounting.conf - etc/${pkgname}/plugins/traffic-shaper.conf - etc/${pkgname}/plugins/transparent-dnat.conf - etc/${pkgname}/plugins/transparent-proxy.conf) -source=(http://rocky.eld.leidenuniv.nl/${pkgname}/${pkgname}_${pkgver}.tar.gz \ - ${pkgname}.script \ - ${pkgname}.patch) -md5sums=('deb2d96773c72667a0279cb1ee3f163c' - '0c3de10c23359728a3bd90a521d3eebc' - '0293d8034bd83cf88bc914f875f7dca6') - -build() { - cd ${srcdir}/${pkgname}_${pkgver} - -# patch - patch -Np0 -i ${srcdir}/${pkgname}.patch || return 1 - -# conf files - install -d -m 0755 etc/${pkgname}/plugins/ ${pkgdir}/etc/${pkgname}/plugins/ || return 1 - for i in `find etc/${pkgname} -type f`; do install -T -m 0600 $i ${pkgdir}/$i ;done - install -D -m 0644 share/${pkgname}/environment ${pkgdir}/usr/share/${pkgname}/environment || return 1 - -# plugins - install -d -m 0755 share/${pkgname}/plugins/ ${pkgdir}/usr/share/${pkgname}/plugins/ || return 1 - for i in share/${pkgname}/plugins/*plugin; do install -T -m 0644 $i ${pkgdir}/usr/$i ;done - install -D -m 0744 share/${pkgname}/plugins/dyndns-host-open-helper ${pkgdir}/usr/share/${pkgname}/plugins/dyndns-host-open-helper || return 1 - install -D -m 0744 share/${pkgname}/plugins/traffic-accounting-helper ${pkgdir}/usr/share/${pkgname}/plugins/traffic-accounting-helper || return 1 - install -D -m 0744 share/${pkgname}/plugins/traffic-accounting-log-rotate ${pkgdir}/usr/share/${pkgname}/plugins/traffic-accounting-log-rotate || return 1 - install -D -m 0744 share/${pkgname}/plugins/traffic-accounting-show ${pkgdir}/usr/share/${pkgname}/plugins/traffic-accounting-show || return 1 - -# binary - install -D -m 0744 bin/${pkgname} ${pkgdir}/usr/sbin/${pkgname} || return 1 - install -D -m 0744 bin/arno-fwfilter ${pkgdir}/usr/sbin/arno-fwfilter || return 1 - install -D -m 0744 contrib/adsl-failover ${pkgdir}/usr/sbin/adsl-failover || return 1 - -# man files - install -D -m 0644 share/man/man1/arno-fwfilter.1 ${pkgdir}/usr/share/man/man1/arno-fwfilter.1 || return 1 - install -D -m 0644 share/man/man8/${pkgname}.8 ${pkgdir}/usr/share/man/man8/${pkgname}.8 || return 1 - -# daemon script - install -D -m 0744 ${srcdir}/${pkgname}.script ${pkgdir}/etc/rc.d/${pkgname} || return 1 -} diff --git a/arno-iptables-firewall/arno-iptables-firewall.patch b/arno-iptables-firewall/arno-iptables-firewall.patch deleted file mode 100644 index 6acd49b..0000000 --- a/arno-iptables-firewall/arno-iptables-firewall.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- etc/arno-iptables-firewall/firewall.conf.orig 2010-02-26 08:09:05.000000000 +0100 -+++ etc/arno-iptables-firewall/firewall.conf 2010-03-17 14:09:02.000000000 +0100 -@@ -185,20 +185,20 @@ - # (EXPERT SETTING!) Location of the iptables-binary (use 'locate iptables' or - # 'whereis iptables' to manually locate it), required for (default) IPv4 support - # ----------------------------------------------------------------------------- --IP4TABLES="/sbin/iptables" -+IP4TABLES="/usr/sbin/iptables" - - # (EXPERT SETTING!) Location of the ip6tables-binary (use 'locate ip6tables' or - # 'whereis ip6tables' to manually locate it), required for IPv6 support - # ----------------------------------------------------------------------------- --IP6TABLES="/sbin/ip6tables" -+IP6TABLES="/usr/sbin/ip6tables" - - # (EXPERT SETTING!) Location of the environment file - # ----------------------------------------------------------------------------- --ENV_FILE="/usr/local/share/arno-iptables-firewall/environment" -+ENV_FILE="/usr/share/arno-iptables-firewall/environment" - - # (EXPERT SETTING!) Location of plugin binary & config files - # ----------------------------------------------------------------------------- --PLUGIN_BIN_PATH="/usr/local/share/arno-iptables-firewall/plugins" -+PLUGIN_BIN_PATH="/usr/share/arno-iptables-firewall/plugins" - PLUGIN_CONF_PATH="/etc/arno-iptables-firewall/plugins" - - # Most people don't want to get any firewall logs being spit to the console. diff --git a/arno-iptables-firewall/arno-iptables-firewall.script b/arno-iptables-firewall/arno-iptables-firewall.script deleted file mode 100644 index 9607c0a..0000000 --- a/arno-iptables-firewall/arno-iptables-firewall.script +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# general config -. /etc/rc.conf -. /etc/rc.d/functions - -case "$1" in - start) - stat_busy "Starting Arno's Iptables Firewall Daemon" - /usr/sbin/arno-iptables-firewall start &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon arno-iptables-firewall - stat_done - fi - ;; - stop) - stat_busy "Stopping Arno's Iptables Firewall Daemon" - /usr/sbin/arno-iptables-firewall stop &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon arno-iptables-firewall - stat_done - fi - ;; - restart) - $0 stop - sleep 3 - $0 start - ;; - status) - /usr/sbin/arno-iptables-firewall status - ;; - debug_start) - stat_busy "Starting Arno's Iptables Firewall Daemon" - /usr/sbin/arno-iptables-firewall start - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon arno-iptables-firewall - stat_done - fi - ;; - debug_stop) - stat_busy "Stopping Arno's Iptables Firewall Daemon" - /usr/sbin/arno-iptables-firewall stop - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon arno-iptables-firewall - stat_done - fi - ;; - debug_restart) - $0 debug_stop - sleep 3 - $0 debug_start - ;; - *) - echo "usage: $0 {start|stop|restart|status|debug_start|debug_stop|debug_restart}" -esac diff --git a/awstats/PKGBUILD b/awstats/PKGBUILD deleted file mode 100644 index a98377a..0000000 --- a/awstats/PKGBUILD +++ /dev/null @@ -1,65 +0,0 @@ -# Maintainer: Phillip Smith <fukawi2@NOSPAM.gmail.com -# Contributor: Piotr Beling <qwak@w8.pl> - -pkgname=awstats -pkgver=6.95 -pkgrel=1 -pkgdesc="tool that generates web, streaming, ftp and mail server statistics, graphically" -arch=('any') -license='GPL' -url="http://awstats.sourceforge.net/" -depends=('perl') -install="awstats.install" -backup=('etc/awstats/awstats.model.conf' 'etc/httpd/conf/extra/httpd-awstats.conf') -source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz" "cron.awstats") -md5sums=('26a5b19fa9f395e9e7dafed37b795d7f' - '2103e3d97f8b4ff31cd4022c4ee839f7') - -build() { - msg "Nothing to compile for $pkgname" -} - -package() { - _SYSCONFDIR='etc' - _WWWROOT='srv/http/awstats' - _INSTDIR="usr/share/${pkgname}" - _DOCDIR="usr/share/doc/${pkgname}-${pkgver}" - - cd $srcdir/${pkgname}-${pkgver} - - mkdir -p $pkgdir/$_INSTDIR/tools/webmin/ || return 1 - mkdir -p $pkgdir/$_INSTDIR/tools/xslt/ || return 1 - mkdir -p $pkgdir/$_WWWROOT/ || return 1 - mkdir -p $pkgdir/$_DOCDIR/ || return 1 - mkdir -p $pkgdir/var/lib/$pkgname || return 1 - - # Arch Linux specific path: - install -Dm644 tools/httpd_conf $pkgdir/${_SYSCONFDIR}/httpd/conf/extra/httpd-awstats.conf || return 1 - install -Dm744 $srcdir/cron.awstats $pkgdir/${_SYSCONFDIR}/cron.hourly/awstats || return 1 - - install -m 755 tools/logresolvemerge.pl $pkgdir/$_INSTDIR/tools/logresolvemerge.pl || return 1 - install -m 755 tools/maillogconvert.pl $pkgdir/$_INSTDIR/tools/maillogconvert.pl || return 1 - install -m 755 tools/urlaliasbuilder.pl $pkgdir/$_INSTDIR/tools/urlaliasbuilder.pl || return 1 - install -m 755 tools/awstats_buildstaticpages.pl $pkgdir/$_INSTDIR/tools/awstats_buildstaticpages.pl || return 1 - install -m 755 tools/awstats_configure.pl $pkgdir/$_INSTDIR/tools/awstats_configure.pl || return 1 - install -m 755 tools/awstats_exportlib.pl $pkgdir/$_INSTDIR/tools/awstats_exportlib.pl || return 1 - install -m 755 tools/awstats_updateall.pl $pkgdir/$_INSTDIR/tools/awstats_updateall.pl || return 1 - install -m 755 tools/webmin/* $pkgdir/$_INSTDIR/tools/webmin || return 1 - install -m 755 tools/xslt/* $pkgdir/$_INSTDIR/tools/xslt || return 1 - - # install the documentation - cp -ra docs/* $pkgdir/$_DOCDIR/ || return 1 - - # www files - cp -ra wwwroot/* $pkgdir/$_WWWROOT/ || return 1 - install -Dm444 README.TXT $pkgdir/$_INSTDIR/README.TXT || return 1 - - # fix the default http config - sed \ - -e "s|/usr/local/awstats/wwwroot|/$_WWWROOT|g" \ - -i $pkgdir/${_SYSCONFDIR}/httpd/conf/extra/httpd-awstats.conf || return 1 - - echo "deny from all" > $pkgdir/.htaccess -} - -# vim:set ts=2 sw=2 et: diff --git a/awstats/awstats b/awstats/awstats deleted file mode 100644 index 337029f..0000000 --- a/awstats/awstats +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -/usr/local/awstats/tools/awstats_updateall.pl now \ - -configdir=/etc/awstats \ - -awstatsprog=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl > /dev/null - -chmod -R og+r /var/lib/awstats diff --git a/awstats/awstats.install b/awstats/awstats.install deleted file mode 100644 index 706e826..0000000 --- a/awstats/awstats.install +++ /dev/null @@ -1,25 +0,0 @@ -# arg 1: the new package version -post_install() { -echo \(/usr/local/awstats/docs/index.html\) to setup AWStats in 3 steps: -echo Step 1 : Install and Setup with awstats_configure.pl -echo or add : Include /etc/httpd/conf/extra/httpd-awstats.conf -echo to /etc/httpd/conf/httpd.conf -echo Step 2 : Build/Update Statistics with awstats.pl -echo Step 3 : Read Statistics -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - post_install $1 - - chmod -R og+r /var/lib/awstats - chown -R web-awstats:web-awstats /var/lib/awstats -} - -op=$1 -shift - -$op $* - -# vim: ts=2: ft=sh diff --git a/awstats/cron.awstats b/awstats/cron.awstats deleted file mode 100644 index ccec1cf..0000000 --- a/awstats/cron.awstats +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -/usr/share/awstats/tools/awstats_updateall.pl now \ - -configdir=/etc/awstats \ - -awstatsprog=/srv/http/awstats/cgi-bin/awstats.pl > /dev/null - -chmod -R og+r /var/lib/awstats diff --git a/babl-git/PKGBUILD b/babl-git/PKGBUILD deleted file mode 100644 index 6e7c00e..0000000 --- a/babl-git/PKGBUILD +++ /dev/null @@ -1,43 +0,0 @@ -# Contributor: Alessio Biancalana <dottorblaster@gmail.com> - -pkgname=babl-git -pkgver=20100109 -pkgrel=1 -pkgdesc="babl is a dynamic, any to any, pixel format translation library" -arch=('i686' 'x86_64') -url="http://www.gegl.org/babl" -license=('GPL') -conflicts=('babl') -provides=('babl') -depends=('glib2>=2.10' 'libpng') -makedepends=('git') -source=() -md5sums=() - -_gitroot=('git://git.gnome.org/babl') -_gitname=('babl') - - build() { - cd $startdir/src - msg "Connecting to gnome.org git server...." - rm -rf $startdir/src/$_gitname-build - - if [[ -d $_gitname ]]; then - cd $_gitname || return 1 - git pull origin || return 1 - else - git clone $_gitroot $_gitname || return 1 - fi - msg " checkout done." - - msg "Starting make..." - cd "$srcdir" - rm -r "$srcdir/$_gitname-build" - cp -r $srcdir/$_gitname $_gitname-build - cd $_gitname-build - - ./autogen.sh --prefix=/usr - make || return 1 - make DESTDIR="$pkgdir" install || return 1 -} - diff --git a/bitlbee-otr-bzr/PKGBUILD b/bitlbee-otr-bzr/PKGBUILD deleted file mode 100644 index 835fef4..0000000 --- a/bitlbee-otr-bzr/PKGBUILD +++ /dev/null @@ -1,45 +0,0 @@ - -pkgname=bitlbee-otr-bzr -_realname=bitlbee-otr -pkgver=1 -pkgrel=1 -pkgdesc="Bitlbee gateway - with OTR support" -arch=('i686' 'x86_64') -url="http://khjk.org/~pesco/" -license=('GPLv2') -depends=('gnutls' 'glib2' 'libotr') -makedepends=('bzr' 'xmlto' 'links') -provides=(${_realname} bitlbee) -conflicts=(${_realname} ${_realname} bitlbee) -options=('') -#install=${pkgname}.install -source=() -md5sums=() -backup=('etc/bitlbee/welcome.txt' 'etc/bitlbee/motd.txt' 'etc/bitlbee/bitlbee.conf') - -_bzrbranch=http://khjk.org/~pesco/bitlbee-otr-testing -_bzrmod=bitlbee-otr-testing - -build() { - cd ${srcdir} - - msg "Connecting to the server...." - - bzr checkout ${_bzrbranch} - - msg "BZR checkout done or server timeout" - msg "Starting make..." - - [ -d ./${_bzrmod}-build ] && rm -rf ./${_bzrmod}-build - cp -r ./${_bzrmod} ./${_bzrmod}-build - cd ./${_bzrmod}-build - - ./configure --prefix=/usr --etcdir=/etc/bitlbee/ - make || return 1 - make DESTDIR=${pkgdir} install || return 1 - make DESTDIR=${pkgdir} install-etc || return 1 - -# rm -rf ${srcdir}/${_bzrmod}-build -} - -# vim:set ts=2 sw=2 et: diff --git a/blazeblogger-git/PKGBUILD b/blazeblogger-git/PKGBUILD deleted file mode 100644 index 26b4ff7..0000000 --- a/blazeblogger-git/PKGBUILD +++ /dev/null @@ -1,41 +0,0 @@ -# Maintainer: Florian Pritz <bluewind@xssn.at> -# Contributor: Abakus <java5@arcor.de> -pkgname=blazeblogger-git -pkgver=20100822 -pkgrel=1 -pkgdesc="is a simple-to-use but capable CMS for the command line" -arch=('any') -url="http://blaze.blackened.cz" -license=('GPL') -depends=('perl') -makedepends=('git') -conflicts=('blazeblogger') -source=() -md5sums=() - -_gitroot="git://gitorious.org/blazeblogger/mainline.git" -_gitname="mainline" - -build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [ -d "${_gitname}" ] ; then - cd "${_gitname}" && git pull origin - msg "The local files are updated." - else - git clone $_gitroot - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - rm -rf "$srcdir/$_gitname-build" - git clone "$srcdir/mainline" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" - - sed -i 's|/usr/bin/pod2man|pod2man|' Makefile - sed -i 's|/usr/bin/install|/bin/install|' Makefile - make prefix=$pkgdir/usr install - -} diff --git a/blazeblogger/PKGBUILD b/blazeblogger/PKGBUILD deleted file mode 100644 index bae90f7..0000000 --- a/blazeblogger/PKGBUILD +++ /dev/null @@ -1,17 +0,0 @@ -# Contributor: Abakus <java5@arcor.de> -pkgname=blazeblogger -pkgver=0.9.0 -pkgrel=1 -pkgdesc="is a simple-to-use but capable CMS for the command line" -arch=('i686' 'x86_64') -url="http://blaze.blackened.cz" -license=('GPL') -depends=('perl') -source=("http://blazeblogger.googlecode.com/files/${pkgname}-${pkgver}.tar.gz") -md5sums=('79b240e196cdb2f2a765e4ef10546163') -build() { - cd $startdir/src/$pkgname-$pkgver - sed -i 's|/usr/bin/pod2man|pod2man|' Makefile || return 1 - sed -i 's|/usr/bin/install|/bin/install|' Makefile || return 1 - make prefix=$startdir/pkg install -} diff --git a/bootchart2/PKGBUILD b/bootchart2/PKGBUILD deleted file mode 100644 index 773eb48..0000000 --- a/bootchart2/PKGBUILD +++ /dev/null @@ -1,30 +0,0 @@ -# $Id$ -# Maintainer: Tom Gundersen <teg@jklm.no> - -pkgname=bootchart2 -pkgver=0.14.1 -pkgrel=2 -pkgdesc="High-precision boot logger and visualizer" -arch=('i686' 'x86_64') -url="https://github.com/mmeeks/bootchart" -license=('GPL2') -depends=('python' 'bash' 'python-cairo') -backup=('etc/bootchartd.conf') -install=bootchart2.install -source=("https://github.com/downloads/mmeeks/bootchart/$pkgname-$pkgver.tar.bz2") - -build() { - cd "$srcdir/$pkgname-$pkgver" - - # force python 2 - sed -i '1s/python$/python2/' pybootchartgui.py - - PYTHON=python2 make -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - - PYTHON=python2 make DESTDIR="$pkgdir" install -} -sha256sums=('da243697552db8fb25554b311a8c36ca3fca4ff29be5f5409a5f996671aa7f59') diff --git a/bootchart2/bootchart2.install b/bootchart2/bootchart2.install deleted file mode 100644 index 3d3657d..0000000 --- a/bootchart2/bootchart2.install +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -post_install() { - echo "Append" - echo " initcall_debug init=/sbin/bootchartd" - echo "to your kernel commandline, to use boochart2." -} - -# vim:set ts=2 sw=2 et: diff --git a/brother-dcp9010cn/PKGBUILD b/brother-dcp9010cn/PKGBUILD deleted file mode 100644 index ef5e351..0000000 --- a/brother-dcp9010cn/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -# Contributor: Pavel Benak <pavel.benak@uhk.cz> - -pkgname=brother-dcp9010cn -pkgver=1.1.1 -pkgrel=4 -pkgdesc="Brother cups and lpd driver for DCP-9010CN" -arch=('i686' 'x86_64') -url="http://solutions.brother.com/linux/en_us/index.html" -license=('custom')mm -if [ "$(uname -m)" = "x86_64" ] -then - depends=('lib32-glibc' 'psutils') -else - depends=('psutils') -fi -noextract=(DCP7010.ppd.gz) - -source=( -http://www.brother.com/pub/bsc/linux/dlf/dcp9010cncupswrapper-$pkgver-$pkgrel.i386.deb -http://www.brother.com/pub/bsc/linux/dlf/dcp9010cnlpr-$pkgver-$pkgrel.i386.deb -brlpdwrapperdcp9010cn -) - -md5sums=('f8fbdc819c5ed1d54fdfe0da24e2939d' - '6b24a542b9d2f755d43cf0e6c91101ad' - '3ba6c4dd55eb15f918741f4ad102570f') - -build() -{ - mkdir -p $startdir/src/unpack || return 1 - for i in $startdir/src/*.deb - do - cd $startdir/src/unpack - ar -x $i || return 1 - cd $startdir/pkg - bsdtar xf $startdir/src/unpack/data.tar.gz || return 1 - done - - cd $startdir/src - install -d -m755 $startdir/pkg/usr/share/cups/model || return 1 - install -d -m755 $startdir/pkg/usr/lib/cups/filter || return 1 - install -D -m644 $startdir/pkg/usr/local/Brother/Printer/dcp9010cn/cupswrapper/dcp9010cn.ppd $startdir/pkg/usr/share/cups/model || return 1 - install -D -m755 brlpdwrapperdcp9010cn $startdir/pkg/usr/lib/cups/filter || return 1 -} diff --git a/brother-dcp9010cn/brlpdwrapperdcp9010cn b/brother-dcp9010cn/brlpdwrapperdcp9010cn deleted file mode 100755 index 960fb89..0000000 --- a/brother-dcp9010cn/brlpdwrapperdcp9010cn +++ /dev/null @@ -1,138 +0,0 @@ -#! /bin/sh -# -# Copyright (C) 2005 Brother. Industries, Ltd. -# Ver1.10 - -# 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 of the License, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place, Suite 330, Boston, MA 02111-1307 USA -# - -LOGFILE="/dev/null" -LOGLEVEL="1" -LOGCLEVEL="7" -DEBUG=0 -NUPENABLE=1 -LOG_LATESTONLY=1 -errorcode=0 - -if [ $DEBUG != 0 ]; then - LOGFILE=/tmp/br_cupsfilter_debug_log -fi - -PPDC=`printenv | grep "PPD="` -PPDC=`echo $PPDC | sed -e 's/PPD=//'` - -if [ "$PPDC" = "" ]; then - PPDC="/usr/share/cups/model/brdcp9010cn.ppd" -fi - - -if [ $LOGFILE != "/dev/null" ]; then - if [ $LOG_LATESTONLY == "1" ]; then - rm -f $LOGFILE - date >$LOGFILE - else - if [ -e $LOGFILE ]; then - date >>$LOGFILE - else - date >$LOGFILE - fi - fi - echo "arg0 = $0" >>$LOGFILE - echo "arg1 = $1" >>$LOGFILE - echo "arg2 = $2" >>$LOGFILE - echo "arg3 = $3" >>$LOGFILE - echo "arg4 = $4" >>$LOGFILE - echo "arg5 = $5" >>$LOGFILE - echo "arg6 = $6" >>$LOGFILE - echo "PPD = $PPD" >>$LOGFILE -fi - -INPUT_TEMP_PS=`mktemp /tmp/br_input_ps.XXXXXX` - -nup="cat" -if [ "" != '' ] && [ $NUPENABLE != 0 ]; then - - if [ "" != '' ]; then - nup="psnup -64" - elif [ "" != '' ]; then - nup="psnup -32" - elif [ "" != '' ]; then - nup="psnup -25" - elif [ "" != '' ]; then - nup="psnup -16" - elif [ "" != '' ]; then - nup="psnup -8" - elif [ "" != '' ]; then - nup="psnup -6" - elif [ "" != '' ]; then - nup="psnup -4" - elif [ "" != '' ]; then - nup="psnup -2" - elif [ "" != '' ]; then - nup="cat" - fi - echo "NUP=$nup" >>$LOGFILE - if [ -e /usr/bin/psnup ]; then - if [ $# -ge 7 ]; then - cat $6 | $nup > $INPUT_TEMP_PS - else - cat | $nup > $INPUT_TEMP_PS - fi - else - if [ $# -ge 7 ]; then - cp $6 $INPUT_TEMP_PS - else - cat > $INPUT_TEMP_PS - fi - fi -else - if [ $# -ge 7 ]; then - cp $6 $INPUT_TEMP_PS - else - cat > $INPUT_TEMP_PS - fi -fi -if [ -e "/usr/local/Brother/Printer/dcp9010cn/lpd/filterdcp9010cn" ]; then - : -else - echo "ERROR: /usr/local/Brother/Printer/dcp9010cn/lpd/filterdcp9010cn does not exist" >>$LOGFILE - errorcode=30 - exit -fi - -CUPSOPTION=`echo "$5 Copies=1" | sed -e 's/BrMirror=OFF/MirrorPrint=OFF/' -e 's/BrMirror=ON/MirrorPrint=ON/' -e 's/BrChain/Chain/' -e 's/BrBrightness/Brightness/' -e 's/BrContrast/Contrast/' -e 's/BrHalfCut/HalfCut/' -e 's/BrAutoTapeCut/AutoCut/' -e 's/BrHalftonePattern/Halftone/' -e 's/Binary/Binary/' -e 's/Dither/Dither/' -e 's/ErrorDiffusion/ErrorDiffusion/' -e 's/BrSheets/Sheets/' -e 's/multiple-document-handling/Collate/' -e 's/separate-documents-collated-copies/ON/' -e 's/separate-documents-uncollated-copies/OFF/'` -if [ -e "/usr/local/Brother/Printer/dcp9010cn/cupswrapper/brcupsconfpt1" ]; then - if [ $DEBUG = 0 ]; then - /usr/local/Brother/Printer/dcp9010cn/cupswrapper/brcupsconfpt1 DCP9010CN $PPDC 0 "$CUPSOPTION" "dcp9010cn">> /dev/null - else - /usr/local/Brother/Printer/dcp9010cn/cupswrapper/brcupsconfpt1 DCP9010CN $PPDC $LOGCLEVEL "$CUPSOPTION" "dcp9010cn">>$LOGFILE - fi -fi - -if [ $DEBUG -lt 10 ]; then - cat $INPUT_TEMP_PS | /usr/local/Brother/Printer/dcp9010cn/lpd/filterdcp9010cn "$$" "CUPS" "USB" - - if [ $LOGLEVEL -gt 2 ]; then - if [ $LOGFILE != "/dev/null" ]; then - echo "" >>$LOGFILE - echo " ------PostScript Data-------" >>$LOGFILE - cat $INPUT_TEMP_PS >>$LOGFILE - fi - fi -fi -rm -f $INPUT_TEMP_PS - -exit - diff --git a/brother-dcp9010cn/brother-dcp9010cn-1.1.1-4-i686-build.log b/brother-dcp9010cn/brother-dcp9010cn-1.1.1-4-i686-build.log deleted file mode 100644 index e69de29..0000000 --- a/brother-dcp9010cn/brother-dcp9010cn-1.1.1-4-i686-build.log +++ /dev/null diff --git a/brother-dcp9010cn/dcp9010cncupswrapper-1.1.1-4.i386.deb b/brother-dcp9010cn/dcp9010cncupswrapper-1.1.1-4.i386.deb Binary files differdeleted file mode 100644 index 08b2772..0000000 --- a/brother-dcp9010cn/dcp9010cncupswrapper-1.1.1-4.i386.deb +++ /dev/null diff --git a/brother-dcp9010cn/dcp9010cnlpr-1.1.1-4.i386.deb b/brother-dcp9010cn/dcp9010cnlpr-1.1.1-4.i386.deb Binary files differdeleted file mode 100644 index 2454cf3..0000000 --- a/brother-dcp9010cn/dcp9010cnlpr-1.1.1-4.i386.deb +++ /dev/null diff --git a/brscan3/PKGBUILD b/brscan3/PKGBUILD deleted file mode 100644 index 4f470d5..0000000 --- a/brscan3/PKGBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# Contributor: Mikolaj Pastuszko <deluminathor@gmail.com> -# Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu> -license=('GPL' 'custom:Brother') -arch=('i686' 'x86_64') -pkgname=brscan3 -pkgver=0.2.11_4 -pkgrel=4 -pkgdesc="SANE drivers from Brother for brscan3 compatibile models" -depends=('sane' 'sed') -makedepends=('sane') -url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html" -install=brscan3.install - -[ "$CARCH" = "x86_64" ] && pkg="${pkgname}-${pkgver/_/-}.x86_64.rpm" || pkg="${pkgname}-${pkgver/_/-}.i386.rpm" -[ "$CARCH" = "x86_64" ] && pkg_md5sum="05fdab58d2e652b259e367e600a02b7e" || pkg_md5sum="bf7b7d00c25597339ac5b87f1707cf75" - -source=("http://pub.brother.com/pub/com/bsc/linux/dlf/$pkg" "http://www.brother.com/agreement/English_sane/agree.html" "brscan3.rules") -md5sums=($pkg_md5sum 'ccffb9a6f6d436b21be25b0241068981' '76537a0eb5b68c48b57b4409397a4fa5') - -package() { - cp -r $srcdir/usr $pkgdir - install -d -m755 $pkgdir/etc/udev/rules.d - install -D -m644 $srcdir/brscan3.rules $pkgdir/etc/udev/rules.d - install -D -m644 $srcdir/agree.html $pkgdir/usr/share/licenses/$pkgname/LICENSE.html - [ "$CARCH" = "x86_64" ] && mv $pkgdir/usr/lib64 $pkgdir/usr/lib - cd $pkgdir/usr/lib - ln -sf libbrscandec3.so.1.0.0 libbrscandec3.so.1 - ln -sf libbrscandec3.so.1 libbrscandec3.so - cd $pkgdir/usr/lib/sane - ln -sf libsane-brother3.so.1.0.7 libsane-brother3.so.1 - ln -sf libsane-brother3.so.1 libsane-brother3.so -} - diff --git a/brscan3/agree.html b/brscan3/agree.html deleted file mode 100644 index 577f6b8..0000000 --- a/brscan3/agree.html +++ /dev/null @@ -1,248 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" -"http://www.w3.org/TR/html4/loose.dtd"> -<html lang="en"> -<head> -<title>End-User License Agreement for Brother Software</title> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> -<link rel="stylesheet" href="/library/websites/www.com/globalheader/css/template_agreement.css" type="text/css" media="all"> -<script type="text/javascript" src="/library/websites/www.com/globalheader/js/template.js" language="JavaScript"></script> - -<style type="text/css"> -<!-- -body { font-size: 100%} -.main { font-size: 100%} -.sm { font-size: 90%} ---> -</style> -</head> - -<body> - -<!-- begin #header --> -<table border="0" cellpadding="0" cellspacing="0" id="header" summary="Global header"> -<tr> -<td><img height="1" width="16" alt="" src="/library/websites/www.com/jp/globalheader/images/spacer.gif"></td> -<td> - -<table border="0" cellpadding="0" cellspacing="0" summary=""> -<tr> -<td id="brotherLogo"> -<a href="/index.htm" target="_top"><img height="40" width="106" alt="brother at your side" src="/library/websites/www.com/globalheader/images/head_brotherlogo.gif"></a> -</td> -<td><img height="1" width="200" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td> -<td id="formArea"> -<!-- SelectCountry --> -<div id="country"> -<form name="form1" id="form1"> -<select name="select_country" class="countryTxt"> -<option value="http://www.brother.com/index.htm" selected>Global Site</option> -<option></option> -<optgroup label="North/ South/ Central America"> -<option value="http://www.brother.com.ar/">Argentina - Español</option> -<option value="http://www.brother.com.br/">Brasil - Português</option> -<option value="http://www.brother.ca/en/index.asp">Canada - English</option> -<option value="http://www.brother.ca/fr/index.asp">Canada - Français</option> -<option value="http://www.brother-usa.com/caribbean/">Caribbean Countries - English</option> -<option value="http://www.brother.cl/">Chile - Español</option> -<option value="http://www.brother-usa.com/latinamerica/">Latin America - Español</option> -<option value="http://www.brother.com.mx/">México - Español</option> -<option value="http://www.brother-usa.com/">U.S.A. - English</option> -<option></option> -</optgroup> -<optgroup label="Europe"> -<option value="http://www.brother.eu/">Brother Europe</option> -<option value="http://www.brother.at/?lang=en">Austria - English</option> -<option value="http://www.brother.at/?lang=de">Österreich - Deutsch</option> -<option value="http://www.brother.be/?&lang=fr">Belgique - Français</option> -<option value="http://www.brother.be/?&lang=nl">Belgique - Nederlands</option> -<option value="http://www.brother.bg/">БЪлгария - БЪлгаски</option> -<option value="http://www.brother.cz/">Česká republika - česky</option> -<option value="http://www.brother.dk/">Danmark - Dansk</option> -<option value="http://www.brother.de/">Deutschland - Deutsch</option> -<option value="http://www.brother.es/">España - Español</option> -<option value="http://www.brother.fi/">Finland -Suomi</option> -<option value="http://www.brother.fr/">France - Français</option> -<option value="http://www.brother.ie/">Ireland - English</option> -<option value="http://www.brother.it/">Italia - Italiano</option> -<option value="http://www.brother.hu/">Magyarország - Magyar</option> -<option value="http://www.brother.nl/">Nederland - Nederlands</option> -<option value="http://www.brother.no/">Norge - Norsk</option> -<option value="http://www.brother.pl/">Polska - Polski</option> -<option value="http://www.brother.pt/">Portugal - Português</option> -<option value="http://www.brother.ru/">Россия - Pусский</option> -<option value="http://www.brother.com.ro/">România - Românã</option> -<option value="http://www.brother.ch/?&lang=de">Schweiz - Deutsch</option> -<option value="http://www.brother.ch/?&lang=fr">Suisse - Français</option> -<option value="http://www.brother.co.za/">South Africa - English</option> -<option value="http://www.brother.se/">Sverige - Svenska</option> -<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option> -<option value="http://www.brother.co.uk/cms.cfm/lang/en">United Kingdom</option> -<option value="http://www.brother-ism.com/">--Industrial Sewing Machines</option> -<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option> -<option></option> -</optgroup> -<optgroup label="Middle East/ Africa"> -<option value="http://www.brother.ae/">Bahrain - English</option> -<option value="http://www.brother.ae/">Egypt - English</option> -<option value="http://www.brother.ae/">Ethiopia - English</option> -<option value="http://www.brother.ae/">Iran - English</option> -<option value="http://www.brother.ae/">Iraq - English</option> -<option value="http://www.brother.ae/">Jordan - English</option> -<option value="http://www.brother.ae/">Kenya - English</option> -<option value="http://www.brother.ae/">Kuwait - English</option> -<option value="http://www.brother.ae/">Lebanon - English</option> -<option value="http://www.brother.ae/">Libya - English</option> -<option value="http://www.brother.ae/">Mauritius - English</option> -<option value="http://www.brother.ae/">Nigeria - English</option> -<option value="http://www.brother.ae/">Oman - English</option> -<option value="http://www.brother.ae/">Qatar - English</option> -<option value="http://www.brother.ae/">Saudi Arabia - English</option> -<option value="http://www.brother.co.za/">South Africa - English</option> -<option value="http://www.brother.ae/">Syria - English</option> -<option value="http://www.brother.ae/">Tanzania - English</option> -<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option> -<option value="http://www.brother.ae/">Uganda - English</option> -<option value="http://www.brother.ae/">United Arab Emirates - English</option> -<option value="http://www.brother.ae/">Yemen - English</option> -<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option> -<option value="http://www.brother.com/as_oc/contact/mea/index.htm">--Contact List</option> -<option></option> -</optgroup> -<optgroup label="Asia/ Oceania"> -<option value="http://www.brother.com.au/">Australia - English</option> -<option value="http://www.brother.ae/">Bangladesh - English</option> -<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option> --<option value="http://www.brother-cn.net/">China - Chinese</option> -<option value="http://www.brother.com.hk/en/home.html">> Hong Kong - English</option> -<option value="http://www.brother.com.hk/tc/home.html">> Hong Kong - Chinese</option> -<option value="http://www.brother.in/">India - English</option> -<option value="http://www.brother.com.sg/">Indonesia - English</option> -<option value="http://www.brother.co.jp/">Japan - Japanese</option> -<option value="http://www.brother.com.my/">Malaysia - English</option> -<option value="http://www.brother.ae/">Nepal - English</option> -<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option> -<option value="http://www.brother.co.nz/">New Zealand - English</option> -<option value="http://www.brother.ae/">Pakistan - English</option> -<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option> -<option value="http://www.brother.com.ph/">Philippines - English</option> -<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option> -<option value="http://www.brother.com.sg/">Singapore - English</option> --<option value="http://www.brother.co.th/">Thailand - Thai</option> -<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option> -<option value="http://www.brother.com.sg/">Vietnam - English</option> -<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option> -<option value="http://www.brother.com/as_oc/machine/index.htm">--Machine Tools</option> -<option value="http://www.brother.com/as_oc/contact/asiapacific/index.htm">--Contact List</option> -</optgroup> -</select><a href="javascript:;"><img height="19" onClick="jumpCountry(form1.select_country);return false;" width="21" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"></a> -</form> -</div> -<!-- SelectCountry --> - - -<!-- SiteSearch --> -<div id="search"> -<form name="gs" method="GET" action="http://search2.brother.co.jp/search?"> -<input name="q" type="text" value="Search" onfocus="if(this.value == this.defaultValue) this.value=''" onblur="if(this.value == '') this.value=this.defaultValue" class="searchTxt"><input type="image" value="" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"> -<input type="hidden" name="sort" value="date:D:L:d1"> -<input type="hidden" name="output" value="xml_no_dtd"> -<input type="hidden" name="oe" value="UTF-8"><input type="hidden" name="ie" value="UTF-8"> -<input type="hidden" name="client" value="fe_www_com"> -<input type="hidden" name="proxystylesheet" value="fe_www_com"> -<input type="hidden" name="site" value="col_www_com_cominf_sol"> - </div> - </form> -</div> -<!-- SiteSearch --> -</td> -</tr> -</table> - -</td> -<td><img height="1" width="17" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td> -</tr> - - -</table> -<!-- end #header --> - -<div style="line-height:1px;"> </div> - -<table border="0" cellspacing="0" cellpadding="2" width="600"> -<tr> -<td bgcolor="#333333"><b><span style="color:#FFFFFF;">License Agreement</span></b></td> -</tr> -<tr> -<td><p>This Agreement provides terms and conditions for license grant for use - of the software that is distributed with this Agreement ("Software") - from Brother Industries, Ltd. ("Brother") to recipients thereof - ("You").</p> - <table width="100%" height="60" border="1" bordercolor="#000099"> - <tr> - <td bordercolor="#000099"><strong>Note:</strong><br> - Please click on "I Accept" while holding down "Shift" or - right click on "I Accept" and select "Save Target As,,," from - the menu.</td> - </tr> - </table> - <ol> - <li>The Software is comprised of the following software modules:<br> - <br> - (1) Certain software modules that is the subject of GNU GENERAL PUBLIC - LICENSE ("GPL Modules"), and - <br> - (2) Other software modules ("Non-GPL Modules") - <br> - <br> - You may distinguish each of GPL Modules by downloading source files - of the Software as Brother separately makes available and reading such - files.<br> - </li> - <li>Your use of all GPL Modules shall be subject to the terms and conditions - of GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ("GPLv2"). - Please see <a href="http://www.brother.com/agreement/English_gpl/agree.html" target="_blank">http://www.brother.com/agreement/English_gpl/agree.html</a>. You - shall use GPL Modules in accordance with the terms and conditions of GPLv2. - Your use of GPL Modules shall be deemed - as your agreement to the terms and conditions of GPLv2.<br> - </li> - <li>You have the right to use all Non-GPL Modules only in accordance with - the following terms and conditions. Your use of Non-GPL Modules shall be - deemed as your agreement to the following terms and conditions: - <p>(1) Brother retains any and all copyrights to Non-GPL Modules. In no - case this Agreement shall be construed to assign or otherwise transfer - from Brother to you any copyrights or other intellectual property rights - to whole or any part of Non-GPL Modules.</p> - <p>(2) Brother grants you a non-exclusive license to reproduce and/or distribute - (via Internet or in any other manner) Non-GPL Modules. Brother further - grants you a non-exclusive license to modify, alter, translate or otherwise - prepare derivative works of Non-GPL Modules and to reproduce and/or distribute - (via Internet or in any other manner) such modification, alteration, - translation or other derivative works of Non-GPL Modules.</p> - <p>(3) When you distribute (via Internet or in any other manner) Non-GPL - Modules or any modification, alteration, translation or other derivative - works thereof under the license granted in accordance with subparagraph - 3(2) above, you must expressly grant any and all recipient thereof the - license equivalent to this Agreement which applies to Non-GPL Modules.</p> - <p>(4) The license of Non-GPL Modules from Brother hereunder is granted "AS - IS. BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO NON-GPL MODULES, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY, - MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. </p> - <p>(5) To the extent allowed by applicable laws, Brother shall have no - liability in contract, tort (including negligence or breach of statutory - duty) or otherwise for any interruption of use, loss of data, or for - any indirect, incidental, punitive or consequential loss or damage, or - for any loss of profit, revenue, data, goodwill or anticipated savings - that arises under, out of, or in contemplation of this Agreement or otherwise - arises due to any error, inaccuracy or defect in Non-GPL Modules even - if Brother has been advised of the possibility of such loss or damage.</p> - <p>(6) The form in which Non-GPL Modules is distributed is subject to Brothers - sole discretion. Brother does not have any obligation to distribute or - disclose Non-GPL Modules in source code form. In no case shall this Agreement - be deemed as Brothers express or implied agreement to disclose source - code of Non-GPL Modules.</p> - </li> - </ol></td> -</tr> -</table> -</body> -</html> diff --git a/brscan3/brscan3-0.2.11-4.x86_64.rpm b/brscan3/brscan3-0.2.11-4.x86_64.rpm Binary files differdeleted file mode 100644 index 9d04bd4..0000000 --- a/brscan3/brscan3-0.2.11-4.x86_64.rpm +++ /dev/null diff --git a/brscan3/brscan3.install b/brscan3/brscan3.install deleted file mode 100755 index 4b1f28b..0000000 --- a/brscan3/brscan3.install +++ /dev/null @@ -1,44 +0,0 @@ - -# new package version -devices_file="/usr/local/Brother/sane/brsanenetdevice3.cfg" - -pre_install() { - /bin/true -} - -# new package version -post_install() { - /usr/local/Brother/sane/setupSaneScan3 -i - -} - -# the new package version -# old package version -pre_upgrade() { - # If user has already configured their scanner then make a config backup - if [ -f $devices_file ]; then - cp $devices_file $devices_file.backup || return 1 - fi -} - -# new package version -# old package version -post_upgrade() { - # After upgrade revert user's scanner config and delete a config backup - if [ -f $devices_file.backup ]; then - cp $devices_file.backup $devices_file || return 1 - rm $devices_file.backup || return 1 - fi -} - -# old package version -pre_remove() { - /usr/local/Brother/sane/setupSaneScan3 -e - /bin/true -} - -# old package version -post_remove() { - /bin/true -} - diff --git a/brscan3/brscan3.rules b/brscan3/brscan3.rules deleted file mode 100644 index 3f4d2a0..0000000 --- a/brscan3/brscan3.rules +++ /dev/null @@ -1,45 +0,0 @@ -ACTION=="add", ATTR{idVendor}=="04f9", GOTO="brscan3" -GOTO="brscan3_end" -LABEL="brscan3" -ATTR{idProduct}=="0206", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0204", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0205", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0201", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0200", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01ff", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01fe", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01fd", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01fb", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01fa", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f9", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f8", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f7", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f6", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f5", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f4", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f1", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f3", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f2", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01f0", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01ef", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0207", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0208", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0203", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0202", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01fc", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01ee", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01ed", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01eb", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01ea", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01e9", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01e8", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01e7", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01e6", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="01e5", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0218", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="021f", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0217", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0216", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -ATTR{idProduct}=="0215", MODE="0664", GROUP="scanner", SYMLINK+="scanner%n" -LABEL="brscan3_end" - diff --git a/btnx-config/PKGBUILD b/btnx-config/PKGBUILD deleted file mode 100644 index 718f197..0000000 --- a/btnx-config/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Contributor: Florian Pritz <f-p@gmx.at> -# Contributor: Graziano Giuliani <graziano.giuliani@poste.it> - -pkgname=btnx-config -pkgver=0.4.9 -pkgrel=1 -pkgdesc="Button Extension- a GNU/GPL mouse tool for GNU/Linux" -arch=(i686 x86_64) -url="http://www.ollisalonen.com/btnx/" -license=('GPL') -groups=(gnome-extra) -depends=(libglade) -makedepends=(pkgconfig gnome-doc-utils) -options=('!libtool' '!emptydirs') -source=(http://www.ollisalonen.com/btnx/${pkgname}-${pkgver}.tar.gz) -noextract=() - -build() { - cd $startdir/src/${pkgname}-${pkgver} - - init_scripts_path=/etc/rc.d \ - ./configure --prefix=/usr --sysconfdir=/etc \ - --localstatedir=/var - make || return 1 - make DESTDIR=${pkgdir} DATAROOTDIR=${pkgdir} install -} - -# vim:set ts=2 sw=2 et: - -md5sums=('b07314c2562a81c7c82cc1561ca387d1') -sha256sums=('c3df127104a95332691a3292424ea68efbd2b583a10114493a483f40cde3ffde') diff --git a/btnx/PKGBUILD b/btnx/PKGBUILD deleted file mode 100644 index c54f211..0000000 --- a/btnx/PKGBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Contributor: Florian Pritz <f-p@gmx.at> -# Contributor: Graziano Giuliani <graziano.giuliani@poste.it> - -pkgname=btnx -pkgver=0.4.11 -pkgrel=3 -pkgdesc="Button Extension- a GNU/GPL mouse tool for GNU/Linux" -arch=('i686' 'x86_64') -url="http://www.ollisalonen.com/btnx/" -license=('GPL') -groups=(daemons) -depends=('btnx-config' 'libdaemon') -options=('!libtool' '!emptydirs') -source=(http://www.ollisalonen.com/btnx/${pkgname}-${pkgver}.tar.gz - btnx) - -build() { - cd ${srcdir}/${pkgname}-${pkgver} - - ./configure || return 1 - make || return 1 - - mkdir -p ${pkgdir}/etc/btnx - - install -Dm 755 src/btnx ${pkgdir}/usr/sbin/btnx || return 1 - install -Dm 644 data/events -p ${pkgdir}/etc/btnx/events || return 1 - install -Dm 755 ${srcdir}/btnx ${pkgdir}/etc/rc.d/btnx || return 1 -} - -# vim:set ts=2 sw=2 et: -md5sums=('8216a84f8fe873ddc97afbfccfc2d254' - '4c9ff4950bc766002e34e53bffc61521') -sha256sums=('350fd6453f5ac85019a2a5e9feb926ceccf7d17e2243ba47ede0a165890fe82d' - 'ff3030a22b7e054cd89b38632b8ef91ad0b2f777ba42bc4a2421f534046cdc02') diff --git a/btnx/btnx b/btnx/btnx deleted file mode 100755 index 2c3534c..0000000 --- a/btnx/btnx +++ /dev/null @@ -1,52 +0,0 @@ -#! /bin/bash - -# general config -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/sbin/btnx` -case "$1" in - start) - stat_busy "Starting btnx mouse daemon" - modprobe uinput - [ -z "$PID" ] && /usr/sbin/btnx -b -l > /dev/null - if [ $? -gt 0 ] - then - stat_fail - else - add_daemon btnx - stat_done - fi - ;; - stop) - stat_busy "Stopping btnx mouse daemon" - [ ! -z "$PID" ] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm -f /var/run/btnx.pid - rm_daemon btnx - stat_done - fi - ;; - reload) - stat_busy "Reloading btnx mouse daemon configuration" - if [ "$PID" ] - then - kill -HUP $PID 2> /dev/null - stat_done - else - stat_fail - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart|reload}" - ;; -esac - -exit 0 diff --git a/btnx/makefile.patch b/btnx/makefile.patch deleted file mode 100644 index 65c0691..0000000 --- a/btnx/makefile.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile 2008-01-03 13:13:41.000000000 +0100 -+++ Makefile.new 2008-01-06 16:01:37.466242459 +0100 -@@ -1,8 +1,4 @@ - --CC = gcc --CFLAGS = -Wall -O2 #-g --LFLAGS = -- - DEPS = uinput.h btnx.h config_parser.h device.h revoco.h - OBJ = btnx.o uinput.o config_parser.o device.o revoco.o - BIN = btnx diff --git a/cdemu-client/PKGBUILD b/cdemu-client/PKGBUILD deleted file mode 100644 index 788785b..0000000 --- a/cdemu-client/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Maintainer: Mateusz Herych <heniekk@gmail.com> -# Contributor: Charles Lindsay <charles@chaoslizard.org> -pkgname=cdemu-client -pkgver=1.1.0 -pkgrel=2 -pkgdesc="Simple command-line client for controlling cdemu-daemon" -arch=('i686' 'x86_64') -url="http://cdemu.sourceforge.net/" -license=('GPL') -depends=('python' 'dbus-python' 'cdemu-daemon') -makedepends=('intltool') -conflicts=('cdemu') -source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2) -md5sums=('f41ce6892d452663fecb147395b916c3') - -build() { - cd $startdir/src/$pkgname-$pkgver - ./configure --prefix=/usr - make || return 1 - make DESTDIR=$startdir/pkg install || return 1 -} diff --git a/cdemu-daemon/PKGBUILD b/cdemu-daemon/PKGBUILD deleted file mode 100644 index caa609d..0000000 --- a/cdemu-daemon/PKGBUILD +++ /dev/null @@ -1,27 +0,0 @@ -# $Id: PKGBUILD,v 1.1 2008/11/24 18:40:08 partition Exp $ -# Maintainer: Mateusz Herych <heniekk@gmail.com> -# Contributor: Charles Lindsay <charles@chaoslizard.org> -pkgname=cdemu-daemon -pkgver=1.1.0 -pkgrel=3 -pkgdesc="CD/DVD-ROM device emulator daemon" -arch=(i686 x86_64) -url="http://cdemu.sourceforge.net/" -license=('GPL') -depends=('glib2' 'dbus' 'dbus-glib' 'libdaemon' 'vhba-module' 'libmirage' 'libao') -install=cdemud.install -source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2 - cdemud.conf - cdemud.rc) -md5sums=('0118e5f590d7c0e1b02027b718880ac6' - '26b94a626c2c1d0a83ad5a7593dff70f' - 'c4a2f36337b5ce53cf0fac1128ad9545') - -build() { - cd $startdir/src/$pkgname-$pkgver - ./configure --prefix=/usr --sysconfdir=/etc - make -j1 || return 1 - make DESTDIR=$startdir/pkg install || return 1 - install -m 644 -D ../../cdemud.conf $startdir/pkg/etc/conf.d/cdemud || return 1 - install -m 755 -D ../../cdemud.rc $startdir/pkg/etc/rc.d/cdemud || return 1 -} diff --git a/cdemu-daemon/cdemud.conf b/cdemu-daemon/cdemud.conf deleted file mode 100644 index 91ada61..0000000 --- a/cdemu-daemon/cdemud.conf +++ /dev/null @@ -1,8 +0,0 @@ -# how many optical drives to emulate -NUM_DRIVES=1 - -# control device -CTL_DEVICE=/dev/vhba_ctl - -# audio backend (null or alsa) -AUDIO_BACKEND=null diff --git a/cdemu-daemon/cdemud.install b/cdemu-daemon/cdemud.install deleted file mode 100644 index d1b0cf2..0000000 --- a/cdemu-daemon/cdemud.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install () { - echo ">> Place 'cdemud' in DAEMONS= in /etc/rc.conf to enable cdemud on system boot." - echo ">> If the alsa-lib package is installed, cdemud can use the ALSA audio backend" - echo ">> (edit /etc/conf.d/cdemud to enable this)." - groupadd cdemu -} -post_remove() { - groupdel cdemu -} -op=$1 -shift -$op $* diff --git a/cdemu-daemon/cdemud.rc b/cdemu-daemon/cdemud.rc deleted file mode 100644 index f76ba42..0000000 --- a/cdemu-daemon/cdemud.rc +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/cdemud - -case "$1" in - start) - stat_busy "Loading vhba module" - modprobe vhba - if [ $? -ne 0 ]; then - stat_fail - else - stat_done - fi - - stat_busy "Waiting for $CTL_DEVICE" - i=0 - until [ -c $CTL_DEVICE -o $i -ge 10 ]; do - i=`expr $i + 1` - sleep 1 - done - if [ -c $CTL_DEVICE ]; then - stat_done - else - stat_fail - fi - - stat_busy "Starting cdemud" - cdemud -d -n $NUM_DRIVES -c $CTL_DEVICE -a $AUDIO_BACKEND &>/dev/null - if [ $? -ne 0 ]; then - stat_fail - else - add_daemon cdemud - stat_done - fi - ;; - stop) - stat_busy "Stopping cdemud" - cdemud -k &>/dev/null - if [ $? -ne 0 ]; then - stat_fail - else - rm_daemon cdemud - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac diff --git a/cdrtools/PKGBUILD b/cdrtools/PKGBUILD deleted file mode 100644 index 02d2243..0000000 --- a/cdrtools/PKGBUILD +++ /dev/null @@ -1,38 +0,0 @@ -# Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com> -# Contributor: Tuxbubling <tuxbubling@jabber.fr>, alejandronova -pkgname=cdrtools -pkgver=3.01a02 -pkgrel=1 -pkgdesc="Original cdrtools supporting CD, DVD and BluRay burning" -arch=('i686' 'x86_64') -url="http://cdrecord.berlios.de/private/cdrecord.html" -license=('CDDL') -depends=('acl') -conflicts=('cdrkit') -provides=('cdrkit') -backup=('etc/default/cdrecord' 'etc/default/rscsi') -install=cdrtools.install -source=(http://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-$pkgver.tar.gz) -md5sums=('302de3e8fc508d873719a0c8bab1eff7') - -build() { - cd "$srcdir"/cdrtools-${pkgver%%a*} - sed -i 's|/opt/schily|/usr|g' DEFAULTS/Defaults.linux - sed -i 's|DEFINSGRP=.*|DEFINSGRP=root|' DEFAULTS/Defaults.linux - - export GMAKE_NOWARN=true - make -} - -package() { - cd "$srcdir"/cdrtools-${pkgver%%a*} - export GMAKE_NOWARN=true - - make INS_BASE="$pkgdir"/usr INS_RBASE="$pkgdir" install - rm -rf "$pkgdir"/usr/include - rm -rf "$pkgdir"/usr/lib/{*.a,profiled} - find "$pkgdir" -type d -perm 775 -exec chmod 755 '{}' ';' - find "$pkgdir" -type f -perm 4711 -exec chmod 755 '{}' ';' -} - -# vim:set ts=2 sw=2 et: diff --git a/cdrtools/cdrtools.install b/cdrtools/cdrtools.install deleted file mode 100644 index b2a4e20..0000000 --- a/cdrtools/cdrtools.install +++ /dev/null @@ -1,7 +0,0 @@ - -post_install() { - echo "If other users than root should be allowed to execute rscsi" - echo "they need an entry in /etc/default/rscsi" - echo "If you do not change that entry, you should create a user rscsi." -} - diff --git a/celt/PKGBUILD b/celt/PKGBUILD deleted file mode 100644 index 456bd46..0000000 --- a/celt/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Maintainer: Lauri Niskanen <ape@ape3000.com> -# Contributor: Ray Rashif <schivmeister@gmail.com> - -pkgname=celt -pkgver=0.7.1 -pkgrel=1 -pkgdesc="Low-latency audio communication codec" -arch=(i686 x86_64) -url="http://www.celt-codec.org" -license=('BSD') -depends=('libogg') -options=('!libtool') -source=(http://downloads.us.xiph.org/releases/$pkgname/$pkgname-$pkgver.tar.gz) -md5sums=('c7f6b8346e132b1a48dae0eff77ea9f0') - -build() { - cd "$srcdir/$pkgname-$pkgver" - - ./configure --prefix=/usr - make || return 1 - make DESTDIR="$pkgdir" install - - ln -s libcelt0.so.0.0.0 $pkgdir/usr/lib/libcelt.so.0.7 - ln -s libcelt0.so.0.0.0 $pkgdir/usr/lib/libcelt.so.0.7.1 - - install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/BSD" -} - diff --git a/celt/mumble11x.desktop b/celt/mumble11x.desktop deleted file mode 100644 index 5dba0d0..0000000 --- a/celt/mumble11x.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=Mumble (1.1.X compatible) -GenericName=Voice Chat -Comment=Voice chat program (compatible with Mumble 1.1.X) -Exec=mumble11x -Icon=mumble -Terminal=false -Type=Application -StartupNotify=false -Categories=Network;Chat;Qt; -Version=1.2.1 diff --git a/clusterssh/PKGBUILD b/clusterssh/PKGBUILD deleted file mode 100644 index 61ec8c0..0000000 --- a/clusterssh/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Contributor: Duncan Ferguson <duncan_ferguson@users.sourceforge.net> -# Maintainer: Macfly <mmacfly@gmail.com> -pkgname=clusterssh -pkgver=3.27 -pkgrel=1 -pkgdesc="Cluster SSH opens terminal windows with connections to specified hosts and an administration console." -url="http://clusterssh.sourceforge.net/" -license="GPL" -depends=('xterm' 'perl-tk' 'perl-x11-protocol') -arch=('i686' 'x86_64') -source=(http://downloads.sourceforge.net/project/clusterssh/1.%20ClusterSSH%20Series%203/$pkgver/$pkgname-$pkgver.tar.gz) -md5sums=('47c2bf0a69cacdd279663bc75b3e2f63') - -build() { - cd $srcdir/$pkgname-$pkgver - ./configure --prefix=/usr - make || return 1 - make DESTDIR=$pkgdir install -} diff --git a/cower-git/PKGBUILD b/cower-git/PKGBUILD deleted file mode 100644 index 431e42c..0000000 --- a/cower-git/PKGBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# Maintainer: Dave Reisner <d@falconindy.com> - -pkgname=cower-git -pkgver=20111016 -pkgrel=1 -pkgdesc="A simple AUR agent with a pretentious name" -arch=('i686' 'x86_64') -url="http://github.com/falconindy/cower" -license=('MIT') -depends=('curl' 'pacman' 'yajl' ) -makedepends=('git' 'perl') -conflicts=('cower') -provides=('cower') - -_gitroot="git://github.com/falconindy/cower.git" -_gitname="cower" - -build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [[ -d $_gitname ]] ; then - cd "$_gitname" && git pull origin - msg "The local files are updated." - else - git clone "$_gitroot" "$_gitname" - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - rm -rf "$srcdir/$_gitname-build" - cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" - - readelf -s /usr/lib/libalpm.so | grep -q alpm_find_satisfier && - PMCHECK="-D_HAVE_ALPM_FIND_SATISFIER" - - readelf -s /usr/lib/libalpm.so | grep -q alpm_db_register_local && - PMCHECK+=" -D_HAVE_ALPM_DB_REGISTER_LOCAL" - - readelf -s /usr/lib/libalpm.so | grep -q alpm_db_get_pkgcache_list && - PMCHECK+=" -D_HAVE_ALPM_DB_GET_PKGCACHE_LIST" - - make PMCHECK="$PMCHECK" -} - -package() { - cd "$srcdir/$_gitname-build" - - make PREFIX=/usr DESTDIR="$pkgdir" install -} - -# vim: ft=sh syn=sh et diff --git a/cower/PKGBUILD b/cower/PKGBUILD deleted file mode 100644 index 23f9e71..0000000 --- a/cower/PKGBUILD +++ /dev/null @@ -1,26 +0,0 @@ -# Maintainer: Dave Reisner <d@falconindy.com> - -pkgname=cower -pkgver=3.0.1 -pkgrel=1 -pkgdesc="A simple AUR agent with a pretentious name" -arch=('i686' 'x86_64') -url="http://github.com/falconindy/cower" -license=('GPL') -depends=('curl' 'yajl' 'pacman') -makedepends=('perl') -source=("https://github.com/downloads/falconindy/$pkgname/$pkgname-$pkgver.tar.gz") -md5sums=('4dc3c13d3c980b8e4eb397aef94b3f27') - -build() { - cd "$srcdir/$pkgname-$pkgver" - - make -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - make PREFIX=/usr DESTDIR=${pkgdir} install -} - -# vim: ft=sh syn=sh diff --git a/cower/namcap.log b/cower/namcap.log deleted file mode 100644 index e69de29..0000000 --- a/cower/namcap.log +++ /dev/null diff --git a/cower/set_curlopt_nosignal.patch b/cower/set_curlopt_nosignal.patch deleted file mode 100644 index 76d7456..0000000 --- a/cower/set_curlopt_nosignal.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 9d7537ef064a23ed57551aa04283c398fc8d07f1 -Author: Dave Reisner <d@falconindy.com> -Date: Thu Dec 30 20:14:36 2010 -0500 - - set CURLOPT_NOSIGNAL on all curl handles - - As per curl_easy_setopt(3), this is particularly crucial of multi - threaded apps (hey that's us) which use timeouts to avoid sending them - signals and behaving badly (e.g. causing segfaults). - -diff --git a/cower.c b/cower.c -index 7ba747c..23ff9bc 100644 ---- a/cower.c -+++ b/cower.c -@@ -585,6 +585,7 @@ CURL *curl_create_easy_handle() { - - curl_easy_setopt(handle, CURLOPT_USERAGENT, COWER_USERAGENT); - curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, 10L); -+ curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1L); - curl_easy_setopt(handle, CURLOPT_ENCODING, "deflate, gzip"); - - return(handle); diff --git a/daemonsbkg/PKGBUILD b/daemonsbkg/PKGBUILD deleted file mode 100644 index 1bc5015..0000000 --- a/daemonsbkg/PKGBUILD +++ /dev/null @@ -1,24 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> - -pkgname=daemonsbkg -pkgver=0.1.3 -pkgrel=1 -pkgdesc="Adds support for really starting daemons in background" -arch=('i686' 'x86_64') -url="http://flo.server-speed.net/stuff/mirror/$pkgname" -license=('GPL') -install=${pkgname}.install -source=("http://flo.server-speed.net/stuff/mirror/$pkgname/$pkgname-$pkgver.tar.gz") - -build() { - cd "$srcdir/$pkgname-$pkgver" - - install -D -o root -m 755 ${pkgname} ${pkgdir}/etc/rc.d/functions.d/${pkgname} - install -D -o root -m 700 ${pkgname}.sh ${pkgdir}/usr/bin/${pkgname}.sh - install -D -o root -m 700 ${pkgname}.patch ${pkgdir}/etc/${pkgname}.patch - install -D -o root -m 700 rc.local.daemons ${pkgdir}/etc/rc.local.daemons -} - -# vim:set ts=2 sw=2 et: -md5sums=('fea73f005a7265335dc7765fc7cb9c4d') -sha256sums=('090d44108e44ca55556adf3f41b1c14a2f9647004c5e9a79c866b63902365498') diff --git a/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg b/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg deleted file mode 100644 index 1d5dc15..0000000 --- a/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg +++ /dev/null @@ -1,7 +0,0 @@ -start_daemonbkg() { - (/etc/rc.d/$1 start) &>/dev/null -} - -start_daemonbkg_bkgd() { - (/etc/rc.d/$1 start) &>/dev/null & -} diff --git a/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg.patch b/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg.patch deleted file mode 100644 index cc21536..0000000 --- a/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- /etc/rc.local.shutdown 2008-09-18 22:21:39.000000000 +0200 -+++ /etc/rc.local.shutdown.new 2008-10-19 13:55:32.000000000 +0200 -@@ -3,3 +3,16 @@ - # /etc/rc.local.shutdown: Local shutdown script. - # - -+. /etc/rc.conf -+. /etc/rc.d/functions -+ -+if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then -+ # Shutdown background daemons -+ let i=${#DAEMONSBKG[@]} -+ while [ $i -ge 0 ]; do -+ if [ "${DAEMONSBKG[$i]:0:1}" != '!' ]; then -+ ck_daemon ${DAEMONSBKG[$i]#@} || stop_daemon ${DAEMONSBKG[$i]#@} -+ fi -+ let i=i-1 -+ done -+fi -\ No newline at end of file - ---- /etc/rc.multi 2008-09-18 22:21:39.000000000 +0200 -+++ /etc/rc.multi.new 2008-10-19 13:55:32.000000000 +0200 -@@ -20,6 +20,9 @@ - fi - done - -+# Start background daemons -+/etc/rc.local.daemons & -+ - if [ -x /etc/rc.local ]; then - /etc/rc.local - fi diff --git a/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg.sh b/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg.sh deleted file mode 100644 index d24960e..0000000 --- a/daemonsbkg/daemonsbkg-0.1.3/daemonsbkg.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -patch -p0 < /etc/daemonsbkg.patch -if ! grep -q "DAEMONSBKG" /etc/rc.conf; then - echo "DAEMONSBKG=()" >> /etc/rc.conf -fi
\ No newline at end of file diff --git a/daemonsbkg/daemonsbkg-0.1.3/rc.local.daemons b/daemonsbkg/daemonsbkg-0.1.3/rc.local.daemons deleted file mode 100755 index b6b3f36..0000000 --- a/daemonsbkg/daemonsbkg-0.1.3/rc.local.daemons +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -# Start daemons -for daemon in "${DAEMONSBKG[@]}"; do - if [ "$daemon" = "${daemon#!}" ]; then - if [ "$daemon" = "${daemon#@}" ]; then - start_daemonbkg $daemon 2>&1 >/dev/null - else - start_daemonbkg_bkgd ${daemon:1} 2>&1 >/dev/null - fi - fi -done - diff --git a/daemonsbkg/daemonsbkg.install b/daemonsbkg/daemonsbkg.install deleted file mode 100644 index f04f73b..0000000 --- a/daemonsbkg/daemonsbkg.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - echo "" - echo "NOTE:" - echo "--> Run '/usr/bin/daemonsbkg.sh' whenever you upgrade initscripts." - echo "--> I'll also add a new line to rc.conf." - echo "Running patch now..." - /usr/bin/daemonsbkg.sh -} - -pre_remove() { - echo "Removing the patch..." - patch -R -p0 < /etc/daemonsbkg.patch -} -# vim:set ts=2 sw=2 et: diff --git a/dc3dd/PKGBUILD b/dc3dd/PKGBUILD deleted file mode 100644 index 494e876..0000000 --- a/dc3dd/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Contributor: bender02 at gmx dot com -pkgname=dc3dd -pkgver=6.12.3 -pkgrel=1 -pkgdesc="A patched version of dd that includes a number of features useful for computer forensics" -url="http://dc3dd.sourceforge.net/" -license=("GPL3") -arch=('i686' 'x86_64') -source=(http://downloads.sf.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2) -md5sums=('9bb2ca0d3ea82c147aa2f8089914cdd0') -# sha256sums are verifiable from upstream -sha256sums=('c723a24a97291faf43e77ab91229c1bfab97156e3d2bd8ff94e9b2c261ca7ec9') - -build() { - cd $srcdir/$pkgname-$pkgver - ./configure --prefix=/usr || return 1 - make || return 1 - make DESTDIR=$pkgdir install || return 1 -} - -# vim:set ts=2 sw=2 et: diff --git a/deco-archive/PKGBUILD b/deco-archive/PKGBUILD deleted file mode 100644 index a45abdf..0000000 --- a/deco-archive/PKGBUILD +++ /dev/null @@ -1,22 +0,0 @@ -# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org> - -pkgname=deco-archive -pkgver=1.5 -pkgrel=1 -pkgdesc="A collection of extractor wrappers for the deco file extraction framework" -arch=('any') -url="http://hartlich.com/deco/archive/" -license=('GPL3') -depends=('bash' 'deco') -source=($url/download/$pkgname-$pkgver.tar.gz) -md5sums=('e49e1066c5376132acdebe3f2e9d2d84') - -build() { - cd $pkgname-$pkgver - - make PREFIX=/usr \ - DESTDIR=$pkgdir \ - install -} - -# vim:set ts=2 sw=2 et: diff --git a/deco/PKGBUILD b/deco/PKGBUILD deleted file mode 100644 index 22f407e..0000000 --- a/deco/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Contributor: Christoph Zeiler <rabyte*gmail> - -pkgname=deco -pkgver=1.6.0.1 -pkgrel=1 -pkgdesc="A command-line utility to extract various archive file formats" -arch=('i686' 'x86_64') -url="http://hartlich.com/deco/" -license=('GPL3') -optdepends=('deco-archive (extractor wrappers for various formats)') -source=($url/download/$pkgname-$pkgver.tar.gz) -md5sums=('7939b2bfae68cf753b8d8c5ff23d555c') - -build() { - cd $pkgname-$pkgver - - make PREFIX=/usr CC=gcc CFLAGS="${CFLAGS}" || return 1 - make PREFIX=/usr DESTDIR=$pkgdir install -} - -# vim:set ts=2 sw=2 et: diff --git a/dejagnu/PKGBUILD b/dejagnu/PKGBUILD deleted file mode 100644 index 1c793a5..0000000 --- a/dejagnu/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Contributor: Flavio S. Truzzi (pirunga@gmail.com) -pkgname=dejagnu -pkgver=1.4.4 -pkgrel=2 -pkgdesc="GNU framework for testing other programs." -url="https://www.gnu.org/software/dejagnu/" -license=('GPL') -arch=('i686' 'x86_64') -depends=() -makedepends=() -conflicts=() -replaces=() -backup=() -install= -noextract=() -source=(http://ftp.gnu.org/gnu/dejagnu/$pkgname-$pkgver.tar.gz) -md5sums=(053f18fd5d00873de365413cab17a666) - -build() { - cd $startdir/src/$pkgname-$pkgver - - ./configure --prefix=/usr - - make || return 1 - make DESTDIR=$startdir/pkg install - - find $startdir/pkg -name "*.la" -exec rm -f '{}' \; -} diff --git a/devtools-git/PKGBUILD b/devtools-git/PKGBUILD deleted file mode 100644 index 9220b78..0000000 --- a/devtools-git/PKGBUILD +++ /dev/null @@ -1,40 +0,0 @@ -# Contributor: Evangelos Foutras <foutrelis@gmail.com> - -pkgname=devtools-git -pkgver=20110320 -pkgrel=1 -pkgdesc="Tools for Arch Linux package maintainers" -arch=('any') -url="http://projects.archlinux.org/devtools.git/" -license=('GPL') -depends=('namcap' 'openssh' 'subversion' 'rsync') -makedepends=('git') -provides=('devtools') -conflicts=('devtools') -source=() -md5sums=() - -#_gitroot="git://projects.archlinux.org/devtools.git" -_gitroot="git://github.com/heftig/devtools.git" -_gitname="devtools" - -build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [ -d $_gitname ] ; then - cd $_gitname && git pull origin - msg "The local files are updated." - else - git clone $_gitroot $_gitname - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - rm -rf "$srcdir/$_gitname-build" - git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" - - make DESTDIR="$pkgdir" install -} diff --git a/dhclient/PKGBUILD b/dhclient/PKGBUILD deleted file mode 100644 index 5f36194..0000000 --- a/dhclient/PKGBUILD +++ /dev/null @@ -1,32 +0,0 @@ -#$Id$ -# Maintainer: Jan de Groot <jgc@archlinux.org> -# Contributor: Mirko Messer <mirk@chao.ch> -pkgname=dhclient -pkgver=3.0.7 -pkgrel=2 -pkgdesc="dhclient is standalone client from the dhcp package" -arch=(i686 x86_64) -url="http://www.isc.org/index.pl?/sw/dhcp/" -license=('custom') -depends=('bash') -options=('!makeflags') -source=(ftp://ftp.isc.org/isc/dhcp/dhcp-${pkgver}.tar.gz \ - fix-broken-resolvconf.patch - ) - -build() { - cd ${startdir}/src/dhcp-${pkgver} - patch -Np1 -i ${startdir}/src/fix-broken-resolvconf.patch || return 1 - ./configure - cd work*/minires && make || return 1 - cd ../dst && make || return 1 - cd ../omapip && make || return 1 - cd ../common && make || return 1 - cd ../client - make DESTDIR=${startdir}/pkg install - mkdir -p ${startdir}/pkg/usr/share/licenses/${pkgname} - install -m644 ${startdir}/src/dhcp-${pkgver}/LICENSE \ - ${startdir}/pkg/usr/share/licenses/${pkgname}/ - - install -m755 -d ${startdir}/pkg/var/lib/dhclient -} diff --git a/dhclient/arch-nm.patch b/dhclient/arch-nm.patch deleted file mode 100644 index 26813d4..0000000 --- a/dhclient/arch-nm.patch +++ /dev/null @@ -1,377 +0,0 @@ -diff -urN dhcp-3.0.3/client/dhclient.8 dhcp-3.0.3-work/client/dhclient.8 ---- dhcp-3.0.3/client/dhclient.8 2004-09-30 01:01:46.000000000 +0200 -+++ dhcp-3.0.3-work/client/dhclient.8 2005-10-19 18:43:28.000000000 +0200 -@@ -78,6 +78,9 @@ - .B -w - ] - [ -+.B -x -+] -+[ - .I if0 - [ - .I ...ifN -diff -urN dhcp-3.0.3/client/dhclient.c dhcp-3.0.3-work/client/dhclient.c ---- dhcp-3.0.3/client/dhclient.c 2005-03-03 17:55:22.000000000 +0100 -+++ dhcp-3.0.3-work/client/dhclient.c 2005-10-19 18:48:42.000000000 +0200 -@@ -74,7 +74,9 @@ - int onetry=0; - int quiet=0; - int nowait=0; -- -+#ifdef EXTENDED_NEW_OPTION_INFO -+int extended_option_environment = 0; -+#endif - static void usage PROTO ((void)); - - void do_release(struct client_state *); -@@ -204,6 +206,11 @@ - } else if (!strcmp (argv [i], "--version")) { - log_info ("isc-dhclient-%s", DHCP_VERSION); - exit (0); -+#ifdef EXTENDED_NEW_OPTION_INFO -+ } else if (!strcmp (argv [i], "-x")) { -+ extended_option_environment = 1; -+ new_option_info_tree = GENERATE_NEW_OPTION_INFO; -+#endif - } else if (argv [i][0] == '-') { - usage (); - } else { -@@ -241,7 +248,7 @@ - } - - /* first kill of any currently running client */ -- if (release_mode) { -+ if (1) { - FILE *pidfd; - pid_t oldpid; - long temp; -@@ -251,11 +258,17 @@ - if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) { - e = fscanf(pidfd, "%ld\n", &temp); - oldpid = (pid_t)temp; -+ log_info ("There is already a pid file %s with pid %i", path_dhclient_pid, oldpid); - - if (e != 0 && e != EOF) { - if (oldpid) { -- if (kill(oldpid, SIGTERM) == 0) -- unlink(path_dhclient_pid); -+ if (kill(oldpid, SIGTERM) == 0) { -+ log_info ("killed old client process, removed PID file"); -+ unlink(path_dhclient_pid); -+ } else if (errno == ESRCH) { -+ log_info ("removed stale PID file"); -+ unlink(path_dhclient_pid); -+ } - } - } - fclose(pidfd); -@@ -476,7 +489,11 @@ - log_info (arr); - log_info (url); - -+#ifdef EXTENDED_NEW_OPTION_INFO -+ log_error ("Usage: dhclient [-1dqr] [-nwx] [-p <port>] %s", -+#else - log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] %s", -+#endif - "[-s server]"); - log_error (" [-cf config-file] [-lf lease-file]%s", - "[-pf pid-file] [-e VAR=val]"); -@@ -869,7 +886,7 @@ - /* If the BOUND/RENEW code detects another machine using the - offered address, it exits nonzero. We need to send a - DHCPDECLINE and toss the lease. */ -- if (script_go (client)) { -+ if (script_go (client) == 2) { - make_decline (client, client -> new); - send_decline (client); - destroy_client_lease (client -> new); -@@ -2433,8 +2450,28 @@ - struct envadd_state { - struct client_state *client; - const char *prefix; -+ struct universe *universe; - }; - -+#ifdef EXTENDED_NEW_OPTION_INFO -+static -+void build_universe_info_envvar -+( struct option_cache *oc, -+ struct packet *p, struct lease *l, -+ struct client_state *client, -+ struct option_state *in_o, -+ struct option_state *cf_o, -+ struct binding_scope **scope, -+ struct universe *u, void *es -+) -+{ -+ char info_name[512], info_data[512]; -+ snprintf(info_name, 512, "%s._universe_.", oc->option->universe->name); -+ snprintf(info_data, 512, "%u:%s", oc->option->code,oc->option->format); -+ client_envadd( client, info_name, oc->option->name, info_data ); -+} -+#endif -+ - void client_option_envadd (struct option_cache *oc, - struct packet *packet, struct lease *lease, - struct client_state *client_state, -@@ -2451,6 +2488,31 @@ - in_options, cfg_options, scope, oc, MDL)) { - if (data.len) { - char name [256]; -+#ifdef EXTENDED_NEW_OPTION_INFO -+ if ( extended_option_environment ) -+ { -+ if( ( oc->option->universe != &dhcp_universe ) -+ &&( oc->option->universe->index > fqdn_universe.index ) -+ &&( es->universe != oc->option->universe ) -+ ) -+ { -+ es->universe = oc->option->universe; -+ (*(es->universe->foreach)) -+ ( (struct packet *)0, (struct lease *)0, -+ client_state, -+ in_options, cfg_options, -+ scope, es->universe, es, -+ build_universe_info_envvar -+ ); -+ }else -+ if ( lookup_new_option_info(oc->option) != 0L ) -+ build_universe_info_envvar -+ ( oc, packet, lease, client_state, -+ in_options, cfg_options, scope, -+ oc->option->universe, es -+ ); -+ } -+#endif - if (dhcp_option_ev_name (name, sizeof name, - oc -> option)) { - client_envadd (es -> client, es -> prefix, -@@ -2479,6 +2541,7 @@ - - es.client = client; - es.prefix = prefix; -+ es.universe = 0L; - - client_envadd (client, - prefix, "ip_address", "%s", piaddr (lease -> address)); -@@ -2690,7 +2760,14 @@ - s = option -> name; - if (j + 1 == buflen) - return 0; -+#ifdef EXTENDED_NEW_OPTION_INFO -+ if ( ! extended_option_environment ) -+ buf [j++] = '_'; -+ else -+ buf [j++] = '.'; -+#else - buf [j++] = '_'; -+#endif - } - ++i; - } while (i != 2); -diff -urN dhcp-3.0.3/client/scripts/linux dhcp-3.0.3-work/client/scripts/linux ---- dhcp-3.0.3/client/scripts/linux 2002-11-15 02:09:09.000000000 +0100 -+++ dhcp-3.0.3-work/client/scripts/linux 2005-10-19 18:46:52.000000000 +0200 -@@ -22,6 +22,19 @@ - # 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious - # of the $1 in its args. - -+if [ -n "${dhc_dbus}" ]; then -+ /usr/bin/dbus-send \ -+ --system \ -+ --dest=com.redhat.dhcp \ -+ --type=method_call \ -+ /com/redhat/dhcp/$interface \ -+ com.redhat.dhcp.set \ -+ 'string:'"`env | /bin/egrep -v '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"; -+ if (( ( dhc_dbus & 31 ) == 31 )); then -+ exit 0; -+ fi; -+fi; -+ - make_resolv_conf() { - if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then - echo search $new_domain_name >/etc/resolv.conf -@@ -80,6 +93,7 @@ - fi - - if [ x$reason = xPREINIT ]; then -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 2 ) != 2 )); then - if [ x$alias_ip_address != x ]; then - # Bring down alias interface. Its routes will disappear too. - ifconfig $interface:0- inet 0 -@@ -98,6 +112,7 @@ - sleep 1 - - exit_with_hooks 0 -+ fi - fi - - if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then -@@ -115,6 +130,7 @@ - fi - fi - -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 2 ) != 2 )); then - if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \ - [ x$alias_ip_address != x$old_ip_address ]; then - # Possible new alias. Remove old alias. -@@ -124,13 +140,18 @@ - # IP address changed. Bringing down the interface will delete all routes, - # and clear the ARP cache. - ifconfig $interface inet 0 down -- - fi -+ fi -+ - if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ - [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then - -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 2 ) != 2 )); then - ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg -+ fi -+ -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 4 ) != 4 )); then - # Add a network route to the computed network address. - if [ $relmajor -lt 2 ] || \ - ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then -@@ -140,13 +161,18 @@ - route add default gw $router - done - fi -+ fi -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 2 ) != 2 )); then - if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; - then - ifconfig $interface:0- inet 0 - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg - route add -host $alias_ip_address $interface:0 - fi -+ fi -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 1 ) != 1 )); then - make_resolv_conf -+ fi - exit_with_hooks 0 - fi - -@@ -168,19 +194,24 @@ - fi - - if [ x$reason = xTIMEOUT ]; then -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 2 ) != 2 )); then - if [ x$alias_ip_address != x ]; then - ifconfig $interface:0- inet 0 - fi - ifconfig $interface inet $new_ip_address $new_subnet_arg \ - $new_broadcast_arg -+ fi - set $new_routers - ############## what is -w in ping? - if ping -q -c 1 $1; then -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 2 ) != 2 )); then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg - route add -host $alias_ip_address dev $interface:0 - fi -+ fi -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 4 ) != 4 )); then - if [ $relmajor -lt 2 ] || \ - ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then - route add -net $new_network_number -@@ -188,10 +219,16 @@ - for router in $new_routers; do - route add default gw $router - done -+ fi -+ -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 1 ) != 1 )); then - make_resolv_conf -+ fi - exit_with_hooks 0 - fi -+ if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 2 ) != 2 )); then - ifconfig $interface inet 0 down -+ fi - exit_with_hooks 1 - fi - -diff -urN dhcp-3.0.3/common/parse.c dhcp-3.0.3-work/common/parse.c ---- dhcp-3.0.3/common/parse.c 2005-03-03 17:55:23.000000000 +0100 -+++ dhcp-3.0.3-work/common/parse.c 2005-10-19 18:43:28.000000000 +0200 -@@ -1270,6 +1270,10 @@ - option_hash_add (option -> universe -> hash, - (const char *)option -> name, - 0, option, MDL); -+#ifdef EXTENDED_NEW_OPTION_INFO -+ if ( new_option_info_tree != 0L ) -+ add_new_option_info( option ); -+#endif - return 1; - } - -diff -urN dhcp-3.0.3/common/tables.c dhcp-3.0.3-work/common/tables.c ---- dhcp-3.0.3/common/tables.c 2004-09-01 19:06:35.000000000 +0200 -+++ dhcp-3.0.3-work/common/tables.c 2005-10-19 18:43:28.000000000 +0200 -@@ -1238,3 +1238,40 @@ - fqdn_universe.name, 0, - &fqdn_universe, MDL); - } -+ -+#ifdef EXTENDED_NEW_OPTION_INFO -+#include <search.h> -+ -+void *new_option_info_tree = 0L; -+ -+static int new_option_info_comparator( const void* p1, const void *p2 ) -+{ -+ uint32_t ocode1 = (((const struct option*)p1)->universe->index << 8) -+ |(((const struct option*)p1)->code), -+ ocode2 = (((const struct option*)p2)->universe->index << 8) -+ |(((const struct option*)p2)->code); -+ return( (ocode1 == ocode2) -+ ? 0 -+ :( ( ocode1 > ocode2 ) -+ ? 1 -+ : -1 -+ ) -+ ); -+} -+ -+void *add_new_option_info( struct option *option ) -+{ -+ if ( option->universe->index >= fqdn_universe.index ) -+ return 0L; -+ if ( new_option_info_tree == GENERATE_NEW_OPTION_INFO ) -+ new_option_info_tree = (void*)0L; -+ return tsearch( option, &(new_option_info_tree), new_option_info_comparator ); -+} -+ -+void *lookup_new_option_info( struct option *option ) -+{ -+ if ( new_option_info_tree == GENERATE_NEW_OPTION_INFO ) -+ return 0L; -+ return tfind( option, &(new_option_info_tree), new_option_info_comparator ); -+} -+#endif -diff -urN dhcp-3.0.3/includes/dhcpd.h dhcp-3.0.3-work/includes/dhcpd.h ---- dhcp-3.0.3/includes/dhcpd.h 2005-04-30 01:10:57.000000000 +0200 -+++ dhcp-3.0.3-work/includes/dhcpd.h 2005-10-19 18:43:28.000000000 +0200 -@@ -1799,6 +1799,14 @@ - void initialize_common_option_spaces PROTO ((void)); - struct universe *config_universe; - -+#define EXTENDED_NEW_OPTION_INFO -+#ifdef EXTENDED_NEW_OPTION_INFO -+#define GENERATE_NEW_OPTION_INFO ((void*)1) -+extern void *new_option_info_tree; -+extern void *add_new_option_info( struct option*); -+extern void *lookup_new_option_info( struct option *); -+#endif -+ - /* stables.c */ - #if defined (FAILOVER_PROTOCOL) - extern failover_option_t null_failover_option; diff --git a/dhclient/fix-broken-resolvconf.patch b/dhclient/fix-broken-resolvconf.patch deleted file mode 100644 index 5f73167..0000000 --- a/dhclient/fix-broken-resolvconf.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Nur dhcp-3.0.6.orig/client/scripts/linux dhcp-3.0.6/client/scripts/linux ---- dhcp-3.0.6.orig/client/scripts/linux 2008-03-29 18:44:07.000000000 +0100 -+++ dhcp-3.0.6/client/scripts/linux 2008-03-29 18:45:06.000000000 +0100 -@@ -36,8 +36,9 @@ - fi; - - make_resolv_conf() { -- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then -- echo search $new_domain_name >/etc/resolv.conf -+ if [ -n "$new_domain_name_servers" ]; then -+ : > /etc/resolv.conf -+ [ -n "$new_domain_name" ] && echo search $new_domain_name >/etc/resolv.conf - chmod 644 /etc/resolv.conf - for nameserver in $new_domain_name_servers; do - echo nameserver $nameserver >>/etc/resolv.conf diff --git a/dhclient/fix-mac80211-wireless.patch b/dhclient/fix-mac80211-wireless.patch deleted file mode 100644 index 57c6688..0000000 --- a/dhclient/fix-mac80211-wireless.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Nur dhcp-3.0.6.orig/client/scripts/linux dhcp-3.0.6/client/scripts/linux ---- dhcp-3.0.6.orig/client/scripts/linux 2008-03-29 18:59:39.000000000 +0100 -+++ dhcp-3.0.6/client/scripts/linux 2008-03-29 19:00:16.000000000 +0100 -@@ -140,7 +140,7 @@ - if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then - # IP address changed. Bringing down the interface will delete all routes, - # and clear the ARP cache. -- ifconfig $interface inet 0 down -+ ifconfig $interface inet 0 - fi - fi - -@@ -185,7 +185,7 @@ - fi - if [ x$old_ip_address != x ]; then - # Shut down interface, which will delete routes and clear arp cache. -- ifconfig $interface inet 0 down -+ ifconfig $interface inet 0 - fi - if [ x$alias_ip_address != x ]; then - ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg -@@ -228,7 +228,7 @@ - exit_with_hooks 0 - fi - if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 2 ) != 2 )); then -- ifconfig $interface inet 0 down -+ ifconfig $interface inet 0 - fi - exit_with_hooks 1 - fi diff --git a/django-openid-auth/PKGBUILD b/django-openid-auth/PKGBUILD deleted file mode 100644 index ca3af95..0000000 --- a/django-openid-auth/PKGBUILD +++ /dev/null @@ -1,18 +0,0 @@ -# Maintainer: Laszlo Papp <djszapi at archlinux us> - -pkgname=django-openid-auth -pkgver=0.1 -pkgrel=2 -pkgdesc="OpenID integration for django.contrib.auth" -arch=(any) -url="https://launchpad.net/django-openid-auth" -license=('GPL') -depends=('python' 'python-openid') -source=("http://launchpad.net/$pkgname/trunk/$pkgver/+download/$pkgname-$pkgver.tar.gz") -md5sums=('416ba0945237de0ec04bc0a5db3a0b2f') - -build() { - cd "$srcdir/$pkgname-$pkgver" - python setup.py build || return 1 - python setup.py install --root=$pkgdir --optimize=1 || return 1 -} diff --git a/django-piston/PKGBUILD b/django-piston/PKGBUILD deleted file mode 100644 index a635ff5..0000000 --- a/django-piston/PKGBUILD +++ /dev/null @@ -1,18 +0,0 @@ -# Maintainer: Laszlo Papp <djszapi at archlinux us> - -pkgname=django-piston -pkgver=0.2.2 -pkgrel=1 -pkgdesc="Piston is django mini-framework creating APIs" -arch=(any) -url="http://bitbucket.org/jespern/django-piston" -license=('GPL') -depends=('python' 'django') -source=("http://bitbucket.org/jespern/$pkgname/downloads/$pkgname-$pkgver.tar.gz") -md5sums=('28a2900695fdbcb14ff3c45390e7a4fd') - -build() { - cd "$srcdir/$pkgname" - python setup.py build || return 1 - python setup.py install --root=$pkgdir --optimize=1 || return 1 -} diff --git a/django-registration/PKGBUILD b/django-registration/PKGBUILD deleted file mode 100644 index f8caa8c..0000000 --- a/django-registration/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Contributor: Chaiwat Suttipongsakul <cwt at bashell dot com> -# Maintainer: Laszlo Papp <djszapi at archlinux us> - -pkgname=django-registration -pkgver=0.8 -pkgrel=1 -pkgdesc="A simple, generic user-registration application for Django" -arch=(any) -url="http://bitbucket.org/ubernostrum/django-registration/wiki/Home" -license=('GPL') -depends=('python' 'django') -source=("http://bitbucket.org/ubernostrum/django-registration/downloads/$pkgname-$pkgver-alpha-1.tar.gz") -md5sums=('e2a31be19ebeda41d235a4c52b7bffe7') - -build() { - cd "$srcdir/$pkgname-$pkgver-alpha-1" - python setup.py build || return 1 - python setup.py install --root=$pkgdir --optimize=1 || return 1 -} diff --git a/django-tagging/PKGBUILD b/django-tagging/PKGBUILD deleted file mode 100644 index 31785df..0000000 --- a/django-tagging/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Contributor: Ryan Coyner <rcoyner@gmail.com> -# Maintainer: James Pearson <james.m.pearson+arch@gmail.com> -pkgname=django-tagging -pkgver=0.3 -pkgrel=1 -pkgdesc="A generic tagging application for Django projects" -arch=('i686' 'x86_64') -url="http://code.google.com/p/django-tagging/" -license=('MIT') -depends=('python') -source=(http://django-tagging.googlecode.com/files/django-tagging-$pkgver.tar.gz) -md5sums=('0f2c48868ac71d0ad7a16654167d50eb') - -build() { - cd $srcdir/django-tagging-$pkgver - python setup.py build || return 1 - python setup.py install --root=$pkgdir || return 1 - install -D -m644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE -} diff --git a/django-voting-svn/PKGBUILD b/django-voting-svn/PKGBUILD deleted file mode 100644 index ec25884..0000000 --- a/django-voting-svn/PKGBUILD +++ /dev/null @@ -1,30 +0,0 @@ -# Maintainer: Laszlo Papp <djszapi at archlinux us> - -pkgname=django-voting-svn -pkgver=73 -pkgrel=1 -pkgdesc="A generic voting application for Django projects" -arch=('i686' 'x86_64') -url="http://code.google.com/p/django-voting/" -license=('GPL') -depends=('python') - -_svntrunk='http://django-voting.googlecode.com/svn/trunk/' -_svnmod=${pkgname} - -build() { - cd $srcdir - - if [ -d $_svnmod/.svn ]; then - (cd $_svnmod && svn up -r $pkgver) - else - svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod - fi - - msg "SVN checkout done or server timeout" - cd $_svnmod - - python setup.py install --root=$pkgdir - -} - diff --git a/docbook2odf/PKGBUILD b/docbook2odf/PKGBUILD deleted file mode 100644 index cdeff81..0000000 --- a/docbook2odf/PKGBUILD +++ /dev/null @@ -1,41 +0,0 @@ -# Contributor: Mathieu Clabaut <mathieu.clabaut@gmail.com> -pkgname=docbook2odf -pkgver=0.244 -pkgrel=2 -pkgdesc="toolkit that automaticaly converts DocBook to OASIS OpenDocument" -arch=(i686 x86_64) -url="http://open.comsultia.com/docbook2odf/" -license=('GPL2') -depends=('libxslt' 'perl-xml-libxslt' 'zip' 'perl-archive-zip') -makedepends=() -provides=('docbook2odf') -conflicts=() -replaces=() -backup=() -install= -source=(http://open.comsultia.com/docbook2odf/dwn/${pkgname}-${pkgver}.tar.gz) -md5sums=('3b285dc4d6298beb12818a350776751f') - -noextract=() -build() { - src=$startdir/src/docbook2odf-${pkgver} - dst=$startdir/pkg - mkdir -p "$dst/usr/share/docbook2odf/examples" - mkdir -p "$dst/usr/bin" - mkdir -p "$dst/usr/share/applications" - mkdir -p "$dst/usr/share/man/man1" - install -m0644 $src/bindings/desktop/*.desktop $dst/usr/share/applications - install -m0644 $src/docs/docbook2odf.1 $dst/usr/share/man/man1/ - install -m0644 $src/examples/* $dst/usr/share/docbook2odf/examples - install -m0755 $src/utils/docbook2odf $dst/usr/bin - dst=$dst/usr/share/docbook2odf/xsl - mkdir -p $dst/document-content - install -m0644 $src/xsl/* $dst/ - install -m0644 $src/xsl/document-content/* $dst/document-content/ - mkdir -p $dst/document-styles - install -m0644 $src/xsl/document-styles/* $dst/document-styles/ - mkdir -p $dst/overlay - install -m0644 $src/xsl/overlay/* $dst/overlay/ - mkdir -p $dst/common - install -m0644 $src/xsl/common/* $dst/common/ -} diff --git a/dovecot-managesieve/PKGBUILD b/dovecot-managesieve/PKGBUILD deleted file mode 100644 index 4df8e67..0000000 --- a/dovecot-managesieve/PKGBUILD +++ /dev/null @@ -1,76 +0,0 @@ -# Contributor: Paul Ezvan <paul@ezvan.fr> -# Based on dovecot PKGBUILD - -pkgname=dovecot-managesieve -pkgver=1.2.12 -_managesievever=0.11.11 -_dovecotvers=1.2 -_sievever=0.1.17 -pkgrel=1 -pkgdesc="An IMAP and POP3 server written with security primarily in mind with managesieve and sieve support" -arch=('i686' 'x86_64') -url="http://dovecot.org/" -license=("LGPL") -depends=('pam' 'libmysqlclient' 'postgresql-libs' 'heimdal' 'libcap' 'bzip2') -makedepends=('dovecot') -provides=('imap-server' 'pop3-server' "dovecot=$pkgver" "dovecot-sive=${_sievever}") -conflicts=('dovecot') -options=('!libtool') -install=$pkgname.install -source=(dovecot.sh - http://www.rename-it.nl/dovecot/${_dovecotvers}/dovecot-${_dovecotvers}-managesieve-${_managesievever}.tar.gz - http://dovecot.org/releases/$_dovecotvers/dovecot-$pkgver.tar.gz - http://www.rename-it.nl/dovecot/$_dovecotvers/dovecot-$pkgver-managesieve-${_managesievever}.diff.gz - http://www.rename-it.nl/dovecot/$_dovecotvers/dovecot-$_dovecotvers-sieve-${_sievever}.tar.gz) - -md5sums=('d020d43eab4ded6fb379dadc570a9490' - '32ba8d47a3695f8514bd2c2bf7348f96' - 'cc8e5c53cd0943ce0b5e1087356ad4ea' - '591f77f53af6b057ae8d42ef04d50d9f' - 'ba17a8a08386eb2731793b74317003e2') -build(){ - # configure and make dovecot source - cd $startdir/src/dovecot-$pkgver - # patch with managesieve support - patch -p1 -i $startdir/src/dovecot-$pkgver-managesieve-${_managesievever}.diff - # configure with openssl, mysql, and postgresql support - ./configure --prefix=/usr --sysconfdir=/etc/dovecot --localstatedir=/var \ - --libexecdir=/usr/lib --with-moduledir=/usr/lib/dovecot/modules \ - --with-db --with-mysql --with-pgsql --with-sqlite \ - --with-ssl=openssl --with-ssldir=/etc/dovecot/ssl \ - --with-gssapi --with-ldap=plugin --enable-header-install --with-docs - # build - make - # install - make DESTDIR=$startdir/pkg install - # remove empty directories for cleanliness - # /usr/share will usually end up empty except for documentation, but we - # should not rely on that to remain true, so we do it this way - rm -rf $startdir/pkg/usr/share/doc - rmdir $startdir/pkg/usr/share - # install the launch script - install -D -m755 $startdir/src/dovecot.sh $startdir/pkg/etc/rc.d/dovecot - # fix paths in the config example file where we have a different layout - sed -i 's|/usr/lib/dovecot|/usr/lib/dovecot/modules|g; - s|libexec|lib|g; - s|lib/sendmail|sbin/sendmail|g' $pkgdir/etc/dovecot/dovecot-example.conf - - - # configure dovecot sieve source - cd $srcdir/dovecot-${_dovecotvers}-sieve-${_sievever} - ./configure --prefix=/usr --with-dovecot=$srcdir/dovecot-$pkgver - # build - make - # install - make DESTDIR="$pkgdir" install - - # configure dovecot managesieve plugin - cd $srcdir/dovecot-${_dovecotvers}-managesieve-${_managesievever} - ./configure --prefix=/usr --with-dovecot=$srcdir/dovecot-$pkgver \ - --with-dovecot-sieve=$srcdir/dovecot-${_dovecotvers}-sieve-${_sievever} \ - --libexecdir=/usr/lib - # build - make - # install - make DESTDIR="$pkgdir" install -} diff --git a/dovecot-managesieve/dovecot-managesieve.install b/dovecot-managesieve/dovecot-managesieve.install deleted file mode 100644 index 5175734..0000000 --- a/dovecot-managesieve/dovecot-managesieve.install +++ /dev/null @@ -1,26 +0,0 @@ -# arg 1: the new package version -post_install() { - if [ -z "`grep '^dovecot:' /etc/group`" ]; then - groupadd -g 76 dovecot >& /dev/null - fi - if [ -z "`grep '^dovecot:' /etc/passwd`" ]; then - useradd -u 76 -d /var/run/dovecot/login -g dovecot -s /bin/false dovecot - fi -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - post_install $1 -} - -# arg 1: the old package version -pre_remove() { - userdel dovecot &> /dev/null - groupdel dovecot &> /dev/null -} - -op=$1 -shift - -$op $* diff --git a/dovecot-managesieve/dovecot.sh b/dovecot-managesieve/dovecot.sh deleted file mode 100755 index b7555fe..0000000 --- a/dovecot-managesieve/dovecot.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/sbin/dovecot` -case "$1" in - start) - stat_busy "Starting Dovecot" - [ -z "$PID" ] && /usr/sbin/dovecot - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon dovecot - stat_done - fi - ;; - stop) - stat_busy "Stopping Dovecot" - [ ! -z "$PID" ] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon dovecot - stat_done - fi - ;; - restart) - $0 stop - sleep 2 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/dovecot-sieve/PKGBUILD b/dovecot-sieve/PKGBUILD deleted file mode 100644 index 617661d..0000000 --- a/dovecot-sieve/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Contributor: Paul Ezvan <paul@ezvan.fr> -pkgname=dovecot-sieve -pkgver=0.1.15 -pkgrel=1 -_dovecotvers=1.2 -pkgdesc="Dovecot sieve plugin" -arch=('i686' 'x86_64') -url="http://wiki.dovecot.org/LDA/Sieve" -license=('LGPL') -depends=("dovecot>=$_dovecotvers") -source=(http://www.rename-it.nl/dovecot/$_dovecotvers/dovecot-$_dovecotvers-sieve-$pkgver.tar.gz) -md5sums=('2246fbbcf304d3ec1df0db2d091fe05a') - -build() { - - cd "$srcdir/dovecot-$_dovecotvers-sieve-$pkgver" || return 1 - - ./configure --prefix=/usr --with-dovecot=/usr/lib/dovecot || return 1 - make || return 1 - make DESTDIR="$pkgdir" install || return 1 -} diff --git a/dovecot/-1.2.1.tar.gz.part b/dovecot/-1.2.1.tar.gz.part deleted file mode 100644 index e69de29..0000000 --- a/dovecot/-1.2.1.tar.gz.part +++ /dev/null diff --git a/dovecot/PKGBUILD b/dovecot/PKGBUILD deleted file mode 100644 index 0421f9f..0000000 --- a/dovecot/PKGBUILD +++ /dev/null @@ -1,51 +0,0 @@ -# $Id$ -# -# Contributor: Paul Mattal <paul@mattal.com> -# Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com> -# Contributor: GARETTE Emmanuel <gnunux at laposte dot net> -# Maintainer: Andreas Radke <andyrtr@archlinux.org> - -pkgname=dovecot-managesieve -_pkgname=dovecot -pkgver=1.2.1 -_patchver=0.11.7 -pkgrel=1 -pkgdesc="An IMAP and POP3 server written with security primarily in mind" -arch=('i686' 'x86_64') -url="http://dovecot.org/" -license=("LGPL") -depends=("pam>=1.0.4" "libmysqlclient>=5.1.35-2" "postgresql-libs>=8.3.7" "sqlite3>=3.6.15-2" "db>=4.7.25.4"\ - "heimdal>=1.2.1-5" 'libcap>=2.16-3' 'bzip2') -optdepends=('libldap: ldap plugin') -makedepends=('libldap>=2.3.43-3') -provides=('imap-server' 'pop3-server') -replaces=() -options=('!libtool') -install=$pkgname.install -source=(http://dovecot.org/releases/1.2/${_pkgname}-${pkgver}.tar.gz dovecot.sh "http://www.rename-it.nl/dovecot/1.2/${_pkgname}-${pkgver}-managesieve-${_patchver}.diff.gz") -md5sums=('c269cfe38fc40061e232dd28e5fe3721' - 'd020d43eab4ded6fb379dadc570a9490') - -build() { - cd ${srcdir}/${_pkgname}-$pkgver || return 1 - - patch -p1 < $srcdir/${_pkgname}-${pkgver}-managesieve-${_patchver}.diff || return 1 - - # configure with openssl, mysql, and postgresql support - ./configure --prefix=/usr --sysconfdir=/etc/dovecot --localstatedir=/var \ - --libexecdir=/usr/lib --with-moduledir=/usr/lib/dovecot/modules \ - --with-db --with-mysql --with-pgsql --with-sqlite \ - --with-ssl=openssl --with-ssldir=/etc/dovecot/ssl \ - --with-gssapi --with-ldap=plugin --enable-header-install --with-docs || return 1 - - make || return 1 - make DESTDIR=${pkgdir} install || return 1 - - # install the launch script - install -D -m755 ${srcdir}/${_pkgname}.sh ${pkgdir}/etc/rc.d/${_pkgname} || return 1 - - # fix paths in the config example file where we have a different layout - sed -i 's|/usr/lib/dovecot|/usr/lib/dovecot/modules|g; - s|libexec|lib|g; - s|lib/sendmail|sbin/sendmail|g' $pkgdir/etc/dovecot/dovecot-example.conf || return 1 -} diff --git a/dovecot/dovecot-managesieve-1.2.1.tar.gz.part b/dovecot/dovecot-managesieve-1.2.1.tar.gz.part deleted file mode 100644 index e69de29..0000000 --- a/dovecot/dovecot-managesieve-1.2.1.tar.gz.part +++ /dev/null diff --git a/dovecot/dovecot-managesieve.install b/dovecot/dovecot-managesieve.install deleted file mode 100644 index 5175734..0000000 --- a/dovecot/dovecot-managesieve.install +++ /dev/null @@ -1,26 +0,0 @@ -# arg 1: the new package version -post_install() { - if [ -z "`grep '^dovecot:' /etc/group`" ]; then - groupadd -g 76 dovecot >& /dev/null - fi - if [ -z "`grep '^dovecot:' /etc/passwd`" ]; then - useradd -u 76 -d /var/run/dovecot/login -g dovecot -s /bin/false dovecot - fi -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - post_install $1 -} - -# arg 1: the old package version -pre_remove() { - userdel dovecot &> /dev/null - groupdel dovecot &> /dev/null -} - -op=$1 -shift - -$op $* diff --git a/dovecot/dovecot.sh b/dovecot/dovecot.sh deleted file mode 100644 index b7555fe..0000000 --- a/dovecot/dovecot.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/sbin/dovecot` -case "$1" in - start) - stat_busy "Starting Dovecot" - [ -z "$PID" ] && /usr/sbin/dovecot - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon dovecot - stat_done - fi - ;; - stop) - stat_busy "Stopping Dovecot" - [ ! -z "$PID" ] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon dovecot - stat_done - fi - ;; - restart) - $0 stop - sleep 2 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/dstat/PKGBUILD b/dstat/PKGBUILD deleted file mode 100644 index 132521e..0000000 --- a/dstat/PKGBUILD +++ /dev/null @@ -1,23 +0,0 @@ -# Maintainer: Schnouki <thomas.jost@gmail.com> -# Contributor: devon <admin@patched.biz> -pkgname=dstat -pkgver=0.7.2 -pkgrel=1 -pkgdesc="Dstat: Versatile resource statistics tool" -arch=('any') -url="http://dag.wieers.com/home-made/dstat/" -license=('GPL') -depends=('python') -source=(http://dag.wieers.com/home-made/$pkgname/$pkgname-$pkgver.tar.bz2) -md5sums=('bfea4dc8037a0b18fc40a4dfc104dcc8') -sha1sums=('10baf061e3d38e1234fb99182fc53509adf07269') - -build() { - cd $srcdir/$pkgname-$pkgver - make DESTDIR=$pkgdir install || return 1 - - cd docs - for f in *.html *.txt; do - install -Dm644 $f $pkgdir/usr/share/doc/$pkgname/$f || return 1 - done -} diff --git a/dzlad/PKGBUILD b/dzlad/PKGBUILD deleted file mode 100644 index f54fc09..0000000 --- a/dzlad/PKGBUILD +++ /dev/null @@ -1,26 +0,0 @@ -# Maintainer: lolilolicon <lolilolicon#gmail#com> -# Contributor: lolilolicon <lolilolicon#gmail#com> - -pkgname=dzlad -pkgver=0.1.3 -pkgrel=1 -pkgdesc="Command line interface to AUR written in Ruby" -arch=(any) -url="http://lolilolicon.github.com/dzlad" -license=('MIT') -depends=(ruby) -source=(http://github.com/downloads/lolilolicon/$pkgname/$pkgname-$pkgver.tar.gz) -md5sums=('3d2d320630e73fe7f96631943ae2d952') - -build() { - cd "$srcdir/$pkgname-$pkgver" - - install -d "$pkgdir/usr/lib/ruby/site_ruby/1.9.1/dzlad" - install -m 644 lib/dzlad/*.rb "$pkgdir/usr/lib/ruby/site_ruby/1.9.1/dzlad" - install -Dm 644 lib/dzlad.rb "$pkgdir/usr/lib/ruby/site_ruby/1.9.1/" - install -Dm 755 bin/dzlad "$pkgdir/usr/bin/dzlad" - - install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" -} - -# vim:set ts=2 sw=2 et: diff --git a/eaccelerator/PKGBUILD b/eaccelerator/PKGBUILD deleted file mode 100644 index fc5abac..0000000 --- a/eaccelerator/PKGBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Contributor: Florian Pritz <f-p@gmx.at> -pkgname=eaccelerator -pkgver=0.9.5.3 -pkgrel=1 -pkgdesc="" -arch=('i686' 'x86_64') -url="" -license=('GPL') -groups=() -depends=('php') -makedepends=() -provides=() -conflicts=() -replaces=() -backup=() -options=() -install= -source=(http://bart.eaccelerator.net/source/$pkgver/$pkgname-$pkgver.tar.bz2) -noextract=() -md5sums=() - -build() { - cd "$srcdir/$pkgname-$pkgver" - - phpize || return 1 - ./configure \ - --enable-eaccelerator=shared \ - --with-php-config=/usr/bin/php-config - - make || return 1 - make DESTDIR="$pkgdir/" install -} - -# vim:set ts=2 sw=2 et: diff --git a/fb-client/.gitignore b/fb-client/.gitignore deleted file mode 100644 index d29844a..0000000 --- a/fb-client/.gitignore +++ /dev/null @@ -1 +0,0 @@ -fb-* diff --git a/fb-client/COPYING b/fb-client/COPYING deleted file mode 100644 index 351d0fb..0000000 --- a/fb-client/COPYING +++ /dev/null @@ -1,13 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - 14 rue de Plaisance, 75014 Paris, France - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - diff --git a/fb-client/PKGBUILD b/fb-client/PKGBUILD deleted file mode 100644 index e1bbba6..0000000 --- a/fb-client/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Maintainer: Florian "Bluewind" Pritz <flo@xssn.at> -pkgname=fb-client -pkgver=0.6.7.1 -pkgrel=1 -pkgdesc="Client for paste.xinu.at" -arch=('any') -url="http://paste.xinu.at" -license=('custom:WTFPLv2') -depends=('curl') -optdepends=('xclip: for automatically copying the URL into the clipboard') -source=("http://paste.xinu.at/data/client/fb-${pkgver}" "http://paste.xinu.at/data/client/COPYING") - -build() { - cd "$srcdir" - install -Dm755 fb-${pkgver} "$pkgdir/usr/bin/fb" - install -Dm644 COPYING "$pkgdir/usr/share/licenses/${pkgname}/LICENSE" -} - -# vim:set ts=2 sw=2 et: -md5sums=('74699a89f5b06e09b1540e8bfe35a7c0' - 'dcd8c4d69ca6c3eba9bee2599456e4ac') diff --git a/ffcast/PKGBUILD b/ffcast/PKGBUILD deleted file mode 100644 index 36acc17..0000000 --- a/ffcast/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Maintainer: lolilolicon <lolilolicon@gmail.com> - -pkgname=ffcast -epoch=1 -pkgver=1.0rc3 -pkgrel=2 -pkgdesc="screencast one or more interactively selected region or window" -arch=(i686 x86_64) -url="https://github.com/lolilolicon/FFcast2" -license=(GPL3) -depends=('bash>=4.2' ffmpeg libx11 xorg-xwininfo) -makedepends=(perl) -source=("https://github.com/downloads/lolilolicon/FFcast2/$pkgname-$pkgver.tar.gz") -md5sums=('0094895473d5cf90eae2538f480e9bff') - -build() { - cd "$srcdir/$pkgname-$pkgver" - make -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - make PREFIX=/usr DESTDIR="$pkgdir" install - - install -D -m644 README.asciidoc "$pkgdir/usr/share/doc/$pkgname"/README.txt -} - -# vim:st=2:sw=2:et: diff --git a/ffmpeg-svn/PKGBUILD b/ffmpeg-svn/PKGBUILD deleted file mode 100644 index 9b1cc30..0000000 --- a/ffmpeg-svn/PKGBUILD +++ /dev/null @@ -1,60 +0,0 @@ -# Contributor: raubkopierer <mail[dot]sensenmann[at]googlemail[dot]com> - -pkgname=ffmpeg-svn -pkgver=21252 -pkgrel=1 -pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix" -arch=('i686' 'x86_64') -url="http://ffmpeg.mplayerhq.hu/" -license=('GPL') -depends=('lame' 'sdl' 'zlib' 'imlib2' 'x264-git' 'libtheora' 'opencore-amr' 'faac') -makedepends=('subversion') -provides=("ffmpeg=`date +%Y%m%d`") -conflicts=('ffmpeg') -source=() -md5sums=() - -_svntrunk=svn://svn.ffmpeg.org/ffmpeg/trunk -_svnmod=ffmpeg - -build() { - cd "$srcdir" - - if [ -d $_svnmod/.svn ]; then - (cd $_svnmod && svn up -r $pkgver) - else - svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod - fi - - msg "SVN checkout done or server timeout" - msg "Starting make..." - - rm -rf "$_svnmod-build" - mkdir "$_svnmod-build" - cd "$_svnmod-build" - - "$srcdir/$_svnmod/configure" \ - --prefix=/usr \ - --enable-gpl \ - --enable-nonfree \ - --enable-version3 \ - --enable-libmp3lame \ - --enable-libfaac \ - --enable-libx264 \ - --enable-libopencore-amrnb \ - --enable-libopencore-amrwb \ - --enable-libtheora \ - --enable-postproc \ - --enable-shared \ - --enable-pthreads \ - --enable-x11grab \ - --arch=`uname -m` \ - || return 1 - - make || return 1 - make doc/ff{mpeg,play,server}.1 || return 1 - - make DESTDIR="$pkgdir" install || return 1 - make DESTDIR="$pkgdir" install-man || return 1 - -} diff --git a/firefox-nightly/ChangeLog b/firefox-nightly/ChangeLog deleted file mode 100644 index 74ab85e..0000000 --- a/firefox-nightly/ChangeLog +++ /dev/null @@ -1,35 +0,0 @@ -firefox-nightly 3.7a2pre-1 - + New version - -firefox-nightly 3.7a1pre-2 - + Fixed wrong url, thanks to kumyco - -firefox-nightly 3.7a1pre-1 - + Version bump - -firefox-nightly 3.6a2pre-1 - + Version bump - -firefox-nightly 3.6a1pre-1 - + Version bump - -firefox-nightly 3.2a1pre-1 - + Version bump - + Both x86 and x86_64 pkgs download from latest-trunk dir - -firefox-nightly 3.1b2pre-1 - + Change installation directory to /opt/firefox-$pkgver - -firefox-nightly 3.1b2.20081109-1 - + Update to nightly build 2008-11-09 - -firefox-nightly 3.1b2.2008110202-1 - + Update to nightly build 2008-11-02-02 - -firefox-nightly 3.1b2_20081020-1 - + Update to nightly build 2008-10-20 (Lastest versions are buggy) - + Add firefox md5sums - -firefox-nightly 3.1b2-2 - + Remove IM error fix (Tested with new builds) - + Change installation directory to /opt/mozilla/firefox-$pkgver diff --git a/firefox-nightly/PKGBUILD b/firefox-nightly/PKGBUILD deleted file mode 100644 index e42c0fb..0000000 --- a/firefox-nightly/PKGBUILD +++ /dev/null @@ -1,35 +0,0 @@ -# Maintainer: Cedric MATHIEU <me.xenom @ gmail.com> -# Contributor : Det <nimetonmaili @ gmail.com> -# Contributor: coderoar <coderoar @ gmail.com> - -pkgname=firefox-nightly -pkgdesc='Standalone web browser from mozilla.org, nightly build' -url='http://www.mozilla.org/projects/firefox' -pkgrel=$(date +%Y_%m_%d_%T) -pkgver=9.0a1 -arch=('i686' 'x86_64') -license=('MPL' 'GPL' 'LGPL') -source=('firefox-nightly.desktop' 'firefox-nightly-safe.desktop') -sha1sums=('6880230bc487bd65c5da43c19498f4520793e27b' '7faa96301d1c3d7772da859b96b3420cb0f34bb3') -depends=('desktop-file-utils' 'libxt' 'mime-types' 'nss' 'shared-mime-info') - -package() { - FX_SRC="firefox-${pkgver}.en-US.linux-${CARCH}.tar.bz2" - FX_SRC_URI="http://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/${FX_SRC}" - - msg "Downloading..." - wget -N ${FX_SRC_URI} - msg "Extracting..." - bsdtar -x -f ${FX_SRC} - msg "Packaging..." - -# uncomment this line to remove these -# rm -rf firefox/{extensions,plugins,searchplugins} - - mkdir -p "${pkgdir}"/{usr/{bin,share/{applications,pixmaps}},opt} - cp -r firefox "${pkgdir}/opt/firefox-${pkgver}" - - ln -s /opt/firefox-${pkgver}/firefox "${pkgdir}/usr/bin/firefox-nightly" - install -m644 "${srcdir}"/{firefox-nightly.desktop,firefox-nightly-safe.desktop} "${pkgdir}/usr/share/applications/" - install -m644 "${srcdir}/firefox/icons/mozicon128.png" "${pkgdir}/usr/share/pixmaps/${pkgname}-icon.png" -} diff --git a/firefox-nightly/README b/firefox-nightly/README deleted file mode 100644 index 36da254..0000000 --- a/firefox-nightly/README +++ /dev/null @@ -1,5 +0,0 @@ -This package contains precompiled binaries of Firefox. These are -NIGHTLY BUILDS. They are completely untested. We don't even know if -they start up without crashing. - + It will be installed mainly in /opt/mozilla/firefox-$pkgver, and you can execute 'firefox-nightly' to run it - + Maybe it won't work with 64-bit Input Method modules, such as SCIM and iBus. See http://bbs.archlinux.org/viewtopic.php?id=19387 for details. diff --git a/firefox-nightly/firefox-nightly-safe.desktop b/firefox-nightly/firefox-nightly-safe.desktop deleted file mode 100644 index 34d98e6..0000000 --- a/firefox-nightly/firefox-nightly-safe.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=Minefield - Safe Mode -GenericName=Web Browser - Safe Mode -Icon=firefox-nightly-icon -Type=Application -Categories=Application;Network; -MimeType=text/html -Encoding=UTF-8 -Exec=firefox-nightly -safe-mode %u -Terminal=false -MultipleArgs=false -StartupNotify=false diff --git a/firefox-nightly/firefox-nightly.desktop b/firefox-nightly/firefox-nightly.desktop deleted file mode 100644 index e1545c6..0000000 --- a/firefox-nightly/firefox-nightly.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=Minefield -GenericName=Web Browser -Icon=firefox-nightly-icon -Type=Application -Categories=Application;Network; -MimeType=text/html -Encoding=UTF-8 -Exec=firefox-nightly %u -Terminal=false -MultipleArgs=false -StartupNotify=false diff --git a/firefox-qt/PKGBUILD b/firefox-qt/PKGBUILD deleted file mode 100644 index f8b69ae..0000000 --- a/firefox-qt/PKGBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# $Id: PKGBUILD 73155 2010-03-23 10:23:39Z jgc $ -# Contributor: Jakub Schmidtke <sjakub@gmail.com> - -pkgname=firefox-qt -pkgver=3.6.3 -pkgrel=2 -_xulver=1.9.2.3 -pkgdesc="Standalone web browser from mozilla.org" -arch=(i686 x86_64) -license=('MPL' 'GPL' 'LGPL') -depends=("xulrunner-qt=${_xulver}" 'desktop-file-utils') -makedepends=('zip' 'pkgconfig' 'diffutils' 'qt' 'python' 'wireless_tools' 'patch') -replaces=('firefox3') -install=firefox.install -url="http://www.mozilla.org/projects/firefox" -source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/source/firefox-${pkgver}.source.tar.bz2 - mozconfig - firefox-qt.desktop - firefox-qt-safe.desktop - mozilla-firefox-1.0-lang.patch - browser-defaulturls.patch - firefox-version.patch) - -md5sums=('5e4541ab23084b7b14ba228291ce2688' - 'c3a62a73278a069fff0f16e391f79670' - '55d930b5bec8778d222d0a7946bdd676' - 'a2958ad90a26e16f66508d91b43d2683' - 'bd5db57c23c72a02a489592644f18995' - '8bf21158090c89fd834bb711aae0602e' - '78b9b0bded64cff20a73d8a3ad3fc38b') - -build() { - cd "${srcdir}/mozilla-1.9.2" - patch -Np1 -i "${srcdir}/mozilla-firefox-1.0-lang.patch" - patch -Np0 -i "${srcdir}/browser-defaulturls.patch" - patch -Np1 -i "${srcdir}/firefox-version.patch" - - cp "${srcdir}/mozconfig" .mozconfig - unset CFLAGS - unset CXXFLAGS - - export LDFLAGS="-Wl,-rpath,/opt/ffqt/lib/firefox-3.6" - - make -j1 -f client.mk build MOZ_MAKE_FLAGS="${MAKEFLAGS}" || return 1 - make -j1 DESTDIR="${pkgdir}" install || return 1 - - rm -f ${pkgdir}/opt/ffqt/lib/firefox-3.6/libjemalloc.so - - install -m755 -d ${pkgdir}/opt/ffqt/share/applications - install -m755 -d ${pkgdir}/opt/ffqt/share/pixmaps - install -m644 ${srcdir}/mozilla-1.9.2/browser/branding/unofficial/default48.png ${pkgdir}/opt/ffqt/share/pixmaps/firefox.png || return 1 - install -m644 ${srcdir}/firefox-qt.desktop ${pkgdir}/opt/ffqt/share/applications/ || return 1 - install -m644 ${srcdir}/firefox-qt-safe.desktop ${pkgdir}/opt/ffqt/share/applications/ || return 1 -} diff --git a/firefox-qt/browser-defaulturls.patch b/firefox-qt/browser-defaulturls.patch deleted file mode 100644 index a7bb845..0000000 --- a/firefox-qt/browser-defaulturls.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- browser/branding/unofficial/locales/browserconfig.properties~ 2009-06-13 17:04:42.000000000 +0200 -+++ browser/branding/unofficial/locales/browserconfig.properties 2009-06-13 17:05:28.000000000 +0200 -@@ -1,3 +1,3 @@ - # Do NOT localize or otherwise change these values --browser.startup.homepage=http://www.mozilla.org/projects/namoroka/ -+browser.startup.homepage=http://www.google.com/firefox - ---- browser/branding/unofficial/pref/firefox-branding.js~ 2009-06-13 16:57:53.000000000 +0200 -+++ browser/branding/unofficial/pref/firefox-branding.js 2009-06-13 16:59:17.000000000 +0200 -@@ -1,5 +1,5 @@ --pref("startup.homepage_override_url","http://www.mozilla.org/projects/%APP%/%VERSION%/whatsnew/"); --pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERSION%/firstrun/"); -+pref("startup.homepage_override_url","http://www.mozilla.com/%APP%/%VERSION%/whatsnew/"); -+pref("startup.homepage_welcome_url","http://www.mozilla.com/%APP%/%VERSION%/firstrun/"); - // The time interval between checks for a new version (in seconds) - // nightly=8 hours, official=24 hours - pref("app.update.interval", 28800); -@@ -11,7 +11,7 @@ - pref("app.update.url.details", "http://www.mozilla.org/projects/%APP%/"); - - // Release notes URL --pref("app.releaseNotesURL", "http://www.mozilla.org/projects/%APP%/%VERSION%/releasenotes/"); -+pref("app.releaseNotesURL", "http://www.mozilla.com/%APP%/%VERSION%/releasenotes/"); - - // Search codes belong only in builds with official branding - pref("browser.search.param.yahoo-fr", ""); diff --git a/firefox-qt/firefox-qt-safe.desktop b/firefox-qt/firefox-qt-safe.desktop deleted file mode 100644 index 6b1d0a6..0000000 --- a/firefox-qt/firefox-qt-safe.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Exec=/opt/ffqt/bin/firefox -safe-mode %u -Icon=/opt/ffqt/share/pixmaps/firefox-qt -Type=Application -Terminal=false -MultipleArgs=false -Name=Firefox Qt - Safe Mode -GenericName=Web Browser - Safe Mode -StartupNotify=false -Categories=Application;Network; diff --git a/firefox-qt/firefox-qt.desktop b/firefox-qt/firefox-qt.desktop deleted file mode 100644 index 0547f9e..0000000 --- a/firefox-qt/firefox-qt.desktop +++ /dev/null @@ -1,81 +0,0 @@ -[Desktop Entry] -Exec=/opt/ffqt/bin/firefox %u -Icon=/opt/ffqt/share/pixmaps/firefox-qt -Type=Application -Terminal=false -Name=Firefox Qt -Name[bn]=ফায়ারফক্স3 -Name[eo]=Fajrovulpo3 -Name[fi]=Firefox3 -Name[pa]=ਫਾਇਰਫੋਕਸ3 -Name[tg]=Рӯбоҳи оташин3 -GenericName=Web Browser -GenericName[af]=Web Blaaier -GenericName[ar]=متصفح ويب -GenericName[az]=Veb Səyyahı -GenericName[bg]=Браузър -GenericName[bn]=ওয়েব ব্রাউজার -GenericName[br]=Furcher ar Gwiad -GenericName[bs]=WWW Preglednik -GenericName[ca]=Fullejador web -GenericName[cs]=WWW prohlížeč -GenericName[cy]=Porydd Gwe -GenericName[da]=Browser -GenericName[de]=Qt Web-Browser -GenericName[el]=Περιηγητής Ιστού -GenericName[eo]=TTT-legilo -GenericName[es]=Navegador web -GenericName[et]=Veebilehitseja -GenericName[eu]=Web arakatzailea -GenericName[fa]=مرورگر وب -GenericName[fi]=WWW-selain -GenericName[fo]=Alnótsfar -GenericName[fr]=Navigateur web -GenericName[gl]=Navegador Web -GenericName[he]=דפדפן אינטרנט -GenericName[hi]=वेब ब्राउज़र -GenericName[hr]=Web preglednik -GenericName[hu]=Webböngésző -GenericName[is]=Vafri -GenericName[it]=Browser Web -GenericName[ja]=ウェブブラウザ -GenericName[ko]=웹 브라우저 -GenericName[lo]=ເວັບບຣາວເຊີ -GenericName[lt]=Žiniatinklio naršyklė -GenericName[lv]=Web Pārlūks -GenericName[mk]=Прелистувач на Интернет -GenericName[mn]=Веб-Хөтөч -GenericName[nb]=Nettleser -GenericName[nds]=Nettkieker -GenericName[nl]=Webbrowser -GenericName[nn]=Nettlesar -GenericName[nso]=Seinyakisi sa Web -GenericName[pa]=ਵੈਬ ਝਲਕਾਰਾ -GenericName[pl]=Przeglądarka WWW -GenericName[pt]=Navegador Web -GenericName[pt_BR]=Navegador Web -GenericName[ro]=Navigator de web -GenericName[ru]=Веб-браузер -GenericName[se]=Fierpmádatlogan -GenericName[sk]=Webový prehliadač -GenericName[sl]=Spletni brskalnik -GenericName[sr]=Веб претраживач -GenericName[sr@Latn]=Veb pretraživač -GenericName[ss]=Ibrawuza yeWeb -GenericName[sv]=Webbläsare -GenericName[ta]=வலை உலாவி -GenericName[tg]=Тафсиргари вэб -GenericName[th]=เว็บบราวเซอร์ -GenericName[tr]=Web Tarayıcı -GenericName[uk]=Навігатор Тенет -GenericName[uz]=Веб-браузер -GenericName[ven]=Buronza ya Webu -GenericName[vi]=Trình duyệt Web -GenericName[wa]=Betchteu waibe -GenericName[xh]=Umkhangeli zincwadi we Web -GenericName[zh_CN]=网页浏览器 -GenericName[zh_TW]=網頁瀏覽器 -GenericName[zu]=Umcingi we-Web -MimeType=text/html; -StartupNotify=true -Categories=Network;WebBrowser; diff --git a/firefox-qt/firefox-version.patch b/firefox-qt/firefox-version.patch deleted file mode 100644 index 5f35d85..0000000 --- a/firefox-qt/firefox-version.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- mozilla-1.9.1/browser/installer/Makefile.in.ver 2009-07-18 13:32:35.000000000 +0200 -+++ mozilla-1.9.1/browser/installer/Makefile.in 2009-07-18 13:33:12.000000000 +0200 -@@ -43,6 +43,8 @@ - - include $(DEPTH)/config/autoconf.mk - -+MOZ_APP_VERSION="qt-3.6" -+ - NO_PKG_FILES = \ - $(MOZ_APP_NAME)-config \ - $(MOZ_APP_NAME)-bin.elf \ diff --git a/firefox-qt/firefox.install b/firefox-qt/firefox.install deleted file mode 100644 index 7463b6e..0000000 --- a/firefox-qt/firefox.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install() { - update-desktop-database -q -} - -post_upgrade() { - post_install $1 -} - -post_remove() { - update-desktop-database -q -} - diff --git a/firefox-qt/mozconfig b/firefox-qt/mozconfig deleted file mode 100644 index 793d9ee..0000000 --- a/firefox-qt/mozconfig +++ /dev/null @@ -1,35 +0,0 @@ -. $topsrcdir/browser/config/mozconfig - -ac_add_options --prefix=/opt/ffqt -ac_add_options --libdir=/opt/ffqt/lib -ac_add_options --with-system-nspr -ac_add_options --with-system-nss -ac_add_options --with-system-jpeg -ac_add_options --with-system-zlib -ac_add_options --with-system-png -ac_add_options --with-pthreads -ac_add_options --disable-tests -ac_add_options --disable-debug -ac_add_options --enable-optimize -ac_add_options --disable-installer -ac_add_options --enable-xinerama -ac_add_options --enable-default-toolkit=cairo-qt -ac_add_options --disable-xprint -ac_add_options --enable-strip -ac_add_options --enable-pango -ac_add_options --disable-system-cairo -ac_add_options --enable-svg -ac_add_options --enable-canvas -ac_add_options --enable-startup-notification -ac_add_options --enable-libxul -ac_add_options --disable-crashreporter -ac_add_options --with-libxul-sdk=/opt/ffqt/lib/xulrunner-devel-qt-1.9.2 -ac_add_options --enable-safe-browsing -#ac_add_options --with-branding=browser/branding/unofficial - -export BUILD_OFFICIAL=1 -export MOZILLA_OFFICIAL=1 -export USE_SHORT_LIBNAME=1 -mk_add_options BUILD_OFFICIAL=1 -mk_add_options MOZILLA_OFFICIAL=1 -mk_add_options USE_SHORT_LIBNAME=1 diff --git a/firefox-qt/mozilla-firefox-1.0-lang.patch b/firefox-qt/mozilla-firefox-1.0-lang.patch deleted file mode 100644 index f0f7325..0000000 --- a/firefox-qt/mozilla-firefox-1.0-lang.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- mozilla/browser/app/profile/firefox.js.lang 2005-01-13 15:32:03.509282726 +0100 -+++ mozilla/browser/app/profile/firefox.js 2005-01-13 15:33:40.220914789 +0100 -@@ -253,6 +253,9 @@ - pref("font.language.group", "chrome://global/locale/intl.properties"); - pref("intl.menuitems.alwaysappendaccesskeys","chrome://global/locale/intl.properties"); - -+// Use LANG environment variable to choose locale -+pref("intl.locale.matchOS", true); -+ - // 0=lines, 1=pages, 2=history , 3=text size - pref("mousewheel.withcontrolkey.action",3); - pref("mousewheel.withshiftkey.action",2); diff --git a/flvstreamer/PKGBUILD b/flvstreamer/PKGBUILD deleted file mode 100644 index d9f3373..0000000 --- a/flvstreamer/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Maintainer: Stefan Husmann <stefan-husmann@t-online.de> -pkgname=flvstreamer -pkgver=2.1c1 -pkgrel=1 -pkgdesc="Open source command-line RTMP client" -url="http://savannah.nongnu.org/projects/flvstreamer" -arch=('i686' 'x86_64') -license=('GPL') -depends=('gcc-libs') -source=("http://mirrors.zerg.biz/nongnu/flvstreamer/source/$pkgname-$pkgver.tar.gz") -md5sums=('4866387328ad89c957af90a2478e5556') -build() { - cd $srcdir/$pkgname - make $pkgname || return 1 - make streams || return 1 -} -package() { - cd $srcdir/$pkgname - install -Dm755 $pkgname $pkgdir/usr/bin/$pkgname || return 1 - install -Dm755 streams $pkgdir/usr/bin/streams || return 1 -}
\ No newline at end of file diff --git a/fontmatrix/PKGBUILD b/fontmatrix/PKGBUILD deleted file mode 100644 index 3e5c947..0000000 --- a/fontmatrix/PKGBUILD +++ /dev/null @@ -1,30 +0,0 @@ -# Contributor: Michal Malek <michalm@jabster.pl> - -pkgname=fontmatrix -pkgver=0.6.0 -pkgrel=1 -pkgdesc="Font manager for Linux" -arch=('i686' 'x86_64') -url="http://fontmatrix.net/" -license=('GPL') -depends=('qt>=4.3.0') -makedepends=('cmake>=2.4.0') -source=(http://fontmatrix.net/archives/$pkgname-$pkgver-Source.tar.gz) -md5sums=('6a00c9448a50d3bab5acb4145f778f2d') - -build() -{ - export QTDIR=/usr - if [ "${CARCH}" = "i686" ]; then - export QMAKESPEC=/usr/share/qt/mkspecs/linux-g++-32 - elif [ "${CARCH}" = "x86_64" ]; then - export QMAKESPEC=/usr/share/qt/mkspecs/linux-g++-64 - fi - - cd $startdir/src/$pkgname-$pkgver-Source - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=/usr || return 1 - make || return 1 - make DESTDIR=$startdir/pkg install || return 1 -} diff --git a/fortune-mod-issa-haiku/PKGBUILD b/fortune-mod-issa-haiku/PKGBUILD deleted file mode 100644 index 49284fa..0000000 --- a/fortune-mod-issa-haiku/PKGBUILD +++ /dev/null @@ -1,18 +0,0 @@ -# Contributor: Samhain - -pkgname=fortune-mod-issa-haiku -pkgver=1.1 -pkgrel=2 -pkgdesc="Fortune cookies: Kobayashi Issa's haiku collection (7000+)" -arch=(i686 x86_64) -license=(public domain) -depends=(fortune-mod) -source="http://www.tastyrabbit.net/issa-haiku.tar.gz" -url="http://www.tastyrabbit.net/2008/05/archlinux-fortune-cookie-haiku-package.html" -md5sums=('6418f81836f0323227b42a68292be806') - -build() { - cd $startdir/src - mkdir -p $startdir/pkg/usr/share/fortune - cp issa-haiku issa-haiku.dat $startdir/pkg/usr/share/fortune -} diff --git a/fwknop/PKGBUILD b/fwknop/PKGBUILD deleted file mode 100644 index 2f87239..0000000 --- a/fwknop/PKGBUILD +++ /dev/null @@ -1,38 +0,0 @@ -# Contributor: Florian Pritz <f-p@gmx.at> - -pkgname=fwknop -pkgver=1.9.8 -pkgrel=1 -pkgdesc="Single Packet Authorization and Port Knocking" -arch=('i686' 'x86_64')ysi fwk -url="http://www.cipherdyne.org/fwknop/" -license=('GPL') -depends=('perl') -source=("http://www.cipherdyne.org/fwknop/download/$pkgname-$pkgver.tar.gz") - -build() { - cd "$srcdir/$pkgname-$pkgver" - - make || return 1 - - install -D -m 500 knopmd ${pkgdir}/usr/sbin/knopmd - install -D -m 500 fwknopd ${pkgdir}/usr/sbin/fwknopd - install -D -m 500 knopwatchd ${pkgdir}/usr/sbin/knopwatchd - install -D -m 500 knoptm ${pkgdir}/usr/sbin/knoptm - install -D -m 500 fwknop_serv ${pkgdir}/usr/sbin/fwknop_serv - install -D fwknop ${pkgdir}/usr/sbin/fwknop - - install -D -m 600 access.conf ${pkgdir}/etc/fwknop/access.conf - install -D -m 600 fwknop.conf ${pkgdir}/etc/fwknop/fwknop.conf - install -D -m 600 pf.os ${pkgdir}/etc/fwknop/pf.os - - install -D knopmd.8 ${pkgdir}/usr/man/man8/knopmd.8 - install -D knopwatchd.8 ${pkgdir}/usr/man/man8/knopwatchd.8 - install -D fwknop.8 ${pkgdir}/usr/man/man8/fwknop.8 - install -D fwknopd.8 ${pkgdir}/usr/man/man8/fwknopd.8 - -} - -# vim:set ts=2 sw=2 et: -md5sums=('8dac0e2fc52ab4508563efe3617721f0') -sha256sums=('cbca7184b4fd7ca14c3895bc11c96bef5d4ff3b6abacc9e5653b1362fc05be0f') diff --git a/gadmin-samba/PKGBUILD b/gadmin-samba/PKGBUILD deleted file mode 100644 index 9a15f65..0000000 --- a/gadmin-samba/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> -# Contributor: Andrea Scarpino <bash.lnx@gmail.com> -# Contributor: Marcin Kaczorek <kaczus@karek.pl> - -pkgname=gadmin-samba -pkgver=0.2.9 -pkgrel=1 -pkgdesc="An easy to use GTK+ frontend for the SAMBA file and print server" -url="http://gadmintools.flippedweb.com/index.php?option=com_content&task=view&id=16&Itemid=30" -arch=('i686' 'x86_64') -license=('GPL') -depends=('gtk2' 'samba') -replaces=('gsambad') -install=${pkgname}.install -source=("http://mange.dynalias.org/linux/${pkgname}/${pkgname}-${pkgver}.tar.gz" "makefile.patch") -options=(!emptydirs) - -build() { - cd ${srcdir}/${pkgname}-${pkgver} - patch -p0 < ${srcdir}/makefile.patch - ./configure --prefix=/usr --sysconfdir=/etc \ - --localstatedir=/var --sbindir=/usr/sbin - make || return 1 - make DESTDIR=${pkgdir} install - - install -D -m644 desktop/${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop -} -md5sums=('9902f6aff533367e5f62caa9fc383d9b' - '23582cbe1716d3683b96987547fa7724') -sha1sums=('0c4f1c2f6ca0dd71579d661c07ef3abaafc9dc76' - 'a2c7b7d0e5d8080a8adb11d41466253cbc63be43') diff --git a/gadmin-samba/gadmin-samba.install b/gadmin-samba/gadmin-samba.install deleted file mode 100644 index e8a5f51..0000000 --- a/gadmin-samba/gadmin-samba.install +++ /dev/null @@ -1,7 +0,0 @@ -post_install() { - echo "See /usr/share/gadmin-samba/example.bat for an example of logon script" -} - -op=$1 -shift -$op $* diff --git a/gadmin-samba/makefile.patch b/gadmin-samba/makefile.patch deleted file mode 100644 index 54998fb..0000000 --- a/gadmin-samba/makefile.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- Makefile.in 2008-05-25 17:44:34.000000000 +0200 -+++ Makefile.in.new 2008-08-10 15:12:37.000000000 +0200 -@@ -677,11 +677,11 @@ - cp scripts/gadmin-samba-pdf $(bindir)/; \ - fi; - @echo Installing example logon script to static /home/netlogon. -- if test ! -d /home/netlogon; then \ -- mkdir -p /home/netlogon; \ -+ if test ! -d $(DESTDIR)/usr/share/gadmin-samba; then \ -+ mkdir -p $(DESTDIR)/usr/share/gadmin-samba; \ - fi; -- if test -d /home/netlogon && test ! -f /home/netlogon/example.bat; then \ -- cp scripts/example.bat /home/netlogon/; \ -+ if test -d $(DESTDIR)/usr/share/gadmin-samba && test ! -f $(DESTDIR)/usr/share/gadmin-samba/example.bat; then \ -+ cp scripts/example.bat $(DESTDIR)/usr/share/gadmin-samba/; \ - fi; - @echo "" - @echo "Start GADMIN-SAMBA by typing gadmin-samba in a terminal" diff --git a/gajim-hg/PKGBUILD b/gajim-hg/PKGBUILD deleted file mode 100644 index ae8c565..0000000 --- a/gajim-hg/PKGBUILD +++ /dev/null @@ -1,49 +0,0 @@ -# Maintainer: Lev Lybin <lev at lybin dot org> -# Contributor: Benjamin Richter <br@waldteufel-online.net> -# Contributor: Changaco <changaco@changaco.net> -# Contributor: Artyom Smirnov <smirnoffjr@gmail.com> - -pkgname=gajim-hg -pkgver=12485 -pkgrel=1 -pkgdesc="Jabber/XMMP instant messenger client written in PyGTK" -arch=('i686' 'x86_64') -url="http://gajim.org" -license=('GPL3') -depends=('python>=2.5' 'pygtk>=2.16' 'xdg-utils' 'python-pysqlite') -makedepends=('mercurial' 'intltool>=0.40.1') -optdepends=( - 'dbus-python: Python bindings for DBUS' - 'pyopenssl: for secure SSL/TLS' - 'notification-daemon: for desktop notification' - 'dnsutils: for SRV support' - 'libxss: for idle module' - 'gtkspell:spelling support (install aspell-LANG!)' - 'gnome-python-desktop: for GnomeKeyring support' - 'farsight2: video/voice support' - 'gstreamer0.10-good: video/voice support' - 'gstreamer0.10-bad: video/voice support' - 'pycrypto: End to end encryption' - 'dbus-glib: link-local messaging (install avahi!)' - 'avahi: link-local messaging (install dbus-glib!)' - 'python-notify: Notification popups') - -provides=('gajim') -conflicts=('gajim' 'gajim-svn') -replaces=('gajim-svn') -install=gajim.install - -_hgroot=http://hg.gajim.org -_hgrepo=gajim - -build() { - cd "${srcdir}/${_hgrepo}" - hg update default - ./autogen.sh --prefix=/usr - make -} - -package() { - cd "${srcdir}/${_hgrepo}" - make DESTDIR="${pkgdir}" install -} diff --git a/gajim-hg/gajim.install b/gajim-hg/gajim.install deleted file mode 100644 index 46e1cf8..0000000 --- a/gajim-hg/gajim.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { - xdg-icon-resource forceupdate -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} diff --git a/gcc43/PKGBUILD b/gcc43/PKGBUILD deleted file mode 100644 index 63900ef..0000000 --- a/gcc43/PKGBUILD +++ /dev/null @@ -1,65 +0,0 @@ -# Maintainer: Carson Reynolds <carson@k2.t.u-tokyo.ac.jp> - -pkgname=gcc43 -_ver=4.3 -pkgver=4.3.4 -pkgrel=3 -pkgdesc="The GNU Compiler Collection" -arch=('i686' 'x86_64') -license=('GPL' 'LGPL') -url="http://gcc.gnu.org" -depends=('glibc' 'gmp' 'mpfr') -makedepends=('flex' 'bison') -options=('!libtool') - -source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,fortran,objc,java}-${pkgver}.tar.bz2 - gcc_pure64.patch - gcc-hash-style-both.patch - buildfix_new_bison.patch) - -md5sums=('575b3220bb8e7060939c429fc8608d22' - 'd526e34eec101b8c69254ed5215b6d41' - '3e702a563d97bb2806dd81739c22806d' - '37ba6440062ddf9bab43e6ae660c890b' - 'dd41be44634d39d145cdb715cde39be6' - '4030ee1c08dd1e843c0225b772360e76' - 'bb420bc84b1104455b7230b1cd4b96c2' - '6895f128e905bfcb26e328899235e553') - -build() { - cd ${srcdir}/gcc-${pkgver} - # Don't install libiberty - sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in - - if [ "${CARCH}" = "x86_64" ]; then - patch -Np1 -i ../gcc_pure64.patch || return 1 - fi - patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch || return 1 - patch -Np0 -i ${srcdir}/buildfix_new_bison.patch || return 1 - - echo ${pkgver} > gcc/BASE-VER - - # Don't run fixincludes - sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in - - mkdir build - cd build - ../configure --prefix=/usr --enable-shared \ - --enable-languages=c,c++ \ - --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info \ - --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib \ - --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch \ - --with-tune=generic \ - --disable-werror --enable-checking=release \ - --program-suffix=-${_ver} --enable-version-specific-runtime-libs - make || return 1 - make -j1 DESTDIR=${pkgdir} install || return 1 - - # Lazy way of dealing with conflicting man and info pages... - rm -rf ${pkgdir}/usr/share - - # Create links for gcc-4.3 build environment (useful for CUDA) - mkdir -p $pkgdir/opt/gcc-4.3 - ln -s /usr/bin/gcc-4.3 $pkgdir/opt/gcc-4.3/gcc - ln -s /usr/bin/g++-4.3 $pkgdir/opt/gcc-4.3/g++ -}
\ No newline at end of file diff --git a/gcc43/buildfix_new_bison.patch b/gcc43/buildfix_new_bison.patch deleted file mode 100644 index bd2eadf..0000000 --- a/gcc43/buildfix_new_bison.patch +++ /dev/null @@ -1,243 +0,0 @@ - - - - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" -"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1-strict.dtd "> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> -<title>Arch Linux Repositories [packages] View of /gcc/repos/core-i686/buildfix_new_bison.patch</title> -<meta http-equiv="content-type" content="text/html; charset=utf-8" /> -<link rel="stylesheet" href="http://archlinux.org/media/arch.css" /> -<link rel="stylesheet" href="/static/styles.css" type="text/css" /> - -<link rel="icon" href="http://archlinux.org/media/favicon.ico" type="image/x-icon" /> -<link rel="shortcut icon" href="http://archlinux.org/media/favicon.ico" type="image/x-icon" /> -<style type="text/css"> -div.searchbar { -font-size: 13px; -font-weight: bold; -position: absolute; -right: 0.2em; -top: 152px; -} -</style> -</head> -<body> -<div id="head_container"> -<div id="title"> -<div id="logo"><h1 id="archtitle"><a href="/" title="Arch Linux (Home)">Arch Linux</a></h1></div> -</div> -<div id="main_nav"> -<ul> -<li><a href="http://archlinux.org/download/">Get Arch</a></li> -<li><a href="http://aur.archlinux.org">AUR</a></li> -<li><a href="http://bugs.archlinux.org">Bugs</a></li> -<li><a href="http://wiki.archlinux.org">Wiki</a></li> -<li><a href="http://bbs.archlinux.org">Forums</a></li> -<li><a href="http://archlinux.org">Home</a></li> -</ul> -</div> -<div id="ads"> -<script type="text/javascript"><!-- -google_ad_client = "pub-3170555743375154"; -google_ad_width = 468; -google_ad_height = 60; -google_ad_format = "468x60_as"; -google_color_border = "ffffff"; -google_color_bg = "ffffff"; -google_color_link = "0771A6"; -google_color_url = "99AACC"; -google_color_text = "000000"; -//--></script> -<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> -</div> -</div> -<div id="content"> -<div class="vc_navheader"> - -<form method="get" action="/viewvc.cgi/"> - -<div> -<strong> - -<a href="/viewvc.cgi/"> - -[packages]</a> -/ - -<a href="/viewvc.cgi/gcc/"> - -gcc</a> -/ - -<a href="/viewvc.cgi/gcc/repos/"> - -repos</a> -/ - -<a href="/viewvc.cgi/gcc/repos/core-i686/"> - -core-i686</a> -/ - -<a href="/viewvc.cgi/gcc/repos/core-i686/buildfix_new_bison.patch?view=log"> - -buildfix_new_bison.patch</a> - - -</strong> - -</div> -<div class="searchbar"> - - -<strong>Repository:</strong> -<select name="root" onchange="submit()"> - - -<option value="*viewroots*">Repository Listing</option> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<optgroup label="CVS Repositories"><option>community</option><option>core</option><option>extra</option><option>unstable</option></optgroup> - - -<optgroup label="Subversion Repositories"><option selected="selected">packages</option></optgroup> - -</select> -<input type="submit" value="Go" /> - -</div> - -</form> - -</div> -<h1>View of /gcc/repos/core-i686/buildfix_new_bison.patch</h1> - -<p style="margin:0;"> - -<a href="/viewvc.cgi/gcc/repos/core-i686/"><img src="/static/images/back_small.png" width="16" height="16" alt="Parent Directory" /> Parent Directory</a> - -| <a href="/viewvc.cgi/gcc/repos/core-i686/buildfix_new_bison.patch?view=log#rev19322"><img src="/static/images/log.png" width="16" height="16" alt="Revision Log" /> Revision Log</a> - - - - -</p> - -<hr /> -<div class="vc_summary"> -Revision <a href="/viewvc.cgi?view=rev&revision=19322"><strong>19322</strong></a> - -(<a href="/viewvc.cgi/gcc/repos/core-i686/buildfix_new_bison.patch?revision=19322"><strong>download</strong></a>) - -(<a href="/viewvc.cgi/gcc/repos/core-i686/buildfix_new_bison.patch?annotate=19322"><strong>annotate</strong></a>) - -<br /><em>Thu Nov 20 11:36:53 2008 UTC</em> -(6 months ago) -by <em>andyrtr</em> - -<br />Original Path: <a href="/viewvc.cgi/gcc/trunk/buildfix_new_bison.patch?view=log&pathrev=19322"><em>gcc/trunk/buildfix_new_bison.patch</em></a> - - - - - - -<br />File size: 423 byte(s) - - - -<pre class="vc_log">upgpkg: gcc 4.3.2-2 - rebuild for new binutils/glibc</pre> - -</div> -<div id="vc_markup"><pre><PRE> ---- gcc/treelang/parse.y 2007-07-18 08:19:29.000000000 +0000 -+++ gcc/treelang/parse.y.new 2008-11-20 06:40:00.013275486 +0000 -@@ -369,7 +369,6 @@ - current_function = NULL; - } - ; -- - variable_defs_opt: - /* Nil. */ { - $$ = 0; -@@ -685,9 +684,9 @@ - - expressions_with_commas_opt: - /* Nil. */ { --$$ = 0 -+$$ = 0; - } --|expressions_with_commas { $$ = $1 } -+|expressions_with_commas { $$ = $1; } - ; - - expressions_with_commas: -</PRE> -</pre></div> - -<hr /> -<div class="foot"> -Copyright © 2002-2008 -<a href="mailto:jvinet@zeroflux.org" title="contact Judd Vinet">Judd Vinet</a> and -<a href="mailto:aaron@archlinux.org" title="contact Aaron Griffin">Aaron Griffin</a>. -<br /> -The Arch Linux name and logo are recognized trademarks. Some rights reserved. -</div> -<script type="text/javascript"> -var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); -document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); -</script> -<script type="text/javascript"> -var pageTracker = _gat._getTracker("UA-3589020-1"); -pageTracker._setDomainName("archlinux.org"); -pageTracker._initData(); -pageTracker._trackPageview(); -</script> -</body> -</html> - diff --git a/gcc43/gcc-hash-style-both.patch b/gcc43/gcc-hash-style-both.patch deleted file mode 100644 index 8fea758..0000000 --- a/gcc43/gcc-hash-style-both.patch +++ /dev/null @@ -1,163 +0,0 @@ -#! /bin/sh -e - -# DP: Link using --hash-style=both (alpha, amd64, ia64, i386, powerpc, ppc64, s390, sparc) - -dir= -if [ $# -eq 3 -a "$2" = '-d' ]; then - pdir="-d $3" - dir="$3/" -elif [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) - patch $pdir -f --no-backup-if-mismatch -p0 < $0 - #cd ${dir}gcc && autoconf - ;; - -unpatch) - patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 - #rm ${dir}gcc/configure - ;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - -2006-07-11 Jakub Jelinek <jakub@redhat.com> - - * config/i386/linux.h (LINK_SPEC): Add --hash-style=both. - * config/i386/linux64.h (LINK_SPEC): Likewise. - * config/rs6000/sysv4.h (LINK_OS_LINUX_SPEC): Likewise. - * config/rs6000/linux64.h (LINK_OS_LINUX_SPEC32, - LINK_OS_LINUX_SPEC64): Likewise. - * config/s390/linux.h (LINK_SPEC): Likewise. - * config/ia64/linux.h (LINK_SPEC): Likewise. - * config/sparc/linux.h (LINK_SPEC): Likewise. - * config/sparc/linux64.h (LINK_SPEC, LINK_ARCH32_SPEC, - LINK_ARCH64_SPEC): Likewise. - * config/alpha/linux-elf.h (LINK_SPEC): Likewise. - ---- gcc/config/alpha/linux-elf.h.orig 2007-08-04 08:55:58.000000000 +0200 -+++ gcc/config/alpha/linux-elf.h 2007-09-01 15:47:26.605865578 +0200 -@@ -39,7 +39,7 @@ - - #define ELF_DYNAMIC_LINKER LINUX_DYNAMIC_LINKER - --#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ -+#define LINK_SPEC "-m elf64alpha --hash-style=both %{G*} %{relax:-relax} \ - %{O*:-O3} %{!O*:-O1} \ - %{shared:-shared} \ - %{!shared: \ ---- gcc/config/s390/linux.h.orig 2007-08-04 08:55:59.000000000 +0200 -+++ gcc/config/s390/linux.h 2007-09-01 15:47:26.605865578 +0200 -@@ -77,7 +77,7 @@ - - #undef LINK_SPEC - #define LINK_SPEC \ -- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ -+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=both \ - %{shared:-shared} \ - %{!shared: \ - %{static:-static} \ ---- gcc/config/sparc/linux.h.orig 2007-08-04 08:56:01.000000000 +0200 -+++ gcc/config/sparc/linux.h 2007-09-01 15:47:26.605865578 +0200 -@@ -132,7 +132,7 @@ - - - #undef LINK_SPEC --#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ -+#define LINK_SPEC "-m elf32_sparc --hash-style=both -Y P,/usr/lib %{shared:-shared} \ - %{!mno-relax:%{!r:-relax}} \ - %{!shared: \ - %{!ibcs: \ ---- gcc/config/sparc/linux64.h.orig 2007-08-04 08:56:01.000000000 +0200 -+++ gcc/config/sparc/linux64.h 2007-09-01 15:47:26.605865578 +0200 -@@ -166,7 +166,7 @@ - { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ - { "link_arch", LINK_ARCH_SPEC }, - --#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ -+#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style=both -Y P,/usr/lib %{shared:-shared} \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ -@@ -175,7 +175,7 @@ - %{static:-static}}} \ - " - --#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \ -+#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=both -Y P,/usr/lib64 %{shared:-shared} \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ -@@ -256,7 +256,7 @@ - #else /* !SPARC_BI_ARCH */ - - #undef LINK_SPEC --#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \ -+#define LINK_SPEC "-m elf64_sparc --hash-style=both -Y P,/usr/lib64 %{shared:-shared} \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ ---- gcc/config/i386/linux.h.orig 2007-08-04 08:56:07.000000000 +0200 -+++ gcc/config/i386/linux.h 2007-09-01 15:47:26.605865578 +0200 -@@ -108,7 +108,7 @@ - { "dynamic_linker", LINUX_DYNAMIC_LINKER } - - #undef LINK_SPEC --#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ -+#define LINK_SPEC "-m %(link_emulation) --hash-style=both %{shared:-shared} \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ ---- gcc/config/i386/linux64.h.orig 2007-08-04 08:56:07.000000000 +0200 -+++ gcc/config/i386/linux64.h 2007-09-01 15:48:27.336781690 +0200 -@@ -65,7 +65,7 @@ - #endif - - #undef LINK_SPEC --#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \ -+#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=both \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ ---- gcc/config/ia64/linux.h.orig 2006-12-12 18:59:53.000000000 +0100 -+++ gcc/config/ia64/linux.h 2007-09-01 15:47:26.605865578 +0200 -@@ -40,7 +40,7 @@ - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" - - #undef LINK_SPEC --#define LINK_SPEC "\ -+#define LINK_SPEC "--hash-style=both \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ ---- gcc/config/rs6000/sysv4.h.orig 2007-08-08 23:37:49.000000000 +0200 -+++ gcc/config/rs6000/sysv4.h 2007-09-01 15:47:26.615865729 +0200 -@@ -901,7 +901,7 @@ - #define LINUX_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) - --#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ -+#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}" - ---- gcc/config/rs6000/linux64.h.orig 2007-08-04 08:56:12.000000000 +0200 -+++ gcc/config/rs6000/linux64.h 2007-09-01 15:47:26.615865729 +0200 -@@ -354,11 +354,11 @@ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) - - --#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ -+#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}}" - --#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \ -+#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=both %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}" - diff --git a/gcc43/gcc_pure64.patch b/gcc43/gcc_pure64.patch deleted file mode 100644 index 8c0baf8..0000000 --- a/gcc43/gcc_pure64.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h ---- gcc-4.2.0.orig/gcc/config/i386/linux64.h 2007-05-16 19:21:19.000000000 -0400 -+++ gcc-4.2.0/gcc/config/i386/linux64.h 2007-05-18 17:04:05.000000000 -0400 -@@ -49,8 +49,8 @@ - When the -shared link option is used a final link is not being - done. */ - --#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" -+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2" -+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" - - #undef LINK_SPEC - #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ -diff -Naur gcc-4.2.0.orig/gcc/config/i386/t-linux64 gcc-4.2.0/gcc/config/i386/t-linux64 ---- gcc-4.2.0.orig/gcc/config/i386/t-linux64 2007-05-16 19:21:19.000000000 -0400 -+++ gcc-4.2.0/gcc/config/i386/t-linux64 2007-05-18 17:04:36.000000000 -0400 -@@ -6,7 +6,7 @@ - - MULTILIB_OPTIONS = m64/m32 - MULTILIB_DIRNAMES = 64 32 --MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) -+MULTILIB_OSDIRNAMES = ../lib ../lib32 - - LIBGCC = stmp-multilib - INSTALL_LIBGCC = install-multilib diff --git a/gecko-mediaplayer-svn/PKGBUILD b/gecko-mediaplayer-svn/PKGBUILD deleted file mode 100755 index 3e75708..0000000 --- a/gecko-mediaplayer-svn/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Maintainer: evr <evanroman at gmail> -# Contributor: Jorge Mokross <mokross@gmail.com> -pkgname=gecko-mediaplayer-svn -pkgver=470 -pkgrel=1 -pkgdesc="A browser plugin that uses GNOME Mplayer." -url="http://kdekorte.googlepages.com/gecko-mediaplayer" -license=('GPL2') -arch=('i686' 'x86_64') -depends=('gnome-mplayer-svn') -makedepends=('xulrunner' 'pkgconfig') -conflicts=('gecko-mediaplayer' 'gecko-mediaplayer-cvs') -provides=('gecko-mediaplayer') - -_svntrunk=http://gecko-mediaplayer.googlecode.com/svn/trunk -_svnmod=gecko-mediaplayer-read-only - -build() { - cd $srcdir - - svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod - cd $_svnmod - - ./configure --prefix=/usr --sysconfdir=/etc - make || return 1 - make DESTDIR=$pkgdir install || return 1 -} - diff --git a/gegl-git/.DS_Store b/gegl-git/.DS_Store Binary files differdeleted file mode 100644 index b3d7e1b..0000000 --- a/gegl-git/.DS_Store +++ /dev/null diff --git a/gegl-git/._.DS_Store b/gegl-git/._.DS_Store Binary files differdeleted file mode 100644 index 460d887..0000000 --- a/gegl-git/._.DS_Store +++ /dev/null diff --git a/gegl-git/._PKGBUILD b/gegl-git/._PKGBUILD Binary files differdeleted file mode 100644 index 361f6aa..0000000 --- a/gegl-git/._PKGBUILD +++ /dev/null diff --git a/gegl-git/._gegl-git.install b/gegl-git/._gegl-git.install Binary files differdeleted file mode 100644 index 120e8c8..0000000 --- a/gegl-git/._gegl-git.install +++ /dev/null diff --git a/gegl-git/PKGBUILD b/gegl-git/PKGBUILD deleted file mode 100644 index faab426..0000000 --- a/gegl-git/PKGBUILD +++ /dev/null @@ -1,43 +0,0 @@ -# Contributor: Alessio Biancalana <dottorblaster@gmail.com> - -pkgname=gegl-git -pkgver=20100109 -pkgrel=1 -pkgdesc="GEGL (Generic Graphics Library) is a graph based image processing framework." -arch=('i686' 'x86_64') -url="http://www.gegl.org/" -license=('GPL') -conflicts=('gegl') -provides=('gegl') -depends=('glib2>=2.10' 'babl-git' 'libpng' 'ruby') -makedepends=('git') -install=$pkgname.install -source=($pkgname.install) -md5sums=('2289b100d1d4ee9ef6b3ad02eddbc899') - -_gitroot=('git://git.gnome.org/gegl') -_gitname=('gegl') - - build() { - cd $startdir/src - msg "Connecting to gnome.org git server...." - rm -rf $startdir/src/$_gitname-build - - if [[ -d $_gitname ]]; then - cd $_gitname || return 1 - git pull origin || return 1 - else - git clone $_gitroot $_gitname || return 1 - fi - msg " checkout done." - - msg "Starting make..." - cd "$srcdir" - rm -r "$srcdir/$_gitname-build" - cp -r $srcdir/$_gitname $_gitname-build - cd $_gitname-build - - ./autogen.sh --prefix=/usr --disable-docs - make || return 1 - make DESTDIR="$pkgdir" install || return 1 -} diff --git a/gegl-git/gegl-git.install b/gegl-git/gegl-git.install deleted file mode 100644 index 4d6aee5..0000000 --- a/gegl-git/gegl-git.install +++ /dev/null @@ -1,15 +0,0 @@ -post_install() { - - echo ">>> If you want more functionality install the following packages:" - echo ">>> sdl - libjpeg - openexr - pango - librsvg - graphviz" - echo ">>> And build the package again." - -} - -post_upgrade() { - post_install $1 -} - -op=$1 -shift -$op $* diff --git a/gimp-plugin-texturize/PKGBUILD b/gimp-plugin-texturize/PKGBUILD deleted file mode 100644 index 0fa82ee..0000000 --- a/gimp-plugin-texturize/PKGBUILD +++ /dev/null @@ -1,23 +0,0 @@ -# Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com> -pkgname=gimp-plugin-texturize -pkgver=2.1 -pkgrel=2 -pkgdesc="Generates large textures from a small sample" -arch=('i686' 'x86_64') -url="http://gimp-texturize.sourceforge.net/" -license=('GPL') -depends=('gimp') -makedepends=('perlxml') -source=(http://downloads.sourceforge.net/sourceforge/gimp-texturize/texturize-${pkgver}_src.tgz) -md5sums=('7f94b8cefc97eaa296b14fdbdc2c995e') - -build() { - cd "$srcdir"/gimp-texturize - ./configure --prefix=/usr - make -} - -package() { - cd "$srcdir"/gimp-texturize - make DESTDIR="$pkgdir" install -} diff --git a/gnome-mplayer-svn/PKGBUILD b/gnome-mplayer-svn/PKGBUILD deleted file mode 100644 index 423ca84..0000000 --- a/gnome-mplayer-svn/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# Maintainter: evr <evanroman at gmail> -# Contributor: Jorge Mokross <mokross@gmail.com> -pkgname=gnome-mplayer-svn -pkgver=1734 -pkgrel=1 -pkgdesc="A simple Mplayer GUI" -url="http://kdekorte.googlepages.com/gnomemplayer" -license=('GPL2') -arch=('i686' 'x86_64') -depends=('gconf' 'mplayer' 'libgpod') -makedepends=('subversion' 'pkgconfig') -conflicts=('gnome-mplayer' 'gnome-mplayer-cvs') -provides=('gnome-mplayer') - -_svntrunk=http://gnome-mplayer.googlecode.com/svn/trunk -_svnmod=gnome-mplayer-read-only - -build() { - cd $srcdir - - svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod - cd $_svnmod - - ./configure --prefix=/usr --sysconfdir=/etc \ - --disable-schemas-install --without-gconf || return 1 - make || return 1 - make DESTDIR=$pkgdir install || return 1 -} - diff --git a/gom/PKGBUILD b/gom/PKGBUILD deleted file mode 100644 index a5e325e..0000000 --- a/gom/PKGBUILD +++ /dev/null @@ -1,23 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> - -pkgname=gom -pkgver=0.30.2 -pkgrel=1 -pkgdesc="Command line and interactive ncurses-based OSS audio mixer" -arch=('i686' 'x86_64') -url="http://packages.debian.org/en/sid/gom" -license=('GPL') -depends=('oss') -source=("http://ftp.de.debian.org/debian/pool/main/g/gom/${pkgname}_${pkgver}.orig.tar.gz") - -build() { - cd "$srcdir/$pkgname-$pkgver" - - ./configure --prefix=/usr - make || return 1 - make DESTDIR="$pkgdir/" install -} - -# vim:set ts=2 sw=2 et: -md5sums=('7e53cdf68a54be2ff07fd8183c1b17b0') -sha1sums=('1048c8a823dc823d8e9bc35b96ee5c09fb9555fe') diff --git a/gtk-engine-nodoka/PKGBUILD b/gtk-engine-nodoka/PKGBUILD deleted file mode 100644 index 4ad9fde..0000000 --- a/gtk-engine-nodoka/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Contributor: lp76 <l.peduto@gmail.com> -pkgname=gtk-engine-nodoka -pkgver=0.7.5 -pkgrel=1 -pkgdesc="Default gtk engine provided by Fedora8" -arch=('i686' 'x86_64') -url="https://fedorahosted.org/nodoka/" -license=('GPL') -depends=('gtk2>2.18') -makedepends=('pkgconfig') -source=(https://fedorahosted.org/releases/n/o/nodoka/gtk-nodoka-engine-$pkgver.tar.gz) -md5sums=('22227adf29231ba2b87202ac3522e70f') -options=(!libtool) - -build() { - cd $srcdir/gtk-nodoka-engine-$pkgver - sed -i 's|/usr/bin/install|/bin/install|g' $srcdir/gtk-nodoka-engine-$pkgver/src/Makefile.in - ./configure --prefix=/usr --enable-animation - make || return 1 - make DESTDIR=$pkgdir install || return 1 -} diff --git a/gtk3-engines/PKGBUILD b/gtk3-engines/PKGBUILD deleted file mode 100644 index a5ecf8f..0000000 --- a/gtk3-engines/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Contributor: Rémy Oudompheng <remy@archlinux.org> - -pkgname=gtk3-engines -pkgver=2.91.1 -pkgrel=1 -pkgdesc="Theme engines for GTK+ 3" -arch=(i686 x86_64) -license=('GPL' 'LGPL') -depends=('gtk3' 'glib2>=2.27') -makedepends=('pkgconfig' 'intltool') -options=('!libtool') -url="http://live.gnome.org/GnomeArt" -source=(http://ftp.gnome.org/pub/gnome/sources/gtk-engines/2.91/gtk-engines-${pkgver}.tar.bz2) -sha256sums=('e0ed144cdd298bc69b53face0e907369fb6a51f1eb333b5d04331f12758b454c') - -build() { - cd "${srcdir}/gtk-engines-${pkgver}" - ./configure --prefix=/usr --enable-animation - make -} - -package() { - cd "${srcdir}/gtk-engines-${pkgver}" - make DESTDIR="${pkgdir}" install -} diff --git a/gtknetcat/PKGBUILD b/gtknetcat/PKGBUILD deleted file mode 100644 index c0f7504..0000000 --- a/gtknetcat/PKGBUILD +++ /dev/null @@ -1,37 +0,0 @@ -# Maintainer: Florian Pritz <flo@xinu.at> -# Contributor: SpepS <dreamspepser at yahoo dot it> - -pkgname=gtknetcat -pkgver=0.1 -pkgrel=3 -pkgdesc="GUI for netcat" -arch=('any') -url="http://lxde.org" -license=('GPL') -depends=('gnu-netcat' 'python2') -makedepends=('intltool' 'gawk') -install="$pkgname.install" -source=(http://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.gz) -md5sums=('de545d2bce7878f0751e2cda3d2a4bce') - -build() { - - cd "$srcdir/$pkgname-$pkgver" - - # Python2 fixes - export PYTHON="python2" - sed -i "s_env python_&2_" src/$pkgname.* - - ./configure --prefix=/usr - - make -} - -package() { - - cd "$srcdir/$pkgname-$pkgver" - - make DESTDIR="$pkgdir/" install -} - -# vim:set ts=2 sw=2 et: diff --git a/gtknetcat/gtknetcat.install b/gtknetcat/gtknetcat.install deleted file mode 100644 index 706fa39..0000000 --- a/gtknetcat/gtknetcat.install +++ /dev/null @@ -1,7 +0,0 @@ -post_install() {
- update-desktop-database -q
-}
-
-post_remove() {
- update-desktop-database -q
-}
\ No newline at end of file diff --git a/highlight/PKGBUILD b/highlight/PKGBUILD deleted file mode 100644 index 6b25a05..0000000 --- a/highlight/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Contributor: Jan Fader <jan.fader@web.de> -pkgname=highlight -pkgver=3.3 -pkgrel=1 -pkgdesc="Highlight converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX, XML and terminal escape sequences with coloured syntax highlighting. Language definitions, colour themes and indentation schemes are customizable" -url="http://www.andre-simon.de/doku/highlight/highlight.html" -license=('GPL') -arch=('i686' 'x86_64') -depends=('boost' 'lua') -install= -source=(http://www.andre-simon.de/zip/$pkgname-$pkgver.tar.bz2) -md5sums=('a4142ec930cb529c922d25ddebceed04') - -build() { - cd "$srcdir/$pkgname-$pkgver" - - make - make DESTDIR="$pkgdir" install -} - -# vim:set ts=2 sw=2 et: diff --git a/highlight/make.patch b/highlight/make.patch deleted file mode 100644 index 845ef4e..0000000 --- a/highlight/make.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- src/highlight-3.1-beta/makefile 2010-06-03 18:08:17.000000000 +0200 -+++ makefile 2010-06-22 22:12:42.000000000 +0200 -@@ -66,10 +66,10 @@ - ${MKDIR} ${DESTDIR}${doc_dir} - ${MKDIR} ${DESTDIR}${conf_dir} - ${MKDIR} ${DESTDIR}${examples_dir} \ -- ${DESTDIR}${examples_dir}web_plugins \ -- ${DESTDIR}${examples_dir}web_plugins/dokuwiki \ -- ${DESTDIR}${examples_dir}web_plugins/movabletype \ -- ${DESTDIR}${examples_dir}web_plugins/wordpress \ -+ ${DESTDIR}${examples_dir}plugins \ -+ ${DESTDIR}${examples_dir}plugins/dokuwiki \ -+ ${DESTDIR}${examples_dir}plugins/movabletype \ -+ ${DESTDIR}${examples_dir}plugins/wordpress \ - ${DESTDIR}${examples_dir}swig - ${MKDIR} ${DESTDIR}${data_dir} \ - ${DESTDIR}${data_dir}themes \ diff --git a/i3-git/PKGBUILD b/i3-git/PKGBUILD deleted file mode 100644 index 3724f7d..0000000 --- a/i3-git/PKGBUILD +++ /dev/null @@ -1,70 +0,0 @@ -# Maintainer: Thorsten Toepper <atsutane at freethoughts dot de> - -pkgname=i3-git -pkgver=20100819 -pkgrel=1 -pkgdesc="An improved dynamic tiling window manager" -arch=('i686' 'x86_64') -url="http://i3.zekjur.net/" -license=('BSD') -provides=('i3-wm') -conflicts=('i3-wm') -depends=('xcb-util' 'libx11' 'libev' 'yajl') -makedepends=('git' 'asciidoc' 'docbook-xsl' 'pkgconfig' - 'bison' 'flex') -optdepends=('rxvt-unicode: The terminal emulator used in the default config.' - 'dmenu: As menu.' - 'i3lock: For locking your screen.' - 'i3status: To display systeminformation with a bar.') -options=('docs' '!strip') - -_gitroot="git://code.stapelberg.de/i3" -_gitname="i3" - -build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [ -d $_gitname ] ; then - cd $_gitname && git pull origin - msg "The local files are updated." - else - git clone $_gitroot - - cd $_gitname - git branch -f next origin/next - git checkout next - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - rm -rf "$srcdir/$_gitname-build" - cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" - - make || return 1 - make -C man || return 1 -} - -package() { - cd "$srcdir/$_gitname-build" - make DESTDIR="$pkgdir/" install || return 1 - - install -Dm644 man/i3.1 \ - ${pkgdir}/usr/share/man/man1/i3.1 || return 1 - install -Dm644 man/i3-msg.1 \ - ${pkgdir}/usr/share/man/man1/i3-msg.1 || return 1 - install -Dm644 man/i3-input.1 \ - ${pkgdir}/usr/share/man/man1/i3-input.1 || return 1 - - install -Dm644 LICENSE \ - ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1 - - rm ${pkgdir}/usr/bin/i3-wsbar || return 1 - - make clean -} - -# vim:set ts=2 sw=2 et: - diff --git a/i3/PKGBUILD b/i3/PKGBUILD deleted file mode 100644 index ef2c13e..0000000 --- a/i3/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -# Maintainer: Thorsten Toepper <atsutane at freethoughts dot de> - -pkgname=i3 -pkgver=3.d_bf1 -_pkgver=3.d-bf1 -pkgrel=2 -pkgdesc="An improved dynamic tiling window manager" -arch=('i686' 'x86_64') -url="http://i3.zekjur.net/" -license=('BSD') -depends=('libx11' 'xcb-util' 'libev') -makedepends=('bison' 'flex') -optdepends=('rxvt-unicode: The terminal emulator used in the default config.' - 'dmenu: As menu.' - 'i3lock: For locking your screen.' - 'i3status: To display systeminformation with a bar.') -options=('docs' '!strip') -source=(http://i3.zekjur.net/downloads/$pkgname-$_pkgver.tar.bz2) -md5sums=('f2271064640d67c8a618c8c79451da75') - -build() { - cd "$srcdir/$pkgname-$_pkgver" - - make || return 1 -} - -package() { - cd "$srcdir/$pkgname-$_pkgver" - make DESTDIR="$pkgdir/" install || return 1 - - install -Dm644 man/i3.man \ - ${pkgdir}/usr/share/man/man1/i3.1 || return 1 - install -Dm644 man/i3-msg.man \ - ${pkgdir}/usr/share/man/man1/i3-msg.1 || return 1 - install -Dm644 man/i3-input.man \ - ${pkgdir}/usr/share/man/man1/i3-input.1 || return 1 - install -Dm644 LICENSE \ - ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1 - - make clean -} - -# vim:set ts=2 sw=2 et: - diff --git a/imagemagick-nox/ChangeLog b/imagemagick-nox/ChangeLog deleted file mode 100644 index 1f17dc9..0000000 --- a/imagemagick-nox/ChangeLog +++ /dev/null @@ -1,199 +0,0 @@ -2010-03-30 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.6.0.10-1 - * Upstream update - * Removed bootstrapping to fix linking problem (no longer necessary) - * Enabled modules, some depends are now optdepends - -2010-02-26 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.6.0.0-1 - * Upstream update - -2010-02-14 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.9.5-1 - * Upstream update - -2010-01-18 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.9.0-2 - * Fixed undefined symbols - -2010-01-14 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.9.0-1 - * Upstream update - -2009-12-12 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.8.5-1 - * Upstream update - -2009-11-22 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.7.10-1 - * Upstream update - -2009-11-08 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.7.5-1 - * Upstream update - -2009-10-14 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.6.10-1 - * Upstream update - -2009-09-18 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.6.1-1 - * Upstream update - -2009-09-02 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.5.6-1 - * Upstream update - -2009-08-05 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.4.8-1 - * Upstream update - -2009-07-23 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.4.5-1 - * Upstream update - -2009-06-05 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.3.2-1 - * Upstream update - * Removed insecure RPATH (close FS#14843) - -2009-05-21 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.2.7-1 - * Upstream update - -2009-04-29 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.1.9-1 - * Upstream update - -2009-03-31 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.0.10-1 - * Upstream update - -2009-03-17 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.5.0.1-1 - * Upstream update - -2009-02-27 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.9.7-1 - * Upstream update - -2009-02-07 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.9.2-1 - * Upstream update - -2009-01-30 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.8.10-1 - * Upstream update - -2008-12-29 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.8.2-1 - * Upstream update - -2008-12-14 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.7.8-1 - * Upstream update - -2008-12-05 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.7.0-1 - * Upstream update - * Rebuild against heimdal 1.2.1 - -2008-11-25 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.6.3-1 - * Upstream update - -2008-11-14 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.5.6-1 - * Upstream update - -2008-10-26 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.5.0-1 - * Upstream update - -2008-10-18 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.4.9-1 - * Upstream update - -2008-10-03 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.4.1-1 - * Upstream update - -2008-09-06 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.3.6-1 - * Upstream update - * Added JPEG2000 support (close FS#10544) - -2008-08-19 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.2.10-1 - * Upstream update - -2008-08-11 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.2.7-1 - * Upstream update - * Added bzip2 and libxml2 depends - * Disabled docs - -2008-07-18 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.2.4-1 - * Upstream update - -2008-06-23 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.2.1-1 - * Upstream update - * Fixed linking problem (close FS#10574) - -2008-05-19 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.1.3-1 - * Upstream update - -2008-04-30 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.1.0-1 - * Upstream update - -2008-04-24 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.0.9-1 - * Upstream update - -2008-03-29 Eric Belanger <eric@archlinux.org> - - * imagemagick 6.4.0.2-1 - * Upstream update - * Added dvips to delegates list for dvi support (close FS#8914) - * Added ChangeLog diff --git a/imagemagick-nox/ImageMagick-6.5.6-1.tar.bz2.part b/imagemagick-nox/ImageMagick-6.5.6-1.tar.bz2.part deleted file mode 100644 index e69de29..0000000 --- a/imagemagick-nox/ImageMagick-6.5.6-1.tar.bz2.part +++ /dev/null diff --git a/imagemagick-nox/ImageMagick-6.5.6.1-1.tar.bz2.part b/imagemagick-nox/ImageMagick-6.5.6.1-1.tar.bz2.part deleted file mode 100644 index e69de29..0000000 --- a/imagemagick-nox/ImageMagick-6.5.6.1-1.tar.bz2.part +++ /dev/null diff --git a/imagemagick-nox/ImageMagick-6.6.1-4.tar.xz.part b/imagemagick-nox/ImageMagick-6.6.1-4.tar.xz.part deleted file mode 100644 index e69de29..0000000 --- a/imagemagick-nox/ImageMagick-6.6.1-4.tar.xz.part +++ /dev/null diff --git a/imagemagick-nox/PKGBUILD b/imagemagick-nox/PKGBUILD deleted file mode 100644 index 6c50c56..0000000 --- a/imagemagick-nox/PKGBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# $Id: PKGBUILD 78139 2010-04-19 22:08:32Z dgriffiths $ -# Contributor: Eric Belanger <eric@archlinux.org> -# imagemagick Maintainer: DAniel J Griffiths <ghost1227@archlinux.us> -# imagemagick-nox Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> - -pkgname=imagemagick-nox -pkgver=6.6.3.2 -pkgrel=1 -pkgdesc="An image viewing/manipulation program, without X dependencies" -arch=('i686' 'x86_64') -url="http://www.imagemagick.org/" -license=('custom') -depends=('lcms' 'gcc-libs' 'openexr>=1.6.1' 'libtool' 'heimdal' 'bzip2' 'libxml2' 'liblqr') -makedepends=('imagemagick-nox') -provides=('imagemagick') -options=('!makeflags' '!docs') -source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz \ - libpng_mmx_patch_x86_64.patch - perlmagick.rpath.patch) - -build() { - cd ${srcdir}/ImageMagick-${pkgver%.*}-${pkgver##*.} - - if [ "${CARCH}" = 'x86_64' ]; then - patch -Np1 < ../libpng_mmx_patch_x86_64.patch || return 1 - fi - - patch -p0 < ../perlmagick.rpath.patch || return 1 - - ./configure --prefix=/usr --with-modules --disable-static \ - --enable-openmp --without-x --without-wmf --with-openexr --with-xml \ - --without-gslib \ - --with-perl --with-perl-options="INSTALLDIRS=vendor" \ - --without-gvc --without-djvu --without-autotrace --with-jp2 \ - --without-jbig --without-fpx --without-dps || return 1 - make || return 1 -} - -package() { - cd ${srcdir}/ImageMagick-${pkgver%.*}-${pkgver##*.} - - make DESTDIR=${pkgdir} install || return 1 - - install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1 - install -Dm644 NOTICE ${pkgdir}/usr/share/licenses/${pkgname}/NOTICE || return 1 - - #Cleaning - find ${pkgdir} -name '*.bs' -exec rm {} \; || return 1 - rm -f ${pkgdir}/usr/lib/*.la || return 1 -} - -md5sums=('b77b48d36b3529e8113090b12039e914' - '069980fc2590c02aed86420996259302' - 'ff9974decbfe9846f8e347239d87e4eb') diff --git a/imagemagick-nox/add_delegate.patch b/imagemagick-nox/add_delegate.patch deleted file mode 100644 index 6ba6009..0000000 --- a/imagemagick-nox/add_delegate.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- config/delegates.xml.in.orig 2008-03-29 23:25:03.000000000 -0400 -+++ config/delegates.xml.in 2008-03-29 23:27:35.000000000 -0400 -@@ -103,4 +103,5 @@ - <delegate decode="xps:color" stealth="True" command=""@XPSDelegate@" -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=@XPSColorDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/> - <delegate decode="xps:cmyk" stealth="True" command=""@XPSDelegate@" -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=@XPSCMYKDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/> - <delegate decode="xps:mono" stealth="True" command=""@XPSDelegate@" -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=@XPSMonoDevice@" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/> -+ <delegate decode="dvi" command=""dvips" -q -o "%o" "%i""/> - </delegatemap> diff --git a/imagemagick-nox/libpng_mmx_patch_x86_64.patch b/imagemagick-nox/libpng_mmx_patch_x86_64.patch deleted file mode 100644 index d86449a..0000000 --- a/imagemagick-nox/libpng_mmx_patch_x86_64.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur ImageMagick-6.2.7.orig/coders/png.c ImageMagick-6.2.7/coders/png.c ---- ImageMagick-6.2.7.orig/coders/png.c 2006-05-21 12:35:55.784852536 +0200 -+++ ImageMagick-6.2.7/coders/png.c 2006-05-21 12:36:50.698504392 +0200 -@@ -164,6 +164,8 @@ - #define PNG_MAX_UINT (png_uint_32) 0x7fffffffL - #endif - -+#undef PNG_ASSEMBLER_CODE_SUPPORTED -+ - /* - Constant strings for known chunk types. If you need to add a chunk, - add a string holding the name here. To make the code more diff --git a/imagemagick-nox/perlmagick.rpath.patch b/imagemagick-nox/perlmagick.rpath.patch deleted file mode 100644 index 958c0f2..0000000 --- a/imagemagick-nox/perlmagick.rpath.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- Makefile.in.orig 2009-05-26 16:22:11.000000000 -0300 -+++ Makefile.in 2009-05-26 16:23:27.000000000 -0300 -@@ -10067,6 +10067,7 @@ - - @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@$(PERLMAKEFILE): perl-sources $(PERLMAKEMAKER) - @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@ cd $(PERLMAGICK) && @PERL@ Makefile.PL $(PERL_MAKE_OPTIONS) -+@WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@ cd $(PERLMAGICK) && @SED@ -i 's|LD_RUN_PATH|DIE_LD_RUN_PATH_DIE|g' Makefile - - @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@install-exec-perl: $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) $(PERLMAKEFILE) - @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@ cd $(PERLMAGICK) && $(MAKE) CC='@CC@' install diff --git a/initscripts-git/ChangeLog b/initscripts-git/ChangeLog deleted file mode 100644 index d11ec4b..0000000 --- a/initscripts-git/ChangeLog +++ /dev/null @@ -1,2308 +0,0 @@ -commit e679e9db7c09474da1411db3f18449a1f5e8cc6b -Author: Thomas Bächler <thomas@archlinux.org> -Date: Tue Mar 10 22:04:12 2009 +0100 - - Create /var/lib/misc if it doesn't exist - This is necessary because the filesystem package doesn't currently contain this directory - -commit c79828e29eae787048535fa67726c2f174f6b2c5 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Mar 10 13:59:16 2009 -0700 - - Add the adjtime cron job to install.sh - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit cbb9215591b618f09adc70889f32864a6f566f47 -Author: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> -Date: Mon Mar 9 14:47:35 2009 -0700 - - minilogd: ensure we free() the buffer - - This isn't strictly needed, as memory is cleaned up - on exit anyway, but let's shoot for good form :) - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit c206cfd1de94e2e79c1d9d42dc8f44f140d4c3f8 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Mon Mar 9 14:09:56 2009 -0700 - - Add adjtime handling to hwclock init - - The hwclock man page recommends calling hwclock with --adjust - at start time, and periodically during system run. So let's do - that here. - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 5d0fb0ef703ca78f399aadce43dd813effda52f5 -Author: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> -Date: Mon Mar 9 13:58:44 2009 -0700 - - minilogd: Initialize values for accept() - - From the accept(2) manpage: - The addrlen argument is a value-result argument: the caller must initialize it - to contain the size (in bytes) of the structure pointed to by addr; on return it - will contain the actual size of the peer address. - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit f3a60b900d22349445de1481d6171297ac022ff0 -Author: Allan McRae <allan@archlinux.org> -Date: Mon Mar 9 19:53:39 2009 +1000 - - Fix status display functions - - The status display functions were returning the opposite of what - they should have been. Also made cosmetic changes to the output. - - Signed-off-by: Allan McRae <allan@archlinux.org> - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit a2db62cbc2f326c30bfd39be31fe71472b8e47e1 -Author: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> -Date: Mon Mar 9 12:08:45 2009 -0700 - - Fix minilogd headers - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 623e3fac060b0f4b32c0ec767d76ef57f5040ed1 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sat Mar 7 20:16:45 2009 +0100 - - Use the device nodes from /lib/udev/devices/* instead of hardcoding them in initscripts. This requires a new udev package (at least 139-1) - -commit 666cd9b3971e171f4e8ec348666ab8ff8bfe97d8 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Mar 3 08:39:13 2009 -0800 - - Remove the kernel 'quiet' handling for fsck - - This is simply confusing that we use the kernel "quiet" parameter - to mute fsck output. Removed for now - perhaps we can add a better - solution later. - - Ref: FS#12928 - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 21f528419f945f0d2f867ffa55553b4d5da7f4b8 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Wed Feb 11 22:06:13 2009 +0100 - - Fix bug #13205: better random-seed entropy - - For the random-seed file location to be more "FHS compliant" is better to put in /var/lib/misc/random-seed (Variable state - information, that persists after reboot) than the /var/run/random-seed (Run-time variable data, that not necessarily persists - after reboot) for example with /var/run mounted as TMPFS. - - The random-seed file permision should be "0600" not "0644" - - The size of random-seed acording to random(4) manpage should be the size specified in "/proc/sys/kernel/random/poolsize" in - other case 512 bytes. - -commit e932c3406acf105c99e159ca0610768fbfb49b1a -Author: Petar Bogdanovic <petar@smokva.net> -Date: Tue Feb 10 08:27:07 2009 -0800 - - Allow the user to cancel an fsck - - Don't fail and force a reboot if the user cancels an fsck - on boot. - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 2c5e306be0bcc8d91662176bfcfb55ec95777bc3 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Wed Jan 21 13:10:34 2009 -0800 - - Adjust copyright year to 2009 - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit ad81ddafabd95ee1ea7169880a6a80f04babf9a6 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Dec 23 14:45:30 2008 -0800 - - Add some simple status display functions - - This is useful for displaying daemon status in functions - like /etc/rc.d/$DAEMON status - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit fa4f2f14870500eeab3233da07647a7c2c5e1648 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Dec 23 14:43:51 2008 -0800 - - Adjust minilogd's maximums - - A max of 200000 lines stored, at 8K per line, was a little - ridiculous and soaked up way to much memory if a syslogger - was not started. Drop the max to 10000 so that we don't kill - the user's system. - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 0e4ff39e5a5c72b7d4e8d251d029d4342f68b7b6 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Dec 23 14:41:09 2008 -0800 - - chmod /var/run/utmp to 664 when creating - - This allows X terminals to write to /var/run/utmp - so that they are reported properly to commands like - who and w - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit af3ac0dc954d96855555aa8cb12633494d465a77 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Thu Dec 4 09:40:14 2008 -0800 - - unset the TZ envvar in 'functions' - - This prevents a local TZ variable from breaking - daemon's when started by root. Daemon's should always - respect the system's /etc/localtime - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 9ac428a113d5dee2b4d5469fdfdb383eda90d4c6 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Mon Nov 24 07:50:45 2008 -0800 - - Switch commented kdm path - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 572019c5a188d22a1e833c1a27081227a65133f9 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Thu Sep 25 00:33:32 2008 -0500 - - Added missing slash - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit af5516dc690a3b2fab88188cfcde898ca0efbf4b -Author: Thomas Bächler <thomas@archlinux.org> -Date: Thu Sep 18 22:21:39 2008 +0200 - - Fix bug #11229 - -commit 8f1628613cc5746b7c85c6f84776b365833f1dad -Author: Thomas Bächler <thomas@archlinux.org> -Date: Thu Sep 18 18:55:14 2008 +0200 - - Respawn udev properly when running 'init s'. Fixes #9739 - -commit ce600eea3b9383f167cb91d784aff04821fa0528 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Sep 14 19:46:14 2008 +0200 - - Remove references to start_udev from rc.sysinit - -commit d399979d08be1ae2cc8e4ab60a68c57b120d08a0 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Sep 14 19:41:14 2008 +0200 - - Revert "Create udev required device nodes if missing" - - This reverts commit 119b8df1fb1258231750309f01e747e72f382493. - These nodes are created like 10 lines above, the [ -f ... ] check would always return false anyway (-f == regular file) - -commit 119b8df1fb1258231750309f01e747e72f382493 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Sat Aug 30 21:11:39 2008 -0500 - - Create udev required device nodes if missing - - Udev requires /dev/console, /dev/null, and /dev/zero to exist - before running. Create these on init if they're missing - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit d2ae38c8b06d057c7593b7ba836bf24a1f8f6c4f -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Aug 5 14:34:53 2008 -0400 - - Set kbd_mode on all virtual consoles - - Previous behavior only set the mode for vc0. - See FS#11093 - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit b7d66decca5117aaba3b73d2eccb97594ef1ea98 -Author: Daniel Kaminski <maniel.rulez@gmail.com> -Date: Tue Jul 22 17:50:02 2008 -0400 - - ipv6 over ipv4 tunneling support in /etc/rc.d/network - - This is done by checking the route config for a double colon - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 04899c1b829f1a4708a04e2188b256901845770f -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Fri Jul 18 11:47:22 2008 -0400 - - Remount filesystems RO if umounting fails - - Just a safeguard, suggested by FS#10947 - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit e13ee23fd2d0035150d178fc683079696fb446fc -Author: James Rayner <james@archlinux.org> -Date: Mon Jul 14 21:24:33 2008 +1000 - - Add some useful error messages to wireless code - - Additionally add optional WIRELESS_TIMEOUT parameter - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 84f76aafc5f6d7f3d2c2141d2930e42dcb82def0 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Mon Jun 30 12:35:21 2008 -0400 - - Decouple ISO release name from initscripts - - This should aleviate some gripes - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 9dcd7a9fed510dacd14e4cf4497e73a98f847fac -Author: Natanael Copa <natanael.copa@gmail.com> -Date: Fri Jun 20 13:46:10 2008 -0400 - - Minor simplication for /etc/rc.d/functions.d/ - - Trivial simplification to make code more readable. - Removes one fork so booting should be "faster". Probably not mesureable - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit fa73767d19ea505ec32533b8856122968207db2f -Author: Anton Fiuman <llexiw@gmail.com> -Date: Sun May 25 00:55:56 2008 +0200 - - Allow users to ovverride daemon start and stop in rc.multi and rc.shutdown - - Signed-off-by: Anton Fiuman <llexiw@gmail.com> - -commit 63db98c2a8e256f9219c5c6501b40846040bf089 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Thu May 22 13:02:55 2008 -0400 - - Remove source_functions in favor of always sourcing the dir - - This is an obvious oversight on my part - this change allows - the overridden functions to work in daemon scripts and - anything else that uses /etc/rc.d/functions by itself. - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit de031161e02772aaeaefed1398f8ad59621bd8bc -Author: Thomas Bächler <thomas@archlinux.org> -Date: Wed May 14 13:49:16 2008 +0200 - - Fix commit 521d7678cecb3018923f7c869bc8a5f74dc29268, this makes more sense - -commit af36e8dd3c025d7593bda4f310612989927149d1 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Apr 13 18:32:43 2008 +0200 - - Always quote $TIMEZONE to fix FS#10178 - -commit 521d7678cecb3018923f7c869bc8a5f74dc29268 -Author: Pierre Schmitz <pierre@archlinux.de> -Date: Sat Apr 12 13:37:22 2008 +0200 - - fixing udev hotplugging Some devices like scanners do not work with recent udev/initscript changes. This patch seems to fix such issues. - -commit 42c5f304ad361fd9e16d08a5230043e47437c399 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Tue Apr 8 20:12:55 2008 +0200 - - Just some whitespace fixes - -commit 391cfa71285cfca49aed0d6d2a05c9a949cb9857 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Mon Apr 7 15:33:20 2008 +0200 - - Remove setterm screen blanking from rc.sysinit - Contrary to what one may think, screen blanking not only affects the - console, but also the X server. This line may lead to unwanted blank screens - although one has DPMS disabled in X. Furthermore, it adds a hardcoded, - non-configurable default setting to Arch. - This should either be made configurable (but IMO, we don't need more stuff - in rc.conf) or added to rc.local by the user if needed. As this is a - one-liner, the second solution sounds good to me. - -commit a58228bfe3764008ecf971d420fb7fa0bb704b54 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Apr 6 23:37:17 2008 +0200 - - Remove extra newline from udev status output - -commit 307c850a0c345a092a21fff50da2f0658c3c03c4 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Apr 6 23:30:48 2008 +0200 - - Remove the "interface is already up" check from ifup - As stated in commit f589387f0b9ef56de8ab30f50a3c562e010baeeb, even an - interface that is 'UP' may need configuring. However, the check introduced - in this commit is nonsense (causing bug #9960, possibly others). The best - idea is to remove the check altogether: This may cause duplicate dhcpcd - processes to run (should be fixed), but otherwise ensures the interface is - brought up when it should be. - -commit 89355a468670983476d29b415c12e097d5d79ca5 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Apr 6 23:20:37 2008 +0200 - - Fix USEDIRECTISA in rc.shutdown as well - -commit b55845f7d0e3c81f1936d471370dcb40822463b0 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Apr 6 15:55:23 2008 +0200 - - Remove old initrd hacks - We haven't been using initrd for a while, so these hacks are unnecessary. - The "encrypted root device hack" was obsoleted by proper udev rules long - ago. The code to umount and free the initrd is not critical, so if somebody - insists on using initrd, it can be done in rc.local. - -commit 4c493ec5599b1a30dadc51567e2546a63feb87ef -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Apr 6 15:50:57 2008 +0200 - - Make USEDIRECTISA default to no, which is a sane default according to hwlock's manpage. This is contrary to the behaviour in older initscripts. - -commit 4a4cb51a138d73753bb967c27a9f7ea8bf9f88b3 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Apr 6 15:48:22 2008 +0200 - - Move /sys mounting to the beginning, together with /proc and /dev and clean up some comments - -commit f3e064ec822b3dae191e1ae5d2bb921a970af86e -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Apr 6 15:40:08 2008 +0200 - - Remove any special handling of usbfs from rc.sysinit - libusb has migrated to /dev/bus/usb, which is managed by udev and thus more - flexible. Some legacy applications (like VirtualBox) still use it. However, - since users need special permissions to access usbfs, they have to be - specified via mount options in fstab. So there are two cases: - 1) a user does not need usbfs - 2) a user needs it, but must add it to fstab to force the right permissions - Our old special handling in rc.sysinit is thus obsolete (and it was ugly - anyway). - -commit 5386d7332dd77ecf4113dfc10773b529f583e797 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Wed Mar 19 11:12:19 2008 +0200 - - Use actual device number for creating /dev/misc/rtc0 - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 6e37620983c107e13120d1e249a37b3be6d0b12d -Author: Roman Kyrylych <roman@archlinux.org> -Date: Tue Mar 18 22:43:38 2008 +0200 - - Do not try to create /dev/pts and /dev/shm twice - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit a71b075e90154073e3ba331de9b74b8bc088ec45 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Mar 18 12:33:24 2008 -0500 - - Fix a directory typo - - Looks like a 'bin/' slipped in there somewhere. Whoops - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 52a6990bc7ab0b48d6d227a8dcb782cb1d419dd5 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Mon Mar 17 11:34:12 2008 -0500 - - Variable expansion quoting - - This was missed, and caused some gross output if a user - mistakenly had a space in their timezone (we should fail - gracefully here, not let bash error). - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 15647a9f42a00406ec1c1c02515fe1e90825bd9b -Author: Roman Kyrylych <roman@archlinux.org> -Date: Tue Mar 11 00:02:22 2008 +0200 - - Remove the 'makedevs' script - - * last touched somewhere in 2005 - * not used by anything - * sits in /sbin but uses software from /usr/bin - * makedev in Extra exists - * if one wants a static /dev - just use mknod - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 12ee0a4fe0108fe952dc31c5f42648037b9c5cde -Author: Roman Kyrylych <roman@archlinux.org> -Date: Mon Mar 10 17:58:48 2008 +0200 - - Fix a typo in /dev/rtc creation steps - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 7526db5d0405188fee94d16fbcfbdf13a17e6a45 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sun Mar 9 17:22:11 2008 +0200 - - More full-path fixes - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 2c9681f461a0cde98a88de65e232369df68ed859 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sat Mar 8 20:02:09 2008 +0200 - - Add basic support for dependencies in rc.d scripts - - Example of use: - DEPENDS=('dbus' 'acpid') - . . . - ck_depends ${DEPENDS[@]} - and those daemons will be started if not running already - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 45e331302268490cfb532ea6fe827cba1351ec5b -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sat Mar 8 19:22:48 2008 +0200 - - Use full path to binaries everywhere - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 6214a05ea023b8bc3014d8032af18b2404276d00 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sat Mar 8 18:45:24 2008 +0200 - - Create /dev/rtc before running hwclock (FS#9636) - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 973c1b65ad9fb92c6a0e017a7b8bfb40c38b3bcd -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sat Mar 8 19:28:08 2008 +0200 - - Fix indentation in rc.d/functions - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 646862aa989d82c35d267d5771c6cc620275bf4c -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Fri Mar 7 14:35:31 2008 -0600 - - Additional /dev/ setup that udev doesn't do - - These nodes are not covered by default udev, so lets make - sure they're added properly. - - Ref: FS#9726 - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit abe6dcb83d16c6e40fed99c202085c78cb356fa1 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Fri Mar 7 14:34:26 2008 -0600 - - Add my name to the copyright output - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 91b86efedd70e6b83232057fbf2b089a47b76333 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Thu Mar 6 00:24:20 2008 +0200 - - Revert back to not loading defkeymap - - * There is a patch for the kernel now, so no need to workaround the bug - * Add a missing check for an empty KEYMAP - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 56fffa9954db654c1731e07f753c3de105896455 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sun Mar 2 16:31:34 2008 +0200 - - Always load defkeymap - - It seems that there's a bug in the kernel 2.6.24, - which makes the built-in defkeymap to produce incorrect composite chars. - Thus keymaps that don't have 'include "compose.latin1"' have issues (FS#9593). - While it is better to fix this bug in kernel and all affected keymaps - loading defkeymaps before other keymaps seems to not hurt anyway. - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit f94f52e5ab877ffc3160d0bf20c70be9865d45b2 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sat Mar 1 00:40:02 2008 +0200 - - Set up vc/0 as well - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 1b5eeefa5a859a9c26a717603bd4c0e9fb74de82 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sat Mar 1 00:04:01 2008 +0200 - - Do not mount /proc/bus/usb if commented in fstab - - Fixes FS#9451 - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 4d0920ede7ce9c3d67e03c67b9ee584cf1a3fe9d -Author: Roman Kyrylych <roman@archlinux.org> -Date: Thu Feb 28 13:55:41 2008 +0200 - - Make non-UTF-8 consoles work correctly in .24+ kernels - - * Since 2.6.24 the virtual terminal is in UTF-8 mode - and the keyboard is in Unicode mode by default, - and configurable only at run-time. - - * To make non-UTF-8 consoles work correctly: - - the non-UTF-8 mode is set for the virtual terminal, - - the XLATE mode is set for the keyboard. - - * UTF-8 mode is still set explicitly (not relying on default), - so console works correctly even in a case when user set vt.default_utf8=0 - in kernel commandline, but LOCALE in rc.conf is *.UTF-8. - - * % is a special symbol for printf, so it should be written twice. - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit ef86e38e9fd750db35e23aa949aa60e4c9f60f0c -Author: Roman Kyrylych <roman@archlinux.org> -Date: Thu Feb 21 18:07:44 2008 +0200 - - Remove trailing whitespaces and do some little reformatting - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit bb639b33167e13602aacf34bab6032992e7b3d6a -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Wed Feb 20 23:46:57 2008 -0600 - - Add some udev stats output - - So we can see timing and all that jazz - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit e658f681e1d36a75b527d182ce28ee0781ed4492 -Author: Dan McGee <dan@archlinux.org> -Date: Thu Feb 14 20:16:49 2008 -0600 - - rc.shutdown: Fix hwclock double calls - - Commit 9673449ac0af77751eab62423114f27e7dbc497c added --directisa - configuration to rc.shutdown, but didn't remove the old hwclock calls and - instead just added a second call. Remove the original calls. - - Signed-off-by: Dan McGee <dan@archlinux.org> - -commit e16e2d17c97f91cdb9eda0ad3525ee7977ad40a6 -Merge: 626037f fbb8d26 -Author: Dan McGee <dan@archlinux.org> -Date: Thu Feb 14 19:56:02 2008 -0600 - - Merge branch 'posix' into working - -commit 626037f6043596f21511b76b088dca86fc079f42 -Author: Dan McGee <dan@archlinux.org> -Date: Thu Feb 14 19:53:03 2008 -0600 - - functions:source_functions(): don't fail on empty dir - - Instead of using globbing which will fail on an empty directory, use an ls - call similar to other places in the initscripts which is not prone to - failure. (See rc.single in the daemon shutdown for example.) - - Signed-off-by: Dan McGee <dan@archlinux.org> - -commit fbb8d26a81dc220d7795be871e09c89fd0e03a76 -Author: Dan McGee <dan@archlinux.org> -Date: Fri Nov 30 09:30:05 2007 -0600 - - Remove echo -e usage from rc.sysinit - - Use the always available (in sh) printf method instead. - - Signed-off-by: Dan McGee <dan@archlinux.org> - -commit 7b6fddfb12106c9485a9ceb8fa1876a501d1f181 -Author: Dan McGee <dan@archlinux.org> -Date: Fri Nov 30 09:23:02 2007 -0600 - - Remove some bashisms from network, even though we cannot convert it - - Since netfs and network source rc.conf, we cannot fully convert it to an sh - script. However, we can get rid of a few things that are not sh compatible. - - Signed-off-by: Dan McGee <dan@archlinux.org> - -commit e3985084056bb80c886ea649674c3da5b906ccab -Author: Dan McGee <dan@archlinux.org> -Date: Fri Nov 30 09:18:26 2007 -0600 - - Make install.sh sh compatible - - Signed-off-by: Dan McGee <dan@archlinux.org> - -commit 980791fd888b6efff6319c77363aab473166ca6b -Author: Dan McGee <dan@archlinux.org> -Date: Fri Nov 30 09:17:15 2007 -0600 - - Make functions sh compatible - - There is no reason to use bashisms in functions, so eliminate any and use - printf instead of echo options which are not guaranteed to be implemented in - a POSIX sh. - - Signed-off-by: Dan McGee <dan@archlinux.org> - -commit dc4cee8f5987098a07a8b272573424b599a52598 -Author: Dan McGee <dan@archlinux.org> -Date: Sat Nov 17 12:03:59 2007 -0600 - - Don't assume sh == bash - - Signed-off-by: Dan McGee <dan@archlinux.org> - -commit ccc90d4d211a61a21c835c1e51c807ddd485a136 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Thu Feb 14 14:51:40 2008 -0600 - - Add support for (un)mounting nfs4 - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 9673449ac0af77751eab62423114f27e7dbc497c -Author: Roman Kyrylych <roman@archlinux.org> -Date: Wed Jan 23 17:46:03 2008 -0600 - - Use --directisa configuration in rc.shutdown as well - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit f589387f0b9ef56de8ab30f50a3c562e010baeeb -Author: Loic Nageleisen <lloeki@gmail.com> -Date: Tue Jan 8 09:14:42 2008 -0600 - - Enhance interface 'up' state checking - - Using the 'UP' state to imply operational status is wrong and even if a - device is 'UP' we may still need to run ifconfig/dhcp - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 9e341d31cd15172941268412d258c38591ff4988 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Jan 8 09:09:46 2008 -0600 - - network script logic cleanups/enhancements - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 7719cd7c0ac6d3f316ed8595becf29ef418d9af9 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Jan 8 09:07:05 2008 -0600 - - Remove the hotplug functionality from the network script - - Hotplug hasn't been supported in Arch for ages - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit c2d7f40b2e0837f5544e6e2bfc22dc12e994ed16 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Jan 8 03:35:05 2008 -0600 - - Create some basic device nodes on initialization - - We need, at the very least, these three device nodes - (null, console, and zero) created before we get udev - up and running - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit cd0b3911131ee0eddc32c5e3992036c2e769948f -Author: Jonathan Frazier <eyeswide@gmail.com> -Date: Tue Jan 8 03:26:12 2008 -0600 - - minilogd cleanup and warning fixes - - gcc gives a warning about signed/unsigned ints, and it tries to write to - syslog's /dev/log with a dgram socket which gives an EPROTOCOL error. - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 9bf2014b750579d9720c13c9dfb9d358e0c27665 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Tue Jan 8 03:06:56 2008 -0600 - - Allow --directisa configuration for hwclock calls - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit ab5595c4f8cdea8e6b1813701828576cbfee2fc2 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Thu Dec 20 12:32:12 2007 -0600 - - Deprecate MOD_BLACKLIST via some comments - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 2694f1224dfb5b5c734a781fc813e639139feb39 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Thu Dec 20 12:19:56 2007 -0600 - - Mount our ram /dev as soon as possible - - On readonly root systems, lots of fdup calls fail on device nodes, for - instance in minilogd. So we'll mount /dev as early as we can - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 25811badce84cd157a8b66c84e78f931cad1d129 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Thu Dec 20 12:15:26 2007 -0600 - - Set hwclock *before* udev is loaded - - This prevents /dev/ timestamps from being 'in the future' when the hwclock - is not in UTC. - - Closes FS#8665 - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit b82f9d580d1ab70e78de4c81c180c5a308bd1238 -Author: James Rayner <james@archlinux.org> -Date: Thu Dec 20 10:53:25 2007 -0600 - - Tidy up rc.conf - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit a4a35bda6ef3fd3e444e90ab362369f0b1f511dc -Author: Simo Leone <simo@archlinux.org> -Date: Thu Dec 20 01:30:59 2007 -0600 - - Make the background black on all status text - - This is the easiest way to cleanup the script output on white terminals - without resorting to shutting off color. - - It won't make everyone happy, though. - - Ref: FS#1186 - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 5ccb8edb591213e03fc3909aa7db7242b9f54b30 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Mon Dec 17 16:16:38 2007 -0600 - - Modify comment above MOD_AUTOLOAD to indicate that it autoloads - - Some people thought the comment was unclear - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 20d6e1081ec7105207c01e9d8d2a58bb4a145331 -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Mon Dec 17 16:08:05 2007 -0600 - - Save dmesg output at the end of the boot process - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 9d86b8814583509069ad6707688e2b41fc0d292f -Author: Roman Kyrylych <roman@archlinux.org> -Date: Wed Dec 12 10:28:37 2007 -0600 - - Fix FS#8843 (no colors in rc.sysinit output with separate /usr) - - when tput returns exit code 3 - assume it output '8' - (as written in the /usr/share/terminfo/l/linux file) - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - - Converted to if/elsif form - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 662a52c15343338e9d843c6f70d39acefd3a2c4c -Author: Dan McGee <dan@archlinux.org> -Date: Sun Nov 18 11:47:54 2007 -0600 - - Move start_udev actions to rc.sysinit - - start_udev has been deprecated upstream for some time. We shouldn't use - some hacked up version of it either. - - Signed-off-by: Dan McGee <dan@archlinux.org> - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit b1d0ec7cb6e8cea9f2fd7b0c11a0b607467615bd -Author: James Rayner <james@archlinux.org> -Date: Sat Nov 10 13:26:39 2007 +1100 - - Removing netcfg from initscripts - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit b8e558d5784c8054a91dcefd8495b739a664dbae -Author: Aaron Griffin <aaronmgriffin@gmail.com> -Date: Wed Nov 28 14:47:09 2007 -0600 - - Source /etc/rc.d/functions.d/ for additional initscript functions - - Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> - -commit 57879c6d6c51918b8106142e70643b53a9a8c7da -Author: Roman Kyrylych <roman@archlinux.org> -Date: Fri Nov 9 16:47:44 2007 +0200 - - Improve error handling and allow multiple keymaps to be loaded - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 9af6022b841c84283a061d6a7a5be943057ac3ae -Author: Dan McGee <dan@archlinux.org> -Date: Sun Oct 21 20:29:16 2007 -0500 - - Add a few more comments and examples to inittab - - Signed-off-by: Dan McGee <dan@archlinux.org> - -commit c5cffb501763c355299e593d16089fa5e56097b2 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 18:51:51 2007 +0200 - - Fix broken terminal detection, disable colors when the terminal is unknown. - -commit e3f7fc94d40e13f65e00adb3d7c48fb6f790c7d7 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sun Oct 21 16:39:24 2007 +0300 - - make non-ASCII chars work before login too - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit bbc2f945cb5df2ff103759ccb6de5183a87487b7 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 15:11:20 2007 +0200 - - yes, I fixed a trailing whitespace - -commit 59f89b4a25fbc100551a814f5bcf81aa05b6c2e7 -Author: Roman Kyrylych <roman@archlinux.org> -Date: Sun Oct 21 15:24:57 2007 +0300 - - Fix locale handling - - Signed-off-by: Roman Kyrylych <roman@archlinux.org> - -commit 956e12f7f57a38ed382032d361ac22196d015170 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 11:45:43 2007 +0200 - - change install.sh to exit on failure with return code 1 - -commit 7d018e6ba90b1b006068502f443b69e258795061 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 11:40:50 2007 +0200 - - Added install script - -commit affd2bf9f3f84d507ab4c4a9998b4d1c2697300c -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 11:31:45 2007 +0200 - - Make daemon shutdown fix more consistent with the other init scripts and simplify it a bit - -commit 1b8636ed76e4bf5ef23c3b357e991c66e18714c5 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 11:06:07 2007 +0200 - - fixing second part of #6959 - -commit bc1b5289228e74641a61cff3bb8b3751713dcf54 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 10:53:28 2007 +0200 - - replace all remaining backticks with $(...) - -commit 1828938d4406d5a95b7c89828f61600f9e6975a6 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 10:41:21 2007 +0200 - - fix the utf8 activating code: there are 63 virtual terminals, not 12 - -commit c8030f33082229530ef2f0ed699eddea4465dad9 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 10:18:36 2007 +0200 - - Release name: "Don't Panic" -> "Core Dump" - -commit e064575e7842d55371db39991593f3ea0bf03b9b -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 10:15:47 2007 +0200 - - Remove hwdetect as it is maintained as a separate package and this version isn't up to date anyway. - -commit cfab94bc71dc2e072c691122df82f4b6f2bdef29 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Oct 21 10:05:28 2007 +0200 - - disable colors on stupid terminals - (fixes #7369) - -commit bb0984ad899ab3ae85ef8bf2c0e178a2b485885c -Author: Thomas Bächler <thomas@archlinux.org> -Date: Fri Oct 19 22:22:52 2007 +0000 - - added (barely tested) improvement of ASK keyword in crypttab - -commit 39a8c53bd8c2b82e824d9299a4a18d81c9e530bd -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Fri Oct 19 07:02:14 2007 +0000 - - 'upgpkg: removed double entry of ifconfig lo' - -commit 31dbcc786457dd92d9f56618e7c946b94ec04646 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Fri Oct 19 06:08:19 2007 +0000 - - 'upgpkg: added /sys/class/net/lo check' - -commit 24e468641b51e5e0a05e631d62ad706b5c0a2dd7 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Thu Oct 18 16:50:26 2007 +0000 - - 'upgpkg: added loopbackhardcoded to rc.sysinit and remove it from rc.conf' - -commit 6f35411f5ee1db8db1e27faf91c7b03e900c5bee -Author: Dan McGee <dan@archlinux.org> -Date: Thu Oct 18 16:15:58 2007 +0000 - - removing unnecessary isatty.c, replaced by shell test -t option - -commit a7c1404def678e27e0ac808397f46f81a1d2c8d4 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Thu Oct 18 14:27:56 2007 +0000 - - 'upgpkg: fixed utf typo' - -commit fa4866f0adce9c3e0bfc09fb878eebb99797c338 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Thu Oct 18 08:43:28 2007 +0000 - - 'upgpkg: trying to fix #6237,7554,7165,7641,5740' - -commit 8649f79e8e0027bd46da8b13f6d8ac5465471c35 -Author: Dan McGee <dan@archlinux.org> -Date: Wed Aug 15 04:01:59 2007 +0000 - - upgpkg: initscripts 2007.08-2 - -commit e3c06e981af869d6a00ec8cde34bde1e15cb53ad -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Mon Jul 30 20:24:42 2007 +0000 - - 'upgpgk: fixed nocpfs netfs bug and bump to don't panic release' - -commit 6852a33372052c1374248f6727e6f7755aeadd30 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun May 13 13:40:40 2007 +0000 - - upgpkg: initscripts 0.8-11 - -commit aca95b25037ee1085c70a2e73b609a5d8cdff44b -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun May 13 12:01:11 2007 +0000 - - upgpkg: initscripts 0.8-10 - -commit cc2c8b1fa2a709b405e3efc65222b984a63e13c6 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sat May 12 12:55:37 2007 +0000 - - 'upgpkg: bump to Duke and cleanup rc.sysinit and netds' - -commit 352dda7e7ba2c62686579e2c58b519ebb961b8be -Author: James Rayner <james@archlinux.org> -Date: Thu May 10 00:18:05 2007 +0000 - - upgpkg: initscripts 0.8-8 - fixing flyspray #7004 #6859, change in dhcpcd state directory. - -commit 3fc84b485213763335a5b820f8a4b4d6483be20d -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sun Apr 22 13:37:53 2007 +0000 - - 'upgpkg: added autoloading of standard acpi modules during boot, with the possibility to blacklist by default methods' - -commit b04f18c15cef8f6d48aa0aa63fa8104b551fe1db -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sat Feb 10 09:14:34 2007 +0000 - - fixed typo, fixed verbose booting - -commit fff26e7f1fecaec1bf4c07cc07d1a426b160168b -Author: Thomas Bächler <thomas@archlinux.org> -Date: Tue Jan 30 18:56:37 2007 +0000 - - forgot to add rc.local.shutdown - -commit 36e129004f1dfb2e890edc55f99c8eb0df89c668 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Mon Jan 29 21:51:35 2007 +0000 - - 'upgpkg: added network listing help to rc.conf' - -commit 78b5f6beee0453dd938f1a3c6a6ab5776e6d78f3 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Mon Jan 29 20:45:25 2007 +0000 - - fix 6038 - -commit 1bad30cc17f6cec15668f2bae9d6b72dd44788ee -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Mon Jan 22 21:52:41 2007 +0000 - - 'upgpkg: fixed verbose boot option' - -commit bced30e91fea71c05e3e521aa7cf04583f0dadbb -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Thu Jan 18 19:21:26 2007 +0000 - - 'upgpkg: fixed usb removal' - -commit 221f3c66ca47ccf283f8ebbe7f8799cc24176def -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sun Dec 31 16:11:52 2006 +0000 - - 'added a bunch of new options' - -commit c323a4ae268d20d293351dc5e195e34d19ed28e7 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Mon Dec 18 21:54:53 2006 +0000 - - upgpkg: initscripts 0.8-2 - finally fixed 5445 - -commit f9b90969a7669044f098b90babe203b145bf55a9 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Mon Dec 18 19:24:54 2006 +0000 - - 'upgpkg: added --keymap option' - -commit 4b00503d2d25e40b0e962df08005d749cf3a4c87 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sun Dec 17 12:53:22 2006 +0000 - - added stat_append to functions, fixed fsck bugs when clock is not set - -commit 779bd2abb1b67431b6e353eaba569779fb718833 -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sat Dec 16 23:49:35 2006 +0000 - - let lvm start quietly - -commit 9b58da29d7ce93bf3dc258a28d2fae00eb181f7e -Author: Thomas Bächler <thomas@archlinux.org> -Date: Sat Dec 16 22:03:29 2006 +0000 - - rc.sysinit, rc.shutdown: - - Code cleanup - - Added "verbose" commandline option for debugging - - Fixed #5968 - - Fixed #4648 - -commit 567edd5aa95d5728b50f9fff6d71c368a7f3966a -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sat Dec 16 13:31:00 2006 +0000 - - 'upgpkg: readded rc.sysinit and hwdetect for 0.8 package' - -commit 9a73b01bb6ea96b81b9ed887f8808b47b4fc5f19 -Author: Andreas Radke <andyrtr@archlinux.org> -Date: Sun Dec 10 21:21:20 2006 +0000 - - cuurent x86_64 updated - -commit 3fcefcf13b87883216dd5331b2aed84db473de04 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sun Dec 10 14:34:46 2006 +0000 - - 'upgpkg: added voodoo tag and new hwdetect' - -commit 6b671f7901477d36fca5f8901731e4c0d5e7948f -Author: Aaron Griffin <aaron@archlinux.org> -Date: Thu Nov 16 01:01:16 2006 +0000 - - upgpkg: initscripts 0.7.3-1 - Bugfix #5529: Set timezone before hwclock calls - -commit c632bec83a37945e5bb4e7cedf4f4d96f0a955ec -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Nov 13 00:00:27 2006 +0000 - - FS#5385: Fixed RAID setup code - -commit ef6a41ebd7e2ab216e4b950df2a6d0826aef39b7 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Nov 8 20:01:06 2006 +0000 - - patch from Paul to disable NIS domainname before shutting down (syslog-ng was hanging). Also added a 2>/dev/null to fsck during startup - -commit 01f15f89c1cf4cdb77c7d0a8ddb37ddabd7df012 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Mon Oct 2 14:50:41 2006 +0000 - - 'upgpkg: added psmouse workaround for new broken lappies' - -commit 9c34c7c5c8c525ce17a5bf447e40d78741ee15ba -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Sep 28 19:25:16 2006 +0000 - - added CONSOLE check to UTF-8/Locale stuff to avoid doing it when running scripts from cron - -commit 00081d09b7ab18b8672a299d61a1281819904890 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Sep 26 06:34:35 2006 +0000 - - Added --directisa switch to hwclock in rc.shutdown - -commit 2f49e1bb285fc9ad7259caf5edb957d7c891c974 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Wed Sep 20 10:36:16 2006 +0000 - - 'upgpkg: added udev persistent rules check' - -commit 8d399cf84d6d6192a13286e33258aaa369eee1bb -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Fri Aug 4 07:54:32 2006 +0000 - - 'upgpkg: added kexec support to rc.shutdown' - -commit 977797d7a67033d03c4be04dba5b789ecdf2a36f -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Jul 25 22:36:42 2006 +0000 - - set a default for LOCALE so it's no longer needed in /etc/profile - -commit 87132356080924e00822a4b24d593e94bb18e24a -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jul 21 19:40:00 2006 +0000 - - added --directisa to hwclock calls, support for additional options in crypttab for non-LUKS partitions, fixed the WPA_OPTS varname typo in netcfg - -commit 8d214daab85c043f87ed21912b68172cc0e33635 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Fri Jul 7 15:17:34 2006 +0000 - - 'upgpkg: fixed usbfs mounting again' - -commit 93ba858cb8f3684506bcc5854ce32b637e108d00 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jun 30 19:40:10 2006 +0000 - - various fixes -- netcfg fixes, md device node creation fixes w/ mkinitcpio, 2.4 kernel support removed - -commit 4d91b544b6f666a12b84f82576b4309622806e83 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jun 30 15:54:33 2006 +0000 - - Fixed --menu when using gpm (#4916) - -commit 09bb556bf07b89130d27dc137190ff354beadecc -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Jun 28 17:27:47 2006 +0000 - - handle ESSID fields that contain spaces - -commit 6cc15eeb857f9a01e7199c4c665866c7728244aa -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Jun 15 21:54:12 2006 +0000 - - added patch from James Rayner to auto-configure WPA through netcfg - -commit 96971f91453600f1d94d3e333dfb8773d1e4f596 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Jun 12 17:36:12 2006 +0000 - - fixed the path to the console maps in the comment area of rc.conf - -commit 5d708a122229e99d1f09f9cfd8297370e1778732 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Wed Jun 7 17:12:17 2006 +0000 - - 'upgpkg: removed the rest of 2.4 kernel' - -commit b4306a3ede324f6bdbfa5c7b80d0cff15f22c1be -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Wed Jun 7 16:49:32 2006 +0000 - - 'upgpkg: removed kernel24 stuff eg. devfsd support and lvm1' - -commit ddac836cdbb67ba5b89d21aa3b25a67919efeb88 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue May 9 18:23:41 2006 +0000 - - upgpkg: initscripts 0.7.2 - -commit dfb74ab60c8bb84f3e02d89cfe8127e55aeb7984 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Mar 27 18:13:56 2006 +0000 - - fix for #4296 - -commit 7cc268dcf5d2e64a3f10b808e8b1b90a8f6fec4a -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Feb 26 19:15:58 2006 +0000 - - Additional fix for locale stuff, re-enabled the depmod -A call at bootup - -commit befe253687d69267cac5e5953e0ca55d18bef000 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Fri Feb 24 06:57:54 2006 +0000 - - 'upgpkg: added depmod -A again' - -commit 7ad516d1a7bf6fb5eed4e43669a7fb2a0832a552 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Tue Feb 21 07:35:10 2006 +0000 - - 'upgpkg: fixed module loading and udev startup' - -commit e0074ab78392be117c4cc63b4e0832fef95f2009 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Feb 20 05:33:27 2006 +0000 - - default LOCALE is now en_US.utf8 - -commit d4bd7c245c018d9de3f25eca580515cfc3048217 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Feb 20 05:26:07 2006 +0000 - - fix for terminal/locale bug (3996) - -commit a33f5477d845f3919cd746ab2be1180cb025b415 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Feb 16 17:56:33 2006 +0000 - - hwdetect->udev, removed default usbserial blacklist - -commit 655d3db463145facd994e5e3cfd0c0a911b30297 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Feb 16 17:12:06 2006 +0000 - - added note about disallowed hyphens in bash variable names - -commit 207256890573ce867d4391c362b34f31a1a60865 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Thu Feb 16 10:23:38 2006 +0000 - - 'upgpkg: put loading modules in front of udev and disabled depmod -A during boot' - -commit 9058c034c77ab62b91f2cd7d3637a2cb04f7c7d7 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Feb 13 04:47:51 2006 +0000 - - removed unnecessary line from netfs - -commit 6411dc721549d99335367f5643c0887095fc7818 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Feb 9 18:48:17 2006 +0000 - - added note about dialog package required for netcfg menus - -commit 0d286b02f2c425d28c1908a82d99f266d3549919 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Feb 6 19:38:45 2006 +0000 - - moved swap activation after local filesystem mounting, so people can use swap files - -commit 8172dd9403fa216479c458e222c9d01c5b293437 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Mon Feb 6 18:13:03 2006 +0000 - - 'upgpkg: fixed weird scsi raid controllers' - -commit f137bbe79f4249a296c0e9064a29f5c76f38273d -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Feb 1 21:24:08 2006 +0000 - - utf8 little fix - -commit affcb39fd921774f48b79fb9d48d68f3a917fd4f -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Jan 31 01:30:55 2006 +0000 - - added --mknodes switch to the vgscan call (LVM) - -commit bd6701616508c5bb21de9166e9b1daa6fe1de769 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Jan 21 20:58:24 2006 +0000 - - fixed random-seed restoration - -commit e4af7e36ba40ab49993fcc4232dcebdedc1763b9 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Thu Jan 19 16:25:38 2006 +0000 - - 'upgpkg: update to new udev module loading' - -commit 8f67fcb5f1fb15d67f024f16bf3249da85375418 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Jan 14 08:34:09 2006 +0000 - - added hook for rc.local.shutdown - -commit cef7bab5145b923577aeea7431d7b19f2dd3946b -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Jan 3 09:06:09 2006 +0000 - - changed xdm path in inittab - -commit 33d5e65a50fa302f6863277c52c061af721a3c44 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Dec 19 18:43:03 2005 +0000 - - final touches for utf8 stuff (Thanks Roman\!) - -commit e4439a61bca626d05d3c6073ac94740db5c446c4 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Dec 17 18:33:46 2005 +0000 - - re-fixed my utf fix (yea, that's right, i fell down a lot when i was a kid) - -commit 00b620075a21e293db4b55a8d451ecd2930dbce1 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Dec 17 02:16:47 2005 +0000 - - added sr link to makedevs - -commit 0d08cad43172cc04df237a4a4271525ad1d527b3 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Dec 17 00:59:04 2005 +0000 - - final utf8 fixes, a couple small fixes for hwdetect and netcfg - -commit cee3cbb3a261ce0ba812618493e9bd253424ea3f -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Dec 15 18:56:19 2005 +0000 - - added scsi CD nodes - -commit f14a9cc609ce341ef2327c3ae93aa2695b58b392 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Tue Dec 13 21:43:08 2005 +0000 - - 'upgpkg: added kernel_verion=, cleaned up some parts added --modules for MODULES= generation for rc.conf use' - -commit c4c551a2f870f579438ae38b07ff9c14008cd6c9 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Dec 13 04:12:28 2005 +0000 - - makedevs fix - -commit a8db77d46d74fa3a8a0e13870b94c916a60358b8 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Dec 13 04:06:46 2005 +0000 - - latest utf fixes - -commit fcdcb21e2c33b1d3e359dc847638b936caf2aeee -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Dec 13 01:55:31 2005 +0000 - - makedevs: added ternary and quaternary ide/scsi devices - -commit 675e9d69d02233e0079672f6c10cbe07da3027ad -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Mon Dec 12 10:40:15 2005 +0000 - - 'upgpkg: removed unneeded utf stuff, umlauts in user names do not work, you even cannot create them, - added quiet option to filsystem check, fixed garbeled fonts if no framebuffer is used' - -commit d768a9c95a254e09a34c39aa86840c01cb6d97dd -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Dec 7 00:21:45 2005 +0000 - - changed both network scripts to use good ol' /bin/kill instead of dhcpcd's -k switch (I forgot about #2942) - -commit f45c3abd5697fa89d1a6431d8dbf5e96e6804ca8 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Dec 6 06:45:42 2005 +0000 - - Added interface param to dhcpcd -k calls in network and netcfg - -commit cfaa5552fcbe964a172138e5e6c87e54abb6ce4c -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Dec 5 18:59:11 2005 +0000 - - dhcpcd fix in rc.d/network - -commit cec2d46513c7cd557f219fa2ede3c7a816a526dc -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sat Dec 3 13:25:37 2005 +0000 - - 'upgpkg: fixed ide check' - -commit 7e18ec8806c28d52c771cacda045aa3bd81ba0b2 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Dec 1 21:04:15 2005 +0000 - - fixed wpa_cli path in netcfg - -commit 78365fe57d61645c1b8282784d863a0cd8537eb5 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Nov 29 01:26:11 2005 +0000 - - finished crypttab work, fixed a bug in hwdetect related to custom kernels - -commit 0d7cb77c48fc6232a8342fba9056a1896898b066 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Mon Nov 28 22:32:00 2005 +0000 - - 'upgpkg: fixed custom kernels' - -commit 2c90c8af7bee4f06cf05c481e658406df35fe401 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Nov 28 19:36:56 2005 +0000 - - added USEWPA to template to enable/disable wpa_supplicant - -commit 15c49deac15f97e647afc081c7b5e210ad4bdcd3 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Nov 28 19:14:53 2005 +0000 - - moved sysctl config stuff to precede daemon startup (#3530) - -commit fb8a47586d0c5c5833a6bee2adc162a22b646d5a -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sun Nov 27 18:55:30 2005 +0000 - - 'upgpkg: fixed lock on kernels <= 2.6.12' - -commit 66779d909c3a08f2c3fa0811de12f0e3b5c54bc0 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sat Nov 26 15:55:36 2005 +0000 - - 'upgpkg: fixed non ide systems, fixed usb modules' - -commit b087f41b86014ba5dfc0b23ea79d6897573fb562 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Wed Nov 23 12:54:55 2005 +0000 - - 'upgpkg: fixed hwdetect syntax for rc.sysinit' - -commit a03faeb98fbe82a01977a9900b0d1b6974aac3c6 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Wed Nov 23 12:45:41 2005 +0000 - - 'upgpkg: fixed mtp modules, added modules-order option, changes options to -- syntax' - -commit d8df29152b8401e4c56a07b8920f34fdf9252bc1 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Nov 23 01:58:50 2005 +0000 - - added check for /sys/devices - -commit fca87ebae05b19c0da51c1b996f4bddad82c3115 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Mon Nov 21 08:52:49 2005 +0000 - - 'upgpkg: hwdetect fixed module order, added load_modules=off to rc.sysinit' - -commit d7695ef38916be8e806b84f8e195a45a7b2ec217 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sat Nov 19 15:44:02 2005 +0000 - - 'upgpkg: added more modules' - -commit 561ff8a3abbda0a86cc2a479d8e1a9e1b965b0d1 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Nov 19 01:47:31 2005 +0000 - - added crypttab stuff - -commit 23f08df5cb31d38347582e4d62f9279385c612ba -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Fri Nov 18 19:00:25 2005 +0000 - - 'upgpkg : added full ide,scsi detection to hwdetect' - -commit 6931feb5463b3ce9119753bda74279ec87ed447a -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Thu Nov 17 07:52:21 2005 +0000 - - 'upgpkg: added new PNP software and some workarounds' - -commit 0cddbac760aa1b38e5fb68d54b315cb01c67b7b6 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Nov 15 09:07:13 2005 +0000 - - cosmetics - -commit 2dc0038155b978eb70be482313cc8535dadc436d -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Nov 15 02:51:52 2005 +0000 - - added variables for autoloading modules, cleaned up rc.conf a bit - -commit abdeaf8051aaadb9f5270a14e45481a8d61e0b95 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Nov 15 01:18:14 2005 +0000 - - added tpowa's changes, cleaned up output and removed redundant code - -commit 684a99329e37924e84344cb340e5022628d6777c -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Nov 14 17:46:46 2005 +0000 - - more thorough cleaning of /var/run at bootup - -commit e3315ad97c60b8cbad31aff8500d269d9176a9b5 -Author: Tobias Powalowski <tpowa@archlinux.org> -Date: Sat Nov 12 15:00:08 2005 +0000 - - 'upgpkg: added more text to show modules, to make it more readable :) " - -commit 9e02c37ccd310844c919f27af64c901979c4105d -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Nov 11 18:49:54 2005 +0000 - - updated hwdetect - -commit 9683aeadd86569b69ad44d270e006284e565dfd5 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Nov 11 18:46:12 2005 +0000 - - changed ifup() to skip interfaces that are already up - -commit 78ce45a497753e2be061e29a6464fcd969041895 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Nov 10 21:56:55 2005 +0000 - - added nocifs to pre-network mounts, fixed mdadm.conf missing errors - -commit 0daa0d11302e16ba26d7518c1edf0e4887aade9c -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Nov 10 19:21:59 2005 +0000 - - little bugfix - -commit d87c9749651741249b4c7cbf5f18b7ab1b3300fb -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Nov 10 19:06:51 2005 +0000 - - tpowa's hardware detection script - -commit d7e23b7ef7c92f7c9529c65a255b524b26648cc3 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Nov 10 02:34:20 2005 +0000 - - added more intelligence for RAID/LVM setups from the initrd - -commit 0e992c0464125a0cb0207171a053dbf64c593833 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Nov 9 21:22:44 2005 +0000 - - added logic to free up initrd memory once it's not needed anymore - -commit 71468248567e6bf1e794094d9b5f87ac61de033a -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Nov 9 21:21:17 2005 +0000 - - added logic to free up initrd memory once it's not needed anymore - -commit f947ecffc4a9109d0790e5b2853e2a835b4cf81b -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Nov 4 18:29:25 2005 +0000 - - fixed a syntax bug in locale setting - -commit 826e8af03cdfc3edec0dfc382a4f4308748a08f7 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Nov 4 09:50:36 2005 +0000 - - added support for encrypted root filesystems through the initrd - -commit e00744e1d385f80f44618baea869136dcf64c88c -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Nov 4 01:44:56 2005 +0000 - - dm changes - -commit 3f2fb1767eb2c8167a4f78999e431da73b9c8e8d -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Nov 4 00:54:22 2005 +0000 - - makedevs helper script -- not added to package yet - -commit c8a4f09b7943a7fe9a875d9fc7af7decd29db6a2 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Oct 22 21:23:47 2005 +0000 - - added patch for wpa_supplicant support - -commit f22d7a53b09ad0e28911117412c1cd0ab5c7bb68 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Oct 21 23:35:39 2005 +0000 - - upgpkg: initscripts 0.7.1 - -commit fa6d682d8bb1d95525e9f6540917446ad1247ea6 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Oct 12 16:53:43 2005 +0000 - - another quick fix for netcfg stuff (no rebuild yet) - -commit 14886e1bf20897e2efbc677d6bd1846db0201cbb -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Oct 6 17:00:31 2005 +0000 - - added WIFI_WAIT parameter (no rebuild yet) - -commit 79142a38d91eaf27a6c677e0a6511f855e57e30d -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Oct 3 17:58:51 2005 +0000 - - added ability to use the netcfg menu from the NET env var - -commit 39f5db6e89fd04da3979c11c3b2761ea031cd94d -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Sep 29 07:22:25 2005 +0000 - - added tpowa's fix for locale stuff - -commit e772aeae76f2ad704a834dc17df02dbc137a6573 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Sep 15 20:05:07 2005 +0000 - - modified netcfg/network scripts -- you can list multiple entries in NET_PROFILES that use the same INTERFACE. They will be started one at a time, and the first successful one will be kept. - -commit 0be8f5b2d33fc6160e2a62d33fc1f828218fa90a -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Jul 18 19:17:14 2005 +0000 - - fixed netcfg to remove stale dhcpcd .pid files (#2973) - -commit 00945333dc1dd08d893a6c42f395e7d3c81dad0d -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Jul 6 05:15:37 2005 +0000 - - fixed a netcfg bug where disabled profiles were being started - -commit 0fa1f0eeb3422ba0e84a346a20437172f26859da -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jul 1 02:54:50 2005 +0000 - - fixed a --stopall bug in netcfg - -commit a440a006d7dc42ad072b13986f1f737e8f7e1719 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jul 1 00:13:38 2005 +0000 - - fixed some spacing in rc.multi -- cosmetic - -commit 863e8311cfc2ec7dc98fdb43abaa8499dd3414a4 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Jun 30 23:57:54 2005 +0000 - - added new netcfg stuff for roaming network profiles - -commit 47ca58301f0bf0680baf59465202c4209b1ac112 -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Jun 5 20:30:12 2005 +0000 - - rc.sysinit now sets the NIS domain name, if configured. Also fixed a /var/locks typo - -commit 0ad54a5ba99d95c9b5dfe02f567e1f349de6a720 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Jun 1 17:36:42 2005 +0000 - - added -q switch to sysctl - -commit b5d692b639b9e4a47cd6ba920b91a6d2ff50dc3d -Author: Judd Vinet <judd@archlinux.org> -Date: Tue May 31 18:31:01 2005 +0000 - - moved usb setup above the Loading Modules stage, so sane and other usb things will work correctly (#2770) - -commit cc6648d06dba085b903db820ad581dd94eb669ef -Author: Judd Vinet <judd@archlinux.org> -Date: Sun May 22 17:40:33 2005 +0000 - - added sysctl call from rc.sysinit - -commit 41e115b5973f6498ce4bfce6fe772b8d0b459700 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Apr 18 06:59:02 2005 +0000 - - added a /proc/modules check before running modprobe, just in case the user is running a non-modular kernel - -commit c4a367e15b1bf0c9814a674c0a55084aa714245a -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Mar 24 18:53:37 2005 +0000 - - added CIFS to netfs script - -commit 8b862a2073ad6fe7303a4dbbe7d7316a60db1147 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Mar 16 17:31:30 2005 +0000 - - updated copyright year in rc.sysinit - -commit 8aff6add70fd50b3febe363a0002098f21e2679b -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Mar 11 20:02:08 2005 +0000 - - added support for backgrounding daemons at startup with a '@' prefix, commented out the ldconfig call at startup, added support for unicode console maps, added a hotplug_ifup() function rc.d/network for hotplug's net.agent to use - -commit 22805e822d4e9fee9c1f4331dee31bccd1db45d2 -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Mar 6 20:08:29 2005 +0000 - - added logic to handle shutdown -F (forcefsck) - -commit 92d43c54f0bd5142a2a844b1910d15c808d86992 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Feb 11 01:21:43 2005 +0000 - - added ethernet bonding support (still untested) - -commit e8a2e4663543d16fcafa4c62c75f42fdab32ff28 -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Jan 2 23:52:40 2005 +0000 - - fixed a typo in the rc.conf comments - -commit 45d3c546ee36b28c6808fb4330669b1c23437c26 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Nov 30 07:33:19 2004 +0000 - - fixed the missing /dev/initctl problem with udev in runlevel 1 - -commit 4c1c59be80c29f73655913ff139717268ff1f50f -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Nov 23 22:58:25 2004 +0000 - - made rc.d/network pay attention to the new conf.d files (dhcpcd and wireless). also modified rc.sysinit to wait til after modules are loaded before attempting to mount /proc/bus/usb. If the user uses hotplug, then the usb host modules may not be loaded yet, but that's okay -- hotplug will mount /proc/bus/usb for them - -commit 2822ea48f2e7609232d4e4b47285d60097de2828 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Sep 28 06:24:03 2004 +0000 - - used depmod -A in rc.sysinit to update module deps - -commit 85c899a1ca88c088aaeb679dc009687670e30ac7 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Sep 24 17:22:34 2004 +0000 - - updated rc.single to pay attention to udev and syslog-ng - -commit 8784d3a487b1613759e871c8f8b4a4530509bdd3 -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Sep 12 19:40:51 2004 +0000 - - added fix for xorg temp directories (bug #1408) - -commit 20dceb289f61b69a98c6377921ee2a009aeefd98 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jul 23 01:03:08 2004 +0000 - - re-mounted / after removing /etc/mtab, so it's written to mtab properly - -commit 9f5d7b15d7b58b7a3d80a8923a2ff1952c90966a -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Jul 21 22:15:59 2004 +0000 - - re-mount /sys and /proc once / is rw so the entries can be written to /etc/mtab - -commit ef0a365fc88fd1b02883dd42e0afb0929fbfa3f4 -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Jul 18 21:28:41 2004 +0000 - - fixed the sysfs problem with 2.4 - -commit 5ef7c1839eed06599d615380dae4447fe43dfb34 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jul 16 03:03:26 2004 +0000 - - modified ifdown to bring a dhcp'd eth0 down even if the .pid file is not found (#756) - -commit 2881e158d80e1203d2fae41ff2ce0f122b132e45 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jul 16 01:03:51 2004 +0000 - - made syslog-ng Arch's new default logger - -commit 3280eeff177ecf79c32213303c9eb320b579d040 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jul 16 00:27:57 2004 +0000 - - updated version header to 0.7, added support for udev and static /dev trees - -commit 2c20f4d5637da88e983b65db9c97373aa79d8a37 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Jul 3 19:40:02 2004 +0000 - - added iflist and rtlist functions and made ifup,ifdown,rtup,rtdown accessible from outside the script - -commit cd0e2c63acc50d080edba54b797f7f1c58da1312 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu May 27 00:30:15 2004 +0000 - - fixed the lvm2 segfault on shutdown - -commit f396331a675e17ef282b56ea228e66383d401400 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed May 19 16:56:48 2004 +0000 - - added sysfs mounting to fix LVM2 segfaults - -commit 446e095bdfb1d4d9c31f729d4169aa4a9f44797f -Author: Judd Vinet <judd@archlinux.org> -Date: Tue May 18 23:40:53 2004 +0000 - - added better LVM handling - -commit e555d5efc43f7e8597dd90482e145f6d1936faf8 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue May 11 21:34:59 2004 +0000 - - added hotplug to the DAEMONS array (disabled by default) - -commit 262af2251dd4675e3664435068d4a96b21ab7d74 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Mar 26 20:01:07 2004 +0000 - - added -h arg to poweroff to park the hard drives - -commit abbe7921517e87dcf3fa61036d26d72bc714257a -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Feb 29 23:09:37 2004 +0000 - - added --ignorelockingfailure during startup vgchange (LVM2) - -commit 0d76f45bffddced00c83b0c06f1be796a780366b -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Feb 29 07:03:00 2004 +0000 - - updated for LVM2 - -commit d9f8f3c07bcf1ab349fa6484980a04ef57c7212c -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Feb 23 03:32:36 2004 +0000 - - added setup commands for LVM2 - -commit d4a5c5ef402ca7315e5429eaccb0748e38b964af -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Feb 19 18:50:09 2004 +0000 - - added cleanups by Leif Askeland - -commit 45ede7cf9dd872c580e9c2a57a00b0350f035371 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Feb 18 19:35:17 2004 +0000 - - updated copyright - -commit b6fab06a33cb0c829731c3123ef35444c6909d72 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Jan 30 18:30:06 2004 +0000 - - added a rc.d/netfs script to mount network-based filesystems from DAEMONS - -commit 4abccbdf439817f1328547f1f22db969fe6d8591 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Jan 10 00:46:13 2004 +0000 - - fixed a kernel 2.6 bug re: console fonts - -commit a7768b2ae842c55413b1dce8a3f19e7c730885fa -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Dec 30 22:42:18 2003 +0000 - - network-based mounts are not mounted til rc.multi runs - -commit 9009002d949745ec8824662680c06cf34040dba8 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Dec 30 22:37:50 2003 +0000 - - removed a debug comment - -commit 4fa550ea84f951b4afe5c2e4af4aad32b7a901f6 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Dec 30 22:23:36 2003 +0000 - - added a cosmetic fix to ifdown() in rc.d/network - -commit e9b62e0418df5ce6db98de36837bab2922154229 -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Dec 21 08:58:37 2003 +0000 - - removed a leftover debugging statement - -commit a71e42c461da1672582143a829654049399616e7 -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Dec 21 00:48:23 2003 +0000 - - upgpkg: initscripts 0.6 - -commit 53ae13821436183990e40cffefa8c9cff4b4f2ae -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Oct 10 22:24:34 2003 +0000 - - fixed the licensing line - -commit 93dd5710cf2273c228135959c22f9e4f33d78477 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Oct 10 01:26:53 2003 +0000 - - added a missing space - -commit 065e944539ec9b527fa163317c0a633c872c809b -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Oct 10 01:16:08 2003 +0000 - - a little formatting improvement - -commit 7f4117b05f9e4730657779ec7d4b3b08ba12616c -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Oct 10 01:10:18 2003 +0000 - - added color to rc messages and fixed bug #168 - -commit be8b6f59470b8779c3d4e10b3045507920931896 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Oct 4 07:41:42 2003 +0000 - - added -x check to /sbin/fsck, so reiserfs users can uninstall e2fsprogs without script errors - -commit 3a161b0240eb8eedcc8affb5e0c5b92d058619d9 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Sep 19 05:16:21 2003 +0000 - - added consolefont setting to rc.conf - -commit 6ea51dec01002c6b392c374fa70a62020edffd84 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Sep 19 04:57:20 2003 +0000 - - added timeout to dhcp startup - -commit 2a48c5bd8db694cfe3a26cc3ef92e36050859b31 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Sep 19 04:29:34 2003 +0000 - - modified network script to not bail out on error - -commit 25223b3c0c1be7d320299af4e31062295694098a -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Aug 25 19:15:49 2003 +0000 - - improved lvm detection/activation - -commit da04ddf1b88b62ad77db29b8efa33649a0871b58 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Jul 12 19:21:26 2003 +0000 - - added a check for lvmtab before activating LVM groups - -commit e39affb13f412f21a93205431c2abc625b4238a4 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Jul 9 02:13:45 2003 +0000 - - removed the conf.d stuff -- conf.d files will be parsed individually by the rc.d scripts to avoid name collisions - -commit d69b11e73a70c9c0ed6cd888ff4ac4eb3e877ec2 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Jun 4 00:22:45 2003 +0000 - - fixed a rc.sysinit bug and moved conf.d parsing to the top of rc.conf - -commit 18c7679d90ca5c1c9508548c35c0a4ea14ca4d6f -Author: Judd Vinet <judd@archlinux.org> -Date: Tue May 27 18:29:39 2003 +0000 - - fixed a small typo - -commit 2e25861ad03003273707fa604522e3390c24f895 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue May 27 17:14:50 2003 +0000 - - moved nfsmount to nfs-utils - -commit ba769985bf38b1eb4e54f0e19d8b3502216646d6 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon May 26 22:22:04 2003 +0000 - - added lvm handling - -commit df91d849d2c19bd070473da49dd8befc7aae978c -Author: Judd Vinet <judd@archlinux.org> -Date: Fri May 23 23:58:57 2003 +0000 - - upgpkg: initscripts 0.5 - -commit ead9f8db5fe817f019512681d5169dffad705357 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu May 8 18:12:46 2003 +0000 - - added -D, -H, and -h to the dhcp line - -commit a85df6abb081d7a7d51b00e7e301d1497fede30a -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Feb 7 17:05:02 2003 +0000 - - updated PKGBUILD release - -commit e4398c2e693441b8844645ee69fd3b7e483b3530 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Feb 7 16:58:42 2003 +0000 - - added the MODULES=() line to rc.conf, with loading in rc.sysinit - -commit f6081f262419c2a4880d372636e391a52e148782 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Jan 7 01:48:51 2003 +0000 - - updated rc.single to shutdown daemons correctly - -commit 6c4a6fc1938f12ee85b4f593de64a8776e5c1ba0 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Jan 6 23:23:41 2003 +0000 - - kill dhcpcd pid files before running the client daemon - -commit 19c04471ce76a3f803fdf47b964880266b529070 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Dec 14 00:13:55 2002 +0000 - - fixed the location of adjtime - -commit 96cb8c51e0ddb57f382c958ebb7808baaa258765 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Dec 12 22:27:36 2002 +0000 - - modified to stat_fail to return a $retval - -commit 81da8c411f590b436e0cffcae9dd4c30598d35b2 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Nov 29 09:06:45 2002 +0000 - - fixed a syntax bug in rc.sysinit - -commit c5f67416f3250e0d16eb2e588fc2b62435727d3c -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Nov 27 00:36:14 2002 +0000 - - fix - -commit 43cda626dbc05e92dffc0027ef19db9d3cc44d37 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Nov 26 23:26:48 2002 +0000 - - added nfsmount (from jk) - -commit c8cd508809408a0be9f1fbeb65775ab7fb083f3b -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Nov 26 18:17:31 2002 +0000 - - Added utf hwclock support (from user patch) - -commit 914b0b3b572a3d5d311682a88424d165589798f1 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Nov 23 20:37:55 2002 +0000 - - added jk's changes: system clock is set earlier on, and modules.dep is only - updated if new modules are present. - -commit dd4248ed74b9adce32910ee95274719249220757 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Aug 28 21:43:10 2002 +0000 - - removed PROFILES array - -commit eb2f42cba2d8134e83321810dcad897cc88e4716 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Aug 24 20:54:22 2002 +0000 - - rc.sysinit removes /var/run/daemons/* on bootup - -commit fd8fde036ab46b593590b362bc94b051e432a295 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Jul 24 02:57:16 2002 +0000 - - Upgraded initscripts to 0.3 - -commit 2b503065569fa2ffedf5eafc76158c74062ac49b -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Jun 11 05:07:54 2002 +0000 - - nada - -commit efa9a6d681b87fa4b8e321173690144b17a08d35 -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Apr 27 21:04:15 2002 +0000 - - Added DHCP handling to initscripts - -commit 30277f5e1ce30a10ed08ae2529282718c86ac826 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Apr 19 17:16:37 2002 +0000 - - *** empty log message *** - -commit f7a1c1ba6c35069ed6086e41146471fe97856325 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Apr 19 17:15:35 2002 +0000 - - *** empty log message *** - -commit 3a3db1e368443447d7eaec461110bb122d026d83 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Apr 19 17:13:21 2002 +0000 - - Cleaned up networking in initscripts - -commit cd5a839558fa3e5b10423fa33e621be2f27acf12 -Author: Judd Vinet <judd@archlinux.org> -Date: Fri Apr 19 07:28:04 2002 +0000 - - Updated for /etc/profile.d - -commit f5e0fa814e1f31279509645a25057dcefa5eaadc -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Apr 16 03:59:06 2002 +0000 - - Updated network rc script with jproctor's disable-eth changes - -commit 8bc78f134bf719b16a3b3b2a7cea947fbf526e3b -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Apr 15 16:45:38 2002 +0000 - - Added arch-release to filesystem - Fixed initscripts (again) - -commit b840b6f59bfa39bceb663ad1b40f4c0ff5984366 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Apr 15 07:00:55 2002 +0000 - - *** empty log message *** - -commit 9a59bb9539dacac884b9c3b0088e22ba762f2b9b -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Apr 15 06:53:10 2002 +0000 - - Updated initscripts - -commit 2f4936aec49df2c681ae0862103cee8376c5ab57 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Apr 15 06:47:05 2002 +0000 - - Bugfix for initscripts - -commit 5b61b6c2bf49d75df992a4dc39757e66a536dbcd -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Apr 15 06:41:16 2002 +0000 - - Updated initscripts for multiple ethernet interfaces - -commit 91fd2beff99c9e623a201c8221964353c8669044 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Apr 11 05:06:15 2002 +0000 - - Updated installer script - Added package dhcpcd - Took ash job control out of busybox for bootdisk - -commit 2cb34b31712bf72ae6c30e5029572463152a082f -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Mar 24 08:50:48 2002 +0000 - - Fixed a runlevel bug in initscripts - -commit 65405267704892a9bcb42186c95adcf4566cbf8c -Author: Judd Vinet <judd@archlinux.org> -Date: Sun Mar 24 08:40:40 2002 +0000 - - Added rc.d network script to initscripts - -commit eea6fee11ad792708d6b8fbf0cb5b42b00ea1c91 -Author: Judd Vinet <judd@archlinux.org> -Date: Thu Mar 14 08:34:49 2002 +0000 - - Removed all filelist files from repository - -commit 57d51e9a853fc21be0e733253ac56f2d9756d3a7 -Author: Judd Vinet <judd@archlinux.org> -Date: Wed Mar 13 08:05:47 2002 +0000 - - Updated inittab for X11 - -commit d0ea35d522f7e68b198afe01bf369463af56259f -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Mar 12 05:37:01 2002 +0000 - - Rebuild package pcmcia-cs for 2.4.18 - Tweaked initscripts/filesystem - Added doc/install.txt and misc/cdboot/etc/issue and scripts/makerelease - -commit 14e3f9480a7364200b999477fa4ab9da16884831 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Mar 11 00:58:34 2002 +0000 - - Removed rc.proto, updated rc.single - -commit 325b46a6b02aee695658eafe6b714d0e02810e1a -Author: Judd Vinet <judd@archlinux.org> -Date: Sat Mar 9 10:07:16 2002 +0000 - - Added some rudimentary networking stuff - -commit 897380f9b8071b8df0dcdb85cc9e1424640762b9 -Author: Judd Vinet <judd@archlinux.org> -Date: Tue Mar 5 04:59:03 2002 +0000 - - Changed name to Arch Linux - -commit 98c76a453222169f12b0e95f8a7ed0175e182598 -Author: Judd Vinet <judd@archlinux.org> -Date: Mon Mar 4 07:28:25 2002 +0000 - - Initial revision diff --git a/initscripts-git/PKGBUILD b/initscripts-git/PKGBUILD deleted file mode 100644 index b5c9b49..0000000 --- a/initscripts-git/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -# Maintainer: Thomas Baechler <thomas@archlinux.org> -# Maintainer: Aaron Griffin <aaron@archlinux.org> - -pkgname=initscripts-git -pkgver=20090905 -pkgrel=1 -pkgdesc="System initialization/bootup scripts - GIT version" -arch=('i686' 'x86_64') -url="http://www.archlinux.org" -license=('GPL') -groups=('base') -conflicts=(initscripts) -provides=(initscripts) -backup=(etc/inittab etc/rc.conf etc/rc.local etc/rc.local.shutdown) -depends=('glibc' 'bash' 'awk' 'grep' 'coreutils' 'sed' 'udev>=139-1' - 'net-tools' 'ncurses' 'kbd' 'findutils' 'sysvinit') -optdepends=('bridge-utils: Network bridging support' - 'dhcpcd: DHCP network configuration' - 'wireless_tools: Wireless networking') -makedepends=(git) -source=() -_gitroot="git://git.server-speed.net/~flo/git/initscripts.git" -_gitname="initscripts" - -build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [ -d $_gitname ] ; then - cd $_gitname && git pull origin - msg "The local files are updated." - else - git clone $_gitroot - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - rm -rf "$srcdir/$_gitname-build" - git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" - - DESTDIR=$pkgdir ./install.sh -} diff --git a/iron/LICENSE b/iron/LICENSE deleted file mode 100644 index 9314092..0000000 --- a/iron/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/iron/PKGBUILD b/iron/PKGBUILD deleted file mode 100644 index 9109707..0000000 --- a/iron/PKGBUILD +++ /dev/null @@ -1,48 +0,0 @@ -# Maintainer: xduugu -pkgname=iron -pkgver=4.0.275.2 -pkgrel=3 -pkgdesc="A web browser based on chromium without Google's tracking 'features'" -arch=('i686' 'x86_64') -url="http://www.srware.net/en/software_srware_iron.php" -license=('custom:BSD') -depends=('alsa-lib' 'libjpeg6' 'libpng12' 'nss' 'ttf-dejavu') -provides=("chromium=$pkgver") -install=$pkgname.install -source=(http://www.srware.net/downloads/$pkgname-linux.tar.gz - $pkgname{.desktop,.png,.sh} LICENSE) -md5sums=('25d8756de52092b83108ac29e70c635f' - '22123a1dd05575b0edfdebdae61018fe' - '60df76c38381e46577505b0c61cea017' - '6ec430e5597388492b413b152c9587ac' - '30032c6c531632af6547fa360395acd3') -sha256sums=('8083cd82964890fc128e75a0e0be2de2e4e689a20fad25606eba0e65da35ef36' - 'd45acaf8cc76f13f3274e2915a499e321efb59d5ff4f75425b9089cafeb18fd2' - '77c29198ff3079f4be5469023a5317c18dd7ef9ce34efd3ae4ca0be09d5de285' - '746148eba30c710dd2ad091afae102bf609501ebbdf8e2633cc88f2fe5262189' - 'ec68693372a025d4cba5214a0b97c66ae62025c80cc34ef6c01c92b32bd0f2d6') - -# x86_64 source -if [[ $CARCH == x86_64 ]]; then - source[0]=${source[0]/.tar./-64.tar.} - md5sums[0]='cb8f8f037fc51595965c6fc5e1073429' - sha256sums[0]='c4dc670eb67030eeba1efad09514570a88f78d03321ee093e3ba96331d63b88f' -fi - -build() { - install -Dm755 $pkgname.sh "$pkgdir/usr/bin/$pkgname" && - install -d "$pkgdir/opt" && - mv $(echo ${source[0]##*/} | sed 's/\..*//') "$pkgdir/opt/$pkgname" && - cd "$pkgdir/opt/$pkgname" && - rm -f product_logo_48.png README xdg-settings && - ln -s /lib/libBrokenLocale.so.1 libgconf-2.so.4 && - chmod a=r,u+w,a+X -R . && - chmod a+x $pkgname chrome_sandbox libffmpegsumo.so && - cd $OLDPWD || return 1 - - install -Dm644 $pkgname.png "$pkgdir/usr/share/pixmaps/$pkgname.png" && - install -Dm644 $pkgname.desktop "$pkgdir/usr/share/applications/$pkgname.desktop" && - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1 -} - -# vim:set ts=2 sw=2 et: diff --git a/iron/iron.desktop b/iron/iron.desktop deleted file mode 100644 index 4454877..0000000 --- a/iron/iron.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=Iron Web Browser -Comment=Browse the World Wide Web -Icon=iron -Exec=iron -Terminal=false -Type=Application -Categories=Network; -StartupWMClass=Iron diff --git a/iron/iron.install b/iron/iron.install deleted file mode 100644 index 9f27e05..0000000 --- a/iron/iron.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - [ -x /usr/bin/update-desktop-database ] || return 0 - update-desktop-database -q -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} - -# vim:set ts=2 sw=2 et: diff --git a/iron/iron.png b/iron/iron.png Binary files differdeleted file mode 100644 index 73e5d7a..0000000 --- a/iron/iron.png +++ /dev/null diff --git a/iron/iron.sh b/iron/iron.sh deleted file mode 100644 index f4da2c1..0000000 --- a/iron/iron.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -LD_LIBRARY_PATH="/usr/lib:/opt/iron" /opt/iron/iron "$@" diff --git a/iron/libjpeg.so.62-i686.xz b/iron/libjpeg.so.62-i686.xz Binary files differdeleted file mode 100644 index b836fd1..0000000 --- a/iron/libjpeg.so.62-i686.xz +++ /dev/null diff --git a/iron/libjpeg.so.62-x86_64.xz b/iron/libjpeg.so.62-x86_64.xz Binary files differdeleted file mode 100644 index b7bfb30..0000000 --- a/iron/libjpeg.so.62-x86_64.xz +++ /dev/null diff --git a/ix/PKGBUILD b/ix/PKGBUILD deleted file mode 100644 index 67a80fd..0000000 --- a/ix/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> -pkgname=ix -pkgver=0.4 -pkgrel=1 -pkgdesc="client for the ix.io pastebin" -arch=('any') -url="http://ix.io" -license=('NONE') -depends=('python') -source=(http://ix.io/client) - -build() { - cd "$srcdir" - install -D -m755 client $pkgdir/usr/bin/ix -} - -# vim:set ts=2 sw=2 et: -md5sums=('919431495c143cb810e76d650aa5e38d') -sha256sums=('8968db5c486a12c00257190f07659f7fbd9ab8d9c6c4e49c66c12d5605849a24') diff --git a/ix/client b/ix/client deleted file mode 100644 index 1ba4da8..0000000 --- a/ix/client +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env python -''' -[cat |] %prog [-g id | -d id | [-i id1 file1 .. -i idN fileN] file1 .. fileN] -''' - -__version__ = '0.4' - -''' -changes: 0.3 - -i more intuitive (-i ID FILE instead of -i ID FILENUMBER) - prompt for filename and extension when interactive - support multiple -g - support multiple -d -''' - -import netrc, os, sys - -def auth(): - ''' netrc: machine ix.io login USERNAME password TOKEN ''' - try: - creds = netrc.netrc().authenticators('ix.io') - except: - return [] - if not creds: - return [] - return [('login', creds[0]), ('token', creds[2])] - -def mkreq(files, data=[], i=0): - for filename in files: - if filename is sys.stdin: - fname, ext = '', '' - if os.isatty(sys.stdin.fileno()): - fname = raw_input('filename: ').strip() - ext = raw_input('extension: ').strip() - if ext and not ext.startswith('.'): - ext = '.%s' % ext - print '^C to exit, ^D to send' - try: - contents = sys.stdin.read() - except KeyboardInterrupt: - sys.exit() - if not contents: - sys.exit() - elif os.path.exists(filename): - contents = open(filename).read() - filename, ext = os.path.splitext(filename) - fname = os.path.basename(filename) - else: - continue - i += 1 - data.append(('f:%d' % i, contents)) - data.append(('name:%d' % i, fname)) - data.append(('ext:%d' % i, ext)) - return data - -if __name__ == '__main__': - from optparse import OptionParser - from urllib import urlencode - from urllib2 import urlopen - parser = OptionParser(version=__version__, - usage=__doc__, - description=auth.__doc__) - parser.add_option('-g', '--get', action='append', - help='get paste identified by ID') - parser.add_option('-d', '--delete', action='append', - help='delete paste identified by ID') - parser.add_option('-i', '--id', action='append', nargs=2, - help='two params: ID, FILE. replace paste ID with FILE' + - '. Use - if FILE is STDIN') - opts, args = parser.parse_args() - - - if opts.get: - for i, get in enumerate(opts.get): - print urlopen('http://ix.io/%s' % (get)).read().strip() - if i < len(opts.get)-1: - print '-' * 79 - else: - data = auth() - if opts.id: - for (idno, filename) in opts.id: - if filename == '-': - args.append(sys.stdin) - data.append(('id:%d' % len(args), idno)) - elif os.path.exists(filename): - args.append(filename) - data.append(('id:%d' % len(args), idno)) - if opts.delete: - for i in opts.delete: - data.append(('rm', i)) - elif not args: - args = [sys.stdin] - data.extend(mkreq(args)) - print urlopen('http://ix.io', urlencode(data)).read().strip() diff --git a/lib32-libusb/PKGBUILD b/lib32-libusb/PKGBUILD deleted file mode 100644 index 76396f9..0000000 --- a/lib32-libusb/PKGBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Maintainer: PyroPeter <googlemail.com@abi1789> -# Contributor: Florian Pritz <flo@xssn.at> - -_pkgbasename=libusb -pkgname=lib32-$_pkgbasename -pkgver=1.0.8 -pkgrel=1 -pkgdesc="Library to enable user space application programs to communicate with USB devices (32-bit)" -arch=(x86_64) -depends=('gcc-libs-multilib' $_pkgbasename) -makedepends=(gcc-multilib) -replaces=('lib32-libusb1') -url="http://libusb.sourceforge.net/" -license=('LGPL') -options=('!libtool') -source=("http://downloads.sourceforge.net/$_pkgbasename/$_pkgbasename-$pkgver.tar.bz2") -md5sums=('37d34e6eaa69a4b645a19ff4ca63ceef') - -build() { - export CC="gcc -m32" - export CXX="g++ -m32" - export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" - - cd "$srcdir/$_pkgbasename-$pkgver" - ./configure --prefix=/usr --libdir=/usr/lib32 - make -} - -package() { - cd "$srcdir/$_pkgbasename-$pkgver" - - make DESTDIR="$pkgdir" install - rm -rf "${pkgdir}"/usr/{include,share,bin} -} diff --git a/libcaca/PKGBUILD b/libcaca/PKGBUILD deleted file mode 100644 index f589ca3..0000000 --- a/libcaca/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# $Id: PKGBUILD 9776 2008-08-19 00:46:51Z eric $ -# Maintainer: Jan de Groot <jgc@archlinux.org> - -pkgname=libcaca -pkgver=0.9 -pkgrel=2 -pkgdesc="Color AsCii Art library" -arch=('i686' 'x86_64') -license=('LGPL') -url="http://libcaca.zoy.org/" -depends=('freetype2' 'imlib2' 'ncurses>=5.6-7') -source=(http://libcaca.zoy.org/files/libcaca/${pkgname}-${pkgver}.tar.gz) - -build() { - cd ${startdir}/src/${pkgname}-${pkgver} - ./configure --prefix=/usr --mandir=/usr/share/man --enable-shared --disable-doc - make || return 1 - make DESTDIR=${startdir}/pkg install -} -md5sums=('97b0f526f39491389e159055f574c921') -sha256sums=('5e489dfdf787da78c1a8700d75f29760ba2428af82b0c84c0ccc7918550571ca') diff --git a/libjpeg6/PKGBUILD b/libjpeg6/PKGBUILD deleted file mode 100644 index 6a24d66..0000000 --- a/libjpeg6/PKGBUILD +++ /dev/null @@ -1,43 +0,0 @@ -# Contributor: Mikael Eriksson <mikael_eriksson@miffe.org> -# Resurected from svn, originaly by -# Maintainer: Allan McRae <allan@archlinux.org> -# Committer: Judd Vinet <jvinet@zeroflux.org> - -pkgname=libjpeg6 -pkgver=6b -pkgrel=9 -pkgdesc="Library of JPEG support functions" -arch=('i686' 'x86_64') -url="http://www.ijg.org/" -license=('custom') -depends=('glibc') -makedepends=('libtool') -options=(!libtool) -source=("ftp://ftp.debian.org/debian/pool/main/libj/libjpeg6b/libjpeg6b_6b.orig.tar.gz" - "locale-fixes.patch") -md5sums=('dbd5f3b47ed13132f04c685d608a7547' - 'a0910de4ba7bb7526032d86bb0297de4') - -build() { - cd $srcdir/jpeg-$pkgver - cp /usr/share/libtool/config/config.{guess,sub} . - sed -i "s#./libtool#libtool#" configure - patch -p1 -i "$srcdir/locale-fixes.patch" - ./configure --prefix=/usr --enable-shared --enable-static - make LIBTOOL="libtool --tag=CC" || return 1 - mkdir -p $pkgdir/usr/{bin,lib,include,share/man/man1} - make prefix=$pkgdir/usr mandir=$pkgdir/usr/share/man/man1 install - install -m644 jpegint.h $pkgdir/usr/include - install -Dm644 README $pkgdir/usr/share/licenses/libjpeg6/README - # Fix /usr/bin - for fn in $pkgdir/usr/bin/*; do mv $fn ${fn}6; done - # Fix /usr/lib - rm $pkgdir/usr/lib/libjpeg.{a,so} - # Fix /usr/share/man - for fn in $pkgdir/usr/share/man/man1/*; do mv $fn ${fn%.1}6.1; done - # Fix /usr/include - mkdir -p $pkgdir/usr/include/libjpeg6 - mv $pkgdir/usr/include/*.h $pkgdir/usr/include/libjpeg6 -} - -# vim:set ts=2 sw=2 et: diff --git a/libjpeg6/locale-fixes.patch b/libjpeg6/locale-fixes.patch deleted file mode 100644 index 3bc3364..0000000 --- a/libjpeg6/locale-fixes.patch +++ /dev/null @@ -1,41 +0,0 @@ -The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in -option parsing, it may break. - -http://bugs.gentoo.org/103483 - ---- jpeg/configure -+++ jpeg/configure -@@ -54,6 +54,16 @@ - infodir='${prefix}/info' - mandir='${prefix}/man' - -+# NLS nuisances. -+# Only set these to C if already set. These must not be set unconditionally -+# because not all systems understand e.g. LANG=C (notably SCO). -+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -+# Non-C LC_CTYPE values break the ctype check. -+if test "${LANG+set}" = set; then LANG=C; export LANG; fi -+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -+ - # Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= -@@ -452,16 +463,6 @@ - esac - done - --# NLS nuisances. --# Only set these to C if already set. These must not be set unconditionally --# because not all systems understand e.g. LANG=C (notably SCO). --# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! --# Non-C LC_CTYPE values break the ctype check. --if test "${LANG+set}" = set; then LANG=C; export LANG; fi --if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi --if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi --if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -- - # confdefs.h avoids OS command line length limits that DEFS can exceed. - rm -rf conftest* confdefs.h - # AIX cpp loses on an empty file, so make sure it contains at least a newline. diff --git a/libmediainfo/PKGBUILD b/libmediainfo/PKGBUILD deleted file mode 100644 index 1a652f6..0000000 --- a/libmediainfo/PKGBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Maintainer: hydro <hydro@freenet.de> - -pkgname=libmediainfo -pkgver=0.7.34 -pkgrel=1 -pkgdesc="shared library for mediainfo" -arch=('i686' 'x86_64') -url="http://mediainfo.sourceforge.net" -license=('GPL') -depends=( 'curl' 'libmms>=0.5-2' 'libzen>=0.4.15') -makedepends=('libtool' 'automake' 'autoconf') -options=(!libtool) -source=(http://downloads.sourceforge.net/mediainfo/${pkgname}_${pkgver}.tar.bz2) -md5sums=('e4884e71667c7ab817755cdef9888f7d') - -build() { - cd $srcdir/MediaInfoLib/Project/GNU/Library - chmod +x autogen - ./autogen - ./configure --prefix=/usr --enable-shared --disable-static --with-libcurl --with-libmms - make clean - make || return 1 - make DESTDIR=$pkgdir install || return 1 - - for i in MediaInfo MediaInfoDLL; do - install -dm 755 $pkgdir/usr/include/$i - install -m 644 $srcdir/MediaInfoLib/Source/$i/*.h $pkgdir/usr/include/$i - done - - install -dm 755 $pkgdir/usr/lib/pkgconfig - install -m 644 $srcdir/MediaInfoLib/Project/GNU/Library/libmediainfo.pc $pkgdir/usr/lib/pkgconfig - sed -i -e 's|Version: |Version: '$pkgver'|g' $pkgdir/usr/lib/pkgconfig/libmediainfo.pc - -} diff --git a/libmilter/PKGBUILD b/libmilter/PKGBUILD deleted file mode 100644 index 2827b3c..0000000 --- a/libmilter/PKGBUILD +++ /dev/null @@ -1,18 +0,0 @@ -pkgname=libmilter -pkgver=8.14.3 -pkgrel=2 -pkgdesc="libmilter" -arch=(i686 x86_64) -url="http://www.postfix.org/MILTER_README.html" -license=('Sendmail open source license') -depends=() -conflicts=() -source="ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.14.3.tar.gz" -md5sums=('a5ee5d26e1f546a2da5fb9a513bd6bce') - -build(){ - cd ${startdir}/src/sendmail-${pkgver}/libmilter - mkdir -p ${startdir}/pkg/usr/lib - make || return 1 - make DESTDIR=${startdir}/pkg install || return 1 -} diff --git a/liboping/PKGBUILD b/liboping/PKGBUILD deleted file mode 100644 index c296480..0000000 --- a/liboping/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -pkgname=liboping -pkgver=1.3.4 -pkgrel=1 -pkgdesc='A C library to generate ICMP echo requests, better known as "ping packets"' -arch=('i686' 'x86_64') -url="http://verplant.org/$pkgname/" -license=('GPL') -depends=('glibc') -options=('!libtool') -source=($url/files/$pkgname-$pkgver.tar.bz2) -md5sums=('208e185f75f9f8ac96e508bd9e17ef61') - -build() { - cd $pkgname-$pkgver - - ./configure --prefix=/usr - make || return 1 - make DESTDIR="$pkgdir" install - - rm -f "$pkgdir"/usr/lib/perl5/core_perl/perllocal.pod -} diff --git a/libowfat/PKGBUILD b/libowfat/PKGBUILD deleted file mode 100644 index 6b3dffe..0000000 --- a/libowfat/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Contributor: Alexander Ulrich <a.ulrich@student.uni-tuebingen.de> -# Update: Mildred <silkensedai@online.fr> -# Update: henning mueller <henning@orgizm.net> -pkgname=libowfat -pkgver=0.28 -pkgrel=1 -pkgdesc="GPL reimplementation of libdjb" -arch=(i686 x86_64) -url=http://www.fefe.de/libowfat/ -license=(GPL) -install=libowfat.install -source=(http://dl.fefe.de/$pkgname-$pkgver.tar.bz2) -md5sums=(6bbee9a86506419657d87123b7a6f2c1) - -build() { - cd $startdir/src/$pkgname-$pkgver/ - make DIET= || return 1 - make prefix=$startdir/pkg/usr/ LIBDIR=$startdir/pkg/usr/lib install - cd $startdir/pkg/usr/man/man3 - mv buffer.3 buffer-libowfat.3 -} diff --git a/libowfat/libowfat.install b/libowfat/libowfat.install deleted file mode 100644 index a08aef1..0000000 --- a/libowfat/libowfat.install +++ /dev/null @@ -1,39 +0,0 @@ -# This is a default template for a post-install scriptlet. You can -# remove any functions you don't need (and this header). - -# arg 1: the new package version -pre_install() { - /bin/true -} - -# arg 1: the new package version -post_install() { - echo "The manpage buffer(3) was moved to buffer-libowfat(3) because - it conflicts with package openssl" -} - -# arg 1: the new package version -# arg 2: the old package version -pre_upgrade() { - /bin/true -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - /bin/true -} - -# arg 1: the old package version -pre_remove() { - /bin/true -} - -# arg 1: the old package version -post_remove() { - /bin/true -} - -op=$1 -shift -$op $* diff --git a/libpng12/PKGBUILD b/libpng12/PKGBUILD deleted file mode 100644 index fb90e3b..0000000 --- a/libpng12/PKGBUILD +++ /dev/null @@ -1,47 +0,0 @@ -# $Id: PKGBUILD 58551 2009-11-08 22:37:12Z eric $ -# Contributor: dorphell <archlinux.org: dorphell> -# Contributor: Travis Willard <archlinux.org: travis> -# Contributor: Douglas Soares de Andrade <archlinux.org: douglas> -# Maintaoner: Jesse Jaara <gmail.com, mail.ru: jesse.jaara> - -pkgname=libpng12 -_realname=libpng -pkgver=1.2.46 -pkgrel=2 -pkgdesc="A collection of routines used to create PNG format graphics files" -arch=('i686' 'x86_64') -url="http://www.libpng.org/pub/png/libpng.html" -license=('custom') -depends=('zlib') -options=('!libtool') -source=("http://sourceforge.net/projects/libpng/files/libpng12/${pkgver}/libpng-${pkgver}.tar.xz" - "http://sourceforge.net/projects/apng/files/libpng/libpng12/libpng-${pkgver}-apng.patch.gz") - -build() { - cd "${srcdir}/${_realname}-${pkgver}" - - patch -Np0 -i "${srcdir}/libpng-${pkgver}-apng.patch" - - libtoolize --force --copy - aclocal - autoconf - automake --add-missing - - ./configure --prefix=/usr - - make ECHO=echo -} - -package() { - cd "${srcdir}/${_realname}-${pkgver}" - - make ECHO=echo DESTDIR="${pkgdir}" install - - rm -rf "${pkgdir}/usr/share" - rm -rf "${pkgdir}/usr/bin/libpng-config" - rm -rf "${pkgdir}/usr/lib/"{libpng.so,libpng.a} - rm -fr "${pkgdir}/usr/lib/pkgconfig/libpng.pc" - rm -rf "${pkgdir}/usr/include/"{pngconf.h,png.h} -} -md5sums=('4a0a9662710dab35760ab8ecd6835e65' - '13b019dac361f88faed8989f0c6d5f04') diff --git a/libpng12/libpng-1.2.43-apng.patch b/libpng12/libpng-1.2.43-apng.patch deleted file mode 100644 index 00b1c24..0000000 --- a/libpng12/libpng-1.2.43-apng.patch +++ /dev/null @@ -1,1653 +0,0 @@ -Index: pngread.c
-===================================================================
---- pngread.c
-+++ pngread.c
-@@ -437,6 +437,11 @@
- #ifdef PNG_READ_zTXt_SUPPORTED
- PNG_CONST PNG_zTXt;
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_acTL;
-+ PNG_CONST PNG_fcTL;
-+ PNG_CONST PNG_fdAT;
-+#endif
- #endif /* PNG_USE_LOCAL_ARRAYS */
- png_uint_32 length = png_read_chunk_header(png_ptr);
- PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;
-@@ -481,6 +486,9 @@
- !(png_ptr->mode & PNG_HAVE_PLTE))
- png_error(png_ptr, "Missing PLTE before IDAT");
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_have_info(png_ptr, info_ptr);
-+#endif
- png_ptr->idat_size = length;
- png_ptr->mode |= PNG_HAVE_IDAT;
- break;
-@@ -553,12 +561,97 @@
- else if (!png_memcmp(chunk_name, png_iTXt, 4))
- png_handle_iTXt(png_ptr, info_ptr, length);
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ else if (!png_memcmp(chunk_name, png_acTL, 4))
-+ png_handle_acTL(png_ptr, info_ptr, length);
-+ else if (!png_memcmp(chunk_name, png_fcTL, 4))
-+ png_handle_fcTL(png_ptr, info_ptr, length);
-+ else if (!png_memcmp(chunk_name, png_fdAT, 4))
-+ png_handle_fdAT(png_ptr, info_ptr, length);
-+#endif
- else
- png_handle_unknown(png_ptr, info_ptr, length);
- }
- }
- #endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+void PNGAPI
-+png_read_frame_head(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_byte have_chunk_after_DAT; /* after IDAT or after fdAT */
-+
-+ png_debug(0, "Reading frame head");
-+
-+ if (!(png_ptr->mode & PNG_HAVE_acTL))
-+ png_error(png_ptr, "attempt to png_read_frame_head() but "
-+ "no acTL present");
-+
-+ /* do nothing for the main IDAT */
-+ if (png_ptr->num_frames_read == 0)
-+ return;
-+
-+ png_crc_finish(png_ptr, 0); /* CRC from last IDAT or fdAT chunk */
-+
-+ png_read_reset(png_ptr);
-+ png_ptr->mode &= ~PNG_HAVE_fcTL;
-+
-+ have_chunk_after_DAT = 0;
-+ for (;;)
-+ {
-+#ifdef PNG_USE_LOCAL_ARRAYS
-+ PNG_IDAT;
-+ PNG_fdAT;
-+ PNG_fcTL;
-+#endif
-+ png_byte chunk_length[4];
-+ png_uint_32 length;
-+
-+ png_read_data(png_ptr, chunk_length, 4);
-+ length = png_get_uint_31(png_ptr, chunk_length);
-+
-+ png_reset_crc(png_ptr);
-+ png_crc_read(png_ptr, png_ptr->chunk_name, 4);
-+
-+ if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-+ {
-+ /* discard trailing IDATs for the first frame */
-+ if (have_chunk_after_DAT || png_ptr->num_frames_read > 1)
-+ png_error(png_ptr, "png_read_frame_head(): out of place IDAT");
-+ png_crc_finish(png_ptr, length);
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fcTL, 4))
-+ {
-+ png_handle_fcTL(png_ptr, info_ptr, length);
-+ have_chunk_after_DAT = 1;
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fdAT, 4))
-+ {
-+ png_ensure_sequence_number(png_ptr, length);
-+
-+ /* discard trailing fdATs for frames other than the first */
-+ if (!have_chunk_after_DAT && png_ptr->num_frames_read > 1)
-+ png_crc_finish(png_ptr, length - 4);
-+ else if(png_ptr->mode & PNG_HAVE_fcTL)
-+ {
-+ png_ptr->idat_size = length - 4;
-+ png_ptr->mode |= PNG_HAVE_IDAT;
-+
-+ break;
-+ }
-+ else
-+ png_error(png_ptr, "png_read_frame_head(): out of place fdAT");
-+ }
-+ else
-+ {
-+ png_warning(png_ptr, "Skipped (ignored) a chunk "
-+ "between APNG chunks");
-+ png_crc_finish(png_ptr, length);
-+ }
-+ }
-+}
-+#endif /* PNG_READ_APNG_SUPPORTED */
-+
- /* Optional call to update the users info_ptr structure */
- void PNGAPI
- png_read_update_info(png_structp png_ptr, png_infop info_ptr)
-@@ -599,6 +692,10 @@
- png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
- {
- PNG_CONST PNG_IDAT;
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_fdAT;
-+ PNG_CONST PNG_IEND;
-+#endif
- PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55,
- 0xff};
- PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
-@@ -734,13 +831,39 @@
- {
- if (!(png_ptr->zstream.avail_in))
- {
-- while (!png_ptr->idat_size)
-+ png_uint_32 bytes_to_skip = 0;
-+
-+ while (!png_ptr->idat_size || bytes_to_skip != 0)
- {
-- png_crc_finish(png_ptr, 0);
-+ png_crc_finish(png_ptr, bytes_to_skip);
-+ bytes_to_skip = 0;
-
- png_ptr->idat_size = png_read_chunk_header(png_ptr);
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_ptr->num_frames_read == 0)
-+ {
-+#endif
- if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
- png_error(png_ptr, "Not enough image data");
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ }
-+ else
-+ {
-+ if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
-+ png_error(png_ptr, "Not enough image data");
-+ if (png_memcmp(png_ptr->chunk_name, png_fdAT, 4))
-+ {
-+ png_warning(png_ptr, "Skipped (ignored) a chunk "
-+ "between APNG chunks");
-+ bytes_to_skip = png_ptr->idat_size;
-+ continue;
-+ }
-+
-+ png_ensure_sequence_number(png_ptr, png_ptr->idat_size);
-+
-+ png_ptr->idat_size -= 4;
-+ }
-+#endif
- }
- png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size;
- png_ptr->zstream.next_in = png_ptr->zbuf;
-@@ -758,6 +881,9 @@
- png_error(png_ptr, "Extra compressed data");
- png_ptr->mode |= PNG_AFTER_IDAT;
- png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_ptr->num_frames_read++;
-+#endif
- break;
- }
- if (ret != Z_OK)
-@@ -1015,6 +1141,11 @@
- #ifdef PNG_READ_zTXt_SUPPORTED
- PNG_CONST PNG_zTXt;
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_acTL;
-+ PNG_CONST PNG_fcTL;
-+ PNG_CONST PNG_fdAT;
-+#endif
- #endif /* PNG_USE_LOCAL_ARRAYS */
- png_uint_32 length = png_read_chunk_header(png_ptr);
- PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;
-@@ -1115,6 +1246,14 @@
- else if (!png_memcmp(chunk_name, png_iTXt, 4))
- png_handle_iTXt(png_ptr, info_ptr, length);
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ else if (!png_memcmp(chunk_name, png_acTL, 4))
-+ png_handle_acTL(png_ptr, info_ptr, length);
-+ else if (!png_memcmp(chunk_name, png_fcTL, 4))
-+ png_handle_fcTL(png_ptr, info_ptr, length);
-+ else if (!png_memcmp(chunk_name, png_fdAT, 4))
-+ png_handle_fdAT(png_ptr, info_ptr, length);
-+#endif
- else
- png_handle_unknown(png_ptr, info_ptr, length);
- } while (!(png_ptr->mode & PNG_HAVE_IEND));
-Index: pngget.c
-===================================================================
---- pngget.c
-+++ pngget.c
-@@ -842,6 +842,167 @@
- }
- #endif
-
-+#ifdef PNG_APNG_SUPPORTED
-+png_uint_32 PNGAPI
-+png_get_acTL(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 *num_frames, png_uint_32 *num_plays)
-+{
-+ png_debug1(1, "in %s retrieval function", "acTL");
-+
-+ if (png_ptr != NULL && info_ptr != NULL &&
-+ (info_ptr->valid & PNG_INFO_acTL) &&
-+ num_frames != NULL && num_plays != NULL)
-+ {
-+ *num_frames = info_ptr->num_frames;
-+ *num_plays = info_ptr->num_plays;
-+ return (1);
-+ }
-+
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_num_frames(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_num_frames()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->num_frames);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_num_plays(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_num_plays()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->num_plays);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 *width, png_uint_32 *height,
-+ png_uint_32 *x_offset, png_uint_32 *y_offset,
-+ png_uint_16 *delay_num, png_uint_16 *delay_den,
-+ png_byte *dispose_op, png_byte *blend_op)
-+{
-+ png_debug1(1, "in %s retrieval function", "fcTL");
-+
-+ if (png_ptr != NULL && info_ptr != NULL &&
-+ (info_ptr->valid & PNG_INFO_fcTL) &&
-+ width != NULL && height != NULL &&
-+ x_offset != NULL && x_offset != NULL &&
-+ delay_num != NULL && delay_den != NULL &&
-+ dispose_op != NULL && blend_op != NULL)
-+ {
-+ *width = info_ptr->next_frame_width;
-+ *height = info_ptr->next_frame_height;
-+ *x_offset = info_ptr->next_frame_x_offset;
-+ *y_offset = info_ptr->next_frame_y_offset;
-+ *delay_num = info_ptr->next_frame_delay_num;
-+ *delay_den = info_ptr->next_frame_delay_den;
-+ *dispose_op = info_ptr->next_frame_dispose_op;
-+ *blend_op = info_ptr->next_frame_blend_op;
-+ return (1);
-+ }
-+
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_width(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_width()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_width);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_height(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_height()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_height);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_x_offset(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_x_offset()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_x_offset);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_y_offset(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_y_offset()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_y_offset);
-+ return (0);
-+}
-+
-+png_uint_16 PNGAPI
-+png_get_next_frame_delay_num(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_delay_num()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_delay_num);
-+ return (0);
-+}
-+
-+png_uint_16 PNGAPI
-+png_get_next_frame_delay_den(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_delay_den()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_delay_den);
-+ return (0);
-+}
-+
-+png_byte PNGAPI
-+png_get_next_frame_dispose_op(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_dispose_op()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_dispose_op);
-+ return (0);
-+}
-+
-+png_byte PNGAPI
-+png_get_next_frame_blend_op(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_blend_op()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_blend_op);
-+ return (0);
-+}
-+
-+png_byte PNGAPI
-+png_get_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_first_frame_is_hidden()");
-+
-+ if (png_ptr != NULL)
-+ return (png_byte)(png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN);
-+
-+ return 0;
-+}
-+#endif /* PNG_APNG_SUPPORTED */
-+
- #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
- png_uint_32 PNGAPI
- png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
-Index: png.c
-===================================================================
---- png.c
-+++ png.c
-@@ -56,6 +56,11 @@
- PNG_tIME;
- PNG_tRNS;
- PNG_zTXt;
-+#ifdef PNG_APNG_SUPPORTED
-+PNG_acTL;
-+PNG_fcTL;
-+PNG_fdAT;
-+#endif
-
- #ifdef PNG_READ_SUPPORTED
- /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-Index: png.h
-===================================================================
---- png.h
-+++ png.h
-@@ -1038,6 +1038,19 @@
- png_fixed_point int_y_blue PNG_DEPSTRUCT;
- #endif
-
-+#ifdef PNG_APNG_SUPPORTED
-+ png_uint_32 num_frames; /* including default image */
-+ png_uint_32 num_plays;
-+ png_uint_32 next_frame_width;
-+ png_uint_32 next_frame_height;
-+ png_uint_32 next_frame_x_offset;
-+ png_uint_32 next_frame_y_offset;
-+ png_uint_16 next_frame_delay_num;
-+ png_uint_16 next_frame_delay_den;
-+ png_byte next_frame_dispose_op;
-+ png_byte next_frame_blend_op;
-+#endif
-+
- } png_info;
-
- typedef png_info FAR * png_infop;
-@@ -1139,6 +1152,10 @@
- #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
- #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
- #define PNG_INFO_IDAT 0x8000L /* ESR, 1.0.6 */
-+#ifdef PNG_APNG_SUPPORTED
-+#define PNG_INFO_acTL 0x10000L
-+#define PNG_INFO_fcTL 0x20000L
-+#endif
-
- /* This is used for the transformation routines, as some of them
- * change these values for the row. It also should enable using
-@@ -1179,6 +1196,10 @@
- typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));
- typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
- png_uint_32, int));
-+#ifdef PNG_APNG_SUPPORTED
-+typedef void (PNGAPI *png_progressive_frame_ptr) PNGARG((png_structp,
-+ png_uint_32));
-+#endif
- #endif
-
- #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-@@ -1524,6 +1545,39 @@
- png_uint_32 user_height_max PNG_DEPSTRUCT;
- #endif
-
-+#ifdef PNG_APNG_SUPPORTED
-+ png_uint_32 apng_flags;
-+ png_uint_32 next_seq_num; /* next fcTL/fdAT chunk sequence number */
-+ png_uint_32 first_frame_width;
-+ png_uint_32 first_frame_height;
-+
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_uint_32 num_frames_read; /* incremented after all image data of */
-+ /* a frame is read */
-+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-+ png_progressive_frame_ptr frame_info_fn; /* frame info read callback */
-+ png_progressive_frame_ptr frame_end_fn; /* frame data read callback */
-+#endif
-+#endif
-+
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ png_uint_32 num_frames_to_write;
-+ png_uint_32 num_frames_written;
-+#endif
-+
-+/* For png_struct.apng_flags: */
-+#define PNG_FIRST_FRAME_HIDDEN 0x0001
-+
-+/* dispose_op flags from inside fcTL */
-+#define PNG_DISPOSE_OP_NONE 0x00
-+#define PNG_DISPOSE_OP_BACKGROUND 0x01
-+#define PNG_DISPOSE_OP_PREVIOUS 0x02
-+
-+/* blend_op flags from inside fcTL */
-+#define PNG_BLEND_OP_SOURCE 0x00
-+#define PNG_BLEND_OP_OVER 0x01
-+#endif /* PNG_APNG_SUPPORTED */
-+
- /* New member added in libpng-1.0.25 and 1.2.17 */
- #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
- /* Storage for unknown chunk that the library doesn't recognize. */
-@@ -1858,6 +1912,18 @@
- extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
- png_bytepp image));
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+extern PNG_EXPORT (void,png_write_frame_head) PNGARG((png_structp png_ptr,
-+ png_infop png_info, png_bytepp row_pointers,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
-+ png_byte blend_op));
-+
-+extern PNG_EXPORT (void,png_write_frame_tail) PNGARG((png_structp png_ptr,
-+ png_infop png_info));
-+#endif
-+
- /* Writes the end of the PNG file. */
- extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-@@ -2111,6 +2177,11 @@
- png_voidp progressive_ptr,
- png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
- png_progressive_end_ptr end_fn));
-+#ifdef PNG_READ_APNG_SUPPORTED
-+extern PNG_EXPORT(void,png_set_progressive_frame_fn) PNGARG((png_structp png_ptr,
-+ png_progressive_frame_ptr frame_info_fn,
-+ png_progressive_frame_ptr frame_end_fn));
-+#endif
-
- /* Returns the user pointer associated with the push read functions */
- extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
-@@ -2551,6 +2622,59 @@
- #endif
- #endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
-
-+#ifdef PNG_APNG_SUPPORTED
-+extern PNG_EXPORT(png_uint_32,png_get_acTL) PNGARG((png_structp png_ptr,
-+ png_infop info_ptr, png_uint_32 *num_frames, png_uint_32 *num_plays));
-+extern PNG_EXPORT(png_uint_32,png_set_acTL) PNGARG((png_structp png_ptr,
-+ png_infop info_ptr, png_uint_32 num_frames, png_uint_32 num_plays));
-+extern PNG_EXPORT(png_uint_32,png_get_num_frames) PNGARG((png_structp png_ptr,
-+ png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_get_num_plays)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_fcTL)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *width,
-+ png_uint_32 *height, png_uint_32 *x_offset, png_uint_32 *y_offset,
-+ png_uint_16 *delay_num, png_uint_16 *delay_den, png_byte *dispose_op,
-+ png_byte *blend_op));
-+extern PNG_EXPORT(png_uint_32,png_set_next_frame_fcTL)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 width,
-+ png_uint_32 height, png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
-+ png_byte blend_op));
-+extern PNG_EXPORT(void,png_ensure_fcTL_is_valid)
-+ PNGARG((png_structp png_ptr,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den,
-+ png_byte dispose_op, png_byte blend_op));
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_width)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_height)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_x_offset)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_y_offset)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_16,png_get_next_frame_delay_num)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_16,png_get_next_frame_delay_den)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_byte,png_get_next_frame_dispose_op)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_byte,png_get_next_frame_blend_op)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_byte,png_get_first_frame_is_hidden)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_set_first_frame_is_hidden)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr, png_byte is_hidden));
-+#endif /* PNG_APNG_SUPPORTED */
-+
-+#ifdef PNG_READ_APNG_SUPPORTED
-+extern PNG_EXPORT(void,png_read_frame_head) PNGARG((png_structp png_ptr,
-+ png_infop info_ptr));
-+#endif
-+
- #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
- /* Provide a list of chunks and how they are to be handled, if the built-in
- handling or default unknown chunk handling is not desired. Any chunks not
-@@ -2915,6 +3039,10 @@
- #define PNG_BACKGROUND_IS_GRAY 0x800
- #define PNG_HAVE_PNG_SIGNATURE 0x1000
- #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
-+#ifdef PNG_APNG_SUPPORTED
-+#define PNG_HAVE_acTL 0x4000
-+#define PNG_HAVE_fcTL 0x8000L
-+#endif
-
- /* Flags for the transformations the PNG library does on the image data */
- #define PNG_BGR 0x0001
-@@ -3057,6 +3185,11 @@
- #define PNG_tIME png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
- #define PNG_tRNS png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
- #define PNG_zTXt png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
-+#ifdef PNG_APNG_SUPPORTED
-+#define PNG_acTL png_byte png_acTL[5] = { 97, 99, 84, 76, '\0'}
-+#define PNG_fcTL png_byte png_fcTL[5] = {102, 99, 84, 76, '\0'}
-+#define PNG_fdAT png_byte png_fdAT[5] = {102, 100, 65, 84, '\0'}
-+#endif
-
- #ifdef PNG_USE_GLOBAL_ARRAYS
- PNG_EXPORT_VAR (png_byte FARDATA) png_IHDR[5];
-@@ -3080,6 +3213,11 @@
- PNG_EXPORT_VAR (png_byte FARDATA) png_tIME[5];
- PNG_EXPORT_VAR (png_byte FARDATA) png_tRNS[5];
- PNG_EXPORT_VAR (png_byte FARDATA) png_zTXt[5];
-+#ifdef PNG_APNG_SUPPORTED
-+PNG_EXPORT_VAR (png_byte FARDATA) png_acTL[5];
-+PNG_EXPORT_VAR (png_byte FARDATA) png_fcTL[5];
-+PNG_EXPORT_VAR (png_byte FARDATA) png_fdAT[5];
-+#endif
- #endif /* PNG_USE_GLOBAL_ARRAYS */
-
- #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-@@ -3362,6 +3500,17 @@
- #endif
- #endif
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+PNG_EXTERN void png_write_acTL PNGARG((png_structp png_ptr,
-+ png_uint_32 num_frames, png_uint_32 num_plays));
-+
-+PNG_EXTERN void png_write_fcTL PNGARG((png_structp png_ptr,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den,
-+ png_byte dispose_op, png_byte blend_op));
-+#endif
-+
- /* Called when finished processing a row of data */
- PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;
-
-@@ -3414,6 +3563,20 @@
- PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
- png_infop info_ptr)) PNG_PRIVATE;
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+/* Private, reset some things to become ready for reading next frame */
-+PNG_EXTERN void png_read_reset PNGARG((png_structp png_ptr));
-+PNG_EXTERN void png_read_reinit PNGARG((png_structp png_ptr,
-+ png_infop info_ptr));
-+PNG_EXTERN void png_progressive_read_reset PNGARG((png_structp png_ptr));
-+#endif
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+/* Private, reset some things to become ready for writing next frame */
-+PNG_EXTERN void png_write_reset PNGARG((png_structp png_ptr));
-+PNG_EXTERN void png_write_reinit PNGARG((png_structp png_ptr,
-+ png_infop info_ptr, png_uint_32 width, png_uint_32 height));
-+#endif
-+
- /* These are the functions that do the transformations */
- #ifdef PNG_READ_FILLER_SUPPORTED
- PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
-@@ -3637,6 +3800,18 @@
- png_uint_32 length)) PNG_PRIVATE;
- #endif
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+PNG_EXTERN void png_handle_acTL PNGARG((png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 length));
-+PNG_EXTERN void png_handle_fcTL PNGARG((png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 length));
-+PNG_EXTERN void png_have_info PNGARG((png_structp png_ptr, png_infop info_ptr));
-+PNG_EXTERN void png_handle_fdAT PNGARG((png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 length));
-+PNG_EXTERN void png_ensure_sequence_number PNGARG((png_structp png_ptr,
-+ png_uint_32 length));
-+#endif
-+
- PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;
-
-Index: pngwrite.c
-===================================================================
---- pngwrite.c
-+++ pngwrite.c
-@@ -57,6 +57,10 @@
- /* The rest of these check to see if the valid field has the appropriate
- * flag set, and if it does, writes the chunk.
- */
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ if (info_ptr->valid & PNG_INFO_acTL)
-+ png_write_acTL(png_ptr, info_ptr->num_frames, info_ptr->num_plays);
-+#endif
- #ifdef PNG_WRITE_gAMA_SUPPORTED
- if (info_ptr->valid & PNG_INFO_gAMA)
- {
-@@ -319,6 +323,10 @@
- return;
- if (!(png_ptr->mode & PNG_HAVE_IDAT))
- png_error(png_ptr, "No IDATs written into file");
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ if (png_ptr->num_frames_written != png_ptr->num_frames_to_write)
-+ png_error(png_ptr, "Not enough frames written");
-+#endif
-
- /* See if user wants us to write information chunks */
- if (info_ptr != NULL)
-@@ -1589,4 +1597,39 @@
- params = params;
- }
- #endif
-+
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+void PNGAPI
-+png_write_frame_head(png_structp png_ptr, png_infop info_ptr,
-+ png_bytepp row_pointers, png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
-+ png_byte blend_op)
-+{
-+ png_debug(1, "in png_write_frame_head");
-+
-+ /* there is a chance this has been set after png_write_info was called,
-+ * so it would be set but not written. is there a way to be sure? */
-+ if (!(info_ptr->valid & PNG_INFO_acTL))
-+ png_error(png_ptr, "png_write_frame_head(): acTL not set");
-+
-+ png_write_reset(png_ptr);
-+
-+ png_write_reinit(png_ptr, info_ptr, width, height);
-+
-+ if ( !(png_ptr->num_frames_written == 0 &&
-+ (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) ) )
-+ png_write_fcTL(png_ptr, width, height, x_offset, y_offset,
-+ delay_num, delay_den, dispose_op, blend_op);
-+}
-+
-+void PNGAPI
-+png_write_frame_tail(png_structp png_ptr, png_infop png_info)
-+{
-+ png_debug(1, "in png_write_frame_tail");
-+
-+ png_ptr->num_frames_written++;
-+}
-+#endif /* PNG_WRITE_APNG_SUPPORTED */
-+
- #endif /* PNG_WRITE_SUPPORTED */
-Index: pngconf.h
-===================================================================
---- pngconf.h
-+++ pngconf.h
-@@ -951,6 +951,10 @@
- # define PNG_NO_READ_tEXt
- # define PNG_NO_READ_zTXt
- #endif
-+#ifndef PNG_NO_READ_APNG
-+# define PNG_READ_APNG_SUPPORTED
-+# define PNG_APNG_SUPPORTED
-+#endif
- #ifndef PNG_NO_READ_bKGD
- # define PNG_READ_bKGD_SUPPORTED
- # define PNG_bKGD_SUPPORTED
-@@ -1177,6 +1181,14 @@
- # define PNG_TEXT_SUPPORTED
- # endif
- #endif
-+#ifndef PNG_NO_WRITE_APNG
-+# ifndef PNG_WRITE_APNG_SUPPORTED
-+# define PNG_WRITE_APNG_SUPPORTED
-+# endif
-+# ifndef PNG_APNG_SUPPORTED
-+# define PNG_APNG_SUPPORTED
-+# endif
-+#endif
-
- #ifdef PNG_WRITE_tIME_SUPPORTED
- # ifndef PNG_NO_CONVERT_tIME
-Index: pngpread.c
-===================================================================
---- pngpread.c
-+++ pngpread.c
-@@ -206,6 +206,11 @@
- #ifdef PNG_READ_zTXt_SUPPORTED
- PNG_CONST PNG_zTXt;
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_acTL;
-+ PNG_CONST PNG_fcTL;
-+ PNG_CONST PNG_fdAT;
-+#endif
- #endif /* PNG_USE_LOCAL_ARRAYS */
-
- /* First we make sure we have enough data for the 4 byte chunk name
-@@ -232,6 +237,103 @@
- png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
- }
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_ptr->num_frames_read > 0 &&
-+ png_ptr->num_frames_read < info_ptr->num_frames)
-+ {
-+ if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-+ {
-+ /* Discard trailing IDATs for the first frame */
-+ if (png_ptr->mode & PNG_HAVE_fcTL || png_ptr->num_frames_read > 1)
-+ png_error(png_ptr, "out of place IDAT");
-+
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_push_crc_skip(png_ptr, png_ptr->push_length);
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+ return;
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fdAT, 4))
-+ {
-+ if (png_ptr->buffer_size < 4)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_ensure_sequence_number(png_ptr, 4);
-+
-+ if (!(png_ptr->mode & PNG_HAVE_fcTL))
-+ {
-+ /* Discard trailing fdATs for frames other than the first */
-+ if (png_ptr->num_frames_read < 2)
-+ png_error(png_ptr, "out of place fdAT");
-+
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_push_crc_skip(png_ptr, png_ptr->push_length);
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+ return;
-+ }
-+ else
-+ {
-+ /* frame data follows */
-+ png_ptr->idat_size = png_ptr->push_length - 4;
-+ png_ptr->mode |= PNG_HAVE_IDAT;
-+ png_ptr->process_mode = PNG_READ_IDAT_MODE;
-+
-+ return;
-+ }
-+ }
-+ else if(!png_memcmp(png_ptr->chunk_name, png_fcTL, 4))
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+
-+ png_read_reset(png_ptr);
-+ png_ptr->mode &= ~PNG_HAVE_fcTL;
-+
-+ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length);
-+
-+ if (!(png_ptr->mode & PNG_HAVE_fcTL))
-+ png_error(png_ptr, "missing required fcTL chunk");
-+
-+ png_read_reinit(png_ptr, info_ptr);
-+ png_progressive_read_reset(png_ptr);
-+
-+ if (png_ptr->frame_info_fn != NULL)
-+ (*(png_ptr->frame_info_fn))(png_ptr, png_ptr->num_frames_read);
-+
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+
-+ return;
-+ }
-+ else
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_warning(png_ptr, "Skipped (ignored) a chunk "
-+ "between APNG chunks");
-+ png_push_crc_skip(png_ptr, png_ptr->push_length);
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+ return;
-+ }
-+
-+ return;
-+ }
-+#endif /* PNG_READ_APNG_SUPPORTED */
-+
- if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
- if (png_ptr->mode & PNG_AFTER_IDAT)
- png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
-@@ -327,6 +429,9 @@
- png_error(png_ptr, "Too many IDAT's found");
- }
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_have_info(png_ptr, info_ptr);
-+#endif
- png_ptr->idat_size = png_ptr->push_length;
- png_ptr->mode |= PNG_HAVE_IDAT;
- png_ptr->process_mode = PNG_READ_IDAT_MODE;
-@@ -559,6 +664,38 @@
- }
-
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ else if (!png_memcmp(png_ptr->chunk_name, png_acTL, 4))
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+
-+ png_handle_acTL(png_ptr, info_ptr, png_ptr->push_length);
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fcTL, 4))
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+
-+ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length);
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fdAT, 4))
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+
-+ png_handle_fdAT(png_ptr, info_ptr, png_ptr->push_length);
-+ }
-+#endif /* PNG_READ_APNG_SUPPORTED */
- else
- {
- if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-@@ -738,13 +875,17 @@
- png_push_read_IDAT(png_structp png_ptr)
- {
- #ifdef PNG_USE_LOCAL_ARRAYS
-- PNG_CONST PNG_IDAT;
-+ PNG_IDAT;
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_fdAT;
-+ PNG_IEND;
-+#endif
- #endif
- if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER))
- {
- png_byte chunk_length[4];
-
-- if (png_ptr->buffer_size < 8)
-+ if (png_ptr->buffer_size < 12)
- {
- png_push_save_buffer(png_ptr);
- return;
-@@ -756,15 +897,62 @@
- png_crc_read(png_ptr, png_ptr->chunk_name, 4);
- png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
-
-- if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_memcmp(png_ptr->chunk_name, (png_bytep)png_fdAT, 4)
-+ && png_ptr->num_frames_read > 0)
-+ {
-+ if (png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)
-+ {
-+ png_ptr->process_mode = PNG_READ_CHUNK_MODE;
-+ if (png_ptr->frame_end_fn != NULL)
-+ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read);
-+ png_ptr->num_frames_read++;
-+ return;
-+ }
-+ else
-+ {
-+ if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
-+ png_error(png_ptr, "Not enough image data");
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_warning(png_ptr, "Skipping (ignoring) a chunk between "
-+ "APNG chunks");
-+ png_crc_finish(png_ptr, png_ptr->push_length);
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+ return;
-+ }
-+ }
-+ else
-+#endif
-+ if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ && (png_ptr->num_frames_read == 0)
-+#endif
-+ )
- {
- png_ptr->process_mode = PNG_READ_CHUNK_MODE;
- if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
- png_error(png_ptr, "Not enough compressed data");
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_ptr->frame_end_fn != NULL)
-+ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read);
-+ png_ptr->num_frames_read++;
-+#endif
- return;
- }
-
- png_ptr->idat_size = png_ptr->push_length;
-+
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_ptr->num_frames_read > 0)
-+ {
-+ png_ensure_sequence_number(png_ptr, 4);
-+ png_ptr->idat_size -= 4;
-+ }
-+#endif
- }
- if (png_ptr->idat_size && png_ptr->save_buffer_size)
- {
-@@ -1725,6 +1913,17 @@
- png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer);
- }
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+void PNGAPI
-+png_set_progressive_frame_fn(png_structp png_ptr,
-+ png_progressive_frame_ptr frame_info_fn,
-+ png_progressive_frame_ptr frame_end_fn)
-+{
-+ png_ptr->frame_info_fn = frame_info_fn;
-+ png_ptr->frame_end_fn = frame_end_fn;
-+}
-+#endif
-+
- png_voidp PNGAPI
- png_get_progressive_ptr(png_structp png_ptr)
- {
-Index: pngset.c
-===================================================================
---- pngset.c
-+++ pngset.c
-@@ -266,6 +266,11 @@
- info_ptr->rowbytes = (png_size_t)0;
- else
- info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
-+
-+#ifdef PNG_APNG_SUPPORTED
-+ /* for non-animated png. this may be overritten from an acTL chunk later */
-+ info_ptr->num_frames = 1;
-+#endif
- }
-
- #ifdef PNG_oFFs_SUPPORTED
-@@ -960,6 +965,142 @@
- }
- #endif /* PNG_sPLT_SUPPORTED */
-
-+#ifdef PNG_APNG_SUPPORTED
-+png_uint_32 PNGAPI
-+png_set_acTL(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 num_frames, png_uint_32 num_plays)
-+{
-+ png_debug1(1, "in %s storage function", "acTL");
-+
-+ if (png_ptr == NULL || info_ptr == NULL)
-+ {
-+ png_warning(png_ptr,
-+ "Call to png_set_acTL() with NULL png_ptr "
-+ "or info_ptr ignored");
-+ return (0);
-+ }
-+ if (num_frames == 0)
-+ {
-+ png_warning(png_ptr,
-+ "Ignoring attempt to set acTL with num_frames zero");
-+ return (0);
-+ }
-+ if (num_frames > PNG_UINT_31_MAX)
-+ {
-+ png_warning(png_ptr,
-+ "Ignoring attempt to set acTL with num_frames > 2^31-1");
-+ return (0);
-+ }
-+ if (num_plays > PNG_UINT_31_MAX)
-+ {
-+ png_warning(png_ptr,
-+ "Ignoring attempt to set acTL with num_plays "
-+ "> 2^31-1");
-+ return (0);
-+ }
-+
-+ info_ptr->num_frames = num_frames;
-+ info_ptr->num_plays = num_plays;
-+
-+ info_ptr->valid |= PNG_INFO_acTL;
-+
-+ return (1);
-+}
-+
-+/* delay_num and delay_den can hold any 16-bit values including zero */
-+png_uint_32 PNGAPI
-+png_set_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den,
-+ png_byte dispose_op, png_byte blend_op)
-+{
-+ png_debug1(1, "in %s storage function", "fcTL");
-+
-+ if (png_ptr == NULL || info_ptr == NULL)
-+ {
-+ png_warning(png_ptr,
-+ "Call to png_set_fcTL() with NULL png_ptr or info_ptr "
-+ "ignored");
-+ return (0);
-+ }
-+
-+ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset,
-+ delay_num, delay_den, dispose_op, blend_op);
-+
-+ if (blend_op == PNG_BLEND_OP_OVER)
-+ {
-+ if (!(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) &&
-+ !(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
-+ {
-+ png_warning(png_ptr, "PNG_BLEND_OP_OVER is meaningless "
-+ "and wasteful for opaque images, ignored");
-+ blend_op = PNG_BLEND_OP_SOURCE;
-+ }
-+ }
-+
-+ info_ptr->next_frame_width = width;
-+ info_ptr->next_frame_height = height;
-+ info_ptr->next_frame_x_offset = x_offset;
-+ info_ptr->next_frame_y_offset = y_offset;
-+ info_ptr->next_frame_delay_num = delay_num;
-+ info_ptr->next_frame_delay_den = delay_den;
-+ info_ptr->next_frame_dispose_op = dispose_op;
-+ info_ptr->next_frame_blend_op = blend_op;
-+
-+ info_ptr->valid |= PNG_INFO_fcTL;
-+
-+ return (1);
-+}
-+
-+void PNGAPI
-+png_ensure_fcTL_is_valid(png_structp png_ptr,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den,
-+ png_byte dispose_op, png_byte blend_op)
-+{
-+ if (width + x_offset > png_ptr->first_frame_width ||
-+ height + y_offset > png_ptr->first_frame_height)
-+ png_error(png_ptr, "dimensions of a frame are greater than"
-+ "the ones in IHDR");
-+ if (width > PNG_UINT_31_MAX)
-+ png_error(png_ptr, "invalid width in fcTL (> 2^31-1)");
-+ if (height > PNG_UINT_31_MAX)
-+ png_error(png_ptr, "invalid height in fcTL (> 2^31-1)");
-+ if (x_offset > PNG_UINT_31_MAX)
-+ png_error(png_ptr, "invalid x_offset in fcTL (> 2^31-1)");
-+ if (y_offset > PNG_UINT_31_MAX)
-+ png_error(png_ptr, "invalid y_offset in fcTL (> 2^31-1)");
-+
-+ if (dispose_op != PNG_DISPOSE_OP_NONE &&
-+ dispose_op != PNG_DISPOSE_OP_BACKGROUND &&
-+ dispose_op != PNG_DISPOSE_OP_PREVIOUS)
-+ png_error(png_ptr, "invalid dispose_op in fcTL");
-+
-+ if (blend_op != PNG_BLEND_OP_SOURCE &&
-+ blend_op != PNG_BLEND_OP_OVER)
-+ png_error(png_ptr, "invalid blend_op in fcTL");
-+}
-+
-+png_uint_32 PNGAPI
-+png_set_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr,
-+ png_byte is_hidden)
-+{
-+ png_debug(1, "in png_first_frame_is_hidden()");
-+
-+ if (png_ptr == NULL)
-+ return 0;
-+
-+ if(is_hidden)
-+ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN;
-+ else
-+ png_ptr->apng_flags &= ~PNG_FIRST_FRAME_HIDDEN;
-+
-+ return 1;
-+}
-+#endif /* PNG_APNG_SUPPORTED */
-+
- #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
- void PNGAPI
- png_set_unknown_chunks(png_structp png_ptr,
-Index: pngrutil.c
-===================================================================
---- pngrutil.c
-+++ pngrutil.c
-@@ -451,6 +451,11 @@
- filter_type = buf[11];
- interlace_type = buf[12];
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_ptr->first_frame_width = width;
-+ png_ptr->first_frame_height = height;
-+#endif
-+
- /* Set internal variables */
- png_ptr->width = width;
- png_ptr->height = height;
-@@ -2323,6 +2328,172 @@
- }
- #endif
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+void /* PRIVATE */
-+png_handle_acTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-+{
-+ png_byte data[8];
-+ png_uint_32 num_frames;
-+ png_uint_32 num_plays;
-+ png_uint_32 didSet;
-+
-+ png_debug(1, "in png_handle_acTL");
-+
-+ if (!(png_ptr->mode & PNG_HAVE_IHDR))
-+ {
-+ png_error(png_ptr, "Missing IHDR before acTL");
-+ }
-+ else if (png_ptr->mode & PNG_HAVE_IDAT)
-+ {
-+ png_warning(png_ptr, "Invalid acTL after IDAT skipped");
-+ png_crc_finish(png_ptr, length);
-+ return;
-+ }
-+ else if (png_ptr->mode & PNG_HAVE_acTL)
-+ {
-+ png_warning(png_ptr, "Duplicate acTL skipped");
-+ png_crc_finish(png_ptr, length);
-+ return;
-+ }
-+ else if (length != 8)
-+ {
-+ png_warning(png_ptr, "acTL with invalid length skipped");
-+ png_crc_finish(png_ptr, length);
-+ return;
-+ }
-+
-+ png_crc_read(png_ptr, data, 8);
-+ png_crc_finish(png_ptr, 0);
-+
-+ num_frames = png_get_uint_31(png_ptr, data);
-+ num_plays = png_get_uint_31(png_ptr, data + 4);
-+
-+ /* the set function will do error checking on num_frames */
-+ didSet = png_set_acTL(png_ptr, info_ptr, num_frames, num_plays);
-+ if(didSet)
-+ png_ptr->mode |= PNG_HAVE_acTL;
-+}
-+
-+void /* PRIVATE */
-+png_handle_fcTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-+{
-+ png_byte data[22];
-+ png_uint_32 width;
-+ png_uint_32 height;
-+ png_uint_32 x_offset;
-+ png_uint_32 y_offset;
-+ png_uint_16 delay_num;
-+ png_uint_16 delay_den;
-+ png_byte dispose_op;
-+ png_byte blend_op;
-+
-+ png_debug(1, "in png_handle_fcTL");
-+
-+ png_ensure_sequence_number(png_ptr, length);
-+
-+ if (!(png_ptr->mode & PNG_HAVE_IHDR))
-+ {
-+ png_error(png_ptr, "Missing IHDR before fcTL");
-+ }
-+ else if (png_ptr->mode & PNG_HAVE_IDAT)
-+ {
-+ /* for any frames other then the first this message may be misleading,
-+ * but correct. PNG_HAVE_IDAT is unset before the frame head is read
-+ * i can't think of a better message */
-+ png_warning(png_ptr, "Invalid fcTL after IDAT skipped");
-+ png_crc_finish(png_ptr, length-4);
-+ return;
-+ }
-+ else if (png_ptr->mode & PNG_HAVE_fcTL)
-+ {
-+ png_warning(png_ptr, "Duplicate fcTL within one frame skipped");
-+ png_crc_finish(png_ptr, length-4);
-+ return;
-+ }
-+ else if (length != 26)
-+ {
-+ png_warning(png_ptr, "fcTL with invalid length skipped");
-+ png_crc_finish(png_ptr, length-4);
-+ return;
-+ }
-+
-+ png_crc_read(png_ptr, data, 22);
-+ png_crc_finish(png_ptr, 0);
-+
-+ width = png_get_uint_31(png_ptr, data);
-+ height = png_get_uint_31(png_ptr, data + 4);
-+ x_offset = png_get_uint_31(png_ptr, data + 8);
-+ y_offset = png_get_uint_31(png_ptr, data + 12);
-+ delay_num = png_get_uint_16(data + 16);
-+ delay_den = png_get_uint_16(data + 18);
-+ dispose_op = data[20];
-+ blend_op = data[21];
-+
-+ if (png_ptr->num_frames_read == 0 && (x_offset != 0 || y_offset != 0))
-+ png_error(png_ptr, "fcTL for the first frame must have zero offset");
-+
-+ if (info_ptr != NULL)
-+ {
-+ if (png_ptr->num_frames_read == 0 &&
-+ (width != info_ptr->width || height != info_ptr->height))
-+ png_error(png_ptr, "size in first frame's fcTL must match "
-+ "the size in IHDR");
-+
-+ /* the set function will do more error checking */
-+ png_set_next_frame_fcTL(png_ptr, info_ptr, width, height,
-+ x_offset, y_offset, delay_num, delay_den,
-+ dispose_op, blend_op);
-+
-+ png_read_reinit(png_ptr, info_ptr);
-+ }
-+
-+ png_ptr->mode |= PNG_HAVE_fcTL;
-+}
-+
-+void /* PRIVATE */
-+png_have_info(png_structp png_ptr, png_infop info_ptr)
-+{
-+ if((info_ptr->valid & PNG_INFO_acTL) && !(info_ptr->valid & PNG_INFO_fcTL))
-+ {
-+ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN;
-+ info_ptr->num_frames++;
-+ }
-+}
-+
-+void /* PRIVATE */
-+png_handle_fdAT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-+{
-+ png_ensure_sequence_number(png_ptr, length);
-+
-+ /* This function is only called from png_read_end(), png_read_info(),
-+ * and png_push_read_chunk() which means that:
-+ * - the user doesn't want to read this frame
-+ * - or this is an out-of-place fdAT
-+ * in either case it is safe to ignore the chunk with a warning */
-+ png_warning(png_ptr, "ignoring fdAT chunk");
-+ png_crc_finish(png_ptr, length - 4);
-+}
-+
-+void /* PRIVATE */
-+png_ensure_sequence_number(png_structp png_ptr, png_uint_32 length)
-+{
-+ png_byte data[4];
-+ png_uint_32 sequence_number;
-+
-+ if (length < 4)
-+ png_error(png_ptr, "invalid fcTL or fdAT chunk found");
-+
-+ png_crc_read(png_ptr, data, 4);
-+ sequence_number = png_get_uint_31(png_ptr, data);
-+
-+ if (sequence_number != png_ptr->next_seq_num)
-+ png_error(png_ptr, "fcTL or fdAT chunk with out-of-order sequence "
-+ "number found");
-+
-+ png_ptr->next_seq_num++;
-+}
-+#endif /* PNG_READ_APNG_SUPPORTED */
-+
- /* This function is called when we haven't found a handler for a
- chunk. If there isn't a problem with the chunk itself (ie bad
- chunk name, CRC, or a critical chunk), the chunk is silently ignored
-@@ -3354,4 +3525,75 @@
-
- png_ptr->flags |= PNG_FLAG_ROW_INIT;
- }
-+
-+#ifdef PNG_READ_APNG_SUPPORTED
-+/* This function is to be called after the main IDAT set has been read and
-+ * before a new IDAT is read. It resets some parts of png_ptr
-+ * to make them usable by the read functions again */
-+void /* PRIVATE */
-+png_read_reset(png_structp png_ptr)
-+{
-+ png_ptr->mode &= ~PNG_HAVE_IDAT;
-+ png_ptr->mode &= ~PNG_AFTER_IDAT;
-+ png_ptr->row_number = 0;
-+ png_ptr->pass = 0;
-+ png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
-+}
-+
-+void /* PRIVATE */
-+png_read_reinit(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_ptr->width = info_ptr->next_frame_width;
-+ png_ptr->height = info_ptr->next_frame_height;
-+ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width);
-+ if (png_ptr->prev_row)
-+ png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
-+}
-+
-+/* same as png_read_reset() but for the progressive reader */
-+void /* PRIVATE */
-+png_progressive_read_reset(png_structp png_ptr)
-+{
-+#ifdef PNG_USE_LOCAL_ARRAYS
-+ /* start of interlace block */
-+ const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
-+
-+ /* offset to next interlace block */
-+ const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
-+
-+ /* start of interlace block in the y direction */
-+ const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
-+
-+ /* offset to next interlace block in the y direction */
-+ const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
-+#endif
-+
-+ if (png_ptr->interlaced)
-+ {
-+ if (!(png_ptr->transformations & PNG_INTERLACE))
-+ png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
-+ png_pass_ystart[0]) / png_pass_yinc[0];
-+ else
-+ png_ptr->num_rows = png_ptr->height;
-+
-+ png_ptr->iwidth = (png_ptr->width +
-+ png_pass_inc[png_ptr->pass] - 1 -
-+ png_pass_start[png_ptr->pass]) /
-+ png_pass_inc[png_ptr->pass];
-+ }
-+ else
-+ {
-+ png_ptr->num_rows = png_ptr->height;
-+ png_ptr->iwidth = png_ptr->width;
-+ }
-+ png_ptr->flags &= ~PNG_FLAG_ZLIB_FINISHED;
-+ if (inflateReset(&(png_ptr->zstream)) != Z_OK)
-+ png_error(png_ptr, "inflateReset failed");
-+ png_ptr->zstream.avail_in = 0;
-+ png_ptr->zstream.next_in = 0;
-+ png_ptr->zstream.next_out = png_ptr->row_buf;
-+ png_ptr->zstream.avail_out = (uInt)PNG_ROWBYTES(png_ptr->pixel_depth,
-+ png_ptr->iwidth) + 1;
-+}
-+#endif /* PNG_READ_APNG_SUPPORTED */
- #endif /* PNG_READ_SUPPORTED */
-Index: pngwutil.c
-===================================================================
---- pngwutil.c
-+++ pngwutil.c
-@@ -516,6 +516,11 @@
- /* Write the chunk */
- png_write_chunk(png_ptr, (png_bytep)png_IHDR, buf, (png_size_t)13);
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ png_ptr->first_frame_width = width;
-+ png_ptr->first_frame_height = height;
-+#endif
-+
- /* Initialize zlib with PNG info */
- png_ptr->zstream.zalloc = png_zalloc;
- png_ptr->zstream.zfree = png_zfree;
-@@ -641,6 +646,9 @@
- {
- #ifdef PNG_USE_LOCAL_ARRAYS
- PNG_IDAT;
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ PNG_fdAT;
-+#endif
- #endif
-
- png_debug(1, "in png_write_IDAT");
-@@ -686,7 +694,28 @@
- "Invalid zlib compression method or flags in IDAT");
- }
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ if(png_ptr->num_frames_written == 0)
-+#endif
- png_write_chunk(png_ptr, (png_bytep)png_IDAT, data, length);
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ else
-+ {
-+ png_byte buf[4];
-+
-+ png_write_chunk_start(png_ptr, (png_bytep)png_fdAT, 4 + length);
-+
-+ png_save_uint_32(buf, png_ptr->next_seq_num);
-+ png_write_chunk_data(png_ptr, buf, 4);
-+
-+ png_write_chunk_data(png_ptr, data, length);
-+
-+ png_write_chunk_end(png_ptr);
-+
-+ png_ptr->next_seq_num++;
-+ }
-+#endif
-+
- png_ptr->mode |= PNG_HAVE_IDAT;
- }
-
-@@ -1754,6 +1783,70 @@
- }
- #endif
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+void /* PRIVATE */
-+png_write_acTL(png_structp png_ptr,
-+ png_uint_32 num_frames, png_uint_32 num_plays)
-+{
-+#ifdef PNG_USE_LOCAL_ARRAYS
-+ PNG_acTL;
-+#endif
-+ png_byte data[16];
-+
-+ png_debug(1, "in png_write_acTL");
-+
-+ png_ptr->num_frames_to_write = num_frames;
-+
-+ if (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN)
-+ num_frames--;
-+
-+ png_save_uint_32(data, num_frames);
-+ png_save_uint_32(data + 4, num_plays);
-+
-+ png_write_chunk(png_ptr, (png_bytep)png_acTL, data, (png_size_t)8);
-+}
-+
-+void /* PRIVATE */
-+png_write_fcTL(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
-+ png_byte blend_op)
-+{
-+#ifdef PNG_USE_LOCAL_ARRAYS
-+ PNG_fcTL;
-+#endif
-+ png_byte data[26];
-+
-+ png_debug(1, "in png_write_fcTL");
-+
-+ if (png_ptr->num_frames_written == 0 && (x_offset != 0 || y_offset != 0))
-+ png_error(png_ptr, "x and/or y offset for the first frame aren't 0");
-+ if (png_ptr->num_frames_written == 0 &&
-+ (width != png_ptr->first_frame_width ||
-+ height != png_ptr->first_frame_height))
-+ png_error(png_ptr, "width and/or height in the first frame's fcTL "
-+ "don't match the ones in IHDR");
-+
-+ /* more error checking */
-+ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset,
-+ delay_num, delay_den, dispose_op, blend_op);
-+
-+ png_save_uint_32(data, png_ptr->next_seq_num);
-+ png_save_uint_32(data + 4, width);
-+ png_save_uint_32(data + 8, height);
-+ png_save_uint_32(data + 12, x_offset);
-+ png_save_uint_32(data + 16, y_offset);
-+ png_save_uint_16(data + 20, delay_num);
-+ png_save_uint_16(data + 22, delay_den);
-+ data[24] = dispose_op;
-+ data[25] = blend_op;
-+
-+ png_write_chunk(png_ptr, (png_bytep)png_fcTL, data, (png_size_t)26);
-+
-+ png_ptr->next_seq_num++;
-+}
-+#endif /* PNG_WRITE_APNG_SUPPORTED */
-+
- /* Initializes the row writing capability of libpng */
- void /* PRIVATE */
- png_write_start_row(png_structp png_ptr)
-@@ -2159,8 +2252,8 @@
- #ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
- if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS)
- {
-- /* These will never be selected so we need not test them. */
-- filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);
-+ /* These use previous row */
-+ filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_AVG | PNG_FILTER_PAETH);
- }
- #endif
-
-@@ -2829,4 +2922,39 @@
- }
- #endif
- }
-+
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+void /* PRIVATE */
-+png_write_reset(png_structp png_ptr)
-+{
-+ png_ptr->row_number = 0;
-+ png_ptr->pass = 0;
-+ png_ptr->mode &= ~PNG_HAVE_IDAT;
-+}
-+
-+void /* PRIVATE */
-+png_write_reinit(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 width, png_uint_32 height)
-+{
-+ if (png_ptr->num_frames_written == 0 &&
-+ (width != png_ptr->first_frame_width ||
-+ height != png_ptr->first_frame_height))
-+ png_error(png_ptr, "width and/or height in the first frame's fcTL "
-+ "don't match the ones in IHDR");
-+ if (width > png_ptr->first_frame_width ||
-+ height > png_ptr->first_frame_height)
-+ png_error(png_ptr, "width and/or height for a frame greater than"
-+ "the ones in IHDR");
-+
-+ png_set_IHDR(png_ptr, info_ptr, width, height,
-+ info_ptr->bit_depth, info_ptr->color_type,
-+ info_ptr->interlace_type, info_ptr->compression_type,
-+ info_ptr->filter_type);
-+
-+ png_ptr->width = width;
-+ png_ptr->height = height;
-+ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width);
-+ png_ptr->usr_width = png_ptr->width;
-+}
-+#endif
- #endif /* PNG_WRITE_SUPPORTED */
-Index: pngrtran.c
-===================================================================
---- pngrtran.c
-+++ pngrtran.c
-@@ -1352,7 +1352,7 @@
- * pixels. This check added to libpng-1.2.19
- */
- #if (PNG_WARN_UNINITIALIZED_ROW==1)
-- png_error(png_ptr, "Uninitialized row");
-+ png_warning(png_ptr, "Uninitialized row");
- #else
- png_warning(png_ptr, "Uninitialized row");
- #endif
diff --git a/libpng12/libpng-1.2.44-apng.patch b/libpng12/libpng-1.2.44-apng.patch deleted file mode 100644 index c283439..0000000 --- a/libpng12/libpng-1.2.44-apng.patch +++ /dev/null @@ -1,1653 +0,0 @@ -Index: pngread.c
-===================================================================
---- pngread.c
-+++ pngread.c
-@@ -437,6 +437,11 @@
- #ifdef PNG_READ_zTXt_SUPPORTED
- PNG_CONST PNG_zTXt;
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_acTL;
-+ PNG_CONST PNG_fcTL;
-+ PNG_CONST PNG_fdAT;
-+#endif
- #endif /* PNG_USE_LOCAL_ARRAYS */
- png_uint_32 length = png_read_chunk_header(png_ptr);
- PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;
-@@ -481,6 +486,9 @@
- !(png_ptr->mode & PNG_HAVE_PLTE))
- png_error(png_ptr, "Missing PLTE before IDAT");
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_have_info(png_ptr, info_ptr);
-+#endif
- png_ptr->idat_size = length;
- png_ptr->mode |= PNG_HAVE_IDAT;
- break;
-@@ -553,12 +561,97 @@
- else if (!png_memcmp(chunk_name, png_iTXt, 4))
- png_handle_iTXt(png_ptr, info_ptr, length);
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ else if (!png_memcmp(chunk_name, png_acTL, 4))
-+ png_handle_acTL(png_ptr, info_ptr, length);
-+ else if (!png_memcmp(chunk_name, png_fcTL, 4))
-+ png_handle_fcTL(png_ptr, info_ptr, length);
-+ else if (!png_memcmp(chunk_name, png_fdAT, 4))
-+ png_handle_fdAT(png_ptr, info_ptr, length);
-+#endif
- else
- png_handle_unknown(png_ptr, info_ptr, length);
- }
- }
- #endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+void PNGAPI
-+png_read_frame_head(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_byte have_chunk_after_DAT; /* after IDAT or after fdAT */
-+
-+ png_debug(0, "Reading frame head");
-+
-+ if (!(png_ptr->mode & PNG_HAVE_acTL))
-+ png_error(png_ptr, "attempt to png_read_frame_head() but "
-+ "no acTL present");
-+
-+ /* do nothing for the main IDAT */
-+ if (png_ptr->num_frames_read == 0)
-+ return;
-+
-+ png_crc_finish(png_ptr, 0); /* CRC from last IDAT or fdAT chunk */
-+
-+ png_read_reset(png_ptr);
-+ png_ptr->mode &= ~PNG_HAVE_fcTL;
-+
-+ have_chunk_after_DAT = 0;
-+ for (;;)
-+ {
-+#ifdef PNG_USE_LOCAL_ARRAYS
-+ PNG_IDAT;
-+ PNG_fdAT;
-+ PNG_fcTL;
-+#endif
-+ png_byte chunk_length[4];
-+ png_uint_32 length;
-+
-+ png_read_data(png_ptr, chunk_length, 4);
-+ length = png_get_uint_31(png_ptr, chunk_length);
-+
-+ png_reset_crc(png_ptr);
-+ png_crc_read(png_ptr, png_ptr->chunk_name, 4);
-+
-+ if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-+ {
-+ /* discard trailing IDATs for the first frame */
-+ if (have_chunk_after_DAT || png_ptr->num_frames_read > 1)
-+ png_error(png_ptr, "png_read_frame_head(): out of place IDAT");
-+ png_crc_finish(png_ptr, length);
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fcTL, 4))
-+ {
-+ png_handle_fcTL(png_ptr, info_ptr, length);
-+ have_chunk_after_DAT = 1;
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fdAT, 4))
-+ {
-+ png_ensure_sequence_number(png_ptr, length);
-+
-+ /* discard trailing fdATs for frames other than the first */
-+ if (!have_chunk_after_DAT && png_ptr->num_frames_read > 1)
-+ png_crc_finish(png_ptr, length - 4);
-+ else if(png_ptr->mode & PNG_HAVE_fcTL)
-+ {
-+ png_ptr->idat_size = length - 4;
-+ png_ptr->mode |= PNG_HAVE_IDAT;
-+
-+ break;
-+ }
-+ else
-+ png_error(png_ptr, "png_read_frame_head(): out of place fdAT");
-+ }
-+ else
-+ {
-+ png_warning(png_ptr, "Skipped (ignored) a chunk "
-+ "between APNG chunks");
-+ png_crc_finish(png_ptr, length);
-+ }
-+ }
-+}
-+#endif /* PNG_READ_APNG_SUPPORTED */
-+
- /* Optional call to update the users info_ptr structure */
- void PNGAPI
- png_read_update_info(png_structp png_ptr, png_infop info_ptr)
-@@ -599,6 +692,10 @@
- png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
- {
- PNG_CONST PNG_IDAT;
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_fdAT;
-+ PNG_CONST PNG_IEND;
-+#endif
- PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55,
- 0xff};
- PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
-@@ -734,13 +831,39 @@
- {
- if (!(png_ptr->zstream.avail_in))
- {
-- while (!png_ptr->idat_size)
-+ png_uint_32 bytes_to_skip = 0;
-+
-+ while (!png_ptr->idat_size || bytes_to_skip != 0)
- {
-- png_crc_finish(png_ptr, 0);
-+ png_crc_finish(png_ptr, bytes_to_skip);
-+ bytes_to_skip = 0;
-
- png_ptr->idat_size = png_read_chunk_header(png_ptr);
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_ptr->num_frames_read == 0)
-+ {
-+#endif
- if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
- png_error(png_ptr, "Not enough image data");
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ }
-+ else
-+ {
-+ if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
-+ png_error(png_ptr, "Not enough image data");
-+ if (png_memcmp(png_ptr->chunk_name, png_fdAT, 4))
-+ {
-+ png_warning(png_ptr, "Skipped (ignored) a chunk "
-+ "between APNG chunks");
-+ bytes_to_skip = png_ptr->idat_size;
-+ continue;
-+ }
-+
-+ png_ensure_sequence_number(png_ptr, png_ptr->idat_size);
-+
-+ png_ptr->idat_size -= 4;
-+ }
-+#endif
- }
- png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size;
- png_ptr->zstream.next_in = png_ptr->zbuf;
-@@ -758,6 +881,9 @@
- png_error(png_ptr, "Extra compressed data");
- png_ptr->mode |= PNG_AFTER_IDAT;
- png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_ptr->num_frames_read++;
-+#endif
- break;
- }
- if (ret != Z_OK)
-@@ -1015,6 +1141,11 @@
- #ifdef PNG_READ_zTXt_SUPPORTED
- PNG_CONST PNG_zTXt;
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_acTL;
-+ PNG_CONST PNG_fcTL;
-+ PNG_CONST PNG_fdAT;
-+#endif
- #endif /* PNG_USE_LOCAL_ARRAYS */
- png_uint_32 length = png_read_chunk_header(png_ptr);
- PNG_CONST png_bytep chunk_name = png_ptr->chunk_name;
-@@ -1115,6 +1246,14 @@
- else if (!png_memcmp(chunk_name, png_iTXt, 4))
- png_handle_iTXt(png_ptr, info_ptr, length);
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ else if (!png_memcmp(chunk_name, png_acTL, 4))
-+ png_handle_acTL(png_ptr, info_ptr, length);
-+ else if (!png_memcmp(chunk_name, png_fcTL, 4))
-+ png_handle_fcTL(png_ptr, info_ptr, length);
-+ else if (!png_memcmp(chunk_name, png_fdAT, 4))
-+ png_handle_fdAT(png_ptr, info_ptr, length);
-+#endif
- else
- png_handle_unknown(png_ptr, info_ptr, length);
- } while (!(png_ptr->mode & PNG_HAVE_IEND));
-Index: pngget.c
-===================================================================
---- pngget.c
-+++ pngget.c
-@@ -842,6 +842,167 @@
- }
- #endif
-
-+#ifdef PNG_APNG_SUPPORTED
-+png_uint_32 PNGAPI
-+png_get_acTL(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 *num_frames, png_uint_32 *num_plays)
-+{
-+ png_debug1(1, "in %s retrieval function", "acTL");
-+
-+ if (png_ptr != NULL && info_ptr != NULL &&
-+ (info_ptr->valid & PNG_INFO_acTL) &&
-+ num_frames != NULL && num_plays != NULL)
-+ {
-+ *num_frames = info_ptr->num_frames;
-+ *num_plays = info_ptr->num_plays;
-+ return (1);
-+ }
-+
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_num_frames(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_num_frames()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->num_frames);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_num_plays(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_num_plays()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->num_plays);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 *width, png_uint_32 *height,
-+ png_uint_32 *x_offset, png_uint_32 *y_offset,
-+ png_uint_16 *delay_num, png_uint_16 *delay_den,
-+ png_byte *dispose_op, png_byte *blend_op)
-+{
-+ png_debug1(1, "in %s retrieval function", "fcTL");
-+
-+ if (png_ptr != NULL && info_ptr != NULL &&
-+ (info_ptr->valid & PNG_INFO_fcTL) &&
-+ width != NULL && height != NULL &&
-+ x_offset != NULL && x_offset != NULL &&
-+ delay_num != NULL && delay_den != NULL &&
-+ dispose_op != NULL && blend_op != NULL)
-+ {
-+ *width = info_ptr->next_frame_width;
-+ *height = info_ptr->next_frame_height;
-+ *x_offset = info_ptr->next_frame_x_offset;
-+ *y_offset = info_ptr->next_frame_y_offset;
-+ *delay_num = info_ptr->next_frame_delay_num;
-+ *delay_den = info_ptr->next_frame_delay_den;
-+ *dispose_op = info_ptr->next_frame_dispose_op;
-+ *blend_op = info_ptr->next_frame_blend_op;
-+ return (1);
-+ }
-+
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_width(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_width()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_width);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_height(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_height()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_height);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_x_offset(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_x_offset()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_x_offset);
-+ return (0);
-+}
-+
-+png_uint_32 PNGAPI
-+png_get_next_frame_y_offset(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_y_offset()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_y_offset);
-+ return (0);
-+}
-+
-+png_uint_16 PNGAPI
-+png_get_next_frame_delay_num(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_delay_num()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_delay_num);
-+ return (0);
-+}
-+
-+png_uint_16 PNGAPI
-+png_get_next_frame_delay_den(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_delay_den()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_delay_den);
-+ return (0);
-+}
-+
-+png_byte PNGAPI
-+png_get_next_frame_dispose_op(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_dispose_op()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_dispose_op);
-+ return (0);
-+}
-+
-+png_byte PNGAPI
-+png_get_next_frame_blend_op(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_get_next_frame_blend_op()");
-+
-+ if (png_ptr != NULL && info_ptr != NULL)
-+ return (info_ptr->next_frame_blend_op);
-+ return (0);
-+}
-+
-+png_byte PNGAPI
-+png_get_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_debug(1, "in png_first_frame_is_hidden()");
-+
-+ if (png_ptr != NULL)
-+ return (png_byte)(png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN);
-+
-+ return 0;
-+}
-+#endif /* PNG_APNG_SUPPORTED */
-+
- #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
- png_uint_32 PNGAPI
- png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
-Index: png.c
-===================================================================
---- png.c
-+++ png.c
-@@ -56,6 +56,11 @@
- PNG_tIME;
- PNG_tRNS;
- PNG_zTXt;
-+#ifdef PNG_APNG_SUPPORTED
-+PNG_acTL;
-+PNG_fcTL;
-+PNG_fdAT;
-+#endif
-
- #ifdef PNG_READ_SUPPORTED
- /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
-Index: png.h
-===================================================================
---- png.h
-+++ png.h
-@@ -1041,6 +1041,19 @@
- png_fixed_point int_y_blue PNG_DEPSTRUCT;
- #endif
-
-+#ifdef PNG_APNG_SUPPORTED
-+ png_uint_32 num_frames; /* including default image */
-+ png_uint_32 num_plays;
-+ png_uint_32 next_frame_width;
-+ png_uint_32 next_frame_height;
-+ png_uint_32 next_frame_x_offset;
-+ png_uint_32 next_frame_y_offset;
-+ png_uint_16 next_frame_delay_num;
-+ png_uint_16 next_frame_delay_den;
-+ png_byte next_frame_dispose_op;
-+ png_byte next_frame_blend_op;
-+#endif
-+
- } png_info;
-
- typedef png_info FAR * png_infop;
-@@ -1142,6 +1155,10 @@
- #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */
- #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */
- #define PNG_INFO_IDAT 0x8000L /* ESR, 1.0.6 */
-+#ifdef PNG_APNG_SUPPORTED
-+#define PNG_INFO_acTL 0x10000L
-+#define PNG_INFO_fcTL 0x20000L
-+#endif
-
- /* This is used for the transformation routines, as some of them
- * change these values for the row. It also should enable using
-@@ -1182,6 +1199,10 @@
- typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));
- typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
- png_uint_32, int));
-+#ifdef PNG_APNG_SUPPORTED
-+typedef void (PNGAPI *png_progressive_frame_ptr) PNGARG((png_structp,
-+ png_uint_32));
-+#endif
- #endif
-
- #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
-@@ -1527,6 +1548,39 @@
- png_uint_32 user_height_max PNG_DEPSTRUCT;
- #endif
-
-+#ifdef PNG_APNG_SUPPORTED
-+ png_uint_32 apng_flags;
-+ png_uint_32 next_seq_num; /* next fcTL/fdAT chunk sequence number */
-+ png_uint_32 first_frame_width;
-+ png_uint_32 first_frame_height;
-+
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_uint_32 num_frames_read; /* incremented after all image data of */
-+ /* a frame is read */
-+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-+ png_progressive_frame_ptr frame_info_fn; /* frame info read callback */
-+ png_progressive_frame_ptr frame_end_fn; /* frame data read callback */
-+#endif
-+#endif
-+
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ png_uint_32 num_frames_to_write;
-+ png_uint_32 num_frames_written;
-+#endif
-+
-+/* For png_struct.apng_flags: */
-+#define PNG_FIRST_FRAME_HIDDEN 0x0001
-+
-+/* dispose_op flags from inside fcTL */
-+#define PNG_DISPOSE_OP_NONE 0x00
-+#define PNG_DISPOSE_OP_BACKGROUND 0x01
-+#define PNG_DISPOSE_OP_PREVIOUS 0x02
-+
-+/* blend_op flags from inside fcTL */
-+#define PNG_BLEND_OP_SOURCE 0x00
-+#define PNG_BLEND_OP_OVER 0x01
-+#endif /* PNG_APNG_SUPPORTED */
-+
- /* New member added in libpng-1.0.25 and 1.2.17 */
- #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
- /* Storage for unknown chunk that the library doesn't recognize. */
-@@ -1861,6 +1915,18 @@
- extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
- png_bytepp image));
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+extern PNG_EXPORT (void,png_write_frame_head) PNGARG((png_structp png_ptr,
-+ png_infop png_info, png_bytepp row_pointers,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
-+ png_byte blend_op));
-+
-+extern PNG_EXPORT (void,png_write_frame_tail) PNGARG((png_structp png_ptr,
-+ png_infop png_info));
-+#endif
-+
- /* Writes the end of the PNG file. */
- extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-@@ -2114,6 +2180,11 @@
- png_voidp progressive_ptr,
- png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
- png_progressive_end_ptr end_fn));
-+#ifdef PNG_READ_APNG_SUPPORTED
-+extern PNG_EXPORT(void,png_set_progressive_frame_fn) PNGARG((png_structp png_ptr,
-+ png_progressive_frame_ptr frame_info_fn,
-+ png_progressive_frame_ptr frame_end_fn));
-+#endif
-
- /* Returns the user pointer associated with the push read functions */
- extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
-@@ -2554,6 +2625,59 @@
- #endif
- #endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
-
-+#ifdef PNG_APNG_SUPPORTED
-+extern PNG_EXPORT(png_uint_32,png_get_acTL) PNGARG((png_structp png_ptr,
-+ png_infop info_ptr, png_uint_32 *num_frames, png_uint_32 *num_plays));
-+extern PNG_EXPORT(png_uint_32,png_set_acTL) PNGARG((png_structp png_ptr,
-+ png_infop info_ptr, png_uint_32 num_frames, png_uint_32 num_plays));
-+extern PNG_EXPORT(png_uint_32,png_get_num_frames) PNGARG((png_structp png_ptr,
-+ png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_get_num_plays)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_fcTL)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *width,
-+ png_uint_32 *height, png_uint_32 *x_offset, png_uint_32 *y_offset,
-+ png_uint_16 *delay_num, png_uint_16 *delay_den, png_byte *dispose_op,
-+ png_byte *blend_op));
-+extern PNG_EXPORT(png_uint_32,png_set_next_frame_fcTL)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 width,
-+ png_uint_32 height, png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
-+ png_byte blend_op));
-+extern PNG_EXPORT(void,png_ensure_fcTL_is_valid)
-+ PNGARG((png_structp png_ptr,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den,
-+ png_byte dispose_op, png_byte blend_op));
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_width)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_height)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_x_offset)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_get_next_frame_y_offset)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_16,png_get_next_frame_delay_num)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_16,png_get_next_frame_delay_den)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_byte,png_get_next_frame_dispose_op)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_byte,png_get_next_frame_blend_op)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_byte,png_get_first_frame_is_hidden)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr));
-+extern PNG_EXPORT(png_uint_32,png_set_first_frame_is_hidden)
-+ PNGARG((png_structp png_ptr, png_infop info_ptr, png_byte is_hidden));
-+#endif /* PNG_APNG_SUPPORTED */
-+
-+#ifdef PNG_READ_APNG_SUPPORTED
-+extern PNG_EXPORT(void,png_read_frame_head) PNGARG((png_structp png_ptr,
-+ png_infop info_ptr));
-+#endif
-+
- #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
- /* Provide a list of chunks and how they are to be handled, if the built-in
- handling or default unknown chunk handling is not desired. Any chunks not
-@@ -2918,6 +3042,10 @@
- #define PNG_BACKGROUND_IS_GRAY 0x800
- #define PNG_HAVE_PNG_SIGNATURE 0x1000
- #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
-+#ifdef PNG_APNG_SUPPORTED
-+#define PNG_HAVE_acTL 0x4000
-+#define PNG_HAVE_fcTL 0x8000L
-+#endif
-
- /* Flags for the transformations the PNG library does on the image data */
- #define PNG_BGR 0x0001
-@@ -3060,6 +3188,11 @@
- #define PNG_tIME png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
- #define PNG_tRNS png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
- #define PNG_zTXt png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
-+#ifdef PNG_APNG_SUPPORTED
-+#define PNG_acTL png_byte png_acTL[5] = { 97, 99, 84, 76, '\0'}
-+#define PNG_fcTL png_byte png_fcTL[5] = {102, 99, 84, 76, '\0'}
-+#define PNG_fdAT png_byte png_fdAT[5] = {102, 100, 65, 84, '\0'}
-+#endif
-
- #ifdef PNG_USE_GLOBAL_ARRAYS
- PNG_EXPORT_VAR (png_byte FARDATA) png_IHDR[5];
-@@ -3083,6 +3216,11 @@
- PNG_EXPORT_VAR (png_byte FARDATA) png_tIME[5];
- PNG_EXPORT_VAR (png_byte FARDATA) png_tRNS[5];
- PNG_EXPORT_VAR (png_byte FARDATA) png_zTXt[5];
-+#ifdef PNG_APNG_SUPPORTED
-+PNG_EXPORT_VAR (png_byte FARDATA) png_acTL[5];
-+PNG_EXPORT_VAR (png_byte FARDATA) png_fcTL[5];
-+PNG_EXPORT_VAR (png_byte FARDATA) png_fdAT[5];
-+#endif
- #endif /* PNG_USE_GLOBAL_ARRAYS */
-
- #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
-@@ -3365,6 +3503,17 @@
- #endif
- #endif
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+PNG_EXTERN void png_write_acTL PNGARG((png_structp png_ptr,
-+ png_uint_32 num_frames, png_uint_32 num_plays));
-+
-+PNG_EXTERN void png_write_fcTL PNGARG((png_structp png_ptr,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den,
-+ png_byte dispose_op, png_byte blend_op));
-+#endif
-+
- /* Called when finished processing a row of data */
- PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;
-
-@@ -3417,6 +3566,20 @@
- PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
- png_infop info_ptr)) PNG_PRIVATE;
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+/* Private, reset some things to become ready for reading next frame */
-+PNG_EXTERN void png_read_reset PNGARG((png_structp png_ptr));
-+PNG_EXTERN void png_read_reinit PNGARG((png_structp png_ptr,
-+ png_infop info_ptr));
-+PNG_EXTERN void png_progressive_read_reset PNGARG((png_structp png_ptr));
-+#endif
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+/* Private, reset some things to become ready for writing next frame */
-+PNG_EXTERN void png_write_reset PNGARG((png_structp png_ptr));
-+PNG_EXTERN void png_write_reinit PNGARG((png_structp png_ptr,
-+ png_infop info_ptr, png_uint_32 width, png_uint_32 height));
-+#endif
-+
- /* These are the functions that do the transformations */
- #ifdef PNG_READ_FILLER_SUPPORTED
- PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
-@@ -3640,6 +3803,18 @@
- png_uint_32 length)) PNG_PRIVATE;
- #endif
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+PNG_EXTERN void png_handle_acTL PNGARG((png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 length));
-+PNG_EXTERN void png_handle_fcTL PNGARG((png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 length));
-+PNG_EXTERN void png_have_info PNGARG((png_structp png_ptr, png_infop info_ptr));
-+PNG_EXTERN void png_handle_fdAT PNGARG((png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 length));
-+PNG_EXTERN void png_ensure_sequence_number PNGARG((png_structp png_ptr,
-+ png_uint_32 length));
-+#endif
-+
- PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;
-
-Index: pngwrite.c
-===================================================================
---- pngwrite.c
-+++ pngwrite.c
-@@ -57,6 +57,10 @@
- /* The rest of these check to see if the valid field has the appropriate
- * flag set, and if it does, writes the chunk.
- */
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ if (info_ptr->valid & PNG_INFO_acTL)
-+ png_write_acTL(png_ptr, info_ptr->num_frames, info_ptr->num_plays);
-+#endif
- #ifdef PNG_WRITE_gAMA_SUPPORTED
- if (info_ptr->valid & PNG_INFO_gAMA)
- {
-@@ -319,6 +323,10 @@
- return;
- if (!(png_ptr->mode & PNG_HAVE_IDAT))
- png_error(png_ptr, "No IDATs written into file");
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ if (png_ptr->num_frames_written != png_ptr->num_frames_to_write)
-+ png_error(png_ptr, "Not enough frames written");
-+#endif
-
- /* See if user wants us to write information chunks */
- if (info_ptr != NULL)
-@@ -1589,4 +1597,39 @@
- params = params;
- }
- #endif
-+
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+void PNGAPI
-+png_write_frame_head(png_structp png_ptr, png_infop info_ptr,
-+ png_bytepp row_pointers, png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
-+ png_byte blend_op)
-+{
-+ png_debug(1, "in png_write_frame_head");
-+
-+ /* there is a chance this has been set after png_write_info was called,
-+ * so it would be set but not written. is there a way to be sure? */
-+ if (!(info_ptr->valid & PNG_INFO_acTL))
-+ png_error(png_ptr, "png_write_frame_head(): acTL not set");
-+
-+ png_write_reset(png_ptr);
-+
-+ png_write_reinit(png_ptr, info_ptr, width, height);
-+
-+ if ( !(png_ptr->num_frames_written == 0 &&
-+ (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) ) )
-+ png_write_fcTL(png_ptr, width, height, x_offset, y_offset,
-+ delay_num, delay_den, dispose_op, blend_op);
-+}
-+
-+void PNGAPI
-+png_write_frame_tail(png_structp png_ptr, png_infop png_info)
-+{
-+ png_debug(1, "in png_write_frame_tail");
-+
-+ png_ptr->num_frames_written++;
-+}
-+#endif /* PNG_WRITE_APNG_SUPPORTED */
-+
- #endif /* PNG_WRITE_SUPPORTED */
-Index: pngconf.h
-===================================================================
---- pngconf.h
-+++ pngconf.h
-@@ -951,6 +951,10 @@
- # define PNG_NO_READ_tEXt
- # define PNG_NO_READ_zTXt
- #endif
-+#ifndef PNG_NO_READ_APNG
-+# define PNG_READ_APNG_SUPPORTED
-+# define PNG_APNG_SUPPORTED
-+#endif
- #ifndef PNG_NO_READ_bKGD
- # define PNG_READ_bKGD_SUPPORTED
- # define PNG_bKGD_SUPPORTED
-@@ -1177,6 +1181,14 @@
- # define PNG_TEXT_SUPPORTED
- # endif
- #endif
-+#ifndef PNG_NO_WRITE_APNG
-+# ifndef PNG_WRITE_APNG_SUPPORTED
-+# define PNG_WRITE_APNG_SUPPORTED
-+# endif
-+# ifndef PNG_APNG_SUPPORTED
-+# define PNG_APNG_SUPPORTED
-+# endif
-+#endif
-
- #ifdef PNG_WRITE_tIME_SUPPORTED
- # ifndef PNG_NO_CONVERT_tIME
-Index: pngpread.c
-===================================================================
---- pngpread.c
-+++ pngpread.c
-@@ -206,6 +206,11 @@
- #ifdef PNG_READ_zTXt_SUPPORTED
- PNG_CONST PNG_zTXt;
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_CONST PNG_acTL;
-+ PNG_CONST PNG_fcTL;
-+ PNG_CONST PNG_fdAT;
-+#endif
- #endif /* PNG_USE_LOCAL_ARRAYS */
-
- /* First we make sure we have enough data for the 4 byte chunk name
-@@ -232,6 +237,103 @@
- png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
- }
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_ptr->num_frames_read > 0 &&
-+ png_ptr->num_frames_read < info_ptr->num_frames)
-+ {
-+ if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-+ {
-+ /* Discard trailing IDATs for the first frame */
-+ if (png_ptr->mode & PNG_HAVE_fcTL || png_ptr->num_frames_read > 1)
-+ png_error(png_ptr, "out of place IDAT");
-+
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_push_crc_skip(png_ptr, png_ptr->push_length);
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+ return;
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fdAT, 4))
-+ {
-+ if (png_ptr->buffer_size < 4)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_ensure_sequence_number(png_ptr, 4);
-+
-+ if (!(png_ptr->mode & PNG_HAVE_fcTL))
-+ {
-+ /* Discard trailing fdATs for frames other than the first */
-+ if (png_ptr->num_frames_read < 2)
-+ png_error(png_ptr, "out of place fdAT");
-+
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_push_crc_skip(png_ptr, png_ptr->push_length);
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+ return;
-+ }
-+ else
-+ {
-+ /* frame data follows */
-+ png_ptr->idat_size = png_ptr->push_length - 4;
-+ png_ptr->mode |= PNG_HAVE_IDAT;
-+ png_ptr->process_mode = PNG_READ_IDAT_MODE;
-+
-+ return;
-+ }
-+ }
-+ else if(!png_memcmp(png_ptr->chunk_name, png_fcTL, 4))
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+
-+ png_read_reset(png_ptr);
-+ png_ptr->mode &= ~PNG_HAVE_fcTL;
-+
-+ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length);
-+
-+ if (!(png_ptr->mode & PNG_HAVE_fcTL))
-+ png_error(png_ptr, "missing required fcTL chunk");
-+
-+ png_read_reinit(png_ptr, info_ptr);
-+ png_progressive_read_reset(png_ptr);
-+
-+ if (png_ptr->frame_info_fn != NULL)
-+ (*(png_ptr->frame_info_fn))(png_ptr, png_ptr->num_frames_read);
-+
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+
-+ return;
-+ }
-+ else
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_warning(png_ptr, "Skipped (ignored) a chunk "
-+ "between APNG chunks");
-+ png_push_crc_skip(png_ptr, png_ptr->push_length);
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+ return;
-+ }
-+
-+ return;
-+ }
-+#endif /* PNG_READ_APNG_SUPPORTED */
-+
- if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
- if (png_ptr->mode & PNG_AFTER_IDAT)
- png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
-@@ -327,6 +429,9 @@
- png_error(png_ptr, "Too many IDAT's found");
- }
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_have_info(png_ptr, info_ptr);
-+#endif
- png_ptr->idat_size = png_ptr->push_length;
- png_ptr->mode |= PNG_HAVE_IDAT;
- png_ptr->process_mode = PNG_READ_IDAT_MODE;
-@@ -559,6 +664,38 @@
- }
-
- #endif
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ else if (!png_memcmp(png_ptr->chunk_name, png_acTL, 4))
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+
-+ png_handle_acTL(png_ptr, info_ptr, png_ptr->push_length);
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fcTL, 4))
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+
-+ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length);
-+ }
-+ else if (!png_memcmp(png_ptr->chunk_name, png_fdAT, 4))
-+ {
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+
-+ png_handle_fdAT(png_ptr, info_ptr, png_ptr->push_length);
-+ }
-+#endif /* PNG_READ_APNG_SUPPORTED */
- else
- {
- if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-@@ -738,13 +875,17 @@
- png_push_read_IDAT(png_structp png_ptr)
- {
- #ifdef PNG_USE_LOCAL_ARRAYS
-- PNG_CONST PNG_IDAT;
-+ PNG_IDAT;
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ PNG_fdAT;
-+ PNG_IEND;
-+#endif
- #endif
- if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER))
- {
- png_byte chunk_length[4];
-
-- if (png_ptr->buffer_size < 8)
-+ if (png_ptr->buffer_size < 12)
- {
- png_push_save_buffer(png_ptr);
- return;
-@@ -756,15 +897,62 @@
- png_crc_read(png_ptr, png_ptr->chunk_name, 4);
- png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
-
-- if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_memcmp(png_ptr->chunk_name, (png_bytep)png_fdAT, 4)
-+ && png_ptr->num_frames_read > 0)
-+ {
-+ if (png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)
-+ {
-+ png_ptr->process_mode = PNG_READ_CHUNK_MODE;
-+ if (png_ptr->frame_end_fn != NULL)
-+ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read);
-+ png_ptr->num_frames_read++;
-+ return;
-+ }
-+ else
-+ {
-+ if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
-+ png_error(png_ptr, "Not enough image data");
-+ if (png_ptr->push_length + 4 > png_ptr->buffer_size)
-+ {
-+ png_push_save_buffer(png_ptr);
-+ return;
-+ }
-+ png_warning(png_ptr, "Skipping (ignoring) a chunk between "
-+ "APNG chunks");
-+ png_crc_finish(png_ptr, png_ptr->push_length);
-+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
-+ return;
-+ }
-+ }
-+ else
-+#endif
-+ if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ && (png_ptr->num_frames_read == 0)
-+#endif
-+ )
- {
- png_ptr->process_mode = PNG_READ_CHUNK_MODE;
- if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
- png_error(png_ptr, "Not enough compressed data");
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_ptr->frame_end_fn != NULL)
-+ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read);
-+ png_ptr->num_frames_read++;
-+#endif
- return;
- }
-
- png_ptr->idat_size = png_ptr->push_length;
-+
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ if (png_ptr->num_frames_read > 0)
-+ {
-+ png_ensure_sequence_number(png_ptr, 4);
-+ png_ptr->idat_size -= 4;
-+ }
-+#endif
- }
- if (png_ptr->idat_size && png_ptr->save_buffer_size)
- {
-@@ -1763,6 +1951,17 @@
- png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer);
- }
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+void PNGAPI
-+png_set_progressive_frame_fn(png_structp png_ptr,
-+ png_progressive_frame_ptr frame_info_fn,
-+ png_progressive_frame_ptr frame_end_fn)
-+{
-+ png_ptr->frame_info_fn = frame_info_fn;
-+ png_ptr->frame_end_fn = frame_end_fn;
-+}
-+#endif
-+
- png_voidp PNGAPI
- png_get_progressive_ptr(png_structp png_ptr)
- {
-Index: pngset.c
-===================================================================
---- pngset.c
-+++ pngset.c
-@@ -266,6 +266,11 @@
- info_ptr->rowbytes = (png_size_t)0;
- else
- info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
-+
-+#ifdef PNG_APNG_SUPPORTED
-+ /* for non-animated png. this may be overritten from an acTL chunk later */
-+ info_ptr->num_frames = 1;
-+#endif
- }
-
- #ifdef PNG_oFFs_SUPPORTED
-@@ -960,6 +965,142 @@
- }
- #endif /* PNG_sPLT_SUPPORTED */
-
-+#ifdef PNG_APNG_SUPPORTED
-+png_uint_32 PNGAPI
-+png_set_acTL(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 num_frames, png_uint_32 num_plays)
-+{
-+ png_debug1(1, "in %s storage function", "acTL");
-+
-+ if (png_ptr == NULL || info_ptr == NULL)
-+ {
-+ png_warning(png_ptr,
-+ "Call to png_set_acTL() with NULL png_ptr "
-+ "or info_ptr ignored");
-+ return (0);
-+ }
-+ if (num_frames == 0)
-+ {
-+ png_warning(png_ptr,
-+ "Ignoring attempt to set acTL with num_frames zero");
-+ return (0);
-+ }
-+ if (num_frames > PNG_UINT_31_MAX)
-+ {
-+ png_warning(png_ptr,
-+ "Ignoring attempt to set acTL with num_frames > 2^31-1");
-+ return (0);
-+ }
-+ if (num_plays > PNG_UINT_31_MAX)
-+ {
-+ png_warning(png_ptr,
-+ "Ignoring attempt to set acTL with num_plays "
-+ "> 2^31-1");
-+ return (0);
-+ }
-+
-+ info_ptr->num_frames = num_frames;
-+ info_ptr->num_plays = num_plays;
-+
-+ info_ptr->valid |= PNG_INFO_acTL;
-+
-+ return (1);
-+}
-+
-+/* delay_num and delay_den can hold any 16-bit values including zero */
-+png_uint_32 PNGAPI
-+png_set_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den,
-+ png_byte dispose_op, png_byte blend_op)
-+{
-+ png_debug1(1, "in %s storage function", "fcTL");
-+
-+ if (png_ptr == NULL || info_ptr == NULL)
-+ {
-+ png_warning(png_ptr,
-+ "Call to png_set_fcTL() with NULL png_ptr or info_ptr "
-+ "ignored");
-+ return (0);
-+ }
-+
-+ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset,
-+ delay_num, delay_den, dispose_op, blend_op);
-+
-+ if (blend_op == PNG_BLEND_OP_OVER)
-+ {
-+ if (!(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) &&
-+ !(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
-+ {
-+ png_warning(png_ptr, "PNG_BLEND_OP_OVER is meaningless "
-+ "and wasteful for opaque images, ignored");
-+ blend_op = PNG_BLEND_OP_SOURCE;
-+ }
-+ }
-+
-+ info_ptr->next_frame_width = width;
-+ info_ptr->next_frame_height = height;
-+ info_ptr->next_frame_x_offset = x_offset;
-+ info_ptr->next_frame_y_offset = y_offset;
-+ info_ptr->next_frame_delay_num = delay_num;
-+ info_ptr->next_frame_delay_den = delay_den;
-+ info_ptr->next_frame_dispose_op = dispose_op;
-+ info_ptr->next_frame_blend_op = blend_op;
-+
-+ info_ptr->valid |= PNG_INFO_fcTL;
-+
-+ return (1);
-+}
-+
-+void PNGAPI
-+png_ensure_fcTL_is_valid(png_structp png_ptr,
-+ png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den,
-+ png_byte dispose_op, png_byte blend_op)
-+{
-+ if (width + x_offset > png_ptr->first_frame_width ||
-+ height + y_offset > png_ptr->first_frame_height)
-+ png_error(png_ptr, "dimensions of a frame are greater than"
-+ "the ones in IHDR");
-+ if (width > PNG_UINT_31_MAX)
-+ png_error(png_ptr, "invalid width in fcTL (> 2^31-1)");
-+ if (height > PNG_UINT_31_MAX)
-+ png_error(png_ptr, "invalid height in fcTL (> 2^31-1)");
-+ if (x_offset > PNG_UINT_31_MAX)
-+ png_error(png_ptr, "invalid x_offset in fcTL (> 2^31-1)");
-+ if (y_offset > PNG_UINT_31_MAX)
-+ png_error(png_ptr, "invalid y_offset in fcTL (> 2^31-1)");
-+
-+ if (dispose_op != PNG_DISPOSE_OP_NONE &&
-+ dispose_op != PNG_DISPOSE_OP_BACKGROUND &&
-+ dispose_op != PNG_DISPOSE_OP_PREVIOUS)
-+ png_error(png_ptr, "invalid dispose_op in fcTL");
-+
-+ if (blend_op != PNG_BLEND_OP_SOURCE &&
-+ blend_op != PNG_BLEND_OP_OVER)
-+ png_error(png_ptr, "invalid blend_op in fcTL");
-+}
-+
-+png_uint_32 PNGAPI
-+png_set_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr,
-+ png_byte is_hidden)
-+{
-+ png_debug(1, "in png_first_frame_is_hidden()");
-+
-+ if (png_ptr == NULL)
-+ return 0;
-+
-+ if(is_hidden)
-+ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN;
-+ else
-+ png_ptr->apng_flags &= ~PNG_FIRST_FRAME_HIDDEN;
-+
-+ return 1;
-+}
-+#endif /* PNG_APNG_SUPPORTED */
-+
- #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
- void PNGAPI
- png_set_unknown_chunks(png_structp png_ptr,
-Index: pngrutil.c
-===================================================================
---- pngrutil.c
-+++ pngrutil.c
-@@ -460,6 +460,11 @@
- filter_type = buf[11];
- interlace_type = buf[12];
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+ png_ptr->first_frame_width = width;
-+ png_ptr->first_frame_height = height;
-+#endif
-+
- /* Set internal variables */
- png_ptr->width = width;
- png_ptr->height = height;
-@@ -2348,6 +2353,172 @@
- }
- #endif
-
-+#ifdef PNG_READ_APNG_SUPPORTED
-+void /* PRIVATE */
-+png_handle_acTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-+{
-+ png_byte data[8];
-+ png_uint_32 num_frames;
-+ png_uint_32 num_plays;
-+ png_uint_32 didSet;
-+
-+ png_debug(1, "in png_handle_acTL");
-+
-+ if (!(png_ptr->mode & PNG_HAVE_IHDR))
-+ {
-+ png_error(png_ptr, "Missing IHDR before acTL");
-+ }
-+ else if (png_ptr->mode & PNG_HAVE_IDAT)
-+ {
-+ png_warning(png_ptr, "Invalid acTL after IDAT skipped");
-+ png_crc_finish(png_ptr, length);
-+ return;
-+ }
-+ else if (png_ptr->mode & PNG_HAVE_acTL)
-+ {
-+ png_warning(png_ptr, "Duplicate acTL skipped");
-+ png_crc_finish(png_ptr, length);
-+ return;
-+ }
-+ else if (length != 8)
-+ {
-+ png_warning(png_ptr, "acTL with invalid length skipped");
-+ png_crc_finish(png_ptr, length);
-+ return;
-+ }
-+
-+ png_crc_read(png_ptr, data, 8);
-+ png_crc_finish(png_ptr, 0);
-+
-+ num_frames = png_get_uint_31(png_ptr, data);
-+ num_plays = png_get_uint_31(png_ptr, data + 4);
-+
-+ /* the set function will do error checking on num_frames */
-+ didSet = png_set_acTL(png_ptr, info_ptr, num_frames, num_plays);
-+ if(didSet)
-+ png_ptr->mode |= PNG_HAVE_acTL;
-+}
-+
-+void /* PRIVATE */
-+png_handle_fcTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-+{
-+ png_byte data[22];
-+ png_uint_32 width;
-+ png_uint_32 height;
-+ png_uint_32 x_offset;
-+ png_uint_32 y_offset;
-+ png_uint_16 delay_num;
-+ png_uint_16 delay_den;
-+ png_byte dispose_op;
-+ png_byte blend_op;
-+
-+ png_debug(1, "in png_handle_fcTL");
-+
-+ png_ensure_sequence_number(png_ptr, length);
-+
-+ if (!(png_ptr->mode & PNG_HAVE_IHDR))
-+ {
-+ png_error(png_ptr, "Missing IHDR before fcTL");
-+ }
-+ else if (png_ptr->mode & PNG_HAVE_IDAT)
-+ {
-+ /* for any frames other then the first this message may be misleading,
-+ * but correct. PNG_HAVE_IDAT is unset before the frame head is read
-+ * i can't think of a better message */
-+ png_warning(png_ptr, "Invalid fcTL after IDAT skipped");
-+ png_crc_finish(png_ptr, length-4);
-+ return;
-+ }
-+ else if (png_ptr->mode & PNG_HAVE_fcTL)
-+ {
-+ png_warning(png_ptr, "Duplicate fcTL within one frame skipped");
-+ png_crc_finish(png_ptr, length-4);
-+ return;
-+ }
-+ else if (length != 26)
-+ {
-+ png_warning(png_ptr, "fcTL with invalid length skipped");
-+ png_crc_finish(png_ptr, length-4);
-+ return;
-+ }
-+
-+ png_crc_read(png_ptr, data, 22);
-+ png_crc_finish(png_ptr, 0);
-+
-+ width = png_get_uint_31(png_ptr, data);
-+ height = png_get_uint_31(png_ptr, data + 4);
-+ x_offset = png_get_uint_31(png_ptr, data + 8);
-+ y_offset = png_get_uint_31(png_ptr, data + 12);
-+ delay_num = png_get_uint_16(data + 16);
-+ delay_den = png_get_uint_16(data + 18);
-+ dispose_op = data[20];
-+ blend_op = data[21];
-+
-+ if (png_ptr->num_frames_read == 0 && (x_offset != 0 || y_offset != 0))
-+ png_error(png_ptr, "fcTL for the first frame must have zero offset");
-+
-+ if (info_ptr != NULL)
-+ {
-+ if (png_ptr->num_frames_read == 0 &&
-+ (width != info_ptr->width || height != info_ptr->height))
-+ png_error(png_ptr, "size in first frame's fcTL must match "
-+ "the size in IHDR");
-+
-+ /* the set function will do more error checking */
-+ png_set_next_frame_fcTL(png_ptr, info_ptr, width, height,
-+ x_offset, y_offset, delay_num, delay_den,
-+ dispose_op, blend_op);
-+
-+ png_read_reinit(png_ptr, info_ptr);
-+ }
-+
-+ png_ptr->mode |= PNG_HAVE_fcTL;
-+}
-+
-+void /* PRIVATE */
-+png_have_info(png_structp png_ptr, png_infop info_ptr)
-+{
-+ if((info_ptr->valid & PNG_INFO_acTL) && !(info_ptr->valid & PNG_INFO_fcTL))
-+ {
-+ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN;
-+ info_ptr->num_frames++;
-+ }
-+}
-+
-+void /* PRIVATE */
-+png_handle_fdAT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
-+{
-+ png_ensure_sequence_number(png_ptr, length);
-+
-+ /* This function is only called from png_read_end(), png_read_info(),
-+ * and png_push_read_chunk() which means that:
-+ * - the user doesn't want to read this frame
-+ * - or this is an out-of-place fdAT
-+ * in either case it is safe to ignore the chunk with a warning */
-+ png_warning(png_ptr, "ignoring fdAT chunk");
-+ png_crc_finish(png_ptr, length - 4);
-+}
-+
-+void /* PRIVATE */
-+png_ensure_sequence_number(png_structp png_ptr, png_uint_32 length)
-+{
-+ png_byte data[4];
-+ png_uint_32 sequence_number;
-+
-+ if (length < 4)
-+ png_error(png_ptr, "invalid fcTL or fdAT chunk found");
-+
-+ png_crc_read(png_ptr, data, 4);
-+ sequence_number = png_get_uint_31(png_ptr, data);
-+
-+ if (sequence_number != png_ptr->next_seq_num)
-+ png_error(png_ptr, "fcTL or fdAT chunk with out-of-order sequence "
-+ "number found");
-+
-+ png_ptr->next_seq_num++;
-+}
-+#endif /* PNG_READ_APNG_SUPPORTED */
-+
- /* This function is called when we haven't found a handler for a
- chunk. If there isn't a problem with the chunk itself (ie bad
- chunk name, CRC, or a critical chunk), the chunk is silently ignored
-@@ -3379,4 +3550,75 @@
-
- png_ptr->flags |= PNG_FLAG_ROW_INIT;
- }
-+
-+#ifdef PNG_READ_APNG_SUPPORTED
-+/* This function is to be called after the main IDAT set has been read and
-+ * before a new IDAT is read. It resets some parts of png_ptr
-+ * to make them usable by the read functions again */
-+void /* PRIVATE */
-+png_read_reset(png_structp png_ptr)
-+{
-+ png_ptr->mode &= ~PNG_HAVE_IDAT;
-+ png_ptr->mode &= ~PNG_AFTER_IDAT;
-+ png_ptr->row_number = 0;
-+ png_ptr->pass = 0;
-+ png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
-+}
-+
-+void /* PRIVATE */
-+png_read_reinit(png_structp png_ptr, png_infop info_ptr)
-+{
-+ png_ptr->width = info_ptr->next_frame_width;
-+ png_ptr->height = info_ptr->next_frame_height;
-+ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width);
-+ if (png_ptr->prev_row)
-+ png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
-+}
-+
-+/* same as png_read_reset() but for the progressive reader */
-+void /* PRIVATE */
-+png_progressive_read_reset(png_structp png_ptr)
-+{
-+#ifdef PNG_USE_LOCAL_ARRAYS
-+ /* start of interlace block */
-+ const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
-+
-+ /* offset to next interlace block */
-+ const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
-+
-+ /* start of interlace block in the y direction */
-+ const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
-+
-+ /* offset to next interlace block in the y direction */
-+ const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
-+#endif
-+
-+ if (png_ptr->interlaced)
-+ {
-+ if (!(png_ptr->transformations & PNG_INTERLACE))
-+ png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
-+ png_pass_ystart[0]) / png_pass_yinc[0];
-+ else
-+ png_ptr->num_rows = png_ptr->height;
-+
-+ png_ptr->iwidth = (png_ptr->width +
-+ png_pass_inc[png_ptr->pass] - 1 -
-+ png_pass_start[png_ptr->pass]) /
-+ png_pass_inc[png_ptr->pass];
-+ }
-+ else
-+ {
-+ png_ptr->num_rows = png_ptr->height;
-+ png_ptr->iwidth = png_ptr->width;
-+ }
-+ png_ptr->flags &= ~PNG_FLAG_ZLIB_FINISHED;
-+ if (inflateReset(&(png_ptr->zstream)) != Z_OK)
-+ png_error(png_ptr, "inflateReset failed");
-+ png_ptr->zstream.avail_in = 0;
-+ png_ptr->zstream.next_in = 0;
-+ png_ptr->zstream.next_out = png_ptr->row_buf;
-+ png_ptr->zstream.avail_out = (uInt)PNG_ROWBYTES(png_ptr->pixel_depth,
-+ png_ptr->iwidth) + 1;
-+}
-+#endif /* PNG_READ_APNG_SUPPORTED */
- #endif /* PNG_READ_SUPPORTED */
-Index: pngwutil.c
-===================================================================
---- pngwutil.c
-+++ pngwutil.c
-@@ -516,6 +516,11 @@
- /* Write the chunk */
- png_write_chunk(png_ptr, (png_bytep)png_IHDR, buf, (png_size_t)13);
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ png_ptr->first_frame_width = width;
-+ png_ptr->first_frame_height = height;
-+#endif
-+
- /* Initialize zlib with PNG info */
- png_ptr->zstream.zalloc = png_zalloc;
- png_ptr->zstream.zfree = png_zfree;
-@@ -641,6 +646,9 @@
- {
- #ifdef PNG_USE_LOCAL_ARRAYS
- PNG_IDAT;
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ PNG_fdAT;
-+#endif
- #endif
-
- png_debug(1, "in png_write_IDAT");
-@@ -686,7 +694,28 @@
- "Invalid zlib compression method or flags in IDAT");
- }
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ if(png_ptr->num_frames_written == 0)
-+#endif
- png_write_chunk(png_ptr, (png_bytep)png_IDAT, data, length);
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+ else
-+ {
-+ png_byte buf[4];
-+
-+ png_write_chunk_start(png_ptr, (png_bytep)png_fdAT, 4 + length);
-+
-+ png_save_uint_32(buf, png_ptr->next_seq_num);
-+ png_write_chunk_data(png_ptr, buf, 4);
-+
-+ png_write_chunk_data(png_ptr, data, length);
-+
-+ png_write_chunk_end(png_ptr);
-+
-+ png_ptr->next_seq_num++;
-+ }
-+#endif
-+
- png_ptr->mode |= PNG_HAVE_IDAT;
- }
-
-@@ -1754,6 +1783,70 @@
- }
- #endif
-
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+void /* PRIVATE */
-+png_write_acTL(png_structp png_ptr,
-+ png_uint_32 num_frames, png_uint_32 num_plays)
-+{
-+#ifdef PNG_USE_LOCAL_ARRAYS
-+ PNG_acTL;
-+#endif
-+ png_byte data[16];
-+
-+ png_debug(1, "in png_write_acTL");
-+
-+ png_ptr->num_frames_to_write = num_frames;
-+
-+ if (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN)
-+ num_frames--;
-+
-+ png_save_uint_32(data, num_frames);
-+ png_save_uint_32(data + 4, num_plays);
-+
-+ png_write_chunk(png_ptr, (png_bytep)png_acTL, data, (png_size_t)8);
-+}
-+
-+void /* PRIVATE */
-+png_write_fcTL(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
-+ png_uint_32 x_offset, png_uint_32 y_offset,
-+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op,
-+ png_byte blend_op)
-+{
-+#ifdef PNG_USE_LOCAL_ARRAYS
-+ PNG_fcTL;
-+#endif
-+ png_byte data[26];
-+
-+ png_debug(1, "in png_write_fcTL");
-+
-+ if (png_ptr->num_frames_written == 0 && (x_offset != 0 || y_offset != 0))
-+ png_error(png_ptr, "x and/or y offset for the first frame aren't 0");
-+ if (png_ptr->num_frames_written == 0 &&
-+ (width != png_ptr->first_frame_width ||
-+ height != png_ptr->first_frame_height))
-+ png_error(png_ptr, "width and/or height in the first frame's fcTL "
-+ "don't match the ones in IHDR");
-+
-+ /* more error checking */
-+ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset,
-+ delay_num, delay_den, dispose_op, blend_op);
-+
-+ png_save_uint_32(data, png_ptr->next_seq_num);
-+ png_save_uint_32(data + 4, width);
-+ png_save_uint_32(data + 8, height);
-+ png_save_uint_32(data + 12, x_offset);
-+ png_save_uint_32(data + 16, y_offset);
-+ png_save_uint_16(data + 20, delay_num);
-+ png_save_uint_16(data + 22, delay_den);
-+ data[24] = dispose_op;
-+ data[25] = blend_op;
-+
-+ png_write_chunk(png_ptr, (png_bytep)png_fcTL, data, (png_size_t)26);
-+
-+ png_ptr->next_seq_num++;
-+}
-+#endif /* PNG_WRITE_APNG_SUPPORTED */
-+
- /* Initializes the row writing capability of libpng */
- void /* PRIVATE */
- png_write_start_row(png_structp png_ptr)
-@@ -2159,8 +2252,8 @@
- #ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
- if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS)
- {
-- /* These will never be selected so we need not test them. */
-- filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);
-+ /* These use previous row */
-+ filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_AVG | PNG_FILTER_PAETH);
- }
- #endif
-
-@@ -2829,4 +2922,39 @@
- }
- #endif
- }
-+
-+#ifdef PNG_WRITE_APNG_SUPPORTED
-+void /* PRIVATE */
-+png_write_reset(png_structp png_ptr)
-+{
-+ png_ptr->row_number = 0;
-+ png_ptr->pass = 0;
-+ png_ptr->mode &= ~PNG_HAVE_IDAT;
-+}
-+
-+void /* PRIVATE */
-+png_write_reinit(png_structp png_ptr, png_infop info_ptr,
-+ png_uint_32 width, png_uint_32 height)
-+{
-+ if (png_ptr->num_frames_written == 0 &&
-+ (width != png_ptr->first_frame_width ||
-+ height != png_ptr->first_frame_height))
-+ png_error(png_ptr, "width and/or height in the first frame's fcTL "
-+ "don't match the ones in IHDR");
-+ if (width > png_ptr->first_frame_width ||
-+ height > png_ptr->first_frame_height)
-+ png_error(png_ptr, "width and/or height for a frame greater than"
-+ "the ones in IHDR");
-+
-+ png_set_IHDR(png_ptr, info_ptr, width, height,
-+ info_ptr->bit_depth, info_ptr->color_type,
-+ info_ptr->interlace_type, info_ptr->compression_type,
-+ info_ptr->filter_type);
-+
-+ png_ptr->width = width;
-+ png_ptr->height = height;
-+ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width);
-+ png_ptr->usr_width = png_ptr->width;
-+}
-+#endif
- #endif /* PNG_WRITE_SUPPORTED */
-Index: pngrtran.c
-===================================================================
---- pngrtran.c
-+++ pngrtran.c
-@@ -1352,7 +1352,7 @@
- * pixels. This check added to libpng-1.2.19
- */
- #if (PNG_WARN_UNINITIALIZED_ROW==1)
-- png_error(png_ptr, "Uninitialized row");
-+ png_warning(png_ptr, "Uninitialized row");
- #else
- png_warning(png_ptr, "Uninitialized row");
- #endif
diff --git a/libtorrent-extended/PKGBUILD b/libtorrent-extended/PKGBUILD deleted file mode 100644 index eef3cf9..0000000 --- a/libtorrent-extended/PKGBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# Maintainer: Lucky <aur.archlinux.org [at] lucky.take0ver [dot] net> -# Contributor: Daenyth <Daenyth+Arch [at] gmail [dot] com> -# Contributor: Jeff Mickey <jeff@archlinux.org> -# Contributor: sh__ - -pkgname=libtorrent-extended -_pkgname=libtorrent -pkgver=0.12.6 -pkgrel=3 -pkgdesc="BitTorrent library written in C++ with magnet link, IPv6 and bad peer patch" -url="http://libtorrent.rakshasa.no" -arch=('i686' 'x86_64') -license=('GPL') -depends=('libsigc++2.0' 'openssl') -conflicts=('libtorrent') -provides=('libtorrent') -options=('!libtool') -source=(http://libtorrent.rakshasa.no/downloads/${_pkgname}-${pkgver}.tar.gz - # support for magnet links - # http://libtorrent.rakshasa.no/ticket/955 (deleted) - # http://libtorrent.rakshasa.no/ticket/2100 - dht_pex_static_map.patch - magnet_uri.patch - object_sstr.patch - # support for IPv6 - # http://libtorrent.rakshasa.no/ticket/1111 - ipv6.patch - # support for bad peers (kick/ban) - # http://ovh.ttdpatch.net/~jdrexler/rt/experimental/bad_peer_handling.diff - # https://calomel.org/rtorrent_mods.html - bad_peer_handling.patch) -md5sums=('037499ed708aaf72988cee60e5a8d96b' - 'c8c538e26e77a0cf5951c47b86252922' - 'b1d9701ca0b8c26291c467e20d6e3eba' - '0eb6044530c1bb5bb21d5d539481c23d' - '90c5e5a374ee29737a0ad0a93c912e6a' - 'b01ebff539102c07a0192e179c3170b1') - -build() { - cd "${srcdir}/${_pkgname}-${pkgver}" - - patch -p1 < ${srcdir}/dht_pex_static_map.patch - patch -p1 < ${srcdir}/magnet_uri.patch - patch -p1 < ${srcdir}/object_sstr.patch - patch -p1 < ${srcdir}/ipv6.patch - patch -p1 < ${srcdir}/bad_peer_handling.patch - - ./autogen.sh - CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" \ - ./configure --prefix=/usr --enable-ipv6 --disable-debug || return 1 - make || return 1 - make DESTDIR="${pkgdir}" install -} -# vim:set ts=2 sw=2 et: diff --git a/libtorrent-extended/bad_peer_handling.patch b/libtorrent-extended/bad_peer_handling.patch deleted file mode 100644 index 26d9515..0000000 --- a/libtorrent-extended/bad_peer_handling.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/src/download/choke_manager.cc b/src/download/choke_manager.cc -index 4915a96..efda46c 100644 ---- a/src/download/choke_manager.cc -+++ b/src/download/choke_manager.cc -@@ -193,7 +193,8 @@ ChokeManager::set_snubbed(PeerConnectionBase* pc, ChokeManagerNode* base) { - choke_manager_erase(&m_queued, pc); - } - -- base->set_queued(false); -+ //breaks unsnubbing, ticket #989: -+ //base->set_queued(false); - } - - void -diff --git a/src/torrent/peer/peer.cc b/src/torrent/peer/peer.cc -index 3f29f82..a15a7b2 100644 ---- a/src/torrent/peer/peer.cc -+++ b/src/torrent/peer/peer.cc -@@ -63,7 +63,8 @@ bool Peer::is_down_interested() const { return c_ptr()->is_up_interested(); - - bool Peer::is_snubbed() const { return c_ptr()->is_up_snubbed(); } - void Peer::set_snubbed(bool v) { m_ptr()->set_upload_snubbed(v); } --void Peer::set_banned() { m_peerInfo->set_failed_counter(64); } -+void Peer::set_banned() { m_peerInfo->set_banned(); } -+void Peer::set_unbanned() { m_peerInfo->set_unbanned(); } - - const Rate* Peer::down_rate() const { return c_ptr()->c_peer_chunks()->download_throttle()->rate(); } - const Rate* Peer::up_rate() const { return c_ptr()->c_peer_chunks()->upload_throttle()->rate(); } -diff --git a/src/torrent/peer/peer.h b/src/torrent/peer/peer.h -index 70169ad..6d9b4f9 100644 ---- a/src/torrent/peer/peer.h -+++ b/src/torrent/peer/peer.h -@@ -69,7 +69,10 @@ public: - - bool is_snubbed() const; - void set_snubbed(bool v); -+ -+ bool is_banned() const { return peer_info()->is_banned(); } - void set_banned(); -+ void set_unbanned(); - - const HashString& id() const { return peer_info()->id(); } - const char* options() const { return peer_info()->options(); } -diff --git a/src/torrent/peer/peer_info.h b/src/torrent/peer/peer_info.h -index fe80027..9b17e61 100644 ---- a/src/torrent/peer/peer_info.h -+++ b/src/torrent/peer/peer_info.h -@@ -51,6 +51,8 @@ public: - friend class PeerList; - friend class ProtocolExtension; - -+ static const unsigned int banned_mask = 4096; -+ - static const int flag_connected = (1 << 0); - static const int flag_incoming = (1 << 1); - static const int flag_handshake = (1 << 2); -@@ -79,6 +81,10 @@ public: - uint32_t failed_counter() const { return m_failedCounter; } - void set_failed_counter(uint32_t c) { m_failedCounter = c; } - -+ bool is_banned() const { return m_failedCounter & banned_mask; } -+ void set_banned() { m_failedCounter |= banned_mask; } -+ void set_unbanned() { m_failedCounter &= ~banned_mask; } -+ - uint32_t transfer_counter() const { return m_transferCounter; } - void set_transfer_counter(uint32_t c) { m_transferCounter = c; } - diff --git a/libtorrent-extended/dht_pex_static_map.patch b/libtorrent-extended/dht_pex_static_map.patch deleted file mode 100644 index 1e767e0..0000000 --- a/libtorrent-extended/dht_pex_static_map.patch +++ /dev/null @@ -1,2353 +0,0 @@ -diff --git a/src/dht/dht_bucket.cc b/src/dht/dht_bucket.cc -index 04aa475..819f4aa 100644 ---- a/src/dht/dht_bucket.cc -+++ b/src/dht/dht_bucket.cc -@@ -52,6 +52,8 @@ DhtBucket::DhtBucket(const HashString& begin, const HashString& end) : - m_good(0), - m_bad(0), - -+ m_fullCacheLength(0), -+ - m_begin(begin), - m_end(end) { - -@@ -67,6 +69,8 @@ DhtBucket::add_node(DhtNode* n) { - m_good++; - else if (n->is_bad()) - m_bad++; -+ -+ m_fullCacheLength = 0; - } - - void -@@ -81,6 +85,8 @@ DhtBucket::remove_node(DhtNode* n) { - m_good--; - else if (n->is_bad()) - m_bad--; -+ -+ m_fullCacheLength = 0; - } - - void -@@ -92,9 +98,11 @@ DhtBucket::count() { - // Called every 15 minutes for housekeeping. - void - DhtBucket::update() { -- // For now we only update the counts after some nodes have become bad -- // due to prolonged inactivity. - count(); -+ -+ // In case adjacent buckets whose nodes we borrowed have changed, -+ // we force an update of the cache. -+ m_fullCacheLength = 0; - } - - DhtBucket::iterator -@@ -188,4 +196,23 @@ DhtBucket::split(const HashString& id) { - return other; - } - -+void -+DhtBucket::build_full_cache() { -+ DhtBucketChain chain(this); -+ -+ char* pos = m_fullCache; -+ do { -+ for (const_iterator itr = chain.bucket()->begin(); itr != chain.bucket()->end() && pos < m_fullCache + sizeof(m_fullCache); ++itr) { -+ if (!(*itr)->is_bad()) { -+ pos = (*itr)->store_compact(pos); -+ -+ if (pos > m_fullCache + sizeof(m_fullCache)) -+ throw internal_error("DhtRouter::store_closest_nodes wrote past buffer end."); -+ } -+ } -+ } while (pos < m_fullCache + sizeof(m_fullCache) && chain.next() != NULL); -+ -+ m_fullCacheLength = pos - m_fullCache; -+} -+ - } -diff --git a/src/dht/dht_bucket.h b/src/dht/dht_bucket.h -index 97622a3..bcdfd67 100644 ---- a/src/dht/dht_bucket.h -+++ b/src/dht/dht_bucket.h -@@ -111,6 +111,10 @@ public: - DhtBucket* parent() const { return m_parent; } - DhtBucket* child() const { return m_child; } - -+ // Return a full bucket's worth of compact node data. If this bucket is not -+ // full, it uses nodes from the child/parent buckets until we have enough. -+ SimpleString full_bucket(); -+ - // Called by the DhtNode on its bucket to update good/bad node counts. - void node_now_good(bool was_bad); - void node_now_bad(bool was_good); -@@ -118,6 +122,8 @@ public: - private: - void count(); - -+ void build_full_cache(); -+ - DhtBucket* m_parent; - DhtBucket* m_child; - -@@ -126,11 +132,15 @@ private: - unsigned int m_good; - unsigned int m_bad; - -+ size_t m_fullCacheLength; -+ - // These are 40 bytes together, so might as well put them last. - // m_end is const because it is used as key for the DhtRouter routing table - // map, which would be inconsistent if m_end were changed carelessly. - HashString m_begin; - const HashString m_end; -+ -+ char m_fullCache[num_nodes * 26]; - }; - - // Helper class to recursively follow a chain of buckets. It first recurses -@@ -160,6 +170,13 @@ DhtBucket::node_now_bad(bool was_good) { - m_bad++; - } - -+inline SimpleString -+DhtBucket::full_bucket() { -+ if (!m_fullCacheLength) -+ build_full_cache(); -+ return SimpleString(m_fullCache, m_fullCacheLength); -+} -+ - inline const DhtBucket* - DhtBucketChain::next() { - // m_restart is clear when we're done recursing into the children and -diff --git a/src/dht/dht_router.cc b/src/dht/dht_router.cc -index b1c95c3..ff38b8c 100644 ---- a/src/dht/dht_router.cc -+++ b/src/dht/dht_router.cc -@@ -329,24 +329,6 @@ DhtRouter::node_invalid(const HashString& id) { - delete_node(m_nodes.find(&node->id())); - } - --char* --DhtRouter::store_closest_nodes(const HashString& id, char* buffer, char* bufferEnd) { -- DhtBucketChain chain(find_bucket(id)->second); -- -- do { -- for (DhtBucket::const_iterator itr = chain.bucket()->begin(); itr != chain.bucket()->end() && buffer != bufferEnd; ++itr) { -- if (!(*itr)->is_bad()) { -- buffer = (*itr)->store_compact(buffer); -- -- if (buffer > bufferEnd) -- throw internal_error("DhtRouter::store_closest_nodes wrote past buffer end."); -- } -- } -- } while (buffer != bufferEnd && chain.next() != NULL); -- -- return buffer; --} -- - Object* - DhtRouter::store_cache(Object* container) const { - container->insert_key("self_id", str()); -@@ -470,7 +452,7 @@ DhtRouter::receive_timeout() { - for (DhtBucketList::const_iterator itr = m_routingTable.begin(); itr != m_routingTable.end(); ++itr) { - itr->second->update(); - -- if (!itr->second->is_full() || itr->second->age() > timeout_bucket_bootstrap) -+ if (!itr->second->is_full() || itr->second == bucket() || itr->second->age() > timeout_bucket_bootstrap) - bootstrap_bucket(itr->second); - } - -@@ -505,15 +487,13 @@ DhtRouter::generate_token(const rak::socket_address* sa, int token, char buffer[ - return buffer; - } - --std::string --DhtRouter::make_token(const rak::socket_address* sa) { -- char token[20]; -- -- return std::string(generate_token(sa, m_curToken, token), size_token); -+SimpleString -+DhtRouter::make_token(const rak::socket_address* sa, char* buffer) { -+ return SimpleString(generate_token(sa, m_curToken, buffer), size_token); - } - - bool --DhtRouter::token_valid(const std::string& token, const rak::socket_address* sa) { -+DhtRouter::token_valid(SimpleString token, const rak::socket_address* sa) { - if (token.length() != size_token) - return false; - -@@ -521,12 +501,12 @@ DhtRouter::token_valid(const std::string& token, const rak::socket_address* sa) - char reference[20]; - - // First try current token. -- if (std::memcmp(generate_token(sa, m_curToken, reference), token.c_str(), size_token) == 0) -+ if (token == SimpleString(generate_token(sa, m_curToken, reference), size_token)) - return true; - - // If token recently changed, some clients may be using the older one. - // That way a token is valid for 15-30 minutes, instead of 0-15. -- return std::memcmp(generate_token(sa, m_prevToken, reference), token.c_str(), size_token) == 0; -+ return token == SimpleString(generate_token(sa, m_prevToken, reference), size_token); - } - - DhtNode* -diff --git a/src/dht/dht_router.h b/src/dht/dht_router.h -index f2b673f..816747f 100644 ---- a/src/dht/dht_router.h -+++ b/src/dht/dht_router.h -@@ -115,14 +115,14 @@ public: - - // Store compact node information (26 bytes) for nodes closest to the - // given ID in the given buffer, return new buffer end. -- char* store_closest_nodes(const HashString& id, char* buffer, char* bufferEnd); -+ SimpleString get_closest_nodes(const HashString& id) { return find_bucket(id)->second->full_bucket(); } - - // Store DHT cache in the given container. - Object* store_cache(Object* container) const; - - // Create and verify a token. Tokens are valid between 15-30 minutes from creation. -- std::string make_token(const rak::socket_address* sa); -- bool token_valid(const std::string& token, const rak::socket_address* sa); -+ SimpleString make_token(const rak::socket_address* sa, char* buffer); -+ bool token_valid(SimpleString token, const rak::socket_address* sa); - - DhtManager::statistics_type get_statistics() const; - void reset_statistics() { m_server.reset_statistics(); } -@@ -147,6 +147,8 @@ private: - bool add_node_to_bucket(DhtNode* node); - void delete_node(const DhtNodeList::accessor& itr); - -+ void store_closest_nodes(const HashString& id, DhtBucket* bucket); -+ - DhtBucketList::iterator split_bucket(const DhtBucketList::iterator& itr, DhtNode* node); - - void bootstrap(); -diff --git a/src/dht/dht_server.cc b/src/dht/dht_server.cc -index 1f2234b..256b92b 100644 ---- a/src/dht/dht_server.cc -+++ b/src/dht/dht_server.cc -@@ -38,13 +38,14 @@ - #include "globals.h" - - #include <algorithm> --#include <sstream> -+#include <cstdio> - - #include "torrent/exceptions.h" - #include "torrent/connection_manager.h" - #include "torrent/object.h" - #include "torrent/object_stream.h" - #include "torrent/poll.h" -+#include "torrent/static_map.h" - #include "torrent/throttle.h" - #include "tracker/tracker_dht.h" - -@@ -63,6 +64,34 @@ const char* DhtServer::queries[] = { - "announce_peer", - }; - -+// List of all possible keys we need/support in a DHT message. -+// Unsupported keys we receive are dropped (ignored) while decoding. -+// See torrent/static_map.h for how this works. -+DhtMessage::mapping_type dht_key_names[DhtMessage::length] = { -+ { key_a_id, "a::id" }, -+ { key_a_infoHash, "a::info_hash" }, -+ { key_a_port, "a::port", }, -+ { key_a_target, "a::target" }, -+ { key_a_token, "a::token" }, -+ -+ { key_e_0, "e[0]" }, -+ { key_e_1, "e[1]" }, -+ -+ { key_q, "q" }, -+ -+ { key_r_id, "r::id" }, -+ { key_r_nodes, "r::nodes" }, -+ { key_r_token, "r::token" }, -+ { key_r_values, "r::values[]" }, -+ -+ { key_t, "t::" }, -+ { key_v, "v" }, -+ { key_y, "y" }, -+}; -+ -+template<> -+const DhtMessage::key_map_init DhtMessage::base_type::keyMap(dht_key_names); -+ - // Error in DHT protocol, avoids std::string ctor from communication_error - class dht_error : public network_error { - public: -@@ -238,54 +267,51 @@ DhtServer::update() { - } - - void --DhtServer::process_query(const Object& transactionId, const HashString& id, const rak::socket_address* sa, Object& request) { -+DhtServer::process_query(const HashString& id, const rak::socket_address* sa, const DhtMessage& msg) { - m_queriesReceived++; - m_networkUp = true; - -- std::string& query = request.get_key_string("q"); -- -- Object& arg = request.get_key("a"); -+ SimpleString query = msg[key_q].as_sstring(); - - // Construct reply. -- Object reply = Object::create_map(); -+ DhtMessage reply; - - if (query == "find_node") -- create_find_node_response(arg, reply); -+ create_find_node_response(msg, reply); - - else if (query == "get_peers") -- create_get_peers_response(arg, sa, reply); -+ create_get_peers_response(msg, sa, reply); - - else if (query == "announce_peer") -- create_announce_peer_response(arg, sa, reply); -+ create_announce_peer_response(msg, sa, reply); - - else if (query != "ping") - throw dht_error(dht_error_bad_method, "Unknown query type."); - - m_router->node_queried(id, sa); -- create_response(transactionId, sa, reply); -+ create_response(msg, sa, reply); - } - - void --DhtServer::create_find_node_response(const Object& arg, Object& reply) { -- const std::string& target = arg.get_key_string("target"); -+DhtServer::create_find_node_response(const DhtMessage& req, DhtMessage& reply) { -+ SimpleString target = req[key_a_target].as_sstring(); - - if (target.length() < HashString::size_data) - throw dht_error(dht_error_protocol, "target string too short"); - -- char compact[sizeof(compact_node_info) * DhtBucket::num_nodes]; -- char* end = m_router->store_closest_nodes(*HashString::cast_from(target), compact, compact + sizeof(compact)); -- -- if (end == compact) -+ SimpleString nodes = m_router->get_closest_nodes(*HashString::cast_from(target)); -+ if (nodes.empty()) - throw dht_error(dht_error_generic, "No nodes"); - -- reply.insert_key("nodes", std::string(compact, end)); -+ reply[key_r_nodes] = nodes; - } - - void --DhtServer::create_get_peers_response(const Object& arg, const rak::socket_address* sa, Object& reply) { -- reply.insert_key("token", m_router->make_token(sa)); -+DhtServer::create_get_peers_response(const DhtMessage& req, const rak::socket_address* sa, DhtMessage& reply) { -+ reply[key_r_token] = m_router->make_token(sa, reply.data_end); -+ reply.data_end += reply[key_r_token].as_sstring().length(); - -- const std::string& info_hash_str = arg.get_key_string("info_hash"); -+ SimpleString info_hash_str = req[key_a_infoHash].as_sstring(); - - if (info_hash_str.length() < HashString::size_data) - throw dht_error(dht_error_protocol, "info hash too short"); -@@ -296,35 +322,34 @@ DhtServer::create_get_peers_response(const Object& arg, const rak::socket_addres - - // If we're not tracking or have no peers, send closest nodes. - if (!tracker || tracker->empty()) { -- char compact[sizeof(compact_node_info) * DhtBucket::num_nodes]; -- char* end = m_router->store_closest_nodes(*info_hash, compact, compact + sizeof(compact)); -- -- if (end == compact) -+ SimpleString nodes = m_router->get_closest_nodes(*info_hash); -+ if (nodes.empty()) - throw dht_error(dht_error_generic, "No peers nor nodes"); - -- reply.insert_key("nodes", std::string(compact, end)); -+ reply[key_r_nodes] = nodes; - - } else { -- reply.insert_key("values", Object::create_list()).as_list().swap(tracker->get_peers().as_list()); -+ reply[key_r_values] = tracker->get_peers(); - } - } - - void --DhtServer::create_announce_peer_response(const Object& arg, const rak::socket_address* sa, Object& reply) { -- const std::string& info_hash = arg.get_key_string("info_hash"); -+DhtServer::create_announce_peer_response(const DhtMessage& req, const rak::socket_address* sa, DhtMessage& reply) { -+ SimpleString info_hash = req[key_a_infoHash].as_sstring(); - - if (info_hash.length() < HashString::size_data) - throw dht_error(dht_error_protocol, "info hash too short"); - -- if (!m_router->token_valid(arg.get_key_string("token"), sa)) -+ if (!m_router->token_valid(req[key_a_token].as_sstring(), sa)) - throw dht_error(dht_error_protocol, "Token invalid."); - - DhtTracker* tracker = m_router->get_tracker(*HashString::cast_from(info_hash), true); -- tracker->add_peer(sa->sa_inet()->address_n(), arg.get_key_value("port")); -+ tracker->add_peer(sa->sa_inet()->address_n(), req[key_a_port].as_value()); - } - - void --DhtServer::process_response(int transactionId, const HashString& id, const rak::socket_address* sa, Object& request) { -+DhtServer::process_response(const HashString& id, const rak::socket_address* sa, const DhtMessage& response) { -+ int transactionId = (unsigned char)response[key_t].as_sstring()[2]; - transaction_itr itr = m_transactions.find(DhtTransaction::key(sa, transactionId)); - - // Response to a transaction we don't have in our table. At this point it's -@@ -351,11 +376,9 @@ DhtServer::process_response(int transactionId, const HashString& id, const rak:: - if ((id != transaction->id() && transaction->id() != m_router->zero_id)) - return; - -- const Object& response = request.get_key("r"); -- - switch (transaction->type()) { - case DhtTransaction::DHT_FIND_NODE: -- parse_find_node_reply(transaction->as_find_node(), response.get_key_string("nodes")); -+ parse_find_node_reply(transaction->as_find_node(), response[key_r_nodes].as_sstring()); - break; - - case DhtTransaction::DHT_GET_PEERS: -@@ -381,7 +404,8 @@ DhtServer::process_response(int transactionId, const HashString& id, const rak:: - } - - void --DhtServer::process_error(int transactionId, const rak::socket_address* sa, Object& request) { -+DhtServer::process_error(const rak::socket_address* sa, const DhtMessage& error) { -+ int transactionId = (unsigned char)error[key_t].as_sstring()[2]; - transaction_itr itr = m_transactions.find(DhtTransaction::key(sa, transactionId)); - - if (itr == m_transactions.end()) -@@ -399,7 +423,7 @@ DhtServer::process_error(int transactionId, const rak::socket_address* sa, Objec - } - - void --DhtServer::parse_find_node_reply(DhtTransactionSearch* transaction, const std::string& nodes) { -+DhtServer::parse_find_node_reply(DhtTransactionSearch* transaction, SimpleString nodes) { - transaction->complete(true); - - if (sizeof(const compact_node_info) != 26) -@@ -421,16 +445,16 @@ DhtServer::parse_find_node_reply(DhtTransactionSearch* transaction, const std::s - } - - void --DhtServer::parse_get_peers_reply(DhtTransactionGetPeers* transaction, const Object& response) { -+DhtServer::parse_get_peers_reply(DhtTransactionGetPeers* transaction, const DhtMessage& response) { - DhtAnnounce* announce = static_cast<DhtAnnounce*>(transaction->as_search()->search()); - - transaction->complete(true); - -- if (response.has_key_list("values")) -- announce->receive_peers(response.get_key("values")); -+ if (response[key_r_values].is_sstring()) -+ announce->receive_peers(response[key_r_values].as_sstring()); - -- if (response.has_key_string("token")) -- add_transaction(new DhtTransactionAnnouncePeer(transaction->id(), transaction->address(), announce->target(), response.get_key_string("token")), packet_prio_low); -+ if (response[key_r_token].is_sstring()) -+ add_transaction(new DhtTransactionAnnouncePeer(transaction->id(), transaction->address(), announce->target(), response[key_r_token].as_sstring()), packet_prio_low); - - announce->update_status(); - } -@@ -490,17 +514,19 @@ DhtServer::create_query(transaction_itr itr, int tID, const rak::socket_address* - if (itr->second->id() == m_router->id()) - throw internal_error("DhtServer::create_query trying to send to itself."); - -- Object query = Object::create_map(); -+ DhtMessage query; - -- DhtTransaction* transaction = itr->second; -- char trans_id = tID; -- query.insert_key("t", std::string(&trans_id, 1)); -- query.insert_key("y", "q"); -- query.insert_key("q", queries[transaction->type()]); -- query.insert_key("v", PEER_VERSION); -+ // Transaction ID is a bencode string. -+ query[key_t] = SimpleString(query.data_end, 3); -+ *query.data_end++ = '1'; -+ *query.data_end++ = ':'; -+ *query.data_end++ = tID; - -- Object& q = query.insert_key("a", Object::create_map()); -- q.insert_key("id", m_router->str()); -+ DhtTransaction* transaction = itr->second; -+ query[key_y] = SimpleString("q", 1); -+ query[key_q] = SimpleString(queries[transaction->type()]); -+ query[key_v] = SimpleString(PEER_VERSION, 4); -+ query[key_a_id] = m_router->s_str(); - - switch (transaction->type()) { - case DhtTransaction::DHT_PING: -@@ -508,17 +534,17 @@ DhtServer::create_query(transaction_itr itr, int tID, const rak::socket_address* - break; - - case DhtTransaction::DHT_FIND_NODE: -- q.insert_key("target", transaction->as_find_node()->search()->target().str()); -+ query[key_a_target] = transaction->as_find_node()->search()->target().s_str(); - break; - - case DhtTransaction::DHT_GET_PEERS: -- q.insert_key("info_hash", transaction->as_get_peers()->search()->target().str()); -+ query[key_a_infoHash] = transaction->as_get_peers()->search()->target().s_str(); - break; - - case DhtTransaction::DHT_ANNOUNCE_PEER: -- q.insert_key("info_hash", transaction->as_announce_peer()->info_hash().str()); -- q.insert_key("token", transaction->as_announce_peer()->token()); -- q.insert_key("port", manager->connection_manager()->listen_port()); -+ query[key_a_infoHash] = transaction->as_announce_peer()->info_hash().s_str(); -+ query[key_a_token] = transaction->as_announce_peer()->token(); -+ query[key_a_port] = manager->connection_manager()->listen_port(); - break; - } - -@@ -530,31 +556,26 @@ DhtServer::create_query(transaction_itr itr, int tID, const rak::socket_address* - } - - void --DhtServer::create_response(const Object& transactionId, const rak::socket_address* sa, Object& r) { -- Object reply = Object::create_map(); -- r.insert_key("id", m_router->str()); -- -- reply.insert_key("t", transactionId); -- reply.insert_key("y", "r"); -- reply.insert_key("r", r); -- reply.insert_key("v", PEER_VERSION); -+DhtServer::create_response(const DhtMessage& req, const rak::socket_address* sa, DhtMessage& reply) { -+ reply[key_r_id] = m_router->s_str(); -+ reply[key_t] = req[key_t]; -+ reply[key_y] = SimpleString("r", 1); -+ reply[key_v] = SimpleString(PEER_VERSION, 4); - - add_packet(new DhtTransactionPacket(sa, reply), packet_prio_reply); - } - - void --DhtServer::create_error(const Object* transactionId, const rak::socket_address* sa, int num, const std::string& msg) { -- Object error = Object::create_map(); -+DhtServer::create_error(const DhtMessage& req, const rak::socket_address* sa, int num, const char* msg) { -+ DhtMessage error; - -- if (transactionId != NULL) -- error.insert_key("t", *transactionId); -+ if (req[key_t].is_sstring()) -+ error[key_t] = req[key_t]; - -- error.insert_key("y", "e"); -- error.insert_key("v", PEER_VERSION); -- -- Object& e = error.insert_key("e", Object::create_list()); -- e.insert_back(num); -- e.insert_back(msg); -+ error[key_y] = SimpleString("e", 1); -+ error[key_v] = SimpleString(PEER_VERSION, 4); -+ error[key_e_0] = num; -+ error[key_e_1] = SimpleString(msg); - - add_packet(new DhtTransactionPacket(sa, error), packet_prio_reply); - } -@@ -656,15 +677,12 @@ DhtServer::clear_transactions() { - void - DhtServer::event_read() { - uint32_t total = 0; -- std::istringstream sstream; -- -- sstream.imbue(std::locale::classic()); - - while (true) { - Object request; - rak::socket_address sa; - int type = '?'; -- const Object* transactionId = NULL; -+ DhtMessage message; - const HashString* nodeId = NULL; - - try { -@@ -675,31 +693,32 @@ DhtServer::event_read() { - break; - - total += read; -- sstream.str(std::string(buffer, read)); -- -- sstream >> request; - - // If it's not a valid bencode dictionary at all, it's probably not a DHT - // packet at all, so we don't throw an error to prevent bounce loops. -- if (sstream.fail() || !request.is_map()) -+ try { -+ staticMap_read_bencode(buffer, buffer + read, message); -+ } catch (bencode_error& e) { - continue; -+ } - -- if (!request.has_key("t")) -+ if (!message[key_t].is_sstring()) - throw dht_error(dht_error_protocol, "No transaction ID"); - -- transactionId = &request.get_key("t"); -- -- if (!request.has_key_string("y")) -+ if (!message[key_y].is_sstring()) - throw dht_error(dht_error_protocol, "No message type"); - -- if (request.get_key_string("y").length() != 1) -+ if (message[key_y].as_sstring().length() != 1) - throw dht_error(dht_error_bad_method, "Unsupported message type"); - -- type = request.get_key_string("y")[0]; -+ type = message[key_y].as_sstring()[0]; - - // Queries and replies have node ID in different dictionaries. - if (type == 'r' || type == 'q') { -- const std::string& nodeIdStr = request.get_key(type == 'q' ? "a" : "r").get_key_string("id"); -+ if (!message[type == 'q' ? key_a_id : key_r_id].is_sstring()) -+ throw dht_error(dht_error_protocol, "Invalid `id' value"); -+ -+ SimpleString nodeIdStr = message[type == 'q' ? key_a_id : key_r_id].as_sstring(); - - if (nodeIdStr.length() < HashString::size_data) - throw dht_error(dht_error_protocol, "`id' value too short"); -@@ -709,7 +728,8 @@ DhtServer::event_read() { - - // Sanity check the returned transaction ID. - if ((type == 'r' || type == 'e') && -- (!transactionId->is_string() || transactionId->as_string().length() != 1)) -+ (!message[key_t].is_sstring() || message[key_t].as_sstring().length() != 3 -+ || message[key_t].as_sstring()[0] != '1' || message[key_t].as_sstring()[1] != ':')) - throw dht_error(dht_error_protocol, "Invalid transaction ID type/length."); - - // Stupid broken implementations. -@@ -718,15 +738,15 @@ DhtServer::event_read() { - - switch (type) { - case 'q': -- process_query(*transactionId, *nodeId, &sa, request); -+ process_query(*nodeId, &sa, message); - break; - - case 'r': -- process_response(((unsigned char*)transactionId->as_string().c_str())[0], *nodeId, &sa, request); -+ process_response(*nodeId, &sa, message); - break; - - case 'e': -- process_error(((unsigned char*)transactionId->as_string().c_str())[0], &sa, request); -+ process_error(&sa, message); - break; - - default: -@@ -737,16 +757,19 @@ DhtServer::event_read() { - // so that if it repeatedly sends malformed replies we will drop it instead of propagating it - // to other nodes. - } catch (bencode_error& e) { -- if ((type == 'r' || type == 'e') && nodeId != NULL) -+ if ((type == 'r' || type == 'e') && nodeId != NULL) { - m_router->node_inactive(*nodeId, &sa); -- else -- create_error(transactionId, &sa, dht_error_protocol, std::string("Malformed packet: ") + e.what()); -+ } else { -+ snprintf(message.data_end, message.data + message.data_size - message.data_end - 1, "Malformed packet: %s", e.what()); -+ message.data[message.data_size - 1] = 0; -+ create_error(message, &sa, dht_error_protocol, message.data_end); -+ } - - } catch (dht_error& e) { - if ((type == 'r' || type == 'e') && nodeId != NULL) - m_router->node_inactive(*nodeId, &sa); - else -- create_error(transactionId, &sa, e.code(), e.what()); -+ create_error(message, &sa, e.code(), e.what()); - - } catch (network_error& e) { - -diff --git a/src/dht/dht_server.h b/src/dht/dht_server.h -index 1855b73..1f55f15 100644 ---- a/src/dht/dht_server.h -+++ b/src/dht/dht_server.h -@@ -46,6 +46,7 @@ - #include "net/throttle_node.h" - #include "download/download_info.h" // for SocketAddressCompact - #include "torrent/hash_string.h" -+#include "torrent/simple_string.h" - - #include "dht_transaction.h" - -@@ -56,6 +57,7 @@ class DhtNode; - class DhtRouter; - - class DownloadInfo; -+class DhtMessage; - class TrackerDht; - - // UDP server that handles the DHT node communications. -@@ -134,23 +136,23 @@ private: - - void start_write(); - -- void process_query(const Object& transaction, const HashString& id, const rak::socket_address* sa, Object& req); -- void process_response(int transaction, const HashString& id, const rak::socket_address* sa, Object& req); -- void process_error(int transaction, const rak::socket_address* sa, Object& req); -+ void process_query(const HashString& id, const rak::socket_address* sa, const DhtMessage& req); -+ void process_response(const HashString& id, const rak::socket_address* sa, const DhtMessage& req); -+ void process_error(const rak::socket_address* sa, const DhtMessage& error); - -- void parse_find_node_reply(DhtTransactionSearch* t, const std::string& nodes); -- void parse_get_peers_reply(DhtTransactionGetPeers* t, const Object& res); -+ void parse_find_node_reply(DhtTransactionSearch* t, SimpleString res); -+ void parse_get_peers_reply(DhtTransactionGetPeers* t, const DhtMessage& res); - - void find_node_next(DhtTransactionSearch* t); - - void add_packet(DhtTransactionPacket* packet, int priority); - void create_query(transaction_itr itr, int tID, const rak::socket_address* sa, int priority); -- void create_response(const Object& transactionID, const rak::socket_address* sa, Object& r); -- void create_error(const Object* transactionID, const rak::socket_address* sa, int num, const std::string& msg); -+ void create_response(const DhtMessage& req, const rak::socket_address* sa, DhtMessage& reply); -+ void create_error(const DhtMessage& req, const rak::socket_address* sa, int num, const char* msg); - -- void create_find_node_response(const Object& arg, Object& reply); -- void create_get_peers_response(const Object& arg, const rak::socket_address* sa, Object& reply); -- void create_announce_peer_response(const Object& arg, const rak::socket_address* sa, Object& reply); -+ void create_find_node_response(const DhtMessage& arg, DhtMessage& reply); -+ void create_get_peers_response(const DhtMessage& arg, const rak::socket_address* sa, DhtMessage& reply); -+ void create_announce_peer_response(const DhtMessage& arg, const rak::socket_address* sa, DhtMessage& reply); - - int add_transaction(DhtTransaction* t, int priority); - -diff --git a/src/dht/dht_tracker.cc b/src/dht/dht_tracker.cc -index 416dbf3..6e1afe9 100644 ---- a/src/dht/dht_tracker.cc -+++ b/src/dht/dht_tracker.cc -@@ -54,8 +54,8 @@ DhtTracker::add_peer(uint32_t addr, uint16_t port) { - - // Check if peer exists. If not, find oldest peer. - for (unsigned int i = 0; i < size(); i++) { -- if (m_peers[i].addr == compact.addr) { -- m_peers[i].port = compact.port; -+ if (m_peers[i].peer.addr == compact.addr) { -+ m_peers[i].peer.port = compact.port; - m_lastSeen[i] = cachedTime.seconds(); - return; - -@@ -77,10 +77,13 @@ DhtTracker::add_peer(uint32_t addr, uint16_t port) { - } - } - --// Return compact info (6 bytes) for up to 30 peers, returning different --// peers for each call if there are more. --Object -+// Return compact info as bencoded string (8 bytes per peer) for up to 30 peers, -+// returning different peers for each call if there are more. -+SimpleString - DhtTracker::get_peers(unsigned int maxPeers) { -+ if (sizeof(BencodeAddress) != 8) -+ throw internal_error("DhtTracker::BencodeAddress is packed incorrectly."); -+ - PeerList::iterator first = m_peers.begin(); - PeerList::iterator last = m_peers.end(); - -@@ -94,11 +97,7 @@ DhtTracker::get_peers(unsigned int maxPeers) { - last = first + maxPeers; - } - -- Object peers = Object::create_list(); -- for (; first != last; ++first) -- peers.insert_back(std::string(first->c_str(), sizeof(*first))); -- -- return peers; -+ return SimpleString(first->bencode(), last->bencode() - first->bencode()); - } - - // Remove old announces. -@@ -107,9 +106,9 @@ DhtTracker::prune(uint32_t maxAge) { - uint32_t minSeen = cachedTime.seconds() - maxAge; - - for (unsigned int i = 0; i < m_lastSeen.size(); i++) -- if (m_lastSeen[i] < minSeen) m_peers[i].port = 0; -+ if (m_lastSeen[i] < minSeen) m_peers[i].peer.port = 0; - -- m_peers.erase(std::remove_if(m_peers.begin(), m_peers.end(), rak::on(rak::mem_ref(&SocketAddressCompact::port), std::bind2nd(std::equal_to<uint16_t>(), 0))), m_peers.end()); -+ m_peers.erase(std::remove_if(m_peers.begin(), m_peers.end(), std::mem_fun_ref(&BencodeAddress::empty)), m_peers.end()); - m_lastSeen.erase(std::remove_if(m_lastSeen.begin(), m_lastSeen.end(), std::bind2nd(std::less<uint32_t>(), minSeen)), m_lastSeen.end()); - - if (m_peers.size() != m_lastSeen.size()) -diff --git a/src/dht/dht_tracker.h b/src/dht/dht_tracker.h -index 8515dd0..53fd1e3 100644 ---- a/src/dht/dht_tracker.h -+++ b/src/dht/dht_tracker.h -@@ -43,6 +43,7 @@ - #include <rak/socket_address.h> - - #include "download/download_info.h" // for SocketAddressCompact -+#include "torrent/simple_string.h" - - namespace torrent { - -@@ -65,14 +66,26 @@ public: - size_t size() const { return m_peers.size(); } - - void add_peer(uint32_t addr, uint16_t port); -- Object get_peers(unsigned int maxPeers = max_peers); -+ SimpleString get_peers(unsigned int maxPeers = max_peers); - - // Remove old announces from the tracker that have not reannounced for - // more than the given number of seconds. - void prune(uint32_t maxAge); - - private: -- typedef std::vector<SocketAddressCompact> PeerList; -+ // We need to store the address as a bencoded string. -+ struct BencodeAddress { -+ char header[2]; -+ SocketAddressCompact peer; -+ -+ BencodeAddress(const SocketAddressCompact& p) : peer(p) { header[0] = '6'; header[1] = ':'; } -+ -+ const char* bencode() const { return header; } -+ -+ bool empty() const { return !peer.port; } -+ } __attribute__ ((packed)); -+ -+ typedef std::vector<BencodeAddress> PeerList; - - PeerList m_peers; - std::vector<uint32_t> m_lastSeen; -diff --git a/src/dht/dht_transaction.cc b/src/dht/dht_transaction.cc -index 2a6a8a6..0b3cfd0 100644 ---- a/src/dht/dht_transaction.cc -+++ b/src/dht/dht_transaction.cc -@@ -123,7 +123,7 @@ DhtSearch::trim(bool final) { - // We keep: - // - the max_contacts=18 closest good or unknown nodes and all nodes closer - // than them (to see if further searches find closer ones) -- // - for announces, also the 8 closest good nodes (i.e. nodes that have -+ // - for announces, also the 3 closest good nodes (i.e. nodes that have - // replied) to have at least that many for the actual announce - // - any node that currently has transactions pending - // -@@ -136,7 +136,7 @@ DhtSearch::trim(bool final) { - // node is new and unknown otherwise - - int needClosest = final ? 0 : max_contacts; -- int needGood = is_announce() ? DhtBucket::num_nodes : 0; -+ int needGood = is_announce() ? max_announce : 0; - - // We're done if we can't find any more nodes to contact. - m_next = end(); -@@ -252,7 +252,7 @@ DhtAnnounce::start_announce() { - } - - void --DhtAnnounce::receive_peers(const Object& peers) { -+DhtAnnounce::receive_peers(SimpleString peers) { - m_tracker->receive_peers(peers); - } - -@@ -262,9 +262,9 @@ DhtAnnounce::update_status() { - } - - void --DhtTransactionPacket::build_buffer(const Object& data) { -+DhtTransactionPacket::build_buffer(const DhtMessage& msg) { - char buffer[1500]; // If the message would exceed an Ethernet frame, something went very wrong. -- object_buffer_t result = object_write_bencode_c(object_write_to_buffer, NULL, std::make_pair(buffer, buffer + sizeof(buffer)), &data); -+ object_buffer_t result = staticMap_write_bencode_c(object_write_to_buffer, NULL, std::make_pair(buffer, buffer + sizeof(buffer)), msg); - - m_length = result.second - buffer; - m_data = new char[m_length]; -@@ -277,7 +277,6 @@ DhtTransaction::DhtTransaction(int quick_timeout, int timeout, const HashString& - m_sa(*sa), - m_timeout(cachedTime.seconds() + timeout), - m_quickTimeout(cachedTime.seconds() + quick_timeout), -- m_retry(3), - m_packet(NULL) { - - } -diff --git a/src/dht/dht_transaction.h b/src/dht/dht_transaction.h -index 194316d..43b42ab 100644 ---- a/src/dht/dht_transaction.h -+++ b/src/dht/dht_transaction.h -@@ -43,6 +43,7 @@ - - #include "dht/dht_node.h" - #include "torrent/hash_string.h" -+#include "torrent/static_map.h" - - namespace torrent { - -@@ -93,6 +94,9 @@ public: - // Number of closest potential contact nodes to keep. - static const unsigned int max_contacts = 18; - -+ // Number of closest nodes we actually announce to. -+ static const unsigned int max_announce = 3; -+ - DhtSearch(const HashString& target, const DhtBucket& contacts); - virtual ~DhtSearch(); - -@@ -178,22 +182,66 @@ public: - // counts announces instead. - const_accessor start_announce(); - -- void receive_peers(const Object& peer_list); -+ void receive_peers(SimpleString peers); - void update_status(); - - private: - TrackerDht* m_tracker; - }; - -+// Possible bencode keys in a DHT message. -+enum dht_keys { -+ key_a_id, -+ key_a_infoHash, -+ key_a_port, -+ key_a_target, -+ key_a_token, -+ -+ key_e_0, -+ key_e_1, -+ -+ key_q, -+ -+ key_r_id, -+ key_r_nodes, -+ key_r_token, -+ key_r_values, -+ -+ key_t, -+ key_v, -+ key_y, -+ -+ key_LAST, -+}; -+ -+class DhtMessage : public StaticMap<dht_keys, key_LAST> { -+public: -+ typedef StaticMap<dht_keys, key_LAST> base_type; -+ typedef StaticMapKeys::mapping_type mapping_type; -+ -+ DhtMessage() : data_end(data) {}; -+ -+ // Must be big enough to hold one of the possible variable-sized reply data. -+ // Currently either: -+ // - error message (size doesn't really matter, it'll be truncated at worst) -+ // - announce token (8 bytes, needs 20 bytes buffer to build) -+ // Never more than one of the above. -+ // And additionally for queries we send: -+ // - transaction ID (3 bytes) -+ static const size_t data_size = 64; -+ char data[data_size]; -+ char* data_end; -+}; -+ - // Class holding transaction data to be transmitted. - class DhtTransactionPacket { - public: - // transaction packet -- DhtTransactionPacket(const rak::socket_address* s, const Object& d, unsigned int id, DhtTransaction* t) -+ DhtTransactionPacket(const rak::socket_address* s, const DhtMessage& d, unsigned int id, DhtTransaction* t) - : m_sa(*s), m_id(id), m_transaction(t) { build_buffer(d); }; - - // non-transaction packet -- DhtTransactionPacket(const rak::socket_address* s, const Object& d) -+ DhtTransactionPacket(const rak::socket_address* s, const DhtMessage& d) - : m_sa(*s), m_id(-cachedTime.seconds()), m_transaction(NULL) { build_buffer(d); }; - - ~DhtTransactionPacket() { delete[] m_data; } -@@ -214,7 +262,7 @@ public: - DhtTransaction* transaction() { return m_transaction; } - - private: -- void build_buffer(const Object& data); -+ void build_buffer(const DhtMessage& data); - - rak::socket_address m_sa; - char* m_data; -@@ -255,9 +303,6 @@ public: - int quick_timeout() { return m_quickTimeout; } - bool has_quick_timeout() { return m_hasQuickTimeout; } - -- int dec_retry() { return m_retry--; } -- int retry() { return m_retry; } -- - DhtTransactionPacket* packet() { return m_packet; } - void set_packet(DhtTransactionPacket* p) { m_packet = p; } - -@@ -282,7 +327,6 @@ private: - rak::socket_address m_sa; - int m_timeout; - int m_quickTimeout; -- int m_retry; - DhtTransactionPacket* m_packet; - }; - -@@ -337,7 +381,7 @@ public: - - class DhtTransactionAnnouncePeer : public DhtTransaction { - public: -- DhtTransactionAnnouncePeer(const HashString& id, const rak::socket_address* sa, const HashString& infoHash, const std::string& token) -+ DhtTransactionAnnouncePeer(const HashString& id, const rak::socket_address* sa, const HashString& infoHash, SimpleString token) - : DhtTransaction(-1, 30, id, sa), - m_infoHash(infoHash), - m_token(token) { } -@@ -345,11 +389,11 @@ public: - virtual transaction_type type() { return DHT_ANNOUNCE_PEER; } - - const HashString& info_hash() { return m_infoHash; } -- const std::string& token() { return m_token; } -+ SimpleString token() { return m_token; } - - private: - HashString m_infoHash; -- std::string m_token; -+ SimpleString m_token; - }; - - inline bool -diff --git a/src/download/download_constructor.cc b/src/download/download_constructor.cc -index fc2a272..f37f848 100644 ---- a/src/download/download_constructor.cc -+++ b/src/download/download_constructor.cc -@@ -36,6 +36,7 @@ - - #include "config.h" - -+#include <cstdio> - #include <cstring> - #include <string.h> - #include <rak/functional.h> -diff --git a/src/net/address_list.cc b/src/net/address_list.cc -index 2fc3992..e5cf3cb 100644 ---- a/src/net/address_list.cc -+++ b/src/net/address_list.cc -@@ -70,7 +70,7 @@ AddressList::parse_address_normal(const Object::list_type& b) { - } - - void --AddressList::parse_address_compact(const std::string& s) { -+AddressList::parse_address_compact(SimpleString s) { - if (sizeof(const SocketAddressCompact) != 6) - throw internal_error("ConnectionList::AddressList::parse_address_compact(...) bad struct size."); - -@@ -79,4 +79,18 @@ AddressList::parse_address_compact(const std::string& s) { - std::back_inserter(*this)); - } - -+void -+AddressList::parse_address_bencode(SimpleString s) { -+ if (sizeof(const SocketAddressCompact) != 6) -+ throw internal_error("AddressList::parse_address_bencode(...) bad struct size."); -+ -+ while (s.length() >= 2 + sizeof(SocketAddressCompact)) { -+ if (s[0] != '6' || s[1] != ':') -+ break; -+ -+ insert(end(), *reinterpret_cast<const SocketAddressCompact*>(s.c_str() + 2)); -+ s = SimpleString(s.c_str() + 2 + sizeof(SocketAddressCompact), s.length() - 2 - sizeof(SocketAddressCompact)); -+ } -+} -+ - } -diff --git a/src/net/address_list.h b/src/net/address_list.h -index e4d2009..10dbac4 100644 ---- a/src/net/address_list.h -+++ b/src/net/address_list.h -@@ -42,6 +42,7 @@ - #include <rak/socket_address.h> - - #include <torrent/object.h> -+#include <torrent/simple_string.h> - - namespace torrent { - -@@ -49,7 +50,8 @@ class AddressList : public std::list<rak::socket_address> { - public: - // Parse normal or compact list of addresses and add to AddressList - void parse_address_normal(const Object::list_type& b); -- void parse_address_compact(const std::string& s); -+ void parse_address_compact(SimpleString s); -+ void parse_address_bencode(SimpleString s); - - private: - static rak::socket_address parse_address(const Object& b); -diff --git a/src/protocol/extensions.cc b/src/protocol/extensions.cc -index f3464af..7cbf6e3 100644 ---- a/src/protocol/extensions.cc -+++ b/src/protocol/extensions.cc -@@ -37,7 +37,7 @@ - #include "config.h" - - #include <limits> --#include <sstream> -+#include <stdarg.h> - - #include <cstdio> - -@@ -49,18 +49,62 @@ - #include "torrent/object_stream.h" - #include "torrent/peer/connection_list.h" - #include "torrent/peer/peer_info.h" --#include "tracker/tracker_http.h" -+#include "torrent/static_map.h" - #include "manager.h" - - #include "extensions.h" - - namespace torrent { - --const char* ProtocolExtension::message_keys[] = { -- "HANDSHAKE", -- "ut_pex", -+enum ext_handshake_keys { -+ key_e, -+ key_m_utPex, -+ key_p, -+ key_reqq, -+ key_v, -+ key_handshake_LAST - }; - -+enum ext_pex_keys { -+ key_pex_added, -+ key_pex_LAST -+}; -+ -+class ExtHandshakeMessage : public StaticMap<ext_handshake_keys, key_handshake_LAST> { -+public: -+ typedef StaticMap<ext_handshake_keys, key_handshake_LAST> base_type; -+ typedef StaticMapKeys::mapping_type mapping_type; -+}; -+ -+class ExtPEXMessage : public StaticMap<ext_pex_keys, key_pex_LAST> { -+public: -+ typedef StaticMap<ext_pex_keys, key_pex_LAST> base_type; -+ typedef StaticMapKeys::mapping_type mapping_type; -+}; -+ -+ExtHandshakeMessage::mapping_type ext_handshake_key_names[ExtHandshakeMessage::length] = { -+ { key_e, "e" }, -+ { key_m_utPex, "m::ut_pex" }, -+ { key_p, "p" }, -+ { key_reqq, "reqq" }, -+ { key_v, "v" }, -+}; -+ -+ExtPEXMessage::mapping_type ext_pex_key_names[ExtPEXMessage::length] = { -+ { key_pex_added, "added" }, -+}; -+ -+ext_handshake_keys message_keys[ProtocolExtension::FIRST_INVALID] = { -+ key_handshake_LAST, // Handshake, not actually used. -+ key_m_utPex, -+}; -+ -+template<> -+const ExtHandshakeMessage::key_map_init ExtHandshakeMessage::base_type::keyMap(ext_handshake_key_names); -+ -+template<> -+const ExtPEXMessage::key_map_init ExtPEXMessage::base_type::keyMap(ext_pex_key_names); -+ - void - ProtocolExtension::cleanup() { - // if (is_default()) -@@ -105,23 +149,21 @@ ProtocolExtension::unset_local_enabled(int t) { - - DataBuffer - ProtocolExtension::generate_handshake_message() { -- Object map = Object::create_map(); -- Object message = Object::create_map(); -- -- map.insert_key(message_keys[UT_PEX], is_local_enabled(UT_PEX) ? 1 : 0); -+ ExtHandshakeMessage message; - - // Add "e" key if encryption is enabled, set it to 1 if we require - // encryption for incoming connections, or 0 otherwise. - if ((manager->connection_manager()->encryption_options() & ConnectionManager::encryption_allow_incoming) != 0) -- message.insert_key("e", (manager->connection_manager()->encryption_options() & ConnectionManager::encryption_require) != 0); -+ message[key_e] = (manager->connection_manager()->encryption_options() & ConnectionManager::encryption_require) != 0; -+ -+ message[key_p] = manager->connection_manager()->listen_port(); -+ message[key_v] = SimpleString("libTorrent " VERSION); -+ message[key_reqq] = 2048; // maximum request queue size - -- message.insert_key("m", map); -- message.insert_key("p", manager->connection_manager()->listen_port()); -- message.insert_key("v", "libTorrent " VERSION); -- message.insert_key("reqq", 2048); // maximum request queue size -+ message[key_m_utPex] = is_local_enabled(UT_PEX) ? UT_PEX : 0; - - char buffer[1024]; -- object_buffer_t result = object_write_bencode_c(object_write_to_buffer, NULL, std::make_pair(buffer, buffer + sizeof(buffer)), &message); -+ object_buffer_t result = staticMap_write_bencode_c(object_write_to_buffer, NULL, std::make_pair(buffer, buffer + sizeof(buffer)), message); - - int length = result.second - buffer; - char* copy = new char[length]; -@@ -130,21 +172,30 @@ ProtocolExtension::generate_handshake_message() { - return DataBuffer(copy, copy + length); - } - --DataBuffer --ProtocolExtension::generate_toggle_message(ProtocolExtension::MessageType t, bool on) { -- // TODO: Check if we're accepting this message type? -+inline DataBuffer -+ProtocolExtension::build_bencode(size_t maxLength, const char* format, ...) { -+ char* b = new char[maxLength]; - -- // Manually create bencoded map { "m" => { message_keys[t] => on ? t : 0 } } -- char* b = new char[32]; -- unsigned int length = snprintf(b, 32, "d1:md%zu:%si%deee", strlen(message_keys[t]), message_keys[t], on ? t : 0); -+ va_list args; -+ va_start(args, format); -+ unsigned int length = vsnprintf(b, maxLength, format, args); -+ va_end(args); - -- if (length > 32) -- throw internal_error("ProtocolExtension::toggle_message wrote past buffer."); -+ if (length > maxLength) -+ throw internal_error("ProtocolExtension::build_bencode wrote past buffer."); - - return DataBuffer(b, b + length); - } - - DataBuffer -+ProtocolExtension::generate_toggle_message(MessageType t, bool on) { -+ // TODO: Check if we're accepting this message type? -+ -+ // Manually create bencoded map { "m" => { message_keys[t] => on ? t : 0 } } -+ return build_bencode(32, "d1:md%zu:%si%deee", strlen(ext_handshake_key_names[message_keys[t]].key) - 3, ext_handshake_key_names[message_keys[t]].key + 3, on ? t : 0); -+} -+ -+DataBuffer - ProtocolExtension::generate_ut_pex_message(const PEXList& added, const PEXList& removed) { - if (added.empty() && removed.empty()) - return DataBuffer(); -@@ -195,37 +246,30 @@ ProtocolExtension::read_start(int type, uint32_t length, bool skip) { - - void - ProtocolExtension::read_done() { -- if (m_readType == SKIP_EXTENSION) { -- delete [] m_read; -- m_read = NULL; -- return; -- } -+ try { -+ switch(m_readType) { -+ case SKIP_EXTENSION: -+ break; - -- std::stringstream s(std::string(m_read, m_readPos)); -- s.imbue(std::locale::classic()); -+ case HANDSHAKE: -+ parse_handshake(); -+ break; - -- delete [] m_read; -- m_read = NULL; -- -- Object message; -- s >> message; -+ case UT_PEX: -+ parse_ut_pex(); -+ break; - -- if (s.fail() || !message.is_map()) -- throw communication_error("Invalid extension message."); -- -- switch(m_readType) { -- case HANDSHAKE: -- parse_handshake(message); -- break; -- -- case UT_PEX: -- parse_ut_pex(message); -- break; -+ default: -+ throw internal_error("ProtocolExtension::read_done called with invalid extension type."); -+ } - -- default: -- throw internal_error("ProtocolExtension::down_extension_finished called with invalid extension type."); -+ } catch (bencode_error& e) { -+ // Ignore malformed messages. - } - -+ delete [] m_read; -+ m_read = NULL; -+ - m_readType = FIRST_INVALID; - m_flags |= flag_received_ext; - } -@@ -242,24 +286,22 @@ ProtocolExtension::peer_toggle_remote(int type, bool active) { - } - - void --ProtocolExtension::parse_handshake(const Object& message) { -- if (message.has_key_map("m")) { -- const Object& idMap = message.get_key("m"); -+ProtocolExtension::parse_handshake() { -+ ExtHandshakeMessage message; -+ staticMap_read_bencode(m_read, m_readPos, message); - -- for (int t = HANDSHAKE + 1; t < FIRST_INVALID; t++) { -- if (!idMap.has_key_value(message_keys[t])) -- continue; -+ for (int t = HANDSHAKE + 1; t < FIRST_INVALID; t++) { -+ if (!message[message_keys[t]].is_value()) -+ continue; - -- uint8_t id = idMap.get_key_value(message_keys[t]); -+ uint8_t id = message[message_keys[t]].as_value(); - -- set_remote_supported(t); -+ set_remote_supported(t); - -- if (id != m_idMap[t - 1]) { -- peer_toggle_remote(t, id != 0); -- -- m_idMap[t - 1] = id; -- } -+ if (id != m_idMap[t - 1]) { -+ peer_toggle_remote(t, id != 0); - -+ m_idMap[t - 1] = id; - } - } - -@@ -271,29 +313,32 @@ ProtocolExtension::parse_handshake(const Object& message) { - unset_local_enabled(t); - } - -- if (message.has_key_value("p")) { -- uint16_t port = message.get_key_value("p"); -+ if (message[key_p].is_value()) { -+ uint16_t port = message[key_p].as_value(); - - if (port > 0) - m_peerInfo->set_listen_port(port); - } - -- if (message.has_key_value("reqq")) -- m_maxQueueLength = message.get_key_value("reqq"); -+ if (message[key_reqq].is_value()) -+ m_maxQueueLength = message[key_reqq].as_value(); - - m_flags &= ~flag_initial_handshake; - } - - void --ProtocolExtension::parse_ut_pex(const Object& message) { -+ProtocolExtension::parse_ut_pex() { - // Ignore message if we're still in the handshake (no connection - // yet), or no peers are present. - -+ ExtPEXMessage message; -+ staticMap_read_bencode(m_read, m_readPos, message); -+ - // TODO: Check if pex is enabled? -- if (!message.has_key_string("added")) -+ if (!message[key_pex_added].is_sstring()) - return; - -- const std::string& peers = message.get_key_string("added"); -+ SimpleString peers = message[key_pex_added].as_sstring(); - if (peers.empty()) - return; - -diff --git a/src/protocol/extensions.h b/src/protocol/extensions.h -index 1c370fc..96ed652 100644 ---- a/src/protocol/extensions.h -+++ b/src/protocol/extensions.h -@@ -46,6 +46,13 @@ - #include "download/download_info.h" - #include "net/data_buffer.h" - -+// Not really important, so no need to make this a configure check. -+#ifdef __GNUC__ -+#define ATTRIBUTE_PRINTF(num) __attribute__ ((format (printf, num, num+1))) -+#else -+#define ATTRIBUTE_PRINTF(num) -+#endif -+ - namespace torrent { - - class ProtocolExtension { -@@ -71,8 +78,6 @@ public: - static const int flag_local_enabled_base = 1<<8; - static const int flag_remote_supported_base = 1<<16; - -- static const char* message_keys[FIRST_INVALID]; -- - // Number of extensions we support, not counting handshake. - static const int extension_count = FIRST_INVALID - HANDSHAKE - 1; - -@@ -128,8 +133,10 @@ public: - void reset() { std::memset(&m_idMap, 0, sizeof(m_idMap)); } - - private: -- void parse_handshake(const Object& message); -- void parse_ut_pex(const Object& message); -+ void parse_handshake(); -+ void parse_ut_pex(); -+ -+ static DataBuffer build_bencode(size_t maxLength, const char* format, ...) ATTRIBUTE_PRINTF(2); - - void peer_toggle_remote(int type, bool active); - -diff --git a/src/torrent/Makefile.am b/src/torrent/Makefile.am -index bec124d..820ce52 100644 ---- a/src/torrent/Makefile.am -+++ b/src/torrent/Makefile.am -@@ -41,6 +41,9 @@ libsub_torrent_la_SOURCES = \ - rate.h \ - resume.cc \ - resume.h \ -+ simple_string.h \ -+ static_map.cc \ -+ static_map.h \ - throttle.cc \ - throttle.h \ - torrent.cc \ -@@ -74,6 +77,8 @@ libtorrentinclude_HEADERS = \ - poll_select.h \ - rate.h \ - resume.h \ -+ simple_string.h \ -+ static_map.h \ - throttle.h \ - torrent.h \ - tracker.h \ -diff --git a/src/torrent/hash_string.h b/src/torrent/hash_string.h -index f62d450..14623f7 100644 ---- a/src/torrent/hash_string.h -+++ b/src/torrent/hash_string.h -@@ -44,6 +44,7 @@ - #include <string> - #include <iterator> - #include <torrent/common.h> -+#include <torrent/simple_string.h> - - namespace torrent { - -@@ -85,6 +86,8 @@ public: - - std::string str() const { return std::string(m_data, size_data); } - -+ SimpleString s_str() const { return SimpleString(m_data, size_data); } -+ - void clear(int v = 0) { std::memset(data(), v, size()); } - - void assign(const value_type* src) { std::memcpy(data(), src, size()); } -@@ -96,6 +99,7 @@ public: - // size_data. - static const HashString* cast_from(const char* src) { return (const HashString*)src; } - static const HashString* cast_from(const std::string& src) { return (const HashString*)src.c_str(); } -+ static const HashString* cast_from(const SimpleString& src){ return (const HashString*)src.c_str(); } - - static HashString* cast_from(char* src) { return (HashString*)src; } - -diff --git a/src/torrent/object.cc b/src/torrent/object.cc -index 2b1cf41..3a0bcae 100644 ---- a/src/torrent/object.cc -+++ b/src/torrent/object.cc -@@ -195,6 +195,7 @@ Object::operator = (const Object& src) { - case TYPE_STRING: m_string = new string_type(*src.m_string); break; - case TYPE_LIST: m_list = new list_type(*src.m_list); break; - case TYPE_MAP: m_map = new map_type(*src.m_map); break; -+ case TYPE_SSTRING:m_sstring = src.m_sstring; break; - } - - return *this; -diff --git a/src/torrent/object.h b/src/torrent/object.h -index 7ad040b..6cc4e4a 100644 ---- a/src/torrent/object.h -+++ b/src/torrent/object.h -@@ -42,6 +42,7 @@ - #include <list> - #include <torrent/common.h> - #include <torrent/exceptions.h> -+#include <torrent/simple_string.h> - - namespace torrent { - -@@ -82,13 +83,16 @@ public: - TYPE_VALUE, - TYPE_STRING, - TYPE_LIST, -- TYPE_MAP -+ TYPE_MAP, -+ TYPE_SSTRING, // Only used in StaticMap. - }; - - Object() : m_flags(TYPE_NONE) {} - Object(const value_type v) : m_flags(TYPE_VALUE), m_value(v) {} - Object(const char* s) : m_flags(TYPE_STRING), m_string(new string_type(s)) {} - Object(const string_type& s) : m_flags(TYPE_STRING), m_string(new string_type(s)) {} -+ Object(const char* s, size_t l) : m_flags(TYPE_SSTRING), m_sstring(SimpleString(s, l)) {} -+ Object(SimpleString s) : m_flags(TYPE_SSTRING), m_sstring(s) {} - Object(const Object& b); - - ~Object() { clear(); } -@@ -96,6 +100,7 @@ public: - // Move this out of the class namespace, call them create_object_. - static Object create_value() { return Object(value_type()); } - static Object create_string() { return Object(string_type()); } -+ static Object create_sstring(){ return Object(SimpleString()); } - static Object create_list() { Object tmp; tmp.m_flags = TYPE_LIST; tmp.m_list = new list_type(); return tmp; } - static Object create_map() { Object tmp; tmp.m_flags = TYPE_MAP; tmp.m_map = new map_type(); return tmp; } - -@@ -120,6 +125,7 @@ public: - bool is_string() const { return type() == TYPE_STRING; } - bool is_list() const { return type() == TYPE_LIST; } - bool is_map() const { return type() == TYPE_MAP; } -+ bool is_sstring() const { return type() == TYPE_SSTRING; } - - value_type& as_value() { check_throw(TYPE_VALUE); return m_value; } - const value_type& as_value() const { check_throw(TYPE_VALUE); return m_value; } -@@ -133,6 +139,9 @@ public: - map_type& as_map() { check_throw(TYPE_MAP); return *m_map; } - const map_type& as_map() const { check_throw(TYPE_MAP); return *m_map; } - -+ SimpleStringBase& as_sstring() { check_throw(TYPE_SSTRING); return m_sstring; } -+ SimpleString as_sstring() const { check_throw(TYPE_SSTRING); return m_sstring; } -+ - bool has_key(const key_type& k) const { check_throw(TYPE_MAP); return m_map->find(k) != m_map->end(); } - bool has_key_value(const key_type& k) const { check_throw(TYPE_MAP); return check(m_map->find(k), TYPE_VALUE); } - bool has_key_string(const key_type& k) const { check_throw(TYPE_MAP); return check(m_map->find(k), TYPE_STRING); } -@@ -200,6 +209,7 @@ public: - string_type* m_string; - list_type* m_list; - map_type* m_map; -+ SimpleStringBase m_sstring; - }; - }; - -@@ -211,6 +221,7 @@ Object::Object(const Object& b) : m_flags(b.type()) { - case TYPE_STRING: m_string = new string_type(*b.m_string); break; - case TYPE_LIST: m_list = new list_type(*b.m_list); break; - case TYPE_MAP: m_map = new map_type(*b.m_map); break; -+ case TYPE_SSTRING:m_sstring = b.m_sstring; break; - } - } - -@@ -222,6 +233,7 @@ Object::clear() { - case TYPE_STRING: delete m_string; break; - case TYPE_LIST: delete m_list; break; - case TYPE_MAP: delete m_map; break; -+ case TYPE_SSTRING:break; - } - - // Only clear type? -diff --git a/src/torrent/object_stream.cc b/src/torrent/object_stream.cc -index 18eb849..73c816b 100644 ---- a/src/torrent/object_stream.cc -+++ b/src/torrent/object_stream.cc -@@ -38,12 +38,14 @@ - - #include <iterator> - #include <iostream> -+#include <sstream> - #include <rak/functional.h> - - #include "utils/sha1.h" - - #include "object.h" - #include "object_stream.h" -+#include "static_map.h" - - namespace torrent { - -@@ -63,6 +65,18 @@ object_read_string(std::istream* input, std::string& str) { - return !input->fail(); - } - -+Object -+object_get_sstring(const char** buffer) { -+ /*const*/ char* next; -+ size_t length = strtoumax(*buffer, &next, 10); -+ -+ if (next == *buffer || *next != ':') -+ return Object(); -+ -+ *buffer = next + 1 + length; -+ return Object(next + 1, length); -+} -+ - // Could consider making this non-recursive, but they seldomly are - // deep enough to make that worth-while. - void -@@ -159,6 +173,133 @@ object_read_bencode(std::istream* input, Object* object, uint32_t depth) { - object->clear(); - } - -+const char* -+staticMap_read_bencode_c(const char* buffer, const char* bufferEnd, uint32_t depth, Object* values, const StaticMapKeys& keys, bool discard) { -+ if (buffer >= bufferEnd) -+ return bufferEnd; -+ -+ // Undecoded bencode object. -+ if (!discard && keys.type() == StaticMapKeys::TYPE_BENCODE) { -+ const char* begin = buffer; -+ buffer = staticMap_read_bencode_c(buffer, bufferEnd, ++depth, values, keys, true); -+ values[keys.index_begin()] = SimpleString(begin, buffer - begin); -+ return buffer; -+ } -+ -+ if (!discard && keys.type() == StaticMapKeys::TYPE_BENCODE_LIST && *buffer != 'l') -+ discard = true; -+ -+ switch (*buffer) { -+ case 'i': { -+ char* next; -+ intmax_t value = strtoimax(++buffer, &next, 10); -+ -+ if (next == buffer || next > bufferEnd || *next != 'e') -+ break; -+ -+ if (!discard && keys.type() == StaticMapKeys::TYPE_VALUE) -+ values[keys.index_begin()] = (int64_t)value; -+ -+ return next + 1; -+ } -+ -+ case 'l': { -+ ++buffer; -+ if (++depth >= 1024) -+ break; -+ -+ // Want undecoded bencode list: find end of list. -+ if (!discard && keys.type() == StaticMapKeys::TYPE_BENCODE_LIST) { -+ const char* end = buffer; -+ while (end < bufferEnd && *end != 'e') -+ end = staticMap_read_bencode_c(end, bufferEnd, depth, values, keys, true); -+ -+ values[keys.index_begin()] = SimpleString(buffer, end - buffer); -+ return ++end; -+ } -+ -+ StaticMapKeys::const_iterator itr = keys.begin(); -+ while (buffer != bufferEnd) { -+ if (*buffer == 'e') -+ return ++buffer; -+ -+ discard |= itr == keys.end(); -+ buffer = staticMap_read_bencode_c(buffer, bufferEnd, depth, values, discard ? keys : *itr, discard); -+ -+ if (itr != keys.end()) -+ ++itr; -+ } -+ -+ break; -+ } -+ -+ case 'd': { -+ ++buffer; -+ if (++depth >= 1024) -+ break; -+ -+ StaticMapKeys::const_iterator itr = keys.begin(); -+ SimpleString last; -+ bool discardThis = discard; -+ -+ while (buffer != bufferEnd) { -+ if (*buffer == 'e') -+ return ++buffer; -+ -+ Object keyObj = object_get_sstring(&buffer); -+ if (!keyObj.is_sstring()) -+ break; -+ -+ SimpleString key = keyObj.as_sstring(); -+ if (key.end() >= bufferEnd) -+ break; -+ -+ if (key < last) { -+ itr = keys.begin(); -+ discardThis = discard; -+ } -+ -+ discardThis |= itr == keys.end(); -+ int cmp = discardThis ? -1 : key.cmp(itr->key()); -+ while (cmp > 0) { -+ if (++itr == keys.end()) { -+ cmp = -1; -+ discardThis = true; -+ break; -+ } -+ -+ cmp = key.cmp(itr->key()); -+ } -+ -+ buffer = staticMap_read_bencode_c(buffer, bufferEnd, depth, values, cmp ? keys : *itr, cmp); -+ -+ last = key; -+ } -+ -+ break; -+ } -+ -+ default: -+ if (*buffer < '0' || *buffer > '9') -+ break; -+ -+ Object strObj = object_get_sstring(&buffer); -+ if (!strObj.is_sstring()) -+ break; -+ -+ SimpleString str = strObj.as_sstring(); -+ if (str.end() >= bufferEnd) -+ break; -+ -+ if (!discard && keys.type() == StaticMapKeys::TYPE_VALUE) -+ values[keys.index_begin()] = str; -+ -+ return str.end(); -+ } -+ -+ throw bencode_error("Invalid bencode data."); -+} -+ - void - object_write_bencode(std::ostream* output, const Object* object) { - char buffer[1024]; -@@ -267,6 +408,7 @@ void - object_write_bencode_c_object(object_write_data_t* output, const Object* object) { - switch (object->type()) { - case Object::TYPE_NONE: -+ case Object::TYPE_SSTRING: - break; - - case Object::TYPE_VALUE: -@@ -306,6 +448,86 @@ object_write_bencode_c_object(object_write_data_t* output, const Object* object) - } - } - -+void -+staticMap_write_bencode_c_values(object_write_data_t* output, const Object* values, const StaticMapKeys& keys) { -+ if (keys.type() == StaticMapKeys::TYPE_LIST) { -+ size_t indexEnd = keys.index_begin(); -+ while (indexEnd < keys.index_end() && values[indexEnd].type() != Object::TYPE_NONE) -+ indexEnd++; -+ -+ // Empty list? Drop it. Sparse lists are not possible so only check first element. -+ if (indexEnd == keys.index_begin()) -+ return; -+ -+ object_write_bencode_c_char(output, 'l'); -+ StaticMapKeys::const_iterator itr = keys.begin(); -+ size_t index = keys.index_begin(); -+ while (index < indexEnd) { -+ staticMap_write_bencode_c_values(output, values, *itr); -+ index = itr->index_end(); -+ if (++itr == keys.end() && index != indexEnd) -+ throw internal_error("staticMap_write_bencode_c_values reached end of list before end of index list."); -+ } -+ object_write_bencode_c_char(output, 'e'); -+ -+ } else if (keys.type() == StaticMapKeys::TYPE_DICT) { -+ // Find next non-empty entry. -+ size_t next = keys.index_begin(); -+ while (values[next].type() == Object::TYPE_NONE) -+ if (++next == keys.index_end()) -+ return; -+ -+ object_write_bencode_c_char(output, 'd'); -+ StaticMapKeys::const_iterator itr = keys.begin(); -+ while (next < keys.index_end()) { -+ while (itr->index_end() <= next) -+ if (++itr == keys.end()) -+ throw internal_error("staticMap_write_bencode_c_values reached end of keys before end of index list."); -+ -+ object_write_bencode_c_value(output, itr->key().size()); -+ object_write_bencode_c_char(output, ':'); -+ object_write_bencode_c_string(output, itr->key().c_str(), itr->key().size()); -+ -+ staticMap_write_bencode_c_values(output, values, *itr); -+ -+ next = itr->index_end(); -+ while (next < keys.index_end() && values[next].type() == Object::TYPE_NONE) -+ ++next; -+ } -+ object_write_bencode_c_char(output, 'e'); -+ -+ // Undecoded bencode value. -+ } else if (keys.type() == StaticMapKeys::TYPE_BENCODE) { -+ SimpleString value = values[keys.index_begin()].as_sstring(); -+ object_write_bencode_c_string(output, value.c_str(), value.size()); -+ -+ } else if (keys.type() == StaticMapKeys::TYPE_BENCODE_LIST) { -+ SimpleString value = values[keys.index_begin()].as_sstring(); -+ object_write_bencode_c_char(output, 'l'); -+ object_write_bencode_c_string(output, value.c_str(), value.size()); -+ object_write_bencode_c_char(output, 'e'); -+ -+ } else if (keys.type() != StaticMapKeys::TYPE_VALUE) { -+ throw internal_error("staticMap_write_bencode_c_values received key keys with invalid values type."); -+ -+ } else if (values[keys.index_begin()].type() == Object::TYPE_NONE) { -+ -+ } else if (values[keys.index_begin()].type() == Object::TYPE_VALUE) { -+ object_write_bencode_c_char(output, 'i'); -+ object_write_bencode_c_value(output, values[keys.index_begin()].as_value()); -+ object_write_bencode_c_char(output, 'e'); -+ -+ } else if (values[keys.index_begin()].type() == Object::TYPE_SSTRING) { -+ SimpleString value = values[keys.index_begin()].as_sstring(); -+ object_write_bencode_c_value(output, value.size()); -+ object_write_bencode_c_char(output, ':'); -+ object_write_bencode_c_string(output, value.c_str(), value.size()); -+ -+ } else { -+ throw internal_error("staticMap_write_bencode_c_values received key keys with invalid values type."); -+ } -+} -+ - object_buffer_t - object_write_bencode_c(object_write_t writeFunc, void* data, object_buffer_t buffer, const Object* object) { - object_write_data_t output; -@@ -327,6 +549,32 @@ object_write_bencode_c(object_write_t writeFunc, void* data, object_buffer_t buf - } - - object_buffer_t -+staticMap_write_bencode_c_wrap(object_write_t writeFunc, void* data, object_buffer_t buffer, const Object* values, const StaticMapKeys& map) { -+ object_write_data_t output; -+ output.writeFunc = writeFunc; -+ output.data = data; -+ output.buffer = buffer; -+ output.pos = buffer.first; -+ -+ staticMap_write_bencode_c_values(&output, values, map); -+#ifdef USE_EXTRA_DEBUG -+ std::istringstream sstream; -+ sstream.imbue(std::locale::classic()); -+ sstream.str(std::string(output.buffer.first, output.pos)); -+ Object request; -+ sstream >> request; -+ if (sstream.fail()) -+ throw internal_error("staticMap_write_bencode_c_wrap failed to create valid bencode format."); -+#endif -+ -+ // Don't flush the buffer. -+ if (output.pos == output.buffer.first) -+ return output.buffer; -+ -+ return output.writeFunc(output.data, object_buffer_t(output.buffer.first, output.pos)); -+} -+ -+object_buffer_t - object_write_to_buffer(void* data, object_buffer_t buffer) { - if (buffer.first == buffer.second) - throw internal_error("object_write_to_buffer(...) buffer overflow."); -diff --git a/src/torrent/object_stream.h b/src/torrent/object_stream.h -index 41cf82a..b399bf7 100644 ---- a/src/torrent/object_stream.h -+++ b/src/torrent/object_stream.h -@@ -43,6 +43,10 @@ - - namespace torrent { - -+template<typename tmpl_key_type, size_t tmpl_length> -+class StaticMap; -+class StaticMapKeys; -+ - std::string object_sha1(const Object* object) LIBTORRENT_EXPORT; - - // Assumes the stream's locale has been set to POSIX or C. Max depth -@@ -53,6 +57,18 @@ void object_read_bencode(std::istream* input, Object* object, uint32_t depth = 0 - // Assumes the stream's locale has been set to POSIX or C. - void object_write_bencode(std::ostream* output, const Object* object) LIBTORRENT_EXPORT; - -+// Convert buffer to static key map. Inlined because we don't want -+// a separate wrapper function for each template argument. -+template<typename tmpl_key_type, size_t tmpl_length> -+inline const char* -+staticMap_read_bencode(const char* buffer, const char* bufferEnd, StaticMap<tmpl_key_type, tmpl_length>& map) { -+ return staticMap_read_bencode_c(buffer, bufferEnd, 0, map.values(), map.map(), false); -+}; -+ -+// Internal use only. -+const char* -+staticMap_read_bencode_c(const char* buffer, const char* bufferEnd, uint32_t depth, Object* values, const StaticMapKeys& keys, bool discard); -+ - std::istream& operator >> (std::istream& input, Object& object) LIBTORRENT_EXPORT; - std::ostream& operator << (std::ostream& output, const Object& object) LIBTORRENT_EXPORT; - -@@ -62,6 +78,15 @@ typedef object_buffer_t (*object_write_t)(void* data, object_buffer_t buffer); - - object_buffer_t object_write_bencode_c(object_write_t writeFunc, void* data, object_buffer_t buffer, const Object* object) LIBTORRENT_EXPORT; - -+template<typename tmpl_key_type, size_t tmpl_length> -+inline object_buffer_t -+staticMap_write_bencode_c(object_write_t writeFunc, void* data, object_buffer_t buffer, const StaticMap<tmpl_key_type, tmpl_length>& object) { -+ return staticMap_write_bencode_c_wrap(writeFunc, data, buffer, object.values(), object.map()); -+} -+ -+// Internal use only. -+object_buffer_t staticMap_write_bencode_c_wrap(object_write_t writeFunc, void* data, object_buffer_t buffer, const Object* values, const StaticMapKeys& keys) LIBTORRENT_EXPORT; -+ - // To char buffer. 'data' is NULL. - object_buffer_t object_write_to_buffer(void* data, object_buffer_t buffer) LIBTORRENT_EXPORT; - object_buffer_t object_write_to_sha1(void* data, object_buffer_t buffer) LIBTORRENT_EXPORT; -diff --git a/src/torrent/simple_string.h b/src/torrent/simple_string.h -new file mode 100644 -index 0000000..8eaf3b7 ---- /dev/null -+++ b/src/torrent/simple_string.h -@@ -0,0 +1,129 @@ -+// libTorrent - BitTorrent library -+// Copyright (C) 2005-2008, Jari Sundell -+// -+// 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 of the License, or -+// (at your option) any later version. -+// -+// This program is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+// -+// You should have received a copy of the GNU General Public License -+// along with this program; if not, write to the Free Software -+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+// -+// In addition, as a special exception, the copyright holders give -+// permission to link the code of portions of this program with the -+// OpenSSL library under certain conditions as described in each -+// individual source file, and distribute linked combinations -+// including the two. -+// -+// You must obey the GNU General Public License in all respects for -+// all of the code used other than OpenSSL. If you modify file(s) -+// with this exception, you may extend this exception to your version -+// of the file(s), but you are not obligated to do so. If you do not -+// wish to do so, delete this exception statement from your version. -+// If you delete this exception statement from all source files in the -+// program, then also delete it here. -+// -+// Contact: Jari Sundell <jaris@ifi.uio.no> -+// -+// Skomakerveien 33 -+// 3185 Skoppum, NORWAY -+ -+// A simple string with no constructors (i.e. POD) plus a derived -+// class with constructors and conversion operators. In most cases, -+// SimpleString is the class to use, except in unions where it needs -+// to be SimpleStringBase. -+// -+// For efficient conversion from C string literals, depends on the -+// compiler optimizing strlen("literal") to an integer literal. -+// Then a comparison with either a C string literal or a SimpleString -+// literal is a memcmp call plus (if equal) a comparison of the lengths. -+ -+#ifndef LIBTORRENT_SIMPLE_STRING_H -+#define LIBTORRENT_SIMPLE_STRING_H -+ -+#include <cstring> -+#include <memory> -+#include <string> -+#include <torrent/common.h> -+ -+namespace torrent { -+ -+// Simple string base class (POD). -+struct LIBTORRENT_EXPORT SimpleStringBase { -+ int cmp(const SimpleStringBase& other) const; -+ -+ char operator [] (size_t index) const { return m_data[index]; } -+ -+ const char* begin() const { return m_data; } -+ const char* end() const { return m_data + m_length; } -+ -+ // NOTE: Unlike std::string, SimpleString's c_str() is NOT guaranteed to be zero-terminated! -+ const char* c_str() const { return m_data; } -+ const char* data() const { return m_data; } -+ -+ bool empty() const { return !m_length; } -+ size_t length() const { return m_length; } -+ size_t size() const { return m_length; } -+ -+ std::string str() const { return std::string(m_data, m_length); } -+ std::string substr(size_t pos = 0, size_t n = npos) const { return std::string(m_data + pos, std::min(m_length - pos, n)); } -+ -+ // Allocates a copy of the string and returns it. -+ SimpleStringBase copy() const; -+ -+ static const size_t npos = static_cast<size_t>(-1); -+ -+protected: -+ const char* m_data; -+ size_t m_length; -+}; -+ -+// Conversion helper class, we don't want constructors -+// in the base class to be able to put it in a union. -+struct LIBTORRENT_EXPORT SimpleString : public SimpleStringBase { -+ typedef SimpleStringBase base_type; -+ -+ SimpleString() { m_data = ""; m_length = 0; } -+ SimpleString(const base_type& s) { m_data = s.c_str(); m_length = s.length(); } -+ SimpleString(const std::string& s) { m_data = s.c_str(); m_length = s.length(); } -+ SimpleString(const char* s) { m_data = s; m_length = strlen(s); } -+ SimpleString(const char* s, size_t l) { m_data = s; m_length = l; } -+}; -+ -+inline int -+SimpleStringBase::cmp(const SimpleStringBase& other) const { -+ int cmp = memcmp(m_data, other.m_data, std::min(m_length, other.m_length)); -+ return cmp ? cmp : m_length - other.m_length; -+} -+ -+inline SimpleStringBase -+SimpleStringBase::copy() const { -+ char* data = new char[m_length + 1]; -+ memcpy(data, m_data, m_length); -+ data[m_length] = 0; -+ return SimpleString(data, m_length); -+} -+ -+inline bool operator == (const SimpleStringBase& one, const SimpleStringBase& other) { return one.cmp(other) == 0; } -+inline bool operator != (const SimpleStringBase& one, const SimpleStringBase& other) { return one.cmp(other) != 0; } -+inline bool operator <= (const SimpleStringBase& one, const SimpleStringBase& other) { return one.cmp(other) <= 0; } -+inline bool operator < (const SimpleStringBase& one, const SimpleStringBase& other) { return one.cmp(other) < 0; } -+inline bool operator >= (const SimpleStringBase& one, const SimpleStringBase& other) { return one.cmp(other) >= 0; } -+inline bool operator > (const SimpleStringBase& one, const SimpleStringBase& other) { return one.cmp(other) > 0; } -+ -+inline bool operator == (const SimpleStringBase& one, const char* other) { return one.cmp(SimpleString(other)) == 0; } -+inline bool operator != (const SimpleStringBase& one, const char* other) { return one.cmp(SimpleString(other)) != 0; } -+inline bool operator <= (const SimpleStringBase& one, const char* other) { return one.cmp(SimpleString(other)) <= 0; } -+inline bool operator < (const SimpleStringBase& one, const char* other) { return one.cmp(SimpleString(other)) < 0; } -+inline bool operator >= (const SimpleStringBase& one, const char* other) { return one.cmp(SimpleString(other)) >= 0; } -+inline bool operator > (const SimpleStringBase& one, const char* other) { return one.cmp(SimpleString(other)) > 0; } -+ -+} -+ -+#endif -diff --git a/src/torrent/static_map.cc b/src/torrent/static_map.cc -new file mode 100644 -index 0000000..b71f257 ---- /dev/null -+++ b/src/torrent/static_map.cc -@@ -0,0 +1,123 @@ -+// libTorrent - BitTorrent library -+// Copyright (C) 2005-2008, Jari Sundell -+// -+// 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 of the License, or -+// (at your option) any later version. -+// -+// This program is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+// -+// You should have received a copy of the GNU General Public License -+// along with this program; if not, write to the Free Software -+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+// -+// In addition, as a special exception, the copyright holders give -+// permission to link the code of portions of this program with the -+// OpenSSL library under certain conditions as described in each -+// individual source file, and distribute linked combinations -+// including the two. -+// -+// You must obey the GNU General Public License in all respects for -+// all of the code used other than OpenSSL. If you modify file(s) -+// with this exception, you may extend this exception to your version -+// of the file(s), but you are not obligated to do so. If you do not -+// wish to do so, delete this exception statement from your version. -+// If you delete this exception statement from all source files in the -+// program, then also delete it here. -+// -+// Contact: Jari Sundell <jaris@ifi.uio.no> -+// -+// Skomakerveien 33 -+// 3185 Skoppum, NORWAY -+ -+#include "config.h" -+ -+#include "static_map.h" -+ -+namespace torrent { -+ -+inline int -+StaticMapKeys::check_key_order(SimpleString key) { -+ int cmp = empty() ? -1 : back().key().cmp(key); -+ if (cmp > 0) { -+ if (type() == TYPE_LIST) -+ cmp = -1; // List order is given by indices, not alphabetically. -+ else -+ throw internal_error("StaticMapKeys::StaticMapKeys() called with unsorted keys."); -+ } -+ -+ return cmp; -+} -+ -+StaticMapKeys::StaticMapKeys(const mapping_type* key_list, size_t length) -+ : m_key(SimpleString("root", 4)), -+ m_indexBegin(0), -+ m_indexEnd(0), -+ m_type(key_list[0].key[0] == '[' ? TYPE_LIST : TYPE_DICT) { -+ -+ for (size_t index = 0; index < length; index++, key_list++) { -+ if (key_list->index != index) -+ throw internal_error("StaticMapKeys::StaticMapKeys() used with list not in index order."); -+ -+ StaticMapKeys* curMap = this; -+ const char* key = key_list->key; -+ while (key != NULL && *key) { -+ curMap->set_end(index + 1); -+ -+ const char* sep = key + 1 + strcspn(key + 1, ":["); -+ SimpleString keyStr(key, sep - key); -+ -+ // New key, in correct order? Or same key as before? -+ int cmp = curMap->check_key_order(keyStr); -+ -+ if (sep[0] == 0) { -+ curMap->insert(curMap->end(), StaticMapKeys(keyStr, TYPE_VALUE, index, index + 1)); -+ break; -+ -+ } else if (sep[0] == '[' && sep[1] == ']' && sep[2] == 0) { -+ curMap->insert(curMap->end(), StaticMapKeys(keyStr, TYPE_BENCODE_LIST, index, index + 1)); -+ break; -+ -+ } else if (sep[0] == ':' && sep[1] == ':' && sep[2] == 0) { -+ curMap->insert(curMap->end(), StaticMapKeys(keyStr, TYPE_BENCODE, index, index + 1)); -+ break; -+ } -+ -+ if (sep[0] == ':' && sep[1] == ':') { -+ if (cmp < 0) -+ curMap->insert(curMap->end(), StaticMapKeys(keyStr, TYPE_DICT, index, index + 1)); -+ else if (curMap->back().type() != TYPE_DICT) -+ throw internal_error("StaticMapKeys::StaticMapKeys() called with a mixed dictionary/list entry."); -+ -+ curMap = &curMap->back(); -+ key = sep + 2; -+ -+ } else if (sep[0] == '[' && sep[1] >= '0' && sep[1] <= '9') { -+ key = sep++; -+ while (*sep >= '0' && *sep <= '9') -+ ++sep; -+ if (*sep != ']') -+ throw internal_error("StaticMapKeys::StaticMapKeys() called with invalid list index."); -+ -+ if (cmp < 0) -+ curMap->insert(curMap->end(), StaticMapKeys(keyStr, TYPE_LIST, index, index + 1)); -+ else if (curMap->back().type() != TYPE_LIST) -+ throw internal_error("StaticMapKeys::StaticMapKeys() called with a mixed dictionary/list entry."); -+ -+ curMap = &curMap->back(); -+ -+ } else { -+ throw internal_error("StaticMapKeys::StaticMapKeys() called with unsupported key type."); -+ } -+ } -+ } -+ -+ if (index_end() != length) -+ throw internal_error("StaticMapKeys::StaticMapKeys() is missing values."); -+} -+ -+} -diff --git a/src/torrent/static_map.h b/src/torrent/static_map.h -new file mode 100644 -index 0000000..d862f16 ---- /dev/null -+++ b/src/torrent/static_map.h -@@ -0,0 +1,158 @@ -+// libTorrent - BitTorrent library -+// Copyright (C) 2005-2008, Jari Sundell -+// -+// 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 of the License, or -+// (at your option) any later version. -+// -+// This program is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+// -+// You should have received a copy of the GNU General Public License -+// along with this program; if not, write to the Free Software -+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+// -+// In addition, as a special exception, the copyright holders give -+// permission to link the code of portions of this program with the -+// OpenSSL library under certain conditions as described in each -+// individual source file, and distribute linked combinations -+// including the two. -+// -+// You must obey the GNU General Public License in all respects for -+// all of the code used other than OpenSSL. If you modify file(s) -+// with this exception, you may extend this exception to your version -+// of the file(s), but you are not obligated to do so. If you do not -+// wish to do so, delete this exception statement from your version. -+// If you delete this exception statement from all source files in the -+// program, then also delete it here. -+// -+// Contact: Jari Sundell <jaris@ifi.uio.no> -+// -+// Skomakerveien 33 -+// 3185 Skoppum, NORWAY -+ -+#ifndef LIBTORRENT_STATIC_MAP_H -+#define LIBTORRENT_STATIC_MAP_H -+ -+#include <vector> -+#include <torrent/common.h> -+#include <torrent/object.h> -+#include <torrent/simple_string.h> -+ -+// StaticMap: holds a pre-defined subset of possible bencode keys and stores -+// their values in a flat array for fast decoding, key access and encoding. -+// Makes no copies, so the underlying data buffer must outlive the map object. -+ -+// With this, the complexity for bencoding and bdecoding a StaticMap object -+// is O(n). The access to any of the pre-defined keys is O(1). Access to -+// other keys is not supported, they are dropped while bdecoding. Decoded -+// Object types are either VALUE, SSTRING or NONE (if key was not present). -+ -+// To use, define an enum of all required keys, and use this type along with -+// the number of possible keys in the StaticMap template arguments. Define -+// the enum -> key string as array of StaticMapKeys::mapping_type. Define -+// the static keyMap variable, most simply by defining base_type in your -+// derived map class, like this: -+// template<> const Derived::key_map_init Derived::base_type::keyMap(key_list); -+ -+// The argument of the constructor of this static keyMap object is a list -+// of mapping_type entries. For efficiency, they must be ordered in -+// increasing number of the index, and increasing alphabetical order -+// (or more specifically, the bencode order) at the same time. In other words, -+// the original enum must also be in alphabetical order of the keys the enum -+// values refer to. -+ -+// Format of the key specifications ("..." may contain any number of further keys): -+// "foo::..." makes foo a bencode dictionary -+// "foo[0]..." makes foo a bencode list -+// "foo::" makes foo an undecoded bencode value (may contain arbitrary bencode data) -+// "foo[]" makes foo an undecoded list of bencode values (like the above but adding the 'l' and 'e' indicators) -+// "foo" makes foo an integer or string value (automatic) -+// -+// Examples: -+// "baz" refers to a single value for key "baz" -+// "foo::a[0]::bar" refers to a single value for key "bar" in the dictionary at index 0 of the list for key "a" in dictionary "foo" -+// "foo::a[1]" refers to a single value at index 1 of the list for key "a" in the dictionary "foo" -+// "zoo::" refers to a bdecoded value for key "zoo" -+// -+// If the four values are 4, 5, "6" and 7, this would be bencoded as d3:bazi4e3:food1:ald3:bari5ee1:6ee3:zooi7ee -+// -+// Note that sparse lists are not possible, you must explicitly specify all needed entries starting from index 0, -+// and when bencoding, the first unset value terminates the list. -+ -+namespace torrent { -+ -+// Hierarchical structure mapping bencode keys to flat array indices. -+class LIBTORRENT_EXPORT StaticMapKeys : public std::vector<StaticMapKeys> { -+public: -+ typedef std::vector<StaticMapKeys> base_type; -+ -+ struct mapping_type { -+ size_t index; -+ const char* key; -+ }; -+ -+ enum value_type { -+ TYPE_VALUE, -+ TYPE_LIST, -+ TYPE_DICT, -+ TYPE_BENCODE, -+ TYPE_BENCODE_LIST, -+ }; -+ -+ StaticMapKeys(const mapping_type* key_list, size_t length); -+ -+ void set_end(size_t end) { m_indexEnd = end; } -+ -+ size_t index_begin() const { return m_indexBegin; } -+ size_t index_end() const { return m_indexEnd; } -+ -+ value_type type() const { return m_type; } -+ -+ SimpleString key() const { return m_key; } -+ -+private: -+ StaticMapKeys(SimpleString key, value_type type, size_t begin, size_t end) -+ : m_key(key), m_indexBegin(begin), m_indexEnd(end), m_type(type) {} -+ -+ int check_key_order(SimpleString key); -+ -+ SimpleString m_key; -+ size_t m_indexBegin; -+ size_t m_indexEnd; -+ value_type m_type; -+}; -+ -+template<typename tmpl_key_type, size_t tmpl_length> -+class LIBTORRENT_EXPORT StaticMap { -+public: -+ typedef Object& value_type; -+ typedef tmpl_key_type key_type; -+ typedef StaticMapKeys key_map_type; -+ typedef Object list_type[tmpl_length]; -+ -+ Object& operator [] (key_type key) { return m_values[key]; } -+ const Object& operator [] (key_type key) const { return m_values[key]; } -+ -+ const key_map_type& map() const { return keyMap; } -+ -+ list_type& values() { return m_values; } -+ const list_type& values() const { return m_values; } -+ -+ static const size_t length = tmpl_length; -+ -+private: -+ struct key_map_init : public key_map_type { -+ key_map_init(key_map_type::mapping_type* key_list) : key_map_type(key_list, tmpl_length) {}; -+ }; -+ static const key_map_init keyMap; -+ -+ list_type m_values; -+}; -+ -+} -+ -+#endif -diff --git a/src/tracker/tracker_dht.cc b/src/tracker/tracker_dht.cc -index c63ce58..309fcf2 100644 ---- a/src/tracker/tracker_dht.cc -+++ b/src/tracker/tracker_dht.cc -@@ -115,13 +115,11 @@ TrackerDht::type() const { - } - - void --TrackerDht::receive_peers(const Object& peer_list) { -+TrackerDht::receive_peers(SimpleString peers) { - if (!is_busy()) - throw internal_error("TrackerDht::receive_peers called while not busy."); - -- Object::list_type peers = peer_list.as_list(); -- for (Object::list_type::const_iterator itr = peers.begin(); itr != peers.end(); ++itr) -- m_peers.parse_address_compact(itr->as_string()); -+ m_peers.parse_address_bencode(peers); - } - - void -diff --git a/src/tracker/tracker_dht.h b/src/tracker/tracker_dht.h -index d197e61..d096b46 100644 ---- a/src/tracker/tracker_dht.h -+++ b/src/tracker/tracker_dht.h -@@ -71,7 +71,7 @@ public: - - bool has_peers() const { return !m_peers.empty(); } - -- void receive_peers(const Object& peer_list); -+ void receive_peers(SimpleString peers); - void receive_success(); - void receive_failed(const char* msg); - void receive_progress(int replied, int contacted); diff --git a/libtorrent-extended/ipv6.patch b/libtorrent-extended/ipv6.patch deleted file mode 100644 index 7da4ebd..0000000 --- a/libtorrent-extended/ipv6.patch +++ /dev/null @@ -1,1235 +0,0 @@ -diff --git a/rak/socket_address.h b/rak/socket_address.h -index 25fdb37..d38533e 100644 ---- a/rak/socket_address.h -+++ b/rak/socket_address.h -@@ -145,7 +145,7 @@ private: - }; - }; - --// Remeber to set the AF_INET. -+// Remember to set the AF_INET. - - class socket_address_inet { - public: -@@ -184,6 +184,10 @@ public: - - const sockaddr* c_sockaddr() const { return reinterpret_cast<const sockaddr*>(&m_sockaddr); } - const sockaddr_in* c_sockaddr_inet() const { return &m_sockaddr; } -+ -+#ifdef RAK_USE_INET6 -+ socket_address_inet6 to_mapped_address() const; -+#endif - - bool operator == (const socket_address_inet& rhs) const; - bool operator < (const socket_address_inet& rhs) const; -@@ -192,6 +196,52 @@ private: - struct sockaddr_in m_sockaddr; - }; - -+#ifdef RAK_USE_INET6 -+// Remember to set the AF_INET6. -+ -+class socket_address_inet6 { -+public: -+ bool is_any() const { return is_port_any() && is_address_any(); } -+ bool is_valid() const { return !is_port_any() && !is_address_any(); } -+ bool is_port_any() const { return port() == 0; } -+ bool is_address_any() const { return std::memcmp(&m_sockaddr.sin6_addr, &in6addr_any, sizeof(in6_addr)) == 0; } -+ -+ void clear() { std::memset(this, 0, sizeof(socket_address_inet6)); set_family(); } -+ -+ uint16_t port() const { return ntohs(m_sockaddr.sin6_port); } -+ uint16_t port_n() const { return m_sockaddr.sin6_port; } -+ void set_port(uint16_t p) { m_sockaddr.sin6_port = htons(p); } -+ void set_port_n(uint16_t p) { m_sockaddr.sin6_port = p; } -+ -+ in6_addr address() const { return m_sockaddr.sin6_addr; } -+ std::string address_str() const; -+ bool address_c_str(char* buf, socklen_t size) const; -+ -+ void set_address(in6_addr a) { m_sockaddr.sin6_addr = a; } -+ bool set_address_str(const std::string& a) { return set_address_c_str(a.c_str()); } -+ bool set_address_c_str(const char* a); -+ -+ void set_address_any() { set_port(0); set_address(in6addr_any); } -+ -+ sa_family_t family() const { return m_sockaddr.sin6_family; } -+ void set_family() { m_sockaddr.sin6_family = AF_INET6; } -+ -+ sockaddr* c_sockaddr() { return reinterpret_cast<sockaddr*>(&m_sockaddr); } -+ sockaddr_in6* c_sockaddr_inet6() { return &m_sockaddr; } -+ -+ const sockaddr* c_sockaddr() const { return reinterpret_cast<const sockaddr*>(&m_sockaddr); } -+ const sockaddr_in6* c_sockaddr_inet6() const { return &m_sockaddr; } -+ -+ socket_address normalize_address() const; -+ -+ bool operator == (const socket_address_inet6& rhs) const; -+ bool operator < (const socket_address_inet6& rhs) const; -+ -+private: -+ struct sockaddr_in6 m_sockaddr; -+}; -+#endif -+ - // Unique key for the address, excluding port numbers etc. - class socket_address_key { - public: -@@ -241,8 +291,10 @@ socket_address::is_valid() const { - switch (family()) { - case af_inet: - return sa_inet()->is_valid(); --// case af_inet6: --// return sa_inet6().is_valid(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->is_valid(); -+#endif - default: - return false; - } -@@ -253,6 +305,10 @@ socket_address::is_bindable() const { - switch (family()) { - case af_inet: - return !sa_inet()->is_address_any(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return !sa_inet6()->is_address_any(); -+#endif - default: - return false; - } -@@ -263,6 +319,10 @@ socket_address::is_address_any() const { - switch (family()) { - case af_inet: - return sa_inet()->is_address_any(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->is_address_any(); -+#endif - default: - return true; - } -@@ -273,6 +333,10 @@ socket_address::port() const { - switch (family()) { - case af_inet: - return sa_inet()->port(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->port(); -+#endif - default: - return 0; - } -@@ -283,6 +347,10 @@ socket_address::set_port(uint16_t p) { - switch (family()) { - case af_inet: - return sa_inet()->set_port(p); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->set_port(p); -+#endif - default: - break; - } -@@ -293,6 +361,10 @@ socket_address::address_str() const { - switch (family()) { - case af_inet: - return sa_inet()->address_str(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->address_str(); -+#endif - default: - return std::string(); - } -@@ -303,6 +375,10 @@ socket_address::address_c_str(char* buf, socklen_t size) const { - switch (family()) { - case af_inet: - return sa_inet()->address_c_str(buf, size); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->address_c_str(buf, size); -+#endif - default: - return false; - } -@@ -314,6 +390,12 @@ socket_address::set_address_c_str(const char* a) { - sa_inet()->set_family(); - return true; - -+#ifdef RAK_USE_INET6 -+ } else if (sa_inet6()->set_address_c_str(a)) { -+ sa_inet6()->set_family(); -+ return true; -+#endif -+ - } else { - return false; - } -@@ -325,6 +407,10 @@ socket_address::length() const { - switch(family()) { - case af_inet: - return sizeof(sockaddr_in); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sizeof(sockaddr_in6); -+#endif - default: - return 0; - } -@@ -349,8 +435,10 @@ socket_address::operator == (const socket_address& rhs) const { - switch (family()) { - case af_inet: - return *sa_inet() == *rhs.sa_inet(); --// case af_inet6: --// return *sa_inet6() == *rhs.sa_inet6(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return *sa_inet6() == *rhs.sa_inet6(); -+#endif - default: - throw std::logic_error("socket_address::operator == (rhs) invalid type comparison."); - } -@@ -364,8 +452,10 @@ socket_address::operator < (const socket_address& rhs) const { - switch (family()) { - case af_inet: - return *sa_inet() < *rhs.sa_inet(); --// case af_inet6: --// return *sa_inet6() < *rhs.sa_inet6(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return *sa_inet6() < *rhs.sa_inet6(); -+#endif - default: - throw std::logic_error("socket_address::operator < (rhs) invalid type comparison."); - } -@@ -391,6 +481,23 @@ socket_address_inet::set_address_c_str(const char* a) { - return inet_pton(AF_INET, a, &m_sockaddr.sin_addr); - } - -+#ifdef RAK_USE_INET6 -+inline socket_address_inet6 -+socket_address_inet::to_mapped_address() const { -+ uint32_t addr32[4]; -+ addr32[0] = 0; -+ addr32[1] = 0; -+ addr32[2] = htonl(0xffff); -+ addr32[3] = m_sockaddr.sin_addr.s_addr; -+ -+ socket_address_inet6 sa; -+ sa.clear(); -+ sa.set_address(*reinterpret_cast<in6_addr *>(addr32)); -+ sa.set_port_n(m_sockaddr.sin_port); -+ return sa; -+} -+#endif -+ - inline bool - socket_address_inet::operator == (const socket_address_inet& rhs) const { - return -@@ -406,6 +513,59 @@ socket_address_inet::operator < (const socket_address_inet& rhs) const { - m_sockaddr.sin_port < rhs.m_sockaddr.sin_port); - } - -+#ifdef RAK_USE_INET6 -+ -+inline std::string -+socket_address_inet6::address_str() const { -+ char buf[INET6_ADDRSTRLEN]; -+ -+ if (!address_c_str(buf, INET6_ADDRSTRLEN)) -+ return std::string(); -+ -+ return std::string(buf); -+} -+ -+inline bool -+socket_address_inet6::address_c_str(char* buf, socklen_t size) const { -+ return inet_ntop(family(), &m_sockaddr.sin6_addr, buf, size); -+} -+ -+inline bool -+socket_address_inet6::set_address_c_str(const char* a) { -+ return inet_pton(AF_INET6, a, &m_sockaddr.sin6_addr); -+} -+ -+inline socket_address -+socket_address_inet6::normalize_address() const { -+ const uint32_t *addr32 = reinterpret_cast<const uint32_t *>(m_sockaddr.sin6_addr.s6_addr); -+ if (addr32[0] == 0 && addr32[1] == 0 && addr32[2] == htonl(0xffff)) { -+ socket_address addr4; -+ addr4.sa_inet()->set_family(); -+ addr4.sa_inet()->set_address_n(addr32[3]); -+ addr4.sa_inet()->set_port_n(m_sockaddr.sin6_port); -+ return addr4; -+ } -+ return *reinterpret_cast<const socket_address*>(this); -+} -+ -+inline bool -+socket_address_inet6::operator == (const socket_address_inet6& rhs) const { -+ return -+ memcmp(&m_sockaddr.sin6_addr, &rhs.m_sockaddr.sin6_addr, sizeof(in6_addr)) == 0 && -+ m_sockaddr.sin6_port == rhs.m_sockaddr.sin6_port; -+} -+ -+inline bool -+socket_address_inet6::operator < (const socket_address_inet6& rhs) const { -+ int addr_comp = memcmp(&m_sockaddr.sin6_addr, &rhs.m_sockaddr.sin6_addr, sizeof(in6_addr)); -+ return -+ addr_comp < 0 || -+ (addr_comp == 0 || -+ m_sockaddr.sin6_port < rhs.m_sockaddr.sin6_port); -+} -+ -+#endif -+ - } - - #endif -diff --git a/src/dht/dht_node.cc b/src/dht/dht_node.cc -index 9d51a28..e0eb306 100644 ---- a/src/dht/dht_node.cc -+++ b/src/dht/dht_node.cc -@@ -55,8 +55,15 @@ DhtNode::DhtNode(const HashString& id, const rak::socket_address* sa) : - m_recentlyInactive(0), - m_bucket(NULL) { - -+#ifdef RAK_USE_INET6 -+ if (sa->family() != rak::socket_address::af_inet && -+ (sa->family() != rak::socket_address::af_inet6 || -+ !sa->sa_inet6()->is_any())) -+ throw resource_error("Address not af_inet or in6addr_any"); -+#else - if (sa->family() != rak::socket_address::af_inet) - throw resource_error("Address not af_inet"); -+#endif - } - - DhtNode::DhtNode(const SimpleString& id, const Object& cache) : -@@ -85,8 +92,20 @@ DhtNode::store_compact(char* buffer) const { - - Object* - DhtNode::store_cache(Object* container) const { -- container->insert_key("i", m_socketAddress.sa_inet()->address_h()); -- container->insert_key("p", m_socketAddress.sa_inet()->port()); -+#ifdef RAK_USE_INET6 -+ if (m_socketAddress.family() == rak::socket_address::af_inet6) { -+ // Currently, all we support is in6addr_any (checked in the constructor), -+ // which is effectively equivalent to this. Note that we need to specify -+ // int64_t explicitly here because a zero constant is special in C++ and -+ // thus we need an explicit match. -+ container->insert_key("i", int64_t(0)); -+ container->insert_key("p", m_socketAddress.sa_inet6()->port()); -+ } else -+#endif -+ { -+ container->insert_key("i", m_socketAddress.sa_inet()->address_h()); -+ container->insert_key("p", m_socketAddress.sa_inet()->port()); -+ } - container->insert_key("t", m_lastSeen); - return container; - } -diff --git a/src/dht/dht_server.cc b/src/dht/dht_server.cc -index 256b92b..8c8b380 100644 ---- a/src/dht/dht_server.cc -+++ b/src/dht/dht_server.cc -@@ -692,6 +692,16 @@ DhtServer::event_read() { - if (read < 0) - break; - -+#ifdef RAK_USE_INET6 -+ // We can currently only process mapped-IPv4 addresses, not real IPv6. -+ // Translate them to an af_inet socket_address. -+ if (sa.family() == rak::socket_address::af_inet6) -+ sa = sa.sa_inet6()->normalize_address(); -+#endif -+ -+ if (sa.family() != rak::socket_address::af_inet) -+ continue; -+ - total += read; - - // If it's not a valid bencode dictionary at all, it's probably not a DHT -diff --git a/src/download/download_info.h b/src/download/download_info.h -index 68fb178..2e27ba3 100644 ---- a/src/download/download_info.h -+++ b/src/download/download_info.h -@@ -216,6 +216,28 @@ struct SocketAddressCompact { - const char* c_str() const { return reinterpret_cast<const char*>(this); } - } __attribute__ ((packed)); - -+#ifdef RAK_USE_INET6 -+struct SocketAddressCompact6 { -+ SocketAddressCompact6() {} -+ SocketAddressCompact6(in6_addr a, uint16_t p) : addr(a), port(p) {} -+ SocketAddressCompact6(const rak::socket_address_inet6* sa) : addr(sa->address()), port(sa->port_n()) {} -+ -+ operator rak::socket_address () const { -+ rak::socket_address sa; -+ sa.sa_inet6()->clear(); -+ sa.sa_inet6()->set_port_n(port); -+ sa.sa_inet6()->set_address(addr); -+ -+ return sa; -+ } -+ -+ in6_addr addr; -+ uint16_t port; -+ -+ const char* c_str() const { return reinterpret_cast<const char*>(this); } -+} __attribute__ ((packed)); -+#endif -+ - } - - #endif -diff --git a/src/net/Makefile.am b/src/net/Makefile.am -index e07f382..3df0f6d 100644 ---- a/src/net/Makefile.am -+++ b/src/net/Makefile.am -@@ -4,6 +4,8 @@ libsub_net_la_SOURCES = \ - address_list.cc \ - address_list.h \ - data_buffer.h \ -+ local_addr.cc \ -+ local_addr.h \ - listen.cc \ - listen.h \ - protocol_buffer.h \ -diff --git a/src/net/Makefile.in b/src/net/Makefile.in -index 1920403..cdbe398 100644 ---- a/src/net/Makefile.in -+++ b/src/net/Makefile.in -@@ -54,9 +54,9 @@ CONFIG_CLEAN_FILES = - CONFIG_CLEAN_VPATH_FILES = - LTLIBRARIES = $(noinst_LTLIBRARIES) - libsub_net_la_LIBADD = --am_libsub_net_la_OBJECTS = address_list.lo listen.lo socket_base.lo \ -- socket_datagram.lo socket_fd.lo socket_set.lo socket_stream.lo \ -- throttle_internal.lo throttle_list.lo -+am_libsub_net_la_OBJECTS = address_list.lo local_addr.lo listen.lo \ -+ socket_base.lo socket_datagram.lo socket_fd.lo socket_set.lo \ -+ socket_stream.lo throttle_internal.lo throttle_list.lo - libsub_net_la_OBJECTS = $(am_libsub_net_la_OBJECTS) - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp -@@ -216,6 +216,8 @@ libsub_net_la_SOURCES = \ - address_list.cc \ - address_list.h \ - data_buffer.h \ -+ local_addr.cc \ -+ local_addr.h \ - listen.cc \ - listen.h \ - protocol_buffer.h \ -@@ -290,6 +292,7 @@ distclean-compile: - - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address_list.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local_addr.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket_base.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket_datagram.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket_fd.Plo@am__quote@ -diff --git a/src/net/address_list.cc b/src/net/address_list.cc -index e5cf3cb..a7dff2c 100644 ---- a/src/net/address_list.cc -+++ b/src/net/address_list.cc -@@ -92,5 +92,16 @@ AddressList::parse_address_bencode(SimpleString s) { - s = SimpleString(s.c_str() + 2 + sizeof(SocketAddressCompact), s.length() - 2 - sizeof(SocketAddressCompact)); - } - } -+#ifdef RAK_USE_INET6 -+void -+AddressList::parse_address_compact_ipv6(const std::string& s) { -+ if (sizeof(const SocketAddressCompact6) != 18) -+ throw internal_error("ConnectionList::AddressList::parse_address_compact_ipv6(...) bad struct size."); -+ -+ std::copy(reinterpret_cast<const SocketAddressCompact6*>(s.c_str()), -+ reinterpret_cast<const SocketAddressCompact6*>(s.c_str() + s.size() - s.size() % sizeof(SocketAddressCompact6)), -+ std::back_inserter(*this)); -+} -+#endif - - } -diff --git a/src/net/address_list.h b/src/net/address_list.h -index 10dbac4..3aec366 100644 ---- a/src/net/address_list.h -+++ b/src/net/address_list.h -@@ -51,6 +51,9 @@ public: - // Parse normal or compact list of addresses and add to AddressList - void parse_address_normal(const Object::list_type& b); - void parse_address_compact(SimpleString s); -+#ifdef RAK_USE_INET6 -+ void parse_address_compact_ipv6(const std::string& s); -+#endif - void parse_address_bencode(SimpleString s); - - private: -diff --git a/src/net/local_addr.cc b/src/net/local_addr.cc -new file mode 100644 -index 0000000..fae3f85 ---- /dev/null -+++ b/src/net/local_addr.cc -@@ -0,0 +1,336 @@ -+// libTorrent - BitTorrent library -+// Copyright (C) 2005-2007, Jari Sundell -+// -+// 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 of the License, or -+// (at your option) any later version. -+// -+// This program is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+// -+// You should have received a copy of the GNU General Public License -+// along with this program; if not, write to the Free Software -+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+// -+// In addition, as a special exception, the copyright holders give -+// permission to link the code of portions of this program with the -+// OpenSSL library under certain conditions as described in each -+// individual source file, and distribute linked combinations -+// including the two. -+// -+// You must obey the GNU General Public License in all respects for -+// all of the code used other than OpenSSL. If you modify file(s) -+// with this exception, you may extend this exception to your version -+// of the file(s), but you are not obligated to do so. If you do not -+// wish to do so, delete this exception statement from your version. -+// If you delete this exception statement from all source files in the -+// program, then also delete it here. -+// -+// Contact: Jari Sundell <jaris@ifi.uio.no> -+// -+// Skomakerveien 33 -+// 3185 Skoppum, NORWAY -+ -+#include "config.h" -+ -+#include <stdio.h> -+#include <ifaddrs.h> -+#include <rak/socket_address.h> -+#include <sys/types.h> -+#include <errno.h> -+ -+#ifdef __linux__ -+#include <linux/netlink.h> -+#include <linux/rtnetlink.h> -+#endif -+ -+#include "torrent/exceptions.h" -+#include "socket_fd.h" -+#include "local_addr.h" -+ -+namespace torrent { -+namespace { -+ -+// IPv4 priority, from highest to lowest: -+// -+// 1. Everything else (global address) -+// 2. Private address space (10.0.0.0/8, 172.16.0.0/16, 192.168.0.0/24) -+// 3. Empty/INADDR_ANY (0.0.0.0) -+// 4. Link-local address (169.254.0.0/16) -+// 5. Localhost (127.0.0.0/8) -+int get_priority_ipv4(const in_addr& addr) { -+ if ((addr.s_addr & htonl(0xff000000U)) == htonl(0x7f000000U)) { -+ return 5; -+ } -+ if (addr.s_addr == htonl(0)) { -+ return 4; -+ } -+ if ((addr.s_addr & htonl(0xffff0000U)) == htonl(0xa9fe0000U)) { -+ return 3; -+ } -+ if ((addr.s_addr & htonl(0xff000000U)) == htonl(0x0a000000U) || -+ (addr.s_addr & htonl(0xffff0000U)) == htonl(0xac100000U) || -+ (addr.s_addr & htonl(0xffff0000U)) == htonl(0xc0a80000U)) { -+ return 2; -+ } -+ return 1; -+} -+ -+#ifdef RAK_USE_INET6 -+// IPv6 priority, from highest to lowest: -+// -+// 1. Global address (2000::/16 not in 6to4 or Teredo) -+// 2. 6to4 (2002::/16) -+// 3. Teredo (2001::/32) -+// 4. Empty/INADDR_ANY (::) -+// 5. Everything else (link-local, ULA, etc.) -+int get_priority_ipv6(const in6_addr& addr) { -+ const uint32_t *addr32 = reinterpret_cast<const uint32_t *>(addr.s6_addr); -+ if (addr32[0] == htonl(0) && -+ addr32[1] == htonl(0) && -+ addr32[2] == htonl(0) && -+ addr32[3] == htonl(0)) { -+ return 4; -+ } -+ if (addr32[0] == htonl(0x20010000)) { -+ return 3; -+ } -+ if ((addr32[0] & htonl(0xffff0000)) == htonl(0x20020000)) { -+ return 2; -+ } -+ if ((addr32[0] & htonl(0xe0000000)) == htonl(0x20000000)) { -+ return 1; -+ } -+ return 5; -+} -+#endif -+ -+int get_priority(const rak::socket_address& addr) { -+ switch (addr.family()) { -+ case AF_INET: -+ return get_priority_ipv4(addr.c_sockaddr_inet()->sin_addr); -+#ifdef RAK_USE_INET6 -+ case AF_INET6: -+ return get_priority_ipv6(addr.c_sockaddr_inet6()->sin6_addr); -+#endif -+ default: -+ throw torrent::internal_error("Unknown address family given to compare"); -+ } -+} -+ -+} -+ -+#ifdef __linux__ -+ -+// Linux-specific implementation that understands how to filter away -+// understands how to filter away secondary addresses. -+bool get_local_address(sa_family_t family, rak::socket_address *address) { -+ ifaddrs *ifaddrs; -+ if (getifaddrs(&ifaddrs)) { -+ return false; -+ } -+ -+ rak::socket_address best_addr; -+ switch (family) { -+ case AF_INET: -+ best_addr.sa_inet()->clear(); -+ break; -+#ifdef RAK_USE_INET6 -+ case AF_INET6: -+ best_addr.sa_inet6()->clear(); -+ break; -+#endif -+ default: -+ throw torrent::internal_error("Unknown address family given to get_local_address"); -+ } -+ -+ // The bottom bit of the priority is used to hold if the address is -+ // a secondary address (e.g. with IPv6 privacy extensions) or not; -+ // secondary addresses have lower priority (higher number). -+ int best_addr_pri = get_priority(best_addr) * 2; -+ -+ // Get all the addresses via Linux' netlink interface. -+ int fd = ::socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); -+ if (fd == -1) { -+ return false; -+ } -+ -+ struct sockaddr_nl nladdr; -+ memset(&nladdr, 0, sizeof(nladdr)); -+ nladdr.nl_family = AF_NETLINK; -+ if (::bind(fd, (sockaddr *)&nladdr, sizeof(nladdr))) { -+ ::close(fd); -+ return false; -+ } -+ -+ const int seq_no = 1; -+ struct { -+ nlmsghdr nh; -+ rtgenmsg g; -+ } req; -+ memset(&req, 0, sizeof(req)); -+ -+ req.nh.nlmsg_len = sizeof(req); -+ req.nh.nlmsg_type = RTM_GETADDR; -+ req.nh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST; -+ req.nh.nlmsg_pid = getpid(); -+ req.nh.nlmsg_seq = seq_no; -+ req.g.rtgen_family = AF_UNSPEC; -+ -+ int ret; -+ do { -+ ret = ::sendto(fd, &req, sizeof(req), 0, (sockaddr *)&nladdr, sizeof(nladdr)); -+ } while (ret == -1 && errno == EINTR); -+ -+ if (ret == -1) { -+ ::close(fd); -+ return false; -+ } -+ -+ bool done = false; -+ do { -+ char buf[4096]; -+ socklen_t len = sizeof(nladdr); -+ do { -+ ret = ::recvfrom(fd, buf, sizeof(buf), 0, (sockaddr *)&nladdr, &len); -+ } while (ret == -1 && errno == EINTR); -+ -+ if (ret < 0) { -+ ::close(fd); -+ return false; -+ } -+ -+ for (const nlmsghdr *nlmsg = (const nlmsghdr *)buf; -+ NLMSG_OK(nlmsg, ret); -+ nlmsg = NLMSG_NEXT(nlmsg, ret)) { -+ if (nlmsg->nlmsg_seq != seq_no) -+ continue; -+ if (nlmsg->nlmsg_type == NLMSG_DONE) { -+ done = true; -+ break; -+ } -+ if (nlmsg->nlmsg_type == NLMSG_ERROR) { -+ ::close(fd); -+ return false; -+ } -+ if (nlmsg->nlmsg_type != RTM_NEWADDR) -+ continue; -+ -+ const ifaddrmsg *ifa = (const ifaddrmsg *)NLMSG_DATA(nlmsg); -+ -+ if (ifa->ifa_family != family) -+ continue; -+ -+#ifdef IFA_F_OPTIMISTIC -+ if ((ifa->ifa_flags & IFA_F_OPTIMISTIC) != 0) -+ continue; -+#endif -+#ifdef IFA_F_DADFAILED -+ if ((ifa->ifa_flags & IFA_F_DADFAILED) != 0) -+ continue; -+#endif -+#ifdef IFA_F_DEPRECATED -+ if ((ifa->ifa_flags & IFA_F_DEPRECATED) != 0) -+ continue; -+#endif -+#ifdef IFA_F_TENTATIVE -+ if ((ifa->ifa_flags & IFA_F_TENTATIVE) != 0) -+ continue; -+#endif -+ -+ // Since there can be point-to-point links on the machine, we need to keep -+ // track of the addresses we've seen for this interface; if we see both -+ // IFA_LOCAL and IFA_ADDRESS for an interface, keep only the IFA_LOCAL. -+ rak::socket_address this_addr; -+ bool seen_addr = false; -+ int plen = IFA_PAYLOAD(nlmsg); -+ for (const rtattr *rta = IFA_RTA(ifa); -+ RTA_OK(rta, plen); -+ rta = RTA_NEXT(rta, plen)) { -+ if (rta->rta_type != IFA_LOCAL && -+ rta->rta_type != IFA_ADDRESS) { -+ continue; -+ } -+ if (rta->rta_type == IFA_ADDRESS && seen_addr) { -+ continue; -+ } -+ seen_addr = true; -+ switch (ifa->ifa_family) { -+ case AF_INET: -+ this_addr.sa_inet()->clear(); -+ this_addr.sa_inet()->set_address(*(const in_addr *)RTA_DATA(rta)); -+ break; -+#ifdef RAK_USE_INET6 -+ case AF_INET6: -+ this_addr.sa_inet6()->clear(); -+ this_addr.sa_inet6()->set_address(*(const in6_addr *)RTA_DATA(rta)); -+ break; -+#endif -+ } -+ } -+ if (!seen_addr) -+ continue; -+ -+ int this_addr_pri = get_priority(this_addr) * 2; -+ if ((ifa->ifa_flags & IFA_F_SECONDARY) == IFA_F_SECONDARY) { -+ ++this_addr_pri; -+ } -+ -+ if (this_addr_pri < best_addr_pri) { -+ best_addr = this_addr; -+ best_addr_pri = this_addr_pri; -+ } -+ } -+ } while (!done); -+ -+ ::close(fd); -+ if (!best_addr.is_address_any()) { -+ *address = best_addr; -+ return true; -+ } else { -+ return false; -+ } -+} -+ -+#else -+ -+// Generic POSIX variant. -+bool get_local_address(sa_family_t family, rak::socket_address *address) { -+ SocketFd sock; -+ if (!sock.open_datagram()) { -+ return false; -+ } -+ -+ rak::socket_address dummy_dest; -+ dummy_dest.clear(); -+ -+ switch (family) { -+ case rak::socket_address::af_inet: -+ dummy_dest.set_address_c_str("4.0.0.0"); -+ break; -+#ifdef RAK_USE_INET6 -+ case rak::socket_address::af_inet6: -+ dummy_dest.set_address_c_str("2001:700::"); -+ break; -+#endif -+ default: -+ throw internal_error("Unknown address family"); -+ } -+ dummy_dest.set_port(80); -+ -+ if (!sock.connect(dummy_dest)) { -+ sock.close(); -+ return false; -+ } -+ -+ bool ret = sock.getsockname(address); -+ sock.close(); -+ return ret; -+} -+ -+#endif -+ -+} -diff --git a/src/net/local_addr.h b/src/net/local_addr.h -new file mode 100644 -index 0000000..43bc820 ---- /dev/null -+++ b/src/net/local_addr.h -@@ -0,0 +1,64 @@ -+// libTorrent - BitTorrent library -+// Copyright (C) 2005-2007, Jari Sundell -+// -+// 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 of the License, or -+// (at your option) any later version. -+// -+// This program is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+// -+// You should have received a copy of the GNU General Public License -+// along with this program; if not, write to the Free Software -+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+// -+// In addition, as a special exception, the copyright holders give -+// permission to link the code of portions of this program with the -+// OpenSSL library under certain conditions as described in each -+// individual source file, and distribute linked combinations -+// including the two. -+// -+// You must obey the GNU General Public License in all respects for -+// all of the code used other than OpenSSL. If you modify file(s) -+// with this exception, you may extend this exception to your version -+// of the file(s), but you are not obligated to do so. If you do not -+// wish to do so, delete this exception statement from your version. -+// If you delete this exception statement from all source files in the -+// program, then also delete it here. -+// -+// Contact: Jari Sundell <jaris@ifi.uio.no> -+// -+// Skomakerveien 33 -+// 3185 Skoppum, NORWAY -+ -+// A routine to get a local IP address that can be presented to a tracker. -+// (Does not use UPnP etc., so will not understand NAT.) -+// On a machine with multiple network cards, address selection can be a -+// complex process, and in general what's selected is a source/destination -+// address pair. However, this routine will give an approximation that will -+// be good enough for most purposes and users. -+ -+#ifndef LIBTORRENT_NET_LOCAL_ADDR_H -+#define LIBTORRENT_NET_LOCAL_ADDR_H -+ -+#include <unistd.h> -+ -+namespace rak { -+ class socket_address; -+} -+ -+namespace torrent { -+ -+// Note: family must currently be rak::af_inet or rak::af_inet6 -+// (rak::af_unspec won't do); anything else will throw an exception. -+// Returns false if no address of the given family could be found, -+// either because there are none, or because something went wrong in -+// the process (e.g., no free file descriptors). -+bool get_local_address(sa_family_t family, rak::socket_address *address); -+ -+} -+ -+#endif /* LIBTORRENT_NET_LOCAL_ADDR_H */ -diff --git a/src/net/socket_datagram.cc b/src/net/socket_datagram.cc -index b983289..69992e3 100644 ---- a/src/net/socket_datagram.cc -+++ b/src/net/socket_datagram.cc -@@ -73,7 +73,13 @@ SocketDatagram::write_datagram(const void* buffer, unsigned int length, rak::soc - int r; - - if (sa != NULL) { -- r = ::sendto(m_fileDesc, buffer, length, 0, sa->sa_inet()->c_sockaddr(), sizeof(rak::socket_address_inet)); -+#ifdef RAK_USE_INET6 -+ if (m_ipv6_socket && sa->family() == rak::socket_address::pf_inet) { -+ rak::socket_address_inet6 sa_mapped = sa->sa_inet()->to_mapped_address(); -+ r = ::sendto(m_fileDesc, buffer, length, 0, sa_mapped.c_sockaddr(), sizeof(rak::socket_address_inet6)); -+ } else -+#endif -+ r = ::sendto(m_fileDesc, buffer, length, 0, sa->c_sockaddr(), sa->length()); - } else { - r = ::send(m_fileDesc, buffer, length, 0); - } -diff --git a/src/net/socket_fd.cc b/src/net/socket_fd.cc -index c349d21..8576628 100644 ---- a/src/net/socket_fd.cc -+++ b/src/net/socket_fd.cc -@@ -70,6 +70,11 @@ SocketFd::set_priority(priority_type p) { - check_valid(); - int opt = p; - -+#ifdef RAK_USE_INET6 -+ if (m_ipv6_socket) -+ return setsockopt(m_fd, IPPROTO_IPV6, IPV6_TCLASS, &opt, sizeof(opt)) == 0; -+ else -+#endif - return setsockopt(m_fd, IPPROTO_IP, IP_TOS, &opt, sizeof(opt)) == 0; - } - -@@ -112,12 +117,36 @@ SocketFd::get_error() const { - - bool - SocketFd::open_stream() { -+#ifdef RAK_USE_INET6 -+ m_fd = socket(rak::socket_address::pf_inet6, SOCK_STREAM, IPPROTO_TCP); -+ if (m_fd == -1) { -+ m_ipv6_socket = false; -+ return (m_fd = socket(rak::socket_address::pf_inet, SOCK_STREAM, IPPROTO_TCP)) != -1; -+ } -+ m_ipv6_socket = true; -+ -+ int zero = 0; -+ return setsockopt(m_fd, IPPROTO_IPV6, IPV6_V6ONLY, &zero, sizeof(zero)) != -1; -+#else - return (m_fd = socket(rak::socket_address::pf_inet, SOCK_STREAM, IPPROTO_TCP)) != -1; -+#endif - } - - bool - SocketFd::open_datagram() { -+#ifdef RAK_USE_INET6 -+ m_fd = socket(rak::socket_address::pf_inet6, SOCK_DGRAM, 0); -+ if (m_fd == -1) { -+ m_ipv6_socket = false; -+ return (m_fd = socket(rak::socket_address::pf_inet, SOCK_DGRAM, 0)) != -1; -+ } -+ m_ipv6_socket = true; -+ -+ int zero = 0; -+ return setsockopt(m_fd, IPPROTO_IPV6, IPV6_V6ONLY, &zero, sizeof(zero)) != -1; -+#else - return (m_fd = socket(rak::socket_address::pf_inet, SOCK_DGRAM, 0)) != -1; -+#endif - } - - bool -@@ -149,10 +178,34 @@ bool - SocketFd::connect(const rak::socket_address& sa) { - check_valid(); - -+#ifdef RAK_USE_INET6 -+ if (m_ipv6_socket && sa.family() == rak::socket_address::pf_inet) { -+ rak::socket_address_inet6 sa_mapped = sa.sa_inet()->to_mapped_address(); -+ return !::connect(m_fd, sa_mapped.c_sockaddr(), sizeof(sa_mapped)) || errno == EINPROGRESS; -+ } -+#endif - return !::connect(m_fd, sa.c_sockaddr(), sa.length()) || errno == EINPROGRESS; - } - - bool -+SocketFd::getsockname(rak::socket_address *sa) { -+ check_valid(); -+ -+ socklen_t len = sizeof(rak::socket_address); -+ if (::getsockname(m_fd, sa->c_sockaddr(), &len)) { -+ return false; -+ } -+ -+#ifdef RAK_USE_INET6 -+ if (m_ipv6_socket && sa->family() == rak::socket_address::af_inet6) { -+ *sa = sa->sa_inet6()->normalize_address(); -+ } -+#endif -+ -+ return true; -+} -+ -+bool - SocketFd::listen(int size) { - check_valid(); - -@@ -164,7 +217,18 @@ SocketFd::accept(rak::socket_address* sa) { - check_valid(); - socklen_t len = sizeof(rak::socket_address); - -+#ifdef RAK_USE_INET6 -+ if (sa == NULL) { -+ return SocketFd(::accept(m_fd, NULL, &len)); -+ } -+ int fd = ::accept(m_fd, sa->c_sockaddr(), &len); -+ if (fd != -1 && m_ipv6_socket && sa->family() == rak::socket_address::af_inet6) { -+ *sa = sa->sa_inet6()->normalize_address(); -+ } -+ return SocketFd(fd); -+#else - return SocketFd(::accept(m_fd, sa != NULL ? sa->c_sockaddr() : NULL, &len)); -+#endif - } - - // unsigned int -diff --git a/src/net/socket_fd.h b/src/net/socket_fd.h -index a208ad6..d39c413 100644 ---- a/src/net/socket_fd.h -+++ b/src/net/socket_fd.h -@@ -77,6 +77,7 @@ public: - bool bind(const rak::socket_address& sa); - bool bind(const rak::socket_address& sa, unsigned int length); - bool connect(const rak::socket_address& sa); -+ bool getsockname(rak::socket_address* sa); - - bool listen(int size); - SocketFd accept(rak::socket_address* sa); -@@ -88,6 +89,9 @@ private: - inline void check_valid() const; - - int m_fd; -+#ifdef RAK_USE_INET6 -+ bool m_ipv6_socket; -+#endif - }; - - } -diff --git a/src/torrent/connection_manager.cc b/src/torrent/connection_manager.cc -index 64c4197..152a0a1 100644 ---- a/src/torrent/connection_manager.cc -+++ b/src/torrent/connection_manager.cc -@@ -78,13 +78,18 @@ ConnectionManager::ConnectionManager() : - m_slotResolver(&resolve_host) { - - m_bindAddress = (new rak::socket_address())->c_sockaddr(); -- rak::socket_address::cast_from(m_bindAddress)->sa_inet()->clear(); -- - m_localAddress = (new rak::socket_address())->c_sockaddr(); -- rak::socket_address::cast_from(m_localAddress)->sa_inet()->clear(); -- - m_proxyAddress = (new rak::socket_address())->c_sockaddr(); -+ -+#ifdef RAK_USE_INET6 -+ rak::socket_address::cast_from(m_bindAddress)->sa_inet6()->clear(); -+ rak::socket_address::cast_from(m_localAddress)->sa_inet6()->clear(); -+ rak::socket_address::cast_from(m_proxyAddress)->sa_inet6()->clear(); -+#else -+ rak::socket_address::cast_from(m_bindAddress)->sa_inet()->clear(); -+ rak::socket_address::cast_from(m_localAddress)->sa_inet()->clear(); - rak::socket_address::cast_from(m_proxyAddress)->sa_inet()->clear(); -+#endif - } - - ConnectionManager::~ConnectionManager() { -@@ -123,8 +128,10 @@ void - ConnectionManager::set_bind_address(const sockaddr* sa) { - const rak::socket_address* rsa = rak::socket_address::cast_from(sa); - -+#ifndef RAK_USE_INET6 - if (rsa->family() != rak::socket_address::af_inet) - throw input_error("Tried to set a bind address that is not an af_inet address."); -+#endif - - rak::socket_address::cast_from(m_bindAddress)->copy(*rsa, rsa->length()); - } -@@ -133,8 +140,10 @@ void - ConnectionManager::set_local_address(const sockaddr* sa) { - const rak::socket_address* rsa = rak::socket_address::cast_from(sa); - -+#ifndef RAK_USE_INET6 - if (rsa->family() != rak::socket_address::af_inet) - throw input_error("Tried to set a local address that is not an af_inet address."); -+#endif - - rak::socket_address::cast_from(m_localAddress)->copy(*rsa, rsa->length()); - } -@@ -143,8 +152,10 @@ void - ConnectionManager::set_proxy_address(const sockaddr* sa) { - const rak::socket_address* rsa = rak::socket_address::cast_from(sa); - -+#ifndef RAK_USE_INET6 - if (rsa->family() != rak::socket_address::af_inet) - throw input_error("Tried to set a proxy address that is not an af_inet address."); -+#endif - - rak::socket_address::cast_from(m_proxyAddress)->copy(*rsa, rsa->length()); - } -diff --git a/src/torrent/event.h b/src/torrent/event.h -index 335e6d6..2d6e36c 100644 ---- a/src/torrent/event.h -+++ b/src/torrent/event.h -@@ -57,6 +57,10 @@ public: - - protected: - int m_fileDesc; -+ -+#ifdef RAK_USE_INET6 -+ bool m_ipv6_socket; -+#endif - }; - - } -diff --git a/src/torrent/peer/peer_list.cc b/src/torrent/peer/peer_list.cc -index 187ba5b..cef840b 100644 ---- a/src/torrent/peer/peer_list.cc -+++ b/src/torrent/peer/peer_list.cc -@@ -65,15 +65,23 @@ socket_address_less(const sockaddr* s1, const sockaddr* s2) { - // humans. - return sa1->sa_inet()->address_h() < sa2->sa_inet()->address_h(); - -+#ifdef RAK_USE_INET6 -+ else { -+ const in6_addr addr1 = sa1->sa_inet6()->address(); -+ const in6_addr addr2 = sa2->sa_inet6()->address(); -+ return memcmp(&addr1, &addr2, sizeof(in6_addr)) < 0; -+ } -+#else - else -- // When we implement INET6 handling, embed the ipv4 address in -- // the ipv6 address. - throw internal_error("socket_address_key(...) tried to compare an invalid family type."); -+#endif -+ - } - - inline bool - socket_address_key::is_comparable(const sockaddr* sa) { -- return rak::socket_address::cast_from(sa)->family() == rak::socket_address::af_inet; -+ return rak::socket_address::cast_from(sa)->family() == rak::socket_address::af_inet || -+ rak::socket_address::cast_from(sa)->family() == rak::socket_address::af_inet6; - } - - struct peer_list_equal_port : public std::binary_function<PeerList::reference, uint16_t, bool> { -diff --git a/src/tracker/tracker_http.cc b/src/tracker/tracker_http.cc -index d23cae6..493dd0d 100644 ---- a/src/tracker/tracker_http.cc -+++ b/src/tracker/tracker_http.cc -@@ -43,6 +43,7 @@ - - #include "download/download_info.h" - #include "net/address_list.h" -+#include "net/local_addr.h" - #include "torrent/connection_manager.h" - #include "torrent/exceptions.h" - #include "torrent/http.h" -@@ -114,9 +115,16 @@ TrackerHttp::send_state(int state) { - - const rak::socket_address* localAddress = rak::socket_address::cast_from(manager->connection_manager()->local_address()); - -- if (localAddress->family() == rak::socket_address::af_inet && -- !localAddress->sa_inet()->is_address_any()) -+ if (!localAddress->is_address_any()) - s << "&ip=" << localAddress->address_str(); -+ -+#ifdef RAK_USE_INET6 -+ if (localAddress->is_address_any() || localAddress->family() != rak::socket_address::pf_inet6) { -+ rak::socket_address local_v6; -+ if (get_local_address(rak::socket_address::af_inet6, &local_v6)) -+ s << "&ipv6=" << rak::copy_escape_html(local_v6.address_str()); -+ } -+#endif - - if (info->is_compact()) - s << "&compact=1"; -@@ -220,18 +228,34 @@ TrackerHttp::receive_done() { - - AddressList l; - -- try { -- // Due to some trackers sending the wrong type when no peers are -- // available, don't bork on it. -- if (b.get_key("peers").is_string()) -- l.parse_address_compact(b.get_key_string("peers")); -+ if (!b.has_key("peers") -+#ifdef RAK_USE_INET6 -+ && !b.has_key("peers6") -+#endif -+ ) { -+ return receive_failed("No peers returned"); -+ } -+ -+ if (b.has_key("peers")) { -+ try { -+ // Due to some trackers sending the wrong type when no peers are -+ // available, don't bork on it. -+ if (b.get_key("peers").is_string()) -+ l.parse_address_compact(b.get_key_string("peers")); -+ -+ else if (b.get_key("peers").is_list()) -+ l.parse_address_normal(b.get_key_list("peers")); - -- else if (b.get_key("peers").is_list()) -- l.parse_address_normal(b.get_key_list("peers")); -+ } catch (bencode_error& e) { -+ return receive_failed(e.what()); -+ } -+ } - -- } catch (bencode_error& e) { -- return receive_failed(e.what()); -+#ifdef RAK_USE_INET6 -+ if (b.has_key("peers6")) { -+ l.parse_address_compact_ipv6(b.get_key_string("peers6")); - } -+#endif - - close(); - m_parent->receive_success(this, &l); -diff --git a/src/tracker/tracker_udp.cc b/src/tracker/tracker_udp.cc -index dacf21b..63442a3 100644 ---- a/src/tracker/tracker_udp.cc -+++ b/src/tracker/tracker_udp.cc -@@ -271,11 +271,18 @@ TrackerUdp::prepare_announce_input() { - - const rak::socket_address* localAddress = rak::socket_address::cast_from(manager->connection_manager()->local_address()); - -- // This code assumes we're have a inet address. -+#ifdef RAK_USE_INET6 -+ uint32_t local_addr = 0; -+ if (localAddress->family() == rak::socket_address::af_inet) -+ local_addr = localAddress->sa_inet()->address_n(); -+#else - if (localAddress->family() != rak::socket_address::af_inet) - throw internal_error("TrackerUdp::prepare_announce_input() info->local_address() not of family AF_INET."); -+ -+ uint32_t local_addr = localAddress->sa_inet()->address_n(); -+#endif - -- m_writeBuffer->write_32_n(localAddress->sa_inet()->address_n()); -+ m_writeBuffer->write_32_n(local_addr); - m_writeBuffer->write_32(m_parent->key()); - m_writeBuffer->write_32(m_parent->numwant()); - m_writeBuffer->write_16(manager->connection_manager()->listen_port()); diff --git a/libtorrent-extended/magnet_uri.patch b/libtorrent-extended/magnet_uri.patch deleted file mode 100644 index 3d00540..0000000 --- a/libtorrent-extended/magnet_uri.patch +++ /dev/null @@ -1,1652 +0,0 @@ -diff --git a/src/download/download_constructor.cc b/src/download/download_constructor.cc -index f37f848..86e5351 100644 ---- a/src/download/download_constructor.cc -+++ b/src/download/download_constructor.cc -@@ -81,7 +81,10 @@ struct download_constructor_encoding_match : - }; - - void --DownloadConstructor::initialize(const Object& b) { -+DownloadConstructor::initialize(Object& b) { -+ if (!b.has_key_map("info") && b.has_key_string("magnet-uri")) -+ parse_magnet_uri(b, b.get_key_string("magnet-uri")); -+ - if (b.has_key_string("encoding")) - m_defaultEncoding = b.get_key_string("encoding"); - -@@ -136,10 +139,24 @@ DownloadConstructor::parse_info(const Object& b) { - if (b.flags() & Object::flag_unordered) - throw input_error("Download has unordered info dictionary."); - -- uint32_t chunkSize = b.get_key_value("piece length"); -+ uint32_t chunkSize; -+ -+ if (b.has_key_value("meta_download") && b.get_key_value("meta_download")) -+ m_download->info()->set_meta_download(true); -+ -+ if (m_download->info()->is_meta_download()) { -+ if (b.get_key_string("pieces").length() != HashString::size_data) -+ throw input_error("Meta-download has invalid piece data."); -+ -+ chunkSize = 1; -+ parse_single_file(b, chunkSize); -+ -+ } else { -+ chunkSize = b.get_key_value("piece length"); - -- if (chunkSize <= (1 << 10) || chunkSize > (128 << 20)) -- throw input_error("Torrent has an invalid \"piece length\"."); -+ if (chunkSize <= (1 << 10) || chunkSize > (128 << 20)) -+ throw input_error("Torrent has an invalid \"piece length\"."); -+ } - - if (b.has_key("length")) { - parse_single_file(b, chunkSize); -@@ -148,11 +165,11 @@ DownloadConstructor::parse_info(const Object& b) { - parse_multi_files(b.get_key("files"), chunkSize); - fileList->set_root_dir("./" + m_download->info()->name()); - -- } else { -+ } else if (!m_download->info()->is_meta_download()) { - throw input_error("Torrent must have either length or files entry."); - } - -- if (fileList->size_bytes() == 0) -+ if (fileList->size_bytes() == 0 && !m_download->info()->is_meta_download()) - throw input_error("Torrent has zero length."); - - // Set chunksize before adding files to make sure the index range is -@@ -239,7 +256,7 @@ DownloadConstructor::parse_single_file(const Object& b, uint32_t chunkSize) { - throw input_error("Bad torrent file, \"name\" is an invalid path name."); - - FileList* fileList = m_download->main()->file_list(); -- fileList->initialize(b.get_key_value("length"), chunkSize); -+ fileList->initialize(chunkSize == 1 ? 1 : b.get_key_value("length"), chunkSize); - fileList->set_multi_file(false); - - std::list<Path> pathList; -@@ -343,4 +360,132 @@ DownloadConstructor::choose_path(std::list<Path>* pathList) { - return pathList->front(); - } - -+static const char* -+parse_base32_sha1(const char* pos, HashString& hash) { -+ HashString::iterator hashItr = hash.begin(); -+ -+ static const int base_shift = 8+8-5; -+ int shift = base_shift; -+ uint16_t decoded = 0; -+ -+ while (*pos) { -+ char c = *pos++; -+ uint16_t value; -+ -+ if (c >= 'A' && c <= 'Z') -+ value = c - 'A'; -+ else if (c >= 'a' && c <= 'z') -+ value = c - 'a'; -+ else if (c >= '2' && c <= '7') -+ value = 26 + c - '2'; -+ else if (c == '&') -+ break; -+ else -+ return NULL; -+ -+ decoded |= (value << shift); -+ if (shift <= 8) { -+ // Too many characters for a base32 SHA1. -+ if (hashItr == hash.end()) -+ return NULL; -+ -+ *hashItr++ = (decoded >> 8); -+ decoded <<= 8; -+ shift += 3; -+ } else { -+ shift -= 5; -+ } -+ } -+ -+ return hashItr != hash.end() || shift != base_shift ? NULL : pos; -+} -+ -+void -+DownloadConstructor::parse_magnet_uri(Object& b, const std::string& uri) { -+ if (std::strncmp(uri.c_str(), "magnet:?", 8)) -+ throw input_error("Invalid magnet URI."); -+ -+ const char* pos = uri.c_str() + 8; -+ -+ Object trackers(Object::create_list()); -+ HashString hash; -+ bool hashValid = false; -+ -+ while (*pos) { -+ const char* tagStart = pos; -+ while (*pos != '=') -+ if (!*pos++) -+ break; -+ -+ SimpleString tag(tagStart, pos - tagStart); -+ pos++; -+ -+ // hash may be base32 encoded (optional in BEP 0009 and common practice) -+ if (tag == "xt") { -+ if (strncmp(pos, "urn:btih:", 9)) -+ throw input_error("Invalid magnet URI."); -+ -+ pos += 9; -+ -+ const char* nextPos = parse_base32_sha1(pos, hash); -+ if (nextPos != NULL) { -+ pos = nextPos; -+ hashValid = true; -+ continue; -+ } -+ } -+ -+ // everything else, including sometimes the hash, is url encoded. -+ std::string decoded; -+ while (*pos) { -+ char c = *pos++; -+ if (c == '%') { -+ if (sscanf(pos, "%02hhx", &c) != 1) -+ throw input_error("Invalid magnet URI."); -+ -+ pos += 2; -+ -+ } else if (c == '&') { -+ break; -+ } -+ -+ decoded.push_back(c); -+ } -+ -+ if (tag == "xt") { -+ // url-encoded hash as per magnet URN specs -+ if (decoded.length() == hash.size_data) { -+ hash = *HashString::cast_from(decoded); -+ hashValid = true; -+ -+ // hex-encoded hash as per BEP 0009 -+ } else if (decoded.length() == hash.size_data * 2) { -+ std::string::iterator hexItr = decoded.begin(); -+ for (HashString::iterator itr = hash.begin(), last = hash.end(); itr != last; itr++, hexItr += 2) -+ *itr = (rak::hexchar_to_value(*hexItr) << 4) + rak::hexchar_to_value(*(hexItr + 1)); -+ hashValid = true; -+ -+ } else { -+ throw input_error("Invalid magnet URI."); -+ } -+ } else if (tag == "tr") { -+ trackers.insert_back(Object::create_list()).insert_back(decoded); -+ } -+ // could also handle "dn" = display name (torrent name), but we can't really use that -+ } -+ -+ if (!hashValid) -+ throw input_error("Invalid magnet URI."); -+ -+ Object& info = b.insert_key("info", Object::create_map()); -+ info.insert_key("pieces", hash.str()); -+ info.insert_key("name", rak::transform_hex(hash.str()) + ".meta"); -+ info.insert_key("meta_download", (int64_t)1); -+ -+ if (!trackers.as_list().empty()) { -+ b.insert_preserve_copy("announce", trackers.as_list().begin()->as_list().begin()->as_string()); -+ b.insert_preserve_type("announce-list", trackers); -+ } -+} -+ - } -diff --git a/src/download/download_constructor.h b/src/download/download_constructor.h -index 7192f90..8af520f 100644 ---- a/src/download/download_constructor.h -+++ b/src/download/download_constructor.h -@@ -55,7 +55,7 @@ class DownloadConstructor { - public: - DownloadConstructor() : m_download(NULL), m_encodingList(NULL) {} - -- void initialize(const Object& b); -+ void initialize(Object& b); - - void set_download(DownloadWrapper* d) { m_download = d; } - void set_encoding_list(const EncodingList* e) { m_encodingList = e; } -@@ -64,6 +64,7 @@ private: - void parse_name(const Object& b); - void parse_tracker(const Object& b); - void parse_info(const Object& b); -+ void parse_magnet_uri(Object& b, const std::string& uri); - - void add_tracker_group(const Object& b); - void add_tracker_single(const Object& b, int group); -diff --git a/src/download/download_info.h b/src/download/download_info.h -index 0a3c0e8..68fb178 100644 ---- a/src/download/download_info.h -+++ b/src/download/download_info.h -@@ -76,6 +76,7 @@ public: - m_isCompact(true), - m_isAcceptingNewPeers(true), - m_isPrivate(false), -+ m_isMetaDownload(false), - m_pexEnabled(true), - m_pexActive(true), - -@@ -86,7 +87,8 @@ public: - m_uploadedBaseline(0), - m_completedBaseline(0), - m_sizePex(0), -- m_maxSizePex(8) { -+ m_maxSizePex(8), -+ m_metadataSize(0) { - } - - const std::string& name() const { return m_name; } -@@ -116,6 +118,9 @@ public: - bool is_private() const { return m_isPrivate; } - void set_private(bool p) { m_isPrivate = p; if (p) m_pexEnabled = false; } - -+ bool is_meta_download() const { return m_isMetaDownload; } -+ void set_meta_download(bool m) { m_isMetaDownload = m; } -+ - bool is_pex_enabled() const { return m_pexEnabled; } - void set_pex_enabled(bool enabled) { m_pexEnabled = enabled && !m_isPrivate; } - -@@ -134,6 +139,9 @@ public: - uint64_t completed_adjusted() const { return std::max<int64_t>(m_slotStatCompleted() - completed_baseline(), 0); } - void set_completed_baseline(uint64_t b) { m_completedBaseline = b; } - -+ size_t metadata_size() const { return m_metadataSize; } -+ void set_metadata_size(size_t size) { m_metadataSize = size; } -+ - uint32_t size_pex() const { return m_sizePex; } - void set_size_pex(uint32_t b) { m_sizePex = b; } - -@@ -165,6 +173,7 @@ private: - bool m_isCompact; - bool m_isAcceptingNewPeers; - bool m_isPrivate; -+ bool m_isMetaDownload; - bool m_pexEnabled; - bool m_pexActive; - -@@ -176,6 +185,7 @@ private: - uint64_t m_completedBaseline; - uint32_t m_sizePex; - uint32_t m_maxSizePex; -+ size_t m_metadataSize; - - slot_stat_type m_slotStatCompleted; - slot_stat_type m_slotStatLeft; -diff --git a/src/download/download_main.cc b/src/download/download_main.cc -index 1dd5f98..5691021 100644 ---- a/src/download/download_main.cc -+++ b/src/download/download_main.cc -@@ -455,4 +455,19 @@ DownloadMain::do_peer_exchange() { - } - } - -+void -+DownloadMain::set_metadata_size(size_t size) { -+ if (m_info->is_meta_download()) { -+ if (m_fileList.size_bytes() < 2) -+ file_list()->reset_filesize(size); -+ else if (size != m_fileList.size_bytes()) -+ throw communication_error("Peer-supplied metadata size mismatch."); -+ -+ } else if (m_info->metadata_size() && m_info->metadata_size() != size) { -+ throw communication_error("Peer-supplied metadata size mismatch."); -+ } -+ -+ m_info->set_metadata_size(size); -+} -+ - } -diff --git a/src/download/download_main.h b/src/download/download_main.h -index 5d0090b..700f41e 100644 ---- a/src/download/download_main.h -+++ b/src/download/download_main.h -@@ -116,6 +116,8 @@ public: - - bool want_pex_msg() { return m_info->is_pex_active() && m_peerList.available_list()->want_more(); }; - -+ void set_metadata_size(size_t s); -+ - // Carefull with these. - void setup_delegator(); - void setup_tracker(); -diff --git a/src/net/data_buffer.h b/src/net/data_buffer.h -index a26ca36..e3d9e38 100644 ---- a/src/net/data_buffer.h -+++ b/src/net/data_buffer.h -@@ -48,6 +48,7 @@ struct DataBuffer { - DataBuffer(char* data, char* end) : m_data(data), m_end(end), m_owned(true) {} - - DataBuffer clone() const { DataBuffer d = *this; d.m_owned = false; return d; } -+ DataBuffer release() { DataBuffer d = *this; set(NULL, NULL, false); return d; } - - char* data() const { return m_data; } - char* end() const { return m_end; } -@@ -70,7 +71,7 @@ private: - - inline void - DataBuffer::clear() { -- if (!empty()) -+ if (!empty() && m_owned) - delete[] m_data; - - m_data = m_end = NULL; -diff --git a/src/net/socket_base.cc b/src/net/socket_base.cc -index 90457dc..13a9c8b 100644 ---- a/src/net/socket_base.cc -+++ b/src/net/socket_base.cc -@@ -47,7 +47,7 @@ - - namespace torrent { - --char* SocketBase::m_nullBuffer = new char[1 << 17]; -+char* SocketBase::m_nullBuffer = new char[SocketBase::null_buffer_size]; - - SocketBase::~SocketBase() { - if (get_fd().is_valid()) -diff --git a/src/net/socket_base.h b/src/net/socket_base.h -index 9340a23..0f0f424 100644 ---- a/src/net/socket_base.h -+++ b/src/net/socket_base.h -@@ -68,6 +68,8 @@ protected: - SocketBase(const SocketBase&); - void operator = (const SocketBase&); - -+ static const size_t null_buffer_size = 1 << 17; -+ - static char* m_nullBuffer; - }; - -diff --git a/src/protocol/Makefile.am b/src/protocol/Makefile.am -index 6171d06..18f671d 100644 ---- a/src/protocol/Makefile.am -+++ b/src/protocol/Makefile.am -@@ -17,6 +17,8 @@ libsub_protocol_la_SOURCES = \ - peer_connection_base.h \ - peer_connection_leech.cc \ - peer_connection_leech.h \ -+ peer_connection_metadata.cc \ -+ peer_connection_metadata.h \ - peer_factory.cc \ - peer_factory.h \ - protocol_base.h \ -diff --git a/src/protocol/extensions.cc b/src/protocol/extensions.cc -index 7cbf6e3..3e0cf60 100644 ---- a/src/protocol/extensions.cc -+++ b/src/protocol/extensions.cc -@@ -43,6 +43,8 @@ - - #include "download/available_list.h" - #include "download/download_main.h" -+#include "download/download_manager.h" -+#include "download/download_wrapper.h" - #include "protocol/peer_connection_base.h" - #include "torrent/connection_manager.h" - #include "torrent/object.h" -@@ -58,7 +60,9 @@ namespace torrent { - - enum ext_handshake_keys { - key_e, -+ key_m_utMetadata, - key_m_utPex, -+ key_metadataSize, - key_p, - key_reqq, - key_v, -@@ -70,6 +74,13 @@ enum ext_pex_keys { - key_pex_LAST - }; - -+enum ext_metadata_keys { -+ key_msgType, -+ key_piece, -+ key_totalSize, -+ key_metadata_LAST -+}; -+ - class ExtHandshakeMessage : public StaticMap<ext_handshake_keys, key_handshake_LAST> { - public: - typedef StaticMap<ext_handshake_keys, key_handshake_LAST> base_type; -@@ -82,9 +93,17 @@ public: - typedef StaticMapKeys::mapping_type mapping_type; - }; - -+class ExtMetadataMessage : public StaticMap<ext_metadata_keys, key_metadata_LAST> { -+public: -+ typedef StaticMap<ext_metadata_keys, key_metadata_LAST> base_type; -+ typedef StaticMapKeys::mapping_type mapping_type; -+}; -+ - ExtHandshakeMessage::mapping_type ext_handshake_key_names[ExtHandshakeMessage::length] = { - { key_e, "e" }, -+ { key_m_utMetadata, "m::ut_metadata" }, - { key_m_utPex, "m::ut_pex" }, -+ { key_metadataSize, "metadata_size" }, - { key_p, "p" }, - { key_reqq, "reqq" }, - { key_v, "v" }, -@@ -94,9 +113,16 @@ ExtPEXMessage::mapping_type ext_pex_key_names[ExtPEXMessage::length] = { - { key_pex_added, "added" }, - }; - -+ExtMetadataMessage::mapping_type ext_metadata_key_names[ExtMetadataMessage::length] = { -+ { key_msgType, "msg_type" }, -+ { key_piece, "piece" }, -+ { key_totalSize, "total_size" }, -+}; -+ - ext_handshake_keys message_keys[ProtocolExtension::FIRST_INVALID] = { - key_handshake_LAST, // Handshake, not actually used. - key_m_utPex, -+ key_m_utMetadata, - }; - - template<> -@@ -105,6 +131,9 @@ const ExtHandshakeMessage::key_map_init ExtHandshakeMessage::base_type::keyMap(e - template<> - const ExtPEXMessage::key_map_init ExtPEXMessage::base_type::keyMap(ext_pex_key_names); - -+template<> -+const ExtMetadataMessage::key_map_init ExtMetadataMessage::base_type::keyMap(ext_metadata_key_names); -+ - void - ProtocolExtension::cleanup() { - // if (is_default()) -@@ -160,7 +189,11 @@ ProtocolExtension::generate_handshake_message() { - message[key_v] = SimpleString("libTorrent " VERSION); - message[key_reqq] = 2048; // maximum request queue size - -+ if (!m_download->info()->is_meta_download()) -+ message[key_metadataSize] = m_download->info()->metadata_size(); -+ - message[key_m_utPex] = is_local_enabled(UT_PEX) ? UT_PEX : 0; -+ message[key_m_utMetadata] = UT_METADATA; - - char buffer[1024]; - object_buffer_t result = staticMap_write_bencode_c(object_write_to_buffer, NULL, std::make_pair(buffer, buffer + sizeof(buffer)), message); -@@ -224,7 +257,7 @@ ProtocolExtension::generate_ut_pex_message(const PEXList& added, const PEXList& - - void - ProtocolExtension::read_start(int type, uint32_t length, bool skip) { -- if (is_default() || (type >= FIRST_INVALID) || length > (1 << 14)) -+ if (is_default() || (type >= FIRST_INVALID) || length > (1 << 15)) - throw communication_error("Received invalid extension message."); - - if (m_read != NULL || length < 0) -@@ -244,19 +277,25 @@ ProtocolExtension::read_start(int type, uint32_t length, bool skip) { - m_readPos = m_read = new char[length]; - } - --void -+bool - ProtocolExtension::read_done() { -+ bool blocked = false; -+ - try { - switch(m_readType) { - case SKIP_EXTENSION: - break; - - case HANDSHAKE: -- parse_handshake(); -+ blocked = parse_handshake(); - break; - - case UT_PEX: -- parse_ut_pex(); -+ blocked = parse_ut_pex(); -+ break; -+ -+ case UT_METADATA: -+ blocked = parse_ut_metadata(); - break; - - default: -@@ -272,6 +311,8 @@ ProtocolExtension::read_done() { - - m_readType = FIRST_INVALID; - m_flags |= flag_received_ext; -+ -+ return !blocked; - } - - // Called whenever peer enables or disables an extension. -@@ -285,7 +326,7 @@ ProtocolExtension::peer_toggle_remote(int type, bool active) { - } - } - --void -+bool - ProtocolExtension::parse_handshake() { - ExtHandshakeMessage message; - staticMap_read_bencode(m_read, m_readPos, message); -@@ -323,10 +364,15 @@ ProtocolExtension::parse_handshake() { - if (message[key_reqq].is_value()) - m_maxQueueLength = message[key_reqq].as_value(); - -+ if (message[key_metadataSize].is_value()) -+ m_download->set_metadata_size(message[key_metadataSize].as_value()); -+ - m_flags &= ~flag_initial_handshake; -+ -+ return false; - } - --void -+bool - ProtocolExtension::parse_ut_pex() { - // Ignore message if we're still in the handshake (no connection - // yet), or no peers are present. -@@ -336,11 +382,11 @@ ProtocolExtension::parse_ut_pex() { - - // TODO: Check if pex is enabled? - if (!message[key_pex_added].is_sstring()) -- return; -+ return false; - - SimpleString peers = message[key_pex_added].as_sstring(); - if (peers.empty()) -- return; -+ return false; - - AddressList l; - l.parse_address_compact(peers); -@@ -348,6 +394,82 @@ ProtocolExtension::parse_ut_pex() { - l.erase(std::unique(l.begin(), l.end()), l.end()); - - m_download->peer_list()->insert_available(&l); -+ -+ return false; -+} -+ -+bool -+ProtocolExtension::parse_ut_metadata() { -+ ExtMetadataMessage message; -+ -+ // Piece data comes after bencoded extension message. -+ const char* dataStart = staticMap_read_bencode(m_read, m_readPos, message); -+ -+ switch(message[key_msgType].as_value()) { -+ case 0: -+ // Can't process new request while still having data to send. -+ if (has_pending_message()) -+ return true; -+ -+ send_metadata_piece(message[key_piece].as_value()); -+ break; -+ -+ case 1: -+ if (m_connection == NULL) -+ break; -+ -+ m_connection->receive_metadata_piece(message[key_piece].as_value(), dataStart, m_readPos - dataStart); -+ break; -+ -+ case 2: -+ if (m_connection != NULL) -+ m_connection->receive_metadata_piece(message[key_piece].as_value(), NULL, 0); -+ break; -+ }; -+ -+ return false; -+} -+ -+void -+ProtocolExtension::send_metadata_piece(size_t piece) { -+ // Reject out-of-range piece, or if we don't have the complete metadata yet. -+ size_t metadataSize = m_download->info()->metadata_size(); -+ size_t pieceEnd = (metadataSize + metadata_piece_size - 1) >> metadata_piece_shift; -+ -+ if (m_download->info()->is_meta_download() || piece >= pieceEnd) { -+ // reject: { "msg_type" => 2, "piece" => ... } -+ m_pendingType = UT_METADATA; -+ m_pending = build_bencode(40, "d8:msg_typei2e5:piecei%zuee", piece); -+ return; -+ } -+ -+ // These messages will be rare, so we'll just build the -+ // metadata here instead of caching it uselessly. -+ char* buffer = new char[metadataSize]; -+ object_buffer_t result = object_write_bencode_c(object_write_to_buffer, NULL, object_buffer_t(buffer, buffer + metadataSize), -+ &(*manager->download_manager()->find(m_download->info()))->bencode()->get_key("info")); -+ -+ // data: { "msg_type" => 1, "piece" => ..., "total_size" => ... } followed by piece data (outside of dictionary) -+ size_t length = piece == pieceEnd - 1 ? m_download->info()->metadata_size() % metadata_piece_size : metadata_piece_size; -+ m_pendingType = UT_METADATA; -+ m_pending = build_bencode(length + 128, "d8:msg_typei1e5:piecei%zue10:total_sizei%zuee", piece, metadataSize); -+ -+ memcpy(m_pending.end(), buffer + (piece << metadata_piece_shift), length); -+ m_pending.set(m_pending.data(), m_pending.end() + length, m_pending.owned()); -+ delete [] buffer; -+} -+ -+bool -+ProtocolExtension::request_metadata_piece(const Piece* p) { -+ if (p->offset() % metadata_piece_size) -+ throw internal_error("ProtocolExtension::request_metadata_piece got misaligned piece offset."); -+ -+ if (has_pending_message()) -+ return false; -+ -+ m_pendingType = UT_METADATA; -+ m_pending = build_bencode(40, "d8:msg_typei0e5:piecei%uee", (unsigned)(p->offset() >> metadata_piece_shift)); -+ return true; - } - - } -diff --git a/src/protocol/extensions.h b/src/protocol/extensions.h -index 96ed652..485e7d7 100644 ---- a/src/protocol/extensions.h -+++ b/src/protocol/extensions.h -@@ -60,6 +60,7 @@ public: - typedef enum { - HANDSHAKE = 0, - UT_PEX, -+ UT_METADATA, - - FIRST_INVALID, // first invalid message ID - -@@ -81,6 +82,10 @@ public: - // Number of extensions we support, not counting handshake. - static const int extension_count = FIRST_INVALID - HANDSHAKE - 1; - -+ // Fixed size of a metadata piece (16 KB). -+ static const size_t metadata_piece_shift = 14; -+ static const size_t metadata_piece_size = 1 << metadata_piece_shift; -+ - ProtocolExtension(); - ~ProtocolExtension() { delete [] m_read; } - -@@ -91,6 +96,7 @@ public: - static ProtocolExtension make_default(); - - void set_info(PeerInfo* peerInfo, DownloadMain* download) { m_peerInfo = peerInfo; m_download = download; } -+ void set_connection(PeerConnectionBase* c) { m_connection = c; } - - DataBuffer generate_handshake_message(); - static DataBuffer generate_toggle_message(MessageType t, bool on); -@@ -112,7 +118,7 @@ public: - - // Handle reading extension data from peer. - void read_start(int type, uint32_t length, bool skip); -- void read_done(); -+ bool read_done(); - - char* read_position() { return m_readPos; } - bool read_move(uint32_t v) { m_readPos += v; return (m_readLeft -= v) == 0; } -@@ -132,13 +138,23 @@ public: - void clear_initial_pex() { m_flags &= ~flag_initial_pex; } - void reset() { std::memset(&m_idMap, 0, sizeof(m_idMap)); } - -+ bool request_metadata_piece(const Piece* p); -+ -+ // To handle cases where the extension protocol needs to send a reply. -+ bool has_pending_message() const { return m_pendingType != HANDSHAKE; } -+ MessageType pending_message_type() const { return m_pendingType; } -+ DataBuffer pending_message_data() { return m_pending.release(); } -+ void clear_pending_message() { if (m_pending.empty()) m_pendingType = HANDSHAKE; } -+ - private: -- void parse_handshake(); -- void parse_ut_pex(); -+ bool parse_handshake(); -+ bool parse_ut_pex(); -+ bool parse_ut_metadata(); - - static DataBuffer build_bencode(size_t maxLength, const char* format, ...) ATTRIBUTE_PRINTF(2); - - void peer_toggle_remote(int type, bool active); -+ void send_metadata_piece(size_t piece); - - // Map of IDs peer uses for each extension message type, excluding - // HANDSHAKE. -@@ -149,11 +165,15 @@ private: - int m_flags; - PeerInfo* m_peerInfo; - DownloadMain* m_download; -+ PeerConnectionBase* m_connection; - - uint8_t m_readType; - uint32_t m_readLeft; - char* m_read; - char* m_readPos; -+ -+ MessageType m_pendingType; -+ DataBuffer m_pending; - }; - - inline -@@ -163,10 +183,13 @@ ProtocolExtension::ProtocolExtension() : - m_flags(flag_local_enabled_base | flag_remote_supported_base | flag_initial_handshake), - m_peerInfo(NULL), - m_download(NULL), -+ m_connection(NULL), - m_readType(FIRST_INVALID), -- m_read(NULL) { -+ m_read(NULL), -+ m_pendingType(HANDSHAKE) { - - reset(); -+ set_local_enabled(UT_METADATA); - } - - inline ProtocolExtension -diff --git a/src/protocol/handshake.cc b/src/protocol/handshake.cc -index d863f7b..7fb389b 100644 ---- a/src/protocol/handshake.cc -+++ b/src/protocol/handshake.cc -@@ -723,6 +723,17 @@ restart: - - case READ_MESSAGE: - case POST_HANDSHAKE: -+ // For meta-downloads, we aren't interested in the bitfield or -+ // extension messages here, PCMetadata handles all that. The -+ // bitfield only refers to the single-chunk meta-data, so fake that. -+ if (m_download->info()->is_meta_download()) { -+ m_bitfield.set_size_bits(1); -+ m_bitfield.allocate(); -+ m_bitfield.set(0); -+ read_done(); -+ break; -+ } -+ - fill_read_buffer(5); - - // Received a keep-alive message which means we won't be -@@ -1022,6 +1033,10 @@ Handshake::prepare_peer_info() { - std::memcpy(m_peerInfo->set_options(), m_options, 8); - m_peerInfo->mutable_id().assign((const char*)m_readBuffer.position()); - m_readBuffer.consume(20); -+ -+ // For meta downloads, we require support of the extension protocol. -+ if (m_download->info()->is_meta_download() && !m_peerInfo->supports_extensions()) -+ throw handshake_error(ConnectionManager::handshake_dropped, e_handshake_unwanted_connection); - } - - void -diff --git a/src/protocol/peer_connection_base.cc b/src/protocol/peer_connection_base.cc -index ab043a6..815ea93 100644 ---- a/src/protocol/peer_connection_base.cc -+++ b/src/protocol/peer_connection_base.cc -@@ -93,8 +93,7 @@ PeerConnectionBase::~PeerConnectionBase() { - if (m_extensions != NULL && !m_extensions->is_default()) - delete m_extensions; - -- if (m_extensionMessage.owned()) -- m_extensionMessage.clear(); -+ m_extensionMessage.clear(); - } - - void -@@ -116,6 +115,8 @@ PeerConnectionBase::initialize(DownloadMain* download, PeerInfo* peerInfo, Socke - m_encryption = *encryptionInfo; - m_extensions = extensions; - -+ m_extensions->set_connection(this); -+ - m_peerChunks.set_peer_info(m_peerInfo); - m_peerChunks.bitfield()->swap(*bitfield); - -@@ -581,8 +582,12 @@ PeerConnectionBase::down_extension() { - m_extensions->read_move(bytes); - } - -- if (m_extensions->is_complete()) -- m_extensions->read_done(); -+ // If extension can't be processed yet (due to a pending write), -+ // disable reads until the pending message is completely sent. -+ if (m_extensions->is_complete() && !m_extensions->is_invalid() && !m_extensions->read_done()) { -+ manager->poll()->remove_read(this); -+ return false; -+ } - - return m_extensions->is_complete(); - } -@@ -693,12 +698,15 @@ PeerConnectionBase::up_extension() { - if (m_extensionOffset < m_extensionMessage.length()) - return false; - -- // clear() deletes the buffer, only do that if we made a copy, -- // otherwise the buffer is shared among all connections. -- if (m_extensionMessage.owned()) -- m_extensionMessage.clear(); -- else -- m_extensionMessage.set(NULL, NULL, false); -+ m_extensionMessage.clear(); -+ -+ // If we have an unprocessed message, process it now and enable reads again. -+ if (m_extensions->is_complete() && !m_extensions->is_invalid()) { -+ if (!m_extensions->read_done()) -+ throw internal_error("PeerConnectionBase::up_extension could not process complete extension message."); -+ -+ manager->poll()->insert_read(this); -+ } - - return true; - } -@@ -857,4 +865,16 @@ PeerConnectionBase::send_pex_message() { - return true; - } - -+// Extension protocol needs to send a reply. -+bool -+PeerConnectionBase::send_ext_message() { -+ write_prepare_extension(m_extensions->pending_message_type(), m_extensions->pending_message_data()); -+ m_extensions->clear_pending_message(); -+ return true; -+} -+ -+void -+PeerConnectionBase::receive_metadata_piece(uint32_t piece, const char* data, uint32_t length) { -+} -+ - } -diff --git a/src/protocol/peer_connection_base.h b/src/protocol/peer_connection_base.h -index 2994963..d131341 100644 ---- a/src/protocol/peer_connection_base.h -+++ b/src/protocol/peer_connection_base.h -@@ -140,6 +140,9 @@ public: - void read_insert_poll_safe(); - void write_insert_poll_safe(); - -+ // Communication with the protocol extensions -+ virtual void receive_metadata_piece(uint32_t piece, const char* data, uint32_t length); -+ - protected: - static const uint32_t extension_must_encrypt = ~uint32_t(); - -@@ -179,6 +182,7 @@ protected: - bool try_request_pieces(); - - bool send_pex_message(); -+ bool send_ext_message(); - - DownloadMain* m_download; - -diff --git a/src/protocol/peer_connection_leech.cc b/src/protocol/peer_connection_leech.cc -index a75d333..36c6d7a 100644 ---- a/src/protocol/peer_connection_leech.cc -+++ b/src/protocol/peer_connection_leech.cc -@@ -333,9 +333,13 @@ PeerConnection<type>::read_message() { - m_down->set_state(ProtocolRead::READ_EXTENSION); - } - -- if (down_extension()) -- m_down->set_state(ProtocolRead::IDLE); -+ if (!down_extension()) -+ return false; - -+ if (m_extensions->has_pending_message()) -+ write_insert_poll_safe(); -+ -+ m_down->set_state(ProtocolRead::IDLE); - return true; - - default: -@@ -433,6 +437,9 @@ PeerConnection<type>::event_read() { - if (!down_extension()) - return; - -+ if (m_extensions->has_pending_message()) -+ write_insert_poll_safe(); -+ - m_down->set_state(ProtocolRead::IDLE); - break; - -@@ -546,6 +553,10 @@ PeerConnection<type>::fill_write_buffer() { - send_pex_message()) { - // Don't do anything else if send_pex_message() succeeded. - -+ } else if (m_extensions->has_pending_message() && m_up->can_write_extension() && -+ send_ext_message()) { -+ // Same. -+ - } else if (!m_upChoke.choked() && - !m_peerChunks.upload_queue()->empty() && - m_up->can_write_piece() && -diff --git a/src/protocol/peer_connection_metadata.cc b/src/protocol/peer_connection_metadata.cc -new file mode 100644 -index 0000000..24f13ca ---- /dev/null -+++ b/src/protocol/peer_connection_metadata.cc -@@ -0,0 +1,461 @@ -+// libTorrent - BitTorrent library -+// Copyright (C) 2005-2007, Jari Sundell -+// -+// 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 of the License, or -+// (at your option) any later version. -+// -+// This program is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+// -+// You should have received a copy of the GNU General Public License -+// along with this program; if not, write to the Free Software -+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+// -+// In addition, as a special exception, the copyright holders give -+// permission to link the code of portions of this program with the -+// OpenSSL library under certain conditions as described in each -+// individual source file, and distribute linked combinations -+// including the two. -+// -+// You must obey the GNU General Public License in all respects for -+// all of the code used other than OpenSSL. If you modify file(s) -+// with this exception, you may extend this exception to your version -+// of the file(s), but you are not obligated to do so. If you do not -+// wish to do so, delete this exception statement from your version. -+// If you delete this exception statement from all source files in the -+// program, then also delete it here. -+// -+// Contact: Jari Sundell <jaris@ifi.uio.no> -+// -+// Skomakerveien 33 -+// 3185 Skoppum, NORWAY -+ -+#include "config.h" -+ -+#include <cstring> -+#include <sstream> -+ -+#include "data/chunk_list_node.h" -+#include "download/choke_manager.h" -+#include "download/chunk_selector.h" -+#include "download/chunk_statistics.h" -+#include "download/download_info.h" -+#include "download/download_main.h" -+#include "torrent/dht_manager.h" -+#include "torrent/peer/connection_list.h" -+#include "torrent/peer/peer_info.h" -+ -+#include "extensions.h" -+#include "peer_connection_metadata.h" -+ -+namespace torrent { -+ -+PeerConnectionMetadata::~PeerConnectionMetadata() { -+} -+ -+void -+PeerConnectionMetadata::initialize_custom() { -+} -+ -+void -+PeerConnectionMetadata::update_interested() { -+} -+ -+bool -+PeerConnectionMetadata::receive_keepalive() { -+ if (cachedTime - m_timeLastRead > rak::timer::from_seconds(240)) -+ return false; -+ -+ m_tryRequest = true; -+ -+ // There's no point in adding ourselves to the write poll if the -+ // buffer is full, as that will already have been taken care of. -+ if (m_up->get_state() == ProtocolWrite::IDLE && -+ m_up->can_write_keepalive()) { -+ -+ write_insert_poll_safe(); -+ -+ ProtocolBuffer<512>::iterator old_end = m_up->buffer()->end(); -+ m_up->write_keepalive(); -+ -+ if (is_encrypted()) -+ m_encryption.encrypt(old_end, m_up->buffer()->end() - old_end); -+ } -+ -+ return true; -+} -+ -+// We keep the message in the buffer if it is incomplete instead of -+// keeping the state and remembering the read information. This -+// shouldn't happen very often compared to full reads. -+inline bool -+PeerConnectionMetadata::read_message() { -+ ProtocolBuffer<512>* buf = m_down->buffer(); -+ -+ if (buf->remaining() < 4) -+ return false; -+ -+ // Remember the start of the message so we may reset it if we don't -+ // have the whole message. -+ ProtocolBuffer<512>::iterator beginning = buf->position(); -+ -+ uint32_t length = buf->read_32(); -+ -+ if (length == 0) { -+ // Keepalive message. -+ m_down->set_last_command(ProtocolBase::KEEP_ALIVE); -+ -+ return true; -+ -+ } else if (buf->remaining() < 1) { -+ buf->set_position_itr(beginning); -+ return false; -+ -+ } else if (length > (1 << 20)) { -+ throw communication_error("PeerConnection::read_message() got an invalid message length."); -+ } -+ -+ m_down->set_last_command((ProtocolBase::Protocol)buf->peek_8()); -+ -+ // Ignore most messages, they aren't relevant for a metadata download. -+ switch (buf->read_8()) { -+ case ProtocolBase::CHOKE: -+ case ProtocolBase::UNCHOKE: -+ case ProtocolBase::INTERESTED: -+ case ProtocolBase::NOT_INTERESTED: -+ return true; -+ -+ case ProtocolBase::HAVE: -+ if (!m_down->can_read_have_body()) -+ break; -+ -+ buf->read_32(); -+ return true; -+ -+ case ProtocolBase::REQUEST: -+ if (!m_down->can_read_request_body()) -+ break; -+ -+ m_down->read_request(); -+ return true; -+ -+ case ProtocolBase::PIECE: -+ throw communication_error("Received a piece but the connection is strictly for meta data."); -+ -+ case ProtocolBase::CANCEL: -+ if (!m_down->can_read_cancel_body()) -+ break; -+ -+ m_down->read_request(); -+ return true; -+ -+ case ProtocolBase::PORT: -+ if (!m_down->can_read_port_body()) -+ break; -+ -+ manager->dht_manager()->add_node(m_peerInfo->socket_address(), m_down->buffer()->read_16()); -+ return true; -+ -+ case ProtocolBase::EXTENSION_PROTOCOL: -+ if (!m_down->can_read_extension_body()) -+ break; -+ -+ if (m_extensions->is_default()) { -+ m_extensions = new ProtocolExtension(); -+ m_extensions->set_info(m_peerInfo, m_download); -+ } -+ -+ { -+ int extension = m_down->buffer()->read_8(); -+ m_extensions->read_start(extension, length - 2, (extension == ProtocolExtension::UT_PEX) && !m_download->want_pex_msg()); -+ m_down->set_state(ProtocolRead::READ_EXTENSION); -+ } -+ -+ if (!down_extension()) -+ return false; -+ -+ // Drop peer if it disabled the metadata extension. -+ if (!m_extensions->is_remote_supported(ProtocolExtension::UT_METADATA)) -+ throw close_connection(); -+ -+ m_down->set_state(ProtocolRead::IDLE); -+ m_tryRequest = true; -+ write_insert_poll_safe(); -+ -+ return true; -+ -+ case ProtocolBase::BITFIELD: -+ // Discard the bitfield sent by the peer. -+ m_skipLength = length - 1; -+ m_down->set_state(ProtocolRead::READ_SKIP_PIECE); -+ return false; -+ -+ default: -+ throw communication_error("Received unsupported message type."); -+ } -+ -+ // We were unsuccessfull in reading the message, need more data. -+ buf->set_position_itr(beginning); -+ return false; -+} -+ -+void -+PeerConnectionMetadata::event_read() { -+ m_timeLastRead = cachedTime; -+ -+ // Need to make sure ProtocolBuffer::end() is pointing to the end of -+ // the unread data, and that the unread data starts from the -+ // beginning of the buffer. Or do we use position? Propably best, -+ // therefor ProtocolBuffer::position() points to the beginning of -+ // the unused data. -+ -+ try { -+ -+ // Normal read. -+ // -+ // We rarely will read zero bytes as the read of 64 bytes will -+ // almost always either not fill up or it will require additional -+ // reads. -+ // -+ // Only loop when end hits 64. -+ -+ do { -+ switch (m_down->get_state()) { -+ case ProtocolRead::IDLE: -+ if (m_down->buffer()->size_end() < read_size) { -+ unsigned int length = read_stream_throws(m_down->buffer()->end(), read_size - m_down->buffer()->size_end()); -+ m_down->throttle()->node_used_unthrottled(length); -+ -+ if (is_encrypted()) -+ m_encryption.decrypt(m_down->buffer()->end(), length); -+ -+ m_down->buffer()->move_end(length); -+ } -+ -+ while (read_message()); -+ -+ if (m_down->buffer()->size_end() == read_size) { -+ m_down->buffer()->move_unused(); -+ break; -+ } else { -+ m_down->buffer()->move_unused(); -+ return; -+ } -+ -+ case ProtocolRead::READ_EXTENSION: -+ if (!down_extension()) -+ return; -+ -+ // Drop peer if it disabled the metadata extension. -+ if (!m_extensions->is_remote_supported(ProtocolExtension::UT_METADATA)) -+ throw close_connection(); -+ -+ m_down->set_state(ProtocolRead::IDLE); -+ m_tryRequest = true; -+ write_insert_poll_safe(); -+ break; -+ -+ // Actually skipping the bitfield. -+ // We never receive normal piece messages anyway. -+ case ProtocolRead::READ_SKIP_PIECE: -+ if (!read_skip_bitfield()) -+ return; -+ -+ m_down->set_state(ProtocolRead::IDLE); -+ break; -+ -+ default: -+ throw internal_error("PeerConnection::event_read() wrong state."); -+ } -+ -+ // Figure out how to get rid of the shouldLoop boolean. -+ } while (true); -+ -+ // Exception handlers: -+ -+ } catch (close_connection& e) { -+ m_download->connection_list()->erase(this, 0); -+ -+ } catch (blocked_connection& e) { -+ m_download->info()->signal_network_log().emit("Momentarily blocked read connection."); -+ m_download->connection_list()->erase(this, 0); -+ -+ } catch (network_error& e) { -+ m_download->connection_list()->erase(this, 0); -+ -+ } catch (storage_error& e) { -+ m_download->info()->signal_storage_error().emit(e.what()); -+ m_download->connection_list()->erase(this, 0); -+ -+ } catch (base_error& e) { -+ std::stringstream s; -+ s << "Connection read fd(" << get_fd().get_fd() << ',' << m_down->get_state() << ',' << m_down->last_command() << ") \"" << e.what() << '"'; -+ -+ throw internal_error(s.str()); -+ } -+} -+ -+inline void -+PeerConnectionMetadata::fill_write_buffer() { -+ ProtocolBuffer<512>::iterator old_end = m_up->buffer()->end(); -+ -+ if (m_tryRequest) -+ m_tryRequest = try_request_metadata_pieces(); -+ -+ if (m_sendPEXMask && m_up->can_write_extension() && -+ send_pex_message()) { -+ // Don't do anything else if send_pex_message() succeeded. -+ -+ } else if (m_extensions->has_pending_message() && m_up->can_write_extension() && -+ send_ext_message()) { -+ // Same. -+ } -+ -+ if (is_encrypted()) -+ m_encryption.encrypt(old_end, m_up->buffer()->end() - old_end); -+} -+ -+void -+PeerConnectionMetadata::event_write() { -+ try { -+ -+ do { -+ -+ switch (m_up->get_state()) { -+ case ProtocolWrite::IDLE: -+ -+ fill_write_buffer(); -+ -+ if (m_up->buffer()->remaining() == 0) { -+ manager->poll()->remove_write(this); -+ return; -+ } -+ -+ m_up->set_state(ProtocolWrite::MSG); -+ -+ case ProtocolWrite::MSG: -+ if (!m_up->buffer()->consume(m_up->throttle()->node_used_unthrottled(write_stream_throws(m_up->buffer()->position(), m_up->buffer()->remaining())))) -+ return; -+ -+ m_up->buffer()->reset(); -+ -+ if (m_up->last_command() != ProtocolBase::EXTENSION_PROTOCOL) { -+ m_up->set_state(ProtocolWrite::IDLE); -+ break; -+ } -+ -+ m_up->set_state(ProtocolWrite::WRITE_EXTENSION); -+ -+ case ProtocolWrite::WRITE_EXTENSION: -+ if (!up_extension()) -+ return; -+ -+ m_up->set_state(ProtocolWrite::IDLE); -+ break; -+ -+ default: -+ throw internal_error("PeerConnection::event_write() wrong state."); -+ } -+ -+ } while (true); -+ -+ } catch (close_connection& e) { -+ m_download->connection_list()->erase(this, 0); -+ -+ } catch (blocked_connection& e) { -+ m_download->info()->signal_network_log().emit("Momentarily blocked write connection."); -+ m_download->connection_list()->erase(this, 0); -+ -+ } catch (network_error& e) { -+ m_download->connection_list()->erase(this, 0); -+ -+ } catch (storage_error& e) { -+ m_download->info()->signal_storage_error().emit(e.what()); -+ m_download->connection_list()->erase(this, 0); -+ -+ } catch (base_error& e) { -+ std::stringstream s; -+ s << "Connection write fd(" << get_fd().get_fd() << ',' << m_up->get_state() << ',' << m_up->last_command() << ") \"" << e.what() << '"'; -+ -+ throw internal_error(s.str()); -+ } -+} -+ -+bool -+PeerConnectionMetadata::read_skip_bitfield() { -+ if (m_down->buffer()->remaining()) { -+ uint32_t length = std::min(m_skipLength, (uint32_t)m_down->buffer()->remaining()); -+ m_down->buffer()->consume(length); -+ m_skipLength -= length; -+ } -+ -+ if (m_skipLength) { -+ uint32_t length = std::min(m_skipLength, (uint32_t)null_buffer_size); -+ length = read_stream_throws(m_nullBuffer, length); -+ if (!length) -+ return false; -+ m_skipLength -= length; -+ } -+ -+ return !m_skipLength; -+} -+ -+// Same as the PCB code, but only one at a time and with the extension protocol. -+bool -+PeerConnectionMetadata::try_request_metadata_pieces() { -+ if (m_download->file_list()->chunk_size() == 1 || !m_extensions->is_remote_supported(ProtocolExtension::UT_METADATA)) -+ return false; -+ -+ if (download_queue()->queued_empty()) -+ m_downStall = 0; -+ -+ uint32_t pipeSize = download_queue()->calculate_pipe_size(m_peerChunks.download_throttle()->rate()->rate()); -+ -+ // Don't start requesting if we can't do it in large enough chunks. -+ if (download_queue()->queued_size() >= (pipeSize + 10) / 2) -+ return false; -+ -+ if (!download_queue()->queued_size() < pipeSize || !m_up->can_write_extension() || -+ m_extensions->has_pending_message()) -+ return false; -+ -+ const Piece* p = download_queue()->delegate(); -+ -+ if (p == NULL) -+ return false; -+ -+ if (!m_download->file_list()->is_valid_piece(*p) || !m_peerChunks.bitfield()->get(p->index())) -+ throw internal_error("PeerConnectionMetadata::try_request_metadata_pieces() tried to use an invalid piece."); -+ -+ return m_extensions->request_metadata_piece(p); -+} -+ -+void -+PeerConnectionMetadata::receive_metadata_piece(uint32_t piece, const char* data, uint32_t length) { -+ if (data == NULL) { -+ // Length is not set in a reject message. -+ length = ProtocolExtension::metadata_piece_size; -+ if ((piece << ProtocolExtension::metadata_piece_shift) + ProtocolExtension::metadata_piece_size >= m_download->file_list()->size_bytes()) -+ length = m_download->file_list()->chunk_size() % ProtocolExtension::metadata_piece_size; -+ m_tryRequest = false; -+ read_cancel_piece(Piece(0, piece << ProtocolExtension::metadata_piece_shift, length)); -+ return; -+ } -+ -+ if (!down_chunk_start(Piece(0, piece << ProtocolExtension::metadata_piece_shift, length))) -+ down_chunk_skip_process(data, length); -+ else -+ down_chunk_process(data, length); -+ -+ if (!m_downloadQueue.transfer()->is_finished()) -+ throw internal_error("PeerConnectionMetadata::receive_metadata_piece did not have complete piece."); -+ -+ m_tryRequest = true; -+ down_chunk_finished(); -+} -+ -+} -diff --git a/src/protocol/peer_connection_metadata.h b/src/protocol/peer_connection_metadata.h -new file mode 100644 -index 0000000..127700a ---- /dev/null -+++ b/src/protocol/peer_connection_metadata.h -@@ -0,0 +1,73 @@ -+// libTorrent - BitTorrent library -+// Copyright (C) 2005-2007, Jari Sundell -+// -+// 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 of the License, or -+// (at your option) any later version. -+// -+// This program is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+// -+// You should have received a copy of the GNU General Public License -+// along with this program; if not, write to the Free Software -+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+// -+// In addition, as a special exception, the copyright holders give -+// permission to link the code of portions of this program with the -+// OpenSSL library under certain conditions as described in each -+// individual source file, and distribute linked combinations -+// including the two. -+// -+// You must obey the GNU General Public License in all respects for -+// all of the code used other than OpenSSL. If you modify file(s) -+// with this exception, you may extend this exception to your version -+// of the file(s), but you are not obligated to do so. If you do not -+// wish to do so, delete this exception statement from your version. -+// If you delete this exception statement from all source files in the -+// program, then also delete it here. -+// -+// Contact: Jari Sundell <jaris@ifi.uio.no> -+// -+// Skomakerveien 33 -+// 3185 Skoppum, NORWAY -+ -+#ifndef LIBTORRENT_PROTOCOL_PEER_CONNECTION_METADATA_H -+#define LIBTORRENT_PROTOCOL_PEER_CONNECTION_METADATA_H -+ -+#include "peer_connection_base.h" -+ -+#include "torrent/download.h" -+ -+namespace torrent { -+ -+class PeerConnectionMetadata : public PeerConnectionBase { -+public: -+ ~PeerConnectionMetadata(); -+ -+ virtual void initialize_custom(); -+ virtual void update_interested(); -+ virtual bool receive_keepalive(); -+ -+ virtual void event_read(); -+ virtual void event_write(); -+ -+ virtual void receive_metadata_piece(uint32_t piece, const char* data, uint32_t length); -+ -+private: -+ inline bool read_message(); -+ -+ bool read_skip_bitfield(); -+ -+ bool try_request_metadata_pieces(); -+ -+ inline void fill_write_buffer(); -+ -+ uint32_t m_skipLength; -+}; -+ -+} -+ -+#endif -diff --git a/src/protocol/peer_factory.cc b/src/protocol/peer_factory.cc -index 7ab9fe8..cfe6a1e 100644 ---- a/src/protocol/peer_factory.cc -+++ b/src/protocol/peer_factory.cc -@@ -38,6 +38,7 @@ - - #include "peer_factory.h" - #include "peer_connection_leech.h" -+#include "peer_connection_metadata.h" - - namespace torrent { - -@@ -62,4 +63,11 @@ createPeerConnectionInitialSeed(bool encrypted) { - return pc; - } - -+PeerConnectionBase* -+createPeerConnectionMetadata(bool encrypted) { -+ PeerConnectionBase* pc = new PeerConnectionMetadata; -+ -+ return pc; -+} -+ - } -diff --git a/src/protocol/peer_factory.h b/src/protocol/peer_factory.h -index 363a5c3..f22d76f 100644 ---- a/src/protocol/peer_factory.h -+++ b/src/protocol/peer_factory.h -@@ -44,6 +44,7 @@ class PeerConnectionBase; - PeerConnectionBase* createPeerConnectionDefault(bool encrypted); - PeerConnectionBase* createPeerConnectionSeed(bool encrypted); - PeerConnectionBase* createPeerConnectionInitialSeed(bool encrypted); -+PeerConnectionBase* createPeerConnectionMetadata(bool encrypted); - - } - -diff --git a/src/torrent/data/file_list.cc b/src/torrent/data/file_list.cc -index 2f5d8d2..7208612 100644 ---- a/src/torrent/data/file_list.cc -+++ b/src/torrent/data/file_list.cc -@@ -466,6 +466,18 @@ FileList::open(int flags) { - - m_isOpen = true; - m_frozenRootDir = m_rootDir; -+ -+ // For meta-downloads, if the file exists, we have to assume that -+ // it is either 0 or 1 length or the correct size. If the size -+ // turns out wrong later, a communication_error will be thrown elsewhere -+ // to alert the user in this (unlikely) case. -+ if (size_bytes() < 2) { -+ rak::file_stat stat; -+ -+ // This probably recurses into open() once, but that is harmless. -+ if (stat.update((*begin())->frozen_path()) && stat.size() > 1) -+ return reset_filesize(stat.size()); -+ } - } - - void -@@ -661,4 +673,14 @@ FileList::update_completed() { - } - } - -+void -+FileList::reset_filesize(int64_t size) { -+ close(); -+ m_chunkSize = size; -+ m_torrentSize = size; -+ (*begin())->set_size_bytes(size); -+ (*begin())->set_range(m_chunkSize); -+ open(open_no_create); -+} -+ - } -diff --git a/src/torrent/data/file_list.h b/src/torrent/data/file_list.h -index bcc8939..60d418a 100644 ---- a/src/torrent/data/file_list.h -+++ b/src/torrent/data/file_list.h -@@ -167,6 +167,10 @@ protected: - iterator inc_completed(iterator firstItr, uint32_t index) LIBTORRENT_NO_EXPORT; - void update_completed() LIBTORRENT_NO_EXPORT; - -+ // Used for meta downloads; we only know the -+ // size after the first extension handshake. -+ void reset_filesize(int64_t) LIBTORRENT_NO_EXPORT; -+ - private: - bool open_file(File* node, const Path& lastPath, int flags) LIBTORRENT_NO_EXPORT; - void make_directory(Path::const_iterator pathBegin, Path::const_iterator pathEnd, Path::const_iterator startItr) LIBTORRENT_NO_EXPORT; -diff --git a/src/torrent/download.cc b/src/torrent/download.cc -index d6cc199..49daad9 100644 ---- a/src/torrent/download.cc -+++ b/src/torrent/download.cc -@@ -225,6 +225,11 @@ Download::set_pex_enabled(bool enabled) { - m_ptr->info()->set_pex_enabled(enabled); - } - -+bool -+Download::is_meta_download() const { -+ return m_ptr->info()->is_meta_download(); -+} -+ - const std::string& - Download::name() const { - if (m_ptr == NULL) -@@ -504,6 +509,11 @@ Download::connection_type() const { - - void - Download::set_connection_type(ConnectionType t) { -+ if (m_ptr->info()->is_meta_download()) { -+ m_ptr->main()->connection_list()->slot_new_connection(&createPeerConnectionMetadata); -+ return; -+ } -+ - switch (t) { - case CONNECTION_LEECH: - m_ptr->main()->connection_list()->slot_new_connection(&createPeerConnectionDefault); -diff --git a/src/torrent/download.h b/src/torrent/download.h -index 5e9700e..5d16d4e 100644 ---- a/src/torrent/download.h -+++ b/src/torrent/download.h -@@ -100,6 +100,8 @@ public: - bool is_pex_enabled() const; - void set_pex_enabled(bool enabled); - -+ bool is_meta_download() const; -+ - // Returns "" if the object is not valid. - const std::string& name() const; - -@@ -184,6 +186,7 @@ public: - CONNECTION_LEECH, - CONNECTION_SEED, - CONNECTION_INITIAL_SEED, -+ CONNECTION_METADATA, - } ConnectionType; - - ConnectionType connection_type() const; -diff --git a/src/torrent/object_stream.cc b/src/torrent/object_stream.cc -index 73c816b..9d9a962 100644 ---- a/src/torrent/object_stream.cc -+++ b/src/torrent/object_stream.cc -@@ -600,4 +600,11 @@ object_write_to_stream(void* data, object_buffer_t buffer) { - return buffer; - } - -+object_buffer_t -+object_write_to_size(void* data, object_buffer_t buffer) { -+ *reinterpret_cast<uint64_t*>(data) += std::distance(buffer.first, buffer.second); -+ -+ return buffer; -+} -+ - } -diff --git a/src/torrent/object_stream.h b/src/torrent/object_stream.h -index b399bf7..3de5d82 100644 ---- a/src/torrent/object_stream.h -+++ b/src/torrent/object_stream.h -@@ -91,6 +91,9 @@ object_buffer_t staticMap_write_bencode_c_wrap(object_write_t writeFunc, void* d - object_buffer_t object_write_to_buffer(void* data, object_buffer_t buffer) LIBTORRENT_EXPORT; - object_buffer_t object_write_to_sha1(void* data, object_buffer_t buffer) LIBTORRENT_EXPORT; - object_buffer_t object_write_to_stream(void* data, object_buffer_t buffer) LIBTORRENT_EXPORT; -+ -+// Measures bencode size, 'data' is uint64_t*. -+object_buffer_t object_write_to_size(void* data, object_buffer_t buffer) LIBTORRENT_EXPORT; - } - - #endif -diff --git a/src/torrent/torrent.cc b/src/torrent/torrent.cc -index e8ffbac..47027cc 100644 ---- a/src/torrent/torrent.cc -+++ b/src/torrent/torrent.cc -@@ -350,11 +350,22 @@ download_add(Object* object) { - - ctor.initialize(*object); - -- std::string infoHash = object_sha1(&object->get_key("info")); -+ std::string infoHash; -+ if (download->info()->is_meta_download()) -+ infoHash = object->get_key("info").get_key("pieces").as_string(); -+ else -+ infoHash = object_sha1(&object->get_key("info")); - - if (manager->download_manager()->find(infoHash) != manager->download_manager()->end()) - throw input_error("Info hash already used by another torrent."); - -+ if (!download->info()->is_meta_download()) { -+ char buffer[1024]; -+ uint64_t metadata_size = 0; -+ object_write_bencode_c(&object_write_to_size, &metadata_size, object_buffer_t(buffer, buffer + sizeof(buffer)), &object->get_key("info")); -+ download->main()->set_metadata_size(metadata_size); -+ } -+ - download->set_hash_queue(manager->hash_queue()); - download->initialize(infoHash, PEER_NAME + rak::generate_random<std::string>(20 - std::string(PEER_NAME).size())); - diff --git a/libtorrent-extended/object_sstr.patch b/libtorrent-extended/object_sstr.patch deleted file mode 100644 index f577080..0000000 --- a/libtorrent-extended/object_sstr.patch +++ /dev/null @@ -1,233 +0,0 @@ -diff --git a/src/dht/dht_node.cc b/src/dht/dht_node.cc -index 3574807..9d51a28 100644 ---- a/src/dht/dht_node.cc -+++ b/src/dht/dht_node.cc -@@ -59,8 +59,8 @@ DhtNode::DhtNode(const HashString& id, const rak::socket_address* sa) : - throw resource_error("Address not af_inet"); - } - --DhtNode::DhtNode(const std::string& id, const Object& cache) : -- HashString(*HashString::cast_from(id.c_str())), -+DhtNode::DhtNode(const SimpleString& id, const Object& cache) : -+ HashString(*HashString::cast_from(id)), - m_recentlyActive(false), - m_recentlyInactive(0), - m_bucket(NULL) { -diff --git a/src/dht/dht_node.h b/src/dht/dht_node.h -index 032c5cc..8234add 100644 ---- a/src/dht/dht_node.h -+++ b/src/dht/dht_node.h -@@ -57,7 +57,7 @@ public: - static const unsigned int max_failed_replies = 5; - - DhtNode(const HashString& id, const rak::socket_address* sa); -- DhtNode(const std::string& id, const Object& cache); -+ DhtNode(const SimpleString& id, const Object& cache); - - const HashString& id() const { return *this; } - const rak::socket_address* address() const { return &m_socketAddress; } -diff --git a/src/dht/dht_router.cc b/src/dht/dht_router.cc -index ff38b8c..e9abe5d 100644 ---- a/src/dht/dht_router.cc -+++ b/src/dht/dht_router.cc -@@ -337,7 +337,7 @@ DhtRouter::store_cache(Object* container) const { - Object& nodes = container->insert_key("nodes", Object::create_map()); - for (DhtNodeList::const_accessor itr = m_nodes.begin(); itr != m_nodes.end(); ++itr) { - if (!itr.node()->is_bad()) -- itr.node()->store_cache(&nodes.insert_key(itr.id().str(), Object::create_map())); -+ itr.node()->store_cache(&nodes.insert_key(itr.id().s_str(), Object::create_map())); - } - - // Insert contacts, if we have any. -diff --git a/src/torrent/object.cc b/src/torrent/object.cc -index 3a0bcae..b609f9c 100644 ---- a/src/torrent/object.cc -+++ b/src/torrent/object.cc -@@ -44,47 +44,59 @@ - - namespace torrent { - --Object& --Object::get_key(const std::string& k) { -- check_throw(TYPE_MAP); -- map_type::iterator itr = m_map->find(k); -+std::pair<Object::map_type::base_type::iterator, bool> -+Object::map_type::insert(const value_type& value) { -+ base_type::iterator itr = lower_bound(value.first); - -- if (itr == m_map->end()) -- throw bencode_error("Object operator [" + k + "] could not find element"); -+ if (itr != end() && !key_comp()(value.first, itr->first)) -+ return std::make_pair(itr, false); - -- return itr->second; --} -+ // Insert with an allocated copy of the key. -+ itr = base_type::insert(itr, value_type(value.first.copy(), value.second)); - -+ // This means the value was actually already present. -+ if (itr->second.get_string() != NULL) -+ throw internal_error("Object::map_type::insert failed to insert value."); - --const Object& --Object::get_key(const std::string& k) const { -- check_throw(TYPE_MAP); -- map_type::const_iterator itr = m_map->find(k); -+ // Make entry own the string and free it when erased. -+ itr->second.set_string(itr->first.c_str()); - -- if (itr == m_map->end()) -- throw bencode_error("Object operator [" + k + "] could not find element"); -+ return std::make_pair(itr, true); -+} - -- return itr->second; -+Object::map_type::base_type::iterator -+Object::map_type::insert(base_type::iterator itr, const value_type& value) { -+ SimpleString copy = value.first.copy(); -+ itr = base_type::insert(itr, value_type(copy, value.second)); -+ -+ // If the entry already owns its string, it wasn't really -+ // inserted and already existed, so discard the copy. -+ if (itr->second.get_string() != NULL) -+ delete [] copy.c_str(); -+ else -+ itr->second.set_string(itr->first.c_str()); -+ -+ return itr; - } - - Object& --Object::get_key(const char* k) { -+Object::get_key(const key_type& k) { - check_throw(TYPE_MAP); -- map_type::iterator itr = m_map->find(std::string(k)); -+ map_type::iterator itr = m_map->find(k); - - if (itr == m_map->end()) -- throw bencode_error("Object operator [" + std::string(k) + "] could not find element"); -+ throw bencode_error("Object operator [" + k.str() + "] could not find element"); - - return itr->second; - } - - const Object& --Object::get_key(const char* k) const { -+Object::get_key(const key_type& k) const { - check_throw(TYPE_MAP); -- map_type::iterator itr = m_map->find(std::string(k)); -+ map_type::iterator itr = m_map->find(k); - - if (itr == m_map->end()) -- throw bencode_error("Object operator [" + std::string(k) + "] could not find element"); -+ throw bencode_error("Object operator [" + k.str() + "] could not find element"); - - return itr->second; - } -@@ -143,7 +155,7 @@ Object::merge_copy(const Object& object, uint32_t maxDepth) { - while (srcItr != srcLast) { - destItr = std::find_if(destItr, dest.end(), rak::less_equal(srcItr->first, rak::mem_ref(&map_type::value_type::first))); - -- if (srcItr->first < destItr->first) -+ if (dest.key_comp()(srcItr->first, destItr->first)) - // destItr remains valid and pointing to the next possible - // position. - dest.insert(destItr, *srcItr); -diff --git a/src/torrent/object.h b/src/torrent/object.h -index 6cc4e4a..b7b4e8f 100644 ---- a/src/torrent/object.h -+++ b/src/torrent/object.h -@@ -46,18 +46,52 @@ - - namespace torrent { - --// TODO: Look into making a custom comp and allocator classes for the --// map_type which use a const char* for key_type. --// - // TODO: Use placement new/delete in order to avoid the extra level of - // indirection caused by the union. - - class LIBTORRENT_EXPORT Object { -+ template<typename T> -+ class string_wrapper : public T { -+ public: -+ string_wrapper() : T(), m_string(NULL) {} -+ string_wrapper(const T& value) : T(value), m_string(NULL) {} -+ string_wrapper(const string_wrapper& other) : T(other), m_string(NULL) {} -+ -+ ~string_wrapper() { delete [] m_string; m_string = NULL; } -+ -+ const char* get_string() const { return m_string; } -+ void set_string(const char* s) { m_string = s; } -+ -+ private: -+ string_wrapper& operator = (const string_wrapper& other); -+ -+ const char* m_string; -+ }; -+ - public: - typedef int64_t value_type; - typedef std::string string_type; - typedef std::list<Object> list_type; -- typedef std::map<std::string, Object> map_type; -+ class map_type : public std::map<SimpleString, string_wrapper<Object> > { -+ public: -+ typedef std::map<SimpleString, string_wrapper<Object> > base_type; -+ using base_type::value_type; -+ using base_type::key_type; -+ -+ map_type(const map_type& other) : base_type(other.key_comp()) { insert(other.begin(), other.end()); } -+ map_type() {} -+ -+ std::pair<base_type::iterator, bool> insert(const value_type& value); -+ base_type::iterator insert(base_type::iterator itr, const value_type& value); -+ -+ template<typename InputIterator> -+ void insert(InputIterator begin, InputIterator end); -+ -+ Object& operator[] (key_type key); -+ -+ private: -+ map_type& operator = (const map_type& other); -+ }; - typedef map_type::key_type key_type; - - typedef list_type::iterator list_iterator; -@@ -153,8 +187,6 @@ public: - - Object& get_key(const key_type& k); - const Object& get_key(const key_type& k) const; -- Object& get_key(const char* k); -- const Object& get_key(const char* k) const; - - template <typename T> value_type& get_key_value(const T& k) { return get_key(k).as_value(); } - template <typename T> const value_type& get_key_value(const T& k) const { return get_key(k).as_value(); } -@@ -213,6 +245,27 @@ public: - }; - }; - -+// We need to call our own insert function, so -+// we have to define this operator to use that. -+inline Object& -+Object::map_type::operator[] (key_type key) { -+ base_type::iterator itr = lower_bound(key); -+ -+ if (itr == end() || key_comp()(key, itr->first)) -+ itr = insert(itr, value_type(key, mapped_type())); -+ -+ return itr->second; -+} -+ -+template<typename InputIterator> -+inline void -+Object::map_type::insert(InputIterator itr, InputIterator itrEnd) { -+ while (itr != itrEnd) { -+ insert(end(), *itr); -+ ++itr; -+ } -+} -+ - inline - Object::Object(const Object& b) : m_flags(b.type()) { - switch (type()) { diff --git a/lsb-release/PKGBUILD b/lsb-release/PKGBUILD deleted file mode 100644 index f0ddcef..0000000 --- a/lsb-release/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Maintainer: Malte Rabenseifner <malte@zearan.de> -# Contributor: John Gerritse <reaphsharc@gmail.com> - -pkgname=lsb-release -pkgver=1.4 -pkgrel=9 -pkgdesc="LSB version query program." -arch=('i686' 'x86_64') -url="http://www.linuxbase.org/" -license=('GPL2') -install=lsb-release.install -source=(http://downloads.sourceforge.net/lsb/$pkgname-$pkgver.tar.gz) -md5sums=('30537ef5a01e0ca94b7b8eb6a36bb1e4') - -build() { - cd "$srcdir/$pkgname-$pkgver" - - make || return 1 - - install -dm755 "$pkgdir/etc" || return 1 - echo "DISTRIB_DESCRIPTION=\"Arch Linux - A simple, lightweight linux distribution.\"" > "$pkgdir/etc/lsb-release" || return 1 - - install -Dm 644 lsb_release.1.gz "$pkgdir/usr/share/man/man1/lsb_release.1.gz" || return 1 - install -Dm 755 lsb_release "$pkgdir/usr/bin/lsb_release" || return 1 -} diff --git a/lsb-release/lsb-release.install b/lsb-release/lsb-release.install deleted file mode 100644 index 3459fe7..0000000 --- a/lsb-release/lsb-release.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install() { - echo "Arch Linux release" >> /etc/arch-release -} - -post_upgrade() { - sed -e "/Arch Linux release/d" -i /etc/arch-release - echo "Arch Linux release" >> /etc/arch-release -} - -pre_remove() { - sed -e "/Arch Linux release/d" -i /etc/arch-release -} diff --git a/lsb-release/mumble11x.desktop b/lsb-release/mumble11x.desktop deleted file mode 100644 index 5dba0d0..0000000 --- a/lsb-release/mumble11x.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=Mumble (1.1.X compatible) -GenericName=Voice Chat -Comment=Voice chat program (compatible with Mumble 1.1.X) -Exec=mumble11x -Icon=mumble -Terminal=false -Type=Application -StartupNotify=false -Categories=Network;Chat;Qt; -Version=1.2.1 diff --git a/lxnm/PKGBUILD b/lxnm/PKGBUILD deleted file mode 100644 index 803c84a..0000000 --- a/lxnm/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> -# Contributor: Cainã Costa <cainan.costa@gmail.com> - -pkgname=lxnm -pkgver=0.2.2 -pkgrel=2 -pkgdesc="A Network Manager (Part of LXDE)" -arch=('i686' 'x86_64') -license=('GPL2') -url="http://lxde.org" -depends=('glib2') -source=("http://downloads.sourceforge.net/sourceforge/lxde/${pkgname}-${pkgver}.tar.gz") - -build() { - cd ${startdir}/src/${pkgname}-${pkgver} - ./configure --prefix=/usr - make - make DESTDIR=$pkgdir/ install -} -md5sums=('2ee64e5fad4a27a522f1eb2da08dd46a') -sha256sums=('5ad18e1ebe0b4aa6f97c76acfb054b0f29b0df36fb19c92d6a867fa350004234') diff --git a/mac/PKGBUILD b/mac/PKGBUILD deleted file mode 100644 index 6c40c9c..0000000 --- a/mac/PKGBUILD +++ /dev/null @@ -1,23 +0,0 @@ -# Contributor: stonecrest <stonecrest[at]gmail[dot]com> - -pkgname=mac -pkgver=3.99u4b5 -pkgrel=4 -pkgdesc="APE codec and decompressor" -arch=('any') -url="http://supermmx.org/linux/mac" -license=('unknown') -depends=() -makedepends=('gcc' 'yasm' 'gcc-libs') -source=(http://freshgen.googlecode.com/files/mac-3.99-u4-b5.tar.gz - gcc4_errors.patch) -md5sums=('75716b342e07deae58f56a2522362006' - '771c071831871fe8803d139a56515e86') - -build() { - cd ${srcdir}/$pkgname-3.99-u4-b5 - patch -Np1 -i ${srcdir}/gcc4_errors.patch || return 1 - ./configure --prefix=/usr --enable-assembly=yes - make || return 1 - make DESTDIR=${pkgdir} install -} diff --git a/mac/gcc4_errors.patch b/mac/gcc4_errors.patch deleted file mode 100644 index f7a0898..0000000 --- a/mac/gcc4_errors.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- mac-3.99-u4-b5-s4/src/MACLib/APELink.cpp 2006-06-01 13:00:57.000000000 +0400 -+++ mac-3.99-u4-b5-s4/src/MACLib/APELink.cpp 2009-06-15 00:31:36.081731282 +0400 -@@ -63,10 +63,10 @@ - if (pData != NULL) - { - // parse out the information -- char * pHeader = strstr(pData, APE_LINK_HEADER); -- char * pImageFile = strstr(pData, APE_LINK_IMAGE_FILE_TAG); -- char * pStartBlock = strstr(pData, APE_LINK_START_BLOCK_TAG); -- char * pFinishBlock = strstr(pData, APE_LINK_FINISH_BLOCK_TAG); -+ const char * pHeader = strstr(pData, APE_LINK_HEADER); -+ const char * pImageFile = strstr(pData, APE_LINK_IMAGE_FILE_TAG); -+ const char * pStartBlock = strstr(pData, APE_LINK_START_BLOCK_TAG); -+ const char * pFinishBlock = strstr(pData, APE_LINK_FINISH_BLOCK_TAG); - - if (pHeader && pImageFile && pStartBlock && pFinishBlock) - { -@@ -81,7 +81,7 @@ - - // get the path - char cImageFile[MAX_PATH + 1]; int nIndex = 0; -- char * pImageCharacter = &pImageFile[strlen(APE_LINK_IMAGE_FILE_TAG)]; -+ const char * pImageCharacter = &pImageFile[strlen(APE_LINK_IMAGE_FILE_TAG)]; - while ((*pImageCharacter != 0) && (*pImageCharacter != '\r') && (*pImageCharacter != '\n')) - cImageFile[nIndex++] = *pImageCharacter++; - cImageFile[nIndex] = 0; diff --git a/mbuffer/PKGBUILD b/mbuffer/PKGBUILD deleted file mode 100644 index 472dfed..0000000 --- a/mbuffer/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Maintainer: Florian "Bluewind" Pritz <flo@xssn.at> -# Contributor: Tim Karreman <tim@karreman.net> -pkgname=mbuffer -pkgver=20110724 -pkgrel=1 -pkgdesc="a tool for buffering data streams" -arch=(i686 x86_64) -url="http://www.maier-komor.de/mbuffer.html" -license=('GPL') -depends=(openssl) -source=(http://www.maier-komor.de/software/mbuffer/$pkgname-$pkgver.tgz) - -build() { - cd "$srcdir/$pkgname-$pkgver" - - ./configure --prefix=/usr - make - make "DESTDIR=$pkgdir" install -} -md5sums=('fc183b787f33011b42c9814029c69054') -sha1sums=('1cdd01920320b14d7ad9b4cc6d3c96a2da000345') diff --git a/mediainfo/PKGBUILD b/mediainfo/PKGBUILD deleted file mode 100644 index 5d0b94e..0000000 --- a/mediainfo/PKGBUILD +++ /dev/null @@ -1,22 +0,0 @@ -# Maintainer: hydro <hydro@freenet.de> - -pkgname=mediainfo -pkgver=0.7.34 -pkgrel=1 -pkgdesc="supplies technical and tag information about a video or audio file" -arch=('i686' 'x86_64') -url="http://mediainfo.sourceforge.net" -license=('GPL') -depends=('libmediainfo>=0.7.34') -makedepends=('libtool' 'automake' 'autoconf') -source=(http://downloads.sourceforge.net/mediainfo/${pkgname}_${pkgver}.tar.bz2) -md5sums=('6b67c1ff9e10b510fcd5b8b810550bec') - -build() { - cd $srcdir/MediaInfo/Project/GNU/CLI - chmod +x autogen - ./autogen - ./configure --prefix=/usr - make || return 1 - make DESTDIR=$pkgdir install || return 1 -} diff --git a/mktorrent/PKGBUILD b/mktorrent/PKGBUILD deleted file mode 100644 index 62c1e44..0000000 --- a/mktorrent/PKGBUILD +++ /dev/null @@ -1,26 +0,0 @@ -# Contributor: Emil Renner Berthing <esmil@users.sourceforge.net> - -pkgname=mktorrent -pkgver=1.0 -pkgrel=1 -pkgdesc='Simple command line utility to create BitTorrent metainfo files' -arch=('i686' 'x86_64') -url='http://mktorrent.sourceforge.net/' -license='GPL' -depends=('openssl') -source=("http://downloads.sourceforge.net/mktorrent/mktorrent-${pkgver}.tar.gz") -md5sums=('0da00209da96a0dc39efbb6eb5b4d8ff') - -build() { - cd ${srcdir}/mktorrent-${pkgver} - - if [ "${CARCH}" = 'i686' ]; then - make DESTDIR=${pkgdir} PREFIX=/usr \ - USE_PTHREADS=1 USE_OPENSSL=1 USE_LONG_OPTIONS=1 USE_LARGE_FILES=1 \ - install - else - make DESTDIR=${pkgdir} PREFIX=/usr \ - USE_PTHREADS=1 USE_OPENSSL=1 USE_LONG_OPTIONS=1 \ - install - fi -} diff --git a/mod_wsgi/PKGBUILD b/mod_wsgi/PKGBUILD deleted file mode 100644 index e8c4265..0000000 --- a/mod_wsgi/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Contributor: Ryan Coyner <rcoyner@gmail.com> -pkgname=mod_wsgi -pkgver=2.6 -pkgrel=1 -pkgdesc="Python WSGI adapter module for Apache" -arch=('i686' 'x86_64') -url="http://www.modwsgi.org/" -license=('Apache') -depends=('apache>=1.3' 'python>=2.3') -install=$pkgname.install -source=(http://modwsgi.googlecode.com/files/$pkgname-$pkgver.tar.gz) -md5sums=('c313cd7a662024866ce3376cb5a76cf6') - -build() { - cd "$srcdir/$pkgname-$pkgver" - ./configure --with-apxs=/usr/sbin/apxs --with-python=/usr/bin/python || return 1 - make || return 1 - make DESTDIR="$pkgdir" install || return 1 -} diff --git a/mod_wsgi/mod_wsgi.install b/mod_wsgi/mod_wsgi.install deleted file mode 100644 index ab4d12d..0000000 --- a/mod_wsgi/mod_wsgi.install +++ /dev/null @@ -1,22 +0,0 @@ -post_install() { -/bin/cat << ENDOFMESSAGE -==> -==> -==> To install mod_wsgi, add the following line in -==> /etc/httpd/conf/httpd.conf file : -==> -==> LoadModule wsgi_module modules/mod_wsgi.so -==> -==> and restart/reload Apache. -==> -==> -ENDOFMESSAGE -} - -post_upgrade() { -post_install -} - -op=$1 -shift -$op $* diff --git a/mozplugger/PKGBUILD b/mozplugger/PKGBUILD deleted file mode 100644 index 097187e..0000000 --- a/mozplugger/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $ -# Maintainer: fs4000 <matthias_dienstbier[at]yahoo[dot]de> -# Contributor: Allan McRae <allan@archlinux.org> -# Contributor: Todd Musall <tmusall@comcast.net> - -pkgname=mozplugger -pkgver=1.14.0 -pkgrel=1 -pkgdesc="A Mozilla & Firefox multimedia plugin." -arch=('i686' 'x86_64') -url="http://mozplugger.mozdev.org" -license=('GPL') -depends=('m4' 'libx11') -backup=('etc/mozpluggerrc') -install=$pkgname.install -source=(http://mozplugger.mozdev.org/files/$pkgname-$pkgver.tar.gz) -md5sums=('700f24297d12ce291bedf80f9d0340dc') - -build() { - cd $pkgname-$pkgver - make linux || return 1 - make install root="$pkgdir" - -# This is the install code used while being in [community] -# install -Dm755 mozplugger.so $pkgdir/usr/lib/mozilla/plugins/mozplugger.so -# install -Dm644 mozpluggerrc $pkgdir/etc/mozpluggerrc -# install -Dm755 mozplugger-helper $pkgdir/usr/bin/mozplugger-helper -# install -Dm755 mozplugger-controller $pkgdir/usr/bin/mozplugger-controller -# install -Dm755 mozplugger-linker $pkgdir/usr/bin/mozplugger-linker -# install -Dm644 mozplugger.7 $pkgdir/usr/share/man/man7/mozplugger.7 -} diff --git a/mozplugger/mozplugger.install b/mozplugger/mozplugger.install deleted file mode 100644 index 55125d7..0000000 --- a/mozplugger/mozplugger.install +++ /dev/null @@ -1,15 +0,0 @@ -post_install() { - echo " -==> You may need to delete your local ~/.mozilla/firefox/pluginreg.dat -==> file for mozplugger to be enabled correctly after you update it. -==> (It will get regenerated). -==> To add more helpers, edit /etc/mozpluggerrc. -==> The window name can be obtained using the utility xprop(1x). -==> Type "xprop WM_CLASS" and click on a window." -} - -post_upgrade() { - post_install -} - -# vim:set ts=2 sw=2 et: diff --git a/mp4tools/PKGBUILD b/mp4tools/PKGBUILD deleted file mode 100644 index fa0797f..0000000 --- a/mp4tools/PKGBUILD +++ /dev/null @@ -1,16 +0,0 @@ -# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com> -pkgname=mp4tools -pkgver=0.6.7 -pkgrel=1 -pkgdesc="Set of scripts to encode audio and video do MP4" -arch=('i686' 'x86_64') -url="https://launchpad.net/~teknoraver/+archive/ppa" -license=('GPL') -depends=('bash' 'gpac' 'mplayer' 'faac' 'aacplusenc' 'amrenc') -source=(https://launchpad.net/~teknoraver/+archive/ppa/+files/mp4tools_$pkgver.tar.gz) -md5sums=('22070faa3dff5f55e85e0882331c7bf7') - -build() { - cd "$srcdir"/$pkgname-$pkgver - make INSTDIR="$pkgdir"/usr install -} diff --git a/mpd-git/PKGBUILD b/mpd-git/PKGBUILD deleted file mode 100644 index 0b18d9f..0000000 --- a/mpd-git/PKGBUILD +++ /dev/null @@ -1,103 +0,0 @@ -# Contributor: Slash <demodevil5[at]yahoo[dot]com> - -pkgname=mpd-git -pkgver=20101030 -pkgrel=1 -pkgdesc="music daemon that plays mp3, flac, aac, mod, wav, mpc and ogg files" -url="http://musicpd.org" -depends=( - 'alsa-lib' 'audiofile' 'curl' 'faad2>=2.6.1' 'ffmpeg' 'flac>=1.1.3' 'glib2' - 'libao' 'libcdio' 'libid3tag' 'libmad' 'libmikmod' 'libmodplug' - 'libmpcdec>=1.2.5' 'libsamplerate' 'libshout' 'wavpack' 'zziplib' -) -makedepends=('autoconf' 'automake' 'git' 'libtool' 'pkgconfig') -optdepends=( - 'avahi: Support for Avahi Zeroconf Backend' - 'jack-audio-connection-kit: Support for JACK Audio' - 'libao-pulse: Support for the PulseAudio Sound Server' - 'libcue: Support for embedded cuesheets' - 'libmms: Support for MMS Protocol' - 'sqlite3: Support for SQLite Database' -) -license=('GPL') -arch=('i686' 'x86_64') -conflicts=('mpd') -provides=('mpd') -replaces=('mpd-svn') -install=mpd.install -source=('mpd.init' 'mpd.install') -md5sums=('b1fd15de359db08e4b9ae4b199640f0e' - '332e0a4569ace3a5854070625a04f788') - -_gitroot="git://git.musicpd.org/master/mpd.git" -_gitname="mpd" - -build() { - cd $srcdir - - msg "Connecting to GIT server..." - - if [ -d $srcdir/$_gitname ] ; then - cd $_gitname && git pull origin - msg "The local files are updated." - else - git clone $_gitroot - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - # Copy Latest files to Build Directory - cp -r $srcdir/$_gitname $srcdir/$_gitname-build - cd $srcdir/$_gitname-build - - # Configure Source - ./autogen.sh \ - --prefix=/usr \ - --sysconfdir=/etc \ - --enable-ao \ - --enable-bzip2 \ - --enable-iso9660 \ - --enable-lastfm \ - --enable-modplug \ - --enable-zip \ - --disable-jack \ - --disable-pulse \ - --with-zeroconf=no \ - --enable-lsr - #--enable-cue \ - #--enable-sqlite \ - #--enable-mms \ - #--enable-mvp \ - - # Build Source - make || return 1 - - # Install Source - make prefix=$pkgdir/usr install - - # Remove Build Directory - rm -r $srcdir/$_gitname-build/ - - # Create Directories - install -d $pkgdir/var/{log/mpd,run/mpd,lib/mpd/playlists} - - # Install init Script - install -D -m755 $srcdir/mpd.init \ - $pkgdir/etc/rc.d/mpd - - # Install Sample Config - install -D -m644 $srcdir/mpd/doc/mpdconf.example \ - $pkgdir/etc/mpd.conf.example - - # Modify Sample Config with Proper Directories and User Settings - /bin/sed -i 's|music_directory.*$|#music_directory "path_to_your_music_collection"|1' $pkgdir/etc/mpd.conf.example - /bin/sed -i 's|playlist_directory.*$|playlist_directory "/var/lib/mpd/playlists"|1' $pkgdir/etc/mpd.conf.example - /bin/sed -i 's|db_file.*$|db_file "/var/lib/mpd/mpd.db"|1' $pkgdir/etc/mpd.conf.example - /bin/sed -i 's|log_file.*$|log_file "/var/log/mpd/mpd.log"|1' $pkgdir/etc/mpd.conf.example - /bin/sed -i 's|error_file.*$|error_file "/var/log/mpd/mpd.error"|1' $pkgdir/etc/mpd.conf.example - /bin/sed -i 's|#pid_file.*$|pid_file "/var/run/mpd/mpd.pid"|1' $pkgdir/etc/mpd.conf.example - /bin/sed -i 's|#state_file.*$|state_file "/var/lib/mpd/mpdstate"|1' $pkgdir/etc/mpd.conf.example - /bin/sed -i 's|#user.*$|user "mpd"|1' $pkgdir/etc/mpd.conf.example -} - diff --git a/mpd-git/mpd.init b/mpd-git/mpd.init deleted file mode 100644 index 76ec1c0..0000000 --- a/mpd-git/mpd.init +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -case "$1" in - start) - stat_busy "Starting Music Player Daemon" - /usr/bin/mpd /etc/mpd.conf &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon mpd - stat_done - fi - ;; - stop) - stat_busy "Stopping Music Player Daemon" - /usr/bin/mpd --kill /etc/mpd.conf &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon mpd - stat_done - fi - ;; - create-db) - stat_busy "Creating mpd's database ..." - logpath="/var/log/mpd/mpd.db-creation" - /usr/bin/mpd --create-db /etc/mpd.conf > $logpath \ - && stat_busy "Output written to $logpath" - stat_done - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart|create-db}" -esac -exit 0 diff --git a/mpd-git/mpd.install b/mpd-git/mpd.install deleted file mode 100644 index b9d6851..0000000 --- a/mpd-git/mpd.install +++ /dev/null @@ -1,27 +0,0 @@ -# arg 1: the new package version -post_install() { - echo "==> mpd: Create a config under /etc/mpd.conf before using MPD (Example: /etc/mpd.conf.example)" - groupadd -g 45 mpd &>/dev/null - useradd -u 45 -g mpd -d /var/lib/mpd -s /bin/true mpd &>/dev/null - gpasswd -a mpd audio &>/dev/null - chown mpd:mpd -R /var/{lib,log,run}/mpd -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - echo "==> mpd: upgrade from 0.11 -> 0.12: configuration file syntax changed, " - echo "==> mpd: make sure to update your configuration file! See example conf: /etc/mpd.conf.example" - echo "==> mpd: If you install any of the optional dependencies, you will have to rebuild this package." - post_install $1 -} - -# arg 1: the old package version -pre_remove() { - userdel mpd &>/dev/null -} - -op=$1 -shift - -$op $* diff --git a/mplayer-vdpau-nogui/PKGBUILD b/mplayer-vdpau-nogui/PKGBUILD deleted file mode 100644 index 37c3c83..0000000 --- a/mplayer-vdpau-nogui/PKGBUILD +++ /dev/null @@ -1,47 +0,0 @@ -#Contributor: Reiser <metal@pop3.ru> - -pkgname=mplayer-vdpau-nogui -pkgver=30385 -pkgrel=1 -pkgdesc="Famous multimedia player, dev. version, without its GUI and support for nvidia VDPAU" -arch=('i686' 'x86_64') -url="http://www.mplayerhq.hu/" -license=('GPL') -depends=('ttf-dejavu' 'nvidia>=190.42' 'libvdpau' 'opencore-amr' 'libdvdnav>=4.1.3' 'lame' 'xvidcore') -makedepends=('subversion') -conflicts=('mplayer') -provides=(mplayer=$pkgver) -source=('no_segfault_configure.diff') -md5sums=(ed962f7642ffcf2411ec6465fdc8c132) - -_svntrunk=svn://svn.mplayerhq.hu/mplayer/trunk -_svnmod=mplayer-vdpau - -build() { - - export LDFLAGS="${LDFLAGS//-Wl,--as-needed}" - - cd $srcdir - svn co $_svntrunk $_svnmod - cp -R $_svnmod $_svnmod-build - cd $_svnmod-build - patch -p1 < ../no_segfault_configure.diff - - ./configure --prefix=/usr --confdir=/etc/mplayer --disable-gui \ - --disable-runtime-cpudetection --enable-largefiles --enable-menu \ - --disable-libdv --disable-aa --disable-liblzo --disable-speex \ - --disable-fribidi --disable-arts --disable-esd --disable-smb --enable-dvdnav \ - --disable-openal --disable-faad-internal --disable-directfb \ - --disable-musepack --enable-libopencore_amrnb --enable-libopencore_amrwb \ - --enable-vdpau --disable-libbs2b - - make || return 1 - make DESTDIR=$pkgdir install || return 1 - - install -m0644 etc/{codecs.conf,input.conf,example.conf} $pkgdir/etc/mplayer - install -d $pkgdir/usr/share/mplayer/ - ln -s /usr/share/fonts/TTF/DejaVuSans.ttf $pkgdir/usr/share/mplayer/subfont.ttf - - cd ../ - rm -rf ./$_svnmod-build -} diff --git a/mplayer-vdpau-nogui/no_segfault_configure.diff b/mplayer-vdpau-nogui/no_segfault_configure.diff deleted file mode 100644 index 2dd5fe4..0000000 --- a/mplayer-vdpau-nogui/no_segfault_configure.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.old 2008-11-15 23:27:59.000000000 +0100 -+++ b/configure 2008-11-15 23:28:26.000000000 +0100 -@@ -79,7 +79,7 @@ - } - - tmp_run() { -- "$TMPEXE" >> "$TMPLOG" 2>&1 -+ : - } - - # Display error message, flushes tempfile, exit diff --git a/mtr-cli/PKGBUILD b/mtr-cli/PKGBUILD deleted file mode 100644 index 06f6008..0000000 --- a/mtr-cli/PKGBUILD +++ /dev/null @@ -1,23 +0,0 @@ -# Maintainer: Florian "Bluewind" Pritz <flo@xssn.at> -# Contributor: Douglas Soares de Andrade <douglas@archlinux.org> - -pkgname=mtr-cli -pkgver=0.80 -pkgrel=1 -pkgdesc="Combines the functionality of traceroute and ping into one tool" -arch=('i686' 'x86_64') -license=('GPL') -depends=('ncurses>=5.7') -conflicts=('mtr') -source=(ftp://ftp.bitwizard.nl/mtr/mtr-${pkgver}.tar.gz no_gtk.patch) -url="http://www.bitwizard.nl/mtr/" - -build() { - cd "${srcdir}/mtr-${pkgver}" - ./configure --disable-gtktest --without-gtk - make || return 1 - install -Dm4755 mtr "$pkgdir/usr/bin/mtr" - install -Dm644 mtr.8 "$pkgdir/usr/share/man/man8/mtr.8" -} -md5sums=('fa68528eaec1757f52bacf9fea8c68a9' - '6ac91ddba465f3bf5d2af26b533b578f') diff --git a/mtr-cli/no_gtk.patch b/mtr-cli/no_gtk.patch deleted file mode 100644 index 2fae6c2..0000000 --- a/mtr-cli/no_gtk.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- configure_2010-05-31_203051 2010-05-31 20:30:51.000000000 +0200 -+++ configure 2010-05-31 20:36:32.000000000 +0200 -@@ -4711,14 +4711,15 @@ - - - if test "x$WANTS_GTK" = "xyes"; then -- AM_PATH_GTK_2_0(2.6.0, CFLAGS="$CFLAGS $GTK_CFLAGS" -- LIBS="$LIBS $GTK_LIBS -lm", -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building without GTK2 display support" >&5 --$as_echo "$as_me: WARNING: Building without GTK2 display support" >&2;} -- --$as_echo "#define NO_GTK 1" >>confdefs.h -- -- GTK_OBJ="") -+ true -+# AM_PATH_GTK_2_0(2.6.0, CFLAGS="$CFLAGS $GTK_CFLAGS" -+# LIBS="$LIBS $GTK_LIBS -lm", -+# { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building without GTK2 display support" >&5 -+#$as_echo "$as_me: WARNING: Building without GTK2 display support" >&2;} -+# -+#$as_echo "#define NO_GTK 1" >>confdefs.h -+# -+# GTK_OBJ="") - else - $as_echo "#define NO_GTK 1" >>confdefs.h - diff --git a/mumble-git/PKGBUILD b/mumble-git/PKGBUILD deleted file mode 100644 index 36fe40e..0000000 --- a/mumble-git/PKGBUILD +++ /dev/null @@ -1,69 +0,0 @@ -# Maintainer: Lauri Niskanen <ape@ape3000.com> -# Contributor: schlaefer <schlaefer[at]gamez-planet.org> - -pkgname=mumble-git -pkgver=20110220 -pkgrel=1 -pkgdesc="A voice chat application similar to TeamSpeak" -arch=('i686' 'x86_64') -url="http://mumble.sourceforge.net/" -license=('GPL') -depends=('alsa-lib' 'qt>=4.4.0' 'speex>=1.2rc1' 'celt>=0.7.0' 'lsb-release') -makedepends=('git' 'protobuf' 'boost' 'avahi' 'libxi' 'mesa') -optdepends=('pulseaudio: for using mumble with pulseaudio') -provides=('mumble') -conflicts=('mumble') -options=('!libtool') -install=mumble.install -source=(mumble11x.desktop) -md5sums=('b85a15a46a8d0e9a28e87ff6678bb36a') - -_gitroot="git://mumble.git.sourceforge.net/gitroot/mumble/mumble" -_gitname="mumble" - -build() { -cd "$srcdir" -msg "Connecting to GIT server...." - -if [ -d $_gitname ] ; then -cd $_gitname && git pull origin -msg "The local files are updated." -else -git clone $_gitroot -fi - -msg "GIT checkout done or server timeout" -msg "Starting make..." - -rm -rf "$srcdir/$_gitname-build" -git clone --depth 1 "$srcdir/$_gitname" "$srcdir/$_gitname-build" -cd "$srcdir/$_gitname-build" - -# BUILD - -qmake main.pro \ -CONFIG+="no-bundled-speex no-bundled-celt no-speechd no-g15 no-xevie \ -no-server no-embed-qt-translations packaged" \ -DEFINES+="PLUGIN_PATH=/usr/lib/mumble/plugins" || return 1 -make || return 1 - -# INSTALL - -install -m755 -D $srcdir/$_gitname-build/release/mumble $pkgdir/usr/bin/mumble -install -m755 -D $srcdir/$_gitname-build/release/mumble11x $pkgdir/usr/bin/mumble11x -install -m755 -D $srcdir/$_gitname-build/scripts/mumble-overlay $pkgdir/usr/bin/mumble-overlay -install -m755 -d $pkgdir/usr/lib/mumble/plugins -install -m755 -D $srcdir/$_gitname-build/release/libmumble.so.1.2.3 $pkgdir/usr/lib/mumble/ -ln -s libmumble.so.1.2.3 $pkgdir/usr/lib/mumble/libmumble.so -ln -s libmumble.so.1.2.3 $pkgdir/usr/lib/mumble/libmumble.so.1 -ln -s libmumble.so.1.2.3 $pkgdir/usr/lib/mumble/libmumble.so.1.2 -install -m755 -D $srcdir/$_gitname-build/release/mumble $pkgdir/usr/bin/mumble -install -m755 -D $srcdir/$_gitname-build/release/plugins/liblink.so $pkgdir/usr/lib/mumble/plugins/ -install -m755 -d $pkgdir/usr/share/applications -install -m644 -D $srcdir/$_gitname-build/scripts/mumble.desktop $pkgdir/usr/share/applications/mumble.desktop -install -m644 -D $srcdir/mumble11x.desktop $pkgdir/usr/share/applications/mumble11x.desktop -install -m755 -d $pkgdir/usr/share/man/man1 -install -m644 -D $srcdir/$_gitname-build/man/mum* $pkgdir/usr/share/man/man1/ -install -m644 -D $srcdir/$_gitname-build/icons/mumble.svg $pkgdir/usr/share/icons/hicolor/scalable/apps/mumble.svg - -} diff --git a/mumble-git/mumble.install b/mumble-git/mumble.install deleted file mode 100644 index 8eea713..0000000 --- a/mumble-git/mumble.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { -gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor -} - -post_upgrade() { -post_install -} - -post_remove() { -post_install -} diff --git a/mumble-git/mumble11x.desktop b/mumble-git/mumble11x.desktop deleted file mode 100644 index 1305f7c..0000000 --- a/mumble-git/mumble11x.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=Mumble (1.1.X compatible) -GenericName=Voice Chat -Comment=Voice chat program (compatible with Mumble 1.1.X) -Exec=mumble11x -Icon=mumble -Terminal=false -Type=Application -StartupNotify=false -Categories=Network;Chat;Qt; -Version=1.0 diff --git a/mumble/PKGBUILD b/mumble/PKGBUILD deleted file mode 100644 index 8798ded..0000000 --- a/mumble/PKGBUILD +++ /dev/null @@ -1,52 +0,0 @@ -# Maintainer: Lauri Niskanen <ape@ape3000.com> -# Contributor: Sebastian.Salich@gmx.de -# Contributor: Doc Angelo - -# If you want support for your G15 Keyboard, please add 'g15daemon' -# to the depends and delete "no-g15" in the configure line below - -pkgname=mumble -pkgver=1.2.2 -pkgrel=2 -arch=('i686' 'x86_64') -pkgdesc="A voice chat application similar to TeamSpeak" -license=('GPL') -depends=('qt>=4.4.0' 'speex>=1.2rc1' 'celt>=0.7.0' 'lsb-release' 'avahi' 'libsndfile' 'protobuf') -makedepends=('boost' 'libxi' 'mesa') -optdepends=('pulseaudio: for using mumble with pulseaudio') -conflicts=('mumble-client') -options=('!libtool') -install=mumble.install -url="http://mumble.sourceforge.net/" -source=("http://downloads.sourceforge.net/mumble/$pkgname-$pkgver.tar.gz" \ - mumble11x.desktop ) -md5sums=('de30ee85170e183b66568b53b04c5727' - '70dcaa8ad2ecf68c6ba52ea03d112bcd') - -build() { - cd $srcdir/$pkgname-$pkgver - - # Building mumble - /usr/bin/qmake main.pro \ - CONFIG+="no-bundled-speex no-speechd no-bundled-celt no-g15 no-xevie no-server \ - no-embed-qt-translations packaged" \ - DEFINES+="PLUGIN_PATH=/usr/lib/mumble/plugins" || exit 1 - make || exit 1 - - # create directories and copy files - install -m755 -D ./release/mumble $pkgdir/usr/bin/mumble - install -m755 -D ./release/mumble11x $pkgdir/usr/bin/mumble11x - install -m755 -D ./scripts/mumble-overlay $pkgdir/usr/bin/mumble-overlay - install -m755 -d $pkgdir/usr/lib/mumble/plugins - install -m755 -D ./release/libmumble.so.$pkgver $pkgdir/usr/lib/mumble/ - ln -s libmumble.so.$pkgver $pkgdir/usr/lib/mumble/libmumble.so - ln -s libmumble.so.$pkgver $pkgdir/usr/lib/mumble/libmumble.so.1 - ln -s libmumble.so.$pkgver $pkgdir/usr/lib/mumble/libmumble.so.1i.1 - install -m755 -D ./release/plugins/liblink.so $pkgdir/usr/lib/mumble/plugins/ - install -m755 -d $pkgdir/usr/share/applications - install -m644 -D ./scripts/mumble.desktop $pkgdir/usr/share/applications/mumble.desktop - install -m644 -D $srcdir/mumble11x.desktop $pkgdir/usr/share/applications/mumble11x.desktop - install -m755 -d $pkgdir/usr/share/man/man1 - install -m644 -D ./man/mum* $pkgdir/usr/share/man/man1/ - install -m644 -D ./icons/mumble.svg $pkgdir/usr/share/icons/hicolor/scalable/apps/mumble.svg -} diff --git a/mumble/mumble.install b/mumble/mumble.install deleted file mode 100644 index 8eea713..0000000 --- a/mumble/mumble.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { -gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor -} - -post_upgrade() { -post_install -} - -post_remove() { -post_install -} diff --git a/mumble/mumble11x.desktop b/mumble/mumble11x.desktop deleted file mode 100644 index 5dba0d0..0000000 --- a/mumble/mumble11x.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=Mumble (1.1.X compatible) -GenericName=Voice Chat -Comment=Voice chat program (compatible with Mumble 1.1.X) -Exec=mumble11x -Icon=mumble -Terminal=false -Type=Application -StartupNotify=false -Categories=Network;Chat;Qt; -Version=1.2.1 diff --git a/munin-node/Makefile.config b/munin-node/Makefile.config deleted file mode 100644 index 9542429..0000000 --- a/munin-node/Makefile.config +++ /dev/null @@ -1,106 +0,0 @@ -# This file specifies where Munin will look for things after you've -# run 'make' in the source directory. Modify it to suit your needs. - -# DESTDIR is empty during building, and optionally set to point to -# a shadow tree during make install. - -# -# the base of the Munin installation. -# -PREFIX = $(DESTDIR) - -# Where Munin keeps its configurations (server.conf, client.conf, ++) -CONFDIR = $(DESTDIR)/etc/munin - -# Server only - where to put munin-cron -BINDIR = $(PREFIX)/usr/bin - -# Client only - where to put munin-node, munin-node-configure, and munin-run -SBINDIR = $(PREFIX)/sbin - -# Where to put text and html documentation -DOCDIR = $(PREFIX)/usr/share/doc/munin - -# Where to put man pages -MANDIR = $(PREFIX)/usr/share/man - -# Where to put internal binaries and plugin repository -LIBDIR = $(PREFIX)/usr/lib/munin - -# Server only - Output directory -HTMLDIR = $(PREFIX)/srv/http/munin -CGIDIR = $(HTMLDIR)/cgi - -# Client only - Where to put RRD files and other intenal data -DBDIR = $(DESTDIR)/var/munin - -# Client only - Where plugins should put their states. Must be writable by -# group "munin", and should be preserved between reboots -PLUGSTATE = $(DBDIR)/plugin-state - -# Where Munin should place its logs. -LOGDIR = $(DESTDIR)/var/log/munin - -# Location of PID files and other statefiles. On the server, must be -# writable by the user "munin". -STATEDIR = $(DESTDIR)/var/run/munin - -# The perl interpreter to use -PERL = $(shell which perl) - -# The python interpreter to use (used by some plugins) -PYTHON = /usr/bin/env python - -# A modern (posix) shell. We're not looking for arrays, but $() and -# other modern stuff is expected. On a posix-system the expression -# below will find the right shell. Most Unixes released the last 10 -# years are POSIX compliant enough for this to work (he said bravely). -# -# On Linux /bin/sh, SunOS/Solaris /usr/xpg4/bin/sh or /bin/ksh -# In general: bash or ksh will work -# -GOODSH = $(shell PATH=`getconf PATH` sh -c 'type sh | sed "s/.* //"') - -# Path of bash for bash specific plugins -BASH = /bin/bash - -# Server only - Where to install the perl libraries -PERLLIB = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2) - -# Client only - Install plugins for this architecture -OSTYPE = $(shell uname | tr '[A-Z]' '[a-z]') - -# How to figure out the hostname. (Only used in default configuration -# files) -HOSTNAME = $(shell hostname) - -# What is the safest way to create a tempfile. -# Default is to figure it out by testing various methods. -# Replace this with a known platform-specific method -MKTEMP = $(shell ./test-mktemp) - -# Munin version number. -VERSION = $(shell cat RELEASE) - -# User to run munin as -USER = munin -GROUP = munin - -# Default user to run the plugins as -PLUGINUSER = nobody - -# Which command to use to check if the USER and GROUP to run Munin as, exists. -GETENT = $(shell which true 2>/dev/null) -CHECKUSER = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) -CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) - -# For OSX, comment out the previous two lines and comment in these -#CHECKUSER = $(shell nicl . -read /users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) -#CHECKGROUP = $(shell nicl . -read /groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) - -CHOWN = true -CHMOD = chmod -CHGRP = true -# Check whether setruid functionality can be used -HASSETR = $(shell perl -e 'use Config; my @vars=("d_setruid", "d_setreuid", "d_setresuid"); foreach my $$var (@vars) { if ($$Config{$$var} eq "define") { print "1\n"; exit 0; } } print "0\n"; exit 0;' ) - diff --git a/munin-node/PKGBUILD b/munin-node/PKGBUILD deleted file mode 100644 index de756a4..0000000 --- a/munin-node/PKGBUILD +++ /dev/null @@ -1,32 +0,0 @@ -# Contributor: Roberto Alsina <ralsina@kde.org> -pkgname=munin-node -pkgver=1.2.6 -pkgrel=12 -pkgdesc="A distributed monitoring/graphing agent" -arch=('i686' 'x86_64') -url="http://munin.sf.net" -license=("GPL") -depends=(perl perl-net-server which) -backup=(etc/munin/munin-node.conf) -install=munin-node.install -source=(http://downloads.sourceforge.net/sourceforge/munin/munin_$pkgver.tar.gz \ - Makefile.config munin-node.init munin-node.runit munin-node.finish munin-node.install) - -md5sums=('45f84d58f80642ce914f147232f0d396' '686cef93dee285949a0451c81b691085'\ - '14872c731f99d5f9d831115b2f5e282e' '422000b064a03023b8dee2c76eee0548'\ - '39eb25fec876123cff9c6927d4a9d46a' 'aa8e338183ae2f4602bcaedfc6ca8927') - -build() { -cd $srcdir/munin-$pkgver -cp $srcdir/Makefile.config $srcdir/munin-$pkgver || exit 1 - -make PREFIX='' || exit 1 -make DESTDIR=$pkgdir install-node install-node-plugins || exit 1 - -sed -i "s|\$ENV{'MUNIN_HOSTNAME'}.*|\$ENV{'MUNIN_HOSTNAME'} = \`hostname\`;|g" $pkgdir/sbin/munin-node -sed -i "s|\$ENV{'MUNIN_HOSTNAME'}.*|\$ENV{'MUNIN_HOSTNAME'} = \`hostname\`;|g" $pkgdir/sbin/munin-run - -install -D -m0755 -o root ../munin-node.init $pkgdir/etc/rc.d/munin-node -install -D -m0755 -o root ../munin-node.runit $pkgdir/etc/munin-node/run -install -D -m0755 -o root ../munin-node.finish $pkgdir/etc/munin-node/finish -} diff --git a/munin-node/munin-node.finish b/munin-node/munin-node.finish deleted file mode 100644 index 934ad4a..0000000 --- a/munin-node/munin-node.finish +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# general config -. /etc/rc.conf -. /etc/rc.d/functions - -BIN=/sbin/munin-node -OPTS="" -SVC=munin-node - -echo "Stopping $SVC daemon" -PID=`pidof $BIN` -if [ -z "$PID" ] -then -rm -f /var/run/munin/$SVC.pid -rm_daemon $SVC -fi - diff --git a/munin-node/munin-node.init b/munin-node/munin-node.init deleted file mode 100644 index e62b43b..0000000 --- a/munin-node/munin-node.init +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /sbin/munin-node` - -case "$1" in - start) - stat_busy "Starting munin-node" - /sbin/munin-node >/dev/null - stat_done - ;; - stop) - stat_busy "Stopping munin-node" - if [ ! -z "$PID" ]; then - kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - rm -f /var/run/munin/munin-node.pid &>/dev/null - stat_done - fi - else - stat_fail - exit 1 - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" - ;; -esac diff --git a/munin-node/munin-node.install b/munin-node/munin-node.install deleted file mode 100644 index 2f190f4..0000000 --- a/munin-node/munin-node.install +++ /dev/null @@ -1,34 +0,0 @@ -# arg 1: the new package version -post_install () { - -# Check user/group munin exists - - getent group munin > /dev/null || groupadd munin - getent passwd munin > /dev/null || useradd -c "Munin system monitor" -g munin -s /bin/false -d /var/munin munin - -# Fix permissions - chown munin.munin -R /var/log/munin /var/munin /var/run/munin - - -# Do basic configuration - - echo "==> Configuring default plugins for this system" - /sbin/munin-node-configure --shell | sh - - echo "==> To use the SNMP plugins you will need perl-net-snmp" - -} - -pre_remove() { - -# Only remove the user if munin is not installed, -# because both packages need this user - killall munin-node - pacman -Q munin >& /dev/null || ( /usr/sbin/userdel munin >& /dev/null ; \ - /usr/sbin/groupdel munin >& /dev/null ) -} - -op=$1 -shift - -$op $* diff --git a/munin-node/munin-node.runit b/munin-node/munin-node.runit deleted file mode 100644 index 60156e9..0000000 --- a/munin-node/munin-node.runit +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -exec 2>&1 -# general config -. /etc/rc.conf -. /etc/rc.d/functions - -BIN=/sbin/munin-node -OPTS="" -SVC=munin-node - -PID=`pidof $BIN` -if [ -z "$PID" ] -then - if [ -f /var/run/munin/$SVC.pid ] - then - rm /var/run/munin/$SVC.pid - rm_daemon $SVC - fi - echo "Starting $SVC daemon" - $BIN $OPTS -else - [ -z $PID ] || exec watchpid $PID -fi diff --git a/murmur/ChangeLog b/murmur/ChangeLog deleted file mode 100644 index 7537836..0000000 --- a/murmur/ChangeLog +++ /dev/null @@ -1,36 +0,0 @@ -2010-02-11 Otto Allmendinger <otto.allmendinger@googlemail.com> - * 1.2.2-1: - bump to version 1.2.2 - -2010-01-09 Otto Allmendinger <otto.allmendinger@googlemail.com> - * 1.2.1-1: - bump to version 1.2.1 - -2009-12-18 Otto Allmendinger <otto.allmendinger@googlemail.com> - * 1.2.0-8: - included dbus configuration file, changed default dbus settings - - * 1.2.0-7: - included manfile - renamed binary "murmur" to "murmurd" to be consistent with manfile - changed murmur user shell to /bin/false (shell access not required anymore) - -2009-12-17 Malte Rabenseifner <malte@zearan.de> - * 1.2.0-6: - included manfile - using mumbles included privilige dropping - added some files to backup array - added logrotate configuration file - -2009-12-15 Otto Allmendinger <otto.allmendinger@googlemail.com> - * 1.2.0-5 : - simplified dependencies - increased visibility of install messages - - * 1.2.0-4 : - added boost to makedepends - - * 1.2.0-3 : - added ChangeLog - added post_upgrade() function - added x86_64 to arch diff --git a/murmur/PKGBUILD b/murmur/PKGBUILD deleted file mode 100644 index 295560a..0000000 --- a/murmur/PKGBUILD +++ /dev/null @@ -1,58 +0,0 @@ -# Maintainer: Otto Allmendinger <otto.allmendinger@googlemail.com> -# Contributor: Malte Rabenseifner <malte@zearan.de> - -pkgname=murmur -pkgver=1.2.2 -pkgrel=1 -pkgdesc="The voice chat application server for Mumble" -arch=('i686' 'x86_64') -url="http://mumble.sourceforge.net" -license=('GPL') -depends=('avahi' 'lsb-release' 'protobuf' 'qt>=4.4.0') -makedepends=('boost') -conflicts=('murmur-ice' 'murmur-static' 'murmur-git') -backup=("etc/murmur.ini" - "etc/logrotate.d/murmur" - "etc/conf.d/murmur" ) -install="murmur.install" -source=("http://downloads.sourceforge.net/mumble/mumble-$pkgver.tar.gz" - "murmur.rc.d" - "murmur.conf.d" - "murmur.dbus.conf" - "murmur.logrotate.d" -) - -build() { - cd ${srcdir}/mumble-$pkgver - - qmake main.pro CONFIG+="no-client no-ice" || return 1 - make || return 1 - - sed -e "1i# vi:ft=cfg" \ - -e "s|database=|database=/var/lib/murmur/murmur.sqlite|" \ - -e "s|dbus=session|#dbus=system|" \ - -e "s|#logfile=murmur.log|logfile=/var/log/murmur/murmur.log|" \ - -e "s|#pidfile=|pidfile=/var/run/murmur/murmur.pid|" \ - -e "s|#uname=|uname=murmur|" \ - -i scripts/murmur.ini || return 1 - - install -dm755 ${pkgdir}/var/lib/murmur - install -dm755 ${pkgdir}/var/log/murmur - install -dm755 ${pkgdir}/var/run/murmur - install -Dm755 release/murmurd ${pkgdir}/usr/sbin/murmurd - install -Dm644 scripts/murmur.ini ${pkgdir}/etc/murmur.ini - install -Dm755 ${startdir}/murmur.rc.d ${pkgdir}/etc/rc.d/murmur - install -Dm644 ${startdir}/murmur.conf.d ${pkgdir}/etc/conf.d/murmur - install -Dm644 ${startdir}/murmur.dbus.conf \ - ${pkgdir}/etc/dbus-1/system.d/murmur.conf - install -Dm644 ${startdir}/murmur.logrotate.d \ - ${pkgdir}/etc/logrotate.d/murmur - install -Dm644 README ${pkgdir}/usr/share/doc/murmur/README - install -Dm644 man/murmurd.1 ${pkgdir}/usr/share/man/man1/murmurd.1 -} - -md5sums=('de30ee85170e183b66568b53b04c5727' - 'a577febe880ea104a2b00582b9cb0ddd' - '11c1cc875e8021739ec2087252cf0533' - 'eddea4cdbd0bde4b960a67e16b5d5478' - 'c56726cb267ead68f37f35c28e36e6fa') diff --git a/murmur/murmur-config.sh b/murmur/murmur-config.sh deleted file mode 100644 index ebee4a4..0000000 --- a/murmur/murmur-config.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/bash -# -# -> config.sh -# -# version: 1.1 -# author: Massimo Mund -# date: 21.12.2007 -# description: a script to easily add, remove and edit users from a murmur server -# - -#information -version="1.1" - -#settings -bin="sqlite3" -dbfile="/var/lib/murmurd/murmurd.sqlite" - -function checkforsqlite() { - - if [ ! -f /usr/bin/sqlite3 ]; then - echo "it seems that there is no sqlite3 installed, which is necessary for this script! " - echo "install sqlite3 and try it again!" - exit - fi - -} - -function help () { - - echo "" - echo " usage: config.sh <cmd> | --help | --version" - echo "" - echo " commands:" - echo " showusers" - echo " adduser <username> <pw> [<serverid>] [<email>]" - echo " deluser <username> [<serverid>]" - echo " setpw <username> <newpw> [<serverid>]" - echo " setemail <username> <newemail> [<serverid>]" - echo "" - exit - -} - -function version() { - - echo "config.sh : version: $1" - exit -} - -function invalidoption () { - - echo "config.sh : invalid option -- $*" - echo "Try 'config.sh --help' for more information." - exit - -} - -checkforsqlite - -while [ "$#" -gt "0" ]; do - case $1 in - showusers) - $bin $dbfile "select * from players;" - exit - ;; - adduser) - shift - username="$1" - email="$4" - pw="$2" - serverid="$3" - playerid=$($bin $dbfile "select MAX(player_id)+1 as id from players WHERE player_id < 10000;") - - if [ "$serverid" == "" ]; then - serverid="1" - fi - - $bin $dbfile "insert into players (server_id, player_id, name, email, pw) values($serverid, $playerid, '$username', '$email', '$pw');" - exit - ;; - deluser) - shift - username="$1" - serverid="$2" - - if [ "$serverid" == "" ]; then - serverid="1" - fi - - $bin $dbfile "delete from players where name='$username';" - exit - ;; - setpw) - shift - username="$1" - newpw="$2" - serverid="$3" - - if [ "$serverid" == "" ]; then - serverid="1" - fi - - $bin $dbfile "update players set pw='$newpw' where name='$username';" - exit - ;; - setemail) - shift - username="$1" - newemail="$2" - serverid="$3" - - if [ "$serverid" == "" ]; then - serverid="1" - fi - - $bin $dbfile "update players set email='$newemail' where name='$username';" - exit - ;; - --help) - help - ;; - --version) - version $version - ;; - *) - invalidoption $* - break - ;; - esac -done - -invalidoption $* - -exit 0 diff --git a/murmur/murmur.conf.d b/murmur/murmur.conf.d deleted file mode 100644 index 592194b..0000000 --- a/murmur/murmur.conf.d +++ /dev/null @@ -1,2 +0,0 @@ -# Use /etc/murmur.ini as configuration file -PARAMS="-ini /etc/murmur.ini" diff --git a/murmur/murmur.dbus.conf b/murmur/murmur.dbus.conf deleted file mode 100644 index cf937d7..0000000 --- a/murmur/murmur.dbus.conf +++ /dev/null @@ -1,22 +0,0 @@ -<!-- vi: set ft=xml: --> -<!-- - As described in http://mumble.sourceforge.net/DBus, - but with different username ---> -<!DOCTYPE busconfig PUBLIC - "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" - "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> -<busconfig> - - <policy user="murmur"> - <allow own="net.sourceforge.mumble.murmur"/> - </policy> - <policy user="root"> - <allow own="net.sourceforge.mumble.murmur"/> - </policy> - - <policy context="default"> - <allow send_destination="net.sourceforge.mumble.murmur"/> - <allow receive_sender="net.sourceforge.mumble.murmur"/> - </policy> -</busconfig> diff --git a/murmur/murmur.install b/murmur/murmur.install deleted file mode 100644 index 9e1446d..0000000 --- a/murmur/murmur.install +++ /dev/null @@ -1,33 +0,0 @@ -post_install() { - - # bug: dbus reload here doesn't work - # workaround: it seems to work if you do it a few seconds later, manually - /etc/rc.d/dbus reload > /dev/null - - /usr/bin/getent group murmur > /dev/null || /usr/sbin/groupadd murmur - /usr/bin/getent passwd murmur > /dev/null || \ - /usr/sbin/useradd -d /var/lib/murmur -g murmur -s /bin/false murmur - - chown -R murmur:murmur /var/lib/murmur - chown -R murmur:murmur /var/run/murmur - chown -R murmur:murmur /var/log/murmur - - echo - echo '==> Set the SuperUser password with (as root):' - echo '==> murmurd -ini /etc/murmur.ini -supw PASSWORD' -} - -post_upgrade() { - post_install -} - -pre_remove() { - [ -f /var/run/daemons/murmur ] && /etc/rc.d/murmur stop > /dev/null - killall -u murmur -5 - sleep 1 -} - -post_remove() { - /etc/rc.d/dbus reload > /dev/null - /usr/sbin/userdel murmur > /dev/null -} diff --git a/murmur/murmur.logrotate.d b/murmur/murmur.logrotate.d deleted file mode 100644 index e113175..0000000 --- a/murmur/murmur.logrotate.d +++ /dev/null @@ -1,6 +0,0 @@ -/var/log/murmur/murmur.log { - missingok - postrotate - /bin/kill -HUP `cat /var/run/murmur/murmur.pid 2>/dev/null` 2> /dev/null || true - endscript -} diff --git a/murmur/murmur.rc.d b/murmur/murmur.rc.d deleted file mode 100755 index fac3fb3..0000000 --- a/murmur/murmur.rc.d +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -CONF=/etc/conf.d/murmur - -. /etc/rc.conf -. /etc/rc.d/functions - -[ -f $CONF ] && . $CONF - -PID=$(pidof -o %PPID /usr/sbin/murmurd) -case "$1" in - start) - stat_busy "Starting murmur" - [ -z "$PID" ] && /usr/sbin/murmurd -ini /etc/murmurd/murmurd.ini - [ -z "$PID" ] && /usr/sbin/murmurd -ini /etc/murmurd/murmurd-b52.ini - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon murmur - stat_done - fi - ;; - stop) - stat_busy "Stopping murmur" - [ ! -z "$PID" ] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon murmur - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/murmur/murmur.sh b/murmur/murmur.sh deleted file mode 100644 index 26aa922..0000000 --- a/murmur/murmur.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# -# Author: Otto Allmendinger <otto.allmendinger at googlemail dot com> -# Date: 2009-12-14 -# Description: Murmur wrapper script for pivilige separation -# - -ARGS="-ini /etc/murmur.ini $@" -su -c "/usr/lib/murmur/murmur ${ARGS}" - murmur diff --git a/murmur/murmurd b/murmur/murmurd deleted file mode 100644 index 630b49f..0000000 --- a/murmur/murmurd +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# general config -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/sbin/murmurd` - -case "$1" in - start) - stat_busy "Starting Murmur Server" - [ -z $PID ] && /usr/sbin/murmurd -ini /etc/murmurd.ini & > /dev/null 2>&1 - if [ $? -gt 0 ]; then - stat_fail - else - PID=`pidof -o %PPID /usr/sbin/murmurd` - echo $PID >/var/run/murmurd.pid - add_daemon murmurd - stat_done - fi - ;; - stop) - stat_busy "Stopping Murmur Server" - [ ! -z $PID ] && kill $PID & > /dev/null 2>&1 - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon murmurd - stat_done - fi - ;; - restart) - $0 stop - sleep 3 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/nettop/PKGBUILD b/nettop/PKGBUILD deleted file mode 100644 index 5fd86ad..0000000 --- a/nettop/PKGBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org> - -pkgname=nettop -pkgver=0.2.3 -pkgrel=3 -pkgdesc="A program which looks like top, but is for network packets" -arch=('i686' 'x86_64') -url="http://srparish.net/scripts/" -license=('BSD') -depends=('slang' 'libpcap') -makedepends=('patch') -source=(http://www.sourcefiles.org/Networking/Tools/Scripts/$pkgname-$pkgver.tar.gz \ - $pkgname-$pkgver-compile.diff) - -md5sums=('e76602717e79a26b0ab15ab6799fb1ef' - '49a7768aeb22df656947448b5ef6e734') - -build() { - cd ${srcdir}/$pkgname-$pkgver - patch -Np0 -i ${srcdir}/$pkgname-$pkgver-compile.diff || return 1 - - install -d ${pkgdir}/usr/bin \ - ${pkgdir}/usr/share/{doc,licenses}/${pkgname} || return 1 - - ./configure --prefix=/usr --sysconfdir=/etc/nettop || return 1 - make || return 1 - make prefix=${pkgdir}/usr install || return 1 - -# License - cat ${srcdir}/$pkgname-$pkgver/${pkgname}.c | tail -n+3 | head -n26 > \ - ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1 - - install -D -m644 ChangeLog README THANKS ${pkgdir}/usr/share/doc/${pkgname} || return 1 -} diff --git a/nettop/nettop-0.2.3-compile.diff b/nettop/nettop-0.2.3-compile.diff deleted file mode 100644 index 45be973..0000000 --- a/nettop/nettop-0.2.3-compile.diff +++ /dev/null @@ -1,41 +0,0 @@ ---- nettop.c~ 2001-11-09 04:50:03.000000000 +0100 -+++ nettop.c 2008-05-11 01:52:40.000000000 +0200 -@@ -216,22 +216,26 @@ - } - } - -- ether.count = ether.size = (int) ether.l = (int) ether.r = 0; -+ ether.count = ether.size = 0; -+ ether.l = ether.r = NULL; - ether.type = -1; - for (i = 0; i < HISTORY_SIZE; i++) - ether.size_h[i] = 0; - -- ip.count = ip.size = (int) ip.l = (int) ip.r = 0; -+ ip.count = ip.size = 0; -+ ip.l = ip.r = NULL; - ip.type = -1; - for (i = 0; i < HISTORY_SIZE; i++) - ip.size_h[i] = 0; - -- tcp.count = tcp.size = (int) tcp.l = (int) tcp.r = 0; -+ tcp.count = tcp.size = 0; -+ tcp.l = tcp.r = NULL; - tcp.type = -1; - for (i = 0; i < HISTORY_SIZE; i++) - tcp.size_h[i] = 0; - -- udp.count = udp.size = (int) udp.l = (int) udp.r = 0; -+ udp.count = udp.size = 0; -+ udp.l = udp.r = NULL; - udp.type = -1; - for (i = 0; i < HISTORY_SIZE; i++) - udp.size_h[i] = 0; -@@ -361,6 +365,7 @@ - } - break; - default: -+ break; - } - } - } diff --git a/nikto/PKGBUILD b/nikto/PKGBUILD deleted file mode 100644 index 6b4c282..0000000 --- a/nikto/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Maintainer: Arkham <arkham at archlinux dot us> -# Contributor: Arkham <arkham at archlinux dot us> - -pkgname=nikto -pkgver=2.1.1 -pkgrel=1 -pkgdesc='A web server scanner which performs comprehensive tests against web servers for multiple items' -url='http://www.cirt.net/code/nikto.shtml' -license=('GPL') -arch=('any') -depends=('perl' 'openssl' 'perl-net-ssleay') -install=$pkgname.install -source=(http://www.cirt.net/nikto/$pkgname-$pkgver.tar.gz - nikto.sh) -md5sums=('a9404c3f464b08f3f48788d5f39e0ca7' - 'eb7b704c8bdae28af9a0353764d0b552') - -build() { - cd $srcdir/$pkgname-$pkgver - - install -d $pkgdir/usr/share/nikto - cp -a * $pkgdir/usr/share/nikto/ - find $pkgdir/usr/share/nikto -type f -exec chmod 644 {} + - install -Dm 755 $srcdir/nikto.sh $pkgdir/usr/bin/nikto -} diff --git a/nikto/nikto.install b/nikto/nikto.install deleted file mode 100644 index aefdd93..0000000 --- a/nikto/nikto.install +++ /dev/null @@ -1,13 +0,0 @@ -post_install() { - echo "> Don't forget to update your plugins running as root:" - echo "> nikto -update" - echo "" -} - -post_upgrade() { - post_install $1 -} - -pre_remove() { - /bin/true -} diff --git a/nikto/nikto.sh b/nikto/nikto.sh deleted file mode 100644 index 8d36d2a..0000000 --- a/nikto/nikto.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd /usr/share/nikto -perl nikto.pl $@ diff --git a/nmon/PKGBUILD b/nmon/PKGBUILD deleted file mode 100644 index fb83eb8..0000000 --- a/nmon/PKGBUILD +++ /dev/null @@ -1,18 +0,0 @@ -# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> - -pkgname=nmon -pkgver=13g -pkgrel=1 -pkgdesc="AIX & Linux Performance Monitoring tool" -arch=('i686' 'x86_64') -url="http://nmon.sourceforge.net" -license="GPL" -source=("http://downloads.sourceforge.net/${pkgname}/lmon$pkgver.c") - -md5sums=('b1b8e6c0123ad232394991f2d4f40494') - -build() { - cd ${srcdir} - cc -o nmon lmon$pkgver.c -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -g - install -D -m 0755 nmon "${pkgdir}/usr/bin/nmon" -} diff --git a/nmon/lmon13g.c b/nmon/lmon13g.c deleted file mode 100644 index c1ce72d..0000000 --- a/nmon/lmon13g.c +++ /dev/null @@ -1,5250 +0,0 @@ -/* - * lmon.c -- Curses based Performance Monitor for Linux - * Developer: Nigel Griffiths. - */ - -/* - * Use the following Makefile -CFLAGS= -g -DPOWER -DPARTITIONS -LDFLAGS=-lcurses -lodm -lcfg -nmon: nmon.o - * end of Makefile - */ - -#define RAW(member) (long)((long)(p->cpuN[i].member) - (long)(q->cpuN[i].member)) -#define RAWTOTAL(member) (long)((long)(p->cpu_total.member) - (long)(q->cpu_total.member)) - -#define VERSION "13g" -char version[] = VERSION; -static char *SccsId = "nmon " VERSION; - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <ctype.h> -#include <ncurses.h> -#include <signal.h> -#include <pwd.h> -#include <fcntl.h> -#include <math.h> -#include <time.h> -#include <sys/errno.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/ioctl.h> -#include <sys/utsname.h> -#include <sys/time.h> -#include <sys/socket.h> -#include <sys/wait.h> - -#define FLIP(variable) if(variable) variable=0; else variable=1; - -#ifdef MALLOC_DEBUG -#define MALLOC(argument) mymalloc(argument,__LINE__) -#define FREE(argument) myfree(argument,__LINE__) -#define REALLOC(argument1,argument2) myrealloc(argument1,argument2,__LINE__) -void *mymalloc(int size, int line) -{ -void * ptr; - ptr= malloc(size); - fprintf(stderr,"0x%x = malloc(%d) at line=%d\n",ptr,size,line); - return ptr; -} -void myfree(void *ptr,int line) -{ - fprintf(stderr,"free(0x%x) at line=%d\n",ptr,line); - free(ptr); -} -void *myrealloc(void *oldptr, int size, int line) -{ -void * ptr; - ptr= realloc(oldptr,size); - fprintf(stderr,"0x%x = realloc(0x%x, %d) at line=%d\n",ptr,oldptr,size,line); - return ptr; -} -#else -#define MALLOC(argument) malloc(argument) -#define FREE(argument) free(argument) -#define REALLOC(argument1,argument2) realloc(argument1,argument2) -#endif /* MALLOC STUFF */ - - -#define P_CPUINFO 0 -#define P_STAT 1 -#define P_VERSION 2 -#define P_MEMINFO 3 -#define P_UPTIME 4 -#define P_LOADAVG 5 -#define P_NFS 6 -#define P_NFSD 7 -#define P_NUMBER 8 /* one more than the max */ - -char *month[12] = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", - "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" }; - -/* Cut of everything after the first space in callback - * Delete any '&' just before the space - */ -char *check_call_string (char* callback, const char* name) -{ - char * tmp_ptr = callback; - - if (strlen(callback) > 256) { - fprintf(stderr,"ERROR nmon: ignoring %s - too long\n", name); - return (char *) NULL; - } - - for( ; *tmp_ptr != '\0' && *tmp_ptr != ' ' && *tmp_ptr != '&'; ++tmp_ptr ) - ; - - *tmp_ptr = '\0'; - - if( tmp_ptr == callback ) - return (char *)NULL; - else - return callback; -} - -/* Remove error output to this buffer and display it if NMONDEBUG=1 */ -char errorstr[70]; -int error_on = 0; -void error(char *err) -{ - strncpy(errorstr,err,69); -} - -/* /proc/cpuinfo can be 512 bytes per CPU and we allow 256 CPUs */ -/* and 20 lines per CPU so boost the buffers for this one */ -#define PROC_MAXBUF (1024*4) -#define CPUINFO_MAXBUF (512*256) -#define PROC_MAXLINES (20*256*sizeof(char *)) - -int reread =0; -struct { - FILE *fp; - char *filename; - int lines; - char *line[PROC_MAXLINES]; - char *buf; -} proc[P_NUMBER]; - -void proc_init() -{ -int i; - /* Initialise the file pointers */ - for(i=0;i<P_NUMBER;i++) { - proc[i].fp = 0; - if(i == P_CPUINFO) - proc[i].buf = (char *)malloc(CPUINFO_MAXBUF); - else - proc[i].buf = (char *)malloc(PROC_MAXBUF); - } - proc[P_CPUINFO].filename = "/proc/cpuinfo"; - proc[P_STAT].filename = "/proc/stat"; - proc[P_VERSION].filename = "/proc/version"; - proc[P_MEMINFO].filename = "/proc/meminfo"; - proc[P_UPTIME].filename = "/proc/uptime"; - proc[P_LOADAVG].filename = "/proc/loadavg"; - proc[P_NFS].filename = "/proc/net/rpc/nfs"; - proc[P_NFSD].filename = "/proc/net/rpc/nfsd"; -} - -void proc_read(int num) -{ -int i; -int size; -int found; -char buf[1024]; -int bytes; - - if(proc[num].fp == 0) { - if( (proc[num].fp = fopen(proc[num].filename,"r")) == NULL) { - sprintf(buf, "failed to open file %s", proc[num].filename); - error(buf); - proc[num].fp = 0; - return; - } - } - rewind(proc[num].fp); - if(num == P_CPUINFO) - bytes = CPUINFO_MAXBUF -1; - else - bytes = PROC_MAXBUF -1; - size = fread(proc[num].buf, 1, bytes, proc[num].fp); - proc[num].buf[size]=0; - proc[num].lines=0; - proc[num].line[0]=&proc[num].buf[0]; - if(num == P_VERSION) { - found=0; - for(i=0;i<size;i++) { /* remove some weird stuff */ - if( found== 0 && - proc[num].buf[i] == ')' && - proc[num].buf[i+1] == ' ' && - proc[num].buf[i+2] == '(' ) { - proc[num].buf[i+1] = '\n'; - found=1; - } else { - if( - proc[num].buf[i] == ')' && - proc[num].buf[i+1] == ' ' && - proc[num].buf[i+2] == '#' ) { - proc[num].buf[i+1] = '\n'; - } - if( - proc[num].buf[i] == '#' && - proc[num].buf[i+2] == '1' ) { - proc[num].buf[i] = '\n'; - } - } - } - } - for(i=0;i<size;i++) { - if(proc[num].buf[i] == '\t') - proc[num].buf[i]= ' '; - if(proc[num].buf[i] == '\n') { - proc[num].lines++; - proc[num].buf[i] = 0; - proc[num].line[proc[num].lines] = &proc[num].buf[i+1]; - } - if(proc[num].lines==PROC_MAXLINES-1) - break; - } - if(reread) { - fclose( proc[num].fp); - proc[num].fp = 0; - } -} - -#include <dirent.h> - -struct procsinfo { - int pi_pid; - char pi_comm[64]; - char pi_state; - int pi_ppid; - int pi_pgrp; - int pi_session; - int pi_tty_nr; - int pi_tty_pgrp; - unsigned long pi_flags; - unsigned long pi_minflt; - unsigned long pi_cmin_flt; - unsigned long pi_majflt; - unsigned long pi_cmaj_flt; - unsigned long pi_utime; - unsigned long pi_stime; - long pi_cutime; - long pi_cstime; - long pi_pri; - long pi_nice; - long junk /* removed */; - long pi_it_real_value; - unsigned long pi_start_time; - unsigned long pi_vsize; - long pi_rss; /* - 3 */ - unsigned long pi_rlim_cur; - unsigned long pi_start_code; - unsigned long pi_end_code; - unsigned long pi_start_stack; - unsigned long pi_esp; - unsigned long pi_eip; - /* The signal information here is obsolete. */ - unsigned long pi_pending_signal; - unsigned long pi_blocked_sig; - unsigned long pi_sigign; - unsigned long pi_sigcatch; - unsigned long pi_wchan; - unsigned long pi_nswap; - unsigned long pi_cnswap; - int pi_exit_signal; - int pi_cpu; - - unsigned long statm_size; /* total program size */ - unsigned long statm_resident; /* resident set size */ - unsigned long statm_share; /* shared pages */ - unsigned long statm_trs; /* text (code) */ - unsigned long statm_drs; /* data/stack */ - unsigned long statm_lrs; /* library */ - unsigned long statm_dt; /* dirty pages */ -}; - - -#include <mntent.h> -#include <fstab.h> -#include <sys/stat.h> -#include <sys/statfs.h> -#include <net/if.h> - -int debug =0; -time_t timer; /* used to work out the hour/min/second */ - -/* Counts of resources */ -int cpus = 1; /* number of CPUs in system (lets hope its more than zero!) */ -int max_cpus = 1; /* highest number of CPUs in DLPAR */ -int networks = 0; /* number of networks in system */ -int partitions = 0; /* number of partitions in system */ -int partitions_short = 0; /* partitions file data short form (i.e. data missing) */ -int disks = 0; /* number of disks in system */ -int seconds = -1; /* pause interval */ -int maxloops = -1; /* stop after this number of updates */ -char hostname[256]; -char run_name[256]; -int run_name_set = 0; -char fullhostname[256]; -int loop; - -#define DPL 150 /* Disks per line for file output to ensure it - does not overflow the spreadsheet input line max */ - -int disks_per_line = DPL; - -#define NEWDISKGROUP(disk) ( (disk) % disks_per_line == 0) - -/* Mode of output variables */ -int show_aaa = 1; -int show_para = 1; -int show_headings= 1; -int show_cpu = 0; -int show_smp = 0; -int show_longterm= 0; -int show_disk = 0; -#define SHOW_DISK_NONE 0 -#define SHOW_DISK_STATS 1 -#define SHOW_DISK_GRAPH 2 -int show_diskmap = 0; -int show_memory = 0; -int show_large = 0; -int show_kernel = 0; -int show_nfs = 0; -int show_net = 0; -int show_neterror= 0; -int show_partitions = 0; -int show_help = 0; -int show_top = 0; -int show_topmode = 1; -#define ARGS_NONE 0 -#define ARGS_ONLY 1 -int show_args = 0; -int show_all = 1; /* 1=all procs& disk 0=only if 1% or more busy */ -int show_verbose = 0; -int show_jfs = 0; -int flash_on = 0; -int first_huge = 1; -long huge_peak = 0; -int welcome = 1; -int dotline = 0; -int show_rrd = 0; -int show_lpar = 0; -int show_vm = 0; -int show_dgroup = 0; /* disk groups */ -int dgroup_loaded = 0; /* 0 = no, 1=needed, 2=loaded */ -int show_raw = 0; - -#define RRD if(show_rrd) - -double ignore_procdisk_threshold = 0.1; -double ignore_io_threshold = 0.1; -/* Curses support */ -#define CURSE if(cursed) /* Only use this for single line curses calls */ -#define COLOUR if(colour) /* Only use this for single line colour curses calls */ -int cursed = 1; /* 1 = using curses and - 0 = loging output for a spreadsheet */ -int colour = 1; /* 1 = using colour curses and - 0 = using black and white curses (see -b flag) */ -#define MVPRINTW(row,col,string) {move((row),(col)); \ - attron(A_STANDOUT); \ - printw(string); \ - attroff(A_STANDOUT); } -FILE *fp; /* filepointer for spreadsheet output */ - - -char *timestamp(int loop, time_t eon) -{ -static char string[64]; - if(show_rrd) - sprintf(string,"%ld",(long)eon); - else - sprintf(string,"T%04d",loop); - return string; -} -#define LOOP timestamp(loop,timer) - -char *easy[5] = {"not found",0,0,0,0}; -char *lsb_release[5] = {"not found",0,0,0,0}; - -void find_release() -{ -FILE *pop; -int i; -char tmpstr[71]; - - pop = popen("cat /etc/*ease 2>/dev/null", "r"); - if(pop != NULL) { - tmpstr[0]=0; - for(i=0;i<4;i++) { - if(fgets(tmpstr, 70, pop) == NULL) - break; - tmpstr[strlen(tmpstr)-1]=0; /* remove newline */ - easy[i] = malloc(strlen(tmpstr)+1); - strcpy(easy[i],tmpstr); - } - pclose(pop); - } - pop = popen("/usr/bin/lsb_release -idrc 2>/dev/null", "r"); - if(pop != NULL) { - tmpstr[0]=0; - for(i=0;i<4;i++) { - if(fgets(tmpstr, 70, pop) == NULL) - break; - tmpstr[strlen(tmpstr)-1]=0; /* remove newline */ - lsb_release[i] = malloc(strlen(tmpstr)+1); - strcpy(lsb_release[i],tmpstr); - } - pclose(pop); - } -} - - - -/* Full Args Mode stuff here */ - -#define ARGSMAX 1024*8 -#define CMDLEN 4096 - -struct { - int pid; - char *args; -} arglist[ARGSMAX]; - -void args_output(int pid, int loop, char *progname) -{ -FILE *pop; -int i; -char tmpstr[CMDLEN]; -static int arg_first_time = 1; - - if(pid == 0) - return; /* ignore init */ - for(i=0;i<ARGSMAX-1;i++ ) { /* clear data out */ - if(arglist[i].pid == pid){ - return; - } - if(arglist[i].pid == 0) /* got to empty slot */ - break; - } - sprintf(tmpstr,"ps -p %d -o args 2>/dev/null", pid); - pop = popen(tmpstr, "r"); - if(pop == NULL) { - return; - } else { - if(fgets(tmpstr, CMDLEN, pop) == NULL) { /* throw away header */ - pclose(pop); - return; - } - tmpstr[0]=0; - if(fgets(tmpstr, CMDLEN, pop) == NULL) { - pclose(pop); - return; - } - tmpstr[strlen(tmpstr)-1]=0; - if(tmpstr[strlen(tmpstr)-1]== ' ') - tmpstr[strlen(tmpstr)-1]=0; - arglist[i].pid = pid; - if(arg_first_time) { - fprintf(fp,"UARG,+Time,PID,ProgName,FullCommand\n"); - arg_first_time = 0; - } - fprintf(fp,"UARG,%s,%07d,%s,%s\n",LOOP,pid,progname,tmpstr); - pclose(pop); - return; - } -} - -void args_load() -{ -FILE *pop; -int i; -char tmpstr[CMDLEN]; - - for(i=0;i<ARGSMAX;i++ ) { /* clear data out */ - if(arglist[i].pid == -1) - break; - if(arglist[i].pid != 0){ - arglist[i].pid = -1; - free(arglist[i].args); - } - } - pop = popen("ps -eo pid,args 2>/dev/null", "r"); - if(pop == NULL) { - return; - } else { - if(fgets(tmpstr, CMDLEN, pop) == NULL) { /* throw away header */ - pclose(pop); - return; - } - for(i=0;i<ARGSMAX;i++ ) { - tmpstr[0]=0; - if(fgets(tmpstr, CMDLEN, pop) == NULL) { - pclose(pop); - return; - } - tmpstr[strlen(tmpstr)-1]=0; - if(tmpstr[strlen(tmpstr)-1]== ' ') - tmpstr[strlen(tmpstr)-1]=0; - arglist[i].pid = atoi(tmpstr); - arglist[i].args = malloc(strlen(tmpstr)); - strcpy(arglist[i].args,&tmpstr[6]); - } - pclose(pop); - } -} - -char *args_lookup(int pid, char *progname) -{ -int i; - for(i=0;i<ARGSMAX;i++) { - if(arglist[i].pid == pid) - return arglist[i].args; - if(arglist[i].pid == -1) - return progname; - } - return progname; -} -/* end args mode stuff here */ - -void linux_bbbp(char *name, char *cmd, char *err) -{ - int i; - int len; -#define STRLEN 4096 - char str[STRLEN]; - FILE * pop; - static int lineno = 0; - - pop = popen(cmd, "r"); - if (pop == NULL) { - fprintf(fp, "BBBP,%03d,%s failed to run %s\n", lineno++, cmd, err); - } else { - fprintf(fp, "BBBP,%03d,%s\n", lineno++, name); - for (i = 0; i < 2048 && (fgets(str, STRLEN, pop) != NULL); i++) { /* 2048=sanity check only */ - len = strlen(str); - if(len>STRLEN) len=STRLEN; - if (str[len-1] == '\n') /*strip off the newline */ - str[len-1] = 0; - /* fix lsconf style output so it does not confuse spread sheets */ - if(str[0] == '+') str[0]='p'; - if(str[0] == '*') str[0]='m'; - if(str[0] == '-') str[0]='n'; - if(str[0] == '/') str[0]='d'; - if(str[0] == '=') str[0]='e'; - fprintf(fp, "BBBP,%03d,%s,\"%s\"\n", lineno++, name, str); - } - pclose(pop); - } -} - -#define WARNING "needs root permission or file not present" - -/* Global name of programme for printing it */ -char *progname; - -/* Main data structure for collected stats. - * Two versions are previous and current data. - * Often its the difference that is printed. - * The pointers are swaped i.e. current becomes the previous - * and the previous over written rather than moving data around. - */ -struct cpu_stat { - long long user; - long long sys; - long long wait; - long long idle; - long long irq; - long long softirq; - long long steal; - long long nice; - long long intr; - long long ctxt; - long long btime; - long long procs; - long long running; - long long blocked; - float uptime; - float idletime; - float mins1; - float mins5; - float mins15; -}; - -#define ulong unsigned long -struct dsk_stat { - char dk_name[32]; - int dk_major; - int dk_minor; - long dk_noinfo; - ulong dk_reads; - ulong dk_rmerge; - ulong dk_rmsec; - ulong dk_rkb; - ulong dk_writes; - ulong dk_wmerge; - ulong dk_wmsec; - ulong dk_wkb; - ulong dk_xfers; - ulong dk_bsize; - ulong dk_time; - ulong dk_inflight; - ulong dk_11; - ulong dk_partition; - ulong dk_blocks; /* in /proc/partitions only */ - ulong dk_use; - ulong dk_aveq; -}; - -struct mem_stat { - long memtotal; - long memfree; - long memshared; - long buffers; - long cached; - long swapcached; - long active; - long inactive; - long hightotal; - long highfree; - long lowtotal; - long lowfree; - long swaptotal; - long swapfree; -#ifdef LARGEMEM - long dirty; - long writeback; - long mapped; - long slab; - long committed_as; - long pagetables; - long hugetotal; - long hugefree; - long hugesize; -#else - long bigfree; -#endif /*LARGEMEM*/ -}; - -struct vm_stat { -long long nr_dirty; -long long nr_writeback; -long long nr_unstable; -long long nr_page_table_pages; -long long nr_mapped; -long long nr_slab; -long long pgpgin; -long long pgpgout; -long long pswpin; -long long pswpout; -long long pgalloc_high; -long long pgalloc_normal; -long long pgalloc_dma; -long long pgfree; -long long pgactivate; -long long pgdeactivate; -long long pgfault; -long long pgmajfault; -long long pgrefill_high; -long long pgrefill_normal; -long long pgrefill_dma; -long long pgsteal_high; -long long pgsteal_normal; -long long pgsteal_dma; -long long pgscan_kswapd_high; -long long pgscan_kswapd_normal; -long long pgscan_kswapd_dma; -long long pgscan_direct_high; -long long pgscan_direct_normal; -long long pgscan_direct_dma; -long long pginodesteal; -long long slabs_scanned; -long long kswapd_steal; -long long kswapd_inodesteal; -long long pageoutrun; -long long allocstall; -long long pgrotated; -}; - - - -char *nfs_v2_names[18] = { - "null", "getattr", "setattr", "root", "lookup", "readlink", - "read", "wrcache", "write", "create", "remove", "rename", - "link", "symlink", "mkdir", "rmdir", "readdir", "fsstat"}; - -char *nfs_v3_names[22] ={ - "null", "getattr", "setattr", "lookup", "access", "readlink", - "read", "write", "create", "mkdir", "symlink", "mknod", - "remove", "rmdir", "rename", "link", "readdir", "readdirplus", - "fsstat", "fsinfo", "pathconf", "commit"}; - -struct nfs_stat { - long v2c[18]; /* verison2 client */ - long v3c[22]; /* verison3 client */ - long v2s[18]; /* verison2 server */ - long v3s[22]; /* verison3 server */ -}; - -#define NETMAX 32 -struct net_stat { - unsigned long if_name[17]; - unsigned long long if_ibytes; - unsigned long long if_obytes; - unsigned long long if_ipackets; - unsigned long long if_opackets; - unsigned long if_ierrs; - unsigned long if_oerrs; - unsigned long if_idrop; - unsigned long if_ififo; - unsigned long if_iframe; - unsigned long if_odrop; - unsigned long if_ofifo; - unsigned long if_ocarrier; - unsigned long if_ocolls; -} ; -#ifdef PARTITIONS -#define PARTMAX 256 -struct part_stat { - int part_major; - int part_minor; - unsigned long part_blocks; - char part_name[16]; - unsigned long part_rio; - unsigned long part_rmerge; - unsigned long part_rsect; - unsigned long part_ruse; - unsigned long part_wio; - unsigned long part_wmerge; - unsigned long part_wsect; - unsigned long part_wuse; - unsigned long part_run; - unsigned long part_use; - unsigned long part_aveq; -}; -#endif /*PARTITIONS*/ - - -#ifdef POWER - -int lparcfg_reread=1; - -struct { -char version_string[16]; /*lparcfg 1.3 */ -int version; -char serial_number[16]; /*HAL,0210033EA*/ -char system_type[16]; /*HAL,9124-720*/ -int partition_id; /*11*/ -/* -R4=0x14 -R5=0x0 -R6=0x800b0000 -R7=0x1000000040004 -*/ -int BoundThrds; /*=1*/ -int CapInc; /*=1*/ -long long DisWheRotPer; /*=2070000*/ -int MinEntCap; /*=10*/ -int MinEntCapPerVP; /*=10*/ -int MinMem; /*=2048*/ -int DesMem; /*=4096*/ -int MinProcs; /*=1*/ -int partition_max_entitled_capacity; /*=400*/ -int system_potential_processors; /*=4*/ - /**/ -int partition_entitled_capacity; /*=20*/ -int system_active_processors; /*=4*/ -int pool_capacity; /*=4*/ -int unallocated_capacity_weight; /*=0*/ -int capacity_weight; /*=0*/ -int capped; /*=1*/ -int unallocated_capacity; /*=0*/ -long long pool_idle_time; /*=0*/ -long long pool_idle_saved; -long long pool_idle_diff; -int pool_num_procs; /*=0*/ -long long purr; /*=0*/ -long long purr_saved; -long long purr_diff; -long long timebase; -int partition_active_processors; /*=1*/ -int partition_potential_processors; /*=40*/ -int shared_processor_mode; /*=1*/ -int cmo_enabled; /* 1 means AMS is Active */ -int entitled_memory_pool_number; /* pool number = 0 */ -int entitled_memory_weight; /* 0 to 255 */ -long cmo_faults; /* Hypervisor Page-in faults = big number */ -long cmo_faults_save; /* above saved */ -long cmo_faults_diff; /* delta */ -long cmo_fault_time_usec; /* Hypervisor time in micro seconds = big */ -long cmo_fault_time_usec_save; /* above saved */ -long cmo_fault_time_usec_diff; /* delta */ -long backing_memory; /* AIX pmem in bytes */ -long cmo_page_size; /* AMS page size in bytes */ -long entitled_memory_pool_size; /* AMS whole pool size in bytes */ -long entitled_memory_loan_request; /* AMS requesting more memory loaning */ -} lparcfg; - -int lpar_count=0; - -#define LPAR_LINE_MAX 50 -#define LPAR_LINE_WIDTH 80 -char lpar_buffer[LPAR_LINE_MAX][LPAR_LINE_WIDTH]; - -int lpar_sanity=55; - -char *locate(char *s) -{ -int i; -int len; - len=strlen(s); - for(i=0;i<lpar_count;i++) - if( !strncmp(s,lpar_buffer[i],len)) - return lpar_buffer[i]; - return ""; -} - -#define NUMBER_NOT_VALID -999 - -long long read_longlong(char *s) -{ -long long x; -int ret; -int len; -int i; -char *str; - str = locate(s); - len=strlen(str); - if(len == 0) { - return NUMBER_NOT_VALID; - } - for(i=0;i<len;i++) { - if(str[i] == '=') { - ret = sscanf(&str[i+1], "%lld", &x); - if(ret != 1) { - fprintf(stderr,"sscanf for %s failed returned = %d line=%s\n", s, ret, str); - return -1; - } -/* fprintf(fp,"DEBUG read %s value %lld\n",s,x);*/ - return x; - } - } - fprintf(stderr,"read_long_long failed returned line=%s\n", str); - return -2; -} - - -int proc_lparcfg() -{ -static FILE *fp = (FILE *)-1; -char *str; - if( fp == (FILE *)-1) { - if( (fp = fopen("/proc/ppc64/lparcfg","r")) == NULL) { - error("failed to open - /proc/ppc64/lparcfg"); - fp = (FILE *)-1; - return 0; - } - } - - for(lpar_count=0;lpar_count<LPAR_LINE_MAX-1;lpar_count++) { - if(fgets(lpar_buffer[lpar_count],LPAR_LINE_WIDTH-1,fp) == NULL) - break; - } - if(lparcfg_reread) { - fclose(fp); - fp = (FILE *)-1; - } else rewind(fp); - - str=locate("lparcfg"); sscanf(str, "lparcfg %s", lparcfg.version_string); - str=locate("serial_number"); sscanf(str, "serial_number=%s", lparcfg.serial_number); - str=locate("system_type"); sscanf(str, "system_type=%s", lparcfg.system_type); - -#define GETDATA(variable) lparcfg.variable = read_longlong( __STRING(variable) ); - - GETDATA(partition_id); - GETDATA(BoundThrds); - GETDATA(CapInc); - GETDATA(DisWheRotPer); - GETDATA(MinEntCap); - GETDATA(MinEntCapPerVP); - GETDATA(MinMem); - GETDATA(DesMem); - GETDATA(MinProcs); - GETDATA(partition_max_entitled_capacity); - GETDATA(system_potential_processors); - GETDATA(partition_entitled_capacity); - GETDATA(system_active_processors); - GETDATA(pool_capacity); - GETDATA(unallocated_capacity_weight); - GETDATA(capacity_weight); - GETDATA(capped); - GETDATA(unallocated_capacity); - lparcfg.pool_idle_saved = lparcfg.pool_idle_time; - GETDATA(pool_idle_time); - lparcfg.pool_idle_diff = lparcfg.pool_idle_time - lparcfg.pool_idle_saved; - GETDATA(pool_num_procs); - lparcfg.purr_saved = lparcfg.purr; - GETDATA(purr); - lparcfg.purr_diff = lparcfg.purr - lparcfg.purr_saved; - GETDATA(partition_active_processors); - GETDATA(partition_potential_processors); - GETDATA(shared_processor_mode); -/* AMS additions */ - GETDATA(cmo_enabled); - if(lparcfg.cmo_enabled) { - GETDATA(entitled_memory_pool_number); /* pool number = 0 */ - GETDATA(entitled_memory_weight); /* 0 to 255 */ - - lparcfg.cmo_faults_save = lparcfg.cmo_faults; - GETDATA(cmo_faults); /* Hypervisor Page-in faults = big number */ - lparcfg.cmo_faults_diff = lparcfg.cmo_faults - lparcfg.cmo_faults_save; - - lparcfg.cmo_fault_time_usec_save = lparcfg.cmo_fault_time_usec; - GETDATA(cmo_fault_time_usec); /* Hypervisor time in micro seconds = big number */ - lparcfg.cmo_fault_time_usec_diff = lparcfg.cmo_fault_time_usec - lparcfg.cmo_fault_time_usec_save; - - GETDATA(backing_memory); /* AIX pmem in bytes */ - GETDATA(cmo_page_size); /* AMS page size in bytes */ - GETDATA(entitled_memory_pool_size); /* AMS whole pool size in bytes */ - GETDATA(entitled_memory_loan_request); /* AMS requesting more memory loaning */ - } - return 1; -} -#endif /*POWER*/ - - -#define DISKMIN 256 -#define DISKMAX diskmax -int diskmax = DISKMIN; - -#define CPUMAX 128 - -struct data { - struct dsk_stat *dk; - struct cpu_stat cpu_total; - struct cpu_stat cpuN[CPUMAX]; - struct mem_stat mem; - struct vm_stat vm; - struct nfs_stat nfs; - struct net_stat ifnets[NETMAX]; -#ifdef PARTITIONS - struct part_stat parts[PARTMAX]; -#endif /*PARTITIONS*/ - - struct timeval tv; - double time; - struct procsinfo *procs; - - int nprocs; -} database[2], *p, *q; - - -long long read_vmline(FILE *fp, char *s) -{ -char buffer[4096]; -int len; - int ret; -long long var; - - if(fgets(buffer,4096-1,fp) == NULL) - return -1; - len = strlen(s) +1; - var = -1; - ret = sscanf(&buffer[len],"%lld", &var); - if(ret == 1) - return var; - else - return -1; -} - -#define GETVM(variable) p->vm.variable = read_vmline(fp, __STRING(variable) ); - -int read_vmstat() -{ -static FILE *fp = (FILE *)-1; - - if( fp == (FILE *)-1) { - if( (fp = fopen("/proc/vmstat","r")) == NULL) { - error("failed to open - /proc/vmstat"); - fp = (FILE *)-1; - return -1; - } - } - GETVM(nr_dirty); - GETVM(nr_writeback); - GETVM(nr_unstable); - GETVM(nr_page_table_pages); - GETVM(nr_mapped); - GETVM(nr_slab); - GETVM(pgpgin); - GETVM(pgpgout); - GETVM(pswpin); - GETVM(pswpout); - GETVM(pgalloc_high); - GETVM(pgalloc_normal); - GETVM(pgalloc_dma); - GETVM(pgfree); - GETVM(pgactivate); - GETVM(pgdeactivate); - GETVM(pgfault); - GETVM(pgmajfault); - GETVM(pgrefill_high); - GETVM(pgrefill_normal); - GETVM(pgrefill_dma); - GETVM(pgsteal_high); - GETVM(pgsteal_normal); - GETVM(pgsteal_dma); - GETVM(pgscan_kswapd_high); - GETVM(pgscan_kswapd_normal); - GETVM(pgscan_kswapd_dma); - GETVM(pgscan_direct_high); - GETVM(pgscan_direct_normal); - GETVM(pgscan_direct_dma); - GETVM(pginodesteal); - GETVM(slabs_scanned); - GETVM(kswapd_steal); - GETVM(kswapd_inodesteal); - GETVM(pageoutrun); - GETVM(allocstall); - GETVM(pgrotated); - fclose(fp); - fp=(FILE *)-1; -/* - rewind(fp); -*/ - return 1; -} - - -/* These macro simplify the access to the Main data structure */ -#define DKDELTA(member) ( (q->dk[i].member > p->dk[i].member) ? 0 : (p->dk[i].member - q->dk[i].member)) -#define SIDELTA(member) ( (q->si.member > p->si.member) ? 0 : (p->si.member - q->si.member)) - -#define IFNAME 64 - -#define TIMEDELTA(member,index1,index2) ((p->procs[index1].member) - (q->procs[index2].member)) -#define COUNTDELTA(member) ( (q->procs[topper[j].other].member > p->procs[i].member) ? 0 : (p->procs[i].member - q->procs[topper[j].other].member) ) - -#define TIMED(member) ((double)(p->procs[i].member.tv_sec)) - -double *cpu_peak; /* ptr to array - 1 for each cpu - 0 = average for machine */ -double *disk_busy_peak; -double *disk_rate_peak; -double net_read_peak[NETMAX]; -double net_write_peak[NETMAX]; -int aiorunning; -int aiorunning_max = 0; -int aiocount; -int aiocount_max = 0; -float aiotime; -float aiotime_max =0.0; - -char *dskgrp(int i) -{ -static char error_string[] = { "Too-Many-Disks" }; -static char *string[16] = {"", "1", "2", "3", - "4", "5", "6", "7", - "8", "9", "10", "11", - "12", "13", "14", "15"}; - - i = (int)((float)i/(float)disks_per_line); - if(0 <= i && i <= 15 ) - return string[i]; - return error_string; -} - -/* command checking against a list */ - -#define CMDMAX 64 - -char *cmdlist[CMDMAX]; -int cmdfound = 0; - -int cmdcheck(char *cmd) -{ - int i; -#ifdef CMDDEBUG - fprintf(stderr,"cmdfound=%d\n",cmdfound); - for(i=0;i<cmdfound;i++) - fprintf(stderr,"cmdlist[%d]=\"%s\"\n",i,cmdlist[i]); -#endif /* CMDDEBUG */ - for(i=0;i<cmdfound;i++) { - if(strlen(cmdlist[i]) == 0) - continue; - if( !strncmp(cmdlist[i],cmd,strlen(cmdlist[i])) ) - return 1; - } - return 0; -} - -/* Convert secs + micro secs to a double */ -double doubletime(void) -{ - - gettimeofday(&p->tv, 0); - return((double)p->tv.tv_sec + p->tv.tv_usec * 1.0e-6); -} - -int stat8 = 0; /* used to determine the number of variables on a line */ - -void proc_cpu() -{ -int i; -static int intr_line = 0; -static int ctxt_line = 0; -static int btime_line= 0; -static int proc_line = 0; -static int run_line = 0; -static int block_line= 0; -static int proc_cpu_first_time = 1; -long long user; -long long nice; -long long sys; -long long idle; -long long iowait; -long long hardirq; -long long softirq; -long long steal; - - if(proc_cpu_first_time) { - stat8 = sscanf(&proc[P_STAT].line[0][5], "%lld %lld %lld %lld %lld %lld %lld %lld", - &user, - &nice, - &sys, - &idle, - &iowait, - &hardirq, - &softirq, - &steal); - proc_cpu_first_time = 0; - } - user = nice = sys = idle = iowait = hardirq = softirq = steal = 0; - if(stat8 == 8) { - sscanf(&proc[P_STAT].line[0][5], "%lld %lld %lld %lld %lld %lld %lld %lld", - &user, - &nice, - &sys, - &idle, - &iowait, - &hardirq, - &softirq, - &steal); - } else { /* stat 4 variables here as older Linux proc */ - sscanf(&proc[P_STAT].line[0][5], "%lld %lld %lld %lld", - &user, - &nice, - &sys, - &idle); - } - p->cpu_total.user = user + nice; - p->cpu_total.wait = iowait; /* in the case of 4 variables = 0 */ - p->cpu_total.sys = sys; - /* p->cpu_total.sys = sys + hardirq + softirq + steal;*/ - p->cpu_total.idle = idle; - - p->cpu_total.irq = hardirq; - p->cpu_total.softirq = softirq; - p->cpu_total.steal = steal; - p->cpu_total.nice = nice; -#ifdef DEBUG - if(debug)fprintf(stderr,"XX user=%lld wait=%lld sys=%lld idle=%lld\n", - p->cpu_total.user, - p->cpu_total.wait, - p->cpu_total.sys, - p->cpu_total.idle); -#endif /*DEBUG*/ - - for(i=0;i<cpus;i++ ) { - user = nice = sys = idle = iowait = hardirq = softirq = steal = 0; - if(stat8 == 8) { - sscanf(&proc[P_STAT].line[i+1][5], - "%lld %lld %lld %lld %lld %lld %lld %lld", - &user, - &nice, - &sys, - &idle, - &iowait, - &hardirq, - &softirq, - &steal); - } else { - sscanf(&proc[P_STAT].line[i+1][5], "%lld %lld %lld %lld", - &user, - &nice, - &sys, - &idle); - } - p->cpuN[i].user = user + nice; - p->cpuN[i].wait = iowait; - p->cpuN[i].sys = sys; - /*p->cpuN[i].sys = sys + hardirq + softirq + steal;*/ - p->cpuN[i].idle = idle; - - p->cpuN[i].irq = hardirq; - p->cpuN[i].softirq = softirq; - p->cpuN[i].steal = steal; - p->cpuN[i].nice = nice; - } - - if(intr_line == 0) { - if(proc[P_STAT].line[i+1][0] == 'p' && - proc[P_STAT].line[i+1][1] == 'a' && - proc[P_STAT].line[i+1][2] == 'g' && - proc[P_STAT].line[i+1][3] == 'e' ) { - /* 2.4 kernel */ - intr_line = i+3; - ctxt_line = i+5; - btime_line= i+6; - proc_line = i+7; - run_line = i+8; - block_line= i+9; - }else { - /* 2.6 kernel */ - intr_line = i+1; - ctxt_line = i+2; - btime_line= i+3; - proc_line = i+4; - run_line = i+5; - block_line= i+6; - } - } - p->cpu_total.intr = -1; - p->cpu_total.ctxt = -1; - p->cpu_total.btime = -1; - p->cpu_total.procs = -1; - p->cpu_total.running = -1; - p->cpu_total.blocked = -1; - if(proc[P_STAT].lines >= intr_line) - sscanf(&proc[P_STAT].line[intr_line][0], "intr %lld", &p->cpu_total.intr); - if(proc[P_STAT].lines >= ctxt_line) - sscanf(&proc[P_STAT].line[ctxt_line][0], "ctxt %lld", &p->cpu_total.ctxt); - if(proc[P_STAT].lines >= btime_line) - sscanf(&proc[P_STAT].line[btime_line][0], "btime %lld", &p->cpu_total.btime); - if(proc[P_STAT].lines >= proc_line) - sscanf(&proc[P_STAT].line[proc_line][0], "processes %lld", &p->cpu_total.procs); - if(proc[P_STAT].lines >= run_line) - sscanf(&proc[P_STAT].line[run_line][0], "procs_running %lld", &p->cpu_total.running); - if(proc[P_STAT].lines >= block_line) - sscanf(&proc[P_STAT].line[block_line][0], "procs_blocked %lld", &p->cpu_total.blocked); -} - -void proc_nfs() -{ -int i; -int j; - if(proc[P_NFS].fp != 0) { - /* line readers "proc2 18 num num etc" */ - for(j=0,i=8;i<strlen(proc[P_NFS].line[2]);i++) { - if(proc[P_NFS].line[2][i] == ' ') { - p->nfs.v2c[j] =atol(&proc[P_NFS].line[2][i+1]); - j++; - } - } - /* line readers "proc3 22 num num etc" */ - for(j=0,i=8;i<strlen(proc[P_NFS].line[3]);i++) { - if(proc[P_NFS].line[3][i] == ' ') { - p->nfs.v3c[j] =atol(&proc[P_NFS].line[3][i+1]); - j++; - } - } - } - /* line readers "proc2 18 num num etc" */ - if(proc[P_NFSD].fp != 0) { - for(j=0,i=8;i<strlen(proc[P_NFSD].line[7]);i++) { - if(proc[P_NFSD].line[2][i] == ' ') { - p->nfs.v2s[j] =atol(&proc[P_NFSD].line[2][i+1]); - j++; - } - } - /* line readers "proc3 22 num num etc" */ - for(j=0,i=8;i<strlen(proc[P_NFSD].line[8]);i++) { - if(proc[P_NFS].line[3][i] == ' ') { - p->nfs.v3s[j] =atol(&proc[P_NFSD].line[3][i+1]); - j++; - } - } - } -} - -void proc_kernel() -{ -int i; - p->cpu_total.uptime=0.0; - p->cpu_total.idletime=0.0; - p->cpu_total.uptime=atof(proc[P_UPTIME].line[0]); - for(i=0;i<strlen(proc[P_UPTIME].line[0]);i++) { - if(proc[P_UPTIME].line[0][i] == ' ') { - p->cpu_total.idletime=atof(&proc[P_UPTIME].line[0][i+1]); - break; - } - } - - sscanf(&proc[P_LOADAVG].line[0][0], "%f %f %f", - &p->cpu_total.mins1, - &p->cpu_total.mins5, - &p->cpu_total.mins15); - -} - -char *proc_find_sb(char * p) -{ - for(; *p != 0;p++) - if(*p == ' ' && *(p+1) == '(') - return p; - return 0; -} - -#define DISK_MODE_IO 1 -#define DISK_MODE_DISKSTATS 2 -#define DISK_MODE_PARTITIONS 3 - -int disk_mode = 0; - -void proc_disk_io(double elapsed) -{ -int diskline; -int i; -int ret; -char *str; -int fudged_busy; - - disks = 0; - for(diskline=0;diskline<proc[P_STAT].lines;diskline++) { - if(strncmp("disk_io", proc[P_STAT].line[diskline],7) == 0) - break; - } - for(i=8;i<strlen(proc[P_STAT].line[diskline]);i++) { - if( proc[P_STAT].line[diskline][i] == ':') - disks++; - } - - str=&proc[P_STAT].line[diskline][0]; - for(i=0;i<disks;i++) { - str=proc_find_sb(str); - if(str == 0) - break; - ret = sscanf(str, " (%d,%d):(%ld,%ld,%ld,%ld,%ld", - &p->dk[i].dk_major, - &p->dk[i].dk_minor, - &p->dk[i].dk_noinfo, - &p->dk[i].dk_reads, - &p->dk[i].dk_rkb, - &p->dk[i].dk_writes, - &p->dk[i].dk_wkb); - if(ret != 7) - exit(7); - p->dk[i].dk_xfers = p->dk[i].dk_noinfo; - /* blocks are 512 bytes*/ - p->dk[i].dk_rkb = p->dk[i].dk_rkb/2; - p->dk[i].dk_wkb = p->dk[i].dk_wkb/2; - - p->dk[i].dk_bsize = (p->dk[i].dk_rkb+p->dk[i].dk_wkb)/p->dk[i].dk_xfers*1024; - - /* assume a disk does 200 op per second */ - fudged_busy = (p->dk[i].dk_reads + p->dk[i].dk_writes)/2; - if(fudged_busy > 100*elapsed) - p->dk[i].dk_time += 100*elapsed; - p->dk[i].dk_time = fudged_busy; - - sprintf(p->dk[i].dk_name,"dev-%d-%d",p->dk[i].dk_major,p->dk[i].dk_minor); -/* fprintf(stderr,"disk=%d name=\"%s\" major=%d minor=%d\n", i,p->dk[i].dk_name, p->dk[i].dk_major,p->dk[i].dk_minor); */ - str++; - } -} - -void proc_diskstats(double elapsed) -{ -static FILE *fp = (FILE *)-1; -char buf[1024]; -int i; -int ret; - - if( fp == (FILE *)-1) { - if( (fp = fopen("/proc/diskstats","r")) == NULL) { - /* DEBUG if( (fp = fopen("diskstats","r")) == NULL) { */ - error("failed to open - /proc/diskstats"); - disks=0; - return; - } - } -/* - 2 0 fd0 1 0 2 13491 0 0 0 0 0 13491 13491 - 3 0 hda 41159 53633 1102978 620181 39342 67538 857108 4042631 0 289150 4668250 - 3 1 hda1 58209 58218 0 0 - 3 2 hda2 148 4794 10 20 - 3 3 hda3 65 520 0 0 - 3 4 hda4 35943 1036092 107136 857088 - 22 0 hdc 167 5394 22308 32250 0 0 0 0 0 22671 32250 <-- USB !! - 8 0 sda 990 2325 4764 6860 9 3 12 417 0 6003 7277 - 8 1 sda1 3264 4356 12 12 -*/ - for(i=0;i<DISKMAX;) { - if(fgets(buf,1024,fp) == NULL) - break; - /* zero the data ready for reading */ - p->dk[i].dk_major = - p->dk[i].dk_minor = - p->dk[i].dk_name[0] = - p->dk[i].dk_reads = - p->dk[i].dk_rmerge = - p->dk[i].dk_rkb = - p->dk[i].dk_rmsec = - p->dk[i].dk_writes = - p->dk[i].dk_wmerge = - p->dk[i].dk_wkb = - p->dk[i].dk_wmsec = - p->dk[i].dk_inflight = - p->dk[i].dk_time = - p->dk[i].dk_11 =0; - - ret = sscanf(&buf[0], "%d %d %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu", - &p->dk[i].dk_major, - &p->dk[i].dk_minor, - &p->dk[i].dk_name[0], - &p->dk[i].dk_reads, - &p->dk[i].dk_rmerge, - &p->dk[i].dk_rkb, - &p->dk[i].dk_rmsec, - &p->dk[i].dk_writes, - &p->dk[i].dk_wmerge, - &p->dk[i].dk_wkb, - &p->dk[i].dk_wmsec, - &p->dk[i].dk_inflight, - &p->dk[i].dk_time, - &p->dk[i].dk_11 ); - if(ret == 7) { /* suffle the data around due to missing columns for partitions */ - p->dk[i].dk_partition = 1; - p->dk[i].dk_wkb = p->dk[i].dk_rmsec; - p->dk[i].dk_writes = p->dk[i].dk_rkb; - p->dk[i].dk_rkb = p->dk[i].dk_rmerge; - p->dk[i].dk_rmsec=0; - p->dk[i].dk_rmerge=0; - - } - else if(ret == 14) p->dk[i].dk_partition = 0; - else fprintf(stderr,"disk sscanf wanted 14 but returned=%d line=%s\n", - ret,buf); - - p->dk[i].dk_rkb /= 2; /* sectors = 512 bytes */ - p->dk[i].dk_wkb /= 2; - /*p->dk[i].dk_xfers = p->dk[i].dk_rkb + p->dk[i].dk_wkb;*/ - p->dk[i].dk_xfers = p->dk[i].dk_reads + p->dk[i].dk_writes; - if(p->dk[i].dk_xfers == 0) - p->dk[i].dk_bsize = 0; - else - p->dk[i].dk_bsize = (p->dk[i].dk_rkb+p->dk[i].dk_wkb)/p->dk[i].dk_xfers*1024; - - p->dk[i].dk_time /= 10.0; /* in milli-seconds to make it upto 100%, 1000/100 = 10 */ - - if(p->dk[i].dk_reads != 0 || p->dk[i].dk_writes != 0) - i++; - } - if(reread) { - fclose(fp); - fp = (FILE *)-1; - } else rewind(fp); - disks = i; -} - -void strip_spaces(char *s) -{ -char *p; -int spaced=1; - - p=s; - for(p=s;*p!=0;p++) { - if(*p == ':') - *p=' '; - if(*p != ' ') { - *s=*p; - s++; - spaced=0; - } else if(spaced) { - /* do no thing as this is second space */ - } else { - *s=*p; - s++; - spaced=1; - } - - } - *s = 0; -} - -void proc_partitions(double elapsed) -{ -static FILE *fp = (FILE *)-1; -char buf[1024]; -int i = 0; -int ret; - - if( fp == (FILE *)-1) { - if( (fp = fopen("/proc/partitions","r")) == NULL) { - error("failed to open - /proc/partitions"); - partitions=0; - return; - } - } - if(fgets(buf,1024,fp) == NULL) goto end; /* throw away the header lines */ - if(fgets(buf,1024,fp) == NULL) goto end; -/* -major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq - - 33 0 1052352 hde 2855 15 2890 4760 0 0 0 0 -4 7902400 11345292 - 33 1 1050304 hde1 2850 0 2850 3930 0 0 0 0 0 3930 3930 - 3 0 39070080 hda 9287 19942 226517 90620 8434 25707 235554 425790 -12 7954830 33997658 - 3 1 31744408 hda1 651 90 5297 2030 0 0 0 0 0 2030 2030 - 3 2 6138720 hda2 7808 19561 218922 79430 7299 20529 222872 241980 0 59950 321410 - 3 3 771120 hda3 13 41 168 80 0 0 0 0 0 80 80 - 3 4 1 hda4 0 0 0 0 0 0 0 0 0 0 0 - 3 5 408208 hda5 812 241 2106 9040 1135 5178 12682 183810 0 11230 192850 -*/ - for(i=0;i<DISKMAX;i++) { - if(fgets(buf,1024,fp) == NULL) - break; - strip_spaces(buf); - ret = sscanf(&buf[0], "%d %d %lu %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu", - &p->dk[i].dk_major, - &p->dk[i].dk_minor, - &p->dk[i].dk_blocks, - (char *)&p->dk[i].dk_name, - &p->dk[i].dk_reads, - &p->dk[i].dk_rmerge, - &p->dk[i].dk_rkb, - &p->dk[i].dk_rmsec, - &p->dk[i].dk_writes, - &p->dk[i].dk_wmerge, - &p->dk[i].dk_wkb, - &p->dk[i].dk_wmsec, - &p->dk[i].dk_inflight, - &p->dk[i].dk_use, - &p->dk[i].dk_aveq - ); - p->dk[i].dk_rkb /= 2; /* sectors = 512 bytes */ - p->dk[i].dk_wkb /= 2; - p->dk[i].dk_xfers = p->dk[i].dk_rkb + p->dk[i].dk_wkb; - if(p->dk[i].dk_xfers == 0) - p->dk[i].dk_bsize = 0; - else - p->dk[i].dk_bsize = (p->dk[i].dk_rkb+p->dk[i].dk_wkb)/p->dk[i].dk_xfers*1024; - - p->dk[i].dk_time /= 10.0; /* in milli-seconds to make it upto 100%, 1000/100 = 10 */ - - if(ret != 15) { -#ifdef DEBUG - if(debug)fprintf(stderr,"sscanf wanted 15 returned = %d line=%s\n", ret,buf); -#endif /*DEBUG*/ - partitions_short = 1; - } else partitions_short = 0; - } - end: - if(reread) { - fclose(fp); - fp = (FILE *)-1; - } else rewind(fp); - disks = i; -} - -void proc_disk(double elapsed) -{ -struct stat buf; -int ret; - if(disk_mode == 0) { - ret = stat("/proc/diskstats", &buf); - if(ret == 0) { - disk_mode=DISK_MODE_DISKSTATS; - } else { - ret = stat("/proc/partitions", &buf); - if(ret == 0) { - disk_mode=DISK_MODE_PARTITIONS; - } else { - disk_mode=DISK_MODE_IO; - } - } - } - switch(disk_mode){ - case DISK_MODE_IO: proc_disk_io(elapsed); break; - case DISK_MODE_DISKSTATS: proc_diskstats(elapsed); break; - case DISK_MODE_PARTITIONS: proc_partitions(elapsed); break; - } -} -#undef isdigit -#define isdigit(ch) ( ( '0' <= (ch) && (ch) >= '9')? 0: 1 ) - -long proc_mem_search( char *s) -{ -int i; -int j; -int len; - len=strlen(s); - for(i=0;i<proc[P_MEMINFO].lines;i++ ) { - if( !strncmp(s, proc[P_MEMINFO].line[i],len) ) { - for(j=len; - !isdigit(proc[P_MEMINFO].line[i][j]) && - proc[P_MEMINFO].line[i][j] != 0; - j++) - /* do nothing */ ; - return atol( &proc[P_MEMINFO].line[i][j]); - } - } - return -1; -} - -void proc_mem() -{ - p->mem.memtotal = proc_mem_search("MemTotal"); - p->mem.memfree = proc_mem_search("MemFree"); - p->mem.memshared = proc_mem_search("MemShared"); - p->mem.buffers = proc_mem_search("Buffers"); - p->mem.cached = proc_mem_search("Cached"); - p->mem.swapcached = proc_mem_search("SwapCached"); - p->mem.active = proc_mem_search("Active"); - p->mem.inactive = proc_mem_search("Inactive"); - p->mem.hightotal = proc_mem_search("HighTotal"); - p->mem.highfree = proc_mem_search("HighFree"); - p->mem.lowtotal = proc_mem_search("LowTotal"); - p->mem.lowfree = proc_mem_search("LowFree"); - p->mem.swaptotal = proc_mem_search("SwapTotal"); - p->mem.swapfree = proc_mem_search("SwapFree"); -#ifdef LARGEMEM - p->mem.dirty = proc_mem_search("Dirty"); - p->mem.writeback = proc_mem_search("Writeback"); - p->mem.mapped = proc_mem_search("Mapped"); - p->mem.slab = proc_mem_search("Slab"); - p->mem.committed_as = proc_mem_search("Committed_AS"); - p->mem.pagetables = proc_mem_search("PageTables"); - p->mem.hugetotal = proc_mem_search("HugePages_Total"); - p->mem.hugefree = proc_mem_search("HugePages_Free"); - p->mem.hugesize = proc_mem_search("Hugepagesize"); -#else - p->mem.bigfree = proc_mem_search("BigFree"); -#endif /*LARGEMEM*/ -} - -#define MAX_SNAPS 72 -#define MAX_SNAP_ROWS 20 -#define SNAP_OFFSET 6 - -int next_cpu_snap = 0; -int cpu_snap_all = 0; - -struct { - double user; - double kernel; - double iowait; - double idle; -} cpu_snap[MAX_SNAPS]; - -int snap_average() -{ -int i; -int end; -int total = 0; - - if(cpu_snap_all) - end = MAX_SNAPS; - else - end = next_cpu_snap; - - for(i=0;i<end;i++) { - total = total + cpu_snap[i].user + cpu_snap[i].kernel; - } - return (total / end) ; -} - -void snap_clear() -{ -int i; - for(i=0;i<MAX_SNAPS;i++) { - cpu_snap[i].user = 0; - cpu_snap[i].kernel = 0; - cpu_snap[i].iowait = 0; - cpu_snap[i].idle = 0; - } - next_cpu_snap=0; - cpu_snap_all=0; -} - -void plot_snap(WINDOW *pad) -{ -int i; -int j; - if (cursed) { - mvwprintw(pad,0, 0, " CPU +-------------------------------------------------------------------------+"); - mvwprintw(pad,1, 0,"100%%-|"); - mvwprintw(pad,2, 1, "95%%-|"); - mvwprintw(pad,3, 1, "90%%-|"); - mvwprintw(pad,4, 1, "85%%-|"); - mvwprintw(pad,5, 1, "80%%-|"); - mvwprintw(pad,6, 1, "75%%-|"); - mvwprintw(pad,7, 1, "70%%-|"); - mvwprintw(pad,8, 1, "65%%-|"); - mvwprintw(pad,9, 1, "60%%-|"); - mvwprintw(pad,10, 1, "55%%-|"); - mvwprintw(pad,11, 1, "50%%-|"); - mvwprintw(pad,12, 1, "45%%-|"); - mvwprintw(pad,13, 1, "40%%-|"); - mvwprintw(pad,14, 1, "35%%-|"); - mvwprintw(pad,15, 1, "30%%-|"); - mvwprintw(pad,16, 1, "25%%-|"); - mvwprintw(pad,17, 1, "20%%-|"); - mvwprintw(pad,18, 1,"15%%-|"); - mvwprintw(pad,19, 1,"10%%-|"); - mvwprintw(pad,20, 1," 5%%-|"); - - if (colour){ - mvwprintw(pad,21, 4, " +--------------------"); - COLOUR wattrset(pad, COLOR_PAIR(2)); - mvwprintw(pad,21, 26, "User%%"); - COLOUR wattrset(pad, COLOR_PAIR(0)); - mvwprintw(pad,21, 30, "---------"); - COLOUR wattrset(pad, COLOR_PAIR(1)); - mvwprintw(pad,21, 39, "System%%"); - COLOUR wattrset(pad, COLOR_PAIR(0)); - mvwprintw(pad,21, 45, "---------"); - COLOUR wattrset(pad, COLOR_PAIR(4)); - mvwprintw(pad,21, 54, "Wait%%"); - COLOUR wattrset(pad, COLOR_PAIR(0)); - mvwprintw(pad,21, 58, "---------------------+"); - } else { - mvwprintw(pad,21, 4, " +-------------------------------------------------------------------------+"); - } - - for (j = 0; j < MAX_SNAPS; j++) { - for (i = 0; i < MAX_SNAP_ROWS; i++) { - wmove(pad,MAX_SNAP_ROWS-i, j+SNAP_OFFSET); - if( (cpu_snap[j].user / 100 * MAX_SNAP_ROWS) > i+0.5) { - COLOUR wattrset(pad,COLOR_PAIR(9)); - wprintw(pad,"U"); - COLOUR wattrset(pad,COLOR_PAIR(0)); - } else if( (cpu_snap[j].user + cpu_snap[j].kernel )/ 100 * MAX_SNAP_ROWS > i+0.5) { - COLOUR wattrset(pad,COLOR_PAIR(8)); - wprintw(pad,"s"); - COLOUR wattrset(pad,COLOR_PAIR(0)); - } else if( (cpu_snap[j].user + cpu_snap[j].kernel +cpu_snap[j].iowait )/ 100 * MAX_SNAP_ROWS > i+0.5) { - COLOUR wattrset(pad,COLOR_PAIR(10)); - wprintw(pad,"w"); - COLOUR wattrset(pad,COLOR_PAIR(0)); - } else - wprintw(pad," "); - } - } - for (i = 0; i < MAX_SNAP_ROWS; i++) { - wmove(pad,MAX_SNAP_ROWS-i, next_cpu_snap+SNAP_OFFSET); - wprintw(pad,"|"); - } - wmove(pad,MAX_SNAP_ROWS+1 - (snap_average() /5), next_cpu_snap+SNAP_OFFSET); - wprintw(pad,"+"); - if(dotline) { - for (i = 0; i < MAX_SNAPS; i++) { - wmove(pad,MAX_SNAP_ROWS+1-dotline*2, i+SNAP_OFFSET); - wprintw(pad,"+"); - } - dotline = 0; - } - } -} - -/* This saves the CPU overall usage for later ploting on the screen */ -void plot_save(double user, double kernel, double iowait, double idle) -{ - cpu_snap[next_cpu_snap].user = user; - cpu_snap[next_cpu_snap].kernel = kernel; - cpu_snap[next_cpu_snap].iowait = iowait; - cpu_snap[next_cpu_snap].idle = idle; - next_cpu_snap++; - if(next_cpu_snap >= MAX_SNAPS) { - next_cpu_snap=0; - cpu_snap_all=1; - } -} - -/* This puts the CPU usage on the screen and draws the CPU graphs or outputs to the file */ - -void save_smp(WINDOW *pad, int cpu_no, int row, long user, long kernel, long iowait, long idle, long nice, long irq, long softirq, long steal) -{ -static int firsttime = 1; - if (cursed) { - mvwprintw(pad,row,0, "%02d usr=%4ld sys=%4ld wait=%4ld idle=%4ld steal=%2ld nice=%4ld irq=%2ld sirq=%2ld\n", - cpu_no, user, kernel, iowait, idle, steal, nice, irq, softirq, steal); - return; - } - if(firsttime) { - fprintf(fp,"CPUTICKS_ALL,AAA,user,sys,wait,idle,nice,irq,softirq,steal\n"); - fprintf(fp,"CPUTICKS%02d,AAA,user,sys,wait,idle,nice,irq,softirq,steal\n", cpu_no); - firsttime=0; - } - if(cpu_no==0) { - fprintf(fp,"CPUTICKS_ALL,%s,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld\n", - LOOP, user, kernel, iowait, idle, nice, irq, softirq, steal); - } else { - fprintf(fp,"CPUTICKS%02d,%s,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld\n", - cpu_no, LOOP, user, kernel, iowait, idle, nice, irq, softirq, steal); - } -} - -void plot_smp(WINDOW *pad, int cpu_no, int row, double user, double kernel, double iowait, double idle) -{ - int i; - int peak_col; - - if(show_rrd) return; - - if(cpu_peak[cpu_no] < (user + kernel + iowait) ) - cpu_peak[cpu_no] = (double)((int)user/2 + (int)kernel/2 + (int)iowait/2)*2.0; - - if (cursed) { - if(cpu_no == 0) - mvwprintw(pad,row, 0, "Avg"); - else - mvwprintw(pad,row, 0, "%2d", cpu_no); - mvwprintw(pad,row, 3, "%5.1lf", user); - mvwprintw(pad,row, 9, "%5.1lf", kernel); - mvwprintw(pad,row, 15, "%5.1lf", iowait); - mvwprintw(pad,row, 22, "%5.1lf", idle); - mvwprintw(pad,row, 27, "|"); - wmove(pad,row, 28); - for (i = 0; i < (int)(user / 2); i++){ - COLOUR wattrset(pad,COLOR_PAIR(9)); - wprintw(pad,"U"); - COLOUR wattrset(pad,COLOR_PAIR(0)); - } - for (i = 0; i < (int)(kernel / 2); i++){ - COLOUR wattrset(pad,COLOR_PAIR(8)); - wprintw(pad,"s"); - COLOUR wattrset(pad,COLOR_PAIR(0)); - } - for (i = 0; i < (int)(iowait / 2); i++) { - COLOUR wattrset(pad,COLOR_PAIR(10)); - wprintw(pad,"W"); - COLOUR wattrset(pad,COLOR_PAIR(0)); - } - for (i = 0; i < (int)(idle / 2); i++) - wprintw(pad," "); - mvwprintw(pad,row, 77, "|"); - - peak_col = 29 +(int)(cpu_peak[cpu_no]/2); - if(peak_col > 77) - peak_col=77; - mvwprintw(pad,row, peak_col, ">"); - } else { - /* Sanity check the numnbers */ - if( user < 0.0 || kernel < 0.0 || iowait < 0.0 || idle < 0.0 || idle >100.0) { - user = kernel = iowait = idle = 0; - } - - if(cpu_no == 0) - fprintf(fp,"CPU_ALL,%s,%.1lf,%.1lf,%.1lf,%.1lf,,%d\n", LOOP, - user, kernel, iowait, idle,cpus); - else { - fprintf(fp,"CPU%02d,%s,%.1lf,%.1lf,%.1lf,%.1lf\n", cpu_no, LOOP, - user, kernel, iowait, idle); - } - } -} -/* Added variable to remember started children - * 0 - start - * 1 - snap - * 2 - end -*/ -#define CHLD_START 0 -#define CHLD_SNAP 1 -#define CHLD_END 2 -int nmon_children[3] = {-1,-1,-1}; - -void init_pairs() -{ - COLOUR init_pair((short)0,(short)7,(short)0); /* White */ - COLOUR init_pair((short)1,(short)1,(short)0); /* Red */ - COLOUR init_pair((short)2,(short)2,(short)0); /* Green */ - COLOUR init_pair((short)3,(short)3,(short)0); /* Yellow */ - COLOUR init_pair((short)4,(short)4,(short)0); /* Blue */ - COLOUR init_pair((short)5,(short)5,(short)0); /* Magenta */ - COLOUR init_pair((short)6,(short)6,(short)0); /* Cyan */ - COLOUR init_pair((short)7,(short)7,(short)0); /* White */ - COLOUR init_pair((short)8,(short)0,(short)1); /* Red background, red text */ - COLOUR init_pair((short)9,(short)0,(short)2); /* Green background, green text */ - COLOUR init_pair((short)10,(short)0,(short)4); /* Blue background, blue text */ - COLOUR init_pair((short)11,(short)0,(short)3); /* Yellow background, yellow text */ - COLOUR init_pair((short)12,(short)0,(short)6); /* Cyan background, cyan text */ -} - -/* Signal handler - * SIGUSR1 or 2 is used to stop nmon cleanly - * SIGWINCH is used when the window size is changed - */ -void interrupt(int signum) -{ -int child_pid; -int waitstatus; - if (signum == SIGCHLD ) { - while((child_pid = waitpid(0, &waitstatus, 0)) == -1 ) { - if( errno == EINTR) /* retry */ - continue; - return; /* ECHLD, EFAULT */ - } - if(child_pid == nmon_children[CHLD_SNAP]) - nmon_children[CHLD_SNAP] = -1; - signal(SIGCHLD, interrupt); - return; - } - if (signum == SIGUSR1 || signum == SIGUSR2) { - maxloops = loop; - return; - } - if (signum == SIGWINCH) { - CURSE endwin(); /* stop + start curses so it works out the # of row and cols */ - CURSE initscr(); - CURSE cbreak(); - signal(SIGWINCH, interrupt); - COLOUR colour = has_colors(); - COLOUR start_color(); - COLOUR init_pairs(); - CURSE clear(); - return; - } - CURSE endwin(); - exit(0); -} - - -/* only place the q=previous and p=currect pointers are modified */ -void switcher(void) -{ - static int which = 1; - - if (which) { - p = &database[0]; - q = &database[1]; - which = 0; - } else { - p = &database[1]; - q = &database[0]; - which = 1; - } - if(flash_on) - flash_on = 0; - else - flash_on = 1; -} - - -/* Lookup the right string */ -char *status(int n) -{ - switch (n) { - case 0: - return "Run "; - default: - return "Sleep"; - } -} - -/* Lookup the right process state string */ -char *get_state( char n) -{ - static char duff[64]; - switch (n) { - case 'R': return "Running "; - case 'S': return "Sleeping "; - case 'D': return "DiskSleep"; - case 'Z': return "Zombie "; - case 'T': return "Traced "; - case 'W': return "Paging "; - default: - sprintf(duff, "%d", n); - return duff; - } -} - -#ifdef GETUSER -/* Convert User id (UID) to a name with caching for speed - * getpwuid() should be NFS/yellow pages safe - */ -char *getuser(uid_t uid) -{ -#define NAMESIZE 16 - struct user_info { - uid_t uid; - char name[NAMESIZE]; - }; - static struct user_info *u = NULL; - static int used = 0; - int i; - struct passwd *pw; - - i = 0; - if (u != NULL) { - for (i = 0; i < used; i++) { - if (u[i].uid == uid) { - return u[i].name; - } - } - u = (struct user_info *)realloc(u, (sizeof(struct user_info ) * (i + 1))); - } else - u = (struct user_info *)malloc(sizeof(struct user_info )); - used++; - - /* failed to find a match so add it */ - u[i].uid = uid; - pw = getpwuid(uid); - - if (pw != NULL) - strncpy(u[i].name, pw->pw_name, NAMESIZE); - else - sprintf(u[i].name, "unknown%d",uid); - return u[i].name; -} -#endif /* GETUSER */ - -/* User Defined Disk Groups */ - -char *save_word(char *in, char *out) -{ - int len; - int i; - len = strlen(in); - out[0] = 0; - for (i = 0; i < len; i++) { - if ( isalnum(in[i]) || in[i] == '_' || in[i] == '-' || in[i] == '/' ) { - out[i] = in[i]; - out[i+1] = 0; - } else - break; - } - for (; i < len; i++) - if (isalnum(in[i])) - return &in[i]; - return &in[i]; -} - -#define DGROUPS 64 -#define DGROUPITEMS 512 - -char *dgroup_filename; -char *dgroup_name[DGROUPS]; -int *dgroup_data; -int dgroup_disks[DGROUPS]; -int dgroup_total_disks; -int dgroup_total_groups; - -void load_dgroup(struct dsk_stat *dk) -{ - FILE * gp; - char line[4096]; - char name[1024]; - int i, j; - char *nextp; - - if (dgroup_loaded == 2) - return; - dgroup_data = MALLOC(sizeof(int)*DGROUPS * DGROUPITEMS); - for (i = 0; i < DGROUPS; i++) - for (j = 0; j < DGROUPITEMS; j++) - dgroup_data[i*DGROUPITEMS+j] = -1; - - gp = fopen(dgroup_filename, "r"); - - if (gp == NULL) { - perror("opening disk group file"); - fprintf(stderr,"ERROR: failed to open %s\n", dgroup_filename); - exit(9); - } - - for (dgroup_total_groups = 0; - fgets(line, 4096-1, gp) != NULL && dgroup_total_groups < DGROUPS; - dgroup_total_groups++) { - /* save the name */ - nextp = save_word(line, name); - if(strlen(name) == 0) { /* was a blank line */ - fprintf(stderr,"ERROR nmon:ignoring odd line in diskgroup file \"%s\"\n",line); - /* Decrement dgroup_total_groups by 1 to correct index for next loop */ - --dgroup_total_groups; - continue; - } - /* Added +1 to be able to correctly store the terminating \0 character */ - dgroup_name[dgroup_total_groups] = MALLOC(strlen(name)+1); - strcpy(dgroup_name[dgroup_total_groups], name); - - /* save the hdisks */ - for (i = 0; i < DGROUPITEMS && *nextp != 0; i++) { - nextp = save_word(nextp, name); - for (j = 0; j < disks; j++) { - if ( (strlen(dk[j].dk_name) == strlen(name)) && !strcmp(dk[j].dk_name, name) ) { - /*DEBUG printf("DGadd group=%s,name=%s,disk=%s,dgroup_total_groups=%d,dgroup_total_disks=%d,j=%d,i=%d,index=%d.\n", - dgroup_name[dgroup_total_groups], - name, dk[j].dk_name, dgroup_total_groups, dgroup_total_disks, j, i,dgroup_total_groups*DGROUPITEMS+i); - */ - dgroup_data[dgroup_total_groups*DGROUPITEMS+i] = j; - dgroup_disks[dgroup_total_groups]++; - dgroup_total_disks++; - break; - } - } - if (j == disks) - fprintf(stderr,"ERROR nmon:diskgroup file - failed to find disk=%s for group=%s disks know=%d\n", - name, dgroup_name[dgroup_total_groups],disks); - } - } - fclose(gp); - dgroup_loaded = 2; -} - - -void list_dgroup(struct dsk_stat *dk) -{ - int i, j, k, n; - int first = 1; - - /* DEBUG for (n = 0, i = 0; i < dgroup_total_groups; i++) { - fprintf(fp, "CCCG,%03d,%s", n++, dgroup_name[i]); - for (j = 0; j < dgroup_disks[i]; j++) { - if (dgroup_data[i*DGROUPITEMS+j] != -1) { - fprintf(fp, ",%d=%d", j, dgroup_data[i*DGROUPITEMS+j]); - } - } - fprintf(fp, "\n"); - } - */ - for (n = 0, i = 0; i < dgroup_total_groups; i++) { - if (first) { - fprintf(fp, "BBBG,%03d,User Defined Disk Groups Name,Disks\n", n++); - first = 0; - } - fprintf(fp, "BBBG,%03d,%s", n++, dgroup_name[i]); - for (k = 0, j = 0; j < dgroup_disks[i]; j++) { - if (dgroup_data[i*DGROUPITEMS+j] != -1) { - fprintf(fp, ",%s", dk[dgroup_data[i*DGROUPITEMS+j]].dk_name); - k++; - } - /* add extra line if we have lots to stop spreadsheet line width problems */ - if (k == 128) { - fprintf(fp, "\nBBBG,%03d,%s continued", n++, dgroup_name[i]); - } - } - fprintf(fp, "\n"); - } - fprintf(fp, "DGBUSY,Disk Group Busy %s", hostname); - for (i = 0; i < DGROUPS; i++) { - if (dgroup_name[i] != 0) - fprintf(fp, ",%s", dgroup_name[i]); - } - fprintf(fp, "\n"); - fprintf(fp, "DGREAD,Disk Group Read KB/s %s", hostname); - for (i = 0; i < DGROUPS; i++) { - if (dgroup_name[i] != 0) - fprintf(fp, ",%s", dgroup_name[i]); - } - fprintf(fp, "\n"); - fprintf(fp, "DGWRITE,Disk Group Write KB/s %s", hostname); - for (i = 0; i < DGROUPS; i++) { - if (dgroup_name[i] != 0) - fprintf(fp, ",%s", dgroup_name[i]); - } - fprintf(fp, "\n"); - fprintf(fp, "DGSIZE,Disk Group Block Size KB %s", hostname); - for (i = 0; i < DGROUPS; i++) { - if (dgroup_name[i] != 0) - fprintf(fp, ",%s", dgroup_name[i]); - } - fprintf(fp, "\n"); - fprintf(fp, "DGXFER,Disk Group Transfers/s %s", hostname); - for (i = 0; i < DGROUPS; i++) { - if (dgroup_name[i] != 0) - fprintf(fp, ",%s", dgroup_name[i]); - } - fprintf(fp, "\n"); -} - - - -void hint(void) -{ - printf("\nHint: %s [-h] [-s <seconds>] [-c <count>] [-f -d <disks> -t -r <name>] [-x]\n\n", progname); - printf("\t-h FULL help information\n"); - printf("\tInteractive-Mode:\n"); - printf("\tread startup banner and type: \"h\" once it is running\n"); - printf("\tFor Data-Collect-Mode (-f)\n"); - printf("\t-f spreadsheet output format [note: default -s300 -c288]\n"); - printf("\toptional\n"); - printf("\t-s <seconds> between refreshing the screen [default 2]\n"); - printf("\t-c <number> of refreshes [default millions]\n"); - printf("\t-d <disks> to increase the number of disks [default 256]\n"); - printf("\t-t spreadsheet includes top processes\n"); - printf("\t-x capacity planning (15 min for 1 day = -fdt -s 900 -c 96)\n"); - printf("\n"); -} - -void help(void) -{ - hint(); - printf("Version - %s\n\n",SccsId); - printf("For Interactive-Mode\n"); - printf("\t-s <seconds> time between refreshing the screen [default 2]\n"); - printf("\t-c <number> of refreshes [default millions]\n"); - printf("\t-g <filename> User Defined Disk Groups [hit g to show them]\n"); - printf("\t - file = on each line: group_name <disks list> space separated\n"); - printf("\t - like: database sdb sdc sdd sde\n"); - printf("\t - upto 64 disk groups, 512 disks per line\n"); - printf("\t - disks can appear more than once and in many groups\n"); - printf("\t-b black and white [default is colour]\n"); - printf("\texample: %s -s 1 -c 100\n",progname); - printf("\n"); - printf("For Data-Collect-Mode = spreadsheet format (comma separated values)\n"); - printf("\tNote: use only one of f,F,z,x or X and make it the first argument\n"); - printf("\t-f spreadsheet output format [note: default -s300 -c288]\n"); - printf("\t\t\t output file is <hostname>_YYYYMMDD_HHMM.nmon\n"); - printf("\t-F <filename> same as -f but user supplied filename\n"); - printf("\t-r <runname> used in the spreadsheet file [default hostname]\n"); - printf("\t-t include top processes in the output\n"); - printf("\t-T as -t plus saves command line arguments in UARG section\n"); - printf("\t-s <seconds> between snap shots\n"); - printf("\t-c <number> of snapshots before nmon stops\n"); - printf("\t-d <disks> to increase the number of disks [default 256]\n"); - printf("\t-l <dpl> disks/line default 150 to avoid spreadsheet issues. EMC=64.\n"); - printf("\t-g <filename> User Defined Disk Groups (see above) - see BBBG & DG lines\n"); - - printf("\t-N include NFS Network File System\n"); - printf("\t-I <percent> Include process & disks busy threshold (default 0.1)\n"); - printf("\t don't save or show proc/disk using less than this percent\n"); - printf("\t-m <directory> nmon changes to this directory before saving to file\n"); - printf("\texample: collect for 1 hour at 30 second intervals with top procs\n"); - printf("\t\t %s -f -t -r Test1 -s30 -c120\n",progname); - printf("\n"); - printf("\tTo load into a spreadsheet:\n"); - printf("\tsort -A *nmon >stats.csv\n"); - printf("\ttransfer the stats.csv file to your PC\n"); - printf("\tStart spreadsheet & then Open type=comma-separated-value ASCII file\n"); - printf("\t The nmon analyser or consolidator does not need the file sorted.\n"); - printf("\n"); - printf("Capacity planning mode - use cron to run each day\n"); - printf("\t-x sensible spreadsheet output for CP = one day\n"); - printf("\t every 15 mins for 1 day ( i.e. -ft -s 900 -c 96)\n"); - printf("\t-X sensible spreadsheet output for CP = busy hour\n"); - printf("\t every 30 secs for 1 hour ( i.e. -ft -s 30 -c 120)\n"); - printf("\n"); - - printf("Interactive Mode Commands\n"); - printf("\tkey --- Toggles to control what is displayed ---\n"); - printf("\th = Online help information\n"); - printf("\tr = Machine type, machine name, cache details and OS version + LPAR\n"); - printf("\tc = CPU by processor stats with bar graphs\n"); - printf("\tl = long term CPU (over 75 snapshots) with bar graphs\n"); - printf("\tm = Memory stats\n"); - printf("\tL = Huge memory page stats\n"); - printf("\tV = Virtual Memory and Swap stats\n"); - printf("\tk = Kernel Internal stats\n"); - printf("\tn = Network stats and errors\n"); - printf("\tN = NFS Network File System\n"); - printf("\td = Disk I/O Graphs\n"); - printf("\tD = Disk I/O Stats\n"); - printf("\to = Disk I/O Map (one character per disk showing how busy it is)\n"); - printf("\to = User Defined Disk Groups\n"); - printf("\tj = File Systems \n"); - printf("\tt = Top Process stats use 1,3,4,5 to select the data & order\n"); - printf("\tu = Top Process full command details\n"); - printf("\tv = Verbose mode - tries to make recommendations\n"); -#ifdef PARTITIONS - printf("\tP = Partitions Disk I/O Stats\n"); -#endif -#ifdef POWER - printf("\tp = Logical Partitions Stats\n"); -#endif - printf("\tb = black and white mode (or use -b option)\n"); - printf("\t. = minimum mode i.e. only busy disks and processes\n"); - printf("\n"); - printf("\tkey --- Other Controls ---\n"); - printf("\t+ = double the screen refresh time\n"); - printf("\t- = halves the screen refresh time\n"); - printf("\tq = quit (also x, e or control-C)\n"); - printf("\t0 = reset peak counts to zero (peak = \">\")\n"); - printf("\tspace = refresh screen now\n"); - printf("\n"); - printf("Startup Control\n"); - printf("\tIf you find you always type the same toggles every time you start\n"); - printf("\tthen place them in the NMON shell variable. For example:\n"); - printf("\t export NMON=cmdrvtan\n"); - - printf("\n"); - printf("Others:\n"); - printf("\ta) To you want to stop nmon - kill -USR2 <nmon-pid>\n"); - printf("\tb) Use -p and nmon outputs the background process pid\n"); - printf("\tc) To limit the processes nmon lists (online and to a file)\n"); - printf("\t Either set NMONCMD0 to NMONCMD63 to the program names\n"); - printf("\t or use -C cmd:cmd:cmd etc. example: -C ksh:vi:syncd\n"); - printf("\td) If you want to pipe nmon output to other commands use a FIFO:\n"); - printf("\t mkfifo /tmp/mypipe\n"); - printf("\t nmon -F /tmp/mypipe &\n"); - printf("\t grep /tmp/mypipe\n"); - printf("\te) If nmon fails please report it with:\n"); - printf("\t 1) nmon version like: %s\n",VERSION); - printf("\t 2) the output of cat /proc/cpuinfo\n"); - printf("\t 3) some clue of what you were doing\n"); - printf("\t 4) I may ask you to run the debug version\n"); - printf("\n"); - printf("\tDeveloper Nigel Griffiths\n"); - printf("\tFeedback welcome - on the current release only and state exactly the problem\n"); - printf("\tNo warranty given or implied.\n"); - exit(0); -} - -#define JFSMAX 128 -#define LOAD 1 -#define UNLOAD 0 -#define JFSNAMELEN 64 -#define JFSTYPELEN 8 - -struct jfs { - char name[JFSNAMELEN]; - char device[JFSNAMELEN]; - char type[JFSNAMELEN]; - int fd; - int mounted; - } jfs[JFSMAX]; - -int jfses =0; -void jfs_load(int load) -{ -int i; -struct stat stat_buffer; -FILE * mfp; /* FILE pointer for mtab file*/ -struct mntent *mp; /* mnt point stats */ -static int jfs_loaded = 0; - - if(load==LOAD) { - if(jfs_loaded == 0) { - mfp = setmntent("/etc/mtab","r"); - for(i=0; i<JFSMAX && (mp = getmntent(mfp) ) != NULL; i++) { - strncpy(jfs[i].device, mp->mnt_fsname,JFSNAMELEN); - strncpy(jfs[i].name,mp->mnt_dir,JFSNAMELEN); - strncpy(jfs[i].type, mp->mnt_type,JFSTYPELEN); - mp->mnt_fsname[JFSNAMELEN-1]=0; - mp->mnt_dir[JFSNAMELEN-1]=0; - mp->mnt_type[JFSTYPELEN-1]=0; - } - endfsent(); - jfs_loaded = 1; - jfses=i; - } - - /* 1st or later time - just reopen the mount points */ - for(i=0;i<JFSMAX && jfs[i].name[0] !=0;i++) { - if(stat(jfs[i].name, &stat_buffer) != -1 ) { - - jfs[i].fd = open(jfs[i].name, O_RDONLY); - if(jfs[i].fd != -1 ) - jfs[i].mounted = 1; - else - jfs[i].mounted = 0; - } - else jfs[i].mounted = 0; - } - } else { /* this is an unload request */ - if(jfs_loaded) - for(i=0;i<JFSMAX && jfs[i].name[0] != 0;i++) { - if(jfs[i].mounted) - close(jfs[i].fd); - jfs[i].fd=0; - } - else - /* do nothing */ ; - } -} - -/* We order this array rather than the actual process tables - * the index is the position in the process table and - * the time is the CPU used in the last period in seconds - */ -struct topper { - int index; - int other; - double size; - double io; - int time; -} *topper; -int topper_size = 200; - -/* Routine used by qsort to order the processes by CPU usage */ -int cpu_compare(const void *a, const void *b) -{ - return (int)(((struct topper *)b)->time - ((struct topper *)a)->time); -} - -int size_compare(const void *a, const void *b) -{ - return (int)((((struct topper *)b)->size - ((struct topper *)a)->size)); -} - -int disk_compare(void *a, void *b) -{ - return (int)((((struct topper *)b)->io - ((struct topper *)a)->io)); -} - - -/* checkinput is the subroutine to handle user input */ -int checkinput(void) -{ - static int use_env = 1; - char buf[1024]; - int bytes; - int chars; - int i; - char *p; - - if (!cursed) /* not user input so stop with control-C */ - return 0; - ioctl(fileno(stdin), FIONREAD, &bytes); - - if (bytes > 0 || use_env) { - if(use_env) { - use_env = 0; - p=getenv("NMON"); - if(p!=0){ - strcpy(buf,p); - chars = strlen(buf); - } - else chars = 0; - } - else - chars = read(fileno(stdin), buf, bytes); - if (chars > 0) { - welcome = 0; - for (i = 0; i < chars; i++) { - switch (buf[i]) { - case 'x': - case 'q': - nocbreak(); - endwin(); - exit(0); - - case '6': - case '7': - case '8': - case '9': - dotline = buf[i] - '0'; - break; - case '+': - seconds = seconds * 2; - break; - case '-': - seconds = seconds / 2; - if (seconds < 1) - seconds = 1; - break; - case '.': - if (show_all) - show_all = 0; - else { - show_all = 1; - show_disk = SHOW_DISK_STATS; - show_top = 1; - show_topmode =3; - } - clear(); - break; - case '?': - case 'h': - case 'H': - if (show_help) - show_help = 0; - else { - show_help = 1; - show_verbose = 0; - } - clear(); - break; - case 'b': - case 'B': - FLIP(colour); - clear(); - break; - case 'Z': - FLIP(show_raw); - show_smp=1; - clear(); - break; - case 'l': - FLIP (show_longterm); - clear(); - break; - case 'p': - FLIP(show_lpar); - clear(); - break; - case 'V': - FLIP(show_vm); - clear(); - break; - case 'j': - case 'J': - FLIP(show_jfs); - jfs_load(show_jfs); - clear(); - break; -#ifdef PARTITIONS - case 'P': - FLIP(show_partitions); - clear(); - break; -#endif /*PARTITIONS*/ - case 'k': - case 'K': - FLIP(show_kernel); - clear(); - break; - case 'm': - case 'M': - FLIP(show_memory); - clear(); - break; - case 'L': - FLIP(show_large); - clear(); - break; - case 'D': - switch (show_disk) { - case SHOW_DISK_NONE: - show_disk = SHOW_DISK_STATS; - break; - case SHOW_DISK_STATS: - show_disk = SHOW_DISK_NONE; - break; - case SHOW_DISK_GRAPH: - show_disk = SHOW_DISK_STATS; - break; - } - clear(); - break; - case 'd': - switch (show_disk) { - case SHOW_DISK_NONE: - show_disk = SHOW_DISK_GRAPH; - break; - case SHOW_DISK_STATS: - show_disk = SHOW_DISK_GRAPH; - break; - case SHOW_DISK_GRAPH: - show_disk = 0; - break; - } - clear(); - break; - case 'o': - case 'O': - FLIP(show_diskmap); - clear(); - break; - case 'n': - if (show_net) { - show_net = 0; - show_neterror = 0; - } else { - show_net = 1; - show_neterror = 3; - } - clear(); - break; - case 'N': - FLIP(show_nfs); - clear(); - break; - case 'c': - case 'C': - FLIP(show_smp); - clear(); - break; - case 'r': - case 'R': - FLIP(show_cpu); - clear(); - break; - case 't': - show_topmode = 3; /* Fall Through */ - case 'T': - FLIP(show_top); - clear(); - break; - case 'v': - FLIP(show_verbose); - clear(); - break; - case 'u': - if (show_args == ARGS_NONE) { - args_load(); - show_args = ARGS_ONLY; - show_top = 1; - if( show_topmode != 3 && - show_topmode != 4 && - show_topmode != 5 ) - show_topmode = 3; - } else - show_args = ARGS_NONE; - clear(); - break; - case '1': - show_topmode = 1; - show_top = 1; - clear(); - break; -/* - case '2': - show_topmode = 2; - show_top = 1; - clear(); - break; -*/ - case '3': - show_topmode = 3; - show_top = 1; - clear(); - break; - case '4': - show_topmode = 4; - show_top = 1; - clear(); - break; - case '5': - show_topmode = 5; - show_top = 1; - clear(); - break; - case '0': - for(i=0;i<max_cpus+1;i++) - cpu_peak[i]=0; - for(i=0;i<networks;i++) { - net_read_peak[i]=0.0; - net_write_peak[i]=0.0; - } - for(i=0;i<disks;i++) { - disk_busy_peak[i]=0.0; - disk_rate_peak[i]=0.0; - } - snap_clear(); - aiocount_max = 0; - aiotime_max = 0.0; - aiorunning_max = 0; - huge_peak = 0; - break; - case ' ': - clear(); - break; - case 'g': - FLIP(show_dgroup); - clear(); - break; - - default: return 0; - } - } - return 1; - } - } - return 0; -} - -void go_background(int def_loops, int def_secs) -{ - cursed = 0; - if (maxloops == -1) - maxloops = def_loops; - if (seconds == -1) - seconds = def_secs; - show_cpu = 1; - show_smp = 1; - show_disk = SHOW_DISK_STATS; - show_jfs = 1; - show_memory = 1; - show_large = 1; - show_kernel = 1; - show_net = 1; - show_all = 1; - show_top = 0; /* top process */ - show_topmode = 3; - show_partitions = 1; - show_lpar = 1; - show_vm = 1; -} - -void proc_net() -{ -static FILE *fp = (FILE *)-1; -char buf[1024]; -int i=0; -int ret; -unsigned long junk; - - if( fp == (FILE *)-1) { - if( (fp = fopen("/proc/net/dev","r")) == NULL) { - error("failed to open - /proc/net/dev"); - networks=0; - return; - } - } - if(fgets(buf,1024,fp) == NULL) goto end; /* throw away the header lines */ - if(fgets(buf,1024,fp) == NULL) goto end; /* throw away the header lines */ -/* -Inter-| Receive | Transmit - face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed - lo: 1956 30 0 0 0 0 0 0 1956 30 0 0 0 0 0 0 - eth0: 0 0 0 0 0 0 0 0 458718 0 781 0 0 0 781 0 - sit0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - eth1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -*/ - for(i=0;i<NETMAX;i++) { - if(fgets(buf,1024,fp) == NULL) - break; - strip_spaces(buf); - /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ - ret = sscanf(&buf[0], "%s %llu %llu %lu %lu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu", - (char *)&p->ifnets[i].if_name, - &p->ifnets[i].if_ibytes, - &p->ifnets[i].if_ipackets, - &p->ifnets[i].if_ierrs, - &p->ifnets[i].if_idrop, - &p->ifnets[i].if_ififo, - &p->ifnets[i].if_iframe, - &junk, - &junk, - &p->ifnets[i].if_obytes, - &p->ifnets[i].if_opackets, - &p->ifnets[i].if_oerrs, - &p->ifnets[i].if_odrop, - &p->ifnets[i].if_ofifo, - &p->ifnets[i].if_ocolls, - &p->ifnets[i].if_ocarrier - ); - if(ret != 16) - fprintf(stderr,"sscanf wanted 16 returned = %d line=%s\n", ret, (char *)buf); - } - end: - if(reread) { - fclose(fp); - fp = (FILE *)-1; - } else rewind(fp); - networks = i; -} - - -int proc_procsinfo(int pid, int index) -{ -FILE *fp; -char filename[64]; -char buf[1024*4]; -int size=0; -int ret=0; -int count=0; - - sprintf(filename,"/proc/%d/stat",pid); - if( (fp = fopen(filename,"r")) == NULL) { - sprintf(buf,"failed to open file %s",filename); - error(buf); - return 0; - } - size = fread(buf, 1, 1024-1, fp); - if(size == -1) { -#ifdef DEBUG - fprintf(stderr,"procsinfo read returned = %d assuming process stopped pid=%d\n", ret,pid); -#endif /*DEBUG*/ - return 0; - } - fclose(fp); - ret = sscanf(buf, "%d (%s)", - &p->procs[index].pi_pid, - &p->procs[index].pi_comm[0]); - if(ret != 2) { - fprintf(stderr,"procsinfo sscanf returned = %d line=%s\n", ret,buf); - return 0; - } - p->procs[index].pi_comm[strlen(p->procs[index].pi_comm)-1] = 0; - - for(count=0; count<size;count++) /* now look for ") " as dumb Infiniban driver includes "()" */ - if(buf[count] == ')' && buf[count+1] == ' ' ) break; - - if(count == size) { -#ifdef DEBUG - fprintf(stderr,"procsinfo failed to find end of command buf=%s\n", buf); -#endif /*DEBUG*/ - return 0; - } - count++; count++; - - ret = sscanf(&buf[count], -"%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %lu %lu %ld %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %d %d", - &p->procs[index].pi_state, - &p->procs[index].pi_ppid, - &p->procs[index].pi_pgrp, - &p->procs[index].pi_session, - &p->procs[index].pi_tty_nr, - &p->procs[index].pi_tty_pgrp, - &p->procs[index].pi_flags, - &p->procs[index].pi_minflt, - &p->procs[index].pi_cmin_flt, - &p->procs[index].pi_majflt, - &p->procs[index].pi_cmaj_flt, - &p->procs[index].pi_utime, - &p->procs[index].pi_stime, - &p->procs[index].pi_cutime, - &p->procs[index].pi_cstime, - &p->procs[index].pi_pri, - &p->procs[index].pi_nice, - &p->procs[index].junk, - &p->procs[index].pi_it_real_value, - &p->procs[index].pi_start_time, - &p->procs[index].pi_vsize, - &p->procs[index].pi_rss, - &p->procs[index].pi_rlim_cur, - &p->procs[index].pi_start_code, - &p->procs[index].pi_end_code, - &p->procs[index].pi_start_stack, - &p->procs[index].pi_esp, - &p->procs[index].pi_eip, - &p->procs[index].pi_pending_signal, - &p->procs[index].pi_blocked_sig, - &p->procs[index].pi_sigign, - &p->procs[index].pi_sigcatch, - &p->procs[index].pi_wchan, - &p->procs[index].pi_nswap, - &p->procs[index].pi_cnswap, - &p->procs[index].pi_exit_signal, - &p->procs[index].pi_cpu - ); - if(ret != 37) { - fprintf(stderr,"procsinfo2 sscanf wanted 37 returned = %d pid=%d line=%s\n", ret,pid,buf); - return 0; - } - - sprintf(filename,"/proc/%d/statm",pid); - if( (fp = fopen(filename,"r")) == NULL) { - sprintf(buf,"failed to open file %s",filename); - error(buf); - return 0; - } - size = fread(buf, 1, 1024*4-1, fp); - if(size == -1) { - sprintf(buf,"failed to read file %s",filename); - error(buf); - return 0; - } - fclose(fp); - - ret = sscanf(&buf[0], "%lu %lu %lu %lu %lu %lu %lu", - &p->procs[index].statm_size, - &p->procs[index].statm_resident, - &p->procs[index].statm_share, - &p->procs[index].statm_trs, - &p->procs[index].statm_drs, - &p->procs[index].statm_lrs, - &p->procs[index].statm_dt - ); - if(ret != 7) { - fprintf(stderr,"sscanf wanted 7 returned = %d line=%s\n", ret,buf); - return 0; - } - return 1; -} -#ifdef DEBUGPROC -print_procs(int index) -{ -printf("procs[%d].pid =%d\n",index,procs[index].pi_pid); -printf("procs[%d].comm[0] =%s\n",index,&procs[index].pi_comm[0]); -printf("procs[%d].state =%c\n",index,procs[index].pi_state); -printf("procs[%d].ppid =%d\n",index,procs[index].pi_ppid); -printf("procs[%d].pgrp =%d\n",index,procs[index].pi_pgrp); -printf("procs[%d].session =%d\n",index,procs[index].pi_session); -printf("procs[%d].tty_nr =%d\n",index,procs[index].pi_tty_nr); -printf("procs[%d].tty_pgrp =%d\n",index,procs[index].pi_tty_pgrp); -printf("procs[%d].flags =%lu\n",index,procs[index].pi_flags); -printf("procs[%d].minflt =%lu\n",index,procs[index].pi_minflt); -printf("procs[%d].cmin_flt =%lu\n",index,procs[index].pi_cmin_flt); -printf("procs[%d].majflt =%lu\n",index,procs[index].pi_majflt); -printf("procs[%d].cmaj_flt =%lu\n",index,procs[index].pi_cmaj_flt); -printf("procs[%d].utime =%lu\n",index,procs[index].pi_utime); -printf("procs[%d].stime =%lu\n",index,procs[index].pi_stime); -printf("procs[%d].cutime =%ld\n",index,procs[index].pi_cutime); -printf("procs[%d].cstime =%ld\n",index,procs[index].pi_cstime); -printf("procs[%d].pri =%d\n",index,procs[index].pi_pri); -printf("procs[%d].nice =%d\n",index,procs[index].pi_nice); -printf("procs[%d].junk =%d\n",index,procs[index].junk); -printf("procs[%d].it_real_value =%lu\n",index,procs[index].pi_it_real_value); -printf("procs[%d].start_time =%lu\n",index,procs[index].pi_start_time); -printf("procs[%d].vsize =%lu\n",index,procs[index].pi_vsize); -printf("procs[%d].rss =%lu\n",index,procs[index].pi_rss); -printf("procs[%d].rlim_cur =%lu\n",index,procs[index].pi_rlim_cur); -printf("procs[%d].start_code =%lu\n",index,procs[index].pi_start_code); -printf("procs[%d].end_code =%lu\n",index,procs[index].pi_end_code); -printf("procs[%d].start_stack =%lu\n",index,procs[index].pi_start_stack); -printf("procs[%d].esp =%lu\n",index,procs[index].pi_esp); -printf("procs[%d].eip =%lu\n",index,procs[index].pi_eip); -printf("procs[%d].pending_signal=%lu\n",index,procs[index].pi_pending_signal); -printf("procs[%d].blocked_sig =%lu\n",index,procs[index].pi_blocked_sig); -printf("procs[%d].sigign =%lu\n",index,procs[index].pi_sigign); -printf("procs[%d].sigcatch =%lu\n",index,procs[index].pi_sigcatch); -printf("procs[%d].wchan =%lu\n",index,procs[index].pi_wchan); -printf("procs[%d].nswap =%lu\n",index,procs[index].pi_nswap); -printf("procs[%d].cnswap =%lu\n",index,procs[index].pi_cnswap); -printf("procs[%d].exit_signal =%d\n",index,procs[index].pi_exit_signal); -printf("procs[%d].cpu =%d\n",index,procs[index].pi_cpu); -printf("OK\n"); -} -#endif /*DEBUG*/ -/* --- */ - -int isnumbers(char *s) -{ - while(*s != 0) { - if( *s < '0' || *s > '9') - return 0; - s++; - } - return 1; -} - -int getprocs(int details) -{ -struct dirent *dent; -DIR *procdir; -int count =0; - - if((char *)(procdir = opendir("/proc")) == NULL) { - printf("opendir(/proc) failed"); - return 0; - } - while( (char *)(dent = readdir(procdir)) != NULL ) { - if(dent->d_type == 4) { /* is this a directlory */ -/* mainframes report 0 = unknown every time !!!! */ -/* - printf("inode=%d type=%d name=%s\n", - dent->d_ino, - dent->d_type, - dent->d_name); -*/ - if(isnumbers(dent->d_name)) { -/* printf("%s pid\n",dent->d_name); */ - if(details) { - count=count+proc_procsinfo(atoi(dent->d_name),count); - } else { - count++; - } - } -/* - else - printf("NOT numbers\n"); -*/ - } - } - closedir(procdir); - return count; -} -/* --- */ - -char cpu_line[] = "+-------------------------------------------------+"; -/* Start process as specified in cmd in a child process without waiting - * for completion - * not sure if want to prevent this funcitonality for root user - * when: CHLD_START, CHLD_SNAP or CHLD_END - * cmd: pointer to command string - assumed to be cleansed .... - * timestamp_type: 0 - T%04d, 1 - detailed time stamp - * loop: loop id (0 for CHLD_START) - * the_time: time to use for timestamp generation - */ -void child_start(int when, - char *cmd, - int timestamp_type, - int loop, - time_t the_time) -{ - int i; - pid_t child_pid; - char time_stamp_str[20]=""; - char *when_info=""; - struct tm *tim; /* used to work out the hour/min/second */ - -#ifdef DEBUG2 -fprintf(fp,"child start when=%d cmd=%s time=%d loop=%d\n",when,cmd,timestamp_type,loop); -#endif - /* Validate parameter and initialize error text */ - switch( when ) { - case CHLD_START: - when_info = "nmon fork exec failure CHLD_START"; - break; - case CHLD_END: - when_info = "nmon fork exec failure CHLD_END"; - break; - - case CHLD_SNAP: - /* check if old child has finished - otherwise we do nothing */ - if( nmon_children[CHLD_SNAP] != -1 ) { - if(!cursed)fprintf(fp,"ERROR,T%04d, Starting snap command \"%s\" failed as previous child still running - killing it now\n", loop, cmd); - kill( nmon_children[CHLD_SNAP],9); - } - - when_info = "nmon fork exec failure CHLD_SNAP"; - break; - } - - - /* now fork off a child process. */ - switch (child_pid = fork()) { - case -1: /* fork failed. */ - perror(when_info); - return; - - case 0: /* inside child process. */ - /* create requested timestamp */ - if( timestamp_type == 1 ) { - tim = localtime(&the_time); - sprintf(time_stamp_str,"%02d:%02d:%02d,%02d,%02d,%04d", - tim->tm_hour, tim->tm_min, tim->tm_sec, - tim->tm_mday, tim->tm_mon + 1, tim->tm_year + 1900); - } - else { - sprintf(time_stamp_str,"T%04d", loop); - } - - /* close all open file pointers except the defaults */ - for( i=3; i<5; ++i ) - close(i); - - /* Now switch to the defined command */ - execlp(cmd, cmd, time_stamp_str,(void *)0); - - /* If we get here the specified command could not be started */ - perror(when_info); - exit(1); /* We can't do anything more */ - /* never reached */ - - default: /* inside parent process. */ - /* In father - remember child pid for future */ - nmon_children[when] = child_pid; - } -} - -int main(int argc, char **argv) -{ - int secs; - char mapch; - int old_cpus; - int cpu_idle; - int cpu_user; - int cpu_sys; - int cpu_wait; - int n=0; /* reusable counters */ - int i=0; - int j=0; - int k=0; - int ret=0; - int max_sorted; - int skipped; - int x = 0; /* curses row */ - int y = 0; /* curses column */ - double elapsed; /* actual seconds between screen updates */ - double cpu_sum; - double cpu_busy; - double ftmp; - int top_first_time =1; - int disk_first_time =1; - int nfs_first_time =1; - int vm_first_time =1; -#ifdef POWER - int lpar_first_time =1; -#endif /* POWER */ - int smp_first_time =1; - int proc_first_time =1; - pid_t firstproc = (pid_t)0; - pid_t childpid = -1; - int ralfmode = 0; - char pgrp[32]; - struct tm *tim; /* used to work out the hour/min/second */ - float total_busy; /* general totals */ - float total_rbytes; /* general totals */ - float total_wbytes; - float total_xfers; - struct utsname uts; /* UNIX name, version, etc */ - double top_disk_busy = 0.0; - char *top_disk_name = ""; - int disk_mb; - double disk_total; - double disk_busy; - double disk_read; - double disk_size; - double disk_write; - double disk_xfers; - double total_disk_read; - double total_disk_write; - double total_disk_xfers; - double readers; - double writers; - - /* for popen on oslevel */ - char str[512]; - char * str_p; - int varperftmp = 0; - char *formatstring; - char user_filename[512]; - char user_filename_set = 0; - struct statfs statfs_buffer; - float fs_size; - float fs_free; - float fs_size_used; - char cmdstr[256]; - int disk_stats_read = 0; - int updays, uphours, upmins; - float v2c_total; - float v2s_total; - float v3c_total; - float v3s_total; - int room =1; - int errors=0; - WINDOW * padmem = NULL; - WINDOW * padlarge = NULL; - WINDOW * padpage = NULL; - WINDOW * padker = NULL; - WINDOW * padres = NULL; - WINDOW * padnet = NULL; - WINDOW * padneterr = NULL; - WINDOW * padnfs = NULL; - WINDOW * padcpu = NULL; - WINDOW * padsmp = NULL; - WINDOW * padlong = NULL; - WINDOW * paddisk = NULL; - WINDOW * paddg = NULL; - WINDOW * padmap = NULL; - WINDOW * padtop = NULL; - WINDOW * padjfs = NULL; - WINDOW * padlpar = NULL; - WINDOW * padverb = NULL; - WINDOW * padhelp = NULL; - - char *nmon_start = (char *)NULL; - char *nmon_end = (char *)NULL; - char *nmon_snap = (char *)NULL; - char *nmon_tmp = (char *)NULL; - int nmon_one_in = 1; - /* Flag what kind of time stamp we give to started children - * 0: "T%04d" - * 1: "hh:mm:ss,dd,mm,yyyy" - */ - int time_stamp_type =0; - - -#define MAXROWS 256 -#define MAXCOLS 150 /* changed to allow maximum column widths */ -#define BANNER(pad,string) {mvwhline(pad, 0, 0, ACS_HLINE,COLS-2); \ - wmove(pad,0,0); \ - wattron(pad,A_STANDOUT); \ - wprintw(pad," "); \ - wprintw(pad,string); \ - wprintw(pad," "); \ - wattroff(pad,A_STANDOUT); } - -#define DISPLAY(pad,rows) { \ - if(x+2+(rows)>LINES)\ - pnoutrefresh(pad, 0,0,x,1,LINES-2,COLS-2); \ - else \ - pnoutrefresh(pad, 0,0,x,1,x+rows+1,COLS-2); \ - x=x+(rows); \ - if(x+4>LINES) { \ - room=0; \ - mvwprintw(stdscr,LINES-1,10,"Warning: Some Statistics may not shown"); \ - } \ - } - - /* check the user supplied options */ - progname = argv[0]; - for (i=(int)strlen(progname)-1;i>0;i--) - if(progname[i] == '/') { - progname = &progname[i+1]; - } - - if(getenv("NMONDEBUG") != NULL) - debug=1; - if(getenv("NMONERROR") != NULL) - error_on=1; - if(getenv("NMONBUG1") != NULL) - reread=1; - if (getenv("NMONDEBUG") != NULL) - debug = 1; - - if ((nmon_start = getenv("NMON_START")) != NULL) { - nmon_start = check_call_string(nmon_start, "NMON_START"); - } - - if ((nmon_end = getenv("NMON_END")) != NULL) { - nmon_end = check_call_string(nmon_end, "NMON_END"); - } - - if ((nmon_tmp = getenv("NMON_ONE_IN")) != NULL) { - nmon_one_in = atoi(nmon_tmp); - if( errno != 0 ) { - fprintf(stderr,"ERROR nmon: invalid NMON_ONE_IN shell variable\n"); - nmon_one_in = 1; - } - } - - if ((nmon_snap = getenv("NMON_SNAP")) != NULL) { - nmon_snap = check_call_string(nmon_snap, "NMON_SNAP"); - } - - if ((nmon_tmp = getenv("NMON_TIMESTAMP")) != NULL) { - time_stamp_type = atoi(nmon_tmp); - if (time_stamp_type != 0 && time_stamp_type != 1 ) - time_stamp_type = 1; - } -#ifdef DEBUG2 -printf("NMON_START=%s.\n",nmon_start); -printf("NMON_END=%s.\n",nmon_end); -printf("NMON_SNAP=%s.\n",nmon_snap); -printf("ONE_IN=%d.\n",nmon_one_in); -printf("TIMESTAMP=%d.\n",time_stamp_type); -#endif - -#ifdef REREAD - reread=1; -#endif - for(i=0; i<CMDMAX;i++) { - sprintf(cmdstr,"NMONCMD%d",i); - cmdlist[i] = getenv(cmdstr); - if(cmdlist[i] != 0) - cmdfound = i+1; - } - /* Setup long and short Hostname */ - gethostname(hostname, sizeof(hostname)); - strcpy(fullhostname, hostname); - for (i = 0; i < sizeof(hostname); i++) - if (hostname[i] == '.') - hostname[i] = 0; - if(run_name_set == 0) - strcpy(run_name,hostname); - - /* Check the version of OS */ - uname(&uts); - - proc_init(); - - while ( -1 != (i = getopt(argc, argv, "?Rhs:bc:d:fF:r:tTxXzeEl:qpC:Vg:Nm:I:Z" ))) { - switch (i) { - case '?': - hint(); - exit(0); - case 'h': - help(); - break; - case 's': - seconds = atoi(optarg); - break; - case 'p': - ralfmode = 1; - break; - case 'b': - colour = 0; - break; - case 'c': - maxloops = atoi(optarg); - break; - case 'N': - show_nfs = 1; - break; - case 'm': - if(chdir(optarg) == -1) { - perror("changing directory failed"); - printf("Directory attempted was:%s\n",optarg); - exit(993); - } - break; - case 'I': - ignore_procdisk_threshold = atof(optarg); - break; - case 'd': - diskmax = atoi(optarg); - if(diskmax < DISKMIN) { - printf("nmon: ignoring -d %d option as the minimum is %d\n", diskmax, DISKMIN); - diskmax = DISKMIN; - } - break; - case 'R': - show_rrd = 1; - go_background(288, 300); - show_aaa = 0; - show_para = 0; - show_headings = 0; - break; - case 'r': strcpy(run_name,optarg); - run_name_set++; - break; - case 'F': /* background mode with user supplied filename */ - strcpy(user_filename,optarg); - user_filename_set++; - go_background(288, 300); - break; - - case 'f': /* background mode i.e. for spread sheet output */ - go_background(288, 300); - break; - case 'T': - show_args = ARGS_ONLY; /* drop through */ - case 't': - show_top = 1; /* put top process output in spreadsheet mode */ - show_topmode = 3; - break; - case 'z': /* background mode for 1 day output to /var/perf/tmp */ - varperftmp++; - go_background(4*24, 15*60); - break; - - case 'x': /* background mode for 1 day capacity planning */ - show_top =1; - show_topmode = 3; - go_background(4*24, 15*60); - break; - case 'X': /* background mode for 1 hour capacity planning */ - show_top =1; - show_topmode = 3; - go_background(120, 30); - break; - case 'Z': - show_raw=1; - break; - case 'l': - disks_per_line = atoi(optarg); - if(disks_per_line < 3 || disks_per_line >250) disks_per_line = 100; - break; - case 'C': /* commandlist argument */ - cmdlist[0] = malloc(strlen(optarg)+1); /* create buffer */ - strcpy(cmdlist[0],optarg); - if(cmdlist[0][0]!= 0) - cmdfound=1; - for(i=0,j=1;cmdlist[0][i] != 0;i++) { - if(cmdlist[0][i] == ':') { - cmdlist[0][i] = 0; - cmdlist[j] = &cmdlist[0][i+1]; - j++; - cmdfound=j; - if(j >= CMDMAX) break; - } - } - break; - case 'V': /* nmon version */ - printf("nmon verion %s\n",VERSION); - exit(0); - break; - case 'g': /* disk groups */ - show_dgroup = 1; - dgroup_loaded = 1; - dgroup_filename = optarg; - break; - } - } - /* Set parameters if not set by above */ - if (maxloops == -1) - maxloops = 9999999; - if (seconds == -1) - seconds = 2; - if (cursed) - show_dgroup = 0; - - /* To get the pointers setup */ - switcher(); - - /* Initialise the time stamps for the first loop */ - p->time = doubletime(); - q->time = doubletime(); - - find_release(); - - proc_read(P_STAT); - for(i=1;i<proc[P_STAT].lines;i++) { - if(strncmp("cpu",proc[P_STAT].line[i],3) == 0) - max_cpus = cpus=i; - else - break; - } - proc_read(P_STAT); - proc_cpu(); - proc_read(P_UPTIME); - proc_read(P_LOADAVG); - proc_kernel(); - memcpy(&q->cpu_total, &p->cpu_total, sizeof(struct cpu_stat)); - - p->dk = malloc(sizeof(struct dsk_stat) * diskmax+1); - q->dk = malloc(sizeof(struct dsk_stat) * diskmax+1); - disk_busy_peak = malloc(sizeof(double) * diskmax); - disk_rate_peak = malloc(sizeof(double) * diskmax); - for(i=0;i<diskmax;i++) { - disk_busy_peak[i]=0.0; - disk_rate_peak[i]=0.0; - } - - cpu_peak = malloc(sizeof(double) * 128); /* MAGIC */ - for(i=0;i<(max_cpus+1);i++) - cpu_peak[i]=0.0; - - n = getprocs(0); - p->procs = malloc(sizeof(struct procsinfo ) * n +8); - q->procs = malloc(sizeof(struct procsinfo ) * n +8); - p->nprocs = q->nprocs = n; - - /* Initialise the top processes table */ - topper = malloc(sizeof(struct topper ) * topper_size); /* round up */ - - /* Get Disk Stats. */ - proc_disk(0.0); - memcpy(q->dk, p->dk, sizeof(struct dsk_stat) * disks); - - /* load dgroup - if required */ - if (dgroup_loaded == 1) { - load_dgroup(p->dk); - } - - /* Get Network Stats. */ - proc_net(); - memcpy(q->ifnets, p->ifnets, sizeof(struct net_stat) * networks); - for(i=0;i<networks;i++) { - net_read_peak[i]=0.0; - net_write_peak[i]=0.0; - } - - /* Set the pointer ready for the next round */ - switcher(); - - /* Initialise signal handlers so we can tidy up curses on exit */ - signal(SIGUSR1, interrupt); - signal(SIGUSR2, interrupt); - signal(SIGINT, interrupt); - signal(SIGWINCH, interrupt); - signal(SIGCHLD, interrupt); - - /* Start Curses */ - if (cursed) { - initscr(); - cbreak(); - move(0, 0); - refresh(); - COLOUR colour = has_colors(); - COLOUR start_color(); - COLOUR init_pairs(); - clear(); - padlpar = newpad(11,MAXCOLS); - padmap = newpad(24,MAXCOLS); - padhelp = newpad(24,MAXCOLS); - padmem = newpad(20,MAXCOLS); - padlarge = newpad(20,MAXCOLS); - padpage = newpad(20,MAXCOLS); - padcpu = newpad(20,MAXCOLS); - padsmp = newpad(MAXROWS,MAXCOLS); - padlong = newpad(MAXROWS,MAXCOLS); - padnet = newpad(MAXROWS,MAXCOLS); - padneterr = newpad(MAXROWS,MAXCOLS); - paddisk = newpad(MAXROWS,MAXCOLS); - paddg = newpad(MAXROWS,MAXCOLS); - padjfs = newpad(MAXROWS,MAXCOLS); - padker = newpad(5,MAXCOLS); - padverb = newpad(8,MAXCOLS); - padres = newpad(23,MAXCOLS); - padnfs = newpad(25,MAXCOLS); - padtop = newpad(MAXROWS,MAXCOLS*2); - - - } else { - /* Output the header lines for the spread sheet */ - timer = time(0); - tim = localtime(&timer); - tim->tm_year += 1900 - 2000; /* read localtime() manual page!! */ - tim->tm_mon += 1; /* because it is 0 to 11 */ - if(varperftmp) - sprintf( str, "/var/perf/tmp/%s_%02d.nmon", hostname, tim->tm_mday); - else if(user_filename_set) - strcpy( str, user_filename); - else - sprintf( str, "%s_%02d%02d%02d_%02d%02d.nmon", - hostname, - tim->tm_year, - tim->tm_mon, - tim->tm_mday, - tim->tm_hour, - tim->tm_min); - if((fp = fopen(str,"w")) ==0 ) { - perror("nmon: failed to open output file"); - printf("nmon: output filename=%s\n",str); - exit(42); - } - /* disconnect from terminal */ - fflush(NULL); - if (!debug && (childpid = fork()) != 0) { - if(ralfmode) - printf("%d\n",childpid); - exit(0); /* parent returns OK */ - } - if(!debug) { - close(0); - close(1); - close(2); - setpgrp(); /* become process group leader */ - signal(SIGHUP, SIG_IGN); /* ignore hangups */ - } - /* Do the nmon_start activity early on */ - if (nmon_start) { - timer = time(0); - child_start(CHLD_START, nmon_start, time_stamp_type, 1, timer); - } - - if(show_aaa) { - fprintf(fp,"AAA,progname,%s\n", progname); - fprintf(fp,"AAA,command,"); - for(i=0;i<argc;i++) - fprintf(fp,"%s ",argv[i]); - fprintf(fp,"\n"); - fprintf(fp,"AAA,version,%s\n", VERSION); - fprintf(fp,"AAA,disks_per_line,%d\n", disks_per_line); - fprintf(fp,"AAA,max_disks,%d,set by -d option\n", diskmax); - fprintf(fp,"AAA,disks,%d,\n", disks); - - fprintf(fp,"AAA,host,%s\n", hostname); - fprintf(fp,"AAA,user,%s\n", getenv("USER")); - fprintf(fp,"AAA,OS,Linux,%s,%s,%s\n",uts.release,uts.version,uts.machine); - fprintf(fp,"AAA,runname,%s\n", run_name); - fprintf(fp,"AAA,time,%02d:%02d.%02d\n", tim->tm_hour, tim->tm_min, tim->tm_sec); - fprintf(fp,"AAA,date,%02d-%3s-%02d\n", tim->tm_mday, month[tim->tm_mon-1], tim->tm_year+2000); - fprintf(fp,"AAA,interval,%d\n", seconds); - fprintf(fp,"AAA,snapshots,%d\n", maxloops); - fprintf(fp,"AAA,cpus,%d,%d\n", cpus,cpus); - fprintf(fp,"AAA,proc_stat_variables,%d\n", stat8); - - fprintf(fp,"AAA,note0, Warning - use the UNIX sort command to order this file before loading into a spreadsheet\n"); - fprintf(fp,"AAA,note1, The First Column is simply to get the output sorted in the right order\n"); - fprintf(fp,"AAA,note2, The T0001-T9999 column is a snapshot number. To work out the actual time; see the ZZZ section at the end\n"); - } - fflush(NULL); - - for (i = 1; i <= cpus; i++) - fprintf(fp,"CPU%02d,CPU %d %s,User%%,Sys%%,Wait%%,Idle%%\n", i, i, run_name); - fprintf(fp,"CPU_ALL,CPU Total %s,User%%,Sys%%,Wait%%,Idle%%,Busy,CPUs\n", run_name); - fprintf(fp,"MEM,Memory MB %s,memtotal,hightotal,lowtotal,swaptotal,memfree,highfree,lowfree,swapfree,memshared,cached,active,bigfree,buffers,swapcached,inactive\n", run_name); - -#ifdef POWER - proc_lparcfg(); - if(lparcfg.cmo_enabled) - fprintf(fp,"MEMAMS,AMS %s,Poolid,Weight,Hypervisor-Page-in/s,HypervisorTime(seconds),not_available_1,not_available_2,not_available_3,Physical-Memory(MB),Page-Size(KB),Pool-Size(MB),Loan-Request(KB)\n", run_name); -#endif /* POWER */ - - fprintf(fp,"PROC,Processes %s,Runnable,Swap-in,pswitch,syscall,read,write,fork,exec,sem,msg\n", run_name); -/* - fprintf(fp,"PAGE,Paging %s,faults,pgin,pgout,pgsin,pgsout,reclaims,scans,cycles\n", run_name); - fprintf(fp,"FILE,File I/O %s,iget,namei,dirblk,readch,writech,ttyrawch,ttycanch,ttyoutch\n", run_name); -*/ - - - fprintf(fp,"NET,Network I/O %s,", run_name); - for (i = 0; i < networks; i++) - fprintf(fp,"%-2s-read-KB/s,", (char *)p->ifnets[i].if_name); - for (i = 0; i < networks; i++) - fprintf(fp,"%-2s-write-KB/s,", (char *)p->ifnets[i].if_name); - fprintf(fp,"\n"); - fprintf(fp,"NETPACKET,Network Packets %s,", run_name); - for (i = 0; i < networks; i++) - fprintf(fp,"%-2s-read/s,", (char *)p->ifnets[i].if_name); - for (i = 0; i < networks; i++) - fprintf(fp,"%-2s-write/s,", (char *)p->ifnets[i].if_name); - /* iremoved as it is not below in the BUSY line fprintf(fp,"\n"); */ -#ifdef DEBUG - if(debug)printf("disks=%d x%sx\n",(char *)disks,p->dk[0].dk_name); -#endif /*DEBUG*/ - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,"\nDISKBUSY%s,Disk %%Busy %s", dskgrp(i) ,run_name); - fprintf(fp,",%s", (char *)p->dk[i].dk_name); - } - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,"\nDISKREAD%s,Disk Read KB/s %s", dskgrp(i),run_name); - fprintf(fp,",%s", (char *)p->dk[i].dk_name); - } - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,"\nDISKWRITE%s,Disk Write KB/s %s", (char *)dskgrp(i),run_name); - fprintf(fp,",%s", (char *)p->dk[i].dk_name); - } - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,"\nDISKXFER%s,Disk transfers per second %s", (char *)dskgrp(i),run_name); - fprintf(fp,",%s", p->dk[i].dk_name); - } - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,"\nDISKBSIZE%s,Disk Block Size %s", dskgrp(i),run_name); - fprintf(fp,",%s", (char *)p->dk[i].dk_name); - } - fprintf(fp,"\n"); - list_dgroup(p->dk); - jfs_load(LOAD); - fprintf(fp,"JFSFILE,JFS Filespace %%Used %s", hostname); - for (k = 0; k < jfses; k++) { - if(jfs[k].mounted && strncmp(jfs[k].name,"/proc",5) - && strncmp(jfs[k].name,"/sys",4) - && strncmp(jfs[k].name,"/dev/pts",8) - ) /* /proc gives invalid/insane values */ - fprintf(fp,",%s", jfs[k].name); - } - fprintf(fp,"\n"); - jfs_load(UNLOAD); -#ifdef POWER - fprintf(fp,"LPAR,Shared CPU LPAR Stats %s,PhysicalCPU,capped,shared_processor_mode,system_potential_processors,system_active_processors,pool_capacity,MinEntCap,partition_entitled_capacity,partition_max_entitled_capacity,MinProcs,partition_active_processors,partition_potential_processors,capacity_weight,unallocated_capacity_weight,BoundThrds,MinMem,unallocated_capacity,pool_idle_time\n",hostname); -#endif /*POWER*/ - if(show_top){ - fprintf(fp,"TOP,%%CPU Utilisation\n"); - fprintf(fp,"TOP,+PID,Time,%%CPU,%%Usr,%%Sys,Size,ResSet,ResText,ResData,ShdLib,MajorFault,MinorFault,Command\n"); - } - linux_bbbp("/etc/release", "/bin/cat /etc/*ease 2>/dev/null", WARNING); - linux_bbbp("lsb_release", "/usr/bin/lsb_release -a 2>/dev/null", WARNING); - linux_bbbp("fdisk-l", "/sbin/fdisk -l 2>/dev/null", WARNING); - linux_bbbp("/proc/cpuinfo", "/bin/cat /proc/cpuinfo 2>/dev/null", WARNING); - linux_bbbp("/proc/meminfo", "/bin/cat /proc/meminfo 2>/dev/null", WARNING); - linux_bbbp("/proc/stat", "/bin/cat /proc/stat 2>/dev/null", WARNING); - linux_bbbp("/proc/version", "/bin/cat /proc/version 2>/dev/null", WARNING); - linux_bbbp("/proc/net/dev", "/bin/cat /proc/net/dev 2>/dev/null", WARNING); - linux_bbbp("/proc/diskinfo", "/bin/cat /proc/diskinfo 2>/dev/null", WARNING); - linux_bbbp("/proc/diskstats", "/bin/cat /proc/diskstats 2>/dev/null", WARNING); - linux_bbbp("/proc/partitions", "/bin/cat /proc/partitions 2>/dev/null", WARNING); - linux_bbbp("/proc/1/stat", "/bin/cat /proc/1/stat 2>/dev/null", WARNING); - linux_bbbp("/proc/1/statm", "/bin/cat /proc/1/statm 2>/dev/null", WARNING); -#ifdef POWER - linux_bbbp("/proc/ppc64/lparcfg", "/bin/cat /proc/ppc64/lparcfg 2>/dev/null", WARNING); -#endif -#ifdef MAINFRAME - linux_bbbp("/proc/sysinfo", "/bin/cat /proc/sysinfo 2>/dev/null", WARNING); -#endif - linux_bbbp("/proc/net/rpc/nfs", "/bin/cat /proc/net/rpc/nfs 2>/dev/null", WARNING); - linux_bbbp("/proc/net/rpc/nfsd", "/bin/cat /proc/net/rpc/nfsd 2>/dev/null", WARNING); - linux_bbbp("ifconfig", "/sbin/ifconfig 2>/dev/null", WARNING); - linux_bbbp("/bin/df-m", "/bin/df -m 2>/dev/null", WARNING); - linux_bbbp("/bin/mount", "/bin/mount 2>/dev/null", WARNING); - linux_bbbp("/etc/fstab", "/bin/cat /etc/fstab 2>/dev/null", WARNING); - - sleep(1); /* to get the first stats to cover this one second */ - } - /* To get the pointers setup */ - switcher(); - checkinput(); - fflush(NULL); -#ifdef POWER -lparcfg.timebase = -1; -#endif - - /* Main loop of the code */ - for(loop=1; ; loop++) { - disk_stats_read = 0; - - if(loop == 3) /* This stops the nmon causing the cpu peak at startup */ - for(i=0;i<(max_cpus+1);i++) - cpu_peak[i]=0.0; - - /* Reset the cursor position to top left */ - y = x = 0; - - /* Save the time and work out how long we were actually asleep */ - p->time = doubletime(); - elapsed = p->time - q->time; - timer = time(0); - tim = localtime(&timer); - if (cursed) { /* Top line */ - box(stdscr,0,0); - mvprintw(x, 1, "nmon"); - mvprintw(x, 6, "%s", VERSION); - if(flash_on) mvprintw(x,15,"[H for help]"); - mvprintw(x, 30, "Hostname=%s", hostname); - mvprintw(x, 52, "Refresh=%2.0fsecs ", elapsed); - mvprintw(x, 70, "%02d:%02d.%02d", - tim->tm_hour, tim->tm_min, tim->tm_sec); - wnoutrefresh(stdscr); - x = x + 1; - - if(welcome && getenv("NMON") == 0) { - - COLOUR attrset(COLOR_PAIR(2)); -mvprintw(x+1, 3, "------------------------------"); -mvprintw(x+2, 3, "# # # # #### # #"); -mvprintw(x+3, 3, "## # ## ## # # ## #"); -mvprintw(x+4, 3, "# # # # ## # # # # # #"); -mvprintw(x+5, 3, "# # # # # # # # # #"); -mvprintw(x+6, 3, "# ## # # # # # ##"); -mvprintw(x+7, 3, "# # # # #### # #"); -mvprintw(x+8, 3, "------------------------------"); - COLOUR attrset(COLOR_PAIR(0)); -mvprintw(x+1, 40, "For help type H or ..."); -mvprintw(x+2, 40, " nmon -? - hint"); -mvprintw(x+3, 40, " nmon -h - full"); -mvprintw(x+5, 40, "To start the same way every time"); -mvprintw(x+6, 40, " set the NMON ksh variable"); - -mvprintw(x+10, 3, "Use these keys to toggle statistics on/off:"); -mvprintw(x+11, 3, " c = CPU l = CPU Long-term - = Faster screen updates"); -mvprintw(x+12, 3, " m = Memory j = Filesystems + = Slower screen updates"); -mvprintw(x+13, 3, " d = Disks n = Network V = Virtual Memory"); -mvprintw(x+14, 3, " r = Resource N = NFS v = Verbose hints"); -mvprintw(x+15, 3, " k = kernel t = Top-processes . = only busy disks/procs"); -mvprintw(x+16, 3, " h = more options q = Quit"); - x = x + 17; - } - } else { - if (!cursed && nmon_snap && (loop % nmon_one_in) == 0 ) { - child_start(CHLD_SNAP, nmon_snap, time_stamp_type, loop, timer); - } - - - if(!show_rrd) - fprintf(fp,"ZZZZ,%s,%02d:%02d:%02d,%02d-%s-%4d\n", LOOP, - tim->tm_hour, tim->tm_min, tim->tm_sec, - tim->tm_mday, month[tim->tm_mon], tim->tm_year+1900); - fflush(NULL); - } - if (show_verbose && cursed) { - BANNER(padverb, "Verbose Mode"); - mvwprintw(padverb,1, 0, " Code Resource Stats Now\tWarn\tDanger "); - /* DISPLAY(padverb,7); */ - /* move(x,0); */ - x=x+6; - } - if (show_help && cursed) { - BANNER(padhelp, "HELP"); - mvwprintw(padhelp, 1, 5, "key --- statistics which toggle on/off ---"); - mvwprintw(padhelp, 2, 5, "h = This help information"); - mvwprintw(padhelp, 3, 5, "r = RS6000/pSeries CPU/cache/OS/kernel/hostname details + LPAR"); - mvwprintw(padhelp, 4, 5, "t = Top Process Stats 1=basic 3=CPU"); - mvwprintw(padhelp, 5, 5, " u = shows command arguments (hit twice to refresh)"); - mvwprintw(padhelp, 6, 5, "c = CPU by processor l = longer term CPU averages"); - mvwprintw(padhelp, 7, 5, "m = Memory & Swap stats L=Huge j = JFS Usage Stats"); - mvwprintw(padhelp, 8, 5, "n = Network stats N = NFS"); - mvwprintw(padhelp, 9, 5, "d = Disk I/O Graphs D=Stats o = Disks %%Busy Map"); - mvwprintw(padhelp,10, 5, "k = Kernel stats & loadavg V = Virtual Memory"); - mvwprintw(padhelp,11, 5, "g = User Defined Disk Groups [start nmon with -g <filename>]"); - mvwprintw(padhelp,12, 5, "v = Verbose Simple Checks - OK/Warnings/Danger"); - mvwprintw(padhelp,13, 5, "b = black & white mode"); - mvwprintw(padhelp,14, 5, "--- controls ---"); - mvwprintw(padhelp,15, 5, "+ and - = double or half the screen refresh time"); - mvwprintw(padhelp,16, 5, "q = quit space = refresh screen now"); - mvwprintw(padhelp,17, 5, ". = Minimum Mode =display only busy disks and processes"); - mvwprintw(padhelp,18, 5, "0 = reset peak counts to zero (peak = \">\")"); - mvwprintw(padhelp,19, 5, "Developer Nigel Griffiths see http://nmon.sourceforge.net"); - DISPLAY(padhelp,20); - - } -/* - if(error_on && errorstr[0] != 0) { - mvprintw(x, 0, "Error: %s ",errorstr); - x = x + 1; - } -*/ - if (show_cpu && cursed) { - proc_read(P_CPUINFO); - proc_read(P_VERSION); - BANNER(padcpu,"Linux and Processor Details"); - mvwprintw(padcpu,1, 4, "Linux: %s", proc[P_VERSION].line[0]); - mvwprintw(padcpu,2, 4, "Build: %s", proc[P_VERSION].line[1]); - mvwprintw(padcpu,3, 4, "Release : %s", uts.release ); - mvwprintw(padcpu,4, 4, "Version : %s", uts.version); -#ifdef POWER - mvwprintw(padcpu,5, 4, "cpuinfo: %s", proc[P_CPUINFO].line[1]); - mvwprintw(padcpu,6, 4, "cpuinfo: %s", proc[P_CPUINFO].line[2]); - mvwprintw(padcpu,7, 4, "cpuinfo: %s", proc[P_CPUINFO].line[3]); - mvwprintw(padcpu,8, 4, "cpuinfo: %s", proc[P_CPUINFO].line[proc[P_CPUINFO].lines-1]); -#else -#ifdef MAINFRAME - mvwprintw(padcpu,5, 4, "cpuinfo: %s", proc[P_CPUINFO].line[1]); - mvwprintw(padcpu,6, 4, "cpuinfo: %s", proc[P_CPUINFO].line[2]); - mvwprintw(padcpu,7, 4, "cpuinfo: %s", proc[P_CPUINFO].line[3]); - mvwprintw(padcpu,8, 4, "cpuinfo: %s", proc[P_CPUINFO].line[4]); -#else /* Intel is the default */ - mvwprintw(padcpu,5, 4, "cpuinfo: %s", proc[P_CPUINFO].line[4]); - mvwprintw(padcpu,6, 4, "cpuinfo: %s", proc[P_CPUINFO].line[1]); - mvwprintw(padcpu,7, 4, "cpuinfo: %s", proc[P_CPUINFO].line[6]); - mvwprintw(padcpu,8, 4, "cpuinfo: %s", proc[P_CPUINFO].line[17]); -#endif /*MAINFRAME*/ -#endif /*POWER*/ - mvwprintw(padcpu,9, 4, "# of CPUs: %d", cpus); - mvwprintw(padcpu,10, 4,"Machine : %s", uts.machine); - mvwprintw(padcpu,11, 4,"Nodename : %s", uts.nodename); - mvwprintw(padcpu,12, 4,"/etc/*ease[1]: %s", easy[0]); - mvwprintw(padcpu,13, 4,"/etc/*ease[2]: %s", easy[1]); - mvwprintw(padcpu,14, 4,"/etc/*ease[3]: %s", easy[2]); - mvwprintw(padcpu,15, 4,"/etc/*ease[4]: %s", easy[3]); - mvwprintw(padcpu,16, 4,"lsb_release: %s", lsb_release[0]); - mvwprintw(padcpu,17, 4,"lsb_release: %s", lsb_release[1]); - mvwprintw(padcpu,18, 4,"lsb_release: %s", lsb_release[2]); - mvwprintw(padcpu,19, 4,"lsb_release: %s", lsb_release[3]); - DISPLAY(padcpu,20); - } - if (show_longterm ) { - proc_read(P_STAT); - proc_cpu(); - cpu_user = p->cpu_total.user - q->cpu_total.user; - cpu_sys = p->cpu_total.sys - q->cpu_total.sys; - cpu_wait = p->cpu_total.wait - q->cpu_total.wait; - cpu_idle = p->cpu_total.idle - q->cpu_total.idle; - cpu_sum = cpu_idle + cpu_user + cpu_sys + cpu_wait; - - plot_save( - (double)cpu_user / (double)cpu_sum * 100.0, - (double)cpu_sys / (double)cpu_sum * 100.0, - (double)cpu_wait / (double)cpu_sum * 100.0, - (double)cpu_idle / (double)cpu_sum * 100.0); - plot_snap(padlong); - DISPLAY(padlong,MAX_SNAP_ROWS+2); - } - if (show_smp || show_verbose) { - old_cpus = cpus; - if(old_cpus != cpus) { - CURSE wclrtobot(padtop); - } - if(cpus>max_cpus && !cursed) { - for (i = max_cpus+1; i <= cpus; i++) - fprintf(fp,"CPU%02d,CPU %d %s,User%%,Sys%%,Wait%%,Idle%%\n", i, i, run_name); - max_cpus= cpus; - } - if (show_smp) { - if(cursed) { - BANNER(padsmp,"CPU Utilisation"); - mvwprintw(padsmp,1, 27, cpu_line); -/* -mvwprintw(padsmp,2, 0, "CPU User%% Sys%% Wait%% Idle|0 |25 |50 |75 100|"); -*/ - mvwprintw(padsmp,1, 27, cpu_line); - mvwprintw(padsmp,2, 0, "CPU "); - COLOUR wattrset(padsmp, COLOR_PAIR(2)); - mvwprintw(padsmp,2, 5, "User%%"); - COLOUR wattrset(padsmp, COLOR_PAIR(1)); - mvwprintw(padsmp,2, 10, " Sys%%"); - COLOUR wattrset(padsmp, COLOR_PAIR(4)); - mvwprintw(padsmp,2, 16, " Wait%%"); - COLOUR wattrset(padsmp, COLOR_PAIR(0)); - mvwprintw(padsmp,2, 22, " Idle|0 |25 |50 |75 100|"); - - } - proc_read(P_STAT); - proc_cpu(); - for (i = 0; i < cpus; i++) { - cpu_user = p->cpuN[i].user - q->cpuN[i].user; - cpu_sys = p->cpuN[i].sys - q->cpuN[i].sys; - cpu_wait = p->cpuN[i].wait - q->cpuN[i].wait; - cpu_idle = p->cpuN[i].idle - q->cpuN[i].idle; - cpu_sum = cpu_idle + cpu_user + cpu_sys + cpu_wait; - if(smp_first_time && cursed) { - mvwprintw(padsmp,3 + i, 27, "| Please wait gathering data"); - } else { - if(!show_raw) - plot_smp(padsmp,i+1, 3 + i, - (double)cpu_user / (double)cpu_sum * 100.0, - (double)cpu_sys / (double)cpu_sum * 100.0, - (double)cpu_wait / (double)cpu_sum * 100.0, - (double)cpu_idle / (double)cpu_sum * 100.0); - else - save_smp(padsmp,i+1, 3+i, - RAW(user) - RAW(nice), - RAW(sys), - RAW(wait), - RAW(idle), - RAW(nice), - RAW(irq), - RAW(softirq), - RAW(steal)); - RRD fprintf(fp,"rrdtool update cpu%02d.rrd %s:%.1f:%.1f:%.1f:%.1f\n",i,LOOP, - (double)cpu_user / (double)cpu_sum * 100.0, - (double)cpu_sys / (double)cpu_sum * 100.0, - (double)cpu_wait / (double)cpu_sum * 100.0, - (double)cpu_idle / (double)cpu_sum * 100.0); - } - } - CURSE mvwprintw(padsmp,i + 3, 27, cpu_line); - cpu_user = p->cpu_total.user - q->cpu_total.user; - cpu_sys = p->cpu_total.sys - q->cpu_total.sys; - cpu_wait = p->cpu_total.wait - q->cpu_total.wait; - cpu_idle = p->cpu_total.idle - q->cpu_total.idle; - cpu_sum = cpu_idle + cpu_user + cpu_sys + cpu_wait; - - RRD fprintf(fp,"rrdtool update cpu.rrd %s:%.1f:%.1f:%.1f:%.1f\n",LOOP, - (double)cpu_user / (double)cpu_sum * 100.0, - (double)cpu_sys / (double)cpu_sum * 100.0, - (double)cpu_wait / (double)cpu_sum * 100.0, - (double)cpu_idle / (double)cpu_sum * 100.0); - if (cpus > 1 || !cursed) { - if(!smp_first_time || !cursed) { - if(!show_raw) { - plot_smp(padsmp,0, 4 + i, - (double)cpu_user / (double)cpu_sum * 100.0, - (double)cpu_sys / (double)cpu_sum * 100.0, - (double)cpu_wait / (double)cpu_sum * 100.0, - (double)cpu_idle / (double)cpu_sum * 100.0); - } else { - save_smp(padsmp,0, 4+i, - RAWTOTAL(user) - RAWTOTAL(nice), - RAWTOTAL(sys), - RAWTOTAL(wait), - RAWTOTAL(idle), - RAWTOTAL(nice), - RAWTOTAL(irq), - RAWTOTAL(softirq), - RAWTOTAL(steal)); - } - } - - CURSE mvwprintw(padsmp, i + 5, 27, cpu_line); - i = i + 2; - } - smp_first_time=0; - DISPLAY(padsmp, i + 4); - } - if(show_verbose && cursed) { - cpu_user = p->cpu_total.user - q->cpu_total.user; - cpu_sys = p->cpu_total.sys - q->cpu_total.sys; - cpu_wait = p->cpu_total.wait - q->cpu_total.wait; - cpu_idle = p->cpu_total.idle - q->cpu_total.idle; - cpu_sum = cpu_idle + cpu_user + cpu_sys + cpu_wait; - - cpu_busy= (double)(cpu_user + cpu_sys)/ (double)cpu_sum * 100.0; - mvwprintw(padverb,2, 0, " -> CPU %%busy %5.1f%%\t>80%%\t>90%% ",cpu_busy); - if(cpu_busy > 90.0){ - COLOUR wattrset(padverb,COLOR_PAIR(1)); - mvwprintw(padverb,2, 0, " DANGER"); - } - else if(cpu_busy > 80.0) { - COLOUR wattrset(padverb,COLOR_PAIR(4)); - mvwprintw(padverb,2, 0, "Warning"); - } - else { - COLOUR wattrset(padverb,COLOR_PAIR(2)); - mvwprintw(padverb,2, 0, " OK"); - } - COLOUR wattrset(padverb,COLOR_PAIR(0)); - } - } -#ifdef POWER - if (show_lpar) { - if(lparcfg.timebase == -1) { - lparcfg.timebase=0; - proc_read(P_CPUINFO); - for(i=0;i<proc[P_CPUINFO].lines-1;i++) { - if(!strncmp("timebase",proc[P_CPUINFO].line[i],8)) { - sscanf(proc[P_CPUINFO].line[i],"timebase : %lld",&lparcfg.timebase); - break; - } - } - } - ret = proc_lparcfg(); - if(cursed) { - BANNER(padlpar,"LPAR Stats"); - if(ret == 0) { - mvwprintw(padlpar,2, 0, "Reading data from /proc/ppc64/lparcfg failed"); - mvwprintw(padlpar,3, 0, "Either run as the root user or "); - mvwprintw(padlpar,4, 0, "as the root user run: chmod ugo+r /proc/ppc64/lparcfg"); - } else { - mvwprintw(padlpar,1, 0, "LPAR=%d SerialNumber=%s Type=%s", - lparcfg.partition_id, lparcfg.serial_number, lparcfg.system_type); - mvwprintw(padlpar,2, 0, "Flags: Shared-CPU=%-5s Capped=%-5s", - lparcfg.shared_processor_mode?"true":"false", - lparcfg.capped?"true":"false"); - mvwprintw(padlpar,3, 0, "Systems CPU Pool=%8.2f Active=%8.2f Total=%8.2f", - (float)lparcfg.pool_capacity, - (float)lparcfg.system_active_processors, - (float)lparcfg.system_potential_processors); - mvwprintw(padlpar,4, 0, "LPARs CPU Min=%8.2f Entitlement=%8.2f Max=%8.2f", - lparcfg.MinEntCap/100.0, - lparcfg.partition_entitled_capacity/100.0, - lparcfg.partition_max_entitled_capacity/100.0); - mvwprintw(padlpar,5, 0, "Virtual CPU Min=%8.2f VP Now=%8.2f Max=%8.2f", - (float)lparcfg.MinProcs, - (float)lparcfg.partition_active_processors, - (float)lparcfg.partition_potential_processors); - mvwprintw(padlpar,6, 0, "Memory Min= unknown Now=%8.2f Max=%8.2f", - (float)lparcfg.MinMem, - (float)lparcfg.DesMem); - mvwprintw(padlpar,7, 0, "Other Weight=%8.2f UnallocWeight=%8.2f Capacity=%8.2f", - (float)lparcfg.capacity_weight, - (float)lparcfg.unallocated_capacity_weight, - (float)lparcfg.CapInc/100.0); - - mvwprintw(padlpar,8, 0, " BoundThrds=%8.2f UnallocCapacity=%8.2f Increment", - (float)lparcfg.BoundThrds, - (float)lparcfg.unallocated_capacity); - if(lparcfg.purr_diff == 0 || lparcfg.timebase <1) { - mvwprintw(padlpar,9, 0, "lparcfg: purr field always zero, upgrade to SLES9+sp1 or RHEL4+u1"); - } else { - if(lpar_first_time) { - mvwprintw(padlpar,9, 0, "Please wait gathering data"); - - lpar_first_time=0; - } else { - mvwprintw(padlpar,9, 0, "Physical CPU use=%8.3f ", - (double)lparcfg.purr_diff/(double)lparcfg.timebase/elapsed); - if( lparcfg.pool_idle_time != NUMBER_NOT_VALID && lparcfg.pool_idle_saved != 0) - mvwprintw(padlpar,9, 29, "PoolIdleTime=%8.2f", - (double)lparcfg.pool_idle_diff/(double)lparcfg.timebase/elapsed); - mvwprintw(padlpar,9, 54, "[timebase=%lld]", lparcfg.timebase); - } - } - } - DISPLAY(padlpar,10); - } else { - if(ret != 0) - fprintf(fp,"LPAR,%s,%9.6f,%d,%d,%d,%d,%d,%.1f,%.1f,%.1f,%d,%d,%d,%d,%d,%d,%d,%d,%lld\n", - LOOP, - (double)lparcfg.purr_diff/(double)lparcfg.timebase/elapsed, - lparcfg.capped, - lparcfg.shared_processor_mode, - lparcfg.system_potential_processors, - lparcfg.system_active_processors, - lparcfg.pool_capacity, - lparcfg.MinEntCap/100.0, - lparcfg.partition_entitled_capacity/100.0, - lparcfg.partition_max_entitled_capacity/100.0, - lparcfg.MinProcs, - lparcfg.partition_active_processors, - lparcfg.partition_potential_processors, - lparcfg.capacity_weight, - lparcfg.unallocated_capacity_weight, - lparcfg.BoundThrds, - lparcfg.MinMem, - lparcfg.unallocated_capacity, - lparcfg.pool_idle_time); - } - } -#endif /*POWER*/ - if (show_memory) { - proc_read(P_MEMINFO); - proc_mem(); - if(cursed) { - BANNER(padmem,"Memory Stats"); - mvwprintw(padmem,1, 1, " RAM High Low Swap"); - mvwprintw(padmem,2, 1, "Total MB %8.1f %8.1f %8.1f %8.1f ", - p->mem.memtotal/1024.0, - p->mem.hightotal/1024.0, - p->mem.lowtotal/1024.0, - p->mem.swaptotal/1024.0); - mvwprintw(padmem,3, 1, "Free MB %8.1f %8.1f %8.1f %8.1f ", - p->mem.memfree/1024.0, - p->mem.highfree/1024.0, - p->mem.lowfree/1024.0, - p->mem.swapfree/1024.0); - mvwprintw(padmem,4, 1, "Free Percent %7.1f%% %7.1f%% %7.1f%% %7.1f%% ", - p->mem.memfree == 0 ? 0.0 : 100.0*(float)p->mem.memfree/(float)p->mem.memtotal, - p->mem.highfree == 0 ? 0.0 : 100.0*(float)p->mem.highfree/(float)p->mem.hightotal, - p->mem.lowfree == 0 ? 0.0 : 100.0*(float)p->mem.lowfree/(float)p->mem.lowtotal, - p->mem.swapfree == 0 ? 0.0 : 100.0*(float)p->mem.swapfree/(float)p->mem.swaptotal); - - - mvwprintw(padmem,5, 1, " MB MB MB"); -#ifdef LARGEMEM - mvwprintw(padmem,6, 1, " Cached=%8.1f Active=%8.1f", - p->mem.cached/1024.0, - p->mem.active/1024.0); -#else - mvwprintw(padmem,6, 1, " Shared=%8.1f Cached=%8.1f Active=%8.1f", - p->mem.memshared/1024.0, - p->mem.cached/1024.0, - p->mem.active/1024.0); - mvwprintw(padmem,5, 68, "MB"); - mvwprintw(padmem,6, 55, "bigfree=%8.1f", - p->mem.bigfree/1024); -#endif /*LARGEMEM*/ - mvwprintw(padmem,7, 1, "Buffers=%8.1f Swapcached=%8.1f Inactive =%8.1f", - p->mem.buffers/1024.0, - p->mem.swapcached/1024.0, - p->mem.inactive/1024.0); - - mvwprintw(padmem,8, 1, "Dirty =%8.1f Writeback =%8.1f Mapped =%8.1f", - p->mem.dirty/1024.0, - p->mem.writeback/1024.0, - p->mem.mapped/1024.0); - mvwprintw(padmem,9, 1, "Slab =%8.1f Commit_AS =%8.1f PageTables=%8.1f", - p->mem.slab/1024.0, - p->mem.committed_as/1024.0, - p->mem.pagetables/1024.0); -#ifdef POWER - if(!show_lpar) /* check if already called above */ - proc_lparcfg(); - if(!lparcfg.cmo_enabled) - mvwprintw(padmem,10, 1, "AMS is not active"); - else - mvwprintw(padmem,10, 1, "AMS id=%d Weight=%-3d pmem=%ldMB hpi=%.1f/s hpit=%.1f(sec) Pool=%ldMB Loan=%ldKB ", - (int)lparcfg.entitled_memory_pool_number, - (int)lparcfg.entitled_memory_weight, - (long)(lparcfg.backing_memory)/1024/1024, - (double)(lparcfg.cmo_faults_diff)/elapsed, - (double)(lparcfg.cmo_fault_time_usec_diff)/1000/1000/elapsed, - (long)lparcfg.entitled_memory_pool_size/1024/1024, - (long)lparcfg.entitled_memory_loan_request/1024); - - DISPLAY(padmem,11); -#else /* POWER */ - DISPLAY(padmem,10); -#endif /* POWER */ - } else { - - if(show_rrd) - str_p = "rrdtool update mem.rrd %s:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f\n"; - else - str_p = "MEM,%s,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f\n"; - fprintf(fp,str_p, - LOOP, - p->mem.memtotal/1024.0, - p->mem.hightotal/1024.0, - p->mem.lowtotal/1024.0, - p->mem.swaptotal/1024.0, - p->mem.memfree/1024.0, - p->mem.highfree/1024.0, - p->mem.lowfree/1024.0, - p->mem.swapfree/1024.0, - p->mem.memshared/1024.0, - p->mem.cached/1024.0, - p->mem.active/1024.0, -#ifdef LARGEMEM - -1.0, -#else - p->mem.bigfree/1024.0, -#endif /*LARGEMEM*/ - p->mem.buffers/1024.0, - p->mem.swapcached/1024.0, - p->mem.inactive/1024.0); -#ifdef POWER - if(!show_rrd)fprintf(fp,"MEMAMS,%s,%d,%d,%.1f,%.3lf,0,0,0,%.1f,%ld,%ld,%ld\n", - LOOP, - (int)lparcfg.entitled_memory_pool_number, - (int)lparcfg.entitled_memory_weight, - (float)(lparcfg.cmo_faults_diff)/elapsed, - (float)(lparcfg.cmo_fault_time_usec_diff)/1000/1000/elapsed, - /* three zeros here */ - (float)(lparcfg.backing_memory)/1024/1024, - lparcfg.cmo_page_size/1024, - lparcfg.entitled_memory_pool_size/1024/1024, - lparcfg.entitled_memory_loan_request/1024); -#endif /* POWER */ - } -/* for testing large page - p->mem.hugefree = 250; - p->mem.hugetotal = 1000; - p->mem.hugesize = 16*1024; -*/ - } - if (show_large) { - proc_read(P_MEMINFO); - proc_mem(); - if(cursed) { - BANNER(padlarge,"Large (Huge) Page Stats"); - if(p->mem.hugetotal > 0) { - if(p->mem.hugetotal - p->mem.hugefree > huge_peak) - huge_peak = p->mem.hugetotal - p->mem.hugefree; - mvwprintw(padlarge,1, 1, "Total Pages=%7ld 100.0%% Huge Page Size =%ld KB", p->mem.hugetotal, p->mem.hugesize); - mvwprintw(padlarge,2, 1, "Used Pages=%7ld %5.1f%% Used Pages Peak=%-8ld", - (long)(p->mem.hugetotal - p->mem.hugefree), - (p->mem.hugetotal - p->mem.hugefree)/(float)p->mem.hugetotal*100.0, - huge_peak); - mvwprintw(padlarge,3, 1, "Free Pages=%7ld %5.1f%%", p->mem.hugefree, p->mem.hugefree/(float)p->mem.hugetotal*100.0); - } else { - mvwprintw(padlarge,1, 1, " There are no Huge Pages"); - mvwprintw(padlarge,2, 1, " - see /proc/meminfo"); - } - DISPLAY(padlarge,4); - } else { - if(p->mem.hugetotal > 0) { - if(first_huge == 1){ - first_huge=0; - fprintf(fp,"HUGEPAGES,Huge Page Use %s,HugeTotal,HugeFree,HugeSizeMB\n", run_name); - } - fprintf(fp,"HUGEPAGES,%s,%ld,%ld,%.1f\n", - LOOP, - p->mem.hugetotal, - p->mem.hugefree, - p->mem.hugesize/1024.0); - } - } - } - if (show_vm) { -#define VMDELTA(variable) (p->vm.variable - q->vm.variable) -#define VMCOUNT(variable) (p->vm.variable ) - ret = read_vmstat(); - if(cursed) { - BANNER(padpage,"Virtual-Memory"); - if(ret < 0 ) { - mvwprintw(padpage,2, 2, "Virtual Memory stats not supported with this kernel"); - mvwprintw(padpage,3, 2, "/proc/vmstat only seems to appear in 2.6 onwards"); - - } else { - if(vm_first_time) { - mvwprintw(padpage,2, 2, "Please wait - collecting data"); - vm_first_time=0; - } else { - mvwprintw(padpage,1, 0, "nr_dirty =%9lld pgpgin =%8lld", - VMCOUNT(nr_dirty), - VMDELTA(pgpgin)); - mvwprintw(padpage,2, 0, "nr_writeback=%9lld pgpgout =%8lld", - VMCOUNT(nr_writeback), - VMDELTA(pgpgout)); - mvwprintw(padpage,3, 0, "nr_unstable =%9lld pgpswpin =%8lld", - VMCOUNT(nr_unstable), - VMDELTA(pswpin)); - mvwprintw(padpage,4, 0, "nr_table_pgs=%9lld pgpswpout =%8lld", - VMCOUNT(nr_page_table_pages), - VMDELTA(pswpout)); - mvwprintw(padpage,5, 0, "nr_mapped =%9lld pgfree =%8lld", - VMCOUNT(nr_mapped), - VMDELTA(pgfree)); - mvwprintw(padpage,6, 0, "nr_slab =%9lld pgactivate =%8lld", - VMCOUNT(nr_slab), - VMDELTA(pgactivate)); - mvwprintw(padpage,7, 0, " pgdeactivate=%8lld", - VMDELTA(pgdeactivate)); - mvwprintw(padpage,8, 0, "allocstall =%9lld pgfault =%8lld kswapd_steal =%7lld", - VMDELTA(allocstall), - VMDELTA(pgfault), - VMDELTA(kswapd_steal)); - mvwprintw(padpage,9, 0, "pageoutrun =%9lld pgmajfault =%8lld kswapd_inodesteal=%7lld", - VMDELTA(pageoutrun), - VMDELTA(pgmajfault), - VMDELTA(kswapd_inodesteal)); - mvwprintw(padpage,10, 0,"slabs_scanned=%8lld pgrotated =%8lld pginodesteal =%7lld", - VMDELTA(slabs_scanned), - VMDELTA(pgrotated), - VMDELTA(pginodesteal)); - - - - mvwprintw(padpage,1, 46, " High Normal DMA"); - mvwprintw(padpage,2, 46, "alloc %7lld%7lld%7lld", - VMDELTA(pgalloc_high), - VMDELTA(pgalloc_normal), - VMDELTA(pgalloc_dma)); - mvwprintw(padpage,3, 46, "refill %7lld%7lld%7lld", - VMDELTA(pgrefill_high), - VMDELTA(pgrefill_normal), - VMDELTA(pgrefill_dma)); - mvwprintw(padpage,4, 46, "steal %7lld%7lld%7lld", - VMDELTA(pgsteal_high), - VMDELTA(pgsteal_normal), - VMDELTA(pgsteal_dma)); - mvwprintw(padpage,5, 46, "scan_kswapd%7lld%7lld%7lld", - VMDELTA(pgscan_kswapd_high), - VMDELTA(pgscan_kswapd_normal), - VMDELTA(pgscan_kswapd_dma)); - mvwprintw(padpage,6, 46, "scan_direct%7lld%7lld%7lld", - VMDELTA(pgscan_direct_high), - VMDELTA(pgscan_direct_normal), - VMDELTA(pgscan_direct_dma)); - } - } - DISPLAY(padpage,11); - } else { - if( ret < 0) { - show_vm=0; - } else if(vm_first_time) { - vm_first_time=0; -fprintf(fp,"VM,Paging and Virtual Memory,nr_dirty,nr_writeback,nr_unstable,nr_page_table_pages,nr_mapped,nr_slab,pgpgin,pgpgout,pswpin,pswpout,pgfree,pgactivate,pgdeactivate,pgfault,pgmajfault,pginodesteal,slabs_scanned,kswapd_steal,kswapd_inodesteal,pageoutrun,allocstall,pgrotated,pgalloc_high,pgalloc_normal,pgalloc_dma,pgrefill_high,pgrefill_normal,pgrefill_dma,pgsteal_high,pgsteal_normal,pgsteal_dma,pgscan_kswapd_high,pgscan_kswapd_normal,pgscan_kswapd_dma,pgscan_direct_high,pgscan_direct_normal,pgscan_direct_dma\n"); - } - if(show_rrd) - str_p = "rrdtool update vm.rrd %s" - ":%lld:%lld:%lld:%lld:%lld" - ":%lld:%lld:%lld:%lld:%lld" - ":%lld:%lld:%lld:%lld:%lld" - ":%lld:%lld:%lld:%lld:%lld" - ":%lld:%lld:%lld:%lld:%lld" - ":%lld:%lld:%lld:%lld:%lld" - ":%lld:%lld:%lld:%lld:%lld" - ":%lld:%lld\n"; - else - str_p = "VM,%s" - ",%lld,%lld,%lld,%lld,%lld" - ",%lld,%lld,%lld,%lld,%lld" - ",%lld,%lld,%lld,%lld,%lld" - ",%lld,%lld,%lld,%lld,%lld" - ",%lld,%lld,%lld,%lld,%lld" - ",%lld,%lld,%lld,%lld,%lld" - ",%lld,%lld,%lld,%lld,%lld" - ",%lld,%lld\n"; - - fprintf(fp, str_p, - LOOP, - VMCOUNT(nr_dirty), - VMCOUNT(nr_writeback), - VMCOUNT(nr_unstable), - VMCOUNT(nr_page_table_pages), - VMCOUNT(nr_mapped), - VMCOUNT(nr_slab), - VMDELTA(pgpgin), - VMDELTA(pgpgout), - VMDELTA(pswpin), - VMDELTA(pswpout), - VMDELTA(pgfree), - VMDELTA(pgactivate), - VMDELTA(pgdeactivate), - VMDELTA(pgfault), - VMDELTA(pgmajfault), - VMDELTA(pginodesteal), - VMDELTA(slabs_scanned), - VMDELTA(kswapd_steal), - VMDELTA(kswapd_inodesteal), - VMDELTA(pageoutrun), - VMDELTA(allocstall), - VMDELTA(pgrotated), - VMDELTA(pgalloc_high), - VMDELTA(pgalloc_normal), - VMDELTA(pgalloc_dma), - VMDELTA(pgrefill_high), - VMDELTA(pgrefill_normal), - VMDELTA(pgrefill_dma), - VMDELTA(pgsteal_high), - VMDELTA(pgsteal_normal), - VMDELTA(pgsteal_dma), - VMDELTA(pgscan_kswapd_high), - VMDELTA(pgscan_kswapd_normal), - VMDELTA(pgscan_kswapd_dma), - VMDELTA(pgscan_direct_high), - VMDELTA(pgscan_direct_normal), - VMDELTA(pgscan_direct_dma)); - } - } - if (show_kernel) { - proc_read(P_STAT); - proc_cpu(); - proc_read(P_UPTIME); - proc_read(P_LOADAVG); - proc_kernel(); - if(cursed) { - BANNER(padker,"Kernel Stats"); - mvwprintw(padker,1, 1, "RunQueue %8lld Load Average CPU use since boot time", - p->cpu_total.running); - updays=p->cpu_total.uptime/60/60/24; - uphours=(p->cpu_total.uptime-updays*60*60*24)/60/60; - upmins=(p->cpu_total.uptime-updays*60*60*24-uphours*60*60)/60; - mvwprintw(padker,2, 1, "ContextSwitch %8.1f 1 mins %5.2f Uptime Days=%3d Hours=%2d Mins=%2d", - (float)(p->cpu_total.ctxt - q->cpu_total.ctxt)/elapsed, - (float)p->cpu_total.mins1, - updays, uphours, upmins); - updays=p->cpu_total.idletime/60/60/24; - uphours=(p->cpu_total.idletime-updays*60*60*24)/60/60; - upmins=(p->cpu_total.idletime-updays*60*60*24-uphours*60*60)/60; - mvwprintw(padker,3, 1, "Forks %8.1f 5 mins %5.2f Idle Days=%3d Hours=%2d Mins=%2d", - (float)(p->cpu_total.procs - q->cpu_total.procs)/elapsed, - (float)p->cpu_total.mins5, - updays, uphours, upmins); - - mvwprintw(padker,4, 1, "Interrupts %8.1f 15 mins %5.2f Average CPU use=%6.2f%%", - (float)(p->cpu_total.intr - q->cpu_total.intr)/elapsed, - (float)p->cpu_total.mins15, - (float)( - (p->cpu_total.uptime - - p->cpu_total.idletime)/ - p->cpu_total.uptime *100.0)); - DISPLAY(padker,5); - } else { - if(proc_first_time) { - q->cpu_total.ctxt = p->cpu_total.ctxt; - q->cpu_total.procs= p->cpu_total.procs; - proc_first_time=0; - } -/*fprintf(fp,"PROC,Processes %s,Runnable,Swap-in,pswitch,syscall,read,write,fork,exec,sem,msg\n", run_name);*/ - if(show_rrd) - str_p = "rrdtool update proc.rrd %s:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f:%.1f\n"; - else - str_p = "PROC,%s,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f,%.1f\n"; - - fprintf(fp,str_p, - LOOP, - (float)p->cpu_total.running,/*runqueue*/ - -1.0, /*swapin*/ - /*pswitch*/ - (float)(p->cpu_total.ctxt - q->cpu_total.ctxt)/elapsed, - -1.0, /*syscall*/ - -1.0, /*read*/ - -1.0, /*write*/ - /*fork*/ - (float)(p->cpu_total.procs - q->cpu_total.procs)/elapsed, - -1.0, /*exec*/ - -1.0, /*sem*/ - -1.0); /*msg*/ - } - } - - if (show_nfs) { - proc_read(P_NFS); - proc_read(P_NFSD); - proc_nfs(); - - if(cursed) { - BANNER(padnfs,"Network Filesystem (NFS) I/O"); - mvwprintw(padnfs,1, 0, " Version 2 Client Server"); - mvwprintw(padnfs,1, 41, "Version 3 Client Server"); -#define NFS_TOTAL(member) (float)(p->member) -#define NFS_DELTA(member) (((float)(p->member - q->member)/elapsed)) - v2c_total =0; - v2s_total =0; - v3c_total =0; - v3s_total =0; - for(i=0;i<18;i++) { - mvwprintw(padnfs,2+i, 1, "%12s %8.1f %8.1f", - nfs_v2_names[i], - NFS_DELTA(nfs.v2c[i]), - NFS_DELTA(nfs.v2s[i])); - v2c_total +=NFS_DELTA(nfs.v2c[i]); - v2s_total +=NFS_DELTA(nfs.v2s[i]); - } - for(i=0;i<22;i++) { - mvwprintw(padnfs,2+i, 41, "%12s %8.1f %8.1f", - nfs_v3_names[i], - NFS_DELTA(nfs.v3c[i]), - NFS_DELTA(nfs.v3s[i])); - v3c_total +=NFS_DELTA(nfs.v3c[i]); - v3s_total +=NFS_DELTA(nfs.v3s[i]); - } - mvwprintw(padnfs,2+19, 1, "%12s %8.1f %8.1f", - "V2 Totals", v2c_total,v2s_total); - mvwprintw(padnfs,2+20, 1, "%12s %8.1f %8.1f", - "V3 Totals", v3c_total,v3s_total); - - DISPLAY(padnfs,24); - } else { - if(nfs_first_time && ! show_rrd) { - fprintf(fp,"NFSCLIV2,NFS Client v2"); - for(i=0;i<18;i++) - fprintf(fp,",%s",nfs_v2_names[i]); - fprintf(fp,"\n"); - fprintf(fp,"NFSSVRV2,NFS Server v2"); - for(i=0;i<18;i++) - fprintf(fp,",%s",nfs_v2_names[i]); - fprintf(fp,"\n"); - - fprintf(fp,"NFSCLIV3,NFS Client v3"); - for(i=0;i<22;i++) - fprintf(fp,",%s",nfs_v3_names[i]); - fprintf(fp,"\n"); - fprintf(fp,"NFSSVRV3,NFS Server v3"); - for(i=0;i<22;i++) - fprintf(fp,",%s",nfs_v3_names[i]); - fprintf(fp,"\n"); - memcpy(&q->nfs,&p->nfs,sizeof(struct nfs_stat)); - nfs_first_time=0; - } - fprintf(fp,show_rrd ? "rrdtool update nfscliv2.rrd %s" : "NFSCLIV2,%s", LOOP); - for(i=0;i<18;i++) { - fprintf(fp,show_rrd ? ":%d" : ",%d", - (int)NFS_DELTA(nfs.v2c[i])); - } - fprintf(fp,"\n"); - fprintf(fp,show_rrd ? "rrdtool update nfsvriv2.rrd %s" : "NFSSVRV2,%s,", LOOP); - for(i=0;i<18;i++) { - fprintf(fp,show_rrd ? ":%d" : ",%d", - (int)NFS_DELTA(nfs.v2s[i])); - } - fprintf(fp,"\n"); - fprintf(fp,show_rrd ? "rrdtool update nfscliv3.rrd %s" : "NFSCLIV3,%s,", LOOP); - for(i=0;i<22;i++) { - fprintf(fp,show_rrd ? ":%d" : ",%d", - (int)NFS_DELTA(nfs.v3c[i])); - } - fprintf(fp,"\n"); - fprintf(fp,show_rrd ? "rrdtool update nfsvriv3.rrd %s" : "NFSSVRV3,%s,", LOOP); - for(i=0;i<22;i++) { - fprintf(fp,show_rrd ? ":%d" : ",%d", - (int)NFS_DELTA(nfs.v3s[i])); - } - fprintf(fp,"\n"); - } - } - if (show_net) { - if(cursed) { - BANNER(padnet,"Network I/O"); - mvwprintw(padnet,1, 0, "I/F Name Recv=KB/s Trans=KB/s packin packout insize outsize Peak->Recv Trans"); - } - proc_net(); - for (i = 0; i < networks; i++) { - -#define IFDELTA(member) ((float)( (q->ifnets[i].member > p->ifnets[i].member) ? 0 : (p->ifnets[i].member - q->ifnets[i].member)/elapsed) ) -#define IFDELTA_ZERO(member1,member2) ((IFDELTA(member1) == 0) || (IFDELTA(member2)== 0)? 0.0 : IFDELTA(member1)/IFDELTA(member2) ) - - if(net_read_peak[i] < IFDELTA(if_ibytes) / 1024.0) - net_read_peak[i] = IFDELTA(if_ibytes) / 1024.0; - if(net_write_peak[i] < IFDELTA(if_obytes) / 1024.0) - net_write_peak[i] = IFDELTA(if_obytes) / 1024.0; - - CURSE mvwprintw(padnet,2 + i, 0, "%8s %7.1f %7.1f %6.1f %6.1f %6.1f %6.1f %7.1f %7.1f ", - &p->ifnets[i].if_name[0], - IFDELTA(if_ibytes) / 1024.0, - IFDELTA(if_obytes) / 1024.0, - IFDELTA(if_ipackets), - IFDELTA(if_opackets), - IFDELTA_ZERO(if_ibytes, if_ipackets), - IFDELTA_ZERO(if_obytes, if_opackets), - net_read_peak[i], - net_write_peak[i] - ); - } - DISPLAY(padnet,networks + 2); - if (!cursed) { - fprintf(fp,show_rrd ? "rrdtool update net.rrd %s" : "NET,%s,", LOOP); - for (i = 0; i < networks; i++) { - fprintf(fp,show_rrd ? ":%.1f" : "%.1f,", IFDELTA(if_ibytes) / 1024.0); - } - for (i = 0; i < networks; i++) { - fprintf(fp,show_rrd ? ":%.1f" : "%.1f,", IFDELTA(if_obytes) / 1024.0); - } - fprintf(fp,"\n"); - fprintf(fp,show_rrd ? "rrdtool update netpacket.rrd %s" : "NETPACKET,%s,", LOOP); - for (i = 0; i < networks; i++) { - fprintf(fp,show_rrd ? ":%.1f" : "%.1f,", IFDELTA(if_ipackets) ); - } - for (i = 0; i < networks; i++) { - fprintf(fp,show_rrd ? ":%.1f" : "%.1f,", IFDELTA(if_opackets) ); - } - fprintf(fp,"\n"); - } - } - errors=0; - for (i = 0; i < networks; i++) { - errors += p->ifnets[i].if_ierrs - q->ifnets[i].if_ierrs - + p->ifnets[i].if_oerrs - q->ifnets[i].if_oerrs - + p->ifnets[i].if_ocolls - q->ifnets[i].if_ocolls; - } - if(errors) show_neterror=3; - if(show_neterror) { - if(cursed) { - BANNER(padneterr,"Network Error Counters"); - mvwprintw(padneterr,1, 0, "I/F Name iErrors iDrop iOverrun iFrame oErrors oDrop oOverrun oCarrier oColls "); - } - for (i = 0; i < networks; i++) { - CURSE mvwprintw(padneterr,2 + i, 0, "%8s %7lu %7lu %7lu %7lu %7lu %7lu %7lu %7lu %7lu", - &p->ifnets[i].if_name[0], - p->ifnets[i].if_ierrs, - p->ifnets[i].if_idrop, - p->ifnets[i].if_ififo, - p->ifnets[i].if_iframe, - p->ifnets[i].if_oerrs, - p->ifnets[i].if_odrop, - p->ifnets[i].if_ofifo, - p->ifnets[i].if_ocarrier, - p->ifnets[i].if_ocolls); - - } - DISPLAY(padneterr,networks + 2); - if(show_neterror > 0) show_neterror--; - } -#ifdef JFS - if (show_jfs) { - if(cursed) { - BANNER(padjfs,"Filesystems"); - mvwprintw(padjfs,1, 0, "Filesystem SizeMB FreeMB %%Used Type MountPoint"); - - for (k = 0; k < jfses; k++) { - fs_size=0; - fs_free=0; - fs_size_used=100.0; - if(jfs[k].mounted) { - if(!strncmp(jfs[k].name,"/proc/",6) /* sub directorys have to be fake too */ - || !strncmp(jfs[k].name,"/sys/",5) - || !strncmp(jfs[k].name,"/dev/",5) - || !strncmp(jfs[k].name,"/proc",6) /* one more than the string to ensure the NULL */ - || !strncmp(jfs[k].name,"/sys",5) - || !strncmp(jfs[k].name,"/dev",5) - ) { /* /proc gives invalid/insane values */ - mvwprintw(padjfs,2+k, 0, "%-14s", jfs[k].name); - mvwprintw(padjfs,2+k, 43, "%-8s not a real filesystem",jfs[k].type); - } else { - statfs_buffer.f_blocks=0; - if((ret=fstatfs( jfs[k].fd, &statfs_buffer)) != -1) { - if(statfs_buffer.f_blocks != 0) { - fs_size = (float)statfs_buffer.f_blocks*4.0/1024.0; - fs_free = (float)statfs_buffer.f_bfree*4.0/1024.0; - fs_size_used = ((float)statfs_buffer.f_blocks - (float)statfs_buffer.f_bfree)/(float)statfs_buffer.f_blocks*100.0; - - if( (i=strlen(jfs[k].device)) <20) - str_p=&jfs[k].device[0]; - else { - str_p=&jfs[k].device[i-20]; - } - mvwprintw(padjfs,2+k, 0, "%-20s %7.1f %7.1f %5.1f %-8s %s", - str_p, - fs_size, - fs_free, - fs_size_used, - jfs[k].type, - jfs[k].name - ); - - } else { - mvwprintw(padjfs,2+k, 0, "%s", jfs[k].name); - mvwprintw(padjfs,2+k, 43, "%-8s fstatfs returned zero blocks!!", jfs[k].type); - } - } - else { - mvwprintw(padjfs,2+k, 0, "%s", jfs[k].name); - mvwprintw(padjfs,2+k, 43, "%-8s statfs failed", jfs[k].type); - } - } - } else { - mvwprintw(padjfs,2+k, 0, "%-14s", jfs[k].name); - mvwprintw(padjfs,2+k, 43, "%-8s not mounted",jfs[k].type); - } - } - DISPLAY(padjfs,2 + jfses); - } else { - jfs_load(LOAD); - fprintf(fp,show_rrd ? "rrdtool update jfsfile.rrd %s" : "JFSFILE,%s", LOOP); - for (k = 0; k < jfses; k++) { - if(jfs[k].mounted && strncmp(jfs[k].name,"/proc",5) - && strncmp(jfs[k].name,"/sys",4) - && strncmp(jfs[k].name,"/dev/pts",8) - ) { /* /proc gives invalid/insane values */ - if(fstatfs( jfs[k].fd, &statfs_buffer) != -1) { - fprintf(fp, show_rrd ? ":%.1f" : ",%.1f", - ((float)statfs_buffer.f_blocks - (float)statfs_buffer.f_bfree)/(float)statfs_buffer.f_blocks*100.0); - } - else - fprintf(fp, show_rrd? ":U" : ",0.0"); - } - } - fprintf(fp, "\n"); - jfs_load(UNLOAD); - } - } - -#endif /* JFS */ - - if (show_disk || show_verbose || show_diskmap || show_dgroup) { - proc_read(P_STAT); - proc_disk(elapsed); - } - if (show_diskmap) { - BANNER(padmap,"Disk %%Busy Map"); - mvwprintw(padmap,0, 20,"Key: #=80%% X=60%% O=40%% o=30%% +=20%% -=10%% .=5%% _=0%%"); - mvwprintw(padmap,1, 0," Disk No. 1 2 3 4 5 6 "); - if(disk_first_time) { - disk_first_time=0; - mvwprintw(padmap,2, 0,"Please wait - collecting disk data"); - } else { - mvwprintw(padmap,2, 0,"Disks=%-4d 0123456789012345678901234567890123456789012345678901234567890123", disks); - mvwprintw(padmap,3, 0,"hdisk0 to 63 "); - for (i = 0; i < disks; i++) { - disk_busy = DKDELTA(dk_time) / elapsed; - disk_read = DKDELTA(dk_rkb) / elapsed; - disk_write = DKDELTA(dk_wkb) / elapsed; - if(disk_busy >80) mapch = '#'; - else if(disk_busy>60) mapch = 'X'; - else if(disk_busy>40) mapch = 'O'; - else if(disk_busy>30) mapch = 'o'; - else if(disk_busy>20) mapch = '+'; - else if(disk_busy>10) mapch = '-'; - else if(disk_busy> 5) mapch = '.'; - else mapch = '_'; -#define MAPWRAP 64 - mvwprintw(padmap,3 + (int)(i/MAPWRAP), 13+ (i%MAPWRAP), "%c",mapch); - } - } - DISPLAY(padmap,4 + disks/MAPWRAP); - } - if(show_verbose) { - top_disk_busy = 0.0; - top_disk_name = ""; - for (i = 0,k=0; i < disks; i++) { - disk_busy = DKDELTA(dk_time) / elapsed; - if( disk_busy > top_disk_busy) { - top_disk_busy = disk_busy; - top_disk_name = p->dk[i].dk_name; - } - } - if(top_disk_busy > 80.0) { - COLOUR wattrset(padverb,COLOR_PAIR(1)); - mvwprintw(padverb,3, 0, " DANGER"); - } - else if(top_disk_busy > 60.0) { - COLOUR wattrset(padverb,COLOR_PAIR(4)); - mvwprintw(padverb,3, 0, "Warning"); - } - else { - COLOUR wattrset(padverb,COLOR_PAIR(2)); - mvwprintw(padverb,3, 0, " OK"); - } - COLOUR wattrset(padverb,COLOR_PAIR(0)); - mvwprintw(padverb,3, 8, "-> Top Disk %8s %%busy %5.1f%%\t>40%%\t>60%% ",top_disk_name,top_disk_busy); - move(x,0); - } - if (show_disk) { - if (cursed) { - if(show_disk) { - BANNER(paddisk,"Disk I/O"); - switch(disk_mode) { - case DISK_MODE_PARTITIONS: mvwprintw(paddisk, 0, 12, "/proc/partitions");break; - case DISK_MODE_DISKSTATS: mvwprintw(paddisk, 0, 12, "/proc/diskstats");break; - case DISK_MODE_IO: mvwprintw(paddisk, 0, 12, "/proc/stat+disk_io");break; - } - mvwprintw(paddisk,0, 31, "mostly in KB/s"); - mvwprintw(paddisk,0, 50, "Warning:contains duplicates"); - switch (show_disk) { - case SHOW_DISK_STATS: - mvwprintw(paddisk,1, 0, "DiskName Busy Read Write Xfers Size Peak%% Peak-RW InFlight "); - break; - case SHOW_DISK_GRAPH: - mvwprintw(paddisk,1, 0, "DiskName Busy "); - COLOUR wattrset(paddisk,COLOR_PAIR(6)); - mvwprintw(paddisk,1, 15, "Read "); - COLOUR wattrset(paddisk,COLOR_PAIR(3)); - mvwprintw(paddisk,1, 20, "Write"); - COLOUR wattrset(paddisk,COLOR_PAIR(0)); - mvwprintw(paddisk,1, 25, "KB|0 |25 |50 |75 100|"); - break; - } - } - if(disk_first_time) { - disk_first_time=0; - mvwprintw(paddisk,2, 0, "Please wait - collecting disk data"); - } else { - total_disk_read = 0.0; - total_disk_write = 0.0; - total_disk_xfers = 0.0; - disk_mb = 0; - for (i = 0,k=0; i < disks; i++) { - disk_read = DKDELTA(dk_rkb) / elapsed; - disk_write = DKDELTA(dk_wkb) / elapsed; - if(disk_read > 9999.9 || disk_write > 9999.9) { - disk_mb=1; - COLOUR wattrset(paddisk, COLOR_PAIR(1)); - mvwprintw(paddisk,1, 25, "MB"); - COLOUR wattrset(paddisk, COLOR_PAIR(0)); - break; - } - } - for (i = 0,k=0; i < disks; i++) { -/* - if(p->dk[i].dk_name[0] == 'h') - continue; -*/ - disk_busy = DKDELTA(dk_time) / elapsed; - disk_read = DKDELTA(dk_rkb) / elapsed; - disk_write = DKDELTA(dk_wkb) / elapsed; - disk_xfers = DKDELTA(dk_xfers); - - total_disk_read +=disk_read; - total_disk_write +=disk_write; - total_disk_xfers +=disk_xfers; - - if(disk_busy_peak[i] < disk_busy) - disk_busy_peak[i] = disk_busy; - if(disk_rate_peak[i] < (disk_read+disk_write)) - disk_rate_peak[i] = disk_read+disk_write; - if(!show_all && disk_busy < 1) - continue; - - if(strlen(p->dk[i].dk_name) > 8) - str_p = &p->dk[i].dk_name[strlen(p->dk[i].dk_name) -8]; - else - str_p = &p->dk[i].dk_name[0]; - - if(show_disk == SHOW_DISK_STATS) { - /* output disks stats */ - mvwprintw(paddisk,2 + k, 0, "%-8s %3.0f%% %8.1f %8.1fKB/s %6.1f %5.1fKB %3.0f%% %9.1fKB/s %3d", - str_p, - disk_busy, - disk_read, - disk_write, - disk_xfers / elapsed, - disk_xfers == 0.0 ? 0.0 : - (DKDELTA(dk_rkb) + DKDELTA(dk_wkb) ) / disk_xfers, - disk_busy_peak[i], - disk_rate_peak[i], - p->dk[i].dk_inflight); - k++; - } - if(show_disk == SHOW_DISK_GRAPH) { - /* output disk bar graphs */ - - - if(disk_mb) mvwprintw(paddisk,2 + k, 0, "%-8s %3.0f%% %6.1f %6.1f", - str_p, - disk_busy, - disk_read/1024.0, - disk_write/1024.0); - else mvwprintw(paddisk,2 + k, 0, "%-8s %3.0f%% %6.1f %6.1f", - str_p, - disk_busy, - disk_read, - disk_write); - mvwprintw(paddisk,2 + k, 27, "| "); - wmove(paddisk,2 + k, 28); - if(disk_busy >100) disk_busy=100; - if( disk_busy > 0.0 && (disk_write+disk_read) > 0.1) { - /* 50 columns in the disk graph area so divide % by two */ - readers = disk_busy*disk_read/(disk_write+disk_read)/2; - writers = disk_busy*disk_write/(disk_write+disk_read)/2; - if(readers + writers > 50) { - readers=0; - writers=0; - } - /* don't go beyond row 78 i.e. j = 28 + 50 */ - for (j = 0; j < readers && j<50; j++) { - COLOUR wattrset(paddisk,COLOR_PAIR(12)); - wprintw(paddisk,"R"); - COLOUR wattrset(paddisk,COLOR_PAIR(0)); - } - for (; j < readers + writers && j<50; j++) { - COLOUR wattrset(paddisk,COLOR_PAIR(11)); - wprintw(paddisk,"W"); - COLOUR wattrset(paddisk,COLOR_PAIR(0)); - } - for (j = disk_busy; j < 50; j++) - wprintw(paddisk," "); - } else { - for (j = 0; j < 50; j++) - wprintw(paddisk," "); - if(p->dk[i].dk_time == 0.0) - mvwprintw(paddisk,2 + k, 27, "| disk busy not available"); - } - if(disk_busy_peak[i] >100) - disk_busy_peak[i]=100; - - mvwprintw(paddisk,2 + i, 77, "|"); - /* check rounding has not got the peak ">" over the 100% */ - j = 28+(int)(disk_busy_peak[i]/2); - if(j>77) - j=77; - mvwprintw(paddisk,2 + i, j, ">"); - k++; - } - } - mvwprintw(paddisk,2 + k, 0, "Totals Read-MB/s=%-8.1f Writes-MB/s=%-8.1f Transfers/sec=%-8.1f", - total_disk_read / 1024.0, - total_disk_write / 1024.0, - total_disk_xfers / elapsed); - - } - DISPLAY(paddisk,3 + k); - } else { - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,show_rrd ? "%srrdtool update diskbusy%s.rrd %s" : "%sDISKBUSY%s,%s",i == 0 ? "": "\n", dskgrp(i), LOOP); - /* check percentage is correct */ - ftmp = DKDELTA(dk_time) / elapsed; - if(ftmp > 100.0 || ftmp < 0.0) - fprintf(fp,show_rrd ? ":U" : ",101.00"); - else - fprintf(fp,show_rrd ? ":%.1f" : ",%.1f", - DKDELTA(dk_time) / elapsed); - } - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,show_rrd ? "\nrrdtool update diskread%s.rrd %s" : "\nDISKREAD%s,%s", dskgrp(i),LOOP); - fprintf(fp,show_rrd ? ":%.1f" : ",%.1f", - DKDELTA(dk_rkb) / elapsed); - } - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,show_rrd ? "\nrrdtool update diskwrite%s.rrd %s" : "\nDISKWRITE%s,%s", dskgrp(i),LOOP); - fprintf(fp,show_rrd ? ":%.1f" : ",%.1f", - DKDELTA(dk_wkb) / elapsed); - } - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,show_rrd ? "\nrrdtool update diskxfer%s.rrd %s" : "\nDISKXFER%s,%s", dskgrp(i),LOOP); - disk_xfers = DKDELTA(dk_xfers); - fprintf(fp,show_rrd ? ":%.1f" : ",%.1f", - disk_xfers / elapsed); - } - for (i = 0; i < disks; i++) { - if(NEWDISKGROUP(i)) - fprintf(fp,show_rrd ? "\nrrdtool update diskbsize%s.rrd %s" : "\nDISKBSIZE%s,%s", dskgrp(i),LOOP); - disk_xfers = DKDELTA(dk_xfers); - fprintf(fp,show_rrd ? ":%.1f" : ",%.1f", - disk_xfers == 0.0 ? 0.0 : - (DKDELTA(dk_rkb) + DKDELTA(dk_wkb) ) / disk_xfers); - } - fprintf(fp,"\n"); - } - } - if ((show_dgroup || (!cursed && dgroup_loaded))) { - if (cursed) { - BANNER(paddg,"Disk-Group-I/O"); - if (dgroup_loaded != 2 || dgroup_total_disks == 0) { - mvwprintw(paddg, 1, 1, "No Disk Groups found use -g groupfile when starting nmon"); - n = 0; - } else if (disk_first_time) { - disk_first_time=0; - mvwprintw(paddg, 1, 1, "Please wait - collecting disk data"); - } else { - mvwprintw(paddg, 1, 1, "Name Disks AvgBusy Read|Write-KB/s TotalMB/s xfers/s BlockSizeKB"); - total_busy = 0.0; - total_rbytes = 0.0; - total_wbytes = 0.0; - total_xfers = 0.0; - for(k = n = 0; k < dgroup_total_groups; k++) { -/* - if (dgroup_name[k] == 0 ) - continue; -*/ - disk_busy = 0.0; - disk_read = 0.0; - disk_write = 0.0; - disk_xfers = 0.0; - for (j = 0; j < dgroup_disks[k]; j++) { - i = dgroup_data[k*DGROUPITEMS+j]; - if (i != -1) { - disk_busy += DKDELTA(dk_time) / elapsed; -/* - disk_read += DKDELTA(dk_reads) * p->dk[i].dk_bsize / 1024.0 /elapsed; - disk_write += DKDELTA(dk_writes) * p->dk[i].dk_bsize / 1024.0 /elapsed; -*/ - disk_read += DKDELTA(dk_rkb) /elapsed; - disk_write += DKDELTA(dk_wkb) /elapsed; - disk_xfers += DKDELTA(dk_xfers) /elapsed; - } - } - if (dgroup_disks[k] == 0) - disk_busy = 0.0; - else - disk_busy = disk_busy / dgroup_disks[k]; - total_busy += disk_busy; - total_rbytes += disk_read; - total_wbytes += disk_write; - total_xfers += disk_xfers; -/* if (!show_all && (disk_read < 1.0 && disk_write < 1.0)) - continue; -*/ - if ((disk_read + disk_write) == 0 || disk_xfers == 0) - disk_size = 0.0; - else - disk_size = ((float)disk_read + (float)disk_write) / (float)disk_xfers; - mvwprintw(paddg, n + 2, 1, "%-14s %3d %5.1f%% %9.1f|%-9.1f %6.1f %9.1f %6.1f ", - dgroup_name[k], - dgroup_disks[k], - disk_busy, - disk_read, - disk_write, - (disk_read + disk_write) / 1024, /* in MB */ - disk_xfers, - disk_size - ); - n++; - } - mvwprintw(paddg, n + 2, 1, "Groups=%2d TOTALS %3d %5.1f%% %9.1f|%-9.1f %6.1f %9.1f", - n, - dgroup_total_disks, - total_busy / dgroup_total_disks, - total_rbytes, - total_wbytes, - (((double)total_rbytes + (double)total_wbytes)) / 1024, /* in MB */ - total_xfers - ); - } - DISPLAY(paddg, 3 + dgroup_total_groups); - } else { - if (dgroup_loaded == 2) { - fprintf(fp, show_rrd ? "rrdtool update dgbusy.rdd %s" : "DGBUSY,%s", LOOP); - for (k = 0; k < dgroup_total_groups; k++) { - if (dgroup_name[k] != 0) { - disk_total = 0.0; - for (j = 0; j < dgroup_disks[k]; j++) { - i = dgroup_data[k*DGROUPITEMS+j]; - if (i != -1) { - disk_total += DKDELTA(dk_time) / elapsed; - } - } - fprintf(fp, show_rrd ? ":%.1f" : ",%.1f", (float)(disk_total / dgroup_disks[k])); - } - } - fprintf(fp, "\n"); - fprintf(fp, show_rrd ? "rrdtool update dgread.rdd %s" : "DGREAD,%s", LOOP); - for (k = 0; k < dgroup_total_groups; k++) { - if (dgroup_name[k] != 0) { - disk_total = 0.0; - for (j = 0; j < dgroup_disks[k]; j++) { - i = dgroup_data[k*DGROUPITEMS+j]; - if (i != -1) { -/* - disk_total += DKDELTA(dk_reads) * p->dk[i].dk_bsize / 1024.0; -*/ - disk_total += DKDELTA(dk_rkb); - } - } - fprintf(fp, show_rrd ? ":%.1f" : ",%.1f", disk_total / elapsed); - } - } - fprintf(fp, "\n"); - fprintf(fp, show_rrd ? "rrdtool update dgwrite.rdd %s" : "DGWRITE,%s", LOOP); - for (k = 0; k < dgroup_total_groups; k++) { - if (dgroup_name[k] != 0) { - disk_total = 0.0; - for (j = 0; j < dgroup_disks[k]; j++) { - i = dgroup_data[k*DGROUPITEMS+j]; - if (i != -1) { -/* - disk_total += DKDELTA(dk_writes) * p->dk[i].dk_bsize / 1024.0; -*/ - disk_total += DKDELTA(dk_wkb); - } - } - fprintf(fp, show_rrd ? ":%.1f" : ",%.1f", disk_total / elapsed); - } - } - fprintf(fp, "\n"); - fprintf(fp, show_rrd ? "rrdtool update dgbsize.rdd %s" : "DGSIZE,%s", LOOP); - for (k = 0; k < dgroup_total_groups; k++) { - if (dgroup_name[k] != 0) { - disk_write = 0.0; - disk_xfers = 0.0; - for (j = 0; j < dgroup_disks[k]; j++) { - i = dgroup_data[k*DGROUPITEMS+j]; - if (i != -1) { -/* - disk_write += (DKDELTA(dk_reads) + DKDELTA(dk_writes) ) * p->dk[i].dk_bsize / 1024.0; -*/ - disk_write += (DKDELTA(dk_rkb) + DKDELTA(dk_wkb) ); - disk_xfers += DKDELTA(dk_xfers); - } - } - if ( disk_write == 0.0 || disk_xfers == 0.0) - disk_size = 0.0; - else - disk_size = disk_write / disk_xfers; - fprintf(fp, show_rrd ? ":%.1f" : ",%.1f", disk_size); - } - } - fprintf(fp, "\n"); - fprintf(fp, show_rrd ? "rrdtool update dgxfer.rdd %s" : "DGXFER,%s", LOOP); - for (k = 0; k < dgroup_total_groups; k++) { - if (dgroup_name[k] != 0) { - disk_total = 0.0; - for (j = 0; j < dgroup_disks[k]; j++) { - i = dgroup_data[k*DGROUPITEMS+j]; - if (i != -1) { - disk_total += DKDELTA(dk_xfers); - } - } - fprintf(fp, show_rrd ? ":%.1f" : ",%.1f", disk_total / elapsed); - } - } - fprintf(fp, "\n"); - } - } - } - - if (show_top) { - /* Get the details of the running processes */ - firstproc = 0; - skipped = 0; - n = getprocs(0); - if (n > p->nprocs) { - n = n +128; /* allow for growth in the number of processes in the mean time */ - p->procs = realloc(p->procs, sizeof(struct procsinfo ) * (n+1) ); /* add one to avoid overrun */ - p->nprocs = n; - } - - firstproc = 0; - n = getprocs(1); - - if (topper_size < n) { - topper = realloc(topper, sizeof(struct topper ) * (n+1) ); /* add one to avoid overrun */ - topper_size = n; - } - /* Sort the processes by CPU utilisation */ - for ( i = 0, max_sorted = 0; i < n; i++) { - /* move forward in the previous array to find a match*/ - for(j=0;j < q->nprocs;j++) { - if (p->procs[i].pi_pid == q->procs[j].pi_pid) { /* found a match */ - topper[max_sorted].index = i; - topper[max_sorted].other = j; - topper[max_sorted].time = TIMEDELTA(pi_utime,i,j) + - TIMEDELTA(pi_stime,i,j); - topper[max_sorted].size = p->procs[i].statm_resident; - - max_sorted++; - break; - } - } - } - switch(show_topmode) { - default: - case 3: qsort((void *) & topper[0], max_sorted, sizeof(struct topper ), &cpu_compare ); - break; - case 4: qsort((void *) & topper[0], max_sorted, sizeof(struct topper ), &size_compare ); - break; -#ifdef DISK - case 5: qsort((void *) & topper[0], max_sorted, sizeof(struct topper ), &disk_compare ); - break; -#endif /* DISK */ - } - CURSE BANNER(padtop,"Top Processes"); - CURSE mvwprintw(padtop,0, 15, "Procs=%d mode=%d (1=Basic, 3=Perf 4=Size 5=I/O)", n, show_topmode); - if(cursed && top_first_time) { - top_first_time = 0; - mvwprintw(padtop,1, 1, "Please wait - information being collected"); - } - else { - switch (show_topmode) { - case 1: - CURSE mvwprintw(padtop,1, 1, " PID PPID Pgrp Nice Prior Status proc-Flag Command"); - for (j = 0; j < max_sorted; j++) { - i = topper[j].index; - if (p->procs[i].pi_pgrp == p->procs[i].pi_pid) - strcpy(pgrp, "none"); - else - sprintf(&pgrp[0], "%d", p->procs[i].pi_pgrp); - /* skip over processes with 0 CPU */ - if(!show_all && (topper[j].time/elapsed < ignore_procdisk_threshold) && !cmdfound) - break; - if( x + j + 2 - skipped > LINES+2) /* +2 to for safety :-) */ - break; - CURSE mvwprintw(padtop,j + 2 - skipped, 1, "%7d %7d %6s %4d %4d %9s 0x%08x %1s %-32s", - p->procs[i].pi_pid, - p->procs[i].pi_ppid, - pgrp, - p->procs[i].pi_nice, - p->procs[i].pi_pri, - - (topper[j].time * 100 / elapsed) ? "Running " - : get_state(p->procs[i].pi_state), - p->procs[i].pi_flags, - (p->procs[i].pi_tty_nr ? "F" : " "), - p->procs[i].pi_comm); - } - break; - case 3: - case 4: - case 5: - - if(show_args == ARGS_ONLY) - formatstring = " PID %%CPU ResSize Command "; - - else if(COLS > 119) - formatstring = " PID %%CPU Size Res Res Res Res Shared Faults Command"; - else - formatstring = " PID %%CPU Size Res Res Res Res Shared Faults Command"; - CURSE mvwprintw(padtop,1, y, formatstring); - - if(show_args == ARGS_ONLY) - formatstring = " Used KB "; - else if(COLS > 119) - formatstring = " Used KB Set Text Data Lib KB Min Maj"; - else - formatstring = " Used KB Set Text Data Lib KB Min Maj "; - CURSE mvwprintw(padtop,2, 1, formatstring); - for (j = 0; j < max_sorted; j++) { - i = topper[j].index; - if(!show_all) { - /* skip processes with zero CPU/io */ - if(show_topmode == 3 && (topper[j].time/elapsed) < ignore_procdisk_threshold && !cmdfound) - break; - if(show_topmode == 5 && (topper[j].io < ignore_io_threshold && !cmdfound)) - break; - } - if(cursed) { - if( x + j + 3 - skipped > LINES+2) /* +2 to for safety :-) */ - break; - if(cmdfound && !cmdcheck(p->procs[i].pi_comm)) { - skipped++; - continue; - } - if(show_args == ARGS_ONLY){ - mvwprintw(padtop,j + 3 - skipped, 1, - "%7d %5.1f %7lu %-120s", - p->procs[i].pi_pid, - topper[j].time / elapsed, - p->procs[i].statm_resident*4, - args_lookup(p->procs[i].pi_pid, - p->procs[i].pi_comm)); - } - else { - if(COLS > 119) - formatstring = "%8d %7.1f %7lu %7lu %7lu %7lu %7lu %5lu %6d %6d %-32s"; - else - formatstring = "%7d %5.1f %5lu %5lu %5lu %5lu %5lu %5lu %4d %4d %-32s"; - mvwprintw(padtop,j + 3 - skipped, 1, formatstring, - p->procs[i].pi_pid, - topper[j].time/elapsed, - /* topper[j].time /1000.0 / elapsed,*/ - p->procs[i].statm_size*4 , - p->procs[i].statm_resident*4, - p->procs[i].statm_trs*4, - p->procs[i].statm_drs*4, - p->procs[i].statm_lrs*4, - p->procs[i].statm_share*4, - (int)(COUNTDELTA(pi_minflt) / elapsed), - (int)(COUNTDELTA(pi_majflt) / elapsed), - p->procs[i].pi_comm); - } - } - else { - if((cmdfound && cmdcheck(p->procs[i].pi_comm)) || - (!cmdfound && ((topper[j].time / elapsed) > ignore_procdisk_threshold)) ) - { - fprintf(fp,"TOP,%07d,%s,%.1f,%.1f,%.1f,%lu,%lu,%lu,%lu,%lu,%d,%d,%s\n", - /* 1 */ p->procs[i].pi_pid, - /* 2 */ LOOP, - /* 3 */ topper[j].time / elapsed, - /* 4 */ TIMEDELTA(pi_utime,i,topper[j].other) / elapsed, - /* 5 */ TIMEDELTA(pi_stime,i,topper[j].other) / elapsed, - /* 6 */ p->procs[i].statm_size*4, - /* 7 */ p->procs[i].statm_resident*4, - /* 8 */ p->procs[i].statm_trs*4, - /* 9 */ p->procs[i].statm_drs*4, - /* 10*/ p->procs[i].statm_share*4, - /* 11*/ (int)(COUNTDELTA(pi_minflt) / elapsed), - /* 12*/ (int)(COUNTDELTA(pi_majflt) / elapsed), - /* 13*/ p->procs[i].pi_comm); - - if(show_args) - args_output(p->procs[i].pi_pid,loop, p->procs[i].pi_comm); - - } else skipped++; - } - } - break; - } - } - CURSE DISPLAY(padtop,j + 3); - } - - if(cursed) { - if(show_verbose) { - y=x; - x=1; - DISPLAY(padverb,4); - x=y; - } - if(x<LINES-2)mvwhline(stdscr, x, 1, ACS_HLINE,COLS-2); - wmove(stdscr,0, 0); - wrefresh(stdscr); - doupdate(); - - for (i = 0; i < seconds; i++) { - sleep(1); - if (checkinput()) - break; - } - } - else { - fflush(NULL); - secs = seconds; -redo: - errno = 0; - ret = sleep(secs); - if( ret != 0 || errno != 0) { - fprintf(fp,"sleep got interrupted\n"); - fprintf(fp,"ret was %d\n",ret); - fprintf(fp,"errno was %d\n",errno); - secs=ret; - goto redo; - } - } - - switcher(); - - if (loop >= maxloops) { - CURSE endwin(); - if (nmon_end) { - child_start(CHLD_END, nmon_end, time_stamp_type, loop, timer); - /* Give the end - processing some time - 5s for now */ - sleep(5); - } - - fflush(NULL); - exit(0); - } - } -} diff --git a/nosr-git/PKGBUILD b/nosr-git/PKGBUILD deleted file mode 100644 index f838831..0000000 --- a/nosr-git/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -# Contributor: Dave Reisner <d@falconindy.com> - -pkgname=nosr-git -pkgver=20110901 -pkgrel=1 -pkgdesc="search for files in uninstalled packages" -arch=('i686' 'x86_64') -url="http://github.com/falconindy/nosr" -license=('MIT') -depends=('libarchive' 'curl' 'pcre' 'pacman') -makedepends=('git' 'perl') -conflicts=('nosr') -provides=('nosr') - -_gitroot="git://github.com/falconindy/nosr.git" -_gitname="nosr" - -build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [[ -d $_gitname ]] ; then - cd $_gitname && git pull origin - msg "The local files are updated." - else - git clone $_gitroot $_gitname - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - rm -rf "$srcdir/$_gitname-build" - cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" - - make -} - -package() { - cd "$srcdir/$_gitname-build" - make PREFIX=/usr DESTDIR="$pkgdir" install -} - -# vim: ft=sh syn=sh et diff --git a/ompload/PKGBUILD b/ompload/PKGBUILD deleted file mode 100644 index 96969b6..0000000 --- a/ompload/PKGBUILD +++ /dev/null @@ -1,17 +0,0 @@ -#Maintainer: FallenWizard <fallenwiz@gmail.com> - -pkgname=ompload -pkgver=20090529 -pkgrel=1 -pkgdesc="Script to upload files to omploader.org" -arch=('i686' 'x86_64') -license=('GPL') -depends=('ruby>=1.8' 'curl') -url="http://omploader.org" -source=(${pkgname}) -md5sums=('184394e71161d7c41401a6c42d78f5e6') - -build() { - cd ${startdir}/src - install -D -m755 ${pkgname} ${startdir}/pkg/usr/bin/${pkgname} -} diff --git a/ompload/ompload b/ompload/ompload deleted file mode 100644 index d639f3c..0000000 --- a/ompload/ompload +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/env ruby -# -# Copyright 2007-2009 David Shakaryan <omp@gentoo.org> -# Copyright 2007-2009 Brenden Matthews <brenden@rty.ca> -# -# Distributed under the terms of the GNU General Public License v3 -# - -require 'tempfile' - -argv = Array.new - -quiet = false -url_only = false -help = false -skip = false -filename = 'pasta' - -$stdin.fcntl(4, File::NONBLOCK) -stdin = $stdin.read if !$stdin.eof -unless stdin.nil? - argv << '' -end - -ARGV.each_index do |i| - if skip - skip = false - next - end - if ARGV[i] =~ /-q|--quiet/ - quiet = true - elsif ARGV[i] =~ /-u|--url/ - url_only = true - elsif ARGV[i] =~ /-h|--help/ - help = true - elsif ARGV[i] =~ /-f|--filename/ - filename = ARGV[i + 1] - skip = true - else - argv << ARGV[i] - end -end - -nocurl = false -curl = %x{curl --version 2> /dev/null} -if curl.empty? - nocurl = true - $stderr.puts 'Error: curl missing or not in path. Cannot continue.' - $stderr.puts -end - -if (ARGV.size < 1 and (stdin.nil? or stdin.empty?)) or help or nocurl - $stderr.puts 'Usage: ompload [-h|--help] [options] [file(s)]' - $stderr.puts ' -q, --quiet Only output errors and warnings' - $stderr.puts ' -u, --url Only output URL when finished' - $stderr.puts ' -f, --filename Filename to use when posting data' - $stderr.puts ' from stdin' - $stderr.puts - $stderr.puts ' You can supply a list of files or data via stdin (or both)' - $stderr.puts - $stderr.puts ' This script requires a copy of cURL in the path.' - Process.exit -end - -errors = 0 - -wait = 5 - -Url = 'http://omploader.org/' -Max_size = 2**30 - -used_stdin = false -first = true - -argv.each do |arg| - - if stdin.nil? and !used_stdin and !File.file?(arg) - $stderr.puts "Invalid argument '#{arg}': file does not exist (or is not a regular file)." - errors += 1 - next - elsif File.size(arg) > Max_size - $stderr.puts "Error omploading '#{arg}': file exceeds " + (Max_size).to_s + " bytes (size was " + File.size(arg).to_s + ")." - errors += 1 - next - end - - if !first - # try not to hammer the server - puts 'Sleeping for ' + wait.to_s + 's' if !quiet and !url_only - sleep(wait) - else - first = false - end - - tmp = Tempfile.new(filename) - if !stdin.nil? and !used_stdin - # upload from stdin - puts "Progress for '#{arg}'" if !quiet and !url_only - if quiet or url_only - p = IO.popen("curl -s -F 'file1=@-;filename=\"#{filename}\"' #{Url}upload -o '#{tmp.path}'", "w+") - else - p = IO.popen("curl -# -F 'file1=@-;filename=\"#{filename}\"' #{Url}upload -o '#{tmp.path}'", "w+") - end - p.puts stdin - p.close_write - Process.wait - used_stdin = true - else - # upload file - puts "Progress for '#{arg}'" if !quiet and !url_only - # escape quotes - tmp_path = arg.gsub('"', '\"') - if quiet or url_only - %x{curl -s -F file1=@"#{tmp_path}" #{Url}upload -o '#{tmp.path}'} - else - %x{curl -# -F file1=@"#{tmp_path}" #{Url}upload -o '#{tmp.path}'} - end - end - if !File.size?(tmp.path) - $stderr.puts "Error omploading '#{arg}'" - errors += 1 - next - end - output = IO.read(tmp.path) - - # parse for an ID - if output =~ /View file: <a href="v([A-Za-z0-9+\/]+)">/ - id = $1 - puts "Omploaded '#{arg}' to #{Url}v#{id}" if !quiet - wait = 5 - elsif output =~ /Slow down there, cowboy\./ - wait += 60 - argv << arg - $stderr.puts "Got throttled when trying to ompload '#{arg}'" - $stderr.puts "Increasing wait and attempting to continue..." - errors += 1 - else - $stderr.puts "Error omploading '#{arg}'" - errors += 1 - end - -end - -if !quiet and !url_only - if errors < 1 - puts "Success." - else - puts "Finished with #{errors} errors." - end -end - diff --git a/opencore-amr/PKGBUILD b/opencore-amr/PKGBUILD deleted file mode 100644 index 755a7c8..0000000 --- a/opencore-amr/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Contributor: WAntilles <wantilles@adslgr.com> - -pkgname=opencore-amr -pkgver=0.1.2 -pkgrel=1 -pkgdesc="Open source implementation of the Adaptive Multi Rate (AMR) speech codec" -arch=('i686' 'x86_64') -license=('GPL') -url="http://opencore-amr.sourceforge.net/" -depends=('glibc') -source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz) -md5sums=('8e8b8b253eb046340ff7b6bf7a6ccd3e') - -build() { - cd ${srcdir}/${pkgname}-${pkgver} - - ./configure --prefix=/usr || return 1 - make || return 1 - make DESTDIR=${pkgdir}/ install || return 1 -} - diff --git a/opencore-amr/no_segfault_configure.diff b/opencore-amr/no_segfault_configure.diff deleted file mode 100644 index 2dd5fe4..0000000 --- a/opencore-amr/no_segfault_configure.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.old 2008-11-15 23:27:59.000000000 +0100 -+++ b/configure 2008-11-15 23:28:26.000000000 +0100 -@@ -79,7 +79,7 @@ - } - - tmp_run() { -- "$TMPEXE" >> "$TMPLOG" 2>&1 -+ : - } - - # Display error message, flushes tempfile, exit diff --git a/opencore-amr/opencore-amr-0.1.1-arch-paths.patch b/opencore-amr/opencore-amr-0.1.1-arch-paths.patch deleted file mode 100644 index 36a4cfe..0000000 --- a/opencore-amr/opencore-amr-0.1.1-arch-paths.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: opencore-amr/amrnb/Makefile -=================================================================== ---- opencore-amr.orig/amrnb/Makefile -+++ opencore-amr/amrnb/Makefile -@@ -10,7 +10,7 @@ - endif - - ifeq (, $(PREFIX)) -- PREFIX = /usr/local -+ PREFIX = /usr - endif - - DEC_DIR = $(AMR_BASE)/amr_nb/dec - -Index: opencore-amr/amrwb/Makefile -=================================================================== ---- opencore-amr.orig/amrwb/Makefile -+++ opencore-amr/amrwb/Makefile -@@ -10,7 +10,7 @@ - endif - - ifeq (, $(PREFIX)) -- PREFIX = /usr/local -+ PREFIX = /usr - endif - - DEC_DIR = $(AMR_BASE)/amr_wb/dec - diff --git a/opencore-amr/opencore-amr-0.1.1-gentoo-pic.patch b/opencore-amr/opencore-amr-0.1.1-gentoo-pic.patch deleted file mode 100644 index 1664ac4..0000000 --- a/opencore-amr/opencore-amr-0.1.1-gentoo-pic.patch +++ /dev/null @@ -1,66 +0,0 @@ -Index: opencore-amr/amrnb/Makefile -=================================================================== ---- opencore-amr.orig/amrnb/Makefile -+++ opencore-amr/amrnb/Makefile -@@ -41,6 +41,7 @@ COMMON_OBJS := $(COMMON_SRC:.cpp=.o) - COMMON_OBJS := $(patsubst %,$(COMMON_SRC_DIR)/%, $(COMMON_OBJS)) - - OBJS = wrapper.o $(DEC_OBJS) $(ENC_OBJS) $(COMMON_OBJS) -+SOBJS = $(OBJS:%.o=%.lo) - - #Versioning - MAJOR = 0 -@@ -59,13 +60,19 @@ SHLIB = libopencore-amrnb.$(SHLIB_EXT) - - all: libopencore-amrnb.a $(SHLIB) - --$(SHLIB): $(OBJS) -+$(SHLIB): $(SOBJS) - ifeq ($(shell uname), Darwin) - $(CXX) $(SHLIB_FLAGS) -o $@ $+ $(LDFLAGS) - else - $(CXX) $(SHLIB_FLAGS) -o $@ $+ -Wl,-soname,$(SONAME) $(LDFLAGS) - endif - -+%.lo: %.c -+ $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -DPIC -c $< -o $@ -+ -+%.lo: %.cpp -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -DPIC -c $< -o $@ -+ - libopencore-amrnb.a: $(OBJS) - ar rcs $@ $+ - -Index: opencore-amr/amrwb/Makefile -=================================================================== ---- opencore-amr.orig/amrwb/Makefile -+++ opencore-amr/amrwb/Makefile -@@ -27,6 +27,7 @@ DEC_OBJS := $(DEC_SRC:.cpp=.o) - DEC_OBJS := $(patsubst %,$(DEC_SRC_DIR)/%, $(DEC_OBJS)) - - OBJS = wrapper.o $(DEC_OBJS) -+SOBJS = $(OBJS:%.o=%.lo) - - #Versioning - MAJOR = 0 -@@ -45,13 +46,19 @@ SHLIB = libopencore-amrwb.$(SHLIB_EXT) - - all: libopencore-amrwb.a $(SHLIB) - --$(SHLIB): $(OBJS) -+$(SHLIB): $(SOBJS) - ifeq ($(shell uname), Darwin) - $(CXX) $(SHLIB_FLAGS) -o $@ $+ $(LDFLAGS) - else - $(CXX) $(SHLIB_FLAGS) -o $@ $+ -Wl,-soname,$(SONAME) $(LDFLAGS) - endif - -+%.lo: %.c -+ $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -DPIC -c $< -o $@ -+ -+%.lo: %.cpp -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -DPIC -c $< -o $@ -+ - libopencore-amrwb.a: $(OBJS) - ar rcs $@ $+ - diff --git a/opentracker/PKGBUILD b/opentracker/PKGBUILD deleted file mode 100644 index 4bd6e5e..0000000 --- a/opentracker/PKGBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# Contributor: Pierre Schmitz <pierre@archlinux.de> - -pkgname=opentracker -pkgver=20090828 -pkgrel=1 -pkgdesc='An open and free bittorrent tracker' -arch=('i686' 'x86_64') -url='http://erdgeist.org/arts/software/opentracker/' -license=('custom' 'GPL') -makedepends=('libowfat' 'cvs') -depends=('bash' 'zlib') -backup=('etc/opentracker/config') -source=('opentracker.rc.d' 'license.txt') -md5sums=('390bde9d010e79ab1309c02dcf9972e8' - '865211941e882c0aff5d36a22ac9efaa') - -_cvsroot=':pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot' -_cvsmod='opentracker' - -build() { - cd "$srcdir" - msg 'Connecting to CVS server....' - if [ -d $_cvsmod/CVS ]; then - cd $_cvsmod - cvs -z3 update -d - else - cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod - cd $_cvsmod - fi - - msg 'CVS checkout done or server timeout' - msg 'Starting make...' - - rm -rf "$srcdir/$_cvsmod-build" - cp -r "$srcdir/$_cvsmod" "$srcdir/$_cvsmod-build" - cd "$srcdir/$_cvsmod-build" - - sed -e 's#PREFIX?=..#PREFIX?=/usr#' \ - -e 's#LIBOWFAT_HEADERS=$(PREFIX)/libowfat#LIBOWFAT_HEADERS=$(PREFIX)/include#' \ - -e 's#LIBOWFAT_LIBRARY=$(PREFIX)/libowfat#LIBOWFAT_LIBRARY=$(PREFIX)/lib#' \ - -e 's/#FEATURES+=-DWANT_ACCESSLIST_WHITE/FEATURES+=-DWANT_ACCESSLIST_WHITE/' \ - -e 's/#FEATURES+=-DWANT_RESTRICT_STATS/FEATURES+=-DWANT_RESTRICT_STATS/' \ - -e 's/FEATURES+=-DWANT_FULLSCRAPE/#FEATURES+=-DWANT_FULLSCRAPE/' \ - -i Makefile - sed -e 's|# tracker.rootdir /usr/local/etc/opentracker|tracker.rootdir /etc/opentracker|' \ - -e 's|# access.stats 192.168.0.23|access.stats 127.0.0.1|' \ - -i opentracker.conf.sample - - make || return 1 - install -D -m 755 opentracker $pkgdir/usr/bin/opentracker - install -D -m 755 $srcdir/opentracker.rc.d $pkgdir/etc/rc.d/opentracker - install -D -m 644 opentracker.conf.sample $pkgdir/etc/opentracker/config - install -D -m 644 $srcdir/license.txt $pkgdir/usr/share/licenses/opentracker/license.txt -} diff --git a/opentracker/license.txt b/opentracker/license.txt deleted file mode 100644 index ff1bb40..0000000 --- a/opentracker/license.txt +++ /dev/null @@ -1,2 +0,0 @@ -This software was written by Dirk Engling <erdgeist@erdgeist.org> -It is considered beerware. Prost. Skol. Cheers or whatever. diff --git a/opentracker/opentracker.rc.d b/opentracker/opentracker.rc.d deleted file mode 100644 index b1aa34c..0000000 --- a/opentracker/opentracker.rc.d +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# general config -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/bin/opentracker` - -case "$1" in - start) - stat_busy "Starting opentracker Daemon" - [ -z "$PID" ] && su nobody -s /bin/sh -c "/usr/bin/opentracker -f /etc/opentracker/config&" - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon opentracker - stat_done - fi - ;; - stop) - stat_busy "Stopping opentracker Daemon" - [ ! -z "$PID" ] && kill $PID &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon opentracker - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac diff --git a/oss-hg/.gitignore b/oss-hg/.gitignore deleted file mode 100644 index 62ab099..0000000 --- a/oss-hg/.gitignore +++ /dev/null @@ -1 +0,0 @@ -oss diff --git a/oss-hg/PKGBUILD b/oss-hg/PKGBUILD deleted file mode 100644 index 97a9956..0000000 --- a/oss-hg/PKGBUILD +++ /dev/null @@ -1,83 +0,0 @@ -# Archlive <http://archlive-pkg.googlecode.com> - -pkgname=oss-hg -pkgver=920 -pkgrel=1 -pkgdesc="Open Sound System UNIX audio architecture" -arch=('i686' 'x86_64') -url="http://www.opensound.com/" -license=('GPL2') -depends=('module-init-tools' 'libtool' 'sed') -makedepends=('pkgconfig' 'gawk' 'gtk2' 'mercurial' 'gcc' 'make') -provides=('oss' 'oss4') -conflicts=('oss-linux' 'oss-linux-free' 'oss-testing' 'oss' 'oss-mercurial') -install='oss.install' -backup=('usr/lib/oss/soundon.user') -source=('oss.rm-init-scripts.patch' 'oss.soundon.patch' 'oss.rc' 'oss.install' - 'ossxmix.png' 'ossxmix.desktop') -md5sums=() - -optdepends=('gtk2: for graphical mixer (ossxmix)' - 'hal: for automatic USB audio configuration') - -_hgroot="http://opensound.hg.sourceforge.net:8000/hgroot/opensound/opensound" -_hgrepo="oss" - - -build() { - cd $startdir - - if [ -d ${_hgrepo} ]; then - cd ${_hgrepo} && hg pull -u -r ${pkgver} - else - hg clone ${_hgroot} ${_hgrepo} || return 1 - fi - - [ -d $srcdir/${_hgrepo} ] && rm -rf $srcdir/${_hgrepo} - hg clone $startdir/${_hgrepo} $srcdir/${_hgrepo} - cd $srcdir/${_hgrepo} - - # Avoid these flags conflicting with OSS build system. - unset CFLAGS - unset OSFLAGS - unset LIBRARIES - export NO_WARNING_CHECKS=yes - - # Compile libflashsupport.so only in packaging time, so we avoid - # conflicts with other packages and ease package management. - msg "Building libflashsupport.so." - cd "oss/lib" - gcc -shared -fPIC -O2 -Wall -Werror flashsupport.c -o libflashsupport.so || return 1 - install -Dm755 libflashsupport.so "${pkgdir}/usr/lib/libflashsupport.so" || return 1 - #rm -f "flashsupport.c" "libflashsupport.so" &> /dev/null - - msg "Preparing the build environment." - cd $srcdir/${_hgrepo} - [ -d build ] && rm -rf build - mkdir build && cd build - ../configure --regparm --config-midi=YES --enable-timings --portable-build || return 1 - #../configure --enable-libsalsa=YES || return 1 - - msg "Building OSS." - make build || return 1 - - msg "Patching init scripts." - cd prototype - rm usr/lib/oss/etc/S89oss - patch -Np0 -i "$srcdir/oss.rm-init-scripts.patch" || return 1 - patch -Np0 -i "$srcdir/oss.soundon.patch" || return 1 - - msg "Copying files." - cp -a * "${pkgdir}" - chmod -R a+r "${pkgdir}" - find "${pkgdir}" -type d -exec chmod a+x '{}' \; - install -D -m755 "$srcdir/oss.rc" "$pkgdir/etc/rc.d/oss4" - install -D -m755 "$srcdir/ossxmix.desktop" "$pkgdir/usr/share/applications/ossxmix.desktop" - install -D -m644 "$srcdir/ossxmix.png" "$pkgdir/usr/share/pixmaps/ossxmix.png" -} -md5sums=('b9a380a0ac8896390d71ac13676f27e1' - '65f07fe241bfbf912f76d8b6d8f276b5' - 'b70f139f73c2f1ee9db2680ce48121fb' - '1494a2304a1eb7a1979e7e83d894c67a' - 'f6a0fa9d274d21ab92cd03fca885add7' - '81e0f51ec04379dee64c31c32b045028') diff --git a/oss-hg/namcap.log b/oss-hg/namcap.log deleted file mode 100644 index 475fa85..0000000 --- a/oss-hg/namcap.log +++ /dev/null @@ -1,8 +0,0 @@ -PKGBUILD (oss-hg) E: File referenced in $startdir -PKGBUILD (oss-hg) E: File referenced in $startdir -PKGBUILD (oss-hg) W: Missing Maintainer tag -oss-hg W: Referenced library 'libOSSlib.so' is an uninstalled dependency -oss-hg W: Referenced library 'libossmix.so' is an uninstalled dependency -oss-hg W: Dependency included and not needed ('module-init-tools') -oss-hg W: Dependency included and not needed ('libtool') -oss-hg W: Dependency included and not needed ('sed') diff --git a/oss-hg/oss.install b/oss-hg/oss.install deleted file mode 100644 index f665416..0000000 --- a/oss-hg/oss.install +++ /dev/null @@ -1,59 +0,0 @@ -_MSG_LIBOSSDIR=" Please note that OSS stores some of its configuration files - at /usr/lib/oss. If you are upgrading from an older OSS - release and it doesn't work properly, try removing that - directory and reinstall this package." - -post_install() { - echo "Running OSS install script..." - /bin/sh /usr/lib/oss/build/install.sh &> /dev/null - echo - echo "-------------------------------------------------------------" - echo " Open Sound System was installed. Now you should add 'oss'" - echo " to your DAEMONS variable at /etc/rc.conf, and start the" - echo " daemon by running /etc/rc.d/oss start." - echo - echo " Note that OSS can't currently work together with kernel" - echo " ALSA modules, so they were moved out by the OSS install" - echo " scripts. If you want the ALSA kernel modules back, you can" - echo " just remove this package using pacman." - echo - echo "${_MSG_LIBOSSDIR}" - echo "-------------------------------------------------------------" - /bin/true -} - -post_upgrade() { - echo "Running OSS update script..." - /bin/sh /usr/lib/oss/build/install.sh &> /dev/null - echo - echo "-------------------------------------------------------------" - echo " Open Sound System was updated. Now you should restart the" - echo " daemon by running /etc/rc.d/oss restart." - echo - echo "${_MSG_LIBOSSDIR}" - echo "-------------------------------------------------------------" - /bin/true -} - -pre_remove() { - # Restore any replaced ALSA drivers. - /bin/sh /usr/lib/oss/scripts/restore_drv.sh - # Remove symlinks left by the 'install.sh' script. - rm -f /usr/lib/hal/scripts/oss_usb-create-devices - rm -f /usr/share/hal/fdi/policy/20thirdparty/90-oss_usb-create-device.fdi - /bin/true -} - -post_remove() { - echo - echo "-------------------------------------------------------------" - echo " Open Sound System was now removed, and the ALSA kernel" - echo " modules were restored." - echo - echo " Please note that OSS stores some of its configuration files" - echo " at /usr/lib/oss. If you don't plan to use OSS anymore, you" - echo " can remove this directory." - echo "-------------------------------------------------------------" - /bin/true -} - diff --git a/oss-hg/oss.rc b/oss-hg/oss.rc deleted file mode 100644 index 1724aa2..0000000 --- a/oss-hg/oss.rc +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -. /etc/rc.conf -. /etc/rc.d/functions -case "$1" in - start) - if [ "${msg_lang}" = "cn" ]; then - stat_busy "正在启动 OSS 开源驱动" - else - stat_busy "Starting OSS/Open source driver" - fi - # start - /usr/sbin/soundon - if [ $? -gt 0 ]; then - stat_fail - else - grep '^softoss' /proc/modules >/dev/null 2>/dev/null -# if [ $? -eq 0 ]; then -# stat_busy "Replacing old \"softoss\" module with \"vmix\"" -# rmmod softoss -# modprobe vmix -# sed -i 's/^softoss.*$/vmix/' /usr/lib/oss/etc/installed_drivers -# fi - add_daemon oss4 - stat_done - fi - ;; - stop) - if [ "${msg_lang}" = "cn" ]; then - stat_busy "正在保存 OSS 设置" - else - stat_busy "Saving OSS mixer" - fi - /usr/sbin/savemixer - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - grep '^"cuckoo"' /proc/modules >/dev/null 2>/dev/null - if [ $? -eq 0 ]; then - stat_busy "Removing \"cuckoo\" module" - rmmod \"cuckoo\" - fi - if [ "${msg_lang}" = "cn" ]; then - stat_busy "正在关闭 OSS 开源驱动" - else - stat_busy "Stopping OSS/Open source driver" - fi - /usr/sbin/soundoff - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon oss4 - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac diff --git a/oss-hg/oss.rm-init-scripts.patch b/oss-hg/oss.rm-init-scripts.patch deleted file mode 100644 index 981ff60..0000000 --- a/oss-hg/oss.rm-init-scripts.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- usr/lib/oss/build/install.sh.orig 2008-09-25 11:41:47.180167692 -0300 -+++ usr/lib/oss/build/install.sh 2008-09-25 11:41:47.180167692 -0300 -@@ -290,38 +290,6 @@ - echo - fi - --if ! test -d /etc/init.d --then -- mkdir /etc/init.d --fi -- --rm -f /etc/init.d/oss /etc/rc.d/rc3.d/S89oss /etc/rc3.d/S89oss --cp -f $OSSLIBDIR/etc/S89oss /etc/init.d/oss -- --chmod 744 /etc/init.d/oss -- --if test -x /sbin/chkconfig --then -- /sbin/chkconfig oss on > /dev/null 2>&1 --else -- if test -x /usr/sbin/update-rc.d -- then -- /usr/sbin/update-rc.d oss defaults > /dev/null 2>&1 -- else -- if test -d etc/rc.d/rc3.d -- then -- rm -f /etc/rc.d/rc3.d/S89oss -- ln -s /etc/init.d/oss /etc/rc.d/rc3.d/S89oss -- else -- if test -d /etc/rc3.d -- then -- rm -f /etc/rc3.d/S89oss -- ln -s /etc/init.d/oss /etc/rc3.d/S89oss -- fi -- fi -- fi --fi -- - # Install ALSA interface module (Cuckoo) - #(cd $OSSLIBDIR/cuckoo && make clean) > /dev/null 2>&1 - #if (cd $OSSLIBDIR/cuckoo && make install) > /var/log/cuckoo.log 2>&1 ---- usr/lib/oss/scripts/restore_drv.sh.orig 2008-09-25 11:41:47.210168487 -0300 -+++ usr/lib/oss/scripts/restore_drv.sh 2008-09-25 11:41:47.210168487 -0300 -@@ -18,8 +18,6 @@ - fi - fi - --rm -f /etc/init.d/oss -- - if ! test -d /lib/modules/`uname -r`/kernel/sound - then - if test -f /lib/modules/`uname -r`/sound-preoss.tar.bz2 diff --git a/oss-hg/oss.soundon.patch b/oss-hg/oss.soundon.patch deleted file mode 100644 index 4702b86..0000000 --- a/oss-hg/oss.soundon.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- usr/sbin/soundon.old 2009-09-04 06:35:26.000000000 +0100 -+++ usr/sbin/soundon 2009-11-15 13:59:53.000000000 +0000 -@@ -255,7 +255,10 @@ - then - if test "`uname -m` " = "x86_64 " - then -- ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib64/libasound.so.2 -+ # Fix for compatibility with Arch's directory structure -+ # Not that we use it, there is no $OSSLIBDIR/.libsalsa_installed -+ ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib/libasound.so.2 -+ #ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib64/libasound.so.2 - #ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64 - else - if test -s /lib/libasound.so.2 -@@ -278,8 +281,11 @@ - then - if test "`uname -m` " = "x86_64 " - then -- ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64 -- ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib64 -+ # Fix for compatibility with Arch's directory structure -+ ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib -+ ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib -+ #ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64 -+ #ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib64 - else - if test -s /lib/libasound.so.2 - then diff --git a/oss-hg/ossxmix.desktop b/oss-hg/ossxmix.desktop deleted file mode 100644 index 2022bd7..0000000 --- a/oss-hg/ossxmix.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=OSS X Mixer -Name[zh_CN]=OSS 声音设置 -Type=Application -Comment=OSS Setup -Exec=ossxmix -Categories=System;Application; -GenericName=OSS X Mixer -Icon=/usr/share/pixmaps/ossxmix.png diff --git a/oss-hg/ossxmix.png b/oss-hg/ossxmix.png Binary files differdeleted file mode 100644 index 8758fdb..0000000 --- a/oss-hg/ossxmix.png +++ /dev/null diff --git a/oss-mercurial/PKGBUILD b/oss-mercurial/PKGBUILD deleted file mode 100644 index c53e5b7..0000000 --- a/oss-mercurial/PKGBUILD +++ /dev/null @@ -1,67 +0,0 @@ -# This is a modified version of the oss pkg in community -pkgname="oss-mercurial" -pkgver="4.1" -pkgrel=`date +%Y_%m_%d_%T` -pkgdesc="Open Sound System UNIX audio architecture" -arch=('i686' 'x86_64') -url="http://developer.opensound.com/" -license=('GPL2') -depends=('gcc' 'make' 'kernel-headers' 'module-init-tools' 'libtool' 'sed') -makedepends=('pkgconfig' 'gawk' 'gtk2' 'mercurial') -provides=('oss') -conflicts=('oss-linux' 'oss-linux-free' 'oss-testing' 'oss') -install='oss.install' -source=('oss.rm-init-scripts.patch' 'oss.rc' 'oss.install') -md5sums=('b9a380a0ac8896390d71ac13676f27e1' - '8ca7cdf94c56ab02890eb4aba6a4995f' - '1494a2304a1eb7a1979e7e83d894c67a') - -optdepends=('gtk2: for graphical mixer (ossxmix)' - 'hal: for automatic USB audio configuration' - 'libflashsupport-oss: for Flash plugin support') - -[ "$CARCH" = "x86_64" ] && optdepends[2]='lib32-libflashsupport-oss: for Flash plugin support' - -build() { - #_dir="oss-v4.1-buildrc2-src-gpl" - _dir="oss-hg-src" - - cd "$srcdir" - hg clone http://opensound.hg.sourceforge.net/hgweb/opensound $_dir - - # Avoid these flags conflicting with OSS build system. - unset CFLAGS - unset OSFLAGS - unset LIBRARIES - - # Remove libflashsupport, as it belongs to a separate package. - rm -f "$srcdir/$_dir/oss/lib/flashsupport.c" &> /dev/null - - msg "Preparing the build environment." - zsh - - if [ ! -d build ]; then - # Create build directory and configure - mkdir build && cd build - "$srcdir/$_dir/configure" --enable-libsalsa=NO || return 1 - else - # Change to existing build directory - cd build - fi - - msg "Building OSS." - make build || return 1 - - msg "Patching init scripts." - cd "$srcdir/build/prototype" - rm usr/lib/oss/etc/S89oss - patch -b -p0 < "$srcdir/oss.rm-init-scripts.patch" || return 1 - - msg "Copying files." - cp -R * "$pkgdir" - chmod 755 "$pkgdir/usr/sbin/" "$pkgdir/usr/lib/oss/etc/" "$pkgdir/usr/lib/oss/build/" - install -D -m755 "$srcdir/oss.rc" "$pkgdir/etc/rc.d/oss" - -} - -# vim: set ft=zsh: diff --git a/oss-mercurial/oss.install b/oss-mercurial/oss.install deleted file mode 100644 index f665416..0000000 --- a/oss-mercurial/oss.install +++ /dev/null @@ -1,59 +0,0 @@ -_MSG_LIBOSSDIR=" Please note that OSS stores some of its configuration files - at /usr/lib/oss. If you are upgrading from an older OSS - release and it doesn't work properly, try removing that - directory and reinstall this package." - -post_install() { - echo "Running OSS install script..." - /bin/sh /usr/lib/oss/build/install.sh &> /dev/null - echo - echo "-------------------------------------------------------------" - echo " Open Sound System was installed. Now you should add 'oss'" - echo " to your DAEMONS variable at /etc/rc.conf, and start the" - echo " daemon by running /etc/rc.d/oss start." - echo - echo " Note that OSS can't currently work together with kernel" - echo " ALSA modules, so they were moved out by the OSS install" - echo " scripts. If you want the ALSA kernel modules back, you can" - echo " just remove this package using pacman." - echo - echo "${_MSG_LIBOSSDIR}" - echo "-------------------------------------------------------------" - /bin/true -} - -post_upgrade() { - echo "Running OSS update script..." - /bin/sh /usr/lib/oss/build/install.sh &> /dev/null - echo - echo "-------------------------------------------------------------" - echo " Open Sound System was updated. Now you should restart the" - echo " daemon by running /etc/rc.d/oss restart." - echo - echo "${_MSG_LIBOSSDIR}" - echo "-------------------------------------------------------------" - /bin/true -} - -pre_remove() { - # Restore any replaced ALSA drivers. - /bin/sh /usr/lib/oss/scripts/restore_drv.sh - # Remove symlinks left by the 'install.sh' script. - rm -f /usr/lib/hal/scripts/oss_usb-create-devices - rm -f /usr/share/hal/fdi/policy/20thirdparty/90-oss_usb-create-device.fdi - /bin/true -} - -post_remove() { - echo - echo "-------------------------------------------------------------" - echo " Open Sound System was now removed, and the ALSA kernel" - echo " modules were restored." - echo - echo " Please note that OSS stores some of its configuration files" - echo " at /usr/lib/oss. If you don't plan to use OSS anymore, you" - echo " can remove this directory." - echo "-------------------------------------------------------------" - /bin/true -} - diff --git a/oss-mercurial/oss.rc b/oss-mercurial/oss.rc deleted file mode 100644 index 3f63378..0000000 --- a/oss-mercurial/oss.rc +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -. /etc/rc.conf -. /etc/rc.d/functions - -case "$1" in - start) - stat_busy 'Starting Open Sound System' - if /usr/sbin/soundon - then - add_daemon oss - stat_done - else - stat_fail - fi - ;; - stop) - stat_busy 'Stopping Open Sound System' - if /usr/sbin/soundoff - then - rm_daemon oss - stat_done - else - stat_fail - fi - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart}" -esac diff --git a/oss-mercurial/oss.rm-init-scripts.patch b/oss-mercurial/oss.rm-init-scripts.patch deleted file mode 100644 index 981ff60..0000000 --- a/oss-mercurial/oss.rm-init-scripts.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- usr/lib/oss/build/install.sh.orig 2008-09-25 11:41:47.180167692 -0300 -+++ usr/lib/oss/build/install.sh 2008-09-25 11:41:47.180167692 -0300 -@@ -290,38 +290,6 @@ - echo - fi - --if ! test -d /etc/init.d --then -- mkdir /etc/init.d --fi -- --rm -f /etc/init.d/oss /etc/rc.d/rc3.d/S89oss /etc/rc3.d/S89oss --cp -f $OSSLIBDIR/etc/S89oss /etc/init.d/oss -- --chmod 744 /etc/init.d/oss -- --if test -x /sbin/chkconfig --then -- /sbin/chkconfig oss on > /dev/null 2>&1 --else -- if test -x /usr/sbin/update-rc.d -- then -- /usr/sbin/update-rc.d oss defaults > /dev/null 2>&1 -- else -- if test -d etc/rc.d/rc3.d -- then -- rm -f /etc/rc.d/rc3.d/S89oss -- ln -s /etc/init.d/oss /etc/rc.d/rc3.d/S89oss -- else -- if test -d /etc/rc3.d -- then -- rm -f /etc/rc3.d/S89oss -- ln -s /etc/init.d/oss /etc/rc3.d/S89oss -- fi -- fi -- fi --fi -- - # Install ALSA interface module (Cuckoo) - #(cd $OSSLIBDIR/cuckoo && make clean) > /dev/null 2>&1 - #if (cd $OSSLIBDIR/cuckoo && make install) > /var/log/cuckoo.log 2>&1 ---- usr/lib/oss/scripts/restore_drv.sh.orig 2008-09-25 11:41:47.210168487 -0300 -+++ usr/lib/oss/scripts/restore_drv.sh 2008-09-25 11:41:47.210168487 -0300 -@@ -18,8 +18,6 @@ - fi - fi - --rm -f /etc/init.d/oss -- - if ! test -d /lib/modules/`uname -r`/kernel/sound - then - if test -f /lib/modules/`uname -r`/sound-preoss.tar.bz2 diff --git a/pacgraph/PKGBUILD b/pacgraph/PKGBUILD deleted file mode 100644 index 351b674..0000000 --- a/pacgraph/PKGBUILD +++ /dev/null @@ -1,20 +0,0 @@ -# Contributor: Kyle Keen <keenerd@gmail.com> -pkgname=pacgraph -pkgver=20090810 -pkgrel=2 -pkgdesc="Draws a graph of installed packages to PNG, SVG, console or GUI. Good for finding bloat." -arch=('i686' 'x86_64') -url="http://kmkeen.com/pacgraph/" -license=('GPL') -depends=('python') -makedepends=() -optdepends=('inkscape' 'imagemagick' 'svg2png' 'tk') -source=(http://kmkeen.com/pacgraph/$pkgname-$pkgver.tar.gz) -md5sums=('346d3588b44c89275d123750a85cdd7c') - -build() { - cd $startdir/src/$pkgname - install -D -m 0755 pacgraph ${pkgdir}/usr/bin/pacgraph - install -D -m 0755 pacgraph-i ${pkgdir}/usr/bin/pacgraph-i -} - diff --git a/pacman-color/ChangeLog b/pacman-color/ChangeLog deleted file mode 100644 index 9f90e44..0000000 --- a/pacman-color/ChangeLog +++ /dev/null @@ -1,63 +0,0 @@ -pacman-color 3.3.0-1 -- up to new version - -pacman-color 3.2.2-4 -- more safe callback function for delay messages - -pacman-color 3.2.2-3 -- little code cleanup -- better suport for unicode (fix some issue with zh_CN translation) - -pacman-color 3.2.2-2 -- fix a memory leak - -pacman-color 3.2.2-1 -- clean and factorisation code -- return to patch-base release (it is now more easier) - -pacman-color 3.2.1.b-1 - news in 3.2.1.b - - fix version string in makefile, huh :) - - fix output "Optional Deps" in pakckage info - -pacman-color 3.2.1.a-1 - news in 3.2.1.a - - up to new pacman's version - - fix a bug in Makefile - -pacman-color 3.2.0.a-1 -- up to new version - news in 3.2.0.a - - up to new pacman's version - - colors are defined in section [options] - -pacman-color 3.1.4.a-1 -- up to new version - news in 3.1.4.a - - up to new pacman's version - -pacman-color 3.1.3.a-1 -- up to new version - news in 3.1.3.a - - up to new pacman's version - -pacman-color 3.1.2.a-1 -- up to new version - news in 3.1.2.a - - up to new pacman's version - -pacman-color 3.1.1.b-1 -- up to new version - news in 3.1.1.b - - add comments in color.conf - - remove script with an alias - - pkg size in targets list is coloured - - default color for 'debug:' and size is dark gray - - --sync operation shows the size of packages in the 'remove:' list, - like in 'targets:' list (option ShowSize) - - --remove operation shows the size of packages and total removed size, - like --sync operation - - new ascii art in info about version - -pacman-color 3.1.1.a-1 -- initial release diff --git a/pacman-color/PKGBUILD b/pacman-color/PKGBUILD deleted file mode 100644 index 034bda5..0000000 --- a/pacman-color/PKGBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# Contributor: vogo <vojtech.gondzala@gmail.com> -pkgname=pacman-color -pkgver=3.3.2 -pkgrel=1 -pkgdesc="Command-line frontend for libalpm aka pacman with color patch" -arch=('i686' 'x86_64') -url="http://www.archlinux.org/pacman/" -license=('GPL') -depends=("pacman=$pkgver") -makedepends=('patch') -backup=('etc/pacman.d/color.conf') -source=(ftp://ftp.archlinux.org/other/pacman/pacman-$pkgver.tar.gz - $pkgname-$pkgver-${pkgrel}.patch - color.conf) - -md5sums=('21b5a12a0e7af4b39e20091354a3e3db' - '4aaaf5d65f70c97a6da5a3c12ebc1dff' - 'fd5087a5f6cf95ca0175ddb9fd257505') - -build() { - cd $startdir/src/pacman-$pkgver - patch -p1 -i ../$pkgname-$pkgver-${pkgrel}.patch || return 1 - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-doc - make || return 1 - - # install pacman-color - install -Dm755 $startdir/src/pacman-$pkgver/src/pacman/.libs/pacman \ - $startdir/pkg/usr/bin/pacman-color - - # install color.conf - install -Dm644 $startdir/src/color.conf \ - $startdir/pkg/etc/pacman.d/color.conf -} diff --git a/pacman-color/color.conf b/pacman-color/color.conf deleted file mode 100644 index 2115753..0000000 --- a/pacman-color/color.conf +++ /dev/null @@ -1,45 +0,0 @@ -# Configuration for pacman-color -# ------------------------------ -# in default are all colors "intensive", -# it looks much better on black backround -# -# valid colors: -# black -# red -# green -# yellow -# blue -# magenta -# cyan -# white -# gray -# intensive red -# intensive green -# intensive yellow -# intensive blue -# intensive magenta -# intensive cyan -# intensive white -# intensive foreground -# none - -# error: prefix, fail, Remove (?):, MISSING -#Red = intensive red - -# done, success, pkg version, Not Modified -#Green = intensive green - -# warning: prefix, Targets (?):, MODIFIED -#Yellow = intensive yellow - -# :: prefix, pkg group, counter in install proces -#Blue = intensive blue - -# repo name, package file name -#Magenta = intensive magenta - -# url -#Cyan = intensive cyan - -# messages with :: prefix, titles, etc -#White = intensive foreground diff --git a/pacman-color/pacman-color-3.3.1-1.patch b/pacman-color/pacman-color-3.3.1-1.patch deleted file mode 100644 index c9b4b82..0000000 --- a/pacman-color/pacman-color-3.3.1-1.patch +++ /dev/null @@ -1,1275 +0,0 @@ -diff -Naur pacman-3.3.1/src/pacman/callback.c pacman-color-3.3.1/src/pacman/callback.c ---- pacman-3.3.1/src/pacman/callback.c 2009-08-03 14:37:13.000000000 +0200 -+++ pacman-color-3.3.1/src/pacman/callback.c 2009-09-26 10:09:00.000000000 +0200 -@@ -217,16 +217,16 @@ - printf(_("generating %s with %s... "), (char *)data1, (char *)data2); - break; - case PM_TRANS_EVT_DELTA_PATCH_DONE: -- printf(_("success!\n")); -+ color_printf(COLOR_GREEN_ALL, _("success!\n")); - break; - case PM_TRANS_EVT_DELTA_PATCH_FAILED: -- printf(_("failed.\n")); -+ color_printf(COLOR_RED_ALL, _("failed.\n")); - break; - case PM_TRANS_EVT_SCRIPTLET_INFO: - printf("%s", (char*)data1); - break; - case PM_TRANS_EVT_RETRIEVE_START: -- printf(_(":: Retrieving packages from %s...\n"), (char*)data1); -+ color_printf(COLOR_DOUBLECOLON, _(":: Retrieving packages from %s...\n"), (char*)data1); - break; - /* all the simple done events, with fallthrough for each */ - case PM_TRANS_EVT_FILECONFLICTS_DONE: -@@ -249,17 +249,17 @@ - { - switch(event) { - case PM_TRANS_CONV_INSTALL_IGNOREPKG: -- *response = yesno(_(":: %s is in IgnorePkg/IgnoreGroup. Install anyway?"), -+ *response = yesno(COLOR_DOUBLECOLON, _(":: %s is in IgnorePkg/IgnoreGroup. Install anyway?"), - alpm_pkg_get_name(data1)); - break; - case PM_TRANS_CONV_REPLACE_PKG: -- *response = yesno(_(":: Replace %s with %s/%s?"), -+ *response = yesno(COLOR_DOUBLECOLON, _(":: Replace %s with %s/%s?"), - alpm_pkg_get_name(data1), - (char *)data3, - alpm_pkg_get_name(data2)); - break; - case PM_TRANS_CONV_CONFLICT_PKG: -- *response = yesno(_(":: %s conflicts with %s. Remove %s?"), -+ *response = yesno(COLOR_DOUBLECOLON, _(":: %s conflicts with %s. Remove %s?"), - (char *)data1, - (char *)data2, - (char *)data2); -@@ -272,17 +272,17 @@ - namelist = alpm_list_add(namelist, - (char *)alpm_pkg_get_name(i->data)); - } -- printf(_(":: the following package(s) cannot be upgraded due to " -+ color_printf(COLOR_DOUBLECOLON, _(":: the following package(s) cannot be upgraded due to " - "unresolvable dependencies:\n")); -- list_display(" ", namelist); -- *response = yesno(_("\nDo you want to skip the above " -+ list_display(NULL, " ", namelist); -+ *response = yesno(NULL, _("\nDo you want to skip the above " - "package(s) for this upgrade?")); - alpm_list_free(namelist); - } - break; - case PM_TRANS_CONV_LOCAL_NEWER: - if(!config->op_s_downloadonly) { -- *response = yesno(_(":: %s-%s: local version is newer. Upgrade anyway?"), -+ *response = yesno(COLOR_DOUBLECOLON, _(":: %s-%s: local version is newer. Upgrade anyway?"), - alpm_pkg_get_name(data1), - alpm_pkg_get_version(data1)); - } else { -@@ -290,7 +290,7 @@ - } - break; - case PM_TRANS_CONV_CORRUPTED_PKG: -- *response = yesno(_(":: File %s is corrupted. Do you want to delete it?"), -+ *response = yesno(COLOR_DOUBLECOLON, _(":: File %s is corrupted. Do you want to delete it?"), - (char *)data1); - break; - } -@@ -397,8 +397,8 @@ - - } - -- printf("(%*d/%*d) %ls%-*s", digits, remain, digits, howmany, -- wcstr, padwid, ""); -+ color_printf(COLOR_BLUE_ALL, "(%*d/%*d)", digits, remain, digits, howmany); -+ printf(" %ls%-*s", wcstr, padwid, ""); - - free(wcstr); - -diff -Naur pacman-3.3.1/src/pacman/package.c pacman-color-3.3.1/src/pacman/package.c ---- pacman-3.3.1/src/pacman/package.c 2009-09-20 18:52:50.000000000 +0200 -+++ pacman-color-3.3.1/src/pacman/package.c 2009-09-26 10:11:56.000000000 +0200 -@@ -89,49 +89,48 @@ - } - - /* actual output */ -- string_display(_("Name :"), alpm_pkg_get_name(pkg)); -- string_display(_("Version :"), alpm_pkg_get_version(pkg)); -- string_display(_("URL :"), alpm_pkg_get_url(pkg)); -- list_display(_("Licenses :"), alpm_pkg_get_licenses(pkg)); -- list_display(_("Groups :"), alpm_pkg_get_groups(pkg)); -- list_display(_("Provides :"), alpm_pkg_get_provides(pkg)); -- list_display(_("Depends On :"), depstrings); -- list_display_linebreak(_("Optional Deps :"), alpm_pkg_get_optdepends(pkg)); -+ color_string_display(COLOR_WHITE_ALL, _("Name :"), COLOR_WHITE_ALL, alpm_pkg_get_name(pkg)); -+ color_string_display(COLOR_WHITE_ALL, _("Version :"), COLOR_GREEN_ALL, alpm_pkg_get_version(pkg)); -+ color_string_display(COLOR_WHITE_ALL, _("URL :"), COLOR_CYAN_ALL, alpm_pkg_get_url(pkg)); -+ list_display(COLOR_WHITE_ALL, _("Licenses :"), alpm_pkg_get_licenses(pkg)); -+ list_display(COLOR_WHITE_ALL, _("Groups :"), alpm_pkg_get_groups(pkg)); -+ list_display(COLOR_WHITE_ALL, _("Provides :"), alpm_pkg_get_provides(pkg)); -+ list_display(COLOR_WHITE_ALL, _("Depends On :"), depstrings); -+ list_display_linebreak(COLOR_WHITE_ALL, _("Optional Deps :"), alpm_pkg_get_optdepends(pkg)); - /* Only applicable if installed */ - if(level > 0) { -- list_display(_("Required By :"), requiredby); -+ list_display(COLOR_WHITE_ALL, _("Required By :"), requiredby); - FREELIST(requiredby); - } -- list_display(_("Conflicts With :"), alpm_pkg_get_conflicts(pkg)); -- list_display(_("Replaces :"), alpm_pkg_get_replaces(pkg)); -+ list_display(COLOR_WHITE_ALL, _("Conflicts With :"), alpm_pkg_get_conflicts(pkg)); -+ list_display(COLOR_WHITE_ALL, _("Replaces :"), alpm_pkg_get_replaces(pkg)); - if(level < 0) { -- printf(_("Download Size : %6.2f K\n"), -+ color_printf(COLOR_WHITE_COLON, _("Download Size : %6.2f K\n"), - (float)alpm_pkg_get_size(pkg) / 1024.0); - } - if(level == 0) { -- printf(_("Compressed Size: %6.2f K\n"), -+ color_printf(COLOR_WHITE_COLON, _("Compressed Size: %6.2f K\n"), - (float)alpm_pkg_get_size(pkg) / 1024.0); - } - -- printf(_("Installed Size : %6.2f K\n"), -+ color_printf(COLOR_WHITE_COLON, _("Installed Size : %6.2f K\n"), - (float)alpm_pkg_get_isize(pkg) / 1024.0); -- string_display(_("Packager :"), alpm_pkg_get_packager(pkg)); -- string_display(_("Architecture :"), alpm_pkg_get_arch(pkg)); -- string_display(_("Build Date :"), bdatestr); -+ string_display(COLOR_WHITE_ALL, _("Packager :"), alpm_pkg_get_packager(pkg)); -+ string_display(COLOR_WHITE_ALL, _("Architecture :"), alpm_pkg_get_arch(pkg)); -+ string_display(COLOR_WHITE_ALL, _("Build Date :"), bdatestr); - if(level > 0) { -- string_display(_("Install Date :"), idatestr); -- string_display(_("Install Reason :"), reason); -- } -+ string_display(COLOR_WHITE_ALL, _("Install Date :"), idatestr); -+ string_display(COLOR_WHITE_ALL, _("Install Reason :"), reason); } - if(level >= 0) { -- string_display(_("Install Script :"), -+ string_display(COLOR_WHITE_ALL, _("Install Script :"), - alpm_pkg_has_scriptlet(pkg) ? _("Yes") : _("No")); - } - - /* MD5 Sum for sync package */ - if(level < 0) { -- string_display(_("MD5 Sum :"), alpm_pkg_get_md5sum(pkg)); -+ string_display(COLOR_WHITE_ALL, _("MD5 Sum :"), alpm_pkg_get_md5sum(pkg)); - } -- string_display(_("Description :"), alpm_pkg_get_desc(pkg)); -+ string_display(COLOR_WHITE_ALL, _("Description :"), alpm_pkg_get_desc(pkg)); - - /* Print additional package info if info flag passed more than once */ - if(level > 1) { -@@ -151,7 +150,7 @@ - if(pkg == NULL) { - return; - } -- string_display(_("Repository :"), treename); -+ color_string_display(COLOR_WHITE_ALL, _("Repository :"), COLOR_MAGENTA_ALL, treename); - dump_pkg_full(pkg, -1); - } - -@@ -161,7 +160,7 @@ - { - alpm_list_t *i; - const char *root = alpm_option_get_root(); -- printf(_("Backup Files:\n")); -+ color_printf(COLOR_WHITE_ALL, _("Backup Files:\n")); - if(alpm_pkg_get_backup(pkg)) { - /* package has backup files, so print them */ - for(i = alpm_pkg_get_backup(pkg); i; i = alpm_list_next(i)) { -@@ -188,13 +187,13 @@ - - /* if checksums don't match, file has been modified */ - if (strcmp(md5sum, ptr)) { -- printf(_("MODIFIED\t%s\n"), path); -+ color_printf(COLOR_YELLOW_ALL, _("MODIFIED\t%s\n"), path); - } else { -- printf(_("Not Modified\t%s\n"), path); -+ color_printf(COLOR_GREEN_ALL, _("Not Modified\t%s\n"), path); - } - free(md5sum); - } else { -- printf(_("MISSING\t\t%s\n"), path); -+ color_printf(COLOR_RED_ALL, _("MISSING\t\t%s\n"), path); - } - free(str); - } -@@ -218,7 +217,8 @@ - for(i = pkgfiles; i; i = alpm_list_next(i)) { - filestr = alpm_list_getdata(i); - if(!quiet){ -- fprintf(stdout, "%s %s%s\n", pkgname, root, filestr); -+ color_fprintf(stdout, COLOR_WHITE_ALL, "%s", pkgname); -+ fprintf(stdout, " %s%s\n", root, filestr); - } else { - fprintf(stdout, "%s%s\n", root, filestr); - } -diff -Naur pacman-3.3.1/src/pacman/pacman.c pacman-color-3.3.1/src/pacman/pacman.c ---- pacman-3.3.1/src/pacman/pacman.c 2009-09-20 18:52:50.000000000 +0200 -+++ pacman-color-3.3.1/src/pacman/pacman.c 2009-09-26 10:14:55.000000000 +0200 -@@ -156,11 +156,22 @@ - */ - static void version(void) - { -- printf("\n"); -- printf(" .--. Pacman v%s - libalpm v%s\n", PACKAGE_VERSION, alpm_version()); -- printf("/ _.-' .-. .-. .-. Copyright (C) 2006-2009 Pacman Development Team\n"); -- printf("\\ '-. '-' '-' '-' Copyright (C) 2002-2006 Judd Vinet\n"); -- printf(" '--'\n"); -+ color_printf(COLOR_YELLOW_ALL, " .--. "); -+ printf(" "); -+ color_printf(COLOR_RED_ALL, " .---. "); -+ printf(" Pacman-color v%s - libalpm v%s\n", PACKAGE_VERSION, alpm_version()); -+ color_printf(COLOR_YELLOW_ALL, "/ _.-'"); -+ color_printf(COLOR_WHITE_ALL, " .-. .-"); -+ color_printf(COLOR_RED_ALL, "|O O |"); -+ printf(" Copyright (C) 2006-2009 Pacman Development Team\n"); -+ color_printf(COLOR_YELLOW_ALL, "\\ '-."); -+ color_printf(COLOR_WHITE_ALL, " '-' '-"); -+ color_printf(COLOR_RED_ALL, "|~~~ |"); -+ printf(" Copyright (C) 2002-2006 Judd Vinet\n"); -+ color_printf(COLOR_YELLOW_ALL, " '--' "); -+ printf(" "); -+ color_printf(COLOR_RED_ALL, "|.-.-.|"); -+ printf(" Colored by vogo <vojtech.gondzala@gmail.com>\n"); - printf(_(" This program may be freely redistributed under\n" - " the terms of the GNU General Public License.\n")); - printf("\n"); -@@ -971,6 +982,7 @@ - - /* init config data */ - config = config_new(); -+ parsecolorconfig(); - - /* disable progressbar if the output is redirected */ - if(!isatty(1)) { -@@ -1028,17 +1040,17 @@ - - if(config->verbose > 0) { - alpm_list_t *i; -- printf("Root : %s\n", alpm_option_get_root()); -- printf("Conf File : %s\n", config->configfile); -- printf("DB Path : %s\n", alpm_option_get_dbpath()); -- printf("Cache Dirs: "); -+ string_display(COLOR_WHITE_ALL, "Root :", alpm_option_get_root()); -+ string_display(COLOR_WHITE_ALL, "Conf File :", config->configfile); -+ string_display(COLOR_WHITE_ALL, "DB Path :", alpm_option_get_dbpath()); -+ color_printf(COLOR_WHITE_ALL, "Cache Dirs: "); - for(i = alpm_option_get_cachedirs(); i; i = alpm_list_next(i)) { - printf("%s ", (char*)alpm_list_getdata(i)); - } - printf("\n"); -- printf("Lock File : %s\n", alpm_option_get_lockfile()); -- printf("Log File : %s\n", alpm_option_get_logfile()); -- list_display("Targets :", pm_targets); -+ string_display(COLOR_WHITE_ALL, "Lock File :", alpm_option_get_lockfile()); -+ string_display(COLOR_WHITE_ALL, "Log File :", alpm_option_get_logfile()); -+ list_display(COLOR_WHITE_ALL, "Targets :", pm_targets); - } - - /* Opening local database */ -diff -Naur pacman-3.3.1/src/pacman/query.c pacman-color-3.3.1/src/pacman/query.c ---- pacman-3.3.1/src/pacman/query.c 2009-09-17 02:36:29.000000000 +0200 -+++ pacman-color-3.3.1/src/pacman/query.c 2009-09-26 10:18:23.000000000 +0200 -@@ -166,7 +166,9 @@ - pmpkg_t *pkg = alpm_list_getdata(i); - - if (!config->quiet) { -- printf("local/%s %s", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg)); -+ color_printf(COLOR_MAGENTA_ALL, "local/"); -+ color_printf(COLOR_WHITE_ALL, "%s ", alpm_pkg_get_name(pkg)); -+ color_printf(COLOR_GREEN_ALL, "%s", alpm_pkg_get_version(pkg)); - } else { - printf("%s", alpm_pkg_get_name(pkg)); - } -@@ -183,16 +185,11 @@ - if (!config->quiet) { - if((grp = alpm_pkg_get_groups(pkg)) != NULL) { - alpm_list_t *k; -- printf(" ("); -+ color_printf(COLOR_BLUE_ALL, " ("); - for(k = grp; k; k = alpm_list_next(k)) { - const char *group = alpm_list_getdata(k); -- printf("%s", group); -- if(alpm_list_next(k)) { -- /* only print a spacer if there are more groups */ -- printf(" "); -- } -+ color_printf(COLOR_BLUE_ALL, "%s%s", group, (alpm_list_next(k) ? " " : ")")); - } -- printf(")"); - } - - /* we need a newline and initial indent first */ -@@ -224,7 +221,8 @@ - packages = alpm_grp_get_pkgs(grp); - - for(p = packages; p; p = alpm_list_next(p)) { -- printf("%s %s\n", grpname, alpm_pkg_get_name(alpm_list_getdata(p))); -+ color_printf(COLOR_BLUE_ALL, "%s ", grpname); -+ color_printf(COLOR_WHITE_ALL, "%s\n", alpm_pkg_get_name(alpm_list_getdata(p))); - } - } - } else { -@@ -236,8 +234,8 @@ - const alpm_list_t *p, *packages = alpm_grp_get_pkgs(grp); - for(p = packages; p; p = alpm_list_next(p)) { - if(!config->quiet) { -- printf("%s %s\n", grpname, -- alpm_pkg_get_name(alpm_list_getdata(p))); -+ color_printf(COLOR_BLUE_ALL, "%s ", grpname); -+ color_printf(COLOR_WHITE_ALL, "%s\n", alpm_pkg_get_name(alpm_list_getdata(p))); - } else { - printf("%s\n", alpm_pkg_get_name(alpm_list_getdata(p))); - } -@@ -383,7 +381,8 @@ - if(!config->op_q_info && !config->op_q_list - && !config->op_q_changelog && !config->op_q_check) { - if (!config->quiet) { -- printf("%s %s\n", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg)); -+ color_printf(COLOR_WHITE_ALL, "%s ", alpm_pkg_get_name(pkg)); -+ color_printf(COLOR_GREEN_ALL, "%s\n", alpm_pkg_get_version(pkg)); - } else { - printf("%s\n", alpm_pkg_get_name(pkg)); - } -diff -Naur pacman-3.3.1/src/pacman/remove.c pacman-color-3.3.1/src/pacman/remove.c ---- pacman-3.3.1/src/pacman/remove.c 2009-08-03 14:37:13.000000000 +0200 -+++ pacman-color-3.3.1/src/pacman/remove.c 2009-09-26 10:09:00.000000000 +0200 -@@ -73,12 +73,12 @@ - pmpkg_t *pkg = alpm_list_getdata(p); - pkgnames = alpm_list_add(pkgnames, (void *)alpm_pkg_get_name(pkg)); - } -- printf(_(":: group %s:\n"), targ); -- list_display(" ", pkgnames); -- int all = yesno(_(" Remove whole content?")); -- for(p = pkgnames; p; p = alpm_list_next(p)) { -+ color_printf(COLOR_DOUBLECOLON, _(":: group %s:\n"), targ); -+ list_display(NULL, " ", pkgnames); -+ int all = yesno(NULL, _(" Remove whole content?")); -+ for(p = pkgnames; p; p = alpm_list_next(p)) { - char *pkgn = alpm_list_getdata(p); -- if(all || yesno(_(":: Remove %s from group %s?"), pkgn, targ)) { -+ if(all || yesno(COLOR_DOUBLECOLON, _(":: Remove %s from group %s?"), pkgn, targ)) { - if(alpm_trans_addtarget(pkgn) == -1) { - pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", targ, - alpm_strerrorlast()); -@@ -108,7 +108,7 @@ - pmdepmissing_t *miss = alpm_list_getdata(i); - pmdepend_t *dep = alpm_miss_get_dep(miss); - char *depstring = alpm_dep_compute_string(dep); -- printf(_(":: %s: requires %s\n"), alpm_miss_get_target(miss), -+ color_printf(COLOR_DOUBLECOLON, _(":: %s: requires %s\n"), alpm_miss_get_target(miss), - depstring); - free(depstring); - } -@@ -131,7 +131,7 @@ - holdpkg = 1; - } - } -- if(holdpkg && (noyes(_("HoldPkg was found in target list. Do you want to continue?")) == 0)) { -+ if(holdpkg && (noyes(NULL, _("HoldPkg was found in target list. Do you want to continue?")) == 0)) { - retval = 1; - goto cleanup; - } -@@ -146,7 +146,7 @@ - printf("\n"); - - /* get confirmation */ -- if(yesno(_("Do you want to remove these packages?")) == 0) { -+ if(yesno(NULL, _("Do you want to remove these packages?")) == 0) { - retval = 1; - goto cleanup; - } -diff -Naur pacman-3.3.1/src/pacman/sync.c pacman-color-3.3.1/src/pacman/sync.c ---- pacman-3.3.1/src/pacman/sync.c 2009-09-17 02:36:29.000000000 +0200 -+++ pacman-color-3.3.1/src/pacman/sync.c 2009-09-26 10:21:29.000000000 +0200 -@@ -86,7 +86,7 @@ - /* We have a directory that doesn't match any syncdb. - * Ask the user if he wants to remove it. */ - if(!found) { -- if(!yesno(_("Do you want to remove %s?"), path)) { -+ if(!yesno(NULL, _("Do you want to remove %s?"), path)) { - continue; - } - -@@ -105,8 +105,8 @@ - const char *dbpath = alpm_option_get_dbpath(); - char newdbpath[PATH_MAX]; - -- printf(_("Database directory: %s\n"), dbpath); -- if(!yesno(_("Do you want to remove unused repositories?"))) { -+ color_printf(COLOR_WHITE_COLON, _("Database directory: %s\n"), dbpath); -+ if(!yesno(NULL, _("Do you want to remove unused repositories?"))) { - return(0); - } - /* The sync dbs were previously put in dbpath/, but are now in dbpath/sync/, -@@ -133,15 +133,15 @@ - struct dirent *ent; - /* Open up each package and see if it should be deleted, - * depending on the clean method used */ -- printf(_("Cache directory: %s\n"), cachedir); -+ color_printf(COLOR_WHITE_COLON, _("Cache directory: %s\n"), cachedir); - switch(config->cleanmethod) { - case PM_CLEAN_KEEPINST: -- if(!yesno(_("Do you want to remove uninstalled packages from cache?"))) { -+ if(!yesno(NULL, _("Do you want to remove uninstalled packages from cache?"))) { - return(0); - } - break; - case PM_CLEAN_KEEPCUR: -- if(!yesno(_("Do you want to remove outdated packages from cache?"))) { -+ if(!yesno(NULL, _("Do you want to remove outdated packages from cache?"))) { - return(0); - } - break; -@@ -176,7 +176,7 @@ - * files here that aren't valid packages. we also don't need a full - * load of the package, just the metadata. */ - if(alpm_pkg_load(path, 0, &localpkg) != 0 || localpkg == NULL) { -- if(yesno(_("File %s does not seem to be a valid package, remove it?"), path)) { -+ if(yesno(NULL, _("File %s does not seem to be a valid package, remove it?"), path)) { - unlink(path); - } - continue; -@@ -217,8 +217,8 @@ - } - } else { - /* full cleanup */ -- printf(_("Cache directory: %s\n"), cachedir); -- if(!noyes(_("Do you want to remove ALL files from cache?"))) { -+ color_printf(COLOR_WHITE_COLON, _("Cache directory: %s\n"), cachedir); -+ if(!noyes(NULL, _("Do you want to remove ALL files from cache?"))) { - return(0); - } - printf(_("removing all files from cache...\n")); -@@ -301,8 +301,9 @@ - pmpkg_t *pkg = alpm_list_getdata(j); - - if (!config->quiet) { -- printf("%s/%s %s", alpm_db_get_name(db), alpm_pkg_get_name(pkg), -- alpm_pkg_get_version(pkg)); -+ color_printf(COLOR_MAGENTA_ALL, "%s/", alpm_db_get_name(db)); -+ color_printf(COLOR_WHITE_ALL, "%s ", alpm_pkg_get_name(pkg)); -+ color_printf(COLOR_GREEN_ALL, "%s", alpm_pkg_get_version(pkg)); - } else { - printf("%s", alpm_pkg_get_name(pkg)); - } -@@ -318,16 +319,11 @@ - if (!config->quiet) { - if((grp = alpm_pkg_get_groups(pkg)) != NULL) { - alpm_list_t *k; -- printf(" ("); -+ color_printf(COLOR_BLUE_ALL, " ("); - for(k = grp; k; k = alpm_list_next(k)) { - const char *group = alpm_list_getdata(k); -- printf("%s", group); -- if(alpm_list_next(k)) { -- /* only print a spacer if there are more groups */ -- printf(" "); -- } -+ color_printf(COLOR_BLUE_ALL, "%s%s", group, (alpm_list_next(k) ? " " : ")")); - } -- printf(")"); - } - - /* we need a newline and initial indent first */ -@@ -360,8 +356,8 @@ - /* get names of packages in group */ - for(k = alpm_grp_get_pkgs(grp); k; k = alpm_list_next(k)) { - if(!config->quiet) { -- printf("%s %s\n", grpname, -- alpm_pkg_get_name(alpm_list_getdata(k))); -+ color_printf(COLOR_BLUE_ALL, "%s ", grpname); -+ color_printf(COLOR_WHITE_ALL, "%s\n", alpm_pkg_get_name(alpm_list_getdata(k))); - } else { - printf("%s\n", alpm_pkg_get_name(alpm_list_getdata(k))); - } -@@ -379,8 +375,8 @@ - - if(level > 1) { - for(k = alpm_grp_get_pkgs(grp); k; k = alpm_list_next(k)) { -- printf("%s %s\n", grpname, -- alpm_pkg_get_name(alpm_list_getdata(k))); -+ color_printf(COLOR_BLUE_ALL, "%s ", grpname); -+ color_printf(COLOR_WHITE_ALL, "%s\n", alpm_pkg_get_name(alpm_list_getdata(k))); - } - } else { - /* print grp names only, no package names */ -@@ -515,8 +511,9 @@ - for(j = alpm_db_get_pkgcache(db); j; j = alpm_list_next(j)) { - pmpkg_t *pkg = alpm_list_getdata(j); - if (!config->quiet) { -- printf("%s %s %s\n", alpm_db_get_name(db), alpm_pkg_get_name(pkg), -- alpm_pkg_get_version(pkg)); -+ color_printf(COLOR_MAGENTA_ALL, "%s ", alpm_db_get_name(db)); -+ color_printf(COLOR_WHITE_ALL, "%s ", alpm_pkg_get_name(pkg)); -+ color_printf(COLOR_GREEN_ALL, "%s\n", alpm_pkg_get_version(pkg)); - } else { - printf("%s\n", alpm_pkg_get_name(pkg)); - } -@@ -561,7 +558,7 @@ - } - - if(config->op_s_upgrade) { -- printf(_(":: Starting full system upgrade...\n")); -+ color_printf(COLOR_DOUBLECOLON, _(":: Starting full system upgrade...\n")); - alpm_logaction("starting full system upgrade\n"); - if(alpm_trans_sysupgrade(config->op_s_upgrade >= 2) == -1) { - pm_fprintf(stderr, PM_LOG_ERROR, "%s\n", alpm_strerrorlast()); -@@ -599,7 +596,7 @@ - alpm_list_t *k, *pkgnames = NULL; - - found++; -- printf(_(":: group %s (including ignored packages):\n"), targ); -+ color_printf(COLOR_DOUBLECOLON, _(":: group %s (including ignored packages):\n"), targ); - /* remove dupe entries in case a package exists in multiple repos */ - alpm_list_t *grppkgs = alpm_grp_get_pkgs(grp); - alpm_list_t *pkgs = alpm_list_remove_dupes(grppkgs); -@@ -607,15 +604,15 @@ - pkgnames = alpm_list_add(pkgnames, - (char*)alpm_pkg_get_name(k->data)); - } -- list_display(" ", pkgnames); -- if(yesno(_(":: Install whole content?"))) { -+ list_display(NULL, " ", pkgnames); -+ if(yesno(COLOR_DOUBLECOLON, _(":: Install whole content?"))) { - for(k = pkgnames; k; k = alpm_list_next(k)) { - targets = alpm_list_add(targets, strdup(alpm_list_getdata(k))); - } - } else { - for(k = pkgnames; k; k = alpm_list_next(k)) { - char *pkgname = alpm_list_getdata(k); -- if(yesno(_(":: Install %s from group %s?"), pkgname, targ)) { -+ if(yesno(COLOR_DOUBLECOLON, _(":: Install %s from group %s?"), pkgname, targ)) { - targets = alpm_list_add(targets, strdup(pkgname)); - } - } -@@ -644,7 +641,7 @@ - pmdepmissing_t *miss = alpm_list_getdata(i); - pmdepend_t *dep = alpm_miss_get_dep(miss); - char *depstring = alpm_dep_compute_string(dep); -- printf(_(":: %s: requires %s\n"), alpm_miss_get_target(miss), -+ color_printf(COLOR_DOUBLECOLON, _(":: %s: requires %s\n"), alpm_miss_get_target(miss), - depstring); - free(depstring); - } -@@ -652,7 +649,7 @@ - case PM_ERR_CONFLICTING_DEPS: - for(i = data; i; i = alpm_list_next(i)) { - pmconflict_t *conflict = alpm_list_getdata(i); -- printf(_(":: %s: conflicts with %s\n"), -+ color_printf(COLOR_DOUBLECOLON, _(":: %s: conflicts with %s\n"), - alpm_conflict_get_package1(conflict), alpm_conflict_get_package2(conflict)); - } - break; -@@ -696,9 +693,9 @@ - - int confirm; - if(config->op_s_downloadonly) { -- confirm = yesno(_("Proceed with download?")); -+ confirm = yesno(NULL, _("Proceed with download?")); - } else { -- confirm = yesno(_("Proceed with installation?")); -+ confirm = yesno(NULL, _("Proceed with installation?")); - } - if(!confirm) { - goto cleanup; -@@ -720,7 +717,7 @@ - alpm_fileconflict_get_ctarget(conflict)); - break; - case PM_FILECONFLICT_FILESYSTEM: -- printf(_("%s: %s exists in filesystem\n"), -+ color_printf(COLOR_WHITE_COLON, _("%s: %s exists in filesystem\n"), - alpm_fileconflict_get_target(conflict), - alpm_fileconflict_get_file(conflict)); - break; -@@ -738,7 +735,7 @@ - break; - } - /* TODO: stderr? */ -- printf(_("Errors occurred, no packages were upgraded.\n")); -+ color_printf(COLOR_RED_ALL, _("Errors occurred, no packages were upgraded.\n")); - retval = 1; - goto cleanup; - } -@@ -792,7 +789,7 @@ - - if(config->op_s_sync) { - /* grab a fresh package list */ -- printf(_(":: Synchronizing package databases...\n")); -+ color_printf(COLOR_DOUBLECOLON, _(":: Synchronizing package databases...\n")); - alpm_logaction("synchronizing package lists\n"); - if(!sync_synctree(config->op_s_sync, sync_dbs)) { - return(1); -@@ -837,13 +834,13 @@ - /* check for newer versions of packages to be upgraded first */ - alpm_list_t *packages = syncfirst(); - if(packages) { -- /* Do not ask user if all the -S targets are SyncFirst packages, see FS#15810 */ -+ /* Do not ask user if all the -S targets are SyncFirst packages, see FS#15810 */ - alpm_list_t *tmp = NULL; - if(config->op_s_upgrade || (tmp = alpm_list_diff(targets, packages, (alpm_list_fn_cmp)strcmp))) { - alpm_list_free(tmp); -- printf(_(":: The following packages should be upgraded first :\n")); -- list_display(" ", packages); -- if(yesno(_(":: Do you want to cancel the current operation\n" -+ color_printf(COLOR_DOUBLECOLON, _(":: The following packages should be upgraded first :\n")); -+ list_display(NULL, " ", packages); -+ if(yesno(COLOR_DOUBLECOLON2, _(":: Do you want to cancel the current operation\n" - ":: and upgrade these packages now?"))) { - FREELIST(targs); - targs = packages; -diff -Naur pacman-3.3.1/src/pacman/upgrade.c pacman-color-3.3.1/src/pacman/upgrade.c ---- pacman-3.3.1/src/pacman/upgrade.c 2009-08-03 14:37:13.000000000 +0200 -+++ pacman-color-3.3.1/src/pacman/upgrade.c 2009-09-26 10:09:00.000000000 +0200 -@@ -96,7 +96,7 @@ - /* TODO indicate if the error was a virtual package or not: - * :: %s: requires %s, provided by %s - */ -- printf(_(":: %s: requires %s\n"), alpm_miss_get_target(miss), -+ color_printf(COLOR_DOUBLECOLON, _(":: %s: requires %s\n"), alpm_miss_get_target(miss), - depstring); - free(depstring); - } -@@ -104,7 +104,7 @@ - case PM_ERR_CONFLICTING_DEPS: - for(i = data; i; i = alpm_list_next(i)) { - pmconflict_t *conflict = alpm_list_getdata(i); -- printf(_(":: %s: conflicts with %s\n"), -+ color_printf(COLOR_DOUBLECOLON, _(":: %s: conflicts with %s\n"), - alpm_conflict_get_package1(conflict), alpm_conflict_get_package2(conflict)); - } - break; -@@ -119,13 +119,13 @@ - alpm_fileconflict_get_ctarget(conflict)); - break; - case PM_FILECONFLICT_FILESYSTEM: -- printf(_("%s: %s exists in filesystem\n"), -+ color_printf(COLOR_WHITE_COLON, _("%s: %s exists in filesystem\n"), - alpm_fileconflict_get_target(conflict), - alpm_fileconflict_get_file(conflict)); - break; - } - } -- printf(_("\nerrors occurred, no packages were upgraded.\n")); -+ color_printf(COLOR_RED_ALL, _("\nerrors occurred, no packages were upgraded.\n")); - break; - default: - break; -diff -Naur pacman-3.3.1/src/pacman/util.c pacman-color-3.3.1/src/pacman/util.c ---- pacman-3.3.1/src/pacman/util.c 2009-08-03 14:37:13.000000000 +0200 -+++ pacman-color-3.3.1/src/pacman/util.c 2009-09-26 10:09:00.000000000 +0200 -@@ -44,6 +44,20 @@ - #include "conf.h" - #include "callback.h" - -+#define COLOR_LEN 8 -+ -+typedef struct __colortab_t { -+ char red[COLOR_LEN + 1]; -+ char green[COLOR_LEN + 1]; -+ char yellow[COLOR_LEN + 1]; -+ char blue[COLOR_LEN + 1]; -+ char magenta[COLOR_LEN + 1]; -+ char cyan[COLOR_LEN + 1]; -+ char white[COLOR_LEN + 1]; -+ char none[COLOR_LEN + 1]; -+} colortab_t; -+ -+static colortab_t colortab; - - int trans_init(pmtranstype_t type, pmtransflag_t flags) - { -@@ -440,14 +454,14 @@ - return(len); - } - --void string_display(const char *title, const char *string) -+void string_display(const colordata_t *colors_title, const char *title, const char *string) - { - int len = 0; - - if(title) { - /* compute the length of title + a space */ - len = string_length(title) + 1; -- printf("%s ", title); -+ color_printf(colors_title, "%s ", title); - } - if(string == NULL || string[0] == '\0') { - printf(_("None")); -@@ -457,14 +471,14 @@ - printf("\n"); - } - --void list_display(const char *title, const alpm_list_t *list) -+void list_display(const colordata_t *colors_title, const char *title, const alpm_list_t *list) - { - const alpm_list_t *i; - int cols, len = 0; - - if(title) { - len = string_length(title) + 1; -- printf("%s ", title); -+ color_printf(colors_title, "%s ", title); - } - - if(!list) { -@@ -491,14 +505,14 @@ - } - } - --void list_display_linebreak(const char *title, const alpm_list_t *list) -+void list_display_linebreak(const colordata_t *colors_title, const char *title, const alpm_list_t *list) - { - const alpm_list_t *i; - int len = 0; - - if(title) { - len = string_length(title) + 1; -- printf("%s ", title); -+ color_printf(colors_title, "%s ", title); - } - - if(!list) { -@@ -558,19 +572,20 @@ - - if(install) { - asprintf(&str, _("Targets (%d):"), alpm_list_count(targets)); -- list_display(str, targets); -+ list_display(COLOR_YELLOW_ALL, str, targets); - free(str); - printf("\n"); - -- printf(_("Total Download Size: %.2f MB\n"), mbdlsize); -- printf(_("Total Installed Size: %.2f MB\n"), mbisize); -+ color_printf(COLOR_WHITE_COLON, _("Total Download Size: %.2f MB\n"), mbdlsize); -+ color_printf(COLOR_WHITE_COLON, _("Total Installed Size: %.2f MB\n"), mbisize); -+ - } else { - asprintf(&str, _("Remove (%d):"), alpm_list_count(targets)); -- list_display(str, targets); -+ list_display(COLOR_RED_ALL, str, targets); - free(str); - printf("\n"); - -- printf(_("Total Removed Size: %.2f MB\n"), mbisize); -+ color_printf(COLOR_WHITE_COLON, _("Total Removed Size: %.2f MB\n"), mbisize); - } - - FREELIST(targets); -@@ -621,7 +636,7 @@ - alpm_list_t *optdeps = alpm_list_diff(new,old,str_cmp); - if(optdeps) { - printf(_("New optional dependencies for %s\n"), alpm_pkg_get_name(newpkg)); -- list_display_linebreak(" ", optdeps); -+ list_display_linebreak(NULL, " ", optdeps); - } - alpm_list_free(optdeps); - } -@@ -631,12 +646,12 @@ - alpm_list_t *optdeps = alpm_pkg_get_optdepends(pkg); - if(optdeps) { - printf(_("Optional dependencies for %s\n"), alpm_pkg_get_name(pkg)); -- list_display_linebreak(" ", optdeps); -+ list_display_linebreak(NULL, " ", optdeps); - } - } - - /* presents a prompt and gets a Y/N answer */ --static int question(short preset, char *fmt, va_list args) -+static int question(const colordata_t *colors, short preset, char *fmt, va_list args) - { - char response[32]; - FILE *stream; -@@ -648,7 +663,7 @@ - stream = stderr; - } - -- vfprintf(stream, fmt, args); -+ color_vfprintf(stream, colors, fmt, args); - - if(preset) { - fprintf(stream, " %s ", _("[Y/n]")); -@@ -676,25 +691,25 @@ - return(0); - } - --int yesno(char *fmt, ...) -+int yesno(const colordata_t *colors, char *fmt, ...) - { - int ret; - va_list args; - - va_start(args, fmt); -- ret = question(1, fmt, args); -+ ret = question(colors, 1, fmt, args); - va_end(args); - - return(ret); - } - --int noyes(char *fmt, ...) -+int noyes(const colordata_t *colors, char *fmt, ...) - { - int ret; - va_list args; - - va_start(args, fmt); -- ret = question(0, fmt, args); -+ ret = question(colors, 0, fmt, args); - va_end(args); - - return(ret); -@@ -740,21 +755,40 @@ - ret = vasprintf(&msg, format, args); - - /* print a prefix to the message */ -- switch(level) { -- case PM_LOG_DEBUG: -- asprintf(string, "debug: %s", msg); -- break; -- case PM_LOG_ERROR: -- asprintf(string, _("error: %s"), msg); -- break; -- case PM_LOG_WARNING: -- asprintf(string, _("warning: %s"), msg); -- break; -- case PM_LOG_FUNCTION: -- asprintf(string, _("function: %s"), msg); -- break; -- default: -- break; -+ if(isatty(fileno(stdout))) { -+ switch(level) { -+ case PM_LOG_DEBUG: -+ asprintf(string, "debug: %s", msg); -+ break; -+ case PM_LOG_ERROR: -+ asprintf(string, "%s%s%s%s", colortab.red, _("error: "), colortab.none, msg); -+ break; -+ case PM_LOG_WARNING: -+ asprintf(string, "%s%s%s%s", colortab.yellow, _("warning: "), colortab.none, msg); -+ break; -+ case PM_LOG_FUNCTION: -+ asprintf(string, _("function: %s"), msg); -+ break; -+ default: -+ break; -+ } -+ } else { -+ switch(level) { -+ case PM_LOG_DEBUG: -+ asprintf(string, "debug: %s", msg); -+ break; -+ case PM_LOG_ERROR: -+ asprintf(string, _("error: %s"), msg); -+ break; -+ case PM_LOG_WARNING: -+ asprintf(string, _("warning: %s"), msg); -+ break; -+ case PM_LOG_FUNCTION: -+ asprintf(string, _("function: %s"), msg); -+ break; -+ default: -+ break; -+ } - } - free(msg); - -@@ -792,10 +826,10 @@ - fprintf(stream, "debug: "); - break; - case PM_LOG_ERROR: -- fprintf(stream, _("error: ")); -+ color_fprintf(stream, COLOR_RED_ALL, _("error: ")); - break; - case PM_LOG_WARNING: -- fprintf(stream, _("warning: ")); -+ color_fprintf(stream, COLOR_YELLOW_ALL, _("warning: ")); - break; - case PM_LOG_FUNCTION: - /* TODO we should increase the indent level when this occurs so we can see -@@ -833,4 +867,310 @@ - } - #endif - -+/* pacman-color */ -+ -+int _set_color_sequence(const char* name, char* dest) -+{ -+ int ret = 0; -+ -+ if(strcmp(name, "black") == 0) { -+ strncpy(dest, "\033[0;30m", COLOR_LEN); -+ } else if(strcmp(name, "red") == 0) { -+ strncpy(dest, "\033[0;31m", COLOR_LEN); -+ } else if(strcmp(name, "green") == 0) { -+ strncpy(dest, "\033[0;32m", COLOR_LEN); -+ } else if(strcmp(name, "yellow") == 0) { -+ strncpy(dest, "\033[0;33m", COLOR_LEN); -+ } else if(strcmp(name, "blue") == 0) { -+ strncpy(dest, "\033[0;34m", COLOR_LEN); -+ } else if(strcmp(name, "magenta") == 0) { -+ strncpy(dest, "\033[0;35m", COLOR_LEN); -+ } else if(strcmp(name, "cyan") == 0) { -+ strncpy(dest, "\033[0;36m", COLOR_LEN); -+ } else if(strcmp(name, "white") == 0) { -+ strncpy(dest, "\033[0;37m", COLOR_LEN); -+ } else if(strcmp(name, "gray") == 0) { -+ strncpy(dest, "\033[1;30m", COLOR_LEN); -+ } else if(strcmp(name, "intensive red") == 0) { -+ strncpy(dest, "\033[1;31m", COLOR_LEN); -+ } else if(strcmp(name, "intensive green") == 0) { -+ strncpy(dest, "\033[1;32m", COLOR_LEN); -+ } else if(strcmp(name, "intensive yellow") == 0) { -+ strncpy(dest, "\033[1;33m", COLOR_LEN); -+ } else if(strcmp(name, "intensive blue") == 0) { -+ strncpy(dest, "\033[1;34m", COLOR_LEN); -+ } else if(strcmp(name, "intensive magenta") == 0) { -+ strncpy(dest, "\033[1;35m", COLOR_LEN); -+ } else if(strcmp(name, "intensive cyan") == 0) { -+ strncpy(dest, "\033[1;36m", COLOR_LEN); -+ } else if(strcmp(name, "intensive white") == 0) { -+ strncpy(dest, "\033[1;37m", COLOR_LEN); -+ } else if(strcmp(name, "intensive foreground") == 0) { -+ strncpy(dest, "\033[m\033[1m", COLOR_LEN); -+ } else if(strcmp(name, "none") == 0) { -+ strncpy(dest, "\033[m", COLOR_LEN); -+ } else { -+ ret = 1; -+ } -+ dest[COLOR_LEN] = '\0'; -+ return(ret); -+} -+ -+void _insert_color(FILE* stream, color_t color) -+{ -+ switch(color) { -+ case COLOR_RED: -+ fprintf(stream, colortab.red); -+ break; -+ case COLOR_GREEN: -+ fprintf(stream, colortab.green); -+ break; -+ case COLOR_YELLOW: -+ fprintf(stream, colortab.yellow); -+ break; -+ case COLOR_BLUE: -+ fprintf(stream, colortab.blue); -+ break; -+ case COLOR_MAGENTA: -+ fprintf(stream, colortab.magenta); -+ break; -+ case COLOR_CYAN: -+ fprintf(stream, colortab.cyan); -+ break; -+ case COLOR_WHITE: -+ fprintf(stream, colortab.white); -+ break; -+ case COLOR_NONE: -+ fprintf(stream, colortab.none); -+ break; -+ default:; -+ } -+} -+ -+int _parsecolorconfig(colortab_t* colortab, char* file) -+{ -+ _set_color_sequence("intensive red", colortab->red); -+ _set_color_sequence("intensive green", colortab->green); -+ _set_color_sequence("intensive yellow", colortab->yellow); -+ _set_color_sequence("intensive blue", colortab->blue); -+ _set_color_sequence("intensive magenta", colortab->magenta); -+ _set_color_sequence("intensive cyan", colortab->cyan); -+ _set_color_sequence("intensive foreground", colortab->white); -+ _set_color_sequence("none", colortab->none); -+ -+ FILE* fp = NULL; -+ int linenum = 0; -+ char line[PATH_MAX+1]; -+ char* ptr; -+ -+ fp = fopen(file, "r"); -+ if(fp == NULL) { -+ pm_printf(PM_LOG_ERROR, _("config file %s could not be read.\n"), file); -+ return 1; -+ } -+ while(fgets(line, PATH_MAX, fp)) { -+ linenum++; -+ strtrim(line); -+ -+ if(strlen(line) == 0 || line[0] == '#') { -+ continue; -+ } -+ if((ptr = strchr(line, '#'))) { -+ *ptr = '\0'; -+ } -+ -+ char* key = line; -+ ptr = line; -+ strsep(&ptr, "="); -+ strtrim(key); -+ strtrim(ptr); -+ -+ if(key == NULL) { -+ pm_printf(PM_LOG_ERROR, _("config file %s, line %d: syntax error in config file- missing key.\n"), -+ file, linenum); -+ return 1; -+ } -+ if(strcmp(key, "Red") == 0) { -+ if(_set_color_sequence(ptr, colortab->red)) { -+ pm_printf(PM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), -+ file, linenum, ptr); -+ } -+ } else if(strcmp(key, "Green") == 0) { -+ if(_set_color_sequence(ptr, colortab->green)) { -+ pm_printf(PM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), -+ file, linenum, ptr); -+ } -+ } else if(strcmp(key, "Yellow") == 0) { -+ if(_set_color_sequence(ptr, colortab->yellow)) { -+ pm_printf(PM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), -+ file, linenum, ptr); -+ } -+ } else if(strcmp(key, "Blue") == 0) { -+ if(_set_color_sequence(ptr, colortab->blue)) { -+ pm_printf(PM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), -+ file, linenum, ptr); -+ } -+ } else if(strcmp(key, "Magenta") == 0) { -+ if(_set_color_sequence(ptr, colortab->magenta)) { -+ pm_printf(PM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), -+ file, linenum, ptr); -+ } -+ } else if(strcmp(key, "Cyan") == 0) { -+ if(_set_color_sequence(ptr, colortab->cyan)) { -+ pm_printf(PM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), -+ file, linenum, ptr); -+ } -+ } else if(strcmp(key, "White") == 0) { -+ if(_set_color_sequence(ptr, colortab->white)) { -+ pm_printf(PM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), -+ file, linenum, ptr); -+ } -+ } else { -+ pm_printf(PM_LOG_ERROR, _("config file %s, line %d: directive '%s' not recognized.\n"), -+ file, linenum, key); -+ return(1); -+ } -+ } -+ return(0); -+} -+ -+int parsecolorconfig() -+{ -+ return(_parsecolorconfig(&colortab, "/etc/pacman.d/color.conf")); -+} -+ -+int color_vfprintf(FILE* stream, const colordata_t* colors, const char* format, va_list args) -+{ -+ int ret = 0; -+ -+ if(isatty(fileno(stream)) && colors) { -+ char* msg = NULL; -+ ret = vasprintf(&msg, format, args); -+ if(msg == NULL) { -+ return(ret); -+ } -+ -+ const colordata_t* colorpos = colors; -+ color_t colorlast = COLOR_NONE; -+ int len = strlen(msg) + 1; -+ wchar_t* wcstr = calloc(len, sizeof(wchar_t)); -+ len = mbstowcs(wcstr, msg, len); -+ free(msg); -+ const wchar_t *strpos = wcstr; -+ -+ while(*strpos) { -+ if(colorpos->color != COLOR_END && -+ ((colorpos->separator == SEP_ANY) || -+ (colorpos->separator == SEP_LINE && *strpos == L'\n') || -+ (colorpos->separator == SEP_COLON && (*strpos == L':' || *strpos == L':')))) { -+ _insert_color(stream, colorpos->color); -+ colorlast = colorpos->color; -+ colorpos++; -+ } -+ fprintf(stream, "%lc", (wint_t)*strpos); -+ strpos++; -+ } -+ free(wcstr); -+ -+ if(colorlast != COLOR_NONE) { -+ _insert_color(stream, COLOR_NONE); -+ } -+ } else { -+ ret = vfprintf(stream, format, args); -+ } -+ return(ret); -+} -+ -+int color_fprintf(FILE* stream, const colordata_t* colors, const char* format, ...) -+{ -+ int ret; -+ va_list args; -+ va_start(args, format); -+ ret = color_vfprintf(stream, colors, format, args); -+ va_end(args); -+ return(ret); -+} -+ -+int color_printf(const colordata_t* colors, const char* format, ...) -+{ -+ int ret; -+ va_list args; -+ va_start(args, format); -+ ret = color_vfprintf(stdout, colors, format, args); -+ va_end(args); -+ return(ret); -+} -+ -+void color_string_display(const colordata_t* colors_title, const char* title, const colordata_t* colors_string, const char* string) -+{ -+ if(title) { -+ color_printf(colors_title, "%s ", title); -+ } -+ if(string == NULL || string[0] == '\0') { -+ printf(_("None")); -+ } else { -+ color_printf(colors_string, "%s", string); -+ } -+ printf("\n"); -+} -+ -+const colordata_t COLOR_WHITE_ALL[] = { -+ { SEP_ANY, COLOR_WHITE }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ -+const colordata_t COLOR_GREEN_ALL[] = { -+ { SEP_ANY, COLOR_GREEN }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ -+const colordata_t COLOR_RED_ALL[] = { -+ { SEP_ANY, COLOR_RED }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ -+const colordata_t COLOR_BLUE_ALL[] = { -+ { SEP_ANY, COLOR_BLUE }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ -+const colordata_t COLOR_YELLOW_ALL[] = { -+ { SEP_ANY, COLOR_YELLOW }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ -+const colordata_t COLOR_MAGENTA_ALL[] = { -+ { SEP_ANY, COLOR_MAGENTA }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ -+const colordata_t COLOR_CYAN_ALL[] = { -+ { SEP_ANY, COLOR_CYAN }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ -+const colordata_t COLOR_DOUBLECOLON[] = { -+ { SEP_ANY, COLOR_BLUE }, -+ { SEP_ANY, COLOR_SAME }, -+ { SEP_ANY, COLOR_WHITE }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ -+const colordata_t COLOR_DOUBLECOLON2[] = { -+ { SEP_ANY, COLOR_BLUE }, -+ { SEP_ANY, COLOR_SAME }, -+ { SEP_ANY, COLOR_WHITE }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_BLUE }, -+ { SEP_ANY, COLOR_SAME }, -+ { SEP_ANY, COLOR_WHITE }, -+ { SEP_LINE, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ -+const colordata_t COLOR_WHITE_COLON[] = { -+ { SEP_ANY, COLOR_WHITE }, -+ { SEP_COLON, COLOR_SAME }, -+ { SEP_ANY, COLOR_NONE }, -+ { SEP_ANY, COLOR_END } }; -+ - /* vim: set ts=2 sw=2 noet: */ -diff -Naur pacman-3.3.1/src/pacman/util.h pacman-color-3.3.1/src/pacman/util.h ---- pacman-3.3.1/src/pacman/util.h 2009-08-03 14:37:13.000000000 +0200 -+++ pacman-color-3.3.1/src/pacman/util.h 2009-09-26 10:09:00.000000000 +0200 -@@ -37,6 +37,48 @@ - /* update speed for the fill_progress based functions */ - #define UPDATE_SPEED_SEC 0.2f - -+/* pacman-color */ -+typedef enum _separator_t { -+ SEP_ANY = 0, -+ SEP_LINE, -+ SEP_COLON, -+} separator_t; -+ -+typedef enum _color_t { -+ COLOR_END = 0, -+ COLOR_SAME, -+ COLOR_RED, -+ COLOR_GREEN, -+ COLOR_YELLOW, -+ COLOR_BLUE, -+ COLOR_MAGENTA, -+ COLOR_CYAN, -+ COLOR_WHITE, -+ COLOR_NONE, -+} color_t; -+ -+typedef struct _colordata_t { -+ separator_t separator; -+ color_t color; -+} colordata_t; -+ -+extern const colordata_t COLOR_WHITE_ALL[]; -+extern const colordata_t COLOR_GREEN_ALL[]; -+extern const colordata_t COLOR_RED_ALL[]; -+extern const colordata_t COLOR_BLUE_ALL[]; -+extern const colordata_t COLOR_YELLOW_ALL[]; -+extern const colordata_t COLOR_MAGENTA_ALL[]; -+extern const colordata_t COLOR_CYAN_ALL[]; -+extern const colordata_t COLOR_DOUBLECOLON[]; -+extern const colordata_t COLOR_DOUBLECOLON2[]; -+extern const colordata_t COLOR_WHITE_COLON[]; -+ -+int parsecolorconfig(); -+int color_fprintf(FILE* stream, const colordata_t* colors, const char* format, ...) __attribute__((format(printf,3,4))); -+int color_printf(const colordata_t* colors, const char* format, ...) __attribute__((format(printf,2,3))); -+int color_vfprintf(FILE* stream, const colordata_t* colors, const char* format, va_list args) __attribute__((format(printf,3,0))); -+void color_string_display(const colordata_t* colors_title, const char* title, const colordata_t* colors_string, const char* string); -+ - int trans_init(pmtranstype_t type, pmtransflag_t flags); - int trans_release(void); - int needs_root(void); -@@ -50,15 +92,15 @@ - char *strtrim(char *str); - char *strreplace(const char *str, const char *needle, const char *replace); - alpm_list_t *strsplit(const char *str, const char splitchar); --void string_display(const char *title, const char *string); --void list_display(const char *title, const alpm_list_t *list); --void list_display_linebreak(const char *title, const alpm_list_t *list); -+void string_display(const colordata_t *colors_title, const char *title, const char *string); -+void list_display(const colordata_t *colors_title, const char *title, const alpm_list_t *list); -+void list_display_linebreak(const colordata_t *colors_title, const char *title, const alpm_list_t *list); - void display_targets(const alpm_list_t *pkgs, int install); - void display_synctargets(const alpm_list_t *syncpkgs); - void display_new_optdepends(pmpkg_t *oldpkg, pmpkg_t *newpkg); - void display_optdepends(pmpkg_t *pkg); --int yesno(char *fmt, ...); --int noyes(char *fmt, ...); -+int yesno(const colordata_t *colors, char *fmt, ...); -+int noyes(const colordata_t *colors, char *fmt, ...); - int pm_printf(pmloglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); - int pm_fprintf(FILE *stream, pmloglevel_t level, const char *format, ...) __attribute__((format(printf,3,4))); - int pm_vfprintf(FILE *stream, pmloglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); diff --git a/pacman-color/pacman-color.install b/pacman-color/pacman-color.install deleted file mode 100644 index e8fb3de..0000000 --- a/pacman-color/pacman-color.install +++ /dev/null @@ -1,24 +0,0 @@ -# arg 1: the new package version -post_install() { - post_upgrade -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { -cat <<-EOM - you can change colors in '/etc/pacman.d/color.conf' - - homepage: http://vogo.unas.cz/pacman-color.html -EOM -} - -# arg 1: the old package version -pre_remove() { - /bin/true -} - -op=$1 -shift - -$op $*
\ No newline at end of file diff --git a/pacman-git/PKGBUILD b/pacman-git/PKGBUILD deleted file mode 100644 index 51d9187..0000000 --- a/pacman-git/PKGBUILD +++ /dev/null @@ -1,101 +0,0 @@ -# Maintainer: Dave Reisner <d@falconindy.com> -# Contributor: Thomas Dziedzic < gostrc at gmail > -# Contributor: godane <slaxemulator@gmail.com.com> -# Contributor: Andres Perera <aepd87@gmail.com> - -pkgname=pacman-git -pkgver=20110428 -pkgrel=1 -pkgdesc="A library-based package manager with dependency support. git version." -arch=('i686' 'x86_64') -url="http://www.archlinux.org/pacman/" -license=('GPL') -groups=('base') -depends=('bash' 'curl>=7.19.4' 'gpgme' 'libarchive>=2.7.1' 'pacman-mirrorlist') -makedepends=('git' 'asciidoc') -optdepends=('fakeroot: for makepkg usage as normal user') -backup=(etc/pacman.conf etc/makepkg.conf) -conflicts=('pacman') -provides=('pacman') -options=(!libtool !strip) -source=(pacman.conf - pacman.conf.x86_64 - makepkg.conf) -md5sums=('10c2b220d4d2ec37a54ab7d8982acdd2' - 'c6559dc43140e9023041171e72bd91e8' - 'a7be38e9fcf92414ded8c7f9574a5a9b') - -_gitroot="git://projects.archlinux.org/pacman.git" -_gitname="pacman" - -build() { - msg 'Connecting to GIT server...' - - if [[ -d $_gitname ]]; then - ( cd $_gitname && git pull origin ) - msg 'The local files are updated.' - else - git clone $_gitroot - fi - - msg 'GIT checkout done or server timeout' - msg 'Starting make...' - - rm -rf $_gitname-build - git clone $_gitname{,-build} - cd $_gitname-build - - ./autogen.sh - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-doc \ - --enable-git-version --enable-debug - make -} - -check() { - cd "$srcdir/$_gitname-build" - - make check -} - -package() { - cd "$srcdir/$_gitname-build" - - make DESTDIR=$pkgdir install - - # install Arch specific stuff - mkdir -p $pkgdir/etc - case "$CARCH" in - i686) - install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf - ;; - x86_64) - install -m644 $srcdir/pacman.conf.x86_64 $pkgdir/etc/pacman.conf - ;; - esac - install -m644 $srcdir/makepkg.conf $pkgdir/etc/ - # set things correctly in the default conf file - case "$CARCH" in - i686) - mycarch="i686" - mychost="i686-pc-linux-gnu" - myflags="-march=i686 " - ;; - x86_64) - mycarch="x86_64" - mychost="x86_64-unknown-linux-gnu" - myflags="-march=x86-64 " - ;; - esac - sed -i $pkgdir/etc/makepkg.conf \ - -e "s|@CARCH[@]|$mycarch|g" \ - -e "s|@CHOST[@]|$mychost|g" \ - -e "s|@CARCHFLAGS[@]|$myflags|g" - - # install completion files - mkdir -p $pkgdir/etc/bash_completion.d/ - install -m644 contrib/bash_completion $pkgdir/etc/bash_completion.d/pacman - mkdir -p $pkgdir/usr/share/zsh/site-functions/ - install -m644 contrib/zsh_completion $pkgdir/usr/share/zsh/site-functions/_pacman -} - -# vim: set ts=2 sw=2 et: diff --git a/pacman-git/makepkg.conf b/pacman-git/makepkg.conf deleted file mode 100644 index c23d039..0000000 --- a/pacman-git/makepkg.conf +++ /dev/null @@ -1,115 +0,0 @@ -# -# /etc/makepkg.conf -# - -######################################################################### -# SOURCE ACQUISITION -######################################################################### -# -#-- The download utilities that makepkg should use to acquire sources -# Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'rsync::/usr/bin/rsync -z %u %o' - 'scp::/usr/bin/scp -C %u %o') - -# Other common tools: -# /usr/bin/snarf -# /usr/bin/lftpget -c -# /usr/bin/curl - -######################################################################### -# ARCHITECTURE, COMPILE FLAGS -######################################################################### -# -CARCH="@CARCH@" -CHOST="@CHOST@" - -#-- Exclusive: will only run on @CARCH@ -# -march (or -mcpu) builds exclusively for an architecture -# -mtune optimizes for an architecture, but builds for whole processor family -CFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe" -CXXFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe" -LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed" -#-- Make Flags: change this for DistCC/SMP systems -#MAKEFLAGS="-j2" - -######################################################################### -# BUILD ENVIRONMENT -######################################################################### -# -# Defaults: BUILDENV=(fakeroot !distcc color !ccache) -# A negated environment option will do the opposite of the comments below. -# -#-- fakeroot: Allow building packages as a non-root user -#-- distcc: Use the Distributed C/C++/ObjC compiler -#-- color: Colorize output messages -#-- ccache: Use ccache to cache compilation -# -BUILDENV=(fakeroot !distcc color !ccache) -# -#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, -#-- specify a space-delimited list of hosts running in the DistCC cluster. -#DISTCC_HOSTS="" - -######################################################################### -# GLOBAL PACKAGE OPTIONS -# These are default values for the options=() settings -######################################################################### -# -# Default: OPTIONS=(strip docs libtool emptydirs zipman purge) -# A negated option will do the opposite of the comments below. -# -#-- strip: Strip symbols from binaries/libraries in STRIP_DIRS -#-- docs: Save doc directories specified by DOC_DIRS -#-- libtool: Leave libtool (.la) files in packages -#-- emptydirs: Leave empty directories in packages -#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip -#-- purge: Remove files specified by PURGE_TARGETS -# -OPTIONS=(strip docs libtool emptydirs zipman purge) - -#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) -#-- Options to be used when stripping binaries. See `man strip' for details. -STRIP_BINARIES="--strip-all" -#-- Options to be used when stripping shared libraries. See `man strip' for details. -STRIP_SHARED="--strip-unneeded" -#-- Options to be used when stripping static libraries. See `man strip' for details. -STRIP_STATIC="--strip-debug" -#-- Manual (man and info) directories to compress (if zipman is specified) -MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) -#-- Doc directories to remove (if !docs is specified) -DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) -#-- Directories to be searched for the strip option (if strip is specified) -STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin}) -#-- Files to be removed from all packages (if purge is specified) -PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) - -######################################################################### -# PACKAGE OUTPUT -######################################################################### -# -# Default: put built package and cached source in build directory -# -#-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/home/packages -#-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/home/sources -#-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/home/srcpackages -#-- Packager: name/email of the person or organization building packages -#PACKAGER="John Doe <john@doe.com>" - -######################################################################### -# EXTENSION DEFAULTS -######################################################################### -# -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# -PKGEXT='.pkg.tar.xz' -SRCEXT='.src.tar.gz' - -# vim: set ft=sh ts=2 sw=2 et: diff --git a/pacman-git/pacman.conf b/pacman-git/pacman.conf deleted file mode 100644 index f5fcce1..0000000 --- a/pacman-git/pacman.conf +++ /dev/null @@ -1,86 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#XferCommand = /usr/bin/curl -C - %u > %o -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options (all disabled by default) -#UseSyslog -#ShowSize -#UseDelta -#TotalDownload - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# VerifySig = Always/Optional/Never -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -#[testing] -#Include = /etc/pacman.d/mirrorlist -#VerifySig = Optional - -[core] -Include = /etc/pacman.d/mirrorlist -VerifySig = Optional - -[extra] -Include = /etc/pacman.d/mirrorlist -VerifySig = Optional - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist -#VerifySig = Optional - -[community] -Include = /etc/pacman.d/mirrorlist -VerifySig = Optional - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#Server = file:///home/custompkgs -#VerifySig = Optional - diff --git a/pacman-git/pacman.conf.x86_64 b/pacman-git/pacman.conf.x86_64 deleted file mode 100644 index 52b84d4..0000000 --- a/pacman-git/pacman.conf.x86_64 +++ /dev/null @@ -1,91 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#XferCommand = /usr/bin/curl -C - %u > %o -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options (all disabled by default) -#UseSyslog -#ShowSize -#UseDelta -#TotalDownload - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# VerifySig = Always/Optional/Never -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -#[testing] -#Include = /etc/pacman.d/mirrorlist -#VerifySig = Optional - -[core] -Include = /etc/pacman.d/mirrorlist -VerifySig = Optional - -[extra] -Include = /etc/pacman.d/mirrorlist -VerifySig = Optional - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist -#VerifySig = Optional - -[community] -Include = /etc/pacman.d/mirrorlist -VerifySig = Optional - -# If you want to run 32 bit applications on your x86_64 system, -# enable the multilib repository here. -#[multilib] -#Include = /etc/pacman.d/mirrorlist -#VerifySig = Optional - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#Server = file:///home/custompkgs - diff --git a/parched-git/LICENSE b/parched-git/LICENSE deleted file mode 100644 index 787374a..0000000 --- a/parched-git/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 1996-2002 Software in the Public Interest, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -SOFTWARE IN THE PUBLIC INTEREST, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Software in the Public -Interest, Inc. shall not be used in advertising or otherwise to promote the -sale, use or other dealings in this Software without prior written -authorization from Software in the Public Interest, Inc. diff --git a/parched-git/PKGBUILD b/parched-git/PKGBUILD deleted file mode 100644 index 1ba775f..0000000 --- a/parched-git/PKGBUILD +++ /dev/null @@ -1,35 +0,0 @@ -# Maintainer: Laszlo Papp <djszapi at archlinux dot us> - -pkgname=parched-git -pkgver=20100107 -pkgrel=1 -pkgdesc="A Pacman package and PKGBUILD parser module" -arch=('i686' 'x86_64') -url="http://github.com/sebnow/parched" -license=('MIT') -depends=('git' 'python') -source=(LICENSE) -md5sums=('31eccf56949504b5ce33110068948cf2') - -_gitroot="git://github.com/sebnow/parched.git" -_gitname="parched" - -build() { - cd "$srcdir" - msg "Connecting to the parched git repository..." - - if [ -d "$srcdir/$_gitname" ] ; then - cd $_gitname && git pull origin - msg "The local files are updated." - else - git clone $_gitroot - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - cd $srcdir/$_gitname - python setup.py build || return 1 - python setup.py install --root=$pkgdir --optimize=1 || return 1 - install -D -m644 ../LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE -} diff --git a/perf/PKGBUILD b/perf/PKGBUILD deleted file mode 100644 index acc4a72..0000000 --- a/perf/PKGBUILD +++ /dev/null @@ -1,26 +0,0 @@ -# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net> - -pkgname=perf -pkgver=3.0.3 -pkgrel=1 -pkgdesc="Linux kernel $pkgver performance tool" -license=('GPL2') -arch=('i686' 'x86_64') -url='http://www.kernel.org' -options=(!strip) -depends=('python2' 'perl' 'libnewt') -makedepends=('asciidoc' 'xmlto') -optdepends=('libnewt' 'slang') -source=("http://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$pkgver.tar.bz2") -md5sums=('6a8af5f6733b3db970197e65b3db712c') - -build() { - cd linux-$pkgver/tools/perf - make PYTHON=python2 DESTDIR="${pkgdir}/usr" all man -} - -package() { - cd linux-${pkgver}/tools/perf - make PYTHON=python2 DESTDIR="${pkgdir}/usr" install install-man -} -# vim:set ts=2 sw=2 ft=sh et: diff --git a/perl-ack/ChangeLog b/perl-ack/ChangeLog deleted file mode 100644 index 62c4e9f..0000000 --- a/perl-ack/ChangeLog +++ /dev/null @@ -1,24 +0,0 @@ -2009-12-20 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 1.92-1 : - Updated to the latest version. - - -2009-09-11 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 1.90-1 : - Updated to the latest version. - Make as 'any' package. - Use build() and package() in PKGBUILD. - - -2009-05-21 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 1.88-2 : - Replaced in my '# Contributor:' line by '# Maintainer:' - - -2009-03-02 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 1.88-1 : - Initial release diff --git a/perl-ack/PKGBUILD b/perl-ack/PKGBUILD deleted file mode 100644 index 463514a..0000000 --- a/perl-ack/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# Maintainer: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - -pkgname=perl-ack -_pkgname=ack -pkgver=1.92 -pkgrel=1 -pkgdesc='A grep-like tool tailored to working with large trees of source' -arch=('any') -license=('GPL' 'PerlArtistic') -url="http://search.cpan.org/dist/${_pkgname}" -depends=('perl>=5.10.0' 'perl-file-next') -options=(!emptydirs) - -source=(http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/${_pkgname}-$pkgver.tar.gz) -md5sums=('c25b5a16d0a27386a75c91d531b86cea') - -build() { - cd $srcdir/${_pkgname}-$pkgver - - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 - - make || return 1 -} - -package() { - cd $srcdir/${_pkgname}-$pkgver - - make install DESTDIR=$pkgdir || return 1 -} diff --git a/perl-calendar-simple/PKGBUILD b/perl-calendar-simple/PKGBUILD deleted file mode 100644 index 9b167a5..0000000 --- a/perl-calendar-simple/PKGBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# Contributor: AUR Perl <aurperl@juster.info> -# Generator : CPANPLUS::Dist::Arch 1.10 -pkgname='perl-calendar-simple' -pkgver='1.21' -pkgrel='1' -pkgdesc="Perl extension to create simple calendars" -arch=('any') -license=('PerlArtistic' 'GPL') -options=('!emptydirs') -depends=('perl') -makedepends=() -url='http://search.cpan.org/dist/Calendar-Simple' -source=('http://search.cpan.org/CPAN/authors/id/D/DA/DAVECROSS/Calendar-Simple-1.21.tar.gz') -md5sums=('8fbfe46c0a25d036ca100460fcd00223') - -build() { - PERL=/usr/bin/perl - DIST_DIR="${srcdir}/Calendar-Simple-1.21" - export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \ - PERL_AUTOINSTALL=--skipdeps \ - PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \ - PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \ - MODULEBUILDRC=/dev/null - - { cd "$DIST_DIR" && - $PERL Makefile.PL && - make && - make test && - make install; - } || return 1; - - find "$pkgdir" -name .packlist -o -name perllocal.pod -delete -} diff --git a/perl-class-inspector/PKGBUILD b/perl-class-inspector/PKGBUILD deleted file mode 100644 index a4ffbd7..0000000 --- a/perl-class-inspector/PKGBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# PKGBUILD generated by pacpan -pkgname=perl-class-inspector -_realname=Class-Inspector -pkgver=1.24 -pkgrel=1 -pkgdesc="'Get information about a class and its structure'" -arch=(i686 x86_64) -license=('perl') -url="http://search.cpan.org/~adamk/Class-Inspector" -options=(!emptydirs) - -depends=('perl>=5.10.1') -makedepends=('perl') - -#provides=('Class-Inspector') -provides=('class-inspector=1.24' 'Class::Inspector=1.24' 'perl-class-inspector=1.24' 'Class::Inspector::Functions=1.24' 'perl-class-inspector-functions=1.24') - -source=(http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Class-Inspector-1.24.tar.gz) -md5sums=('609189b49f64d329a6e413e0a6d8724a') - -build() { - _expected_dir="${srcdir}/${_realname}-${pkgver}" - if [ -d "$_expected_dir" ]; then - cd "$_expected_dir" - else - _expected_dir="${srcdir}/$(bsdtar -t -f $(basename $source) | head -n1)" - if [ -d "$_expected_dir" ]; then - cd "$_expected_dir" - else - _makefile=$(find $srcdir -iname Makefile.PL) - if [ ! -z "$_makefile" ]; then - _expected_dir=$(dirname $_makefile) - if [ -d "$_expected_dir" ]; then - cd "$_expected_dir" - else - echo "[1;31mERROR[0m unable to detect source directory" - echo "[1;34m-->[0m this is often due to CPAN's lack of standard naming conventions" - echo "[1;34m-->[0m it may be possible to fix this by adjusting the build function in the PKGBUILD" - fi - fi - fi - fi - # install module in vendor directories. - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 - make || return 1 - make install DESTDIR=${pkgdir} || return 1 - - # remove perllocal.pod and .packlist - find ${pkgdir} -name perllocal.pod -delete - find ${pkgdir} -name .packlist -delete -} - -# vim:set ts=2 sw=2 et: - diff --git a/perl-compress-zlib/PKGBUILD b/perl-compress-zlib/PKGBUILD deleted file mode 100644 index ed9d427..0000000 --- a/perl-compress-zlib/PKGBUILD +++ /dev/null @@ -1,27 +0,0 @@ -pkgname=perl-compress-zlib -_realname=Compress-Zlib -pkgver=2.015 -pkgrel=1 -pkgdesc="Perl interface to zlib compression library" -arch=(i686 x86_64) -license=('PerlArtistic') -url="http://search.cpan.org/dist/${_realname}/" -depends=('perl>=5.10.0') -options=(!emptydirs) -#http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/Compress-Zlib-2.015.tar.gz -source=(http://www.cpan.org/authors/id/P/PM/PMQS/${_realname}-${pkgver}.tar.gz) -replaces=('compress-zlib') -provides=('compress-zlib') -md5sums=('689ba2cc399b019d0bf76a0575c32947') - -build() { - cd ${srcdir}/${_realname}-${pkgver} - # install module in vendor directories. - perl Makefile.PL INSTALLDIRS=vendor || return 1 - make || return 1 - make install DESTDIR=${pkgdir} || return 1 - - # remove perllocal.pod and .packlist - find ${pkgdir} -name perllocal.pod -delete - find ${pkgdir} -name .packlist -delete -} diff --git a/perl-file-next/ChangeLog b/perl-file-next/ChangeLog deleted file mode 100644 index 8d57268..0000000 --- a/perl-file-next/ChangeLog +++ /dev/null @@ -1,23 +0,0 @@ -2009-08-05 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 1.06-1 : - Updated to the latest version. - Changed to arch=('any') - - -2009-07-31 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 1.04-1 : - Updated to the latest version. - - -2009-05-21 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 1.02-2 : - Replaced in my '# Contributor:' line by '# Maintainer:' - - -2009-03-02 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 1.02-1 : - Initial release diff --git a/perl-file-next/PKGBUILD b/perl-file-next/PKGBUILD deleted file mode 100644 index 53fe9a6..0000000 --- a/perl-file-next/PKGBUILD +++ /dev/null @@ -1,27 +0,0 @@ -# Maintainer: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - -pkgname=perl-file-next -_pkgname=File-Next -pkgver=1.06 -pkgrel=1 -pkgdesc='File::Next - File-finding iterator' -arch=('any') -license=('GPL' 'PerlArtistic') -url="http://search.cpan.org/dist/${_pkgname}" -depends=('perl>=5.10.0') -options=(!emptydirs) - -source=(http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/${_pkgname}-$pkgver.tar.gz) -md5sums=('8d901b18e40c477acd18a6ea0fd7de64') - -build() { - cd $srcdir/${_pkgname}-$pkgver - - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 - - make || return 1 - make install DESTDIR=$pkgdir || return 1 - - find $pkgdir -name perllocal.pod -delete - find $pkgdir -name .packlist -delete -} diff --git a/perl-net-imap-simple/PKGBUILD b/perl-net-imap-simple/PKGBUILD deleted file mode 100755 index 003a904..0000000 --- a/perl-net-imap-simple/PKGBUILD +++ /dev/null @@ -1,27 +0,0 @@ -pkgname=perl-net-imap-simple -_realname=Net-IMAP-Simple -pkgver=1.2022 -pkgrel=1 -pkgdesc="Net::IMAP::Simple - a simple IMAP access library" -arch=(i686 x86_64) -license=('GPL' 'PerlArtistic') -url="http://search.cpan.org/dist/${_realname}/" -depends=('perl>=5.10.0') -options=(!emptydirs) -replaces=('net-imap-simple') -provides=('net-imap-simple') -source=(http://search.cpan.org/CPAN/authors/id/J/JE/JETTERO/Net-IMAP-Simple-${pkgver}.tar.gz) -md5sums=('b8bfa6b7452f84777567a65269b04dc5') - -build() { - cd ${startdir}/src/${_realname}-${pkgver} - # install module in vendor directories. - yes n | perl Makefile.PL INSTALLDIRS=vendor || return 1 - make || return 1 - make install DESTDIR=${startdir}/pkg || return 1 - - # remove perllocal.pod and .packlist - find ${startdir}/pkg -name perllocal.pod -delete - find ${startdir}/pkg -name .packlist -delete -} - diff --git a/perl-params-util/ChangeLog b/perl-params-util/ChangeLog deleted file mode 100644 index c555f14..0000000 --- a/perl-params-util/ChangeLog +++ /dev/null @@ -1,19 +0,0 @@ -2009-05-30 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 1.00-1 : - Updated to the latest version. - - -2009-05-21 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 0.38-2 : - Replaced in my '# Contributor:' line by '# Maintainer:' - Replaced source URL from www.cpan.org to search.cpan.org/CPAN - - -2009-02-27 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> - - * 0.38-1 : - Adopted the PKGBUILD - Modified the PKGBUILD to match new PKGBUILD-perl.proto - Added a ChangeLog diff --git a/perl-params-util/PKGBUILD b/perl-params-util/PKGBUILD deleted file mode 100644 index 7812bbb..0000000 --- a/perl-params-util/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Maintainer: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> -# Contributor: Francois Charette <firmicus@gmx.net> - -pkgname=perl-params-util -_pkgname=Params-Util -pkgver=1.00 -pkgrel=1 -pkgdesc="Params::Util - Simple, compact and correct param-checking functions" -arch=('i686' 'x86_64') -url="http://search.cpan.org/dist/${_pkgname}" -license=('GPL' 'PerlArtistic') -depends=('perl>=5.10.0') -options=(!emptydirs) - -source=(http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/${_pkgname}-$pkgver.tar.gz) -md5sums=('827ba4b8bed00e718cea60321129be41') - -build() { - cd $srcdir/${_pkgname}-$pkgver - - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 - - make || return 1 - make install DESTDIR=$pkgdir || return 1 - - find $pkgdir -name perllocal.pod -delete - find $pkgdir -name .packlist -delete -} diff --git a/perl-proc-daemon/PKGBUILD b/perl-proc-daemon/PKGBUILD deleted file mode 100644 index 790ded2..0000000 --- a/perl-proc-daemon/PKGBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# Contributor: Justin Davis <jrcd83@gmail.com> -# Generator : CPANPLUS::Dist::Arch 1.10 -pkgname='perl-proc-daemon' -pkgver='0.05' -pkgrel='1' -pkgdesc="Run Perl program(s) as a daemon process" -arch=('any') -license=('PerlArtistic' 'GPL') -options=('!emptydirs') -depends=('perl') -makedepends=() -url='http://search.cpan.org/dist/Proc-Daemon' -source=('http://search.cpan.org/CPAN/authors/id/D/DE/DETI/Proc/Proc-Daemon-0.05.tar.gz') -md5sums=('882c741da92d370c87b3ae496905654f') - -build() { - PERL=/usr/bin/perl - DIST_DIR="${srcdir}/Proc-Daemon-0.05" - export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \ - PERL_AUTOINSTALL=--skipdeps \ - PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \ - PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \ - MODULEBUILDRC=/dev/null - - { cd "$DIST_DIR" && - $PERL Makefile.PL && - make && - make test && - make install; - } || return 1; - - find "$pkgdir" -name .packlist -o -name perllocal.pod -delete -} diff --git a/perl-text-upsidedown/PKGBUILD b/perl-text-upsidedown/PKGBUILD deleted file mode 100644 index e38f26c..0000000 --- a/perl-text-upsidedown/PKGBUILD +++ /dev/null @@ -1,22 +0,0 @@ -# This PKGBUILD was generated by cpan4pacman via CPANPLUS::Dist::Pacman -# Contributor: Daenyth <Daenyth+arch AT gmail DOT com> - -pkgname=perl-text-upsidedown -pkgver=1.100820 -pkgrel=1 -pkgdesc="flip text upside-down using Unicode " -arch=('i686' 'x86_64') -url="http://search.cpan.org/~MARCEL/Text-UpsideDown" -license=('GPL' 'PerlArtistic') -depends=('perl>=5.10.0') -makedepends=('perl-universal-require') -options=('!emptydirs' 'purge') -source=(http://www.cpan.org/authors/id/M/MA/MARCEL/Text-UpsideDown-$pkgver.tar.gz) -md5sums=('230b0cfe6d27f560e33f1d4ca716579c') - -build() { - cd $startdir/src/Text-UpsideDown-$pkgver - PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 - make || return 1 - make install DESTDIR=$startdir/pkg || return 1 -} diff --git a/perl-universal-require/PKGBUILD b/perl-universal-require/PKGBUILD deleted file mode 100644 index 31d9467..0000000 --- a/perl-universal-require/PKGBUILD +++ /dev/null @@ -1,23 +0,0 @@ -# Contributor: Marvin Lampe <marvin.lampe@gmx.de> -pkgname=perl-universal-require -pkgver=0.13 -pkgrel=1 -pkgdesc='UNIVERSAL::require - require() modules from a variable' -arch=('x86_64' 'i686') -url='http://search.cpan.org/~mschwern/UNIVERSAL-require-0.13/lib/UNIVERSAL/require.pm' -license=('GPL' 'Artistic License') -makedepends=('perl') -source=(http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/UNIVERSAL-require-${pkgver}.tar.gz) -md5sums=('e6ea431fac9524077414d531a8cc203c') - -build() { - cd ${srcdir}/UNIVERSAL-require-${pkgver} || return 1 - perl Makefile.PL || return 1 - make || return 1 - mkdir -p ${pkgdir}/usr/lib/perl5/vendor_perl/UNIVERSAL || return 1 - mkdir -p ${pkgdir}/usr/share/man/man3 || return 1 - cp ${srcdir}/UNIVERSAL-require-${pkgver}/blib/lib/UNIVERSAL/require.pm ${pkgdir}/usr/lib/perl5/vendor_perl/UNIVERSAL || return 1 - cp ${srcdir}/UNIVERSAL-require-${pkgver}/blib/man3/UNIVERSAL::require.3pm ${pkgdir}/usr/share/man/man3 -} - -# vim:set ts=2 sw=2 et: diff --git a/perl-unix-syslog/PKGBUILD b/perl-unix-syslog/PKGBUILD deleted file mode 100644 index b6be3de..0000000 --- a/perl-unix-syslog/PKGBUILD +++ /dev/null @@ -1,32 +0,0 @@ -# Contributor: Piotr Beling <qwak@w8.pl> -# Contributor: Wael Nasreddine <wael@phoenixlinux.org> -# Maintainer: Guillermo A. Amaral <me@guillermoamaral.com> (thewonka) - -pkgname='perl-unix-syslog' -pkgver='0.100' -pkgrel='2' -pkgdesc='Perl interface to the UNIX syslog calls.' -url='http://search.cpan.org/~mharnisch/Unix-Syslog-0.100/' -arch=('i686' 'x86_64') -depends=('perl>=5.8.4') -source=("http://search.cpan.org/CPAN/authors/id/M/MH/MHARNISCH/Unix-Syslog-${pkgver}.tar.gz") -md5sums=('655d2e04a043b3e92d1bb47caf8e8a3b') -install="${pkgname}.install" - -build() -{ - - cd ${startdir}/src/Unix-Syslog-${pkgver} - - eval $(perl -V:archname) - - perl Makefile.PL INSTALLARCHLIB=/usr/lib/perl5/current/${archname} INSTALLSITELIB=/usr/lib/perl5/site_perl/current INSTALLSITEARCH=/usr/lib/perl5/site_perl/current/${archname} - - make || return 1 - - make DESTDIR=${startdir}/pkg install || return 1 - - find ${startdir}/pkg -name '.packlist' -exec rm -f {} \; - find ${startdir}/pkg -name 'perllocal.pod' -exec rm -f {} \; - -} diff --git a/perl-unix-syslog/perl-unix-syslog.install b/perl-unix-syslog/perl-unix-syslog.install deleted file mode 100644 index 641c385..0000000 --- a/perl-unix-syslog/perl-unix-syslog.install +++ /dev/null @@ -1,19 +0,0 @@ -post_install() -{ - - echo -n "module test... " - - perl -mUnix::Syslog -e "exit 0;" 2> /dev/null && echo 'pass.' || echo 'fail.' - -} - -post_upgrade() -{ - post_install -} - -op=$1 - -shift - -$op $* diff --git a/php-imagick/PKGBUILD b/php-imagick/PKGBUILD deleted file mode 100644 index 80936d1..0000000 --- a/php-imagick/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Contributor: Evangelos Foutras <foutrelis@gmail.com> - -pkgname=php-imagick -pkgver=2.3.0 -pkgrel=1 -pkgdesc="PHP extension for IMagick" -arch=('i686' 'x86_64') -url="http://pecl.php.net/package/imagick" -license=('PHP') -depends=('php' 'imagemagick') -backup=('etc/php/conf.d/memcached.ini') -install=php-imagick.install -source=(http://pecl.php.net/get/imagick-$pkgver.tgz) - -build() { - cd "$srcdir/imagick-$pkgver" - - phpize || return 1 - ./configure --prefix=/usr - make || return 1 - make INSTALL_ROOT="$pkgdir" install - echo ';extension=imagick.so' > imagick.ini - install -D -m644 imagick.ini "$pkgdir/etc/php/conf.d/imagick.ini" -} -md5sums=('1493a21b37e209cc59764ac1ca2a1af9') diff --git a/php-imagick/php-imagick.install b/php-imagick/php-imagick.install deleted file mode 100644 index 266402b..0000000 --- a/php-imagick/php-imagick.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - echo ' - ==> PHP extension - - A config file was stored under /etc/php/conf.d/. In order to use this - extension make sure to uncomment it from its config file. - ' -} - -post_upgrade() { - post_install $1 -} - -# vim:set ts=2 sw=2 et: diff --git a/php-suhosin/PKGBUILD b/php-suhosin/PKGBUILD deleted file mode 100644 index 8925d13..0000000 --- a/php-suhosin/PKGBUILD +++ /dev/null @@ -1,27 +0,0 @@ -# $Id$ -# Maintainer: Pierre Schmitz <pierre@archlinux.de> - -pkgname=php-suhosin -pkgver=0.9.29 -pkgrel=1 -arch=('i686' 'x86_64') -pkgdesc='An advanced protection system for PHP installations' -url='http://www.hardened-php.net/suhosin/' -license='PHP' -source=("http://download.suhosin.org/suhosin-${pkgver}.tgz") -depends=('php>=5.3.0') -conflicts=('php-suhosin-extension') -replaces=('php-suhosin-extension') -backup=('etc/php/conf.d/suhosin.ini') -md5sums=('e3c599e7e344e981f935b2dab90592c1') - -build() { - cd ${srcdir}/suhosin-${pkgver} - phpize || return 1 - ./configure --prefix=/usr --enable-suhosin || return 1 - make || return 1 - make INSTALL_ROOT=${pkgdir} install || return 1 - # disable by default - sed -i 's|extension = suhosin.so|;extension=suhosin.so|g' suhosin.ini - install -D -m644 suhosin.ini ${pkgdir}/etc/php/conf.d/suhosin.ini -} diff --git a/php/PKGBUILD b/php/PKGBUILD deleted file mode 100644 index 33fe6e7..0000000 --- a/php/PKGBUILD +++ /dev/null @@ -1,324 +0,0 @@ -# $Id: PKGBUILD 59035 2009-11-19 16:11:32Z pierre $ -# Maintainer: Pierre Schmitz <pierre@archlinux.de> - -pkgbase=php -pkgname=('php' - 'php-cgi' - 'php-apache' - 'php-pear' - 'php-curl' - 'php-enchant' - 'php-gd' - 'php-gmp' - 'php-intl' - 'php-ldap' - 'php-mcrypt' - 'php-odbc' - 'php-pgsql' - 'php-pspell' - 'php-snmp' - 'php-sqlite' - 'php-tidy' - 'php-xsl') -pkgver=5.3.1 -pkgrel=1 -_suhosinver=${pkgver}RC1-0.9.8 -arch=('i686' 'x86_64') -license=('PHP') -url='http://www.php.net' -makedepends=('apache' 'imap' 'postgresql-libs' 'mysql' 'libldap' 'postfix' - 'sqlite3' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file' - 'libmcrypt' 'tidyhtml' 'aspell' 'libtool' 'gd' 'icu' - 'curl' 'libxslt' 'openssl' 'bzip2' 'db' 'gmp') -options=('!makeflags') -source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2" - "http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz" - 'php.ini.patch' 'apache.conf' 'db-configure.patch' 'mysqlnd-socket.patch') -md5sums=('63e97ad450f0f7259e785100b634c797' - 'c3ff0cb5fa728420d56f8ed139446647' - 'd6f94150f47047882c6716575e12e99b' - '96ca078be6729b665be8a865535a97bf' - 'cd3d068931c3715e35634e9885e35374' - '993223e03e6c0cc2d89581550ebbbe67') - -build() { - phpconfig="--prefix=/usr \ - --sysconfdir=/etc/php \ - --with-layout=GNU \ - --with-config-file-path=/etc/php \ - --with-config-file-scan-dir=/etc/php/conf.d \ - --enable-inline-optimization \ - --disable-debug \ - --disable-rpath \ - --disable-static \ - --enable-shared \ - --mandir=/usr/share/man \ - --without-pear \ - " - - phpextensions="--enable-bcmath=shared \ - --enable-calendar=shared \ - --enable-dba=shared \ - --enable-exif=shared \ - --enable-ftp=shared \ - --enable-gd-native-ttf \ - --enable-intl=shared \ - --enable-json=shared \ - --enable-mbregex \ - --enable-mbstring \ - --enable-pdo=shared \ - --enable-phar=shared \ - --enable-posix=shared \ - --enable-session \ - --enable-shmop=shared \ - --enable-soap=shared \ - --enable-sockets=shared \ - --enable-sqlite-utf8 \ - --enable-sysvmsg=shared \ - --enable-sysvsem=shared \ - --enable-sysvshm=shared \ - --enable-xml \ - --enable-zip=shared \ - --with-bz2=shared \ - --with-curl=shared \ - --with-db4=shared \ - --with-enchant=shared,/usr \ - --with-freetype-dir=shared,/usr \ - --with-gd=shared,/usr \ - --with-gdbm=shared \ - --with-gettext=shared \ - --with-gmp=shared \ - --with-iconv=shared \ - --with-icu-dir=/usr \ - --with-imap-ssl=shared \ - --with-imap=shared \ - --with-jpeg-dir=shared,/usr \ - --with-ldap=shared \ - --with-mcrypt=shared \ - --with-mysql-sock=/var/run/mysqld/mysqld.sock \ - --with-mysql=shared,mysqlnd \ - --with-mysqli=shared,mysqlnd \ - --with-openssl=shared \ - --with-pcre-regex=/usr \ - --with-pdo-mysql=shared,mysqlnd \ - --with-pdo-odbc=shared,unixODBC,/usr \ - --with-pdo-pgsql=shared \ - --with-pdo-sqlite=shared,/usr \ - --with-pgsql=shared \ - --with-png-dir=shared,/usr \ - --with-pspell=shared \ - --with-regex=php \ - --with-snmp=shared \ - --with-sqlite3=shared,/usr \ - --with-sqlite=shared \ - --with-tidy=shared \ - --with-unixODBC=shared,/usr \ - --with-xmlrpc=shared \ - --with-xsl=shared \ - --with-zlib \ - --without-db2 \ - --without-db3 \ - " - - EXTENSION_DIR=/usr/lib/php/modules - export EXTENSION_DIR - PEAR_INSTALLDIR=/usr/share/pear - export PEAR_INSTALLDIR - - cd ${srcdir}/${pkgbase}-${pkgver} - - # avoid linking against old db version - patch -p0 -i ${srcdir}/db-configure.patch || return 1 - - # use /var/run/mysqld/mysqld.sock as default socket for mysql - patch -p0 -i ${srcdir}/mysqlnd-socket.patch || return 1 - - # apply suhosin patch - patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch || return 1 - - # adjust paths - patch -p0 -i ${srcdir}/php.ini.patch || return 1 - - # php - mkdir ${srcdir}/build-php - cd ${srcdir}/build-php - ln -s ../${pkgbase}-${pkgver}/configure - ./configure --srcdir=../${pkgbase}-${pkgver} \ - ${phpconfig} \ - --disable-cgi \ - --with-readline \ - --enable-pcntl \ - ${phpextensions} || return 1 - make || return 1 - - # cgi and fcgi - # reuse the previous run; this will save us a lot of time - cp -a ${srcdir}/build-php ${srcdir}/build-cgi - cd ${srcdir}/build-cgi - ./configure --srcdir=../${pkgbase}-${pkgver} \ - ${phpconfig} \ - --enable-cgi \ - --disable-cli \ - ${phpextensions} || return 1 - make || return 1 - - # apache - cp -a ${srcdir}/build-php ${srcdir}/build-apache - cd ${srcdir}/build-apache - ./configure --srcdir=../${pkgbase}-${pkgver} \ - ${phpconfig} \ - --with-apxs2 \ - --disable-cli \ - ${phpextensions} || return 1 - make || return 1 - - # pear - cp -a ${srcdir}/build-php ${srcdir}/build-pear - cd ${srcdir}/build-pear - ./configure --srcdir=../${pkgbase}-${pkgver} \ - ${phpconfig} \ - --disable-cgi \ - --with-readline \ - --enable-pcntl \ - --with-pear \ - ${phpextensions} || return 1 - make || return 1 -} - -package_php() { - pkgdesc='An HTML-embedded scripting language' - depends=('pcre' 'libxml2' 'bzip2' 'openssl') - replaces=('php-fileinfo') - provides=('php-fileinfo') - conflicts=('php-fileinfo') - backup=('etc/php/php.ini') - - cd ${srcdir}/build-php - make INSTALL_ROOT=${pkgdir} install || return 1 - install -d -m755 ${pkgdir}/usr/share/pear - # fix broken link - ln -sf phar.phar $pkgdir/usr/bin/phar - # install php.ini - install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/php/php.ini - install -d -m755 ${pkgdir}/etc/php/conf.d/ - - # remove static modules - rm -f ${pkgdir}/usr/lib/php/modules/*.a - # remove modules provided by sub packages - rm -f ${pkgdir}/usr/lib/php/modules/{curl,enchant,gd,gmp,intl,ldap,mcrypt,odbc,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so -} - -package_php-cgi() { - pkgdesc='CGI and FCGI SAPI for PHP' - depends=('php' 'pcre' 'libxml2') - - install -D -m755 ${srcdir}/build-cgi/sapi/cgi/php-cgi ${pkgdir}/usr/bin/php-cgi -} - -package_php-apache() { - pkgdesc='Apache SAPI for PHP' - depends=('php' 'apache' 'pcre' 'libxml2') - backup=('etc/httpd/conf/extra/php5_module.conf') - - install -D -m755 ${srcdir}/build-apache/libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so - install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf -} - -package_php-pear() { - pkgdesc='PHP Extension and Application Repository' - depends=('php' 'bash') - backup=("etc/php/pear.conf") - - cd ${srcdir}/build-pear - make install-pear INSTALL_ROOT=${pkgdir} - for i in $(find ${pkgdir}/ -name '.*'); do - [ -e $i ] && rm -rf $i - done -} - -package_php-curl() { - depends=('php' 'curl') - pkgdesc="curl module for PHP" - install -D -m755 ${srcdir}/build-php/modules/curl.so ${pkgdir}/usr/lib/php/modules/curl.so -} - -package_php-enchant() { - depends=('php' 'enchant') - pkgdesc="enchant module for PHP" - install -D -m755 ${srcdir}/build-php/modules/enchant.so ${pkgdir}/usr/lib/php/modules/enchant.so -} - -package_php-gd() { - depends=('php' 'gd') - pkgdesc="gd module for PHP" - install -D -m755 ${srcdir}/build-php/modules/gd.so ${pkgdir}/usr/lib/php/modules/gd.so -} - -package_php-gmp() { - depends=('php' 'gmp') - pkgdesc="gmp module for PHP" - install -D -m755 ${srcdir}/build-php/modules/gmp.so ${pkgdir}/usr/lib/php/modules/gmp.so -} - -package_php-intl() { - depends=('php' 'icu') - pkgdesc="intl module for PHP" - install -D -m755 ${srcdir}/build-php/modules/intl.so ${pkgdir}/usr/lib/php/modules/intl.so -} - -package_php-ldap() { - depends=('php' 'libldap') - pkgdesc="ldap module for PHP" - install -D -m755 ${srcdir}/build-php/modules/ldap.so ${pkgdir}/usr/lib/php/modules/ldap.so -} - -package_php-mcrypt() { - depends=('php' 'libmcrypt' 'libtool') - pkgdesc="mcrypt module for PHP" - install -D -m755 ${srcdir}/build-php/modules/mcrypt.so ${pkgdir}/usr/lib/php/modules/mcrypt.so -} - -package_php-odbc() { - depends=('php' 'unixodbc') - pkgdesc="ODBC modules for PHP" - install -D -m755 ${srcdir}/build-php/modules/odbc.so ${pkgdir}/usr/lib/php/modules/odbc.so - install -D -m755 ${srcdir}/build-php/modules/pdo_odbc.so ${pkgdir}/usr/lib/php/modules/pdo_odbc.so -} - -package_php-pgsql() { - depends=('php' 'postgresql-libs') - pkgdesc="PostgreSQL modules for PHP" - install -D -m755 ${srcdir}/build-php/modules/pgsql.so ${pkgdir}/usr/lib/php/modules/pgsql.so - install -D -m755 ${srcdir}/build-php/modules/pdo_pgsql.so ${pkgdir}/usr/lib/php/modules/pdo_pgsql.so -} - -package_php-pspell() { - depends=('php' 'aspell') - pkgdesc="pspell module for PHP" - install -D -m755 ${srcdir}/build-php/modules/pspell.so ${pkgdir}/usr/lib/php/modules/pspell.so -} - -package_php-snmp() { - depends=('php' 'net-snmp') - pkgdesc="snmp module for PHP" - install -D -m755 ${srcdir}/build-php/modules/snmp.so ${pkgdir}/usr/lib/php/modules/snmp.so -} - -package_php-sqlite() { - depends=('php' 'sqlite3') - pkgdesc="sqlite3 module for PHP" - install -D -m755 ${srcdir}/build-php/modules/sqlite3.so ${pkgdir}/usr/lib/php/modules/sqlite3.so - install -D -m755 ${srcdir}/build-php/modules/pdo_sqlite.so ${pkgdir}/usr/lib/php/modules/pdo_sqlite.so -} - -package_php-tidy() { - depends=('php' 'tidyhtml') - pkgdesc="tidy module for PHP" - install -D -m755 ${srcdir}/build-php/modules/tidy.so ${pkgdir}/usr/lib/php/modules/tidy.so -} - -package_php-xsl() { - depends=('php' 'libxslt') - pkgdesc="xsl module for PHP" - install -D -m755 ${srcdir}/build-php/modules/xsl.so ${pkgdir}/usr/lib/php/modules/xsl.so -} diff --git a/php/apache.conf b/php/apache.conf deleted file mode 100644 index 86344c8..0000000 --- a/php/apache.conf +++ /dev/null @@ -1,9 +0,0 @@ -# Required modules: dir_module, php5_module - -<IfModule dir_module> - <IfModule php5_module> - DirectoryIndex index.php index.html - AddHandler application/x-httpd-php .php - AddHandler application/x-httpd-php-source .phps - </IfModule> -</IfModule>
\ No newline at end of file diff --git a/php/db-configure.patch b/php/db-configure.patch deleted file mode 100644 index e09a39c..0000000 --- a/php/db-configure.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- configure 2009-11-18 21:11:57.000000000 +0100 -+++ configure 2009-11-19 12:42:50.881918639 +0100 -@@ -29292,43 +29292,15 @@ - - unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT - -- dbdp="/usr/local/BerkeleyDB.4." -- for i in $PHP_DB4 ${dbdp}6 ${dbdp}5 ${dbdp}4 ${dbdp}3 ${dbdp}2 ${dbdp}1 ${dbdp}0 /usr/local /usr; do -- if test -f "$i/db4/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/db4/db.h -- break -- elif test -f "$i/include/db4.6/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4.6/db.h -- break -- elif test -f "$i/include/db4.5/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4.5/db.h -- break -- elif test -f "$i/include/db4/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4/db.h -- break -- elif test -f "$i/include/db/db4.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db/db4.h -- break -- elif test -f "$i/include/db4.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4.h -- break -- elif test -f "$i/include/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db.h -- break -- fi -- done -+ if test -f "/usr/include/db.h"; then -+ THIS_PREFIX=/usr -+ THIS_INCLUDE=/usr/include/db.h -+ fi - - if test -z "$THIS_INCLUDE"; then - { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; } - fi -- for LIB in db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db; do -+ for LIB in db; do - if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then - lib_found=""; - diff --git a/php/gd-info-segfault.patch b/php/gd-info-segfault.patch deleted file mode 100644 index 846a19e..0000000 --- a/php/gd-info-segfault.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: ext/gd/libgd/gd_compat.c -=================================================================== ---- ext/gd/libgd/gd_compat.c (Revision 286947) -+++ ext/gd/libgd/gd_compat.c (Revision 286948) -@@ -14,7 +14,7 @@ - return JPEG_LIB_VERSION; - } - --int gdJpegGetVersionString() -+const char * gdJpegGetVersionString() - { - switch(JPEG_LIB_VERSION) { - case 62: -Index: ext/gd/libgd/gd_compat.h -=================================================================== ---- ext/gd/libgd/gd_compat.h (Revision 286947) -+++ ext/gd/libgd/gd_compat.h (Revision 286948) -@@ -8,7 +8,7 @@ - #endif - - const char * gdPngGetVersionString(); --int gdJpegGetVersionString(); -+const char * gdJpegGetVersionString(); - int gdJpegGetVersionInt(); - int overflow2(int a, int b); - diff --git a/php/mysqlnd-socket.patch b/php/mysqlnd-socket.patch deleted file mode 100644 index 7573ca1..0000000 --- a/php/mysqlnd-socket.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ext/mysqlnd/mysqlnd.c 2009-11-19 14:02:01.934775092 +0100 -+++ ext/mysqlnd/mysqlnd.c 2009-11-19 14:08:04.598072581 +0100 -@@ -547,7 +547,7 @@ - #ifndef PHP_WIN32 - if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) { - if (!socket) { -- socket = "/tmp/mysql.sock"; -+ socket = "/var/run/mysqld/mysqld.sock"; - } - transport_len = spprintf(&transport, 0, "unix://%s", socket); - unix_socket = TRUE; diff --git a/php/php.ini.patch b/php/php.ini.patch deleted file mode 100644 index 9b1177b..0000000 --- a/php/php.ini.patch +++ /dev/null @@ -1,126 +0,0 @@ ---- php.ini-production 2009-11-12 18:20:01.000000000 +0100 -+++ php.ini 2009-11-19 12:39:03.305274757 +0100 -@@ -376,7 +376,7 @@ - ; or per-virtualhost web server configuration file. This directive is - ; *NOT* affected by whether Safe Mode is turned On or Off. - ; http://php.net/open-basedir --;open_basedir = -+open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/ - - ; This directive allows you to disable certain functions for security reasons. - ; It receives a comma-delimited list of function names. This directive is -@@ -781,7 +781,7 @@ - ;;;;;;;;;;;;;;;;;;;;;;;;; - - ; UNIX: "/path1:/path2" --;include_path = ".:/php/includes" -+include_path = ".:/usr/share/pear" - ; - ; Windows: "\path1;\path2" - ;include_path = ".;c:\php\includes" -@@ -804,7 +804,7 @@ - - ; Directory in which the loadable extensions (modules) reside. - ; http://php.net/extension-dir --; extension_dir = "./" -+extension_dir = "/usr/lib/php/modules/" - ; On windows: - ; extension_dir = "ext" - -@@ -938,53 +938,49 @@ - ; If you only provide the name of the extension, PHP will look for it in its - ; default extension directory. - ; --; Windows Extensions --; Note that ODBC support is built in, so no dll is needed for it. --; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5) --; extension folders as well as the separate PECL DLL download (PHP 5). --; Be sure to appropriately set the extension_dir directive. --; --;extension=php_bz2.dll --;extension=php_curl.dll --;extension=php_dba.dll --;extension=php_exif.dll --;extension=php_fileinfo.dll --;extension=php_gd2.dll --;extension=php_gettext.dll --;extension=php_gmp.dll --;extension=php_intl.dll --;extension=php_imap.dll --;extension=php_interbase.dll --;extension=php_ldap.dll --;extension=php_mbstring.dll --;extension=php_ming.dll --;extension=php_mssql.dll --;extension=php_mysql.dll --;extension=php_mysqli.dll --;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client --;extension=php_oci8_11g.dll ; Use with Oracle 11g Instant Client --;extension=php_openssl.dll --;extension=php_pdo_firebird.dll --;extension=php_pdo_mssql.dll --;extension=php_pdo_mysql.dll --;extension=php_pdo_oci.dll --;extension=php_pdo_odbc.dll --;extension=php_pdo_pgsql.dll --;extension=php_pdo_sqlite.dll --;extension=php_pgsql.dll --;extension=php_phar.dll --;extension=php_pspell.dll --;extension=php_shmop.dll --;extension=php_snmp.dll --;extension=php_soap.dll --;extension=php_sockets.dll --;extension=php_sqlite.dll --;extension=php_sqlite3.dll --;extension=php_sybase_ct.dll --;extension=php_tidy.dll --;extension=php_xmlrpc.dll --;extension=php_xsl.dll --;extension=php_zip.dll -+;extension=bcmath.so -+;extension=bz2.so -+;extension=calendar.so -+;extension=curl.so -+;extension=dba.so -+;extension=enchant.so -+;extension=exif.so -+;extension=ftp.so -+;extension=gd.so -+extension=gettext.so -+;extension=gmp.so -+;extension=iconv.so -+;extension=imap.so -+;extension=intl.so -+;extension=json.so -+;extension=ldap.so -+;extension=mcrypt.so -+;extension=mysql.so -+;extension=mysqli.so -+;extension=odbc.so -+;extension=openssl.so -+;extension=pdo.so -+;extension=pdo_mysql.so -+;extension=pdo_odbc.so -+;extension=pdo_pgsql.so -+;extension=pdo_sqlite.so -+;extension=pgsql.so -+;extension=phar.so -+;extension=posix.so -+;extension=pspell.so -+;extension=shmop.so -+;extension=snmp.so -+;extension=soap.so -+;extension=sockets.so -+;extension=sqlite.so -+;extension=sqlite3.so -+;extension=sysvmsg.so -+;extension=sysvsem.so -+;extension=sysvshm.so -+;extension=tidy.so -+;extension=xmlrpc.so -+;extension=xsl.so -+;extension=zip.so - - ;;;;;;;;;;;;;;;;;;; - ; Module Settings ; diff --git a/pigeonhole-hg/PKGBUILD b/pigeonhole-hg/PKGBUILD deleted file mode 100644 index f13ebb4..0000000 --- a/pigeonhole-hg/PKGBUILD +++ /dev/null @@ -1,40 +0,0 @@ -# Contributor: Sebastian Köhler <sebkoehler@whoami.org.uk> -pkgname=pigeonhole-hg -pkgver=1458 -pkgrel=1 -pkgdesc="Fully rewritten Sieve implementation for Dovecot v2.0" -arch=('i686' 'x86_64') -url="http://pigeonhole.dovecot.org/" -license=('LGPL') -depends=('dovecot>=2.0.0') -makedepends=('mercurial') -conflicts=('dovecot-sieve') - -_hgroot="http://hg.rename-it.nl/" -_hgrepo="dovecot-2.0-pigeonhole" - -build() { - cd "$srcdir" - msg "Connecting to Mercurial server...." - - if [ -d $_hgrepo ] ; then - cd $_hgrepo - hg pull -u - msg "The local files are updated." - else - hg clone $_hgroot$_hgrepo - fi - - msg "Mercurial checkout done or server timeout" - msg "Starting make..." - - - rm -rf "$srcdir/$_hgrepo-build" - cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build" - cd "$srcdir/$_hgrepo-build" - - ./autogen.sh - ./configure --prefix=/usr --with-dovecot=/usr/lib/dovecot - make - make DESTDIR="$pkgdir/" install -} diff --git a/pigeonhole-hg/namcap.log b/pigeonhole-hg/namcap.log deleted file mode 100644 index a6596e6..0000000 --- a/pigeonhole-hg/namcap.log +++ /dev/null @@ -1,11 +0,0 @@ -PKGBUILD (pigeonhole-hg) W: Missing Maintainer tag -pigeonhole-hg W: Referenced library 'libdovecot-sieve.so.0' is an uninstalled dependency -pigeonhole-hg W: Referenced library 'libdovecot-storage.so.0' is an uninstalled dependency -pigeonhole-hg W: Referenced library 'libdovecot-lda.so.0' is an uninstalled dependency -pigeonhole-hg W: Referenced library 'libdovecot.so.0' is an uninstalled dependency -pigeonhole-hg W: Referenced library 'libdovecot-login.so.0' is an uninstalled dependency -pigeonhole-hg W: Dependency included and not needed ('dovecot') -pigeonhole-hg W: File (usr/lib/dovecot/libdovecot-sieve.la) is a libtool file -pigeonhole-hg W: File (usr/lib/dovecot/modules/lib90_sieve_plugin.la) is a libtool file -pigeonhole-hg W: File (usr/lib/dovecot/modules/settings/libmanagesieve_login_settings.la) is a libtool file -pigeonhole-hg W: File (usr/lib/dovecot/modules/settings/libmanagesieve_settings.la) is a libtool file diff --git a/portbunny/PKGBUILD b/portbunny/PKGBUILD deleted file mode 100644 index 0b16e91..0000000 --- a/portbunny/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> -# Contributor: Martijn F. Arts <mfa@devtty0.de> - -pkgname=portbunny -pkgver="050109_dev" -pkgrel=1 -pkgdesc="A fast TCP-SYN Linux-kernel-based port-scanner" -arch=('i686' 'x86_64') -url="http://www.recurity-labs.com/portbunny/" -license=('GPL') -depends=('python>=2.4') -makedepends=('make' 'gcc' 'kernel-headers') -install=portbunny.install -source=("http://portbunny.recurity.com/tarballs/PortBunny050109-dev.tar.gz" "installpath.patch" "timespec.patch") -build() { - cd "$startdir/src/PortBunny050109-dev" - patch -p1 < $srcdir/installpath.patch - patch -p1 < $srcdir/timespec.patch - make - mkdir -p $pkgdir/lib/modules/$(uname -r)/kernel/ $pkgdir/usr/share/portbunny - mkdir -p $pkgdir/usr/bin - DESTDIR="$pkgdir" make install -} - -# vim:set ts=2 sw=2 et: -md5sums=('792ceed6d20e5035f9dc1fcc318d2bbe' - 'd056310ab5b14b6f859907b6fac7ae5d' - '4c1d452b454d78d36ce90f60a6c7ce90') -sha1sums=('829a3c39bc021d81c600899cd4b25de2f01cce32' - 'd765395cda24edea41c66d213b14973a62e88e48' - '8f4f93aeab397f39e5408d6090d34af73330c09c') diff --git a/portbunny/installpath.patch b/portbunny/installpath.patch deleted file mode 100644 index 96b12ef..0000000 --- a/portbunny/installpath.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -Nur PortBunny050109-dev/Makefile PortBunny050109-dev-arch/Makefile ---- PortBunny050109-dev/Makefile 2009-01-05 14:21:47.000000000 +0100 -+++ PortBunny050109-dev-arch/Makefile 2009-01-14 22:38:49.300678488 +0100 -@@ -49,5 +49,5 @@ - - install: - -- $(shell install -m 644 portbunny.ko /lib/modules/$(shell uname -r)/kernel/portbunny.ko; /sbin/depmod -a) -- $(shell cp -r ./UI/* /usr/local/) -+ install -m 644 portbunny.ko ${DESTDIR}/lib/modules/$(shell uname -r)/kernel/portbunny.ko -+ cp -r ./UI/* ${DESTDIR}/usr/ -diff -Nur PortBunny050109-dev/UI/bin/portbunny PortBunny050109-dev-arch/UI/bin/portbunny ---- PortBunny050109-dev/UI/bin/portbunny 2008-10-26 08:41:32.000000000 +0100 -+++ PortBunny050109-dev-arch/UI/bin/portbunny 2009-01-14 22:38:13.567338951 +0100 -@@ -12,7 +12,7 @@ - - - PBUNNY_SHARE = '../share/portbunny/' --PBUNNY_SHARE2 = '/usr/local/share/portbunny/' -+PBUNNY_SHARE2 = '/usr/share/portbunny/' - - import sys - import time -diff -Nur PortBunny050109-dev/UI/bin/portbunny.py PortBunny050109-dev-arch/UI/bin/portbunny.py ---- PortBunny050109-dev/UI/bin/portbunny.py 2008-10-26 08:41:32.000000000 +0100 -+++ PortBunny050109-dev-arch/UI/bin/portbunny.py 2009-01-14 22:38:13.567338951 +0100 -@@ -12,7 +12,7 @@ - - - PBUNNY_SHARE = '../share/portbunny/' --PBUNNY_SHARE2 = '/usr/local/share/portbunny/' -+PBUNNY_SHARE2 = '/usr/share/portbunny/' - - import sys - import time -diff -Nur PortBunny050109-dev/UI/share/portbunny/PBunnyServices.py PortBunny050109-dev-arch/UI/share/portbunny/PBunnyServices.py ---- PortBunny050109-dev/UI/share/portbunny/PBunnyServices.py 2008-10-26 08:41:32.000000000 +0100 -+++ PortBunny050109-dev-arch/UI/share/portbunny/PBunnyServices.py 2009-01-14 22:38:25.061728150 +0100 -@@ -7,7 +7,7 @@ - - ETC_SERVICES = '../share/portbunny/services' - if not os.path.exists(ETC_SERVICES): -- ETC_SERVICES = '/usr/local/share/portbunny/services' -+ ETC_SERVICES = '/usr/share/portbunny/services' - - - """ -diff -Nur PortBunny050109-dev/scanner_ui/scanner_ui.c PortBunny050109-dev-arch/scanner_ui/scanner_ui.c ---- PortBunny050109-dev/scanner_ui/scanner_ui.c 2008-10-26 08:41:30.000000000 +0100 -+++ PortBunny050109-dev-arch/scanner_ui/scanner_ui.c 2009-01-14 22:37:59.164038548 +0100 -@@ -344,7 +344,7 @@ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) - - #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25) -- device_create_drvdata(portbunny_class, NULL, MKDEV(major, 0), NULL, "portbunny"); -+ device_create(portbunny_class, NULL, MKDEV(major, 0), NULL, "portbunny"); - #else - class_device_create(portbunny_class, NULL, MKDEV(major, 0), NULL, "portbunny"); - #endif diff --git a/portbunny/portbunny.install b/portbunny/portbunny.install deleted file mode 100644 index f923755..0000000 --- a/portbunny/portbunny.install +++ /dev/null @@ -1,20 +0,0 @@ -# arg 1: the new package version -post_install() { - /sbin/depmod -a -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - /sbin/depmod -a -} - -post_remove() { - /sbin/depmod -a -} - -op=$1 -shift -[ "$(type -t "$op")" = "function" ] && $op "$@" - -# vim:set ts=2 sw=2 et: diff --git a/portbunny/timespec.patch b/portbunny/timespec.patch deleted file mode 100644 index 6ac01ae..0000000 --- a/portbunny/timespec.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- PortBunny050109-dev/timespec_utils.c 2008-10-26 08:41:32.000000000 +0100 -+++ PortBunny050109-dev/timespec_utils.c.new 2010-01-08 13:08:48.000000000 +0100 -@@ -53,7 +53,7 @@ - - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) -- -+#if false - void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec) - { - while (nsec >= NSEC_PER_SEC) { -@@ -67,7 +67,7 @@ - ts->tv_sec = sec; - ts->tv_nsec = nsec; - } -- -+#endif - #endif - - diff --git a/pydf/PKGBUILD b/pydf/PKGBUILD deleted file mode 100644 index ad28aa2..0000000 --- a/pydf/PKGBUILD +++ /dev/null @@ -1,22 +0,0 @@ -# Maintainer: TDY <tdy@gmx.com> -# Contributor: Eduard "bekks" Warkentin <eduard.warkentin@gmail.com> - -pkgname=pydf -pkgver=9 -pkgrel=1 -pkgdesc="A colorized df clone" -arch=(any) -url="http://kassiopeia.juls.savba.sk/~garabik/software/pydf/" -license=('custom') -depends=('python') -backup=('etc/pydfrc') -source=(http://kassiopeia.juls.savba.sk/~garabik/software/pydf/pydf_$pkgver.tar.gz) -md5sums=('71778fd7b6668ac157ea06a8867f2d20') - -build() { - cd "$srcdir/pydf-$pkgver" - install -Dm755 pydf "$pkgdir/usr/bin/pydf" - install -Dm644 pydfrc "$pkgdir/etc/pydfrc" - install -Dm644 pydf.1 "$pkgdir/usr/share/man/man1/pydf.1" - install -Dm644 COPYING "$pkgdir/usr/share/licenses/pydf/COPYING" -} diff --git a/pypanel/PKGBUILD b/pypanel/PKGBUILD deleted file mode 100644 index 3d238ef..0000000 --- a/pypanel/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# $Id: PKGBUILD,v 1.4 2008/05/05 00:33:39 BaSh Exp $ -# Maintainer: Jeff Mickey <j@codemac.net> -# Contributor: Mr Green -# Contributor: Jens Persson <xerxes2@gmail.com> - -pkgname=pypanel -pkgver=2.4 -pkgrel=4 -pkgdesc="A lightweight panel/taskbar for X11 window managers written in python" -arch=('i686' 'x86_64') -url="http://pypanel.sourceforge.net/" -license=('GPL') -depends=('python' 'x-server' 'python-xlib' 'imlib2') -makedepends=('python') -source=("http://downloads.sourceforge.net/sourceforge/pypanel/PyPanel-$pkgver.tar.gz" "pypanel.patch") - -build() { - cd $startdir/src/PyPanel-$pkgver - patch < $startdir/pypanel.patch - python setup.py install --root=$startdir/pkg || return 1 -} -md5sums=('f1f9a2ed80be72ab36e748833618daba' - '12c947292859eac45f0648586d707b73') -sha256sums=('4e612b43c61b3a8af7d57a0364f6cd89df481dc41e20728afa643e9e3546e911' - 'e3d506b51c1045f1d0bc1a3f0eeab959f55b52da279688d3a051bd4e41bb1497') diff --git a/pypanel/pypanel.patch b/pypanel/pypanel.patch deleted file mode 100644 index 0f8c338..0000000 --- a/pypanel/pypanel.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- pypanel 2005-06-27 01:24:43.000000000 +0200 -+++ pypanel.new 2008-08-30 22:25:14.000000000 +0200 -@@ -609,7 +609,7 @@ - def updatePanel(self, root, win, panel): - #--------------------------------------- - """ Redraw the panel """ -- tasks = panel[TASKS].tasks # all tasks -+ tasks = 0 #panel[TASKS].tasks # all tasks - visible = [] # visible tasks - curr_x = 0 - space = P_WIDTH diff --git a/python-otr/PKGBUILD b/python-otr/PKGBUILD deleted file mode 100644 index 2aaf0ea..0000000 --- a/python-otr/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# Contributor: Andre Klitzing <aklitzing () online () de> - -pkgname=python-otr -pkgver=0.2.1.1 -pkgrel=1 -pkgdesc="Simple python bindings for OTR" -arch=('i686' 'x86_64') -url="http://python-otr.pentabarf.de" -license=('GPL') -depends=('libotr>=3.2.0' 'python') -makedepends=('swig') -conflicts=('pyotr') -replaces=('pyotr') -source=(http://$pkgname.pentabarf.de/releases/$pkgname-$pkgver.tar.gz) -md5sums=('e753e6516d611d0c37a3fc785fb29b21') - -build() { - cd $srcdir/$pkgname-$pkgver - -# Great python3 rebuild -for file in $(find . -name '*.py' -print); do -sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' "${file}" -sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' "${file}" -done - - python2 setup.py build || return 1 - python2 setup.py install --prefix=/usr --root=$pkgdir || return 1 -} - diff --git a/python-otr/namcap.log b/python-otr/namcap.log deleted file mode 100644 index 49a0e7f..0000000 --- a/python-otr/namcap.log +++ /dev/null @@ -1,3 +0,0 @@ -PKGBUILD (python-otr) W: Missing Maintainer tag -python-otr E: Dependency detected and not included (python2) from files ['usr/lib/python2.7/site-packages/_otr.so'] -python-otr W: Dependency included and not needed ('python') diff --git a/pyunit/PKGBUILD b/pyunit/PKGBUILD deleted file mode 100644 index 331808b..0000000 --- a/pyunit/PKGBUILD +++ /dev/null @@ -1,17 +0,0 @@ -# Maintainer: Laszlo Papp < djszapi at archlinux us > - -pkgname=pyunit -pkgver=1.4.1 -pkgrel=1 -pkgdesc="Standard unit testing framework for Python" -arch=('any') -url="http://www.logilab.org/project/pylint" -license=('GPL') -source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz?use_mirror=surfnet) -md5sums=('658ff16afc469a3898260cc72bbea993') - -build() { - cd "$srcdir/$pkgname-$pkgver" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 -} - diff --git a/pyunit/pyunit-1.4.1.tar.gz?use_mirror=surfnet b/pyunit/pyunit-1.4.1.tar.gz?use_mirror=surfnet Binary files differdeleted file mode 100644 index 50c259e..0000000 --- a/pyunit/pyunit-1.4.1.tar.gz?use_mirror=surfnet +++ /dev/null diff --git a/qgtkstyle-svn/PKGBUILD b/qgtkstyle-svn/PKGBUILD deleted file mode 100644 index facd994..0000000 --- a/qgtkstyle-svn/PKGBUILD +++ /dev/null @@ -1,35 +0,0 @@ -# Contributor: simo91 <simo91.linux@gmail.com> -# Maintainer: Cristian Maureira <saint@archlinux.cl> - -pkgname=qgtkstyle-svn -pkgver=898 -pkgrel=1 -pkgdesc="An engine to create a GTK+ layer for Qt-based applications." -arch=('i686' 'x86_64') -url="http://labs.trolltech.com/page/Projects/Styles/GtkStyle" -license=('GPL3') -conflicts=('gtk-qt-engine') -depends=('qt>=4.4.0' 'gconf') -makedepends=('subversion') -source=() -md5sums=() -install=qgtkstyle.install - -_svntrunk=svn://labs.trolltech.com/svn/styles/gtkstyle -_svnmod=qgtkstyle - -build() { - cd "$srcdir" - if [ -d $_svnmod/.svn ]; then - (cd $_svnmod && svn up -r $pkgver) - else - svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod - fi - msg "SVN checkout done or server timeout" - msg "Starting make..." - cd $_svnmod - # Build - qmake - make || return 1 - make INSTALL_ROOT="$pkgdir" install -} diff --git a/qgtkstyle-svn/qgtkstyle.install b/qgtkstyle-svn/qgtkstyle.install deleted file mode 100644 index c4d30da..0000000 --- a/qgtkstyle-svn/qgtkstyle.install +++ /dev/null @@ -1,7 +0,0 @@ -post_install() { - echo "Do not forget to configure your GTK GUI style with 'qtconfig'" -} - -post_upgrade() { - echo "Do not forget to configure your GTK GUI style with 'qtconfig'" -} diff --git a/radvd/PKGBUILD b/radvd/PKGBUILD deleted file mode 100644 index 8a36e8c..0000000 --- a/radvd/PKGBUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Contributor: Mark Smith <markzzzsmith@yahoo.com.au> -pkgname=radvd -pkgver=1.6 -pkgrel=1 -pkgdesc="IPv6 Router Advertisement / Router Solicitation daemon" -url="http://www.litech.org/radvd/" -license="custom" -arch=('i686' 'x86_64') -makedepends=('automake' 'gcc' 'coreutils' 'sed' 'bison' 'flex' \ - 'tar' 'gzip' 'glibc' ) -depends=('glibc') -backup=(etc/$pkgname/radvd.conf) -install=radvd.install -source=(http://www.litech.org/radvd/dist/$pkgname-$pkgver.tar.gz - radvd.rc.d - radvd.install) -md5sums=('987e0660d68b4501b24dc5a068cea83c' - '0ceec38160497fb99ca6879c27e9255a' - 'b02517cc251dba4a2910395de878bde9') - -build() { - - cd $startdir/src/$pkgname-$pkgver - - ./configure --prefix=/usr\ - --sysconfdir=/etc/$pkgname \ - --mandir=/usr/share/man - - make - - make DESTDIR=$startdir/pkg install - - install -D -m444 COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/COPYRIGHT - install -D -m444 $startdir/src/$pkgname-$pkgver/radvd.conf.example \ - $startdir/pkg/etc/$pkgname/radvd.conf.example - - install -D -m755 $startdir/radvd.rc.d $startdir/pkg/etc/rc.d/radvd - -} diff --git a/radvd/radvd.install b/radvd/radvd.install deleted file mode 100644 index c049cbd..0000000 --- a/radvd/radvd.install +++ /dev/null @@ -1,57 +0,0 @@ -# arg 1: the new package version -pre_install() { - /bin/true -} - -# arg 1: the new package version -post_install() { - - cat << EOF - -NOTE ----- - -radvd requires IPv6 forwarding be enabled. To enable IPv6 forwarding at -boot time, add the following to /etc/sysctl.conf: - - # Enable IPv6 packet forwarding - net.ipv6.conf.all.forwarding = 1 - -or manually enable forwarding using: - - echo 1 > /proc/sys/net/ipv6/conf/all/forwarding - -EOF - - /bin/true - -} - -# arg 1: the new package version -# arg 2: the old package version -pre_upgrade() { - /bin/true -} - -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - /bin/true -} - -# arg 1: the old package version -pre_remove() { - /bin/true -} - -# arg 1: the old package version -post_remove() { - - # clean up just in case - rm -f /var/run/radvd.pid - -} - -op=$1 -shift -$op $* diff --git a/radvd/radvd.rc.d b/radvd/radvd.rc.d deleted file mode 100644 index 971bc41..0000000 --- a/radvd/radvd.rc.d +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/sbin/radvd` -case "$1" in - start) - stat_busy "Starting radvd IPv6 RA/RS daemon" - if [ -z "$PID" ]; then - /usr/sbin/radvd - fi - if [ ! -z "$PID" -o $? -gt 0 ]; then - stat_fail - else - add_daemon radvd - stat_done - fi - ;; - stop) - stat_busy "Stopping radvd IPv6 RA/RS daemon" - [ ! -z "$PID" ] && kill $PID &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon radvd - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac diff --git a/rkhunter/PKGBUILD b/rkhunter/PKGBUILD deleted file mode 100644 index a23cdb4..0000000 --- a/rkhunter/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org> -# Contributor: Pierre Schmitz <pierre@archlinux.de> - -pkgname=rkhunter -pkgver=1.3.4 -pkgrel=2 -pkgdesc="An easy-to-use tool which checks machines running UNIX (clones) for the presence of rootkits and other unwanted tools." -arch=('i686' 'x86_64') -url="http://rkhunter.sourceforge.net/" -license=('GPL') -depends=('bash' 'perl' 'wget') -backup=(etc/rkhunter.conf) -source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz) - -md5sums=('31eaacc4d01ad138d1a4283f105088e6') - -build() { - cd $srcdir/${pkgname}-${pkgver} - - install -d -m755 $pkgdir/usr - -# fix installer for x86_64 - sed -i -e "s/lib64/lib/g" installer.sh - -# install to /usr - ./installer.sh --layout custom $pkgdir/usr --striproot $pkgdir --install || return 1 - -# use /etc instead of /usr/etc - sed -i -e "s#/usr/etc/rkhunter.conf#/etc/rkhunter.conf#g" $pkgdir/usr/bin/rkhunter - mv $pkgdir/usr/etc $pkgdir/ - mv $pkgdir/usr/var $pkgdir/ - -# tmp dir path fix - sed -i -e "s#/usr/var/lib/rkhunter/db#/var/lib/rkhunter/db#g" \ - $pkgdir/etc/rkhunter.conf - sed -i -e "s#/usr/var/lib/rkhunter/tmp#/var/lib/rkhunter/tmp#g" \ - $pkgdir/etc/rkhunter.conf - -# cleanup - rm -f $pkgdir/var/lib/rkhunter/tmp/{group,passwd} - -# we trust in udev - sed -i 's|^#ALLOWHIDDENDIR=/dev/.udev$|ALLOWHIDDENDIR=/dev/.udev|' $pkgdir/etc/rkhunter.conf -} diff --git a/ropevim/PKGBUILD b/ropevim/PKGBUILD deleted file mode 100644 index 7d85c62..0000000 --- a/ropevim/PKGBUILD +++ /dev/null @@ -1,17 +0,0 @@ -pkgname=ropevim -pkgver=0.2 -pkgrel=4 -pkgdesc="Plugin for performing python refactorings in vim" -arch=('i686' 'x86_64') -url="http://rope.sourceforge.net/ropevim.html" -license=('GPL') -depends=('python>=2.5' 'rope' 'vim') -source=(http://downloads.sourceforge.net/rope/${pkgname}-${pkgver}.tar.gz) -md5sums=('42390b31187a6ac5f06b5148af661f97') - -build() { - cd $srcdir/$pkgname-$pkgver - python ./setup.py install --root=$pkgdir --prefix=/usr || return 1 - install -m 444 -D ropevim.vim $pkgdir/usr/share/vim/vimfiles/plugin/ropevim.vim -} - diff --git a/rtorrent-color/PKGBUILD b/rtorrent-color/PKGBUILD deleted file mode 100644 index d44c680..0000000 --- a/rtorrent-color/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Maintainer: Ashren <edgar [at] archlinux [dot] us> - -pkgname=rtorrent-color -pkgver=0.8.6 -pkgrel=5 -pkgdesc="Ncurses BitTorrent client based on libTorrent with color patch." -arch=('i686' 'x86_64') -url="http://libtorrent.rakshasa.no" -install=$pkgname.install -license=('GPL') -depends=('libtorrent=0.12.6' 'curl>=7.14.3' 'xmlrpc-c') -source=(http://libtorrent.rakshasa.no/downloads/rtorrent-$pkgver.tar.gz rtorrent-0.8.6-canvas-fix.patch) -conflicts=('rtorrent') - -md5sums=('b804c45c01c40312926bcea6b55bb084' - '03cbbf61ac0c5a128880a5a453677a87') - -build() { - cd "$srcdir/rtorrent-$pkgver" - patch -p1 < $startdir/src/rtorrent-0.8.6-canvas-fix.patch - CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" \ - ./configure --prefix=/usr --disable-debug --with-xmlrpc-c || return 1 - make || return 1 - make DESTDIR="$pkgdir" install -} - - -# vim:set ts=2 sw=2 et: diff --git a/rtorrent-color/rtorrent-0.8.4-SVN-canvas-fix.patch.part b/rtorrent-color/rtorrent-0.8.4-SVN-canvas-fix.patch.part deleted file mode 100644 index e69de29..0000000 --- a/rtorrent-color/rtorrent-0.8.4-SVN-canvas-fix.patch.part +++ /dev/null diff --git a/rtorrent-color/rtorrent-0.8.5.tar.gz.part b/rtorrent-color/rtorrent-0.8.5.tar.gz.part deleted file mode 100644 index e69de29..0000000 --- a/rtorrent-color/rtorrent-0.8.5.tar.gz.part +++ /dev/null diff --git a/rtorrent-color/rtorrent-0.8.6-canvas-fix.patch b/rtorrent-color/rtorrent-0.8.6-canvas-fix.patch deleted file mode 100644 index 02b8a18..0000000 --- a/rtorrent-color/rtorrent-0.8.6-canvas-fix.patch +++ /dev/null @@ -1,321 +0,0 @@ -diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/command_network.cc ./src/command_network.cc -*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/command_network.cc 2009-11-12 09:19:40.000000000 +0100 ---- ./src/command_network.cc 2009-12-17 19:27:05.783955715 +0100 -*************** -*** 495,498 **** ---- 495,502 ---- - // Not really network stuff: - ADD_VARIABLE_BOOL ("handshake_log", false); - ADD_VARIABLE_STRING("log.tracker", ""); -+ ADD_COMMAND_VALUE_TRI("done_fg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_done_fg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_done_fg_color)); -+ ADD_COMMAND_VALUE_TRI("done_bg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_done_bg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_done_bg_color)); -+ ADD_COMMAND_VALUE_TRI("active_fg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_active_fg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_active_fg_color)); -+ ADD_COMMAND_VALUE_TRI("active_bg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_active_bg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_active_bg_color)); - } -diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/canvas.cc ./src/display/canvas.cc -*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/canvas.cc 2009-11-12 09:03:47.000000000 +0100 ---- ./src/display/canvas.cc 2009-12-17 19:27:05.783955715 +0100 -*************** -*** 92,97 **** ---- 92,101 ---- - m_isInitialized = true; - - initscr(); -+ start_color(); -+ use_default_colors(); -+ init_pair(2, -1, -1); -+ init_pair(1, -1, -1); - raw(); - noecho(); - nodelay(stdscr, TRUE); -Only in ./src/display: canvas.cc.orig -diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/window_download_list.cc ./src/display/window_download_list.cc -*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/window_download_list.cc 2009-11-12 09:03:47.000000000 +0100 ---- ./src/display/window_download_list.cc 2009-12-17 19:27:05.783955715 +0100 -*************** -*** 37,42 **** ---- 37,43 ---- - #include "config.h" - - #include <rak/algorithm.h> -+ #include <torrent/rate.h> - - #include "core/download.h" - #include "core/view.h" -*************** -*** 96,107 **** - char* position; - char* last = buffer + m_canvas->width() - 2 + 1; - - position = print_download_title(buffer, last, *range.first); -! m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); - - position = print_download_info(buffer, last, *range.first); - m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); - - position = print_download_status(buffer, last, *range.first); - m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); - ---- 97,126 ---- - char* position; - char* last = buffer + m_canvas->width() - 2 + 1; - -+ if( pos >= m_canvas->height() ) break; - position = print_download_title(buffer, last, *range.first); -! m_canvas->print(0, pos, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); -! if( (*range.first)->is_done() ) { -! if( (*range.first)->download()->up_rate()->rate() != 0 ) { -! m_canvas->set_attr(0, pos, m_canvas->width()-1, A_BOLD, 2); -! } else { -! m_canvas->set_attr(0, pos, m_canvas->width()-1, A_NORMAL, 2); -! } -! } else if( (*range.first)->download()->is_active() ) { -! if( (*range.first)->download()->down_rate()->rate() != 0 ) { -! m_canvas->set_attr(0, pos, m_canvas->width()-1, A_BOLD, 1); -! } else { -! m_canvas->set_attr(0, pos, m_canvas->width()-1, A_NORMAL, 1); -! } -! } -! pos++; - -+ if( pos >= m_canvas->height() ) break; -+ - position = print_download_info(buffer, last, *range.first); - m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); - -+ if( pos >= m_canvas->height() ) break; - position = print_download_status(buffer, last, *range.first); - m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); - -*************** -*** 109,112 **** ---- 128,167 ---- - } - } - -+ void -+ WindowDownloadList::set_done_fg_color(int64_t color) { -+ short fg, bg; -+ pair_content(2, &fg, &bg); -+ if( color < 0 ) color = -1; -+ color = color % 8; -+ init_pair(2, (short)color, bg); -+ } -+ -+ void -+ WindowDownloadList::set_done_bg_color(int64_t color) { -+ short fg, bg; -+ pair_content(2, &fg, &bg); -+ if( color < 0 ) color = -1; -+ color = color % 8; -+ init_pair(2, fg, (short)color); -+ } -+ -+ void -+ WindowDownloadList::set_active_fg_color(int64_t color) { -+ short fg, bg; -+ pair_content(1, &fg, &bg); -+ if( color < 0 ) color = -1; -+ color = color % 8; -+ init_pair(1, (short)color, bg); -+ } -+ -+ void -+ WindowDownloadList::set_active_bg_color(int64_t color) { -+ short fg, bg; -+ pair_content(1, &fg, &bg); -+ if( color < 0 ) color = -1; -+ color = color % 8; -+ init_pair(1, fg, (short)color); -+ } -+ - } -diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/window_download_list.h ./src/display/window_download_list.h -*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/display/window_download_list.h 2009-11-12 09:03:47.000000000 +0100 ---- ./src/display/window_download_list.h 2009-12-17 19:27:05.783955715 +0100 -*************** -*** 59,64 **** ---- 59,68 ---- - virtual void redraw(); - - void set_view(core::View* l); -+ void set_done_fg_color(int64_t color); -+ void set_done_bg_color(int64_t color); -+ void set_active_fg_color(int64_t color); -+ void set_active_bg_color(int64_t color); - - private: - core::View* m_view; -diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/download_list.cc ./src/ui/download_list.cc -*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/download_list.cc 2009-11-12 09:03:48.000000000 +0100 ---- ./src/ui/download_list.cc 2009-12-17 19:27:05.783955715 +0100 -*************** -*** 137,142 **** ---- 137,147 ---- - current_view()->next_focus(); - } - -+ display::WindowDownloadList* -+ DownloadList::current_window_list() { -+ return dynamic_cast<ElementDownloadList*>(m_uiArray[DISPLAY_DOWNLOAD_LIST])->window(); -+ } -+ - void - DownloadList::activate_display(Display displayType) { - if (!is_active()) -Only in ./src/ui: download_list.cc.orig -diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/download_list.h ./src/ui/download_list.h -*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/download_list.h 2009-11-12 09:03:48.000000000 +0100 ---- ./src/ui/download_list.h 2009-12-17 19:27:05.783955715 +0100 -*************** -*** 101,106 **** ---- 101,107 ---- - void activate_display(Display d); - - core::View* current_view(); -+ display::WindowDownloadList* current_window_list(); - void set_current_view(const std::string& name); - - void slot_open_uri(SlotOpenUri s) { m_slotOpenUri = s; } -diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/element_download_list.h ./src/ui/element_download_list.h -*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/element_download_list.h 2009-11-12 09:03:48.000000000 +0100 ---- ./src/ui/element_download_list.h 2009-12-17 19:27:05.783955715 +0100 -*************** -*** 60,65 **** ---- 60,66 ---- - void disable(); - - core::View* view() { return m_view; } -+ WDownloadList* window() { return m_window; } - void set_view(core::View* l); - - void receive_command(const char* cmd); -Only in ./src/ui: element_download_list.h.orig -diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/root.cc ./src/ui/root.cc -*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/root.cc 2009-11-12 09:03:48.000000000 +0100 ---- ./src/ui/root.cc 2009-12-17 19:27:05.783955715 +0100 -*************** -*** 44,49 **** ---- 44,50 ---- - - #include "core/manager.h" - #include "display/frame.h" -+ #include "display/window_download_list.h" - #include "display/window_http_queue.h" - #include "display/window_title.h" - #include "display/window_input.h" -*************** -*** 65,71 **** - m_windowTitle(NULL), - m_windowHttpQueue(NULL), - m_windowInput(NULL), -! m_windowStatusbar(NULL) { - } - - void ---- 66,76 ---- - m_windowTitle(NULL), - m_windowHttpQueue(NULL), - m_windowInput(NULL), -! m_windowStatusbar(NULL), -! done_fg_color(-1), -! done_bg_color(-1), -! active_fg_color(-1), -! active_bg_color(-1) { - } - - void -*************** -*** 97,102 **** ---- 102,111 ---- - setup_keys(); - - m_downloadList->activate(rootFrame->frame(1)); -+ m_downloadList->current_window_list()->set_done_fg_color(done_fg_color); -+ m_downloadList->current_window_list()->set_done_bg_color(done_bg_color); -+ m_downloadList->current_window_list()->set_active_fg_color(active_fg_color); -+ m_downloadList->current_window_list()->set_active_bg_color(active_bg_color); - } - - void -*************** -*** 219,224 **** ---- 228,273 ---- - torrent::set_max_unchoked(maxUnchoked); - } - -+ int -+ Root::get_done_fg_color() { -+ return done_fg_color; -+ } -+ -+ void -+ Root::set_done_fg_color(int64_t color) { -+ done_fg_color = color; -+ } -+ -+ int -+ Root::get_done_bg_color() { -+ return done_bg_color; -+ } -+ -+ void -+ Root::set_done_bg_color(int64_t color) { -+ done_bg_color = color; -+ } -+ -+ int -+ Root::get_active_fg_color() { -+ return active_fg_color; -+ } -+ -+ void -+ Root::set_active_fg_color(int64_t color) { -+ active_fg_color = color; -+ } -+ -+ int -+ Root::get_active_bg_color() { -+ return active_bg_color; -+ } -+ -+ void -+ Root::set_active_bg_color(int64_t color) { -+ active_bg_color = color; -+ } -+ - void - Root::adjust_down_throttle(int throttle) { - set_down_throttle(std::max<int>(torrent::down_throttle_global()->max_rate() / 1024 + throttle, 0)); -Only in ./src/ui: root.cc.orig -diff -crB /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/root.h ./src/ui/root.h -*** /home/regj/misc/rtorrent-color-orig/src/rtorrent-0.8.6/src/ui/root.h 2009-11-12 09:03:48.000000000 +0100 ---- ./src/ui/root.h 2009-12-17 19:27:05.783955715 +0100 -*************** -*** 82,87 **** ---- 82,95 ---- - // Rename to raw or something, make base function. - void set_down_throttle_i64(int64_t throttle) { set_down_throttle(throttle >> 10); } - void set_up_throttle_i64(int64_t throttle) { set_up_throttle(throttle >> 10); } -+ int get_done_fg_color(); -+ void set_done_fg_color(int64_t color); -+ int get_done_bg_color(); -+ void set_done_bg_color(int64_t color); -+ int get_active_fg_color(); -+ void set_active_fg_color(int64_t color); -+ int get_active_bg_color(); -+ void set_active_bg_color(int64_t color); - - void adjust_down_throttle(int throttle); - void adjust_up_throttle(int throttle); -*************** -*** 105,110 **** ---- 113,122 ---- - WStatusbar* m_windowStatusbar; - - input::Bindings m_bindings; -+ int64_t done_fg_color; -+ int64_t done_bg_color; -+ int64_t active_fg_color; -+ int64_t active_bg_color; - }; diff --git a/rtorrent-color/rtorrent-color.install b/rtorrent-color/rtorrent-color.install deleted file mode 100644 index 86facb4..0000000 --- a/rtorrent-color/rtorrent-color.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { - echo "" - echo "Set colors using the options below in .rtorrent.rc:" - echo "Options: done_fg_color, done_bg_color, active_fg_color, active_bg_color" - echo "Colors: 0 = black 1 = red 2 = green 3 = yellow 4 = blue 5 = magenta 6 = cyan 7 = white" - echo "Example: done_fg_color = 1" -} -post_upgrade() { - post_install -} - diff --git a/rtorrent-extended/PKGBUILD b/rtorrent-extended/PKGBUILD deleted file mode 100644 index 52ebeb4..0000000 --- a/rtorrent-extended/PKGBUILD +++ /dev/null @@ -1,122 +0,0 @@ -# Maintainer: Lucky <aur.archlinux.org [at] lucky.take0ver [dot] net> -# Contributor: Ashren <edgar [at] archlinux [dot] us> -# Contributor: Daenyth <Daenyth [at] gmail [dot] com> -# Contributor: Jeff Mickey <jeff@archlinux.org> -# Contributor: sh__ - -pkgname=rtorrent-extended -_pkgname=rtorrent -pkgver=0.8.6 -pkgrel=4 -pkgdesc="Ncurses BitTorrent client based on libTorrent with magnet link, IPv6, ipfilter, bad peers, color and trackerinfo patch." -arch=('i686' 'x86_64') -url="http://libtorrent.rakshasa.no" -license=('GPL') -depends=('libtorrent-extended=0.12.6-3' 'curl>=7.14.3' 'xmlrpc-c>=1858') -conflicts=('rtorrent') -provides=('rtorrent') -install=${pkgname}.install -source=(http://libtorrent.rakshasa.no/downloads/${_pkgname}-${pkgver}.tar.gz - # support for magnet links - # http://libtorrent.rakshasa.no/ticket/955 (deleted) - # http://libtorrent.rakshasa.no/ticket/2100 - dht_pex_static_map.patch - magnet_uri.patch - # support for IPv6 - # http://libtorrent.rakshasa.no/ticket/1111 - ipv6.patch - # support for ipfilter.dat - # http://libtorrent.rakshasa.no/ticket/239 - ip_filter_no_boost_fast.patch - # support for bad peers (kick/ban) - # http://ovh.ttdpatch.net/~jdrexler/rt/experimental/bad_peer_handling.diff - # https://calomel.org/rtorrent_mods.html - bad_peer_handling.patch - # support for colors - # http://libtorrent.rakshasa.no/ticket/1382 - canvas_color.patch - # karabaja mod patchset (color, interface) - # http://aur.archlinux.org/packages.php?ID=36604 - karabaja_mod.patch - # more infos at tracker list - trackerinfo.patch - # http://aur.archlinux.org/packages.php?ID=33756 - vi_kb_akston.patch - # http://aur.archlinux.org/packages.php?ID=35642 - vi_kb_tjwoosta.patch) -md5sums=('b804c45c01c40312926bcea6b55bb084' - '795c2818d4d869f90f1b7734f94347fc' - '8dcd2c76ee2ed48e86707a2b94b34c34' - 'cd9f4ce9202f6e03699b962f372a09e0' - '142f39586cd916608a7d569473bce1b0' - 'e698da498f306435fb8f89824c47e0e8' - '8721dea9d4da9a4f11051de7a2490e40' - 'fdcee74cc8dc4abb1a5b627ae00b8345' - '1fc3b40153450f34f8f4c4e1a161b6b8' - '752590f272e48a2828a7e64746778df8' - 'c5620714083fff8d609924c6bdb37fa0') - -build() { - cd "${srcdir}/${_pkgname}-${pkgver}" - - echo -e "\e[1;32m===> \e[0m Do you want magentlink patch? [Y/n]" - echo -e "\e[1;31m===> \e[0m !!! needed by ipv6 patch !!!" - read _answer_ml - if [[ ! ${_answer_ml} = [n,N] ]]; then - patch -p1 < ${srcdir}/dht_pex_static_map.patch - patch -p1 < ${srcdir}/magnet_uri.patch - fi - echo -e "\e[1;32m===> \e[0m Do you want ipv6 patch? [y/N]" - echo -e "\e[1;33m===> \e[0m !!! scgi/xmlrpc-c won't work with this patch !!!" - read _answer_ipv6 - if [[ ${_answer_ipv6} = [y,Y] ]]; then - patch -p1 < ${srcdir}/ipv6.patch - _option_ipv6="--enable-ipv6" - fi - echo -e "\e[1;32m===> \e[0m Do you want ipfilter patch? [Y/n]" - read _answer_ipf - if [[ ! ${_answer_ipf} = [n,N] ]]; then - patch -p1 < ${srcdir}/ip_filter_no_boost_fast.patch - fi - echo -e "\e[1;32m===> \e[0m Do you want bad peer handling patch? [Y/n]" - read _answer_bph - if [[ ! ${_answer_bph} = [n,N] ]]; then - patch -p1 < ${srcdir}/bad_peer_handling.patch - fi - echo -e "\e[1;32m===> \e[0m Do you want color/mod patch? [1/2/n]" - echo -e "\e[1;33m===> \e[0m 1) karabaja mod (default)" - echo -e "\e[1;33m===> \e[0m 2) canvas color" - read _answer_cc - if [[ ! ${_answer_cc} = [n,N] ]]; then - if [[ ! ${_answer_cc} = [2] ]]; then - patch -p1 < ${srcdir}/karabaja_mod.patch - else - patch -p1 < ${srcdir}/canvas_color.patch - fi - fi - echo -e "\e[1;32m===> \e[0m Do you want tracker info patch? [Y/n]" - read _answer_ti - if [[ ! ${_answer_ti} = [n,N] ]]; then - patch -p1 < ${srcdir}/trackerinfo.patch - fi - echo -e "\e[1;32m===> \e[0m Do you want keybindings patch? [1/2/n]" - echo -e "\e[1;33m===> \e[0m 1) vi_kb_tjwoosta (default)" - echo -e "\e[1;33m===> \e[0m 2) vi_kb_akston" - read _answer_kb - if [[ ! ${_answer_kb} = [n,N] ]]; then - if [[ ! ${_answer_kb} = [2] ]]; then - patch -p1 < ${srcdir}/vi_kb_tjwoosta.patch - else - patch -p1 < ${srcdir}/vi_kb_akston.patch - fi - fi - - sed -i 's/rTorrent \" VERSION/rTorrent-eXtended " VERSION/' src/ui/download_list.cc - - ./autogen.sh - CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" \ - ./configure --prefix=/usr --enable-posix-fallocate --disable-debug ${_option_ipv6} --with-xmlrpc-c || return 1 - make || return 1 - make DESTDIR="${pkgdir}" install -} -# vim:set ts=2 sw=2 et: diff --git a/rtorrent-extended/bad_peer_handling.patch b/rtorrent-extended/bad_peer_handling.patch deleted file mode 100644 index 293cfad..0000000 --- a/rtorrent-extended/bad_peer_handling.patch +++ /dev/null @@ -1,219 +0,0 @@ -diff --git a/src/command_download.cc b/src/command_download.cc -index 6043662..9afd9b0 100644 ---- a/src/command_download.cc -+++ b/src/command_download.cc -@@ -51,12 +51,14 @@ - #include <torrent/data/file.h> - #include <torrent/data/file_list.h> - #include <torrent/peer/connection_list.h> -+#include <torrent/peer/peer_info.h> - #include <torrent/peer/peer_list.h> - - #include "core/download.h" - #include "core/download_store.h" - #include "core/manager.h" - #include "rpc/command_variable.h" -+#include "rpc/parse.h" - - #include "globals.h" - #include "control.h" -@@ -170,6 +172,120 @@ apply_d_delete_tied(core::Download* download) { - rpc::call_command("d.set_tied_to_file", std::string(), rpc::make_target(download)); - } - -+torrent::Object -+apply_d_snub_leechers(core::Download* download, const torrent::Object& rawArgs) { -+ if (!download->is_open() || download->is_done() || rpc::call_command_value("d.get_ignore_commands", rpc::make_target(download)) != 0) -+ return torrent::Object(); -+ -+ const torrent::Object::list_type& args = rawArgs.as_list(); -+ -+ if (args.size() < 3) -+ throw torrent::input_error("Too few arguments."); -+ -+ torrent::Object::list_type::const_iterator argItr = args.begin(); -+ uint64_t snub_ratio = rpc::convert_to_value(*argItr++); -+ uint64_t unsnub_ratio = rpc::convert_to_value(*argItr++); -+ uint64_t min_transfer = rpc::convert_to_value(*argItr++); -+ -+ for (torrent::ConnectionList::iterator itr = download->download()->connection_list()->begin(); itr != download->download()->connection_list()->end(); ++itr) { -+#if LIBTORRENT_FRIENDS -+ if (((*itr)->bitfield() && (*itr)->bitfield()->is_all_set()) || (*itr)->peer_info()->is_friend()) -+#else -+ if (((*itr)->bitfield() && (*itr)->bitfield()->is_all_set())) -+#endif -+ continue; -+ -+ uint64_t up = (*itr)->up_rate()->total(); -+ uint64_t down = (*itr)->down_rate()->total(); -+ -+ if ((*itr)->is_snubbed()) { -+ if (down * unsnub_ratio >= std::max<uint64_t>(up, min_transfer)) -+ (*itr)->set_snubbed(false); -+ -+ } else if (up > min_transfer && down * snub_ratio < up) { -+ (*itr)->set_snubbed(true); -+ } -+ } -+ -+ return torrent::Object(); -+} -+ -+torrent::Object -+apply_d_ban_slow_peers(core::Download* download, const torrent::Object& rawArgs) { -+ if (!download->is_open() || download->is_done() || rpc::call_command_value("d.get_ignore_commands", rpc::make_target(download)) != 0) -+ return torrent::Object(); -+ -+ const torrent::Object::list_type& args = rawArgs.as_list(); -+ -+ if (args.size() < 4) -+ throw torrent::input_error("Too few arguments."); -+ -+ torrent::ConnectionList* clist = download->download()->connection_list(); -+ int extraPeers = clist->size() - clist->min_size(); -+ if (extraPeers <= 0) -+ return torrent::Object(); -+ -+ torrent::Object::list_type::const_iterator argItrStart = args.begin(); -+ int extraSeeds = download->download()->peers_complete() - rpc::convert_to_value(*argItrStart++); -+ uint32_t minRate = rpc::convert_to_value(*argItrStart++); -+ -+ for (torrent::ConnectionList::iterator itr = clist->begin(); extraPeers > 0 && itr != clist->end(); ++itr) { -+#if LIBTORRENT_FRIENDS -+ if ((*itr)->peer_info()->is_friend()) -+ continue; -+#endif -+ -+ bool isSeed = (*itr)->bitfield() && (*itr)->bitfield()->is_all_set(); -+ if (isSeed && extraSeeds <= 0) -+ continue; -+ -+ int64_t down = (*itr)->down_rate()->total(); -+ uint32_t rate = (*itr)->down_rate()->rate(); -+ -+ for (torrent::Object::list_type::const_iterator argItr = argItrStart; argItr != args.end(); ++argItr) { -+ if (rate >= minRate || down >= rpc::convert_to_value(*argItr++)) -+ break; -+ -+ if (cachedTime.seconds() - (*itr)->peer_info()->last_connection() < rpc::convert_to_value(*argItr) * 60) -+ continue; -+ -+ (*itr)->set_banned(); -+ -+ extraSeeds -= isSeed; -+ extraPeers--; -+ break; -+ } -+ } -+ -+ // Need to go by indices because erasing may invalidate iterators. -+ for (size_t pId = 0; pId < clist->size(); ) -+ if ((*(clist->begin() + pId))->is_banned()) -+ download->connection_list()->erase(*(clist->begin() + pId), 0); -+ else -+ pId++; -+ -+ return torrent::Object(); -+} -+ -+void -+apply_d_unban_peers(core::Download* download) { -+ torrent::PeerList* list = download->download()->peer_list(); -+ -+ for (torrent::PeerList::const_iterator itr = list->begin(); itr != list->end(); ++itr) -+ if (itr->second->is_banned()) -+ itr->second->set_unbanned(); -+} -+ -+void -+apply_d_unsnub_peers(core::Download* download) { -+ if (!download->is_open()) -+ return; -+ -+ for (torrent::ConnectionList::iterator itr = download->download()->connection_list()->begin(); itr != download->download()->connection_list()->end(); ++itr) -+ if ((*itr)->is_snubbed()) -+ (*itr)->set_snubbed(false); -+} -+ - void - apply_d_connection_type(core::Download* download, const std::string& name) { - torrent::Download::ConnectionType connType; -@@ -580,6 +696,11 @@ initialize_command_download() { - ADD_CD_LIST("delete_link", rak::bind_ptr_fn(&apply_d_change_link, 1)); - ADD_CD_V_VOID("delete_tied", &apply_d_delete_tied); - -+ ADD_CD_LIST("ban_slow_peers", rak::ptr_fn(&apply_d_ban_slow_peers)); -+ ADD_CD_LIST("snub_leechers", rak::ptr_fn(&apply_d_snub_leechers)); -+ ADD_CD_V_VOID("unban_peers", &apply_d_unban_peers); -+ ADD_CD_V_VOID("unsnub_peers", &apply_d_unsnub_peers); -+ - CMD_FUNC_SINGLE("d.start", "d.set_hashing_failed=0 ;view.set_visible=started"); - CMD_FUNC_SINGLE("d.stop", "view.set_visible=stopped"); - CMD_FUNC_SINGLE("d.try_start", "branch=\"or={d.get_hashing_failed=,d.get_ignore_commands=}\",{},{view.set_visible=started}"); -diff --git a/src/command_events.cc b/src/command_events.cc -index b25dfbc..a0250d9 100644 ---- a/src/command_events.cc -+++ b/src/command_events.cc -@@ -42,6 +42,8 @@ - #include <rak/path.h> - #include <rak/string_manip.h> - #include <sigc++/adaptors/bind.h> -+#include <torrent/peer/connection_list.h> -+#include <torrent/peer/peer_info.h> - #include <torrent/rate.h> - #include <torrent/hash_string.h> - -@@ -276,6 +278,31 @@ apply_close_low_diskspace(int64_t arg) { - control->core()->push_log("Closed torrents due to low diskspace."); - } - -+// Should call the d.* commands via RPC, but there doesn't seem to be a way to -+// pass variable-sized argument lists, so call the functions directly for now. -+torrent::Object apply_d_snub_leechers(core::Download*, const torrent::Object&); -+torrent::Object apply_d_ban_slow_peers(core::Download*, const torrent::Object&); -+ -+torrent::Object -+apply_snub_leechers(const torrent::Object& rawArgs) { -+ for (core::Manager::DListItr ditr = control->core()->download_list()->begin(); ditr != control->core()->download_list()->end(); ditr++) { -+ if ((*ditr)->is_open() && !(*ditr)->is_done() && rpc::call_command_value("d.get_ignore_commands", rpc::make_target(*ditr)) == 0) -+ apply_d_snub_leechers(*ditr, rawArgs); -+ } -+ -+ return torrent::Object(); -+} -+ -+torrent::Object -+apply_ban_slow_peers(const torrent::Object& rawArgs) { -+ for (core::Manager::DListItr ditr = control->core()->download_list()->begin(); ditr != control->core()->download_list()->end(); ditr++) { -+ if ((*ditr)->is_open() && !(*ditr)->is_done() && rpc::call_command_value("d.get_ignore_commands", rpc::make_target(*ditr)) == 0) -+ apply_d_ban_slow_peers(*ditr, rawArgs); -+ } -+ -+ return torrent::Object(); -+} -+ - torrent::Object - apply_download_list(const torrent::Object& rawArgs) { - const torrent::Object::list_type& args = rawArgs.as_list(); -@@ -369,6 +396,8 @@ initialize_command_events() { - ADD_COMMAND_LIST("on_finished", rak::bind_ptr_fn(&apply_on_state_change, "event.download.finished")); - - ADD_COMMAND_STRING("on_ratio", rak::ptr_fn(&apply_on_ratio)); -+ ADD_COMMAND_LIST("snub_leechers", rak::ptr_fn(&apply_snub_leechers)); -+ ADD_COMMAND_LIST("ban_slow_peers", rak::ptr_fn(&apply_ban_slow_peers)); - - ADD_COMMAND_VOID("start_tied", &apply_start_tied); - ADD_COMMAND_VOID("stop_untied", &apply_stop_untied); -diff --git a/src/command_helpers.h b/src/command_helpers.h -index a807b5f..cda29d8 100644 ---- a/src/command_helpers.h -+++ b/src/command_helpers.h -@@ -54,7 +54,7 @@ namespace rpc { - #define COMMAND_DOWNLOAD_SLOTS_SIZE 150 - #define COMMAND_FILE_SLOTS_SIZE 30 - #define COMMAND_FILE_ITR_SLOTS_SIZE 10 --#define COMMAND_PEER_SLOTS_SIZE 20 -+#define COMMAND_PEER_SLOTS_SIZE 30 - #define COMMAND_TRACKER_SLOTS_SIZE 15 - #define COMMAND_ANY_SLOTS_SIZE 50 - diff --git a/rtorrent-extended/canvas_color.patch b/rtorrent-extended/canvas_color.patch deleted file mode 100644 index 88423b1..0000000 --- a/rtorrent-extended/canvas_color.patch +++ /dev/null @@ -1,282 +0,0 @@ -diff --git a/src/command_network.cc b/src/command_network.cc -index 2494988..7b105ca 100644 ---- a/src/command_network.cc -+++ b/src/command_network.cc -@@ -560,4 +560,8 @@ initialize_command_network() { - // Not really network stuff: - ADD_VARIABLE_BOOL ("handshake_log", false); - ADD_VARIABLE_STRING("log.tracker", ""); -+ ADD_COMMAND_VALUE_TRI("done_fg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_done_fg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_done_fg_color)); -+ ADD_COMMAND_VALUE_TRI("done_bg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_done_bg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_done_bg_color)); -+ ADD_COMMAND_VALUE_TRI("active_fg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_active_fg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_active_fg_color)); -+ ADD_COMMAND_VALUE_TRI("active_bg_color", rak::make_mem_fun(control->ui(), &ui::Root::set_active_bg_color), rak::make_mem_fun(control->ui(), &ui::Root::get_active_bg_color)); - } -diff --git a/src/display/canvas.cc b/src/display/canvas.cc -index 4e621df..0c97eea 100644 ---- a/src/display/canvas.cc -+++ b/src/display/canvas.cc -@@ -92,6 +92,10 @@ Canvas::initialize() { - m_isInitialized = true; - - initscr(); -+ start_color(); -+ use_default_colors(); -+ init_pair(2, -1, -1); -+ init_pair(1, -1, -1); - raw(); - noecho(); - nodelay(stdscr, TRUE); -diff --git a/src/display/window_download_list.cc b/src/display/window_download_list.cc -index 71efec0..06e7cd4 100644 ---- a/src/display/window_download_list.cc -+++ b/src/display/window_download_list.cc -@@ -37,6 +37,7 @@ - #include "config.h" - - #include <rak/algorithm.h> -+#include <torrent/rate.h> - - #include "core/download.h" - #include "core/view.h" -@@ -96,12 +97,30 @@ WindowDownloadList::redraw() { - char* position; - char* last = buffer + m_canvas->width() - 2 + 1; - -+ if( pos >= m_canvas->height() ) break; - position = print_download_title(buffer, last, *range.first); -- m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); -+ m_canvas->print(0, pos, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); -+ if( (*range.first)->is_done() ) { -+ if( (*range.first)->download()->up_rate()->rate() != 0 ) { -+ m_canvas->set_attr(0, pos, m_canvas->width()-1, A_BOLD, 2); -+ } else { -+ m_canvas->set_attr(0, pos, m_canvas->width()-1, A_NORMAL, 2); -+ } -+ } else if( (*range.first)->download()->is_active() ) { -+ if( (*range.first)->download()->down_rate()->rate() != 0 ) { -+ m_canvas->set_attr(0, pos, m_canvas->width()-1, A_BOLD, 1); -+ } else { -+ m_canvas->set_attr(0, pos, m_canvas->width()-1, A_NORMAL, 1); -+ } -+ } -+ pos++; - -+ if( pos >= m_canvas->height() ) break; -+ - position = print_download_info(buffer, last, *range.first); - m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); - -+ if( pos >= m_canvas->height() ) break; - position = print_download_status(buffer, last, *range.first); - m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); - -@@ -109,4 +128,40 @@ WindowDownloadList::redraw() { - } - } - -+void -+WindowDownloadList::set_done_fg_color(int64_t color) { -+ short fg, bg; -+ pair_content(2, &fg, &bg); -+ if( color < 0 ) color = -1; -+ color = color % 8; -+ init_pair(2, (short)color, bg); -+} -+ -+void -+WindowDownloadList::set_done_bg_color(int64_t color) { -+ short fg, bg; -+ pair_content(2, &fg, &bg); -+ if( color < 0 ) color = -1; -+ color = color % 8; -+ init_pair(2, fg, (short)color); -+} -+ -+void -+WindowDownloadList::set_active_fg_color(int64_t color) { -+ short fg, bg; -+ pair_content(1, &fg, &bg); -+ if( color < 0 ) color = -1; -+ color = color % 8; -+ init_pair(1, (short)color, bg); -+} -+ -+void -+WindowDownloadList::set_active_bg_color(int64_t color) { -+ short fg, bg; -+ pair_content(1, &fg, &bg); -+ if( color < 0 ) color = -1; -+ color = color % 8; -+ init_pair(1, fg, (short)color); -+} -+ - } -diff --git a/src/display/window_download_list.h b/src/display/window_download_list.h -index 4ce5ea1..313e87b 100644 ---- a/src/display/window_download_list.h -+++ b/src/display/window_download_list.h -@@ -59,6 +59,10 @@ public: - virtual void redraw(); - - void set_view(core::View* l); -+ void set_done_fg_color(int64_t color); -+ void set_done_bg_color(int64_t color); -+ void set_active_fg_color(int64_t color); -+ void set_active_bg_color(int64_t color); - - private: - core::View* m_view; -diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc -index b7d6983..e72bff6 100644 ---- a/src/ui/download_list.cc -+++ b/src/ui/download_list.cc -@@ -137,6 +137,11 @@ DownloadList::unfocus_download(core::Download* d) { - current_view()->next_focus(); - } - -+display::WindowDownloadList* -+DownloadList::current_window_list() { -+ return dynamic_cast<ElementDownloadList*>(m_uiArray[DISPLAY_DOWNLOAD_LIST])->window(); -+} -+ - void - DownloadList::activate_display(Display displayType) { - if (!is_active()) -diff --git a/src/ui/download_list.h b/src/ui/download_list.h -index dda1b34..11137fa 100644 ---- a/src/ui/download_list.h -+++ b/src/ui/download_list.h -@@ -101,6 +101,7 @@ public: - void activate_display(Display d); - - core::View* current_view(); -+ display::WindowDownloadList* current_window_list(); - void set_current_view(const std::string& name); - - void slot_open_uri(SlotOpenUri s) { m_slotOpenUri = s; } -diff --git a/src/ui/element_download_list.h b/src/ui/element_download_list.h -index ed5de30..7c0fb9d 100644 ---- a/src/ui/element_download_list.h -+++ b/src/ui/element_download_list.h -@@ -60,6 +60,7 @@ public: - void disable(); - - core::View* view() { return m_view; } -+ WDownloadList* window() { return m_window; } - void set_view(core::View* l); - - void receive_command(const char* cmd); -diff --git a/src/ui/root.cc b/src/ui/root.cc -index b01f4ed..d344718 100644 ---- a/src/ui/root.cc -+++ b/src/ui/root.cc -@@ -44,6 +44,7 @@ - - #include "core/manager.h" - #include "display/frame.h" -+#include "display/window_download_list.h" - #include "display/window_http_queue.h" - #include "display/window_title.h" - #include "display/window_input.h" -@@ -65,7 +66,11 @@ Root::Root() : - m_windowTitle(NULL), - m_windowHttpQueue(NULL), - m_windowInput(NULL), -- m_windowStatusbar(NULL) { -+ m_windowStatusbar(NULL), -+ done_fg_color(-1), -+ done_bg_color(-1), -+ active_fg_color(-1), -+ active_bg_color(-1) { - } - - void -@@ -97,6 +102,10 @@ Root::init(Control* c) { - setup_keys(); - - m_downloadList->activate(rootFrame->frame(1)); -+ m_downloadList->current_window_list()->set_done_fg_color(done_fg_color); -+ m_downloadList->current_window_list()->set_done_bg_color(done_bg_color); -+ m_downloadList->current_window_list()->set_active_fg_color(active_fg_color); -+ m_downloadList->current_window_list()->set_active_bg_color(active_bg_color); - } - - void -@@ -219,6 +228,46 @@ Root::set_up_throttle(unsigned int throttle) { - torrent::set_max_unchoked(maxUnchoked); - } - -+int -+Root::get_done_fg_color() { -+ return done_fg_color; -+} -+ -+void -+Root::set_done_fg_color(int64_t color) { -+ done_fg_color = color; -+} -+ -+int -+Root::get_done_bg_color() { -+ return done_bg_color; -+} -+ -+void -+Root::set_done_bg_color(int64_t color) { -+ done_bg_color = color; -+} -+ -+int -+Root::get_active_fg_color() { -+ return active_fg_color; -+} -+ -+void -+Root::set_active_fg_color(int64_t color) { -+ active_fg_color = color; -+} -+ -+int -+Root::get_active_bg_color() { -+ return active_bg_color; -+} -+ -+void -+Root::set_active_bg_color(int64_t color) { -+ active_bg_color = color; -+} -+ - void - Root::adjust_down_throttle(int throttle) { - set_down_throttle(std::max<int>(torrent::down_throttle_global()->max_rate() / 1024 + throttle, 0)); -diff --git a/src/ui/root.h b/src/ui/root.h -index e9a7907..4eef1df 100644 ---- a/src/ui/root.h -+++ b/src/ui/root.h -@@ -83,6 +83,15 @@ public: - void set_down_throttle_i64(int64_t throttle) { set_down_throttle(throttle >> 10); } - void set_up_throttle_i64(int64_t throttle) { set_up_throttle(throttle >> 10); } - -+ int get_done_fg_color(); -+ void set_done_fg_color(int64_t color); -+ int get_done_bg_color(); -+ void set_done_bg_color(int64_t color); -+ int get_active_fg_color(); -+ void set_active_fg_color(int64_t color); -+ int get_active_bg_color(); -+ void set_active_bg_color(int64_t color); -+ - void adjust_down_throttle(int throttle); - void adjust_up_throttle(int throttle); - -@@ -105,6 +114,10 @@ private: - WStatusbar* m_windowStatusbar; - - input::Bindings m_bindings; -+ int64_t done_fg_color; -+ int64_t done_bg_color; -+ int64_t active_fg_color; -+ int64_t active_bg_color; - }; - - } diff --git a/rtorrent-extended/dht_pex_static_map.patch b/rtorrent-extended/dht_pex_static_map.patch deleted file mode 100644 index e302b4c..0000000 --- a/rtorrent-extended/dht_pex_static_map.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/core/view.cc b/src/core/view.cc -index 8e2d997..f3b4f0d 100644 ---- a/src/core/view.cc -+++ b/src/core/view.cc -@@ -90,6 +90,7 @@ struct view_downloads_filter : std::unary_function<Download*, bool> { - case torrent::Object::TYPE_STRING: return !result.as_string().empty(); - case torrent::Object::TYPE_LIST: return !result.as_list().empty(); - case torrent::Object::TYPE_MAP: return !result.as_map().empty(); -+ case torrent::Object::TYPE_SSTRING:return !result.as_sstring().empty(); - } - - // The default filter action is to return true, to not filter diff --git a/rtorrent-extended/ip_filter_no_boost_fast.patch b/rtorrent-extended/ip_filter_no_boost_fast.patch deleted file mode 100644 index d13fb69..0000000 --- a/rtorrent-extended/ip_filter_no_boost_fast.patch +++ /dev/null @@ -1,1083 +0,0 @@ -diff --git a/src/command_network.cc b/src/command_network.cc -index 34f75ab..2494988 100644 ---- a/src/command_network.cc -+++ b/src/command_network.cc -@@ -36,6 +36,11 @@ - - #include "config.h" - -+#include <string> -+#include <sstream> -+#include <list> -+#include <unistd.h> -+ - #include <functional> - #include <cstdio> - #include <rak/address_info.h> -@@ -62,6 +67,10 @@ - #include "control.h" - #include "command_helpers.h" - -+#include "utils/pattern.h" -+#include "core/ip_filter.h" -+ -+ - torrent::Object - apply_throttle(bool up, const torrent::Object& rawArgs) { - const torrent::Object::list_type& args = rawArgs.as_list(); -@@ -209,6 +218,59 @@ apply_encryption(const torrent::Object& rawArgs) { - } - - torrent::Object -+apply_ip_filter(const torrent::Object& rawArgs) { -+ const torrent::Object::list_type& args = rawArgs.as_list(); -+ -+ std::list<std::string> files; -+ -+ for (torrent::Object::list_const_iterator itr = args.begin(), last = args.end(); itr != last; itr++) { -+ std::string file( itr->as_string() ); -+ utils::trim( file ); -+ if( access(file.c_str(),F_OK | R_OK) ) -+ throw torrent::input_error("IpFilter file '" + file + "' does not exist or not readable. Filter could not be loaded"); -+ files.push_back( file ); -+ } -+ -+ std::stringstream logMsg; -+ if( files.empty() ) { -+ logMsg << "IpFilter is empty"; -+ control->core()->push_log( logMsg.str().c_str() ); -+ } -+ else { -+ core::IpFilter* f = new core::IpFilter(); -+ logMsg << "IpFilter is initialized with files: "; -+ int entries = 0; -+ clock_t time_start = clock(); -+ for( std::list<std::string>::iterator itr = files.begin(); itr != files.end(); itr++) { -+ std::cout << "Loading IP filters from '" << *itr << "'..."; -+ std::cout.flush(); -+ if( itr != files.begin() ) -+ logMsg << ", "; -+ logMsg << *itr; -+ int merges = f->add_from_file( *itr ); -+ if( merges < 0 ) { -+ std::cout << "error" << std::endl; -+ std::cout.flush(); -+ throw torrent::input_error("IpFilter could not load file '" + *itr + "'"); -+ } -+ std::cout << "done. Loaded " << (f->size()-entries) << " ranges. " << merges << " ranges were merged." << std::endl; -+ std::cout.flush(); -+ entries = f->size(); -+ } -+ control->core()->push_log( logMsg.str().c_str() ); -+ std::stringstream logMsg2("IpFilter loaded with "); -+ logMsg2 << f->size() << " ranges total. " << f->get_merges() << " ranges were merged."; -+ control->core()->push_log( logMsg2.str().c_str() ); -+ std::cout << logMsg2.str() << std::endl; -+ std::cout << "IP_Filters loaded in " << (double)(clock()-time_start)/CLOCKS_PER_SEC << " seconds" << std::endl; -+ std::cout.flush(); -+ control->core()->set_ip_filter( f ); -+ } -+ -+ return torrent::Object(); -+} -+ -+torrent::Object - apply_tos(const torrent::Object& rawArg) { - rpc::Command::value_type value; - torrent::ConnectionManager* cm = torrent::connection_manager(); -@@ -492,6 +554,9 @@ initialize_command_network() { - - ADD_VARIABLE_BOOL("peer_exchange", true); - -+ ADD_COMMAND_VOID("reload_ip_filter", rak::make_mem_fun(control->core(), &core::Manager::reload_ip_filter)); -+ ADD_COMMAND_LIST("ip_filter", rak::ptr_fn(&apply_ip_filter)); -+ - // Not really network stuff: - ADD_VARIABLE_BOOL ("handshake_log", false); - ADD_VARIABLE_STRING("log.tracker", ""); -diff --git a/src/core/Makefile.am b/src/core/Makefile.am -index fe07cbf..fb26380 100644 ---- a/src/core/Makefile.am -+++ b/src/core/Makefile.am -@@ -36,6 +36,15 @@ libsub_core_a_SOURCES = \ - view.cc \ - view.h \ - view_manager.cc \ -- view_manager.h -+ view_manager.h \ -+ ip_address.cc \ -+ ip_address.h \ -+ ip_filter.cc \ -+ ip_filter.h \ -+ ip_range.cc \ -+ ip_range.h \ -+ printable.h \ -+ regex_namespace.h \ -+ ip_filter_statics.cc - - INCLUDES = -I$(srcdir) -I$(srcdir)/.. -I$(top_srcdir) -diff --git a/src/core/Makefile.in b/src/core/Makefile.in -index 24b7eb4..32b0f6b 100644 ---- a/src/core/Makefile.in -+++ b/src/core/Makefile.in -@@ -63,7 +63,11 @@ am_libsub_core_a_OBJECTS = curl_get.$(OBJEXT) curl_socket.$(OBJEXT) \ - manager.$(OBJEXT) poll_manager.$(OBJEXT) \ - poll_manager_epoll.$(OBJEXT) poll_manager_kqueue.$(OBJEXT) \ - poll_manager_select.$(OBJEXT) view.$(OBJEXT) \ -- view_manager.$(OBJEXT) -+ view_manager.$(OBJEXT) \ -+ ip_address.$(OBJEXT) \ -+ ip_filter.$(OBJEXT) \ -+ ip_range.$(OBJEXT) \ -+ ip_filter_statics.$(OBJEXT) - libsub_core_a_OBJECTS = $(am_libsub_core_a_OBJECTS) - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp -@@ -252,7 +256,16 @@ libsub_core_a_SOURCES = \ - view.cc \ - view.h \ - view_manager.cc \ -- view_manager.h -+ view_manager.h \ -+ ip_address.cc \ -+ ip_address.h \ -+ ip_filter.cc \ -+ ip_filter.h \ -+ ip_range.cc \ -+ ip_range.h \ -+ printable.h \ -+ regex_namespace.h \ -+ ip_filter_statics.cc - - INCLUDES = -I$(srcdir) -I$(srcdir)/.. -I$(top_srcdir) - all: all-am -@@ -320,6 +333,9 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll_manager_select.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view_manager.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_address.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_range.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_filter_statics.Po@am__quote@ - - .cc.o: - @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -diff --git a/src/core/ip_address.cc b/src/core/ip_address.cc -new file mode 100644 -index 0000000..a9a9251 ---- /dev/null -+++ b/src/core/ip_address.cc -@@ -0,0 +1,25 @@ -+#include <cstdlib> -+#include <string> -+#include <arpa/inet.h> -+ -+#include "ip_address.h" -+#include "utils/pattern.h" -+ -+namespace core { -+ -+std::pair<bool,uint32_t> IpAddress::to_int( const std::string& address ) { -+ uint32_t a; -+ int r = inet_pton( AF_INET, address.c_str(), &a); -+ if( r ) -+ a = ntohl( a ); -+ return std::pair<bool,uint32_t>( (r!=0), a ); -+} -+ -+std::string IpAddress::to_string() const { -+ char buf[128] = ""; -+ uint32_t a = htonl( m_address ); -+ inet_ntop( AF_INET, &a, buf, sizeof(buf) ); -+ return std::string( buf ); -+} -+ -+} -diff --git a/src/core/ip_address.h b/src/core/ip_address.h -new file mode 100644 -index 0000000..a9ad142 ---- /dev/null -+++ b/src/core/ip_address.h -@@ -0,0 +1,65 @@ -+#ifndef IPADDRESS_H -+#define IPADDRESS_H -+ -+#include <inttypes.h> -+#include <string> -+ -+#include "printable.h" -+#include "utils/pattern.h" -+#include "regex_namespace.h" -+ -+namespace core { -+ -+class IpAddress : public Printable { -+ friend class IpRange; -+ -+ private: // constants -+ static const std::string PATTERN_IP_EXPRESSION; -+ static const std::string PATTERN_IP_BYTES_EXPRESSION; -+ static const regex::Pattern PATTERN_IP_BYTES; -+ -+ static const int GRP_IP_FIRST_BYTE; -+ static const int GRP_IP_BYTES_COUNT; -+ -+ private: // fields -+ uint32_t m_address; -+ -+ private: // static methods -+ -+ private: // dynamic methods -+ IpAddress() : m_address(0) {} -+ -+ void copy( const IpAddress& addr ) { m_address = addr.m_address;} -+ -+ public: // static methods -+ static std::pair<bool,uint32_t> to_int( const std::string& strAddress ); -+ static IpAddress* parse( const std::string& strAddress ) { -+ std::pair<bool,uint32_t> result = to_int( strAddress ); -+ return ( !result.first ) ? NULL : new IpAddress( result.second ); -+ } -+ -+ public: // dynamic methods -+ IpAddress( uint32_t address ) : m_address(address) {} -+ IpAddress( const IpAddress& addr ) { copy( addr ); } -+ IpAddress& operator= ( const IpAddress& addr ) { copy( addr ); return *this; } -+ -+ operator uint32_t() const { return m_address; } -+ -+ bool operator>= ( const IpAddress& ip ) const { return (m_address >= ip.m_address); } -+ bool operator<= ( const IpAddress& ip ) const { return (m_address <= ip.m_address); } -+ bool operator< ( const IpAddress& ip ) const { return (m_address < ip.m_address); } -+ bool operator> ( const IpAddress& ip ) const { return (m_address > ip.m_address); } -+ bool operator== ( const IpAddress& ip ) const { return (m_address == ip.m_address); } -+ bool operator!= ( const IpAddress& ip ) const { return (m_address != ip.m_address); } -+ -+ bool operator>= ( uint32_t ip ) const { return (m_address >= ip); } -+ bool operator<= ( uint32_t ip ) const { return (m_address <= ip); } -+ bool operator< ( uint32_t ip ) const { return (m_address < ip); } -+ bool operator> ( uint32_t ip ) const { return (m_address > ip); } -+ bool operator== ( uint32_t ip ) const { return (m_address == ip); } -+ bool operator!= ( uint32_t ip ) const { return (m_address != ip); } -+ -+ std::string to_string() const; -+ }; -+} -+#endif -diff --git a/src/core/ip_filter.cc b/src/core/ip_filter.cc -new file mode 100644 -index 0000000..8f46a42 ---- /dev/null -+++ b/src/core/ip_filter.cc -@@ -0,0 +1,165 @@ -+#include <sstream> -+#include <string> -+#include <map> -+#include <list> -+#include <fstream> -+#include <stdio.h> -+#include <stdlib.h> -+ -+#include "ip_filter.h" -+ -+namespace core { -+ -+int IpFilter::merge_and_insert( range_map* rs, IpRange* r ) { -+ if( !r || !r->get_from() ) -+ return 0; -+ -+ std::pair<const IpAddress,IpRange::ptr> p( *r->get_from(), IpRange::ptr(r) ); -+ std::pair<range_itr,bool> duo = rs->insert( p ); -+ -+ range_itr idx = duo.first; -+ bool wasInserted = duo.second; -+ IpRange* curr = NULL; -+ int mergeCount = 0; -+ -+ if( !wasInserted ) { // exactly the same start address already exists -+ curr = idx->second; -+ if( *curr->get_to() < *r->get_to() ) -+ curr->set_to( r->get_to() ); -+ delete r; -+ r = curr; -+ mergeCount++; -+ } -+ else { -+ if( idx != rs->begin() ) { -+ --idx; -+ curr = idx->second; // previous -+ if( *r->get_from() <= *curr->get_to() ) -+ r = curr; -+ else -+ ++idx; -+ } -+ } -+ -+ if( idx != rs->end() ) -+ ++idx; -+ -+ while( idx != rs->end() ) { -+ curr = idx->second; -+ if( *r->get_to() < *curr->get_from() ) -+ break; -+ -+ std::string d = r->get_description(); -+ d += " / " + curr->get_description(); -+ r->set_description( d ); -+ if( *r->get_to() < *curr->get_to() ) -+ r->set_to( curr->get_to() ); -+ rs->erase( idx++ ); -+ delete curr; -+ mergeCount++; -+ } -+ return mergeCount; -+} -+ -+int IpFilter::add_from_file( const std::string& fileName, range_map* rs, str_list* files ) { -+ FILE *f = fopen(fileName.c_str(),"r"); -+ int mergeCount = 0; -+ if (f==0) return -1; -+ char *line = (char *)malloc(64); -+ size_t sz=64; -+ int charsread = 0; -+ int linesread=0; -+ while( (charsread=getline(&line,&sz,f)) >=0 ) { -+ if( (line[0] == '#' ) || ( charsread <= 1 ) ) -+ continue; -+ -+ IpRange* ir = IpRange::parse( line, charsread ); -+ if( !ir || !ir->get_from() || !ir->get_to() ) -+ continue; -+ -+ mergeCount += merge_and_insert( rs, ir ); -+ } -+ free(line); -+ files->push_back( std::string(fileName) ); -+ fclose(f); -+ m_merges += mergeCount; -+ return mergeCount; -+} -+ -+int IpFilter::add_from_file( const std::string& fileName ) { -+ if( !m_ranges ) -+ m_ranges = new range_map(); -+ if( !m_loadedFiles ) -+ m_loadedFiles = new std::list<std::string>(); -+ -+ return add_from_file( fileName, m_ranges, m_loadedFiles ); -+} -+ -+int IpFilter::reload() { -+ if( !m_loadedFiles || m_loadedFiles->empty() ) -+ return 0; -+ -+ range_map* rs = new range_map(); -+ str_list* files = new str_list(); -+ int mergeCount = 0; -+ for( str_list::const_iterator it = m_loadedFiles->begin(), end = m_loadedFiles->end(); it != end; it++ ) -+ mergeCount += add_from_file( *it, rs, files ); -+ -+ range_map* rsOld = m_ranges; -+ m_ranges = rs; -+ if( rsOld ) { -+ clear( rsOld ); -+ delete rsOld; -+ } -+ -+ str_list* filesOld = m_loadedFiles; -+ m_loadedFiles = files; -+ if( filesOld ) { -+ clear( filesOld ); -+ delete filesOld; -+ } -+ -+ m_merges = mergeCount; -+ return mergeCount; -+} -+ -+IpRange* IpFilter::find_range( uint32_t ip ) const { -+ if( (ip >= 0) && m_ranges && !m_ranges->empty() ) { -+ range_itr idx = m_ranges->upper_bound( ip ); -+ if( idx != m_ranges->begin() ) -+ --idx; -+ IpRange* curr = idx->second; -+ if( curr->includes( ip ) ) -+ return curr; -+ } -+ return NULL; -+} -+ -+std::string IpFilter::to_string() const { -+ std::stringstream result; -+ if( !m_ranges ) -+ result << "NULL" << std::endl; -+ else { -+ for( range_map::const_iterator it = m_ranges->begin() ; it != m_ranges->end(); it++ ) { -+ const IpAddress a = it->first; -+ IpRange* ir = it->second; -+ result << a << ": " << *ir << std::endl; -+ } -+ } -+ return result.str(); -+} -+ -+void IpFilter::clear( range_map* map ) { -+ if( map ) { -+ for( range_itr i = map->begin(), j = map->end(); i != j; i++ ) -+ delete i->second; -+ map->clear(); -+ } -+} -+ -+void IpFilter::clear( str_list* list ) { -+ if( list ) -+ list->clear(); -+} -+ -+} -diff --git a/src/core/ip_filter.h b/src/core/ip_filter.h -new file mode 100644 -index 0000000..07f2004 ---- /dev/null -+++ b/src/core/ip_filter.h -@@ -0,0 +1,85 @@ -+#ifndef IPFILTER_H -+#define IPFILTER_H -+ -+#include <string> -+#include <map> -+#include <list> -+ -+#include "printable.h" -+#include "ip_address.h" -+#include "ip_range.h" -+ -+namespace core { -+ -+typedef std::map<const IpAddress,IpRange::ptr> range_map; -+typedef range_map::iterator range_itr; -+typedef std::list<std::string> str_list; -+ -+class IpFilter : public Printable { -+ private: // fields -+ int m_merges; -+ range_map* m_ranges; -+ str_list* m_loadedFiles; -+ -+ private: // static methods -+ static void clear( range_map* map ); -+ static void clear( str_list* list ); -+ -+ private: // dynamic methods -+ void init_members(void) { // to avoid long constructor lines for every ctor -+ m_ranges = NULL; -+ m_loadedFiles = NULL; -+ m_merges = 0; -+ } -+ int merge_and_insert( range_map* rs, IpRange* r ); -+ int add_from_file( const std::string& fileName, range_map* rs, str_list* files ); -+ -+ public: // static methods -+ -+ public: // dynamic methods -+ IpFilter() { init_members(); } -+ ~IpFilter() { -+ clear(); -+ if( m_ranges ) delete m_ranges; -+ if( m_loadedFiles ) delete m_loadedFiles; -+ m_ranges = NULL; -+ m_loadedFiles = NULL; -+ } -+ IpFilter( std::string* files, int size ) { -+ init_members(); -+ for( int i = 0; i < size; i++, files++ ) -+ add_from_file( *files ); -+ } -+ IpFilter( str_list& files ) { -+ init_members(); -+ for( str_list::const_iterator i = files.begin(), last = files.end(); i != last; i++ ) -+ add_from_file( *i ); -+ } -+ IpFilter( IpFilter& f ) { -+ init_members(); -+ m_ranges = new range_map( *f.m_ranges ); -+ m_loadedFiles = new str_list( *f.m_loadedFiles ); -+ } -+ -+ int reload(); -+ int add_from_file( const std::string& fileName ); -+ int add_from_file( char* fileName ) { std::string s( fileName ); return add_from_file(s); } -+ void clear() { clear( m_ranges ); clear( m_loadedFiles ); } -+ -+ IpRange* find_range( uint32_t ip ) const; -+ -+ bool is_filtered( uint32_t ip ) const { return (find_range( ip ) != NULL); } -+ bool is_filtered( std::string ip ) const { -+ static std::pair<bool,uint32_t> ipInt = IpAddress::to_int( ip ); -+ return (!ipInt.first ? false : is_filtered( ipInt.second )); -+ } -+ -+ std::string to_string() const; -+ -+ int size(void) { return ( m_ranges ? m_ranges->size() : 0 ); } -+ int get_merges(void) { return m_merges; } -+ void set_files( str_list& files) { m_loadedFiles = new str_list( files ); } -+}; -+ -+} -+#endif -diff --git a/src/core/ip_filter_statics.cc b/src/core/ip_filter_statics.cc -new file mode 100644 -index 0000000..042377d ---- /dev/null -+++ b/src/core/ip_filter_statics.cc -@@ -0,0 +1,21 @@ -+#include "ip_address.h" -+#include "ip_range.h" -+#include "utils/pattern.h" -+ -+namespace core { -+ -+const std::string IpAddress::PATTERN_IP_EXPRESSION = "(([0-9]{1,3}\\.){3}[0-9]{1,3})"; -+const std::string IpAddress::PATTERN_IP_BYTES_EXPRESSION = "([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})"; -+const regex::Pattern IpAddress::PATTERN_IP_BYTES = PATTERN_IP_BYTES_EXPRESSION; -+ -+const int IpAddress::GRP_IP_FIRST_BYTE = 1; -+const int IpAddress::GRP_IP_BYTES_COUNT = 4; -+ -+const std::string IpRange::PATTERN_RANGE_EXPRESSION = "[[:space:]]*(.*)[[:space:]]*:[[:space:]]*" + IpAddress::PATTERN_IP_EXPRESSION + "[[:space:]]*-[[:space:]]*" + IpAddress::PATTERN_IP_EXPRESSION + "[[:space:]]*"; -+const regex::Pattern IpRange::PATTERN_RANGE = PATTERN_RANGE_EXPRESSION; -+ -+const int IpRange::GRP_DESCRIPTION = 1; -+const int IpRange::GRP_FIRST_IP = 2; -+const int IpRange::GRP_SECOND_IP = 4; -+ -+} -diff --git a/src/core/ip_range.cc b/src/core/ip_range.cc -new file mode 100644 -index 0000000..3923e53 ---- /dev/null -+++ b/src/core/ip_range.cc -@@ -0,0 +1,112 @@ -+#include <sstream> -+#include <string> -+ -+#include "ip_range.h" -+#include "utils/pattern.h" -+#include "regex_namespace.h" -+ -+namespace core { -+ -+IpRange* IpRange::parse( const std::string& s ) { -+ regex::Match m = PATTERN_RANGE.match( s ); -+ -+ if( !m.matches() ) { -+ std::cout << "!! range format is invalid: '" << s << "'" << std::endl; -+ return NULL; -+ } -+ -+ std::string description = m.group( GRP_DESCRIPTION ); -+ std::string ip1 = m.group( GRP_FIRST_IP ); -+ std::string ip2 = m.group( GRP_SECOND_IP ); -+ IpAddress* from = IpAddress::parse( ip1 ); -+ IpAddress* to = IpAddress::parse( ip2 ); -+ -+ if( !from ) { -+ std::cout << "!! from is invalid: description='" << description << ", ip1=" << ip1 << ", ip2=" << ip2 << std::endl; -+ return NULL; -+ } -+ if( !to ) { -+ std::cout << "!! to is invalid: description='" << description << ", ip1=" << ip1 << ", ip2=" << ip2 << std::endl; -+ return NULL; -+ } -+ -+// if( !from || !to || (*to < *from) ) -+// return NULL; -+ -+ IpRange* r = new IpRange(); -+ -+ r->m_description = description; -+ r->m_from = from; -+ r->m_to = to; -+ -+ if( to && from && (*to < *from) ) { -+ std::cout << "!! to < from: " << r->to_string() << std::endl; -+ delete r; -+ return NULL; -+ } -+ -+ return r; -+} -+ -+//fast version -+IpRange* IpRange::parse( const char *s, const int size ){ -+ static char description[256]; -+ static char ip1[24], ip2[24]; -+ int pos=0, post=0, enddesc=size-1; -+ while (enddesc>0 && s[enddesc]!=':') enddesc--; //find last ':' in the line -+ while((pos<enddesc) && (unsigned char)s[pos]<=' ') pos++; // strip from start -+ while ((pos<enddesc)){ -+ if (post<255) description[post++]=s[pos]; -+ pos++; -+ } -+ description[post]=0; -+ if (s[pos]==':') pos++; -+ post=0; -+ while ((pos<size) && s[pos]!='-'){ -+ if (post<23) ip1[post++]=s[pos]; -+ pos++; -+ } -+ ip1[post]=0; -+ if (s[pos]=='-'){ -+ pos++; -+ post=0; -+ while ((pos<size) && s[pos]>' '){ -+ if (post<23) ip2[post++]=s[pos]; -+ pos++; -+ } -+ ip2[post]=0; -+ } else ip2[0]=0; -+ -+ IpAddress* from = IpAddress::parse(ip1); -+ IpAddress* to = IpAddress::parse(ip2); -+ -+ if( !from ) { -+ std::cout << "!! from is invalid: description='" << description << ", ip1=" << ip1 << ", ip2=" << ip2 << std::endl; -+ return NULL; -+ } -+ if( !to ) { -+ std::cout << "!! to is invalid: description='" << description << ", ip1=" << ip1 << ", ip2=" << ip2 << std::endl; -+ return NULL; -+ } -+ -+ IpRange* r = new IpRange(); -+ r->m_description = description; -+ r->m_from = from; -+ r->m_to = to; -+ -+ if( (*to < *from) ) { -+ std::cout << "!! to < from: " << r->to_string() << std::endl; -+ delete r; -+ return NULL; -+ } -+ -+ return r; -+} -+ -+std::string IpRange::to_string() const { -+ std::stringstream result; -+ result << m_description << ": [" << m_from->to_string() << " - " << m_to->to_string() << ']'; -+ return result.str(); -+} -+ -+} -diff --git a/src/core/ip_range.h b/src/core/ip_range.h -new file mode 100644 -index 0000000..1fb2322 ---- /dev/null -+++ b/src/core/ip_range.h -@@ -0,0 +1,67 @@ -+#ifndef IPRANGE_H -+#define IPRANGE_H -+ -+#include <string> -+ -+#include "printable.h" -+#include "ip_address.h" -+#include "utils/pattern.h" -+#include "regex_namespace.h" -+ -+namespace core { -+ -+class IpRange : public Printable { -+ public: // constants -+ static const std::string PATTERN_RANGE_EXPRESSION; -+ static const regex::Pattern PATTERN_RANGE; -+ -+ static const int GRP_DESCRIPTION; -+ static const int GRP_FIRST_IP; -+ static const int GRP_SECOND_IP; -+ -+ private: // fields -+ std::string m_description; -+ const IpAddress* m_from; -+ const IpAddress* m_to; -+ -+ private: // dynamic methods -+ IpRange() : m_description(), m_from(NULL), m_to(NULL) {} -+ -+ public: // static methods -+ typedef IpRange* ptr; -+ static IpRange* parse( const std::string& s ); -+ static IpRange* parse( const char *s, const int size ); -+ -+ public: // dynamic methods -+ IpRange( IpRange& rng ) { copy(rng); } -+ IpRange& operator= ( IpRange& rng ) { copy(rng); return *this; } -+ -+ void copy( IpRange& rng ) { -+ m_description = rng.m_description; -+ m_from = (!rng.m_from) ? NULL : new IpAddress( *rng.m_from ); -+ m_to = (!rng.m_to) ? NULL : new IpAddress( *rng.m_to ); -+ } -+ -+ const std::string& get_description ( void ) const { return m_description; } -+ const IpAddress* get_from ( void ) const { return m_from; } -+ const IpAddress* get_to ( void ) const { return m_to; } -+ -+ void set_description ( const std::string& description ) { m_description = description; } -+ void set_from ( const IpAddress* from ) { if( m_from ) delete m_from; m_from = new IpAddress( *from ); } -+ void set_to ( const IpAddress* to ) { if( m_to ) delete m_to; m_to = new IpAddress( *to ); } -+ -+ bool includes( const IpAddress& ip ) const { return includes((uint32_t)ip); } -+ bool includes( uint32_t ip ) const { return (*m_from <= ip) && (*m_to >= ip); } -+ -+ ~IpRange() { -+ delete m_from; -+ m_from = NULL; -+ delete m_to; -+ m_to = NULL; -+ } -+ -+ std::string to_string() const; -+}; -+ -+} -+#endif -diff --git a/src/core/manager.cc b/src/core/manager.cc -index 2a422c8..9c1d004 100644 ---- a/src/core/manager.cc -+++ b/src/core/manager.cc -@@ -153,6 +153,24 @@ Manager::handshake_log(const sockaddr* sa, int msg, int err, const torrent::Hash - } - } - -+uint32_t -+Manager::filter_ip(const sockaddr* sa) { -+ IpRange* r = NULL; -+ // if something's wrong with filter or address it's gonna be allowed -+ if( m_ipFilter && sa ) { -+ const rak::socket_address* socketAddress = rak::socket_address::cast_from(sa); -+ if( socketAddress->is_valid() && (socketAddress->family() == rak::socket_address::af_inet) ) -+ r = m_ipFilter->find_range( socketAddress->sa_inet()->address_h() ); -+ if( r ) -+ m_logComplete.push_front("Address '" + socketAddress->address_str() + "' is rejected by IP filter range '" + r->to_string()); -+ else -+ if( rpc::call_command_value("get_handshake_log") ) -+ m_logComplete.push_front("IP Filter allowed connection with '" + socketAddress->address_str() + "'"); -+ } -+ return (r==NULL); -+} -+ -+ - void - Manager::push_log(const char* msg) { - m_logImportant.push_front(msg); -@@ -160,7 +178,8 @@ Manager::push_log(const char* msg) { - } - - Manager::Manager() : -- m_hashingView(NULL) -+ m_hashingView(NULL), -+ m_ipFilter(NULL) - // m_pollManager(NULL) { - { - m_downloadStore = new DownloadStore(); -@@ -181,6 +200,8 @@ Manager::~Manager() { - delete m_downloadStore; - delete m_httpQueue; - delete m_fileStatusCache; -+ -+ set_ip_filter( NULL ); - } - - void -@@ -226,6 +247,7 @@ Manager::initialize_second() { - CurlStack::global_init(); - - torrent::connection_manager()->set_signal_handshake_log(sigc::mem_fun(this, &Manager::handshake_log)); -+ torrent::connection_manager()->set_filter(sigc::mem_fun(this, &Manager::filter_ip)); - } - - void -@@ -585,4 +607,13 @@ Manager::receive_hashing_changed() { - } - } - -+void Manager::reload_ip_filter(void) { -+ if( m_ipFilter ) { -+ push_log("Reloading IP filter"); -+ m_ipFilter->reload(); -+ std::stringstream logMsg("IpFilter reloaded with "); -+ logMsg << m_ipFilter->size() << " ranges total. " << m_ipFilter->get_merges() << " ranges were merged."; -+ push_log( logMsg.str().c_str() ); -+} -+} - } -diff --git a/src/core/manager.h b/src/core/manager.h -index 16902af..ac01981 100644 ---- a/src/core/manager.h -+++ b/src/core/manager.h -@@ -47,6 +47,8 @@ - #include "range_map.h" - #include "log.h" - -+#include "ip_filter.h" -+ - namespace torrent { - class Bencode; - } -@@ -118,6 +120,15 @@ public: - - void handshake_log(const sockaddr* sa, int msg, int err, const torrent::HashString* hash); - -+ uint32_t filter_ip(const sockaddr* sa); -+ -+ void set_ip_filter( IpFilter* ipFilter ) { -+ IpFilter* old = m_ipFilter; -+ m_ipFilter = ipFilter; -+ if( old ) delete old; -+ } -+ void reload_ip_filter(void); -+ - static const int create_start = 0x1; - static const int create_tied = 0x2; - static const int create_quiet = 0x4; -@@ -154,6 +165,8 @@ private: - - Log m_logImportant; - Log m_logComplete; -+ -+ IpFilter* m_ipFilter; - }; - - // Meh, cleanup. -diff --git a/src/core/printable.h b/src/core/printable.h -new file mode 100644 -index 0000000..8520af4 ---- /dev/null -+++ b/src/core/printable.h -@@ -0,0 +1,16 @@ -+#ifndef PRINTABLE_H -+#define PRINTABLE_H -+ -+#include <iostream> -+ -+class Printable { -+ public: -+ virtual std::string to_string() const = 0; -+}; -+ -+template<typename _CharT,class _Traits> inline std::basic_ostream<_CharT,_Traits>& -+ operator<<( std::basic_ostream<_CharT,_Traits>& out, const Printable& val) { -+ return out << val.to_string(); -+} -+ -+#endif -diff --git a/src/core/regex_namespace.h b/src/core/regex_namespace.h -new file mode 100644 -index 0000000..6e10b3c ---- /dev/null -+++ b/src/core/regex_namespace.h -@@ -0,0 +1,6 @@ -+#ifndef REGEXNAMESPACE_H -+#define REGEXNAMESPACE_H -+ -+namespace regex = utils; -+ -+#endif -diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am -index 55ea9ff..cdad48a 100644 ---- a/src/utils/Makefile.am -+++ b/src/utils/Makefile.am -@@ -9,6 +9,8 @@ libsub_utils_a_SOURCES = \ - lockfile.cc \ - lockfile.h \ - socket_fd.cc \ -- socket_fd.h -+ socket_fd.h \ -+ pattern.cc \ -+ pattern.h - - INCLUDES = -I$(srcdir) -I$(srcdir)/.. -I$(top_srcdir) -diff --git a/src/utils/Makefile.in b/src/utils/Makefile.in -index a684a9c..5424965 100644 ---- a/src/utils/Makefile.in -+++ b/src/utils/Makefile.in -@@ -58,7 +58,7 @@ libsub_utils_a_AR = $(AR) $(ARFLAGS) - libsub_utils_a_LIBADD = - am_libsub_utils_a_OBJECTS = directory.$(OBJEXT) \ - file_status_cache.$(OBJEXT) lockfile.$(OBJEXT) \ -- socket_fd.$(OBJEXT) -+ socket_fd.$(OBJEXT) pattern.$(OBJEXT) - libsub_utils_a_OBJECTS = $(am_libsub_utils_a_OBJECTS) - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp -@@ -220,7 +220,9 @@ libsub_utils_a_SOURCES = \ - lockfile.cc \ - lockfile.h \ - socket_fd.cc \ -- socket_fd.h -+ socket_fd.h \ -+ pattern.cc \ -+ pattern.h - - INCLUDES = -I$(srcdir) -I$(srcdir)/.. -I$(top_srcdir) - all: all-am -@@ -275,6 +277,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_status_cache.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lockfile.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket_fd.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pattern.@am__quote@ - - .cc.o: - @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -diff --git a/src/utils/pattern.cc b/src/utils/pattern.cc -new file mode 100644 -index 0000000..c44bb38 ---- /dev/null -+++ b/src/utils/pattern.cc -@@ -0,0 +1,79 @@ -+#include <string> -+#include <sys/types.h> -+#include <ctype.h> -+#include <regex.h> -+ -+#include "pattern.h" -+ -+namespace utils { -+ -+int Pattern::countGroups( const std::string& str ) { -+ int count1 = 0; -+ int count2 = 0; -+ -+ for( size_t index = -1; (index = str.find( '(', index+1 )) != std::string::npos; ) -+ count1++; -+ for( size_t index = -1; (index = str.find( ')', index+1 )) != std::string::npos; ) -+ count2++; -+ -+ return (count1 < count2) ? count1 : count2; -+} -+ -+Pattern::Pattern( const std::string& pattern, Flags flags ) : lastResult(-1), -+ preg(NULL) { -+ int regFlags = REG_EXTENDED | REG_ICASE | REG_NEWLINE; -+ if( !(flags & CASE_SENSITIVE) ) -+ regFlags ^= REG_ICASE; -+ if( (flags & DOT_MATCH_NEWLINE) ) -+ regFlags ^= REG_NEWLINE; -+ -+ preg = new regex_t; -+ numGroups = countGroups( pattern ) + 1; -+ -+ lastResult = regcomp( preg, pattern.c_str(), regFlags ); -+} -+ -+Pattern::~Pattern() { -+ regfree( preg ); -+ delete( preg ); -+} -+ -+std::string Pattern::getLastError() const { -+ char errBuf[1024]; -+ regerror( lastResult, preg, errBuf, sizeof(errBuf) ); -+ return std::string(errBuf); -+} -+ -+Match Pattern::match( const std::string& expression ) const { -+ -+ regmatch_t* pmatch = new regmatch_t[numGroups]; -+ int res = regexec( preg, expression.c_str(), numGroups, pmatch, 0 ); -+ return Match( expression, numGroups, pmatch, res, getLastError() ); -+} -+ -+Match::Match( const std::string& expr, int ngroups, regmatch_t* groups, int result, const std::string& message ) : -+ expression( expr ), -+ nmatch( ngroups ), -+ pmatch( groups ), -+ matchResult( result ), -+ matchMessage( message ) { -+} -+ -+std::string Match::group( int i ) { -+ if( (i >= nmatch) || (pmatch[i].rm_so < 0) ) -+ return ""; -+ -+ return expression.substr( pmatch[i].rm_so, pmatch[i].rm_eo - pmatch[i].rm_so ); -+} -+ -+std::string& trim( std::string& str ) { -+ std::string::iterator it; -+ for( it = str.begin(); (it < str.end()) && ( isspace(*it) || (*it == 0) ) ; it++ ); -+ str.erase( str.begin(), it ); -+ for( it = str.end()-1; (it >= str.begin()) && ( isspace(*it) || (*it == 0) ) ; it-- ); -+ str.erase( ++it, str.end() ); -+ return str; -+} -+ -+} -+ -diff --git a/src/utils/pattern.h b/src/utils/pattern.h -new file mode 100644 -index 0000000..99e95a4 ---- /dev/null -+++ b/src/utils/pattern.h -@@ -0,0 +1,59 @@ -+#ifndef PATTERN_H -+#define PATTERN_H -+ -+#include <string> -+#include <sys/types.h> -+#include <ctype.h> -+#include <regex.h> -+ -+namespace utils { -+ -+class Match { -+ public: -+ Match( const std::string& expr, int ngroups, regmatch_t* pmatch, int matchResult, const std::string& matchMessage ); -+ ~Match() { delete[] pmatch; } -+ std::string group( int i ); -+ bool found() { return (matchResult == 0); } -+ bool matches() { return found(); } -+ std::string& getMatchMessage() { return matchMessage; } -+ -+ private: -+ std::string expression; -+ int nmatch; -+ regmatch_t* pmatch; -+ int matchResult; -+ std::string matchMessage; -+}; -+ -+class Pattern { -+ public: -+ enum Flags { -+ DEFAULT = 0, // REG_EXTENDED | REG_ICASE | REG_NEWLINE -+ CASE_SENSITIVE, -+ DOT_MATCH_NEWLINE -+ }; -+ -+ public: -+ Pattern( const std::string& pattern, Flags f = Pattern::DEFAULT ); -+ ~Pattern(); -+ bool isSuccess() { return (lastResult == 0); } -+ std::string getLastError() const; -+ Match match( const std::string& expression ) const; -+ -+ private: -+ int countGroups( const std::string& str ); -+ -+ private: -+ regex_t* preg; -+ int lastResult; -+ int numGroups; -+}; -+ -+ -+std::string& trim( std::string& str ); -+ -+} -+ -+// end of ifdef PATTERN_H -+#endif -+ diff --git a/rtorrent-extended/ipv6.patch b/rtorrent-extended/ipv6.patch deleted file mode 100644 index de72d94..0000000 --- a/rtorrent-extended/ipv6.patch +++ /dev/null @@ -1,572 +0,0 @@ -diff --git a/rak/socket_address.h b/rak/socket_address.h -index 25fdb37..d38533e 100644 ---- a/rak/socket_address.h -+++ b/rak/socket_address.h -@@ -145,7 +145,7 @@ private: - }; - }; - --// Remeber to set the AF_INET. -+// Remember to set the AF_INET. - - class socket_address_inet { - public: -@@ -184,6 +184,10 @@ public: - - const sockaddr* c_sockaddr() const { return reinterpret_cast<const sockaddr*>(&m_sockaddr); } - const sockaddr_in* c_sockaddr_inet() const { return &m_sockaddr; } -+ -+#ifdef RAK_USE_INET6 -+ socket_address_inet6 to_mapped_address() const; -+#endif - - bool operator == (const socket_address_inet& rhs) const; - bool operator < (const socket_address_inet& rhs) const; -@@ -192,6 +196,52 @@ private: - struct sockaddr_in m_sockaddr; - }; - -+#ifdef RAK_USE_INET6 -+// Remember to set the AF_INET6. -+ -+class socket_address_inet6 { -+public: -+ bool is_any() const { return is_port_any() && is_address_any(); } -+ bool is_valid() const { return !is_port_any() && !is_address_any(); } -+ bool is_port_any() const { return port() == 0; } -+ bool is_address_any() const { return std::memcmp(&m_sockaddr.sin6_addr, &in6addr_any, sizeof(in6_addr)) == 0; } -+ -+ void clear() { std::memset(this, 0, sizeof(socket_address_inet6)); set_family(); } -+ -+ uint16_t port() const { return ntohs(m_sockaddr.sin6_port); } -+ uint16_t port_n() const { return m_sockaddr.sin6_port; } -+ void set_port(uint16_t p) { m_sockaddr.sin6_port = htons(p); } -+ void set_port_n(uint16_t p) { m_sockaddr.sin6_port = p; } -+ -+ in6_addr address() const { return m_sockaddr.sin6_addr; } -+ std::string address_str() const; -+ bool address_c_str(char* buf, socklen_t size) const; -+ -+ void set_address(in6_addr a) { m_sockaddr.sin6_addr = a; } -+ bool set_address_str(const std::string& a) { return set_address_c_str(a.c_str()); } -+ bool set_address_c_str(const char* a); -+ -+ void set_address_any() { set_port(0); set_address(in6addr_any); } -+ -+ sa_family_t family() const { return m_sockaddr.sin6_family; } -+ void set_family() { m_sockaddr.sin6_family = AF_INET6; } -+ -+ sockaddr* c_sockaddr() { return reinterpret_cast<sockaddr*>(&m_sockaddr); } -+ sockaddr_in6* c_sockaddr_inet6() { return &m_sockaddr; } -+ -+ const sockaddr* c_sockaddr() const { return reinterpret_cast<const sockaddr*>(&m_sockaddr); } -+ const sockaddr_in6* c_sockaddr_inet6() const { return &m_sockaddr; } -+ -+ socket_address normalize_address() const; -+ -+ bool operator == (const socket_address_inet6& rhs) const; -+ bool operator < (const socket_address_inet6& rhs) const; -+ -+private: -+ struct sockaddr_in6 m_sockaddr; -+}; -+#endif -+ - // Unique key for the address, excluding port numbers etc. - class socket_address_key { - public: -@@ -241,8 +291,10 @@ socket_address::is_valid() const { - switch (family()) { - case af_inet: - return sa_inet()->is_valid(); --// case af_inet6: --// return sa_inet6().is_valid(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->is_valid(); -+#endif - default: - return false; - } -@@ -253,6 +305,10 @@ socket_address::is_bindable() const { - switch (family()) { - case af_inet: - return !sa_inet()->is_address_any(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return !sa_inet6()->is_address_any(); -+#endif - default: - return false; - } -@@ -263,6 +319,10 @@ socket_address::is_address_any() const { - switch (family()) { - case af_inet: - return sa_inet()->is_address_any(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->is_address_any(); -+#endif - default: - return true; - } -@@ -273,6 +333,10 @@ socket_address::port() const { - switch (family()) { - case af_inet: - return sa_inet()->port(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->port(); -+#endif - default: - return 0; - } -@@ -283,6 +347,10 @@ socket_address::set_port(uint16_t p) { - switch (family()) { - case af_inet: - return sa_inet()->set_port(p); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->set_port(p); -+#endif - default: - break; - } -@@ -293,6 +361,10 @@ socket_address::address_str() const { - switch (family()) { - case af_inet: - return sa_inet()->address_str(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->address_str(); -+#endif - default: - return std::string(); - } -@@ -303,6 +375,10 @@ socket_address::address_c_str(char* buf, socklen_t size) const { - switch (family()) { - case af_inet: - return sa_inet()->address_c_str(buf, size); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sa_inet6()->address_c_str(buf, size); -+#endif - default: - return false; - } -@@ -314,6 +390,12 @@ socket_address::set_address_c_str(const char* a) { - sa_inet()->set_family(); - return true; - -+#ifdef RAK_USE_INET6 -+ } else if (sa_inet6()->set_address_c_str(a)) { -+ sa_inet6()->set_family(); -+ return true; -+#endif -+ - } else { - return false; - } -@@ -325,6 +407,10 @@ socket_address::length() const { - switch(family()) { - case af_inet: - return sizeof(sockaddr_in); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return sizeof(sockaddr_in6); -+#endif - default: - return 0; - } -@@ -349,8 +435,10 @@ socket_address::operator == (const socket_address& rhs) const { - switch (family()) { - case af_inet: - return *sa_inet() == *rhs.sa_inet(); --// case af_inet6: --// return *sa_inet6() == *rhs.sa_inet6(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return *sa_inet6() == *rhs.sa_inet6(); -+#endif - default: - throw std::logic_error("socket_address::operator == (rhs) invalid type comparison."); - } -@@ -364,8 +452,10 @@ socket_address::operator < (const socket_address& rhs) const { - switch (family()) { - case af_inet: - return *sa_inet() < *rhs.sa_inet(); --// case af_inet6: --// return *sa_inet6() < *rhs.sa_inet6(); -+#ifdef RAK_USE_INET6 -+ case af_inet6: -+ return *sa_inet6() < *rhs.sa_inet6(); -+#endif - default: - throw std::logic_error("socket_address::operator < (rhs) invalid type comparison."); - } -@@ -391,6 +481,23 @@ socket_address_inet::set_address_c_str(const char* a) { - return inet_pton(AF_INET, a, &m_sockaddr.sin_addr); - } - -+#ifdef RAK_USE_INET6 -+inline socket_address_inet6 -+socket_address_inet::to_mapped_address() const { -+ uint32_t addr32[4]; -+ addr32[0] = 0; -+ addr32[1] = 0; -+ addr32[2] = htonl(0xffff); -+ addr32[3] = m_sockaddr.sin_addr.s_addr; -+ -+ socket_address_inet6 sa; -+ sa.clear(); -+ sa.set_address(*reinterpret_cast<in6_addr *>(addr32)); -+ sa.set_port_n(m_sockaddr.sin_port); -+ return sa; -+} -+#endif -+ - inline bool - socket_address_inet::operator == (const socket_address_inet& rhs) const { - return -@@ -406,6 +513,59 @@ socket_address_inet::operator < (const socket_address_inet& rhs) const { - m_sockaddr.sin_port < rhs.m_sockaddr.sin_port); - } - -+#ifdef RAK_USE_INET6 -+ -+inline std::string -+socket_address_inet6::address_str() const { -+ char buf[INET6_ADDRSTRLEN]; -+ -+ if (!address_c_str(buf, INET6_ADDRSTRLEN)) -+ return std::string(); -+ -+ return std::string(buf); -+} -+ -+inline bool -+socket_address_inet6::address_c_str(char* buf, socklen_t size) const { -+ return inet_ntop(family(), &m_sockaddr.sin6_addr, buf, size); -+} -+ -+inline bool -+socket_address_inet6::set_address_c_str(const char* a) { -+ return inet_pton(AF_INET6, a, &m_sockaddr.sin6_addr); -+} -+ -+inline socket_address -+socket_address_inet6::normalize_address() const { -+ const uint32_t *addr32 = reinterpret_cast<const uint32_t *>(m_sockaddr.sin6_addr.s6_addr); -+ if (addr32[0] == 0 && addr32[1] == 0 && addr32[2] == htonl(0xffff)) { -+ socket_address addr4; -+ addr4.sa_inet()->set_family(); -+ addr4.sa_inet()->set_address_n(addr32[3]); -+ addr4.sa_inet()->set_port_n(m_sockaddr.sin6_port); -+ return addr4; -+ } -+ return *reinterpret_cast<const socket_address*>(this); -+} -+ -+inline bool -+socket_address_inet6::operator == (const socket_address_inet6& rhs) const { -+ return -+ memcmp(&m_sockaddr.sin6_addr, &rhs.m_sockaddr.sin6_addr, sizeof(in6_addr)) == 0 && -+ m_sockaddr.sin6_port == rhs.m_sockaddr.sin6_port; -+} -+ -+inline bool -+socket_address_inet6::operator < (const socket_address_inet6& rhs) const { -+ int addr_comp = memcmp(&m_sockaddr.sin6_addr, &rhs.m_sockaddr.sin6_addr, sizeof(in6_addr)); -+ return -+ addr_comp < 0 || -+ (addr_comp == 0 || -+ m_sockaddr.sin6_port < rhs.m_sockaddr.sin6_port); -+} -+ -+#endif -+ - } - - #endif -diff --git a/src/command_peer.cc b/src/command_peer.cc -index 9708a8d..0aae8e0 100644 ---- a/src/command_peer.cc -+++ b/src/command_peer.cc -@@ -68,7 +68,13 @@ retrieve_p_id_html(torrent::Peer* peer) { - - torrent::Object - retrieve_p_address(torrent::Peer* peer) { -- return rak::socket_address::cast_from(peer->peer_info()->socket_address())->address_str(); -+ const rak::socket_address *addr = rak::socket_address::cast_from(peer->peer_info()->socket_address()); -+#ifdef RAK_USE_INET6 -+ if (addr->family() == rak::socket_address::af_inet6) -+ return "[" + addr->address_str() + "]"; -+ else -+#endif -+ return addr->address_str(); - } - - torrent::Object -diff --git a/src/core/curl_get.cc b/src/core/curl_get.cc -index f0767b7..4a904e1 100644 ---- a/src/core/curl_get.cc -+++ b/src/core/curl_get.cc -@@ -88,8 +88,20 @@ CurlGet::start() { - curl_easy_setopt(m_handle, CURLOPT_NOSIGNAL, (long)1); - curl_easy_setopt(m_handle, CURLOPT_FOLLOWLOCATION, (long)1); - curl_easy_setopt(m_handle, CURLOPT_MAXREDIRS, (long)5); -+ -+ // Even when IPv6-enabled, we don't want to use CURL_IPRESOLVE_WHATEVER, -+ // since that will usually prefer connecting over IPv6 to the tracker. -+ // Since it's usually a lot easier to find our global IPv6 address -+ // (if we have one) than our global IPv4 address, we prefer connecting -+ // over IPv4 if we can, so that the tracker will get our IPv4 address -+ // that way. If the resolve fails, CurlStack will call retry_ipv6() -+ // on us and we'll make a second attempt with CURL_IPRESOLVE_V6. - curl_easy_setopt(m_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); -+ - curl_easy_setopt(m_handle, CURLOPT_ENCODING, ""); -+#ifdef RAK_USE_INET6 -+ m_ipv6 = false; -+#endif - - m_stack->add_get(this); - } -@@ -107,6 +119,17 @@ CurlGet::close() { - m_handle = NULL; - } - -+#ifdef RAK_USE_INET6 -+void -+CurlGet::retry_ipv6() { -+ CURL* nhandle = curl_easy_duphandle(m_handle); -+ curl_easy_setopt(nhandle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); -+ curl_easy_cleanup(m_handle); -+ m_handle = nhandle; -+ m_ipv6 = true; -+} -+#endif -+ - void - CurlGet::receive_timeout() { - return m_stack->transfer_done(m_handle, "Timed out"); -diff --git a/src/core/curl_get.h b/src/core/curl_get.h -index 1d3a0d5..2b7836b 100644 ---- a/src/core/curl_get.h -+++ b/src/core/curl_get.h -@@ -56,6 +56,10 @@ public: - - void start(); - void close(); -+#ifdef RAK_USE_INET6 -+ bool is_using_ipv6() { return m_ipv6; } -+ void retry_ipv6(); -+#endif - - bool is_busy() const { return m_handle; } - bool is_active() const { return m_active; } -@@ -74,6 +78,9 @@ private: - void receive_timeout(); - - bool m_active; -+#ifdef RAK_USE_INET6 -+ bool m_ipv6; -+#endif - - rak::priority_item m_taskTimeout; - -diff --git a/src/core/curl_stack.cc b/src/core/curl_stack.cc -index 3adfab5..915b11a 100644 ---- a/src/core/curl_stack.cc -+++ b/src/core/curl_stack.cc -@@ -111,6 +111,21 @@ CurlStack::receive_action(CurlSocket* socket, int events) { - if (msg->msg != CURLMSG_DONE) - throw torrent::internal_error("CurlStack::receive_action() msg->msg != CURLMSG_DONE."); - -+#ifdef RAK_USE_INET6 -+ if (msg->data.result == CURLE_COULDNT_RESOLVE_HOST) { -+ iterator itr = std::find_if(begin(), end(), rak::equal(msg->easy_handle, std::mem_fun(&CurlGet::handle))); -+ -+ if (itr == end()) -+ throw torrent::internal_error("Could not find CurlGet when calling CurlStack::receive_action."); -+ -+ if (!(*itr)->is_using_ipv6()) { -+ (*itr)->retry_ipv6(); -+ if (curl_multi_add_handle((CURLM*)m_handle, (*itr)->handle()) > 0) -+ throw torrent::internal_error("Error calling curl_multi_add_handle."); -+ continue; -+ } -+ } else -+#endif - transfer_done(msg->easy_handle, msg->data.result == CURLE_OK ? NULL : curl_easy_strerror(msg->data.result)); - } - -diff --git a/src/display/window_peer_list.cc b/src/display/window_peer_list.cc -index 628b74b..63a22ef 100644 ---- a/src/display/window_peer_list.cc -+++ b/src/display/window_peer_list.cc -@@ -68,7 +68,11 @@ WindowPeerList::redraw() { - int x = 2; - int y = 0; - -- m_canvas->print(x, y, "IP"); x += 16; -+#ifdef RAK_USE_INET6 -+ m_canvas->print(x, y, "IP"); x += 25; -+#else -+ m_canvas->print(x, y, "IP"); x += 16; -+#endif - m_canvas->print(x, y, "UP"); x += 7; - m_canvas->print(x, y, "DOWN"); x += 7; - m_canvas->print(x, y, "PEER"); x += 7; -@@ -99,10 +103,21 @@ WindowPeerList::redraw() { - - x = 0; - -+ std::string ip_address = rak::socket_address::cast_from(p->address())->address_str(); -+#ifdef RAK_USE_INET6 -+ if (ip_address.size() >= 24) { -+ ip_address.replace(ip_address.begin() + 21, ip_address.end(), "..."); -+ } -+#endif -+ - m_canvas->print(x, y, "%c %s", - range.first == *m_focus ? '*' : ' ', -- rak::socket_address::cast_from(p->address())->address_str().c_str()); -+ ip_address.c_str()); -+#ifdef RAK_USE_INET6 -+ x += 27; -+#else - x += 18; -+#endif - - m_canvas->print(x, y, "%.1f", (double)p->up_rate()->rate() / 1024); x += 7; - m_canvas->print(x, y, "%.1f", (double)p->down_rate()->rate() / 1024); x += 7; -diff --git a/src/utils/socket_fd.cc b/src/utils/socket_fd.cc -index 414d4f7..2545304 100644 ---- a/src/utils/socket_fd.cc -+++ b/src/utils/socket_fd.cc -@@ -71,6 +71,11 @@ SocketFd::set_priority(priority_type p) { - check_valid(); - int opt = p; - -+#ifdef RAK_USE_INET6 -+ if (m_ipv6_socket) -+ return setsockopt(m_fd, IPPROTO_IPV6, IPV6_TCLASS, &opt, sizeof(opt)) == 0; -+ else -+#endif - return setsockopt(m_fd, IPPROTO_IP, IP_TOS, &opt, sizeof(opt)) == 0; - } - -@@ -130,12 +135,36 @@ SocketFd::get_error() const { - - bool - SocketFd::open_stream() { -+#ifdef RAK_USE_INET6 -+ m_fd = socket(rak::socket_address::pf_inet6, SOCK_STREAM, IPPROTO_TCP); -+ if (m_fd == -1) { -+ m_ipv6_socket = false; -+ return (m_fd = socket(rak::socket_address::pf_inet, SOCK_STREAM, IPPROTO_TCP)) != -1; -+ } -+ m_ipv6_socket = true; -+ -+ int zero = 0; -+ return setsockopt(m_fd, IPPROTO_IPV6, IPV6_V6ONLY, &zero, sizeof(zero)) != -1; -+#else - return (m_fd = socket(rak::socket_address::pf_inet, SOCK_STREAM, IPPROTO_TCP)) != -1; -+#endif - } - - bool - SocketFd::open_datagram() { -+#ifdef RAK_USE_INET6 -+ m_fd = socket(rak::socket_address::pf_inet6, SOCK_DGRAM, 0); -+ if (m_fd == -1) { -+ m_ipv6_socket = false; -+ return (m_fd = socket(rak::socket_address::pf_inet, SOCK_DGRAM, 0)) != -1; -+ } -+ m_ipv6_socket = true; -+ -+ int zero = 0; -+ return setsockopt(m_fd, IPPROTO_IPV6, IPV6_V6ONLY, &zero, sizeof(zero)) != -1; -+#else - return (m_fd = socket(rak::socket_address::pf_inet, SOCK_DGRAM, 0)) != -1; -+#endif - } - - bool -@@ -167,10 +196,34 @@ bool - SocketFd::connect(const rak::socket_address& sa) { - check_valid(); - -+#ifdef RAK_USE_INET6 -+ if (m_ipv6_socket && sa.family() == rak::socket_address::pf_inet) { -+ rak::socket_address_inet6 sa_mapped = sa.sa_inet()->to_mapped_address(); -+ return !::connect(m_fd, sa_mapped.c_sockaddr(), sizeof(sa_mapped)) || errno == EINPROGRESS; -+ } -+#endif - return !::connect(m_fd, sa.c_sockaddr(), sa.length()) || errno == EINPROGRESS; - } - - bool -+SocketFd::getsockname(rak::socket_address *sa) { -+ check_valid(); -+ -+ socklen_t len = sizeof(rak::socket_address); -+ if (::getsockname(m_fd, sa->c_sockaddr(), &len)) { -+ return false; -+ } -+ -+#ifdef RAK_USE_INET6 -+ if (m_ipv6_socket && sa->family() == rak::socket_address::af_inet6) { -+ *sa = sa->sa_inet6()->normalize_address(); -+ } -+#endif -+ -+ return true; -+} -+ -+bool - SocketFd::listen(int size) { - check_valid(); - -@@ -182,7 +235,18 @@ SocketFd::accept(rak::socket_address* sa) { - check_valid(); - socklen_t len = sizeof(rak::socket_address); - -+#ifdef RAK_USE_INET6 -+ if (sa == NULL) { -+ return SocketFd(::accept(m_fd, NULL, &len)); -+ } -+ int fd = ::accept(m_fd, sa->c_sockaddr(), &len); -+ if (fd != -1 && m_ipv6_socket && sa->family() == rak::socket_address::af_inet6) { -+ *sa = sa->sa_inet6()->normalize_address(); -+ } -+ return SocketFd(fd); -+#else - return SocketFd(::accept(m_fd, sa != NULL ? sa->c_sockaddr() : NULL, &len)); -+#endif - } - - // unsigned int -diff --git a/src/utils/socket_fd.h b/src/utils/socket_fd.h -index 7898712..35d2eda 100644 ---- a/src/utils/socket_fd.h -+++ b/src/utils/socket_fd.h -@@ -80,6 +80,7 @@ public: - bool bind(const rak::socket_address& sa); - bool bind(const rak::socket_address& sa, unsigned int length); - bool connect(const rak::socket_address& sa); -+ bool getsockname(rak::socket_address* sa); - - bool listen(int size); - SocketFd accept(rak::socket_address* sa); -@@ -91,6 +92,9 @@ private: - inline void check_valid() const; - - int m_fd; -+#ifdef RAK_USE_INET6 -+ bool m_ipv6_socket; -+#endif - }; - - } diff --git a/rtorrent-extended/karabaja_mod.patch b/rtorrent-extended/karabaja_mod.patch deleted file mode 100644 index e309fff..0000000 --- a/rtorrent-extended/karabaja_mod.patch +++ /dev/null @@ -1,438 +0,0 @@ -diff --git a/src/display/canvas.cc b/src/display/canvas.cc -index 4e621df..35244eb 100644 ---- a/src/display/canvas.cc -+++ b/src/display/canvas.cc -@@ -92,6 +92,14 @@ Canvas::initialize() { - m_isInitialized = true; - - initscr(); -+ -+ //colors -+ start_color(); -+ use_default_colors(); -+ init_pair(1, COLOR_RED, -1); -+ init_pair(2, COLOR_YELLOW, -1); -+ init_pair(3, COLOR_GREEN, -1); -+ - raw(); - noecho(); - nodelay(stdscr, TRUE); -diff --git a/src/display/utils.cc b/src/display/utils.cc -index d2f1af4..400b940 100644 ---- a/src/display/utils.cc -+++ b/src/display/utils.cc -@@ -34,6 +34,9 @@ - // Skomakerveien 33 - // 3185 Skoppum, NORWAY - -+// interface modifications by karabaja4 -+// <karabaja4@archlinux.us> -+ - #include "config.h" - - #include <cstring> -@@ -52,6 +55,10 @@ - #include <torrent/data/file_list.h> - #include <torrent/peer/client_info.h> - -+//peers -+#include <torrent/peer/connection_list.h> -+#include <torrent/peer/peer_list.h> -+ - #include "core/download.h" - #include "core/manager.h" - #include "rpc/parse_commands.h" -@@ -96,9 +103,9 @@ print_hhmmss_local(char* first, char* last, time_t t) { - char* - print_ddhhmm(char* first, char* last, time_t t) { - if (t / (24 * 3600) < 100) -- return print_buffer(first, last, "%2id %2i:%02i", (int)t / (24 * 3600), ((int)t / 3600) % 24, ((int)t / 60) % 60); -+ return print_buffer(first, last, "%id:%ih:%im", (int)t / (24 * 3600), ((int)t / 3600) % 24, ((int)t / 60) % 60); - else -- return print_buffer(first, last, "--d --:--"); -+ return print_buffer(first, last, "--d:--h:--m"); - } - - char* -@@ -127,91 +134,121 @@ print_address(char* first, char* last, const sockaddr* sa) { - - char* - print_download_title(char* first, char* last, core::Download* d) { -- return print_buffer(first, last, " %s", d->download()->name().c_str()); -+ -+ first = print_buffer(first, last, " %s", d->download()->name().c_str()); -+ -+ if (first > last) -+ throw torrent::internal_error("print_download_status(...) wrote past end of the buffer."); -+ -+ return first; -+ - } - - char* --print_download_info(char* first, char* last, core::Download* d) { -- if (!d->download()->is_open()) -- first = print_buffer(first, last, "[CLOSED] "); -- else if (!d->download()->is_active()) -- first = print_buffer(first, last, "[OPEN] "); -- else -- first = print_buffer(first, last, " "); -+print_download_title_extra(char* first, char* last, core::Download* d) { -+ -+ if (d->is_hash_checking()) { -+ first = print_buffer(first, last, " | Checking hash [%2i%%]", -+ (d->download()->chunks_hashed() * 100) / d->download()->file_list()->size_chunks()); -+ } -+ else if (d->tracker_list()->has_active() && d->tracker_list()->focus() < d->tracker_list()->end()) { -+ -+ torrent::TrackerList* tl = d->tracker_list(); -+ char status[128]; -+ -+ (*tl->focus())->get_status(status, sizeof(status)); -+ first = print_buffer(first, last, " | Tracker[%i:%i]: Connecting to %s %s", -+ (*tl->focus())->group(), tl->focus_index(), (*tl->focus())->url().c_str(), status); -+ } -+ else if (!d->message().empty()) { -+ first = print_buffer(first, last, " | %s", d->message().c_str()); -+ } -+ else { -+ *first = '\0'; -+ } -+ -+ if (first > last) -+ throw torrent::internal_error("print_download_status(...) wrote past end of the buffer."); -+ -+ return first; -+ -+} - -- if (d->is_done()) -- first = print_buffer(first, last, "done %10.1f MB", (double)d->download()->file_list()->size_bytes() / (double)(1 << 20)); -- else -- first = print_buffer(first, last, "%6.1f / %6.1f MB", -- (double)d->download()->bytes_done() / (double)(1 << 20), -- (double)d->download()->file_list()->size_bytes() / (double)(1 << 20)); -- -- first = print_buffer(first, last, " Rate: %5.1f / %5.1f KB Uploaded: %7.1f MB", -- (double)d->download()->up_rate()->rate() / (1 << 10), -- (double)d->download()->down_rate()->rate() / (1 << 10), -- (double)d->download()->up_rate()->total() / (1 << 20)); -- -- if (d->download()->is_active() && !d->is_done()) { -- first = print_buffer(first, last, " "); -- first = print_download_percentage_done(first, last, d); -- -- first = print_buffer(first, last, " "); -- first = print_download_time_left(first, last, d); -- } else { -- first = print_buffer(first, last, " "); -- } -+char* -+print_download_info(char* first, char* last, core::Download* d) { -+ -+ if (!d->download()->is_open()) { -+ first = print_buffer(first, last, " CLOSED |"); -+ } -+ else if (!d->download()->is_active()) { -+ first = print_buffer(first, last, " PAUSED |"); -+ } -+ else { -+ first = print_buffer(first, last, " ACTIVE |"); -+ } -+ -+ if (d->is_done()) { -+ first = print_buffer(first, last, " finished %.1f MB [100%%] |", (double)d->download()->file_list()->size_bytes() / (double)(1 << 20)); -+ } -+ else { -+ first = print_buffer(first, last, " %.1f / %.1f MB [%i%%] |", -+ (double)d->download()->bytes_done() / (double)(1 << 20), -+ (double)d->download()->file_list()->size_bytes() / (double)(1 << 20), -+ (int)(((double)d->download()->bytes_done() / (double)d->download()->file_list()->size_bytes()) * 100)); -+ } -+ -+ //speed -+ first = print_buffer(first, last, " Speed: %.1f / %.1f KB", -+ (double)d->download()->down_rate()->rate() / (1 << 10), -+ (double)d->download()->up_rate()->rate() / (1 << 10)); -+ -+ if (d->download()->is_active() && !d->is_done()) { -+ -+ //peers -+ first = print_buffer(first, last, " | Peers: %i(%i)", -+ (int)d->download()->connection_list()->size(), -+ (int)d->download()->peer_list()->available_list_size()); -+ -+ //eta -+ first = print_buffer(first, last, " | ETA: "); -+ first = print_download_time_left(first, last, d); -+ -+ } -+ -+ if (first > last) -+ throw torrent::internal_error("print_download_info(...) wrote past end of the buffer."); -+ -+ return first; -+} - -- first = print_buffer(first, last, " [%c%c R: %4.2f", -- rpc::call_command_string("d.get_tied_to_file", rpc::make_target(d)).empty() ? ' ' : 'T', -- rpc::call_command_value("d.get_ignore_commands", rpc::make_target(d)) == 0 ? ' ' : 'I', -- (double)rpc::call_command_value("d.get_ratio", rpc::make_target(d)) / 1000.0); -+char* -+print_download_info_extra(char* first, char* last, core::Download* d) { -+ -+ first = print_buffer(first, last, "[%c%c R: %4.2f", -+ rpc::call_command_string("d.get_tied_to_file", rpc::make_target(d)).empty() ? ' ' : 'T', -+ rpc::call_command_value("d.get_ignore_commands", rpc::make_target(d)) == 0 ? ' ' : 'I', -+ (double)rpc::call_command_value("d.get_ratio", rpc::make_target(d)) / 1000.0); - -- if (d->priority() != 2) -- first = print_buffer(first, last, " %s", rpc::call_command_string("d.get_priority_str", rpc::make_target(d)).c_str()); -+ if (d->priority() != 2) -+ first = print_buffer(first, last, " %s", rpc::call_command_string("d.get_priority_str", rpc::make_target(d)).c_str()); - -- if (!d->bencode()->get_key("rtorrent").get_key_string("throttle_name").empty()) -- first = print_buffer(first, last , " %s", rpc::call_command_string("d.get_throttle_name", rpc::make_target(d)).c_str()); -+ if (!d->bencode()->get_key("rtorrent").get_key_string("throttle_name").empty()) -+ first = print_buffer(first, last , " %s", rpc::call_command_string("d.get_throttle_name", rpc::make_target(d)).c_str()); - -- first = print_buffer(first, last , "]"); -+ first = print_buffer(first, last , "]"); - -- if (first > last) -- throw torrent::internal_error("print_download_info(...) wrote past end of the buffer."); -+ if (first > last) -+ throw torrent::internal_error("print_download_info(...) wrote past end of the buffer."); - -- return first; -+ return first; - } - - char* - print_download_status(char* first, char* last, core::Download* d) { -- if (d->is_active()) -- ; -- else if (rpc::call_command_value("d.get_hashing", rpc::make_target(d)) != 0) -- first = print_buffer(first, last, "Hashing: "); -- else if (!d->is_active()) -- first = print_buffer(first, last, "Inactive: "); -- -- if (d->is_hash_checking()) { -- first = print_buffer(first, last, "Checking hash [%2i%%]", -- (d->download()->chunks_hashed() * 100) / d->download()->file_list()->size_chunks()); -- -- } else if (d->tracker_list()->has_active() && d->tracker_list()->focus() < d->tracker_list()->end()) { -- torrent::TrackerList* tl = d->tracker_list(); -- char status[128]; -- -- (*tl->focus())->get_status(status, sizeof(status)); -- first = print_buffer(first, last, "Tracker[%i:%i]: Connecting to %s %s", -- (*tl->focus())->group(), tl->focus_index(), (*tl->focus())->url().c_str(), status); -- -- } else if (!d->message().empty()) { -- first = print_buffer(first, last, "%s", d->message().c_str()); -- -- } else { -- *first = '\0'; -- } -- -- if (first > last) -- throw torrent::internal_error("print_download_status(...) wrote past end of the buffer."); - -+ *first = '\0'; - return first; -+ - } - - char* -@@ -219,7 +256,7 @@ print_download_time_left(char* first, char* last, core::Download* d) { - uint32_t rate = d->download()->down_rate()->rate(); - - if (rate < 512) -- return print_buffer(first, last, "--d --:--"); -+ return print_buffer(first, last, "--d:--h:--m"); - - time_t remaining = (d->download()->file_list()->size_bytes() - d->download()->bytes_done()) / (rate & ~(uint32_t)(512 - 1)); - -@@ -230,9 +267,9 @@ char* - print_download_percentage_done(char* first, char* last, core::Download* d) { - if (!d->is_open() || d->is_done()) - //return print_buffer(first, last, "[--%%]"); -- return print_buffer(first, last, " "); -+ return print_buffer(first, last, " "); - else -- return print_buffer(first, last, "[%2u%%]", (d->download()->file_list()->completed_chunks() * 100) / d->download()->file_list()->size_chunks()); -+ return print_buffer(first, last, "%u%%", (d->download()->file_list()->completed_chunks() * 100) / d->download()->file_list()->size_chunks()); - } - - char* -@@ -255,19 +292,19 @@ print_client_version(char* first, char* last, const torrent::ClientInfo& clientI - - char* - print_status_info(char* first, char* last) { -- if (!torrent::up_throttle_global()->is_throttled()) -+ if (!torrent::down_throttle_global()->is_throttled()) - first = print_buffer(first, last, "[Throttle off"); - else -- first = print_buffer(first, last, "[Throttle %3i", torrent::up_throttle_global()->max_rate() / 1024); -+ first = print_buffer(first, last, "[Throttle %3i", torrent::down_throttle_global()->max_rate() / 1024); - -- if (!torrent::down_throttle_global()->is_throttled()) -+ if (!torrent::up_throttle_global()->is_throttled()) - first = print_buffer(first, last, "/off KB]"); - else -- first = print_buffer(first, last, "/%3i KB]", torrent::down_throttle_global()->max_rate() / 1024); -+ first = print_buffer(first, last, "/%3i KB]", torrent::up_throttle_global()->max_rate() / 1024); - - first = print_buffer(first, last, " [Rate %5.1f/%5.1f KB]", -- (double)torrent::up_rate()->rate() / 1024.0, -- (double)torrent::down_rate()->rate() / 1024.0); -+ (double)torrent::down_rate()->rate() / 1024.0, -+ (double)torrent::up_rate()->rate() / 1024.0); - - first = print_buffer(first, last, " [Port: %i]", (unsigned int)torrent::connection_manager()->listen_port()); - -diff --git a/src/display/utils.h b/src/display/utils.h -index 3d69021..c9145dd 100644 ---- a/src/display/utils.h -+++ b/src/display/utils.h -@@ -66,7 +66,9 @@ char* print_ddhhmm(char* first, char* last, time_t t); - char* print_ddmmyyyy(char* first, char* last, time_t t); - - char* print_download_title(char* first, char* last, core::Download* d); -+char* print_download_title_extra(char* first, char* last, core::Download* d); - char* print_download_info(char* first, char* last, core::Download* d); -+char* print_download_info_extra(char* first, char* last, core::Download* d); - char* print_download_status(char* first, char* last, core::Download* d); - char* print_download_time_left(char* first, char* last, core::Download* d); - char* print_download_percentage_done(char* first, char* last, core::Download* d); -diff --git a/src/display/window_download_list.cc b/src/display/window_download_list.cc -index 71efec0..353f6b5 100644 ---- a/src/display/window_download_list.cc -+++ b/src/display/window_download_list.cc -@@ -34,6 +34,9 @@ - // Skomakerveien 33 - // 3185 Skoppum, NORWAY - -+// interface modifications by karabaja4 -+// <karabaja4@archlinux.us> -+ - #include "config.h" - - #include <rak/algorithm.h> -@@ -81,30 +84,90 @@ WindowDownloadList::redraw() { - Range range = rak::advance_bidirectional(m_view->begin_visible(), - m_view->focus() != m_view->end_visible() ? m_view->focus() : m_view->begin_visible(), - m_view->end_visible(), -- m_canvas->height() / 3); -+ (m_canvas->height() - 1) / 3); - - // Make sure we properly fill out the last lines so it looks like - // there are more torrents, yet don't hide it if we got the last one - // in focus. - if (range.second != m_view->end_visible()) -- ++range.second; -+ ++range.second; - -- int pos = 1; -+ int pos = 2; - - while (range.first != range.second) { - char buffer[m_canvas->width() + 1]; - char* position; - char* last = buffer + m_canvas->width() - 2 + 1; -- -+ int title_length; -+ -+ //1 = red -+ //2 = yellow -+ //3 = green -+ -+ //do not print on last lines if cannot show whole torrent -+ if (pos >= (m_canvas->height() - 1)) -+ break; -+ -+ //print title - position = print_download_title(buffer, last, *range.first); -- m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); -+ title_length = strlen(buffer); -+ m_canvas->print(0, pos, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); -+ -+ //title color -+ if ((*range.first)->is_done()) { -+ //finished -+ m_canvas->set_attr(3, pos, (title_length - 1), A_NORMAL, 3); -+ } -+ else { -+ //not finished -+ m_canvas->set_attr(3, pos, (title_length - 1), A_NORMAL, 2); -+ } -+ -+ //print title extra -+ position = print_download_title_extra(buffer, last, *range.first); -+ -+ //do not let title extra get off screen -+ buffer[m_canvas->width() - title_length - 2] = '\0'; - -+ m_canvas->print((title_length + 2), pos++, "%s", buffer); -+ -+ //print info - position = print_download_info(buffer, last, *range.first); -- m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); -- -- position = print_download_status(buffer, last, *range.first); -- m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); -- -+ m_canvas->print(0, pos, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer); -+ -+ //info color -+ if (!(*range.first)->download()->is_open()) { -+ //closed -+ m_canvas->set_attr(3, pos, 6, A_NORMAL, 1); -+ } -+ else if (!(*range.first)->download()->is_active()) { -+ //paused -+ m_canvas->set_attr(3, pos, 6, A_NORMAL, 2); -+ } -+ else { -+ //active -+ m_canvas->set_attr(3, pos, 6, A_NORMAL, 3); -+ } -+ -+ if ((*range.first)->is_done()) { -+ //finished -+ m_canvas->set_attr(12, pos, 8, A_NORMAL, 3); -+ } -+ -+ //do not print info extra if it collides with info -+ if ((strlen(buffer) + 2) <= (m_canvas->width() - 16)) { -+ -+ //print info extra -+ position = print_download_info_extra(buffer, last, *range.first); -+ m_canvas->print((m_canvas->width() - 16), pos++, "%s", buffer); -+ -+ } -+ else { -+ pos++; -+ } -+ -+ //skip one line -+ pos++; - ++range.first; - } - } -diff --git a/src/display/window_title.cc b/src/display/window_title.cc -index 300f655..c0e7fe5 100644 ---- a/src/display/window_title.cc -+++ b/src/display/window_title.cc -@@ -48,6 +48,10 @@ WindowTitle::redraw() { - - m_canvas->print(std::max(0, ((int)m_canvas->width() - (int)m_title.size()) / 2 - 4), 0, - "*** %s ***", m_title.c_str()); -+ -+ //set color in title -+ m_canvas->set_attr((((int)m_canvas->width() - (int)m_title.size()) / 2 - 4), 0, 3, A_NORMAL, 2); -+ m_canvas->set_attr( ((((int)m_canvas->width() - (int)m_title.size()) / 2) + (int)m_title.size() + 1), 0, 3, A_NORMAL, 2); - } - - } diff --git a/rtorrent-extended/magnet_uri.patch b/rtorrent-extended/magnet_uri.patch deleted file mode 100644 index 32d45f0..0000000 --- a/rtorrent-extended/magnet_uri.patch +++ /dev/null @@ -1,228 +0,0 @@ -diff --git a/src/core/download_factory.cc b/src/core/download_factory.cc -index e2d8ee8..49ac3fa 100644 ---- a/src/core/download_factory.cc -+++ b/src/core/download_factory.cc -@@ -69,6 +69,12 @@ is_network_uri(const std::string& uri) { - std::strncmp(uri.c_str(), "ftp://", 6) == 0; - } - -+bool -+is_magnet_uri(const std::string& uri) { -+ return -+ std::strncmp(uri.c_str(), "magnet:?", 8) == 0; -+} -+ - DownloadFactory::DownloadFactory(Manager* m) : - m_manager(m), - m_stream(NULL), -@@ -133,6 +139,13 @@ DownloadFactory::receive_load() { - - m_variables["tied_to_file"] = (int64_t)false; - -+ } else if (is_magnet_uri(m_uri)) { -+ m_stream = new std::stringstream(); -+ *m_stream << "d10:magnet-uri" << m_uri.length() << ":" << m_uri << "e"; -+ -+ m_variables["tied_to_file"] = (int64_t)false; -+ receive_loaded(); -+ - } else { - std::fstream* stream = new std::fstream(rak::path_expand(m_uri).c_str(), std::ios::in | std::ios::binary); - m_stream = stream; -@@ -177,6 +190,16 @@ DownloadFactory::receive_success() { - - torrent::Object* root = download->bencode(); - -+ if (download->download()->is_meta_download()) { -+ torrent::Object& meta = root->insert_key("rtorrent_meta_download", torrent::Object::create_map()); -+ meta.insert_key("start", m_start); -+ meta.insert_key("print_log", m_printLog); -+ -+ torrent::Object::list_type& commands = meta.insert_key("commands", torrent::Object::create_list()).as_list(); -+ for (command_list_type::iterator itr = m_commands.begin(); itr != m_commands.end(); ++itr) -+ commands.push_back(*itr); -+ } -+ - if (!m_session) { - // We only allow session torrents to keep their - // 'rtorrent/libtorrent' sections. The "fast_resume" section -@@ -229,7 +252,7 @@ DownloadFactory::receive_success() { - rpc::call_command("d.set_directory_base", rtorrent->get_key("directory"), rpc::make_target(download)); - - if (!m_session && m_variables["tied_to_file"].as_value()) -- rpc::call_command("d.set_tied_to_file", m_uri, rpc::make_target(download)); -+ rpc::call_command("d.set_tied_to_file", m_uri.empty() ? m_variables["tied_file"] : m_uri, rpc::make_target(download)); - - rpc::call_command("d.set_peer_exchange", rpc::call_command_value("get_peer_exchange"), rpc::make_target(download)); - -diff --git a/src/core/download_factory.h b/src/core/download_factory.h -index 045c9dc..3cc9622 100644 ---- a/src/core/download_factory.h -+++ b/src/core/download_factory.h -@@ -112,6 +112,7 @@ private: - }; - - bool is_network_uri(const std::string& uri); -+bool is_magnet_uri(const std::string& uri); - - } - -diff --git a/src/core/download_list.cc b/src/core/download_list.cc -index 551f873..13df725 100644 ---- a/src/core/download_list.cc -+++ b/src/core/download_list.cc -@@ -37,10 +37,12 @@ - #include "config.h" - - #include <algorithm> -+#include <fstream> - #include <iostream> - #include <sigc++/adaptors/bind.h> - #include <rak/functional.h> - #include <rak/string_manip.h> -+#include <torrent/data/file.h> - #include <torrent/exceptions.h> - #include <torrent/download.h> - #include <torrent/hash_string.h> -@@ -452,6 +454,9 @@ DownloadList::hash_done(Download* download) { - int64_t hashing = rpc::call_command_value("d.get_hashing", rpc::make_target(download)); - rpc::call_command_set_value("d.set_hashing", Download::variable_hashing_stopped, rpc::make_target(download)); - -+ if (download->is_done() && download->download()->is_meta_download()) -+ return process_meta_download(download); -+ - switch (hashing) { - case Download::variable_hashing_initial: - case Download::variable_hashing_rehash: -@@ -543,6 +548,9 @@ void - DownloadList::confirm_finished(Download* download) { - check_contains(download); - -+ if (download->download()->is_meta_download()) -+ return process_meta_download(download); -+ - rpc::call_command("d.set_complete", (int64_t)1, rpc::make_target(download)); - - rpc::call_command("d.set_connection_current", rpc::call_command_void("d.get_connection_seed", rpc::make_target(download)), rpc::make_target(download)); -@@ -576,4 +584,36 @@ DownloadList::confirm_finished(Download* download) { - resume(download, torrent::Download::start_no_create | torrent::Download::start_skip_tracker | torrent::Download::start_keep_baseline); - } - -+void -+DownloadList::process_meta_download(Download* download) { -+ rpc::call_command("d.stop", torrent::Object(), rpc::make_target(download)); -+ rpc::call_command("d.close", torrent::Object(), rpc::make_target(download)); -+ -+ std::string metafile = (*download->file_list()->begin())->frozen_path(); -+ std::fstream file(metafile.c_str(), std::ios::in | std::ios::binary); -+ if (!file.is_open()) { -+ control->core()->push_log("Could not read download metadata."); -+ return; -+ } -+ -+ torrent::Object* bencode = new torrent::Object(torrent::Object::create_map()); -+ file >> bencode->insert_key("info", torrent::Object()); -+ if (file.fail()) { -+ delete bencode; -+ control->core()->push_log("Could not create download, the input is not a valid torrent."); -+ return; -+ } -+ file.close(); -+ -+ // Steal the keys we still need. The old download has no use for them. -+ bencode->insert_key("rtorrent_meta_download", torrent::Object()).swap(download->bencode()->get_key("rtorrent_meta_download")); -+ if (download->bencode()->has_key("announce")) -+ bencode->insert_key("announce", torrent::Object()).swap(download->bencode()->get_key("announce")); -+ if (download->bencode()->has_key("announce-list")) -+ bencode->insert_key("announce-list", torrent::Object()).swap(download->bencode()->get_key("announce-list")); -+ -+ erase_ptr(download); -+ control->core()->try_create_download_from_meta_download(bencode, metafile); -+} -+ - } -diff --git a/src/core/download_list.h b/src/core/download_list.h -index f7828ea..8ecffa0 100644 ---- a/src/core/download_list.h -+++ b/src/core/download_list.h -@@ -161,6 +161,8 @@ private: - - void received_finished(Download* d); - void confirm_finished(Download* d); -+ -+ void process_meta_download(Download* d); - }; - - } -diff --git a/src/core/manager.cc b/src/core/manager.cc -index 62738ca..2a422c8 100644 ---- a/src/core/manager.cc -+++ b/src/core/manager.cc -@@ -39,6 +39,7 @@ - #include <cstdio> - #include <cstring> - #include <fstream> -+#include <sstream> - #include <unistd.h> - #include <sys/select.h> - #include <rak/address_info.h> -@@ -52,6 +53,7 @@ - #include <torrent/connection_manager.h> - #include <torrent/error.h> - #include <torrent/exceptions.h> -+#include <torrent/object_stream.h> - #include <torrent/resume.h> - #include <torrent/tracker_list.h> - #include <torrent/throttle.h> -@@ -395,6 +397,7 @@ Manager::try_create_download(const std::string& uri, int flags, const command_li - if ((flags & create_tied) && - !(flags & create_raw_data) && - !is_network_uri(uri) && -+ !is_magnet_uri(uri) && - !file_status_cache()->insert(uri, 0)) - return; - -@@ -416,6 +419,31 @@ Manager::try_create_download(const std::string& uri, int flags, const command_li - f->commit(); - } - -+void -+Manager::try_create_download_from_meta_download(torrent::Object* bencode, const std::string& metafile) { -+ DownloadFactory* f = new DownloadFactory(this); -+ -+ f->variables()["tied_to_file"] = (int64_t)true; -+ f->variables()["tied_file"] = metafile; -+ -+ torrent::Object& meta = bencode->get_key("rtorrent_meta_download"); -+ torrent::Object::list_type& commands = meta.get_key_list("commands"); -+ for (torrent::Object::list_type::const_iterator itr = commands.begin(); itr != commands.end(); ++itr) -+ f->commands().insert(f->commands().end(), itr->as_string()); -+ -+ f->set_start(meta.get_key_value("start")); -+ f->set_print_log(meta.get_key_value("print_log")); -+ f->slot_finished(sigc::bind(sigc::ptr_fun(&rak::call_delete_func<core::DownloadFactory>), f)); -+ -+ // Bit of a waste to create the bencode repesentation here -+ // only to have the DownloadFactory decode it. -+ std::stringstream s; -+ s.imbue(std::locale::classic()); -+ s << *bencode; -+ f->load_raw_data(s.str()); -+ f->commit(); -+} -+ - utils::Directory - path_expand_transform(std::string path, const utils::directory_entry& entry) { - return path + entry.d_name; -diff --git a/src/core/manager.h b/src/core/manager.h -index 3b23da3..16902af 100644 ---- a/src/core/manager.h -+++ b/src/core/manager.h -@@ -128,6 +128,7 @@ public: - // Temporary, find a better place for this. - void try_create_download(const std::string& uri, int flags, const command_list_type& commands); - void try_create_download_expand(const std::string& uri, int flags, command_list_type commands = command_list_type()); -+ void try_create_download_from_meta_download(torrent::Object* bencode, const std::string& metafile); - - private: - typedef RangeMap<uint32_t, torrent::ThrottlePair> AddressThrottleMap; diff --git a/rtorrent-extended/rtorrent-extended.install b/rtorrent-extended/rtorrent-extended.install deleted file mode 100644 index 811a690..0000000 --- a/rtorrent-extended/rtorrent-extended.install +++ /dev/null @@ -1,9 +0,0 @@ -post_install() { - echo "" - echo "rTorrent-eXtended new options in .rtorrent.rc supported" - echo "examples at http://lky.cc/rtorrent-extended/" -} -post_upgrade() { - post_install -} - diff --git a/rtorrent-extended/trackerinfo.patch b/rtorrent-extended/trackerinfo.patch deleted file mode 100644 index 63998a5..0000000 --- a/rtorrent-extended/trackerinfo.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/display/window_tracker_list.cc b/src/display/window_tracker_list.cc -index 1903d67..2860f12 100644 ---- a/src/display/window_tracker_list.cc -+++ b/src/display/window_tracker_list.cc -@@ -89,13 +89,14 @@ WindowTrackerList::redraw() { - tracker->url().c_str()); - - if (pos < m_canvas->height()) -- m_canvas->print(4, pos++, "Id: %s Focus: %s Enabled: %s Open: %s S/L: %u/%u", -+ m_canvas->print(4, pos++, "Id: %s Focus: %s Enabled: %s Open: %s S/L/D: %u/%u/%u", - rak::copy_escape_html(tracker->tracker_id()).c_str(), - range.first == tl->focus_index() ? "yes" : " no", - tracker->is_usable() ? "yes" : tracker->is_enabled() ? "off" : " no", - tracker->is_busy() ? "yes" : " no", - tracker->scrape_complete(), -- tracker->scrape_incomplete()); -+ tracker->scrape_incomplete(), -+ tracker->scrape_downloaded()); - - // m_canvas->print(4, pos++, "Id: %s Focus: %s Enabled: %s Open: %s Timer: %u/%u", - // rak::copy_escape_html(tracker->tracker_id()).c_str(), diff --git a/rtorrent-extended/vi_kb_akston.patch b/rtorrent-extended/vi_kb_akston.patch deleted file mode 100644 index 46ff7ea..0000000 --- a/rtorrent-extended/vi_kb_akston.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc -index e72bff6..04b8625 100644 ---- a/src/ui/download_list.cc -+++ b/src/ui/download_list.cc -@@ -346,13 +346,13 @@ DownloadList::setup_keys() { - m_bindings['\x0F'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::receive_view_input), INPUT_CHANGE_DIRECTORY); - m_bindings['X' - '@'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::receive_view_input), INPUT_COMMAND); - -- m_uiArray[DISPLAY_LOG]->bindings()[KEY_LEFT] = -+ m_uiArray[DISPLAY_LOG]->bindings()['h'] = - m_uiArray[DISPLAY_LOG]->bindings()['B' - '@'] = - m_uiArray[DISPLAY_LOG]->bindings()[' '] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD_LIST); - -- m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()[KEY_RIGHT] = -+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['l'] = - m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['F' - '@'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD); -- m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['l'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_LOG); -+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['L'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_LOG); - } - - } -diff --git a/src/ui/element_chunks_seen.cc b/src/ui/element_chunks_seen.cc -index 8ee1dd9..d2636db 100644 ---- a/src/ui/element_chunks_seen.cc -+++ b/src/ui/element_chunks_seen.cc -@@ -52,10 +52,10 @@ ElementChunksSeen::ElementChunksSeen(core::Download* d) : - m_window(NULL), - m_focus(0) { - -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - -- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_next); -- m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_prev); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_next); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_prev); - m_bindings[KEY_NPAGE] = sigc::mem_fun(*this, &ElementChunksSeen::receive_pagenext); - m_bindings[KEY_PPAGE] = sigc::mem_fun(*this, &ElementChunksSeen::receive_pageprev); - } -diff --git a/src/ui/element_download_list.cc b/src/ui/element_download_list.cc -index 1dc9ece..0c789f1 100644 ---- a/src/ui/element_download_list.cc -+++ b/src/ui/element_download_list.cc -@@ -95,8 +95,8 @@ ElementDownloadList::ElementDownloadList() : - m_bindings['8'] = sigc::bind(sigc::mem_fun(*this, &ElementDownloadList::receive_change_view), "seeding"); - m_bindings['9'] = sigc::bind(sigc::mem_fun(*this, &ElementDownloadList::receive_change_view), "active"); - -- m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_prev); -- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_next); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_prev); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_next); - } - - void -diff --git a/src/ui/element_file_list.cc b/src/ui/element_file_list.cc -index 75ecec0..f23ef23 100644 ---- a/src/ui/element_file_list.cc -+++ b/src/ui/element_file_list.cc -@@ -64,8 +64,8 @@ ElementFileList::ElementFileList(core::Download* d) : - m_selected(iterator(d->download()->file_list()->begin())), - m_collapsed(false) { - -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -- m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_select); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['l'] = m_bindings['F' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_select); - - m_bindings[' '] = sigc::mem_fun(*this, &ElementFileList::receive_priority); - m_bindings['*'] = sigc::mem_fun(*this, &ElementFileList::receive_change_all); -@@ -73,8 +73,8 @@ ElementFileList::ElementFileList(core::Download* d) : - m_bindings[KEY_NPAGE] = sigc::mem_fun(*this, &ElementFileList::receive_pagenext); - m_bindings[KEY_PPAGE] = sigc::mem_fun(*this, &ElementFileList::receive_pageprev); - -- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_next); -- m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_prev); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_next); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_prev); - } - - inline ElementText* -diff --git a/src/ui/element_menu.cc b/src/ui/element_menu.cc -index 04130f3..41779eb 100644 ---- a/src/ui/element_menu.cc -+++ b/src/ui/element_menu.cc -@@ -72,11 +72,11 @@ ElementMenu::ElementMenu() : - m_entry(entry_invalid) { - - // Move bindings into a function that defines default bindings. -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -- m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_select); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['l'] = m_bindings['F' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_select); - -- m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_prev); -- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_next); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_prev); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_next); - } - - ElementMenu::~ElementMenu() { -diff --git a/src/ui/element_peer_list.cc b/src/ui/element_peer_list.cc -index be0e0b4..e38f3a2 100644 ---- a/src/ui/element_peer_list.cc -+++ b/src/ui/element_peer_list.cc -@@ -73,14 +73,14 @@ ElementPeerList::ElementPeerList(core::Download* d) : - - m_elementInfo->slot_exit(sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_LIST)); - -- m_bindings['k'] = sigc::mem_fun(this, &ElementPeerList::receive_disconnect_peer); -+ m_bindings['K'] = sigc::mem_fun(this, &ElementPeerList::receive_disconnect_peer); - m_bindings['*'] = sigc::mem_fun(this, &ElementPeerList::receive_snub_peer); - m_bindings['B'] = sigc::mem_fun(this, &ElementPeerList::receive_ban_peer); -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -- m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_INFO); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['l'] = m_bindings['F' - '@'] = sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_INFO); - -- m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_prev); -- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_next); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_prev); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_next); - } - - ElementPeerList::~ElementPeerList() { -diff --git a/src/ui/element_text.cc b/src/ui/element_text.cc -index a7496f2..a564a81 100644 ---- a/src/ui/element_text.cc -+++ b/src/ui/element_text.cc -@@ -54,7 +54,7 @@ ElementText::ElementText(rpc::target_type target) : - m_columnWidth(0) { - - // Move bindings into a function that defines default bindings. -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - - // m_bindings[KEY_UP] = sigc::mem_fun(this, &ElementText::entry_prev); - // m_bindings[KEY_DOWN] = sigc::mem_fun(this, &ElementText::entry_next); -diff --git a/src/ui/element_tracker_list.cc b/src/ui/element_tracker_list.cc -index 7d81b89..8a51e80 100644 ---- a/src/ui/element_tracker_list.cc -+++ b/src/ui/element_tracker_list.cc -@@ -54,13 +54,13 @@ ElementTrackerList::ElementTrackerList(core::Download* d) : - m_window(NULL), - m_focus(0) { - -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - - m_bindings[' '] = sigc::mem_fun(*this, &ElementTrackerList::receive_cycle_group); - m_bindings['*'] = sigc::mem_fun(*this, &ElementTrackerList::receive_disable); - -- m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_next); -- m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_next); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev); - } - - void -diff --git a/src/ui/element_transfer_list.cc b/src/ui/element_transfer_list.cc -index 50eaec6..83ae26d 100644 ---- a/src/ui/element_transfer_list.cc -+++ b/src/ui/element_transfer_list.cc -@@ -52,10 +52,10 @@ ElementTransferList::ElementTransferList(core::Download* d) : - m_window(NULL), - m_focus(0) { - -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - -- m_bindings[KEY_DOWN] = sigc::mem_fun(*this, &ElementTransferList::receive_next); -- m_bindings[KEY_UP] = sigc::mem_fun(*this, &ElementTransferList::receive_prev); -+ m_bindings['j'] = sigc::mem_fun(*this, &ElementTransferList::receive_next); -+ m_bindings['k'] = sigc::mem_fun(*this, &ElementTransferList::receive_prev); - m_bindings[KEY_NPAGE] = sigc::mem_fun(*this, &ElementTransferList::receive_pagenext); - m_bindings[KEY_PPAGE] = sigc::mem_fun(*this, &ElementTransferList::receive_pageprev); - } diff --git a/rtorrent-extended/vi_kb_tjwoosta.patch b/rtorrent-extended/vi_kb_tjwoosta.patch deleted file mode 100644 index b7ea5ac..0000000 --- a/rtorrent-extended/vi_kb_tjwoosta.patch +++ /dev/null @@ -1,175 +0,0 @@ -diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc -index e72bff6..30b5987 100644 ---- a/src/ui/download_list.cc -+++ b/src/ui/download_list.cc -@@ -350,9 +350,16 @@ DownloadList::setup_keys() { - m_uiArray[DISPLAY_LOG]->bindings()['B' - '@'] = - m_uiArray[DISPLAY_LOG]->bindings()[' '] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD_LIST); - -+ m_uiArray[DISPLAY_LOG]->bindings()['h'] = -+ m_uiArray[DISPLAY_LOG]->bindings()['B' - '@'] = -+ m_uiArray[DISPLAY_LOG]->bindings()[' '] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD_LIST); -+ - m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()[KEY_RIGHT] = - m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['F' - '@'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD); -- m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['l'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_LOG); -+ -+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['l'] = -+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['F' - '@'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_DOWNLOAD); -+ m_uiArray[DISPLAY_DOWNLOAD_LIST]->bindings()['L'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::activate_display), DISPLAY_LOG); - } - - } -diff --git a/src/ui/element_chunks_seen.cc b/src/ui/element_chunks_seen.cc -index 8ee1dd9..5336b05 100644 ---- a/src/ui/element_chunks_seen.cc -+++ b/src/ui/element_chunks_seen.cc -@@ -54,8 +54,12 @@ ElementChunksSeen::ElementChunksSeen(core::Download* d) : - - m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ - m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_next); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_next); - m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_prev); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementChunksSeen::receive_prev); - m_bindings[KEY_NPAGE] = sigc::mem_fun(*this, &ElementChunksSeen::receive_pagenext); - m_bindings[KEY_PPAGE] = sigc::mem_fun(*this, &ElementChunksSeen::receive_pageprev); - } -diff --git a/src/ui/element_download_list.cc b/src/ui/element_download_list.cc -index 1dc9ece..f2763ca 100644 ---- a/src/ui/element_download_list.cc -+++ b/src/ui/element_download_list.cc -@@ -96,7 +96,9 @@ ElementDownloadList::ElementDownloadList() : - m_bindings['9'] = sigc::bind(sigc::mem_fun(*this, &ElementDownloadList::receive_change_view), "active"); - - m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_prev); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_prev); - m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_next); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementDownloadList::receive_next); - } - - void -diff --git a/src/ui/element_file_list.cc b/src/ui/element_file_list.cc -index 75ecec0..a24f429 100644 ---- a/src/ui/element_file_list.cc -+++ b/src/ui/element_file_list.cc -@@ -65,7 +65,9 @@ ElementFileList::ElementFileList(core::Download* d) : - m_collapsed(false) { - - m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_select); -+ m_bindings['l'] = m_bindings['F' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_select); - - m_bindings[' '] = sigc::mem_fun(*this, &ElementFileList::receive_priority); - m_bindings['*'] = sigc::mem_fun(*this, &ElementFileList::receive_change_all); -@@ -74,7 +76,9 @@ ElementFileList::ElementFileList(core::Download* d) : - m_bindings[KEY_PPAGE] = sigc::mem_fun(*this, &ElementFileList::receive_pageprev); - - m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_next); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_next); - m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_prev); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementFileList::receive_prev); - } - - inline ElementText* -diff --git a/src/ui/element_menu.cc b/src/ui/element_menu.cc -index 04130f3..b6b3ee9 100644 ---- a/src/ui/element_menu.cc -+++ b/src/ui/element_menu.cc -@@ -72,11 +72,15 @@ ElementMenu::ElementMenu() : - m_entry(entry_invalid) { - - // Move bindings into a function that defines default bindings. -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_select); -+ m_bindings['l'] = m_bindings['F' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_select); - - m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_prev); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_prev); - m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_next); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementMenu::entry_next); - } - - ElementMenu::~ElementMenu() { -diff --git a/src/ui/element_peer_list.cc b/src/ui/element_peer_list.cc -index be0e0b4..8b7303e 100644 ---- a/src/ui/element_peer_list.cc -+++ b/src/ui/element_peer_list.cc -@@ -73,14 +73,18 @@ ElementPeerList::ElementPeerList(core::Download* d) : - - m_elementInfo->slot_exit(sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_LIST)); - -- m_bindings['k'] = sigc::mem_fun(this, &ElementPeerList::receive_disconnect_peer); -+ m_bindings['K'] = sigc::mem_fun(this, &ElementPeerList::receive_disconnect_peer); - m_bindings['*'] = sigc::mem_fun(this, &ElementPeerList::receive_snub_peer); - m_bindings['B'] = sigc::mem_fun(this, &ElementPeerList::receive_ban_peer); -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - m_bindings[KEY_RIGHT] = m_bindings['F' - '@'] = sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_INFO); -+ m_bindings['l'] = m_bindings['F' - '@'] = sigc::bind(sigc::mem_fun(this, &ElementPeerList::activate_display), DISPLAY_INFO); - - m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_prev); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_prev); - m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_next); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(this, &ElementPeerList::receive_next); - } - - ElementPeerList::~ElementPeerList() { -diff --git a/src/ui/element_text.cc b/src/ui/element_text.cc -index a7496f2..4c2e171 100644 ---- a/src/ui/element_text.cc -+++ b/src/ui/element_text.cc -@@ -54,7 +54,9 @@ ElementText::ElementText(rpc::target_type target) : - m_columnWidth(0) { - - // Move bindings into a function that defines default bindings. -- m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - - // m_bindings[KEY_UP] = sigc::mem_fun(this, &ElementText::entry_prev); - // m_bindings[KEY_DOWN] = sigc::mem_fun(this, &ElementText::entry_next); -diff --git a/src/ui/element_tracker_list.cc b/src/ui/element_tracker_list.cc -index 7d81b89..5584653 100644 ---- a/src/ui/element_tracker_list.cc -+++ b/src/ui/element_tracker_list.cc -@@ -55,12 +55,15 @@ ElementTrackerList::ElementTrackerList(core::Download* d) : - m_focus(0) { - - m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - - m_bindings[' '] = sigc::mem_fun(*this, &ElementTrackerList::receive_cycle_group); - m_bindings['*'] = sigc::mem_fun(*this, &ElementTrackerList::receive_disable); - - m_bindings[KEY_DOWN] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_next); -+ m_bindings['j'] = m_bindings['N' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_next); - m_bindings[KEY_UP] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev); -+ m_bindings['k'] = m_bindings['P' - '@'] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev); - } - - void -diff --git a/src/ui/element_transfer_list.cc b/src/ui/element_transfer_list.cc -index 50eaec6..f14a2d2 100644 ---- a/src/ui/element_transfer_list.cc -+++ b/src/ui/element_transfer_list.cc -@@ -54,8 +54,12 @@ ElementTransferList::ElementTransferList(core::Download* d) : - - m_bindings[KEY_LEFT] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); - -+ m_bindings['h'] = m_bindings['B' - '@'] = sigc::mem_fun(&m_slotExit, &slot_type::operator()); -+ - m_bindings[KEY_DOWN] = sigc::mem_fun(*this, &ElementTransferList::receive_next); -+ m_bindings['j'] = sigc::mem_fun(*this, &ElementTransferList::receive_next); - m_bindings[KEY_UP] = sigc::mem_fun(*this, &ElementTransferList::receive_prev); -+ m_bindings['k'] = sigc::mem_fun(*this, &ElementTransferList::receive_prev); - m_bindings[KEY_NPAGE] = sigc::mem_fun(*this, &ElementTransferList::receive_pagenext); - m_bindings[KEY_PPAGE] = sigc::mem_fun(*this, &ElementTransferList::receive_pageprev); - } diff --git a/rxvt-unicode-256color/PKGBUILD b/rxvt-unicode-256color/PKGBUILD deleted file mode 100644 index 2acebb0..0000000 --- a/rxvt-unicode-256color/PKGBUILD +++ /dev/null @@ -1,65 +0,0 @@ -# Contributor: tobias <tobias@archlinux.org> -# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org -# Contributer: N30N <archlinux@alunamation.com> -# Contributor: Florian Pritz <f-p@gmx.at> -# Contributor: RayNbow <ShinNoNoir@gmail.com> -# Contributor: Oliver Mader <dotb52@gmail.com> - -pkgname="rxvt-unicode-256color" -pkgver=9.06 -pkgrel=3 -pkgdesc="a unicode enabled rxvt-clone terminal emulator (urxvt), with 256 colour support" -arch=("i686" "x86_64") -depends=("gcc-libs" "libxft") -makedepends=("ncurses" "perl" "pkgconfig") -optdepends=("gtk2-perl: for urxvt-tabbed usage") -url="http://software.schmorp.de/pkg/rxvt-unicode.html" -license=("GPL2") -source=("rxvt-unicode.desktop" \ - "rxvt-unicode.png" \ - "font-width-fix.patch" \ - "gcc4.4.patch" \ - http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-${pkgver}.tar.bz2) -md5sums=("ef2dfa44a86cae36a60f45559d8ad783" \ - "84328cada91751df07324d95f8be4d1b" \ - "df0c3a8b6bb0578d1b91e4081c47881c" - "1b9b112df2204e1e58c66bf2d5776422" \ - "4cb9330e99fc0b0b05cebf3581557dd8") -provides=("rxvt-unicode") -conflicts=("rxvt-unicode") -replaces=("rxvt-unicode-256color-fontfix") - -build() { - cd ${srcdir}/rxvt-unicode-${pkgver} - - # Add 256 color support - patch -p1 -i doc/urxvt-8.2-256color.patch || return 1 - - # Fix font width bug fix - patch -p0 -i ${srcdir}/font-width-fix.patch || return 1 - - # Port to compile with GCC4.4 - patch -p0 -i ${srcdir}/gcc4.4.patch || return 1 - - ./configure --prefix=/usr \ - --with-terminfo=/usr/share/terminfo \ - --with-term=rxvt-256color \ - --enable-smart-resize \ - --disable-iso14755 - - msg "Starting build process." - make || return 1 - install -d ${pkgdir}/usr/share/terminfo - TERMINFO=${pkgdir}/usr/share/terminfo - make DESTDIR=${pkgdir} install - - # install the tabbing wrapper - sed -i 's/\"rxvt\"/"urxvt"/' doc/rxvt-tabbed - install -D -m755 doc/rxvt-tabbed ${startdir}/pkg/usr/bin/urxvt-tabbed - - # install freedesktop menu and icon ( icon from cvs checkout ) - install -D -m644 ${srcdir}/rxvt-unicode.desktop \ - ${pkgdir}/usr/share/applications/rxvt-unicode.desktop - install -Dm644 ${srcdir}/rxvt-unicode.png \ - ${pkgdir}/usr/share/pixmaps/rxvt-unicode.png -} diff --git a/rxvt-unicode-256color/font-width-fix.patch b/rxvt-unicode-256color/font-width-fix.patch deleted file mode 100644 index 811d9e6..0000000 --- a/rxvt-unicode-256color/font-width-fix.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- src/rxvtfont.C.bukind 2007-11-30 14:36:33.000000000 +0600 -+++ src/rxvtfont.C 2007-11-30 14:39:29.000000000 +0600 -@@ -1171,12 +1171,21 @@ - XGlyphInfo g; - XftTextExtents16 (disp, f, &ch, 1, &g); - -+/* -+ * bukind: don't use g.width as a width of a character! -+ * instead use g.xOff, see e.g.: http://keithp.com/~keithp/render/Xft.tutorial -+ - g.width -= g.x; - - int wcw = WCWIDTH (ch); - if (wcw > 0) g.width = (g.width + wcw - 1) / wcw; - - if (width < g.width ) width = g.width; -+ */ -+ int wcw = WCWIDTH (ch); -+ if (wcw > 1) g.xOff = g.xOff / wcw; -+ if (width < g.xOff) width = g.xOff; -+ - if (height < g.height ) height = g.height; - if (glheight < g.height - g.y) glheight = g.height - g.y; - } - - diff --git a/rxvt-unicode-256color/gcc4.4.patch b/rxvt-unicode-256color/gcc4.4.patch deleted file mode 100644 index b854a1f..0000000 --- a/rxvt-unicode-256color/gcc4.4.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/command.C.old 2009-05-28 15:21:04.457772957 +0200 -+++ src/command.C 2009-05-28 15:18:52.684597530 +0200 -@@ -3336,7 +3336,7 @@ - } - else - { -- char *eq = strchr (str, '='); // constness lost, but verified to be ok -+ char *eq = (char *) strchr ( str, '='); // constness lost, but verified to be ok - - if (eq) - { ---- src/misc.C.old 2009-05-28 15:21:16.400270603 +0200 -+++ src/misc.C 2009-05-28 15:21:51.697108339 +0200 -@@ -170,7 +170,7 @@ - char * - rxvt_basename (const char *str) NOTHROW - { -- char *base = strrchr (str, '/'); -+ char *base = (char *) strrchr (str, '/'); - - return (char *) (base ? base + 1 : str); - } diff --git a/rxvt-unicode-256color/rxvt-unicode.desktop b/rxvt-unicode-256color/rxvt-unicode.desktop deleted file mode 100644 index c616994..0000000 --- a/rxvt-unicode-256color/rxvt-unicode.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=rxvt-unicode -Comment=An Unicode capable rxvt clone -Exec=urxvt -Icon=rxvt-unicode -Terminal=false -Type=Application -Categories=System;TerminalEmulator; diff --git a/rxvt-unicode-256color/rxvt-unicode.png b/rxvt-unicode-256color/rxvt-unicode.png Binary files differdeleted file mode 100644 index 0738a78..0000000 --- a/rxvt-unicode-256color/rxvt-unicode.png +++ /dev/null diff --git a/savage2/PKGBUILD b/savage2/PKGBUILD deleted file mode 100644 index 63549f6..0000000 --- a/savage2/PKGBUILD +++ /dev/null @@ -1,59 +0,0 @@ -# Contributor: Slash <demodevil5 [at] yahoo [dot] com> -# Contributor: Ali H. Caliskan <ali.h.caliskan@gmail.com> -# Contributor: Xavier <shiningxc[at]gmail[dot]com> - -pkgname=savage2 -pkgver=2.1.0.1 -pkgrel=3 -pkgdesc="Savage 2: A Tortured Soul is an fantasy themed online multiplayer team-based FPS/RTS/RPG hybrid. Completely free as of December 2008." -arch=('i686' 'x86_64') -url='http://savage2.com/' -license=('custom: "Savage 2"') -depends=('mesa' 'libxml2') -makedepends=('unzip') -install=savage2.install -source=("http://188.40.92.72/Savage2Install-$pkgver-$CARCH.bin" \ -'savage2.launcher' 'savage2.desktop' 's2editor.desktop' 's2mviewer.desktop') -md5sums=('1ff815b9e864862d6d2cf6c635278b80' - 'fb03853628775f66689852a4125044e8' - 'a6957bb87da35d58df86d84a6dca1479' - 'b082a33fd1a580d3c70d80bbbfb0bffe' - '177155e2c2c4e1382ce9b1343e26b5c7') -[ "$CARCH" = "x86_64" ] && md5sums[0]='78a5df8adc008e2c7493bab9f66a3092' - -build() { - cd $srcdir - - # Create Destination Directory - install -d $pkgdir/opt/savage2 - - # Extract Game Data from Installer - unzip -o $srcdir/Savage2Install-$pkgver-$CARCH.bin && return 0 - - # Install Savage 2 Data - cp -r $srcdir/data/* $pkgdir/opt/savage2 - - # Install Game Launcher - install -D -m 755 $srcdir/savage2.launcher \ - $pkgdir/usr/bin/savage2 - - # Install Desktop File (Game Client) - install -D -m 644 $srcdir/savage2.desktop \ - $pkgdir/usr/share/applications/savage2.desktop - - # Install Desktop File (Map Editor) - install -D -m 644 $srcdir/s2editor.desktop \ - $pkgdir/usr/share/applications/s2editor.desktop - - # Install Desktop File (Model Viewer) - install -D -m 644 $srcdir/s2mviewer.desktop \ - $pkgdir/usr/share/applications/s2mviewer.desktop - - # Install Icon - install -D -m 644 $srcdir/data/s2icon.png \ - $pkgdir/usr/share/pixmaps/savage2.png - - # Install License - install -D -m 644 $srcdir/data/license.txt \ - $pkgdir/usr/share/licenses/$pkgname/license.txt -} diff --git a/savage2/s2editor.desktop b/savage2/s2editor.desktop deleted file mode 100644 index 542b862..0000000 --- a/savage2/s2editor.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Savage 2 Map Editor -GenericName=Savage 2 Map Editor -Comment=Map Editor for Savage 2: A Tortured Soul -Exec=/usr/bin/savage2 "PushMod editor; Set host_autoExec StartClient" -Icon=/usr/share/pixmaps/savage2.png -StartupNotify=true -Terminal=false -Type=Application -Categories=Application;Game diff --git a/savage2/s2mviewer.desktop b/savage2/s2mviewer.desktop deleted file mode 100644 index fda6815..0000000 --- a/savage2/s2mviewer.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Savage 2 Model Viewer -GenericName=Savage 2 Model Viewer -Comment=Model Viewer for Savage 2: A Tortured Soul -Exec=/usr/bin/savage2 "PushMod modelviewer; Set host_autoExec StartClient" -Icon=/usr/share/pixmaps/savage2.png -StartupNotify=true -Terminal=false -Type=Application -Categories=Application;Game diff --git a/savage2/savage2.desktop b/savage2/savage2.desktop deleted file mode 100644 index e4e6094..0000000 --- a/savage2/savage2.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Savage 2 -GenericName=Savage 2 -Comment=Savage 2: A Tortured Soul -Exec=/usr/bin/savage2 -Icon=/usr/share/pixmaps/savage2.png -StartupNotify=true -Terminal=false -Type=Application -Categories=Application;Game diff --git a/savage2/savage2.install b/savage2/savage2.install deleted file mode 100644 index c17c61b..0000000 --- a/savage2/savage2.install +++ /dev/null @@ -1,18 +0,0 @@ -post_install() { - # Update runpath - cd /opt/savage2 - ./savage2_update.bin --update-runpath -} - -post_upgrade() { - post_install $1 -} - -post_remove() { - echo "==> To completely remove Savage 2, you will need to manually remove" - echo "==> /opt/savage2/ as root" -} - -op=$1 -shift -$op $* diff --git a/savage2/savage2.launcher b/savage2/savage2.launcher deleted file mode 100644 index 2e09363..0000000 --- a/savage2/savage2.launcher +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -cd "/opt/savage2" -./savage2.bin $* -exit $? - diff --git a/screen/PKGBUILD b/screen/PKGBUILD deleted file mode 100644 index 951723a..0000000 --- a/screen/PKGBUILD +++ /dev/null @@ -1,51 +0,0 @@ -# $Id: PKGBUILD 40237 2009-05-29 00:52:11Z allan $ -# Maintainer: Allan McRae <allan@archlinux.org> -# Committer: dorphell <dorphell@gmx.net> - -pkgname=screen -pkgver=4.0.3 -pkgrel=8 -_ptygroup=5 #the UID of our PTY/TTY group -pkgdesc="Full-screen window manager that multiplexes a physical terminal" -arch=('i686' 'x86_64') -url="http://www.gnu.org/software/screen/" -license=('GPL') -depends=('ncurses' 'pam') -backup=('etc/screenrc' 'etc/pam.d/screen') -options=('!makeflags') -install=screen.install -source=(ftp://ftp.uni-erlangen.de/pub/utilities/screen/screen-${pkgver}.tar.gz \ - screen.pam widescreen.patch) - -build() { - export LDFLAGS="${LDFLAGS} -Wl,--as-needed" - - cd ${srcdir}/${pkgname}-${pkgver} - patch -p0 < $srcdir/widescreen.patch - ./configure --prefix=/usr --enable-pam \ - --with-sys-screenrc=/etc/screenrc --enable-colors256 \ - --enable-rxvt_osc --with-pty-group=$_ptygroup \ - --mandir=/usr/share/man --infodir=/usr/share/info - make || return 1 - make DESTDIR=${pkgdir} install || return 1 - install -Dm644 ${srcdir}/screen.pam ${pkgdir}/etc/pam.d/screen - - install -Dm644 etc/completer.zsh ${pkgdir}/usr/share/zsh/site-functions/screen - install -Dm644 etc/etcscreenrc ${pkgdir}/etc/screenrc - install -Dm644 etc/screenrc ${pkgdir}/etc/skel/.screenrc - - rm ${pkgdir}/usr/share/info/dir - gzip -9 ${pkgdir}/usr/share/info/* -} -md5sums=('8506fd205028a96c741e4037de6e3c42' - '74f7919d7b65436cc2ea5341fa8ca374' - '1496b6bd2ffd64a15a0381cba5cb3e86') -sha1sums=('7bc6e2f0959ffaae6f52d698c26c774e7dec3545' - '1ab4b512d2ac840d16db6986d7c98d7ce2f6383f' - '5363335b4d940ac5fa5e31feae976f500099ec20') -md5sums=('8506fd205028a96c741e4037de6e3c42' - '74f7919d7b65436cc2ea5341fa8ca374' - 'e6e382cb512b43b4ec06fd9b1e8262af') -sha1sums=('7bc6e2f0959ffaae6f52d698c26c774e7dec3545' - '1ab4b512d2ac840d16db6986d7c98d7ce2f6383f' - '75238d37fe40bda0b3debe1abb6f0777015c8185') diff --git a/screen/screen.install b/screen/screen.install deleted file mode 100644 index 3ef5757..0000000 --- a/screen/screen.install +++ /dev/null @@ -1,42 +0,0 @@ -infodir=/usr/share/info -filelist=(screen.info screen.info-1 screen.info-2 screen.info-3 screen.info-4 screen.info-5) - -post_install() { - [ -x usr/bin/install-info ] || return 0 - for file in ${filelist[@]}; do - install-info $infodir/$file.gz $infodir/dir 2> /dev/null - done -} - -pre_upgrade() { - compiled="/usr/share/terminfo/s/screen-256color" - if [ -e $compiled ]; then - if pacman -Qo $compiled 2>&1 | grep "No package owns" >/dev/null; then - echo -n "removing compiled terminfo..." - rm -f $compiled - echo "done." - fi - fi - compiled="/usr/share/terminfo/s/screen-256color-bce" - if [ -e $compiled ]; then - if pacman -Qo $compiled 2>&1 | grep "No package owns" >/dev/null; then - echo -n "removing compiled terminfo..." - rm -f $compiled - echo "done." - fi - fi -} - -post_upgrade() { - post_install $1 -} - -pre_remove() { - pre_upgrade $* - - [ -x usr/bin/install-info ] || return 0 - for file in ${filelist[@]}; do - install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null - done -} - diff --git a/screen/screen.pam b/screen/screen.pam deleted file mode 100644 index 07c42ad..0000000 --- a/screen/screen.pam +++ /dev/null @@ -1 +0,0 @@ -auth required pam_unix.so diff --git a/screen/widescreen.patch b/screen/widescreen.patch deleted file mode 100644 index ce969c3..0000000 --- a/screen/widescreen.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nbaur screen-4.0.3-orig//screen.h screen-4.0.3/screen.h ---- screen.h.orig 2003-08-22 14:28:43.000000000 +0200 -+++ screen.h 2009-09-15 12:19:02.000000000 +0200 -@@ -86,7 +86,7 @@ - - #define Ctrl(c) ((c)&037) - --#define MAXSTR 256 -+#define MAXSTR 512 - #define MAXARGS 64 - #define MSGWAIT 5 - #define MSGMINWAIT 1 - diff --git a/siege/PKGBUILD b/siege/PKGBUILD deleted file mode 100644 index 7086fe6..0000000 --- a/siege/PKGBUILD +++ /dev/null @@ -1,24 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> -# Contributor: Sven Kauber <celeon@gmail.com> - -pkgname=siege -pkgver=2.70 -pkgrel=1 -arch=('i686' 'x86_64') -license=('GPL') -pkgdesc="An http regression testing and benchmarking utility" -url="http://www.joedog.org/JoeDog/Siege" -depends=('openssl') -source=("ftp://sid.joedog.org/pub/siege/${pkgname}-${pkgver}.tar.gz") - -build() { - mkdir -p ${pkgdir}/usr - cd ${srcdir}/$pkgname-$pkgver - ./configure --prefix=/usr - make || return 1 - install -d -m755 "$pkgdir/etc" - make prefix=${pkgdir} install - mv ${pkgdir}/{bin,man} ${pkgdir}/usr/ - find ${pkgdir} -name '*.la' -delete; -} -md5sums=('835c7a0606851357ebf03084ff546310') diff --git a/smplayer-svn/PKGBUILD b/smplayer-svn/PKGBUILD deleted file mode 100644 index 90449dd..0000000 --- a/smplayer-svn/PKGBUILD +++ /dev/null @@ -1,57 +0,0 @@ -# Creator: Flamelab <panosfilip@gmail.com> -# Parts have been adopted by the previous contributor, AddictedToChaos and by the user "urandom" -# Fixes by: WAntilles <wantilles@adslgr.com> - -pkgname=smplayer-svn -pkgver=3592 -pkgrel=1 -_latestver=0.6.9 -pkgdesc="A complete front-end for MPlayer" -arch=('i686' 'x86_64') -url="http://smplayer.sourceforge.net/" -license=('GPL') -depends=('qt>=4.7.1' 'mplayer>=32663') -makedepends=('subversion') -conflicts=('smplayer') -provides=("smplayer=${_latestver}") - -_svnmod="smplayer" -_svntrunk=https://smplayer.svn.sourceforge.net/svnroot/smplayer/smplayer/trunk/ - - -build() - -{ - cd "${srcdir}" - - if [ -d $_svnmod/.svn ]; then - (cd $_svnmod && svn up -r $pkgver) - else - svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod - fi - - msg "SVN checkout done or server timeout" - msg "Starting make..." - - if [ -d $_svnmod-build ];then - rm -r $_svnmod-build - fi - cp -r $_svnmod $_svnmod-build - cd $_svnmod-build - - - # remove broken translation - sed -i "s|translations/smplayer_gl.ts|#translations/smplayer_gl.ts|" src/smplayer.pro || return 1 - - sed -i 's/PREFIX=.*/PREFIX=\/usr/' Makefile || return 1 - make PREFIX=/usr || return 1 - make DESTDIR=${pkgdir} PREFIX=/usr KDE_PREFIX=/usr install || return 1 - - install -dm755 ${pkgdir}/usr/share/pixmaps - ln -s ${pkgdir}/usr/share/icons/hicolor/64x64/apps/smplayer.png ${pkgdir}/usr/share/pixmaps/ - - sed -i 's|Exec=smplayer %U|Exec=smplayer %F|' ${pkgdir}/usr/share/applications/smplayer.desktop || return 1 - sed -i 's|Exec=smplayer -add-to-playlist %U|Exec=smplayer -add-to-playlist %F|' ${pkgdir}/usr/share/applications/smplayer_enqueue.desktop || return 1 - -} -md5sums=('7da2927266bc73a69a4dac0fae54c750') diff --git a/smplayer-svn/smplayer-svn.install b/smplayer-svn/smplayer-svn.install deleted file mode 100644 index 25ab05f..0000000 --- a/smplayer-svn/smplayer-svn.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install() { - cat <<-EndOfMessage - >>> If you want dvdvav support, check here: - >>> http://smplayer.berlios.de/forums/viewtopic.php?pid=4124 - EndOfMessage - /bin/true -} - -post_upgrade() { - post_install -} - diff --git a/smtp-cli/PKGBUILD b/smtp-cli/PKGBUILD deleted file mode 100644 index 7ba2f0b..0000000 --- a/smtp-cli/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Contributor: Florian "Bluewind" Pritz <flo@xssn.at> -pkgname=smtp-cli -pkgver=2.6 -pkgrel=1 -pkgdesc="powerful smtp cli client for testing or sending" -arch=('any') -url="http://www.logix.cz/michal/devel/smtp-cli/" -license=('GPL') -depends=('perl-io-socket-ssl' 'perl-digest-hmac' 'perl-term-readkey' 'perl-mime-lite' 'perl-file-type') -source=(http://www.logix.cz/michal/devel/smtp-cli/smtp-cli) - -build() { - cd "$srcdir" - install -D -m755 $pkgname $pkgdir/usr/bin/$pkgname -} - -# vim:set ts=2 sw=2 et: -md5sums=('df21b66ba2d91df8072c70f8970be563') -sha1sums=('6f008a00d59f2239c0b29fb1bd35c0d744518a91') diff --git a/smtp-cli/smtp-cli b/smtp-cli/smtp-cli deleted file mode 100644 index b732219..0000000 --- a/smtp-cli/smtp-cli +++ /dev/null @@ -1,814 +0,0 @@ -#!/usr/bin/perl - -# -# Command line SMTP client with STARTTLS, SMTP-AUTH and IPv6 support. -# Michal Ludvig <michal@logix.cz>, 2003-2009 -# See http://www.logix.cz/michal/devel/smtp-cli for details. -# Thanks to all contributors for ideas and fixes! -# - -my $version = "2.6"; - -# -# ChangeLog: -# * Version 2.6 (2009-08-05) -# - Message building fixed for plaintext+attachment case. -# - Auto-enable AUTH as soon as --user parameter is used. -# (previously --enable-auth or --auth-plain had to be used -# together with --user, that was confusing). -# - New --print-only parameter for displaying the composed -# MIME message without sending. -# - All(?) non-standard modules are now optional. -# - Displays local and remote address on successfull connect. -# -# * Version 2.5 (2009-07-21) -# - IPv6 support provided the required modules are -# available. -# -# * Version 2.1 (2008-12-08) -# - Make the MIME modules optional. Simply disable -# the required functionality if they're not available. -# -# * Version 2.0 (2008-11-18) -# - Support for message building through MIME::Lite, -# including attachments, multipart, etc. -# -# * Version 1.1 (2006-08-26) -# - STARTTLS and AUTH support -# -# * Version 1.0 -# - First public version -# -# This program is licensed under GNU Public License v3 (GPLv3) -# - -## Require Perl 5.8 or higher -> we need open(.., .., \$variable) construct -require 5.008; - -use strict; -use IO::Socket::INET; -use MIME::Base64 qw(encode_base64 decode_base64); -use Getopt::Long; -use Socket qw(:DEFAULT :crlf); - -my ($user, $pass, $host, $port, $addr_family, - $use_login, $use_plain, $use_cram_md5, - $ehlo_ok, $auth_ok, $starttls_ok, $verbose, - $hello_host, $from, @to, $datasrc, - $missing_modules_ok, $missing_modules_count, - $subject, $body_plain, $body_html, $print_only, - @attachments, @attachments_inline, - $sock, $built_message); - -$host = 'localhost'; -$port = 'smtp(25)'; -$addr_family = AF_UNSPEC; -$hello_host = 'localhost'; -$verbose = 0; -$use_login = 0; -$use_plain = 0; -$use_cram_md5 = 0; -$starttls_ok = 1; -$auth_ok = 0; -$ehlo_ok = 1; -$missing_modules_ok = 0; -$missing_modules_count = 0; -$print_only = 0; - -# Get command line options. -GetOptions ( - 'host|server=s' => \$host, - 'port=i' => \$port, - '4|ipv4' => sub { $addr_family = AF_INET; }, - '6|ipv6' => sub { $addr_family = AF_INET6; }, - 'user=s' => \$user, 'password=s' => \$pass, - 'auth-login' => \$use_login, - 'auth-plain' => \$use_plain, - 'auth-cram-md5' => \$use_cram_md5, - 'disable-ehlo' => sub { $ehlo_ok = 0; }, - 'force-ehlo' => sub { $ehlo_ok = 2; }, - 'hello-host|ehlo-host|helo-host=s' => \$hello_host, - 'auth|enable-auth' => \$auth_ok, - 'disable-starttls|disable-tls|disable-ssl' => - sub { $starttls_ok = 0; }, - 'from|mail-from=s' => \$from, - 'to|rcpt-to=s' => \@to, - 'data=s' => \$datasrc, - 'subject=s' => \$subject, - 'body|body-plain=s' => \$body_plain, - 'body-html=s' => \$body_html, - 'attachment|attach=s' => \@attachments, - 'attachment-inline|attach-inline=s' => \@attachments_inline, - 'print-only' => \$print_only, - 'missing-modules-ok' => \$missing_modules_ok, - 'v|verbose+' => \$verbose, - 'version' => sub { &version() }, - 'help' => sub { &usage() } ); - -#### Try to load optional modules - -## IO::Socket::SSL and Net::SSLeay are optional -my $have_ssl = eval { require IO::Socket::SSL; require Net::SSLeay; 1; }; -if (not $have_ssl and not $missing_modules_ok) { - warn("!!! IO::Socket::SSL and/or Net::SSLeay modules are not found\n"); - warn("!!! These modules are required for STARTTLS support\n"); - $missing_modules_count += 2; -} - -## IO::Socket::INET6 and Socket6 are optional -my $socket6 = eval { require IO::Socket::INET6; require Socket6; 1; }; -if (not $socket6) { - if ($addr_family == AF_INET6) { - die("!!! IO::Socket::INET6 and Socket6 modules are not found\nIPv6 support is not available\n"); - } - if (not $missing_modules_ok) { - warn("!!! IO::Socket::INET6 -- optional module not found\n"); - warn("!!! Socket6 -- optional module not found\n"); - warn("!!! These modules are required for IPv6 support\n\n"); - $missing_modules_count += 2; - } -} - -## MIME::Lite dependency is optional -my $mime_lite = eval { require MIME::Lite; 1; }; -if (not $mime_lite and not $missing_modules_ok) { - warn("!!! MIME::Lite -- optional module not found\n"); - warn("!!! Used for composing messages from --subject, --body, --attachment, etc.\n\n"); - $missing_modules_count++; -} - -## File::Type dependency is optional -my $file_type = eval { require File::Type; File::Type->new(); }; -if (not $file_type and not $missing_modules_ok) { - warn("!!! File::Type -- optional module not found\n"); - warn("!!! Used for guessing MIME types of attachments\n\n"); - $missing_modules_count++; -} - -## Term::ReadKey dependency is optional -my $have_term_readkey = eval { require Term::ReadKey; 1; }; -if (not $have_term_readkey and not $missing_modules_ok) { - warn("!!! Term::ReadKey -- optional module not found\n"); - warn("!!! Used for hidden reading SMTP password from the terminal\n\n"); - $missing_modules_count++; -} - -my $have_hmac_md5 = eval { require Digest::HMAC_MD5; 1; }; -if (not $have_hmac_md5 and not $missing_modules_ok) { - if ($use_cram_md5) { - die("!!! CRAM-MD5 authentication is not available because Digest::HMAC_MD5 module is missing\n"); - } - warn("!!! Digest::HMAC_MD5 -- optional module missing\n"); - warn("!!! Used for CRAM-MD5 authentication method\n"); - $missing_modules_count++; -} - -## Advise about --missing-modules-ok parameter -if ($missing_modules_count) { - warn("!!! Use --missing-modules-ok if you don't need the above listed modules\n"); - warn("!!! and don't want to see this message again.\n\n"); -} - -## Accept hostname with port number as host:port -if ($host =~ /^(.*):(.*)$/) -{ - $host = $1; - $port = $2; -} - -# Build the MIME message if required -if (defined($subject) or defined($body_plain) or defined($body_html) or - defined(@attachments) or defined(@attachments_inline)) { - if (not $mime_lite) { - die("Module MIME::Lite is not available. Unable to build the message, sorry.\n". - "Use --data and provide a complete email payload including headers instead.\n"); - } - if (defined($datasrc)) { - die("Requested building a message and at the same time used --data parameter.\n". - "That's not possible, sorry.\n"); - } - if (defined($body_plain) and -f $body_plain) { - local $/=undef; - open(FILE, $body_plain); - $body_plain = <FILE>; - close(FILE); - } - if (defined($body_html) and -f $body_html) { - local $/=undef; - open(FILE, $body_html); - $body_html = <FILE>; - close(FILE); - } - my $message = &build_message(); - - open(BUILT_MESSAGE, "+>", \$built_message); - $datasrc = "///built_message"; - if ($print_only) { - $message->print(); - exit(0); - } else { - $message->print(\*BUILT_MESSAGE); - } - seek(BUILT_MESSAGE, 0, 0); -} - -# Username was given -> enable AUTH -if ($user) - { $auth_ok = 1; } - -# If at least one --auth-* option was given, enable AUTH. -if ($use_login + $use_plain + $use_cram_md5 > 0) - { $auth_ok = 1; } - -# If --enable-auth was given, enable all AUTH methods. -elsif ($auth_ok && ($use_login + $use_plain + $use_cram_md5 == 0)) -{ - $use_login = 1; - $use_plain = 1; - $use_cram_md5 = 1 if ($have_hmac_md5); -} - -# Exit if user haven't specified username for AUTH. -if ($auth_ok && !defined ($user)) - { die ("SMTP AUTH support requested without --user\n"); } - -# Ask for password if it wasn't supplied on the command line. -if ($auth_ok && defined ($user) && !defined ($pass)) -{ - if ($have_term_readkey) { - # Set echo off. - Term::ReadKey::ReadMode (2); - } else { - warn ("Module Term::ReadKey not available - password WILL NOT be hidden!!!\n"); - } - printf ("Enter password for %s@%s : ", $user, $host); - $pass = <>; - if ($have_term_readkey) { - # Restore echo. - Term::ReadKey::ReadMode (0); - printf ("\n"); - } - exit if (! defined ($pass)); - chop ($pass); -} - -# Connect to the SMTP server. -my %connect_args = ( - PeerAddr => $host, - PeerPort => $port, - Proto => 'tcp', - Timeout => 5); -if ($socket6) { - $connect_args{'Domain'} = $addr_family; - $sock = IO::Socket::INET6->new(%connect_args) or die ("Connect failed: $@\n"); -} else { - $sock = IO::Socket::INET->new(%connect_args) or die ("Connect failed: $@\n"); -} - -if ($verbose >= 1) { - my $addr_fmt = "%s"; - $addr_fmt = "[%s]" if ($sock->sockhost() =~ /:/); ## IPv6 connection - - printf ("Connection from $addr_fmt:%s to $addr_fmt:%s\n", - $sock->sockhost(), $sock->sockport(), - $sock->peerhost(), $sock->peerport()); -} - -my ($code, $text); -my (%features); - -# Wait for the welcome message of the server. -($code, $text) = &get_line ($sock); -die ("Unknown welcome string: '$code $text'\n") if ($code != 220); -$ehlo_ok-- if ($text !~ /ESMTP/); - -# Send EHLO -&say_hello ($sock, $ehlo_ok, $hello_host, \%features) or exit (1); - -# Run the SMTP session -&run_smtp (); - -# Good bye... -&send_line ($sock, "QUIT\n"); -($code, $text) = &get_line ($sock); -die ("Unknown QUIT response '$code'.\n") if ($code != 221); - -exit 0; - -# This is the main SMTP "engine". -sub run_smtp -{ - # See if we could start encryption - if ((defined ($features{'STARTTLS'}) || defined ($features{'TLS'})) && $starttls_ok && !$have_ssl) - { - warn ("Module IO::Socket::SSL is missing - STARTTLS support disabled.\n"); - warn ("Use --disable-starttls or install the modules to avoid this warning.\n"); - undef ($features{'STARTTLS'}); - undef ($features{'TLS'}); - } - - if ((defined ($features{'STARTTLS'}) || defined ($features{'TLS'})) && $starttls_ok) - { - printf ("Starting TLS...\n") if ($verbose >= 1); - - # Do Net::SSLeay initialization - Net::SSLeay::load_error_strings(); - Net::SSLeay::SSLeay_add_ssl_algorithms(); - Net::SSLeay::randomize(); - - &send_line ($sock, "STARTTLS\n"); - ($code, $text) = &get_line ($sock); - die ("Unknown STARTTLS response '$code'.\n") if ($code != 220); - - if (! IO::Socket::SSL::socket_to_SSL($sock, - SSL_version => 'SSLv3 TLSv1')) - { - die ("STARTTLS: ".IO::Socket::SSL::errstr()."\n"); - } - - if ($verbose >= 1) - { - printf ("Using cipher: %s\n", $sock->get_cipher ()); - printf ("%s", $sock->dump_peer_certificate()); - } - - # Send EHLO again (required by the SMTP standard). - &say_hello ($sock, $ehlo_ok, $hello_host, \%features) or return 0; - } - - # See if we should authenticate ourself - if (defined ($features{'AUTH'}) && $auth_ok) - { - printf ("AUTH method (%s): ", $features{'AUTH'}) if ($verbose >= 1); - - ## Try DIGEST-MD5 first - # Actually we won't. It never worked reliably here. - # After all DIGEST-MD5 is on a way to deprecation - # see this thread: http://www.imc.org/ietf-sasl/mail-archive/msg02996.html - - # Instead use CRAM-MD5 if supported by the server - if ($features{'AUTH'} =~ /CRAM-MD5/i && $use_cram_md5) - { - printf ("using CRAM-MD5\n") if ($verbose >= 1); - &send_line ($sock, "AUTH CRAM-MD5\n"); - ($code, $text) = &get_line ($sock); - if ($code != 334) - { die ("AUTH CRAM-MD5 failed: $code $text\n"); } - - my $response = &encode_cram_md5 ($text, $user, $pass); - &send_line ($sock, "%s\n", $response); - ($code, $text) = &get_line ($sock); - if ($code != 235) - { die ("AUTH CRAM-MD5 failed: $code $text\n"); } - } - # Eventually try LOGIN method - elsif ($features{'AUTH'} =~ /LOGIN/i && $use_login) - { - printf ("using LOGIN\n") if ($verbose >= 1); - &send_line ($sock, "AUTH LOGIN\n"); - ($code, $text) = &get_line ($sock); - if ($code != 334) - { die ("AUTH LOGIN failed: $code $text\n"); } - - &send_line ($sock, "%s\n", encode_base64 ($user, "")); - - ($code, $text) = &get_line ($sock); - if ($code != 334) - { die ("AUTH LOGIN failed: $code $text\n"); } - - &send_line ($sock, "%s\n", encode_base64 ($pass, "")); - - ($code, $text) = &get_line ($sock); - if ($code != 235) - { die ("AUTH LOGIN failed: $code $text\n"); } - } - # Or finally PLAIN if nothing else was supported. - elsif ($features{'AUTH'} =~ /PLAIN/i && $use_plain) - { - printf ("using PLAIN\n") if ($verbose >= 1); - &send_line ($sock, "AUTH PLAIN %s\n", - encode_base64 ("$user\0$user\0$pass", "")); - ($code, $text) = &get_line ($sock); - if ($code != 235) - { die ("AUTH PLAIN failed: $code $text\n"); } - } - # Complain otherwise. - else - { - warn ("No supported authentication method\n". - "advertised by the server.\n"); - return 0; - } - - printf ("Authentication of $user\@$host succeeded\n") if ($verbose >= 1); - } - - # We can do a relay-test now if a recipient was set. - if ($#to >= 0) - { - if (!defined ($from)) - { - warn ("From: address not set. Using empty one.\n"); - $from = ""; - } - &send_line ($sock, "MAIL FROM: <%s>\n", $from); - ($code, $text) = &get_line ($sock); - if ($code != 250) - { - warn ("MAIL FROM failed: '$code $text'\n"); - return 0; - } - - my $i; - for ($i=0; $i <= $#to; $i++) - { - &send_line ($sock, "RCPT TO: <%s>\n", $to[$i]); - ($code, $text) = &get_line ($sock); - if ($code != 250) - { - warn ("RCPT TO <".$to[$i]."> ". - "failed: '$code $text'\n"); - return 0; - } - } - } - - # Wow, we should even send something! - if (defined ($datasrc)) - { - if ($datasrc eq "///built_message") - { - *MAIL = *BUILT_MESSAGE; - } - elsif ($datasrc eq "-") - { - *MAIL = *STDIN; - } - elsif (!open (MAIL, $datasrc)) - { - warn ("Can't open file '$datasrc'\n"); - return 0; - } - - &send_line ($sock, "DATA\n"); - ($code, $text) = &get_line ($sock); - if ($code != 354) - { - warn ("DATA failed: '$code $text'\n"); - return 0; - } - - while (<MAIL>) - { - my $line = $_; - $line =~ s/^\.$CRLF$/\. $CRLF/; - $line =~ s/^\.\n$/\. $CRLF/; - $sock->print ($line); - } - - close (MAIL); - - $sock->printf ("$CRLF.$CRLF"); - - ($code, $text) = &get_line ($sock); - if ($code != 250) - { - warn ("DATA not send: '$code $text'\n"); - return 0; - } - } - - # Perfect. Everything succeeded! - return 1; -} - -# Get one line of response from the server. -sub get_one_line ($) -{ - my $sock = shift; - my ($code, $sep, $text) = ($sock->getline() =~ /(\d+)(.)([^\r]*)/); - my $more; - $more = ($sep eq "-"); - if ($verbose) - { printf ("[%d] '%s'\n", $code, $text); } - return ($code, $text, $more); -} - -# Get concatenated lines of response from the server. -sub get_line ($) -{ - my $sock = shift; - my ($code, $text, $more) = &get_one_line ($sock); - while ($more) { - my ($code2, $line); - ($code2, $line, $more) = &get_one_line ($sock); - $text .= " $line"; - die ("Error code changed from $code to $code2. That's illegal.\n") if ($code ne $code2); - } - return ($code, $text); -} - -# Send one line back to the server -sub send_line ($@) -{ - my $socket = shift; - my @args = @_; - - if ($verbose) - { printf ("> "); printf (@args); } - $args[0] =~ s/\n/$CRLF/g; - $socket->printf (@args); -} - -# Helper function to encode CRAM-MD5 challenge -sub encode_cram_md5 ($$$) -{ - my ($ticket64, $username, $password) = @_; - my $ticket = decode_base64($ticket64) or - die ("Unable to decode Base64 encoded string '$ticket64'\n"); - - print "Decoded CRAM-MD5 challenge: $ticket\n" if ($verbose > 1); - my $password_md5 = Digest::HMAC_MD5::hmac_md5_hex($ticket, $password); - return encode_base64 ("$username $password_md5", ""); -} - -# Store all server's ESMTP features to a hash. -sub say_hello ($$$$) -{ - my ($sock, $ehlo_ok, $hello_host, $featref) = @_; - my ($feat, $param); - my $hello_cmd = $ehlo_ok > 0 ? "EHLO" : "HELO"; - - &send_line ($sock, "$hello_cmd $hello_host\n"); - my ($code, $text, $more) = &get_one_line ($sock); - - if ($code != 250) - { - warn ("$hello_cmd failed: '$code $text'\n"); - return 0; - } - - # Empty the hash - %{$featref} = (); - - ($feat, $param) = ($text =~ /^(\w+)[= ]*(.*)$/); - $featref->{$feat} = $param; - - # Load all features presented by the server into the hash - while ($more == 1) - { - ($code, $text, $more) = &get_one_line ($sock); - ($feat, $param) = ($text =~ /^(\w+)[= ]*(.*)$/); - $featref->{$feat} = $param; - } - - return 1; -} - -sub guess_mime_type($) -{ - my $filename = shift; - if (defined($file_type)) { - ## Use File::Type if possible - return $file_type->mime_type($filename); - } else { - ## Module File::Type is not available - ## Still recognise some common extensions - return "image/jpeg" if ($filename =~ /\.jpe?g/i); - return "image/gif" if ($filename =~ /\.gif/i); - return "image/png" if ($filename =~ /\.png/i); - return "text/plain" if ($filename =~ /\.txt/i); - return "application/zip" if ($filename =~ /\.zip/i); - return "application/x-gzip" if ($filename =~ /\.t?gz/i); - return "application/x-bzip" if ($filename =~ /\.t?bz2?/i); - } - return "application/octet-stream"; -} - -sub basename($) -{ - my $path = shift; - my @parts = split(/\//, $path); - return $parts[$#parts]; -} - -sub prepare_attachment($) -{ - my $attachment = shift; - my ($path, $mime_type); - - if (-f $attachment) { - $path = $attachment; - $mime_type = guess_mime_type($attachment); - } elsif ($attachment =~ /(.*)@([^@]*)$/ and -f $1) { - $path = $1; - $mime_type = $2; - } - return ($path, $mime_type); -} - -sub attach_attachments($@) -{ - my $message = shift; - my @attachments = @_; - - foreach my $attachment (@attachments) { - my ($path, $mime_type) = prepare_attachment($attachment); - if (not defined($path)) { - warn("$attachment: File not found. Ignoring.\n"); - next; - } - $message->attach( - Type => $mime_type, - Path => $path, - Id => basename($path), - ); - } -} - -sub safe_attach($$) -{ - my ($message, $part) = @_; - ## Remove some headers when $part is becoming a subpart of $message - $part->delete("Date"); - $part->delete("X-Mailer"); - $part->attr("MIME-Version" => undef); - $message->attach($part); - return $message; -} - -sub mime_message($$) -{ - my ($type, $data) = @_; - ## MIME::Lite doesn't allow setting Type and Data once the - ## object is created. Well, maybe it does but I don't know how. - my $message = MIME::Lite->new( - Type => $type, - Data => $data); - return $message; -} - -sub build_message -{ - my ($part_plain, $part_html, $part_body, $message); - - if (defined(@attachments_inline)) { - if (not defined($body_html)) { - die("Inline attachments (--attach-inline) must be used with --body-html\n"); - } - $part_html = MIME::Lite->new(Type => 'multipart/related'); - $part_html->attach(Type => 'text/html', Data => $body_html); - attach_attachments($part_html, @attachments_inline); - $message = $part_html; - # undefine $body_html to prevent confusion in the next if() - undef($body_html); - } - - if (defined($body_html)) { - $part_html = MIME::Lite->new(Type => 'text/html', Data => $body_html); - $message = $part_html; - } - - if (defined($body_plain)) { - $part_plain = MIME::Lite->new(Type => "TEXT", Data => $body_plain); - $message = $part_plain; - } - - if (defined($part_plain) and defined($part_html)) { - $part_body = mime_message("multipart/alternative", undef); - safe_attach($part_body, $part_plain); - safe_attach($part_body, $part_html); - $message = $part_body; - } - - if (defined(@attachments)) { - if (defined($message)) { - # We already have some plaintext and/or html content built - # => make it the first part of multipart/mixed - my $message_body = $message; - $message = mime_message("multipart/mixed", undef); - safe_attach($message, $message_body); - attach_attachments($message, @attachments); - } elsif ($#attachments == 0) { - # Only one single attachment - let it be the body - my ($path, $mime_type) = prepare_attachment($attachments[0]); - if (not defined($path)) { - die($attachments[0].": File not found. No other message parts defined. Aborting.\n"); - } - $message = MIME::Lite->new( - Type => $mime_type, - Path => $path); - } else { - # Message consisting only of attachments - $message = mime_message("multipart/mixed", undef); - attach_attachments($message, @attachments); - } - } - - # Last resort - empty plaintext message - if (!defined($message)) { - $message = mime_message("TEXT", ""); - } - - $message->replace("From" => $from); - $message->replace("To" => join(", ", @to)); - $message->replace("Subject" => $subject); - $message->replace("X-Mailer" => "smtp-cli $version, see http://smtp-cli.logix.cz"); - $message->replace("Message-ID" => time()."-".int(rand(999999))."\@smtp-cli"); - return $message; -} - -sub version () -{ - print "smtp-cli version $version\n"; - exit (0); -} - -sub usage () -{ - printf ( -"Simple SMTP client written in Perl that supports advanced -features like STARTTLS and SMTP-AUTH and IPv6. It can also -create messages from components (files, text snippets) and -attach files. - -Version: smtp-cli v$version - -Author: Michal Ludvig <michal\@logix.cz> (c) 2003-2009 - http://smtp-cli.logix.cz - -Usage: smtp-cli [--options] - - --host=<hostname> Host name or address of the SMTP server. - (default: localhost) - --port=<number> Port where the SMTP server is listening. - (default: 25) - - -4 or --ipv4 Use standard IP (IPv4) protocol. - -6 or --ipv6 Use IPv6 protocol. For hosts that have - both IPv6 and IPv4 addresses the IPv6 - connection is tried first. - - --hello-host=<string> String to use in the EHLO/HELO command. - --disable-ehlo Don't use ESMTP EHLO command, only HELO. - --force-ehlo Use EHLO even if server doesn't say ESMTP. - - Transport encryption (TLS) - --disable-starttls Don't use encryption even if the remote - host offers it. - - Authentication options (AUTH) - --user=<username> Username for SMTP authentication. - --pass=<password> Corresponding password. - --auth-login Enable only AUTH LOGIN method. - --auth-plain Enable only AUTH PLAIN method. - --auth-cram-md5 Enable only AUTH CRAM-MD5 method. - --auth Enable all supported methods. This is - normally not needed, --user enables - everything as well. - - Sender / recipient - --from=<address> Address to use in MAIL FROM command. - --to=<address> Address to use in RCPT TO command. Can be - used multiple times. - - Send a complete RFC822-compliant email message: - --data=<filename> Name of file to send after DATA command. - With \"--data=-\" the script will read - standard input (useful e.g. for pipes). - - Alternatively build email a message from provided components: - --subject=<subject> Subject of the message - --body-plain=<text|filename> - --body-html=<text|filename> - Plaintext and/or HTML body of the message - If both are provided the message is sent - as multipart. - --attach=<filename>[\@<MIME/Type>] - Attach a given filename. - MIME-Type of the attachment is guessed - by default guessed but can optionally - be specified after '\@' delimiter. - For instance: --attach mail.log\@text/plain - Parameter can be used multiple times. - --attach-inline=<filename>[\@<MIME/Type>] - Attach a given filename (typically a picture) - as a 'related' part to the above 'body-html'. - Refer to these pictures as <img src='cid:filename'> - in the 'body-html' contents. - See --attach for details about MIME-Type. - Can be used multiple times. - --print-only Dump the composed MIME message to standard - output. This is useful mainly for debugging - or in the case you need to run the message - through some filter before sending. - - Other options - --verbose[=<number>] Be more verbose, print the SMTP session. - --missing-modules-ok Don't complain about missing optional modules. - --version Print: smtp-cli version $version - --help Guess what is this option for ;-) -"); - exit (0); -} - diff --git a/stfl/ChangeLog b/stfl/ChangeLog deleted file mode 100644 index d838703..0000000 --- a/stfl/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -* 2009-05-02 by pfleidi - - update to 0.20 -* 2008-02-09 by hrist - - update to 0.18 -* 2008-01-04 by hrist - - fixed the make command invocation (thanks to byte for the hint) -* 2007-09-28 by hrist - - removed the patch (thanks to xio for the hint) -* 2007-06-01 by STiAT - - made package build (patchfile global_stfl.patch) diff --git a/stfl/PKGBUILD b/stfl/PKGBUILD deleted file mode 100644 index ad962de..0000000 --- a/stfl/PKGBUILD +++ /dev/null @@ -1,20 +0,0 @@ -# Contributor: Sven Pfleiderer <pfleidi@roothausen.de> -pkgname=stfl -pkgver=0.20 -pkgrel=1 -pkgdesc="It's a library which implements a curses-based widget set for text terminals." -url="http://clifford.at/stfl/" -license=('GPL') -depends=('ncurses') -arch=('i686' 'x86_64') -options=('!libtool') -source=(http://clifford.at/stfl/$pkgname-$pkgver.tar.gz stfl-archlinux.patch) -md5sums=('905e0b8f81fe1b5c95b8d78f56df966b' '075895965f877ac1718096760dcd1e3f') - -build() { - cd $startdir/src/$pkgname-$pkgver - patch -p0 < $startdir/stfl-archlinux.patch || return 1 - make prefix=/usr Makefile.deps || return 1 - make prefix=/usr || return 1 - make prefix=/usr DESTDIR=$startdir/pkg install -} diff --git a/stfl/stfl-archlinux.patch b/stfl/stfl-archlinux.patch deleted file mode 100644 index 9161308..0000000 --- a/stfl/stfl-archlinux.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -Naur ./Makefile.cfg ../stfl-0.19-patched/Makefile.cfg ---- ./Makefile.cfg 2007-09-20 01:24:14.000000000 +0200 -+++ ../stfl-0.19-patched/Makefile.cfg 2008-09-16 02:05:58.000000000 +0200 -@@ -18,11 +18,11 @@ - # MA 02110-1301 USA - # - --export prefix ?= /usr/local -+export prefix ?= /usr - export DESTDIR ?= / - - ifneq ($(shell spl-config --cflags 2>/dev/null),) --FOUND_SPL = 1 -+FOUND_SPL = 0 - else - FOUND_SPL = 0 - endif -@@ -34,19 +34,19 @@ - endif - - ifneq ($(shell perl -le 'print 1' 2>/dev/null),) --FOUND_PERL5 = 1 -+FOUND_PERL5 = 0 - else - FOUND_PERL5 = 0 - endif - - ifneq ($(shell python -c 'print 1' 2>/dev/null),) --FOUND_PYTHON = 1 -+FOUND_PYTHON = 0 - else - FOUND_PYTHON = 0 - endif - - ifneq ($(shell ruby -e 'puts 1' 2>/dev/null),) --FOUND_RUBY = 1 -+FOUND_RUBY = 0 - else - FOUND_RUBY = 0 - endif -diff -Naur ./stfl_internals.h ../stfl-0.19-patched/stfl_internals.h ---- ./stfl_internals.h 2008-05-06 11:44:36.000000000 +0200 -+++ ../stfl-0.19-patched/stfl_internals.h 2008-09-16 02:08:04.000000000 +0200 -@@ -28,7 +28,7 @@ - #endif - - #include "stfl.h" --#include <ncursesw/ncurses.h> -+#include <ncurses.h> - #include <pthread.h> - - struct stfl_widget_type; diff --git a/suphp/PKGBUILD b/suphp/PKGBUILD deleted file mode 100644 index 9216d74..0000000 --- a/suphp/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Contributor: helios <helios@cyb0rg.org> -pkgname=suphp -pkgver=0.7.1 -pkgrel=1 -pkgdesc="A tool for executing PHP scripts with the permissions of their owners." -arch=("i686" "x86_64") -depends=("apr-util" "apache") -url="http://www.suphp.org/" -license=('GPL') -backup=('etc/suphp/suphp.conf') -source=(http://www.suphp.org/download/$pkgname-$pkgver.tar.gz suphp.conf) -md5sums=('c172dd4f15a75f4dcb08ea97d4202bb8' '797fb760d6a8ae833959f6b5cb64a2c1') - -build() { - cd "$startdir/src/$pkgname-$pkgver" - - ./configure --prefix=/usr --with-apr=/usr/bin/apr-1-config --sysconfdir=/etc/suphp --with-apache-user=http --with-setid-mode=owner --with-min-uid=33 --with-min-gid=33 - make || return 1 - make DESTDIR="$startdir/pkg" install - - install -D -m 644 ${startdir}/suphp.conf ${startdir}/pkg/etc/suphp/suphp.conf - install -D -m 644 ${startdir}/src/$pkgname-$pkgver/doc/suphp.conf-example ${startdir}/pkg/etc/suphp/suphp.conf.example -} - -# vim:set ts=2 sw=2 et: diff --git a/suphp/suphp.conf b/suphp/suphp.conf deleted file mode 100644 index a4c6cdf..0000000 --- a/suphp/suphp.conf +++ /dev/null @@ -1,47 +0,0 @@ -[global] -;Path to logfile -logfile=/var/log/suphp.log - -;Loglevel -loglevel=info - -;User Apache is running as -webserver_user=http - -;Path all scripts have to be in -docroot=/var/www:${HOME}/public_html:/srv/http - -;Path to chroot() to before executing script -;chroot=/mychroot - -; Security options -allow_file_group_writeable=false -allow_file_others_writeable=false -allow_directory_group_writeable=false -allow_directory_others_writeable=false - -;Check wheter script is within DOCUMENT_ROOT -check_vhost_docroot=false - -;Send minor error messages to browser -errors_to_browser=true - -;PATH environment variable -env_path=/bin:/usr/bin - -;Umask to set, specify in octal notation -umask=0077 - -; Minimum UID -min_uid=33 - -; Minimum GID -min_gid=33 - - -[handlers] -;Handler for php-scripts -x-httpd-php="php:/usr/bin/php-cgi" - -;Handler for CGI-scripts -x-suphp-cgi="execute:!self" diff --git a/swaks/PKGBUILD b/swaks/PKGBUILD deleted file mode 100644 index d44e773..0000000 --- a/swaks/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Maintainer: Testuser_01 <mail@nico-siebler.de> - -pkgname=swaks -pkgver=20100211.0 -pkgrel=1 -pkgdesc='Swiss Army Knife SMTP; Command line SMTP testing, including TLS and AUTH' -arch=('i686' 'x86_64') -url="http://jetmore.org/john/code/${pkgname}/" -license=('GPL') -depends=('perl-net-dns') -provides=('swaks') -source=("http://jetmore.org/john/code/${pkgname}/${pkgname}-${pkgver}.tar.gz") -md5sums=('b2ad29237f54208989a738c9a39a95f2') - -build() { - cd "${pkgname}-${pkgver}" || return 1 - install -m755 -D "${pkgname}" "$pkgdir/usr/bin/${pkgname}" || return 1 - cd doc || return 1 - pod2man ref.pod "${pkgname}.1" || return 1 - install -m644 -D "${pkgname}.1" "$pkgdir/usr/share/man/man1/${pkgname}.1" || return 1 -} diff --git a/task/PKGBUILD b/task/PKGBUILD deleted file mode 100644 index a8aedf8..0000000 --- a/task/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Maintainer: TDY <tdy@gmx.com> -# Contributor: Ray Kohler <ataraxia@gmail.com> -# Contributor: muflax <muflax@gmail.com> - -pkgname=task -pkgver=1.9.2 -pkgrel=1 -pkgdesc="A command-line todo list manager" -arch=('i686' 'x86_64') -url="http://taskwarrior.org/projects/show/taskwarrior/" -license=('GPL') -depends=('gcc-libs' 'ncurses') -source=(http://www.taskwarrior.org/download/$pkgname-$pkgver.tar.gz) -md5sums=('be98cc74fe03b8336250e0b7ed3cd8c7') - -build() { - cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr - make CXXFLAGS="$CXXFLAGS" || return 1 -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir" install -} diff --git a/tcc-git/PKGBUILD b/tcc-git/PKGBUILD deleted file mode 100644 index 7597ce4..0000000 --- a/tcc-git/PKGBUILD +++ /dev/null @@ -1,35 +0,0 @@ -pkgname=tcc-git -pkgver=20100328 -pkgrel=1 -pkgdesc="Tiny C Compiler - small, simple, and fast single-pass C compiler" -arch=('i686' 'x86_64') -url="http://bellard.org/tcc/" -license=('LGPLv2') -makedepends=('git' 'texi2html') -provides=('tcc') -conflicts=('tcc') - -_gitroot="git://repo.or.cz/tinycc.git" -_gitname="tinycc" - -build() -{ - cd $srcdir - - msg "Connecting to GIT server..." - if [ -d "$srcdir/$_gitname" ] ; then - git --git-dir=$_gitname/.git pull origin - else - git clone $_gitroot - fi - msg "GIT checkout done or server timeout" - - msg "Starting make..." - rm -rf $_gitname-build - cp -r $_gitname $_gitname-build - cd $_gitname-build - sed -i 's/CONFIG_TCCDIR \\\"\$tccdir\\\"/CONFIG_TCCDIR \\\"\/usr\/lib\/tcc\\\"/' configure - ./configure --prefix="$pkgdir/usr" - make || return 1 - make install || return 1 -} diff --git a/tcpxtract/PKGBUILD b/tcpxtract/PKGBUILD deleted file mode 100644 index fc57fc7..0000000 --- a/tcpxtract/PKGBUILD +++ /dev/null @@ -1,27 +0,0 @@ -# Maintainer: Michael P <ptchinster@archlinux.us> -# Contributor: Christoph Siegenthaler <csi@gmx.ch> -# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org> - -pkgname=tcpxtract -pkgver=1.0.1 -pkgrel=3 -pkgdesc="A tool for extracting files from network traffic" -url="http://tcpxtract.sourceforge.net" -arch=('i686' 'x86_64') -license=('GPL') -depends=('libpcap') -source=(http://prdownloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz \ -conf_default_path.patch) -md5sums=('1d8fe172d4590c33a157798e08dc0ccd' 'c7964f1e9c1315ae2d2b94c2bd06b4b7') - -build() -{ - cd $startdir/src/$pkgname-$pkgver - # Applying conf_default_path patch - patch -Np0 -i $startdir/src/conf_default_path.patch || return 1 - - ./configure --prefix=/usr --sysconfdir=/etc || return 1 - make || return 1 - make DESTDIR=$startdir/pkg install || return 1 -} - diff --git a/tcpxtract/conf_default_path.patch b/tcpxtract/conf_default_path.patch deleted file mode 100644 index a5c5e66..0000000 --- a/tcpxtract/conf_default_path.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- tcpxtract.c.old 2006-03-10 02:10:06.000000000 +0100 -+++ tcpxtract.c 2006-03-10 02:10:23.000000000 +0100 -@@ -48,7 +48,7 @@ - #include "search.h" - - #ifndef DEFAULT_CONFIG_FILE --#define DEFAULT_CONFIG_FILE "/usr/local/etc/tcpxtract.conf" -+#define DEFAULT_CONFIG_FILE "/etc/tcpxtract.conf" - #endif - - extern FILE *yyin; /* the lex/yacc input file */ - diff --git a/tenshi/PKGBUILD b/tenshi/PKGBUILD deleted file mode 100644 index a1ec7eb..0000000 --- a/tenshi/PKGBUILD +++ /dev/null @@ -1,45 +0,0 @@ -# Contributor: Ryan Corder <ryanc@greengrey.org> - -pkgname=tenshi -pkgver=0.9.1 -pkgrel=1 -pkgdesc="real-time log monitor from the Gentoo Linux project" -arch=(i686 x86_64) -license="custom" -depends=('perl') -install="$pkgname.install" -source=(http://dev.inversepath.com/tenshi/$pkgname-$pkgver.tar.gz - 'tenshi' - 'tenshi-conf.d' - 'tenshi.install') -url="http://dev.inversepath.com/trac/tenshi" -md5sums=('17a2f5f72b232b81b01f800e0e932a99' - 'c1de0e9473003f816d79e0dfb3f19a3b' - '947a195840ff67bbd558135e25c94165' - 'b1605a5f5396cf44dca3ae49c327a4e8') - -build() { - cd $startdir - chmod -R og-rwx ./ - - cd ${startdir}/src/$pkgname-$pkgver - - # create retired directories first - mkdir -m 0755 -p $startdir/pkg/usr/sbin || return 1 - mkdir -m 0750 -p $startdir/pkg/var/lib/tenshi || return 1 - mkdir -m 0750 -p $startdir/pkg/etc/tenshi || return 1 - mkdir -m 0755 -p $startdir/pkg/etc/conf.d || return 1 - mkdir -m 0755 -p $startdir/pkg/etc/rc.d || return 1 - - # install tenshi binary - install -m 755 $startdir/src/$pkgname-$pkgver/tenshi $startdir/pkg/usr/sbin || return 1 - - # install config and init file - install -m 640 $startdir/src/$pkgname-$pkgver/tenshi.conf $startdir/pkg/etc/tenshi || return 1 - install -m 644 $startdir/tenshi-conf.d $startdir/pkg/etc/conf.d/tenshi || return 1 - install -m 755 $startdir/tenshi $startdir/pkg/etc/rc.d/tenshi || return 1 - - # install docs and man pages - install -Dm 644 $startdir/src/$pkgname-$pkgver/LICENSE $startdir/pkg/usr/share/licenses/$pkgname/LICENSE || return 1 - install -Dm 644 $startdir/src/$pkgname-$pkgver/tenshi.8 $startdir/pkg/usr/man/man8/tenshi.8 || return 1 -} diff --git a/tenshi/tenshi b/tenshi/tenshi deleted file mode 100644 index 7ea610c..0000000 --- a/tenshi/tenshi +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# source application-specific settings -[ -f /etc/conf.d/tenshi ] && . /etc/conf.d/tenshi - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pgrep -f /usr/sbin/tenshi` - -start() { - stat_busy "Starting Tenshi log monitor" - [ -z "$PID" ] && /usr/sbin/tenshi $TENSHI_OPTIONS - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon tenshi - stat_done - fi -} - -stop() { - stat_busy "Stopping Tenshi log monitor" - [ ! -z "$PID" ] && kill $PID - if [ $? -gt 0 ]; then - stat_fail - else - rm -f $TENSHI_PID - rm_daemon tenshi - stat_done - fi -} - -reload() { - stat_busy "Reloading Tenshi log monitor" - [ ! -z "$PID" ] && kill -HUP $PID - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - # calling 'stop' and 'start' without the $0 fails... - $0 stop - $0 start - ;; - reload) - reload - ;; - *) - echo "usage: $0 {start|stop|restart|reload}" -esac -exit 0 diff --git a/tenshi/tenshi-conf.d b/tenshi/tenshi-conf.d deleted file mode 100644 index 26b87ff..0000000 --- a/tenshi/tenshi-conf.d +++ /dev/null @@ -1,2 +0,0 @@ -TENSHI_PID="/var/lib/tenshi/tenshi.pid" -TENSHI_OPTIONS="-c /etc/tenshi/tenshi.conf -P $TENSHI_PID" diff --git a/tenshi/tenshi.install b/tenshi/tenshi.install deleted file mode 100644 index 270cd64..0000000 --- a/tenshi/tenshi.install +++ /dev/null @@ -1,42 +0,0 @@ -# $Id: $ -# -# Description: post-install script for tenshi -# Contributor: Ryan Corder <ryanc@greengrey.org> -# - -# arg 1: new package version -post_install() { - # create tenshi user - if [ -z "`grep '^tenshi:' /etc/group`" ]; then - groupadd tenshi - fi - if [ -z "`grep '^tenshi:' /etc/passwd`" ]; then - useradd -d /var/lib/tenshi -g tenshi -s /bin/false tenshi - else - usermod -s /bin/false tenshi - fi - - # set more secure permissions on config files, etc - chown -R tenshi:tenshi /etc/tenshi - chmod 640 /etc/tenshi/tenshi.conf - chown -R tenshi:tenshi /var/lib/tenshi - chmod 750 /var/lib/tenshi - chmod -R o-rwx /var/lib/tenshi -} - -# arg 1: new package version -# arg 2: old package version -post_upgrade() { - post_install $1 -} - -# arg 1: old package version -pre_remove() { - userdel tenshi &> /dev/null - groupdel tenshi &> /dev/null -} - -op=$1 -shift - -$op $* diff --git a/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.1.6.patch b/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.1.6.patch deleted file mode 100644 index 9fce395..0000000 --- a/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.1.6.patch +++ /dev/null @@ -1,178 +0,0 @@ -Only in src: Ability_to_disable_trash_on_Thunar_1.1.6.patch -Only in src2: Ability_to_disable_trash_on_Thunar.patch -diff -ru src/Thunar-1.1.6/thunar/thunar-application.c src2/Thunar-1.1.6/thunar/thunar-application.c ---- src/Thunar-1.1.6/thunar/thunar-application.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-application.c 2011-01-06 16:42:52.000000000 +0100 -@@ -1639,10 +1639,14 @@ - gchar *message; - guint n_path_list = 0; - gint response; -+ gboolean isTrashEnabled; - - _thunar_return_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WIDGET (parent)); - _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); - -+ g_object_get (G_OBJECT (application->preferences), "misc-enable-trash", &isTrashEnabled, NULL); -+ if (!isTrashEnabled) -+ permanently = TRUE; - if (!permanently) - { - /* check if we should permanently delete the files (user holds shift) */ -@@ -1669,8 +1673,8 @@ - if (G_UNLIKELY (permanently)) - { - /* parse the parent pointer */ -- screen = thunar_util_parse_parent (parent, &window); -- -+ screen = thunar_util_parse_parent (parent, &window); -+ - /* generate the question to confirm the delete operation */ - if (G_LIKELY (n_path_list == 1)) - { -Only in src2/Thunar-1.1.6/thunar: thunar-application.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-application.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-application.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-preferences.c src2/Thunar-1.1.6/thunar/thunar-preferences.c ---- src/Thunar-1.1.6/thunar/thunar-preferences.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-preferences.c 2011-01-06 16:29:57.000000000 +0100 -@@ -71,6 +71,7 @@ - PROP_MISC_VOLUME_MANAGEMENT, - PROP_MISC_CASE_SENSITIVE, - PROP_MISC_DATE_STYLE, -+ PROP_MISC_ENABLE_TRASH, - PROP_MISC_FOLDERS_FIRST, - PROP_MISC_HORIZONTAL_WHEEL_NAVIGATES, - PROP_MISC_RECURSIVE_PERMISSIONS, -@@ -642,6 +643,19 @@ - THUNAR_TYPE_ICON_SIZE, - THUNAR_ICON_SIZE_SMALLEST, - EXO_PARAM_READWRITE)); -+ -+ /** -+ * ThunarPreferences:misc-enable-trash: -+ * -+ * If trash is disabled, files will be deleted permanently -+ **/ -+ g_object_class_install_property (gobject_class, -+ PROP_MISC_ENABLE_TRASH, -+ g_param_spec_boolean ("misc-enable-trash", -+ "misc-enable-trash", -+ "misc-enable-trash", -+ TRUE, -+ EXO_PARAM_READWRITE)); - } - - -Only in src2/Thunar-1.1.6/thunar: thunar-preferences.c.orig -Only in src2/Thunar-1.1.6/thunar: .thunar-preferences.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-preferences-dialog.c src2/Thunar-1.1.6/thunar/thunar-preferences-dialog.c ---- src/Thunar-1.1.6/thunar/thunar-preferences-dialog.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-preferences-dialog.c 2011-01-06 17:17:54.000000000 +0100 -@@ -374,7 +374,7 @@ - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -@@ -526,7 +526,7 @@ - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -@@ -553,12 +553,18 @@ - gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); - gtk_widget_show (frame); - -+ button = gtk_check_button_new_with_mnemonic (_("Move items to Trash on _deletion.")); -+ exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-enable-trash", G_OBJECT (button), "active"); -+ thunar_gtk_widget_set_tooltip (button, _( "By default, items are sent to the Trash on deletion. By disabling this option, items will be removed on deletion and will be lost forever. (DANGEROUS)" ) ); -+ gtk_table_attach (GTK_TABLE (table), button, 0,1,2,3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); -+ gtk_widget_show (button); -+ - label = gtk_label_new (_("Volume Management")); - gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -Only in src2/Thunar-1.1.6/thunar: thunar-preferences-dialog.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-preferences-dialog.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-preferences-dialog.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-shortcuts-model.c src2/Thunar-1.1.6/thunar/thunar-shortcuts-model.c ---- src/Thunar-1.1.6/thunar/thunar-shortcuts-model.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-shortcuts-model.c 2011-01-06 16:41:44.000000000 +0100 -@@ -38,6 +38,7 @@ - #include <glib.h> - #include <glib/gstdio.h> - -+#include <thunar/thunar-preferences.h> - #include <thunar/thunar-file.h> - #include <thunar/thunar-shortcuts-model.h> - #include <thunar/thunar-private.h> -@@ -230,11 +231,14 @@ - GList *system_paths = NULL; - GList *volumes; - GList *lp; -+ gboolean isTrashEnabled; - - #ifndef NDEBUG - model->stamp = g_random_int (); - #endif - -+ g_object_get (G_OBJECT (thunar_preferences_get ()), "misc-enable-trash", &isTrashEnabled, NULL); -+ - /* connect to the volume monitor */ - model->volume_monitor = g_volume_monitor_get (); - g_signal_connect (model->volume_monitor, "volume-added", G_CALLBACK (thunar_shortcuts_model_volume_added), model); -@@ -253,7 +257,7 @@ - g_object_unref (desktop); - - /* append the trash icon if the trash is supported */ -- if (thunar_g_vfs_is_uri_scheme_supported ("trash")) -+ if (isTrashEnabled && thunar_g_vfs_is_uri_scheme_supported ("trash")) - system_paths = g_list_append (system_paths, thunar_g_file_new_for_trash ()); - - /* append the root file system */ -Only in src2/Thunar-1.1.6/thunar: thunar-shortcuts-model.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-shortcuts-model.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-shortcuts-model.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-tree-model.c src2/Thunar-1.1.6/thunar/thunar-tree-model.c ---- src/Thunar-1.1.6/thunar/thunar-tree-model.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-tree-model.c 2011-01-06 16:41:54.000000000 +0100 -@@ -282,12 +282,15 @@ - GList *volumes; - GList *lp; - GNode *node; -+ gboolean isTrashEnabled; - - /* generate a unique stamp if we're in debug mode */ - #ifndef NDEBUG - model->stamp = g_random_int (); - #endif - -+ g_object_get (G_OBJECT (thunar_preferences_get ()), "misc-enable-trash", &isTrashEnabled, NULL); -+ - /* initialize the model data */ - model->sort_case_sensitive = TRUE; - model->visible_func = (ThunarTreeModelVisibleFunc) exo_noop_true; -@@ -320,7 +323,7 @@ - g_object_unref (desktop); - - /* append the trash icon if the trash is supported */ -- if (thunar_g_vfs_is_uri_scheme_supported ("trash")) -+ if (isTrashEnabled && thunar_g_vfs_is_uri_scheme_supported ("trash")) - system_paths = g_list_append (system_paths, thunar_g_file_new_for_trash ()); - - /* append the root file system */ -Only in src2/Thunar-1.1.6/thunar: .thunar-tree-model.c.un~ diff --git a/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.2.0.patch b/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.2.0.patch deleted file mode 100644 index 9fce395..0000000 --- a/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.2.0.patch +++ /dev/null @@ -1,178 +0,0 @@ -Only in src: Ability_to_disable_trash_on_Thunar_1.1.6.patch -Only in src2: Ability_to_disable_trash_on_Thunar.patch -diff -ru src/Thunar-1.1.6/thunar/thunar-application.c src2/Thunar-1.1.6/thunar/thunar-application.c ---- src/Thunar-1.1.6/thunar/thunar-application.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-application.c 2011-01-06 16:42:52.000000000 +0100 -@@ -1639,10 +1639,14 @@ - gchar *message; - guint n_path_list = 0; - gint response; -+ gboolean isTrashEnabled; - - _thunar_return_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WIDGET (parent)); - _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); - -+ g_object_get (G_OBJECT (application->preferences), "misc-enable-trash", &isTrashEnabled, NULL); -+ if (!isTrashEnabled) -+ permanently = TRUE; - if (!permanently) - { - /* check if we should permanently delete the files (user holds shift) */ -@@ -1669,8 +1673,8 @@ - if (G_UNLIKELY (permanently)) - { - /* parse the parent pointer */ -- screen = thunar_util_parse_parent (parent, &window); -- -+ screen = thunar_util_parse_parent (parent, &window); -+ - /* generate the question to confirm the delete operation */ - if (G_LIKELY (n_path_list == 1)) - { -Only in src2/Thunar-1.1.6/thunar: thunar-application.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-application.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-application.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-preferences.c src2/Thunar-1.1.6/thunar/thunar-preferences.c ---- src/Thunar-1.1.6/thunar/thunar-preferences.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-preferences.c 2011-01-06 16:29:57.000000000 +0100 -@@ -71,6 +71,7 @@ - PROP_MISC_VOLUME_MANAGEMENT, - PROP_MISC_CASE_SENSITIVE, - PROP_MISC_DATE_STYLE, -+ PROP_MISC_ENABLE_TRASH, - PROP_MISC_FOLDERS_FIRST, - PROP_MISC_HORIZONTAL_WHEEL_NAVIGATES, - PROP_MISC_RECURSIVE_PERMISSIONS, -@@ -642,6 +643,19 @@ - THUNAR_TYPE_ICON_SIZE, - THUNAR_ICON_SIZE_SMALLEST, - EXO_PARAM_READWRITE)); -+ -+ /** -+ * ThunarPreferences:misc-enable-trash: -+ * -+ * If trash is disabled, files will be deleted permanently -+ **/ -+ g_object_class_install_property (gobject_class, -+ PROP_MISC_ENABLE_TRASH, -+ g_param_spec_boolean ("misc-enable-trash", -+ "misc-enable-trash", -+ "misc-enable-trash", -+ TRUE, -+ EXO_PARAM_READWRITE)); - } - - -Only in src2/Thunar-1.1.6/thunar: thunar-preferences.c.orig -Only in src2/Thunar-1.1.6/thunar: .thunar-preferences.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-preferences-dialog.c src2/Thunar-1.1.6/thunar/thunar-preferences-dialog.c ---- src/Thunar-1.1.6/thunar/thunar-preferences-dialog.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-preferences-dialog.c 2011-01-06 17:17:54.000000000 +0100 -@@ -374,7 +374,7 @@ - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -@@ -526,7 +526,7 @@ - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -@@ -553,12 +553,18 @@ - gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); - gtk_widget_show (frame); - -+ button = gtk_check_button_new_with_mnemonic (_("Move items to Trash on _deletion.")); -+ exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-enable-trash", G_OBJECT (button), "active"); -+ thunar_gtk_widget_set_tooltip (button, _( "By default, items are sent to the Trash on deletion. By disabling this option, items will be removed on deletion and will be lost forever. (DANGEROUS)" ) ); -+ gtk_table_attach (GTK_TABLE (table), button, 0,1,2,3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); -+ gtk_widget_show (button); -+ - label = gtk_label_new (_("Volume Management")); - gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -Only in src2/Thunar-1.1.6/thunar: thunar-preferences-dialog.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-preferences-dialog.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-preferences-dialog.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-shortcuts-model.c src2/Thunar-1.1.6/thunar/thunar-shortcuts-model.c ---- src/Thunar-1.1.6/thunar/thunar-shortcuts-model.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-shortcuts-model.c 2011-01-06 16:41:44.000000000 +0100 -@@ -38,6 +38,7 @@ - #include <glib.h> - #include <glib/gstdio.h> - -+#include <thunar/thunar-preferences.h> - #include <thunar/thunar-file.h> - #include <thunar/thunar-shortcuts-model.h> - #include <thunar/thunar-private.h> -@@ -230,11 +231,14 @@ - GList *system_paths = NULL; - GList *volumes; - GList *lp; -+ gboolean isTrashEnabled; - - #ifndef NDEBUG - model->stamp = g_random_int (); - #endif - -+ g_object_get (G_OBJECT (thunar_preferences_get ()), "misc-enable-trash", &isTrashEnabled, NULL); -+ - /* connect to the volume monitor */ - model->volume_monitor = g_volume_monitor_get (); - g_signal_connect (model->volume_monitor, "volume-added", G_CALLBACK (thunar_shortcuts_model_volume_added), model); -@@ -253,7 +257,7 @@ - g_object_unref (desktop); - - /* append the trash icon if the trash is supported */ -- if (thunar_g_vfs_is_uri_scheme_supported ("trash")) -+ if (isTrashEnabled && thunar_g_vfs_is_uri_scheme_supported ("trash")) - system_paths = g_list_append (system_paths, thunar_g_file_new_for_trash ()); - - /* append the root file system */ -Only in src2/Thunar-1.1.6/thunar: thunar-shortcuts-model.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-shortcuts-model.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-shortcuts-model.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-tree-model.c src2/Thunar-1.1.6/thunar/thunar-tree-model.c ---- src/Thunar-1.1.6/thunar/thunar-tree-model.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-tree-model.c 2011-01-06 16:41:54.000000000 +0100 -@@ -282,12 +282,15 @@ - GList *volumes; - GList *lp; - GNode *node; -+ gboolean isTrashEnabled; - - /* generate a unique stamp if we're in debug mode */ - #ifndef NDEBUG - model->stamp = g_random_int (); - #endif - -+ g_object_get (G_OBJECT (thunar_preferences_get ()), "misc-enable-trash", &isTrashEnabled, NULL); -+ - /* initialize the model data */ - model->sort_case_sensitive = TRUE; - model->visible_func = (ThunarTreeModelVisibleFunc) exo_noop_true; -@@ -320,7 +323,7 @@ - g_object_unref (desktop); - - /* append the trash icon if the trash is supported */ -- if (thunar_g_vfs_is_uri_scheme_supported ("trash")) -+ if (isTrashEnabled && thunar_g_vfs_is_uri_scheme_supported ("trash")) - system_paths = g_list_append (system_paths, thunar_g_file_new_for_trash ()); - - /* append the root file system */ -Only in src2/Thunar-1.1.6/thunar: .thunar-tree-model.c.un~ diff --git a/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.2.2.patch b/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.2.2.patch deleted file mode 100644 index 9fce395..0000000 --- a/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.2.2.patch +++ /dev/null @@ -1,178 +0,0 @@ -Only in src: Ability_to_disable_trash_on_Thunar_1.1.6.patch -Only in src2: Ability_to_disable_trash_on_Thunar.patch -diff -ru src/Thunar-1.1.6/thunar/thunar-application.c src2/Thunar-1.1.6/thunar/thunar-application.c ---- src/Thunar-1.1.6/thunar/thunar-application.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-application.c 2011-01-06 16:42:52.000000000 +0100 -@@ -1639,10 +1639,14 @@ - gchar *message; - guint n_path_list = 0; - gint response; -+ gboolean isTrashEnabled; - - _thunar_return_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WIDGET (parent)); - _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); - -+ g_object_get (G_OBJECT (application->preferences), "misc-enable-trash", &isTrashEnabled, NULL); -+ if (!isTrashEnabled) -+ permanently = TRUE; - if (!permanently) - { - /* check if we should permanently delete the files (user holds shift) */ -@@ -1669,8 +1673,8 @@ - if (G_UNLIKELY (permanently)) - { - /* parse the parent pointer */ -- screen = thunar_util_parse_parent (parent, &window); -- -+ screen = thunar_util_parse_parent (parent, &window); -+ - /* generate the question to confirm the delete operation */ - if (G_LIKELY (n_path_list == 1)) - { -Only in src2/Thunar-1.1.6/thunar: thunar-application.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-application.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-application.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-preferences.c src2/Thunar-1.1.6/thunar/thunar-preferences.c ---- src/Thunar-1.1.6/thunar/thunar-preferences.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-preferences.c 2011-01-06 16:29:57.000000000 +0100 -@@ -71,6 +71,7 @@ - PROP_MISC_VOLUME_MANAGEMENT, - PROP_MISC_CASE_SENSITIVE, - PROP_MISC_DATE_STYLE, -+ PROP_MISC_ENABLE_TRASH, - PROP_MISC_FOLDERS_FIRST, - PROP_MISC_HORIZONTAL_WHEEL_NAVIGATES, - PROP_MISC_RECURSIVE_PERMISSIONS, -@@ -642,6 +643,19 @@ - THUNAR_TYPE_ICON_SIZE, - THUNAR_ICON_SIZE_SMALLEST, - EXO_PARAM_READWRITE)); -+ -+ /** -+ * ThunarPreferences:misc-enable-trash: -+ * -+ * If trash is disabled, files will be deleted permanently -+ **/ -+ g_object_class_install_property (gobject_class, -+ PROP_MISC_ENABLE_TRASH, -+ g_param_spec_boolean ("misc-enable-trash", -+ "misc-enable-trash", -+ "misc-enable-trash", -+ TRUE, -+ EXO_PARAM_READWRITE)); - } - - -Only in src2/Thunar-1.1.6/thunar: thunar-preferences.c.orig -Only in src2/Thunar-1.1.6/thunar: .thunar-preferences.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-preferences-dialog.c src2/Thunar-1.1.6/thunar/thunar-preferences-dialog.c ---- src/Thunar-1.1.6/thunar/thunar-preferences-dialog.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-preferences-dialog.c 2011-01-06 17:17:54.000000000 +0100 -@@ -374,7 +374,7 @@ - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -@@ -526,7 +526,7 @@ - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -@@ -553,12 +553,18 @@ - gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); - gtk_widget_show (frame); - -+ button = gtk_check_button_new_with_mnemonic (_("Move items to Trash on _deletion.")); -+ exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-enable-trash", G_OBJECT (button), "active"); -+ thunar_gtk_widget_set_tooltip (button, _( "By default, items are sent to the Trash on deletion. By disabling this option, items will be removed on deletion and will be lost forever. (DANGEROUS)" ) ); -+ gtk_table_attach (GTK_TABLE (table), button, 0,1,2,3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); -+ gtk_widget_show (button); -+ - label = gtk_label_new (_("Volume Management")); - gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -Only in src2/Thunar-1.1.6/thunar: thunar-preferences-dialog.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-preferences-dialog.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-preferences-dialog.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-shortcuts-model.c src2/Thunar-1.1.6/thunar/thunar-shortcuts-model.c ---- src/Thunar-1.1.6/thunar/thunar-shortcuts-model.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-shortcuts-model.c 2011-01-06 16:41:44.000000000 +0100 -@@ -38,6 +38,7 @@ - #include <glib.h> - #include <glib/gstdio.h> - -+#include <thunar/thunar-preferences.h> - #include <thunar/thunar-file.h> - #include <thunar/thunar-shortcuts-model.h> - #include <thunar/thunar-private.h> -@@ -230,11 +231,14 @@ - GList *system_paths = NULL; - GList *volumes; - GList *lp; -+ gboolean isTrashEnabled; - - #ifndef NDEBUG - model->stamp = g_random_int (); - #endif - -+ g_object_get (G_OBJECT (thunar_preferences_get ()), "misc-enable-trash", &isTrashEnabled, NULL); -+ - /* connect to the volume monitor */ - model->volume_monitor = g_volume_monitor_get (); - g_signal_connect (model->volume_monitor, "volume-added", G_CALLBACK (thunar_shortcuts_model_volume_added), model); -@@ -253,7 +257,7 @@ - g_object_unref (desktop); - - /* append the trash icon if the trash is supported */ -- if (thunar_g_vfs_is_uri_scheme_supported ("trash")) -+ if (isTrashEnabled && thunar_g_vfs_is_uri_scheme_supported ("trash")) - system_paths = g_list_append (system_paths, thunar_g_file_new_for_trash ()); - - /* append the root file system */ -Only in src2/Thunar-1.1.6/thunar: thunar-shortcuts-model.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-shortcuts-model.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-shortcuts-model.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-tree-model.c src2/Thunar-1.1.6/thunar/thunar-tree-model.c ---- src/Thunar-1.1.6/thunar/thunar-tree-model.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-tree-model.c 2011-01-06 16:41:54.000000000 +0100 -@@ -282,12 +282,15 @@ - GList *volumes; - GList *lp; - GNode *node; -+ gboolean isTrashEnabled; - - /* generate a unique stamp if we're in debug mode */ - #ifndef NDEBUG - model->stamp = g_random_int (); - #endif - -+ g_object_get (G_OBJECT (thunar_preferences_get ()), "misc-enable-trash", &isTrashEnabled, NULL); -+ - /* initialize the model data */ - model->sort_case_sensitive = TRUE; - model->visible_func = (ThunarTreeModelVisibleFunc) exo_noop_true; -@@ -320,7 +323,7 @@ - g_object_unref (desktop); - - /* append the trash icon if the trash is supported */ -- if (thunar_g_vfs_is_uri_scheme_supported ("trash")) -+ if (isTrashEnabled && thunar_g_vfs_is_uri_scheme_supported ("trash")) - system_paths = g_list_append (system_paths, thunar_g_file_new_for_trash ()); - - /* append the root file system */ -Only in src2/Thunar-1.1.6/thunar: .thunar-tree-model.c.un~ diff --git a/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.3.0.patch b/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.3.0.patch deleted file mode 100644 index 9fce395..0000000 --- a/thunar-notrash/Ability_to_disable_trash_on_Thunar_1.3.0.patch +++ /dev/null @@ -1,178 +0,0 @@ -Only in src: Ability_to_disable_trash_on_Thunar_1.1.6.patch -Only in src2: Ability_to_disable_trash_on_Thunar.patch -diff -ru src/Thunar-1.1.6/thunar/thunar-application.c src2/Thunar-1.1.6/thunar/thunar-application.c ---- src/Thunar-1.1.6/thunar/thunar-application.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-application.c 2011-01-06 16:42:52.000000000 +0100 -@@ -1639,10 +1639,14 @@ - gchar *message; - guint n_path_list = 0; - gint response; -+ gboolean isTrashEnabled; - - _thunar_return_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WIDGET (parent)); - _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); - -+ g_object_get (G_OBJECT (application->preferences), "misc-enable-trash", &isTrashEnabled, NULL); -+ if (!isTrashEnabled) -+ permanently = TRUE; - if (!permanently) - { - /* check if we should permanently delete the files (user holds shift) */ -@@ -1669,8 +1673,8 @@ - if (G_UNLIKELY (permanently)) - { - /* parse the parent pointer */ -- screen = thunar_util_parse_parent (parent, &window); -- -+ screen = thunar_util_parse_parent (parent, &window); -+ - /* generate the question to confirm the delete operation */ - if (G_LIKELY (n_path_list == 1)) - { -Only in src2/Thunar-1.1.6/thunar: thunar-application.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-application.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-application.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-preferences.c src2/Thunar-1.1.6/thunar/thunar-preferences.c ---- src/Thunar-1.1.6/thunar/thunar-preferences.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-preferences.c 2011-01-06 16:29:57.000000000 +0100 -@@ -71,6 +71,7 @@ - PROP_MISC_VOLUME_MANAGEMENT, - PROP_MISC_CASE_SENSITIVE, - PROP_MISC_DATE_STYLE, -+ PROP_MISC_ENABLE_TRASH, - PROP_MISC_FOLDERS_FIRST, - PROP_MISC_HORIZONTAL_WHEEL_NAVIGATES, - PROP_MISC_RECURSIVE_PERMISSIONS, -@@ -642,6 +643,19 @@ - THUNAR_TYPE_ICON_SIZE, - THUNAR_ICON_SIZE_SMALLEST, - EXO_PARAM_READWRITE)); -+ -+ /** -+ * ThunarPreferences:misc-enable-trash: -+ * -+ * If trash is disabled, files will be deleted permanently -+ **/ -+ g_object_class_install_property (gobject_class, -+ PROP_MISC_ENABLE_TRASH, -+ g_param_spec_boolean ("misc-enable-trash", -+ "misc-enable-trash", -+ "misc-enable-trash", -+ TRUE, -+ EXO_PARAM_READWRITE)); - } - - -Only in src2/Thunar-1.1.6/thunar: thunar-preferences.c.orig -Only in src2/Thunar-1.1.6/thunar: .thunar-preferences.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-preferences-dialog.c src2/Thunar-1.1.6/thunar/thunar-preferences-dialog.c ---- src/Thunar-1.1.6/thunar/thunar-preferences-dialog.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-preferences-dialog.c 2011-01-06 17:17:54.000000000 +0100 -@@ -374,7 +374,7 @@ - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -@@ -526,7 +526,7 @@ - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -@@ -553,12 +553,18 @@ - gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); - gtk_widget_show (frame); - -+ button = gtk_check_button_new_with_mnemonic (_("Move items to Trash on _deletion.")); -+ exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-enable-trash", G_OBJECT (button), "active"); -+ thunar_gtk_widget_set_tooltip (button, _( "By default, items are sent to the Trash on deletion. By disabling this option, items will be removed on deletion and will be lost forever. (DANGEROUS)" ) ); -+ gtk_table_attach (GTK_TABLE (table), button, 0,1,2,3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); -+ gtk_widget_show (button); -+ - label = gtk_label_new (_("Volume Management")); - gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_widget_show (label); - -- table = gtk_table_new (2, 2, FALSE); -+ table = gtk_table_new (3, 2, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_set_border_width (GTK_CONTAINER (table), 12); -Only in src2/Thunar-1.1.6/thunar: thunar-preferences-dialog.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-preferences-dialog.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-preferences-dialog.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-shortcuts-model.c src2/Thunar-1.1.6/thunar/thunar-shortcuts-model.c ---- src/Thunar-1.1.6/thunar/thunar-shortcuts-model.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-shortcuts-model.c 2011-01-06 16:41:44.000000000 +0100 -@@ -38,6 +38,7 @@ - #include <glib.h> - #include <glib/gstdio.h> - -+#include <thunar/thunar-preferences.h> - #include <thunar/thunar-file.h> - #include <thunar/thunar-shortcuts-model.h> - #include <thunar/thunar-private.h> -@@ -230,11 +231,14 @@ - GList *system_paths = NULL; - GList *volumes; - GList *lp; -+ gboolean isTrashEnabled; - - #ifndef NDEBUG - model->stamp = g_random_int (); - #endif - -+ g_object_get (G_OBJECT (thunar_preferences_get ()), "misc-enable-trash", &isTrashEnabled, NULL); -+ - /* connect to the volume monitor */ - model->volume_monitor = g_volume_monitor_get (); - g_signal_connect (model->volume_monitor, "volume-added", G_CALLBACK (thunar_shortcuts_model_volume_added), model); -@@ -253,7 +257,7 @@ - g_object_unref (desktop); - - /* append the trash icon if the trash is supported */ -- if (thunar_g_vfs_is_uri_scheme_supported ("trash")) -+ if (isTrashEnabled && thunar_g_vfs_is_uri_scheme_supported ("trash")) - system_paths = g_list_append (system_paths, thunar_g_file_new_for_trash ()); - - /* append the root file system */ -Only in src2/Thunar-1.1.6/thunar: thunar-shortcuts-model.c.orig -Only in src2/Thunar-1.1.6/thunar: thunar-shortcuts-model.c.rej -Only in src2/Thunar-1.1.6/thunar: .thunar-shortcuts-model.c.un~ -diff -ru src/Thunar-1.1.6/thunar/thunar-tree-model.c src2/Thunar-1.1.6/thunar/thunar-tree-model.c ---- src/Thunar-1.1.6/thunar/thunar-tree-model.c 2011-01-02 14:35:27.000000000 +0100 -+++ src2/Thunar-1.1.6/thunar/thunar-tree-model.c 2011-01-06 16:41:54.000000000 +0100 -@@ -282,12 +282,15 @@ - GList *volumes; - GList *lp; - GNode *node; -+ gboolean isTrashEnabled; - - /* generate a unique stamp if we're in debug mode */ - #ifndef NDEBUG - model->stamp = g_random_int (); - #endif - -+ g_object_get (G_OBJECT (thunar_preferences_get ()), "misc-enable-trash", &isTrashEnabled, NULL); -+ - /* initialize the model data */ - model->sort_case_sensitive = TRUE; - model->visible_func = (ThunarTreeModelVisibleFunc) exo_noop_true; -@@ -320,7 +323,7 @@ - g_object_unref (desktop); - - /* append the trash icon if the trash is supported */ -- if (thunar_g_vfs_is_uri_scheme_supported ("trash")) -+ if (isTrashEnabled && thunar_g_vfs_is_uri_scheme_supported ("trash")) - system_paths = g_list_append (system_paths, thunar_g_file_new_for_trash ()); - - /* append the root file system */ -Only in src2/Thunar-1.1.6/thunar: .thunar-tree-model.c.un~ diff --git a/thunar-notrash/PKGBUILD b/thunar-notrash/PKGBUILD deleted file mode 100644 index 52d01fd..0000000 --- a/thunar-notrash/PKGBUILD +++ /dev/null @@ -1,66 +0,0 @@ -# Maintainer: Florian Pritz <flo@xssn.at> - - -pkgname=thunar-notrash -pkgver=1.2.2 -pkgrel=1 -epoch=1 -pkgdesc="modern file manager for Xfce with patch to disable trash" -arch=('i686' 'x86_64') -license=('GPL2' 'LGPL2.1') -url="http://thunar.xfce.org" -groups=('xfce4') -conflicts=(thunar) -provides=("thunar=$pkgver") -depends=('desktop-file-utils' 'libexif' 'hicolor-icon-theme' 'libnotify' 'udev' - 'gtk2' 'exo>=0.6.0' 'libxfce4util>=4.8.1' 'libxfce4ui' 'libpng') -makedepends=('intltool' 'gtk-doc' 'xfce4-panel>=4.8.0') -optdepends=('gvfs: for trash support, mounting with udisk and remote filesystems' - 'xfce4-panel: for trash applet' - 'tumbler: for thumbnail previews' - 'thunar-volman: manages removable devices' - 'thunar-archive-plugin: create and deflate archives' - 'thunar-media-tags-plugin: view/edit id3/ogg tags') -options=('!libtool') -install=thunar-notrash.install -backup=('etc/polkit-1/localauthority/50-local.d/org.freedesktop.udisks.pkla') -source=(http://archive.xfce.org/src/xfce/thunar/1.2/Thunar-${pkgver}.tar.bz2 - Ability_to_disable_trash_on_Thunar_$pkgver.patch - org.freedesktop.udisks.pkla) - - -build() { - cd ${srcdir}/Thunar-${pkgver} - patch -p2 < $srcdir/Ability_to_disable_trash_on_Thunar_$pkgver.patch - - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --disable-static \ - --enable-gio-unix \ - --enable-dbus \ - --enable-startup-notification \ - --enable-gudev \ - --enable-notifications \ - --enable-exif \ - --enable-pcre \ - --enable-gtk-doc \ - --disable-debug - make -} - -package() { - cd ${srcdir}/Thunar-${pkgver} - make DESTDIR=${pkgdir} install - sed -i 's:x-directory/gnome-default-handler;::' \ - ${pkgdir}/usr/share/applications/Thunar-folder-handler.desktop - - # install udisks permission file - install -dm700 ${pkgdir}/etc/polkit-1/localauthority - install -dm755 ${pkgdir}/etc/polkit-1/localauthority/50-local.d - install -m644 ${srcdir}/org.freedesktop.udisks.pkla ${pkgdir}/etc/polkit-1/localauthority/50-local.d/ -} -md5sums=('a86df0212db71e61f459bda6bc7b7fb6' - 'a2c1ccb1148667395bb3e1f27ba9d467' - 'a7ddb5eec02d9a8e91a2997862e73cd8') diff --git a/thunar-notrash/org.freedesktop.udisks.pkla b/thunar-notrash/org.freedesktop.udisks.pkla deleted file mode 100644 index 5cc443b..0000000 --- a/thunar-notrash/org.freedesktop.udisks.pkla +++ /dev/null @@ -1,7 +0,0 @@ -[Local Users] -#Identity=unix-user: your_username -Identity=unix-group:storage -Action=org.freedesktop.udisks.* -ResultAny=yes -ResultInactive=no -ResultActive=yes diff --git a/thunar-notrash/thunar-notrash.install b/thunar-notrash/thunar-notrash.install deleted file mode 100644 index 28fdb48..0000000 --- a/thunar-notrash/thunar-notrash.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - update-desktop-database -q - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor -} - -post_upgrade() { - post_install $1 -} - -post_remove() { - update-desktop-database -q - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor -} - diff --git a/thunar-notrash/thunar-vfs-fix-umask.patch b/thunar-notrash/thunar-vfs-fix-umask.patch deleted file mode 100644 index dbfc1f8..0000000 --- a/thunar-notrash/thunar-vfs-fix-umask.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- thunar-vfs/thunar-vfs-io-jobs.c.orig 2009-05-19 18:44:00.000000000 +0100 -+++ thunar-vfs/thunar-vfs-io-jobs.c 2009-05-19 18:46:04.000000000 +0100 -@@ -708,7 +708,7 @@ - _thunar_vfs_job_process_path (job, lp); - - /* try to create the target directory */ -- if (!_thunar_vfs_io_ops_mkdir (lp->data, 0777 & ~umask(0), THUNAR_VFS_IO_OPS_NONE, error)) -+ if (!_thunar_vfs_io_ops_mkdir (lp->data, 0777, THUNAR_VFS_IO_OPS_NONE, error)) - return FALSE; - } - diff --git a/tint2-svn/PKGBUILD b/tint2-svn/PKGBUILD deleted file mode 100644 index 650757e..0000000 --- a/tint2-svn/PKGBUILD +++ /dev/null @@ -1,41 +0,0 @@ -# Contributor: zoulnix <z[o]ulnix.borkedduck.c[o]m> -pkgname=tint2-svn -pkgver=78 -pkgrel=1 -pkgdesc="A basic, good-looking task manager for WMs." -arch=('i686' 'x86_64') -url="http://code.google.com/p/tint2/" -license=('GPL') -depends=('libxinerama' 'libxrandr' 'pango' 'imlib2') -makedepends=('gcc' 'make' 'pkgconfig' 'subversion') -provides=('tint2') -conflicts=('tint2' 'tint' 'ttm') -source=() -md5sums=('') - -_svnmod="tint2" -_svntrunk="http://tint2.googlecode.com/svn/trunk" - -build() { - cd ${srcdir} - - ##### - msg "Getting sources..." - if [ -d ${_svnmod}/.svn ]; then - (cd ${_svnmod} && svn up -r ${pkgver}) - else - svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod} - cd ${_svnmod} - fi - - msg "SVN checkout done or server timeout" - msg "Starting make..." - ##### - - cd ${srcdir}/${_svnmod}/src - sed -i -e 's:CFLAGS= -O2::' Makefile || return 1 - - make clean || return 1 - make || return 1 - make DESTDIR=${pkgdir} install || return 1 -}
\ No newline at end of file diff --git a/tipp10/PKGBUILD b/tipp10/PKGBUILD deleted file mode 100644 index 21ba863..0000000 --- a/tipp10/PKGBUILD +++ /dev/null @@ -1,38 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> -# Contributor: toliman <altergan@hs-albsig.de> - -pkgname=tipp10 -pkgver=2.0.3 -pkgrel=3 -pkgdesc="intelligent typing tutor (german only)" -arch=('i686' 'x86_64') -url="http://www.tipp10.de/" -license=('GPL2') -depends=('qt>=4.2.2') -makedepends=('unzip' 'make') -source=(tipp10.desktop tipp10.png defines.h.patch gcc-4.5.patch \ - "http://www.tipp10.de/download_hidden/tipp10_source_v2-0-3.zip") - -build() { - sed -i 's/tipp10v2.template/..\/share\/tipp10\/tipp10v2.template/' $srcdir/tipp10/def/defines.h - - cd $srcdir/tipp10 - patch -p0 < "$srcdir/defines.h.patch" || return 1 - patch -p0 < "$srcdir/gcc-4.5.patch" || return 1 - qmake - make || return 1 - install -D tipp10 $pkgdir/usr/bin/tipp10 - install -D tipp10v2.template $pkgdir/usr/share/tipp10/tipp10v2.template - install -D $srcdir/tipp10.png $pkgdir/usr/share/pixmaps/tipp10.png - install -D $srcdir/tipp10.desktop $pkgdir/usr/share/applications/tipp10.desktop -} -md5sums=('e0d6c26220396551386f91ce893e040c' - 'ff788e726d357370df1e7c8b19d38fd4' - 'ce67b64cb3a1d25119acd1a43804304d' - 'a9d388ddb17ae93f13acb915bc8eba57' - 'bac29896ec992496f7e0aab992993004') -sha1sums=('c0f9f6dab87ed2cc0557bd0bc29a102f8f4483b7' - '42cc902010030dcea92dd64053523e24028b2dae' - '340aa263721b9fc1df74a1cc828c990061c7d625' - '3eb601ab7c1d68d8c64e949e7e4f8a83b06a518e' - 'faf8c7799c934eaca83a0e077cf9ba458334680b') diff --git a/tipp10/defines.h.patch b/tipp10/defines.h.patch deleted file mode 100644 index 4ff291c..0000000 --- a/tipp10/defines.h.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- def/defines.h.orig 2009-03-09 13:02:26.000000000 +0100 -+++ def/defines.h 2009-03-09 13:02:41.000000000 +0100 -@@ -27,10 +27,10 @@ - #define DEFINES_H
-
- // OS constants
--#define APP_WIN true
-+#define APP_WIN false
- #define APP_MAC false
--#define APP_X11 false
--#define APP_PORTABLE true //at least one of the 3 OS must be true too!
-+#define APP_X11 true
-+#define APP_PORTABLE false //at least one of the 3 OS must be true too!
-
- // Common program constants
- #define APP_ORGANIZATION "Tom Thielicke IT Solutions"
diff --git a/tipp10/gcc-4.5.patch b/tipp10/gcc-4.5.patch deleted file mode 100644 index dfff820..0000000 --- a/tipp10/gcc-4.5.patch +++ /dev/null @@ -1,99 +0,0 @@ ---- sql/chartablesql.cpp 2010-05-08 14:53:48.000000000 +0200 -+++ sql/chartablesql.cpp 2010-05-08 14:53:59.000000000 +0200 -@@ -50,7 +50,7 @@ - // Read the unicode value
- unicode = value.toInt();
- // Convert unicode to a char
-- unicodeToChar = QString::QString(QChar(unicode)); //"\'" + QString::QString(QChar(unicode)) + "\'";
-+ unicodeToChar = QString(QChar(unicode)); //"\'" + QString::QString(QChar(unicode)) + "\'";
- return unicodeToChar;
- } else {
- // Last column (error weight)
---- sql/startsql.cpp 2010-05-08 14:54:24.000000000 +0200 -+++ sql/startsql.cpp 2010-05-08 14:54:49.000000000 +0200 -@@ -338,7 +338,7 @@ - for (i = 0; i < content.size(); i++) {
- //simplifiedContent = QString::QString(
- // content.at(i)).replace(QChar(0x27), "''", Qt::CaseSensitive).simplified();
-- simplifiedContent = trim(QString::QString(
-+ simplifiedContent = trim(QString(
- content.at(i)).replace(QChar(0x27), "''", Qt::CaseSensitive));
-
- if (!query.exec("INSERT INTO own_content VALUES(NULL,'" +
---- widget/lessondialog.cpp 2010-05-08 14:52:48.000000000 +0200 -+++ widget/lessondialog.cpp 2010-05-08 14:53:11.000000000 +0200 -@@ -89,7 +89,7 @@ - *lessonData = lineLessonContent->toPlainText().split("\n", QString::SkipEmptyParts);
- // Delete empty lines
- for (int i = 0; i < lessonData->size(); i++) {
-- if (QString::QString(lessonData->at(i).toLocal8Bit().constData()).simplified() == "") {
-+ if (QString(lessonData->at(i).toLocal8Bit().constData()).simplified() == "") {
- lessonData->removeAt(i);
- }
- }
-@@ -268,7 +268,7 @@ - contentList = lineLessonContent->toPlainText().split("\n", QString::SkipEmptyParts);
- // Delete empty lines
- for (i = 0; i < contentList.size(); i++) {
-- if (QString::QString(contentList.at(i).toLocal8Bit().constData()).simplified() == "") {
-+ if (QString(contentList.at(i).toLocal8Bit().constData()).simplified() == "") {
- contentList.removeAt(i);
- }
- }
---- widget/settingspages.cpp 2010-05-08 14:45:41.000000000 +0200 -+++ widget/settingspages.cpp 2010-05-08 14:45:57.000000000 +0200 -@@ -617,7 +617,7 @@ - QSettings settings;
- #endif
- settings.beginGroup("database");
-- settings.setValue("pathpro", lineDatabasePath->text() + "/" + QString::QString(APP_USER_DB));
-+ settings.setValue("pathpro", lineDatabasePath->text() + "/" + QString(APP_USER_DB));
- settings.endGroup();
- }
-
---- widget/tickerboard.cpp 2010-05-08 14:28:38.000000000 +0200 -+++ widget/tickerboard.cpp 2010-05-08 14:44:11.000000000 +0200 -@@ -96,7 +96,7 @@ -
- if (tickerSpeed == 50) {
- scrollOffset = 290;
-- scroll(-290, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ scroll(-290, 0, QRect(10, 15, 590, 35)); //contentsRect());
- }
-
- startFlag = true;
-@@ -150,7 +150,7 @@ - scrollOffset = 0;
- } else {
- scrollOffset = 290;
-- scroll(-290, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ scroll(-290, 0, QRect(10, 15, 590, 35)); //contentsRect());
- }
- splitLesson();
- }
-@@ -239,7 +239,7 @@ -
- // Move ticker 1 pixel to left
- scrollOffset++;
-- scroll(-1, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ scroll(-1, 0, QRect(10, 15, 590, 35)); //contentsRect());
-
- if ((lessonOffset - scrollOffset) <= 30) {
- setSpeed(tickerSpeed);
-@@ -262,14 +262,14 @@ - // 160 pixels overage (because the user must see at least the next word)
- if ((lessonOffset - scrollOffset) > 200) {
- scrollOffset += (lessonOffset - scrollOffset) - 200;
-- scroll(-((lessonOffset - scrollOffset) - 200), 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ scroll(-((lessonOffset - scrollOffset) - 200), 0, QRect(10, 15, 590, 35)); //contentsRect());
- }
- } else {
- // If the user types faster than the ticker, move ticker faster after
- // 160 pixels overage (because the user must see at least the next word)
- if ((lessonOffset - scrollOffset) > 280) {
- scrollOffset += 570;
-- scroll(-570, 0, QRect::QRect(10, 15, 590, 35)); //contentsRect());
-+ scroll(-570, 0, QRect(10, 15, 590, 35)); //contentsRect());
- }
-
- }
diff --git a/tipp10/tipp10.desktop b/tipp10/tipp10.desktop deleted file mode 100644 index 702cd98..0000000 --- a/tipp10/tipp10.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=TIPP10 -Comment=Intelligent typing tutor -Comment[de]=Intelligenter 10-Finger-Schreibtrainer -Type=Application -Icon=tipp10.png -Exec=tipp10 -Terminal=false -Categories=Application;Education; - diff --git a/tipp10/tipp10.png b/tipp10/tipp10.png Binary files differdeleted file mode 100644 index ef06c94..0000000 --- a/tipp10/tipp10.png +++ /dev/null diff --git a/todotxt/PKGBUILD b/todotxt/PKGBUILD deleted file mode 100644 index e377300..0000000 --- a/todotxt/PKGBUILD +++ /dev/null @@ -1,22 +0,0 @@ -# lifehacker.com's todo.sh script for maintaining a todo.txt file - -# Contributor: David Rosenstrauch <darose@darose.net> - -pkgname=todotxt -_pkgname=todo.txt_cli -pkgver=2.6 -pkgrel=1 -pkgdesc="lifehacker.com's todo.sh script for maintaining a todo.txt file" -url="http://ginatrapani.github.com/todo.txt-cli/" -depends=('bash') -install=$pkgname.install -source=(http://cloud.github.com/downloads/ginatrapani/todo.txt-cli/$_pkgname-$pkgver.tar.gz) -md5sums=('1395ed8cdce96ef630c25522a7a11998') -arch=('any') -license="GPL" - -build() { - cd $startdir/src/$_pkgname-$pkgver - install -D -m644 todo.cfg $startdir/pkg/usr/share/$pkgname/todo.cfg - install -D -m755 todo.sh $startdir/pkg/usr/bin/todo.sh -} diff --git a/todotxt/todotxt.install b/todotxt/todotxt.install deleted file mode 100644 index 745117a..0000000 --- a/todotxt/todotxt.install +++ /dev/null @@ -1,17 +0,0 @@ -# arg 1: the new package version -post_install() { - echo - echo "Please copy the file /usr/share/todotxt/todo.cfg to ~/.todo.cfg" - echo "and then edit the TODO_DIR path in that file to your desired todo data directory." - echo -} - -post_upgrade() { - echo - echo "Please note that the config file has changed from ~/.todo to ~/.todo.cfg," - echo "and the config file contents have changed slightly since the previous release." - echo - echo "Please copy the file /usr/share/todotxt/todo.cfg to ~/.todo.cfg" - echo "and then edit the TODO_DIR path in that file to your desired todo data directory." - echo -} diff --git a/transmission-remote-gtk/PKGBUILD b/transmission-remote-gtk/PKGBUILD deleted file mode 100644 index 4fd7358..0000000 --- a/transmission-remote-gtk/PKGBUILD +++ /dev/null @@ -1,32 +0,0 @@ -# Maintainer: PitBall - -pkgname=transmission-remote-gtk -pkgver=0.7 -pkgrel=1 -pkgdesc="GTK application for remote management of the Transmission BitTorrent client via its RPC interface" -arch=(i686 x86_64) -license=('GPL2') -depends=('json-glib' 'curl' 'libproxy' 'libnotify' 'libunique' 'geoip' 'desktop-file-utils' 'hicolor-icon-theme') -makedepends=('pkgconfig' 'intltool') -install="${pkgname}.install" -options=('!libtool') -url="http://code.google.com/p/transmission-remote-gtk/" -source=("http://transmission-remote-gtk.googlecode.com/files/${pkgname}-${pkgver}.tar.gz") - -sha1sums=('a37f3857404d0493bbdbf894cf5714f800e21b37') - -build() -{ - cd "${srcdir}/${pkgname}-${pkgver}" - - ./configure --prefix=/usr --sysconfdir=/etc - - make - - make DESTDIR="${pkgdir}" install - - #add optional link in pixmaps folder - install -dm755 ${pkgdir}/usr/share/pixmaps - cd ${pkgdir}/usr/share/pixmaps - ln -s ../icons/hicolor/scalable/apps/transmission-remote-gtk.svg transmission-remote-gtk.svg -} diff --git a/transmission-remote-gtk/transmission-remote-gtk.install b/transmission-remote-gtk/transmission-remote-gtk.install deleted file mode 100644 index 22f0133..0000000 --- a/transmission-remote-gtk/transmission-remote-gtk.install +++ /dev/null @@ -1,19 +0,0 @@ -post_install() { - update-desktop-database -q - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor -} - -pre_upgrade() { - if [ -f usr/share/gconf/schemas/transmission-remote-gtk.schemas ]; then - usr/sbin/gconfpkg --uninstall transmission-remote-gtk - fi -} - -post_upgrade() { - post_install -} - -post_remove() { - update-desktop-database -q - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor -} diff --git a/tsung/PKGBUILD b/tsung/PKGBUILD deleted file mode 100644 index a418e41..0000000 --- a/tsung/PKGBUILD +++ /dev/null @@ -1,22 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> - -pkgname=tsung -pkgver=1.3.3 -pkgrel=1 -pkgdesc="Erlang-based open-source multi-protocol distributed load testing tool" -arch=('i686' 'x86_64') -url="http://tsung.erlang-projects.org" -license=('GPL') -depends=('erlang>=R10B' 'gnuplot' 'perl>=5.0') -source=("http://tsung.erlang-projects.org/dist/$pkgname-$pkgver.tar.gz") - -build() { - cd "$srcdir/$pkgname-$pkgver" - - ./configure --prefix=/usr - make DESTDIR="$pkgdir" install - -} - -# vim:set ts=2 sw=2 et: -md5sums=('c517187b44e22c5b3e169f4dff3164ca') diff --git a/ttf-ms-fonts/LICENSE b/ttf-ms-fonts/LICENSE deleted file mode 100644 index 50f111c..0000000 --- a/ttf-ms-fonts/LICENSE +++ /dev/null @@ -1,44 +0,0 @@ -END-USER LICENSE AGREEMENT FOR -MICROSOFT SOFTWARE - -IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation for the Microsoft software accompanying this EULA, which includes computer software and may include associated media, printed materials, and "on-line" or electronic documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your rights to make and use copies of the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, you may not use the SOFTWARE PRODUCT. - - -SOFTWARE PRODUCT LICENSE -The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold. - - -1. GRANT OF LICENSE. This EULA grants you the following rights: - - * Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT. - * Reproduction and Distribution. You may reproduce and distribute an unlimited number of copies of the SOFTWARE PRODUCT; provided that each copy shall be a true and complete copy, including all copyright and trademark notices, and shall be accompanied by a copy of this EULA. Copies of the SOFTWARE PRODUCT may not be distributed for profit either on a standalone basis or included as part of your own product. - - -2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS. - - * Limitations on Reverse Engineering, Decompilation, and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. - * Restrictions on Alteration. You may not rename, edit or create any derivative works from the SOFTWARE PRODUCT, other than subsetting when embedding them in documents. - * Software Transfer. You may permanently transfer all of your rights under this EULA, provided the recipient agrees to the terms of this EULA. - * Termination. Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts. - - -3. COPYRIGHT. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, text, and "applets" incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT are owned by Microsoft or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE PRODUCT like any other copyrighted material. - - -4. U.S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399. - - -LIMITED WARRANTY - -NO WARRANTIES. Microsoft expressly disclaims any warranty for the SOFTWARE PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or noninfringement. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you. - -NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall Microsoft or its suppliers be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this Microsoft product, even if Microsoft has been advised of the possibility of such damages. Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you. - - -MISCELLANEOUS - -If you acquired this product in the United States, this EULA is governed by the laws of the State of Washington. - -If this product was acquired outside the United States, then local laws may apply. - -Should you have any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Sales Information Center/One Microsoft Way/Redmond, WA 98052-6399. diff --git a/ttf-ms-fonts/PKGBUILD b/ttf-ms-fonts/PKGBUILD deleted file mode 100644 index 74a213b..0000000 --- a/ttf-ms-fonts/PKGBUILD +++ /dev/null @@ -1,42 +0,0 @@ -# Maintainer: birdflesh <antkoul at gmail dot com> -# Contributor: Army <uli.armbruster@gmail.com> -# Contributor: Thayer Williams <thayer@archlinux.org> -# Contributor: dale <dale@archlinux.org> - -pkgname=ttf-ms-fonts -pkgver=2.0 -pkgrel=7 -pkgdesc="Core TTF Fonts from Microsoft" -arch=('any') -url="http://corefonts.sourceforge.net/" -license=('custom:microsoft') -depends=('fontconfig' 'xorg-fonts-encodings') -makedepends=('cabextract') -install=$pkgname.install -_sfpath="http://downloads.sourceforge.net/corefonts" -source=(${_sfpath}/andale32.exe ${_sfpath}/arial32.exe ${_sfpath}/arialb32.exe - ${_sfpath}/comic32.exe ${_sfpath}/courie32.exe ${_sfpath}/georgi32.exe - ${_sfpath}/impact32.exe ${_sfpath}/times32.exe ${_sfpath}/trebuc32.exe - ${_sfpath}/verdan32.exe ${_sfpath}/webdin32.exe - LICENSE) -md5sums=('cbdc2fdd7d2ed0832795e86a8b9ee19a' - '9637df0e91703179f0723ec095a36cb5' - 'c9089ae0c3b3d0d8c4b0a95979bb9ff0' - '2b30de40bb5e803a0452c7715fc835d1' - '4e412c772294403ab62fb2d247d85c60' - '4d90016026e2da447593b41a8d8fa8bd' - '7907c7dd6684e9bade91cff82683d9d7' - 'ed39c8ef91b9fb80f76f702568291bd5' - '0d7ea16cac6261f8513a061fbfcdb2b5' - '12d2a75f8156e10607be1eaa8e8ef120' - '230a1d13a365b22815f502eb24d9149b' - '7a760fc266e256421078597e47f1af68') - -package() { - install -dm755 ${pkgdir}/usr/share/fonts/TTF - for font in ${srcdir}/*.exe - do - cabextract --lowercase --directory=${pkgdir}/usr/share/fonts/TTF/ ${font} -F '*.ttf' - done - install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE -} diff --git a/ttf-ms-fonts/andale32.exe b/ttf-ms-fonts/andale32.exe Binary files differdeleted file mode 100644 index 05354ff..0000000 --- a/ttf-ms-fonts/andale32.exe +++ /dev/null diff --git a/ttf-ms-fonts/arial32.exe b/ttf-ms-fonts/arial32.exe Binary files differdeleted file mode 100644 index caaa6b6..0000000 --- a/ttf-ms-fonts/arial32.exe +++ /dev/null diff --git a/ttf-ms-fonts/arialb32.exe b/ttf-ms-fonts/arialb32.exe Binary files differdeleted file mode 100644 index 3e78074..0000000 --- a/ttf-ms-fonts/arialb32.exe +++ /dev/null diff --git a/ttf-ms-fonts/comic32.exe b/ttf-ms-fonts/comic32.exe Binary files differdeleted file mode 100644 index 9e69a37..0000000 --- a/ttf-ms-fonts/comic32.exe +++ /dev/null diff --git a/ttf-ms-fonts/courie32.exe b/ttf-ms-fonts/courie32.exe Binary files differdeleted file mode 100644 index 57a1364..0000000 --- a/ttf-ms-fonts/courie32.exe +++ /dev/null diff --git a/ttf-ms-fonts/georgi32.exe b/ttf-ms-fonts/georgi32.exe Binary files differdeleted file mode 100644 index 5022b38..0000000 --- a/ttf-ms-fonts/georgi32.exe +++ /dev/null diff --git a/ttf-ms-fonts/impact32.exe b/ttf-ms-fonts/impact32.exe Binary files differdeleted file mode 100644 index 193eb52..0000000 --- a/ttf-ms-fonts/impact32.exe +++ /dev/null diff --git a/ttf-ms-fonts/times32.exe b/ttf-ms-fonts/times32.exe Binary files differdeleted file mode 100644 index fd7257f..0000000 --- a/ttf-ms-fonts/times32.exe +++ /dev/null diff --git a/ttf-ms-fonts/trebuc32.exe b/ttf-ms-fonts/trebuc32.exe Binary files differdeleted file mode 100644 index c92660c..0000000 --- a/ttf-ms-fonts/trebuc32.exe +++ /dev/null diff --git a/ttf-ms-fonts/ttf-ms-fonts.install b/ttf-ms-fonts/ttf-ms-fonts.install deleted file mode 100644 index 7d26d0c..0000000 --- a/ttf-ms-fonts/ttf-ms-fonts.install +++ /dev/null @@ -1,16 +0,0 @@ -post_install() { - echo -n "Updating font cache... " - fc-cache -f > /dev/null - mkfontscale /usr/share/fonts/TTF - mkfontdir /usr/share/fonts/TTF - echo "done." -} - -post_upgrade() { - post_install $1 -} - -post_remove() { - post_install $1 -} - diff --git a/ttf-ms-fonts/verdan32.exe b/ttf-ms-fonts/verdan32.exe Binary files differdeleted file mode 100644 index b3c451e..0000000 --- a/ttf-ms-fonts/verdan32.exe +++ /dev/null diff --git a/ttf-ms-fonts/webdin32.exe b/ttf-ms-fonts/webdin32.exe Binary files differdeleted file mode 100644 index c8cd27d..0000000 --- a/ttf-ms-fonts/webdin32.exe +++ /dev/null diff --git a/vhba-module/PKGBUILD b/vhba-module/PKGBUILD deleted file mode 100644 index 58842cc..0000000 --- a/vhba-module/PKGBUILD +++ /dev/null @@ -1,24 +0,0 @@ -# $Id: PKGBUILD 6790 2009-12-22 18:03:34Z ibiru $ -# Maintainer: Mateusz Herych <heniekk@gmail.com> -# Contributor: Charles Lindsay <charles@chaoslizard.org> - -pkgname=vhba-module -pkgver=1.2.1 -_kernver='2.6.34-ARCH' -pkgrel=6 -pkgdesc="Kernel module that emulates SCSI devices" -arch=('i686' 'x86_64') -url="http://cdemu.sourceforge.net/" -license=('GPL2') -depends=('kernel26>=2.6.34' 'kernel26<2.6.35') -makedepends=('kernel26-headers>=2.6.32.2') -install=vhba-module.install -source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2) -md5sums=('a3b6ad798f2b72ef599df797ef79e5ec') - -build() { - cd "$srcdir/$pkgname-$pkgver" - make KDIR=/usr/src/linux-${_kernver} || return 1 - install -D vhba.ko "$pkgdir/lib/modules/${_kernver}/extra/vhba.ko" || return 1 - sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" "$startdir/vhba-module.install" -} diff --git a/vhba-module/vhba-module.install b/vhba-module/vhba-module.install deleted file mode 100644 index 422ff82..0000000 --- a/vhba-module/vhba-module.install +++ /dev/null @@ -1,16 +0,0 @@ -post_install() { - echo ">> Place 'vhba' in MODULES= in /etc/rc.conf to enable vhba on system boot." - echo ">> This module needs to be recompiled for every kernel version upgrade." - KERNEL_VERSION='2.6.32-ARCH' - depmod $KERNEL_VERSION > /dev/null 2>&1 -} - -post_upgrade() { - post_install -} - -post_remove() { - KERNEL_VERSION='2.6.32-ARCH' - depmod $KERNEL_VERSION > /dev/null 2>&1 -} - diff --git a/vi/PKGBUILD b/vi/PKGBUILD deleted file mode 100644 index 4aa7877..0000000 --- a/vi/PKGBUILD +++ /dev/null @@ -1,30 +0,0 @@ -# $Id$ -# Maintainer: tobias [ tobias funnychar archlinux org ] -# Contributor: flx <effelleks@googlemail.com> - -pkgname=vi -_pkgname=nvi -pkgver=1.81.6 -pkgrel=1 -pkgdesc='A reimplementation of the ex/vi text editors with unicode support.' -arch=('i686' 'x86_64') -url='http://www.kotnet.org/~skimo/nvi/' -license=('custom:nvi') -groups=('base') -conflicts=('nvi-unicode') -depends=('bash' 'db') -options=(!libtool force) -source=(http://www.kotnet.org/~skimo/nvi/devel/${_pkgname}-${pkgver}.tar.bz2 \ - db47-hack.patch) -md5sums=('88d1e23115ee9f2961186b62e55f5704' 'f9dd0ee3b00e1a9915c49acc5a241a6d') - -build() { - cd ${srcdir}/${_pkgname}-${pkgver}/ - patch -p1 <../db47-hack.patch - cd ./build.unix - ../dist/configure --prefix=/usr --program-prefix= --enable-widechar - make || return 1 - make DESTDIR=${pkgdir} install - install -D -m644 ../LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE -} -## vim:set ts=2 sw=2 et: diff --git a/vi/db47-hack.patch b/vi/db47-hack.patch deleted file mode 100644 index f2f206b..0000000 --- a/vi/db47-hack.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/cl/cl_main.c b/cl/cl_main.c -index 0ecbe44..87feb28 100644 ---- a/cl/cl_main.c -+++ b/cl/cl_main.c -@@ -57,6 +57,9 @@ main(int argc, char **argv) - int rval; - char **p_av, **t_av, *ttype; - -+ /* Hack for db-4.7. */ -+ unsetenv("LANG"); -+ unsetenv("LC_ALL"); - /* If loaded at 0 and jumping through a NULL pointer, stop. */ - if (reenter++) - abort(); -diff --git a/common/db.h b/common/db.h -index fd1dc64..00a7ce7 100644 ---- a/common/db.h -+++ b/common/db.h -@@ -18,7 +18,7 @@ - - #if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 - #define db_open(db,file,type,flags,mode) \ -- (db)->open(db, NULL, file, NULL, type, flags, mode) -+ (db)->open(db, NULL, file, NULL, type, flags | DB_CREATE, mode) - #else - #define db_open(db,file,type,flags,mode) \ - (db)->open(db, file, NULL, type, flags, mode)
\ No newline at end of file diff --git a/vi/fetch_patches.sh b/vi/fetch_patches.sh deleted file mode 100644 index fdd9188..0000000 --- a/vi/fetch_patches.sh +++ /dev/null @@ -1,56 +0,0 @@ -# the external logic for pulling in patches - -get_patches() { - _patchdir=${startdir}/src/patches - cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//") - if [ -d ${_patchdir} ]; then - rm -rf ${_patchdir} - echo -e "\tremove patches from old build" - fi - mkdir ${_patchdir} && cd ${_patchdir} - _rpath=ftp://ftp.vim.org/pub/vim/patches/${_srcver} - - # change IFS to loop line-by-line - _OLDIFS=$IFS - IFS=" -" - echo -e "\tfetching checksumfile for patches" - wget ${_rpath}/MD5SUMS >/dev/null 2>&1 - - downloads=0 - for _line in $(/bin/cat MD5SUMS); do - downloads=$((${downloads} + 1)) - _md5=$(echo $_line | cut -d ' ' -f1) - _file=$(echo $_line | cut -d ' ' -f3) - if [ -f ${SRCDEST}/vim-${_srcver}/${_file} ]; then - echo -e "\thaving patch file:${_file}" - cp ${SRCDEST}/vim-${_srcver}/${_file} ./ - else - echo -n -e "\t... fetching patch file: ${_file} ..." - wget ${_rpath}/${_file} >/dev/null 2>&1 - if [ -w ${SRCDEST} ]; then - if [ ! -d ${SRCDEST}/vim-${_srcver} ]; then - mkdir -p ${SRCDEST}/vim-${_srcver} - fi - cp ${_file} ${SRCDEST}/vim-${_srcver}/ - echo " done!" - fi - fi - - if [ $(echo "${_md5} ${_file}" | md5sum --status -c -) ]; then - echo ${_file} md5sums do not match - return 1 - fi - done - - ######## - - IFS=$_OLDIFS - rm MD5SUMS - cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//") - for _patchnum in $(seq -w 1 ${_patchlevel} ); do - patch -Np0 -i ${_patchdir}/${_srcver}.${_patchnum} || return 1 - done - rm -rf ${_patchdir} - return 0 -} diff --git a/vi/fetch_patches.sh.diff b/vi/fetch_patches.sh.diff deleted file mode 100644 index f08d5f5..0000000 --- a/vi/fetch_patches.sh.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- fetch_patches.sh.orig 2009-02-15 19:34:42.000000000 +0100 -+++ fetch_patches.sh 2009-02-15 19:38:06.000000000 +0100 -@@ -44,16 +44,12 @@ - done - - ######## -- -- if [ ${downloads} != ${_patchlevel} ]; then -- echo -e "Number of patches does not match the patchlevel!\nEdit the PKGBUILD accordingly!" -- return 1 -- fi -+ - IFS=$_OLDIFS - rm MD5SUMS - cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//") -- for _patch in $(/bin/ls ${_patchdir}); do -- patch -Np0 -i ${_patchdir}/${_patch} || return 1 -+ for _patchnum in $(seq -w 1 ${_patchlevel} ); do -+ patch -Np0 -i ${_patchdir}/${_srcver}.${_patchnum} || return 1 - done - rm -rf ${_patchdir} - return 0 diff --git a/vi/fetch_patches.sh.orig b/vi/fetch_patches.sh.orig deleted file mode 100644 index 03e16e2..0000000 --- a/vi/fetch_patches.sh.orig +++ /dev/null @@ -1,60 +0,0 @@ -# the external logic for pulling in patches - -get_patches() { - _patchdir=${startdir}/src/patches - cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//") - if [ -d ${_patchdir} ]; then - rm -rf ${_patchdir} - echo -e "\tremove patches from old build" - fi - mkdir ${_patchdir} && cd ${_patchdir} - _rpath=ftp://ftp.vim.org/pub/vim/patches/${_srcver} - - # change IFS to loop line-by-line - _OLDIFS=$IFS - IFS=" -" - echo -e "\tfetching checksumfile for patches" - wget ${_rpath}/MD5SUMS >/dev/null 2>&1 - - downloads=0 - for _line in $(/bin/cat MD5SUMS); do - downloads=$((${downloads} + 1)) - _md5=$(echo $_line | cut -d ' ' -f1) - _file=$(echo $_line | cut -d ' ' -f3) - if [ -f ${SRCDEST}/vim-${_srcver}/${_file} ]; then - echo -e "\thaving patch file:${_file}" - cp ${SRCDEST}/vim-${_srcver}/${_file} ./ - else - echo -n -e "\t... fetching patch file: ${_file} ..." - wget ${_rpath}/${_file} >/dev/null 2>&1 - if [ -w ${SRCDEST} ]; then - if [ ! -d ${SRCDEST}/vim-${_srcver} ]; then - mkdir -p ${SRCDEST}/vim-${_srcver} - fi - cp ${_file} ${SRCDEST}/vim-${_srcver}/ - echo " done!" - fi - fi - - if [ $(echo "${_md5} ${_file}" | md5sum --status -c -) ]; then - echo ${_file} md5sums do not match - return 1 - fi - done - - ######## - - if [ ${downloads} != ${_patchlevel} ]; then - echo -e "Number of patches does not match the patchlevel!\nEdit the PKGBUILD accordingly!" - return 1 - fi - IFS=$_OLDIFS - rm MD5SUMS - cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//") - for _patch in $(/bin/ls ${_patchdir}); do - patch -Np0 -i ${_patchdir}/${_patch} || return 1 - done - rm -rf ${_patchdir} - return 0 -} diff --git a/vi/fetch_runtime.sh b/vi/fetch_runtime.sh deleted file mode 100644 index f244ea5..0000000 --- a/vi/fetch_runtime.sh +++ /dev/null @@ -1,117 +0,0 @@ -# the purpose of this magic is to pull in the latest runtime files for vim -# we start withe theruntime provoded by the tarballs and compare MD5s against -# the latest runtime -# if this fails we look in the local source cache if they have been fetched -# for an earlier build and compare those MD5 files -# if this fails, we fetch the stuff from online and store it in the local src -# cache. -# The local cache has to be set (makepkg.conf) AND it has to be writable - -update_runtime() { - _OLDDIR=$(pwd) #get absolute path - _errors=0 - _ftp="ftp://ftp.vim.org/pub/vim/runtime" - - # we're gonna be sneaky and grok the A-A-P recipe for the files we need - _recipe="getunix.aap" - _srccache="${SRCDEST}/vim-${_srcver}/" - - echo "getting runtime recipe" - cd ${startdir}/src - [ -f "${_recipe}" ] && rm "${_recipe}" - wget "${_ftp}/${_recipe}" >/dev/null 2>&1 - - cd "${_runtimedir}" - _runtimedir=$(pwd) #get absolute path - - # change IFS to loop line-by-line - _OLDIFS=$IFS - IFS=" -" - echo "begin fetching updated runtime files..." - for _file in $(grep "file = " "${startdir}/src/${_recipe}"); do - _file=$(echo ${_file} | sed "s|.*file = \(.*\)|\1|") - _md5=$(grep -A2 "file = ${_file} *$" "${startdir}/src/${_recipe}" | \ - grep "get_md5" | \ - sed 's|@if get_md5(file) != "\(.*\)":|\1|g') - _dir=$(dirname "${_file}") - - mkdir -p "${_dir}" - - echo -e "\t${_file}" - _havefile=0 - # if we have the file and the MD5sum fails, we technically don't have the file - if [ -f ${_file} ]; then - # MD5 fails ? ... we don't have the file - if [ $(echo "${_md5} ${_file}" | md5sum --status -c -) ]; then - rm ${_file} - else - _havefile=1 - fi - fi - # look files that were not copied from the unzipped sources - _cachefile=${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")/runtime/${_file} - if [ ${_havefile} -ne 1 -a -f ${_cachefile} ]; then - # MD5 fails ? ... we lookup if we downloaded another version earlier - if [ $(echo "${_md5} ${_cachefile}" | md5sum --status -c -) ]; then - _cachefile=${_srccache}/${_file} - if [ -f ${_cachefile} ]; then - if [ $(echo "${_md5} ${_cachefile}" | md5sum --status -c -) ]; then - rm ${_cachefile} - else - cp ${_cachefile} ${_dir} - _havefile=1 - fi - fi - else - cp ${_cachefile} ${_dir} - _havefile=1 - fi - fi - # look up the local $SRCDEST - _cachefile=${_srccache}/${_file} - if [ ${_havefile} -ne 1 -a -f ${_cachefile} ]; then - # MD5 fails ? ... we don't have the file - if [ $(echo "${_md5} ${_cachefile}" | md5sum --status -c -) ]; then - rm ${_cachefile} - else - cp ${_cachefile} ${_dir} - _havefile=1 - fi - fi - # so we finally have to fetch it and store it to $SRCDEST (cache) - if [ ${_havefile} -ne 1 ]; then - echo -n -e "\t ... fetching file ${_file} ..." - cd "${_dir}" - wget "${_ftp}/${_file}" >/dev/null 2>&1 - cd "${_runtimedir}" - # store freshly downloaded file in SRCDEST - mkdir -p ${_srccache}/${_dir} - cp ${_file} ${_srccache}/${_dir} - echo -e " done!" - fi - - # check the MD5 sum finally - if [ $(echo "${_md5} ${_file}" | md5sum --status -c -) ]; then - echo "!!!! md5sum check for ${_file} failed !!!!" - errors=$((${_errors} + 1)) - fi - done - IFS=${_OLDIFS} - - echo "vim runtime got updated" - - if [ ${_errors} -gt 0 ]; then - echo "${_errors} failed MD5 checks while updating runtime files -> build can't be completed" - return 1 - else - echo -e "\tpatching filetype.vim for better handling of pacman related files ..." - sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" filetype.vim - sed -i "/find the end/,+3{s/changelog_date_entry_search/changelog_date_end_entry_search/}" ftplugin/changelog.vim - fi - # make Aaron happy - wget http://www.vim.org/scripts/download_script.php\?src_id=7766 \ - -O autoload/pythoncomplete.vim - cd "${_OLDDIR}" - return 0 -} diff --git a/vi/vi.install b/vi/vi.install deleted file mode 100644 index ebb73c0..0000000 --- a/vi/vi.install +++ /dev/null @@ -1,37 +0,0 @@ -post_install() { - # if we have vim installed create view/rview symlinks to vim - if [ ! -f usr/bin/vim ] ; then - cd usr/bin - ln -s vi view - ln -s vi rview - cd ${OLDPWD} - echo "Create vi related symlinks..." - fi - echo -n "Updating vi help tags..." - usr/bin/vi --noplugins -u NONE -U NONE \ - --cmd ":helptags usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1 - echo "done." -} - -pre_remove() { - # if vi is a binary instead of a symlink we have an intact gvim installation - # with a different binary/symlink structure - # we recover what pacmans database knows about Vim - if [ ! -f usr/bin/vim ] ; then - rm -f usr/bin/view usr/bin/rview - echo "Remove vi related symlinks ..." - fi -} - -post_upgrade() { - post_install $1 -} - -pre_upgrade() { - pre_remove $2 -} - - -op=$1 -shift -[ "$(type -t "$op")" = "function" ] && $op "$@" diff --git a/vi/vim-7.2/7.2.001 b/vi/vim-7.2/7.2.001 deleted file mode 100644 index 3bcb7d0..0000000 --- a/vi/vim-7.2/7.2.001 +++ /dev/null @@ -1,61 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.001 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.001 -Problem: Mac: pseudo-ttys don't work properly on Leopard, resulting in the - shell not to have a prompt, CTRL-C not working, etc. -Solution: Don't use SVR4 compatible ptys, even though they are detected. - (Ben Schmidt) -Files: src/pty.c - - -*** ../vim-7.2.000/src/pty.c Wed Aug 6 19:04:29 2008 ---- src/pty.c Fri Aug 15 04:00:34 2008 -*************** -*** 270,278 **** - } - #endif - -! #if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) - -! /* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work! */ - #define PTY_DONE - int - OpenPTY(ttyn) ---- 270,279 ---- - } - #endif - -! #if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) && !defined(MACOS_X) - -! /* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work! -! * Same for Mac OS X Leopard. */ - #define PTY_DONE - int - OpenPTY(ttyn) -*** ../vim-7.2.000/src/version.c Sat Aug 9 19:37:37 2008 ---- src/version.c Sun Aug 17 22:56:25 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 1, - /**/ - --- -ARTHUR: Now stand aside worthy adversary. -BLACK KNIGHT: (Glancing at his shoulder) 'Tis but a scratch. -ARTHUR: A scratch? Your arm's off. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.002 b/vi/vim-7.2/7.2.002 deleted file mode 100644 index e1ee32c..0000000 --- a/vi/vim-7.2/7.2.002 +++ /dev/null @@ -1,47 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.002 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.002 -Problem: Leaking memory when displaying menus. -Solution: Free allocated memory. (Dominique Pelle) -Files: src/menu.c - - -*** ../vim-7.2.001/src/menu.c Wed Jun 25 00:19:17 2008 ---- src/menu.c Sat Aug 16 05:38:45 2008 -*************** -*** 1120,1125 **** ---- 1120,1126 ---- - parent = menu; - menu = menu->children; - } -+ vim_free(path_name); - - /* Now we have found the matching menu, and we list the mappings */ - /* Highlight title */ -*** ../vim-7.2.001/src/version.c Sun Aug 17 23:01:21 2008 ---- src/version.c Sun Aug 17 23:42:53 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 2, - /**/ - --- -ARTHUR: You are indeed brave Sir knight, but the fight is mine. -BLACK KNIGHT: Had enough? -ARTHUR: You stupid bastard. You havn't got any arms left. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.003 b/vi/vim-7.2/7.2.003 deleted file mode 100644 index 626d81e..0000000 --- a/vi/vim-7.2/7.2.003 +++ /dev/null @@ -1,107 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.003 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.003 -Problem: Typo in translated message. Message not translated. -Solution: Correct spelling. Add _(). (Dominique Pelle) -Files: src/spell.c, src/version.c - - -*** ../vim-7.2.002/src/spell.c Tue Jun 24 22:21:31 2008 ---- src/spell.c Sun Aug 10 12:51:38 2008 -*************** -*** 77,83 **** - - /* - * Do the opposite: based on a maximum end score and a known sound score, -! * compute the the maximum word score that can be used. - */ - #define MAXSCORE(word_score, sound_score) ((4 * word_score - sound_score) / 3) - ---- 77,83 ---- - - /* - * Do the opposite: based on a maximum end score and a known sound score, -! * compute the maximum word score that can be used. - */ - #define MAXSCORE(word_score, sound_score) ((4 * word_score - sound_score) / 3) - -*************** -*** 625,631 **** - /* TRUE if a word appears in the list of banned words. */ - #define WAS_BANNED(su, word) (!HASHITEM_EMPTY(hash_find(&su->su_banned, word))) - -! /* Number of suggestions kept when cleaning up. we need to keep more than - * what is displayed, because when rescore_suggestions() is called the score - * may change and wrong suggestions may be removed later. */ - #define SUG_CLEAN_COUNT(su) ((su)->su_maxcount < 130 ? 150 : (su)->su_maxcount + 20) ---- 625,631 ---- - /* TRUE if a word appears in the list of banned words. */ - #define WAS_BANNED(su, word) (!HASHITEM_EMPTY(hash_find(&su->su_banned, word))) - -! /* Number of suggestions kept when cleaning up. We need to keep more than - * what is displayed, because when rescore_suggestions() is called the score - * may change and wrong suggestions may be removed later. */ - #define SUG_CLEAN_COUNT(su) ((su)->su_maxcount < 130 ? 150 : (su)->su_maxcount + 20) -*************** -*** 5980,5986 **** - else if (spin->si_newprefID == 0 || spin->si_newprefID == 127) - MSG(_("Too many compound flags")); - else -! MSG(_("Too many posponed prefixes and/or compound flags")); - } - - if (syllable != NULL) ---- 5980,5986 ---- - else if (spin->si_newprefID == 0 || spin->si_newprefID == 127) - MSG(_("Too many compound flags")); - else -! MSG(_("Too many postponed prefixes and/or compound flags")); - } - - if (syllable != NULL) -*** ../vim-7.2.002/src/version.c Sun Aug 17 23:43:53 2008 ---- src/version.c Mon Aug 25 04:06:52 2008 -*************** -*** 790,796 **** - MSG_PUTS(_("\nRISC OS version")); - #endif - #ifdef VMS -! MSG_PUTS("\nOpenVMS version"); - # ifdef HAVE_PATHDEF - if (*compiled_arch != NUL) - { ---- 792,798 ---- - MSG_PUTS(_("\nRISC OS version")); - #endif - #ifdef VMS -! MSG_PUTS(_("\nOpenVMS version")); - # ifdef HAVE_PATHDEF - if (*compiled_arch != NUL) - { -*** ../vim-7.2.002/src/version.c Sun Aug 17 23:43:53 2008 ---- src/version.c Mon Aug 25 04:06:52 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 3, - /**/ - --- -I learned the customs and mannerisms of engineers by observing them, much the -way Jane Goodall learned about the great apes, but without the hassle of -grooming. - (Scott Adams - The Dilbert principle) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.004 b/vi/vim-7.2/7.2.004 deleted file mode 100644 index 8e7ed3e..0000000 --- a/vi/vim-7.2/7.2.004 +++ /dev/null @@ -1,103 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.004 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.004 -Problem: Cscope help message is not translated. -Solution: Put it in _(). (Dominique Pelle) -Files: src/if_cscope.c, src/if_cscope.h - - -*** ../vim-7.2.003/src/if_cscope.c Tue Jun 24 23:52:06 2008 ---- src/if_cscope.c Mon Aug 25 04:34:19 2008 -*************** -*** 74,80 **** - { "add", cs_add, - N_("Add a new database"), "add file|dir [pre-path] [flags]", 0 }, - { "find", cs_find, -! N_("Query for a pattern"), FIND_USAGE, 1 }, - { "help", cs_help, - N_("Show this message"), "help", 0 }, - { "kill", cs_kill, ---- 74,80 ---- - { "add", cs_add, - N_("Add a new database"), "add file|dir [pre-path] [flags]", 0 }, - { "find", cs_find, -! N_("Query for a pattern"), "find c|d|e|f|g|i|s|t name", 1 }, - { "help", cs_help, - N_("Show this message"), "help", 0 }, - { "kill", cs_kill, -*************** -*** 1180,1186 **** - (void)smsg((char_u *)_("%-5s: %-30s (Usage: %s)"), - cmdp->name, _(cmdp->help), cmdp->usage); - if (strcmp(cmdp->name, "find") == 0) -! MSG_PUTS(FIND_HELP); - cmdp++; - } - ---- 1180,1195 ---- - (void)smsg((char_u *)_("%-5s: %-30s (Usage: %s)"), - cmdp->name, _(cmdp->help), cmdp->usage); - if (strcmp(cmdp->name, "find") == 0) -! MSG_PUTS(_("\n" -! " c: Find functions calling this function\n" -! " d: Find functions called by this function\n" -! " e: Find this egrep pattern\n" -! " f: Find this file\n" -! " g: Find this definition\n" -! " i: Find files #including this file\n" -! " s: Find this C symbol\n" -! " t: Find assignments to\n")); -! - cmdp++; - } - -*** ../vim-7.2.003/src/if_cscope.h Thu Sep 6 17:38:58 2007 ---- src/if_cscope.h Mon Aug 25 04:34:17 2008 -*************** -*** 42,58 **** - * f 7name Find this file - * i 8name Find files #including this file - */ -- #define FIND_USAGE "find c|d|e|f|g|i|s|t name" -- #define FIND_HELP "\n\ -- c: Find functions calling this function\n\ -- d: Find functions called by this function\n\ -- e: Find this egrep pattern\n\ -- f: Find this file\n\ -- g: Find this definition\n\ -- i: Find files #including this file\n\ -- s: Find this C symbol\n\ -- t: Find assignments to\n" -- - - typedef struct { - char * name; ---- 42,47 ---- -*** ../vim-7.2.003/src/version.c Mon Aug 25 04:12:38 2008 ---- src/version.c Mon Aug 25 04:29:53 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 4, - /**/ - --- -If someone questions your market projections, simply point out that your -target market is "People who are nuts" and "People who will buy any damn -thing". Nobody is going to tell you there aren't enough of those people -to go around. - (Scott Adams - The Dilbert principle) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.005 b/vi/vim-7.2/7.2.005 deleted file mode 100644 index 20cce85..0000000 --- a/vi/vim-7.2/7.2.005 +++ /dev/null @@ -1,149 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.005 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.005 -Problem: A few problems when profiling. Using flag pointer instead of flag - value. Allocating zero bytes. Not freeing used memory. -Solution: Remove wrong '&' characters. Skip dumping when there is nothing - to dump. Free used memory. (Dominique Pelle) -Files: src/eval.c - - -*** ../vim-7.2.004/src/eval.c Fri Aug 8 12:36:31 2008 ---- src/eval.c Mon Aug 25 04:40:11 2008 -*************** -*** 3657,3664 **** - } - - /* -! * Return TRUE if typeval "tv" is locked: Either tha value is locked itself or -! * it refers to a List or Dictionary that is locked. - */ - static int - tv_islocked(tv) ---- 3657,3664 ---- - } - - /* -! * Return TRUE if typeval "tv" is locked: Either that value is locked itself -! * or it refers to a List or Dictionary that is locked. - */ - static int - tv_islocked(tv) -*************** -*** 15838,15847 **** - if (res == FAIL) - res = ITEM_COMPARE_FAIL; - else -- /* return value has wrong type */ - res = get_tv_number_chk(&rettv, &item_compare_func_err); - if (item_compare_func_err) -! res = ITEM_COMPARE_FAIL; - clear_tv(&rettv); - return res; - } ---- 15838,15846 ---- - if (res == FAIL) - res = ITEM_COMPARE_FAIL; - else - res = get_tv_number_chk(&rettv, &item_compare_func_err); - if (item_compare_func_err) -! res = ITEM_COMPARE_FAIL; /* return value has wrong type */ - clear_tv(&rettv); - return res; - } -*************** -*** 20590,20595 **** ---- 20589,20597 ---- - int st_len = 0; - - todo = (int)func_hashtab.ht_used; -+ if (todo == 0) -+ return; /* nothing to dump */ -+ - sorttab = (ufunc_T **)alloc((unsigned)(sizeof(ufunc_T) * todo)); - - for (hi = func_hashtab.ht_array; todo > 0; ++hi) -*************** -*** 20638,20643 **** ---- 20640,20647 ---- - prof_self_cmp); - prof_sort_list(fd, sorttab, st_len, "SELF", TRUE); - } -+ -+ vim_free(sorttab); - } - - static void -*************** -*** 21204,21210 **** - if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL)) - func_do_profile(fp); - if (fp->uf_profiling -! || (fc.caller != NULL && &fc.caller->func->uf_profiling)) - { - ++fp->uf_tm_count; - profile_start(&call_start); ---- 21208,21214 ---- - if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL)) - func_do_profile(fp); - if (fp->uf_profiling -! || (fc.caller != NULL && fc.caller->func->uf_profiling)) - { - ++fp->uf_tm_count; - profile_start(&call_start); -*************** -*** 21235,21247 **** - - #ifdef FEAT_PROFILE - if (do_profiling == PROF_YES && (fp->uf_profiling -! || (fc.caller != NULL && &fc.caller->func->uf_profiling))) - { - profile_end(&call_start); - profile_sub_wait(&wait_start, &call_start); - profile_add(&fp->uf_tm_total, &call_start); - profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children); -! if (fc.caller != NULL && &fc.caller->func->uf_profiling) - { - profile_add(&fc.caller->func->uf_tm_children, &call_start); - profile_add(&fc.caller->func->uf_tml_children, &call_start); ---- 21239,21251 ---- - - #ifdef FEAT_PROFILE - if (do_profiling == PROF_YES && (fp->uf_profiling -! || (fc.caller != NULL && fc.caller->func->uf_profiling))) - { - profile_end(&call_start); - profile_sub_wait(&wait_start, &call_start); - profile_add(&fp->uf_tm_total, &call_start); - profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children); -! if (fc.caller != NULL && fc.caller->func->uf_profiling) - { - profile_add(&fc.caller->func->uf_tm_children, &call_start); - profile_add(&fc.caller->func->uf_tml_children, &call_start); -*** ../vim-7.2.004/src/version.c Mon Aug 25 04:35:13 2008 ---- src/version.c Mon Aug 25 04:46:44 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 5, - /**/ - --- -The process for understanding customers primarily involves sitting around with -other marketing people and talking about what you would to if you were dumb -enough to be a customer. - (Scott Adams - The Dilbert principle) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.006 b/vi/vim-7.2/7.2.006 deleted file mode 100644 index f22eeae..0000000 --- a/vi/vim-7.2/7.2.006 +++ /dev/null @@ -1,50 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.006 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.006 -Problem: HTML files are not recognized by contents. -Solution: Add a rule to the scripts file. (Nico Weber) -Files: runtime/scripts.vim - - -*** ../vim-7.2.005/runtime/scripts.vim Sat Aug 9 19:37:09 2008 ---- runtime/scripts.vim Sat Aug 16 04:05:34 2008 -*************** -*** 234,239 **** ---- 234,243 ---- - elseif s:line1 =~ '\<DTD\s\+XHTML\s' - set ft=xhtml - -+ " HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN") -+ elseif s:line1 =~? '\<DOCTYPE\s\+html\>' -+ set ft=html -+ - " PDF - elseif s:line1 =~ '^%PDF-' - set ft=pdf -*** ../vim-7.2.005/src/version.c Mon Aug 25 04:48:21 2008 ---- src/version.c Mon Aug 25 05:02:34 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 6, - /**/ - --- -Never enter the boss's office unless it's absolutely necessary. Every boss -saves one corner of the desk for useless assignments that are doled out like -Halloween candy to each visitor. - (Scott Adams - The Dilbert principle) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.007 b/vi/vim-7.2/7.2.007 deleted file mode 100644 index 104b267..0000000 --- a/vi/vim-7.2/7.2.007 +++ /dev/null @@ -1,493 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.007 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.007 (extra) -Problem: Minor issues for VMS. -Solution: Minor fixes for VMS. Add float support. (Zoltan Arpadffy) -Files: runtime/doc/os_vms.txt, src/os_vms_conf.h, src/Make_vms.mms, - src/testdir/Make_vms.mms, src/testdir/test30.in, - src/testdir/test54.in - - -*** ../vim-7.2.006/runtime/doc/os_vms.txt Sat Aug 9 19:36:50 2008 ---- runtime/doc/os_vms.txt Tue Aug 19 06:29:31 2008 -*************** -*** 1,4 **** -! *os_vms.txt* For Vim version 7.2. Last change: 2006 Nov 18 - - - VIM REFERENCE MANUAL ---- 1,4 ---- -! *os_vms.txt* For Vim version 7.2. Last change: 2008 Aug 19 - - - VIM REFERENCE MANUAL -*************** -*** 312,318 **** - - 8. Useful notes *vms-notes* - -! 8.1 backspace/delete - 8.2 Filters - 8.3 VMS file version numbers - 8.4 Directory conversion ---- 312,318 ---- - - 8. Useful notes *vms-notes* - -! 8.1 Backspace/delete - 8.2 Filters - 8.3 VMS file version numbers - 8.4 Directory conversion -*************** -*** 326,333 **** - 8.12 diff-mode - 8.13 Allow '$' in C keywords - 8.14 VIMTUTOR for beginners - -! 8.1 backspace/delete - - There are backspace/delete key inconsistencies with VMS. - :fixdel doesn't do the trick, but the solution is: > ---- 326,335 ---- - 8.12 diff-mode - 8.13 Allow '$' in C keywords - 8.14 VIMTUTOR for beginners -+ 8.15 Slow start in console mode issue -+ 8.16 Common VIM directory - different architectures - -! 8.1 Backspace/delete - - There are backspace/delete key inconsistencies with VMS. - :fixdel doesn't do the trick, but the solution is: > -*************** -*** 663,674 **** - - (Thomas.R.Wyant III, Vim 6.1) - - ============================================================================== - - 9. VMS related changes *vms-changes* - -! Version 7 - - Improved low level char input (affects just console mode) - - Version 6.4 (2005 Oct 15) - - GTKLIB and Vim build on IA64 ---- 665,794 ---- - - (Thomas.R.Wyant III, Vim 6.1) - -+ 8.14 Slow start in console mode issue -+ -+ As GUI/GTK Vim works equally well in console mode, many administartors -+ deploy those executables system wide. -+ Unfortunately, on a remote slow connections GUI/GTK executables behave rather -+ slow when user wants to run Vim just in the console mode - because of X environment detection timeout. -+ -+ Luckily, there is a simple solution for that. Administrators need to deploy -+ both GUI/GTK build and just console build executables, like below: > -+ -+ |- vim72 -+ |----- doc -+ |----- syntax -+ vimrc (system rc files) -+ gvimrc -+ gvim.exe (the remaned GUI or GTK built vim.exe) -+ vim.exe (the console only executable) -+ -+ Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: > -+ -+ $ define/nolog VIM RF10:[UTIL.VIM72] ! where you VIM directory is -+ $ vi*m :== mcr VIM:VIM.EXE -+ $ gvi*m :== mcr VIM:GVIM.EXE -+ $ ! or you can try to spawn with -+ $ gv*im :== spawn/nowait/input=NLA0 mcr VIM:GVIM.EXE -g -GEOMETRY 80x40 -+ -+ -+ Like this, users that do not have X environment and want to use Vim just in -+ console mode can avoid performance problems. -+ -+ (Zoltan Arpadffy, Vim 7.2) -+ -+ 8.15 Common VIM directory - different architectures -+ -+ In a cluster that contains nodes with different architectures like below: -+ -+ $show cluster -+ View of Cluster from system ID 11655 node: TOR 18-AUG-2008 11:58:31 -+ +---------------------------------+ -+ SYSTEMS MEMBERS -+ +-----------------------+--------- -+ NODE SOFTWARE STATUS -+ +--------+--------------+--------- -+ TOR VMS V7.3-2 MEMBER -+ TITAN2 VMS V8.3 MEMBER -+ ODIN VMS V7.3-2 MEMBER -+ +---------------------------------+ -+ -+ It is convinient to have a common VIM directory but execute different -+ executables. -+ There are more solutions for this problem: -+ -+ solution 1. all executables in the same directory with different names -+ This is easily done with the following script that can be added -+ to the login.com or sylogin.com: > -+ -+ $ if f$getsyi("NODE_HWTYPE") .eqs. "VAX" -+ $ then -+ $ say "VAX platform" -+ $ vi*m:== mcr vim:VIM.EXE_VAX -+ $ endif -+ $ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH" -+ $ then -+ $ say "ALPHA platform" -+ $ vi*m :== mcr vim:VIM.EXE_AXP -+ $ endif -+ $ if f$getsyi("ARCH_NAME") .eqs. "IA64" -+ $ then -+ $ say "IA64 platform" -+ $ vi*m :== mcr vim:VIM.EXE_IA64 -+ $ endif -+ -+ solution 2. different directories: > -+ -+ $ if f$getsyi("NODE_HWTYPE") .eqs. "VAX" -+ $ then -+ $ say "VAX platform" -+ $ define/nolog VIM RF10:[UTIL.VAX_EXE] ! VAX executables -+ $ endif -+ $ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH" -+ $ then -+ $ say "ALPHA platform" -+ $ define/nolog VIM RF10:[UTIL.AXP_EXE] ! AXP executables -+ $ endif -+ $ if f$getsyi("ARCH_NAME") .eqs. "IA64" -+ $ then -+ $ say "IA64 platform" -+ $ define/nolog VIM RF10:[UTIL.IA64_EXE] ! IA64 executables -+ $ endif -+ $! VIMRUNTIME must be defined in order to find runtime files -+ $ define/nolog VIMRUNTIME RF10:[UTIL.VIM72] -+ -+ A good examle for this approach is the [GNU]gnu_tools.com script from GNU_TOOLS.ZIP -+ package downloadable from http://www.polarhome.com/vim/ -+ -+ (Zoltan Arpadffy, Vim 7.2) -+ - ============================================================================== - - 9. VMS related changes *vms-changes* - -! Recent changes -! - The following plugins are included into VMS runtime: -! genutils 2.4, multiselect 2.2, multvals 3.1, selectbuf 4.3, -! bufexplorer 7.1.7, taglist 4.5 -! - minor changes in vimrc (just in VMS runtime) -! - make_vms.mms - HUGE model is the default -! - [TESTDIR]make_vms.mms include as many tests possible -! - modify test30 and test54 for VMS -! - enable FLOAT feature in VMS port -! - os_vms.txt updated -! -! Version 7.2 (2008 Aug 9) -! - VCF files write corrected -! - CTAGS 5.7 included -! - corrected make_vms.mms (on VAX gave syntax error) -! -! Version 7.1 (2007 Jun 15) -! - create TAGS file from menu -! -! Version 7 (2006 May 8) - - Improved low level char input (affects just console mode) -+ - Fixed plugin bug -+ - CTAGS 5.6 included - - Version 6.4 (2005 Oct 15) - - GTKLIB and Vim build on IA64 -*************** -*** 806,811 **** ---- 926,932 ---- - - OpenVMS documentation and executables are maintained by: - Zoltan Arpadffy <arpadffy@polarhome.com> -+ OpenVMS Vim page: http://www.polarhome.com/vim/ - - This document uses parts and remarks from earlier authors and contributors - of OS_VMS.TXT: -*** ../vim-7.2.006/src/os_vms_conf.h Thu May 10 19:26:17 2007 ---- src/os_vms_conf.h Sat Aug 16 05:09:17 2008 -*************** -*** 114,119 **** ---- 114,121 ---- - #define HAVE_PUTENV - #define HAVE_SETENV - #define HAVE_SETJMP_H -+ #define HAVE_MATH_H -+ #define HAVE_FLOAT_FUNCS - - #undef HAVE_DIRENT_H - #undef HAVE_SYS_NDIR_H -*** ../vim-7.2.006/src/Make_vms.mms Mon Oct 29 22:38:54 2007 ---- src/Make_vms.mms Sat Aug 16 05:17:41 2008 -*************** -*** 2,8 **** - # Makefile for Vim on OpenVMS - # - # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> -! # Last change: 2007 Oct 22 - # - # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64 - # with MMS and MMK ---- 2,8 ---- - # Makefile for Vim on OpenVMS - # - # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> -! # Last change: 2008 Aug 16 - # - # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64 - # with MMS and MMK -*************** -*** 36,42 **** - # BIG - Many features enabled, as rich as possible. (default) - # HUGE - All possible featues enabled. - # Please select one of these alternatives above. -! MODEL = BIG - - # GUI or terminal mode executable. - # Comment out if you want just the character terminal mode only. ---- 36,42 ---- - # BIG - Many features enabled, as rich as possible. (default) - # HUGE - All possible featues enabled. - # Please select one of these alternatives above. -! MODEL = HUGE - - # GUI or terminal mode executable. - # Comment out if you want just the character terminal mode only. -*** ../vim-7.2.006/src/testdir/Make_vms.mms Wed Jun 25 00:34:23 2008 ---- src/testdir/Make_vms.mms Tue Aug 19 06:28:07 2008 -*************** -*** 4,12 **** - # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> - # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> - # -! # Last change: 2008 Jun 19 - # -! # This has been tested on VMS 6.2 to 7.2 on DEC Alpha and VAX. - # Edit the lines in the Configuration section below to select. - # - # Execute with: ---- 4,12 ---- - # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> - # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> - # -! # Last change: 2008 Aug 19 - # -! # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. - # Edit the lines in the Configuration section below to select. - # - # Execute with: -*************** -*** 32,37 **** ---- 32,46 ---- - # and directory handling. - # WANT_UNIX = YES - -+ # Comment out if you want to run Win32 specific tests as well, but please -+ # be aware, that on OpenVMS will fail, because of cat, rm, etc commands -+ # and directory handling. -+ # WANT_WIN = YES -+ -+ # Comment out if you want to run spell checker tests. -+ # They fail because VMS does not support file names. -+ # WANT_SPELL = YES -+ - # Comment out if you have gzip on your system - # HAVE_GZIP = YES - -*************** -*** 53,64 **** - test13.out test14.out test15.out test17.out \ - test18.out test19.out test20.out test21.out test22.out \ - test23.out test24.out test26.out \ -! test28.out test29.out test31.out test32.out \ - test33.out test34.out test35.out test36.out test37.out \ - test38.out test39.out test40.out test41.out test42.out \ - test43.out test44.out test45.out test46.out \ - test48.out test51.out test53.out test54.out test55.out \ -! test56.out test57.out test58.out test59.out test60.out \ - test61.out test62.out test63.out test64.out test65.out - - .IFDEF WANT_GUI ---- 62,73 ---- - test13.out test14.out test15.out test17.out \ - test18.out test19.out test20.out test21.out test22.out \ - test23.out test24.out test26.out \ -! test28.out test29.out test30.out test31.out test32.out \ - test33.out test34.out test35.out test36.out test37.out \ - test38.out test39.out test40.out test41.out test42.out \ - test43.out test44.out test45.out test46.out \ - test48.out test51.out test53.out test54.out test55.out \ -! test56.out test57.out test60.out \ - test61.out test62.out test63.out test64.out test65.out - - .IFDEF WANT_GUI -*************** -*** 67,73 **** - .ENDIF - - .IFDEF WANT_UNIX -! SCRIPT_UNIX = test10.out test12.out test25.out test27.out test30.out test49.out - .ENDIF - - .IFDEF HAVE_GZIP ---- 76,90 ---- - .ENDIF - - .IFDEF WANT_UNIX -! SCRIPT_UNIX = test10.out test12.out test25.out test27.out test49.out -! .ENDIF -! -! .IFDEF WANT_WIN -! SCRIPT_WIN = test50.out test52.out -! .ENDIF -! -! .IFDEF WANT_SPELL -! SCRIPT_SPELL = test58.out test59.out - .ENDIF - - .IFDEF HAVE_GZIP -*************** -*** 84,94 **** - -@ write sys$output " "$*" " - -@ write sys$output "-----------------------------------------------" - -@ create/term/wait mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim --noplugin -s dotest.in $*.in -! -@ if "''F$SEARCH("test.out.*")'" .NES. "" then differences test.out $*.ok; - -@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename test.out $*.out - -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* - -! all : clean nolog $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_GZIP) $(SCRIPT_GDIFF) - -@ write sys$output " " - -@ write sys$output "-----------------------------------------------" - -@ write sys$output " All done" ---- 101,111 ---- - -@ write sys$output " "$*" " - -@ write sys$output "-----------------------------------------------" - -@ create/term/wait mcr $(VIMPROG) $(GUI_OPTION) -u vms.vim --noplugin -s dotest.in $*.in -! -@ if "''F$SEARCH("test.out.*")'" .NES. "" then differences /par test.out $*.ok; - -@ if "''F$SEARCH("test.out.*")'" .NES. "" then rename test.out $*.out - -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* - -! all : clean nolog $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_GZIP) $(SCRIPT_GDIFF) - -@ write sys$output " " - -@ write sys$output "-----------------------------------------------" - -@ write sys$output " All done" -*************** -*** 113,118 **** ---- 130,137 ---- - -@ write sys$output "MAKE_VMS.MMS options:" - -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" " - -@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" " -+ -@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" " -+ -@ write sys$output " WANT_SPELL= ""$(WANT_SPELL)"" " - -@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" " - -@ write sys$output " HAVE_GDIFF= ""$(HAVE_GDIFF)"" " - -@ write sys$output "Default vimrc file is VMS.VIM: -*************** -*** 122,126 **** ---- 141,153 ---- - clean : - -@ if "''F$SEARCH("*.out")'" .NES. "" then delete/noconfirm/nolog *.out.* - -@ if "''F$SEARCH("test.log")'" .NES. "" then delete/noconfirm/nolog test.log.* -+ -@ if "''F$SEARCH("test.ok")'" .NES. "" then delete/noconfirm/nolog test.ok.* - -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* - -@ if "''F$SEARCH("*.*_sw*")'" .NES. "" then delete/noconfirm/nolog *.*_sw*.* -+ -@ if "''F$SEARCH("*.failed")'" .NES. "" then delete/noconfirm/nolog *.failed.* -+ -@ if "''F$SEARCH("*.rej")'" .NES. "" then delete/noconfirm/nolog *.rej.* -+ -@ if "''F$SEARCH("tiny.vim")'" .NES. "" then delete/noconfirm/nolog tiny.vim.* -+ -@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.* -+ -@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.* -+ -@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.* -+ -*** ../vim-7.2.006/src/testdir/test30.in Sun Jul 13 19:17:14 2008 ---- src/testdir/test30.in Sat Aug 16 04:59:37 2008 -*************** -*** 24,33 **** - :set nobin eol - :bwipe XXUnix XXDos XXMac - :" create mixed format files -! :!cat XXUnix XXDos >XXUxDs -! :!cat XXUnix XXMac >XXUxMac -! :!cat XXDos XXMac >XXDosMac -! :!cat XXUnix XXDos XXMac >XXUxDsMc - :" - :" try reading and writing with 'fileformats' empty - :set fileformat=unix ---- 24,40 ---- - :set nobin eol - :bwipe XXUnix XXDos XXMac - :" create mixed format files -! :if has("vms") -! : !copy XXUnix,XXDos XXUxDs. -! : !copy XXUnix,XXMac XXUxMac. -! : !copy XXDos,XXMac XXDosMac. -! : !copy XXUnix,XXDos,XXMac XXUxDsMc. -! :else -! : !cat XXUnix XXDos >XXUxDs -! : !cat XXUnix XXMac >XXUxMac -! : !cat XXDos XXMac >XXDosMac -! : !cat XXUnix XXDos XXMac >XXUxDsMc -! :endif - :" - :" try reading and writing with 'fileformats' empty - :set fileformat=unix -*** ../vim-7.2.006/src/testdir/test54.in Sun Jan 2 12:43:19 2005 ---- src/testdir/test54.in Tue Aug 19 06:26:55 2008 -*************** -*** 3,10 **** - STARTTEST - :so small.vim - :e xx -! :!rm -f test.out -! :au BufLeave <buffer> :!echo buffer-local autommand in %>> test.out - :e somefile " here, autocommand for xx shall write test.out - : " but autocommand shall not apply to buffer named <buffer> - :bwipe xx " here, autocommand shall be auto-deleted ---- 3,15 ---- - STARTTEST - :so small.vim - :e xx -! :if has("vms") -! : !del test.out.* -! : au BufLeave <buffer> :!write sys$output "buffer-local autommand in %" > test.out -! :else -! : !rm -f test.out -! : au BufLeave <buffer> :!echo buffer-local autommand in %>> test.out -! :endif - :e somefile " here, autocommand for xx shall write test.out - : " but autocommand shall not apply to buffer named <buffer> - :bwipe xx " here, autocommand shall be auto-deleted -*** ../vim-7.2.006/src/version.c Mon Aug 25 05:03:29 2008 ---- src/version.c Mon Sep 1 16:46:50 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 7, - /**/ - --- -How To Keep A Healthy Level Of Insanity: -8. Don't use any punctuation marks. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.008 b/vi/vim-7.2/7.2.008 deleted file mode 100644 index d3fb58e..0000000 --- a/vi/vim-7.2/7.2.008 +++ /dev/null @@ -1,63 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.008 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.008 -Problem: With a BufHidden autocommand that invokes ":bunload" the window - count for a buffer can be wrong. (Bob Hiestand) -Solution: Don't call enter_buffer() when already in that buffer. -Files: src/buffer.c - - -*** ../vim-7.2.007/src/buffer.c Wed Aug 6 18:32:40 2008 ---- src/buffer.c Mon Sep 1 14:25:45 2008 -*************** -*** 1351,1361 **** - } - } - #ifdef FEAT_AUTOCMD - # ifdef FEAT_EVAL -! /* An autocommand may have deleted buf or aborted the script processing! */ -! if (buf_valid(buf) && !aborting()) - # else -! if (buf_valid(buf)) /* an autocommand may have deleted buf! */ - # endif - #endif - enter_buffer(buf); ---- 1351,1362 ---- - } - } - #ifdef FEAT_AUTOCMD -+ /* An autocommand may have deleted "buf", already entered it (e.g., when -+ * it did ":bunload") or aborted the script processing! */ - # ifdef FEAT_EVAL -! if (buf_valid(buf) && buf != curbuf && !aborting()) - # else -! if (buf_valid(buf) && buf != curbuf) - # endif - #endif - enter_buffer(buf); -*** ../vim-7.2.007/src/version.c Mon Sep 1 16:50:09 2008 ---- src/version.c Mon Sep 1 17:31:28 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 8, - /**/ - --- -If Pacman had affected us as kids we'd be running around in dark rooms, -munching pills and listening to repetitive music. - -- Marcus Brigstocke - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.009 b/vi/vim-7.2/7.2.009 deleted file mode 100644 index fa891dc..0000000 --- a/vi/vim-7.2/7.2.009 +++ /dev/null @@ -1,67 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.009 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.009 -Problem: Can't compile with Perl 5.10 on MS-Windows. (Cesar Romani) -Solution: Add the Perl_sv_free2 function for dynamic loading. (Dan Sharp) -Files: src/if_perl.xs - - -*** ../vim-7.2.008/src/if_perl.xs Thu Jul 24 16:24:15 2008 ---- src/if_perl.xs Mon Sep 1 14:58:37 2008 -*************** -*** 136,141 **** ---- 136,144 ---- - # define Perl_newXS_flags dll_Perl_newXS_flags - #endif - # define Perl_sv_free dll_Perl_sv_free -+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 10) -+ # define Perl_sv_free2 dll_Perl_sv_free2 -+ # endif - # define Perl_sv_isa dll_Perl_sv_isa - # define Perl_sv_magic dll_Perl_sv_magic - # define Perl_sv_setiv dll_Perl_sv_setiv -*************** -*** 268,273 **** ---- 271,277 ---- - static void (*boot_DynaLoader)_((pTHX_ CV*)); - - #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) -+ static void (*Perl_sv_free2)(pTHX_ SV*); - static void (*Perl_sys_init3)(int* argc, char*** argv, char*** env); - static void (*Perl_sys_term)(void); - static SV** (*Perl_ISv_ptr)(register PerlInterpreter*); -*************** -*** 367,372 **** ---- 371,377 ---- - {"Perl_TXpv_ptr", (PERL_PROC*)&Perl_TXpv_ptr}, - {"Perl_Tna_ptr", (PERL_PROC*)&Perl_Tna_ptr}, - #else -+ {"Perl_sv_free2", (PERL_PROC*)&Perl_sv_free2}, - {"Perl_sys_init3", (PERL_PROC*)&Perl_sys_init3}, - {"Perl_sys_term", (PERL_PROC*)&Perl_sys_term}, - {"Perl_ISv_ptr", (PERL_PROC*)&Perl_ISv_ptr}, -*** ../vim-7.2.008/src/version.c Mon Sep 1 17:32:40 2008 ---- src/version.c Mon Sep 1 17:55:24 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 9, - /**/ - --- -How To Keep A Healthy Level Of Insanity: -11. Specify that your drive-through order is "to go". - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.010 b/vi/vim-7.2/7.2.010 deleted file mode 100644 index 4731588..0000000 --- a/vi/vim-7.2/7.2.010 +++ /dev/null @@ -1,206 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.010 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.010 -Problem: When using "K" in Visual mode not all characters are properly - escaped. (Ben Schmidt) -Solution: Use a function with the functionality of shellescape(). (Jan - Minar) -Files: src/mbyte.c, src/misc2.c, src/normal.c - - -*** ../vim-7.2.009/src/mbyte.c Wed Aug 6 18:45:36 2008 ---- src/mbyte.c Wed Sep 3 22:34:48 2008 -*************** -*** 2540,2546 **** - return (int)(p - q); - } - -- #if defined(FEAT_EVAL) || defined(PROTO) - /* - * Copy a character from "*fp" to "*tp" and advance the pointers. - */ ---- 2540,2545 ---- -*************** -*** 2555,2561 **** - *tp += l; - *fp += l; - } -- #endif - - /* - * Return the offset from "p" to the first byte of a character. When "p" is ---- 2554,2559 ---- -*** ../vim-7.2.009/src/misc2.c Thu Jul 24 20:28:58 2008 ---- src/misc2.c Wed Sep 3 22:05:21 2008 -*************** -*** 1257,1263 **** - return escaped_string; - } - -- #if !defined(BACKSLASH_IN_FILENAME) || defined(FEAT_EVAL) || defined(PROTO) - /* - * Return TRUE when 'shell' has "csh" in the tail. - */ ---- 1257,1262 ---- -*************** -*** 1266,1274 **** - { - return (strstr((char *)gettail(p_sh), "csh") != NULL); - } -- #endif - -- #if defined(FEAT_EVAL) || defined(PROTO) - /* - * Escape "string" for use as a shell argument with system(). - * This uses single quotes, except when we know we need to use double qoutes ---- 1265,1271 ---- -*************** -*** 1391,1397 **** - - return escaped_string; - } -- #endif - - /* - * Like vim_strsave(), but make all characters uppercase. ---- 1388,1393 ---- -*** ../vim-7.2.009/src/normal.c Thu Jul 31 22:03:54 2008 ---- src/normal.c Sat Sep 6 15:06:07 2008 -*************** -*** 5469,5474 **** ---- 5469,5479 ---- - STRCPY(buf, "he! "); - else - { -+ /* An external command will probably use an argument starting -+ * with "-" as an option. To avoid trouble we skip the "-". */ -+ while (*ptr == '-') -+ ++ptr; -+ - /* When a count is given, turn it into a range. Is this - * really what we want? */ - isman = (STRCMP(kp, "man") == 0); -*************** -*** 5511,5547 **** - /* - * Now grab the chars in the identifier - */ -! if (cmdchar == '*') -! aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\"); -! else if (cmdchar == '#') -! aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\"); -! else if (cmdchar == 'K' && !kp_help) -! aux_ptr = (char_u *)" \t\\\"|!"; -! else -! /* Don't escape spaces and Tabs in a tag with a backslash */ -! aux_ptr = (char_u *)"\\|\""; -! -! p = buf + STRLEN(buf); -! while (n-- > 0) -! { -! /* put a backslash before \ and some others */ -! if (vim_strchr(aux_ptr, *ptr) != NULL) -! *p++ = '\\'; -! #ifdef FEAT_MBYTE -! /* When current byte is a part of multibyte character, copy all bytes -! * of that character. */ -! if (has_mbyte) - { -! int i; -! int len = (*mb_ptr2len)(ptr) - 1; -! -! for (i = 0; i < len && n >= 1; ++i, --n) -! *p++ = *ptr++; - } - #endif -! *p++ = *ptr++; - } -- *p = NUL; - - /* - * Execute the command. ---- 5516,5572 ---- - /* - * Now grab the chars in the identifier - */ -! if (cmdchar == 'K' && !kp_help) -! { -! /* Escape the argument properly for a shell command */ -! p = vim_strsave_shellescape(ptr, TRUE); -! if (p == NULL) - { -! vim_free(buf); -! return; - } -+ buf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1); -+ if (buf == NULL) -+ { -+ vim_free(buf); -+ vim_free(p); -+ return; -+ } -+ STRCAT(buf, p); -+ vim_free(p); -+ } -+ else -+ { -+ if (cmdchar == '*') -+ aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\"); -+ else if (cmdchar == '#') -+ aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\"); -+ else -+ /* Don't escape spaces and Tabs in a tag with a backslash */ -+ aux_ptr = (char_u *)"\\|\"\n*?["; -+ -+ p = buf + STRLEN(buf); -+ while (n-- > 0) -+ { -+ /* put a backslash before \ and some others */ -+ if (vim_strchr(aux_ptr, *ptr) != NULL) -+ *p++ = '\\'; -+ #ifdef FEAT_MBYTE -+ /* When current byte is a part of multibyte character, copy all -+ * bytes of that character. */ -+ if (has_mbyte) -+ { -+ int i; -+ int len = (*mb_ptr2len)(ptr) - 1; -+ -+ for (i = 0; i < len && n >= 1; ++i, --n) -+ *p++ = *ptr++; -+ } - #endif -! *p++ = *ptr++; -! } -! *p = NUL; - } - - /* - * Execute the command. -*** ../vim-7.2.009/src/version.c Mon Sep 1 17:56:05 2008 ---- src/version.c Sat Sep 6 16:26:42 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 10, - /**/ - --- -Q. What happens to programmers when they die? -A: MS-Windows programmers are reinstalled. C++ programmers become undefined, - anyone who refers to them will die as well. Java programmers reincarnate - after being garbage collected. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.011 b/vi/vim-7.2/7.2.011 deleted file mode 100644 index 928f8d6..0000000 --- a/vi/vim-7.2/7.2.011 +++ /dev/null @@ -1,105 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.011 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.011 -Problem: Get an error when inserting a float value from the expression - register. -Solution: Convert the Float to a String automatically in the same place - where a List would be converted to a String. -Files: src/eval.c - - -*** ../vim-7.2.010/src/eval.c Mon Aug 25 04:48:21 2008 ---- src/eval.c Sun Sep 7 13:50:38 2008 -*************** -*** 1256,1278 **** - - /* - * Top level evaluation function, returning a string. - * Return pointer to allocated memory, or NULL for failure. - */ - char_u * -! eval_to_string(arg, nextcmd, dolist) - char_u *arg; - char_u **nextcmd; -! int dolist; /* turn List into sequence of lines */ - { - typval_T tv; - char_u *retval; - garray_T ga; - - if (eval0(arg, &tv, nextcmd, TRUE) == FAIL) - retval = NULL; - else - { -! if (dolist && tv.v_type == VAR_LIST) - { - ga_init2(&ga, (int)sizeof(char), 80); - if (tv.vval.v_list != NULL) ---- 1256,1281 ---- - - /* - * Top level evaluation function, returning a string. -+ * When "convert" is TRUE convert a List into a sequence of lines and convert -+ * a Float to a String. - * Return pointer to allocated memory, or NULL for failure. - */ - char_u * -! eval_to_string(arg, nextcmd, convert) - char_u *arg; - char_u **nextcmd; -! int convert; - { - typval_T tv; - char_u *retval; - garray_T ga; -+ char_u numbuf[NUMBUFLEN]; - - if (eval0(arg, &tv, nextcmd, TRUE) == FAIL) - retval = NULL; - else - { -! if (convert && tv.v_type == VAR_LIST) - { - ga_init2(&ga, (int)sizeof(char), 80); - if (tv.vval.v_list != NULL) -*************** -*** 1280,1285 **** ---- 1283,1295 ---- - ga_append(&ga, NUL); - retval = (char_u *)ga.ga_data; - } -+ #ifdef FEAT_FLOAT -+ else if (convert && tv.v_type == VAR_FLOAT) -+ { -+ vim_snprintf((char *)numbuf, NUMBUFLEN, "%g", tv.vval.v_float); -+ retval = vim_strsave(numbuf); -+ } -+ #endif - else - retval = vim_strsave(get_tv_string(&tv)); - clear_tv(&tv); -*** ../vim-7.2.010/src/version.c Sat Sep 6 16:44:06 2008 ---- src/version.c Sun Sep 7 13:52:00 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 11, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -34. You laugh at people with 14400 baud modems. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.012 b/vi/vim-7.2/7.2.012 deleted file mode 100644 index fa3ed24..0000000 --- a/vi/vim-7.2/7.2.012 +++ /dev/null @@ -1,53 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.012 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.012 -Problem: Compiler warnings when building with startup timing. -Solution: Add type casts. -Files: src/ex_cmds2.c - - -*** ../vim-7.2.011/src/ex_cmds2.c Sun Jul 13 19:36:09 2008 ---- src/ex_cmds2.c Tue Sep 2 11:14:41 2008 -*************** -*** 3145,3152 **** - verbose_leave(); - } - #ifdef STARTUPTIME -! vim_snprintf(IObuff, IOSIZE, "sourcing %s", fname); -! time_msg(IObuff, &tv_start); - time_pop(&tv_rel); - #endif - ---- 3145,3152 ---- - verbose_leave(); - } - #ifdef STARTUPTIME -! vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname); -! time_msg((char *)IObuff, &tv_start); - time_pop(&tv_rel); - #endif - -*** ../vim-7.2.011/src/version.c Sun Sep 7 13:54:31 2008 ---- src/version.c Sun Sep 7 15:49:00 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 12, - /**/ - --- -He who laughs last, thinks slowest. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.013 b/vi/vim-7.2/7.2.013 deleted file mode 100644 index 2645f0a..0000000 --- a/vi/vim-7.2/7.2.013 +++ /dev/null @@ -1,135 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.013 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.013 -Problem: While waiting for the X selection Vim consumes a lot of CPU time - and hangs until a response is received. -Solution: Sleep a bit when the selection event hasn't been received yet. - Time out after a couple of seconds to avoid a hang when the - selection owner isn't responding. -Files: src/ui.c - - -*** ../vim-7.2.012/src/ui.c Mon Jul 14 21:47:49 2008 ---- src/ui.c Sun Sep 7 16:54:35 2008 -*************** -*** 2110,2115 **** ---- 2110,2117 ---- - int i; - int nbytes = 0; - char_u *buffer; -+ time_t start_time; -+ int timed_out = FALSE; - - for (i = - #ifdef FEAT_MBYTE -*************** -*** 2129,2134 **** ---- 2131,2137 ---- - case 3: type = text_atom; break; - default: type = XA_STRING; - } -+ success = FALSE; - XtGetSelectionValue(myShell, cbd->sel_atom, type, - clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime); - -*************** -*** 2141,2167 **** - * characters, then they will appear before the one that requested the - * paste! Don't worry, we will catch up with any other events later. - */ - for (;;) - { - if (XCheckTypedEvent(dpy, SelectionNotify, &event)) - break; - if (XCheckTypedEvent(dpy, SelectionRequest, &event)) - /* We may get a SelectionRequest here and if we don't handle - * it we hang. KDE klipper does this, for example. */ - XtDispatchEvent(&event); - - /* Do we need this? Probably not. */ - XSync(dpy, False); - -! /* Bernhard Walle solved a slow paste response in an X terminal by -! * adding: usleep(10000); here. */ - } - -- /* this is where clip_x11_request_selection_cb() is actually called */ -- XtDispatchEvent(&event); -- - if (success) - return; - } - - /* Final fallback position - use the X CUT_BUFFER0 store */ ---- 2144,2189 ---- - * characters, then they will appear before the one that requested the - * paste! Don't worry, we will catch up with any other events later. - */ -+ start_time = time(NULL); - for (;;) - { - if (XCheckTypedEvent(dpy, SelectionNotify, &event)) -+ { -+ /* this is where clip_x11_request_selection_cb() is actually -+ * called */ -+ XtDispatchEvent(&event); - break; -+ } - if (XCheckTypedEvent(dpy, SelectionRequest, &event)) - /* We may get a SelectionRequest here and if we don't handle - * it we hang. KDE klipper does this, for example. */ - XtDispatchEvent(&event); - -+ /* Time out after 2 to 3 seconds to avoid that we hang when the -+ * other process doesn't respond. Note that the SelectionNotify -+ * event may still come later when the selection owner comes back -+ * to life and the text gets inserted unexpectedly (by xterm). -+ * Don't know how to avoid that :-(. */ -+ if (time(NULL) > start_time + 2) -+ { -+ timed_out = TRUE; -+ break; -+ } -+ - /* Do we need this? Probably not. */ - XSync(dpy, False); - -! /* Wait for 1 msec to avoid that we eat up all CPU time. */ -! ui_delay(1L, TRUE); - } - - if (success) - return; -+ -+ /* don't do a retry with another type after timing out, otherwise we -+ * hang for 15 seconds. */ -+ if (timed_out) -+ break; - } - - /* Final fallback position - use the X CUT_BUFFER0 store */ -*** ../vim-7.2.012/src/version.c Sun Sep 7 15:49:45 2008 ---- src/version.c Sun Sep 7 21:45:55 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 13, - /**/ - --- -The users that I support would double-click on a landmine to find out -what happens. -- A system administrator - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.014 b/vi/vim-7.2/7.2.014 deleted file mode 100644 index a037948..0000000 --- a/vi/vim-7.2/7.2.014 +++ /dev/null @@ -1,52 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.014 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.014 -Problem: synstack() doesn't work in an emptly line. -Solution: Accept column zero as a valid position. -Files: src/eval.c - - -*** ../vim-7.2.013/src/eval.c Sun Sep 7 13:54:31 2008 ---- src/eval.c Sun Sep 7 13:50:38 2008 -*************** -*** 16667,16673 **** - col = get_tv_number(&argvars[1]) - 1; /* -1 on type error */ - - if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count -! && col >= 0 && col < (long)STRLEN(ml_get(lnum)) - && rettv_list_alloc(rettv) != FAIL) - { - (void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL, TRUE); ---- 16667,16673 ---- - col = get_tv_number(&argvars[1]) - 1; /* -1 on type error */ - - if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count -! && col >= 0 && (col == 0 || col < (long)STRLEN(ml_get(lnum))) - && rettv_list_alloc(rettv) != FAIL) - { - (void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL, TRUE); -*** ../vim-7.2.013/src/version.c Sun Sep 7 21:47:51 2008 ---- src/version.c Wed Sep 10 15:36:52 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 14, - /**/ - --- -Everybody lies, but it doesn't matter since nobody listens. - -- Lieberman's Law - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.015 b/vi/vim-7.2/7.2.015 deleted file mode 100644 index e03ac15..0000000 --- a/vi/vim-7.2/7.2.015 +++ /dev/null @@ -1,82 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.015 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.015 -Problem: "make all test install" doesn't stop when the test fails. (Daniel - Shahaf) -Solution: When test.log contains failures exit with non-zero status. -Files: src/testdir/Makefile - - -*** ../vim-7.2.014/src/testdir/Makefile Wed Jun 25 00:22:53 2008 ---- src/testdir/Makefile Sun Sep 7 21:31:49 2008 -*************** -*** 26,40 **** - - .SUFFIXES: .in .out - -! nongui: nolog $(SCRIPTS) -! @echo -! @cat test.log -! @echo ALL DONE - -! gui: nolog $(SCRIPTS) $(SCRIPTS_GUI) - @echo -! @cat test.log -! @echo ALL DONE - - $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) - ---- 26,42 ---- - - .SUFFIXES: .in .out - -! nongui: nolog $(SCRIPTS) report -! -! gui: nolog $(SCRIPTS) $(SCRIPTS_GUI) report - -! report: - @echo -! @echo 'Test results:' -! @/bin/sh -c "if test -f test.log; \ -! then cat test.log; echo TEST FAILURE; exit 1; \ -! else echo ALL DONE; \ -! fi" - - $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) - -*************** -*** 71,74 **** - test60.out: test60.vim - - nolog: -! -echo Test results: >test.log ---- 73,76 ---- - test60.out: test60.vim - - nolog: -! -rm -f test.log -*** ../vim-7.2.014/src/version.c Wed Sep 10 15:38:13 2008 ---- src/version.c Wed Sep 10 18:23:38 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 15, - /**/ - --- -Light travels faster than sound. This is why some people -appear bright until you hear them speak - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.016 b/vi/vim-7.2/7.2.016 deleted file mode 100644 index 03d5207..0000000 --- a/vi/vim-7.2/7.2.016 +++ /dev/null @@ -1,166 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.016 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.016 -Problem: The pattern being completed may be in freed memory when the - command line is being reallocated. (Dominique Pelle) -Solution: Keep a pointer to the expand_T in the command line structure. - Don't use <S-Tab> as CTRL-P when there are no results. Clear the - completion when using a command line from the history. -Files: src/ex_getln.c - - -*** ../vim-7.2.015/src/ex_getln.c Fri Aug 8 12:58:59 2008 ---- src/ex_getln.c Wed Sep 10 22:43:41 2008 -*************** -*** 31,36 **** ---- 31,38 ---- - int cmdattr; /* attributes for prompt */ - int overstrike; /* Typing mode on the command line. Shared by - getcmdline() and put_on_cmdline(). */ -+ expand_T *xpc; /* struct being used for expansion, xp_pattern -+ may point into cmdbuff */ - int xp_context; /* type of expansion */ - # ifdef FEAT_EVAL - char_u *xp_arg; /* user-defined expansion arg */ -*************** -*** 38,44 **** - # endif - }; - -! static struct cmdline_info ccline; /* current cmdline_info */ - - static int cmd_showtail; /* Only show path tail in lists ? */ - ---- 40,50 ---- - # endif - }; - -! /* The current cmdline_info. It is initialized in getcmdline() and after that -! * used by other functions. When invoking getcmdline() recursively it needs -! * to be saved with save_cmdline() and restored with restore_cmdline(). -! * TODO: make it local to getcmdline() and pass it around. */ -! static struct cmdline_info ccline; - - static int cmd_showtail; /* Only show path tail in lists ? */ - -*************** -*** 238,243 **** ---- 244,250 ---- - } - - ExpandInit(&xpc); -+ ccline.xpc = &xpc; - - #ifdef FEAT_RIGHTLEFT - if (curwin->w_p_rl && *curwin->w_p_rlc == 's' -*************** -*** 408,416 **** - #endif - - /* -! * <S-Tab> works like CTRL-P (unless 'wc' is <S-Tab>). - */ -! if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles != -1) - c = Ctrl_P; - - #ifdef FEAT_WILDMENU ---- 415,424 ---- - #endif - - /* -! * When there are matching completions to select <S-Tab> works like -! * CTRL-P (unless 'wc' is <S-Tab>). - */ -! if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles > 0) - c = Ctrl_P; - - #ifdef FEAT_WILDMENU -*************** -*** 1513,1518 **** ---- 1521,1527 ---- - int old_firstc; - - vim_free(ccline.cmdbuff); -+ xpc.xp_context = EXPAND_NOTHING; - if (hiscnt == hislen) - p = lookfor; /* back to the old one */ - else -*************** -*** 1839,1844 **** ---- 1848,1854 ---- - #endif - - ExpandCleanup(&xpc); -+ ccline.xpc = NULL; - - #ifdef FEAT_SEARCH_EXTRA - if (did_incsearch) -*************** -*** 2508,2513 **** ---- 2518,2537 ---- - } - mch_memmove(ccline.cmdbuff, p, (size_t)ccline.cmdlen + 1); - vim_free(p); -+ -+ if (ccline.xpc != NULL -+ && ccline.xpc->xp_pattern != NULL -+ && ccline.xpc->xp_context != EXPAND_NOTHING -+ && ccline.xpc->xp_context != EXPAND_UNSUCCESSFUL) -+ { -+ int i = ccline.xpc->xp_pattern - p; -+ -+ /* If xp_pattern points inside the old cmdbuff it needs to be adjusted -+ * to point into the newly allocated memory. */ -+ if (i >= 0 && i <= ccline.cmdlen) -+ ccline.xpc->xp_pattern = ccline.cmdbuff + i; -+ } -+ - return OK; - } - -*************** -*** 2875,2880 **** ---- 2899,2905 ---- - prev_ccline = ccline; - ccline.cmdbuff = NULL; - ccline.cmdprompt = NULL; -+ ccline.xpc = NULL; - } - - /* -*************** -*** 3582,3587 **** ---- 3607,3613 ---- - ExpandInit(xp) - expand_T *xp; - { -+ xp->xp_pattern = NULL; - xp->xp_backslash = XP_BS_NONE; - #ifndef BACKSLASH_IN_FILENAME - xp->xp_shell = FALSE; -*** ../vim-7.2.015/src/version.c Wed Sep 10 18:25:18 2008 ---- src/version.c Sun Sep 14 14:38:47 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 16, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -53. To find out what time it is, you send yourself an e-mail and check the - "Date:" field. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.017 b/vi/vim-7.2/7.2.017 deleted file mode 100644 index 99979a1..0000000 --- a/vi/vim-7.2/7.2.017 +++ /dev/null @@ -1,162 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.017 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.017 -Problem: strlen() used on text that may not end in a NUL. (Dominique Pelle) - Pasting a very big selection doesn't work. -Solution: Use the length passed to the XtSelectionCallbackProc() function. - After getting the SelectionNotify event continue dispatching - events until the callback is actually called. Also dispatch the - PropertyNotify event. -Files: src/ui.c - - -*** ../vim-7.2.016/src/ui.c Sun Sep 7 21:47:51 2008 ---- src/ui.c Sun Sep 14 15:52:19 2008 -*************** -*** 2020,2026 **** - - if (value == NULL || *length == 0) - { -! clip_free_selection(cbd); /* ??? [what's the query?] */ - *(int *)success = FALSE; - return; - } ---- 2020,2026 ---- - - if (value == NULL || *length == 0) - { -! clip_free_selection(cbd); /* nothing received, clear register */ - *(int *)success = FALSE; - return; - } -*************** -*** 2076,2082 **** - text_prop.value = (unsigned char *)value; - text_prop.encoding = *type; - text_prop.format = *format; -! text_prop.nitems = STRLEN(value); - status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop, - &text_list, &n_text); - if (status != Success || n_text < 1) ---- 2076,2082 ---- - text_prop.value = (unsigned char *)value; - text_prop.encoding = *type; - text_prop.format = *format; -! text_prop.nitems = len; - status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop, - &text_list, &n_text); - if (status != Success || n_text < 1) -*************** -*** 2131,2137 **** - case 3: type = text_atom; break; - default: type = XA_STRING; - } -! success = FALSE; - XtGetSelectionValue(myShell, cbd->sel_atom, type, - clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime); - ---- 2131,2137 ---- - case 3: type = text_atom; break; - default: type = XA_STRING; - } -! success = MAYBE; - XtGetSelectionValue(myShell, cbd->sel_atom, type, - clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime); - -*************** -*** 2145,2169 **** - * paste! Don't worry, we will catch up with any other events later. - */ - start_time = time(NULL); -! for (;;) - { -! if (XCheckTypedEvent(dpy, SelectionNotify, &event)) - { -! /* this is where clip_x11_request_selection_cb() is actually -! * called */ - XtDispatchEvent(&event); -! break; - } -- if (XCheckTypedEvent(dpy, SelectionRequest, &event)) -- /* We may get a SelectionRequest here and if we don't handle -- * it we hang. KDE klipper does this, for example. */ -- XtDispatchEvent(&event); - - /* Time out after 2 to 3 seconds to avoid that we hang when the - * other process doesn't respond. Note that the SelectionNotify - * event may still come later when the selection owner comes back -! * to life and the text gets inserted unexpectedly (by xterm). -! * Don't know how to avoid that :-(. */ - if (time(NULL) > start_time + 2) - { - timed_out = TRUE; ---- 2145,2171 ---- - * paste! Don't worry, we will catch up with any other events later. - */ - start_time = time(NULL); -! while (success == MAYBE) - { -! if (XCheckTypedEvent(dpy, SelectionNotify, &event) -! || XCheckTypedEvent(dpy, SelectionRequest, &event) -! || XCheckTypedEvent(dpy, PropertyNotify, &event)) - { -! /* This is where clip_x11_request_selection_cb() should be -! * called. It may actually happen a bit later, so we loop -! * until "success" changes. -! * We may get a SelectionRequest here and if we don't handle -! * it we hang. KDE klipper does this, for example. -! * We need to handle a PropertyNotify for large selections. */ - XtDispatchEvent(&event); -! continue; - } - - /* Time out after 2 to 3 seconds to avoid that we hang when the - * other process doesn't respond. Note that the SelectionNotify - * event may still come later when the selection owner comes back -! * to life and the text gets inserted unexpectedly. Don't know -! * why that happens or how to avoid that :-(. */ - if (time(NULL) > start_time + 2) - { - timed_out = TRUE; -*************** -*** 2177,2183 **** - ui_delay(1L, TRUE); - } - -! if (success) - return; - - /* don't do a retry with another type after timing out, otherwise we ---- 2179,2185 ---- - ui_delay(1L, TRUE); - } - -! if (success == TRUE) - return; - - /* don't do a retry with another type after timing out, otherwise we -*** ../vim-7.2.016/src/version.c Sun Sep 14 14:41:44 2008 ---- src/version.c Sun Sep 14 15:55:34 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 17, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -54. You start tilting your head sideways to smile. :-) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.018 b/vi/vim-7.2/7.2.018 deleted file mode 100644 index b195f09..0000000 --- a/vi/vim-7.2/7.2.018 +++ /dev/null @@ -1,45 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.018 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.018 -Problem: Memory leak when substitute is aborted. -Solution: Free the buffer allocated for the new text. (Dominique Pelle) -Files: src/ex_cmds.c - - -*** ../vim-7.2.017/src/ex_cmds.c Wed Aug 6 15:03:07 2008 ---- src/ex_cmds.c Sun Sep 14 13:45:03 2008 -*************** -*** 5059,5064 **** ---- 5059,5065 ---- - - if (did_sub) - ++sub_nlines; -+ vim_free(new_start); /* for when substitute was cancelled */ - vim_free(sub_firstline); /* free the copy of the original line */ - sub_firstline = NULL; - } -*** ../vim-7.2.017/src/version.c Sun Sep 14 15:57:54 2008 ---- src/version.c Sun Sep 14 21:38:25 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 18, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -55. You ask your doctor to implant a gig in your brain. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.019 b/vi/vim-7.2/7.2.019 deleted file mode 100644 index 4404bca..0000000 --- a/vi/vim-7.2/7.2.019 +++ /dev/null @@ -1,65 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.019 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.019 -Problem: Completion of ":noautocmd" doesn't work and exists(":noautocmd") - returns zero. (Ben Fritz) -Solution: Add "noautocmd" to the list of modifiers and commands. -Files: src/ex_cmds.h, src/ex_docmd.c - - -*** ../vim-7.2.018/src/ex_cmds.h Wed Jun 25 00:44:40 2008 ---- src/ex_cmds.h Sat Sep 13 18:37:25 2008 -*************** -*** 635,640 **** ---- 635,642 ---- - RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_noremap, "noremap", ex_map, - BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), -+ EX(CMD_noautocmd, "noautocmd", ex_wrongmodifier, -+ NEEDARG|EXTRA|NOTRLCOM), - EX(CMD_nohlsearch, "nohlsearch", ex_nohlsearch, - TRLBAR|SBOXOK|CMDWIN), - EX(CMD_noreabbrev, "noreabbrev", ex_abbreviate, -*** ../vim-7.2.018/src/ex_docmd.c Sat Jul 26 16:04:39 2008 ---- src/ex_docmd.c Mon Sep 15 20:04:53 2008 -*************** -*** 2978,2983 **** ---- 2979,2985 ---- - {"keepmarks", 3, FALSE}, - {"leftabove", 5, FALSE}, - {"lockmarks", 3, FALSE}, -+ {"noautocmd", 3, FALSE}, - {"rightbelow", 6, FALSE}, - {"sandbox", 3, FALSE}, - {"silent", 3, FALSE}, -*** ../vim-7.2.018/src/version.c Sun Sep 14 21:40:26 2008 ---- src/version.c Thu Sep 18 12:39:56 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 19, - /**/ - --- -Proof techniques #2: Proof by Oddity. - SAMPLE: To prove that horses have an infinite number of legs. -(1) Horses have an even number of legs. -(2) They have two legs in back and fore legs in front. -(3) This makes a total of six legs, which certainly is an odd number of - legs for a horse. -(4) But the only number that is both odd and even is infinity. -(5) Therefore, horses must have an infinite number of legs. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.020 b/vi/vim-7.2/7.2.020 deleted file mode 100644 index fb29040..0000000 --- a/vi/vim-7.2/7.2.020 +++ /dev/null @@ -1,54 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.020 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.020 -Problem: Starting the GUI when the executable starts with 'k', but the KDE - version no longer exists. -Solution: Don't have "kvim" start the GUI. -Files: src/main.c - - -*** ../vim-7.2.019/src/main.c Thu Jul 24 19:34:23 2008 ---- src/main.c Sun Sep 14 13:26:10 2008 -*************** -*** 1457,1463 **** - ++initstr; - } - -! if (TOLOWER_ASC(initstr[0]) == 'g' || initstr[0] == 'k') - { - main_start_gui(); - #ifdef FEAT_GUI ---- 1458,1465 ---- - ++initstr; - } - -! /* "gvim" starts the GUI. Also accept "Gvim" for MS-Windows. */ -! if (TOLOWER_ASC(initstr[0]) == 'g') - { - main_start_gui(); - #ifdef FEAT_GUI -*** ../vim-7.2.019/src/version.c Thu Sep 18 12:43:21 2008 ---- src/version.c Thu Sep 18 20:54:10 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 20, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -90. Instead of calling you to dinner, your spouse sends e-mail. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.021 b/vi/vim-7.2/7.2.021 deleted file mode 100644 index fee0bd8..0000000 --- a/vi/vim-7.2/7.2.021 +++ /dev/null @@ -1,147 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.021 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.021 -Problem: When executing autocommands getting the full file name may be - slow. (David Kotchan) -Solution: Postpone calling FullName_save() until autocmd_fname is used. -Files: src/ex_docmd.c, src/fileio.c, src/globals.h - - -*** ../vim-7.2.020/src/ex_docmd.c Thu Sep 18 12:43:21 2008 ---- src/ex_docmd.c Mon Sep 15 20:04:53 2008 -*************** -*** 9542,9547 **** ---- 9569,9583 ---- - #ifdef FEAT_AUTOCMD - case SPEC_AFILE: /* file name for autocommand */ - result = autocmd_fname; -+ if (result != NULL && !autocmd_fname_full) -+ { -+ /* Still need to turn the fname into a full path. It is -+ * postponed to avoid a delay when <afile> is not used. */ -+ autocmd_fname_full = TRUE; -+ result = FullName_save(autocmd_fname, FALSE); -+ vim_free(autocmd_fname); -+ autocmd_fname = result; -+ } - if (result == NULL) - { - *errormsg = (char_u *)_("E495: no autocommand file name to substitute for \"<afile>\""); -*** ../vim-7.2.020/src/fileio.c Wed Aug 6 18:43:07 2008 ---- src/fileio.c Tue Sep 16 21:24:26 2008 -*************** -*** 8523,8528 **** ---- 8523,8529 ---- - char_u *save_sourcing_name; - linenr_T save_sourcing_lnum; - char_u *save_autocmd_fname; -+ int save_autocmd_fname_full; - int save_autocmd_bufnr; - char_u *save_autocmd_match; - int save_autocmd_busy; -*************** -*** 8601,8606 **** ---- 8602,8608 ---- - * Save the autocmd_* variables and info about the current buffer. - */ - save_autocmd_fname = autocmd_fname; -+ save_autocmd_fname_full = autocmd_fname_full; - save_autocmd_bufnr = autocmd_bufnr; - save_autocmd_match = autocmd_match; - save_autocmd_busy = autocmd_busy; -*************** -*** 8618,8631 **** - if (fname != NULL && *fname != NUL) - autocmd_fname = fname; - else if (buf != NULL) -! autocmd_fname = buf->b_fname; - else - autocmd_fname = NULL; - } - else - autocmd_fname = fname_io; - if (autocmd_fname != NULL) -! autocmd_fname = FullName_save(autocmd_fname, FALSE); - - /* - * Set the buffer number to be used for <abuf>. ---- 8620,8634 ---- - if (fname != NULL && *fname != NUL) - autocmd_fname = fname; - else if (buf != NULL) -! autocmd_fname = buf->b_ffname; - else - autocmd_fname = NULL; - } - else - autocmd_fname = fname_io; - if (autocmd_fname != NULL) -! autocmd_fname = vim_strsave(autocmd_fname); -! autocmd_fname_full = FALSE; /* call FullName_save() later */ - - /* - * Set the buffer number to be used for <abuf>. -*************** -*** 8810,8815 **** ---- 8813,8819 ---- - sourcing_lnum = save_sourcing_lnum; - vim_free(autocmd_fname); - autocmd_fname = save_autocmd_fname; -+ autocmd_fname_full = save_autocmd_fname_full; - autocmd_bufnr = save_autocmd_bufnr; - autocmd_match = save_autocmd_match; - #ifdef FEAT_EVAL -*************** -*** 8918,8924 **** - { - apc->curpat = NULL; - -! /* only use a pattern when it has not been removed, has commands and - * the group matches. For buffer-local autocommands only check the - * buffer number. */ - if (ap->pat != NULL && ap->cmds != NULL ---- 8922,8928 ---- - { - apc->curpat = NULL; - -! /* Only use a pattern when it has not been removed, has commands and - * the group matches. For buffer-local autocommands only check the - * buffer number. */ - if (ap->pat != NULL && ap->cmds != NULL -*** ../vim-7.2.020/src/globals.h Sat Jul 26 16:04:49 2008 ---- src/globals.h Mon Sep 15 19:59:28 2008 -*************** -*** 1022,1027 **** ---- 1022,1028 ---- - #endif - #ifdef FEAT_AUTOCMD - EXTERN char_u *autocmd_fname INIT(= NULL); /* fname for <afile> on cmdline */ -+ EXTERN int autocmd_fname_full; /* autocmd_fname is full path */ - EXTERN int autocmd_bufnr INIT(= 0); /* fnum for <abuf> on cmdline */ - EXTERN char_u *autocmd_match INIT(= NULL); /* name for <amatch> on cmdline */ - EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */ -*** ../vim-7.2.020/src/version.c Thu Sep 18 20:55:19 2008 ---- src/version.c Thu Sep 18 21:24:30 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 21, - /**/ - --- -From "know your smileys": - :----} You lie like Pinocchio - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.022 b/vi/vim-7.2/7.2.022 deleted file mode 100644 index 3927735..0000000 --- a/vi/vim-7.2/7.2.022 +++ /dev/null @@ -1,140 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.022 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.022 (extra) -Problem: Testing is not possible when compiling with MingW. -Solution: Add a MingW specific test Makefile. (Bill McCarthy) -Files: Filelist, src/testdir/Make_ming.mak - - -*** ../vim-7.2.021/Filelist Sun Jul 13 19:33:31 2008 ---- Filelist Sun Sep 14 21:47:01 2008 -*************** -*** 285,290 **** ---- 285,291 ---- - src/proto/os_win32.pro \ - src/proto/os_mswin.pro \ - src/testdir/Make_dos.mak \ -+ src/testdir/Make_ming.mak \ - src/testdir/dos.vim \ - src/uninstal.c \ - src/vim.def \ -*** ../vim-7.2.021/src/testdir/Make_ming.mak Sat Sep 20 16:25:06 2008 ---- src/testdir/Make_ming.mak Sat Sep 20 16:25:58 2008 -*************** -*** 0 **** ---- 1,91 ---- -+ # Makefile to run tests for Vim, on Dos-like machines -+ # with sh.exe or zsh.exe in the path or not. -+ # -+ # Author: Bill McCarthy -+ # -+ # Note that test54 has been removed until it is fixed. -+ # -+ # Requires a set of Unix tools: echo, diff, etc. -+ -+ ifneq (sh.exe, $(SHELL)) -+ DEL = rm -f -+ MV = mv -+ CP = cp -+ DIRSLASH = / -+ else -+ DEL = del -+ MV = rename -+ CP = copy -+ DIRSLASH = \\ -+ endif -+ -+ VIMPROG = ..$(DIRSLASH)vim -+ -+ # Omitted: -+ # test2 "\\tmp" doesn't work. -+ # test10 'errorformat' is different -+ # test12 can't unlink a swap file -+ # test25 uses symbolic link -+ # test27 can't edit file with "*" in file name -+ # test31 16 bit version runs out of memory... -+ -+ SCRIPTS16 = test1.out test19.out test20.out test22.out \ -+ test23.out test24.out test28.out test29.out \ -+ test35.out test36.out test43.out \ -+ test44.out test45.out test46.out test47.out \ -+ test48.out test51.out test53.out \ -+ test55.out test56.out test57.out test58.out test59.out \ -+ test60.out test61.out test62.out test63.out test64.out -+ -+ # Had to remove test54 which doesn't work yet. -+ # test54.out -+ -+ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \ -+ test8.out test9.out test11.out test13.out test14.out \ -+ test15.out test17.out test18.out test21.out test26.out \ -+ test30.out test31.out test32.out test33.out test34.out \ -+ test37.out test38.out test39.out test40.out test41.out \ -+ test42.out test52.out test65.out -+ -+ SCRIPTS32 = test50.out -+ -+ SCRIPTS_GUI = test16.out -+ -+ .SUFFIXES: .in .out -+ -+ vimall: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS32) -+ echo ALL DONE -+ -+ nongui: fixff $(SCRIPTS16) $(SCRIPTS) -+ echo ALL DONE -+ -+ small: -+ echo ALL DONE -+ -+ gui: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) -+ echo ALL DONE -+ -+ win32: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) -+ echo ALL DONE -+ -+ fixff: -+ -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok -+ -+ clean: -+ -$(DEL) *.out -+ -$(DEL) test.ok -+ -$(DEL) small.vim -+ -$(DEL) tiny.vim -+ -$(DEL) mbyte.vim -+ -$(DEL) X* -+ -$(DEL) viminfo -+ -+ .in.out: -+ $(CP) $*.ok test.ok -+ $(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in -+ diff test.out $*.ok -+ -$(DEL) $*.out -+ $(MV) test.out $*.out -+ -$(DEL) X* -+ -$(DEL) test.ok -+ -$(DEL) viminfo -*** ../vim-7.2.021/src/version.c Thu Sep 18 21:29:07 2008 ---- src/version.c Sat Sep 20 16:25:16 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 22, - /**/ - --- -Where do you want to crash today? - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.023 b/vi/vim-7.2/7.2.023 deleted file mode 100644 index 0f6ad1e..0000000 --- a/vi/vim-7.2/7.2.023 +++ /dev/null @@ -1,65 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.023 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.023 -Problem: 'cursorcolumn' is in the wrong place in a closed fold when the - display is shifted left. (Gary Johnson) -Solution: Subtract w_skipcol or w_leftcol when needed. -Files: src/screen.c - - -*** ../vim-7.2.022/src/screen.c Thu Jul 24 20:29:09 2008 ---- src/screen.c Fri Sep 26 21:23:06 2008 -*************** -*** 2439,2447 **** - - #ifdef FEAT_SYN_HL - /* Show 'cursorcolumn' in the fold line. */ -! if (wp->w_p_cuc && (int)wp->w_virtcol + txtcol < W_WIDTH(wp)) -! ScreenAttrs[off + wp->w_virtcol + txtcol] = hl_combine_attr( -! ScreenAttrs[off + wp->w_virtcol + txtcol], hl_attr(HLF_CUC)); - #endif - - SCREEN_LINE(row + W_WINROW(wp), W_WINCOL(wp), (int)W_WIDTH(wp), ---- 2439,2455 ---- - - #ifdef FEAT_SYN_HL - /* Show 'cursorcolumn' in the fold line. */ -! if (wp->w_p_cuc) -! { -! txtcol += wp->w_virtcol; -! if (wp->w_p_wrap) -! txtcol -= wp->w_skipcol; -! else -! txtcol -= wp->w_leftcol; -! if (txtcol >= 0 && txtcol < W_WIDTH(wp)) -! ScreenAttrs[off + txtcol] = hl_combine_attr( -! ScreenAttrs[off + txtcol], hl_attr(HLF_CUC)); -! } - #endif - - SCREEN_LINE(row + W_WINROW(wp), W_WINCOL(wp), (int)W_WIDTH(wp), -*** ../vim-7.2.022/src/version.c Sat Sep 20 16:26:10 2008 ---- src/version.c Wed Oct 1 21:07:31 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 23, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -124. You begin conversations with, "Who is your internet service provider?" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.024 b/vi/vim-7.2/7.2.024 deleted file mode 100644 index 033b0a2..0000000 --- a/vi/vim-7.2/7.2.024 +++ /dev/null @@ -1,50 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.024 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.024 -Problem: It's possible to set 'history' to a negative value and that causes - an out-of-memory error. -Solution: Check that 'history' has a positive value. (Doug Kearns) -Files: src/option.c - - -*** ../vim-7.2.023/src/option.c Thu Jul 24 18:45:15 2008 ---- src/option.c Fri Sep 26 22:20:20 2008 -*************** -*** 7974,7979 **** ---- 7974,7984 ---- - else /* curwin->w_p_scr > curwin->w_height */ - curwin->w_p_scr = curwin->w_height; - } -+ if (p_hi < 0) -+ { -+ errmsg = e_positive; -+ p_hi = 0; -+ } - if (p_report < 0) - { - errmsg = e_positive; -*** ../vim-7.2.023/src/version.c Wed Oct 1 21:09:02 2008 ---- src/version.c Thu Oct 2 22:47:22 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 24, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -127. You bring your laptop and cellular phone to church. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.025 b/vi/vim-7.2/7.2.025 deleted file mode 100644 index dab2cc8..0000000 --- a/vi/vim-7.2/7.2.025 +++ /dev/null @@ -1,54 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.025 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.025 -Problem: When a CursorHold event invokes system() it is retriggered over - and over again. -Solution: Don't reset did_cursorhold when getting K_IGNORE. -Files: src/normal.c - - -*** ../vim-7.2.024/src/normal.c Sat Sep 6 16:44:06 2008 ---- src/normal.c Sat Sep 27 13:03:34 2008 -*************** -*** 1132,1138 **** - out_flush(); - #endif - #ifdef FEAT_AUTOCMD -! did_cursorhold = FALSE; - #endif - - State = NORMAL; ---- 1132,1139 ---- - out_flush(); - #endif - #ifdef FEAT_AUTOCMD -! if (ca.cmdchar != K_IGNORE) -! did_cursorhold = FALSE; - #endif - - State = NORMAL; -*** ../vim-7.2.024/src/version.c Thu Oct 2 22:48:01 2008 ---- src/version.c Thu Oct 2 22:54:41 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 25, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -128. You can access the Net -- via your portable and cellular phone. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.026 b/vi/vim-7.2/7.2.026 deleted file mode 100644 index ec8b1c7..0000000 --- a/vi/vim-7.2/7.2.026 +++ /dev/null @@ -1,105 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.026 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.026 (after 7.2.010) -Problem: "K" doesn't use the length of the identifier but uses the rest of - the line. -Solution: Copy the desired number of characters first. -Files: src/normal.c - - -*** ../vim-7.2.025/src/normal.c Thu Oct 2 22:55:17 2008 ---- src/normal.c Sat Nov 1 13:41:03 2008 -*************** -*** 183,188 **** ---- 183,190 ---- - static void nv_cursorhold __ARGS((cmdarg_T *cap)); - #endif - -+ static char *e_noident = N_("E349: No identifier under cursor"); -+ - /* - * Function to be called for a Normal or Visual mode command. - * The argument is a cmdarg_T. -*************** -*** 3510,3516 **** - if (find_type & FIND_STRING) - EMSG(_("E348: No string under cursor")); - else -! EMSG(_("E349: No identifier under cursor")); - return 0; - } - ptr += col; ---- 3512,3518 ---- - if (find_type & FIND_STRING) - EMSG(_("E348: No string under cursor")); - else -! EMSG(_(e_noident)); - return 0; - } - ptr += col; -*************** -*** 5472,5479 **** - { - /* An external command will probably use an argument starting - * with "-" as an option. To avoid trouble we skip the "-". */ -! while (*ptr == '-') - ++ptr; - - /* When a count is given, turn it into a range. Is this - * really what we want? */ ---- 5474,5490 ---- - { - /* An external command will probably use an argument starting - * with "-" as an option. To avoid trouble we skip the "-". */ -! while (*ptr == '-' && n > 0) -! { - ++ptr; -+ --n; -+ } -+ if (n == 0) -+ { -+ EMSG(_(e_noident)); /* found dashes only */ -+ vim_free(buf); -+ return; -+ } - - /* When a count is given, turn it into a range. Is this - * really what we want? */ -*************** -*** 5520,5526 **** ---- 5531,5539 ---- - if (cmdchar == 'K' && !kp_help) - { - /* Escape the argument properly for a shell command */ -+ ptr = vim_strnsave(ptr, n); - p = vim_strsave_shellescape(ptr, TRUE); -+ vim_free(ptr); - if (p == NULL) - { - vim_free(buf); -*** ../vim-7.2.025/src/version.c Thu Oct 2 22:55:17 2008 ---- src/version.c Sat Nov 1 13:50:53 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 26, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -161. You get up before the sun rises to check your e-mail, and you - find yourself in the very same chair long after the sun has set. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.027 b/vi/vim-7.2/7.2.027 deleted file mode 100644 index 59d708d..0000000 --- a/vi/vim-7.2/7.2.027 +++ /dev/null @@ -1,98 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.027 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.027 -Problem: Can use cscope commands in the sandbox. -Solution: Disallow them, they might not be safe. -Files: src/ex_cmds.h - - -*** ../vim-7.2.026/src/ex_cmds.h Thu Sep 18 12:43:21 2008 ---- src/ex_cmds.h Thu Sep 18 22:18:14 2008 -*************** -*** 278,284 **** - EX(CMD_crewind, "crewind", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cscope, "cscope", do_cscope, -! EXTRA|NOTRLCOM|SBOXOK|XFILE), - EX(CMD_cstag, "cstag", do_cstag, - BANG|TRLBAR|WORD1), - EX(CMD_cunmap, "cunmap", ex_unmap, ---- 278,284 ---- - EX(CMD_crewind, "crewind", ex_cc, - RANGE|NOTADR|COUNT|TRLBAR|BANG), - EX(CMD_cscope, "cscope", do_cscope, -! EXTRA|NOTRLCOM|XFILE), - EX(CMD_cstag, "cstag", do_cstag, - BANG|TRLBAR|WORD1), - EX(CMD_cunmap, "cunmap", ex_unmap, -*************** -*** 506,512 **** - EX(CMD_lclose, "lclose", ex_cclose, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_lcscope, "lcscope", do_cscope, -! EXTRA|NOTRLCOM|SBOXOK|XFILE), - EX(CMD_left, "left", ex_align, - TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), - EX(CMD_leftabove, "leftabove", ex_wrongmodifier, ---- 506,512 ---- - EX(CMD_lclose, "lclose", ex_cclose, - RANGE|NOTADR|COUNT|TRLBAR), - EX(CMD_lcscope, "lcscope", do_cscope, -! EXTRA|NOTRLCOM|XFILE), - EX(CMD_left, "left", ex_align, - TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY), - EX(CMD_leftabove, "leftabove", ex_wrongmodifier, -*************** -*** 653,658 **** ---- 653,660 ---- - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_open, "open", ex_open, - RANGE|EXTRA), -+ EX(CMD_oldfiles, "oldfiles", ex_oldfiles, -+ BANG|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_omap, "omap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_omapclear, "omapclear", ex_mapclear, -*************** -*** 804,810 **** - EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding, - WORD1|TRLBAR|CMDWIN), - EX(CMD_scscope, "scscope", do_scscope, -! EXTRA|NOTRLCOM|SBOXOK), - EX(CMD_set, "set", ex_set, - TRLBAR|EXTRA|CMDWIN|SBOXOK), - EX(CMD_setfiletype, "setfiletype", ex_setfiletype, ---- 806,812 ---- - EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding, - WORD1|TRLBAR|CMDWIN), - EX(CMD_scscope, "scscope", do_scscope, -! EXTRA|NOTRLCOM), - EX(CMD_set, "set", ex_set, - TRLBAR|EXTRA|CMDWIN|SBOXOK), - EX(CMD_setfiletype, "setfiletype", ex_setfiletype, -*** ../vim-7.2.026/src/version.c Sat Nov 1 13:51:57 2008 ---- src/version.c Thu Nov 6 10:21:21 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 27, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -179. You wonder why your household garbage can doesn't have an - "empty recycle bin" button. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.028 b/vi/vim-7.2/7.2.028 deleted file mode 100644 index 4f148e9..0000000 --- a/vi/vim-7.2/7.2.028 +++ /dev/null @@ -1,53 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.028 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.028 -Problem: Confusing error message for missing (). -Solution: Change "braces" to "parentheses". (Gary Johnson) -Files: src/eval.c - - -*** ../vim-7.2.027/src/eval.c Wed Sep 10 15:38:13 2008 ---- src/eval.c Tue Sep 30 21:43:38 2008 -*************** -*** 3287,3293 **** - - if (*startarg != '(') - { -! EMSG2(_("E107: Missing braces: %s"), eap->arg); - goto end; - } - ---- 3293,3299 ---- - - if (*startarg != '(') - { -! EMSG2(_("E107: Missing parentheses: %s"), eap->arg); - goto end; - } - -*** ../vim-7.2.027/src/version.c Thu Nov 6 10:23:03 2008 ---- src/version.c Thu Nov 6 11:02:51 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 28, - /**/ - --- -Wizards had always known that the act of observation changed the thing that -was observed, and sometimes forgot that it also changed the observer too. - Terry Pratchett - Interesting times - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.029 b/vi/vim-7.2/7.2.029 deleted file mode 100644 index 56e847a..0000000 --- a/vi/vim-7.2/7.2.029 +++ /dev/null @@ -1,44 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.029 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.029 -Problem: No completion for ":doautoall". -Solution: Complete ":doautoall" like ":doautocmd". (Doug Kearns) -Files: src/ex_docmd.c - - -*** ../vim-7.2.028/src/ex_docmd.c Thu Sep 18 21:29:07 2008 ---- src/ex_docmd.c Mon Nov 3 21:21:17 2008 -*************** -*** 3609,3614 **** ---- 3610,3616 ---- - return set_context_in_autocmd(xp, arg, FALSE); - - case CMD_doautocmd: -+ case CMD_doautoall: - return set_context_in_autocmd(xp, arg, TRUE); - #endif - case CMD_set: -*** ../vim-7.2.028/src/version.c Thu Nov 6 11:04:50 2008 ---- src/version.c Thu Nov 6 17:14:58 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 29, - /**/ - --- -Press any key to continue, press any other key to quit. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.030 b/vi/vim-7.2/7.2.030 deleted file mode 100644 index 310207e..0000000 --- a/vi/vim-7.2/7.2.030 +++ /dev/null @@ -1,51 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.030 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.030 (after 7.2.027) -Problem: Can't compile. -Solution: Remove prematurely added ex_oldfiles. -Files: src/ex_cmds.h - - -*** ../vim-7.2.029/src/ex_cmds.h Thu Nov 6 10:23:03 2008 ---- src/ex_cmds.h Thu Nov 6 20:45:07 2008 -*************** -*** 653,660 **** - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_open, "open", ex_open, - RANGE|EXTRA), -- EX(CMD_oldfiles, "oldfiles", ex_oldfiles, -- BANG|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_omap, "omap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_omapclear, "omapclear", ex_mapclear, ---- 653,658 ---- -*** ../vim-7.2.029/src/version.c Thu Nov 6 17:16:06 2008 ---- src/version.c Thu Nov 6 20:46:11 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 30, - /**/ - --- -% cat /usr/include/sys/errno.h -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -[...] -#define EMACS 666 /* Too many macros */ -% - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.031 b/vi/vim-7.2/7.2.031 deleted file mode 100644 index 4b2bca7..0000000 --- a/vi/vim-7.2/7.2.031 +++ /dev/null @@ -1,1281 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.031 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.031 -Problem: Information in the viminfo file about previously edited files is - not available to the user. There is no way to get a complete list - of files edited in previous Vim sessions. -Solution: Add v:oldfiles and fill it with the list of old file names when - first reading the viminfo file. Add the ":oldfiles" command, - ":browse oldfiles" and the "#<123" special file name. Increase - the default value for 'viminfo' from '20 to '100. -Files: runtime/doc/cmdline.txt, runtime/doc/eval.txt, - runtime/doc/starting.txt, runtime/doc/usr_21.txt, src/eval.c, - src/ex_cmds.c, src/ex_cmds.h, src/ex_docmd.c, src/feature.h, - src/fileio.c, src/main.c, src/mark.c, src/misc1.c, - src/proto/eval.pro, src/proto/ex_cmds.pro, src/proto/mark.pro, - src/option.c, src/structs.h, src/vim.h - - -*** ../vim-7.2.030/runtime/doc/cmdline.txt Sat Aug 9 19:36:46 2008 ---- runtime/doc/cmdline.txt Thu Sep 18 22:55:27 2008 -*************** -*** 1,4 **** -! *cmdline.txt* For Vim version 7.2. Last change: 2008 Jul 29 - - - VIM REFERENCE MANUAL by Bram Moolenaar ---- 1,4 ---- -! *cmdline.txt* For Vim version 7.2. Last change: 2008 Sep 18 - - - VIM REFERENCE MANUAL by Bram Moolenaar -*************** -*** 157,162 **** ---- 157,167 ---- - (doesn't work at the expression prompt; some - things such as changing the buffer or current - window are not allowed to avoid side effects) -+ When the result is a |List| the items are used -+ as lines. They can have line breaks inside -+ too. -+ When the result is a Float it's automatically -+ converted to a String. - See |registers| about registers. {not in Vi} - Implementation detail: When using the |expression| register - and invoking setcmdpos(), this sets the position before -*************** -*** 730,748 **** - In Ex commands, at places where a file name can be used, the following - characters have a special meaning. These can also be used in the expression - function expand() |expand()|. -! % is replaced with the current file name *:_%* -! # is replaced with the alternate file name *:_#* - #n (where n is a number) is replaced with the file name of -! buffer n. "#0" is the same as "#" -! ## is replaced with all names in the argument list *:_##* - concatenated, separated by spaces. Each space in a name - is preceded with a backslash. -! Note that these give the file name as it was typed. If an absolute path is -! needed (when using the file name from a different directory), you need to add -! ":p". See |filename-modifiers|. - Note that backslashes are inserted before spaces, so that the command will - correctly interpret the file name. But this doesn't happen for shell -! commands. For those you probably have to use quotes: > - :!ls "%" - :r !spell "%" - ---- 735,763 ---- - In Ex commands, at places where a file name can be used, the following - characters have a special meaning. These can also be used in the expression - function expand() |expand()|. -! % Is replaced with the current file name. *:_%* *c_%* -! # Is replaced with the alternate file name. *:_#* *c_#* - #n (where n is a number) is replaced with the file name of -! buffer n. "#0" is the same as "#". -! ## Is replaced with all names in the argument list *:_##* *c_##* - concatenated, separated by spaces. Each space in a name - is preceded with a backslash. -! #<n (where n is a number > 0) is replaced with old *:_#<* *c_#<* -! file name n. See |:oldfiles| or |v:oldfiles| to get the -! number. *E809* -! {only when compiled with the +eval and +viminfo features} -! -! Note that these, except "#<n", give the file name as it was typed. If an -! absolute path is needed (when using the file name from a different directory), -! you need to add ":p". See |filename-modifiers|. -! -! The "#<n" item returns an absolute path, but it will start with "~/" for files -! below your home directory. -! - Note that backslashes are inserted before spaces, so that the command will - correctly interpret the file name. But this doesn't happen for shell -! commands. For those you probably have to use quotes (this fails for files -! that contain a quote and wildcards): > - :!ls "%" - :r !spell "%" - -*** ../vim-7.2.030/runtime/doc/eval.txt Sat Aug 9 19:36:47 2008 ---- runtime/doc/eval.txt Sun Nov 2 14:25:38 2008 -*************** -*** 1,4 **** -! *eval.txt* For Vim version 7.2. Last change: 2008 Aug 09 - - - VIM REFERENCE MANUAL by Bram Moolenaar ---- 1,4 ---- -! *eval.txt* For Vim version 7.2. Last change: 2008 Nov 02 - - - VIM REFERENCE MANUAL by Bram Moolenaar -*************** -*** 1484,1489 **** ---- 1484,1500 ---- - This is the screen column number, like with |virtcol()|. The - value is zero when there was no mouse button click. - -+ *v:oldfiles* *oldfiles-variable* -+ v:oldfiles List of file names that is loaded from the |viminfo| file on -+ startup. These are the files that Vim remembers marks for. -+ The length of the List is limited by the ' argument of the -+ 'viminfo' option (default is 100). -+ Also see |:oldfiles| and |c_#<|. -+ The List can be modified, but this has no effect on what is -+ stored in the |viminfo| file later. If you use values other -+ than String this will cause trouble. -+ {only when compiled with the +viminfo feature} -+ - *v:operator* *operator-variable* - v:operator The last operator given in Normal mode. This is a single - character except for commands starting with <g> or <z>, -*** ../vim-7.2.030/runtime/doc/starting.txt Sat Aug 9 19:36:52 2008 ---- runtime/doc/starting.txt Sun Nov 9 12:12:19 2008 -*************** -*** 1,4 **** -! *starting.txt* For Vim version 7.2. Last change: 2008 Jun 21 - - - VIM REFERENCE MANUAL by Bram Moolenaar ---- 1,4 ---- -! *starting.txt* For Vim version 7.2. Last change: 2008 Nov 09 - - - VIM REFERENCE MANUAL by Bram Moolenaar -*************** -*** 1337,1344 **** - *viminfo-read* - When Vim is started and the 'viminfo' option is non-empty, the contents of - the viminfo file are read and the info can be used in the appropriate places. -! The marks are not read in at startup (but file marks are). See -! |initialization| for how to set the 'viminfo' option upon startup. - - *viminfo-write* - When Vim exits and 'viminfo' is non-empty, the info is stored in the viminfo ---- 1335,1343 ---- - *viminfo-read* - When Vim is started and the 'viminfo' option is non-empty, the contents of - the viminfo file are read and the info can be used in the appropriate places. -! The |v:oldfiles| variable is filled. The marks are not read in at startup -! (but file marks are). See |initialization| for how to set the 'viminfo' -! option upon startup. - - *viminfo-write* - When Vim exits and 'viminfo' is non-empty, the info is stored in the viminfo -*************** -*** 1372,1377 **** ---- 1371,1378 ---- - that start with any string given with the "r" flag in 'viminfo'. This can be - used to avoid saving marks for files on removable media (for MS-DOS you would - use "ra:,rb:", for Amiga "rdf0:,rdf1:,rdf2:"). -+ The |v:oldfiles| variable is filled with the file names that the viminfo file -+ has marks for. - - *viminfo-file-marks* - Uppercase marks ('A to 'Z) are stored when writing the viminfo file. The -*************** -*** 1463,1470 **** - *:rv* *:rviminfo* *E195* - :rv[iminfo][!] [file] Read from viminfo file [file] (default: see above). - If [!] is given, then any information that is -! already set (registers, marks, etc.) will be -! overwritten. {not in Vi} - - *:wv* *:wviminfo* *E137* *E138* *E574* - :wv[iminfo][!] [file] Write to viminfo file [file] (default: see above). ---- 1464,1471 ---- - *:rv* *:rviminfo* *E195* - :rv[iminfo][!] [file] Read from viminfo file [file] (default: see above). - If [!] is given, then any information that is -! already set (registers, marks, |v:oldfiles|, etc.) -! will be overwritten {not in Vi} - - *:wv* *:wviminfo* *E137* *E138* *E574* - :wv[iminfo][!] [file] Write to viminfo file [file] (default: see above). -*************** -*** 1479,1482 **** ---- 1480,1499 ---- - the .viminfo file. - {not in Vi} - -+ *:ol* *:oldfiles* -+ :ol[dfiles] List the files that have marks stored in the viminfo -+ file. This list is read on startup and only changes -+ afterwards with ":rviminfo!". Also see |v:oldfiles|. -+ The number can be used with |c_#<|. -+ {not in Vi, only when compiled with the +eval feature} -+ -+ :bro[wse] ol[dfiles][!] -+ List file names as with |:oldfiles|, and then prompt -+ for a number. When the number is valid that file from -+ the list is edited. -+ If you get the |press-enter| prompt you can press "q" -+ and still get the prompt to enter a file number. -+ Use ! to abondon a modified buffer. |abandon| -+ {not when compiled with tiny or small features} -+ - vim:tw=78:ts=8:ft=help:norl: -*** ../vim-7.2.030/runtime/doc/usr_21.txt Sat Aug 9 19:36:53 2008 ---- runtime/doc/usr_21.txt Sun Nov 9 12:14:10 2008 -*************** -*** 1,4 **** -! *usr_21.txt* For Vim version 7.2. Last change: 2007 May 01 - - VIM USER MANUAL - by Bram Moolenaar - ---- 1,4 ---- -! *usr_21.txt* For Vim version 7.2. Last change: 2008 Nov 09 - - VIM USER MANUAL - by Bram Moolenaar - -*************** -*** 153,159 **** - to be lost. Each item can be remembered only once. - - -! GETTING BACK TO WHERE YOU WERE - - You are halfway editing a file and it's time to leave for holidays. You exit - Vim and go enjoy yourselves, forgetting all about your work. After a couple ---- 153,159 ---- - to be lost. Each item can be remembered only once. - - -! GETTING BACK TO WHERE YOU STOPPED VIM - - You are halfway editing a file and it's time to leave for holidays. You exit - Vim and go enjoy yourselves, forgetting all about your work. After a couple -*************** -*** 168,173 **** ---- 168,215 ---- - The |:marks| command is useful to find out where '0 to '9 will take you. - - -+ GETTING BACK TO SOME FILE -+ -+ If you want to go back to a file that you edited recently, but not when -+ exiting Vim, there is a slightly more complicated way. You can see a list of -+ files by typing the command: > -+ -+ :oldfiles -+ < 1: ~/.viminfo ~ -+ 2: ~/text/resume.txt ~ -+ 3: /tmp/draft ~ -+ -+ Now you would like to edit the second file, which is in the list preceded by -+ "2:". You type: > -+ -+ :e #<2 -+ -+ Instead of ":e" you can use any command that has a file name argument, the -+ "#<2" item works in the same place as "%" (current file name) and "#" -+ (alternate file name). So you can also split the window to edit the third -+ file: > -+ -+ :split #<3 -+ -+ That #<123 thing is a bit complicated when you just want to edit a file. -+ Fortunately there is a simpler way: > -+ -+ :browse oldfiles -+ < 1: ~/.viminfo ~ -+ 2: ~/text/resume.txt ~ -+ 3: /tmp/draft ~ -+ -- More -- -+ -+ You get the same list of files as with |:oldfiles|. If you want to edit -+ "resume.txt" first press "q" to stop the listing. You will get a prompt: -+ -+ Type number and <Enter> (empty cancels): ~ -+ -+ Type "2" and press <Enter> to edit the second file. -+ -+ More info at |:oldfiles|, |v:oldfiles| and |c_#<|. -+ -+ - MOVE INFO FROM ONE VIM TO ANOTHER - - You can use the ":wviminfo" and ":rviminfo" commands to save and restore the -*** ../vim-7.2.030/src/eval.c Thu Nov 6 11:04:50 2008 ---- src/eval.c Sun Nov 9 11:59:39 2008 -*************** -*** 348,353 **** ---- 348,354 ---- - {VV_NAME("mouse_col", VAR_NUMBER), 0}, - {VV_NAME("operator", VAR_STRING), VV_RO}, - {VV_NAME("searchforward", VAR_NUMBER), 0}, -+ {VV_NAME("oldfiles", VAR_LIST), 0}, - }; - - /* shorthand */ -*************** -*** 355,360 **** ---- 356,362 ---- - #define vv_nr vv_di.di_tv.vval.v_number - #define vv_float vv_di.di_tv.vval.v_float - #define vv_str vv_di.di_tv.vval.v_string -+ #define vv_list vv_di.di_tv.vval.v_list - #define vv_tv vv_di.di_tv - - /* -*************** -*** 426,432 **** - static long list_idx_of_item __ARGS((list_T *l, listitem_T *item)); - static void list_append __ARGS((list_T *l, listitem_T *item)); - static int list_append_tv __ARGS((list_T *l, typval_T *tv)); -- static int list_append_string __ARGS((list_T *l, char_u *str, int len)); - static int list_append_number __ARGS((list_T *l, varnumber_T n)); - static int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item)); - static int list_extend __ARGS((list_T *l1, list_T *l2, listitem_T *bef)); ---- 428,433 ---- -*************** -*** 845,852 **** - p = &vimvars[i]; - if (p->vv_di.di_tv.v_type == VAR_STRING) - { -! vim_free(p->vv_di.di_tv.vval.v_string); -! p->vv_di.di_tv.vval.v_string = NULL; - } - } - hash_clear(&vimvarht); ---- 846,858 ---- - p = &vimvars[i]; - if (p->vv_di.di_tv.v_type == VAR_STRING) - { -! vim_free(p->vv_string); -! p->vv_string = NULL; -! } -! else if (p->vv_di.di_tv.v_type == VAR_LIST) -! { -! list_unref(p->vv_list); -! p->vv_list = NULL; - } - } - hash_clear(&vimvarht); -*************** -*** 6057,6062 **** ---- 6063,6087 ---- - } - - /* -+ * Get list item "l[idx - 1]" as a string. Returns NULL for failure. -+ */ -+ char_u * -+ list_find_str(l, idx) -+ list_T *l; -+ long idx; -+ { -+ listitem_T *li; -+ -+ li = list_find(l, idx - 1); -+ if (li == NULL) -+ { -+ EMSGN(_(e_listidx), idx); -+ return NULL; -+ } -+ return get_tv_string(&li->li_tv); -+ } -+ -+ /* - * Locate "item" list "l" and return its index. - * Returns -1 when "item" is not in the list. - */ -*************** -*** 6147,6153 **** - * When "len" >= 0 use "str[len]". - * Returns FAIL when out of memory. - */ -! static int - list_append_string(l, str, len) - list_T *l; - char_u *str; ---- 6172,6178 ---- - * When "len" >= 0 use "str[len]". - * Returns FAIL when out of memory. - */ -! int - list_append_string(l, str, len) - list_T *l; - char_u *str; -*************** -*** 6507,6512 **** ---- 6532,6540 ---- - set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID); - } - -+ /* v: vars */ -+ set_ref_in_ht(&vimvarht, copyID); -+ - /* - * 2. Go through the list of dicts and free items without the copyID. - */ -*************** -*** 6597,6603 **** - { - case VAR_DICT: - dd = tv->vval.v_dict; -! if (dd->dv_copyID != copyID) - { - /* Didn't see this dict yet. */ - dd->dv_copyID = copyID; ---- 6625,6631 ---- - { - case VAR_DICT: - dd = tv->vval.v_dict; -! if (dd != NULL && dd->dv_copyID != copyID) - { - /* Didn't see this dict yet. */ - dd->dv_copyID = copyID; -*************** -*** 6607,6613 **** - - case VAR_LIST: - ll = tv->vval.v_list; -! if (ll->lv_copyID != copyID) - { - /* Didn't see this list yet. */ - ll->lv_copyID = copyID; ---- 6635,6641 ---- - - case VAR_LIST: - ll = tv->vval.v_list; -! if (ll != NULL && ll->lv_copyID != copyID) - { - /* Didn't see this list yet. */ - ll->lv_copyID = copyID; -*************** -*** 18106,18111 **** ---- 18134,18150 ---- - } - - /* -+ * Get List v: variable value. Caller must take care of reference count when -+ * needed. -+ */ -+ list_T * -+ get_vim_var_list(idx) -+ int idx; -+ { -+ return vimvars[idx].vv_list; -+ } -+ -+ /* - * Set v:count, v:count1 and v:prevcount. - */ - void -*************** -*** 18141,18146 **** ---- 18180,18199 ---- - } - - /* -+ * Set List v: variable to "val". -+ */ -+ void -+ set_vim_var_list(idx, val) -+ int idx; -+ list_T *val; -+ { -+ list_unref(vimvars[idx].vv_list); -+ vimvars[idx].vv_list = val; -+ if (val != NULL) -+ ++val->lv_refcount; -+ } -+ -+ /* - * Set v:register if needed. - */ - void -*************** -*** 21900,21905 **** ---- 21953,22014 ---- - } - } - -+ /* -+ * List v:oldfiles in a nice way. -+ */ -+ /*ARGSUSED*/ -+ void -+ ex_oldfiles(eap) -+ exarg_T *eap; -+ { -+ list_T *l = vimvars[VV_OLDFILES].vv_list; -+ listitem_T *li; -+ int nr = 0; -+ -+ if (l == NULL) -+ msg((char_u *)_("No old files")); -+ else -+ { -+ msg_start(); -+ msg_scroll = TRUE; -+ for (li = l->lv_first; li != NULL && !got_int; li = li->li_next) -+ { -+ msg_outnum((long)++nr); -+ MSG_PUTS(": "); -+ msg_outtrans(get_tv_string(&li->li_tv)); -+ msg_putchar('\n'); -+ out_flush(); /* output one line at a time */ -+ ui_breakcheck(); -+ } -+ /* Assume "got_int" was set to truncate the listing. */ -+ got_int = FALSE; -+ -+ #ifdef FEAT_BROWSE_CMD -+ if (cmdmod.browse) -+ { -+ quit_more = FALSE; -+ nr = prompt_for_number(FALSE); -+ msg_starthere(); -+ if (nr > 0) -+ { -+ char_u *p = list_find_str(get_vim_var_list(VV_OLDFILES), -+ (long)nr); -+ -+ if (p != NULL) -+ { -+ p = expand_env_save(p); -+ eap->arg = p; -+ eap->cmdidx = CMD_edit; -+ cmdmod.browse = FALSE; -+ do_exedit(eap, NULL); -+ vim_free(p); -+ } -+ } -+ } -+ #endif -+ } -+ } -+ - #endif /* FEAT_EVAL */ - - -*** ../vim-7.2.030/src/ex_cmds.c Sun Sep 14 21:40:26 2008 ---- src/ex_cmds.c Sun Sep 14 13:45:03 2008 -*************** -*** 24,30 **** - static void do_filter __ARGS((linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out)); - #ifdef FEAT_VIMINFO - static char_u *viminfo_filename __ARGS((char_u *)); -! static void do_viminfo __ARGS((FILE *fp_in, FILE *fp_out, int want_info, int want_marks, int force_read)); - static int viminfo_encoding __ARGS((vir_T *virp)); - static int read_viminfo_up_to_marks __ARGS((vir_T *virp, int forceit, int writing)); - #endif ---- 24,30 ---- - static void do_filter __ARGS((linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out)); - #ifdef FEAT_VIMINFO - static char_u *viminfo_filename __ARGS((char_u *)); -! static void do_viminfo __ARGS((FILE *fp_in, FILE *fp_out, int flags)); - static int viminfo_encoding __ARGS((vir_T *virp)); - static int read_viminfo_up_to_marks __ARGS((vir_T *virp, int forceit, int writing)); - #endif -*************** -*** 1676,1689 **** - - /* - * read_viminfo() -- Read the viminfo file. Registers etc. which are already -! * set are not over-written unless force is TRUE. -- webb - */ - int -! read_viminfo(file, want_info, want_marks, forceit) -! char_u *file; -! int want_info; -! int want_marks; -! int forceit; - { - FILE *fp; - char_u *fname; ---- 1676,1687 ---- - - /* - * read_viminfo() -- Read the viminfo file. Registers etc. which are already -! * set are not over-written unless "flags" includes VIF_FORCEIT. -- webb - */ - int -! read_viminfo(file, flags) -! char_u *file; /* file name or NULL to use default name */ -! int flags; /* VIF_WANT_INFO et al. */ - { - FILE *fp; - char_u *fname; -*************** -*** 1691,1697 **** - if (no_viminfo()) - return FAIL; - -! fname = viminfo_filename(file); /* may set to default if NULL */ - if (fname == NULL) - return FAIL; - fp = mch_fopen((char *)fname, READBIN); ---- 1689,1695 ---- - if (no_viminfo()) - return FAIL; - -! fname = viminfo_filename(file); /* get file name in allocated buffer */ - if (fname == NULL) - return FAIL; - fp = mch_fopen((char *)fname, READBIN); -*************** -*** 1701,1708 **** - verbose_enter(); - smsg((char_u *)_("Reading viminfo file \"%s\"%s%s%s"), - fname, -! want_info ? _(" info") : "", -! want_marks ? _(" marks") : "", - fp == NULL ? _(" FAILED") : ""); - verbose_leave(); - } ---- 1699,1707 ---- - verbose_enter(); - smsg((char_u *)_("Reading viminfo file \"%s\"%s%s%s"), - fname, -! (flags & VIF_WANT_INFO) ? _(" info") : "", -! (flags & VIF_WANT_MARKS) ? _(" marks") : "", -! (flags & VIF_GET_OLDFILES) ? _(" oldfiles") : "", - fp == NULL ? _(" FAILED") : ""); - verbose_leave(); - } -*************** -*** 1712,1721 **** - return FAIL; - - viminfo_errcnt = 0; -! do_viminfo(fp, NULL, want_info, want_marks, forceit); - - fclose(fp); -- - return OK; - } - ---- 1711,1719 ---- - return FAIL; - - viminfo_errcnt = 0; -! do_viminfo(fp, NULL, flags); - - fclose(fp); - return OK; - } - -*************** -*** 1968,1974 **** - } - - viminfo_errcnt = 0; -! do_viminfo(fp_in, fp_out, !forceit, !forceit, FALSE); - - fclose(fp_out); /* errors are ignored !? */ - if (fp_in != NULL) ---- 1966,1972 ---- - } - - viminfo_errcnt = 0; -! do_viminfo(fp_in, fp_out, forceit ? 0 : (VIF_WANT_INFO | VIF_WANT_MARKS)); - - fclose(fp_out); /* errors are ignored !? */ - if (fp_in != NULL) -*************** -*** 2041,2052 **** - * do_viminfo() -- Should only be called from read_viminfo() & write_viminfo(). - */ - static void -! do_viminfo(fp_in, fp_out, want_info, want_marks, force_read) - FILE *fp_in; - FILE *fp_out; -! int want_info; -! int want_marks; -! int force_read; - { - int count = 0; - int eof = FALSE; ---- 2039,2048 ---- - * do_viminfo() -- Should only be called from read_viminfo() & write_viminfo(). - */ - static void -! do_viminfo(fp_in, fp_out, flags) - FILE *fp_in; - FILE *fp_out; -! int flags; - { - int count = 0; - int eof = FALSE; -*************** -*** 2061,2068 **** - - if (fp_in != NULL) - { -! if (want_info) -! eof = read_viminfo_up_to_marks(&vir, force_read, fp_out != NULL); - else - /* Skip info, find start of marks */ - while (!(eof = viminfo_readline(&vir)) ---- 2057,2065 ---- - - if (fp_in != NULL) - { -! if (flags & VIF_WANT_INFO) -! eof = read_viminfo_up_to_marks(&vir, -! flags & VIF_FORCEIT, fp_out != NULL); - else - /* Skip info, find start of marks */ - while (!(eof = viminfo_readline(&vir)) -*************** -*** 2092,2099 **** - write_viminfo_bufferlist(fp_out); - count = write_viminfo_marks(fp_out); - } -! if (fp_in != NULL && want_marks) -! copy_viminfo_marks(&vir, fp_out, count, eof); - - vim_free(vir.vir_line); - #ifdef FEAT_MBYTE ---- 2089,2097 ---- - write_viminfo_bufferlist(fp_out); - count = write_viminfo_marks(fp_out); - } -! if (fp_in != NULL -! && (flags & (VIF_WANT_MARKS | VIF_GET_OLDFILES | VIF_FORCEIT))) -! copy_viminfo_marks(&vir, fp_out, count, eof, flags); - - vim_free(vir.vir_line); - #ifdef FEAT_MBYTE -*** ../vim-7.2.030/src/ex_cmds.h Thu Nov 6 20:47:00 2008 ---- src/ex_cmds.h Thu Sep 18 22:18:14 2008 -*************** -*** 653,658 **** ---- 653,660 ---- - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_open, "open", ex_open, - RANGE|EXTRA), -+ EX(CMD_oldfiles, "oldfiles", ex_oldfiles, -+ BANG|TRLBAR|SBOXOK|CMDWIN), - EX(CMD_omap, "omap", ex_map, - EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), - EX(CMD_omapclear, "omapclear", ex_mapclear, -*** ../vim-7.2.030/src/ex_docmd.c Thu Nov 6 17:16:06 2008 ---- src/ex_docmd.c Mon Nov 3 21:21:17 2008 -*************** -*** 364,369 **** ---- 364,370 ---- - # define ex_function ex_ni - # define ex_delfunction ex_ni - # define ex_return ex_ni -+ # define ex_oldfiles ex_ni - #endif - static char_u *arg_all __ARGS((void)); - #ifdef FEAT_SESSION -*************** -*** 1770,1776 **** - } - if (checkforcmd(&ea.cmd, "browse", 3)) - { -! #ifdef FEAT_BROWSE - cmdmod.browse = TRUE; - #endif - continue; ---- 1771,1777 ---- - } - if (checkforcmd(&ea.cmd, "browse", 3)) - { -! #ifdef FEAT_BROWSE_CMD - cmdmod.browse = TRUE; - #endif - continue; -*************** -*** 9508,9531 **** - break; - } - s = src + 1; - i = (int)getdigits(&s); - *usedlen = (int)(s - src); /* length of what we expand */ - -! buf = buflist_findnr(i); -! if (buf == NULL) - { -! *errormsg = (char_u *)_("E194: No alternate file name to substitute for '#'"); - return NULL; - } -! if (lnump != NULL) -! *lnump = ECMD_LAST; -! if (buf->b_fname == NULL) - { -! result = (char_u *)""; -! valid = 0; /* Must have ":p:h" to be valid */ - } -- else -- result = buf->b_fname; - break; - - #ifdef FEAT_SEARCHPATH ---- 9509,9558 ---- - break; - } - s = src + 1; -+ if (*s == '<') /* "#<99" uses v:oldfiles */ -+ ++s; - i = (int)getdigits(&s); - *usedlen = (int)(s - src); /* length of what we expand */ - -! if (src[1] == '<') - { -! if (*usedlen < 2) -! { -! /* Should we give an error message for #<text? */ -! *usedlen = 1; -! return NULL; -! } -! #ifdef FEAT_EVAL -! result = list_find_str(get_vim_var_list(VV_OLDFILES), -! (long)i); -! if (result == NULL) -! { -! *errormsg = (char_u *)""; -! return NULL; -! } -! #else -! *errormsg = (char_u *)_("E809: #< is not available without the +eval feature"); - return NULL; -+ #endif - } -! else - { -! buf = buflist_findnr(i); -! if (buf == NULL) -! { -! *errormsg = (char_u *)_("E194: No alternate file name to substitute for '#'"); -! return NULL; -! } -! if (lnump != NULL) -! *lnump = ECMD_LAST; -! if (buf->b_fname == NULL) -! { -! result = (char_u *)""; -! valid = 0; /* Must have ":p:h" to be valid */ -! } -! else -! result = buf->b_fname; - } - break; - - #ifdef FEAT_SEARCHPATH -*************** -*** 10700,10706 **** - p_viminfo = (char_u *)"'100"; - if (eap->cmdidx == CMD_rviminfo) - { -! if (read_viminfo(eap->arg, TRUE, TRUE, eap->forceit) == FAIL) - EMSG(_("E195: Cannot open viminfo file for reading")); - } - else ---- 10727,10734 ---- - p_viminfo = (char_u *)"'100"; - if (eap->cmdidx == CMD_rviminfo) - { -! if (read_viminfo(eap->arg, VIF_WANT_INFO | VIF_WANT_MARKS -! | (eap->forceit ? VIF_FORCEIT : 0)) == FAIL) - EMSG(_("E195: Cannot open viminfo file for reading")); - } - else -*** ../vim-7.2.030/src/feature.h Wed Aug 6 18:45:07 2008 ---- src/feature.h Fri Sep 19 19:14:22 2008 -*************** -*** 767,775 **** - - /* - * +browse ":browse" command. - */ -! #if defined(FEAT_NORMAL) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)) -! # define FEAT_BROWSE - #endif - - /* ---- 767,779 ---- - - /* - * +browse ":browse" command. -+ * or just the ":browse" command modifier - */ -! #if defined(FEAT_NORMAL) -! # define FEAT_BROWSE_CMD -! # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) -! # define FEAT_BROWSE -! # endif - #endif - - /* -*** ../vim-7.2.030/src/fileio.c Thu Sep 18 21:29:07 2008 ---- src/fileio.c Mon Nov 3 21:21:47 2008 -*************** -*** 2711,2717 **** - { - if (!curbuf->b_marks_read && get_viminfo_parameter('\'') > 0 - && curbuf->b_ffname != NULL) -! read_viminfo(NULL, FALSE, TRUE, FALSE); - - /* Always set b_marks_read; needed when 'viminfo' is changed to include - * the ' parameter after opening a buffer. */ ---- 2711,2717 ---- - { - if (!curbuf->b_marks_read && get_viminfo_parameter('\'') > 0 - && curbuf->b_ffname != NULL) -! read_viminfo(NULL, VIF_WANT_MARKS); - - /* Always set b_marks_read; needed when 'viminfo' is changed to include - * the ' parameter after opening a buffer. */ -*************** -*** 9108,9114 **** - set_context_in_autocmd(xp, arg, doautocmd) - expand_T *xp; - char_u *arg; -! int doautocmd; /* TRUE for :doautocmd, FALSE for :autocmd */ - { - char_u *p; - int group; ---- 9109,9115 ---- - set_context_in_autocmd(xp, arg, doautocmd) - expand_T *xp; - char_u *arg; -! int doautocmd; /* TRUE for :doauto*, FALSE for :autocmd */ - { - char_u *p; - int group; -*** ../vim-7.2.030/src/main.c Thu Sep 18 20:55:19 2008 ---- src/main.c Sun Sep 14 13:26:10 2008 -*************** -*** 645,655 **** - - #ifdef FEAT_VIMINFO - /* -! * Read in registers, history etc, but not marks, from the viminfo file - */ - if (*p_viminfo != NUL) - { -! read_viminfo(NULL, TRUE, FALSE, FALSE); - TIME_MSG("reading viminfo"); - } - #endif ---- 645,656 ---- - - #ifdef FEAT_VIMINFO - /* -! * Read in registers, history etc, but not marks, from the viminfo file. -! * This is where v:oldfiles gets filled. - */ - if (*p_viminfo != NUL) - { -! read_viminfo(NULL, VIF_WANT_INFO | VIF_GET_OLDFILES); - TIME_MSG("reading viminfo"); - } - #endif -*** ../vim-7.2.030/src/mark.c Sat Aug 9 19:37:29 2008 ---- src/mark.c Sun Sep 14 13:46:19 2008 -*************** -*** 1627,1641 **** - - /* - * Handle marks in the viminfo file: -! * fp_out == NULL read marks for current buffer only -! * fp_out != NULL copy marks for buffers not in buffer list - */ - void -! copy_viminfo_marks(virp, fp_out, count, eof) - vir_T *virp; - FILE *fp_out; - int count; - int eof; - { - char_u *line = virp->vir_line; - buf_T *buf; ---- 1627,1643 ---- - - /* - * Handle marks in the viminfo file: -! * fp_out != NULL: copy marks for buffers not in buffer list -! * fp_out == NULL && (flags & VIF_WANT_MARKS): read marks for curbuf only -! * fp_out == NULL && (flags & VIF_GET_OLDFILES | VIF_FORCEIT): fill v:oldfiles - */ - void -! copy_viminfo_marks(virp, fp_out, count, eof, flags) - vir_T *virp; - FILE *fp_out; - int count; - int eof; -+ int flags; - { - char_u *line = virp->vir_line; - buf_T *buf; -*************** -*** 1647,1656 **** ---- 1649,1671 ---- - char_u *p; - char_u *name_buf; - pos_T pos; -+ #ifdef FEAT_EVAL -+ list_T *list = NULL; -+ #endif - - if ((name_buf = alloc(LSIZE)) == NULL) - return; - *name_buf = NUL; -+ -+ #ifdef FEAT_EVAL -+ if (fp_out == NULL && (flags & (VIF_GET_OLDFILES | VIF_FORCEIT))) -+ { -+ list = list_alloc(); -+ if (list != NULL) -+ set_vim_var_list(VV_OLDFILES, list); -+ } -+ #endif -+ - num_marked_files = get_viminfo_parameter('\''); - while (!eof && (count < num_marked_files || fp_out == NULL)) - { -*************** -*** 1681,1686 **** ---- 1696,1706 ---- - p++; - *p = NUL; - -+ #ifdef FEAT_EVAL -+ if (list != NULL) -+ list_append_string(list, str, -1); -+ #endif -+ - /* - * If fp_out == NULL, load marks for current buffer. - * If fp_out != NULL, copy marks for buffers not in buflist. -*************** -*** 1688,1694 **** - load_marks = copy_marks_out = FALSE; - if (fp_out == NULL) - { -! if (curbuf->b_ffname != NULL) - { - if (*name_buf == NUL) /* only need to do this once */ - home_replace(NULL, curbuf->b_ffname, name_buf, LSIZE, TRUE); ---- 1708,1714 ---- - load_marks = copy_marks_out = FALSE; - if (fp_out == NULL) - { -! if ((flags & VIF_WANT_MARKS) && curbuf->b_ffname != NULL) - { - if (*name_buf == NUL) /* only need to do this once */ - home_replace(NULL, curbuf->b_ffname, name_buf, LSIZE, TRUE); -*** ../vim-7.2.030/src/misc1.c Wed Jun 25 00:24:52 2008 ---- src/misc1.c Sun Nov 9 11:47:00 2008 -*************** -*** 3245,3253 **** - - /* When using ":silent" assume that <CR> was entered. */ - if (mouse_used != NULL) -! MSG_PUTS(_("Type number or click with mouse (<Enter> cancels): ")); - else -! MSG_PUTS(_("Choice number (<Enter> cancels): ")); - - /* Set the state such that text can be selected/copied/pasted and we still - * get mouse events. */ ---- 3245,3253 ---- - - /* When using ":silent" assume that <CR> was entered. */ - if (mouse_used != NULL) -! MSG_PUTS(_("Type number and <Enter> or click with mouse (empty cancels): ")); - else -! MSG_PUTS(_("Type number and <Enter> (empty cancels): ")); - - /* Set the state such that text can be selected/copied/pasted and we still - * get mouse events. */ -*** ../vim-7.2.030/src/proto/eval.pro Sun Jan 6 20:06:30 2008 ---- src/proto/eval.pro Sun Nov 9 12:05:56 2008 -*************** -*** 17,23 **** - int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip)); - char_u *eval_to_string_skip __ARGS((char_u *arg, char_u **nextcmd, int skip)); - int skip_expr __ARGS((char_u **pp)); -! char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd, int dolist)); - char_u *eval_to_string_safe __ARGS((char_u *arg, char_u **nextcmd, int use_sandbox)); - int eval_to_number __ARGS((char_u *expr)); - list_T *eval_spell_expr __ARGS((char_u *badword, char_u *expr)); ---- 17,23 ---- - int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip)); - char_u *eval_to_string_skip __ARGS((char_u *arg, char_u **nextcmd, int skip)); - int skip_expr __ARGS((char_u **pp)); -! char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd, int convert)); - char_u *eval_to_string_safe __ARGS((char_u *arg, char_u **nextcmd, int use_sandbox)); - int eval_to_number __ARGS((char_u *expr)); - list_T *eval_spell_expr __ARGS((char_u *badword, char_u *expr)); -*************** -*** 46,52 **** ---- 46,54 ---- - void list_unref __ARGS((list_T *l)); - void list_free __ARGS((list_T *l, int recurse)); - dictitem_T *dict_lookup __ARGS((hashitem_T *hi)); -+ char_u *list_find_str __ARGS((list_T *l, long idx)); - int list_append_dict __ARGS((list_T *list, dict_T *dict)); -+ int list_append_string __ARGS((list_T *l, char_u *str, int len)); - int garbage_collect __ARGS((void)); - dict_T *dict_alloc __ARGS((void)); - int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str)); -*************** -*** 58,65 **** ---- 60,69 ---- - void set_vim_var_nr __ARGS((int idx, long val)); - long get_vim_var_nr __ARGS((int idx)); - char_u *get_vim_var_str __ARGS((int idx)); -+ list_T *get_vim_var_list __ARGS((int idx)); - void set_vcount __ARGS((long count, long count1)); - void set_vim_var_string __ARGS((int idx, char_u *val, int len)); -+ void set_vim_var_list __ARGS((int idx, list_T *val)); - void set_reg_var __ARGS((int c)); - char_u *v_exception __ARGS((char_u *oldval)); - char_u *v_throwpoint __ARGS((char_u *oldval)); -*************** -*** 94,99 **** ---- 98,104 ---- - void write_viminfo_varlist __ARGS((FILE *fp)); - int store_session_globals __ARGS((FILE *fd)); - void last_set_msg __ARGS((scid_T scriptID)); -+ void ex_oldfiles __ARGS((exarg_T *eap)); - int modify_fname __ARGS((char_u *src, int *usedlen, char_u **fnamep, char_u **bufp, int *fnamelen)); - char_u *do_string_sub __ARGS((char_u *str, char_u *pat, char_u *sub, char_u *flags)); - /* vim: set ft=c : */ -*** ../vim-7.2.030/src/proto/ex_cmds.pro Sat May 5 20:13:58 2007 ---- src/proto/ex_cmds.pro Sat Sep 13 17:27:21 2008 -*************** -*** 11,17 **** - char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp)); - void append_redir __ARGS((char_u *buf, char_u *opt, char_u *fname)); - int viminfo_error __ARGS((char *errnum, char *message, char_u *line)); -! int read_viminfo __ARGS((char_u *file, int want_info, int want_marks, int forceit)); - void write_viminfo __ARGS((char_u *file, int forceit)); - int viminfo_readline __ARGS((vir_T *virp)); - char_u *viminfo_readstring __ARGS((vir_T *virp, int off, int convert)); ---- 11,17 ---- - char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp)); - void append_redir __ARGS((char_u *buf, char_u *opt, char_u *fname)); - int viminfo_error __ARGS((char *errnum, char *message, char_u *line)); -! int read_viminfo __ARGS((char_u *file, int flags)); - void write_viminfo __ARGS((char_u *file, int forceit)); - int viminfo_readline __ARGS((vir_T *virp)); - char_u *viminfo_readstring __ARGS((vir_T *virp, int off, int convert)); -*** ../vim-7.2.030/src/proto/mark.pro Sat May 5 19:29:37 2007 ---- src/proto/mark.pro Sat Sep 13 18:06:20 2008 -*************** -*** 26,30 **** - void write_viminfo_filemarks __ARGS((FILE *fp)); - int removable __ARGS((char_u *name)); - int write_viminfo_marks __ARGS((FILE *fp_out)); -! void copy_viminfo_marks __ARGS((vir_T *virp, FILE *fp_out, int count, int eof)); - /* vim: set ft=c : */ ---- 26,30 ---- - void write_viminfo_filemarks __ARGS((FILE *fp)); - int removable __ARGS((char_u *name)); - int write_viminfo_marks __ARGS((FILE *fp_out)); -! void copy_viminfo_marks __ARGS((vir_T *virp, FILE *fp_out, int count, int eof, int flags)); - /* vim: set ft=c : */ -*** ../vim-7.2.030/src/option.c Thu Oct 2 22:48:01 2008 ---- src/option.c Fri Sep 26 22:20:20 2008 -*************** -*** 2593,2605 **** - #ifdef FEAT_VIMINFO - (char_u *)&p_viminfo, PV_NONE, - #if defined(MSDOS) || defined(MSWIN) || defined(OS2) -! {(char_u *)"", (char_u *)"'20,<50,s10,h,rA:,rB:"} - #else - # ifdef AMIGA - {(char_u *)"", -! (char_u *)"'20,<50,s10,h,rdf0:,rdf1:,rdf2:"} - # else -! {(char_u *)"", (char_u *)"'20,<50,s10,h"} - # endif - #endif - #else ---- 2593,2605 ---- - #ifdef FEAT_VIMINFO - (char_u *)&p_viminfo, PV_NONE, - #if defined(MSDOS) || defined(MSWIN) || defined(OS2) -! {(char_u *)"", (char_u *)"'100,<50,s10,h,rA:,rB:"} - #else - # ifdef AMIGA - {(char_u *)"", -! (char_u *)"'100,<50,s10,h,rdf0:,rdf1:,rdf2:"} - # else -! {(char_u *)"", (char_u *)"'100,<50,s10,h"} - # endif - #endif - #else -*** ../vim-7.2.030/src/structs.h Thu Jul 31 22:04:27 2008 ---- src/structs.h Fri Sep 19 19:15:18 2008 -*************** -*** 459,465 **** - typedef struct - { - int hide; /* TRUE when ":hide" was used */ -! # ifdef FEAT_BROWSE - int browse; /* TRUE to invoke file dialog */ - # endif - # ifdef FEAT_WINDOWS ---- 459,465 ---- - typedef struct - { - int hide; /* TRUE when ":hide" was used */ -! # ifdef FEAT_BROWSE_CMD - int browse; /* TRUE to invoke file dialog */ - # endif - # ifdef FEAT_WINDOWS -*** ../vim-7.2.030/src/vim.h Sat Aug 9 19:37:40 2008 ---- src/vim.h Sat Sep 13 17:41:24 2008 -*************** -*** 1728,1734 **** - #define VV_MOUSE_COL 51 - #define VV_OP 52 - #define VV_SEARCHFORWARD 53 -! #define VV_LEN 54 /* number of v: vars */ - - #ifdef FEAT_CLIPBOARD - ---- 1728,1735 ---- - #define VV_MOUSE_COL 51 - #define VV_OP 52 - #define VV_SEARCHFORWARD 53 -! #define VV_OLDFILES 54 -! #define VV_LEN 55 /* number of v: vars */ - - #ifdef FEAT_CLIPBOARD - -*************** -*** 2054,2057 **** ---- 2055,2064 ---- - #define DOSO_VIMRC 1 /* loading vimrc file */ - #define DOSO_GVIMRC 2 /* loading gvimrc file */ - -+ /* flags for read_viminfo() and children */ -+ #define VIF_WANT_INFO 1 /* load non-mark info */ -+ #define VIF_WANT_MARKS 2 /* load file marks */ -+ #define VIF_FORCEIT 4 /* overwrite info already read */ -+ #define VIF_GET_OLDFILES 8 /* load v:oldfiles */ -+ - #endif /* VIM__H */ -*** ../vim-7.2.030/src/version.c Thu Nov 6 20:47:00 2008 ---- src/version.c Sun Nov 9 13:39:19 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 31, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -217. Your sex life has drastically improved...so what if it's only cyber-sex! - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.032 b/vi/vim-7.2/7.2.032 deleted file mode 100644 index f4a0d9b..0000000 --- a/vi/vim-7.2/7.2.032 +++ /dev/null @@ -1,55 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.032 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.032 (after 7.2.031) -Problem: Can't build with EXITFREE defined. (Dominique Pelle) -Solution: Change vv_string to vv_str. -Files: src/eval.c - - -*** ../vim-7.2.031/src/eval.c Sun Nov 9 13:43:25 2008 ---- src/eval.c Sun Nov 9 17:16:06 2008 -*************** -*** 846,853 **** - p = &vimvars[i]; - if (p->vv_di.di_tv.v_type == VAR_STRING) - { -! vim_free(p->vv_string); -! p->vv_string = NULL; - } - else if (p->vv_di.di_tv.v_type == VAR_LIST) - { ---- 846,853 ---- - p = &vimvars[i]; - if (p->vv_di.di_tv.v_type == VAR_STRING) - { -! vim_free(p->vv_str); -! p->vv_str = NULL; - } - else if (p->vv_di.di_tv.v_type == VAR_LIST) - { -*** ../vim-7.2.031/src/version.c Sun Nov 9 13:43:25 2008 ---- src/version.c Sun Nov 9 17:21:00 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 32, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -218. Your spouse hands you a gift wrapped magnet with your PC's name - on it and you accuse him or her of genocide. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.033 b/vi/vim-7.2/7.2.033 deleted file mode 100644 index d96a94b..0000000 --- a/vi/vim-7.2/7.2.033 +++ /dev/null @@ -1,78 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.033 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.033 -Problem: When detecting a little endian BOM "ucs-2le" is used, but the text - might be "utf-16le". -Solution: Default to "utf-16le", it also works for "ucs-2le". (Jia Yanwei) -Files: src/fileio.c, src/testdir/test42.ok - - -*** ../vim-7.2.032/src/fileio.c Sun Nov 9 13:43:25 2008 ---- src/fileio.c Mon Nov 3 21:21:47 2008 -*************** -*** 5550,5558 **** - name = "ucs-4le"; /* FF FE 00 00 */ - len = 4; - } -! else if (flags == FIO_ALL || flags == (FIO_UCS2 | FIO_ENDIAN_L)) - name = "ucs-2le"; /* FF FE */ -! else if (flags == (FIO_UTF16 | FIO_ENDIAN_L)) - name = "utf-16le"; /* FF FE */ - } - else if (p[0] == 0xfe && p[1] == 0xff ---- 5550,5559 ---- - name = "ucs-4le"; /* FF FE 00 00 */ - len = 4; - } -! else if (flags == (FIO_UCS2 | FIO_ENDIAN_L)) - name = "ucs-2le"; /* FF FE */ -! else if (flags == FIO_ALL || flags == (FIO_UTF16 | FIO_ENDIAN_L)) -! /* utf-16le is preferred, it also works for ucs-2le text */ - name = "utf-16le"; /* FF FE */ - } - else if (p[0] == 0xfe && p[1] == 0xff -*** ../vim-7.2.032/src/testdir/test42.ok Sat Mar 1 13:49:21 2008 ---- src/testdir/test42.ok Sat Nov 1 17:09:29 2008 -*************** -*** 20,26 **** - ucs-2 - - -! fileencoding=ucs-2le - bomb - ucs-2le - ---- 20,26 ---- - ucs-2 - - -! fileencoding=utf-16le - bomb - ucs-2le - -*** ../vim-7.2.032/src/version.c Sun Nov 9 17:21:10 2008 ---- src/version.c Tue Nov 11 21:54:14 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 33, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -234. You started college as a chemistry major, and walk out four years - later as an Internet provider. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.034 b/vi/vim-7.2/7.2.034 deleted file mode 100644 index 957fb35..0000000 --- a/vi/vim-7.2/7.2.034 +++ /dev/null @@ -1,81 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.034 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.034 -Problem: Memory leak in spell info when deleting buffer. -Solution: Free the memory. (Dominique Pelle) -Files: src/buffer.c - - -*** ../vim-7.2.033/src/buffer.c Mon Sep 1 17:32:40 2008 ---- src/buffer.c Wed Nov 12 11:21:49 2008 -*************** -*** 647,652 **** ---- 647,655 ---- - vim_free(buf->b_start_fenc); - buf->b_start_fenc = NULL; - #endif -+ #ifdef FEAT_SPELL -+ ga_clear(&buf->b_langp); -+ #endif - } - - /* -*************** -*** 1237,1243 **** - * "buf" if one exists */ - if ((swb_flags & SWB_USEOPEN) && buf_jump_open_win(buf)) - return OK; -! /* If 'switchbuf' contians "usetab": jump to first window in any tab - * page containing "buf" if one exists */ - if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf)) - return OK; ---- 1240,1246 ---- - * "buf" if one exists */ - if ((swb_flags & SWB_USEOPEN) && buf_jump_open_win(buf)) - return OK; -! /* If 'switchbuf' contains "usetab": jump to first window in any tab - * page containing "buf" if one exists */ - if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf)) - return OK; -*************** -*** 3964,3970 **** - width = vim_strsize(out); - if (maxwidth > 0 && width > maxwidth) - { -! /* Result is too long, must trunctate somewhere. */ - l = 0; - if (itemcnt == 0) - s = out; ---- 3967,3973 ---- - width = vim_strsize(out); - if (maxwidth > 0 && width > maxwidth) - { -! /* Result is too long, must truncate somewhere. */ - l = 0; - if (itemcnt == 0) - s = out; -*** ../vim-7.2.033/src/version.c Tue Nov 11 21:55:29 2008 ---- src/version.c Wed Nov 12 12:51:21 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 34, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -236. You start saving URL's in your digital watch. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.035 b/vi/vim-7.2/7.2.035 deleted file mode 100644 index e8c7391..0000000 --- a/vi/vim-7.2/7.2.035 +++ /dev/null @@ -1,128 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.035 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.035 -Problem: Mismatches between alloc/malloc, free/vim_free, - realloc/vim_realloc. -Solution: Use the right function. (Dominique Pelle) -Files: src/gui_x11.c, src/mbyte.c, src/misc2.c, src/os_unix.c - - -*** ../vim-7.2.034/src/gui_x11.c Fri Jun 20 11:59:25 2008 ---- src/gui_x11.c Wed Nov 12 11:47:03 2008 -*************** -*** 2450,2456 **** - *colorPtr = colortable[closest]; - } - -! free(colortable); - return OK; - } - ---- 2450,2456 ---- - *colorPtr = colortable[closest]; - } - -! vim_free(colortable); - return OK; - } - -*** ../vim-7.2.034/src/mbyte.c Sat Sep 6 16:44:06 2008 ---- src/mbyte.c Wed Nov 12 11:24:14 2008 -*************** -*** 5384,5390 **** - draw_feedback = (char *)alloc(draw_data->chg_first - + text->length); - else -! draw_feedback = realloc(draw_feedback, - draw_data->chg_first + text->length); - if (draw_feedback != NULL) - { ---- 5384,5390 ---- - draw_feedback = (char *)alloc(draw_data->chg_first - + text->length); - else -! draw_feedback = vim_realloc(draw_feedback, - draw_data->chg_first + text->length); - if (draw_feedback != NULL) - { -*** ../vim-7.2.034/src/misc2.c Sat Sep 6 16:44:06 2008 ---- src/misc2.c Wed Nov 12 11:42:51 2008 -*************** -*** 873,879 **** - /* 3. check for available memory: call mch_avail_mem() */ - if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing) - { -! vim_free((char *)p); /* System is low... no go! */ - p = NULL; - } - else ---- 873,879 ---- - /* 3. check for available memory: call mch_avail_mem() */ - if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing) - { -! free((char *)p); /* System is low... no go! */ - p = NULL; - } - else -*** ../vim-7.2.034/src/os_unix.c Wed Aug 6 18:45:01 2008 ---- src/os_unix.c Wed Nov 12 11:55:33 2008 -*************** -*** 2905,2911 **** - * Ignore any errors. - */ - #if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK) -! signal_stack = malloc(SIGSTKSZ); - init_signal_stack(); - #endif - } ---- 2905,2911 ---- - * Ignore any errors. - */ - #if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK) -! signal_stack = (char *)alloc(SIGSTKSZ); - init_signal_stack(); - #endif - } -*************** -*** 6814,6820 **** - if (xsmp_icefd != -1) - { - SmcCloseConnection(xsmp.smcconn, 0, NULL); -! vim_free(xsmp.clientid); - xsmp.clientid = NULL; - xsmp_icefd = -1; - } ---- 6815,6822 ---- - if (xsmp_icefd != -1) - { - SmcCloseConnection(xsmp.smcconn, 0, NULL); -! if (xsmp.clientid != NULL) -! free(xsmp.clientid); - xsmp.clientid = NULL; - xsmp_icefd = -1; - } -*** ../vim-7.2.034/src/version.c Wed Nov 12 12:51:38 2008 ---- src/version.c Wed Nov 12 13:05:40 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 35, - /**/ - --- -You can tune a file system, but you can't tuna fish - -- man tunefs - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.036 b/vi/vim-7.2/7.2.036 deleted file mode 100644 index 4db2a26..0000000 --- a/vi/vim-7.2/7.2.036 +++ /dev/null @@ -1,276 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.036 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.036 (extra) -Problem: Mismatches between alloc/malloc, free/vim_free, - realloc/vim_realloc. -Solution: Use the right function. (Dominique Pelle) -Files: src/gui_riscos.c, src/gui_w48.c, src/mbyte.c, src/os_vms.c, - src/os_w32exe.c, src/os_win16.c - - -*** ../vim-7.2.035/src/gui_riscos.c Thu May 10 19:33:26 2007 ---- src/gui_riscos.c Wed Nov 12 11:47:54 2008 -*************** -*** 695,701 **** - gui_mch_set_shellsize(width, height, min_width, min_height, base_width, base_height, direction) - int width; /* In OS units */ - int height; -! int min_width; /* Smallest permissable window size (ignored) */ - int min_height; - int base_width; /* Space for scroll bars, etc */ - int base_height; ---- 695,701 ---- - gui_mch_set_shellsize(width, height, min_width, min_height, base_width, base_height, direction) - int width; /* In OS units */ - int height; -! int min_width; /* Smallest permissible window size (ignored) */ - int min_height; - int base_width; /* Space for scroll bars, etc */ - int base_height; -*************** -*** 863,869 **** - if (strncmp(file, "ZapFont\015", 8) == 0) - return file; /* Loaded OK! */ - -! free(file); - return NULL; /* Not a valid font file */ - } - ---- 863,869 ---- - if (strncmp(file, "ZapFont\015", 8) == 0) - return file; /* Loaded OK! */ - -! vim_free(file); - return NULL; /* Not a valid font file */ - } - -*** ../vim-7.2.035/src/gui_w48.c Thu Jul 24 20:50:23 2008 ---- src/gui_w48.c Wed Nov 12 11:37:41 2008 -*************** -*** 3335,3341 **** - - /* - * Convert the string s to the proper format for a filter string by replacing -! * the \t and \n delimeters with \0. - * Returns the converted string in allocated memory. - * - * Keep in sync with convert_filterW() above! ---- 3335,3341 ---- - - /* - * Convert the string s to the proper format for a filter string by replacing -! * the \t and \n delimiters with \0. - * Returns the converted string in allocated memory. - * - * Keep in sync with convert_filterW() above! -*************** -*** 3674,3680 **** - * Use "prog" as the name of the program and "cmdline" as the arguments. - * Copy the arguments to allocated memory. - * Return the number of arguments (including program name). -! * Return pointers to the arguments in "argvp". - * Return pointer to buffer in "tofree". - * Returns zero when out of memory. - */ ---- 3674,3681 ---- - * Use "prog" as the name of the program and "cmdline" as the arguments. - * Copy the arguments to allocated memory. - * Return the number of arguments (including program name). -! * Return pointers to the arguments in "argvp". Memory is allocated with -! * malloc(), use free() instead of vim_free(). - * Return pointer to buffer in "tofree". - * Returns zero when out of memory. - */ -*************** -*** 3692,3697 **** ---- 3693,3700 ---- - char **argv = NULL; - int round; - -+ *tofree = NULL; -+ - #ifdef FEAT_MBYTE - /* Try using the Unicode version first, it takes care of conversion when - * 'encoding' is changed. */ -*************** -*** 3802,3816 **** - argv = (char **)malloc((argc + 1) * sizeof(char *)); - if (argv == NULL ) - { -! vim_free(newcmdline); - return 0; /* malloc error */ - } - pnew = newcmdline; - } - } - - done: -- - argv[argc] = NULL; /* NULL-terminated list */ - *argvp = argv; - return argc; ---- 3805,3819 ---- - argv = (char **)malloc((argc + 1) * sizeof(char *)); - if (argv == NULL ) - { -! free(newcmdline); - return 0; /* malloc error */ - } - pnew = newcmdline; -+ *tofree = newcmdline; - } - } - - done: - argv[argc] = NULL; /* NULL-terminated list */ - *argvp = argv; - return argc; -*** ../vim-7.2.035/src/os_vms.c Wed Aug 6 18:38:52 2008 ---- src/os_vms.c Wed Nov 12 11:42:12 2008 -*************** -*** 228,234 **** - else if ((sbuf = getenv((char *)lognam))) - { - lengte = strlen(sbuf) + 1; -! cp = (char_u *)malloc((size_t)lengte); - if (cp) - strcpy((char *)cp, sbuf); - return cp; ---- 228,234 ---- - else if ((sbuf = getenv((char *)lognam))) - { - lengte = strlen(sbuf) + 1; -! cp = (char_u *)alloc((size_t)lengte); - if (cp) - strcpy((char *)cp, sbuf); - return cp; -*************** -*** 381,387 **** - if (--vms_match_free == 0) { - /* add more space to store matches */ - vms_match_alloced += EXPL_ALLOC_INC; -! vms_fmatch = (char_u **)realloc(vms_fmatch, - sizeof(char **) * vms_match_alloced); - if (!vms_fmatch) - return 0; ---- 381,387 ---- - if (--vms_match_free == 0) { - /* add more space to store matches */ - vms_match_alloced += EXPL_ALLOC_INC; -! vms_fmatch = (char_u **)vim_realloc(vms_fmatch, - sizeof(char **) * vms_match_alloced); - if (!vms_fmatch) - return 0; -*************** -*** 460,466 **** - if (--files_free < 1) - { - files_alloced += EXPL_ALLOC_INC; -! *file = (char_u **)realloc(*file, - sizeof(char_u **) * files_alloced); - if (*file == NULL) - { ---- 460,466 ---- - if (--files_free < 1) - { - files_alloced += EXPL_ALLOC_INC; -! *file = (char_u **)vim_realloc(*file, - sizeof(char_u **) * files_alloced); - if (*file == NULL) - { -*************** -*** 614,627 **** - { - buflen = len + 128; - if (buf) -! buf = (char *)realloc(buf, buflen); - else -! buf = (char *)calloc(buflen, sizeof(char)); - } - - #ifdef DEBUG - char *tmpbuf = NULL; -! tmpbuf = (char *)calloc(buflen, sizeof(char)); - strcpy(tmpbuf, instring); - #endif - ---- 614,627 ---- - { - buflen = len + 128; - if (buf) -! buf = (char *)vim_realloc(buf, buflen); - else -! buf = (char *)alloc(buflen * sizeof(char)); - } - - #ifdef DEBUG - char *tmpbuf = NULL; -! tmpbuf = (char *)alloc(buflen * sizeof(char)); - strcpy(tmpbuf, instring); - #endif - -*** ../vim-7.2.035/src/os_w32exe.c Fri Jul 1 00:06:20 2005 ---- src/os_w32exe.c Wed Nov 12 11:45:43 2008 -*************** -*** 129,135 **** - errout: - #endif - free(argv); -! free(tofree); - #ifdef FEAT_MBYTE - free_cmd_argsW(); - #endif ---- 129,136 ---- - errout: - #endif - free(argv); -! if (tofree != NULL) -! free(tofree); - #ifdef FEAT_MBYTE - free_cmd_argsW(); - #endif -*** ../vim-7.2.035/src/os_win16.c Wed Jun 25 00:49:34 2008 ---- src/os_win16.c Wed Nov 12 11:45:53 2008 -*************** -*** 121,127 **** - pmain(argc, argv); - - free(argv); -! free(tofree); - - return 0; - } ---- 121,128 ---- - pmain(argc, argv); - - free(argv); -! if (tofree != NULL) -! free(tofree); - - return 0; - } -*** ../vim-7.2.035/src/version.c Wed Nov 12 13:07:48 2008 ---- src/version.c Wed Nov 12 13:28:51 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 36, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -239. You think "surfing" is something you do on dry land. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.037 b/vi/vim-7.2/7.2.037 deleted file mode 100644 index 20a4398..0000000 --- a/vi/vim-7.2/7.2.037 +++ /dev/null @@ -1,53 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.037 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.037 -Problem: Double free with GTK 1 and compiled with EXITFREE. -Solution: Don't close display. (Dominique Pelle) -Files: src/os_unix.c - - -*** ../vim-7.2.036/src/os_unix.c Wed Nov 12 13:07:48 2008 ---- src/os_unix.c Wed Nov 12 11:55:33 2008 -*************** -*** 2936,2942 **** - } - # endif - # endif -! # ifdef FEAT_X11 - if (x11_display != NULL - # ifdef FEAT_XCLIPBOARD - && x11_display != xterm_dpy ---- 2936,2943 ---- - } - # endif - # endif -! /* Don't close the display for GTK 1, it is done in exit(). */ -! # if defined(FEAT_X11) && (!defined(FEAT_GUI_GTK) || defined(HAVE_GTK2)) - if (x11_display != NULL - # ifdef FEAT_XCLIPBOARD - && x11_display != xterm_dpy -*** ../vim-7.2.036/src/version.c Wed Nov 12 13:35:31 2008 ---- src/version.c Wed Nov 12 14:08:56 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 37, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -240. You think Webster's Dictionary is a directory of WEB sites. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.038 b/vi/vim-7.2/7.2.038 deleted file mode 100644 index 449821e..0000000 --- a/vi/vim-7.2/7.2.038 +++ /dev/null @@ -1,86 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.038 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.038 -Problem: Overlapping arguments to memcpy(). -Solution: Use mch_memmove(). (Dominique Pelle) -Files: src/if_xcmdsrv.c - - -*** ../vim-7.2.037/src/if_xcmdsrv.c Wed Aug 6 18:38:13 2008 ---- src/if_xcmdsrv.c Wed Nov 12 12:09:01 2008 -*************** -*** 736,742 **** - + serverReply.ga_len; - e.id = w; - ga_init2(&e.strings, 1, 100); -! memcpy(p, &e, sizeof(e)); - serverReply.ga_len++; - } - } ---- 736,742 ---- - + serverReply.ga_len; - e.id = w; - ga_init2(&e.strings, 1, 100); -! mch_memmove(p, &e, sizeof(e)); - serverReply.ga_len++; - } - } -*************** -*** 1018,1024 **** - p++; - count = numItems - (p - regProp); - if (count > 0) -! memcpy(entry, p, count); - XChangeProperty(dpy, RootWindow(dpy, 0), registryProperty, XA_STRING, - 8, PropModeReplace, regProp, - (int)(numItems - (p - entry))); ---- 1018,1024 ---- - p++; - count = numItems - (p - regProp); - if (count > 0) -! mch_memmove(entry, p, count); - XChangeProperty(dpy, RootWindow(dpy, 0), registryProperty, XA_STRING, - 8, PropModeReplace, regProp, - (int)(numItems - (p - entry))); -*************** -*** 1072,1078 **** - p++; - lastHalf = numItems - (p - regProp); - if (lastHalf > 0) -! memcpy(entry, p, lastHalf); - numItems = (entry - regProp) + lastHalf; - p = entry; - continue; ---- 1072,1078 ---- - p++; - lastHalf = numItems - (p - regProp); - if (lastHalf > 0) -! mch_memmove(entry, p, lastHalf); - numItems = (entry - regProp) + lastHalf; - p = entry; - continue; -*** ../vim-7.2.037/src/version.c Wed Nov 12 14:09:38 2008 ---- src/version.c Wed Nov 12 14:51:00 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 38, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -241. You try to look for Net Search even when you're in File Manager. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.039 b/vi/vim-7.2/7.2.039 deleted file mode 100644 index f9cb18e..0000000 --- a/vi/vim-7.2/7.2.039 +++ /dev/null @@ -1,46 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.039 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.039 -Problem: Accessing freed memory on exit when EXITFREE is defined. -Solution: Call hash_init() on the v: hash table. -Files: src/eval.c - - -*** ../vim-7.2.038/src/eval.c Sun Nov 9 17:21:10 2008 ---- src/eval.c Wed Nov 12 12:15:14 2008 -*************** -*** 856,861 **** ---- 856,862 ---- - } - } - hash_clear(&vimvarht); -+ hash_init(&vimvarht); /* garbage_collect() will access it */ - hash_clear(&compat_hashtab); - - /* script-local variables */ -*** ../vim-7.2.038/src/version.c Wed Nov 12 14:52:11 2008 ---- src/version.c Wed Nov 12 15:09:39 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 39, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -242. You turn down a better-paying job because it doesn't come with - a free e-mail account. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.040 b/vi/vim-7.2/7.2.040 deleted file mode 100644 index 76ea73a..0000000 --- a/vi/vim-7.2/7.2.040 +++ /dev/null @@ -1,64 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.040 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.040 -Problem: When using ":e ++ff=dos fname" and the file contains a NL without - a CR before it and 'ffs' contains "unix" then the fileformat - becomes unix. -Solution: Ignore 'ffs' when using the ++ff argument. (Ben Schmidt) - Also remove unreachable code. -Files: src/fileio.c - - -*** ../vim-7.2.039/src/fileio.c Tue Nov 11 21:55:29 2008 ---- src/fileio.c Wed Nov 12 13:19:42 2008 -*************** -*** 932,938 **** ---- 932,941 ---- - else - { - if (eap != NULL && eap->force_ff != 0) -+ { - fileformat = get_fileformat_force(curbuf, eap); -+ try_unix = try_dos = try_mac = FALSE; -+ } - else if (curbuf->b_p_bin) - fileformat = EOL_UNIX; /* binary: use Unix format */ - else if (*p_ffs == NUL) -*************** -*** 2341,2351 **** - STRCAT(IObuff, _("[CR missing]")); - c = TRUE; - } -- if (ff_error == EOL_MAC) -- { -- STRCAT(IObuff, _("[NL found]")); -- c = TRUE; -- } - if (split) - { - STRCAT(IObuff, _("[long lines split]")); ---- 2344,2349 ---- -*** ../vim-7.2.039/src/version.c Wed Nov 12 15:28:37 2008 ---- src/version.c Wed Nov 12 16:03:44 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 40, - /**/ - --- -If you're sending someone Styrofoam, what do you pack it in? - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.041 b/vi/vim-7.2/7.2.041 deleted file mode 100644 index b562206..0000000 --- a/vi/vim-7.2/7.2.041 +++ /dev/null @@ -1,729 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.041 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.041 -Problem: In diff mode, when using two tabs, each with two diffed buffers, - editing a buffer of the other tab messes up the diff. (Matt - Mzyzik) -Solution: Only copy options from a window where the buffer was edited that - doesn't have 'diff' set or is for the current tab page. - Also fix that window options for a buffer are stored with the - wrong window. -Files: src/buffer.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, - src/ex_getln.c, src/if_sniff.c, src/main.c, src/netbeans.c, - src/normal.c, src/popupmnu.c, src/proto/buffer.pro, - src/proto/ex_cmds.pro src/quickfix.c, src/window.c - - -*** ../vim-7.2.040/src/buffer.c Wed Nov 12 12:51:38 2008 ---- src/buffer.c Wed Nov 12 17:45:01 2008 -*************** -*** 33,39 **** - static char_u *fname_match __ARGS((regprog_T *prog, char_u *name)); - #endif - static void buflist_setfpos __ARGS((buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options)); -! static wininfo_T *find_wininfo __ARGS((buf_T *buf)); - #ifdef UNIX - static buf_T *buflist_findname_stat __ARGS((char_u *ffname, struct stat *st)); - static int otherfile_buf __ARGS((buf_T *buf, char_u *ffname, struct stat *stp)); ---- 33,39 ---- - static char_u *fname_match __ARGS((regprog_T *prog, char_u *name)); - #endif - static void buflist_setfpos __ARGS((buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options)); -! static wininfo_T *find_wininfo __ARGS((buf_T *buf, int skip_diff_buffer)); - #ifdef UNIX - static buf_T *buflist_findname_stat __ARGS((char_u *ffname, struct stat *st)); - static int otherfile_buf __ARGS((buf_T *buf, char_u *ffname, struct stat *stp)); -*************** -*** 1093,1099 **** - #endif - setpcmark(); - retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, -! forceit ? ECMD_FORCEIT : 0); - - /* - * do_ecmd() may create a new buffer, then we have to delete ---- 1093,1099 ---- - #endif - setpcmark(); - retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, -! forceit ? ECMD_FORCEIT : 0, curwin); - - /* - * do_ecmd() may create a new buffer, then we have to delete -*************** -*** 1316,1322 **** - setpcmark(); - if (!cmdmod.keepalt) - curwin->w_alt_fnum = curbuf->b_fnum; /* remember alternate file */ -! buflist_altfpos(); /* remember curpos */ - - #ifdef FEAT_VISUAL - /* Don't restart Select mode after switching to another buffer. */ ---- 1316,1322 ---- - setpcmark(); - if (!cmdmod.keepalt) - curwin->w_alt_fnum = curbuf->b_fnum; /* remember alternate file */ -! buflist_altfpos(curwin); /* remember curpos */ - - #ifdef FEAT_VISUAL - /* Don't restart Select mode after switching to another buffer. */ -*************** -*** 2404,2425 **** - return; - } - - /* - * Find info for the current window in buffer "buf". - * If not found, return the info for the most recently used window. - * Returns NULL when there isn't any info. - */ - static wininfo_T * -! find_wininfo(buf) - buf_T *buf; - { - wininfo_T *wip; - - for (wip = buf->b_wininfo; wip != NULL; wip = wip->wi_next) -! if (wip->wi_win == curwin) - break; -! if (wip == NULL) /* if no fpos for curwin, use the first in the list */ -! wip = buf->b_wininfo; - return wip; - } - ---- 2404,2473 ---- - return; - } - -+ #ifdef FEAT_DIFF -+ static int wininfo_other_tab_diff __ARGS((wininfo_T *wip)); -+ -+ /* -+ * Return TRUE when "wip" has 'diff' set and the diff is only for another tab -+ * page. That's because a diff is local to a tab page. -+ */ -+ static int -+ wininfo_other_tab_diff(wip) -+ wininfo_T *wip; -+ { -+ win_T *wp; -+ -+ if (wip->wi_opt.wo_diff) -+ { -+ for (wp = firstwin; wp != NULL; wp = wp->w_next) -+ /* return FALSE when it's a window in the current tab page, thus -+ * the buffer was in diff mode here */ -+ if (wip->wi_win == wp) -+ return FALSE; -+ return TRUE; -+ } -+ return FALSE; -+ } -+ #endif -+ - /* - * Find info for the current window in buffer "buf". - * If not found, return the info for the most recently used window. -+ * When "skip_diff_buffer" is TRUE avoid windows with 'diff' set that is in -+ * another tab page. - * Returns NULL when there isn't any info. - */ -+ /*ARGSUSED*/ - static wininfo_T * -! find_wininfo(buf, skip_diff_buffer) - buf_T *buf; -+ int skip_diff_buffer; - { - wininfo_T *wip; - - for (wip = buf->b_wininfo; wip != NULL; wip = wip->wi_next) -! if (wip->wi_win == curwin -! #ifdef FEAT_DIFF -! && (!skip_diff_buffer || !wininfo_other_tab_diff(wip)) -! #endif -! ) - break; -! -! /* If no wininfo for curwin, use the first in the list (that doesn't have -! * 'diff' set and is in another tab page). */ -! if (wip == NULL) -! { -! #ifdef FEAT_DIFF -! if (skip_diff_buffer) -! { -! for (wip = buf->b_wininfo; wip != NULL; wip = wip->wi_next) -! if (!wininfo_other_tab_diff(wip)) -! break; -! } -! else -! #endif -! wip = buf->b_wininfo; -! } - return wip; - } - -*************** -*** 2440,2446 **** - clearFolding(curwin); - #endif - -! wip = find_wininfo(buf); - if (wip != NULL && wip->wi_optset) - { - copy_winopt(&wip->wi_opt, &curwin->w_onebuf_opt); ---- 2488,2494 ---- - clearFolding(curwin); - #endif - -! wip = find_wininfo(buf, TRUE); - if (wip != NULL && wip->wi_optset) - { - copy_winopt(&wip->wi_opt, &curwin->w_onebuf_opt); -*************** -*** 2472,2478 **** - wininfo_T *wip; - static pos_T no_position = {1, 0}; - -! wip = find_wininfo(buf); - if (wip != NULL) - return &(wip->wi_fpos); - else ---- 2520,2526 ---- - wininfo_T *wip; - static pos_T no_position = {1, 0}; - -! wip = find_wininfo(buf, FALSE); - if (wip != NULL) - return &(wip->wi_fpos); - else -*************** -*** 2793,2806 **** - #endif - - /* -! * Set alternate cursor position for current window. - * Also save the local window option values. - */ - void -! buflist_altfpos() - { -! buflist_setfpos(curbuf, curwin, curwin->w_cursor.lnum, -! curwin->w_cursor.col, TRUE); - } - - /* ---- 2841,2854 ---- - #endif - - /* -! * Set alternate cursor position for the current buffer and window "win". - * Also save the local window option values. - */ - void -! buflist_altfpos(win) -! win_T *win; - { -! buflist_setfpos(curbuf, win, win->w_cursor.lnum, win->w_cursor.col, TRUE); - } - - /* -*************** -*** 4492,4498 **** - ECMD_ONE, - ((P_HID(curwin->w_buffer) - || bufIsChanged(curwin->w_buffer)) ? ECMD_HIDE : 0) -! + ECMD_OLDBUF); - #ifdef FEAT_AUTOCMD - if (use_firstwin) - ++autocmd_no_leave; ---- 4540,4546 ---- - ECMD_ONE, - ((P_HID(curwin->w_buffer) - || bufIsChanged(curwin->w_buffer)) ? ECMD_HIDE : 0) -! + ECMD_OLDBUF, curwin); - #ifdef FEAT_AUTOCMD - if (use_firstwin) - ++autocmd_no_leave; -*** ../vim-7.2.040/src/ex_cmds.c Sun Nov 9 13:43:25 2008 ---- src/ex_cmds.c Wed Nov 12 22:41:41 2008 -*************** -*** 3052,3058 **** - retval = 0; /* it's in the same file */ - } - else if (do_ecmd(fnum, ffname, sfname, NULL, lnum, -! (P_HID(curbuf) ? ECMD_HIDE : 0) + (forceit ? ECMD_FORCEIT : 0)) == OK) - retval = -1; /* opened another file */ - else - retval = 1; /* error encountered */ ---- 3052,3059 ---- - retval = 0; /* it's in the same file */ - } - else if (do_ecmd(fnum, ffname, sfname, NULL, lnum, -! (P_HID(curbuf) ? ECMD_HIDE : 0) + (forceit ? ECMD_FORCEIT : 0), -! curwin) == OK) - retval = -1; /* opened another file */ - else - retval = 1; /* error encountered */ -*************** -*** 3085,3101 **** - * ECMD_OLDBUF: use existing buffer if it exists - * ECMD_FORCEIT: ! used for Ex command - * ECMD_ADDBUF: don't edit, just add to buffer list - * - * return FAIL for failure, OK otherwise - */ - int -! do_ecmd(fnum, ffname, sfname, eap, newlnum, flags) - int fnum; - char_u *ffname; - char_u *sfname; - exarg_T *eap; /* can be NULL! */ - linenr_T newlnum; - int flags; - { - int other_file; /* TRUE if editing another file */ - int oldbuf; /* TRUE if using existing buffer */ ---- 3086,3106 ---- - * ECMD_OLDBUF: use existing buffer if it exists - * ECMD_FORCEIT: ! used for Ex command - * ECMD_ADDBUF: don't edit, just add to buffer list -+ * oldwin: Should be "curwin" when editing a new buffer in the current -+ * window, NULL when splitting the window first. When not NULL info -+ * of the previous buffer for "oldwin" is stored. - * - * return FAIL for failure, OK otherwise - */ - int -! do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin) - int fnum; - char_u *ffname; - char_u *sfname; - exarg_T *eap; /* can be NULL! */ - linenr_T newlnum; - int flags; -+ win_T *oldwin; - { - int other_file; /* TRUE if editing another file */ - int oldbuf; /* TRUE if using existing buffer */ -*************** -*** 3267,3273 **** - { - if (!cmdmod.keepalt) - curwin->w_alt_fnum = curbuf->b_fnum; -! buflist_altfpos(); - } - - if (fnum) ---- 3272,3279 ---- - { - if (!cmdmod.keepalt) - curwin->w_alt_fnum = curbuf->b_fnum; -! if (oldwin != NULL) -! buflist_altfpos(oldwin); - } - - if (fnum) -*************** -*** 3371,3377 **** - - /* close the link to the current buffer */ - u_sync(FALSE); -! close_buffer(curwin, curbuf, - (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD); - - #ifdef FEAT_AUTOCMD ---- 3377,3383 ---- - - /* close the link to the current buffer */ - u_sync(FALSE); -! close_buffer(oldwin, curbuf, - (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD); - - #ifdef FEAT_AUTOCMD -*************** -*** 5609,5615 **** - */ - alt_fnum = curbuf->b_fnum; - (void)do_ecmd(0, NULL, NULL, NULL, ECMD_LASTL, -! ECMD_HIDE + ECMD_SET_HELP); - if (!cmdmod.keepalt) - curwin->w_alt_fnum = alt_fnum; - empty_fnum = curbuf->b_fnum; ---- 5615,5627 ---- - */ - alt_fnum = curbuf->b_fnum; - (void)do_ecmd(0, NULL, NULL, NULL, ECMD_LASTL, -! ECMD_HIDE + ECMD_SET_HELP, -! #ifdef FEAT_WINDOWS -! NULL /* buffer is still open, don't store info */ -! #else -! curwin -! #endif -! ); - if (!cmdmod.keepalt) - curwin->w_alt_fnum = alt_fnum; - empty_fnum = curbuf->b_fnum; -*** ../vim-7.2.040/src/ex_cmds2.c Sun Sep 7 15:49:45 2008 ---- src/ex_cmds2.c Wed Nov 12 17:46:41 2008 -*************** -*** 2132,2139 **** - * argument index. */ - if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL, - eap, ECMD_LAST, -! (P_HID(curwin->w_buffer) ? ECMD_HIDE : 0) + -! (eap->forceit ? ECMD_FORCEIT : 0)) == FAIL) - curwin->w_arg_idx = old_arg_idx; - /* like Vi: set the mark where the cursor is in the file. */ - else if (eap->cmdidx != CMD_argdo) ---- 2132,2139 ---- - * argument index. */ - if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL, - eap, ECMD_LAST, -! (P_HID(curwin->w_buffer) ? ECMD_HIDE : 0) -! + (eap->forceit ? ECMD_FORCEIT : 0), curwin) == FAIL) - curwin->w_arg_idx = old_arg_idx; - /* like Vi: set the mark where the cursor is in the file. */ - else if (eap->cmdidx != CMD_argdo) -*** ../vim-7.2.040/src/ex_docmd.c Sun Nov 9 13:43:25 2008 ---- src/ex_docmd.c Wed Nov 12 18:04:22 2008 -*************** -*** 7488,7494 **** - /* ":new" or ":tabnew" without argument: edit an new empty buffer */ - setpcmark(); - (void)do_ecmd(0, NULL, NULL, eap, ECMD_ONE, -! ECMD_HIDE + (eap->forceit ? ECMD_FORCEIT : 0)); - } - else if ((eap->cmdidx != CMD_split - #ifdef FEAT_VERTSPLIT ---- 7488,7495 ---- - /* ":new" or ":tabnew" without argument: edit an new empty buffer */ - setpcmark(); - (void)do_ecmd(0, NULL, NULL, eap, ECMD_ONE, -! ECMD_HIDE + (eap->forceit ? ECMD_FORCEIT : 0), -! old_curwin == NULL ? curwin : NULL); - } - else if ((eap->cmdidx != CMD_split - #ifdef FEAT_VERTSPLIT -*************** -*** 7525,7531 **** - #ifdef FEAT_LISTCMDS - + (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0 ) - #endif -! ) == FAIL) - { - /* Editing the file failed. If the window was split, close it. */ - #ifdef FEAT_WINDOWS ---- 7526,7532 ---- - #ifdef FEAT_LISTCMDS - + (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0 ) - #endif -! , old_curwin == NULL ? curwin : NULL) == FAIL) - { - /* Editing the file failed. If the window was split, close it. */ - #ifdef FEAT_WINDOWS -*** ../vim-7.2.040/src/ex_getln.c Sun Sep 14 14:41:44 2008 ---- src/ex_getln.c Wed Nov 12 18:06:25 2008 -*************** -*** 6051,6057 **** - cmdwin_type = '-'; - - /* Create the command-line buffer empty. */ -! (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE); - (void)setfname(curbuf, (char_u *)"[Command Line]", NULL, TRUE); - set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL); - set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL); ---- 6051,6057 ---- - cmdwin_type = '-'; - - /* Create the command-line buffer empty. */ -! (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL); - (void)setfname(curbuf, (char_u *)"[Command Line]", NULL, TRUE); - set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL); - set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL); -*** ../vim-7.2.040/src/if_sniff.c Sat Aug 9 19:41:16 2008 ---- src/if_sniff.c Wed Nov 12 17:48:46 2008 -*************** -*** 1114,1120 **** - char *fname; - { - ++no_wait_return; -! do_ecmd(0, (char_u *)fname, NULL, NULL, ECMD_ONE, ECMD_HIDE+ECMD_OLDBUF); - curbuf->b_sniff = TRUE; - --no_wait_return; /* [ex_docmd.c] */ - } ---- 1114,1121 ---- - char *fname; - { - ++no_wait_return; -! do_ecmd(0, (char_u *)fname, NULL, NULL, ECMD_ONE, ECMD_HIDE+ECMD_OLDBUF, -! curwin); - curbuf->b_sniff = TRUE; - --no_wait_return; /* [ex_docmd.c] */ - } -*** ../vim-7.2.040/src/main.c Sun Nov 9 13:43:25 2008 ---- src/main.c Wed Nov 12 17:49:06 2008 -*************** -*** 2588,2594 **** - # endif - (void)do_ecmd(0, arg_idx < GARGCOUNT - ? alist_name(&GARGLIST[arg_idx]) : NULL, -! NULL, NULL, ECMD_LASTL, ECMD_HIDE); - # ifdef HAS_SWAP_EXISTS_ACTION - if (swap_exists_did_quit) - { ---- 2588,2594 ---- - # endif - (void)do_ecmd(0, arg_idx < GARGCOUNT - ? alist_name(&GARGLIST[arg_idx]) : NULL, -! NULL, NULL, ECMD_LASTL, ECMD_HIDE, curwin); - # ifdef HAS_SWAP_EXISTS_ACTION - if (swap_exists_did_quit) - { -*** ../vim-7.2.040/src/netbeans.c Sun Jul 13 19:18:03 2008 ---- src/netbeans.c Wed Nov 12 17:49:40 2008 -*************** -*** 1795,1801 **** - buf->displayname = NULL; - - netbeansReadFile = 0; /* don't try to open disk file */ -! do_ecmd(0, NULL, 0, 0, ECMD_ONE, ECMD_HIDE + ECMD_OLDBUF); - netbeansReadFile = 1; - buf->bufp = curbuf; - maketitle(); ---- 1795,1801 ---- - buf->displayname = NULL; - - netbeansReadFile = 0; /* don't try to open disk file */ -! do_ecmd(0, NULL, 0, 0, ECMD_ONE, ECMD_HIDE + ECMD_OLDBUF, curwin); - netbeansReadFile = 1; - buf->bufp = curbuf; - maketitle(); -*************** -*** 1960,1966 **** - - netbeansReadFile = 0; /* don't try to open disk file */ - do_ecmd(0, (char_u *)buf->displayname, 0, 0, ECMD_ONE, -! ECMD_HIDE + ECMD_OLDBUF); - netbeansReadFile = 1; - buf->bufp = curbuf; - maketitle(); ---- 1960,1966 ---- - - netbeansReadFile = 0; /* don't try to open disk file */ - do_ecmd(0, (char_u *)buf->displayname, 0, 0, ECMD_ONE, -! ECMD_HIDE + ECMD_OLDBUF, curwin); - netbeansReadFile = 1; - buf->bufp = curbuf; - maketitle(); -*************** -*** 1979,1985 **** - vim_free(buf->displayname); - buf->displayname = nb_unquote(args, NULL); - do_ecmd(0, (char_u *)buf->displayname, NULL, NULL, ECMD_ONE, -! ECMD_HIDE + ECMD_OLDBUF); - buf->bufp = curbuf; - buf->initDone = TRUE; - doupdate = 1; ---- 1979,1985 ---- - vim_free(buf->displayname); - buf->displayname = nb_unquote(args, NULL); - do_ecmd(0, (char_u *)buf->displayname, NULL, NULL, ECMD_ONE, -! ECMD_HIDE + ECMD_OLDBUF, curwin); - buf->bufp = curbuf; - buf->initDone = TRUE; - doupdate = 1; -*** ../vim-7.2.040/src/normal.c Sat Nov 1 13:51:57 2008 ---- src/normal.c Wed Nov 12 17:49:50 2008 -*************** -*** 6050,6056 **** - autowrite(curbuf, FALSE); - setpcmark(); - (void)do_ecmd(0, ptr, NULL, NULL, ECMD_LAST, -! P_HID(curbuf) ? ECMD_HIDE : 0); - if (cap->nchar == 'F' && lnum >= 0) - { - curwin->w_cursor.lnum = lnum; ---- 6050,6056 ---- - autowrite(curbuf, FALSE); - setpcmark(); - (void)do_ecmd(0, ptr, NULL, NULL, ECMD_LAST, -! P_HID(curbuf) ? ECMD_HIDE : 0, curwin); - if (cap->nchar == 'F' && lnum >= 0) - { - curwin->w_cursor.lnum = lnum; -*** ../vim-7.2.040/src/popupmnu.c Sun Jul 13 19:33:51 2008 ---- src/popupmnu.c Wed Nov 12 18:08:07 2008 -*************** -*** 573,579 **** - { - /* Don't want to sync undo in the current buffer. */ - ++no_u_sync; -! res = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, 0); - --no_u_sync; - if (res == OK) - { ---- 573,579 ---- - { - /* Don't want to sync undo in the current buffer. */ - ++no_u_sync; -! res = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, 0, NULL); - --no_u_sync; - if (res == OK) - { -*** ../vim-7.2.040/src/proto/buffer.pro Sun May 6 13:57:53 2007 ---- src/proto/buffer.pro Wed Nov 12 17:43:39 2008 -*************** -*** 33,39 **** - char_u *getaltfname __ARGS((int errmsg)); - int buflist_add __ARGS((char_u *fname, int flags)); - void buflist_slash_adjust __ARGS((void)); -! void buflist_altfpos __ARGS((void)); - int otherfile __ARGS((char_u *ffname)); - void buf_setino __ARGS((buf_T *buf)); - void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate)); ---- 33,39 ---- - char_u *getaltfname __ARGS((int errmsg)); - int buflist_add __ARGS((char_u *fname, int flags)); - void buflist_slash_adjust __ARGS((void)); -! void buflist_altfpos __ARGS((win_T *win)); - int otherfile __ARGS((char_u *ffname)); - void buf_setino __ARGS((buf_T *buf)); - void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate)); -*** ../vim-7.2.040/src/proto/ex_cmds.pro Sun Nov 9 13:43:25 2008 ---- src/proto/ex_cmds.pro Wed Nov 12 17:44:27 2008 -*************** -*** 27,33 **** - void do_wqall __ARGS((exarg_T *eap)); - int not_writing __ARGS((void)); - int getfile __ARGS((int fnum, char_u *ffname, char_u *sfname, int setpm, linenr_T lnum, int forceit)); -! int do_ecmd __ARGS((int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags)); - void ex_append __ARGS((exarg_T *eap)); - void ex_change __ARGS((exarg_T *eap)); - void ex_z __ARGS((exarg_T *eap)); ---- 27,33 ---- - void do_wqall __ARGS((exarg_T *eap)); - int not_writing __ARGS((void)); - int getfile __ARGS((int fnum, char_u *ffname, char_u *sfname, int setpm, linenr_T lnum, int forceit)); -! int do_ecmd __ARGS((int fnum, char_u *ffname, char_u *sfname, exarg_T *eap, linenr_T newlnum, int flags, win_T *oldwin)); - void ex_append __ARGS((exarg_T *eap)); - void ex_change __ARGS((exarg_T *eap)); - void ex_z __ARGS((exarg_T *eap)); -*** ../vim-7.2.040/src/quickfix.c Thu Jul 24 18:44:59 2008 ---- src/quickfix.c Wed Nov 12 18:12:00 2008 -*************** -*** 1420,1425 **** ---- 1420,1426 ---- - win_T *win; - win_T *altwin; - #endif -+ win_T *oldwin = curwin; - int print_message = TRUE; - int len; - #ifdef FEAT_FOLDING -*************** -*** 1744,1750 **** - } - else - ok = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1, -! ECMD_HIDE + ECMD_SET_HELP); - } - else - ok = buflist_getfile(qf_ptr->qf_fnum, ---- 1745,1752 ---- - } - else - ok = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1, -! ECMD_HIDE + ECMD_SET_HELP, -! oldwin == curwin ? curwin : NULL); - } - else - ok = buflist_getfile(qf_ptr->qf_fnum, -*************** -*** 2267,2272 **** ---- 2269,2275 ---- - win_T *win; - tabpage_T *prevtab = curtab; - buf_T *qf_buf; -+ win_T *oldwin = curwin; - - if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow) - { -*************** -*** 2326,2339 **** - win->w_llist->qf_refcount++; - } - - if (qf_buf != NULL) - /* Use the existing quickfix buffer */ - (void)do_ecmd(qf_buf->b_fnum, NULL, NULL, NULL, ECMD_ONE, -! ECMD_HIDE + ECMD_OLDBUF); - else - { - /* Create a new quickfix buffer */ -! (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE); - /* switch off 'swapfile' */ - set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL); - set_option_value((char_u *)"bt", 0L, (char_u *)"quickfix", ---- 2329,2344 ---- - win->w_llist->qf_refcount++; - } - -+ if (oldwin != curwin) -+ oldwin = NULL; /* don't store info when in another window */ - if (qf_buf != NULL) - /* Use the existing quickfix buffer */ - (void)do_ecmd(qf_buf->b_fnum, NULL, NULL, NULL, ECMD_ONE, -! ECMD_HIDE + ECMD_OLDBUF, oldwin); - else - { - /* Create a new quickfix buffer */ -! (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, oldwin); - /* switch off 'swapfile' */ - set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL); - set_option_value((char_u *)"bt", 0L, (char_u *)"quickfix", -*** ../vim-7.2.040/src/window.c Wed Aug 6 18:32:11 2008 ---- src/window.c Wed Nov 12 18:12:37 2008 -*************** -*** 531,537 **** - # ifdef FEAT_SCROLLBIND - curwin->w_p_scb = FALSE; - # endif -! (void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL, ECMD_HIDE); - if (nchar == 'F' && lnum >= 0) - { - curwin->w_cursor.lnum = lnum; ---- 531,538 ---- - # ifdef FEAT_SCROLLBIND - curwin->w_p_scb = FALSE; - # endif -! (void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL, -! ECMD_HIDE, NULL); - if (nchar == 'F' && lnum >= 0) - { - curwin->w_cursor.lnum = lnum; -*** ../vim-7.2.040/src/version.c Wed Nov 12 16:04:43 2008 ---- src/version.c Wed Nov 12 16:54:35 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 41, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -260. Co-workers have to E-mail you about the fire alarm to get - you out of the building. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.042 b/vi/vim-7.2/7.2.042 deleted file mode 100644 index cd2b568..0000000 --- a/vi/vim-7.2/7.2.042 +++ /dev/null @@ -1,166 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.042 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.042 -Problem: When using winrestview() in a BufWinEnter autocommand the window - is scrolled anyway. (Matt Zyzik) -Solution: Don't recompute topline when above 'scrolloff' from the bottom. - Don't always put the cursor halfway when entering a buffer. Add - "w_topline_was_set". -Files: src/buffer.c, src/move.c, src/structs.h - - -*** ../vim-7.2.041/src/buffer.c Sat Nov 15 14:10:23 2008 ---- src/buffer.c Sat Nov 15 14:58:52 2008 -*************** -*** 1401,1406 **** ---- 1401,1409 ---- - curwin->w_cursor.coladd = 0; - #endif - curwin->w_set_curswant = TRUE; -+ #ifdef FEAT_AUTOCMD -+ curwin->w_topline_was_set = FALSE; -+ #endif - - /* Make sure the buffer is loaded. */ - if (curbuf->b_ml.ml_mfp == NULL) /* need to load the file */ -*************** -*** 1440,1446 **** - maketitle(); - #endif - #ifdef FEAT_AUTOCMD -! if (curwin->w_topline == 1) /* when autocmds didn't change it */ - #endif - scroll_cursor_halfway(FALSE); /* redisplay at correct position */ - ---- 1443,1450 ---- - maketitle(); - #endif - #ifdef FEAT_AUTOCMD -! /* when autocmds didn't change it */ -! if (curwin->w_topline == 1 && !curwin->w_topline_was_set) - #endif - scroll_cursor_halfway(FALSE); /* redisplay at correct position */ - -*** ../vim-7.2.041/src/move.c Sun Jul 13 19:25:23 2008 ---- src/move.c Sat Nov 15 14:56:47 2008 -*************** -*** 280,297 **** - - if (curwin->w_botline <= curbuf->b_ml.ml_line_count) - { -! if (curwin->w_cursor.lnum < curwin->w_botline -! && ((long)curwin->w_cursor.lnum - >= (long)curwin->w_botline - p_so - #ifdef FEAT_FOLDING - || hasAnyFolding(curwin) - #endif - )) -! { - lineoff_T loff; - -! /* Cursor is above botline, check if there are 'scrolloff' -! * window lines below the cursor. If not, need to scroll. */ - n = curwin->w_empty_rows; - loff.lnum = curwin->w_cursor.lnum; - #ifdef FEAT_FOLDING ---- 280,299 ---- - - if (curwin->w_botline <= curbuf->b_ml.ml_line_count) - { -! if (curwin->w_cursor.lnum < curwin->w_botline) -! { -! if (((long)curwin->w_cursor.lnum - >= (long)curwin->w_botline - p_so - #ifdef FEAT_FOLDING - || hasAnyFolding(curwin) - #endif - )) -! { - lineoff_T loff; - -! /* Cursor is (a few lines) above botline, check if there are -! * 'scrolloff' window lines below the cursor. If not, need to -! * scroll. */ - n = curwin->w_empty_rows; - loff.lnum = curwin->w_cursor.lnum; - #ifdef FEAT_FOLDING -*************** -*** 317,322 **** ---- 319,328 ---- - if (n >= p_so) - /* sufficient context, no need to scroll */ - check_botline = FALSE; -+ } -+ else -+ /* sufficient context, no need to scroll */ -+ check_botline = FALSE; - } - if (check_botline) - { -*************** -*** 509,514 **** ---- 515,523 ---- - /* Approximate the value of w_botline */ - wp->w_botline += lnum - wp->w_topline; - wp->w_topline = lnum; -+ #ifdef FEAT_AUTOCMD -+ wp->w_topline_was_set = TRUE; -+ #endif - #ifdef FEAT_DIFF - wp->w_topfill = 0; - #endif -*** ../vim-7.2.041/src/structs.h Sun Nov 9 13:43:25 2008 ---- src/structs.h Sat Nov 15 14:56:42 2008 -*************** -*** 1784,1793 **** - #endif - - /* -! * The next three specify the offsets for displaying the buffer: - */ - linenr_T w_topline; /* buffer line number of the line at the - top of the window */ - #ifdef FEAT_DIFF - int w_topfill; /* number of filler lines above w_topline */ - int w_old_topfill; /* w_topfill at last redraw */ ---- 1784,1798 ---- - #endif - - /* -! * "w_topline", "w_leftcol" and "w_skipcol" specify the offsets for -! * displaying the buffer. - */ - linenr_T w_topline; /* buffer line number of the line at the - top of the window */ -+ #ifdef FEAT_AUTOCMD -+ char w_topline_was_set; /* flag set to TRUE when topline is set, -+ e.g. by winrestview() */ -+ #endif - #ifdef FEAT_DIFF - int w_topfill; /* number of filler lines above w_topline */ - int w_old_topfill; /* w_topfill at last redraw */ -*** ../vim-7.2.041/src/version.c Sat Nov 15 14:10:23 2008 ---- src/version.c Sat Nov 15 16:01:29 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 42, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -261. You find diskettes in your pockets when doing laundry. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.043 b/vi/vim-7.2/7.2.043 deleted file mode 100644 index 5c52254..0000000 --- a/vi/vim-7.2/7.2.043 +++ /dev/null @@ -1,78 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.043 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.043 -Problem: VMS: Too many characters are escaped in filename and shell - commands. -Solution: Escape fewer characters. (Zoltan Arpadffy) -Files: src/vim.h - - -*** ../vim-7.2.042/src/vim.h Sun Nov 9 13:43:25 2008 ---- src/vim.h Fri Nov 14 21:41:17 2008 -*************** -*** 341,348 **** - #ifdef BACKSLASH_IN_FILENAME - # define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`%#'\"|!<") - #else -! # define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<") -! # define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&") - #endif - - #define NUMBUFLEN 30 /* length of a buffer to store a number in ASCII */ ---- 341,354 ---- - #ifdef BACKSLASH_IN_FILENAME - # define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`%#'\"|!<") - #else -! # ifdef VMS -! /* VMS allows a lot of characters in the file name */ -! # define PATH_ESC_CHARS ((char_u *)" \t\n*?{`\\%#'\"|!") -! # define SHELL_ESC_CHARS ((char_u *)" \t\n*?{`\\%#'|!()&") -! # else -! # define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<") -! # define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&") -! # endif - #endif - - #define NUMBUFLEN 30 /* length of a buffer to store a number in ASCII */ -*************** -*** 370,376 **** - * Define __w64 as an empty token for everything but MSVC 7.x or later. - */ - # if !defined(_MSC_VER) || (_MSC_VER < 1300) -! # define __w64 - # endif - typedef unsigned long __w64 long_u; - typedef long __w64 long_i; ---- 376,382 ---- - * Define __w64 as an empty token for everything but MSVC 7.x or later. - */ - # if !defined(_MSC_VER) || (_MSC_VER < 1300) -! # define __w64 - # endif - typedef unsigned long __w64 long_u; - typedef long __w64 long_i; -*** ../vim-7.2.042/src/version.c Sat Nov 15 16:05:30 2008 ---- src/version.c Thu Nov 20 10:23:51 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 43, - /**/ - --- -In his lifetime van Gogh painted 486 oil paintings. Oddly enough, 8975 -of them are to be found in the United States. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.044 b/vi/vim-7.2/7.2.044 deleted file mode 100644 index 4cfe651..0000000 --- a/vi/vim-7.2/7.2.044 +++ /dev/null @@ -1,161 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.044 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.044 -Problem: Crash because of STRCPY() being over protective of the destination - size. (Dominique Pelle) -Solution: Add -D_FORTIFY_SOURCE=1 to CFLAGS. Use an intermediate variable - for the pointer to avoid a warning. -Files: src/auto/configure, src/configure.in, src/eval.c - - -*** ../vim-7.2.043/src/auto/configure Thu Jul 24 17:20:50 2008 ---- src/auto/configure Sun Nov 16 17:08:44 2008 -*************** -*** 16819,16839 **** - LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - fi - -- { $as_echo "$as_me:$LINENO: checking for GCC 3 or later" >&5 -- $as_echo_n "checking for GCC 3 or later... " >&6; } - DEPEND_CFLAGS_FILTER= - if test "$GCC" = yes; then - gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'` - if test "$gccmajor" -gt "2"; then - DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" -! fi -! fi -! if test "$DEPEND_CFLAGS_FILTER" = ""; then -! { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } -! else -! { $as_echo "$as_me:$LINENO: result: yes" >&5 - $as_echo "yes" >&6; } - fi - - ---- 16819,16847 ---- - LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" - fi - - DEPEND_CFLAGS_FILTER= - if test "$GCC" = yes; then -+ { $as_echo "$as_me:$LINENO: checking for GCC 3 or later" >&5 -+ $as_echo_n "checking for GCC 3 or later... " >&6; } - gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'` - if test "$gccmajor" -gt "2"; then - DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" -! { $as_echo "$as_me:$LINENO: result: yes" >&5 -! $as_echo "yes" >&6; } -! else -! { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } -! fi -! { $as_echo "$as_me:$LINENO: checking whether we need -D_FORTIFY_SOURCE=1" >&5 -! $as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; } -! if test "$gccmajor" -gt "3"; then -! CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=1" -! { $as_echo "$as_me:$LINENO: result: yes" >&5 - $as_echo "yes" >&6; } -+ else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+ $as_echo "no" >&6; } -+ fi - fi - - -*** ../vim-7.2.043/src/configure.in Thu Jul 24 17:20:31 2008 ---- src/configure.in Sun Nov 16 17:08:40 2008 -*************** -*** 3152,3169 **** - dnl But only when making dependencies, cproto and lint don't take "-isystem". - dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow - dnl the number before the version number. -- AC_MSG_CHECKING(for GCC 3 or later) - DEPEND_CFLAGS_FILTER= - if test "$GCC" = yes; then - gccmajor=`echo "$gccversion" | sed -e 's/^\([[1-9]]\)\..*$/\1/g'` - if test "$gccmajor" -gt "2"; then - DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" - fi -- fi -- if test "$DEPEND_CFLAGS_FILTER" = ""; then -- AC_MSG_RESULT(no) -- else -- AC_MSG_RESULT(yes) - fi - AC_SUBST(DEPEND_CFLAGS_FILTER) - ---- 3152,3176 ---- - dnl But only when making dependencies, cproto and lint don't take "-isystem". - dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow - dnl the number before the version number. - DEPEND_CFLAGS_FILTER= - if test "$GCC" = yes; then -+ AC_MSG_CHECKING(for GCC 3 or later) - gccmajor=`echo "$gccversion" | sed -e 's/^\([[1-9]]\)\..*$/\1/g'` - if test "$gccmajor" -gt "2"; then - DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" -+ AC_MSG_RESULT(yes) -+ else -+ AC_MSG_RESULT(no) -+ fi -+ dnl -D_FORTIFY_SOURCE=2 crashes Vim on strcpy(buf, "000") when buf is -+ dnl declared as char x[1] but actually longer. Introduced in gcc 4.0. -+ AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1) -+ if test "$gccmajor" -gt "3"; then -+ CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=1" -+ AC_MSG_RESULT(yes) -+ else -+ AC_MSG_RESULT(no) - fi - fi - AC_SUBST(DEPEND_CFLAGS_FILTER) - -*** ../vim-7.2.043/src/eval.c Wed Nov 12 15:28:37 2008 ---- src/eval.c Sun Nov 16 20:46:28 2008 -*************** -*** 21150,21157 **** - init_var_dict(&fc.l_avars, &fc.l_avars_var); - add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "0", - (varnumber_T)(argcount - fp->uf_args.ga_len)); - v = &fc.fixvar[fixvar_idx++].var; -! STRCPY(v->di_key, "000"); - v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; - hash_add(&fc.l_avars.dv_hashtab, DI2HIKEY(v)); - v->di_tv.v_type = VAR_LIST; ---- 21150,21160 ---- - init_var_dict(&fc.l_avars, &fc.l_avars_var); - add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "0", - (varnumber_T)(argcount - fp->uf_args.ga_len)); -+ /* Use "name" to avoid a warning from some compiler that checks the -+ * destination size. */ - v = &fc.fixvar[fixvar_idx++].var; -! name = v->di_key; -! STRCPY(name, "000"); - v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; - hash_add(&fc.l_avars.dv_hashtab, DI2HIKEY(v)); - v->di_tv.v_type = VAR_LIST; -*** ../vim-7.2.043/src/version.c Thu Nov 20 10:26:19 2008 ---- src/version.c Thu Nov 20 10:34:31 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 44, - /**/ - --- -Error:015 - Unable to exit Windows. Try the door. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.045 b/vi/vim-7.2/7.2.045 deleted file mode 100644 index cf37908..0000000 --- a/vi/vim-7.2/7.2.045 +++ /dev/null @@ -1,67 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.045 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.045 -Problem: The Python interface has an empty entry in sys.path. -Solution: Filter out the empty entry. (idea from James Vega) -Files: src/if_python.c - - -*** ../vim-7.2.044/src/if_python.c Thu Jul 24 16:24:48 2008 ---- src/if_python.c Thu Nov 20 11:03:53 2008 -*************** -*** 531,536 **** ---- 531,542 ---- - if (PythonMod_Init()) - goto fail; - -+ /* Remove the element from sys.path that was added because of our -+ * argv[0] value in PythonMod_Init(). Previously we used an empty -+ * string, but dependinding on the OS we then get an empty entry or -+ * the current directory in sys.path. */ -+ PyRun_SimpleString("import sys; sys.path = filter(lambda x: x != '/must>not&exist', sys.path)"); -+ - /* the first python thread is vim's, release the lock */ - Python_SaveThread(); - -*************** -*** 2345,2351 **** - { - PyObject *mod; - PyObject *dict; -! static char *(argv[2]) = {"", NULL}; - - /* Fixups... */ - BufferType.ob_type = &PyType_Type; ---- 2351,2358 ---- - { - PyObject *mod; - PyObject *dict; -! /* The special value is removed from sys.path in Python_Init(). */ -! static char *(argv[2]) = {"/must>not&exist/foo", NULL}; - - /* Fixups... */ - BufferType.ob_type = &PyType_Type; -*** ../vim-7.2.044/src/version.c Thu Nov 20 10:36:04 2008 ---- src/version.c Thu Nov 20 10:58:11 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 45, - /**/ - --- -press CTRL-ALT-DEL for more information - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.046 b/vi/vim-7.2/7.2.046 deleted file mode 100644 index 335f814..0000000 --- a/vi/vim-7.2/7.2.046 +++ /dev/null @@ -1,55 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.046 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.046 -Problem: Wrong check for filling buffer with encoding. (Danek Duvall) -Solution: Remove pointers. (Dominique Pelle) -Files: src/mbyte.c - - -*** ../vim-7.2.045/src/mbyte.c Wed Nov 12 13:07:48 2008 ---- src/mbyte.c Wed Nov 19 21:44:50 2008 -*************** -*** 3131,3137 **** - else - s = p + 1; - } -! for (i = 0; s[i] != NUL && s + i < buf + sizeof(buf) - 1; ++i) - { - if (s[i] == '_' || s[i] == '-') - buf[i] = '-'; ---- 3131,3137 ---- - else - s = p + 1; - } -! for (i = 0; s[i] != NUL && i < sizeof(buf) - 1; ++i) - { - if (s[i] == '_' || s[i] == '-') - buf[i] = '-'; -*** ../vim-7.2.045/src/version.c Thu Nov 20 11:04:01 2008 ---- src/version.c Thu Nov 20 11:54:23 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 46, - /**/ - --- - He was not in the least bit scared to be mashed into a pulp - Or to have his eyes gouged out and his elbows broken; - To have his kneecaps split and his body burned away - And his limbs all hacked and mangled, brave Sir Robin. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.047 b/vi/vim-7.2/7.2.047 deleted file mode 100644 index 5826d2a..0000000 --- a/vi/vim-7.2/7.2.047 +++ /dev/null @@ -1,88 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.047 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.047 -Problem: Starting Vim with the -nb argument while it's not supported causes - the other side to hang. -Solution: When -nb is used while it's not supported exit Vim. (Xavier de - Gaye) -Files: src/main.c, src/vim.h - - -*** ../vim-7.2.046/src/main.c Sat Nov 15 14:10:23 2008 ---- src/main.c Thu Nov 20 14:09:27 2008 -*************** -*** 1510,1516 **** - early_arg_scan(parmp) - mparm_T *parmp; - { -! #if defined(FEAT_XCLIPBOARD) || defined(FEAT_CLIENTSERVER) - int argc = parmp->argc; - char **argv = parmp->argv; - int i; ---- 1510,1517 ---- - early_arg_scan(parmp) - mparm_T *parmp; - { -! #if defined(FEAT_XCLIPBOARD) || defined(FEAT_CLIENTSERVER) \ -! || !defined(FEAT_NETBEANS_INTG) - int argc = parmp->argc; - char **argv = parmp->argv; - int i; -*************** -*** 1582,1587 **** ---- 1583,1596 ---- - else if (STRICMP(argv[i], "--echo-wid") == 0) - echo_wid_arg = TRUE; - # endif -+ # ifndef FEAT_NETBEANS_INTG -+ else if (strncmp(argv[i], "-nb", (size_t)3) == 0) -+ { -+ mch_errmsg(_("'-nb' cannot be used: not enabled at compile time\n")); -+ mch_exit(2); -+ } -+ # endif -+ - } - #endif - } -*** ../vim-7.2.046/src/vim.h Thu Nov 20 10:26:19 2008 ---- src/vim.h Thu Nov 20 12:06:14 2008 -*************** -*** 1986,1991 **** ---- 1986,1994 ---- - # endif - #endif - -+ #ifndef FEAT_NETBEANS_INTG -+ # undef NBDEBUG -+ #endif - #ifdef NBDEBUG /* Netbeans debugging. */ - # include "nbdebug.h" - #else -*** ../vim-7.2.046/src/version.c Thu Nov 20 11:55:53 2008 ---- src/version.c Thu Nov 20 14:07:57 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 47, - /**/ - --- -FIRST HEAD: Oh! quick! get the sword out I want to cut his head off. -THIRD HEAD: Oh, cut your own head off. -SECOND HEAD: Yes - do us all a favour. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.048 b/vi/vim-7.2/7.2.048 deleted file mode 100644 index 3975308..0000000 --- a/vi/vim-7.2/7.2.048 +++ /dev/null @@ -1,160 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.048 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.048 -Problem: v:prevcount is changed too often. Counts are not multiplied when - setting v:count. -Solution: Set v:prevcount properly. Multiply counts. (idea by Ben Schmidt) -Files: src/eval.c, src/normal.c, src/proto/eval.pro - - -*** ../vim-7.2.047/src/eval.c Thu Nov 20 10:36:04 2008 ---- src/eval.c Thu Nov 20 15:53:47 2008 -*************** -*** 18146,18159 **** - } - - /* -! * Set v:count, v:count1 and v:prevcount. - */ - void -! set_vcount(count, count1) - long count; - long count1; - { -! vimvars[VV_PREVCOUNT].vv_nr = vimvars[VV_COUNT].vv_nr; - vimvars[VV_COUNT].vv_nr = count; - vimvars[VV_COUNT1].vv_nr = count1; - } ---- 18146,18162 ---- - } - - /* -! * Set v:count to "count" and v:count1 to "count1". -! * When "set_prevcount" is TRUE first set v:prevcount from v:count. - */ - void -! set_vcount(count, count1, set_prevcount) - long count; - long count1; -+ int set_prevcount; - { -! if (set_prevcount) -! vimvars[VV_PREVCOUNT].vv_nr = vimvars[VV_COUNT].vv_nr; - vimvars[VV_COUNT].vv_nr = count; - vimvars[VV_COUNT1].vv_nr = count1; - } -*** ../vim-7.2.047/src/normal.c Sat Nov 15 14:10:23 2008 ---- src/normal.c Thu Nov 20 16:04:44 2008 -*************** -*** 580,585 **** ---- 580,588 ---- - static int old_mapped_len = 0; - #endif - int idx; -+ #ifdef FEAT_EVAL -+ int set_prevcount = FALSE; -+ #endif - - vim_memset(&ca, 0, sizeof(ca)); /* also resets ca.retval */ - ca.oap = oap; -*************** -*** 615,621 **** ---- 618,629 ---- - /* When not finishing an operator and no register name typed, reset the - * count. */ - if (!finish_op && !oap->regname) -+ { - ca.opcount = 0; -+ #ifdef FEAT_EVAL -+ set_prevcount = TRUE; -+ #endif -+ } - - #ifdef FEAT_AUTOCMD - /* Restore counts from before receiving K_CURSORHOLD. This means after -*************** -*** 719,725 **** - * command, so that v:count can be used in an expression mapping - * right after the count. */ - if (toplevel && stuff_empty()) -! set_vcount(ca.count0, ca.count0 == 0 ? 1 : ca.count0); - #endif - if (ctrl_w) - { ---- 727,741 ---- - * command, so that v:count can be used in an expression mapping - * right after the count. */ - if (toplevel && stuff_empty()) -! { -! long count = ca.count0; -! -! /* multiply with ca.opcount the same way as below */ -! if (ca.opcount != 0) -! count = ca.opcount * (count == 0 ? 1 : count); -! set_vcount(count, count == 0 ? 1 : count, set_prevcount); -! set_prevcount = FALSE; /* only set v:prevcount once */ -! } - #endif - if (ctrl_w) - { -*************** -*** 806,812 **** - * Only set v:count when called from main() and not a stuffed command. - */ - if (toplevel && stuff_empty()) -! set_vcount(ca.count0, ca.count1); - #endif - - /* ---- 822,828 ---- - * Only set v:count when called from main() and not a stuffed command. - */ - if (toplevel && stuff_empty()) -! set_vcount(ca.count0, ca.count1, set_prevcount); - #endif - - /* -*** ../vim-7.2.047/src/proto/eval.pro Sun Nov 9 13:43:25 2008 ---- src/proto/eval.pro Thu Nov 20 15:53:54 2008 -*************** -*** 61,67 **** - long get_vim_var_nr __ARGS((int idx)); - char_u *get_vim_var_str __ARGS((int idx)); - list_T *get_vim_var_list __ARGS((int idx)); -! void set_vcount __ARGS((long count, long count1)); - void set_vim_var_string __ARGS((int idx, char_u *val, int len)); - void set_vim_var_list __ARGS((int idx, list_T *val)); - void set_reg_var __ARGS((int c)); ---- 61,67 ---- - long get_vim_var_nr __ARGS((int idx)); - char_u *get_vim_var_str __ARGS((int idx)); - list_T *get_vim_var_list __ARGS((int idx)); -! void set_vcount __ARGS((long count, long count1, int set_prevcount)); - void set_vim_var_string __ARGS((int idx, char_u *val, int len)); - void set_vim_var_list __ARGS((int idx, list_T *val)); - void set_reg_var __ARGS((int c)); -*** ../vim-7.2.047/src/version.c Thu Nov 20 14:11:47 2008 ---- src/version.c Thu Nov 20 16:08:19 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 48, - /**/ - --- -Microsoft's definition of a boolean: TRUE, FALSE, MAYBE -"Embrace and extend"...? - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.049 b/vi/vim-7.2/7.2.049 deleted file mode 100644 index 0f6efa8..0000000 --- a/vi/vim-7.2/7.2.049 +++ /dev/null @@ -1,1193 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.049 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.049 (extra) -Problem: Win32: the clipboard doesn't support UTF-16. -Solution: Change UCS-2 support to UTF-16 support. (Jia Yanwei) -Files: src/gui_w32.c, src/gui_w48.c, src/mbyte.c, src/misc1.c, - src/os_mswin.c, src/os_win32.c, src/proto/os_mswin.pro - - -*** ../vim-7.2.048/src/gui_w32.c Tue Jun 24 23:46:14 2008 ---- src/gui_w32.c Thu Nov 20 16:47:10 2008 -*************** -*** 992,998 **** - SendMessage(lpdi->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, - 0, 500); - -! tt_text = enc_to_ucs2(str, NULL); - lpdi->lpszText = tt_text; - /* can't show tooltip if failed */ - } ---- 992,998 ---- - SendMessage(lpdi->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, - 0, 500); - -! tt_text = enc_to_utf16(str, NULL); - lpdi->lpszText = tt_text; - /* can't show tooltip if failed */ - } -*************** -*** 1935,1941 **** - if (buf == NULL) - return NULL; - -! convbuf = ucs2_to_enc(buf, lenp); - pImmReleaseContext(hwnd, hIMC); - vim_free(buf); - return convbuf; ---- 1935,1941 ---- - if (buf == NULL) - return NULL; - -! convbuf = utf16_to_enc(buf, lenp); - pImmReleaseContext(hwnd, hIMC); - vim_free(buf); - return convbuf; -*************** -*** 2566,2572 **** - { - /* 'encoding' differs from active codepage: convert menu name - * and use wide function */ -! wn = enc_to_ucs2(menu->name, NULL); - if (wn != NULL) - { - MENUITEMINFOW infow; ---- 2566,2572 ---- - { - /* 'encoding' differs from active codepage: convert menu name - * and use wide function */ -! wn = enc_to_utf16(menu->name, NULL); - if (wn != NULL) - { - MENUITEMINFOW infow; -*************** -*** 2728,2734 **** - { - /* 'encoding' differs from active codepage: convert menu item name - * and use wide function */ -! wn = enc_to_ucs2(menu->name, NULL); - if (wn != NULL) - { - n = InsertMenuW(parent->submenu_id, (UINT)idx, ---- 2728,2734 ---- - { - /* 'encoding' differs from active codepage: convert menu item name - * and use wide function */ -! wn = enc_to_utf16(menu->name, NULL); - if (wn != NULL) - { - n = InsertMenuW(parent->submenu_id, (UINT)idx, -*************** -*** 3570,3576 **** - if (enc_codepage == 0 && (int)GetACP() != enc_codepage) - { - /* Not a codepage, use our own conversion function. */ -! wn = enc_to_ucs2(lpAnsiIn, NULL); - if (wn != NULL) - { - wcscpy(lpWCStr, wn); ---- 3570,3576 ---- - if (enc_codepage == 0 && (int)GetACP() != enc_codepage) - { - /* Not a codepage, use our own conversion function. */ -! wn = enc_to_utf16(lpAnsiIn, NULL); - if (wn != NULL) - { - wcscpy(lpWCStr, wn); -*** ../vim-7.2.048/src/gui_w48.c Wed Nov 12 13:35:31 2008 ---- src/gui_w48.c Thu Nov 20 16:42:32 2008 -*************** -*** 547,553 **** - else - { - len = 1; -! ws = ucs2_to_enc(wstring, &len); - if (ws == NULL) - len = 0; - else ---- 547,553 ---- - else - { - len = 1; -! ws = utf16_to_enc(wstring, &len); - if (ws == NULL) - len = 0; - else -*************** -*** 2128,2134 **** - { - /* 'encoding' differs from active codepage: convert text and use wide - * function */ -! wstr = enc_to_ucs2(str, &wlen); - if (wstr != NULL) - { - n = GetTextExtentPointW(hdc, wstr, wlen, &size); ---- 2128,2134 ---- - { - /* 'encoding' differs from active codepage: convert text and use wide - * function */ -! wstr = enc_to_utf16(str, &wlen); - if (wstr != NULL) - { - n = GetTextExtentPointW(hdc, wstr, wlen, &size); -*************** -*** 2252,2258 **** - { - /* 'encoding' differs from active codepage: convert menu name - * and use wide function */ -! wn = enc_to_ucs2(item_text, NULL); - if (wn != NULL) - { - MENUITEMINFOW infow; ---- 2252,2258 ---- - { - /* 'encoding' differs from active codepage: convert menu name - * and use wide function */ -! wn = enc_to_utf16(item_text, NULL); - if (wn != NULL) - { - MENUITEMINFOW infow; -*************** -*** 2422,2428 **** - if (use_unicode) - { - /* Need to go through Unicode. */ -! wstr = enc_to_ucs2(NameBuff, NULL); - if (wstr != NULL) - { - TCITEMW tiw; ---- 2422,2428 ---- - if (use_unicode) - { - /* Need to go through Unicode. */ -! wstr = enc_to_utf16(NameBuff, NULL); - if (wstr != NULL) - { - TCITEMW tiw; -*************** -*** 2521,2528 **** - WCHAR *wbuf; - int n; - -! /* Convert the title from 'encoding' to ucs2. */ -! wbuf = (WCHAR *)enc_to_ucs2((char_u *)title, NULL); - if (wbuf != NULL) - { - n = SetWindowTextW(hwnd, wbuf); ---- 2521,2528 ---- - WCHAR *wbuf; - int n; - -! /* Convert the title from 'encoding' to UTF-16. */ -! wbuf = (WCHAR *)enc_to_utf16((char_u *)title, NULL); - if (wbuf != NULL) - { - n = SetWindowTextW(hwnd, wbuf); -*************** -*** 3222,3228 **** - char_u *initdir, - char_u *filter) - { -! /* We always use the wide function. This means enc_to_ucs2() must work, - * otherwise it fails miserably! */ - OPENFILENAMEW fileStruct; - WCHAR fileBuf[MAXPATHL]; ---- 3222,3228 ---- - char_u *initdir, - char_u *filter) - { -! /* We always use the wide function. This means enc_to_utf16() must work, - * otherwise it fails miserably! */ - OPENFILENAMEW fileStruct; - WCHAR fileBuf[MAXPATHL]; -*************** -*** 3238,3244 **** - fileBuf[0] = NUL; - else - { -! wp = enc_to_ucs2(dflt, NULL); - if (wp == NULL) - fileBuf[0] = NUL; - else ---- 3238,3244 ---- - fileBuf[0] = NUL; - else - { -! wp = enc_to_utf16(dflt, NULL); - if (wp == NULL) - fileBuf[0] = NUL; - else -*************** -*** 3263,3273 **** - #endif - - if (title != NULL) -! titlep = enc_to_ucs2(title, NULL); - fileStruct.lpstrTitle = titlep; - - if (ext != NULL) -! extp = enc_to_ucs2(ext, NULL); - fileStruct.lpstrDefExt = extp; - - fileStruct.lpstrFile = fileBuf; ---- 3263,3273 ---- - #endif - - if (title != NULL) -! titlep = enc_to_utf16(title, NULL); - fileStruct.lpstrTitle = titlep; - - if (ext != NULL) -! extp = enc_to_utf16(ext, NULL); - fileStruct.lpstrDefExt = extp; - - fileStruct.lpstrFile = fileBuf; -*************** -*** 3278,3284 **** - if (initdir != NULL && *initdir != NUL) - { - /* Must have backslashes here, no matter what 'shellslash' says */ -! initdirp = enc_to_ucs2(initdir, NULL); - if (initdirp != NULL) - { - for (wp = initdirp; *wp != NUL; ++wp) ---- 3278,3284 ---- - if (initdir != NULL && *initdir != NUL) - { - /* Must have backslashes here, no matter what 'shellslash' says */ -! initdirp = enc_to_utf16(initdir, NULL); - if (initdirp != NULL) - { - for (wp = initdirp; *wp != NUL; ++wp) -*************** -*** 3318,3324 **** - vim_free(extp); - - /* Convert from UCS2 to 'encoding'. */ -! p = ucs2_to_enc(fileBuf, NULL); - if (p != NULL) - /* when out of memory we get garbage for non-ASCII chars */ - STRCPY(fileBuf, p); ---- 3318,3324 ---- - vim_free(extp); - - /* Convert from UCS2 to 'encoding'. */ -! p = utf16_to_enc(fileBuf, NULL); - if (p != NULL) - /* when out of memory we get garbage for non-ASCII chars */ - STRCPY(fileBuf, p); -*************** -*** 3518,3524 **** - { - #ifdef FEAT_MBYTE - if (DragQueryFileW(hDrop, i, wszFile, BUFPATHLEN) > 0) -! fnames[i] = ucs2_to_enc(wszFile, NULL); - else - #endif - { ---- 3518,3524 ---- - { - #ifdef FEAT_MBYTE - if (DragQueryFileW(hDrop, i, wszFile, BUFPATHLEN) > 0) -! fnames[i] = utf16_to_enc(wszFile, NULL); - else - #endif - { -*** ../vim-7.2.048/src/mbyte.c Thu Nov 20 11:55:53 2008 ---- src/mbyte.c Thu Nov 20 16:47:41 2008 -*************** -*** 6101,6107 **** - - /* 1. codepage/UTF-8 -> ucs-2. */ - if (vcp->vc_cpfrom == 0) -! tmp_len = utf8_to_ucs2(ptr, len, NULL, NULL); - else - tmp_len = MultiByteToWideChar(vcp->vc_cpfrom, 0, - ptr, len, 0, 0); ---- 6101,6107 ---- - - /* 1. codepage/UTF-8 -> ucs-2. */ - if (vcp->vc_cpfrom == 0) -! tmp_len = utf8_to_utf16(ptr, len, NULL, NULL); - else - tmp_len = MultiByteToWideChar(vcp->vc_cpfrom, 0, - ptr, len, 0, 0); -*************** -*** 6109,6121 **** - if (tmp == NULL) - break; - if (vcp->vc_cpfrom == 0) -! utf8_to_ucs2(ptr, len, tmp, unconvlenp); - else - MultiByteToWideChar(vcp->vc_cpfrom, 0, ptr, len, tmp, tmp_len); - - /* 2. ucs-2 -> codepage/UTF-8. */ - if (vcp->vc_cpto == 0) -! retlen = ucs2_to_utf8(tmp, tmp_len, NULL); - else - retlen = WideCharToMultiByte(vcp->vc_cpto, 0, - tmp, tmp_len, 0, 0, 0, 0); ---- 6109,6121 ---- - if (tmp == NULL) - break; - if (vcp->vc_cpfrom == 0) -! utf8_to_utf16(ptr, len, tmp, unconvlenp); - else - MultiByteToWideChar(vcp->vc_cpfrom, 0, ptr, len, tmp, tmp_len); - - /* 2. ucs-2 -> codepage/UTF-8. */ - if (vcp->vc_cpto == 0) -! retlen = utf16_to_utf8(tmp, tmp_len, NULL); - else - retlen = WideCharToMultiByte(vcp->vc_cpto, 0, - tmp, tmp_len, 0, 0, 0, 0); -*************** -*** 6123,6129 **** - if (retval != NULL) - { - if (vcp->vc_cpto == 0) -! ucs2_to_utf8(tmp, tmp_len, retval); - else - WideCharToMultiByte(vcp->vc_cpto, 0, - tmp, tmp_len, retval, retlen, 0, 0); ---- 6123,6129 ---- - if (retval != NULL) - { - if (vcp->vc_cpto == 0) -! utf16_to_utf8(tmp, tmp_len, retval); - else - WideCharToMultiByte(vcp->vc_cpto, 0, - tmp, tmp_len, retval, retlen, 0, 0); -*** ../vim-7.2.048/src/misc1.c Sun Nov 9 13:43:25 2008 ---- src/misc1.c Thu Nov 20 16:42:59 2008 -*************** -*** 8728,8734 **** - /* The active codepage differs from 'encoding'. Attempt using the - * wide function. If it fails because it is not implemented fall back - * to the non-wide version (for Windows 98) */ -! wn = enc_to_ucs2(buf, NULL); - if (wn != NULL) - { - hFind = FindFirstFileW(wn, &wfb); ---- 8728,8734 ---- - /* The active codepage differs from 'encoding'. Attempt using the - * wide function. If it fails because it is not implemented fall back - * to the non-wide version (for Windows 98) */ -! wn = enc_to_utf16(buf, NULL); - if (wn != NULL) - { - hFind = FindFirstFileW(wn, &wfb); -*************** -*** 8756,8762 **** - #ifdef WIN3264 - # ifdef FEAT_MBYTE - if (wn != NULL) -! p = ucs2_to_enc(wfb.cFileName, NULL); /* p is allocated here */ - else - # endif - p = (char_u *)fb.cFileName; ---- 8756,8762 ---- - #ifdef WIN3264 - # ifdef FEAT_MBYTE - if (wn != NULL) -! p = utf16_to_enc(wfb.cFileName, NULL); /* p is allocated here */ - else - # endif - p = (char_u *)fb.cFileName; -*************** -*** 8830,8836 **** - if (wn != NULL) - { - vim_free(wn); -! wn = enc_to_ucs2(buf, NULL); - if (wn != NULL) - hFind = FindFirstFileW(wn, &wfb); - } ---- 8830,8836 ---- - if (wn != NULL) - { - vim_free(wn); -! wn = enc_to_utf16(buf, NULL); - if (wn != NULL) - hFind = FindFirstFileW(wn, &wfb); - } -*** ../vim-7.2.048/src/os_mswin.c Sat Aug 9 19:37:30 2008 ---- src/os_mswin.c Thu Nov 20 17:05:10 2008 -*************** -*** 309,315 **** - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { - /* Convert the title from 'encoding' to the active codepage. */ -! WCHAR *wp = enc_to_ucs2(title, NULL); - int n; - - if (wp != NULL) ---- 309,315 ---- - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { - /* Convert the title from 'encoding' to the active codepage. */ -! WCHAR *wp = enc_to_utf16(title, NULL); - int n; - - if (wp != NULL) -*************** -*** 406,415 **** - * - invoke _wfullpath() - * - convert the result from UCS2 to 'encoding'. - */ -! wname = enc_to_ucs2(fname, NULL); - if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH - 1) != NULL) - { -! cname = ucs2_to_enc((short_u *)wbuf, NULL); - if (cname != NULL) - { - vim_strncpy(buf, cname, len - 1); ---- 406,415 ---- - * - invoke _wfullpath() - * - convert the result from UCS2 to 'encoding'. - */ -! wname = enc_to_utf16(fname, NULL); - if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH - 1) != NULL) - { -! cname = utf16_to_enc((short_u *)wbuf, NULL); - if (cname != NULL) - { - vim_strncpy(buf, cname, len - 1); -*************** -*** 507,513 **** - # endif - ) - { -! WCHAR *wp = enc_to_ucs2(buf, NULL); - int n; - - if (wp != NULL) ---- 507,513 ---- - # endif - ) - { -! WCHAR *wp = enc_to_utf16(buf, NULL); - int n; - - if (wp != NULL) -*************** -*** 668,674 **** - #ifdef FEAT_MBYTE - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! WCHAR *p = enc_to_ucs2(path, NULL); - int n; - - if (p != NULL) ---- 668,674 ---- - #ifdef FEAT_MBYTE - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! WCHAR *p = enc_to_utf16(path, NULL); - int n; - - if (p != NULL) -*************** -*** 891,909 **** - - #if defined(FEAT_MBYTE) || defined(PROTO) - /* -! * Convert an UTF-8 string to UCS-2. - * "instr[inlen]" is the input. "inlen" is in bytes. -! * When "outstr" is NULL only return the number of UCS-2 words produced. - * Otherwise "outstr" must be a buffer of sufficient size. -! * Returns the number of UCS-2 words produced. - */ - int -! utf8_to_ucs2(char_u *instr, int inlen, short_u *outstr, int *unconvlenp) - { - int outlen = 0; - char_u *p = instr; - int todo = inlen; - int l; - - while (todo > 0) - { ---- 891,910 ---- - - #if defined(FEAT_MBYTE) || defined(PROTO) - /* -! * Convert an UTF-8 string to UTF-16. - * "instr[inlen]" is the input. "inlen" is in bytes. -! * When "outstr" is NULL only return the number of UTF-16 words produced. - * Otherwise "outstr" must be a buffer of sufficient size. -! * Returns the number of UTF-16 words produced. - */ - int -! utf8_to_utf16(char_u *instr, int inlen, short_u *outstr, int *unconvlenp) - { - int outlen = 0; - char_u *p = instr; - int todo = inlen; - int l; -+ int ch; - - while (todo > 0) - { -*************** -*** 917,924 **** - break; - } - -! if (outstr != NULL) -! *outstr++ = utf_ptr2char(p); - ++outlen; - p += l; - todo -= l; ---- 918,936 ---- - break; - } - -! ch = utf_ptr2char(p); -! if (ch >= 0x10000) -! { -! /* non-BMP character, encoding with surrogate pairs */ -! ++outlen; -! if (outstr != NULL) -! { -! *outstr++ = (0xD800 - (0x10000 >> 10)) + (ch >> 10); -! *outstr++ = 0xDC00 | (ch & 0x3FF); -! } -! } -! else if (outstr != NULL) -! *outstr++ = ch; - ++outlen; - p += l; - todo -= l; -*************** -*** 928,956 **** - } - - /* -! * Convert an UCS-2 string to UTF-8. -! * The input is "instr[inlen]" with "inlen" in number of ucs-2 words. - * When "outstr" is NULL only return the required number of bytes. - * Otherwise "outstr" must be a buffer of sufficient size. - * Return the number of bytes produced. - */ - int -! ucs2_to_utf8(short_u *instr, int inlen, char_u *outstr) - { - int outlen = 0; - int todo = inlen; - short_u *p = instr; - int l; - - while (todo > 0) - { - if (outstr != NULL) - { -! l = utf_char2bytes(*p, outstr); - outstr += l; - } - else -! l = utf_char2len(*p); - ++p; - outlen += l; - --todo; ---- 940,981 ---- - } - - /* -! * Convert an UTF-16 string to UTF-8. -! * The input is "instr[inlen]" with "inlen" in number of UTF-16 words. - * When "outstr" is NULL only return the required number of bytes. - * Otherwise "outstr" must be a buffer of sufficient size. - * Return the number of bytes produced. - */ - int -! utf16_to_utf8(short_u *instr, int inlen, char_u *outstr) - { - int outlen = 0; - int todo = inlen; - short_u *p = instr; - int l; -+ int ch, ch2; - - while (todo > 0) - { -+ ch = *p; -+ if (ch >= 0xD800 && ch <= 0xDBFF && todo > 1) -+ { -+ /* surrogate pairs handling */ -+ ch2 = p[1]; -+ if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) -+ { -+ ch = ((ch - 0xD800) << 10) + (ch2 & 0x3FF) + 0x10000; -+ ++p; -+ --todo; -+ } -+ } - if (outstr != NULL) - { -! l = utf_char2bytes(ch, outstr); - outstr += l; - } - else -! l = utf_char2len(ch); - ++p; - outlen += l; - --todo; -*************** -*** 1079,1092 **** - */ - - /* -! * Convert "str" from 'encoding' to UCS-2. - * Input in "str" with length "*lenp". When "lenp" is NULL, use strlen(). - * Output is returned as an allocated string. "*lenp" is set to the length of - * the result. A trailing NUL is always added. - * Returns NULL when out of memory. - */ - short_u * -! enc_to_ucs2(char_u *str, int *lenp) - { - vimconv_T conv; - WCHAR *ret; ---- 1104,1117 ---- - */ - - /* -! * Convert "str" from 'encoding' to UTF-16. - * Input in "str" with length "*lenp". When "lenp" is NULL, use strlen(). - * Output is returned as an allocated string. "*lenp" is set to the length of - * the result. A trailing NUL is always added. - * Returns NULL when out of memory. - */ - short_u * -! enc_to_utf16(char_u *str, int *lenp) - { - vimconv_T conv; - WCHAR *ret; -*************** -*** 1102,1108 **** - - if (enc_codepage > 0) - { -! /* We can do any CP### -> UCS-2 in one pass, and we can do it - * without iconv() (convert_* may need iconv). */ - MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length); - } ---- 1127,1133 ---- - - if (enc_codepage > 0) - { -! /* We can do any CP### -> UTF-16 in one pass, and we can do it - * without iconv() (convert_* may need iconv). */ - MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length); - } -*************** -*** 1123,1133 **** - } - convert_setup(&conv, NULL, NULL); - -! length = utf8_to_ucs2(str, *lenp, NULL, NULL); - ret = (WCHAR *)alloc((unsigned)((length + 1) * sizeof(WCHAR))); - if (ret != NULL) - { -! utf8_to_ucs2(str, *lenp, (short_u *)ret, NULL); - ret[length] = 0; - } - ---- 1148,1158 ---- - } - convert_setup(&conv, NULL, NULL); - -! length = utf8_to_utf16(str, *lenp, NULL, NULL); - ret = (WCHAR *)alloc((unsigned)((length + 1) * sizeof(WCHAR))); - if (ret != NULL) - { -! utf8_to_utf16(str, *lenp, (short_u *)ret, NULL); - ret[length] = 0; - } - -*************** -*** 1139,1145 **** - } - - /* -! * Convert an UCS-2 string to 'encoding'. - * Input in "str" with length (counted in wide characters) "*lenp". When - * "lenp" is NULL, use wcslen(). - * Output is returned as an allocated string. If "*lenp" is not NULL it is ---- 1164,1170 ---- - } - - /* -! * Convert an UTF-16 string to 'encoding'. - * Input in "str" with length (counted in wide characters) "*lenp". When - * "lenp" is NULL, use wcslen(). - * Output is returned as an allocated string. If "*lenp" is not NULL it is -*************** -*** 1147,1153 **** - * Returns NULL when out of memory. - */ - char_u * -! ucs2_to_enc(short_u *str, int *lenp) - { - vimconv_T conv; - char_u *utf8_str = NULL, *enc_str = NULL; ---- 1172,1178 ---- - * Returns NULL when out of memory. - */ - char_u * -! utf16_to_enc(short_u *str, int *lenp) - { - vimconv_T conv; - char_u *utf8_str = NULL, *enc_str = NULL; -*************** -*** 1161,1167 **** - - if (enc_codepage > 0) - { -! /* We can do any UCS-2 -> CP### in one pass. */ - int length; - - WideCharToMultiByte_alloc(enc_codepage, 0, str, *lenp, ---- 1186,1192 ---- - - if (enc_codepage > 0) - { -! /* We can do any UTF-16 -> CP### in one pass. */ - int length; - - WideCharToMultiByte_alloc(enc_codepage, 0, str, *lenp, -*************** -*** 1171,1180 **** - } - - /* Avoid allocating zero bytes, it generates an error message. */ -! utf8_str = alloc(ucs2_to_utf8(str, *lenp == 0 ? 1 : *lenp, NULL)); - if (utf8_str != NULL) - { -! *lenp = ucs2_to_utf8(str, *lenp, utf8_str); - - /* We might be called before we have p_enc set up. */ - conv.vc_type = CONV_NONE; ---- 1196,1205 ---- - } - - /* Avoid allocating zero bytes, it generates an error message. */ -! utf8_str = alloc(utf16_to_utf8(str, *lenp == 0 ? 1 : *lenp, NULL)); - if (utf8_str != NULL) - { -! *lenp = utf16_to_utf8(str, *lenp, utf8_str); - - /* We might be called before we have p_enc set up. */ - conv.vc_type = CONV_NONE; -*************** -*** 1308,1314 **** - if (hMemWstr[str_size] == NUL) - break; - } -! to_free = str = ucs2_to_enc((short_u *)hMemWstr, &str_size); - GlobalUnlock(hMemW); - } - } ---- 1333,1339 ---- - if (hMemWstr[str_size] == NUL) - break; - } -! to_free = str = utf16_to_enc((short_u *)hMemWstr, &str_size); - GlobalUnlock(hMemW); - } - } -*************** -*** 1340,1346 **** - - # if defined(FEAT_MBYTE) && defined(WIN3264) - /* The text is in the active codepage. Convert to 'encoding', -! * going through UCS-2. */ - acp_to_enc(str, str_size, &to_free, &maxlen); - if (to_free != NULL) - { ---- 1365,1371 ---- - - # if defined(FEAT_MBYTE) && defined(WIN3264) - /* The text is in the active codepage. Convert to 'encoding', -! * going through UTF-16. */ - acp_to_enc(str, str_size, &to_free, &maxlen); - if (to_free != NULL) - { -*************** -*** 1404,1410 **** - if (widestr != NULL) - { - ++*outlen; /* Include the 0 after the string */ -! *out = ucs2_to_enc((short_u *)widestr, outlen); - vim_free(widestr); - } - } ---- 1429,1435 ---- - if (widestr != NULL) - { - ++*outlen; /* Include the 0 after the string */ -! *out = utf16_to_enc((short_u *)widestr, outlen); - vim_free(widestr); - } - } -*************** -*** 1466,1474 **** - WCHAR *out; - int len = metadata.txtlen; - -! /* Convert the text to UCS-2. This is put on the clipboard as - * CF_UNICODETEXT. */ -! out = (WCHAR *)enc_to_ucs2(str, &len); - if (out != NULL) - { - WCHAR *lpszMemW; ---- 1491,1499 ---- - WCHAR *out; - int len = metadata.txtlen; - -! /* Convert the text to UTF-16. This is put on the clipboard as - * CF_UNICODETEXT. */ -! out = (WCHAR *)enc_to_utf16(str, &len); - if (out != NULL) - { - WCHAR *lpszMemW; -*************** -*** 1488,1494 **** - WideCharToMultiByte(GetACP(), 0, out, len, - str, metadata.txtlen, 0, 0); - -! /* Allocate memory for the UCS-2 text, add one NUL word to - * terminate the string. */ - hMemW = (LPSTR)GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, - (len + 1) * sizeof(WCHAR)); ---- 1513,1519 ---- - WideCharToMultiByte(GetACP(), 0, out, len, - str, metadata.txtlen, 0, 0); - -! /* Allocate memory for the UTF-16 text, add one NUL word to - * terminate the string. */ - hMemW = (LPSTR)GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, - (len + 1) * sizeof(WCHAR)); -*** ../vim-7.2.048/src/os_win32.c Thu Jul 24 20:50:30 2008 ---- src/os_win32.c Thu Nov 20 16:44:33 2008 -*************** -*** 1587,1593 **** - #ifdef FEAT_MBYTE - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! WCHAR *p = enc_to_ucs2(name, NULL); - WCHAR fnamew[_MAX_PATH]; - WCHAR *dumw; - long n; ---- 1587,1593 ---- - #ifdef FEAT_MBYTE - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! WCHAR *p = enc_to_utf16(name, NULL); - WCHAR fnamew[_MAX_PATH]; - WCHAR *dumw; - long n; -*************** -*** 2440,2446 **** - - if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0) - { -! char_u *p = ucs2_to_enc(wbuf, NULL); - - if (p != NULL) - { ---- 2440,2446 ---- - - if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0) - { -! char_u *p = utf16_to_enc(wbuf, NULL); - - if (p != NULL) - { -*************** -*** 2466,2472 **** - #ifdef FEAT_MBYTE - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! WCHAR *p = enc_to_ucs2(name, NULL); - long n; - - if (p != NULL) ---- 2466,2472 ---- - #ifdef FEAT_MBYTE - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! WCHAR *p = enc_to_utf16(name, NULL); - long n; - - if (p != NULL) -*************** -*** 2495,2501 **** - #ifdef FEAT_MBYTE - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! WCHAR *p = enc_to_ucs2(name, NULL); - long n; - - if (p != NULL) ---- 2495,2501 ---- - #ifdef FEAT_MBYTE - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! WCHAR *p = enc_to_utf16(name, NULL); - long n; - - if (p != NULL) -*************** -*** 2522,2528 **** - WCHAR *p = NULL; - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) -! p = enc_to_ucs2(name, NULL); - #endif - - #ifdef FEAT_MBYTE ---- 2522,2528 ---- - WCHAR *p = NULL; - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) -! p = enc_to_utf16(name, NULL); - #endif - - #ifdef FEAT_MBYTE -*************** -*** 2590,2596 **** - WCHAR *wn = NULL; - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) -! wn = enc_to_ucs2(fname, NULL); - if (wn != NULL) - { - hFile = CreateFileW(wn, /* file name */ ---- 2590,2596 ---- - WCHAR *wn = NULL; - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) -! wn = enc_to_utf16(fname, NULL); - if (wn != NULL) - { - hFile = CreateFileW(wn, /* file name */ -*************** -*** 4239,4245 **** - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! wn = enc_to_ucs2(name, NULL); - if (wn != NULL) - { - SetFileAttributesW(wn, FILE_ATTRIBUTE_NORMAL); ---- 4239,4245 ---- - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! wn = enc_to_utf16(name, NULL); - if (wn != NULL) - { - SetFileAttributesW(wn, FILE_ATTRIBUTE_NORMAL); -*************** -*** 4382,4389 **** - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! wold = enc_to_ucs2((char_u *)pszOldFile, NULL); -! wnew = enc_to_ucs2((char_u *)pszNewFile, NULL); - if (wold != NULL && wnew != NULL) - retval = mch_wrename(wold, wnew); - vim_free(wold); ---- 4382,4389 ---- - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! wold = enc_to_utf16((char_u *)pszOldFile, NULL); -! wnew = enc_to_utf16((char_u *)pszNewFile, NULL); - if (wold != NULL && wnew != NULL) - retval = mch_wrename(wold, wnew); - vim_free(wold); -*************** -*** 4492,4498 **** - WCHAR *wn = NULL; - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) -! wn = enc_to_ucs2(n, NULL); - #endif - - if (mch_isdir(n)) ---- 4492,4498 ---- - WCHAR *wn = NULL; - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) -! wn = enc_to_utf16(n, NULL); - #endif - - if (mch_isdir(n)) -*************** -*** 4618,4624 **** - - #if defined(FEAT_MBYTE) || defined(PROTO) - /* -! * Version of open() that may use ucs2 file name. - */ - int - mch_open(char *name, int flags, int mode) ---- 4618,4624 ---- - - #if defined(FEAT_MBYTE) || defined(PROTO) - /* -! * Version of open() that may use UTF-16 file name. - */ - int - mch_open(char *name, int flags, int mode) -*************** -*** 4630,4636 **** - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! wn = enc_to_ucs2(name, NULL); - if (wn != NULL) - { - f = _wopen(wn, flags, mode); ---- 4630,4636 ---- - - if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) - { -! wn = enc_to_utf16(name, NULL); - if (wn != NULL) - { - f = _wopen(wn, flags, mode); -*************** -*** 4648,4654 **** - } - - /* -! * Version of fopen() that may use ucs2 file name. - */ - FILE * - mch_fopen(char *name, char *mode) ---- 4648,4654 ---- - } - - /* -! * Version of fopen() that may use UTF-16 file name. - */ - FILE * - mch_fopen(char *name, char *mode) -*************** -*** 4675,4682 **** - else if (newMode == 'b') - _set_fmode(_O_BINARY); - # endif -! wn = enc_to_ucs2(name, NULL); -! wm = enc_to_ucs2(mode, NULL); - if (wn != NULL && wm != NULL) - f = _wfopen(wn, wm); - vim_free(wn); ---- 4675,4682 ---- - else if (newMode == 'b') - _set_fmode(_O_BINARY); - # endif -! wn = enc_to_utf16(name, NULL); -! wm = enc_to_utf16(mode, NULL); - if (wn != NULL && wm != NULL) - f = _wfopen(wn, wm); - vim_free(wn); -*************** -*** 4776,4783 **** - int len; - - /* Convert the file names to wide characters. */ -! fromw = enc_to_ucs2(from, NULL); -! tow = enc_to_ucs2(to, NULL); - if (fromw != NULL && tow != NULL) - { - /* Open the file for reading. */ ---- 4776,4783 ---- - int len; - - /* Convert the file names to wide characters. */ -! fromw = enc_to_utf16(from, NULL); -! tow = enc_to_utf16(to, NULL); - if (fromw != NULL && tow != NULL) - { - /* Open the file for reading. */ -*************** -*** 5122,5128 **** - for (i = 0; i < used_file_count; ++i) - { - idx = used_file_indexes[i]; -! str = ucs2_to_enc(ArglistW[idx], NULL); - if (str != NULL) - { - #ifdef FEAT_DIFF ---- 5122,5128 ---- - for (i = 0; i < used_file_count; ++i) - { - idx = used_file_indexes[i]; -! str = utf16_to_enc(ArglistW[idx], NULL); - if (str != NULL) - { - #ifdef FEAT_DIFF -*** ../vim-7.2.048/src/proto/os_mswin.pro Sat May 5 19:07:50 2007 ---- src/proto/os_mswin.pro Thu Nov 20 16:41:00 2008 -*************** -*** 22,35 **** - int can_end_termcap_mode __ARGS((int give_msg)); - int mch_screenmode __ARGS((char_u *arg)); - int mch_libcall __ARGS((char_u *libname, char_u *funcname, char_u *argstring, int argint, char_u **string_result, int *number_result)); -! int utf8_to_ucs2 __ARGS((char_u *instr, int inlen, short_u *outstr, int *unconvlenp)); -! int ucs2_to_utf8 __ARGS((short_u *instr, int inlen, char_u *outstr)); - void MultiByteToWideChar_alloc __ARGS((UINT cp, DWORD flags, LPCSTR in, int inlen, LPWSTR *out, int *outlen)); - void WideCharToMultiByte_alloc __ARGS((UINT cp, DWORD flags, LPCWSTR in, int inlen, LPSTR *out, int *outlen, LPCSTR def, LPBOOL useddef)); - int clip_mch_own_selection __ARGS((VimClipboard *cbd)); - void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); -! short_u *enc_to_ucs2 __ARGS((char_u *str, int *lenp)); -! char_u *ucs2_to_enc __ARGS((short_u *str, int *lenp)); - void clip_mch_request_selection __ARGS((VimClipboard *cbd)); - void acp_to_enc __ARGS((char_u *str, int str_size, char_u **out, int *outlen)); - void clip_mch_set_selection __ARGS((VimClipboard *cbd)); ---- 22,35 ---- - int can_end_termcap_mode __ARGS((int give_msg)); - int mch_screenmode __ARGS((char_u *arg)); - int mch_libcall __ARGS((char_u *libname, char_u *funcname, char_u *argstring, int argint, char_u **string_result, int *number_result)); -! int utf8_to_utf16 __ARGS((char_u *instr, int inlen, short_u *outstr, int *unconvlenp)); -! int utf16_to_utf8 __ARGS((short_u *instr, int inlen, char_u *outstr)); - void MultiByteToWideChar_alloc __ARGS((UINT cp, DWORD flags, LPCSTR in, int inlen, LPWSTR *out, int *outlen)); - void WideCharToMultiByte_alloc __ARGS((UINT cp, DWORD flags, LPCWSTR in, int inlen, LPSTR *out, int *outlen, LPCSTR def, LPBOOL useddef)); - int clip_mch_own_selection __ARGS((VimClipboard *cbd)); - void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); -! short_u *enc_to_utf16 __ARGS((char_u *str, int *lenp)); -! char_u *utf16_to_enc __ARGS((short_u *str, int *lenp)); - void clip_mch_request_selection __ARGS((VimClipboard *cbd)); - void acp_to_enc __ARGS((char_u *str, int str_size, char_u **out, int *outlen)); - void clip_mch_set_selection __ARGS((VimClipboard *cbd)); -*** ../vim-7.2.048/src/version.c Thu Nov 20 16:11:03 2008 ---- src/version.c Thu Nov 20 17:08:07 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 49, - /**/ - --- -FIRST HEAD: All right! All right! We'll kill him first and then have tea and - biscuits. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.050 b/vi/vim-7.2/7.2.050 deleted file mode 100644 index 416d32b..0000000 --- a/vi/vim-7.2/7.2.050 +++ /dev/null @@ -1,316 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.050 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.050 -Problem: Warnings for not checking return value of fwrite(). (Chip Campbell) -Solution: Use the return value. -Files: src/spell.c - - -*** ../vim-7.2.049/src/spell.c Mon Aug 25 04:12:38 2008 ---- src/spell.c Thu Nov 20 17:28:01 2008 -*************** -*** 7926,7931 **** ---- 7926,7933 ---- - char_u *p; - int rr; - int retval = OK; -+ int fwv = 1; /* collect return value of fwrite() to avoid -+ warnings from picky compiler */ - - fd = mch_fopen((char *)fname, "w"); - if (fd == NULL) -*************** -*** 7936,7946 **** - - /* <HEADER>: <fileID> <versionnr> */ - /* <fileID> */ -! if (fwrite(VIMSPELLMAGIC, VIMSPELLMAGICL, (size_t)1, fd) != 1) -! { -! EMSG(_(e_write)); -! retval = FAIL; -! } - putc(VIMSPELLVERSION, fd); /* <versionnr> */ - - /* ---- 7938,7944 ---- - - /* <HEADER>: <fileID> <versionnr> */ - /* <fileID> */ -! fwv &= fwrite(VIMSPELLMAGIC, VIMSPELLMAGICL, (size_t)1, fd); - putc(VIMSPELLVERSION, fd); /* <versionnr> */ - - /* -*************** -*** 7955,7961 **** - - i = (int)STRLEN(spin->si_info); - put_bytes(fd, (long_u)i, 4); /* <sectionlen> */ -! fwrite(spin->si_info, (size_t)i, (size_t)1, fd); /* <infotext> */ - } - - /* SN_REGION: <regionname> ... ---- 7953,7959 ---- - - i = (int)STRLEN(spin->si_info); - put_bytes(fd, (long_u)i, 4); /* <sectionlen> */ -! fwv &= fwrite(spin->si_info, (size_t)i, (size_t)1, fd); /* <infotext> */ - } - - /* SN_REGION: <regionname> ... -*************** -*** 7966,7972 **** - putc(SNF_REQUIRED, fd); /* <sectionflags> */ - l = spin->si_region_count * 2; - put_bytes(fd, (long_u)l, 4); /* <sectionlen> */ -! fwrite(spin->si_region_name, (size_t)l, (size_t)1, fd); - /* <regionname> ... */ - regionmask = (1 << spin->si_region_count) - 1; - } ---- 7964,7970 ---- - putc(SNF_REQUIRED, fd); /* <sectionflags> */ - l = spin->si_region_count * 2; - put_bytes(fd, (long_u)l, 4); /* <sectionlen> */ -! fwv &= fwrite(spin->si_region_name, (size_t)l, (size_t)1, fd); - /* <regionname> ... */ - regionmask = (1 << spin->si_region_count) - 1; - } -*************** -*** 8016,8022 **** - } - - put_bytes(fd, (long_u)l, 2); /* <folcharslen> */ -! fwrite(folchars, (size_t)l, (size_t)1, fd); /* <folchars> */ - } - - /* SN_MIDWORD: <midword> */ ---- 8014,8020 ---- - } - - put_bytes(fd, (long_u)l, 2); /* <folcharslen> */ -! fwv &= fwrite(folchars, (size_t)l, (size_t)1, fd); /* <folchars> */ - } - - /* SN_MIDWORD: <midword> */ -*************** -*** 8027,8033 **** - - i = (int)STRLEN(spin->si_midword); - put_bytes(fd, (long_u)i, 4); /* <sectionlen> */ -! fwrite(spin->si_midword, (size_t)i, (size_t)1, fd); /* <midword> */ - } - - /* SN_PREFCOND: <prefcondcnt> <prefcond> ... */ ---- 8025,8032 ---- - - i = (int)STRLEN(spin->si_midword); - put_bytes(fd, (long_u)i, 4); /* <sectionlen> */ -! fwv &= fwrite(spin->si_midword, (size_t)i, (size_t)1, fd); -! /* <midword> */ - } - - /* SN_PREFCOND: <prefcondcnt> <prefcond> ... */ -*************** -*** 8113,8119 **** - p = rr == 1 ? ftp->ft_from : ftp->ft_to; - l = (int)STRLEN(p); - putc(l, fd); -! fwrite(p, l, (size_t)1, fd); - } - } - ---- 8112,8118 ---- - p = rr == 1 ? ftp->ft_from : ftp->ft_to; - l = (int)STRLEN(p); - putc(l, fd); -! fwv &= fwrite(p, l, (size_t)1, fd); - } - } - -*************** -*** 8131,8141 **** - /* <sectionlen> */ - - put_bytes(fd, (long_u)l, 2); /* <sofofromlen> */ -! fwrite(spin->si_sofofr, l, (size_t)1, fd); /* <sofofrom> */ - - l = (int)STRLEN(spin->si_sofoto); - put_bytes(fd, (long_u)l, 2); /* <sofotolen> */ -! fwrite(spin->si_sofoto, l, (size_t)1, fd); /* <sofoto> */ - } - - /* SN_WORDS: <word> ... ---- 8130,8140 ---- - /* <sectionlen> */ - - put_bytes(fd, (long_u)l, 2); /* <sofofromlen> */ -! fwv &= fwrite(spin->si_sofofr, l, (size_t)1, fd); /* <sofofrom> */ - - l = (int)STRLEN(spin->si_sofoto); - put_bytes(fd, (long_u)l, 2); /* <sofotolen> */ -! fwv &= fwrite(spin->si_sofoto, l, (size_t)1, fd); /* <sofoto> */ - } - - /* SN_WORDS: <word> ... -*************** -*** 8160,8166 **** - l = (int)STRLEN(hi->hi_key) + 1; - len += l; - if (round == 2) /* <word> */ -! fwrite(hi->hi_key, (size_t)l, (size_t)1, fd); - --todo; - } - if (round == 1) ---- 8159,8165 ---- - l = (int)STRLEN(hi->hi_key) + 1; - len += l; - if (round == 2) /* <word> */ -! fwv &= fwrite(hi->hi_key, (size_t)l, (size_t)1, fd); - --todo; - } - if (round == 1) -*************** -*** 8176,8182 **** - putc(0, fd); /* <sectionflags> */ - l = spin->si_map.ga_len; - put_bytes(fd, (long_u)l, 4); /* <sectionlen> */ -! fwrite(spin->si_map.ga_data, (size_t)l, (size_t)1, fd); - /* <mapstr> */ - } - ---- 8175,8181 ---- - putc(0, fd); /* <sectionflags> */ - l = spin->si_map.ga_len; - put_bytes(fd, (long_u)l, 4); /* <sectionlen> */ -! fwv &= fwrite(spin->si_map.ga_data, (size_t)l, (size_t)1, fd); - /* <mapstr> */ - } - -*************** -*** 8232,8241 **** - { - p = ((char_u **)(spin->si_comppat.ga_data))[i]; - putc((int)STRLEN(p), fd); /* <comppatlen> */ -! fwrite(p, (size_t)STRLEN(p), (size_t)1, fd);/* <comppattext> */ - } - /* <compflags> */ -! fwrite(spin->si_compflags, (size_t)STRLEN(spin->si_compflags), - (size_t)1, fd); - } - ---- 8231,8241 ---- - { - p = ((char_u **)(spin->si_comppat.ga_data))[i]; - putc((int)STRLEN(p), fd); /* <comppatlen> */ -! fwv &= fwrite(p, (size_t)STRLEN(p), (size_t)1, fd); -! /* <comppattext> */ - } - /* <compflags> */ -! fwv &= fwrite(spin->si_compflags, (size_t)STRLEN(spin->si_compflags), - (size_t)1, fd); - } - -*************** -*** 8259,8265 **** - - l = (int)STRLEN(spin->si_syllable); - put_bytes(fd, (long_u)l, 4); /* <sectionlen> */ -! fwrite(spin->si_syllable, (size_t)l, (size_t)1, fd); /* <syllable> */ - } - - /* end of <SECTIONS> */ ---- 8259,8266 ---- - - l = (int)STRLEN(spin->si_syllable); - put_bytes(fd, (long_u)l, 4); /* <sectionlen> */ -! fwv &= fwrite(spin->si_syllable, (size_t)l, (size_t)1, fd); -! /* <syllable> */ - } - - /* end of <SECTIONS> */ -*************** -*** 8295,8307 **** - (void)put_node(fd, tree, 0, regionmask, round == 3); - } - -! /* Write another byte to check for errors. */ - if (putc(0, fd) == EOF) - retval = FAIL; - - if (fclose(fd) == EOF) - retval = FAIL; - - return retval; - } - ---- 8296,8313 ---- - (void)put_node(fd, tree, 0, regionmask, round == 3); - } - -! /* Write another byte to check for errors (file system full). */ - if (putc(0, fd) == EOF) - retval = FAIL; - - if (fclose(fd) == EOF) - retval = FAIL; - -+ if (fwv != 1) -+ retval = FAIL; -+ if (retval == FAIL) -+ EMSG(_(e_write)); -+ - return retval; - } - -*************** -*** 9890,9895 **** ---- 9896,9902 ---- - char_u *p; - int len; - int totlen; -+ int x = 1; /* collect return value of fwrite() */ - - if (fd != NULL) - put_bytes(fd, (long_u)gap->ga_len, 2); /* <prefcondcnt> */ -*************** -*** 9906,9912 **** - if (fd != NULL) - { - fputc(len, fd); -! fwrite(p, (size_t)len, (size_t)1, fd); - } - totlen += len; - } ---- 9913,9919 ---- - if (fd != NULL) - { - fputc(len, fd); -! x &= fwrite(p, (size_t)len, (size_t)1, fd); - } - totlen += len; - } -*** ../vim-7.2.049/src/version.c Thu Nov 20 17:09:09 2008 ---- src/version.c Fri Nov 28 10:06:13 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 50, - /**/ - --- -You got to work at a mill? Lucky! I got sent back to work in the -acid-mines for my daily crust of stale bread... which not even the -birds would eat. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.051 b/vi/vim-7.2/7.2.051 deleted file mode 100644 index 7c36dfe..0000000 --- a/vi/vim-7.2/7.2.051 +++ /dev/null @@ -1,411 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.051 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.051 -Problem: Can't avoid 'wildignore' and 'suffixes' for glob() and globpath(). -Solution: Add an extra argument to these functions. (Ingo Karkat) -Files: src/eval.c, src/ex_getln.c, src/proto/ex_getln.pro, - runtime/doc/eval.txt, runtime/doc/options.txt - - -*** ../vim-7.2.050/src/eval.c Thu Nov 20 16:11:03 2008 ---- src/eval.c Thu Nov 27 22:15:40 2008 -*************** -*** 7564,7571 **** - {"getwinposx", 0, 0, f_getwinposx}, - {"getwinposy", 0, 0, f_getwinposy}, - {"getwinvar", 2, 2, f_getwinvar}, -! {"glob", 1, 1, f_glob}, -! {"globpath", 2, 2, f_globpath}, - {"has", 1, 1, f_has}, - {"has_key", 2, 2, f_has_key}, - {"haslocaldir", 0, 0, f_haslocaldir}, ---- 7564,7571 ---- - {"getwinposx", 0, 0, f_getwinposx}, - {"getwinposy", 0, 0, f_getwinposy}, - {"getwinvar", 2, 2, f_getwinvar}, -! {"glob", 1, 2, f_glob}, -! {"globpath", 2, 3, f_globpath}, - {"has", 1, 1, f_has}, - {"has_key", 2, 2, f_has_key}, - {"haslocaldir", 0, 0, f_haslocaldir}, -*************** -*** 9557,9563 **** - else - { - /* When the optional second argument is non-zero, don't remove matches -! * for 'suffixes' and 'wildignore' */ - if (argvars[1].v_type != VAR_UNKNOWN - && get_tv_number_chk(&argvars[1], &error)) - flags |= WILD_KEEP_ALL; ---- 9557,9563 ---- - else - { - /* When the optional second argument is non-zero, don't remove matches -! * for 'wildignore' and don't put matches for 'suffixes' at the end. */ - if (argvars[1].v_type != VAR_UNKNOWN - && get_tv_number_chk(&argvars[1], &error)) - flags |= WILD_KEEP_ALL; -*************** -*** 11323,11335 **** - typval_T *argvars; - typval_T *rettv; - { - expand_T xpc; - -! ExpandInit(&xpc); -! xpc.xp_context = EXPAND_FILES; -! rettv->v_type = VAR_STRING; -! rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]), -! NULL, WILD_USE_NL|WILD_SILENT, WILD_ALL); - } - - /* ---- 11323,11347 ---- - typval_T *argvars; - typval_T *rettv; - { -+ int flags = WILD_SILENT|WILD_USE_NL; - expand_T xpc; -+ int error = FALSE; - -! /* When the optional second argument is non-zero, don't remove matches -! * for 'wildignore' and don't put matches for 'suffixes' at the end. */ -! if (argvars[1].v_type != VAR_UNKNOWN -! && get_tv_number_chk(&argvars[1], &error)) -! flags |= WILD_KEEP_ALL; -! rettv->v_type = VAR_STRING; -! if (!error) -! { -! ExpandInit(&xpc); -! xpc.xp_context = EXPAND_FILES; -! rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]), -! NULL, flags, WILD_ALL); -! } -! else -! rettv->vval.v_string = NULL; - } - - /* -*************** -*** 11340,11353 **** - typval_T *argvars; - typval_T *rettv; - { - char_u buf1[NUMBUFLEN]; - char_u *file = get_tv_string_buf_chk(&argvars[1], buf1); - - rettv->v_type = VAR_STRING; -! if (file == NULL) - rettv->vval.v_string = NULL; - else -! rettv->vval.v_string = globpath(get_tv_string(&argvars[0]), file); - } - - /* ---- 11352,11373 ---- - typval_T *argvars; - typval_T *rettv; - { -+ int flags = 0; - char_u buf1[NUMBUFLEN]; - char_u *file = get_tv_string_buf_chk(&argvars[1], buf1); -+ int error = FALSE; - -+ /* When the optional second argument is non-zero, don't remove matches -+ * for 'wildignore' and don't put matches for 'suffixes' at the end. */ -+ if (argvars[2].v_type != VAR_UNKNOWN -+ && get_tv_number_chk(&argvars[2], &error)) -+ flags |= WILD_KEEP_ALL; - rettv->v_type = VAR_STRING; -! if (file == NULL || error) - rettv->vval.v_string = NULL; - else -! rettv->vval.v_string = globpath(get_tv_string(&argvars[0]), file, -! flags); - } - - /* -*** ../vim-7.2.050/src/ex_getln.c Sat Nov 15 14:10:23 2008 ---- src/ex_getln.c Thu Nov 20 18:37:20 2008 -*************** -*** 2524,2530 **** - && ccline.xpc->xp_context != EXPAND_NOTHING - && ccline.xpc->xp_context != EXPAND_UNSUCCESSFUL) - { -! int i = ccline.xpc->xp_pattern - p; - - /* If xp_pattern points inside the old cmdbuff it needs to be adjusted - * to point into the newly allocated memory. */ ---- 2524,2530 ---- - && ccline.xpc->xp_context != EXPAND_NOTHING - && ccline.xpc->xp_context != EXPAND_UNSUCCESSFUL) - { -! int i = (int)(ccline.xpc->xp_pattern - p); - - /* If xp_pattern points inside the old cmdbuff it needs to be adjusted - * to point into the newly allocated memory. */ -*************** -*** 4897,4903 **** - if (s == NULL) - return FAIL; - sprintf((char *)s, "%s/%s*.vim", dirname, pat); -! all = globpath(p_rtp, s); - vim_free(s); - if (all == NULL) - return FAIL; ---- 4897,4903 ---- - if (s == NULL) - return FAIL; - sprintf((char *)s, "%s/%s*.vim", dirname, pat); -! all = globpath(p_rtp, s, 0); - vim_free(s); - if (all == NULL) - return FAIL; -*************** -*** 4938,4946 **** - * newlines. Returns NULL for an error or no matches. - */ - char_u * -! globpath(path, file) - char_u *path; - char_u *file; - { - expand_T xpc; - char_u *buf; ---- 4938,4947 ---- - * newlines. Returns NULL for an error or no matches. - */ - char_u * -! globpath(path, file, expand_options) - char_u *path; - char_u *file; -+ int expand_options; - { - expand_T xpc; - char_u *buf; -*************** -*** 4969,4978 **** - { - add_pathsep(buf); - STRCAT(buf, file); -! if (ExpandFromContext(&xpc, buf, &num_p, &p, WILD_SILENT) != FAIL -! && num_p > 0) - { -! ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT); - for (len = 0, i = 0; i < num_p; ++i) - len += (int)STRLEN(p[i]) + 1; - ---- 4970,4979 ---- - { - add_pathsep(buf); - STRCAT(buf, file); -! if (ExpandFromContext(&xpc, buf, &num_p, &p, -! WILD_SILENT|expand_options) != FAIL && num_p > 0) - { -! ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT|expand_options); - for (len = 0, i = 0; i < num_p; ++i) - len += (int)STRLEN(p[i]) + 1; - -*** ../vim-7.2.050/src/proto/ex_getln.pro Wed May 28 16:49:01 2008 ---- src/proto/ex_getln.pro Thu Nov 20 18:27:57 2008 -*************** -*** 31,37 **** - void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); - int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); - int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)))); -! char_u *globpath __ARGS((char_u *path, char_u *file)); - void init_history __ARGS((void)); - int get_histtype __ARGS((char_u *name)); - void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep)); ---- 31,37 ---- - void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); - int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); - int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)))); -! char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); - void init_history __ARGS((void)); - int get_histtype __ARGS((char_u *name)); - void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep)); -*** ../vim-7.2.050/runtime/doc/eval.txt Sun Nov 9 13:43:25 2008 ---- runtime/doc/eval.txt Thu Nov 27 22:17:13 2008 -*************** -*** 1,4 **** -! *eval.txt* For Vim version 7.2. Last change: 2008 Nov 02 - - - VIM REFERENCE MANUAL by Bram Moolenaar ---- 1,4 ---- -! *eval.txt* For Vim version 7.2. Last change: 2008 Nov 27 - - - VIM REFERENCE MANUAL by Bram Moolenaar -*************** -*** 1706,1712 **** - exists( {expr}) Number TRUE if {expr} exists - extend({expr1}, {expr2} [, {expr3}]) - List/Dict insert items of {expr2} into {expr1} -! expand( {expr}) String expand special keywords in {expr} - feedkeys( {string} [, {mode}]) Number add key sequence to typeahead buffer - filereadable( {file}) Number TRUE if {file} is a readable file - filewritable( {file}) Number TRUE if {file} is a writable file ---- 1709,1715 ---- - exists( {expr}) Number TRUE if {expr} exists - extend({expr1}, {expr2} [, {expr3}]) - List/Dict insert items of {expr2} into {expr1} -! expand( {expr} [, {flag}]) String expand special keywords in {expr} - feedkeys( {string} [, {mode}]) Number add key sequence to typeahead buffer - filereadable( {file}) Number TRUE if {file} is a readable file - filewritable( {file}) Number TRUE if {file} is a writable file -*************** -*** 1758,1765 **** - getwinposx() Number X coord in pixels of GUI Vim window - getwinposy() Number Y coord in pixels of GUI Vim window - getwinvar( {nr}, {varname}) any variable {varname} in window {nr} -! glob( {expr}) String expand file wildcards in {expr} -! globpath( {path}, {expr}) String do glob({expr}) for all dirs in {path} - has( {feature}) Number TRUE if feature {feature} supported - has_key( {dict}, {key}) Number TRUE if {dict} has entry {key} - haslocaldir() Number TRUE if current window executed |:lcd| ---- 1761,1769 ---- - getwinposx() Number X coord in pixels of GUI Vim window - getwinposy() Number Y coord in pixels of GUI Vim window - getwinvar( {nr}, {varname}) any variable {varname} in window {nr} -! glob( {expr} [, {flag}]) String expand file wildcards in {expr} -! globpath( {path}, {expr} [, {flag}]) -! String do glob({expr}) for all dirs in {path} - has( {feature}) Number TRUE if feature {feature} supported - has_key( {dict}, {key}) Number TRUE if {dict} has entry {key} - haslocaldir() Number TRUE if current window executed |:lcd| -*************** -*** 3286,3299 **** - :let list_is_on = getwinvar(2, '&list') - :echo "myvar = " . getwinvar(1, 'myvar') - < -! *glob()* -! glob({expr}) Expand the file wildcards in {expr}. See |wildcards| for the - use of special characters. - The result is a String. - When there are several matches, they are separated by <NL> - characters. -! The 'wildignore' option applies: Names matching one of the -! patterns in 'wildignore' will be skipped. - If the expansion fails, the result is an empty string. - A name for a non-existing file is not included. - ---- 3290,3305 ---- - :let list_is_on = getwinvar(2, '&list') - :echo "myvar = " . getwinvar(1, 'myvar') - < -! glob({expr} [, {flag}]) *glob()* -! Expand the file wildcards in {expr}. See |wildcards| for the - use of special characters. - The result is a String. - When there are several matches, they are separated by <NL> - characters. -! Unless the optional {flag} argument is given and is non-zero, -! the 'suffixes' and 'wildignore' options apply: Names matching -! one of the patterns in 'wildignore' will be skipped and -! 'suffixes' affect the ordering of matches. - If the expansion fails, the result is an empty string. - A name for a non-existing file is not included. - -*************** -*** 3307,3326 **** - See |expand()| for expanding special Vim variables. See - |system()| for getting the raw output of an external command. - -! globpath({path}, {expr}) *globpath()* - Perform glob() on all directories in {path} and concatenate - the results. Example: > - :echo globpath(&rtp, "syntax/c.vim") - < {path} is a comma-separated list of directory names. Each - directory name is prepended to {expr} and expanded like with -! glob(). A path separator is inserted when needed. - To add a comma inside a directory name escape it with a - backslash. Note that on MS-Windows a directory may have a - trailing backslash, remove it if you put a comma after it. - If the expansion fails for one of the directories, there is no - error message. -! The 'wildignore' option applies: Names matching one of the -! patterns in 'wildignore' will be skipped. - - The "**" item can be used to search in a directory tree. - For example, to find all "README.txt" files in the directories ---- 3313,3334 ---- - See |expand()| for expanding special Vim variables. See - |system()| for getting the raw output of an external command. - -! globpath({path}, {expr} [, {flag}]) *globpath()* - Perform glob() on all directories in {path} and concatenate - the results. Example: > - :echo globpath(&rtp, "syntax/c.vim") - < {path} is a comma-separated list of directory names. Each - directory name is prepended to {expr} and expanded like with -! |glob()|. A path separator is inserted when needed. - To add a comma inside a directory name escape it with a - backslash. Note that on MS-Windows a directory may have a - trailing backslash, remove it if you put a comma after it. - If the expansion fails for one of the directories, there is no - error message. -! Unless the optional {flag} argument is given and is non-zero, -! the 'suffixes' and 'wildignore' options apply: Names matching -! one of the patterns in 'wildignore' will be skipped and -! 'suffixes' affect the ordering of matches. - - The "**" item can be used to search in a directory tree. - For example, to find all "README.txt" files in the directories -*** ../vim-7.2.050/runtime/doc/options.txt Sat Aug 9 19:36:49 2008 ---- runtime/doc/options.txt Tue Nov 25 23:43:55 2008 -*************** -*** 1,4 **** -! *options.txt* For Vim version 7.2. Last change: 2008 Aug 06 - - - VIM REFERENCE MANUAL by Bram Moolenaar ---- 1,4 ---- -! *options.txt* For Vim version 7.2. Last change: 2008 Nov 25 - - - VIM REFERENCE MANUAL by Bram Moolenaar -*************** -*** 7472,7478 **** - {not available when compiled without the |+wildignore| - feature} - A list of file patterns. A file that matches with one of these -! patterns is ignored when completing file or directory names. - The pattern is used like with |:autocmd|, see |autocmd-patterns|. - Also see 'suffixes'. - Example: > ---- 7481,7489 ---- - {not available when compiled without the |+wildignore| - feature} - A list of file patterns. A file that matches with one of these -! patterns is ignored when completing file or directory names, and -! influences the result of |expand()|, |glob()| and |globpath()| unless -! a flag is passed to disable this. - The pattern is used like with |:autocmd|, see |autocmd-patterns|. - Also see 'suffixes'. - Example: > -*** ../vim-7.2.050/src/version.c Fri Nov 28 10:08:05 2008 ---- src/version.c Fri Nov 28 10:55:44 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 51, - /**/ - --- -Not too long ago, unzipping in public was illegal... - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.052 b/vi/vim-7.2/7.2.052 deleted file mode 100644 index eb331f3..0000000 --- a/vi/vim-7.2/7.2.052 +++ /dev/null @@ -1,83 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.052 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.052 -Problem: synIDattr() doesn't support "sp" for special color. -Solution: Recognize "sp" and "sp#". (Matt Wozniski) -Files: runtime/doc/eval.txt, src/eval.c - - -*** ../vim-7.2.051/runtime/doc/eval.txt Fri Nov 28 10:59:57 2008 ---- runtime/doc/eval.txt Thu Nov 27 22:17:13 2008 -*************** -*** 5348,5357 **** - "fg" foreground color (GUI: color name used to set - the color, cterm: color number as a string, - term: empty string) -! "bg" background color (like "fg") - "fg#" like "fg", but for the GUI and the GUI is - running the name in "#RRGGBB" form - "bg#" like "fg#" for "bg" - "bold" "1" if bold - "italic" "1" if italic - "reverse" "1" if reverse ---- 5359,5370 ---- - "fg" foreground color (GUI: color name used to set - the color, cterm: color number as a string, - term: empty string) -! "bg" background color (as with "fg") -! "sp" special color (as with "fg") |highlight-guisp| - "fg#" like "fg", but for the GUI and the GUI is - running the name in "#RRGGBB" form - "bg#" like "fg#" for "bg" -+ "sp#" like "fg#" for "sp" - "bold" "1" if bold - "italic" "1" if italic - "reverse" "1" if reverse -*** ../vim-7.2.051/src/eval.c Fri Nov 28 10:59:57 2008 ---- src/eval.c Thu Nov 27 22:15:40 2008 -*************** -*** 16648,16655 **** - p = highlight_has_attr(id, HL_INVERSE, modec); - break; - -! case 's': /* standout */ -! p = highlight_has_attr(id, HL_STANDOUT, modec); - break; - - case 'u': ---- 16648,16658 ---- - p = highlight_has_attr(id, HL_INVERSE, modec); - break; - -! case 's': -! if (TOLOWER_ASC(what[1]) == 'p') /* sp[#] */ -! p = highlight_color(id, what, modec); -! else /* standout */ -! p = highlight_has_attr(id, HL_STANDOUT, modec); - break; - - case 'u': -*** ../vim-7.2.051/src/version.c Fri Nov 28 10:59:57 2008 ---- src/version.c Fri Nov 28 11:13:45 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 52, - /**/ - --- -Not too long ago, a keyboard was something to make music with... - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.053 b/vi/vim-7.2/7.2.053 deleted file mode 100644 index 410d166..0000000 --- a/vi/vim-7.2/7.2.053 +++ /dev/null @@ -1,58 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.053 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.053 -Problem: Crash when using WorkShop command ":ws foo". (Dominique Pelle) -Solution: Avoid using a NULL pointer. -Files: src/workshop.c - - -*** ../vim-7.2.052/src/workshop.c Tue Jun 24 23:34:50 2008 ---- src/workshop.c Thu Nov 27 22:31:27 2008 -*************** -*** 1121,1128 **** - ? (char *)curbuf->b_sfname : "<None>"); - #endif - -! strcpy(ffname, (char *) curbuf->b_ffname); -! *filename = ffname; /* copy so nobody can change b_ffname */ - *curLine = curwin->w_cursor.lnum; - *curCol = curwin->w_cursor.col; - ---- 1121,1132 ---- - ? (char *)curbuf->b_sfname : "<None>"); - #endif - -! if (curbuf->b_ffname == NULL) -! ffname[0] = NUL; -! else -! /* copy so nobody can change b_ffname */ -! strcpy(ffname, (char *) curbuf->b_ffname); -! *filename = ffname; - *curLine = curwin->w_cursor.lnum; - *curCol = curwin->w_cursor.col; - -*** ../vim-7.2.052/src/version.c Fri Nov 28 11:15:10 2008 ---- src/version.c Fri Nov 28 11:44:23 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 53, - /**/ - --- -What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics' -meaning 'bloodsucking creatures'. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.054 b/vi/vim-7.2/7.2.054 deleted file mode 100644 index 98ce9e8..0000000 --- a/vi/vim-7.2/7.2.054 +++ /dev/null @@ -1,68 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.054 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.054 -Problem: Compilation warnings for format in getchar.c. -Solution: Use fputs() instead of fprintf(). (Dominique Pelle) -Files: src/getchar.c - - -*** ../vim-7.2.053/src/getchar.c Tue Jul 22 18:58:23 2008 ---- src/getchar.c Thu Nov 27 22:38:24 2008 -*************** -*** 4702,4708 **** - return FAIL; - if (mp->m_noremap != REMAP_YES && fprintf(fd, "nore") < 0) - return FAIL; -! if (fprintf(fd, cmd) < 0) - return FAIL; - if (buf != NULL && fputs(" <buffer>", fd) < 0) - return FAIL; ---- 4702,4708 ---- - return FAIL; - if (mp->m_noremap != REMAP_YES && fprintf(fd, "nore") < 0) - return FAIL; -! if (fputs(cmd, fd) < 0) - return FAIL; - if (buf != NULL && fputs(" <buffer>", fd) < 0) - return FAIL; -*************** -*** 4801,4807 **** - } - if (IS_SPECIAL(c) || modifiers) /* special key */ - { -! if (fprintf(fd, (char *)get_special_key_name(c, modifiers)) < 0) - return FAIL; - continue; - } ---- 4801,4807 ---- - } - if (IS_SPECIAL(c) || modifiers) /* special key */ - { -! if (fputs((char *)get_special_key_name(c, modifiers), fd) < 0) - return FAIL; - continue; - } -*** ../vim-7.2.053/src/version.c Fri Nov 28 11:47:14 2008 ---- src/version.c Fri Nov 28 12:02:48 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 54, - /**/ - --- -Not too long ago, compress was something you did to garbage... - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.055 b/vi/vim-7.2/7.2.055 deleted file mode 100644 index ffab9a2..0000000 --- a/vi/vim-7.2/7.2.055 +++ /dev/null @@ -1,1271 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.055 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.055 -Problem: Various compiler warnings with strict checking. -Solution: Avoid the warnings by using return values and renaming. -Files: src/diff.c, src/eval.c, src/ex_cmds.c, src/ex_docmd.c, - src/fileio.c, src/fold.c, src/globals.h, src/gui.c, - src/gui_at_sb.c, src/gui_gtk_x11.c, src/gui_xmdlg.c, - src/gui_xmebw.c, src/main.c, src/mbyte.c, src/message.c, - src/netbeans.c, src/option.c, src/os_unix.c, src/spell.c, - src/ui.c, src/window.c - - -*** ../vim-7.2.054/src/diff.c Fri Jan 18 17:39:32 2008 ---- src/diff.c Fri Nov 28 17:23:35 2008 -*************** -*** 661,666 **** ---- 665,671 ---- - char_u *tmp_diff; - FILE *fd; - int ok; -+ int io_error = FALSE; - - /* Delete all diffblocks. */ - diff_clear(curtab); -*************** -*** 697,714 **** - { - ok = FALSE; - fd = mch_fopen((char *)tmp_orig, "w"); -! if (fd != NULL) - { -! fwrite("line1\n", (size_t)6, (size_t)1, fd); - fclose(fd); - fd = mch_fopen((char *)tmp_new, "w"); -! if (fd != NULL) - { -! fwrite("line2\n", (size_t)6, (size_t)1, fd); - fclose(fd); - diff_file(tmp_orig, tmp_new, tmp_diff); - fd = mch_fopen((char *)tmp_diff, "r"); -! if (fd != NULL) - { - char_u linebuf[LBUFLEN]; - ---- 702,727 ---- - { - ok = FALSE; - fd = mch_fopen((char *)tmp_orig, "w"); -! if (fd == NULL) -! io_error = TRUE; -! else - { -! if (fwrite("line1\n", (size_t)6, (size_t)1, fd) != 1) -! io_error = TRUE; - fclose(fd); - fd = mch_fopen((char *)tmp_new, "w"); -! if (fd == NULL) -! io_error = TRUE; -! else - { -! if (fwrite("line2\n", (size_t)6, (size_t)1, fd) != 1) -! io_error = TRUE; - fclose(fd); - diff_file(tmp_orig, tmp_new, tmp_diff); - fd = mch_fopen((char *)tmp_diff, "r"); -! if (fd == NULL) -! io_error = TRUE; -! else - { - char_u linebuf[LBUFLEN]; - -*************** -*** 761,766 **** ---- 774,781 ---- - } - if (!ok) - { -+ if (io_error) -+ EMSG(_("E810: Cannot read or write temp files")); - EMSG(_("E97: Cannot create diffs")); - diff_a_works = MAYBE; - #if defined(MSWIN) || defined(MSDOS) -*************** -*** 925,934 **** - { - # ifdef TEMPDIRNAMES - if (vim_tempdir != NULL) -! mch_chdir((char *)vim_tempdir); - else - # endif -! mch_chdir("/tmp"); - shorten_fnames(TRUE); - } - #endif ---- 940,949 ---- - { - # ifdef TEMPDIRNAMES - if (vim_tempdir != NULL) -! ignored = mch_chdir((char *)vim_tempdir); - else - # endif -! ignored = mch_chdir("/tmp"); - shorten_fnames(TRUE); - } - #endif -*** ../vim-7.2.054/src/eval.c Fri Nov 28 11:15:10 2008 ---- src/eval.c Fri Nov 28 12:23:13 2008 -*************** -*** 10641,10647 **** - # ifdef FEAT_WINDOWS - win_T *wp; - # endif -! int n = 1; - - if (row >= 0 && col >= 0) - { ---- 10641,10647 ---- - # ifdef FEAT_WINDOWS - win_T *wp; - # endif -! int winnr = 1; - - if (row >= 0 && col >= 0) - { -*************** -*** 10651,10659 **** - (void)mouse_comp_pos(win, &row, &col, &lnum); - # ifdef FEAT_WINDOWS - for (wp = firstwin; wp != win; wp = wp->w_next) -! ++n; - # endif -! vimvars[VV_MOUSE_WIN].vv_nr = n; - vimvars[VV_MOUSE_LNUM].vv_nr = lnum; - vimvars[VV_MOUSE_COL].vv_nr = col + 1; - } ---- 10651,10659 ---- - (void)mouse_comp_pos(win, &row, &col, &lnum); - # ifdef FEAT_WINDOWS - for (wp = firstwin; wp != win; wp = wp->w_next) -! ++winnr; - # endif -! vimvars[VV_MOUSE_WIN].vv_nr = winnr; - vimvars[VV_MOUSE_LNUM].vv_nr = lnum; - vimvars[VV_MOUSE_COL].vv_nr = col + 1; - } -*** ../vim-7.2.054/src/ex_cmds.c Sat Nov 15 14:10:23 2008 ---- src/ex_cmds.c Fri Nov 28 17:24:08 2008 -*************** -*** 1941,1947 **** - * root. - */ - if (fp_out != NULL) -! (void)fchown(fileno(fp_out), st_old.st_uid, st_old.st_gid); - #endif - } - } ---- 1941,1947 ---- - * root. - */ - if (fp_out != NULL) -! ignored = fchown(fileno(fp_out), st_old.st_uid, st_old.st_gid); - #endif - } - } -*** ../vim-7.2.054/src/ex_docmd.c Sat Nov 15 14:10:23 2008 ---- src/ex_docmd.c Fri Nov 28 17:26:13 2008 -*************** -*** 8753,8760 **** - else if (*dirnow != NUL - && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) - { -! (void)mch_chdir((char *)globaldir); -! shorten_fnames(TRUE); - } - - failed |= (makeopens(fd, dirnow) == FAIL); ---- 8753,8760 ---- - else if (*dirnow != NUL - && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) - { -! if (mch_chdir((char *)globaldir) == OK) -! shorten_fnames(TRUE); - } - - failed |= (makeopens(fd, dirnow) == FAIL); -*** ../vim-7.2.054/src/fileio.c Wed Nov 12 16:04:43 2008 ---- src/fileio.c Fri Nov 28 17:35:54 2008 -*************** -*** 2214,2220 **** - { - /* Use stderr for stdin, makes shell commands work. */ - close(0); -! dup(2); - } - #endif - ---- 2214,2220 ---- - { - /* Use stderr for stdin, makes shell commands work. */ - close(0); -! ignored = dup(2); - } - #endif - -*************** -*** 3449,3455 **** - { - # ifdef UNIX - # ifdef HAVE_FCHOWN -! fchown(fd, st_old.st_uid, st_old.st_gid); - # endif - if (mch_stat((char *)IObuff, &st) < 0 - || st.st_uid != st_old.st_uid ---- 3449,3455 ---- - { - # ifdef UNIX - # ifdef HAVE_FCHOWN -! ignored = fchown(fd, st_old.st_uid, st_old.st_gid); - # endif - if (mch_stat((char *)IObuff, &st) < 0 - || st.st_uid != st_old.st_uid -*************** -*** 4365,4371 **** - || st.st_uid != st_old.st_uid - || st.st_gid != st_old.st_gid) - { -! fchown(fd, st_old.st_uid, st_old.st_gid); - if (perm >= 0) /* set permission again, may have changed */ - (void)mch_setperm(wfname, perm); - } ---- 4365,4371 ---- - || st.st_uid != st_old.st_uid - || st.st_gid != st_old.st_gid) - { -! ignored = fchown(fd, st_old.st_uid, st_old.st_gid); - if (perm >= 0) /* set permission again, may have changed */ - (void)mch_setperm(wfname, perm); - } -*************** -*** 6030,6038 **** - { - tbuf[FGETS_SIZE - 2] = NUL; - #ifdef USE_CR -! fgets_cr((char *)tbuf, FGETS_SIZE, fp); - #else -! fgets((char *)tbuf, FGETS_SIZE, fp); - #endif - } while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n'); - } ---- 6030,6038 ---- - { - tbuf[FGETS_SIZE - 2] = NUL; - #ifdef USE_CR -! ignoredp = fgets_cr((char *)tbuf, FGETS_SIZE, fp); - #else -! ignoredp = fgets((char *)tbuf, FGETS_SIZE, fp); - #endif - } while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n'); - } -*** ../vim-7.2.054/src/fold.c Wed Aug 6 18:59:40 2008 ---- src/fold.c Fri Nov 28 12:24:16 2008 -*************** -*** 48,54 **** - static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp)); - static int foldLevelWin __ARGS((win_T *wp, linenr_T lnum)); - static void checkupdate __ARGS((win_T *wp)); -! static void setFoldRepeat __ARGS((linenr_T lnum, long count, int open)); - static linenr_T setManualFold __ARGS((linenr_T lnum, int opening, int recurse, int *donep)); - static linenr_T setManualFoldWin __ARGS((win_T *wp, linenr_T lnum, int opening, int recurse, int *donep)); - static void foldOpenNested __ARGS((fold_T *fpr)); ---- 48,54 ---- - static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp)); - static int foldLevelWin __ARGS((win_T *wp, linenr_T lnum)); - static void checkupdate __ARGS((win_T *wp)); -! static void setFoldRepeat __ARGS((linenr_T lnum, long count, int do_open)); - static linenr_T setManualFold __ARGS((linenr_T lnum, int opening, int recurse, int *donep)); - static linenr_T setManualFoldWin __ARGS((win_T *wp, linenr_T lnum, int opening, int recurse, int *donep)); - static void foldOpenNested __ARGS((fold_T *fpr)); -*************** -*** 1241,1250 **** - * Repeat "count" times. - */ - static void -! setFoldRepeat(lnum, count, open) - linenr_T lnum; - long count; -! int open; - { - int done; - long n; ---- 1241,1250 ---- - * Repeat "count" times. - */ - static void -! setFoldRepeat(lnum, count, do_open) - linenr_T lnum; - long count; -! int do_open; - { - int done; - long n; -*************** -*** 1252,1258 **** - for (n = 0; n < count; ++n) - { - done = DONE_NOTHING; -! (void)setManualFold(lnum, open, FALSE, &done); - if (!(done & DONE_ACTION)) - { - /* Only give an error message when no fold could be opened. */ ---- 1252,1258 ---- - for (n = 0; n < count; ++n) - { - done = DONE_NOTHING; -! (void)setManualFold(lnum, do_open, FALSE, &done); - if (!(done & DONE_ACTION)) - { - /* Only give an error message when no fold could be opened. */ -*** ../vim-7.2.054/src/globals.h Thu Sep 18 21:29:07 2008 ---- src/globals.h Fri Nov 28 17:35:50 2008 -*************** -*** 1549,1554 **** ---- 1549,1562 ---- - EXTERN time_t starttime; - - /* -+ * Some compilers warn for not using a return value, but in some situations we -+ * can't do anything useful with the value. Assign to this variable to avoid -+ * the warning. -+ */ -+ EXTERN int ignored; -+ EXTERN char *ignoredp; -+ -+ /* - * Optional Farsi support. Include it here, so EXTERN and INIT are defined. - */ - #ifdef FEAT_FKMAP -*** ../vim-7.2.054/src/gui.c Wed Aug 6 14:37:26 2008 ---- src/gui.c Fri Nov 28 18:48:31 2008 -*************** -*** 139,145 **** - /* The read returns when the child closes the pipe (or when - * the child dies for some reason). */ - close(pipefd[1]); -! (void)read(pipefd[0], &dummy, (size_t)1); - close(pipefd[0]); - } - ---- 139,145 ---- - /* The read returns when the child closes the pipe (or when - * the child dies for some reason). */ - close(pipefd[1]); -! ignored = (int)read(pipefd[0], &dummy, (size_t)1); - close(pipefd[0]); - } - -*** ../vim-7.2.054/src/gui_at_sb.c Sun Jun 13 21:37:13 2004 ---- src/gui_at_sb.c Fri Nov 28 12:19:19 2008 -*************** -*** 1078,1083 **** ---- 1078,1089 ---- - Cardinal *num_params; /* unused */ - { - ScrollbarWidget sbw = (ScrollbarWidget)w; -+ /* Use a union to avoid a warning for the weird conversion from float to -+ * XtPointer. Comes from Xaw/Scrollbar.c. */ -+ union { -+ XtPointer xtp; -+ float xtf; -+ } xtpf; - - if (LookAhead(w, event)) - return; -*************** -*** 1085,1091 **** - /* thumbProc is not pretty, but is necessary for backwards - compatibility on those architectures for which it work{s,ed}; - the intent is to pass a (truncated) float by value. */ -! XtCallCallbacks(w, XtNthumbProc, *(XtPointer*)&sbw->scrollbar.top); - XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top); - } - ---- 1091,1098 ---- - /* thumbProc is not pretty, but is necessary for backwards - compatibility on those architectures for which it work{s,ed}; - the intent is to pass a (truncated) float by value. */ -! xtpf.xtf = sbw->scrollbar.top; -! XtCallCallbacks(w, XtNthumbProc, xtpf.xtp); - XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top); - } - -*** ../vim-7.2.054/src/gui_gtk_x11.c Tue Jul 8 12:46:08 2008 ---- src/gui_gtk_x11.c Fri Nov 28 21:06:38 2008 -*************** -*** 4070,4083 **** - - if (mask & (XValue | YValue)) - { -! int w, h; -! gui_mch_get_screen_dimensions(&w, &h); -! h += p_ghr + get_menu_tool_height(); -! w += get_menu_tool_width(); - if (mask & XNegative) -! x += w - pixel_width; - if (mask & YNegative) -! y += h - pixel_height; - #ifdef HAVE_GTK2 - gtk_window_move(GTK_WINDOW(gui.mainwin), x, y); - #else ---- 4070,4083 ---- - - if (mask & (XValue | YValue)) - { -! int ww, hh; -! gui_mch_get_screen_dimensions(&ww, &hh); -! hh += p_ghr + get_menu_tool_height(); -! ww += get_menu_tool_width(); - if (mask & XNegative) -! x += ww - pixel_width; - if (mask & YNegative) -! y += hh - pixel_height; - #ifdef HAVE_GTK2 - gtk_window_move(GTK_WINDOW(gui.mainwin), x, y); - #else -*** ../vim-7.2.054/src/gui_xmdlg.c Tue Jun 24 23:39:32 2008 ---- src/gui_xmdlg.c Fri Nov 28 21:04:08 2008 -*************** -*** 369,378 **** - char buf[TEMP_BUF_SIZE]; - XmString items[MAX_ENTRIES_IN_LIST]; - int i; -! int index; - -! for (index = (int)ENCODING; index < (int)NONE; ++index) -! count[index] = 0; - - /* First we insert the wild char into every single list. */ - if (fix != ENCODING) ---- 369,378 ---- - char buf[TEMP_BUF_SIZE]; - XmString items[MAX_ENTRIES_IN_LIST]; - int i; -! int idx; - -! for (idx = (int)ENCODING; idx < (int)NONE; ++idx) -! count[idx] = 0; - - /* First we insert the wild char into every single list. */ - if (fix != ENCODING) -*************** -*** 503,516 **** - /* - * Now loop trough the remaining lists and set them up. - */ -! for (index = (int)NAME; index < (int)NONE; ++index) - { - Widget w; - -! if (fix == (enum ListSpecifier)index) - continue; - -! switch ((enum ListSpecifier)index) - { - case NAME: - w = data->list[NAME]; ---- 503,516 ---- - /* - * Now loop trough the remaining lists and set them up. - */ -! for (idx = (int)NAME; idx < (int)NONE; ++idx) - { - Widget w; - -! if (fix == (enum ListSpecifier)idx) - continue; - -! switch ((enum ListSpecifier)idx) - { - case NAME: - w = data->list[NAME]; -*************** -*** 525,545 **** - w = (Widget)0; /* for lint */ - } - -! for (i = 0; i < count[index]; ++i) - { -! items[i] = XmStringCreateLocalized(list[index][i]); -! XtFree(list[index][i]); - } - XmListDeleteAllItems(w); -! XmListAddItems(w, items, count[index], 1); -! if (data->sel[index]) - { - XmStringFree(items[0]); -! items[0] = XmStringCreateLocalized(data->sel[index]); - XmListSelectItem(w, items[0], False); - XmListSetBottomItem(w, items[0]); - } -! for (i = 0; i < count[index]; ++i) - XmStringFree(items[i]); - } - } ---- 525,545 ---- - w = (Widget)0; /* for lint */ - } - -! for (i = 0; i < count[idx]; ++i) - { -! items[i] = XmStringCreateLocalized(list[idx][i]); -! XtFree(list[idx][i]); - } - XmListDeleteAllItems(w); -! XmListAddItems(w, items, count[idx], 1); -! if (data->sel[idx]) - { - XmStringFree(items[0]); -! items[0] = XmStringCreateLocalized(data->sel[idx]); - XmListSelectItem(w, items[0], False); - XmListSetBottomItem(w, items[0]); - } -! for (i = 0; i < count[idx]; ++i) - XmStringFree(items[i]); - } - } -*************** -*** 695,708 **** - int n; - XmString str; - Arg args[4]; -! char *msg = _("no specific match"); - - n = 0; -! str = XmStringCreateLocalized(msg); - XtSetArg(args[n], XmNlabelString, str); ++n; - XtSetValues(data->sample, args, n); - apply_fontlist(data->sample); -! XmTextSetString(data->name, msg); - XmStringFree(str); - - return False; ---- 695,708 ---- - int n; - XmString str; - Arg args[4]; -! char *nomatch_msg = _("no specific match"); - - n = 0; -! str = XmStringCreateLocalized(nomatch_msg); - XtSetArg(args[n], XmNlabelString, str); ++n; - XtSetValues(data->sample, args, n); - apply_fontlist(data->sample); -! XmTextSetString(data->name, nomatch_msg); - XmStringFree(str); - - return False; -*************** -*** 886,906 **** - { - int i; - int max; -! int index = 0; - int size; -! char str[128]; - - for (i = 0, max = 0; i < data->num; i++) - { -! get_part(fn(data, i), 7, str); -! size = atoi(str); - if ((size > max) && (size < MAX_DISPLAY_SIZE)) - { -! index = i; - max = size; - } - } -! strcpy(big_font, fn(data, index)); - } - data->old = XLoadQueryFont(XtDisplay(parent), big_font); - data->old_list = gui_motif_create_fontlist(data->old); ---- 886,906 ---- - { - int i; - int max; -! int idx = 0; - int size; -! char buf[128]; - - for (i = 0, max = 0; i < data->num; i++) - { -! get_part(fn(data, i), 7, buf); -! size = atoi(buf); - if ((size > max) && (size < MAX_DISPLAY_SIZE)) - { -! idx = i; - max = size; - } - } -! strcpy(big_font, fn(data, idx)); - } - data->old = XLoadQueryFont(XtDisplay(parent), big_font); - data->old_list = gui_motif_create_fontlist(data->old); -*************** -*** 1217,1244 **** - - if (i != 0) - { -! char name[TEMP_BUF_SIZE]; -! char style[TEMP_BUF_SIZE]; -! char size[TEMP_BUF_SIZE]; -! char encoding[TEMP_BUF_SIZE]; - char *found; - - found = names[0]; - -! name_part(found, name); -! style_part(found, style); -! size_part(found, size, data->in_pixels); -! encoding_part(found, encoding); -! -! if (strlen(name) > 0 -! && strlen(style) > 0 -! && strlen(size) > 0 -! && strlen(encoding) > 0) - { -! data->sel[NAME] = XtNewString(name); -! data->sel[STYLE] = XtNewString(style); -! data->sel[SIZE] = XtNewString(size); -! data->sel[ENCODING] = XtNewString(encoding); - data->font_name = XtNewString(names[0]); - display_sample(data); - XmTextSetString(data->name, data->font_name); ---- 1217,1244 ---- - - if (i != 0) - { -! char namebuf[TEMP_BUF_SIZE]; -! char stylebuf[TEMP_BUF_SIZE]; -! char sizebuf[TEMP_BUF_SIZE]; -! char encodingbuf[TEMP_BUF_SIZE]; - char *found; - - found = names[0]; - -! name_part(found, namebuf); -! style_part(found, stylebuf); -! size_part(found, sizebuf, data->in_pixels); -! encoding_part(found, encodingbuf); -! -! if (strlen(namebuf) > 0 -! && strlen(stylebuf) > 0 -! && strlen(sizebuf) > 0 -! && strlen(encodingbuf) > 0) - { -! data->sel[NAME] = XtNewString(namebuf); -! data->sel[STYLE] = XtNewString(stylebuf); -! data->sel[SIZE] = XtNewString(sizebuf); -! data->sel[ENCODING] = XtNewString(encodingbuf); - data->font_name = XtNewString(names[0]); - display_sample(data); - XmTextSetString(data->name, data->font_name); -*** ../vim-7.2.054/src/gui_xmebw.c Thu Nov 8 20:48:14 2007 ---- src/gui_xmebw.c Fri Nov 28 18:58:53 2008 -*************** -*** 1256,1262 **** - } - else - { -! int adjust = 0; - - #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) - /* ---- 1256,1262 ---- - } - else - { -! adjust = 0; - - #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) - /* -*************** -*** 1268,1279 **** - { - case XmEXTERNAL_HIGHLIGHT: - adjust = (eb->primitive.highlight_thickness - -! (eb->pushbutton.default_button_shadow_thickness ? -! Xm3D_ENHANCE_PIXEL : 0)); - break; - - case XmINTERNAL_HIGHLIGHT: -- adjust = 0; - break; - - default: ---- 1268,1278 ---- - { - case XmEXTERNAL_HIGHLIGHT: - adjust = (eb->primitive.highlight_thickness - -! (eb->pushbutton.default_button_shadow_thickness -! ? Xm3D_ENHANCE_PIXEL : 0)); - break; - - case XmINTERNAL_HIGHLIGHT: - break; - - default: -*** ../vim-7.2.054/src/main.c Thu Nov 20 14:11:47 2008 ---- src/main.c Fri Nov 28 18:32:48 2008 -*************** -*** 2372,2378 **** - * Is there any other system that cannot do this? - */ - close(0); -! dup(2); - #endif - } - ---- 2372,2378 ---- - * Is there any other system that cannot do this? - */ - close(0); -! ignored = dup(2); - #endif - } - -*** ../vim-7.2.054/src/mbyte.c Thu Nov 20 17:09:09 2008 ---- src/mbyte.c Fri Nov 28 18:44:05 2008 -*************** -*** 717,723 **** - * where mblen() returns 0 for invalid character. - * Therefore, following condition includes 0. - */ -! (void)mblen(NULL, 0); /* First reset the state. */ - if (mblen(buf, (size_t)1) <= 0) - n = 2; - else ---- 717,723 ---- - * where mblen() returns 0 for invalid character. - * Therefore, following condition includes 0. - */ -! ignored = mblen(NULL, 0); /* First reset the state. */ - if (mblen(buf, (size_t)1) <= 0) - n = 2; - else -*************** -*** 5278,5284 **** - - /*ARGSUSED*/ - static void -! preedit_start_cbproc(XIC xic, XPointer client_data, XPointer call_data) - { - #ifdef XIM_DEBUG - xim_log("xim_decide_input_style()\n"); ---- 5278,5284 ---- - - /*ARGSUSED*/ - static void -! preedit_start_cbproc(XIC thexic, XPointer client_data, XPointer call_data) - { - #ifdef XIM_DEBUG - xim_log("xim_decide_input_style()\n"); -*************** -*** 5312,5318 **** - - /*ARGSUSED*/ - static void -! preedit_draw_cbproc(XIC xic, XPointer client_data, XPointer call_data) - { - XIMPreeditDrawCallbackStruct *draw_data; - XIMText *text; ---- 5312,5318 ---- - - /*ARGSUSED*/ - static void -! preedit_draw_cbproc(XIC thexic, XPointer client_data, XPointer call_data) - { - XIMPreeditDrawCallbackStruct *draw_data; - XIMText *text; -*************** -*** 5453,5459 **** - - /*ARGSUSED*/ - static void -! preedit_caret_cbproc(XIC xic, XPointer client_data, XPointer call_data) - { - #ifdef XIM_DEBUG - xim_log("preedit_caret_cbproc()\n"); ---- 5453,5459 ---- - - /*ARGSUSED*/ - static void -! preedit_caret_cbproc(XIC thexic, XPointer client_data, XPointer call_data) - { - #ifdef XIM_DEBUG - xim_log("preedit_caret_cbproc()\n"); -*************** -*** 5462,5468 **** - - /*ARGSUSED*/ - static void -! preedit_done_cbproc(XIC xic, XPointer client_data, XPointer call_data) - { - #ifdef XIM_DEBUG - xim_log("preedit_done_cbproc()\n"); ---- 5462,5468 ---- - - /*ARGSUSED*/ - static void -! preedit_done_cbproc(XIC thexic, XPointer client_data, XPointer call_data) - { - #ifdef XIM_DEBUG - xim_log("preedit_done_cbproc()\n"); -*** ../vim-7.2.054/src/message.c Sun Jul 13 19:18:44 2008 ---- src/message.c Fri Nov 28 12:26:56 2008 -*************** -*** 4585,4645 **** - if (remove_trailing_zeroes) - { - int i; -! char *p; - - /* Using %g or %G: remove superfluous zeroes. */ - if (fmt_spec == 'f') -! p = tmp + str_arg_l - 1; - else - { -! p = (char *)vim_strchr((char_u *)tmp, - fmt_spec == 'e' ? 'e' : 'E'); -! if (p != NULL) - { - /* Remove superfluous '+' and leading - * zeroes from the exponent. */ -! if (p[1] == '+') - { - /* Change "1.0e+07" to "1.0e07" */ -! STRMOVE(p + 1, p + 2); - --str_arg_l; - } -! i = (p[1] == '-') ? 2 : 1; -! while (p[i] == '0') - { - /* Change "1.0e07" to "1.0e7" */ -! STRMOVE(p + i, p + i + 1); - --str_arg_l; - } -! --p; - } - } - -! if (p != NULL && !precision_specified) - /* Remove trailing zeroes, but keep the one - * just after a dot. */ -! while (p > tmp + 2 && *p == '0' && p[-1] != '.') - { -! STRMOVE(p, p + 1); -! --p; - --str_arg_l; - } - } - else - { -! char *p; - - /* Be consistent: some printf("%e") use 1.0e+12 - * and some 1.0e+012. Remove one zero in the last - * case. */ -! p = (char *)vim_strchr((char_u *)tmp, - fmt_spec == 'e' ? 'e' : 'E'); -! if (p != NULL && (p[1] == '+' || p[1] == '-') -! && p[2] == '0' -! && vim_isdigit(p[3]) -! && vim_isdigit(p[4])) - { -! STRMOVE(p + 2, p + 3); - --str_arg_l; - } - } ---- 4585,4646 ---- - if (remove_trailing_zeroes) - { - int i; -! char *tp; - - /* Using %g or %G: remove superfluous zeroes. */ - if (fmt_spec == 'f') -! tp = tmp + str_arg_l - 1; - else - { -! tp = (char *)vim_strchr((char_u *)tmp, - fmt_spec == 'e' ? 'e' : 'E'); -! if (tp != NULL) - { - /* Remove superfluous '+' and leading - * zeroes from the exponent. */ -! if (tp[1] == '+') - { - /* Change "1.0e+07" to "1.0e07" */ -! STRMOVE(tp + 1, tp + 2); - --str_arg_l; - } -! i = (tp[1] == '-') ? 2 : 1; -! while (tp[i] == '0') - { - /* Change "1.0e07" to "1.0e7" */ -! STRMOVE(tp + i, tp + i + 1); - --str_arg_l; - } -! --tp; - } - } - -! if (tp != NULL && !precision_specified) - /* Remove trailing zeroes, but keep the one - * just after a dot. */ -! while (tp > tmp + 2 && *tp == '0' -! && tp[-1] != '.') - { -! STRMOVE(tp, tp + 1); -! --tp; - --str_arg_l; - } - } - else - { -! char *tp; - - /* Be consistent: some printf("%e") use 1.0e+12 - * and some 1.0e+012. Remove one zero in the last - * case. */ -! tp = (char *)vim_strchr((char_u *)tmp, - fmt_spec == 'e' ? 'e' : 'E'); -! if (tp != NULL && (tp[1] == '+' || tp[1] == '-') -! && tp[2] == '0' -! && vim_isdigit(tp[3]) -! && vim_isdigit(tp[4])) - { -! STRMOVE(tp + 2, tp + 3); - --str_arg_l; - } - } -*** ../vim-7.2.054/src/netbeans.c Sat Nov 15 14:10:23 2008 ---- src/netbeans.c Fri Nov 28 18:51:43 2008 -*************** -*** 1043,1049 **** - nbdebug(("EVT: %s", buf)); - /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */ - if (sd >= 0) -! sock_write(sd, buf, (int)STRLEN(buf)); /* ignore errors */ - } - } - ---- 1043,1049 ---- - nbdebug(("EVT: %s", buf)); - /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */ - if (sd >= 0) -! ignored = sock_write(sd, buf, (int)STRLEN(buf)); - } - } - -*************** -*** 2277,2285 **** - int serNum; - int localTypeNum; - int typeNum; -- # ifdef NBDEBUG -- int len; -- # endif - pos_T *pos; - - if (buf == NULL || buf->bufp == NULL) ---- 2277,2282 ---- -*************** -*** 2303,2315 **** - pos = get_off_or_lnum(buf->bufp, &args); - - cp = (char *)args; -! # ifdef NBDEBUG -! len = -! # endif -! strtol(cp, &cp, 10); - args = (char_u *)cp; - # ifdef NBDEBUG -! if (len != -1) - { - nbdebug((" partial line annotation -- Not Yet Implemented!\n")); - } ---- 2300,2309 ---- - pos = get_off_or_lnum(buf->bufp, &args); - - cp = (char *)args; -! ignored = (int)strtol(cp, &cp, 10); - args = (char_u *)cp; - # ifdef NBDEBUG -! if (ignored != -1) - { - nbdebug((" partial line annotation -- Not Yet Implemented!\n")); - } -*** ../vim-7.2.054/src/option.c Sun Nov 9 13:43:25 2008 ---- src/option.c Fri Nov 28 12:27:34 2008 -*************** -*** 8232,8244 **** - { - if (number == 0 && string != NULL) - { -! int index; - - /* Either we are given a string or we are setting option - * to zero. */ -! for (index = 0; string[index] == '0'; ++index) - ; -! if (string[index] != NUL || index == 0) - { - /* There's another character after zeros or the string - * is empty. In both cases, we are trying to set a ---- 8232,8244 ---- - { - if (number == 0 && string != NULL) - { -! int idx; - - /* Either we are given a string or we are setting option - * to zero. */ -! for (idx = 0; string[idx] == '0'; ++idx) - ; -! if (string[idx] != NUL || idx == 0) - { - /* There's another character after zeros or the string - * is empty. In both cases, we are trying to set a -*** ../vim-7.2.054/src/os_unix.c Wed Nov 12 14:09:38 2008 ---- src/os_unix.c Fri Nov 28 18:39:55 2008 -*************** -*** 315,326 **** - {-1, "Unknown!", FALSE} - }; - - void - mch_write(s, len) - char_u *s; - int len; - { -! write(1, (char *)s, len); - if (p_wd) /* Unix is too fast, slow down a bit more */ - RealWaitForChar(read_cmd_fd, p_wd, NULL); - } ---- 315,329 ---- - {-1, "Unknown!", FALSE} - }; - -+ /* -+ * Write s[len] to the screen. -+ */ - void - mch_write(s, len) - char_u *s; - int len; - { -! ignored = (int)write(1, (char *)s, len); - if (p_wd) /* Unix is too fast, slow down a bit more */ - RealWaitForChar(read_cmd_fd, p_wd, NULL); - } -*************** -*** 3927,3935 **** - */ - if (fd >= 0) - { -! dup(fd); /* To replace stdin (file descriptor 0) */ -! dup(fd); /* To replace stdout (file descriptor 1) */ -! dup(fd); /* To replace stderr (file descriptor 2) */ - - /* Don't need this now that we've duplicated it */ - close(fd); ---- 3930,3938 ---- - */ - if (fd >= 0) - { -! ignored = dup(fd); /* To replace stdin (fd 0) */ -! ignored = dup(fd); /* To replace stdout (fd 1) */ -! ignored = dup(fd); /* To replace stderr (fd 2) */ - - /* Don't need this now that we've duplicated it */ - close(fd); -*************** -*** 3997,4009 **** - - /* set up stdin/stdout/stderr for the child */ - close(0); -! dup(pty_slave_fd); - close(1); -! dup(pty_slave_fd); - if (gui.in_use) - { - close(2); -! dup(pty_slave_fd); - } - - close(pty_slave_fd); /* has been dupped, close it now */ ---- 4000,4012 ---- - - /* set up stdin/stdout/stderr for the child */ - close(0); -! ignored = dup(pty_slave_fd); - close(1); -! ignored = dup(pty_slave_fd); - if (gui.in_use) - { - close(2); -! ignored = dup(pty_slave_fd); - } - - close(pty_slave_fd); /* has been dupped, close it now */ -*************** -*** 4014,4026 **** - /* set up stdin for the child */ - close(fd_toshell[1]); - close(0); -! dup(fd_toshell[0]); - close(fd_toshell[0]); - - /* set up stdout for the child */ - close(fd_fromshell[0]); - close(1); -! dup(fd_fromshell[1]); - close(fd_fromshell[1]); - - # ifdef FEAT_GUI ---- 4017,4029 ---- - /* set up stdin for the child */ - close(fd_toshell[1]); - close(0); -! ignored = dup(fd_toshell[0]); - close(fd_toshell[0]); - - /* set up stdout for the child */ - close(fd_fromshell[0]); - close(1); -! ignored = dup(fd_fromshell[1]); - close(fd_fromshell[1]); - - # ifdef FEAT_GUI -*************** -*** 4028,4034 **** - { - /* set up stderr for the child */ - close(2); -! dup(1); - } - # endif - } ---- 4031,4037 ---- - { - /* set up stderr for the child */ - close(2); -! ignored = dup(1); - } - # endif - } -*************** -*** 4159,4165 **** - && (lnum != - curbuf->b_ml.ml_line_count - || curbuf->b_p_eol))) -! write(toshell_fd, "\n", (size_t)1); - ++lnum; - if (lnum > curbuf->b_op_end.lnum) - { ---- 4162,4169 ---- - && (lnum != - curbuf->b_ml.ml_line_count - || curbuf->b_p_eol))) -! ignored = write(toshell_fd, "\n", -! (size_t)1); - ++lnum; - if (lnum > curbuf->b_op_end.lnum) - { -*** ../vim-7.2.054/src/spell.c Fri Nov 28 10:08:05 2008 ---- src/spell.c Fri Nov 28 12:28:24 2008 -*************** -*** 4950,4956 **** - static void put_sugtime __ARGS((spellinfo_T *spin, FILE *fd)); - static int write_vim_spell __ARGS((spellinfo_T *spin, char_u *fname)); - static void clear_node __ARGS((wordnode_T *node)); -! static int put_node __ARGS((FILE *fd, wordnode_T *node, int index, int regionmask, int prefixtree)); - static void spell_make_sugfile __ARGS((spellinfo_T *spin, char_u *wfname)); - static int sug_filltree __ARGS((spellinfo_T *spin, slang_T *slang)); - static int sug_maketable __ARGS((spellinfo_T *spin)); ---- 4950,4956 ---- - static void put_sugtime __ARGS((spellinfo_T *spin, FILE *fd)); - static int write_vim_spell __ARGS((spellinfo_T *spin, char_u *fname)); - static void clear_node __ARGS((wordnode_T *node)); -! static int put_node __ARGS((FILE *fd, wordnode_T *node, int idx, int regionmask, int prefixtree)); - static void spell_make_sugfile __ARGS((spellinfo_T *spin, char_u *wfname)); - static int sug_filltree __ARGS((spellinfo_T *spin, slang_T *slang)); - static int sug_maketable __ARGS((spellinfo_T *spin)); -*** ../vim-7.2.054/src/ui.c Sun Sep 14 15:57:54 2008 ---- src/ui.c Fri Nov 28 19:04:36 2008 -*************** -*** 1820,1826 **** - #ifdef HAVE_DUP - /* Use stderr for stdin, also works for shell commands. */ - close(0); -! dup(2); - #else - read_cmd_fd = 2; /* read from stderr instead of stdin */ - #endif ---- 1820,1826 ---- - #ifdef HAVE_DUP - /* Use stderr for stdin, also works for shell commands. */ - close(0); -! ignored = dup(2); - #else - read_cmd_fd = 2; /* read from stderr instead of stdin */ - #endif -*** ../vim-7.2.054/src/window.c Sat Nov 15 14:10:23 2008 ---- src/window.c Fri Nov 28 18:46:45 2008 -*************** -*** 4029,4042 **** - if (mch_dirname(cwd, MAXPATHL) == OK) - globaldir = vim_strsave(cwd); - } -! mch_chdir((char *)curwin->w_localdir); -! shorten_fnames(TRUE); - } - else if (globaldir != NULL) - { - /* Window doesn't have a local directory and we are not in the global - * directory: Change to the global directory. */ -! mch_chdir((char *)globaldir); - vim_free(globaldir); - globaldir = NULL; - shorten_fnames(TRUE); ---- 4029,4042 ---- - if (mch_dirname(cwd, MAXPATHL) == OK) - globaldir = vim_strsave(cwd); - } -! if (mch_chdir((char *)curwin->w_localdir) == 0) -! shorten_fnames(TRUE); - } - else if (globaldir != NULL) - { - /* Window doesn't have a local directory and we are not in the global - * directory: Change to the global directory. */ -! ignored = mch_chdir((char *)globaldir); - vim_free(globaldir); - globaldir = NULL; - shorten_fnames(TRUE); -*** ../vim-7.2.054/src/version.c Fri Nov 28 12:05:07 2008 ---- src/version.c Fri Nov 28 21:12:42 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 55, - /**/ - --- -PRINCE: He's come to rescue me, father. -LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ... - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.056 b/vi/vim-7.2/7.2.056 deleted file mode 100644 index 9e23f3d..0000000 --- a/vi/vim-7.2/7.2.056 +++ /dev/null @@ -1,57 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.056 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.056 (after 7.2.050) -Problem: Tests 58 and 59 fail. -Solution: Don't invoke fwrite() with a zero length. (Dominique Pelle) -Files: src/spell.c - - -*** ../vim-7.2.055/src/spell.c Fri Nov 28 21:26:50 2008 ---- src/spell.c Sat Nov 29 19:58:21 2008 -*************** -*** 8112,8118 **** - p = rr == 1 ? ftp->ft_from : ftp->ft_to; - l = (int)STRLEN(p); - putc(l, fd); -! fwv &= fwrite(p, l, (size_t)1, fd); - } - } - ---- 8218,8225 ---- - p = rr == 1 ? ftp->ft_from : ftp->ft_to; - l = (int)STRLEN(p); - putc(l, fd); -! if (l > 0) -! fwv &= fwrite(p, l, (size_t)1, fd); - } - } - -*** ../vim-7.2.055/src/version.c Fri Nov 28 21:26:50 2008 ---- src/version.c Sat Nov 29 20:10:05 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 56, - /**/ - --- -GUARD #1: Where'd you get the coconut? -ARTHUR: We found them. -GUARD #1: Found them? In Mercea? The coconut's tropical! -ARTHUR: What do you mean? -GUARD #1: Well, this is a temperate zone. - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.057 b/vi/vim-7.2/7.2.057 deleted file mode 100644 index 3754912..0000000 --- a/vi/vim-7.2/7.2.057 +++ /dev/null @@ -1,111 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.057 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.057 (after 7.2.056) -Problem: Combination of int and size_t may not work. -Solution: Use size_t for variable. -Files: src/spell.c - - -*** ../vim-7.2.056/src/spell.c Sat Nov 29 20:10:59 2008 ---- src/spell.c Sat Nov 29 20:15:43 2008 -*************** -*** 7926,7932 **** - char_u *p; - int rr; - int retval = OK; -! int fwv = 1; /* collect return value of fwrite() to avoid - warnings from picky compiler */ - - fd = mch_fopen((char *)fname, "w"); ---- 8028,8034 ---- - char_u *p; - int rr; - int retval = OK; -! size_t fwv = 1; /* collect return value of fwrite() to avoid - warnings from picky compiler */ - - fd = mch_fopen((char *)fname, "w"); -*************** -*** 7939,7944 **** ---- 8041,8050 ---- - /* <HEADER>: <fileID> <versionnr> */ - /* <fileID> */ - fwv &= fwrite(VIMSPELLMAGIC, VIMSPELLMAGICL, (size_t)1, fd); -+ if (fwv != (size_t)1) -+ /* Catch first write error, don't try writing more. */ -+ goto theend; -+ - putc(VIMSPELLVERSION, fd); /* <versionnr> */ - - /* -*************** -*** 8300,8310 **** - /* Write another byte to check for errors (file system full). */ - if (putc(0, fd) == EOF) - retval = FAIL; -! - if (fclose(fd) == EOF) - retval = FAIL; - -! if (fwv != 1) - retval = FAIL; - if (retval == FAIL) - EMSG(_(e_write)); ---- 8406,8416 ---- - /* Write another byte to check for errors (file system full). */ - if (putc(0, fd) == EOF) - retval = FAIL; -! theend: - if (fclose(fd) == EOF) - retval = FAIL; - -! if (fwv != (size_t)1) - retval = FAIL; - if (retval == FAIL) - EMSG(_(e_write)); -*************** -*** 9897,9903 **** - char_u *p; - int len; - int totlen; -! int x = 1; /* collect return value of fwrite() */ - - if (fd != NULL) - put_bytes(fd, (long_u)gap->ga_len, 2); /* <prefcondcnt> */ ---- 10003,10009 ---- - char_u *p; - int len; - int totlen; -! size_t x = 1; /* collect return value of fwrite() */ - - if (fd != NULL) - put_bytes(fd, (long_u)gap->ga_len, 2); /* <prefcondcnt> */ -*** ../vim-7.2.056/src/version.c Sat Nov 29 20:10:59 2008 ---- src/version.c Sat Nov 29 20:13:46 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 57, - /**/ - --- -GUARD #1: What -- a swallow carrying a coconut? -ARTHUR: It could grip it by the husk! -GUARD #1: It's not a question of where he grips it! It's a simple question - of weight ratios! A five ounce bird could not carry a 1 pound - coconut. - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.058 b/vi/vim-7.2/7.2.058 deleted file mode 100644 index 95de243..0000000 --- a/vi/vim-7.2/7.2.058 +++ /dev/null @@ -1,83 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.058 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.058 -Problem: Can't add a patch name to the ":version" output. -Solution: Add the extra_patches array. -Files: src/version.c - - -*** ../vim-7.2.057/src/version.c Sat Nov 29 20:18:44 2008 ---- src/version.c Sun Nov 30 12:12:31 2008 -*************** -*** 794,799 **** ---- 796,814 ---- - 0 - }; - -+ /* -+ * Place to put a short description when adding a feature with a patch. -+ * Keep it short, e.g.,: "relative numbers", "persistent undo". -+ * Also add a comment marker to separate the lines. -+ * See the official Vim patches for the diff format: It must use a context of -+ * one line only. Use "diff -C2". -+ */ -+ static char *(extra_patches[]) = -+ { /* Add your patch description below this line */ -+ /**/ -+ NULL -+ }; -+ - int - highest_patch() - { -*************** -*** 939,944 **** ---- 954,972 ---- - } - } - -+ /* Print the list of extra patch descriptions if there is at least one. */ -+ if (extra_patches[0] != NULL) -+ { -+ MSG_PUTS(_("\nExtra patches: ")); -+ s = ""; -+ for (i = 0; extra_patches[i] != NULL; ++i) -+ { -+ MSG_PUTS(s); -+ s = ", "; -+ MSG_PUTS(extra_patches[i]); -+ } -+ } -+ - #ifdef MODIFIED_BY - MSG_PUTS("\n"); - MSG_PUTS(_("Modified by ")); -*** ../vim-7.2.057/src/version.c Sat Nov 29 20:18:44 2008 ---- src/version.c Sun Nov 30 12:12:31 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 58, - /**/ - --- -ARTHUR: Well, it doesn't matter. Will you go and tell your master that - Arthur from the Court of Camelot is here. -GUARD #1: Listen, in order to maintain air-speed velocity, a swallow - needs to beat its wings 43 times every second, right? -ARTHUR: Please! - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.059 b/vi/vim-7.2/7.2.059 deleted file mode 100644 index 0012ad6..0000000 --- a/vi/vim-7.2/7.2.059 +++ /dev/null @@ -1,70 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.059 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.059 -Problem: Diff display is not always updated. -Solution: Update the display more often. -Files: src/diff.c - - -*** ../vim-7.2.058/src/diff.c Fri Nov 28 21:26:50 2008 ---- src/diff.c Fri Nov 28 17:23:35 2008 -*************** -*** 73,78 **** ---- 73,80 ---- - { - tp->tp_diffbuf[i] = NULL; - tp->tp_diff_invalid = TRUE; -+ if (tp == curtab) -+ diff_redraw(TRUE); - } - } - } -*************** -*** 102,107 **** ---- 104,110 ---- - { - curtab->tp_diffbuf[i] = NULL; - curtab->tp_diff_invalid = TRUE; -+ diff_redraw(TRUE); - } - } - } -*************** -*** 131,136 **** ---- 134,140 ---- - { - curtab->tp_diffbuf[i] = buf; - curtab->tp_diff_invalid = TRUE; -+ diff_redraw(TRUE); - return; - } - -*** ../vim-7.2.058/src/version.c Sun Nov 30 12:14:35 2008 ---- src/version.c Sun Nov 30 15:13:18 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 59, - /**/ - --- -GUARD #2: Wait a minute -- supposing two swallows carried it together? -GUARD #1: No, they'd have to have it on a line. -GUARD #2: Well, simple! They'd just use a standard creeper! -GUARD #1: What, held under the dorsal guiding feathers? -GUARD #2: Well, why not? - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.060 b/vi/vim-7.2/7.2.060 deleted file mode 100644 index ec6e6b7..0000000 --- a/vi/vim-7.2/7.2.060 +++ /dev/null @@ -1,1102 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.060 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.060 -Problem: When a spell files has many compound rules it may take a very long - time making the list of suggestions. Displaying also can be slow - when there are misspelled words. - Can't parse some Hunspell .aff files. -Solution: Check if a compounding can possibly work before trying a - combination, if the compound rules don't contain wildcards. - Implement using CHECKCOMPOUNDPATTERN. - Ignore COMPOUNDRULES. Ignore a comment after most items. - Accept ONLYINCOMPOUND as an alias for NEEDCOMPOUND. - Accept FORBIDDENWORD as an alias for BAD. -Files: runtime/doc/spell.txt, src/spell.c - - -*** ../vim-7.2.059/runtime/doc/spell.txt Sat Aug 9 19:36:52 2008 ---- runtime/doc/spell.txt Sun Nov 30 16:30:02 2008 -*************** -*** 1,4 **** -! *spell.txt* For Vim version 7.2. Last change: 2008 Jun 21 - - - VIM REFERENCE MANUAL by Bram Moolenaar ---- 1,4 ---- -! *spell.txt* For Vim version 7.2. Last change: 2008 Nov 30 - - - VIM REFERENCE MANUAL by Bram Moolenaar -*************** -*** 831,838 **** - - # comment line ~ - -! With some items it's also possible to put a comment after it, but this isn't -! supported in general. - - - ENCODING *spell-SET* ---- 831,841 ---- - - # comment line ~ - -! Items with a fixed number of arguments can be followed by a comment. But only -! if none of the arguments can contain white space. The comment must start with -! a "#" character. Example: -! -! KEEPCASE = # fix case for words with this flag ~ - - - ENCODING *spell-SET* -*************** -*** 965,970 **** ---- 968,976 ---- - - Note: When using utf-8 only characters up to 65000 may be used for flags. - -+ Note: even when using "num" or "long" the number of flags available to -+ compounding and prefixes is limited to about 250. -+ - - AFFIXES - *spell-PFX* *spell-SFX* -*************** -*** 1178,1183 **** ---- 1185,1193 ---- - The flag also applies to the word with affixes, thus this can be used to mark - a whole bunch of related words as bad. - -+ *spell-FORBIDDENWORD* -+ FORBIDDENWORD can be used just like BAD. For compatibility with Hunspell. -+ - *spell-NEEDAFFIX* - The NEEDAFFIX flag is used to require that a word is used with an affix. The - word itself is not a good word (unless there is an empty affix). Example: -*************** -*** 1268,1273 **** ---- 1278,1287 ---- - - NEEDCOMPOUND & ~ - -+ *spell-ONLYINCOMPOUND* -+ The ONLYINCOMPOUND does exactly the same as NEEDCOMPOUND. Supported for -+ compatiblity with Hunspell. -+ - *spell-COMPOUNDMIN* - The minimal character length of a word used for compounding is specified with - COMPOUNDMIN. Example: -*************** -*** 1328,1333 **** ---- 1342,1361 ---- - rules. Can also be used for an affix to count the affix as a compounding - word. - -+ *spell-CHECKCOMPOUNDPATTERN* -+ CHECKCOMPOUNDPATTERN is used to define patterns that, when matching at the -+ position where two words are compounded together forbids the compound. -+ For example: -+ CHECKCOMPOUNDPATTERN o e ~ -+ -+ This forbids compounding if the first word ends in "o" and the second word -+ starts with "e". -+ -+ The arguments must be plain text, no patterns are actually supported, despite -+ the item name. Case is always ignored. -+ -+ The Hunspell feature to use three arguments and flags is not supported. -+ - *spell-SYLLABLE* - The SYLLABLE item defines characters or character sequences that are used to - count the number of syllables in a word. Example: -*************** -*** 1496,1501 **** ---- 1524,1533 ---- - ACCENT (Hunspell) *spell-ACCENT* - Use MAP instead. |spell-MAP| - -+ BREAK (Hunspell) *spell-BREAK* -+ Define break points. Unclear how it works exactly. -+ Not supported. -+ - CHECKCOMPOUNDCASE (Hunspell) *spell-CHECKCOMPOUNDCASE* - Disallow uppercase letters at compound word boundaries. - Not supported. -*************** -*** 1512,1520 **** - Forbid three identical characters when compounding. Not - supported. - -- CHECKCOMPOUNDPATTERN (Hunspell) *spell-CHECKCOMPOUNDPATTERN* -- Forbid compounding when patterns match. Not supported. -- - COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES* - Enables using two prefixes. Not supported. - ---- 1544,1549 ---- -*************** -*** 1536,1548 **** - COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE* - Use COMPOUNDRULE instead. |spell-COMPOUNDRULE| - - COMPOUNDSYLLABLE (Hunspell) *spell-COMPOUNDSYLLABLE* - Use SYLLABLE and COMPOUNDSYLMAX instead. |spell-SYLLABLE| - |spell-COMPOUNDSYLMAX| - -! FORBIDDENWORD (Hunspell) *spell-FORBIDDENWORD* -! Use BAD instead. |spell-BAD| -! - LANG (Hunspell) *spell-LANG* - This specifies language-specific behavior. This actually - moves part of the language knowledge into the program, ---- 1565,1582 ---- - COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE* - Use COMPOUNDRULE instead. |spell-COMPOUNDRULE| - -+ COMPOUNDRULES (Hunspell) *spell-COMPOUNDRULES* -+ Number of COMPOUNDRULE lines following. Ignored, but the -+ argument must be a number. -+ - COMPOUNDSYLLABLE (Hunspell) *spell-COMPOUNDSYLLABLE* - Use SYLLABLE and COMPOUNDSYLMAX instead. |spell-SYLLABLE| - |spell-COMPOUNDSYLMAX| - -! KEY (Hunspell) *spell-KEY* -! Define characters that are close together on the keyboard. -! Used to give better suggestions. Not supported. -! - LANG (Hunspell) *spell-LANG* - This specifies language-specific behavior. This actually - moves part of the language knowledge into the program, -*************** -*** 1553,1562 **** - Only needed for morphological analysis. - - MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS* -! Not supported. -! -! ONLYINCOMPOUND (Hunspell) *spell-ONLYINCOMPOUND* -! Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND| - - PSEUDOROOT (Hunspell) *spell-PSEUDOROOT* - Use NEEDAFFIX instead. |spell-NEEDAFFIX| ---- 1587,1593 ---- - Only needed for morphological analysis. - - MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS* -! Set number of n-gram suggestions. Not supported. - - PSEUDOROOT (Hunspell) *spell-PSEUDOROOT* - Use NEEDAFFIX instead. |spell-NEEDAFFIX| -*** ../vim-7.2.059/src/spell.c Sat Nov 29 20:18:44 2008 ---- src/spell.c Sun Nov 30 20:59:13 2008 -*************** -*** 469,474 **** ---- 469,475 ---- - garray_T sl_comppat; /* CHECKCOMPOUNDPATTERN items */ - regprog_T *sl_compprog; /* COMPOUNDRULE turned into a regexp progrm - * (NULL when no compounding) */ -+ char_u *sl_comprules; /* all COMPOUNDRULE concatenated (or NULL) */ - char_u *sl_compstartflags; /* flags for first compound word */ - char_u *sl_compallflags; /* all flags for compound words */ - char_u sl_nobreak; /* When TRUE: no spaces between words */ -*************** -*** 839,845 **** ---- 840,849 ---- - static void slang_clear __ARGS((slang_T *lp)); - static void slang_clear_sug __ARGS((slang_T *lp)); - static void find_word __ARGS((matchinf_T *mip, int mode)); -+ static int match_checkcompoundpattern __ARGS((char_u *ptr, int wlen, garray_T *gap)); - static int can_compound __ARGS((slang_T *slang, char_u *word, char_u *flags)); -+ static int can_be_compound __ARGS((trystate_T *sp, slang_T *slang, char_u *compflags, int flag)); -+ static int match_compoundrule __ARGS((slang_T *slang, char_u *compflags)); - static int valid_word_prefix __ARGS((int totprefcnt, int arridx, int flags, char_u *word, slang_T *slang, int cond_req)); - static void find_prefix __ARGS((matchinf_T *mip, int mode)); - static int fold_more __ARGS((matchinf_T *mip)); -*************** -*** 1519,1524 **** ---- 1523,1533 ---- - ((unsigned)flags >> 24))) - continue; - -+ /* If there is a match with a CHECKCOMPOUNDPATTERN rule -+ * discard the compound word. */ -+ if (match_checkcompoundpattern(ptr, wlen, &slang->sl_comppat)) -+ continue; -+ - if (mode == FIND_COMPOUND) - { - int capflags; -*************** -*** 1577,1582 **** ---- 1586,1596 ---- - if (!can_compound(slang, fword, mip->mi_compflags)) - continue; - } -+ else if (slang->sl_comprules != NULL -+ && !match_compoundrule(slang, mip->mi_compflags)) -+ /* The compound flags collected so far do not match any -+ * COMPOUNDRULE, discard the compounded word. */ -+ continue; - } - - /* Check NEEDCOMPOUND: can't use word without compounding. */ -*************** -*** 1727,1732 **** ---- 1741,1779 ---- - } - - /* -+ * Return TRUE if there is a match between the word ptr[wlen] and -+ * CHECKCOMPOUNDPATTERN rules, assuming that we will concatenate with another -+ * word. -+ * A match means that the first part of CHECKCOMPOUNDPATTERN matches at the -+ * end of ptr[wlen] and the second part matches after it. -+ */ -+ static int -+ match_checkcompoundpattern(ptr, wlen, gap) -+ char_u *ptr; -+ int wlen; -+ garray_T *gap; /* &sl_comppat */ -+ { -+ int i; -+ char_u *p; -+ int len; -+ -+ for (i = 0; i + 1 < gap->ga_len; i += 2) -+ { -+ p = ((char_u **)gap->ga_data)[i + 1]; -+ if (STRNCMP(ptr + wlen, p, STRLEN(p)) == 0) -+ { -+ /* Second part matches at start of following compound word, now -+ * check if first part matches at end of previous word. */ -+ p = ((char_u **)gap->ga_data)[i]; -+ len = STRLEN(p); -+ if (len <= wlen && STRNCMP(ptr + wlen - len, p, len) == 0) -+ return TRUE; -+ } -+ } -+ return FALSE; -+ } -+ -+ /* - * Return TRUE if "flags" is a valid sequence of compound flags and "word" - * does not have too many syllables. - */ -*************** -*** 1773,1778 **** ---- 1820,1917 ---- - } - - /* -+ * Return TRUE when the sequence of flags in "compflags" plus "flag" can -+ * possibly form a valid compounded word. This also checks the COMPOUNDRULE -+ * lines if they don't contain wildcards. -+ */ -+ static int -+ can_be_compound(sp, slang, compflags, flag) -+ trystate_T *sp; -+ slang_T *slang; -+ char_u *compflags; -+ int flag; -+ { -+ /* If the flag doesn't appear in sl_compstartflags or sl_compallflags -+ * then it can't possibly compound. */ -+ if (!byte_in_str(sp->ts_complen == sp->ts_compsplit -+ ? slang->sl_compstartflags : slang->sl_compallflags, flag)) -+ return FALSE; -+ -+ /* If there are no wildcards, we can check if the flags collected so far -+ * possibly can form a match with COMPOUNDRULE patterns. This only -+ * makes sense when we have two or more words. */ -+ if (slang->sl_comprules != NULL && sp->ts_complen > sp->ts_compsplit) -+ { -+ int v; -+ -+ compflags[sp->ts_complen] = flag; -+ compflags[sp->ts_complen + 1] = NUL; -+ v = match_compoundrule(slang, compflags + sp->ts_compsplit); -+ compflags[sp->ts_complen] = NUL; -+ return v; -+ } -+ -+ return TRUE; -+ } -+ -+ -+ /* -+ * Return TRUE if the compound flags in compflags[] match the start of any -+ * compound rule. This is used to stop trying a compound if the flags -+ * collected so far can't possibly match any compound rule. -+ * Caller must check that slang->sl_comprules is not NULL. -+ */ -+ static int -+ match_compoundrule(slang, compflags) -+ slang_T *slang; -+ char_u *compflags; -+ { -+ char_u *p; -+ int i; -+ int c; -+ -+ /* loop over all the COMPOUNDRULE entries */ -+ for (p = slang->sl_comprules; *p != NUL; ++p) -+ { -+ /* loop over the flags in the compound word we have made, match -+ * them against the current rule entry */ -+ for (i = 0; ; ++i) -+ { -+ c = compflags[i]; -+ if (c == NUL) -+ /* found a rule that matches for the flags we have so far */ -+ return TRUE; -+ if (*p == '/' || *p == NUL) -+ break; /* end of rule, it's too short */ -+ if (*p == '[') -+ { -+ int match = FALSE; -+ -+ /* compare against all the flags in [] */ -+ ++p; -+ while (*p != ']' && *p != NUL) -+ if (*p++ == c) -+ match = TRUE; -+ if (!match) -+ break; /* none matches */ -+ } -+ else if (*p != c) -+ break; /* flag of word doesn't match flag in pattern */ -+ ++p; -+ } -+ -+ /* Skip to the next "/", where the next pattern starts. */ -+ p = vim_strchr(p, '/'); -+ if (p == NULL) -+ break; -+ } -+ -+ /* Checked all the rules and none of them match the flags, so there -+ * can't possibly be a compound starting with these flags. */ -+ return FALSE; -+ } -+ -+ /* - * Return non-zero if the prefix indicated by "arridx" matches with the prefix - * ID in "flags" for the word "word". - * The WF_RAREPFX flag is included in the return value for a rare prefix. -*************** -*** 2513,2521 **** ---- 2652,2662 ---- - lp->sl_midword = NULL; - - vim_free(lp->sl_compprog); -+ vim_free(lp->sl_comprules); - vim_free(lp->sl_compstartflags); - vim_free(lp->sl_compallflags); - lp->sl_compprog = NULL; -+ lp->sl_comprules = NULL; - lp->sl_compstartflags = NULL; - lp->sl_compallflags = NULL; - -*************** -*** 3460,3465 **** ---- 3601,3607 ---- - char_u *pp; - char_u *cp; - char_u *ap; -+ char_u *crp; - int cnt; - garray_T *gap; - -*************** -*** 3545,3550 **** ---- 3687,3698 ---- - slang->sl_compallflags = ap; - *ap = NUL; - -+ /* And a list of all patterns in their original form, for checking whether -+ * compounding may work in match_compoundrule(). This is freed when we -+ * encounter a wildcard, the check doesn't work then. */ -+ crp = alloc(todo + 1); -+ slang->sl_comprules = crp; -+ - pp = pat; - *pp++ = '^'; - *pp++ = '\\'; -*************** -*** 3587,3592 **** ---- 3735,3754 ---- - atstart = 0; - } - } -+ -+ /* Copy flag to "sl_comprules", unless we run into a wildcard. */ -+ if (crp != NULL) -+ { -+ if (c == '+' || c == '*') -+ { -+ vim_free(slang->sl_comprules); -+ slang->sl_comprules = NULL; -+ crp = NULL; -+ } -+ else -+ *crp++ = c; -+ } -+ - if (c == '/') /* slash separates two items */ - { - *pp++ = '\\'; -*************** -*** 3611,3616 **** ---- 3773,3781 ---- - *pp++ = '$'; - *pp = NUL; - -+ if (crp != NULL) -+ *crp = NUL; -+ - slang->sl_compprog = vim_regcomp(pat, RE_MAGIC + RE_STRING + RE_STRICT); - vim_free(pat); - if (slang->sl_compprog == NULL) -*************** -*** 4915,4920 **** ---- 5080,5086 ---- - } spellinfo_T; - - static afffile_T *spell_read_aff __ARGS((spellinfo_T *spin, char_u *fname)); -+ static int is_aff_rule __ARGS((char_u **items, int itemcnt, char *rulename, int mincount)); - static void aff_process_flags __ARGS((afffile_T *affile, affentry_T *entry)); - static int spell_info_item __ARGS((char_u *s)); - static unsigned affitem2flag __ARGS((int flagtype, char_u *item, char_u *fname, int lnum)); -*************** -*** 5223,5230 **** - /* Handle non-empty lines. */ - if (itemcnt > 0) - { -! if (STRCMP(items[0], "SET") == 0 && itemcnt == 2 -! && aff->af_enc == NULL) - { - #ifdef FEAT_MBYTE - /* Setup for conversion from "ENC" to 'encoding'. */ ---- 5389,5395 ---- - /* Handle non-empty lines. */ - if (itemcnt > 0) - { -! if (is_aff_rule(items, itemcnt, "SET", 2) && aff->af_enc == NULL) - { - #ifdef FEAT_MBYTE - /* Setup for conversion from "ENC" to 'encoding'. */ -*************** -*** 5239,5245 **** - smsg((char_u *)_("Conversion in %s not supported"), fname); - #endif - } -! else if (STRCMP(items[0], "FLAG") == 0 && itemcnt == 2 - && aff->af_flagtype == AFT_CHAR) - { - if (STRCMP(items[1], "long") == 0) ---- 5404,5410 ---- - smsg((char_u *)_("Conversion in %s not supported"), fname); - #endif - } -! else if (is_aff_rule(items, itemcnt, "FLAG", 2) - && aff->af_flagtype == AFT_CHAR) - { - if (STRCMP(items[1], "long") == 0) -*************** -*** 5284,5352 **** - spin->si_info = p; - } - } -! else if (STRCMP(items[0], "MIDWORD") == 0 && itemcnt == 2 - && midword == NULL) - { - midword = getroom_save(spin, items[1]); - } -! else if (STRCMP(items[0], "TRY") == 0 && itemcnt == 2) - { - /* ignored, we look in the tree for what chars may appear */ - } - /* TODO: remove "RAR" later */ -! else if ((STRCMP(items[0], "RAR") == 0 -! || STRCMP(items[0], "RARE") == 0) && itemcnt == 2 -! && aff->af_rare == 0) - { - aff->af_rare = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } - /* TODO: remove "KEP" later */ -! else if ((STRCMP(items[0], "KEP") == 0 -! || STRCMP(items[0], "KEEPCASE") == 0) && itemcnt == 2 - && aff->af_keepcase == 0) - { - aff->af_keepcase = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (STRCMP(items[0], "BAD") == 0 && itemcnt == 2 -! && aff->af_bad == 0) - { - aff->af_bad = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (STRCMP(items[0], "NEEDAFFIX") == 0 && itemcnt == 2 - && aff->af_needaffix == 0) - { - aff->af_needaffix = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (STRCMP(items[0], "CIRCUMFIX") == 0 && itemcnt == 2 - && aff->af_circumfix == 0) - { - aff->af_circumfix = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (STRCMP(items[0], "NOSUGGEST") == 0 && itemcnt == 2 - && aff->af_nosuggest == 0) - { - aff->af_nosuggest = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (STRCMP(items[0], "NEEDCOMPOUND") == 0 && itemcnt == 2 - && aff->af_needcomp == 0) - { - aff->af_needcomp = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (STRCMP(items[0], "COMPOUNDROOT") == 0 && itemcnt == 2 - && aff->af_comproot == 0) - { - aff->af_comproot = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (STRCMP(items[0], "COMPOUNDFORBIDFLAG") == 0 -! && itemcnt == 2 && aff->af_compforbid == 0) - { - aff->af_compforbid = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); ---- 5449,5519 ---- - spin->si_info = p; - } - } -! else if (is_aff_rule(items, itemcnt, "MIDWORD", 2) - && midword == NULL) - { - midword = getroom_save(spin, items[1]); - } -! else if (is_aff_rule(items, itemcnt, "TRY", 2)) - { - /* ignored, we look in the tree for what chars may appear */ - } - /* TODO: remove "RAR" later */ -! else if ((is_aff_rule(items, itemcnt, "RAR", 2) -! || is_aff_rule(items, itemcnt, "RARE", 2)) -! && aff->af_rare == 0) - { - aff->af_rare = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } - /* TODO: remove "KEP" later */ -! else if ((is_aff_rule(items, itemcnt, "KEP", 2) -! || is_aff_rule(items, itemcnt, "KEEPCASE", 2)) - && aff->af_keepcase == 0) - { - aff->af_keepcase = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if ((is_aff_rule(items, itemcnt, "BAD", 2) -! || is_aff_rule(items, itemcnt, "FORBIDDENWORD", 2)) -! && aff->af_bad == 0) - { - aff->af_bad = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (is_aff_rule(items, itemcnt, "NEEDAFFIX", 2) - && aff->af_needaffix == 0) - { - aff->af_needaffix = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (is_aff_rule(items, itemcnt, "CIRCUMFIX", 2) - && aff->af_circumfix == 0) - { - aff->af_circumfix = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (is_aff_rule(items, itemcnt, "NOSUGGEST", 2) - && aff->af_nosuggest == 0) - { - aff->af_nosuggest = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if ((is_aff_rule(items, itemcnt, "NEEDCOMPOUND", 2) -! || is_aff_rule(items, itemcnt, "ONLYINCOMPOUND", 2)) - && aff->af_needcomp == 0) - { - aff->af_needcomp = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (is_aff_rule(items, itemcnt, "COMPOUNDROOT", 2) - && aff->af_comproot == 0) - { - aff->af_comproot = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); - } -! else if (is_aff_rule(items, itemcnt, "COMPOUNDFORBIDFLAG", 2) -! && aff->af_compforbid == 0) - { - aff->af_compforbid = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); -*************** -*** 5354,5361 **** - smsg((char_u *)_("Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"), - fname, lnum); - } -! else if (STRCMP(items[0], "COMPOUNDPERMITFLAG") == 0 -! && itemcnt == 2 && aff->af_comppermit == 0) - { - aff->af_comppermit = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); ---- 5521,5528 ---- - smsg((char_u *)_("Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"), - fname, lnum); - } -! else if (is_aff_rule(items, itemcnt, "COMPOUNDPERMITFLAG", 2) -! && aff->af_comppermit == 0) - { - aff->af_comppermit = affitem2flag(aff->af_flagtype, items[1], - fname, lnum); -*************** -*** 5363,5369 **** - smsg((char_u *)_("Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"), - fname, lnum); - } -! else if (STRCMP(items[0], "COMPOUNDFLAG") == 0 && itemcnt == 2 - && compflags == NULL) - { - /* Turn flag "c" into COMPOUNDRULE compatible string "c+", ---- 5530,5536 ---- - smsg((char_u *)_("Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"), - fname, lnum); - } -! else if (is_aff_rule(items, itemcnt, "COMPOUNDFLAG", 2) - && compflags == NULL) - { - /* Turn flag "c" into COMPOUNDRULE compatible string "c+", -*************** -*** 5376,5382 **** - compflags = p; - } - } -! else if (STRCMP(items[0], "COMPOUNDRULE") == 0 && itemcnt == 2) - { - /* Concatenate this string to previously defined ones, using a - * slash to separate them. */ ---- 5543,5557 ---- - compflags = p; - } - } -! else if (is_aff_rule(items, itemcnt, "COMPOUNDRULES", 2)) -! { -! /* We don't use the count, but do check that it's a number and -! * not COMPOUNDRULE mistyped. */ -! if (atoi((char *)items[1]) == 0) -! smsg((char_u *)_("Wrong COMPOUNDRULES value in %s line %d: %s"), -! fname, lnum, items[1]); -! } -! else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2)) - { - /* Concatenate this string to previously defined ones, using a - * slash to separate them. */ -*************** -*** 5395,5401 **** - compflags = p; - } - } -! else if (STRCMP(items[0], "COMPOUNDWORDMAX") == 0 && itemcnt == 2 - && compmax == 0) - { - compmax = atoi((char *)items[1]); ---- 5570,5576 ---- - compflags = p; - } - } -! else if (is_aff_rule(items, itemcnt, "COMPOUNDWORDMAX", 2) - && compmax == 0) - { - compmax = atoi((char *)items[1]); -*************** -*** 5403,5409 **** - smsg((char_u *)_("Wrong COMPOUNDWORDMAX value in %s line %d: %s"), - fname, lnum, items[1]); - } -! else if (STRCMP(items[0], "COMPOUNDMIN") == 0 && itemcnt == 2 - && compminlen == 0) - { - compminlen = atoi((char *)items[1]); ---- 5578,5584 ---- - smsg((char_u *)_("Wrong COMPOUNDWORDMAX value in %s line %d: %s"), - fname, lnum, items[1]); - } -! else if (is_aff_rule(items, itemcnt, "COMPOUNDMIN", 2) - && compminlen == 0) - { - compminlen = atoi((char *)items[1]); -*************** -*** 5411,5417 **** - smsg((char_u *)_("Wrong COMPOUNDMIN value in %s line %d: %s"), - fname, lnum, items[1]); - } -! else if (STRCMP(items[0], "COMPOUNDSYLMAX") == 0 && itemcnt == 2 - && compsylmax == 0) - { - compsylmax = atoi((char *)items[1]); ---- 5586,5592 ---- - smsg((char_u *)_("Wrong COMPOUNDMIN value in %s line %d: %s"), - fname, lnum, items[1]); - } -! else if (is_aff_rule(items, itemcnt, "COMPOUNDSYLMAX", 2) - && compsylmax == 0) - { - compsylmax = atoi((char *)items[1]); -*************** -*** 5419,5450 **** - smsg((char_u *)_("Wrong COMPOUNDSYLMAX value in %s line %d: %s"), - fname, lnum, items[1]); - } -! else if (STRCMP(items[0], "CHECKCOMPOUNDDUP") == 0 && itemcnt == 1) - { - compoptions |= COMP_CHECKDUP; - } -! else if (STRCMP(items[0], "CHECKCOMPOUNDREP") == 0 && itemcnt == 1) - { - compoptions |= COMP_CHECKREP; - } -! else if (STRCMP(items[0], "CHECKCOMPOUNDCASE") == 0 && itemcnt == 1) - { - compoptions |= COMP_CHECKCASE; - } -! else if (STRCMP(items[0], "CHECKCOMPOUNDTRIPLE") == 0 -! && itemcnt == 1) - { - compoptions |= COMP_CHECKTRIPLE; - } -! else if (STRCMP(items[0], "CHECKCOMPOUNDPATTERN") == 0 -! && itemcnt == 2) - { - if (atoi((char *)items[1]) == 0) - smsg((char_u *)_("Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"), - fname, lnum, items[1]); - } -! else if (STRCMP(items[0], "CHECKCOMPOUNDPATTERN") == 0 -! && itemcnt == 3) - { - garray_T *gap = &spin->si_comppat; - int i; ---- 5594,5622 ---- - smsg((char_u *)_("Wrong COMPOUNDSYLMAX value in %s line %d: %s"), - fname, lnum, items[1]); - } -! else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDDUP", 1)) - { - compoptions |= COMP_CHECKDUP; - } -! else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDREP", 1)) - { - compoptions |= COMP_CHECKREP; - } -! else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDCASE", 1)) - { - compoptions |= COMP_CHECKCASE; - } -! else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDTRIPLE", 1)) - { - compoptions |= COMP_CHECKTRIPLE; - } -! else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 2)) - { - if (atoi((char *)items[1]) == 0) - smsg((char_u *)_("Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"), - fname, lnum, items[1]); - } -! else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 3)) - { - garray_T *gap = &spin->si_comppat; - int i; -*************** -*** 5463,5486 **** - = getroom_save(spin, items[2]); - } - } -! else if (STRCMP(items[0], "SYLLABLE") == 0 && itemcnt == 2 - && syllable == NULL) - { - syllable = getroom_save(spin, items[1]); - } -! else if (STRCMP(items[0], "NOBREAK") == 0 && itemcnt == 1) - { - spin->si_nobreak = TRUE; - } -! else if (STRCMP(items[0], "NOSPLITSUGS") == 0 && itemcnt == 1) - { - spin->si_nosplitsugs = TRUE; - } -! else if (STRCMP(items[0], "NOSUGFILE") == 0 && itemcnt == 1) - { - spin->si_nosugfile = TRUE; - } -! else if (STRCMP(items[0], "PFXPOSTPONE") == 0 && itemcnt == 1) - { - aff->af_pfxpostpone = TRUE; - } ---- 5635,5658 ---- - = getroom_save(spin, items[2]); - } - } -! else if (is_aff_rule(items, itemcnt, "SYLLABLE", 2) - && syllable == NULL) - { - syllable = getroom_save(spin, items[1]); - } -! else if (is_aff_rule(items, itemcnt, "NOBREAK", 1)) - { - spin->si_nobreak = TRUE; - } -! else if (is_aff_rule(items, itemcnt, "NOSPLITSUGS", 1)) - { - spin->si_nosplitsugs = TRUE; - } -! else if (is_aff_rule(items, itemcnt, "NOSUGFILE", 1)) - { - spin->si_nosugfile = TRUE; - } -! else if (is_aff_rule(items, itemcnt, "PFXPOSTPONE", 1)) - { - aff->af_pfxpostpone = TRUE; - } -*************** -*** 5771,5794 **** - } - } - } -! else if (STRCMP(items[0], "FOL") == 0 && itemcnt == 2 -! && fol == NULL) - { - fol = vim_strsave(items[1]); - } -! else if (STRCMP(items[0], "LOW") == 0 && itemcnt == 2 -! && low == NULL) - { - low = vim_strsave(items[1]); - } -! else if (STRCMP(items[0], "UPP") == 0 && itemcnt == 2 -! && upp == NULL) - { - upp = vim_strsave(items[1]); - } -! else if ((STRCMP(items[0], "REP") == 0 -! || STRCMP(items[0], "REPSAL") == 0) -! && itemcnt == 2) - { - /* Ignore REP/REPSAL count */; - if (!isdigit(*items[1])) ---- 5943,5962 ---- - } - } - } -! else if (is_aff_rule(items, itemcnt, "FOL", 2) && fol == NULL) - { - fol = vim_strsave(items[1]); - } -! else if (is_aff_rule(items, itemcnt, "LOW", 2) && low == NULL) - { - low = vim_strsave(items[1]); - } -! else if (is_aff_rule(items, itemcnt, "UPP", 2) && upp == NULL) - { - upp = vim_strsave(items[1]); - } -! else if (is_aff_rule(items, itemcnt, "REP", 2) -! || is_aff_rule(items, itemcnt, "REPSAL", 2)) - { - /* Ignore REP/REPSAL count */; - if (!isdigit(*items[1])) -*************** -*** 5819,5825 **** - : &spin->si_rep, items[1], items[2]); - } - } -! else if (STRCMP(items[0], "MAP") == 0 && itemcnt == 2) - { - /* MAP item or count */ - if (!found_map) ---- 5987,5993 ---- - : &spin->si_rep, items[1], items[2]); - } - } -! else if (is_aff_rule(items, itemcnt, "MAP", 2)) - { - /* MAP item or count */ - if (!found_map) -*************** -*** 5856,5864 **** - ga_append(&spin->si_map, '/'); - } - } -! /* Accept "SAL from to" and "SAL from to # comment". */ -! else if (STRCMP(items[0], "SAL") == 0 -! && (itemcnt == 3 || (itemcnt > 3 && items[3][0] == '#'))) - { - if (do_sal) - { ---- 6024,6031 ---- - ga_append(&spin->si_map, '/'); - } - } -! /* Accept "SAL from to" and "SAL from to #comment". */ -! else if (is_aff_rule(items, itemcnt, "SAL", 3)) - { - if (do_sal) - { -*************** -*** 5877,5888 **** - : items[2]); - } - } -! else if (STRCMP(items[0], "SOFOFROM") == 0 && itemcnt == 2 - && sofofrom == NULL) - { - sofofrom = getroom_save(spin, items[1]); - } -! else if (STRCMP(items[0], "SOFOTO") == 0 && itemcnt == 2 - && sofoto == NULL) - { - sofoto = getroom_save(spin, items[1]); ---- 6044,6055 ---- - : items[2]); - } - } -! else if (is_aff_rule(items, itemcnt, "SOFOFROM", 2) - && sofofrom == NULL) - { - sofofrom = getroom_save(spin, items[1]); - } -! else if (is_aff_rule(items, itemcnt, "SOFOTO", 2) - && sofoto == NULL) - { - sofoto = getroom_save(spin, items[1]); -*************** -*** 6017,6022 **** ---- 6184,6205 ---- - } - - /* -+ * Return TRUE when items[0] equals "rulename", there are "mincount" items or -+ * a comment is following after item "mincount". -+ */ -+ static int -+ is_aff_rule(items, itemcnt, rulename, mincount) -+ char_u **items; -+ int itemcnt; -+ char *rulename; -+ int mincount; -+ { -+ return (STRCMP(items[0], rulename) == 0 -+ && (itemcnt == mincount -+ || (itemcnt > mincount && items[mincount][0] == '#'))); -+ } -+ -+ /* - * For affix "entry" move COMPOUNDFORBIDFLAG and COMPOUNDPERMITFLAG from - * ae_flags to ae_comppermit and ae_compforbid. - */ -*************** -*** 11492,11506 **** - vim_strncpy(preword + sp->ts_prewordlen, - tword + sp->ts_splitoff, - sp->ts_twordlen - sp->ts_splitoff); -! p = preword; -! while (*skiptowhite(p) != NUL) -! p = skipwhite(skiptowhite(p)); -! if (fword_ends && !can_compound(slang, p, -! compflags + sp->ts_compsplit)) -! /* Compound is not allowed. But it may still be -! * possible if we add another (short) word. */ - compound_ok = FALSE; - - /* Get pointer to last char of previous word. */ - p = preword + sp->ts_prewordlen; - mb_ptr_back(preword, p); ---- 11675,11698 ---- - vim_strncpy(preword + sp->ts_prewordlen, - tword + sp->ts_splitoff, - sp->ts_twordlen - sp->ts_splitoff); -! -! /* Verify CHECKCOMPOUNDPATTERN rules. */ -! if (match_checkcompoundpattern(preword, sp->ts_prewordlen, -! &slang->sl_comppat)) - compound_ok = FALSE; - -+ if (compound_ok) -+ { -+ p = preword; -+ while (*skiptowhite(p) != NUL) -+ p = skipwhite(skiptowhite(p)); -+ if (fword_ends && !can_compound(slang, p, -+ compflags + sp->ts_compsplit)) -+ /* Compound is not allowed. But it may still be -+ * possible if we add another (short) word. */ -+ compound_ok = FALSE; -+ } -+ - /* Get pointer to last char of previous word. */ - p = preword + sp->ts_prewordlen; - mb_ptr_back(preword, p); -*************** -*** 11697,11706 **** - && (slang->sl_compsylmax < MAXWLEN - || sp->ts_complen + 1 - sp->ts_compsplit - < slang->sl_compmax) -! && (byte_in_str(sp->ts_complen == sp->ts_compsplit -! ? slang->sl_compstartflags -! : slang->sl_compallflags, -! ((unsigned)flags >> 24)))) - { - try_compound = TRUE; - compflags[sp->ts_complen] = ((unsigned)flags >> 24); ---- 11889,11897 ---- - && (slang->sl_compsylmax < MAXWLEN - || sp->ts_complen + 1 - sp->ts_compsplit - < slang->sl_compmax) -! && (can_be_compound(sp, slang, -! compflags, ((unsigned)flags >> 24)))) -! - { - try_compound = TRUE; - compflags[sp->ts_complen] = ((unsigned)flags >> 24); -*** ../vim-7.2.059/src/version.c Sun Nov 30 15:15:56 2008 ---- src/version.c Sun Nov 30 21:09:23 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 60, - /**/ - --- -DEAD PERSON: I'm getting better! -CUSTOMER: No, you're not -- you'll be stone dead in a moment. -MORTICIAN: Oh, I can't take him like that -- it's against regulations. - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.061 b/vi/vim-7.2/7.2.061 deleted file mode 100644 index 787aa66..0000000 --- a/vi/vim-7.2/7.2.061 +++ /dev/null @@ -1,56 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.061 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.061 -Problem: Can't create a funcref for an autoload function without loading - the script first. (Marc Weber) -Solution: Accept autoload functions that don't exist yet in function(). -Files: src/eval.c - - -*** ../vim-7.2.060/src/eval.c Fri Nov 28 21:26:50 2008 ---- src/eval.c Sat Nov 29 12:28:51 2008 -*************** -*** 10339,10345 **** - s = get_tv_string(&argvars[0]); - if (s == NULL || *s == NUL || VIM_ISDIGIT(*s)) - EMSG2(_(e_invarg2), s); -! else if (!function_exists(s)) - EMSG2(_("E700: Unknown function: %s"), s); - else - { ---- 10339,10346 ---- - s = get_tv_string(&argvars[0]); - if (s == NULL || *s == NUL || VIM_ISDIGIT(*s)) - EMSG2(_(e_invarg2), s); -! /* Don't check an autoload name for existence here. */ -! else if (vim_strchr(s, AUTOLOAD_CHAR) == NULL && !function_exists(s)) - EMSG2(_("E700: Unknown function: %s"), s); - else - { -*** ../vim-7.2.060/src/version.c Sun Nov 30 21:11:54 2008 ---- src/version.c Wed Dec 3 09:49:07 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 61, - /**/ - --- -There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU, -Linux, etc, and those who know COBOL. It gets very difficult for me at -parties, not knowing which group to socialise with :-) - Sitaram Chamarty - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.062 b/vi/vim-7.2/7.2.062 deleted file mode 100644 index 6b4b890..0000000 --- a/vi/vim-7.2/7.2.062 +++ /dev/null @@ -1,55 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.062 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.062 -Problem: "[Scratch]" is not translated. -Solution: Mark the string for translation. (Dominique Pelle) -Files: src/buffer.c - - -*** ../vim-7.2.061/src/buffer.c Sat Nov 15 16:05:30 2008 ---- src/buffer.c Tue Dec 2 21:51:02 2008 -*************** -*** 5118,5124 **** - { - if (buf->b_sfname != NULL) - return (char *)buf->b_sfname; -! return "[Scratch]"; - } - #endif - if (buf->b_fname == NULL) ---- 5118,5124 ---- - { - if (buf->b_sfname != NULL) - return (char *)buf->b_sfname; -! return _("[Scratch]"); - } - #endif - if (buf->b_fname == NULL) -*** ../vim-7.2.061/src/version.c Wed Dec 3 09:51:19 2008 ---- src/version.c Wed Dec 3 11:20:30 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 62, - /**/ - --- -DENNIS: Listen -- strange women lying in ponds distributing swords is no - basis for a system of government. Supreme executive power derives - from a mandate from the masses, not from some farcical aquatic - ceremony. - The Quest for the Holy Grail (Monty Python) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.063 b/vi/vim-7.2/7.2.063 deleted file mode 100644 index f951554..0000000 --- a/vi/vim-7.2/7.2.063 +++ /dev/null @@ -1,103 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.063 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.063 -Problem: Warning for NULL argument of Perl_sys_init3(). -Solution: Use Perl_sys_init() instead. (partly by Dominique Pelle) -Files: src/if_perl.xs - - -*** ../vim-7.2.062/src/if_perl.xs Mon Sep 1 17:56:05 2008 ---- src/if_perl.xs Wed Dec 3 12:44:38 2008 -*************** -*** 166,172 **** - # define Perl_Isv_yes_ptr dll_Perl_Isv_yes_ptr - # define boot_DynaLoader dll_boot_DynaLoader - -! # define Perl_sys_init3 dll_Perl_sys_init3 - # define Perl_sys_term dll_Perl_sys_term - # define Perl_ISv_ptr dll_Perl_ISv_ptr - # define Perl_Istack_max_ptr dll_Perl_Istack_max_ptr ---- 166,172 ---- - # define Perl_Isv_yes_ptr dll_Perl_Isv_yes_ptr - # define boot_DynaLoader dll_boot_DynaLoader - -! # define Perl_sys_init dll_Perl_sys_init - # define Perl_sys_term dll_Perl_sys_term - # define Perl_ISv_ptr dll_Perl_ISv_ptr - # define Perl_Istack_max_ptr dll_Perl_Istack_max_ptr -*************** -*** 272,278 **** - - #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) - static void (*Perl_sv_free2)(pTHX_ SV*); -! static void (*Perl_sys_init3)(int* argc, char*** argv, char*** env); - static void (*Perl_sys_term)(void); - static SV** (*Perl_ISv_ptr)(register PerlInterpreter*); - static SV*** (*Perl_Istack_max_ptr)(register PerlInterpreter*); ---- 272,278 ---- - - #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) - static void (*Perl_sv_free2)(pTHX_ SV*); -! static void (*Perl_sys_init)(int* argc, char*** argv); - static void (*Perl_sys_term)(void); - static SV** (*Perl_ISv_ptr)(register PerlInterpreter*); - static SV*** (*Perl_Istack_max_ptr)(register PerlInterpreter*); -*************** -*** 372,378 **** - {"Perl_Tna_ptr", (PERL_PROC*)&Perl_Tna_ptr}, - #else - {"Perl_sv_free2", (PERL_PROC*)&Perl_sv_free2}, -! {"Perl_sys_init3", (PERL_PROC*)&Perl_sys_init3}, - {"Perl_sys_term", (PERL_PROC*)&Perl_sys_term}, - {"Perl_ISv_ptr", (PERL_PROC*)&Perl_ISv_ptr}, - {"Perl_Istack_sp_ptr", (PERL_PROC*)&Perl_Istack_sp_ptr}, ---- 372,378 ---- - {"Perl_Tna_ptr", (PERL_PROC*)&Perl_Tna_ptr}, - #else - {"Perl_sv_free2", (PERL_PROC*)&Perl_sv_free2}, -! {"Perl_sys_init", (PERL_PROC*)&Perl_sys_init}, - {"Perl_sys_term", (PERL_PROC*)&Perl_sys_term}, - {"Perl_ISv_ptr", (PERL_PROC*)&Perl_ISv_ptr}, - {"Perl_Istack_sp_ptr", (PERL_PROC*)&Perl_Istack_sp_ptr}, -*************** -*** 460,466 **** - static char *argv[] = { "", "-e", "" }; - - #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) -! Perl_sys_init3(&argc, (char***)&argv, NULL); - #endif - perl_interp = perl_alloc(); - perl_construct(perl_interp); ---- 460,466 ---- - static char *argv[] = { "", "-e", "" }; - - #if (PERL_REVISION == 5) && (PERL_VERSION >= 10) -! Perl_sys_init(&argc, (char***)&argv); - #endif - perl_interp = perl_alloc(); - perl_construct(perl_interp); -*** ../vim-7.2.062/src/version.c Wed Dec 3 11:21:20 2008 ---- src/version.c Wed Dec 3 12:42:50 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 63, - /**/ - --- -Windows -M!uqoms - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.064 b/vi/vim-7.2/7.2.064 deleted file mode 100644 index 48ca877..0000000 --- a/vi/vim-7.2/7.2.064 +++ /dev/null @@ -1,66 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.064 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.064 -Problem: Screen update bug when repeating "~" on a Visual block and the - last line doesn't change. -Solution: Keep track of changes for all lines. (Moritz Orbach) -Files: src/ops.c - - -*** ../vim-7.2.063/src/ops.c Tue Jun 24 23:59:55 2008 ---- src/ops.c Wed Dec 3 13:12:06 2008 -*************** -*** 2209,2220 **** - { - for (; pos.lnum <= oap->end.lnum; ++pos.lnum) - { - block_prep(oap, &bd, pos.lnum, FALSE); - pos.col = bd.textcol; -! did_change = swapchars(oap->op_type, &pos, bd.textlen); - - # ifdef FEAT_NETBEANS_INTG -! if (usingNetbeans && did_change) - { - char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE); - ---- 2209,2223 ---- - { - for (; pos.lnum <= oap->end.lnum; ++pos.lnum) - { -+ int one_change; -+ - block_prep(oap, &bd, pos.lnum, FALSE); - pos.col = bd.textcol; -! one_change = swapchars(oap->op_type, &pos, bd.textlen); -! did_change |= one_change; - - # ifdef FEAT_NETBEANS_INTG -! if (usingNetbeans && one_change) - { - char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE); - -*** ../vim-7.2.063/src/version.c Wed Dec 3 13:18:16 2008 ---- src/version.c Wed Dec 3 13:14:46 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 64, - /**/ - --- -Q: How many hardware engineers does it take to change a lightbulb? -A: None. We'll fix it in software. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.065 b/vi/vim-7.2/7.2.065 deleted file mode 100644 index d2cac84..0000000 --- a/vi/vim-7.2/7.2.065 +++ /dev/null @@ -1,177 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.065 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.065 -Problem: GTK GUI: the cursor disappears when doing ":vsp" and the Vim - window is maximized. (Dominique Pelle, Denis Smolyar) -Solution: Don't change "Columns" back to an old value at a wrong moment. - Do change "Rows" when it should not be a problem. -Files: src/gui.c - - -*** ../vim-7.2.064/src/gui.c Fri Nov 28 21:26:50 2008 ---- src/gui.c Wed Dec 3 18:01:21 2008 -*************** -*** 3241,3247 **** - i = Rows; - gui_update_tabline(); - Rows = i; -! need_set_size = RESIZE_VERT; - if (using_tabline) - fix_size = TRUE; - if (!gui_use_tabline()) ---- 3241,3247 ---- - i = Rows; - gui_update_tabline(); - Rows = i; -! need_set_size |= RESIZE_VERT; - if (using_tabline) - fix_size = TRUE; - if (!gui_use_tabline()) -*************** -*** 3275,3283 **** - if (gui.which_scrollbars[i] != prev_which_scrollbars[i]) - { - if (i == SBAR_BOTTOM) -! need_set_size = RESIZE_VERT; - else -! need_set_size = RESIZE_HOR; - if (gui.which_scrollbars[i]) - fix_size = TRUE; - } ---- 3275,3283 ---- - if (gui.which_scrollbars[i] != prev_which_scrollbars[i]) - { - if (i == SBAR_BOTTOM) -! need_set_size |= RESIZE_VERT; - else -! need_set_size |= RESIZE_HOR; - if (gui.which_scrollbars[i]) - fix_size = TRUE; - } -*************** -*** 3297,3303 **** - gui_mch_enable_menu(gui.menu_is_active); - Rows = i; - prev_menu_is_active = gui.menu_is_active; -! need_set_size = RESIZE_VERT; - if (gui.menu_is_active) - fix_size = TRUE; - } ---- 3297,3303 ---- - gui_mch_enable_menu(gui.menu_is_active); - Rows = i; - prev_menu_is_active = gui.menu_is_active; -! need_set_size |= RESIZE_VERT; - if (gui.menu_is_active) - fix_size = TRUE; - } -*************** -*** 3308,3314 **** - { - gui_mch_show_toolbar(using_toolbar); - prev_toolbar = using_toolbar; -! need_set_size = RESIZE_VERT; - if (using_toolbar) - fix_size = TRUE; - } ---- 3308,3314 ---- - { - gui_mch_show_toolbar(using_toolbar); - prev_toolbar = using_toolbar; -! need_set_size |= RESIZE_VERT; - if (using_toolbar) - fix_size = TRUE; - } -*************** -*** 3318,3324 **** - { - gui_mch_enable_footer(using_footer); - prev_footer = using_footer; -! need_set_size = RESIZE_VERT; - if (using_footer) - fix_size = TRUE; - } ---- 3318,3324 ---- - { - gui_mch_enable_footer(using_footer); - prev_footer = using_footer; -! need_set_size |= RESIZE_VERT; - if (using_footer) - fix_size = TRUE; - } -*************** -*** 3330,3339 **** - prev_tearoff = using_tearoff; - } - #endif -! if (need_set_size) - { - #ifdef FEAT_GUI_GTK -! long c = Columns; - #endif - /* Adjust the size of the window to make the text area keep the - * same size and to avoid that part of our window is off-screen ---- 3330,3340 ---- - prev_tearoff = using_tearoff; - } - #endif -! if (need_set_size != 0) - { - #ifdef FEAT_GUI_GTK -! long prev_Columns = Columns; -! long prev_Rows = Rows; - #endif - /* Adjust the size of the window to make the text area keep the - * same size and to avoid that part of our window is off-screen -*************** -*** 3349,3359 **** - * If you remove this, please test this command for resizing - * effects (with optional left scrollbar): ":vsp|q|vsp|q|vsp|q". - * Don't do this while starting up though. -! * And don't change Rows, it may have be reduced intentionally -! * when adding menu/toolbar/tabline. */ -! if (!gui.starting) - (void)char_avail(); -! Columns = c; - #endif - } - #ifdef FEAT_WINDOWS ---- 3350,3363 ---- - * If you remove this, please test this command for resizing - * effects (with optional left scrollbar): ":vsp|q|vsp|q|vsp|q". - * Don't do this while starting up though. -! * Don't change Rows when adding menu/toolbar/tabline. -! * Don't change Columns when adding vertical toolbar. */ -! if (!gui.starting && need_set_size != (RESIZE_VERT | RESIZE_HOR)) - (void)char_avail(); -! if ((need_set_size & RESIZE_VERT) == 0) -! Rows = prev_Rows; -! if ((need_set_size & RESIZE_HOR) == 0) -! Columns = prev_Columns; - #endif - } - #ifdef FEAT_WINDOWS -*** ../vim-7.2.064/src/version.c Wed Dec 3 13:38:00 2008 ---- src/version.c Wed Dec 3 18:47:11 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 65, - /**/ - --- -Seen on the back of a biker's vest: If you can read this, my wife fell off. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.066 b/vi/vim-7.2/7.2.066 deleted file mode 100644 index a5991d4..0000000 --- a/vi/vim-7.2/7.2.066 +++ /dev/null @@ -1,70 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.066 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.066 -Problem: It's not easy to see whether 'encoding' is a multi-byte encoding. -Solution: Add has('multi_byte_encoding'). -Files: runtime/doc/eval.txt, src/eval.c - - -*** ../vim-7.2.065/runtime/doc/eval.txt Fri Nov 28 11:15:10 2008 ---- runtime/doc/eval.txt Tue Dec 9 10:55:59 2008 -*************** -*** 5841,5847 **** - mouse_pterm Compiled with support for qnx pterm mouse. - mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse) - mouse_xterm Compiled with support for xterm mouse. -! multi_byte Compiled with support for editing Korean et al. - multi_byte_ime Compiled with support for IME input method. - multi_lang Compiled with support for multiple languages. - mzscheme Compiled with MzScheme interface |mzscheme|. ---- 5852,5859 ---- - mouse_pterm Compiled with support for qnx pterm mouse. - mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse) - mouse_xterm Compiled with support for xterm mouse. -! multi_byte Compiled with support for 'encoding' -! multi_byte_encoding 'encoding' is set to a multi-byte encoding. - multi_byte_ime Compiled with support for IME input method. - multi_lang Compiled with support for multiple languages. - mzscheme Compiled with MzScheme interface |mzscheme|. -*** ../vim-7.2.065/src/eval.c Wed Dec 3 09:51:19 2008 ---- src/eval.c Wed Dec 3 14:29:09 2008 -*************** -*** 11842,11847 **** ---- 11842,11851 ---- - n = has_patch(atoi((char *)name + 5)); - else if (STRICMP(name, "vim_starting") == 0) - n = (starting != 0); -+ #ifdef FEAT_MBYTE -+ else if (STRICMP(name, "multi_byte_encoding") == 0) -+ n = has_mbyte; -+ #endif - #if defined(FEAT_BEVAL) && defined(FEAT_GUI_W32) - else if (STRICMP(name, "balloon_multiline") == 0) - n = multiline_balloon_available(); -*** ../vim-7.2.065/src/version.c Wed Dec 3 18:50:09 2008 ---- src/version.c Tue Dec 9 10:48:49 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 66, - /**/ - --- -ARTHUR: Listen, old crone! Unless you tell us where we can buy a shrubbery, - my friend and I will ... we will say "Ni!" -CRONE: Do your worst! - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.067 b/vi/vim-7.2/7.2.067 deleted file mode 100644 index 079a053..0000000 --- a/vi/vim-7.2/7.2.067 +++ /dev/null @@ -1,52 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.067 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.067 -Problem: Session file can't load extra file when the path contains special - characters. -Solution: Escape the file name. (Lech Lorens) -Files: src/ex_docmd.c - - -*** ../vim-7.2.066/src/ex_docmd.c Fri Nov 28 21:26:50 2008 ---- src/ex_docmd.c Fri Dec 5 21:34:11 2008 -*************** -*** 10106,10112 **** - */ - if (put_line(fd, "let s:sx = expand(\"<sfile>:p:r\").\"x.vim\"") == FAIL - || put_line(fd, "if file_readable(s:sx)") == FAIL -! || put_line(fd, " exe \"source \" . s:sx") == FAIL - || put_line(fd, "endif") == FAIL) - return FAIL; - ---- 10106,10112 ---- - */ - if (put_line(fd, "let s:sx = expand(\"<sfile>:p:r\").\"x.vim\"") == FAIL - || put_line(fd, "if file_readable(s:sx)") == FAIL -! || put_line(fd, " exe \"source \" . fnameescape(s:sx)") == FAIL - || put_line(fd, "endif") == FAIL) - return FAIL; - -*** ../vim-7.2.066/src/version.c Tue Dec 9 10:56:50 2008 ---- src/version.c Tue Dec 9 11:16:27 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 67, - /**/ - --- -Life is a gift, living is an art. (Bram Moolenaar) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.068 b/vi/vim-7.2/7.2.068 deleted file mode 100644 index 508bac1..0000000 --- a/vi/vim-7.2/7.2.068 +++ /dev/null @@ -1,101 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.068 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.068 -Problem: Emacs tags file lines can be too long, resulting in an error - message. (James Vega) -Solution: Ignore lines with errors if they are too long. -Files: src/tag.c - - -*** ../vim-7.2.067/src/tag.c Fri Jul 18 11:26:12 2008 ---- src/tag.c Sat Dec 6 13:54:33 2008 -*************** -*** 2725,2731 **** ---- 2725,2748 ---- - */ - p_7f = vim_strchr(lbuf, 0x7f); - if (p_7f == NULL) -+ { -+ etag_fail: -+ if (vim_strchr(lbuf, '\n') == NULL) -+ { -+ /* Truncated line. Ignore it. */ -+ if (p_verbose >= 5) -+ { -+ verbose_enter(); -+ MSG(_("Ignoring long line in tags file")); -+ verbose_leave(); -+ } -+ tagp->command = lbuf; -+ tagp->tagname = lbuf; -+ tagp->tagname_end = lbuf; -+ return OK; -+ } - return FAIL; -+ } - - /* Find ^A. If not found the line number is after the 0x7f */ - p = vim_strchr(p_7f, Ctrl_A); -*************** -*** 2735,2741 **** - ++p; - - if (!VIM_ISDIGIT(*p)) /* check for start of line number */ -! return FAIL; - tagp->command = p; - - ---- 2752,2758 ---- - ++p; - - if (!VIM_ISDIGIT(*p)) /* check for start of line number */ -! goto etag_fail; - tagp->command = p; - - -*************** -*** 2749,2755 **** - /* find end of tagname */ - for (p = p_7f - 1; !vim_iswordc(*p); --p) - if (p == lbuf) -! return FAIL; - tagp->tagname_end = p + 1; - while (p >= lbuf && vim_iswordc(*p)) - --p; ---- 2766,2772 ---- - /* find end of tagname */ - for (p = p_7f - 1; !vim_iswordc(*p); --p) - if (p == lbuf) -! goto etag_fail; - tagp->tagname_end = p + 1; - while (p >= lbuf && vim_iswordc(*p)) - --p; -*** ../vim-7.2.067/src/version.c Tue Dec 9 11:17:23 2008 ---- src/version.c Tue Dec 9 12:05:41 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 68, - /**/ - --- -Q: What do you call a fish without an eye? -A: fsh! -Q: What do you call a deer with no eyes? -A: no eye deer. -Q: What do you call a deer with no eyes and no legs? -A: still no eye deer. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.069 b/vi/vim-7.2/7.2.069 deleted file mode 100644 index 7714fae..0000000 --- a/vi/vim-7.2/7.2.069 +++ /dev/null @@ -1,52 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.069 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.069 (after 7.2.060) -Problem: Compiler warning for storing size_t in int. -Solution: Add type cast. -Files: src/spell.c - - -*** ../vim-7.2.068/src/spell.c Sun Nov 30 21:11:54 2008 ---- src/spell.c Tue Dec 9 22:19:04 2008 -*************** -*** 1765,1771 **** - /* Second part matches at start of following compound word, now - * check if first part matches at end of previous word. */ - p = ((char_u **)gap->ga_data)[i]; -! len = STRLEN(p); - if (len <= wlen && STRNCMP(ptr + wlen - len, p, len) == 0) - return TRUE; - } ---- 1765,1771 ---- - /* Second part matches at start of following compound word, now - * check if first part matches at end of previous word. */ - p = ((char_u **)gap->ga_data)[i]; -! len = (int)STRLEN(p); - if (len <= wlen && STRNCMP(ptr + wlen - len, p, len) == 0) - return TRUE; - } -*** ../vim-7.2.068/src/version.c Tue Dec 9 12:12:31 2008 ---- src/version.c Tue Dec 9 22:21:15 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 69, - /**/ - --- -The war between Emacs and Vi is over. Vi has won with 3 to 1. - http://www.ssc.com/lg/issue30/raymond.html - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.070 b/vi/vim-7.2/7.2.070 deleted file mode 100644 index 9a7edc7..0000000 --- a/vi/vim-7.2/7.2.070 +++ /dev/null @@ -1,566 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.070 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.070 -Problem: Crash when a function returns a:000. (Matt Wozkiski) -Solution: Don't put the function struct on the stack, allocate it. Free it - only when nothing in it is used. -Files: src/eval.c - - -*** ../vim-7.2.069/src/eval.c Tue Dec 9 10:56:50 2008 ---- src/eval.c Wed Dec 17 21:32:26 2008 -*************** -*** 32,37 **** ---- 32,40 ---- - - #define DICT_MAXNEST 100 /* maximum nesting of lists and dicts */ - -+ #define DO_NOT_FREE_CNT 99999 /* refcount for dict or list that should not -+ be freed. */ -+ - /* - * In a hashtab item "hi_key" points to "di_key" in a dictitem. - * This avoids adding a pointer to the hashtab item. -*************** -*** 789,794 **** ---- 792,799 ---- - static void func_unref __ARGS((char_u *name)); - static void func_ref __ARGS((char_u *name)); - static void call_user_func __ARGS((ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, linenr_T firstline, linenr_T lastline, dict_T *selfdict)); -+ static int can_free_funccal __ARGS((funccall_T *fc, int copyID)) ; -+ static void free_funccal __ARGS((funccall_T *fc, int free_val)); - static void add_nr_var __ARGS((dict_T *dp, dictitem_T *v, char *name, varnumber_T nr)); - static win_T *find_win_by_nr __ARGS((typval_T *vp, tabpage_T *tp)); - static void getwinvar __ARGS((typval_T *argvars, typval_T *rettv, int off)); -*************** -*** 923,928 **** ---- 928,937 ---- - /* pointer to funccal for currently active function */ - funccall_T *current_funccal = NULL; - -+ /* pointer to list of previously used funccal, still around because some -+ * item in it is still being used. */ -+ funccall_T *previous_funccal = NULL; -+ - /* - * Return TRUE when a function was ended by a ":return" command. - */ -*************** -*** 6490,6496 **** - buf_T *buf; - win_T *wp; - int i; -! funccall_T *fc; - int did_free = FALSE; - #ifdef FEAT_WINDOWS - tabpage_T *tp; ---- 6499,6505 ---- - buf_T *buf; - win_T *wp; - int i; -! funccall_T *fc, **pfc; - int did_free = FALSE; - #ifdef FEAT_WINDOWS - tabpage_T *tp; -*************** -*** 6574,6579 **** ---- 6583,6602 ---- - else - ll = ll->lv_used_next; - -+ /* check if any funccal can be freed now */ -+ for (pfc = &previous_funccal; *pfc != NULL; ) -+ { -+ if (can_free_funccal(*pfc, copyID)) -+ { -+ fc = *pfc; -+ *pfc = fc->caller; -+ free_funccal(fc, TRUE); -+ did_free = TRUE; -+ } -+ else -+ pfc = &(*pfc)->caller; -+ } -+ - return did_free; - } - -*************** -*** 18962,18968 **** - dictitem_T *dict_var; - { - hash_init(&dict->dv_hashtab); -! dict->dv_refcount = 99999; - dict_var->di_tv.vval.v_dict = dict; - dict_var->di_tv.v_type = VAR_DICT; - dict_var->di_tv.v_lock = VAR_FIXED; ---- 18985,18991 ---- - dictitem_T *dict_var; - { - hash_init(&dict->dv_hashtab); -! dict->dv_refcount = DO_NOT_FREE_CNT; - dict_var->di_tv.vval.v_dict = dict; - dict_var->di_tv.v_type = VAR_DICT; - dict_var->di_tv.v_lock = VAR_FIXED; -*************** -*** 19299,19304 **** ---- 19322,19329 ---- - * Copy the values from typval_T "from" to typval_T "to". - * When needed allocates string or increases reference count. - * Does not make a copy of a list or dict but copies the reference! -+ * It is OK for "from" and "to" to point to the same item. This is used to -+ * make a copy later. - */ - static void - copy_tv(from, to) -*************** -*** 21111,21117 **** - char_u *save_sourcing_name; - linenr_T save_sourcing_lnum; - scid_T save_current_SID; -! funccall_T fc; - int save_did_emsg; - static int depth = 0; - dictitem_T *v; ---- 21136,21142 ---- - char_u *save_sourcing_name; - linenr_T save_sourcing_lnum; - scid_T save_current_SID; -! funccall_T *fc; - int save_did_emsg; - static int depth = 0; - dictitem_T *v; -*************** -*** 21137,21172 **** - - line_breakcheck(); /* check for CTRL-C hit */ - -! fc.caller = current_funccal; -! current_funccal = &fc; -! fc.func = fp; -! fc.rettv = rettv; - rettv->vval.v_number = 0; -! fc.linenr = 0; -! fc.returned = FALSE; -! fc.level = ex_nesting_level; - /* Check if this function has a breakpoint. */ -! fc.breakpoint = dbg_find_breakpoint(FALSE, fp->uf_name, (linenr_T)0); -! fc.dbg_tick = debug_tick; - - /* -! * Note about using fc.fixvar[]: This is an array of FIXVAR_CNT variables - * with names up to VAR_SHORT_LEN long. This avoids having to alloc/free - * each argument variable and saves a lot of time. - */ - /* - * Init l: variables. - */ -! init_var_dict(&fc.l_vars, &fc.l_vars_var); - if (selfdict != NULL) - { - /* Set l:self to "selfdict". Use "name" to avoid a warning from - * some compiler that checks the destination size. */ -! v = &fc.fixvar[fixvar_idx++].var; - name = v->di_key; - STRCPY(name, "self"); - v->di_flags = DI_FLAGS_RO + DI_FLAGS_FIX; -! hash_add(&fc.l_vars.dv_hashtab, DI2HIKEY(v)); - v->di_tv.v_type = VAR_DICT; - v->di_tv.v_lock = 0; - v->di_tv.vval.v_dict = selfdict; ---- 21162,21198 ---- - - line_breakcheck(); /* check for CTRL-C hit */ - -! fc = (funccall_T *)alloc(sizeof(funccall_T)); -! fc->caller = current_funccal; -! current_funccal = fc; -! fc->func = fp; -! fc->rettv = rettv; - rettv->vval.v_number = 0; -! fc->linenr = 0; -! fc->returned = FALSE; -! fc->level = ex_nesting_level; - /* Check if this function has a breakpoint. */ -! fc->breakpoint = dbg_find_breakpoint(FALSE, fp->uf_name, (linenr_T)0); -! fc->dbg_tick = debug_tick; - - /* -! * Note about using fc->fixvar[]: This is an array of FIXVAR_CNT variables - * with names up to VAR_SHORT_LEN long. This avoids having to alloc/free - * each argument variable and saves a lot of time. - */ - /* - * Init l: variables. - */ -! init_var_dict(&fc->l_vars, &fc->l_vars_var); - if (selfdict != NULL) - { - /* Set l:self to "selfdict". Use "name" to avoid a warning from - * some compiler that checks the destination size. */ -! v = &fc->fixvar[fixvar_idx++].var; - name = v->di_key; - STRCPY(name, "self"); - v->di_flags = DI_FLAGS_RO + DI_FLAGS_FIX; -! hash_add(&fc->l_vars.dv_hashtab, DI2HIKEY(v)); - v->di_tv.v_type = VAR_DICT; - v->di_tv.v_lock = 0; - v->di_tv.vval.v_dict = selfdict; -*************** -*** 21178,21208 **** - * Set a:0 to "argcount". - * Set a:000 to a list with room for the "..." arguments. - */ -! init_var_dict(&fc.l_avars, &fc.l_avars_var); -! add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "0", - (varnumber_T)(argcount - fp->uf_args.ga_len)); - /* Use "name" to avoid a warning from some compiler that checks the - * destination size. */ -! v = &fc.fixvar[fixvar_idx++].var; - name = v->di_key; - STRCPY(name, "000"); - v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; -! hash_add(&fc.l_avars.dv_hashtab, DI2HIKEY(v)); - v->di_tv.v_type = VAR_LIST; - v->di_tv.v_lock = VAR_FIXED; -! v->di_tv.vval.v_list = &fc.l_varlist; -! vim_memset(&fc.l_varlist, 0, sizeof(list_T)); -! fc.l_varlist.lv_refcount = 99999; -! fc.l_varlist.lv_lock = VAR_FIXED; - - /* - * Set a:firstline to "firstline" and a:lastline to "lastline". - * Set a:name to named arguments. - * Set a:N to the "..." arguments. - */ -! add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "firstline", - (varnumber_T)firstline); -! add_nr_var(&fc.l_avars, &fc.fixvar[fixvar_idx++].var, "lastline", - (varnumber_T)lastline); - for (i = 0; i < argcount; ++i) - { ---- 21204,21234 ---- - * Set a:0 to "argcount". - * Set a:000 to a list with room for the "..." arguments. - */ -! init_var_dict(&fc->l_avars, &fc->l_avars_var); -! add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "0", - (varnumber_T)(argcount - fp->uf_args.ga_len)); - /* Use "name" to avoid a warning from some compiler that checks the - * destination size. */ -! v = &fc->fixvar[fixvar_idx++].var; - name = v->di_key; - STRCPY(name, "000"); - v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; -! hash_add(&fc->l_avars.dv_hashtab, DI2HIKEY(v)); - v->di_tv.v_type = VAR_LIST; - v->di_tv.v_lock = VAR_FIXED; -! v->di_tv.vval.v_list = &fc->l_varlist; -! vim_memset(&fc->l_varlist, 0, sizeof(list_T)); -! fc->l_varlist.lv_refcount = DO_NOT_FREE_CNT; -! fc->l_varlist.lv_lock = VAR_FIXED; - - /* - * Set a:firstline to "firstline" and a:lastline to "lastline". - * Set a:name to named arguments. - * Set a:N to the "..." arguments. - */ -! add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "firstline", - (varnumber_T)firstline); -! add_nr_var(&fc->l_avars, &fc->fixvar[fixvar_idx++].var, "lastline", - (varnumber_T)lastline); - for (i = 0; i < argcount; ++i) - { -*************** -*** 21218,21224 **** - } - if (fixvar_idx < FIXVAR_CNT && STRLEN(name) <= VAR_SHORT_LEN) - { -! v = &fc.fixvar[fixvar_idx++].var; - v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; - } - else ---- 21244,21250 ---- - } - if (fixvar_idx < FIXVAR_CNT && STRLEN(name) <= VAR_SHORT_LEN) - { -! v = &fc->fixvar[fixvar_idx++].var; - v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; - } - else -*************** -*** 21230,21236 **** - v->di_flags = DI_FLAGS_RO; - } - STRCPY(v->di_key, name); -! hash_add(&fc.l_avars.dv_hashtab, DI2HIKEY(v)); - - /* Note: the values are copied directly to avoid alloc/free. - * "argvars" must have VAR_FIXED for v_lock. */ ---- 21256,21262 ---- - v->di_flags = DI_FLAGS_RO; - } - STRCPY(v->di_key, name); -! hash_add(&fc->l_avars.dv_hashtab, DI2HIKEY(v)); - - /* Note: the values are copied directly to avoid alloc/free. - * "argvars" must have VAR_FIXED for v_lock. */ -*************** -*** 21239,21247 **** - - if (ai >= 0 && ai < MAX_FUNC_ARGS) - { -! list_append(&fc.l_varlist, &fc.l_listitems[ai]); -! fc.l_listitems[ai].li_tv = argvars[i]; -! fc.l_listitems[ai].li_tv.v_lock = VAR_FIXED; - } - } - ---- 21265,21273 ---- - - if (ai >= 0 && ai < MAX_FUNC_ARGS) - { -! list_append(&fc->l_varlist, &fc->l_listitems[ai]); -! fc->l_listitems[ai].li_tv = argvars[i]; -! fc->l_listitems[ai].li_tv.v_lock = VAR_FIXED; - } - } - -*************** -*** 21306,21312 **** - if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL)) - func_do_profile(fp); - if (fp->uf_profiling -! || (fc.caller != NULL && fc.caller->func->uf_profiling)) - { - ++fp->uf_tm_count; - profile_start(&call_start); ---- 21332,21338 ---- - if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL)) - func_do_profile(fp); - if (fp->uf_profiling -! || (fc->caller != NULL && fc->caller->func->uf_profiling)) - { - ++fp->uf_tm_count; - profile_start(&call_start); -*************** -*** 21322,21328 **** - did_emsg = FALSE; - - /* call do_cmdline() to execute the lines */ -! do_cmdline(NULL, get_func_line, (void *)&fc, - DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT); - - --RedrawingDisabled; ---- 21348,21354 ---- - did_emsg = FALSE; - - /* call do_cmdline() to execute the lines */ -! do_cmdline(NULL, get_func_line, (void *)fc, - DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT); - - --RedrawingDisabled; -*************** -*** 21337,21352 **** - - #ifdef FEAT_PROFILE - if (do_profiling == PROF_YES && (fp->uf_profiling -! || (fc.caller != NULL && fc.caller->func->uf_profiling))) - { - profile_end(&call_start); - profile_sub_wait(&wait_start, &call_start); - profile_add(&fp->uf_tm_total, &call_start); - profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children); -! if (fc.caller != NULL && fc.caller->func->uf_profiling) - { -! profile_add(&fc.caller->func->uf_tm_children, &call_start); -! profile_add(&fc.caller->func->uf_tml_children, &call_start); - } - } - #endif ---- 21363,21378 ---- - - #ifdef FEAT_PROFILE - if (do_profiling == PROF_YES && (fp->uf_profiling -! || (fc->caller != NULL && fc->caller->func->uf_profiling))) - { - profile_end(&call_start); - profile_sub_wait(&wait_start, &call_start); - profile_add(&fp->uf_tm_total, &call_start); - profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children); -! if (fc->caller != NULL && fc->caller->func->uf_profiling) - { -! profile_add(&fc->caller->func->uf_tm_children, &call_start); -! profile_add(&fc->caller->func->uf_tml_children, &call_start); - } - } - #endif -*************** -*** 21359,21367 **** - - if (aborting()) - smsg((char_u *)_("%s aborted"), sourcing_name); -! else if (fc.rettv->v_type == VAR_NUMBER) - smsg((char_u *)_("%s returning #%ld"), sourcing_name, -! (long)fc.rettv->vval.v_number); - else - { - char_u buf[MSG_BUF_LEN]; ---- 21385,21393 ---- - - if (aborting()) - smsg((char_u *)_("%s aborted"), sourcing_name); -! else if (fc->rettv->v_type == VAR_NUMBER) - smsg((char_u *)_("%s returning #%ld"), sourcing_name, -! (long)fc->rettv->vval.v_number); - else - { - char_u buf[MSG_BUF_LEN]; -*************** -*** 21372,21378 **** - /* The value may be very long. Skip the middle part, so that we - * have some idea how it starts and ends. smsg() would always - * truncate it at the end. */ -! s = tv2string(fc.rettv, &tofree, numbuf2, 0); - if (s != NULL) - { - trunc_string(s, buf, MSG_BUF_CLEN); ---- 21398,21404 ---- - /* The value may be very long. Skip the middle part, so that we - * have some idea how it starts and ends. smsg() would always - * truncate it at the end. */ -! s = tv2string(fc->rettv, &tofree, numbuf2, 0); - if (s != NULL) - { - trunc_string(s, buf, MSG_BUF_CLEN); -*************** -*** 21408,21421 **** - } - - did_emsg |= save_did_emsg; -! current_funccal = fc.caller; - -! /* The a: variables typevals were not allocated, only free the allocated -! * variables. */ -! vars_clear_ext(&fc.l_avars.dv_hashtab, FALSE); - -! vars_clear(&fc.l_vars.dv_hashtab); /* free all l: variables */ -! --depth; - } - - /* ---- 21434,21517 ---- - } - - did_emsg |= save_did_emsg; -! current_funccal = fc->caller; -! --depth; - -! /* if the a:000 list and the a: dict are not referenced we can free the -! * funccall_T and what's in it. */ -! if (fc->l_varlist.lv_refcount == DO_NOT_FREE_CNT -! && fc->l_vars.dv_refcount == DO_NOT_FREE_CNT -! && fc->l_avars.dv_refcount == DO_NOT_FREE_CNT) -! { -! free_funccal(fc, FALSE); -! } -! else -! { -! hashitem_T *hi; -! listitem_T *li; -! int todo; - -! /* "fc" is still in use. This can happen when returning "a:000" or -! * assigning "l:" to a global variable. -! * Link "fc" in the list for garbage collection later. */ -! fc->caller = previous_funccal; -! previous_funccal = fc; -! -! /* Make a copy of the a: variables, since we didn't do that above. */ -! todo = (int)fc->l_avars.dv_hashtab.ht_used; -! for (hi = fc->l_avars.dv_hashtab.ht_array; todo > 0; ++hi) -! { -! if (!HASHITEM_EMPTY(hi)) -! { -! --todo; -! v = HI2DI(hi); -! copy_tv(&v->di_tv, &v->di_tv); -! } -! } -! -! /* Make a copy of the a:000 items, since we didn't do that above. */ -! for (li = fc->l_varlist.lv_first; li != NULL; li = li->li_next) -! copy_tv(&li->li_tv, &li->li_tv); -! } -! } -! -! /* -! * Return TRUE if items in "fc" do not have "copyID". That means they are not -! * referenced from anywyere. -! */ -! static int -! can_free_funccal(fc, copyID) -! funccall_T *fc; -! int copyID; -! { -! return (fc->l_varlist.lv_copyID != copyID -! && fc->l_vars.dv_copyID != copyID -! && fc->l_avars.dv_copyID != copyID); -! } -! -! /* -! * Free "fc" and what it contains. -! */ -! static void -! free_funccal(fc, free_val) -! funccall_T *fc; -! int free_val; /* a: vars were allocated */ -! { -! listitem_T *li; -! -! /* The a: variables typevals may not have been allocated, only free the -! * allocated variables. */ -! vars_clear_ext(&fc->l_avars.dv_hashtab, free_val); -! -! /* free all l: variables */ -! vars_clear(&fc->l_vars.dv_hashtab); -! -! /* Free the a:000 variables if they were allocated. */ -! if (free_val) -! for (li = fc->l_varlist.lv_first; li != NULL; li = li->li_next) -! clear_tv(&li->li_tv); -! -! vim_free(fc); - } - - /* -*** ../vim-7.2.069/src/version.c Tue Dec 9 22:34:02 2008 ---- src/version.c Sun Dec 21 12:47:07 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 70, - /**/ - --- -Close your shells, or I'll kill -9 you -Tomorrow I'll quota you -Remember the disks'll always be full -And then while I'm away -I'll write ~ everyday -And I'll send-pr all my buggings to you. - [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ] - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.071 b/vi/vim-7.2/7.2.071 deleted file mode 100644 index 0a1e513..0000000 --- a/vi/vim-7.2/7.2.071 +++ /dev/null @@ -1,81 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.071 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.071 (extra) -Problem: Win32: Handling netbeans events while Vim is busy updating the - screen may cause a crash. -Solution: Like with GTK, only handle netbeans messages in the main loop. - (Xavier de Gaye) -Files: src/gui_w48.c, src/netbeans.c - - -*** ../vim-7.2.070/src/gui_w48.c Thu Nov 20 17:09:09 2008 ---- src/gui_w48.c Thu Dec 11 23:47:18 2008 -*************** -*** 1937,1942 **** ---- 1937,1947 ---- - s_need_activate = FALSE; - } - -+ #ifdef FEAT_NETBEANS_INTG -+ /* Process the queued netbeans messages. */ -+ netbeans_parse_messages(); -+ #endif -+ - /* - * Don't use gui_mch_update() because then we will spin-lock until a - * char arrives, instead we use GetMessage() to hang until an -*** ../vim-7.2.070/src/netbeans.c Fri Nov 28 21:26:50 2008 ---- src/netbeans.c Sun Nov 30 12:07:00 2008 -*************** -*** 769,779 **** - return; /* don't try to parse it */ - } - -! #ifdef FEAT_GUI_GTK - if (gtk_main_level() > 0) - gtk_main_quit(); - #else -! /* Parse the messages, but avoid recursion. */ - if (level == 1) - netbeans_parse_messages(); - ---- 769,782 ---- - return; /* don't try to parse it */ - } - -! #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32) -! /* Let the main loop handle messages. */ -! # ifdef FEAT_GUI_GTK - if (gtk_main_level() > 0) - gtk_main_quit(); -+ # endif - #else -! /* Parse the messages now, but avoid recursion. */ - if (level == 1) - netbeans_parse_messages(); - -*** ../vim-7.2.070/src/version.c Sun Dec 21 13:02:47 2008 ---- src/version.c Wed Dec 24 12:18:59 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 71, - /**/ - --- -No children may attend school with their breath smelling of "wild onions." - [real standing law in West Virginia, United States of America] - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.072 b/vi/vim-7.2/7.2.072 deleted file mode 100644 index 1dffd91..0000000 --- a/vi/vim-7.2/7.2.072 +++ /dev/null @@ -1,56 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.072 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.072 (extra) -Problem: Compiler warning in Sniff code. -Solution: Use return value of pipe(). (Dominique Pelle) -Files: src/if_sniff.c - -NOTE: Patch was adjusted to avoid problems with CVS interference. - -*** ../vim-7.2.071/src/if_sniff.c Sat Nov 15 14:11:10 2008 ---- src/if_sniff.c Sat Dec 6 14:01:57 2008 -*************** -*** 716,723 **** - #else /* UNIX Version of the Code */ - int ToSniffEmacs[2], FromSniffEmacs[2]; - -! pipe(ToSniffEmacs); -! pipe(FromSniffEmacs); - - /* fork */ - if ((sniffemacs_pid=fork()) == 0) ---- 714,723 ---- - #else /* UNIX Version of the Code */ - int ToSniffEmacs[2], FromSniffEmacs[2]; - -! if (pipe(ToSniffEmacs) != 0) -! return 1; -! if (pipe(FromSniffEmacs) != 0) -! return 1; - - /* fork */ - if ((sniffemacs_pid=fork()) == 0) -*** ../vim-7.2.071/src/version.c Wed Dec 24 12:20:10 2008 ---- src/version.c Wed Dec 24 12:42:13 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 72, - /**/ - --- -SIGIRO -- irony detected (iron core dumped) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.073 b/vi/vim-7.2/7.2.073 deleted file mode 100644 index 16f1297..0000000 --- a/vi/vim-7.2/7.2.073 +++ /dev/null @@ -1,135 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.073 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.073 -Problem: ":set <xHome>" has the same output as ":set <Home>". (Matt - Wozniski) -Solution: Don't translate "x" keys to its alternative for ":set". -Files: src/misc2.c, src/option.c, src/proto/misc2.pro - - -*** ../vim-7.2.072/src/misc2.c Wed Nov 12 13:07:48 2008 ---- src/misc2.c Sun Dec 14 12:28:47 2008 -*************** -*** 2561,2567 **** - int key; - int dlen = 0; - -! key = find_special_key(srcp, &modifiers, keycode); - if (key == 0) - return 0; - ---- 2561,2567 ---- - int key; - int dlen = 0; - -! key = find_special_key(srcp, &modifiers, keycode, FALSE); - if (key == 0) - return 0; - -*************** -*** 2597,2606 **** - * returns 0 if there is no match. - */ - int -! find_special_key(srcp, modp, keycode) - char_u **srcp; - int *modp; -! int keycode; /* prefer key code, e.g. K_DEL instead of DEL */ - { - char_u *last_dash; - char_u *end_of_name; ---- 2597,2607 ---- - * returns 0 if there is no match. - */ - int -! find_special_key(srcp, modp, keycode, keep_x_key) - char_u **srcp; - int *modp; -! int keycode; /* prefer key code, e.g. K_DEL instead of DEL */ -! int keep_x_key; /* don't translate xHome to Home key */ - { - char_u *last_dash; - char_u *end_of_name; -*************** -*** 2668,2674 **** - else - { - key = get_special_key_code(last_dash + 1); -! key = handle_x_keys(key); - } - - /* ---- 2669,2676 ---- - else - { - key = get_special_key_code(last_dash + 1); -! if (!keep_x_key) -! key = handle_x_keys(key); - } - - /* -*** ../vim-7.2.072/src/option.c Fri Nov 28 21:26:50 2008 ---- src/option.c Sun Dec 14 12:28:56 2008 -*************** -*** 8328,8334 **** - { - --arg; /* put arg at the '<' */ - modifiers = 0; -! key = find_special_key(&arg, &modifiers, TRUE); - if (modifiers) /* can't handle modifiers here */ - key = 0; - } ---- 8328,8334 ---- - { - --arg; /* put arg at the '<' */ - modifiers = 0; -! key = find_special_key(&arg, &modifiers, TRUE, TRUE); - if (modifiers) /* can't handle modifiers here */ - key = 0; - } -*** ../vim-7.2.072/src/proto/misc2.pro Thu Jul 24 20:29:37 2008 ---- src/proto/misc2.pro Sun Dec 14 12:29:05 2008 -*************** -*** 59,65 **** - int handle_x_keys __ARGS((int key)); - char_u *get_special_key_name __ARGS((int c, int modifiers)); - int trans_special __ARGS((char_u **srcp, char_u *dst, int keycode)); -! int find_special_key __ARGS((char_u **srcp, int *modp, int keycode)); - int extract_modifiers __ARGS((int key, int *modp)); - int find_special_key_in_table __ARGS((int c)); - int get_special_key_code __ARGS((char_u *name)); ---- 59,65 ---- - int handle_x_keys __ARGS((int key)); - char_u *get_special_key_name __ARGS((int c, int modifiers)); - int trans_special __ARGS((char_u **srcp, char_u *dst, int keycode)); -! int find_special_key __ARGS((char_u **srcp, int *modp, int keycode, int keep_x_key)); - int extract_modifiers __ARGS((int key, int *modp)); - int find_special_key_in_table __ARGS((int c)); - int get_special_key_code __ARGS((char_u *name)); -*** ../vim-7.2.072/src/version.c Wed Dec 24 12:43:15 2008 ---- src/version.c Wed Dec 24 12:51:26 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 73, - /**/ - - --- -ARTHUR: If you do not open these doors, we will take this castle by force ... - [A bucket of slops land on ARTHUR. He tries to retain his dignity.] - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.074 b/vi/vim-7.2/7.2.074 deleted file mode 100644 index 6000fca..0000000 --- a/vi/vim-7.2/7.2.074 +++ /dev/null @@ -1,54 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.074 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.074 (extra, after 7.2.073) -Problem: ":set <xHome>" has the same output as ":set <Home>". (Matt - Wozniski) -Solution: Don't translate "x" keys to its alternative for ":set". -Files: src/gui_mac.c - - -*** ../vim-7.2.073/src/gui_mac.c Sat Aug 9 19:37:28 2008 ---- src/gui_mac.c Sun Dec 14 12:28:26 2008 -*************** -*** 4966,4972 **** - char_u *p_actext; - - p_actext = menu->actext; -! key = find_special_key(&p_actext, &modifiers, /*keycode=*/0); - if (*p_actext != 0) - key = 0; /* error: trailing text */ - /* find_special_key() returns a keycode with as many of the ---- 4966,4972 ---- - char_u *p_actext; - - p_actext = menu->actext; -! key = find_special_key(&p_actext, &modifiers, FALSE, FALSE); - if (*p_actext != 0) - key = 0; /* error: trailing text */ - /* find_special_key() returns a keycode with as many of the -*** ../vim-7.2.073/src/version.c Wed Dec 24 12:53:33 2008 ---- src/version.c Wed Dec 24 12:55:42 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 74, - /**/ - --- - Another bucket of what can only be described as human ordure hits ARTHUR. -ARTHUR: ... Right! (to the KNIGHTS) That settles it! - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.075 b/vi/vim-7.2/7.2.075 deleted file mode 100644 index 4bec708..0000000 --- a/vi/vim-7.2/7.2.075 +++ /dev/null @@ -1,58 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.075 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.075 (after 7.2.058) -Problem: Explanation about making a diff for extra_patches is unclear. -Solution: Adjust comment. -Files: src/version.c - - -*** ../vim-7.2.074/src/version.c Wed Dec 24 13:04:41 2008 ---- src/version.c Wed Dec 24 13:07:47 2008 -*************** -*** 833,839 **** - * Keep it short, e.g.,: "relative numbers", "persistent undo". - * Also add a comment marker to separate the lines. - * See the official Vim patches for the diff format: It must use a context of -! * one line only. Use "diff -C2". - */ - static char *(extra_patches[]) = - { /* Add your patch description below this line */ ---- 835,841 ---- - * Keep it short, e.g.,: "relative numbers", "persistent undo". - * Also add a comment marker to separate the lines. - * See the official Vim patches for the diff format: It must use a context of -! * one line only. Create it by hand or use "diff -C2" and edit the patch. - */ - static char *(extra_patches[]) = - { /* Add your patch description below this line */ -*** ../vim-7.2.074/src/version.c Wed Dec 24 13:04:41 2008 ---- src/version.c Wed Dec 24 13:07:47 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 75, - /**/ - --- -BEDEVERE: Stand by for attack!! - [CUT TO enormous army forming up. Trebuchets, rows of PIKEMEN, siege - towers, pennants flying, shouts of "Stand by for attack!" Traditional - army build-up shots. The shouts echo across the ranks of the army. - We see various groups reacting, and stirring themselves in readiness.] -ARTHUR: Who are they? -BEDEVERE: Oh, just some friends! - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.076 b/vi/vim-7.2/7.2.076 deleted file mode 100644 index 5166bba..0000000 --- a/vi/vim-7.2/7.2.076 +++ /dev/null @@ -1,86 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.076 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.076 -Problem: rename(from, to) deletes the file if "from" and "to" are not equal - but still refer to the same file. E.g., on a FAT32 filesystem - under Unix. -Solution: Go through another file name. -Files: src/fileio.c - - -*** ../vim-7.2.075/src/fileio.c Fri Nov 28 21:26:50 2008 ---- src/fileio.c Tue Dec 30 16:04:44 2008 -*************** -*** 6119,6124 **** ---- 6119,6165 ---- - if (mch_stat((char *)from, &st) < 0) - return -1; - -+ #ifdef UNIX -+ { -+ struct stat st_to; -+ char tempname[MAXPATHL + 1]; -+ -+ /* It's possible for the source and destination to be the same file. -+ * This happens when "from" and "to" differ in case and are on a FAT32 -+ * filesystem. In that case go through a temp file name. */ -+ if (mch_stat((char *)to, &st_to) >= 0 -+ && st.st_dev == st_to.st_dev -+ && st.st_ino == st_to.st_ino) -+ { -+ /* Find a name that doesn't exist and is in the same directory. -+ * Move "from" to "tempname" and then to "to". */ -+ if (STRLEN(from) >= MAXPATHL - 5) -+ return -1; -+ STRCPY(tempname, from); -+ for (n = 123; n < 99999; ++n) -+ { -+ sprintf(gettail(tempname), "%d", n); -+ if (mch_stat(tempname, &st_to) < 0) -+ { -+ if (mch_rename((char *)from, tempname) == 0) -+ { -+ if (mch_rename(tempname, (char *)to) == 0) -+ return 0; -+ /* Strange, the second step failed. Try moving the -+ * file back and return failure. */ -+ mch_rename(tempname, (char *)from); -+ return -1; -+ } -+ /* If it fails for one temp name it will most likely fail -+ * for any temp name, give up. */ -+ return -1; -+ } -+ } -+ return -1; -+ } -+ } -+ #endif -+ - /* - * Delete the "to" file, this is required on some systems to make the - * mch_rename() work, on other systems it makes sure that we don't have -*** ../vim-7.2.075/src/version.c Wed Dec 24 14:24:41 2008 ---- src/version.c Tue Dec 30 16:09:51 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 76, - /**/ - --- -FATAL ERROR! SYSTEM HALTED! - Press any key to continue doing nothing. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.077 b/vi/vim-7.2/7.2.077 deleted file mode 100644 index 396444c..0000000 --- a/vi/vim-7.2/7.2.077 +++ /dev/null @@ -1,164 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.077 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.077 (after 7.2.076) -Problem: rename(from, to) doesn't work if "from" and "to" differ only in - case on a system that ignores case in file names. -Solution: Go through another file name. -Files: src/fileio.c - - -*** ../vim-7.2.076/src/fileio.c Tue Dec 30 16:15:16 2008 ---- src/fileio.c Wed Dec 31 14:59:59 2008 -*************** -*** 6106,6117 **** - #ifdef HAVE_ACL - vim_acl_T acl; /* ACL from original file */ - #endif - - /* -! * When the names are identical, there is nothing to do. - */ - if (fnamecmp(from, to) == 0) -! return 0; - - /* - * Fail if the "from" file doesn't exist. Avoids that "to" is deleted. ---- 6106,6129 ---- - #ifdef HAVE_ACL - vim_acl_T acl; /* ACL from original file */ - #endif -+ #if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME) -+ int use_tmp_file = FALSE; -+ #endif - - /* -! * When the names are identical, there is nothing to do. When they refer -! * to the same file (ignoring case and slash/backslash differences) but -! * the file name differs we need to go through a temp file. - */ - if (fnamecmp(from, to) == 0) -! { -! #ifdef CASE_INSENSITIVE_FILENAME -! if (STRCMP(gettail(from), gettail(to)) != 0) -! use_tmp_file = TRUE; -! else -! #endif -! return 0; -! } - - /* - * Fail if the "from" file doesn't exist. Avoids that "to" is deleted. -*************** -*** 6122,6128 **** - #ifdef UNIX - { - struct stat st_to; -- char tempname[MAXPATHL + 1]; - - /* It's possible for the source and destination to be the same file. - * This happens when "from" and "to" differ in case and are on a FAT32 ---- 6134,6139 ---- -*************** -*** 6130,6162 **** - if (mch_stat((char *)to, &st_to) >= 0 - && st.st_dev == st_to.st_dev - && st.st_ino == st_to.st_ino) - { -! /* Find a name that doesn't exist and is in the same directory. -! * Move "from" to "tempname" and then to "to". */ -! if (STRLEN(from) >= MAXPATHL - 5) -! return -1; -! STRCPY(tempname, from); -! for (n = 123; n < 99999; ++n) - { -! sprintf(gettail(tempname), "%d", n); -! if (mch_stat(tempname, &st_to) < 0) - { -! if (mch_rename((char *)from, tempname) == 0) -! { -! if (mch_rename(tempname, (char *)to) == 0) -! return 0; -! /* Strange, the second step failed. Try moving the -! * file back and return failure. */ -! mch_rename(tempname, (char *)from); -! return -1; -! } -! /* If it fails for one temp name it will most likely fail -! * for any temp name, give up. */ - return -1; - } - } -- return -1; - } - } - #endif - ---- 6141,6182 ---- - if (mch_stat((char *)to, &st_to) >= 0 - && st.st_dev == st_to.st_dev - && st.st_ino == st_to.st_ino) -+ use_tmp_file = TRUE; -+ } -+ #endif -+ -+ #if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME) -+ if (use_tmp_file) -+ { -+ char tempname[MAXPATHL + 1]; -+ -+ /* -+ * Find a name that doesn't exist and is in the same directory. -+ * Rename "from" to "tempname" and then rename "tempname" to "to". -+ */ -+ if (STRLEN(from) >= MAXPATHL - 5) -+ return -1; -+ STRCPY(tempname, from); -+ for (n = 123; n < 99999; ++n) - { -! sprintf((char *)gettail((char_u *)tempname), "%d", n); -! if (mch_stat(tempname, &st) < 0) - { -! if (mch_rename((char *)from, tempname) == 0) - { -! if (mch_rename(tempname, (char *)to) == 0) -! return 0; -! /* Strange, the second step failed. Try moving the -! * file back and return failure. */ -! mch_rename(tempname, (char *)from); - return -1; - } -+ /* If it fails for one temp name it will most likely fail -+ * for any temp name, give up. */ -+ return -1; - } - } -+ return -1; - } - #endif - -*** ../vim-7.2.076/src/version.c Tue Dec 30 16:15:16 2008 ---- src/version.c Wed Dec 31 16:19:29 2008 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 77, - /**/ - --- -We apologise again for the fault in the subtitles. Those responsible for -sacking the people who have just been sacked have been sacked. - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.078 b/vi/vim-7.2/7.2.078 deleted file mode 100644 index 0e127bc..0000000 --- a/vi/vim-7.2/7.2.078 +++ /dev/null @@ -1,120 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.078 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.078 -Problem: When deleting a fold that is specified with markers the cursor - position may be wrong. Folds may not be displayed properly after - a delete. Wrong fold may be deleted. -Solution: Fix the problems. (mostly by Lech Lorens) -Files: src/fold.c - - -*** ../vim-7.2.077/src/fold.c Fri Nov 28 21:26:50 2008 ---- src/fold.c Tue Jan 6 14:53:26 2009 -*************** -*** 740,746 **** - garray_T *found_ga; - fold_T *found_fp = NULL; - linenr_T found_off = 0; -! int use_level = FALSE; - int maybe_small = FALSE; - int level = 0; - linenr_T lnum = start; ---- 740,746 ---- - garray_T *found_ga; - fold_T *found_fp = NULL; - linenr_T found_off = 0; -! int use_level; - int maybe_small = FALSE; - int level = 0; - linenr_T lnum = start; -*************** -*** 757,762 **** ---- 757,763 ---- - gap = &curwin->w_folds; - found_ga = NULL; - lnum_off = 0; -+ use_level = FALSE; - for (;;) - { - if (!foldFind(gap, lnum - lnum_off, &fp)) -*************** -*** 783,802 **** - else - { - lnum = found_fp->fd_top + found_fp->fd_len + found_off; -- did_one = TRUE; - - if (foldmethodIsManual(curwin)) - deleteFoldEntry(found_ga, - (int)(found_fp - (fold_T *)found_ga->ga_data), recursive); - else - { -! if (found_fp->fd_top + found_off < first_lnum) -! first_lnum = found_fp->fd_top; -! if (lnum > last_lnum) - last_lnum = lnum; -! parseMarker(curwin); - deleteFoldMarkers(found_fp, recursive, found_off); - } - - /* redraw window */ - changed_window_setting(); ---- 784,804 ---- - else - { - lnum = found_fp->fd_top + found_fp->fd_len + found_off; - - if (foldmethodIsManual(curwin)) - deleteFoldEntry(found_ga, - (int)(found_fp - (fold_T *)found_ga->ga_data), recursive); - else - { -! if (first_lnum > found_fp->fd_top + found_off) -! first_lnum = found_fp->fd_top + found_off; -! if (last_lnum < lnum) - last_lnum = lnum; -! if (!did_one) -! parseMarker(curwin); - deleteFoldMarkers(found_fp, recursive, found_off); - } -+ did_one = TRUE; - - /* redraw window */ - changed_window_setting(); -*************** -*** 811,816 **** ---- 813,822 ---- - redraw_curbuf_later(INVERTED); - #endif - } -+ else -+ /* Deleting markers may make cursor column invalid. */ -+ check_cursor_col(); -+ - if (last_lnum > 0) - changed_lines(first_lnum, (colnr_T)0, last_lnum, 0L); - } -*** ../vim-7.2.077/src/version.c Wed Dec 31 16:20:54 2008 ---- src/version.c Tue Jan 6 15:00:36 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 78, - /**/ - --- -Looking at Perl through Lisp glasses, Perl looks atrocious. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.079 b/vi/vim-7.2/7.2.079 deleted file mode 100644 index 60da797..0000000 --- a/vi/vim-7.2/7.2.079 +++ /dev/null @@ -1,229 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.079 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.079 -Problem: "killed" netbeans events are not handled correctly. -Solution: A "killed" netbeans event is sent when the buffer is deleted or - wiped out (in this case, the netbeans annotations in this buffer - have been removed). A user can still remove a sign with the - command ":sign unplace" and this does not trigger a "killed" - event. (Xavier de Gaye) -Files: runtime/doc/netbeans.txt, src/buffer.c, src/globals.h, - src/netbeans.c, src/proto/netbeans.pro - - -*** ../vim-7.2.078/runtime/doc/netbeans.txt Sat Aug 9 19:36:49 2008 ---- runtime/doc/netbeans.txt Tue Jan 6 15:23:39 2009 -*************** -*** 1,4 **** -! *netbeans.txt* For Vim version 7.2. Last change: 2008 Jun 28 - - - VIM REFERENCE MANUAL by Gordon Prieur et al. ---- 1,4 ---- -! *netbeans.txt* For Vim version 7.2. Last change: 2009 Jan 06 - - - VIM REFERENCE MANUAL by Gordon Prieur et al. -*************** -*** 722,729 **** - of the cursor. - New in version 2.1. - -! killed A file was closed by the user. Only for files that have been -! assigned a number by the IDE. - - newDotAndMark off off - Reports the position of the cursor being at "off" bytes into ---- 722,731 ---- - of the cursor. - New in version 2.1. - -! killed A file was deleted or wiped out by the user and the buffer -! annotations have been removed. The bufID number for this -! buffer has become invalid. Only for files that have been -! assigned a bufID number by the IDE. - - newDotAndMark off off - Reports the position of the cursor being at "off" bytes into -*** ../vim-7.2.078/src/buffer.c Wed Dec 3 11:21:20 2008 ---- src/buffer.c Tue Jan 6 15:23:02 2009 -*************** -*** 437,446 **** - return; - #endif - -- #ifdef FEAT_NETBEANS_INTG -- if (usingNetbeans) -- netbeans_file_closed(buf); -- #endif - /* Change directories when the 'acd' option is set. */ - DO_AUTOCHDIR - ---- 437,442 ---- -*************** -*** 639,644 **** ---- 635,644 ---- - #ifdef FEAT_SIGNS - buf_delete_signs(buf); /* delete any signs */ - #endif -+ #ifdef FEAT_NETBEANS_INTG -+ if (usingNetbeans) -+ netbeans_file_killed(buf); -+ #endif - #ifdef FEAT_LOCALMAP - map_clear_int(buf, MAP_ALL_MODES, TRUE, FALSE); /* clear local mappings */ - map_clear_int(buf, MAP_ALL_MODES, TRUE, TRUE); /* clear local abbrevs */ -*************** -*** 815,823 **** - int bnr; /* buffer number */ - char_u *p; - -- #ifdef FEAT_NETBEANS_INTG -- netbeansCloseFile = 1; -- #endif - if (addr_count == 0) - { - (void)do_buffer(command, DOBUF_CURRENT, FORWARD, 0, forceit); ---- 815,820 ---- -*************** -*** 912,920 **** - } - } - -- #ifdef FEAT_NETBEANS_INTG -- netbeansCloseFile = 0; -- #endif - - return errormsg; - } ---- 909,914 ---- -*** ../vim-7.2.078/src/globals.h Fri Nov 28 21:26:50 2008 ---- src/globals.h Tue Jan 6 15:23:02 2009 -*************** -*** 1340,1346 **** - - #ifdef FEAT_NETBEANS_INTG - EXTERN char *netbeansArg INIT(= NULL); /* the -nb[:host:port:passwd] arg */ -- EXTERN int netbeansCloseFile INIT(= 0); /* send killed if != 0 */ - EXTERN int netbeansFireChanges INIT(= 1); /* send buffer changes if != 0 */ - EXTERN int netbeansForcedQuit INIT(= 0);/* don't write modified files */ - EXTERN int netbeansReadFile INIT(= 1); /* OK to read from disk if != 0 */ ---- 1340,1345 ---- -*** ../vim-7.2.078/src/netbeans.c Wed Dec 24 12:20:10 2008 ---- src/netbeans.c Tue Jan 6 15:23:02 2009 -*************** -*** 2921,2964 **** - } - - /* -! * Tell netbeans a file was closed. - */ - void -! netbeans_file_closed(buf_T *bufp) - { - int bufno = nb_getbufno(bufp); - nbbuf_T *nbbuf = nb_get_buf(bufno); - char buffer[2*MAXPATHL]; - -! if (!haveConnection || bufno < 0) - return; - -! if (!netbeansCloseFile) -! { -! nbdebug(("Ignoring file_closed for %s. File was closed from IDE\n", -! bufp->b_ffname)); -! return; -! } -! -! nbdebug(("netbeans_file_closed:\n")); -! nbdebug((" Closing bufno: %d", bufno)); -! if (curbuf != NULL && curbuf != bufp) -! { -! nbdebug((" Curbuf bufno: %d\n", nb_getbufno(curbuf))); -! } -! else if (curbuf == bufp) -! { -! nbdebug((" curbuf == bufp\n")); -! } -! -! if (bufno <= 0) -! return; - - sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno); - - nbdebug(("EVT: %s", buffer)); - -! nb_send(buffer, "netbeans_file_closed"); - - if (nbbuf != NULL) - nbbuf->bufp = NULL; ---- 2921,2946 ---- - } - - /* -! * Tell netbeans that a file was deleted or wiped out. - */ - void -! netbeans_file_killed(buf_T *bufp) - { - int bufno = nb_getbufno(bufp); - nbbuf_T *nbbuf = nb_get_buf(bufno); - char buffer[2*MAXPATHL]; - -! if (!haveConnection || bufno == -1) - return; - -! nbdebug(("netbeans_file_killed:\n")); -! nbdebug((" Killing bufno: %d", bufno)); - - sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno); - - nbdebug(("EVT: %s", buffer)); - -! nb_send(buffer, "netbeans_file_killed"); - - if (nbbuf != NULL) - nbbuf->bufp = NULL; -*** ../vim-7.2.078/src/proto/netbeans.pro Tue Jun 24 23:25:53 2008 ---- src/proto/netbeans.pro Tue Jan 6 15:23:02 2009 -*************** -*** 11,17 **** - void netbeans_frame_moved __ARGS((int new_x, int new_y)); - void netbeans_file_activated __ARGS((buf_T *bufp)); - void netbeans_file_opened __ARGS((buf_T *bufp)); -! void netbeans_file_closed __ARGS((buf_T *bufp)); - void netbeans_inserted __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, char_u *txt, int newlen)); - void netbeans_removed __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, long len)); - void netbeans_unmodified __ARGS((buf_T *bufp)); ---- 11,17 ---- - void netbeans_frame_moved __ARGS((int new_x, int new_y)); - void netbeans_file_activated __ARGS((buf_T *bufp)); - void netbeans_file_opened __ARGS((buf_T *bufp)); -! void netbeans_file_killed __ARGS((buf_T *bufp)); - void netbeans_inserted __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, char_u *txt, int newlen)); - void netbeans_removed __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, long len)); - void netbeans_unmodified __ARGS((buf_T *bufp)); -*** ../vim-7.2.078/src/version.c Tue Jan 6 15:01:58 2009 ---- src/version.c Tue Jan 6 16:11:11 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 79, - /**/ - --- -Friends? I have lots of friends! In fact, I have every episode ever made. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.080 b/vi/vim-7.2/7.2.080 deleted file mode 100644 index 399f9e1..0000000 --- a/vi/vim-7.2/7.2.080 +++ /dev/null @@ -1,365 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.080 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.080 -Problem: When typing a composing character just after starting completion - may access memory before its allocation point. (Dominique Pelle) -Solution: Don't delete before the completion start column. Add extra checks - for the offset not being negative. -Files: src/edit.c - - -*** ../vim-7.2.079/src/edit.c Wed Aug 6 18:56:55 2008 ---- src/edit.c Tue Jan 13 12:05:57 2009 -*************** -*** 147,152 **** ---- 147,153 ---- - static int ins_compl_bs __ARGS((void)); - static void ins_compl_new_leader __ARGS((void)); - static void ins_compl_addleader __ARGS((int c)); -+ static int ins_compl_len __ARGS((void)); - static void ins_compl_restart __ARGS((void)); - static void ins_compl_set_original_text __ARGS((char_u *str)); - static void ins_compl_addfrommatch __ARGS((void)); -*************** -*** 197,203 **** - static void mb_replace_pop_ins __ARGS((int cc)); - #endif - static void replace_flush __ARGS((void)); -! static void replace_do_bs __ARGS((void)); - #ifdef FEAT_CINDENT - static int cindent_on __ARGS((void)); - #endif ---- 198,205 ---- - static void mb_replace_pop_ins __ARGS((int cc)); - #endif - static void replace_flush __ARGS((void)); -! static void replace_do_bs __ARGS((int limit_col)); -! static int del_char_after_col __ARGS((int limit_col)); - #ifdef FEAT_CINDENT - static int cindent_on __ARGS((void)); - #endif -*************** -*** 1933,1938 **** ---- 1935,1942 ---- - /* - * Backspace the cursor until the given column. Handles REPLACE and VREPLACE - * modes correctly. May also be used when not in insert mode at all. -+ * Will attempt not to go before "col" even when there is a composing -+ * character. - */ - void - backspace_until_column(col) -*************** -*** 1942,1954 **** - { - curwin->w_cursor.col--; - if (State & REPLACE_FLAG) -! replace_do_bs(); -! else -! (void)del_char(FALSE); - } - } - #endif - - #if defined(FEAT_INS_EXPAND) || defined(PROTO) - /* - * CTRL-X pressed in Insert mode. ---- 1946,1994 ---- - { - curwin->w_cursor.col--; - if (State & REPLACE_FLAG) -! replace_do_bs(col); -! else if (!del_char_after_col(col)) -! break; - } - } - #endif - -+ /* -+ * Like del_char(), but make sure not to go before column "limit_col". -+ * Only matters when there are composing characters. -+ * Return TRUE when something was deleted. -+ */ -+ static int -+ del_char_after_col(limit_col) -+ int limit_col; -+ { -+ #ifdef FEAT_MBYTE -+ if (enc_utf8 && limit_col >= 0) -+ { -+ int ecol = curwin->w_cursor.col + 1; -+ -+ /* Make sure the cursor is at the start of a character, but -+ * skip forward again when going too far back because of a -+ * composing character. */ -+ mb_adjust_cursor(); -+ while (curwin->w_cursor.col < limit_col) -+ { -+ int l = utf_ptr2len(ml_get_cursor()); -+ -+ if (l == 0) /* end of line */ -+ break; -+ curwin->w_cursor.col += l; -+ } -+ if (*ml_get_cursor() == NUL || curwin->w_cursor.col == ecol) -+ return FALSE; -+ del_bytes((long)(ecol - curwin->w_cursor.col), FALSE, TRUE); -+ } -+ else -+ #endif -+ (void)del_char(FALSE); -+ return TRUE; -+ } -+ - #if defined(FEAT_INS_EXPAND) || defined(PROTO) - /* - * CTRL-X pressed in Insert mode. -*************** -*** 2418,2424 **** - { - had_match = (curwin->w_cursor.col > compl_col); - ins_compl_delete(); -! ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); - ins_redraw(FALSE); - - /* When the match isn't there (to avoid matching itself) remove it ---- 2458,2464 ---- - { - had_match = (curwin->w_cursor.col > compl_col); - ins_compl_delete(); -! ins_bytes(compl_leader + ins_compl_len()); - ins_redraw(FALSE); - - /* When the match isn't there (to avoid matching itself) remove it -*************** -*** 2470,2476 **** - *p = NUL; - had_match = (curwin->w_cursor.col > compl_col); - ins_compl_delete(); -! ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); - ins_redraw(FALSE); - - /* When the match isn't there (to avoid matching itself) remove it ---- 2510,2516 ---- - *p = NUL; - had_match = (curwin->w_cursor.col > compl_col); - ins_compl_delete(); -! ins_bytes(compl_leader + ins_compl_len()); - ins_redraw(FALSE); - - /* When the match isn't there (to avoid matching itself) remove it -*************** -*** 3209,3215 **** - { - ins_compl_del_pum(); - ins_compl_delete(); -! ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); - compl_used_match = FALSE; - - if (compl_started) ---- 3249,3255 ---- - { - ins_compl_del_pum(); - ins_compl_delete(); -! ins_bytes(compl_leader + ins_compl_len()); - compl_used_match = FALSE; - - if (compl_started) -*************** -*** 3264,3269 **** ---- 3304,3323 ---- - } - - /* -+ * Return the length of the completion, from the completion start column to -+ * the cursor column. Making sure it never goes below zero. -+ */ -+ static int -+ ins_compl_len() -+ { -+ int off = curwin->w_cursor.col - compl_col; -+ -+ if (off < 0) -+ return 0; -+ return off; -+ } -+ -+ /* - * Append one character to the match leader. May reduce the number of - * matches. - */ -*************** -*** 3621,3630 **** - { - ins_compl_delete(); - if (compl_leader != NULL) -! ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); - else if (compl_first_match != NULL) -! ins_bytes(compl_orig_text -! + curwin->w_cursor.col - compl_col); - retval = TRUE; - } - ---- 3675,3683 ---- - { - ins_compl_delete(); - if (compl_leader != NULL) -! ins_bytes(compl_leader + ins_compl_len()); - else if (compl_first_match != NULL) -! ins_bytes(compl_orig_text + ins_compl_len()); - retval = TRUE; - } - -*************** -*** 4256,4262 **** - static void - ins_compl_insert() - { -! ins_bytes(compl_shown_match->cp_str + curwin->w_cursor.col - compl_col); - if (compl_shown_match->cp_flags & ORIGINAL_TEXT) - compl_used_match = FALSE; - else ---- 4309,4315 ---- - static void - ins_compl_insert() - { -! ins_bytes(compl_shown_match->cp_str + ins_compl_len()); - if (compl_shown_match->cp_flags & ORIGINAL_TEXT) - compl_used_match = FALSE; - else -*************** -*** 4425,4431 **** - if (!compl_get_longest || compl_used_match) - ins_compl_insert(); - else -! ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); - } - else - compl_used_match = FALSE; ---- 4478,4484 ---- - if (!compl_get_longest || compl_used_match) - ins_compl_insert(); - else -! ins_bytes(compl_leader + ins_compl_len()); - } - else - compl_used_match = FALSE; -*************** -*** 7123,7131 **** - * cc == 0: character was inserted, delete it - * cc > 0: character was replaced, put cc (first byte of original char) back - * and check for more characters to be put back - */ - static void -! replace_do_bs() - { - int cc; - #ifdef FEAT_VREPLACE ---- 7176,7187 ---- - * cc == 0: character was inserted, delete it - * cc > 0: character was replaced, put cc (first byte of original char) back - * and check for more characters to be put back -+ * When "limit_col" is >= 0, don't delete before this column. Matters when -+ * using composing characters, use del_char_after_col() instead of del_char(). - */ - static void -! replace_do_bs(limit_col) -! int limit_col; - { - int cc; - #ifdef FEAT_VREPLACE -*************** -*** 7153,7159 **** - #ifdef FEAT_MBYTE - if (has_mbyte) - { -! del_char(FALSE); - # ifdef FEAT_VREPLACE - if (State & VREPLACE_FLAG) - orig_len = (int)STRLEN(ml_get_cursor()); ---- 7209,7215 ---- - #ifdef FEAT_MBYTE - if (has_mbyte) - { -! (void)del_char_after_col(limit_col); - # ifdef FEAT_VREPLACE - if (State & VREPLACE_FLAG) - orig_len = (int)STRLEN(ml_get_cursor()); -*************** -*** 7203,7209 **** - changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col); - } - else if (cc == 0) -! (void)del_char(FALSE); - } - - #ifdef FEAT_CINDENT ---- 7259,7265 ---- - changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col); - } - else if (cc == 0) -! (void)del_char_after_col(limit_col); - } - - #ifdef FEAT_CINDENT -*************** -*** 8239,8245 **** - * Replace mode */ - if (curwin->w_cursor.lnum != Insstart.lnum - || curwin->w_cursor.col >= Insstart.col) -! replace_do_bs(); - } - else - (void)del_char(FALSE); ---- 8295,8301 ---- - * Replace mode */ - if (curwin->w_cursor.lnum != Insstart.lnum - || curwin->w_cursor.col >= Insstart.col) -! replace_do_bs(-1); - } - else - (void)del_char(FALSE); -*************** -*** 8556,8562 **** - break; - } - if (State & REPLACE_FLAG) -! replace_do_bs(); - else - { - #ifdef FEAT_MBYTE ---- 8612,8618 ---- - break; - } - if (State & REPLACE_FLAG) -! replace_do_bs(-1); - else - { - #ifdef FEAT_MBYTE -*** ../vim-7.2.079/src/version.c Tue Jan 6 16:13:42 2009 ---- src/version.c Tue Jan 13 12:25:29 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 80, - /**/ - --- -At some point in the project somebody will start whining about the need to -determine the project "requirements". This involves interviewing people who -don't know what they want but, curiously, know exactly when they need it. - (Scott Adams - The Dilbert principle) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.081 b/vi/vim-7.2/7.2.081 deleted file mode 100644 index 9f1259d..0000000 --- a/vi/vim-7.2/7.2.081 +++ /dev/null @@ -1,60 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.081 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.081 -Problem: Compiler warning for floating point overflow on VAX. -Solution: For VAX use a smaller number. (Zoltan Arpadffy) -Files: src/message.c - - -*** ../vim-7.2.080/src/message.c Fri Nov 28 21:26:50 2008 ---- src/message.c Tue Jan 13 16:19:07 2009 -*************** -*** 4556,4562 **** - remove_trailing_zeroes = TRUE; - } - -! if (fmt_spec == 'f' && abs_f > 1.0e307) - { - /* Avoid a buffer overflow */ - strcpy(tmp, "inf"); ---- 4556,4568 ---- - remove_trailing_zeroes = TRUE; - } - -! if (fmt_spec == 'f' && -! #ifdef VAX -! abs_f > 1.0e38 -! #else -! abs_f > 1.0e307 -! #endif -! ) - { - /* Avoid a buffer overflow */ - strcpy(tmp, "inf"); -*** ../vim-7.2.080/src/version.c Tue Jan 13 12:29:03 2009 ---- src/version.c Tue Jan 13 16:19:52 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 81, - /**/ - --- -Sometimes you can protect millions of dollars in your budget simply by buying -a bag of cookies, dropping it on the budget anylyst's desk, and saying -something deeply personal such as "How was your weekend, big guy?" - (Scott Adams - The Dilbert principle) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.082 b/vi/vim-7.2/7.2.082 deleted file mode 100644 index c6bf703..0000000 --- a/vi/vim-7.2/7.2.082 +++ /dev/null @@ -1,77 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.082 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.082 -Problem: When 'ff' is "mac" then "ga" on a ^J shows 0x0d instead of 0x0a. - (Andy Wokula) -Solution: Use NL for this situation. (Lech Lorens) -Files: src/ex_cmds.c - - -*** ../vim-7.2.081/src/ex_cmds.c Fri Nov 28 21:26:50 2008 ---- src/ex_cmds.c Tue Jan 13 16:51:32 2009 -*************** -*** 49,54 **** ---- 49,55 ---- - exarg_T *eap; - { - int c; -+ int cval; - char buf1[20]; - char buf2[20]; - char_u buf3[7]; -*************** -*** 75,80 **** ---- 76,85 ---- - { - if (c == NL) /* NUL is stored as NL */ - c = NUL; -+ if (c == CAR && get_fileformat(curbuf) == EOL_MAC) -+ cval = NL; /* NL is stored as CR */ -+ else -+ cval = c; - if (vim_isprintc_strict(c) && (c < ' ' - #ifndef EBCDIC - || c > '~' -*************** -*** 94,100 **** - buf2[0] = NUL; - vim_snprintf((char *)IObuff, IOSIZE, - _("<%s>%s%s %d, Hex %02x, Octal %03o"), -! transchar(c), buf1, buf2, c, c, c); - #ifdef FEAT_MBYTE - if (enc_utf8) - c = cc[ci++]; ---- 99,105 ---- - buf2[0] = NUL; - vim_snprintf((char *)IObuff, IOSIZE, - _("<%s>%s%s %d, Hex %02x, Octal %03o"), -! transchar(c), buf1, buf2, cval, cval, cval); - #ifdef FEAT_MBYTE - if (enc_utf8) - c = cc[ci++]; -*** ../vim-7.2.081/src/version.c Tue Jan 13 16:37:31 2009 ---- src/version.c Tue Jan 13 16:53:39 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 82, - /**/ - --- -The budget process was invented by an alien race of sadistic beings who -resemble large cats. - (Scott Adams - The Dilbert principle) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.083 b/vi/vim-7.2/7.2.083 deleted file mode 100644 index 5406ebc..0000000 --- a/vi/vim-7.2/7.2.083 +++ /dev/null @@ -1,54 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.083 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.083 -Problem: ":tag" does not return to the right tag entry from the tag stack. -Solution: Don't change the current match when there is no argument. - (Erik Falor) -Files: src/tag.c - - -*** ../vim-7.2.082/src/tag.c Tue Dec 9 12:12:31 2008 ---- src/tag.c Tue Jan 13 17:14:59 2009 -*************** -*** 515,521 **** - * If a count is supplied to the ":tag <name>" command, then - * jump to count'th matching tag. - */ -! if (type == DT_TAG && count > 0) - cur_match = count - 1; - - if (type == DT_SELECT || type == DT_JUMP ---- 515,521 ---- - * If a count is supplied to the ":tag <name>" command, then - * jump to count'th matching tag. - */ -! if (type == DT_TAG && *tag != NUL && count > 0) - cur_match = count - 1; - - if (type == DT_SELECT || type == DT_JUMP -*** ../vim-7.2.082/src/version.c Tue Jan 13 16:57:09 2009 ---- src/version.c Tue Jan 13 17:16:42 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 83, - /**/ - --- -Engineers will go without food and hygiene for days to solve a problem. -(Other times just because they forgot.) - (Scott Adams - The Dilbert principle) - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.084 b/vi/vim-7.2/7.2.084 deleted file mode 100644 index 4c912ca..0000000 --- a/vi/vim-7.2/7.2.084 +++ /dev/null @@ -1,144 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.084 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.084 -Problem: Recursive structures are not handled properly in Python - vim.eval(). -Solution: Keep track of references in a better way. (Yukihiro Nakadaira) -Files: src/if_python.c - - -*** ../vim-7.2.083/src/if_python.c Thu Nov 20 11:04:01 2008 ---- src/if_python.c Tue Jan 13 18:08:06 2009 -*************** -*** 1151,1164 **** - - /* Check if we run into a recursive loop. The item must be in lookupDict - * then and we can use it again. */ -! sprintf(ptrBuf, PRINTF_DECIMAL_LONG_U, (long_u)our_tv); -! result = PyDict_GetItemString(lookupDict, ptrBuf); -! if (result != NULL) -! Py_INCREF(result); -! else if (our_tv->v_type == VAR_STRING) - { - result = Py_BuildValue("s", our_tv->vval.v_string); -- PyDict_SetItemString(lookupDict, ptrBuf, result); - } - else if (our_tv->v_type == VAR_NUMBER) - { ---- 1151,1173 ---- - - /* Check if we run into a recursive loop. The item must be in lookupDict - * then and we can use it again. */ -! if ((our_tv->v_type == VAR_LIST && our_tv->vval.v_list != NULL) -! || (our_tv->v_type == VAR_DICT && our_tv->vval.v_dict != NULL)) -! { -! sprintf(ptrBuf, PRINTF_DECIMAL_LONG_U, -! our_tv->v_type == VAR_LIST ? (long_u)our_tv->vval.v_list -! : (long_u)our_tv->vval.v_dict); -! result = PyDict_GetItemString(lookupDict, ptrBuf); -! if (result != NULL) -! { -! Py_INCREF(result); -! return result; -! } -! } -! -! if (our_tv->v_type == VAR_STRING) - { - result = Py_BuildValue("s", our_tv->vval.v_string); - } - else if (our_tv->v_type == VAR_NUMBER) - { -*************** -*** 1167,1173 **** - /* For backwards compatibility numbers are stored as strings. */ - sprintf(buf, "%ld", (long)our_tv->vval.v_number); - result = Py_BuildValue("s", buf); -- PyDict_SetItemString(lookupDict, ptrBuf, result); - } - # ifdef FEAT_FLOAT - else if (our_tv->v_type == VAR_FLOAT) ---- 1176,1181 ---- -*************** -*** 1176,1182 **** - - sprintf(buf, "%f", our_tv->vval.v_float); - result = Py_BuildValue("s", buf); -- PyDict_SetItemString(lookupDict, ptrBuf, result); - } - # endif - else if (our_tv->v_type == VAR_LIST) ---- 1184,1189 ---- -*************** -*** 1185,1194 **** - listitem_T *curr; - - result = PyList_New(0); -- PyDict_SetItemString(lookupDict, ptrBuf, result); - - if (list != NULL) - { - for (curr = list->lv_first; curr != NULL; curr = curr->li_next) - { - newObj = VimToPython(&curr->li_tv, depth + 1, lookupDict); ---- 1192,1202 ---- - listitem_T *curr; - - result = PyList_New(0); - - if (list != NULL) - { -+ PyDict_SetItemString(lookupDict, ptrBuf, result); -+ - for (curr = list->lv_first; curr != NULL; curr = curr->li_next) - { - newObj = VimToPython(&curr->li_tv, depth + 1, lookupDict); -*************** -*** 1200,1206 **** - else if (our_tv->v_type == VAR_DICT) - { - result = PyDict_New(); -- PyDict_SetItemString(lookupDict, ptrBuf, result); - - if (our_tv->vval.v_dict != NULL) - { ---- 1208,1213 ---- -*************** -*** 1209,1214 **** ---- 1216,1223 ---- - hashitem_T *hi; - dictitem_T *di; - -+ PyDict_SetItemString(lookupDict, ptrBuf, result); -+ - for (hi = ht->ht_array; todo > 0; ++hi) - { - if (!HASHITEM_EMPTY(hi)) -*** ../vim-7.2.083/src/version.c Tue Jan 13 17:27:18 2009 ---- src/version.c Tue Jan 13 17:54:14 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 84, - /**/ - --- -Article in the first Free Software Magazine: "Bram Moolenaar studied electrical -engineering at the Technical University of Delft and graduated in 1985 on a -multi-processor Unix architecture." -Response by "dimator": Could the school not afford a proper stage for the -ceremony? - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.085 b/vi/vim-7.2/7.2.085 deleted file mode 100644 index f9828fa..0000000 --- a/vi/vim-7.2/7.2.085 +++ /dev/null @@ -1,62 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.085 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.085 -Problem: ":set <M-b>=<Esc>b" does not work when 'encoding' is utf-8. -Solution: Put the <M-b> character in the input buffer as valid utf-8. - (partly by Matt Wosniski) -Files: src/term.c - - -*** ../vim-7.2.084/src/term.c Tue Jul 29 12:22:12 2008 ---- src/term.c Thu Jan 22 18:18:29 2009 -*************** -*** 4920,4926 **** - key_name[0] = KEY2TERMCAP0(key); - key_name[1] = KEY2TERMCAP1(key); - if (key_name[0] == KS_KEY) -! string[new_slen++] = key_name[1]; /* from ":set <M-b>=xx" */ - else - { - string[new_slen++] = K_SPECIAL; ---- 4920,4934 ---- - key_name[0] = KEY2TERMCAP0(key); - key_name[1] = KEY2TERMCAP1(key); - if (key_name[0] == KS_KEY) -! { -! /* from ":set <M-b>=xx" */ -! #ifdef FEAT_MBYTE -! if (has_mbyte) -! new_slen += (*mb_char2bytes)(key_name[1], string + new_slen); -! else -! #endif -! string[new_slen++] = key_name[1]; -! } - else - { - string[new_slen++] = K_SPECIAL; -*** ../vim-7.2.084/src/version.c Tue Jan 13 18:10:21 2009 ---- src/version.c Thu Jan 22 18:31:50 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 85, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -20. When looking at a pageful of someone else's links, you notice all of them - are already highlighted in purple. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.086 b/vi/vim-7.2/7.2.086 deleted file mode 100644 index f55efbb..0000000 --- a/vi/vim-7.2/7.2.086 +++ /dev/null @@ -1,98 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.086 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.086 -Problem: Using ":diffget 1" in buffer 1 corrupts the text. -Solution: Don't do anything when source and destination of ":diffget" or - ":diffput" is the same buffer. (Dominique Pelle) -Files: src/diff.c - - -*** ../vim-7.2.085/src/diff.c Sun Nov 30 15:15:56 2008 ---- src/diff.c Wed Jan 14 20:40:25 2009 -*************** -*** 8,14 **** - */ - - /* -! * diff.c: code for diff'ing two or three buffers. - */ - - #include "vim.h" ---- 8,14 ---- - */ - - /* -! * diff.c: code for diff'ing two, three or four buffers. - */ - - #include "vim.h" -*************** -*** 116,122 **** - * Add a buffer to make diffs for. - * Call this when a new buffer is being edited in the current window where - * 'diff' is set. -! * Marks the current buffer as being part of the diff and requireing updating. - * This must be done before any autocmd, because a command may use info - * about the screen contents. - */ ---- 116,122 ---- - * Add a buffer to make diffs for. - * Call this when a new buffer is being edited in the current window where - * 'diff' is set. -! * Marks the current buffer as being part of the diff and requiring updating. - * This must be done before any autocmd, because a command may use info - * about the screen contents. - */ -*************** -*** 929,935 **** - goto theend; - - #ifdef UNIX -! /* Temporaraly chdir to /tmp, to avoid patching files in the current - * directory when the patch file contains more than one patch. When we - * have our own temp dir use that instead, it will be cleaned up when we - * exit (any .rej files created). Don't change directory if we can't ---- 929,935 ---- - goto theend; - - #ifdef UNIX -! /* Temporarily chdir to /tmp, to avoid patching files in the current - * directory when the patch file contains more than one patch. When we - * have our own temp dir use that instead, it will be cleaned up when we - * exit (any .rej files created). Don't change directory if we can't -*************** -*** 2129,2134 **** ---- 2129,2136 ---- - EMSG2(_("E102: Can't find buffer \"%s\""), eap->arg); - return; - } -+ if (buf == curbuf) -+ return; /* nothing to do */ - idx_other = diff_buf_idx(buf); - if (idx_other == DB_COUNT) - { -*** ../vim-7.2.085/src/version.c Thu Jan 22 18:32:55 2009 ---- src/version.c Thu Jan 22 20:46:54 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 86, - /**/ - --- -Shift happens. - -- Doppler - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.087 b/vi/vim-7.2/7.2.087 deleted file mode 100644 index 942acca..0000000 --- a/vi/vim-7.2/7.2.087 +++ /dev/null @@ -1,53 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.087 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.087 -Problem: Adding URL to 'path' doesn't work to edit a file. -Solution: Skip simplify_filename() for URLs. (Matt Wosniski) -Files: src/misc2.c - - -*** ../vim-7.2.086/src/misc2.c Wed Dec 24 12:53:33 2008 ---- src/misc2.c Sun Jan 18 12:26:20 2009 -*************** -*** 4696,4702 **** - stackp->ffs_filearray_cur = i + 1; - ff_push(search_ctx, stackp); - -! simplify_filename(file_path); - if (mch_dirname(ff_expand_buffer, MAXPATHL) - == OK) - { ---- 4696,4703 ---- - stackp->ffs_filearray_cur = i + 1; - ff_push(search_ctx, stackp); - -! if (!path_with_url(file_path)) -! simplify_filename(file_path); - if (mch_dirname(ff_expand_buffer, MAXPATHL) - == OK) - { -*** ../vim-7.2.086/src/version.c Thu Jan 22 20:48:07 2009 ---- src/version.c Thu Jan 22 21:30:36 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 87, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -21. Your dog has its own home page. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.088 b/vi/vim-7.2/7.2.088 deleted file mode 100644 index 1cb9851..0000000 --- a/vi/vim-7.2/7.2.088 +++ /dev/null @@ -1,99 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.088 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.088 (extra) -Problem: OpenClipboard() may fail when another application is using the - clipboard. -Solution: Retry OpenClipboard() a few times. (Jianrong Yu) -Files: src/os_mswin.c - - -*** ../vim-7.2.087/src/os_mswin.c Thu Nov 20 17:09:09 2008 ---- src/os_mswin.c Thu Jan 22 18:38:12 2009 -*************** -*** 1224,1229 **** ---- 1224,1248 ---- - #endif /* FEAT_MBYTE */ - - /* -+ * Wait for another process to Close the Clipboard. -+ * Returns TRUE for success. -+ */ -+ int -+ vim_open_clipboard() -+ { -+ int delay = 10; -+ -+ while (!OpenClipboard(NULL)) -+ { -+ if (delay > 500) -+ return FALSE; /* waited too long, give up */ -+ Sleep(delay); -+ delay *= 2; /* wait for 10, 20, 40, 80, etc. msec */ -+ } -+ return TRUE; -+ } -+ -+ /* - * Get the current selection and put it in the clipboard register. - * - * NOTE: Must use GlobalLock/Unlock here to ensure Win32s compatibility. -*************** -*** 1254,1260 **** - * Don't pass GetActiveWindow() as an argument to OpenClipboard() because - * then we can't paste back into the same window for some reason - webb. - */ -! if (!OpenClipboard(NULL)) - return; - - /* Check for vim's own clipboard format first. This only gets the type of ---- 1273,1279 ---- - * Don't pass GetActiveWindow() as an argument to OpenClipboard() because - * then we can't paste back into the same window for some reason - webb. - */ -! if (!vim_open_clipboard()) - return; - - /* Check for vim's own clipboard format first. This only gets the type of -*************** -*** 1562,1568 **** - * because then we can't paste back into the same window for some - * reason - webb. - */ -! if (OpenClipboard(NULL)) - { - if (EmptyClipboard()) - { ---- 1581,1587 ---- - * because then we can't paste back into the same window for some - * reason - webb. - */ -! if (vim_open_clipboard()) - { - if (EmptyClipboard()) - { -*** ../vim-7.2.087/src/version.c Thu Jan 22 21:31:24 2009 ---- src/version.c Thu Jan 22 21:47:52 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 88, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -22. You've already visited all the links at Yahoo and you're halfway through - Lycos. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.089 b/vi/vim-7.2/7.2.089 deleted file mode 100644 index 74276c6..0000000 --- a/vi/vim-7.2/7.2.089 +++ /dev/null @@ -1,91 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.089 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.089 (extra) -Problem: Win32: crash when using Ultramon buttons. -Solution: Don't use a WM_OLE message of zero size. (Ray Megal) -Files: src/if_ole.cpp, src/gui_w48.c - - -*** ../vim-7.2.088/src/if_ole.cpp Sun Mar 16 14:53:11 2008 ---- src/if_ole.cpp Mon Jan 19 21:16:33 2009 -*************** -*** 353,361 **** - } - - /* Pass the string to the main input loop. The memory will be freed when -! * the message is processed. - */ -! PostMessage(NULL, WM_OLE, 0, (LPARAM)str); - - return S_OK; - } ---- 353,365 ---- - } - - /* Pass the string to the main input loop. The memory will be freed when -! * the message is processed. Except for an empty message, we don't need -! * to post it then. - */ -! if (*str == NUL) -! vim_free(str); -! else -! PostMessage(NULL, WM_OLE, 0, (LPARAM)str); - - return S_OK; - } -*** ../vim-7.2.088/src/gui_w48.c Wed Dec 24 12:20:10 2008 ---- src/gui_w48.c Mon Jan 19 21:19:30 2009 -*************** -*** 1663,1670 **** - if (msg.message == WM_OLE) - { - char_u *str = (char_u *)msg.lParam; -! add_to_input_buf(str, (int)STRLEN(str)); -! vim_free(str); - return; - } - #endif ---- 1663,1679 ---- - if (msg.message == WM_OLE) - { - char_u *str = (char_u *)msg.lParam; -! if (str == NULL || *str == NUL) -! { -! /* Message can't be ours, forward it. Fixes problem with Ultramon -! * 3.0.4 */ -! DispatchMessage(&msg); -! } -! else -! { -! add_to_input_buf(str, (int)STRLEN(str)); -! vim_free(str); /* was allocated in CVim::SendKeys() */ -! } - return; - } - #endif -*** ../vim-7.2.088/src/version.c Thu Jan 22 21:49:21 2009 ---- src/version.c Wed Jan 28 14:16:01 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 89, - /**/ - - --- -How To Keep A Healthy Level Of Insanity: -16. Have your coworkers address you by your wrestling name, Rock Hard Kim. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.090 b/vi/vim-7.2/7.2.090 deleted file mode 100644 index 59dd7ac..0000000 --- a/vi/vim-7.2/7.2.090 +++ /dev/null @@ -1,130 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.090 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.090 -Problem: User command containing 0x80 in multi-byte character does not work - properly. (Yasuhiro Matsumoto) -Solution: Undo replacement of K_SPECIAL and CSI characters when executing - the command. -Files: src/ex_docmd.c - - -*** ../vim-7.2.089/src/ex_docmd.c Tue Dec 9 11:17:23 2008 ---- src/ex_docmd.c Wed Jan 28 15:34:19 2009 -*************** -*** 5482,5487 **** ---- 5482,5490 ---- - return OK; - } - -+ /* -+ * ":command ..." -+ */ - static void - ex_command(eap) - exarg_T *eap; -*************** -*** 5914,5919 **** ---- 5917,5923 ---- - - char_u *start; - char_u *end; -+ char_u *ksp; - size_t len, totlen; - - size_t split_len = 0; -*************** -*** 5930,5945 **** - - /* - * Replace <> in the command by the arguments. - */ - buf = NULL; - for (;;) - { -! p = cmd->uc_rep; -! q = buf; - totlen = 0; -! while ((start = vim_strchr(p, '<')) != NULL -! && (end = vim_strchr(start + 1, '>')) != NULL) - { - /* Include the '>' */ - ++end; - ---- 5934,5984 ---- - - /* - * Replace <> in the command by the arguments. -+ * First round: "buf" is NULL, compute length, allocate "buf". -+ * Second round: copy result into "buf". - */ - buf = NULL; - for (;;) - { -! p = cmd->uc_rep; /* source */ -! q = buf; /* destinateion */ - totlen = 0; -! -! for (;;) - { -+ start = vim_strchr(p, '<'); -+ if (start != NULL) -+ end = vim_strchr(start + 1, '>'); -+ if (buf != NULL) -+ { -+ ksp = vim_strchr(p, K_SPECIAL); -+ if (ksp != NULL && (start == NULL || ksp < start || end == NULL) -+ && ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER) -+ # ifdef FEAT_GUI -+ || (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI) -+ # endif -+ )) -+ { -+ /* K_SPECIAL han been put in the buffer as K_SPECIAL -+ * KS_SPECIAL KE_FILLER, like for mappings, but -+ * do_cmdline() doesn't handle that, so convert it back. -+ * Also change K_SPECIAL KS_EXTRA KE_CSI into CSI. */ -+ len = ksp - p; -+ if (len > 0) -+ { -+ mch_memmove(q, p, len); -+ q += len; -+ } -+ *q++ = ksp[1] == KS_SPECIAL ? K_SPECIAL : CSI; -+ p = ksp + 3; -+ continue; -+ } -+ } -+ -+ /* break if there no <item> is found */ -+ if (start == NULL || end == NULL) -+ break; -+ - /* Include the '>' */ - ++end; - -*** ../vim-7.2.089/src/version.c Wed Jan 28 14:17:21 2009 ---- src/version.c Wed Jan 28 15:37:40 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 90, - /**/ - --- -How To Keep A Healthy Level Of Insanity: -17. When the money comes out the ATM, scream "I won!, I won! 3rd - time this week!!!!!" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.091 b/vi/vim-7.2/7.2.091 deleted file mode 100644 index 766a155..0000000 --- a/vi/vim-7.2/7.2.091 +++ /dev/null @@ -1,63 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.091 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.091 -Problem: ":cs help" output is not aligned for some languages. -Solution: Compute character size instead of byte size. (Dominique Pelle) -Files: src/if_cscope.c - - -*** ../vim-7.2.090/src/if_cscope.c Mon Aug 25 04:35:13 2008 ---- src/if_cscope.c Thu Jan 22 18:44:46 2009 -*************** -*** 1177,1184 **** - (void)MSG_PUTS(_("cscope commands:\n")); - while (cmdp->name != NULL) - { -! (void)smsg((char_u *)_("%-5s: %-30s (Usage: %s)"), -! cmdp->name, _(cmdp->help), cmdp->usage); - if (strcmp(cmdp->name, "find") == 0) - MSG_PUTS(_("\n" - " c: Find functions calling this function\n" ---- 1177,1192 ---- - (void)MSG_PUTS(_("cscope commands:\n")); - while (cmdp->name != NULL) - { -! char *help = _(cmdp->help); -! int space_cnt = 30 - vim_strsize((char_u *)help); -! -! /* Use %*s rather than %30s to ensure proper alignment in utf-8 */ -! if (space_cnt < 0) -! space_cnt = 0; -! (void)smsg((char_u *)_("%-5s: %s%*s (Usage: %s)"), -! cmdp->name, -! help, space_cnt, " ", -! cmdp->usage); - if (strcmp(cmdp->name, "find") == 0) - MSG_PUTS(_("\n" - " c: Find functions calling this function\n" -*** ../vim-7.2.090/src/version.c Wed Jan 28 15:42:07 2009 ---- src/version.c Wed Jan 28 16:02:25 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 91, - /**/ - --- -How To Keep A Healthy Level Of Insanity: -18. When leaving the zoo, start running towards the parking lot, - yelling "run for your lives, they're loose!!" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.092 b/vi/vim-7.2/7.2.092 deleted file mode 100644 index 633903e..0000000 --- a/vi/vim-7.2/7.2.092 +++ /dev/null @@ -1,164 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.092 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.092 -Problem: Some error messages are not translated. -Solution: Add _() around the messages. (Dominique Pelle) -Files: src/eval.c - - -*** ../vim-7.2.091/src/eval.c Sun Dec 21 13:02:47 2008 ---- src/eval.c Sat Jan 24 12:22:47 2009 -*************** -*** 7918,7926 **** - else if (!aborting()) - { - if (argcount == MAX_FUNC_ARGS) -! emsg_funcname("E740: Too many arguments for function %s", name); - else -! emsg_funcname("E116: Invalid arguments for function %s", name); - } - - while (--argcount >= 0) ---- 7918,7926 ---- - else if (!aborting()) - { - if (argcount == MAX_FUNC_ARGS) -! emsg_funcname(N_("E740: Too many arguments for function %s"), name); - else -! emsg_funcname(N_("E116: Invalid arguments for function %s"), name); - } - - while (--argcount >= 0) -*************** -*** 8153,8158 **** ---- 8153,8159 ---- - - /* - * Give an error message with a function name. Handle <SNR> things. -+ * "ermsg" is to be passed without translation, use N_() instead of _(). - */ - static void - emsg_funcname(ermsg, name) -*************** -*** 19867,19873 **** - } - } - else -! emsg_funcname("E123: Undefined function: %s", name); - } - goto ret_free; - } ---- 19868,19874 ---- - } - } - else -! emsg_funcname(N_("E123: Undefined function: %s"), name); - } - goto ret_free; - } -*************** -*** 19911,19917 **** - : eval_isnamec(arg[j]))) - ++j; - if (arg[j] != NUL) -! emsg_funcname(_(e_invarg2), arg); - } - } - ---- 19912,19918 ---- - : eval_isnamec(arg[j]))) - ++j; - if (arg[j] != NUL) -! emsg_funcname(e_invarg2, arg); - } - } - -*************** -*** 20183,20189 **** - v = find_var(name, &ht); - if (v != NULL && v->di_tv.v_type == VAR_FUNC) - { -! emsg_funcname("E707: Function name conflicts with variable: %s", - name); - goto erret; - } ---- 20184,20190 ---- - v = find_var(name, &ht); - if (v != NULL && v->di_tv.v_type == VAR_FUNC) - { -! emsg_funcname(N_("E707: Function name conflicts with variable: %s"), - name); - goto erret; - } -*************** -*** 20198,20204 **** - } - if (fp->uf_calls > 0) - { -! emsg_funcname("E127: Cannot redefine function %s: It is in use", - name); - goto erret; - } ---- 20199,20205 ---- - } - if (fp->uf_calls > 0) - { -! emsg_funcname(N_("E127: Cannot redefine function %s: It is in use"), - name); - goto erret; - } -*************** -*** 21477,21483 **** - - /* - * Return TRUE if items in "fc" do not have "copyID". That means they are not -! * referenced from anywyere. - */ - static int - can_free_funccal(fc, copyID) ---- 21478,21484 ---- - - /* - * Return TRUE if items in "fc" do not have "copyID". That means they are not -! * referenced from anywhere. - */ - static int - can_free_funccal(fc, copyID) -*** ../vim-7.2.091/src/version.c Wed Jan 28 16:03:51 2009 ---- src/version.c Wed Jan 28 19:05:47 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 92, - /**/ - - --- -Now it is such a bizarrely improbable coincidence that anything as -mind-bogglingly useful as the Babel fish could have evolved purely by chance -that some thinkers have chosen to see it as a final and clinching proof of the -NON-existence of God. -The argument goes something like this: 'I refuse to prove that I exist,' says -God, 'for proof denies faith, and without faith I am nothing.' -'But,' says Man, 'the Babel fish is a dead giveaway, isn't it? It could not -have evolved by chance. It proves you exist, and so therefore, by your own -arguments, you don't. QED.' -'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a -puff of logic. -'Oh, that was easy,' says Man, and for an encore goes on to prove that black -is white and gets himself killed on the next pedestrian crossing. - -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.093 b/vi/vim-7.2/7.2.093 deleted file mode 100644 index b0f4490..0000000 --- a/vi/vim-7.2/7.2.093 +++ /dev/null @@ -1,234 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.093 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.093 (extra) -Problem: Win32: inputdialog() and find/replace dialogs can't handle - multi-byte text. -Solution: Use the wide version of dialog functions when available. (Yanwei - Jia) -Files: src/gui_w32.c, src/gui_w48.c - - -*** ../vim-7.2.092/src/gui_w32.c Thu Nov 20 17:09:09 2008 ---- src/gui_w32.c Wed Jan 28 21:15:29 2009 -*************** -*** 1582,1587 **** ---- 1582,1598 ---- - s_findrep_struct.lpstrReplaceWith[0] = NUL; - s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE; - s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE; -+ # if defined(FEAT_MBYTE) && defined(WIN3264) -+ s_findrep_struct_w.lStructSize = sizeof(s_findrep_struct_w); -+ s_findrep_struct_w.lpstrFindWhat = -+ (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR)); -+ s_findrep_struct_w.lpstrFindWhat[0] = NUL; -+ s_findrep_struct_w.lpstrReplaceWith = -+ (LPWSTR)alloc(MSWIN_FR_BUFSIZE * sizeof(WCHAR)); -+ s_findrep_struct_w.lpstrReplaceWith[0] = NUL; -+ s_findrep_struct_w.wFindWhatLen = MSWIN_FR_BUFSIZE; -+ s_findrep_struct_w.wReplaceWithLen = MSWIN_FR_BUFSIZE; -+ # endif - #endif - - theend: -*************** -*** 2938,2945 **** - - /* If the edit box exists, copy the string. */ - if (s_textfield != NULL) -! GetDlgItemText(hwnd, DLG_NONBUTTON_CONTROL + 2, - s_textfield, IOSIZE); - - /* - * Need to check for IDOK because if the user just hits Return to ---- 2949,2975 ---- - - /* If the edit box exists, copy the string. */ - if (s_textfield != NULL) -! { -! # if defined(FEAT_MBYTE) && defined(WIN3264) -! /* If the OS is Windows NT, and 'encoding' differs from active -! * codepage: use wide function and convert text. */ -! if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT -! && enc_codepage >= 0 && (int)GetACP() != enc_codepage) -! { -! WCHAR *wp = (WCHAR *)alloc(IOSIZE * sizeof(WCHAR)); -! char_u *p; -! -! GetDlgItemTextW(hwnd, DLG_NONBUTTON_CONTROL + 2, wp, IOSIZE); -! p = utf16_to_enc(wp, NULL); -! vim_strncpy(s_textfield, p, IOSIZE); -! vim_free(p); -! vim_free(wp); -! } -! else -! # endif -! GetDlgItemText(hwnd, DLG_NONBUTTON_CONTROL + 2, - s_textfield, IOSIZE); -+ } - - /* - * Need to check for IDOK because if the user just hits Return to -*** ../vim-7.2.092/src/gui_w48.c Wed Jan 28 14:17:21 2009 ---- src/gui_w48.c Wed Jan 28 21:10:26 2009 -*************** -*** 153,158 **** ---- 153,161 ---- - #ifdef MSWIN_FIND_REPLACE - static UINT s_findrep_msg = 0; /* set in gui_w[16/32].c */ - static FINDREPLACE s_findrep_struct; -+ # if defined(FEAT_MBYTE) && defined(WIN3264) -+ static FINDREPLACEW s_findrep_struct_w; -+ # endif - static HWND s_findrep_hwnd = NULL; - static int s_findrep_is_find; /* TRUE for find dialog, FALSE - for find/replace dialog */ -*************** -*** 884,889 **** ---- 887,931 ---- - #endif - - #ifdef MSWIN_FIND_REPLACE -+ # if defined(FEAT_MBYTE) && defined(WIN3264) -+ /* -+ * copy useful data from structure LPFINDREPLACE to structure LPFINDREPLACEW -+ */ -+ static void -+ findrep_atow(LPFINDREPLACEW lpfrw, LPFINDREPLACE lpfr) -+ { -+ WCHAR *wp; -+ -+ lpfrw->hwndOwner = lpfr->hwndOwner; -+ lpfrw->Flags = lpfr->Flags; -+ -+ wp = enc_to_utf16(lpfr->lpstrFindWhat, NULL); -+ wcsncpy(lpfrw->lpstrFindWhat, wp, lpfrw->wFindWhatLen - 1); -+ vim_free(wp); -+ -+ /* the field "lpstrReplaceWith" doesn't need to be copied */ -+ } -+ -+ /* -+ * copy useful data from structure LPFINDREPLACEW to structure LPFINDREPLACE -+ */ -+ static void -+ findrep_wtoa(LPFINDREPLACE lpfr, LPFINDREPLACEW lpfrw) -+ { -+ char_u *p; -+ -+ lpfr->Flags = lpfrw->Flags; -+ -+ p = utf16_to_enc(lpfrw->lpstrFindWhat, NULL); -+ vim_strncpy(lpfr->lpstrFindWhat, p, lpfr->wFindWhatLen - 1); -+ vim_free(p); -+ -+ p = utf16_to_enc(lpfrw->lpstrReplaceWith, NULL); -+ vim_strncpy(lpfr->lpstrReplaceWith, p, lpfr->wReplaceWithLen - 1); -+ vim_free(p); -+ } -+ # endif -+ - /* - * Handle a Find/Replace window message. - */ -*************** -*** 893,898 **** ---- 935,950 ---- - int flags = 0; - int down; - -+ # if defined(FEAT_MBYTE) && defined(WIN3264) -+ /* If the OS is Windows NT, and 'encoding' differs from active codepage: -+ * convert text from wide string. */ -+ if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT -+ && enc_codepage >= 0 && (int)GetACP() != enc_codepage) -+ { -+ findrep_wtoa(&s_findrep_struct, &s_findrep_struct_w); -+ } -+ # endif -+ - if (s_findrep_struct.Flags & FR_DIALOGTERM) - /* Give main window the focus back. */ - (void)SetFocus(s_hwnd); -*************** -*** 2562,2568 **** - if (!IsWindow(s_findrep_hwnd)) - { - initialise_findrep(eap->arg); -! s_findrep_hwnd = FindText((LPFINDREPLACE) &s_findrep_struct); - } - - set_window_title(s_findrep_hwnd, ---- 2614,2632 ---- - if (!IsWindow(s_findrep_hwnd)) - { - initialise_findrep(eap->arg); -! # if defined(FEAT_MBYTE) && defined(WIN3264) -! /* If the OS is Windows NT, and 'encoding' differs from active -! * codepage: convert text and use wide function. */ -! if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT -! && enc_codepage >= 0 && (int)GetACP() != enc_codepage) -! { -! findrep_atow(&s_findrep_struct_w, &s_findrep_struct); -! s_findrep_hwnd = FindTextW( -! (LPFINDREPLACEW) &s_findrep_struct_w); -! } -! else -! # endif -! s_findrep_hwnd = FindText((LPFINDREPLACE) &s_findrep_struct); - } - - set_window_title(s_findrep_hwnd, -*************** -*** 2587,2593 **** - if (!IsWindow(s_findrep_hwnd)) - { - initialise_findrep(eap->arg); -! s_findrep_hwnd = ReplaceText((LPFINDREPLACE) &s_findrep_struct); - } - - set_window_title(s_findrep_hwnd, ---- 2651,2668 ---- - if (!IsWindow(s_findrep_hwnd)) - { - initialise_findrep(eap->arg); -! # if defined(FEAT_MBYTE) && defined(WIN3264) -! if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT -! && enc_codepage >= 0 && (int)GetACP() != enc_codepage) -! { -! findrep_atow(&s_findrep_struct_w, &s_findrep_struct); -! s_findrep_hwnd = ReplaceTextW( -! (LPFINDREPLACEW) &s_findrep_struct_w); -! } -! else -! # endif -! s_findrep_hwnd = ReplaceText( -! (LPFINDREPLACE) &s_findrep_struct); - } - - set_window_title(s_findrep_hwnd, -*** ../vim-7.2.092/src/version.c Wed Jan 28 19:08:31 2009 ---- src/version.c Wed Jan 28 21:19:56 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 93, - /**/ - --- -I'm not familiar with this proof, but I'm aware of a significant -following of toddlers who believe that peanut butter is the solution -to all of life's problems... -- Tim Hammerquist - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.094 b/vi/vim-7.2/7.2.094 deleted file mode 100644 index bc79fa5..0000000 --- a/vi/vim-7.2/7.2.094 +++ /dev/null @@ -1,112 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.094 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.094 -Problem: Compiler warning for signed/unsigned compare. -Solution: Add type cast. Also fix a few typos. -Files: src/edit.c - - -*** ../vim-7.2.093/src/edit.c Tue Jan 13 12:29:03 2009 ---- src/edit.c Wed Jan 28 21:13:51 2009 -*************** -*** 1958,1963 **** ---- 1958,1964 ---- - * Only matters when there are composing characters. - * Return TRUE when something was deleted. - */ -+ /*ARGSUSED*/ - static int - del_char_after_col(limit_col) - int limit_col; -*************** -*** 1971,1977 **** - * skip forward again when going too far back because of a - * composing character. */ - mb_adjust_cursor(); -! while (curwin->w_cursor.col < limit_col) - { - int l = utf_ptr2len(ml_get_cursor()); - ---- 1972,1978 ---- - * skip forward again when going too far back because of a - * composing character. */ - mb_adjust_cursor(); -! while (curwin->w_cursor.col < (colnr_T)limit_col) - { - int l = utf_ptr2len(ml_get_cursor()); - -*************** -*** 4240,4246 **** - } - - /* check if compl_curr_match has changed, (e.g. other type of -! * expansion added somenthing) */ - if (type != 0 && compl_curr_match != old_match) - found_new_match = OK; - ---- 4241,4247 ---- - } - - /* check if compl_curr_match has changed, (e.g. other type of -! * expansion added something) */ - if (type != 0 && compl_curr_match != old_match) - found_new_match = OK; - -*************** -*** 4741,4747 **** - } - compl_length = curwin->w_cursor.col - (int)compl_col; - /* IObuff is used to add a "word from the next line" would we -! * have enough space? just being paranoic */ - #define MIN_SPACE 75 - if (compl_length > (IOSIZE - MIN_SPACE)) - { ---- 4742,4748 ---- - } - compl_length = curwin->w_cursor.col - (int)compl_col; - /* IObuff is used to add a "word from the next line" would we -! * have enough space? just being paranoid */ - #define MIN_SPACE 75 - if (compl_length > (IOSIZE - MIN_SPACE)) - { -*************** -*** 8206,8212 **** - /* - * If the cursor is on an indent, ^T/^D insert/delete one - * shiftwidth. Otherwise ^T/^D behave like a "<<" or ">>". -! * Always round the indent to 'shiftwith', this is compatible - * with vi. But vi only supports ^T and ^D after an - * autoindent, we support it everywhere. - */ ---- 8207,8213 ---- - /* - * If the cursor is on an indent, ^T/^D insert/delete one - * shiftwidth. Otherwise ^T/^D behave like a "<<" or ">>". -! * Always round the indent to 'shiftwidth', this is compatible - * with vi. But vi only supports ^T and ^D after an - * autoindent, we support it everywhere. - */ -*** ../vim-7.2.093/src/version.c Wed Jan 28 21:22:20 2009 ---- src/version.c Wed Feb 4 11:17:02 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 94, - /**/ - --- -Despite the cost of living, have you noticed how it remains so popular? - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.095 b/vi/vim-7.2/7.2.095 deleted file mode 100644 index c69cadb..0000000 --- a/vi/vim-7.2/7.2.095 +++ /dev/null @@ -1,63 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.095 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.095 -Problem: With Visual selection, "r" and then CTRL-C Visual mode is stopped - but the highlighting is not removed. -Solution: Call reset_VIsual(). -Files: src/normal.c - - -*** ../vim-7.2.094/src/normal.c Thu Nov 20 16:11:03 2008 ---- src/normal.c Fri Jan 30 20:37:01 2009 -*************** -*** 6783,6788 **** ---- 6783,6790 ---- - /* Visual mode "r" */ - if (VIsual_active) - { -+ if (got_int) -+ reset_VIsual(); - nv_operator(cap); - return; - } -*************** -*** 7839,7845 **** - else - i = curwin->w_leftcol; - /* Go to the middle of the screen line. When 'number' is on and lines -! * are wrapping the middle can be more to the left.*/ - if (cap->nchar == 'm') - i += (W_WIDTH(curwin) - curwin_col_off() - + ((curwin->w_p_wrap && i > 0) ---- 7841,7847 ---- - else - i = curwin->w_leftcol; - /* Go to the middle of the screen line. When 'number' is on and lines -! * are wrapping the middle can be more to the left. */ - if (cap->nchar == 'm') - i += (W_WIDTH(curwin) - curwin_col_off() - + ((curwin->w_p_wrap && i > 0) -*** ../vim-7.2.094/src/version.c Wed Feb 4 11:19:40 2009 ---- src/version.c Wed Feb 4 11:43:28 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 95, - /**/ - --- -Nothing is fool-proof to a sufficiently talented fool. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.096 b/vi/vim-7.2/7.2.096 deleted file mode 100644 index e286ca9..0000000 --- a/vi/vim-7.2/7.2.096 +++ /dev/null @@ -1,54 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.096 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.096 -Problem: After ":number" the "Press Enter" message may be on the wrong - screen, if switching screens for shell commands. -Solution: Reset info_message. (James Vega) -Files: src/ex_cmds.c - - -*** ../vim-7.2.095/src/ex_cmds.c Tue Jan 13 16:57:09 2009 ---- src/ex_cmds.c Fri Jan 30 21:01:54 2009 -*************** -*** 2417,2424 **** - cursor_on(); /* msg_start() switches it off */ - out_flush(); - silent_mode = save_silent; -- info_message = FALSE; - } - } - - /* ---- 2417,2424 ---- - cursor_on(); /* msg_start() switches it off */ - out_flush(); - silent_mode = save_silent; - } -+ info_message = FALSE; - } - - /* -*** ../vim-7.2.095/src/version.c Wed Feb 4 11:45:28 2009 ---- src/version.c Wed Feb 4 13:12:55 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 96, - /**/ - --- -A fine is a tax for doing wrong. A tax is a fine for doing well. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.097 b/vi/vim-7.2/7.2.097 deleted file mode 100644 index ac72d5d..0000000 --- a/vi/vim-7.2/7.2.097 +++ /dev/null @@ -1,54 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.097 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.097 -Problem: "!xterm&" doesn't work when 'shell' is "bash". -Solution: Ignore SIGHUP after calling setsid(). (Simon Schubert) -Files: src/os_unix.c - - -*** ../vim-7.2.096/src/os_unix.c Fri Nov 28 21:26:50 2008 ---- src/os_unix.c Wed Feb 4 12:09:55 2009 -*************** -*** 3950,3956 **** ---- 3950,3966 ---- - * children can be kill()ed. Don't do this when using pipes, - * because stdin is not a tty, we would lose /dev/tty. */ - if (p_stmp) -+ { - (void)setsid(); -+ # if defined(SIGHUP) -+ /* When doing "!xterm&" and 'shell' is bash: the shell -+ * will exit and send SIGHUP to all processes in its -+ * group, killing the just started process. Ignore SIGHUP -+ * to avoid that. (suggested by Simon Schubert) -+ */ -+ signal(SIGHUP, SIG_IGN); -+ # endif -+ } - # endif - # ifdef FEAT_GUI - if (pty_slave_fd >= 0) -*** ../vim-7.2.096/src/version.c Wed Feb 4 13:13:42 2009 ---- src/version.c Wed Feb 4 14:16:37 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 97, - /**/ - --- -It was recently discovered that research causes cancer in rats. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.098 b/vi/vim-7.2/7.2.098 deleted file mode 100644 index eed0a65..0000000 --- a/vi/vim-7.2/7.2.098 +++ /dev/null @@ -1,69 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.098 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.098 -Problem: Warning for signed/unsigned pointer. -Solution: Add type cast. -Files: src/eval.c - - -*** ../vim-7.2.097/src/eval.c Wed Jan 28 19:08:31 2009 ---- src/eval.c Wed Feb 4 13:09:01 2009 -*************** -*** 3928,3934 **** - - /* - * Handle top level expression: -! * expr1 ? expr0 : expr0 - * - * "arg" must point to the first non-white of the expression. - * "arg" is advanced to the next non-white after the recognized expression. ---- 3928,3934 ---- - - /* - * Handle top level expression: -! * expr2 ? expr1 : expr1 - * - * "arg" must point to the first non-white of the expression. - * "arg" is advanced to the next non-white after the recognized expression. -*************** -*** 19912,19918 **** - : eval_isnamec(arg[j]))) - ++j; - if (arg[j] != NUL) -! emsg_funcname(e_invarg2, arg); - } - } - ---- 19912,19918 ---- - : eval_isnamec(arg[j]))) - ++j; - if (arg[j] != NUL) -! emsg_funcname((char *)e_invarg2, arg); - } - } - -*** ../vim-7.2.097/src/version.c Wed Feb 4 14:18:44 2009 ---- src/version.c Wed Feb 4 16:24:06 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 98, - /**/ - --- -Everybody lies, but it doesn't matter since nobody listens. - -- Lieberman's Law - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.099 b/vi/vim-7.2/7.2.099 deleted file mode 100644 index 6f5dae5..0000000 --- a/vi/vim-7.2/7.2.099 +++ /dev/null @@ -1,127 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.099 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.099 -Problem: Changing GUI options causes an unnecessary redraw when the GUI - isn't active. -Solution: Avoid the redraw. (Lech Lorens) -Files: src/option.c - - -*** ../vim-7.2.098/src/option.c Wed Dec 24 12:53:33 2008 ---- src/option.c Wed Feb 4 16:59:56 2009 -*************** -*** 5407,5412 **** ---- 5407,5416 ---- - int did_chartab = FALSE; - char_u **gvarp; - long_u free_oldval = (options[opt_idx].flags & P_ALLOCED); -+ #ifdef FEAT_GUI -+ /* set when changing an option that only requires a redraw in the GUI */ -+ int redraw_gui_only = FALSE; -+ #endif - - /* Get the global option to compare with, otherwise we would have to check - * two values for all local options. */ -*************** -*** 6055,6060 **** ---- 6059,6065 ---- - errmsg = (char_u *)N_("E596: Invalid font(s)"); - } - } -+ redraw_gui_only = TRUE; - } - # ifdef FEAT_XFONTSET - else if (varp == &p_guifontset) -*************** -*** 6063,6068 **** ---- 6068,6074 ---- - errmsg = (char_u *)N_("E597: can't select fontset"); - else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK) - errmsg = (char_u *)N_("E598: Invalid fontset"); -+ redraw_gui_only = TRUE; - } - # endif - # ifdef FEAT_MBYTE -*************** -*** 6072,6077 **** ---- 6078,6084 ---- - errmsg = (char_u *)N_("E533: can't select wide font"); - else if (gui_get_wide_font() == FAIL) - errmsg = (char_u *)N_("E534: Invalid wide font"); -+ redraw_gui_only = TRUE; - } - # endif - #endif -*************** -*** 6133,6145 **** ---- 6140,6163 ---- - #ifdef FEAT_GUI - /* 'guioptions' */ - else if (varp == &p_go) -+ { - gui_init_which_components(oldval); -+ redraw_gui_only = TRUE; -+ } - #endif - - #if defined(FEAT_GUI_TABLINE) - /* 'guitablabel' */ - else if (varp == &p_gtl) -+ { - redraw_tabline = TRUE; -+ redraw_gui_only = TRUE; -+ } -+ /* 'guitabtooltip' */ -+ else if (varp == &p_gtt) -+ { -+ redraw_gui_only = TRUE; -+ } - #endif - - #if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS)) -*************** -*** 6717,6723 **** - - if (curwin->w_curswant != MAXCOL) - curwin->w_set_curswant = TRUE; /* in case 'showbreak' changed */ -! check_redraw(options[opt_idx].flags); - - return errmsg; - } ---- 6735,6745 ---- - - if (curwin->w_curswant != MAXCOL) - curwin->w_set_curswant = TRUE; /* in case 'showbreak' changed */ -! #ifdef FEAT_GUI -! /* check redraw when it's not a GUI option or the GUI is active. */ -! if (!redraw_gui_only || gui.in_use) -! #endif -! check_redraw(options[opt_idx].flags); - - return errmsg; - } -*** ../vim-7.2.098/src/version.c Wed Feb 4 16:25:53 2009 ---- src/version.c Wed Feb 4 17:24:11 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 99, - /**/ - --- -I started out with nothing, and I still have most of it. - -- Michael Davis -- "Tonight Show" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.100 b/vi/vim-7.2/7.2.100 deleted file mode 100644 index 0099edb..0000000 --- a/vi/vim-7.2/7.2.100 +++ /dev/null @@ -1,132 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.100 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.100 -Problem: When using ":source" on a FIFO or something else that can't rewind - the first three bytes are skipped. -Solution: Instead of rewinding read the first line and detect a BOM in that. - (mostly by James Vega) -Files: src/ex_cmds2.c - - -*** ../vim-7.2.099/src/ex_cmds2.c Sat Nov 15 14:10:23 2008 ---- src/ex_cmds2.c Wed Feb 4 16:05:51 2009 -*************** -*** 2842,2847 **** ---- 2842,2848 ---- - linenr_T save_sourcing_lnum; - char_u *p; - char_u *fname_exp; -+ char_u *firstline = NULL; - int retval = FAIL; - #ifdef FEAT_EVAL - scid_T save_current_SID; -*************** -*** 2992,3014 **** - - cookie.level = ex_nesting_level; - #endif -- #ifdef FEAT_MBYTE -- cookie.conv.vc_type = CONV_NONE; /* no conversion */ -- -- /* Try reading the first few bytes to check for a UTF-8 BOM. */ -- { -- char_u buf[3]; -- -- if (fread((char *)buf, sizeof(char_u), (size_t)3, cookie.fp) -- == (size_t)3 -- && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf) -- /* Found BOM, setup conversion and skip over it. */ -- convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc); -- else -- /* No BOM found, rewind. */ -- fseek(cookie.fp, 0L, SEEK_SET); -- } -- #endif - - /* - * Keep the sourcing name/lnum, for recursive calls. ---- 2993,2998 ---- -*************** -*** 3018,3023 **** ---- 3002,3026 ---- - save_sourcing_lnum = sourcing_lnum; - sourcing_lnum = 0; - -+ #ifdef FEAT_MBYTE -+ cookie.conv.vc_type = CONV_NONE; /* no conversion */ -+ -+ /* Read the first line so we can check for a UTF-8 BOM. */ -+ firstline = getsourceline(0, (void *)&cookie, 0); -+ if (firstline != NULL && STRLEN(firstline) >= 3 && firstline[0] == 0xef -+ && firstline[1] == 0xbb && firstline[2] == 0xbf) -+ { -+ /* Found BOM; setup conversion, skip over BOM and recode the line. */ -+ convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc); -+ p = string_convert(&cookie.conv, firstline + 3, NULL); -+ if (p != NULL) -+ { -+ vim_free(firstline); -+ firstline = p; -+ } -+ } -+ #endif -+ - #ifdef STARTUPTIME - time_push(&tv_rel, &tv_start); - #endif -*************** -*** 3111,3119 **** - /* - * Call do_cmdline, which will call getsourceline() to get the lines. - */ -! do_cmdline(NULL, getsourceline, (void *)&cookie, - DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_REPEAT); -- - retval = OK; - - #ifdef FEAT_PROFILE ---- 3114,3121 ---- - /* - * Call do_cmdline, which will call getsourceline() to get the lines. - */ -! do_cmdline(firstline, getsourceline, (void *)&cookie, - DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_REPEAT); - retval = OK; - - #ifdef FEAT_PROFILE -*************** -*** 3171,3176 **** ---- 3173,3179 ---- - #endif - fclose(cookie.fp); - vim_free(cookie.nextline); -+ vim_free(firstline); - #ifdef FEAT_MBYTE - convert_setup(&cookie.conv, NULL, NULL); - #endif -*** ../vim-7.2.099/src/version.c Wed Feb 4 17:27:50 2009 ---- src/version.c Wed Feb 4 17:48:47 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 100, - /**/ - --- -Well, you come from nothing, you go back to nothing... What have you -lost? Nothing! - -- Monty Python: The life of Brian - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.101 b/vi/vim-7.2/7.2.101 deleted file mode 100644 index e3526ca..0000000 --- a/vi/vim-7.2/7.2.101 +++ /dev/null @@ -1,47 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.101 (extra) -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.101 (extra) -Problem: MSVC version not recognized. -Solution: Add the version number to the list. (Zhong Zhang) -Files: src/Make_mvc.mak - - -*** ../vim-7.2.100/src/Make_mvc.mak Thu Jul 24 20:49:58 2008 ---- src/Make_mvc.mak Wed Feb 4 18:32:47 2009 -*************** -*** 354,359 **** ---- 354,362 ---- - !if "$(_NMAKE_VER)" == "9.00.21022.08" - MSVCVER = 9.0 - !endif -+ !if "$(_NMAKE_VER)" == "9.00.30729.01" -+ MSVCVER = 9.0 -+ !endif - !endif - - # Abort bulding VIM if version of VC is unrecognised. -*** ../vim-7.2.100/src/version.c Wed Feb 4 17:49:46 2009 ---- src/version.c Wed Feb 4 18:34:12 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 101, - /**/ - --- -Light travels faster than sound. This is why some people -appear bright until you hear them speak - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.102 b/vi/vim-7.2/7.2.102 deleted file mode 100644 index 316c32b..0000000 --- a/vi/vim-7.2/7.2.102 +++ /dev/null @@ -1,47 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.102 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.102 (after 7.2.100) -Problem: When 'encoding' is "utf-8" a BOM at the start of a Vim script is - not removed. (Tony Mechelynck) -Solution: When no conversion is taking place make a copy of the line without - the BOM. -Files: src/ex_cmds2.c - - -*** ../vim-7.2.101/src/ex_cmds2.c Wed Feb 4 17:49:46 2009 ---- src/ex_cmds2.c Thu Feb 5 20:41:56 2009 -*************** -*** 3013,3018 **** ---- 3013,3020 ---- - /* Found BOM; setup conversion, skip over BOM and recode the line. */ - convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc); - p = string_convert(&cookie.conv, firstline + 3, NULL); -+ if (p == NULL) -+ p = vim_strsave(firstline + 3); - if (p != NULL) - { - vim_free(firstline); -*** ../vim-7.2.101/src/version.c Wed Feb 4 18:34:54 2009 ---- src/version.c Thu Feb 5 20:44:55 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 102, - /**/ - --- -CVS sux, men don't like commitment - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.103 b/vi/vim-7.2/7.2.103 deleted file mode 100644 index 25a513a..0000000 --- a/vi/vim-7.2/7.2.103 +++ /dev/null @@ -1,216 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.103 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.103 -Problem: When 'bomb' is changed the window title is updated to show/hide a - "+", but the tab page label isn't. (Patrick Texier) -Solution: Set "redraw_tabline" in most places where "need_maketitle" is set. - (partly by Lech Lorens) -Files: src/option.c - - -*** ../vim-7.2.102/src/option.c Wed Feb 4 17:27:50 2009 ---- src/option.c Wed Feb 4 17:40:02 2009 -*************** -*** 5268,5273 **** ---- 5268,5288 ---- - } - #endif - -+ #ifdef FEAT_TITLE -+ static void redraw_titles __ARGS((void)); -+ -+ /* -+ * Redraw the window title and/or tab page text later. -+ */ -+ static void redraw_titles() -+ { -+ need_maketitle = TRUE; -+ # ifdef FEAT_WINDOWS -+ redraw_tabline = TRUE; -+ # endif -+ } -+ #endif -+ - /* - * Set a string option to a new value (without checking the effect). - * The string is copied into allocated memory. -*************** -*** 5672,5678 **** - { - # ifdef FEAT_TITLE - /* May show a "+" in the title now. */ -! need_maketitle = TRUE; - # endif - /* Add 'fileencoding' to the swap file. */ - ml_setflags(curbuf); ---- 5687,5693 ---- - { - # ifdef FEAT_TITLE - /* May show a "+" in the title now. */ -! redraw_titles(); - # endif - /* Add 'fileencoding' to the swap file. */ - ml_setflags(curbuf); -*************** -*** 5691,5697 **** - { - errmsg = mb_init(); - # ifdef FEAT_TITLE -! need_maketitle = TRUE; - # endif - } - } ---- 5706,5712 ---- - { - errmsg = mb_init(); - # ifdef FEAT_TITLE -! redraw_titles(); - # endif - } - } -*************** -*** 5800,5806 **** - else - curbuf->b_p_tx = FALSE; - #ifdef FEAT_TITLE -! need_maketitle = TRUE; - #endif - /* update flag in swap file */ - ml_setflags(curbuf); ---- 5815,5821 ---- - else - curbuf->b_p_tx = FALSE; - #ifdef FEAT_TITLE -! redraw_titles(); - #endif - /* update flag in swap file */ - ml_setflags(curbuf); -*************** -*** 7127,7148 **** - curbuf->b_did_warn = FALSE; - - #ifdef FEAT_TITLE -! need_maketitle = TRUE; - #endif - } - - #ifdef FEAT_TITLE - /* when 'modifiable' is changed, redraw the window title */ - else if ((int *)varp == &curbuf->b_p_ma) -! need_maketitle = TRUE; - /* when 'endofline' is changed, redraw the window title */ - else if ((int *)varp == &curbuf->b_p_eol) -! need_maketitle = TRUE; -! #ifdef FEAT_MBYTE -! /* when 'bomb' is changed, redraw the window title */ - else if ((int *)varp == &curbuf->b_p_bomb) -! need_maketitle = TRUE; -! #endif - #endif - - /* when 'bin' is set also set some other options */ ---- 7142,7169 ---- - curbuf->b_did_warn = FALSE; - - #ifdef FEAT_TITLE -! redraw_titles(); - #endif - } - - #ifdef FEAT_TITLE - /* when 'modifiable' is changed, redraw the window title */ - else if ((int *)varp == &curbuf->b_p_ma) -! { -! redraw_titles(); -! } - /* when 'endofline' is changed, redraw the window title */ - else if ((int *)varp == &curbuf->b_p_eol) -! { -! redraw_titles(); -! } -! # ifdef FEAT_MBYTE -! /* when 'bomb' is changed, redraw the window title and tab page text */ - else if ((int *)varp == &curbuf->b_p_bomb) -! { -! redraw_titles(); -! } -! # endif - #endif - - /* when 'bin' is set also set some other options */ -*************** -*** 7150,7156 **** - { - set_options_bin(old_value, curbuf->b_p_bin, opt_flags); - #ifdef FEAT_TITLE -! need_maketitle = TRUE; - #endif - } - ---- 7171,7177 ---- - { - set_options_bin(old_value, curbuf->b_p_bin, opt_flags); - #ifdef FEAT_TITLE -! redraw_titles(); - #endif - } - -*************** -*** 7301,7307 **** - if (!value) - save_file_ff(curbuf); /* Buffer is unchanged */ - #ifdef FEAT_TITLE -! need_maketitle = TRUE; - #endif - #ifdef FEAT_AUTOCMD - modified_was_set = value; ---- 7322,7328 ---- - if (!value) - save_file_ff(curbuf); /* Buffer is unchanged */ - #ifdef FEAT_TITLE -! redraw_titles(); - #endif - #ifdef FEAT_AUTOCMD - modified_was_set = value; -*************** -*** 7736,7742 **** - newFoldLevel(); - } - -! /* 'foldminlevel' */ - else if (pp == &curwin->w_p_fml) - { - foldUpdateAll(curwin); ---- 7757,7763 ---- - newFoldLevel(); - } - -! /* 'foldminlines' */ - else if (pp == &curwin->w_p_fml) - { - foldUpdateAll(curwin); -*** ../vim-7.2.102/src/version.c Thu Feb 5 20:47:14 2009 ---- src/version.c Wed Feb 11 11:32:20 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 103, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -73. You give your dog used motherboards instead of bones - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.104 b/vi/vim-7.2/7.2.104 deleted file mode 100644 index 51c0e09..0000000 --- a/vi/vim-7.2/7.2.104 +++ /dev/null @@ -1,51 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.104 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.104 -Problem: When using ":saveas bar.c" the tab label isn't updated right away. -Solution: Set redraw_tabline. (Francois Ingelrest) -Files: src/ex_cmds.c - - -*** ../vim-7.2.103/src/ex_cmds.c Wed Feb 4 13:13:42 2009 ---- src/ex_cmds.c Wed Feb 11 15:58:06 2009 -*************** -*** 2707,2713 **** ---- 2707,2718 ---- - if (eap->cmdidx == CMD_saveas) - { - if (retval == OK) -+ { - curbuf->b_p_ro = FALSE; -+ #ifdef FEAT_WINDOWS -+ redraw_tabline = TRUE; -+ #endif -+ } - /* Change directories when the 'acd' option is set. */ - DO_AUTOCHDIR - } -*** ../vim-7.2.103/src/version.c Wed Feb 11 11:34:24 2009 ---- src/version.c Wed Feb 11 16:02:19 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 104, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -75. You start wondering whether you could actually upgrade your brain - with a Pentium Pro microprocessor 80. The upgrade works just fine. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.105 b/vi/vim-7.2/7.2.105 deleted file mode 100644 index 486ffb3..0000000 --- a/vi/vim-7.2/7.2.105 +++ /dev/null @@ -1,72 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.105 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.105 -Problem: Modeline setting for 'foldmethod' overrules diff options. (Ingo - Karkat) -Solution: Don't set 'foldmethod' and 'wrap' from a modeline when 'diff' is - on. -Files: src/option.c - - -*** ../vim-7.2.104/src/option.c Wed Feb 11 11:34:24 2009 ---- src/option.c Wed Feb 11 16:29:56 2009 -*************** -*** 4119,4129 **** - && options[opt_idx].var == VAR_WIN) - goto skip; - -! /* Disallow changing some options from modelines */ -! if ((opt_flags & OPT_MODELINE) && (flags & P_SECURE)) - { -! errmsg = (char_u *)_("E520: Not allowed in a modeline"); -! goto skip; - } - - #ifdef HAVE_SANDBOX ---- 4119,4139 ---- - && options[opt_idx].var == VAR_WIN) - goto skip; - -! /* Disallow changing some options from modelines. */ -! if (opt_flags & OPT_MODELINE) - { -! if (flags & P_SECURE) -! { -! errmsg = (char_u *)_("E520: Not allowed in a modeline"); -! goto skip; -! } -! /* In diff mode some options are overruled. This avoids that -! * 'foldmethod' becomes "marker" instead of "diff" and that -! * "wrap" gets set. */ -! if (curwin->w_p_diff -! && (options[opt_idx].indir == PV_FDM -! || options[opt_idx].indir == PV_WRAP)) -! goto skip; - } - - #ifdef HAVE_SANDBOX -*** ../vim-7.2.104/src/version.c Wed Feb 11 16:02:29 2009 ---- src/version.c Wed Feb 11 16:40:35 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 105, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -76. Your ISP regards you as a business partner rather than as a customer. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.106 b/vi/vim-7.2/7.2.106 deleted file mode 100644 index 2c54797..0000000 --- a/vi/vim-7.2/7.2.106 +++ /dev/null @@ -1,103 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.106 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.106 -Problem: Endless loop when using "]s" in HTML when there are no - misspellings. (Ingo Karkat) -Solution: Break the search loop. Also fix pointer alignment for systems - with pointers larger than int. -Files: src/spell.c - - -*** ../vim-7.2.105/src/spell.c Tue Dec 9 22:34:02 2008 ---- src/spell.c Wed Feb 11 17:54:50 2009 -*************** -*** 2376,2382 **** - - /* If we are back at the starting line and there is no match then - * give up. */ -! if (lnum == wp->w_cursor.lnum && !found_one) - break; - - /* Skip the characters at the start of the next line that were ---- 2376,2382 ---- - - /* If we are back at the starting line and there is no match then - * give up. */ -! if (lnum == wp->w_cursor.lnum && (!found_one || wrapped)) - break; - - /* Skip the characters at the start of the next line that were -*************** -*** 4956,4968 **** - * Structure that is used to store the items in the word tree. This avoids - * the need to keep track of each allocated thing, everything is freed all at - * once after ":mkspell" is done. - */ - #define SBLOCKSIZE 16000 /* size of sb_data */ - typedef struct sblock_S sblock_T; - struct sblock_S - { -- sblock_T *sb_next; /* next block in list */ - int sb_used; /* nr of bytes already in use */ - char_u sb_data[1]; /* data, actually longer */ - }; - ---- 4956,4971 ---- - * Structure that is used to store the items in the word tree. This avoids - * the need to keep track of each allocated thing, everything is freed all at - * once after ":mkspell" is done. -+ * Note: "sb_next" must be just before "sb_data" to make sure the alignment of -+ * "sb_data" is correct for systems where pointers must be aligned on -+ * pointer-size boundaries and sizeof(pointer) > sizeof(int) (e.g., Sparc). - */ - #define SBLOCKSIZE 16000 /* size of sb_data */ - typedef struct sblock_S sblock_T; - struct sblock_S - { - int sb_used; /* nr of bytes already in use */ -+ sblock_T *sb_next; /* next block in list */ - char_u sb_data[1]; /* data, actually longer */ - }; - -*************** -*** 15011,15017 **** - - case 0: - /* -! * Lenghts are equal, thus changes must result in same length: An - * insert is only possible in combination with a delete. - * 1: check if for identical strings - */ ---- 15014,15020 ---- - - case 0: - /* -! * Lengths are equal, thus changes must result in same length: An - * insert is only possible in combination with a delete. - * 1: check if for identical strings - */ -*** ../vim-7.2.105/src/version.c Wed Feb 11 16:45:56 2009 ---- src/version.c Wed Feb 11 17:56:34 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 106, - /**/ - --- -If bankers can count, how come they have eight windows and -only four tellers? - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.107 b/vi/vim-7.2/7.2.107 deleted file mode 100644 index 9567375..0000000 --- a/vi/vim-7.2/7.2.107 +++ /dev/null @@ -1,56 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.107 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.107 -Problem: When using a GUI dialog and ":echo" commands the messages are - deleted after the dialog. (Vicent Birebent) -Solution: Don't call msg_end_prompt() since there was no prompt. -Files: src/message.c - - -*** ../vim-7.2.106/src/message.c Tue Jan 13 16:37:31 2009 ---- src/message.c Wed Feb 11 18:38:14 2009 -*************** -*** 3309,3315 **** - { - c = gui_mch_dialog(type, title, message, buttons, dfltbutton, - textfield); -! msg_end_prompt(); - - /* Flush output to avoid that further messages and redrawing is done - * in the wrong order. */ ---- 3309,3318 ---- - { - c = gui_mch_dialog(type, title, message, buttons, dfltbutton, - textfield); -! /* avoid a hit-enter prompt without clearing the cmdline */ -! need_wait_return = FALSE; -! emsg_on_display = FALSE; -! cmdline_row = msg_row; - - /* Flush output to avoid that further messages and redrawing is done - * in the wrong order. */ -*** ../vim-7.2.106/src/version.c Wed Feb 11 17:57:43 2009 ---- src/version.c Wed Feb 11 18:46:12 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 107, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -79. All of your most erotic dreams have a scrollbar at the right side. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.108 b/vi/vim-7.2/7.2.108 deleted file mode 100644 index 5164b83..0000000 --- a/vi/vim-7.2/7.2.108 +++ /dev/null @@ -1,55 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.108 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.108 (after 7.2.105) -Problem: Can't build without the diff feature. -Solution: Add #ifdef. -Files: src/option.c - - -*** ../vim-7.2.107/src/option.c Wed Feb 11 16:45:56 2009 ---- src/option.c Wed Feb 11 22:21:16 2009 -*************** -*** 4127,4132 **** ---- 4127,4133 ---- - errmsg = (char_u *)_("E520: Not allowed in a modeline"); - goto skip; - } -+ #ifdef FEAT_DIFF - /* In diff mode some options are overruled. This avoids that - * 'foldmethod' becomes "marker" instead of "diff" and that - * "wrap" gets set. */ -*************** -*** 4134,4139 **** ---- 4135,4141 ---- - && (options[opt_idx].indir == PV_FDM - || options[opt_idx].indir == PV_WRAP)) - goto skip; -+ #endif - } - - #ifdef HAVE_SANDBOX -*** ../vim-7.2.107/src/version.c Wed Feb 11 18:46:48 2009 ---- src/version.c Wed Feb 11 22:46:40 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 108, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -80. At parties, you introduce your spouse as your "service provider." - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.109 b/vi/vim-7.2/7.2.109 deleted file mode 100644 index 8c3866c..0000000 --- a/vi/vim-7.2/7.2.109 +++ /dev/null @@ -1,423 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.109 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.109 -Problem: 'langmap' does not work for multi-byte characters. -Solution: Add a list of mapped multi-byte characters. (based on work by - Konstantin Korikov, Agathoklis Hatzimanikas) -Files: runtime/doc/options.txt, src/edit.c, src/getchar.c, src/macros.h, - src/normal.c, src/option.c, src/proto/option.pro, src/window.c - - -*** ../vim-7.2.108/runtime/doc/options.txt Fri Nov 28 10:59:57 2008 ---- runtime/doc/options.txt Wed Feb 11 18:59:34 2009 -*************** -*** 4175,4183 **** - be able to execute Normal mode commands. - This is the opposite of the 'keymap' option, where characters are - mapped in Insert mode. -- This only works for 8-bit characters. The value of 'langmap' may be -- specified with multi-byte characters (e.g., UTF-8), but only the lower -- 8 bits of each character will be used. - - Example (for Greek, in UTF-8): *greek* > - :set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz ---- 4188,4193 ---- -*** ../vim-7.2.108/src/edit.c Wed Feb 4 11:19:40 2009 ---- src/edit.c Sat Feb 21 19:54:03 2009 -*************** -*** 7703,7711 **** - */ - ++no_mapping; - regname = plain_vgetc(); -- #ifdef FEAT_LANGMAP - LANGMAP_ADJUST(regname, TRUE); -- #endif - if (regname == Ctrl_R || regname == Ctrl_O || regname == Ctrl_P) - { - /* Get a third key for literal register insertion */ ---- 7703,7709 ---- -*************** -*** 7714,7722 **** - add_to_showcmd_c(literally); - #endif - regname = plain_vgetc(); -- #ifdef FEAT_LANGMAP - LANGMAP_ADJUST(regname, TRUE); -- #endif - } - --no_mapping; - ---- 7712,7718 ---- -*** ../vim-7.2.108/src/macros.h Wed Aug 15 20:41:07 2007 ---- src/macros.h Sat Feb 21 19:55:38 2009 -*************** -*** 127,141 **** - #ifdef FEAT_LANGMAP - /* - * Adjust chars in a language according to 'langmap' option. -! * NOTE that there is NO overhead if 'langmap' is not set; but even -! * when set we only have to do 2 ifs and an array lookup. - * Don't apply 'langmap' if the character comes from the Stuff buffer. - * The do-while is just to ignore a ';' after the macro. - */ -! # define LANGMAP_ADJUST(c, condition) do { \ -! if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0 && (c) < 256) \ -! c = langmap_mapchar[c]; \ - } while (0) - #endif - - /* ---- 127,157 ---- - #ifdef FEAT_LANGMAP - /* - * Adjust chars in a language according to 'langmap' option. -! * NOTE that there is no noticeable overhead if 'langmap' is not set. -! * When set the overhead for characters < 256 is small. - * Don't apply 'langmap' if the character comes from the Stuff buffer. - * The do-while is just to ignore a ';' after the macro. - */ -! # ifdef FEAT_MBYTE -! # define LANGMAP_ADJUST(c, condition) \ -! do { \ -! if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0) \ -! { \ -! if ((c) < 256) \ -! c = langmap_mapchar[c]; \ -! else \ -! c = langmap_adjust_mb(c); \ -! } \ - } while (0) -+ # else -+ # define LANGMAP_ADJUST(c, condition) \ -+ do { \ -+ if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0 && (c) < 256) \ -+ c = langmap_mapchar[c]; \ -+ } while (0) -+ # endif -+ #else -+ # define LANGMAP_ADJUST(c, condition) /* nop */ - #endif - - /* -*** ../vim-7.2.108/src/normal.c Wed Feb 4 11:45:28 2009 ---- src/normal.c Sat Feb 21 19:55:17 2009 -*************** -*** 651,660 **** - * Get the command character from the user. - */ - c = safe_vgetc(); -- -- #ifdef FEAT_LANGMAP - LANGMAP_ADJUST(c, TRUE); -- #endif - - #ifdef FEAT_VISUAL - /* ---- 651,657 ---- -*************** -*** 744,752 **** - } - ++no_zero_mapping; /* don't map zero here */ - c = plain_vgetc(); -- #ifdef FEAT_LANGMAP - LANGMAP_ADJUST(c, TRUE); -- #endif - --no_zero_mapping; - if (ctrl_w) - { ---- 741,747 ---- -*************** -*** 769,777 **** - ++no_mapping; - ++allow_keys; /* no mapping for nchar, but keys */ - c = plain_vgetc(); /* get next character */ -- #ifdef FEAT_LANGMAP - LANGMAP_ADJUST(c, TRUE); -- #endif - --no_mapping; - --allow_keys; - #ifdef FEAT_CMDL_INFO ---- 764,770 ---- -*************** -*** 959,967 **** - * "gr", "g'" and "g`". - */ - ca.nchar = plain_vgetc(); -- #ifdef FEAT_LANGMAP - LANGMAP_ADJUST(ca.nchar, TRUE); -- #endif - #ifdef FEAT_CMDL_INFO - need_flushbuf |= add_to_showcmd(ca.nchar); - #endif ---- 952,958 ---- -*************** -*** 1062,1071 **** - } - #endif - -- #ifdef FEAT_LANGMAP - /* adjust chars > 127, except after "tTfFr" commands */ - LANGMAP_ADJUST(*cp, !lang); -- #endif - #ifdef FEAT_RIGHTLEFT - /* adjust Hebrew mapped char */ - if (p_hkmap && lang && KeyTyped) ---- 1053,1060 ---- -*************** -*** 4630,4638 **** - ++no_mapping; - ++allow_keys; /* no mapping for nchar, but allow key codes */ - nchar = plain_vgetc(); -- #ifdef FEAT_LANGMAP - LANGMAP_ADJUST(nchar, TRUE); -- #endif - --no_mapping; - --allow_keys; - #ifdef FEAT_CMDL_INFO ---- 4619,4625 ---- -*************** -*** 4988,4996 **** - ++no_mapping; - ++allow_keys; /* no mapping for nchar, but allow key codes */ - nchar = plain_vgetc(); -- #ifdef FEAT_LANGMAP - LANGMAP_ADJUST(nchar, TRUE); -- #endif - --no_mapping; - --allow_keys; - #ifdef FEAT_CMDL_INFO ---- 4975,4981 ---- -*** ../vim-7.2.108/src/option.c Wed Feb 11 22:47:32 2009 ---- src/option.c Sat Feb 21 19:46:13 2009 -*************** -*** 10153,10177 **** - - #ifdef FEAT_LANGMAP - /* -! * Any character has an equivalent character. This is used for keyboards that -! * have a special language mode that sends characters above 128 (although -! * other characters can be translated too). - */ - - /* -! * char_u langmap_mapchar[256]; -! * Normally maps each of the 128 upper chars to an <128 ascii char; used to -! * "translate" native lang chars in normal mode or some cases of -! * insert mode without having to tediously switch lang mode back&forth. - */ - - static void - langmap_init() - { - int i; - -! for (i = 0; i < 256; i++) /* we init with a-one-to one map */ -! langmap_mapchar[i] = i; - } - - /* ---- 10153,10262 ---- - - #ifdef FEAT_LANGMAP - /* -! * Any character has an equivalent 'langmap' character. This is used for -! * keyboards that have a special language mode that sends characters above -! * 128 (although other characters can be translated too). The "to" field is a -! * Vim command character. This avoids having to switch the keyboard back to -! * ASCII mode when leaving Insert mode. -! * -! * langmap_mapchar[] maps any of 256 chars to an ASCII char used for Vim -! * commands. -! * When FEAT_MBYTE is defined langmap_mapga.ga_data is a sorted table of -! * langmap_entry_T. This does the same as langmap_mapchar[] for characters >= -! * 256. -! */ -! # ifdef FEAT_MBYTE -! /* -! * With multi-byte support use growarray for 'langmap' chars >= 256 - */ -+ typedef struct -+ { -+ int from; -+ int to; -+ } langmap_entry_T; -+ -+ static garray_T langmap_mapga; -+ static void langmap_set_entry __ARGS((int from, int to)); -+ -+ /* -+ * Search for an entry in "langmap_mapga" for "from". If found set the "to" -+ * field. If not found insert a new entry at the appropriate location. -+ */ -+ static void -+ langmap_set_entry(from, to) -+ int from; -+ int to; -+ { -+ langmap_entry_T *entries = (langmap_entry_T *)(langmap_mapga.ga_data); -+ int a = 0; -+ int b = langmap_mapga.ga_len; -+ -+ /* Do a binary search for an existing entry. */ -+ while (a != b) -+ { -+ int i = (a + b) / 2; -+ int d = entries[i].from - from; -+ -+ if (d == 0) -+ { -+ entries[i].to = to; -+ return; -+ } -+ if (d < 0) -+ a = i + 1; -+ else -+ b = i; -+ } -+ -+ if (ga_grow(&langmap_mapga, 1) != OK) -+ return; /* out of memory */ -+ -+ /* insert new entry at position "a" */ -+ entries = (langmap_entry_T *)(langmap_mapga.ga_data) + a; -+ mch_memmove(entries + 1, entries, -+ (langmap_mapga.ga_len - a) * sizeof(langmap_entry_T)); -+ ++langmap_mapga.ga_len; -+ entries[0].from = from; -+ entries[0].to = to; -+ } - - /* -! * Apply 'langmap' to multi-byte character "c" and return the result. - */ -+ int -+ langmap_adjust_mb(c) -+ int c; -+ { -+ langmap_entry_T *entries = (langmap_entry_T *)(langmap_mapga.ga_data); -+ int a = 0; -+ int b = langmap_mapga.ga_len; -+ -+ while (a != b) -+ { -+ int i = (a + b) / 2; -+ int d = entries[i].from - c; -+ -+ if (d == 0) -+ return entries[i].to; /* found matching entry */ -+ if (d < 0) -+ a = i + 1; -+ else -+ b = i; -+ } -+ return c; /* no entry found, return "c" unmodified */ -+ } -+ # endif - - static void - langmap_init() - { - int i; - -! for (i = 0; i < 256; i++) -! langmap_mapchar[i] = i; /* we init with a one-to-one map */ -! # ifdef FEAT_MBYTE -! ga_init2(&langmap_mapga, sizeof(langmap_entry_T), 8); -! # endif - } - - /* -*************** -*** 10185,10191 **** - char_u *p2; - int from, to; - -! langmap_init(); /* back to one-to-one map first */ - - for (p = p_langmap; p[0] != NUL; ) - { ---- 10270,10279 ---- - char_u *p2; - int from, to; - -! #ifdef FEAT_MBYTE -! ga_clear(&langmap_mapga); /* clear the previous map first */ -! #endif -! langmap_init(); /* back to one-to-one map */ - - for (p = p_langmap; p[0] != NUL; ) - { -*************** -*** 10235,10241 **** - transchar(from)); - return; - } -! langmap_mapchar[from & 255] = to; - - /* Advance to next pair */ - mb_ptr_adv(p); ---- 10323,10335 ---- - transchar(from)); - return; - } -! -! #ifdef FEAT_MBYTE -! if (from >= 256) -! langmap_set_entry(from, to); -! else -! #endif -! langmap_mapchar[from & 255] = to; - - /* Advance to next pair */ - mb_ptr_adv(p); -*** ../vim-7.2.108/src/proto/option.pro Sat May 5 19:28:04 2007 ---- src/proto/option.pro Wed Feb 11 21:21:05 2009 -*************** -*** 44,49 **** ---- 44,50 ---- - void set_context_in_set_cmd __ARGS((expand_T *xp, char_u *arg, int opt_flags)); - int ExpandSettings __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file)); - int ExpandOldSetting __ARGS((int *num_file, char_u ***file)); -+ int langmap_adjust_mb __ARGS((int c)); - int has_format_option __ARGS((int x)); - int shortmess __ARGS((int x)); - void vimrc_found __ARGS((char_u *fname, char_u *envname)); -*** ../vim-7.2.108/src/window.c Fri Nov 28 21:26:50 2008 ---- src/window.c Sat Feb 21 19:55:25 2009 -*************** -*** 594,602 **** - ++allow_keys; /* no mapping for xchar, but allow key codes */ - if (xchar == NUL) - xchar = plain_vgetc(); -- #ifdef FEAT_LANGMAP - LANGMAP_ADJUST(xchar, TRUE); -- #endif - --no_mapping; - --allow_keys; - #ifdef FEAT_CMDL_INFO ---- 594,600 ---- -*** ../vim-7.2.108/src/version.c Wed Feb 11 22:47:32 2009 ---- src/version.c Sat Feb 21 19:34:28 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 109, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -99. The hum of a cooling fan and the click of keys is comforting to you. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.110 b/vi/vim-7.2/7.2.110 deleted file mode 100644 index 4594e78..0000000 --- a/vi/vim-7.2/7.2.110 +++ /dev/null @@ -1,53 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.110 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.110 -Problem: Compiler warning for unused variable. -Solution: Init the variable. -Files: src/ex_docmd.c - - -*** ../vim-7.2.109/src/ex_docmd.c Wed Jan 28 15:42:07 2009 ---- src/ex_docmd.c Tue Feb 17 03:47:13 2009 -*************** -*** 5916,5922 **** - char_u *q; - - char_u *start; -! char_u *end; - char_u *ksp; - size_t len, totlen; - ---- 5916,5922 ---- - char_u *q; - - char_u *start; -! char_u *end = NULL; - char_u *ksp; - size_t len, totlen; - -*** ../vim-7.2.109/src/version.c Sat Feb 21 20:27:00 2009 ---- src/version.c Sat Feb 21 20:35:50 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 110, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -100. The most exciting sporting events you noticed during summer 1996 - was Netscape vs. Microsoft. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.111 b/vi/vim-7.2/7.2.111 deleted file mode 100644 index acc0be4..0000000 --- a/vi/vim-7.2/7.2.111 +++ /dev/null @@ -1,88 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.111 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.111 -Problem: When using Visual block mode with 'cursorcolumn' it's unclear what - is selected. -Solution: Don't use 'cursorcolumn' highlighting inside the Visual selection. - (idea by Dominique Pelle) -Files: src/screen.c - - -*** ../vim-7.2.110/src/screen.c Wed Oct 1 21:09:02 2008 ---- src/screen.c Sat Feb 21 21:04:19 2009 -*************** -*** 2596,2601 **** ---- 2596,2602 ---- - int noinvcur = FALSE; /* don't invert the cursor */ - #ifdef FEAT_VISUAL - pos_T *top, *bot; -+ int lnum_in_visual_area = FALSE; - #endif - pos_T pos; - long v; -*************** -*** 2792,2800 **** - top = &VIsual; - bot = &curwin->w_cursor; - } - if (VIsual_mode == Ctrl_V) /* block mode */ - { -! if (lnum >= top->lnum && lnum <= bot->lnum) - { - fromcol = wp->w_old_cursor_fcol; - tocol = wp->w_old_cursor_lcol; ---- 2793,2802 ---- - top = &VIsual; - bot = &curwin->w_cursor; - } -+ lnum_in_visual_area = (lnum >= top->lnum && lnum <= bot->lnum); - if (VIsual_mode == Ctrl_V) /* block mode */ - { -! if (lnum_in_visual_area) - { - fromcol = wp->w_old_cursor_fcol; - tocol = wp->w_old_cursor_lcol; -*************** -*** 4557,4563 **** - * highlight the cursor position itself. */ - if (wp->w_p_cuc && vcol == (long)wp->w_virtcol - && lnum != wp->w_cursor.lnum -! && draw_state == WL_LINE) - { - vcol_save_attr = char_attr; - char_attr = hl_combine_attr(char_attr, hl_attr(HLF_CUC)); ---- 4560,4567 ---- - * highlight the cursor position itself. */ - if (wp->w_p_cuc && vcol == (long)wp->w_virtcol - && lnum != wp->w_cursor.lnum -! && draw_state == WL_LINE -! && !lnum_in_visual_area) - { - vcol_save_attr = char_attr; - char_attr = hl_combine_attr(char_attr, hl_attr(HLF_CUC)); -*** ../vim-7.2.110/src/version.c Sat Feb 21 20:36:30 2009 ---- src/version.c Sat Feb 21 21:08:14 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 111, - /**/ - --- -Contrary to popular belief, Unix is user friendly. -It just happens to be selective about who it makes friends with. - -- Dave Parnas - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.112 b/vi/vim-7.2/7.2.112 deleted file mode 100644 index 6611999..0000000 --- a/vi/vim-7.2/7.2.112 +++ /dev/null @@ -1,47 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.112 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.112 -Problem: Cursor invisible in Visual mode when 'number' is set and cursor in - first column. (Matti Niemenmaa, Renato Alves) -Solution: Check that vcol_prev is smaller than vcol. -Files: src/screen.c - - -*** ../vim-7.2.111/src/screen.c Sat Feb 21 21:10:24 2009 ---- src/screen.c Sat Feb 21 21:04:19 2009 -*************** -*** 3422,3427 **** ---- 3422,3428 ---- - && (*mb_ptr2cells)(ptr) > 1) - #endif - || ((int)vcol_prev == fromcol_prev -+ && vcol_prev < vcol /* not at margin */ - && vcol < tocol)) - area_attr = attr; /* start highlighting */ - else if (area_attr != 0 -*** ../vim-7.2.111/src/version.c Sat Feb 21 21:10:24 2009 ---- src/version.c Sat Feb 21 21:20:51 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 112, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -102. When filling out your driver's license application, you give - your IP address. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.113 b/vi/vim-7.2/7.2.113 deleted file mode 100644 index f0e4ebf..0000000 --- a/vi/vim-7.2/7.2.113 +++ /dev/null @@ -1,99 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.113 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.113 -Problem: Crash for substitute() call using submatch(1) while there is no - such submatch. (Yukihiro Nakadaira) -Solution: Also check the start of the submatch is set, it can be NULL when - an attempted match didn't work out. -Files: src/regexp.c - - -*** ../vim-7.2.112/src/regexp.c Fri Aug 8 13:45:31 2008 ---- src/regexp.c Sat Feb 21 21:46:49 2009 -*************** -*** 4532,4538 **** - cleanup_subexpr(); - if (!REG_MULTI) /* Single-line regexp */ - { -! if (reg_endp[no] == NULL) - { - /* Backref was not set: Match an empty string. */ - len = 0; ---- 4532,4538 ---- - cleanup_subexpr(); - if (!REG_MULTI) /* Single-line regexp */ - { -! if (reg_startp[no] == NULL || reg_endp[no] == NULL) - { - /* Backref was not set: Match an empty string. */ - len = 0; -*************** -*** 4548,4554 **** - } - else /* Multi-line regexp */ - { -! if (reg_endpos[no].lnum < 0) - { - /* Backref was not set: Match an empty string. */ - len = 0; ---- 4548,4554 ---- - } - else /* Multi-line regexp */ - { -! if (reg_startpos[no].lnum < 0 || reg_endpos[no].lnum < 0) - { - /* Backref was not set: Match an empty string. */ - len = 0; -*************** -*** 7279,7291 **** - } - else - { -! if (submatch_match->endp[no] == NULL) - retval = NULL; - else -- { -- s = submatch_match->startp[no]; - retval = vim_strnsave(s, (int)(submatch_match->endp[no] - s)); -- } - } - - return retval; ---- 7279,7289 ---- - } - else - { -! s = submatch_match->startp[no]; -! if (s == NULL || submatch_match->endp[no] == NULL) - retval = NULL; - else - retval = vim_strnsave(s, (int)(submatch_match->endp[no] - s)); - } - - return retval; -*** ../vim-7.2.112/src/version.c Sat Feb 21 21:22:44 2009 ---- src/version.c Sat Feb 21 22:01:56 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 113, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -103. When you find yourself in the "Computer" section of Barnes & Noble - enjoying yourself. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.114 b/vi/vim-7.2/7.2.114 deleted file mode 100644 index 9742b52..0000000 --- a/vi/vim-7.2/7.2.114 +++ /dev/null @@ -1,86 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.114 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.114 -Problem: Using wrong printf format. -Solution: Use "%ld" instead of "%d". (Dominique Pelle) -Files: src/netbeans.c - - -*** ../vim-7.2.113/src/netbeans.c Tue Jan 6 16:13:42 2009 ---- src/netbeans.c Tue Feb 17 03:21:33 2009 -*************** -*** 1924,1930 **** - vim_free(path); - if (bufp == NULL) - { -! nbdebug((" File %s not found in setBufferNumber\n", args)); - EMSG2("E642: File %s not found in setBufferNumber", args); - return FAIL; - } ---- 1924,1930 ---- - vim_free(path); - if (bufp == NULL) - { -! nbdebug((" File %s not found in setBufferNumber\n", args)); - EMSG2("E642: File %s not found in setBufferNumber", args); - return FAIL; - } -*************** -*** 2318,2324 **** - } - if (pos) - { -! coloncmd(":sign place %d line=%d name=%d buffer=%d", - serNum, pos->lnum, typeNum, buf->bufp->b_fnum); - if (typeNum == curPCtype) - coloncmd(":sign jump %d buffer=%d", serNum, ---- 2318,2324 ---- - } - if (pos) - { -! coloncmd(":sign place %d line=%ld name=%d buffer=%d", - serNum, pos->lnum, typeNum, buf->bufp->b_fnum); - if (typeNum == curPCtype) - coloncmd(":sign jump %d buffer=%d", serNum, -*************** -*** 2422,2428 **** - GUARDED) == 0) - { - coloncmd( -! ":sign place %d line=%d name=%d buffer=%d", - guardId++, lnum, GUARDED, - buf->bufp->b_fnum); - } ---- 2422,2428 ---- - GUARDED) == 0) - { - coloncmd( -! ":sign place %d line=%ld name=%d buffer=%d", - guardId++, lnum, GUARDED, - buf->bufp->b_fnum); - } -*** ../vim-7.2.113/src/version.c Sat Feb 21 22:03:06 2009 ---- src/version.c Sat Feb 21 22:11:21 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 114, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -104. When people ask about the Presidential Election you ask "Which country?" - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.115 b/vi/vim-7.2/7.2.115 deleted file mode 100644 index b51a1f5..0000000 --- a/vi/vim-7.2/7.2.115 +++ /dev/null @@ -1,133 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.115 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.115 -Problem: Some debugging code is never used. -Solution: Remove nbtrace() and nbprt(). (Dominique Pelle) -Files: src/nbdebug.c, src/nbdebug.h - -*** ../vim-7.2.114/src/nbdebug.c Tue Jun 24 23:54:30 2008 ---- src/nbdebug.c Tue Feb 17 03:26:07 2009 -*************** -*** 33,39 **** - u_int nb_dlevel = 0; /* nb_debug verbosity level */ - - void nbdb(char *, ...); -- void nbtrace(char *, ...); - - static int lookup(char *); - #ifdef USE_NB_ERRORHANDLER ---- 33,38 ---- -*************** -*** 100,124 **** - } /* end nbdebug_log_init */ - - -- -- -- void -- nbtrace( -- char *fmt, -- ...) -- { -- va_list ap; -- -- if (nb_debug!= NULL && (nb_dlevel & (NB_TRACE | NB_TRACE_VERBOSE))) { -- va_start(ap, fmt); -- vfprintf(nb_debug, fmt, ap); -- va_end(ap); -- fflush(nb_debug); -- } -- -- } /* end nbtrace */ -- -- - void - nbdbg( - char *fmt, ---- 99,104 ---- -*************** -*** 136,158 **** - } /* end nbdbg */ - - -- void -- nbprt( -- char *fmt, -- ...) -- { -- va_list ap; -- -- if (nb_debug != NULL && nb_dlevel & NB_PRINT) { -- va_start(ap, fmt); -- vfprintf(nb_debug, fmt, ap); -- va_end(ap); -- fflush(nb_debug); -- } -- -- } /* end nbprt */ -- -- - static int - lookup( - char *file) ---- 116,121 ---- -*** ../vim-7.2.114/src/nbdebug.h Wed Jun 25 00:47:21 2008 ---- src/nbdebug.h Tue Feb 17 03:26:38 2009 -*************** -*** 43,50 **** - - - void nbdbg(char *, ...); -- void nbprt(char *, ...); -- void nbtrace(char *, ...); - - void nbdebug_wait __ARGS((u_int wait_flags, char *wait_var, u_int wait_secs)); - void nbdebug_log_init __ARGS((char *log_var, char *level_var)); ---- 43,48 ---- -*************** -*** 70,88 **** - { - } - -- void -- nbprt( -- char *fmt, -- ...) -- { -- } -- -- void -- nbtrace( -- char *fmt, -- ...) -- { -- } -- - #endif /* NBDEBUG */ - #endif /* NBDEBUG_H */ ---- 68,72 ---- -*** ../vim-7.2.114/src/version.c Sat Feb 21 22:12:43 2009 ---- src/version.c Sat Feb 21 22:28:21 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 115, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -105. When someone asks you for your address, you tell them your URL. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.116 b/vi/vim-7.2/7.2.116 deleted file mode 100644 index edd2bd1..0000000 --- a/vi/vim-7.2/7.2.116 +++ /dev/null @@ -1,55 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.116 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.116 -Problem: Not all memory is freed when EXITFREE is defined. -Solution: Free allocated memory on exit. (Dominique Pelle) -Files: src/ex_docmd.c, src/gui_gtk_x11.c, src/misc2.c, src/search.c, - src/tag.c - - -*** ../vim-7.2.115/src/tag.c Tue Jan 13 17:27:18 2009 ---- src/tag.c Tue Feb 17 03:43:32 2009 -*************** -*** 2542,2547 **** ---- 2542,2556 ---- - { - ga_clear_strings(&tag_fnames); - do_tag(NULL, DT_FREE, 0, 0, 0); -+ tag_freematch(); -+ -+ # if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) -+ if (ptag_entry.tagname) -+ { -+ vim_free(ptag_entry.tagname); -+ ptag_entry.tagname = NULL; -+ } -+ # endif - } - #endif - -*** ../vim-7.2.115/src/version.c Sat Feb 21 22:29:12 2009 ---- src/version.c Sat Feb 21 22:56:14 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 116, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -106. When told to "go to your room" you inform your parents that you - can't...because you were kicked out and banned. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.117 b/vi/vim-7.2/7.2.117 deleted file mode 100644 index 4c4e66a..0000000 --- a/vi/vim-7.2/7.2.117 +++ /dev/null @@ -1,107 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.117 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.117 -Problem: Location list incorrectly labelled "Quickfix List". -Solution: Break out of both loops for finding window for location list - buffer. (Lech Lorens) -Files: src/buffer.c, src/quickfix.c, src/screen.c - - -*** ../vim-7.2.116/src/buffer.c Tue Jan 6 16:13:42 2009 ---- src/buffer.c Tue Feb 17 04:00:51 2009 -*************** -*** 5098,5104 **** - */ - FOR_ALL_TAB_WINDOWS(tp, win) - if (win->w_buffer == buf) -! break; - if (win != NULL && win->w_llist_ref != NULL) - return _("[Location List]"); - else ---- 5098,5105 ---- - */ - FOR_ALL_TAB_WINDOWS(tp, win) - if (win->w_buffer == buf) -! goto win_found; -! win_found: - if (win != NULL && win->w_llist_ref != NULL) - return _("[Location List]"); - else -*** ../vim-7.2.116/src/quickfix.c Sat Nov 15 14:10:23 2008 ---- src/quickfix.c Sat Feb 21 22:54:25 2009 -*************** -*** 1610,1619 **** - { - goto_tabpage_win(tp, wp); - usable_win = 1; -! break; - } - } - } - - /* - * If there is only one window and it is the quickfix window, create a ---- 1612,1622 ---- - { - goto_tabpage_win(tp, wp); - usable_win = 1; -! goto win_found; - } - } - } -+ win_found: - - /* - * If there is only one window and it is the quickfix window, create a -*** ../vim-7.2.116/src/screen.c Sat Feb 21 21:22:44 2009 ---- src/screen.c Sat Feb 21 21:04:19 2009 -*************** -*** 7452,7461 **** - { - outofmem = TRUE; - #ifdef FEAT_WINDOWS -! break; - #endif - } - } - - #ifdef FEAT_MBYTE - for (i = 0; i < p_mco; ++i) ---- 7452,7464 ---- - { - outofmem = TRUE; - #ifdef FEAT_WINDOWS -! goto give_up; - #endif - } - } -+ #ifdef FEAT_WINDOWS -+ give_up: -+ #endif - - #ifdef FEAT_MBYTE - for (i = 0; i < p_mco; ++i) -*** ../vim-7.2.116/src/version.c Sat Feb 21 22:57:10 2009 ---- src/version.c Sat Feb 21 23:58:24 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 117, - /**/ - --- -Laughing helps. It's like jogging on the inside. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.118 b/vi/vim-7.2/7.2.118 deleted file mode 100644 index 73b6cbb..0000000 --- a/vi/vim-7.2/7.2.118 +++ /dev/null @@ -1,78 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.118 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.118 -Problem: <PageUp> at the more prompt only does half a page. -Solution: Make <PageUp> go up a whole page. Also make 'f' go a page - forward, but not quit the more prompt. (Markus Heidelberg) -Files: src/message.c - - -*** ../vim-7.2.117/src/message.c Wed Feb 11 18:46:48 2009 ---- src/message.c Fri Feb 20 05:20:15 2009 -*************** -*** 976,982 **** - } - } - else if (msg_scrolled > Rows - 2 -! && (c == 'j' || c == K_DOWN || c == 'd')) - c = K_IGNORE; - } - } while ((had_got_int && c == Ctrl_C) ---- 976,982 ---- - } - } - else if (msg_scrolled > Rows - 2 -! && (c == 'j' || c == K_DOWN || c == 'd' || c == 'f')) - c = K_IGNORE; - } - } while ((had_got_int && c == Ctrl_C) -*************** -*** 2504,2510 **** - break; - - case 'u': /* Up half a page */ -- case K_PAGEUP: - scroll = -(Rows / 2); - break; - ---- 2504,2509 ---- -*************** -*** 2513,2522 **** ---- 2512,2523 ---- - break; - - case 'b': /* one page back */ -+ case K_PAGEUP: - scroll = -(Rows - 1); - break; - - case ' ': /* one extra page */ -+ case 'f': - case K_PAGEDOWN: - case K_LEFTMOUSE: - scroll = Rows - 1; -*** ../vim-7.2.117/src/version.c Sun Feb 22 00:01:42 2009 ---- src/version.c Sun Feb 22 00:57:16 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 118, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -109. You actually read -- and enjoy -- lists like this. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.119 b/vi/vim-7.2/7.2.119 deleted file mode 100644 index f31f2e6..0000000 --- a/vi/vim-7.2/7.2.119 +++ /dev/null @@ -1,51 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.119 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.119 -Problem: Status line is redrawn too often. -Solution: Check ScreeenLinesUC[] properly. (Yukihiro Nakadaira) -Files: src/screen.c - - -*** ../vim-7.2.118/src/screen.c Sun Feb 22 00:01:42 2009 ---- src/screen.c Sun Feb 22 01:07:38 2009 -*************** -*** 6362,6368 **** - && c == 0x8e - && ScreenLines2[off] != ptr[1]) - || (enc_utf8 -! && (ScreenLinesUC[off] != (u8char_T)u8c - || screen_comp_differs(off, u8cc))) - #endif - || ScreenAttrs[off] != attr ---- 6362,6368 ---- - && c == 0x8e - && ScreenLines2[off] != ptr[1]) - || (enc_utf8 -! && (ScreenLinesUC[off] != (u8char_T)(c >= 0x80 ? u8c : 0) - || screen_comp_differs(off, u8cc))) - #endif - || ScreenAttrs[off] != attr -*** ../vim-7.2.118/src/version.c Sun Feb 22 00:58:03 2009 ---- src/version.c Sun Feb 22 01:09:54 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 119, - /**/ - --- -In a world without walls and borders, who needs windows and gates? - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.120 b/vi/vim-7.2/7.2.120 deleted file mode 100644 index cf687f3..0000000 --- a/vi/vim-7.2/7.2.120 +++ /dev/null @@ -1,277 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.120 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.120 -Problem: When opening the quickfix window or splitting the window and - setting the location list, the location list is copied and then - deleted, which is inefficient. -Solution: Don't copy the location list when not needed. (Lech Lorens) -Files: src/quickfix.c, src/vim.h, src/window.c - - -*** ../vim-7.2.119/src/quickfix.c Sun Feb 22 00:01:42 2009 ---- src/quickfix.c Sat Feb 21 22:54:25 2009 -*************** -*** 1419,1424 **** ---- 1419,1425 ---- - int opened_window = FALSE; - win_T *win; - win_T *altwin; -+ int flags; - #endif - win_T *oldwin = curwin; - int print_message = TRUE; -*************** -*** 1531,1537 **** - if (qf_ptr->qf_type == 1 && (!curwin->w_buffer->b_help || cmdmod.tab != 0)) - { - win_T *wp; -- int n; - - if (cmdmod.tab != 0) - wp = NULL; ---- 1532,1537 ---- -*************** -*** 1547,1559 **** - * Split off help window; put it at far top if no position - * specified, the current window is vertically split and narrow. - */ -! n = WSP_HELP; - # ifdef FEAT_VERTSPLIT - if (cmdmod.split == 0 && curwin->w_width != Columns - && curwin->w_width < 80) -! n |= WSP_TOP; - # endif -! if (win_split(0, n) == FAIL) - goto theend; - opened_window = TRUE; /* close it when fail */ - ---- 1547,1562 ---- - * Split off help window; put it at far top if no position - * specified, the current window is vertically split and narrow. - */ -! flags = WSP_HELP; - # ifdef FEAT_VERTSPLIT - if (cmdmod.split == 0 && curwin->w_width != Columns - && curwin->w_width < 80) -! flags |= WSP_TOP; - # endif -! if (qi != &ql_info) -! flags |= WSP_NEWLOC; /* don't copy the location list */ -! -! if (win_split(0, flags) == FAIL) - goto theend; - opened_window = TRUE; /* close it when fail */ - -*************** -*** 1563,1569 **** - if (qi != &ql_info) /* not a quickfix list */ - { - /* The new window should use the supplied location list */ -- qf_free_all(curwin); - curwin->w_llist = qi; - qi->qf_refcount++; - } ---- 1566,1571 ---- -*************** -*** 1624,1630 **** - { - ll_ref = curwin->w_llist_ref; - -! if (win_split(0, WSP_ABOVE) == FAIL) - goto failed; /* not enough room for window */ - opened_window = TRUE; /* close it when fail */ - p_swb = empty_option; /* don't split again */ ---- 1626,1635 ---- - { - ll_ref = curwin->w_llist_ref; - -! flags = WSP_ABOVE; -! if (ll_ref != NULL) -! flags |= WSP_NEWLOC; -! if (win_split(0, flags) == FAIL) - goto failed; /* not enough room for window */ - opened_window = TRUE; /* close it when fail */ - p_swb = empty_option; /* don't split again */ -*************** -*** 1636,1642 **** - { - /* The new window should use the location list from the - * location list window */ -- qf_free_all(curwin); - curwin->w_llist = ll_ref; - ll_ref->qf_refcount++; - } ---- 1641,1646 ---- -*************** -*** 2311,2325 **** - if (eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow) - /* Create the new window at the very bottom. */ - win_goto(lastwin); -! if (win_split(height, WSP_BELOW) == FAIL) - return; /* not enough room for window */ - #ifdef FEAT_SCROLLBIND - curwin->w_p_scb = FALSE; - #endif - -- /* Remove the location list for the quickfix window */ -- qf_free_all(curwin); -- - if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow) - { - /* ---- 2315,2326 ---- - if (eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow) - /* Create the new window at the very bottom. */ - win_goto(lastwin); -! if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL) - return; /* not enough room for window */ - #ifdef FEAT_SCROLLBIND - curwin->w_p_scb = FALSE; - #endif - - if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow) - { - /* -*** ../vim-7.2.119/src/vim.h Thu Nov 20 14:11:47 2008 ---- src/vim.h Sat Feb 21 22:53:03 2009 -*************** -*** 1057,1062 **** ---- 1057,1063 ---- - #define WSP_HELP 16 /* creating the help window */ - #define WSP_BELOW 32 /* put new window below/right */ - #define WSP_ABOVE 64 /* put new window above/left */ -+ #define WSP_NEWLOC 128 /* don't copy location list */ - - /* - * arguments for gui_set_shellsize() -*** ../vim-7.2.119/src/window.c Sat Feb 21 20:27:00 2009 ---- src/window.c Sat Feb 21 23:56:41 2009 -*************** -*** 12,18 **** - static int path_is_url __ARGS((char_u *p)); - #if defined(FEAT_WINDOWS) || defined(PROTO) - static int win_split_ins __ARGS((int size, int flags, win_T *newwin, int dir)); -! static void win_init __ARGS((win_T *newp, win_T *oldp)); - static void frame_comp_pos __ARGS((frame_T *topfrp, int *row, int *col)); - static void frame_setheight __ARGS((frame_T *curfrp, int height)); - #ifdef FEAT_VERTSPLIT ---- 12,18 ---- - static int path_is_url __ARGS((char_u *p)); - #if defined(FEAT_WINDOWS) || defined(PROTO) - static int win_split_ins __ARGS((int size, int flags, win_T *newwin, int dir)); -! static void win_init __ARGS((win_T *newp, win_T *oldp, int flags)); - static void frame_comp_pos __ARGS((frame_T *topfrp, int *row, int *col)); - static void frame_setheight __ARGS((frame_T *curfrp, int height)); - #ifdef FEAT_VERTSPLIT -*************** -*** 911,917 **** - return FAIL; - - /* make the contents of the new window the same as the current one */ -! win_init(wp, curwin); - } - - /* ---- 911,917 ---- - return FAIL; - - /* make the contents of the new window the same as the current one */ -! win_init(wp, curwin, flags); - } - - /* -*************** -*** 1160,1170 **** - * Initialize window "newp" from window "oldp". - * Used when splitting a window and when creating a new tab page. - * The windows will both edit the same buffer. - */ - static void -! win_init(newp, oldp) - win_T *newp; - win_T *oldp; - { - int i; - ---- 1160,1174 ---- - * Initialize window "newp" from window "oldp". - * Used when splitting a window and when creating a new tab page. - * The windows will both edit the same buffer. -+ * WSP_NEWLOC may be specified in flags to prevent the location list from -+ * being copied. - */ -+ /*ARGSUSED*/ - static void -! win_init(newp, oldp, flags) - win_T *newp; - win_T *oldp; -+ int flags; - { - int i; - -*************** -*** 1189,1195 **** - copy_jumplist(oldp, newp); - #endif - #ifdef FEAT_QUICKFIX -! copy_loclist(oldp, newp); - #endif - if (oldp->w_localdir != NULL) - newp->w_localdir = vim_strsave(oldp->w_localdir); ---- 1193,1206 ---- - copy_jumplist(oldp, newp); - #endif - #ifdef FEAT_QUICKFIX -! if (flags & WSP_NEWLOC) -! { -! /* Don't copy the location list. */ -! newp->w_llist = NULL; -! newp->w_llist_ref = NULL; -! } -! else -! copy_loclist(oldp, newp); - #endif - if (oldp->w_localdir != NULL) - newp->w_localdir = vim_strsave(oldp->w_localdir); -*************** -*** 3219,3225 **** - else - { - /* First window in new tab page, initialize it from "oldwin". */ -! win_init(curwin, oldwin); - - # ifdef FEAT_SCROLLBIND - /* We don't want scroll-binding in the first window. */ ---- 3230,3236 ---- - else - { - /* First window in new tab page, initialize it from "oldwin". */ -! win_init(curwin, oldwin, 0); - - # ifdef FEAT_SCROLLBIND - /* We don't want scroll-binding in the first window. */ -*** ../vim-7.2.119/src/version.c Sun Feb 22 01:13:45 2009 ---- src/version.c Sun Feb 22 02:32:14 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 120, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -110. You actually volunteer to become your employer's webmaster. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.121 b/vi/vim-7.2/7.2.121 deleted file mode 100644 index ea5306f..0000000 --- a/vi/vim-7.2/7.2.121 +++ /dev/null @@ -1,180 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.121 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.121 -Problem: In gvim "!grep a *.c" spews out a lot of text that can't be - stopped with CTRL-C. -Solution: When looping to read and show text, do check for typed characters - every two seconds. -Files: src/os_unix.c - - -*** ../vim-7.2.120/src/os_unix.c Wed Feb 4 14:18:44 2009 ---- src/os_unix.c Sun Feb 22 00:54:05 2009 -*************** -*** 4092,4097 **** ---- 4092,4100 ---- - int fromshell_fd; - garray_T ga; - int noread_cnt; -+ # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) -+ struct timeval start_tv; -+ # endif - - # ifdef FEAT_GUI - if (pty_master_fd >= 0) -*************** -*** 4201,4207 **** - ga_init2(&ga, 1, BUFLEN); - - noread_cnt = 0; -! - for (;;) - { - /* ---- 4204,4212 ---- - ga_init2(&ga, 1, BUFLEN); - - noread_cnt = 0; -! # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) -! gettimeofday(&start_tv, NULL); -! # endif - for (;;) - { - /* -*************** -*** 4214,4238 **** - * that a typed password is echoed for ssh or gpg command. - * Don't get characters when the child has already - * finished (wait_pid == 0). -- * Don't get extra characters when we already have one. - * Don't read characters unless we didn't get output for a -! * while, avoids that ":r !ls" eats typeahead. - */ - len = 0; - if (!(options & SHELL_EXPAND) - && ((options & - (SHELL_READ|SHELL_WRITE|SHELL_COOKED)) - != (SHELL_READ|SHELL_WRITE|SHELL_COOKED) -! #ifdef FEAT_GUI - || gui.in_use -! #endif - ) - && wait_pid == 0 -! && (ta_len > 0 -! || (noread_cnt > 4 -! && (len = ui_inchar(ta_buf, -! BUFLEN, 10L, 0)) > 0))) - { - /* - * For pipes: - * Check for CTRL-C: send interrupt signal to child. ---- 4219,4252 ---- - * that a typed password is echoed for ssh or gpg command. - * Don't get characters when the child has already - * finished (wait_pid == 0). - * Don't read characters unless we didn't get output for a -! * while (noread_cnt > 4), avoids that ":r !ls" eats -! * typeahead. - */ - len = 0; - if (!(options & SHELL_EXPAND) - && ((options & - (SHELL_READ|SHELL_WRITE|SHELL_COOKED)) - != (SHELL_READ|SHELL_WRITE|SHELL_COOKED) -! # ifdef FEAT_GUI - || gui.in_use -! # endif - ) - && wait_pid == 0 -! && (ta_len > 0 || noread_cnt > 4)) - { -+ if (ta_len == 0) -+ { -+ /* Get extra characters when we don't have any. -+ * Reset the counter and timer. */ -+ noread_cnt = 0; -+ # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) -+ gettimeofday(&start_tv, NULL); -+ # endif -+ len = ui_inchar(ta_buf, BUFLEN, 10L, 0); -+ } -+ if (ta_len > 0 || len > 0) -+ { - /* - * For pipes: - * Check for CTRL-C: send interrupt signal to child. -*************** -*** 4334,4342 **** - { - ta_len -= len; - mch_memmove(ta_buf, ta_buf + len, ta_len); -- noread_cnt = 0; - } - } - } - - if (got_int) ---- 4348,4356 ---- - { - ta_len -= len; - mch_memmove(ta_buf, ta_buf + len, ta_len); - } - } -+ } - } - - if (got_int) -*************** -*** 4444,4449 **** ---- 4458,4482 ---- - out_flush(); - if (got_int) - break; -+ -+ # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) -+ { -+ struct timeval now_tv; -+ long msec; -+ -+ /* Avoid that we keep looping here without -+ * checking for a CTRL-C for a long time. Don't -+ * break out too often to avoid losing typeahead. */ -+ gettimeofday(&now_tv, NULL); -+ msec = (now_tv.tv_sec - start_tv.tv_sec) * 1000L -+ + (now_tv.tv_usec - start_tv.tv_usec) / 1000L; -+ if (msec > 2000) -+ { -+ noread_cnt = 5; -+ break; -+ } -+ } -+ # endif - } - - /* If we already detected the child has finished break the -*** ../vim-7.2.120/src/version.c Sun Feb 22 02:36:36 2009 ---- src/version.c Sun Feb 22 02:48:03 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 121, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -111. You and your friends get together regularly on IRC, even though - all of you live in the same city. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.122 b/vi/vim-7.2/7.2.122 deleted file mode 100644 index 18f6989..0000000 --- a/vi/vim-7.2/7.2.122 +++ /dev/null @@ -1,80 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.122 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.122 -Problem: Invalid memory access when the VimResized autocommand changes - 'columns' and/or 'lines'. -Solution: After VimResized check for changed values. (Dominique Pelle) -Files: src/screen.c - - -*** ../vim-7.2.121/src/screen.c Sun Feb 22 01:13:45 2009 ---- src/screen.c Sun Feb 22 01:07:38 2009 -*************** -*** 7368,7374 **** ---- 7368,7378 ---- - #endif - static int entered = FALSE; /* avoid recursiveness */ - static int done_outofmem_msg = FALSE; /* did outofmem message */ -+ #ifdef FEAT_AUTOCMD -+ int retry_count = 0; - -+ retry: -+ #endif - /* - * Allocation of the screen buffers is done only when the size changes and - * when Rows and Columns have been set and we have started doing full -*************** -*** 7643,7650 **** - --RedrawingDisabled; - - #ifdef FEAT_AUTOCMD -! if (starting == 0) - apply_autocmds(EVENT_VIMRESIZED, NULL, NULL, FALSE, curbuf); - #endif - } - ---- 7647,7663 ---- - --RedrawingDisabled; - - #ifdef FEAT_AUTOCMD -! /* -! * Do not apply autocommands more than 3 times to avoid an endless loop -! * in case applying autocommands always changes Rows or Columns. -! */ -! if (starting == 0 && ++retry_count <= 3) -! { - apply_autocmds(EVENT_VIMRESIZED, NULL, NULL, FALSE, curbuf); -+ /* In rare cases, autocommands may have altered Rows or Columns, -+ * jump back to check if we need to allocate the screen again. */ -+ goto retry; -+ } - #endif - } - -*** ../vim-7.2.121/src/version.c Sun Feb 22 02:51:37 2009 ---- src/version.c Sun Feb 22 21:11:14 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 122, - /**/ - --- -FIXME and XXX are two common keywords used to mark broken or incomplete code -not only since XXX as a sex reference would grab everbodys attention but -simply due to the fact that Vim would highlight these words. - -- Hendrik Scholz - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.123 b/vi/vim-7.2/7.2.123 deleted file mode 100644 index 4cf9b81..0000000 --- a/vi/vim-7.2/7.2.123 +++ /dev/null @@ -1,50 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.123 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.123 -Problem: Typing 'q' at more prompt for ":map" output still displays another - line, causing another more prompt. (Markus Heidelberg) -Solution: Quit listing maps when 'q' typed. -Files: src/getchar.c - - -*** ../vim-7.2.122/src/getchar.c Fri Nov 28 12:05:07 2008 ---- src/getchar.c Sun Feb 22 23:10:45 2009 -*************** -*** 3816,3822 **** ---- 3816,3826 ---- - int len = 1; - - if (msg_didout || msg_silent != 0) -+ { - msg_putchar('\n'); -+ if (got_int) /* 'q' typed at MORE prompt */ -+ return; -+ } - if ((mp->m_mode & (INSERT + CMDLINE)) == INSERT + CMDLINE) - msg_putchar('!'); /* :map! */ - else if (mp->m_mode & INSERT) -*** ../vim-7.2.122/src/version.c Sun Feb 22 21:12:22 2009 ---- src/version.c Sun Feb 22 23:16:29 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 123, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -120. You ask a friend, "What's that big shiny thing?" He says, "It's the sun." - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.124 b/vi/vim-7.2/7.2.124 deleted file mode 100644 index eca6bec..0000000 --- a/vi/vim-7.2/7.2.124 +++ /dev/null @@ -1,122 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.124 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.124 -Problem: Typing 'q' at more prompt for ":tselect" output still displays - more lines, causing another more prompt. (Markus Heidelberg) -Solution: Quit listing tags when 'q' typed. -Files: src/tag.c - - -*** ../vim-7.2.123/src/tag.c Sat Feb 21 22:57:10 2009 ---- src/tag.c Mon Feb 23 00:07:24 2009 -*************** -*** 618,624 **** - taglen_advance(taglen); - MSG_PUTS_ATTR(_("file\n"), hl_attr(HLF_T)); - -! for (i = 0; i < num_matches; ++i) - { - parse_match(matches[i], &tagp); - if (!new_tag && ( ---- 618,624 ---- - taglen_advance(taglen); - MSG_PUTS_ATTR(_("file\n"), hl_attr(HLF_T)); - -! for (i = 0; i < num_matches && !got_int; ++i) - { - parse_match(matches[i], &tagp); - if (!new_tag && ( -*************** -*** 655,660 **** ---- 655,662 ---- - } - if (msg_col > 0) - msg_putchar('\n'); -+ if (got_int) -+ break; - msg_advance(15); - - /* print any extra fields */ -*************** -*** 689,694 **** ---- 691,698 ---- - if (msg_col + ptr2cells(p) >= Columns) - { - msg_putchar('\n'); -+ if (got_int) -+ break; - msg_advance(15); - } - p = msg_outtrans_one(p, attr); -*************** -*** 704,709 **** ---- 708,715 ---- - if (msg_col > 15) - { - msg_putchar('\n'); -+ if (got_int) -+ break; - msg_advance(15); - } - } -*************** -*** 734,739 **** ---- 740,747 ---- - { - if (msg_col + (*p == TAB ? 1 : ptr2cells(p)) > Columns) - msg_putchar('\n'); -+ if (got_int) -+ break; - msg_advance(15); - - /* skip backslash used for escaping command char */ -*************** -*** 760,771 **** - if (msg_col) - msg_putchar('\n'); - ui_breakcheck(); -- if (got_int) -- { -- got_int = FALSE; /* only stop the listing */ -- break; -- } - } - ask_for_selection = TRUE; - } - #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL) ---- 768,776 ---- - if (msg_col) - msg_putchar('\n'); - ui_breakcheck(); - } -+ if (got_int) -+ got_int = FALSE; /* only stop the listing */ - ask_for_selection = TRUE; - } - #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL) -*** ../vim-7.2.123/src/version.c Sun Feb 22 23:42:08 2009 ---- src/version.c Mon Feb 23 00:51:57 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 124, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -123. You ask the car dealer to install an extra cigarette lighter - on your new car to power your notebook. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.125 b/vi/vim-7.2/7.2.125 deleted file mode 100644 index 460bdea..0000000 --- a/vi/vim-7.2/7.2.125 +++ /dev/null @@ -1,161 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.125 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.125 -Problem: Leaking memory when reading XPM bitmap for a sign. -Solution: Don't allocate the memory twice. (Dominique Pelle) -Files: src/gui_x11.c - - -*** ../vim-7.2.124/src/gui_x11.c Wed Nov 12 13:07:48 2008 ---- src/gui_x11.c Sun Feb 22 21:58:19 2009 -*************** -*** 1587,1592 **** ---- 1587,1594 ---- - XtCloseDisplay(gui.dpy); - gui.dpy = NULL; - vimShell = (Widget)0; -+ vim_free(gui_argv); -+ gui_argv = NULL; - } - - /* -*************** -*** 1761,1766 **** ---- 1763,1770 ---- - * says that this isn't needed when exiting, so just skip it. */ - XtCloseDisplay(gui.dpy); - #endif -+ vim_free(gui_argv); -+ gui_argv = NULL; - } - - /* -*************** -*** 3439,3485 **** - char_u *signfile; - { - XpmAttributes attrs; -! XImage *sign; - int status; - - /* - * Setup the color substitution table. - */ -- sign = NULL; - if (signfile[0] != NUL && signfile[0] != '-') - { -! sign = (XImage *)alloc(sizeof(XImage)); -! if (sign != NULL) - { -! XpmColorSymbol color[5] = -! { -! {"none", NULL, 0}, -! {"iconColor1", NULL, 0}, -! {"bottomShadowColor", NULL, 0}, -! {"topShadowColor", NULL, 0}, -! {"selectColor", NULL, 0} -! }; -! attrs.valuemask = XpmColorSymbols; -! attrs.numsymbols = 2; -! attrs.colorsymbols = color; -! attrs.colorsymbols[0].pixel = gui.back_pixel; -! attrs.colorsymbols[1].pixel = gui.norm_pixel; -! status = XpmReadFileToImage(gui.dpy, (char *)signfile, - &sign, NULL, &attrs); -! -! if (status == 0) -! { -! /* Sign width is fixed at two columns now. -! if (sign->width > gui.sign_width) -! gui.sign_width = sign->width + 8; */ -! } -! else -! { -! vim_free(sign); -! sign = NULL; -! EMSG(_(e_signdata)); -! } - } - } - - return (void *)sign; ---- 3443,3479 ---- - char_u *signfile; - { - XpmAttributes attrs; -! XImage *sign = NULL; - int status; - - /* - * Setup the color substitution table. - */ - if (signfile[0] != NUL && signfile[0] != '-') - { -! XpmColorSymbol color[5] = - { -! {"none", NULL, 0}, -! {"iconColor1", NULL, 0}, -! {"bottomShadowColor", NULL, 0}, -! {"topShadowColor", NULL, 0}, -! {"selectColor", NULL, 0} -! }; -! attrs.valuemask = XpmColorSymbols; -! attrs.numsymbols = 2; -! attrs.colorsymbols = color; -! attrs.colorsymbols[0].pixel = gui.back_pixel; -! attrs.colorsymbols[1].pixel = gui.norm_pixel; -! status = XpmReadFileToImage(gui.dpy, (char *)signfile, - &sign, NULL, &attrs); -! if (status == 0) -! { -! /* Sign width is fixed at two columns now. -! if (sign->width > gui.sign_width) -! gui.sign_width = sign->width + 8; */ - } -+ else -+ EMSG(_(e_signdata)); - } - - return (void *)sign; -*************** -*** 3489,3496 **** - gui_mch_destroy_sign(sign) - void *sign; - { -! XFree(((XImage *)sign)->data); -! vim_free(sign); - } - #endif - ---- 3483,3489 ---- - gui_mch_destroy_sign(sign) - void *sign; - { -! XDestroyImage((XImage*)sign); - } - #endif - -*** ../vim-7.2.124/src/version.c Mon Feb 23 00:53:35 2009 ---- src/version.c Tue Feb 24 04:09:33 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 125, - /**/ - --- -I have a watch cat! Just break in and she'll watch. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.126 b/vi/vim-7.2/7.2.126 deleted file mode 100644 index fe2dd65..0000000 --- a/vi/vim-7.2/7.2.126 +++ /dev/null @@ -1,174 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.126 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.126 -Problem: When EXITFREE is defined signs are not freed. -Solution: Free all signs on exit. Also free keymaps. (Dominique Pelle) -Files: src/misc2.c, src/ex_cmds.c, src/proto/ex_cmds.pro - - -*** ../vim-7.2.125/src/misc2.c Thu Jan 22 21:31:24 2009 ---- src/misc2.c Sun Feb 22 22:04:53 2009 -*************** -*** 1010,1015 **** ---- 1010,1018 ---- - # if defined(FEAT_PROFILE) - do_cmdline_cmd((char_u *)"profdel *"); - # endif -+ # if defined(FEAT_KEYMAP) -+ do_cmdline_cmd((char_u *)"set keymap="); -+ #endif - - # ifdef FEAT_TITLE - free_titles(); -*************** -*** 1034,1039 **** ---- 1037,1045 ---- - free_regexp_stuff(); - free_tag_stuff(); - free_cd_dir(); -+ # ifdef FEAT_SIGNS -+ free_signs(); -+ # endif - # ifdef FEAT_EVAL - set_expr_line(NULL); - # endif -*** ../vim-7.2.125/src/ex_cmds.c Wed Feb 11 16:02:29 2009 ---- src/ex_cmds.c Sun Feb 22 22:07:08 2009 -*************** -*** 6541,6546 **** ---- 6541,6547 ---- - static int last_sign_typenr = MAX_TYPENR; /* is decremented */ - - static void sign_list_defined __ARGS((sign_T *sp)); -+ static void sign_undefine __ARGS((sign_T *sp, sign_T *sp_prev)); - - /* - * ":sign" command -*************** -*** 6749,6772 **** - /* ":sign list {name}" */ - sign_list_defined(sp); - else -- { - /* ":sign undefine {name}" */ -! vim_free(sp->sn_name); -! vim_free(sp->sn_icon); -! #ifdef FEAT_SIGN_ICONS -! if (sp->sn_image != NULL) -! { -! out_flush(); -! gui_mch_destroy_sign(sp->sn_image); -! } -! #endif -! vim_free(sp->sn_text); -! if (sp_prev == NULL) -! first_sign = sp->sn_next; -! else -! sp_prev->sn_next = sp->sn_next; -! vim_free(sp); -! } - } - } - else ---- 6750,6757 ---- - /* ":sign list {name}" */ - sign_list_defined(sp); - else - /* ":sign undefine {name}" */ -! sign_undefine(sp, sp_prev); - } - } - else -*************** -*** 7015,7020 **** ---- 7000,7030 ---- - } - - /* -+ * Undefine a sign and free its memory. -+ */ -+ static void -+ sign_undefine(sp, sp_prev) -+ sign_T *sp; -+ sign_T *sp_prev; -+ { -+ vim_free(sp->sn_name); -+ vim_free(sp->sn_icon); -+ #ifdef FEAT_SIGN_ICONS -+ if (sp->sn_image != NULL) -+ { -+ out_flush(); -+ gui_mch_destroy_sign(sp->sn_image); -+ } -+ #endif -+ vim_free(sp->sn_text); -+ if (sp_prev == NULL) -+ first_sign = sp->sn_next; -+ else -+ sp_prev->sn_next = sp->sn_next; -+ vim_free(sp); -+ } -+ -+ /* - * Get highlighting attribute for sign "typenr". - * If "line" is TRUE: line highl, if FALSE: text highl. - */ -*************** -*** 7088,7093 **** ---- 7098,7115 ---- - return (char_u *)_("[Deleted]"); - } - -+ #if defined(EXITFREE) || defined(PROTO) -+ /* -+ * Undefine/free all signs. -+ */ -+ void -+ free_signs() -+ { -+ while (first_sign != NULL) -+ sign_undefine(first_sign, NULL); -+ } -+ #endif -+ - #endif - - #if defined(FEAT_GUI) || defined(FEAT_CLIENTSERVER) || defined(PROTO) -*** ../vim-7.2.125/src/proto/ex_cmds.pro Sat Nov 15 14:10:23 2008 ---- src/proto/ex_cmds.pro Sun Feb 22 22:04:53 2009 -*************** -*** 40,45 **** ---- 40,46 ---- - int read_viminfo_sub_string __ARGS((vir_T *virp, int force)); - void write_viminfo_sub_string __ARGS((FILE *fp)); - void free_old_sub __ARGS((void)); -+ void free_signs __ARGS((void)); - int prepare_tagpreview __ARGS((int undo_sync)); - void ex_help __ARGS((exarg_T *eap)); - char_u *check_help_lang __ARGS((char_u *arg)); -*** ../vim-7.2.125/src/version.c Tue Feb 24 04:11:07 2009 ---- src/version.c Tue Feb 24 04:24:46 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 126, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -125. You begin to wonder how often it REALLY is necessary to get up - and shower or bathe. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.127 b/vi/vim-7.2/7.2.127 deleted file mode 100644 index 662fe0f..0000000 --- a/vi/vim-7.2/7.2.127 +++ /dev/null @@ -1,59 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.127 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.127 -Problem: When listing mappings and a wrapping line causes the more prompt, - after typing 'q' there can be another more prompt. (Markus - Heidelberg) -Solution: Set "lines_left" to allow more lines to be displayed. -Files: src/message.c - - -*** ../vim-7.2.126/src/message.c Sun Feb 22 00:58:03 2009 ---- src/message.c Mon Feb 23 04:17:39 2009 -*************** -*** 2553,2559 **** - { - /* Jump to the choices of the dialog. */ - retval = TRUE; -- lines_left = Rows - 1; - } - else - #endif ---- 2553,2558 ---- -*************** -*** 2561,2566 **** ---- 2560,2568 ---- - got_int = TRUE; - quit_more = TRUE; - } -+ /* When there is some more output (wrapping line) display that -+ * without another prompt. */ -+ lines_left = Rows - 1; - break; - - #ifdef FEAT_CLIPBOARD -*** ../vim-7.2.126/src/version.c Tue Feb 24 04:28:40 2009 ---- src/version.c Tue Feb 24 04:35:38 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 127, - /**/ - --- -The difference between theory and practice, is that in theory, there -is no difference between theory and practice. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.128 b/vi/vim-7.2/7.2.128 deleted file mode 100644 index 0c17f18..0000000 --- a/vi/vim-7.2/7.2.128 +++ /dev/null @@ -1,52 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.128 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.128 (after 7.2.055) -Problem: Using ":lcd" makes session files not work. -Solution: Compare return value of mch_chdir() properly. (Andreas Bernauer) -Files: src/ex_docmd.c - - -*** ../vim-7.2.127/src/ex_docmd.c Sat Feb 21 20:36:30 2009 ---- src/ex_docmd.c Sun Mar 1 02:39:38 2009 -*************** -*** 8792,8798 **** - else if (*dirnow != NUL - && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) - { -! if (mch_chdir((char *)globaldir) == OK) - shorten_fnames(TRUE); - } - ---- 8799,8805 ---- - else if (*dirnow != NUL - && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) - { -! if (mch_chdir((char *)globaldir) == 0) - shorten_fnames(TRUE); - } - -*** ../vim-7.2.127/src/version.c Tue Feb 24 04:36:50 2009 ---- src/version.c Sun Mar 1 02:42:47 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 128, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -138. You develop a liking for cold coffee. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.129 b/vi/vim-7.2/7.2.129 deleted file mode 100644 index ca756cf..0000000 --- a/vi/vim-7.2/7.2.129 +++ /dev/null @@ -1,73 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.129 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.129 -Problem: When opening a command window from input() it uses the search - history. -Solution: Use get_cmdline_type(). (James Vega) -Files: src/ex_getln.c - - -*** ../vim-7.2.128/src/ex_getln.c Fri Nov 28 10:59:57 2008 ---- src/ex_getln.c Mon Mar 2 00:53:39 2009 -*************** -*** 6047,6055 **** - # endif - return K_IGNORE; - } -! cmdwin_type = ccline.cmdfirstc; -! if (cmdwin_type == NUL) -! cmdwin_type = '-'; - - /* Create the command-line buffer empty. */ - (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL); ---- 6062,6068 ---- - # endif - return K_IGNORE; - } -! cmdwin_type = get_cmdline_type(); - - /* Create the command-line buffer empty. */ - (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE, NULL); -*************** -*** 6073,6079 **** - /* Showing the prompt may have set need_wait_return, reset it. */ - need_wait_return = FALSE; - -! histtype = hist_char2type(ccline.cmdfirstc); - if (histtype == HIST_CMD || histtype == HIST_DEBUG) - { - if (p_wc == TAB) ---- 6086,6092 ---- - /* Showing the prompt may have set need_wait_return, reset it. */ - need_wait_return = FALSE; - -! histtype = hist_char2type(cmdwin_type); - if (histtype == HIST_CMD || histtype == HIST_DEBUG) - { - if (p_wc == TAB) -*** ../vim-7.2.128/src/version.c Sun Mar 1 02:43:50 2009 ---- src/version.c Mon Mar 2 02:10:11 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 129, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -146. You experience ACTUAL physical withdrawal symptoms when away - from your 'puter and the net. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.130 b/vi/vim-7.2/7.2.130 deleted file mode 100644 index 8d65468..0000000 --- a/vi/vim-7.2/7.2.130 +++ /dev/null @@ -1,413 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.130 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.130 -Problem: Vim may haing until CTRL-C is typed when using CTRL-Z. -Solution: Avoid using pause(). Also use "volatile" for variables used in - signal functions. (Dominique Pelle) -Files: src/auto/configure, src/configure.in, src/config.h.in, - src/globals.h, src/os_unix.c - - -*** ../vim-7.2.129/src/auto/configure Thu Nov 20 10:36:04 2008 ---- src/auto/configure Mon Mar 2 02:36:52 2009 -*************** -*** 11565,11570 **** ---- 11565,11631 ---- - - fi - -+ { $as_echo "$as_me:$LINENO: checking for working volatile" >&5 -+ $as_echo_n "checking for working volatile... " >&6; } -+ if test "${ac_cv_c_volatile+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+ else -+ cat >conftest.$ac_ext <<_ACEOF -+ /* confdefs.h. */ -+ _ACEOF -+ cat confdefs.h >>conftest.$ac_ext -+ cat >>conftest.$ac_ext <<_ACEOF -+ /* end confdefs.h. */ -+ -+ int -+ main () -+ { -+ -+ volatile int x; -+ int * volatile y = (int *) 0; -+ return !x && !y; -+ ; -+ return 0; -+ } -+ _ACEOF -+ rm -f conftest.$ac_objext -+ if { (ac_try="$ac_compile" -+ case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+ esac -+ eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+ $as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_c_volatile=yes -+ else -+ $as_echo "$as_me: failed program was:" >&5 -+ sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_c_volatile=no -+ fi -+ -+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ fi -+ { $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 -+ $as_echo "$ac_cv_c_volatile" >&6; } -+ if test $ac_cv_c_volatile = no; then -+ -+ cat >>confdefs.h <<\_ACEOF -+ #define volatile /**/ -+ _ACEOF -+ -+ fi -+ - { $as_echo "$as_me:$LINENO: checking for mode_t" >&5 - $as_echo_n "checking for mode_t... " >&6; } - if test "${ac_cv_type_mode_t+set}" = set; then -*** ../vim-7.2.129/src/configure.in Thu Nov 20 10:36:04 2008 ---- src/configure.in Sun Feb 22 21:47:44 2009 -*************** -*** 2148,2153 **** ---- 2148,2154 ---- - dnl Checks for typedefs, structures, and compiler characteristics. - AC_PROG_GCC_TRADITIONAL - AC_C_CONST -+ AC_C_VOLATILE - AC_TYPE_MODE_T - AC_TYPE_OFF_T - AC_TYPE_PID_T -*** ../vim-7.2.129/src/config.h.in Tue Jun 24 23:47:46 2008 ---- src/config.h.in Mon Feb 23 00:13:17 2009 -*************** -*** 50,55 **** ---- 50,58 ---- - /* Define to empty if the keyword does not work. */ - #undef const - -+ /* Define to empty if the keyword does not work. */ -+ #undef volatile -+ - /* Define to `int' if <sys/types.h> doesn't define. */ - #undef mode_t - -*** ../vim-7.2.129/src/globals.h Tue Jan 6 16:13:42 2009 ---- src/globals.h Mon Mar 2 02:40:16 2009 -*************** -*** 482,489 **** - /* - * While executing external commands or in Ex mode, should not insert GUI - * events in the input buffer: Set hold_gui_events to non-zero. - */ -! EXTERN int hold_gui_events INIT(= 0); - - /* - * When resizing the shell is postponed, remember the new size, and call ---- 482,491 ---- - /* - * While executing external commands or in Ex mode, should not insert GUI - * events in the input buffer: Set hold_gui_events to non-zero. -+ * -+ * volatile because it is used in signal handler sig_sysmouse(). - */ -! EXTERN volatile int hold_gui_events INIT(= 0); - - /* - * When resizing the shell is postponed, remember the new size, and call -*************** -*** 597,603 **** - EXTERN int really_exiting INIT(= FALSE); - /* TRUE when we are sure to exit, e.g., after - * a deadly signal */ -! EXTERN int full_screen INIT(= FALSE); - /* TRUE when doing full-screen output - * otherwise only writing some messages */ - ---- 599,606 ---- - EXTERN int really_exiting INIT(= FALSE); - /* TRUE when we are sure to exit, e.g., after - * a deadly signal */ -! /* volatile because it is used in signal handler deathtrap(). */ -! EXTERN volatile int full_screen INIT(= FALSE); - /* TRUE when doing full-screen output - * otherwise only writing some messages */ - -*************** -*** 739,748 **** - */ - EXTERN JMP_BUF lc_jump_env; /* argument to SETJMP() */ - # ifdef SIGHASARG -! EXTERN int lc_signal; /* catched signal number, 0 when no was signal -! catched; used for mch_libcall() */ - # endif -! EXTERN int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */ - #endif - - #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) ---- 747,758 ---- - */ - EXTERN JMP_BUF lc_jump_env; /* argument to SETJMP() */ - # ifdef SIGHASARG -! /* volatile because it is used in signal handlers. */ -! EXTERN volatile int lc_signal; /* caught signal number, 0 when no was signal -! caught; used for mch_libcall() */ - # endif -! /* volatile because it is used in signal handler deathtrap(). */ -! EXTERN volatile int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */ - #endif - - #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) -*************** -*** 986,992 **** - EXTERN FILE *scriptout INIT(= NULL); /* stream to write script to */ - EXTERN int read_cmd_fd INIT(= 0); /* fd to read commands from */ - -! EXTERN int got_int INIT(= FALSE); /* set to TRUE when interrupt - signal occurred */ - #ifdef USE_TERM_CONSOLE - EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */ ---- 996,1003 ---- - EXTERN FILE *scriptout INIT(= NULL); /* stream to write script to */ - EXTERN int read_cmd_fd INIT(= 0); /* fd to read commands from */ - -! /* volatile because it is used in signal handler catch_sigint(). */ -! EXTERN volatile int got_int INIT(= FALSE); /* set to TRUE when interrupt - signal occurred */ - #ifdef USE_TERM_CONSOLE - EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */ -*** ../vim-7.2.129/src/os_unix.c Sun Feb 22 02:51:37 2009 ---- src/os_unix.c Mon Mar 2 01:05:50 2009 -*************** -*** 181,187 **** - && defined(FEAT_TITLE) && !defined(FEAT_GUI_GTK) - # define SET_SIG_ALARM - static RETSIGTYPE sig_alarm __ARGS(SIGPROTOARG); -! static int sig_alarm_called; - #endif - static RETSIGTYPE deathtrap __ARGS(SIGPROTOARG); - ---- 181,188 ---- - && defined(FEAT_TITLE) && !defined(FEAT_GUI_GTK) - # define SET_SIG_ALARM - static RETSIGTYPE sig_alarm __ARGS(SIGPROTOARG); -! /* volatile because it is used in signal handler sig_alarm(). */ -! static volatile int sig_alarm_called; - #endif - static RETSIGTYPE deathtrap __ARGS(SIGPROTOARG); - -*************** -*** 201,213 **** - # define SIG_ERR ((RETSIGTYPE (*)())-1) - #endif - -! static int do_resize = FALSE; - #ifndef __EMX__ - static char_u *extra_shell_arg = NULL; - static int show_shell_mess = TRUE; - #endif -! static int deadly_signal = 0; /* The signal we caught */ -! static int in_mch_delay = FALSE; /* sleeping in mch_delay() */ - - static int curr_tmode = TMODE_COOK; /* contains current terminal mode */ - ---- 202,217 ---- - # define SIG_ERR ((RETSIGTYPE (*)())-1) - #endif - -! /* volatile because it is used in signal handler sig_winch(). */ -! static volatile int do_resize = FALSE; - #ifndef __EMX__ - static char_u *extra_shell_arg = NULL; - static int show_shell_mess = TRUE; - #endif -! /* volatile because it is used in signal handler deathtrap(). */ -! static volatile int deadly_signal = 0; /* The signal we caught */ -! /* volatile because it is used in signal handler deathtrap(). */ -! static volatile int in_mch_delay = FALSE; /* sleeping in mch_delay() */ - - static int curr_tmode = TMODE_COOK; /* contains current terminal mode */ - -*************** -*** 802,808 **** - #endif - - /* -! * We need correct potatotypes for a signal function, otherwise mean compilers - * will barf when the second argument to signal() is ``wrong''. - * Let me try it with a few tricky defines from my own osdef.h (jw). - */ ---- 806,812 ---- - #endif - - /* -! * We need correct prototypes for a signal function, otherwise mean compilers - * will barf when the second argument to signal() is ``wrong''. - * Let me try it with a few tricky defines from my own osdef.h (jw). - */ -*************** -*** 1068,1080 **** - SIGRETURN; - } - -! #ifdef _REENTRANT - /* - * On Solaris with multi-threading, suspending might not work immediately. - * Catch the SIGCONT signal, which will be used as an indication whether the - * suspending has been done or not. - */ -! static int sigcont_received; - static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG); - - /* ---- 1072,1089 ---- - SIGRETURN; - } - -! #if defined(_REENTRANT) && defined(SIGCONT) - /* - * On Solaris with multi-threading, suspending might not work immediately. - * Catch the SIGCONT signal, which will be used as an indication whether the - * suspending has been done or not. -+ * -+ * On Linux, signal is not always handled immediately either. -+ * See https://bugs.launchpad.net/bugs/291373 -+ * -+ * volatile because it is used in in signal handler sigcont_handler(). - */ -! static volatile int sigcont_received; - static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG); - - /* -*************** -*** 1118,1132 **** - } - # endif - -! # ifdef _REENTRANT - sigcont_received = FALSE; - # endif - kill(0, SIGTSTP); /* send ourselves a STOP signal */ -! # ifdef _REENTRANT -! /* When we didn't suspend immediately in the kill(), do it now. Happens -! * on multi-threaded Solaris. */ -! if (!sigcont_received) -! pause(); - # endif - - # ifdef FEAT_TITLE ---- 1127,1154 ---- - } - # endif - -! # if defined(_REENTRANT) && defined(SIGCONT) - sigcont_received = FALSE; - # endif - kill(0, SIGTSTP); /* send ourselves a STOP signal */ -! # if defined(_REENTRANT) && defined(SIGCONT) -! /* -! * Wait for the SIGCONT signal to be handled. It generally happens -! * immediately, but somehow not all the time. Do not call pause() -! * because there would be race condition which would hang Vim if -! * signal happened in between the test of sigcont_received and the -! * call to pause(). If signal is not yet received, call sleep(0) -! * to just yield CPU. Signal should then be received. If somehow -! * it's still not received, sleep 1, 2, 3 ms. Don't bother waiting -! * further if signal is not received after 1+2+3+4 ms (not expected -! * to happen). -! */ -! { -! long wait; -! for (wait = 0; !sigcont_received && wait <= 3L; wait++) -! /* Loop is not entered most of the time */ -! mch_delay(wait, FALSE); -! } - # endif - - # ifdef FEAT_TITLE -*************** -*** 1175,1181 **** - #ifdef SIGTSTP - signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); - #endif -! #ifdef _REENTRANT - signal(SIGCONT, sigcont_handler); - #endif - ---- 1197,1203 ---- - #ifdef SIGTSTP - signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); - #endif -! #if defined(_REENTRANT) && defined(SIGCONT) - signal(SIGCONT, sigcont_handler); - #endif - -*************** -*** 1234,1240 **** - reset_signals() - { - catch_signals(SIG_DFL, SIG_DFL); -! #ifdef _REENTRANT - /* SIGCONT isn't in the list, because its default action is ignore */ - signal(SIGCONT, SIG_DFL); - #endif ---- 1256,1262 ---- - reset_signals() - { - catch_signals(SIG_DFL, SIG_DFL); -! #if defined(_REENTRANT) && defined(SIGCONT) - /* SIGCONT isn't in the list, because its default action is ignore */ - signal(SIGCONT, SIG_DFL); - #endif -*************** -*** 5899,5905 **** ---- 5921,5929 ---- - * we are going to suspend or starting an external process - * so we shouldn't have problem with this - */ -+ # ifdef SIGTSTP - signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); -+ # endif - return 1; /* succeed */ - } - if (gpm_fd == -2) -*** ../vim-7.2.129/src/version.c Mon Mar 2 02:11:09 2009 ---- src/version.c Mon Mar 2 02:36:00 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 130, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -148. You find it easier to dial-up the National Weather Service - Weather/your_town/now.html than to simply look out the window. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.131 b/vi/vim-7.2/7.2.131 deleted file mode 100644 index fec2b5e..0000000 --- a/vi/vim-7.2/7.2.131 +++ /dev/null @@ -1,83 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.131 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.131 -Problem: When 'keymap' is cleared may still use the cursor highlighting for - when it's enabled. -Solution: Reset 'iminsert' and 'imsearch'. (partly by Dominique Pelle) - Also avoid ":setlocal" for these options have a global effect. -Files: src/option.c - - -*** ../vim-7.2.130/src/option.c Sat Feb 21 20:27:00 2009 ---- src/option.c Wed Mar 4 04:09:51 2009 -*************** -*** 5797,5810 **** - /* load or unload key mapping tables */ - errmsg = keymap_init(); - -! /* When successfully installed a new keymap switch on using it. */ -! if (*curbuf->b_p_keymap != NUL && errmsg == NULL) - { -! curbuf->b_p_iminsert = B_IMODE_LMAP; -! if (curbuf->b_p_imsearch != B_IMODE_USE_INSERT) -! curbuf->b_p_imsearch = B_IMODE_LMAP; -! set_iminsert_global(); -! set_imsearch_global(); - # ifdef FEAT_WINDOWS - status_redraw_curbuf(); - # endif ---- 5797,5824 ---- - /* load or unload key mapping tables */ - errmsg = keymap_init(); - -! if (errmsg == NULL) - { -! if (*curbuf->b_p_keymap != NUL) -! { -! /* Installed a new keymap, switch on using it. */ -! curbuf->b_p_iminsert = B_IMODE_LMAP; -! if (curbuf->b_p_imsearch != B_IMODE_USE_INSERT) -! curbuf->b_p_imsearch = B_IMODE_LMAP; -! } -! else -! { -! /* Cleared the keymap, may reset 'iminsert' and 'imsearch'. */ -! if (curbuf->b_p_iminsert == B_IMODE_LMAP) -! curbuf->b_p_iminsert = B_IMODE_NONE; -! if (curbuf->b_p_imsearch == B_IMODE_LMAP) -! curbuf->b_p_imsearch = B_IMODE_USE_INSERT; -! } -! if ((opt_flags & OPT_LOCAL) == 0) -! { -! set_iminsert_global(); -! set_imsearch_global(); -! } - # ifdef FEAT_WINDOWS - status_redraw_curbuf(); - # endif -*** ../vim-7.2.130/src/version.c Mon Mar 2 02:44:54 2009 ---- src/version.c Wed Mar 4 04:10:32 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 131, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -157. You fum through a magazine, you first check to see if it has a web - address. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/7.2.132 b/vi/vim-7.2/7.2.132 deleted file mode 100644 index 69e19ee..0000000 --- a/vi/vim-7.2/7.2.132 +++ /dev/null @@ -1,268 +0,0 @@ -To: vim-dev@vim.org -Subject: Patch 7.2.132 -Fcc: outbox -From: Bram Moolenaar <Bram@moolenaar.net> -Mime-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: 8bit ------------- - -Patch 7.2.132 -Problem: When changing directory during a SwapExists autocmd freed memory - may be accessed. (Dominique Pelle) -Solution: Add the allbuf_lock flag. -Files: src/ex_getln.c, src/globals.h, src/fileio.c, - src/proto/ex_getln.pro - - -*** ../vim-7.2.131/src/ex_getln.c Mon Mar 2 02:11:09 2009 ---- src/ex_getln.c Mon Mar 2 00:53:39 2009 -*************** -*** 2000,2007 **** - - #if defined(FEAT_AUTOCMD) || defined(PROTO) - /* -! * Check if "curbuf_lock" is set and return TRUE when it is and give an error -! * message. - */ - int - curbuf_locked() ---- 2000,2007 ---- - - #if defined(FEAT_AUTOCMD) || defined(PROTO) - /* -! * Check if "curbuf_lock" or "allbuf_lock" is set and return TRUE when it is -! * and give an error message. - */ - int - curbuf_locked() -*************** -*** 2011,2016 **** ---- 2011,2031 ---- - EMSG(_("E788: Not allowed to edit another buffer now")); - return TRUE; - } -+ return allbuf_locked(); -+ } -+ -+ /* -+ * Check if "allbuf_lock" is set and return TRUE when it is and give an error -+ * message. -+ */ -+ int -+ allbuf_locked() -+ { -+ if (allbuf_lock > 0) -+ { -+ EMSG(_("E811: Not allowed to change buffer information now")); -+ return TRUE; -+ } - return FALSE; - } - #endif -*** ../vim-7.2.131/src/globals.h Mon Mar 2 02:44:54 2009 ---- src/globals.h Mon Mar 2 02:40:16 2009 -*************** -*** 619,624 **** ---- 619,629 ---- - EXTERN int curbuf_lock INIT(= 0); - /* non-zero when the current buffer can't be - * changed. Used for FileChangedRO. */ -+ EXTERN int allbuf_lock INIT(= 0); -+ /* non-zero when no buffer name can be -+ * changed, no buffer can be deleted and -+ * current directory can't be changed. -+ * Used for SwapExists et al. */ - #endif - #ifdef FEAT_EVAL - # define HAVE_SANDBOX -*** ../vim-7.2.131/src/fileio.c Wed Dec 31 16:20:54 2008 ---- src/fileio.c Sun Mar 1 23:37:10 2009 -*************** -*** 69,75 **** - static int au_find_group __ARGS((char_u *name)); - - # define AUGROUP_DEFAULT -1 /* default autocmd group */ -! # define AUGROUP_ERROR -2 /* errornouse autocmd group */ - # define AUGROUP_ALL -3 /* all autocmd groups */ - #endif - ---- 69,75 ---- - static int au_find_group __ARGS((char_u *name)); - - # define AUGROUP_DEFAULT -1 /* default autocmd group */ -! # define AUGROUP_ERROR -2 /* erroneous autocmd group */ - # define AUGROUP_ALL -3 /* all autocmd groups */ - #endif - -*************** -*** 144,150 **** - # endif - #endif - static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf)); -! - - void - filemess(buf, name, s, attr) ---- 144,152 ---- - # endif - #endif - static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf)); -! #ifdef FEAT_AUTOCMD -! static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name"); -! #endif - - void - filemess(buf, name, s, attr) -*************** -*** 295,300 **** ---- 297,315 ---- - int conv_restlen = 0; /* nr of bytes in conv_rest[] */ - #endif - -+ #ifdef FEAT_AUTOCMD -+ /* Remember the initial values of curbuf, curbuf->b_ffname and -+ * curbuf->b_fname to detect whether they are altered as a result of -+ * executing nasty autocommands. Also check if "fname" and "sfname" -+ * point to one of these values. */ -+ buf_T *old_curbuf = curbuf; -+ char_u *old_b_ffname = curbuf->b_ffname; -+ char_u *old_b_fname = curbuf->b_fname; -+ int using_b_ffname = (fname == curbuf->b_ffname) -+ || (sfname == curbuf->b_ffname); -+ int using_b_fname = (fname == curbuf->b_fname) -+ || (sfname == curbuf->b_fname); -+ #endif - write_no_eol_lnum = 0; /* in case it was set by the previous read */ - - /* -*************** -*** 589,595 **** ---- 604,624 ---- - #ifdef FEAT_QUICKFIX - if (!bt_dontwrite(curbuf)) - #endif -+ { - check_need_swap(newfile); -+ #ifdef FEAT_AUTOCMD -+ /* SwapExists autocommand may mess things up */ -+ if (curbuf != old_curbuf -+ || (using_b_ffname -+ && (old_b_ffname != curbuf->b_ffname)) -+ || (using_b_fname -+ && (old_b_fname != curbuf->b_fname))) -+ { -+ EMSG(_(e_auchangedbuf)); -+ return FAIL; -+ } -+ #endif -+ } - if (dir_of_file_exists(fname)) - filemess(curbuf, sfname, (char_u *)_("[New File]"), 0); - else -*************** -*** 668,673 **** ---- 697,713 ---- - #endif - { - check_need_swap(newfile); -+ #ifdef FEAT_AUTOCMD -+ if (!read_stdin && (curbuf != old_curbuf -+ || (using_b_ffname && (old_b_ffname != curbuf->b_ffname)) -+ || (using_b_fname && (old_b_fname != curbuf->b_fname)))) -+ { -+ EMSG(_(e_auchangedbuf)); -+ if (!read_buffer) -+ close(fd); -+ return FAIL; -+ } -+ #endif - #ifdef UNIX - /* Set swap file protection bits after creating it. */ - if (swap_mode > 0 && curbuf->b_ml.ml_mfp->mf_fname != NULL) -*************** -*** 698,704 **** - { - int m = msg_scroll; - int n = msg_scrolled; -- buf_T *old_curbuf = curbuf; - - /* - * The file must be closed again, the autocommands may want to change ---- 738,743 ---- -*************** -*** 740,747 **** ---- 779,791 ---- - /* - * Don't allow the autocommands to change the current buffer. - * Try to re-open the file. -+ * -+ * Don't allow the autocommands to change the buffer name either -+ * (cd for example) if it invalidates fname or sfname. - */ - if (!read_stdin && (curbuf != old_curbuf -+ || (using_b_ffname && (old_b_ffname != curbuf->b_ffname)) -+ || (using_b_fname && (old_b_fname != curbuf->b_fname)) - || (fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0)) < 0)) - { - --no_wait_return; -*************** -*** 6320,6326 **** - - if (!stuff_empty() || global_busy || !typebuf_typed() - #ifdef FEAT_AUTOCMD -! || autocmd_busy || curbuf_lock > 0 - #endif - ) - need_check_timestamps = TRUE; /* check later */ ---- 6364,6370 ---- - - if (!stuff_empty() || global_busy || !typebuf_typed() - #ifdef FEAT_AUTOCMD -! || autocmd_busy || curbuf_lock > 0 || allbuf_lock > 0 - #endif - ) - need_check_timestamps = TRUE; /* check later */ -*************** -*** 6522,6529 **** ---- 6566,6575 ---- - set_vim_var_string(VV_FCS_REASON, (char_u *)reason, -1); - set_vim_var_string(VV_FCS_CHOICE, (char_u *)"", -1); - # endif -+ ++allbuf_lock; - n = apply_autocmds(EVENT_FILECHANGEDSHELL, - buf->b_fname, buf->b_fname, FALSE, buf); -+ --allbuf_lock; - busy = FALSE; - if (n) - { -*** ../vim-7.2.131/src/proto/ex_getln.pro Fri Nov 28 10:59:57 2008 ---- src/proto/ex_getln.pro Sun Mar 1 00:27:12 2009 -*************** -*** 4,9 **** ---- 4,10 ---- - int text_locked __ARGS((void)); - void text_locked_msg __ARGS((void)); - int curbuf_locked __ARGS((void)); -+ int allbuf_locked __ARGS((void)); - char_u *getexline __ARGS((int c, void *dummy, int indent)); - char_u *getexmodeline __ARGS((int promptc, void *dummy, int indent)); - int cmdline_overstrike __ARGS((void)); -*** ../vim-7.2.131/src/version.c Wed Mar 4 04:11:56 2009 ---- src/version.c Thu Mar 5 03:08:54 2009 -*************** -*** 678,679 **** ---- 678,681 ---- - { /* Add new patch number below this line */ -+ /**/ -+ 132, - /**/ - --- -hundred-and-one symptoms of being an internet addict: -168. You have your own domain name. - - /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ -/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ -\\\ download, build and distribute -- http://www.A-A-P.org /// - \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/vi/vim-7.2/indent/cuda.vim b/vi/vim-7.2/indent/cuda.vim deleted file mode 100644 index 68ee9ce..0000000 --- a/vi/vim-7.2/indent/cuda.vim +++ /dev/null @@ -1,15 +0,0 @@ -" Vim indent file -" Language: CUDA -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2008 Nov 29 - -" Only load this indent file when no other was loaded. -if exists("b:did_indent") - finish -endif -let b:did_indent = 1 - -" It's just like C indenting -setlocal cindent - -let b:undo_indent = "setl cin<" diff --git a/vi/vim-7.2/spell/fixdup.vim b/vi/vim-7.2/spell/fixdup.vim deleted file mode 100644 index 0dd532d..0000000 --- a/vi/vim-7.2/spell/fixdup.vim +++ /dev/null @@ -1,27 +0,0 @@ -" Vim script to fix duplicate words in a .dic file vim: set ft=vim: -" -" Usage: Edit the .dic file and source this script. - -let deleted = 0 - -" Start below the word count. -let lnum = 2 -while lnum <= line('$') - let word = getline(lnum) - if word !~ '/' - if search('^' . word . '/', 'w') != 0 - let deleted += 1 - exe lnum . "d" - continue " don't increment lnum, it's already at the next word - endif - endif - let lnum += 1 -endwhile - -if deleted == 0 - echomsg "No duplicate words found" -elseif deleted == 1 - echomsg "Deleted 1 duplicate word" -else - echomsg printf("Deleted %d duplicate words", deleted) -endif diff --git a/vidalia/PKGBUILD b/vidalia/PKGBUILD deleted file mode 100644 index d966269..0000000 --- a/vidalia/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Contributor: Rorschach <r0rschach@lavabit.com> - -pkgname=vidalia -pkgver=0.1.15 -pkgrel=1 -pkgdesc="Controller GUI for Tor" -url="https://www.torproject.org/vidalia" -arch=('i686' 'x86_64') -license="GPL" -depends=('qt>=4.3.0' ) -makedepends=('cmake>=2.4.0') -source=(https://www.torproject.org/vidalia/dist/$pkgname-$pkgver.tar.gz arch_menuicon.patch vidalia.png) -md5sums=('005afad126dc6142d7748ec185d9fafe' '8e8cf49776f8f6da923bb42d92fde08d' '5ec703cf17d75f880b2494495a5d2a58') - -build() { - [ -f /etc/profile.d/qt4.sh ] && source /etc/profile.d/qt4.sh - - patch -p0 < ../arch_menuicon.patch - cd $pkgname-$pkgver - cmake -D CMAKE_INSTALL_PREFIX=/usr . - make || return 1 - make DESTDIR=$pkgdir install - install -Dm644 doc/vidalia.1.in $pkgdir/usr/share/man/man1/vidalia.1 - install -Dm644 $srcdir/vidalia.png $pkgdir/usr/share/pixmaps/vidalia.png -} diff --git a/vidalia/arch_menuicon.patch b/vidalia/arch_menuicon.patch deleted file mode 100644 index 421e7f3..0000000 --- a/vidalia/arch_menuicon.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- vidalia-0.1.15/src/vidalia/vidalia.desktop.old 2009-01-01 16:19:01.000000000 +0100 -+++ vidalia-0.1.15/src/vidalia/vidalia.desktop 2009-01-01 16:20:13.000000000 +0100 -@@ -6,3 +6,4 @@ - GenericName=Tor GUI - Terminal=false - Categories=Qt;Network; -+Version=0.1.15 diff --git a/vidalia/vidalia.png b/vidalia/vidalia.png Binary files differdeleted file mode 100644 index bc9a198..0000000 --- a/vidalia/vidalia.png +++ /dev/null diff --git a/vim-gnupg/PKGBUILD b/vim-gnupg/PKGBUILD deleted file mode 100644 index e185fa3..0000000 --- a/vim-gnupg/PKGBUILD +++ /dev/null @@ -1,21 +0,0 @@ -# Maintainer: nblock <nblock [/at\] archlinux DOT us> -# Contributor: Laszlo Papp <djszapi @ archlinux us> - -pkgname=vim-gnupg -pkgver=3026 -_scriptid=12200 -pkgrel=1 -pkgdesc="Plugin for transparent editing of gpg encrypted files" -arch=('i686' 'x86_64') -url="http://www.vim.org/scripts/script.php?script_id=661" -license=('GPL') -groups=('vim-plugins') -depends=('vim') -source=(${pkgname}::http://www.vim.org/scripts/download_script.php?src_id=${_scriptid}) -md5sums=('e1d3007b845744f0513cbac8cfe69912') - -build() { - install -Dm644 ${srcdir}/${pkgname} ${pkgdir}/usr/share/vim/vimfiles/plugin/gnupg.vim -} - -# vim:set ts=2 sw=2 et: diff --git a/vim-gnupg/vim-gnupg b/vim-gnupg/vim-gnupg deleted file mode 100644 index 09116d6..0000000 --- a/vim-gnupg/vim-gnupg +++ /dev/null @@ -1,1177 +0,0 @@ -" Name: gnupg.vim -" Version: $Id: gnupg.vim 3026 2010-01-27 08:18:04Z mbr $ -" Author: Markus Braun <markus.braun@krawel.de> -" Summary: Vim plugin for transparent editing of gpg encrypted files. -" Licence: This program is free software; you can redistribute it and/or -" modify it under the terms of the GNU General Public License. -" See http://www.gnu.org/copyleft/gpl.txt -" -" Section: Documentation {{{1 -" -" Description: {{{2 -" -" This script implements transparent editing of gpg encrypted files. The -" filename must have a ".gpg", ".pgp" or ".asc" suffix. When opening such -" a file the content is decrypted, when opening a new file the script will -" ask for the recipients of the encrypted file. The file content will be -" encrypted to all recipients before it is written. The script turns off -" viminfo and swapfile to increase security. -" -" Installation: {{{2 -" -" Copy the gnupg.vim file to the $HOME/.vim/plugin directory. -" Refer to ':help add-plugin', ':help add-global-plugin' and ':help -" runtimepath' for more details about Vim plugins. -" -" From "man 1 gpg-agent": -" -" ... -" You should always add the following lines to your .bashrc or whatever -" initialization file is used for all shell invocations: -" -" GPG_TTY=`tty` -" export GPG_TTY -" -" It is important that this environment variable always reflects the out‐ -" put of the tty command. For W32 systems this option is not required. -" ... -" -" Most distributions provide software to ease handling of gpg and gpg-agent. -" Examples are keychain or seahorse. -" -" Commands: {{{2 -" -" :GPGEditRecipients -" Opens a scratch buffer to change the list of recipients. Recipients that -" are unknown (not in your public key) are highlighted and have -" a prepended "!". Closing the buffer makes the changes permanent. -" -" :GPGViewRecipients -" Prints the list of recipients. -" -" :GPGEditOptions -" Opens a scratch buffer to change the options for encryption (symmetric, -" asymmetric, signing). Closing the buffer makes the changes permanent. -" WARNING: There is no check of the entered options, so you need to know -" what you are doing. -" -" :GPGViewOptions -" Prints the list of options. -" -" Variables: {{{2 -" -" g:GPGExecutable -" If set used as gpg executable, otherwise the system chooses what is run -" when "gpg" is called. Defaults to "gpg". -" -" g:GPGUseAgent -" If set to 0 a possible available gpg-agent won't be used. Defaults to 1. -" -" g:GPGPreferSymmetric -" If set to 1 symmetric encryption is preferred for new files. Defaults to 0. -" -" g:GPGPreferArmor -" If set to 1 armored data is preferred for new files. Defaults to 0. -" -" g:GPGPreferSign -" If set to 1 signed data is preferred for new files. Defaults to 0. -" -" g:GPGDefaultRecipients -" If set, these recipients are used as defaults when no other recipient is -" defined. This variable is a Vim list. Default is unset. -" -" Known Issues: {{{2 -" -" In some cases gvim can't decryt files - -" This is caused by the fact that a running gvim has no TTY and thus gpg is -" not able to ask for the passphrase by itself. This is a problem for Windows -" and Linux versions of gvim and could not be solved unless a "terminal -" emulation" is implemented for gvim. To circumvent this you have to use any -" combination of gpg-agent and a graphical pinentry program: -" -" - gpg-agent only: -" you need to provide the passphrase for the needed key to gpg-agent -" in a terminal before you open files with gvim which require this key. -" -" - pinentry only: -" you will get a popup window every time you open a file that needs to -" be decrypted. -" -" - gpgagent and pinentry: -" you will get a popup window the first time you open a file that -" needs to be decrypted. -" -" Credits: {{{2 -" -" - Mathieu Clabaut for inspirations through his vimspell.vim script. -" - Richard Bronosky for patch to enable ".pgp" suffix. -" - Erik Remmelzwaal for patch to enable windows support and patient beta -" testing. -" - Lars Becker for patch to make gpg2 working. -" - Thomas Arendsen Hein for patch to convert encoding of gpg output -" - Karl-Heinz Ruskowski for patch to fix unknown recipients and trust model -" and patient beta testing. -" - Giel van Schijndel for patch to get GPG_TTY dynamically. -" - Sebastian Luettich for patch to fix issue with symmetric encryption an set -" recipients. -" - Tim Swast for patch to generate signed files -" -" Section: Plugin header {{{1 - -" guard against multiple loads {{{2 -if (exists("g:loaded_gnupg") || &cp || exists("#BufReadPre#*.\(gpg\|asc\|pgp\)")) - finish -endif -let g:loaded_gnupg = "$Revision: 3026 $" - -" check for correct vim version {{{2 -if (v:version < 700) - echohl ErrorMsg | echo 'plugin gnupg.vim requires Vim version >= 7.0' | echohl None - finish -endif - -" Section: Autocmd setup {{{1 - -augroup GnuPG - autocmd! - - " initialize the internal variables - autocmd BufNewFile,BufReadPre,FileReadPre *.\(gpg\|asc\|pgp\) call s:GPGInit() - " force the user to edit the recipient list if he opens a new file and public - " keys are preferred - autocmd BufNewFile *.\(gpg\|asc\|pgp\) if (exists("g:GPGPreferSymmetric") && g:GPGPreferSymmetric == 0) | call s:GPGEditRecipients() | endif - " do the decryption - autocmd BufReadPost,FileReadPost *.\(gpg\|asc\|pgp\) call s:GPGDecrypt() - - " convert all text to encrypted text before writing - autocmd BufWritePre,FileWritePre *.\(gpg\|asc\|pgp\) call s:GPGEncrypt() - " undo the encryption so we are back in the normal text, directly - " after the file has been written. - autocmd BufWritePost,FileWritePost *.\(gpg\|asc\|pgp\) call s:GPGEncryptPost() - - " cleanup on leaving vim - autocmd VimLeave *.\(gpg\|asc\|pgp\) call s:GPGCleanup() -augroup END - -" Section: Constants {{{1 - -let s:GPGMagicString = "\t \t" - -" Section: Highlight setup {{{1 - -highlight default link GPGWarning WarningMsg -highlight default link GPGError ErrorMsg -highlight default link GPGHighlightUnknownRecipient ErrorMsg - -" Section: Functions {{{1 - -" Function: s:GPGInit() {{{2 -" -" initialize the plugin -" -function s:GPGInit() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGInit()") - - " first make sure nothing is written to ~/.viminfo while editing - " an encrypted file. - set viminfo= - - " we don't want a swap file, as it writes unencrypted data to disk - set noswapfile - - " check what gpg command to use - if (!exists("g:GPGExecutable")) - let g:GPGExecutable = "gpg --trust-model always" - endif - - " check if gpg-agent is allowed - if (!exists("g:GPGUseAgent")) - let g:GPGUseAgent = 1 - endif - - " check if symmetric encryption is preferred - if (!exists("g:GPGPreferSymmetric")) - let g:GPGPreferSymmetric = 0 - endif - - " check if armored files are preferred - if (!exists("g:GPGPreferArmor")) - let g:GPGPreferArmor = 0 - endif - - " check if signed files are preferred - if (!exists("g:GPGPreferSign")) - let g:GPGPreferSign = 0 - endif - - " start with empty default recipients if none is defined so far - if (!exists("g:GPGDefaultRecipients")) - let g:GPGDefaultRecipients = [] - endif - - " print version - call s:GPGDebug(1, "gnupg.vim ". g:loaded_gnupg) - - " determine if gnupg can use the gpg-agent - if (exists("$GPG_AGENT_INFO") && g:GPGUseAgent == 1) - if (!exists("$GPG_TTY") && !has("gui_running")) - let $GPG_TTY = system("tty") - if (v:shell_error) - let $GPG_TTY = "" - echohl GPGError - echom "The GPG_TTY is not set and no TTY could be found using the `tty` command!" - echom "gpg-agent might not work." - echohl None - endif - endif - let s:GPGCommand = g:GPGExecutable . " --use-agent" - else - let s:GPGCommand = g:GPGExecutable . " --no-use-agent" - endif - - " don't use tty in gvim - " FIXME find a better way to avoid an error. - " with this solution only --use-agent will work - if (has("gui_running")) - let s:GPGCommand = s:GPGCommand . " --no-tty" - endif - - " setup shell environment for unix and windows - let s:shellredirsave = &shellredir - let s:shellsave = &shell - if (has("unix")) - " unix specific settings - let s:shellredir = ">%s 2>&1" - let s:shell = '/bin/sh' - let s:stderrredirnull = '2>/dev/null' - let s:GPGCommand = "LANG=C LC_ALL=C " . s:GPGCommand - else - " windows specific settings - let s:shellredir = '>%s' - let s:shell = &shell - let s:stderrredirnull = '2>nul' - endif - - call s:GPGDebug(3, "shellredirsave: " . s:shellredirsave) - call s:GPGDebug(3, "shellsave: " . s:shellsave) - - call s:GPGDebug(3, "shell: " . s:shell) - call s:GPGDebug(3, "shellcmdflag: " . &shellcmdflag) - call s:GPGDebug(3, "shellxquote: " . &shellxquote) - call s:GPGDebug(3, "shellredir: " . s:shellredir) - call s:GPGDebug(3, "stderrredirnull: " . s:stderrredirnull) - - call s:GPGDebug(3, "shell implementation: " . resolve(s:shell)) - - " find the supported algorithms - let commandline = s:GPGCommand . " --version" - call s:GPGDebug(2, "command: ". commandline) - let &shellredir = s:shellredir - let &shell = s:shell - let output = system(commandline) - let &shellredir = s:shellredirsave - let &shell = s:shellsave - call s:GPGDebug(2, "output: ". output) - - let s:GPGPubkey = substitute(output, ".*Pubkey: \\(.\\{-}\\)\n.*", "\\1", "") - let s:GPGCipher = substitute(output, ".*Cipher: \\(.\\{-}\\)\n.*", "\\1", "") - let s:GPGHash = substitute(output, ".*Hash: \\(.\\{-}\\)\n.*", "\\1", "") - let s:GPGCompress = substitute(output, ".*Compress.\\{-}: \\(.\\{-}\\)\n.*", "\\1", "") - - call s:GPGDebug(2, "public key algorithms: " . s:GPGPubkey) - call s:GPGDebug(2, "cipher algorithms: " . s:GPGCipher) - call s:GPGDebug(2, "hashing algorithms: " . s:GPGHash) - call s:GPGDebug(2, "compression algorithms: " . s:GPGCompress) - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGInit()") -endfunction - -" Function: s:GPGCleanup() {{{2 -" -" cleanup on leaving vim -" -function s:GPGCleanup() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGCleanup()") - - " wipe out screen - new +only - redraw! - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGCleanup()") -endfunction - -" Function: s:GPGDecrypt() {{{2 -" -" decrypt the buffer and find all recipients of the encrypted file -" -function s:GPGDecrypt() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGDecrypt()") - - " switch to binary mode to read the encrypted file - set bin - - " get the filename of the current buffer - let filename = escape(expand("%:p"), '\"') - - " clear GPGEncrypted, GPGRecipients and GPGOptions - let b:GPGEncrypted = 0 - let b:GPGRecipients = [] - let b:GPGOptions = [] - - " find the recipients of the file - let commandline = s:GPGCommand . " --verbose --decrypt --list-only --dry-run --batch --no-use-agent --logger-fd 1 \"" . filename . "\"" - call s:GPGDebug(3, "command: " . commandline) - let &shellredir = s:shellredir - let &shell = s:shell - let output = system(commandline) - let &shellredir = s:shellredirsave - let &shell = s:shellsave - call s:GPGDebug(3, "output: ". output) - - " check if the file is symmetric/asymmetric encrypted - if (match(output, "gpg: encrypted with [[:digit:]]\\+ passphrase") >= 0) - " file is symmetric encrypted - let b:GPGEncrypted = 1 - call s:GPGDebug(1, "this file is symmetric encrypted") - - let b:GPGOptions += ["symmetric"] - - " find the used cipher algorithm - let cipher = substitute(output, ".*gpg: \\([^ ]\\+\\) encrypted data.*", "\\1", "") - if (match(s:GPGCipher, "\\<" . cipher . "\\>") >= 0) - let b:GPGOptions += ["cipher-algo " . cipher] - call s:GPGDebug(1, "cipher-algo is " . cipher) - else - echohl GPGWarning - echom "The cipher " . cipher . " is not known by the local gpg command. Using default!" - echo - echohl None - endif - elseif (match(output, "gpg: public key is [[:xdigit:]]\\{8}") >= 0) - " file is asymmetric encrypted - let b:GPGEncrypted = 1 - call s:GPGDebug(1, "this file is asymmetric encrypted") - - let b:GPGOptions += ["encrypt"] - - " find the used public keys - let start = match(output, "gpg: public key is [[:xdigit:]]\\{8}") - while (start >= 0) - let start = start + strlen("gpg: public key is ") - let recipient = strpart(output, start, 8) - call s:GPGDebug(1, "recipient is " . recipient) - let name = s:GPGNameToID(recipient) - if (strlen(name) > 0) - let b:GPGRecipients += [name] - call s:GPGDebug(1, "name of recipient is " . name) - else - let b:GPGRecipients += [recipient] - echohl GPGWarning - echom "The recipient \"" . recipient . "\" is not in your public keyring!" - echohl None - end - let start = match(output, "gpg: public key is [[:xdigit:]]\\{8}", start) - endwhile - else - " file is not encrypted - let b:GPGEncrypted = 0 - call s:GPGDebug(1, "this file is not encrypted") - echohl GPGWarning - echom "File is not encrypted, all GPG functions disabled!" - echohl None - set nobin - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGDecrypt()") - return - endif - - " check if the message is armored - if (match(output, "gpg: armor header") >= 0) - call s:GPGDebug(1, "this file is armored") - let b:GPGOptions += ["armor"] - endif - - " finally decrypt the buffer content - " since even with the --quiet option passphrase typos will be reported, - " we must redirect stderr (using shell temporarily) - call s:GPGDebug(1, "decrypting file") - let commandline = "'[,']!" . s:GPGCommand . " --quiet --decrypt " . s:stderrredirnull - call s:GPGDebug(1, "command: " . commandline) - let &shellredir = s:shellredir - let &shell = s:shell - execute commandline - let &shellredir = s:shellredirsave - let &shell = s:shellsave - if (v:shell_error) " message could not be decrypted - silent u - echohl GPGError - let blackhole = input("Message could not be decrypted! (Press ENTER)") - echohl None - bwipeout - set nobin - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGDecrypt()") - return - endif - - " turn off binary mode - set nobin - - " call the autocommand for the file minus .gpg$ - execute ":doautocmd BufReadPost " . escape(expand("%:r"), ' *?\"'."'") - call s:GPGDebug(2, "called autocommand for " . escape(expand("%:r"), ' *?\"'."'")) - - " refresh screen - redraw! - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGDecrypt()") -endfunction - -" Function: s:GPGEncrypt() {{{2 -" -" encrypts the buffer to all previous recipients -" -function s:GPGEncrypt() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGEncrypt()") - - " save window view - let s:GPGWindowView = winsaveview() - call s:GPGDebug(2, "saved window view " . string(s:GPGWindowView)) - - " store encoding and switch to a safe one - if (&fileencoding != &encoding) - let s:GPGEncoding = &encoding - let &encoding = &fileencoding - call s:GPGDebug(2, "encoding was \"" . s:GPGEncoding . "\", switched to \"" . &encoding . "\"") - else - let s:GPGEncoding = "" - call s:GPGDebug(2, "encoding and fileencoding are the same (\"" . &encoding . "\"), not switching") - endif - - " switch buffer to binary mode - set bin - - " guard for unencrypted files - if (!exists("b:GPGEncrypted") || b:GPGEncrypted == 0) - echohl GPGError - let blackhole = input("Message could not be encrypted! File might be empty! (Press ENTER)") - echohl None - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGEncrypt()") - return - endif - - " initialize GPGOptions if not happened before - if (!exists("b:GPGOptions") || len(b:GPGOptions) == 0) - let b:GPGOptions = [] - if (exists("g:GPGPreferSymmetric") && g:GPGPreferSymmetric == 1) - let b:GPGOptions += ["symmetric"] - let b:GPGRecipients = [] - else - let b:GPGOptions += ["encrypt"] - endif - if (exists("g:GPGPreferArmor") && g:GPGPreferArmor == 1) - let b:GPGOptions += ["armor"] - endif - if (exists("g:GPGPreferSign") && g:GPGPreferSign == 1) - let b:GPGOptions += ["sign"] - endif - call s:GPGDebug(1, "no options set, so using default options: " . string(b:GPGOptions)) - endif - - " built list of options - let options = "" - for option in b:GPGOptions - let options = options . " --" . option . " " - endfor - - " check here again if all recipients are available in the keyring - let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(b:GPGRecipients) - - " check if there are unknown recipients and warn - if (len(unknownrecipients) > 0) - echohl GPGWarning - echom "Please use GPGEditRecipients to correct!!" - echo - echohl None - - " Let user know whats happend and copy known_recipients back to buffer - let dummy = input("Press ENTER to quit") - endif - - " built list of recipients - if (len(recipients) > 0) - for gpgid in recipients - let options = options . " -r " . gpgid - endfor - else - if (match(b:GPGOptions, "encrypt") >= 0) - echohl GPGError - echom "There are no recipients!!" - echom "Please use GPGEditRecipients to correct!!" - echo - echohl None - endif - endif - - " encrypt the buffer - let commandline = "'[,']!" . s:GPGCommand . " --quiet --no-encrypt-to " . options . " " . s:stderrredirnull - call s:GPGDebug(1, "command: " . commandline) - let &shellredir = s:shellredir - let &shell = s:shell - silent execute commandline - let &shellredir = s:shellredirsave - let &shell = s:shellsave - if (v:shell_error) " message could not be encrypted - " delete content of the buffer to be sure no data is written unencrypted - " content will be recovered in GPGEncryptPost() - silent normal! 1GdG - - echohl GPGError - let blackhole = input("Message could not be encrypted! File might be empty! (Press ENTER)") - echohl None - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGEncrypt()") - return - endif - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGEncrypt()") -endfunction - -" Function: s:GPGEncryptPost() {{{2 -" -" undo changes don by encrypt, after writing -" -function s:GPGEncryptPost() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGEncryptPost()") - - " guard for unencrypted files - if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0) - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGEncryptPost()") - return - endif - - " undo encryption of buffer content - silent u - - " switch back from binary mode - set nobin - - " restore encoding - if (s:GPGEncoding != "") - let &encoding = s:GPGEncoding - call s:GPGDebug(2, "restored encoding \"" . &encoding . "\"") - endif - - " restore window view - call winrestview(s:GPGWindowView) - call s:GPGDebug(2, "restored window view" . string(s:GPGWindowView)) - - " refresh screen - redraw! - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGEncryptPost()") -endfunction - -" Function: s:GPGViewRecipients() {{{2 -" -" echo the recipients -" -function s:GPGViewRecipients() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGViewRecipients()") - - " guard for unencrypted files - if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0) - echohl GPGWarning - echom "File is not encrypted, all GPG functions disabled!" - echohl None - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGViewRecipients()") - return - endif - - let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(b:GPGRecipients) - - echo 'This file has following recipients (Unknown recipients have a prepended "!"):' - " echo the recipients - for name in recipients - let name = s:GPGIDToName(name) - echo name - endfor - - " echo the unknown recipients - echohl GPGWarning - for name in unknownrecipients - let name = "!" . name - echo name - endfor - echohl None - - " check if there is any known recipient - if (len(recipients) == 0) - echohl GPGError - echom 'There are no known recipients!' - echohl None - endif - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGViewRecipients()") -endfunction - -" Function: s:GPGEditRecipients() {{{2 -" -" create a scratch buffer with all recipients to add/remove recipients -" -function s:GPGEditRecipients() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGEditRecipients()") - - " guard for unencrypted files - if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0) - echohl GPGWarning - echom "File is not encrypted, all GPG functions disabled!" - echohl None - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGEditRecipients()") - return - endif - - " only do this if it isn't already a GPGRecipients_* buffer - if (match(bufname("%"), "^\\(GPGRecipients_\\|GPGOptions_\\)") != 0 && match(bufname("%"), "\.\\(gpg\\|asc\\|pgp\\)$") >= 0) - - " save buffer name - let buffername = bufname("%") - let editbuffername = "GPGRecipients_" . buffername - - " check if this buffer exists - if (!bufexists(editbuffername)) - " create scratch buffer - execute 'silent! split ' . escape(editbuffername, ' *?\"'."'") - - " add a autocommand to regenerate the recipients after a write - autocmd BufHidden,BufUnload,BufWriteCmd <buffer> call s:GPGFinishRecipientsBuffer() - else - if (bufwinnr(editbuffername) >= 0) - " switch to scratch buffer window - execute 'silent! ' . bufwinnr(editbuffername) . "wincmd w" - else - " split scratch buffer window - execute 'silent! sbuffer ' . escape(editbuffername, ' *?\"'."'") - - " add a autocommand to regenerate the recipients after a write - autocmd BufHidden,BufUnload,BufWriteCmd <buffer> call s:GPGFinishRecipientsBuffer() - endif - - " empty the buffer - silent normal! 1GdG - endif - - " Mark the buffer as a scratch buffer - setlocal buftype=acwrite - setlocal bufhidden=hide - setlocal noswapfile - setlocal nowrap - setlocal nobuflisted - setlocal nonumber - - " so we know for which other buffer this edit buffer is - let b:GPGCorrespondingTo = buffername - - " put some comments to the scratch buffer - silent put ='GPG: ----------------------------------------------------------------------' - silent put ='GPG: Please edit the list of recipients, one recipient per line.' - silent put ='GPG: Unknown recipients have a prepended \"!\".' - silent put ='GPG: Lines beginning with \"GPG:\" are removed automatically.' - silent put ='GPG: Data after recipients between and including \"(\" and \")\" is ignored.' - silent put ='GPG: Closing this buffer commits changes.' - silent put ='GPG: ----------------------------------------------------------------------' - - " get the recipients - let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(getbufvar(b:GPGCorrespondingTo, "GPGRecipients")) - - " if there are no known or unknown recipients, use the default ones - if (len(recipients) == 0 && len(unknownrecipients) == 0) - if (type(g:GPGDefaultRecipients) == type([])) - let [ recipients, unknownrecipients ] = s:GPGCheckRecipients(g:GPGDefaultRecipients) - else - echohl GPGWarning - echom "g:GPGDefaultRecipients is not a Vim list, please correct this in your vimrc!" - echohl None - endif - endif - - " put the recipients in the scratch buffer - for name in recipients - let name = s:GPGIDToName(name) - silent put =name - endfor - - " put the unknown recipients in the scratch buffer - let syntaxPattern = "\\(nonexxistinwordinthisbuffer" - for name in unknownrecipients - let name = "!" . name - let syntaxPattern = syntaxPattern . "\\|" . name - silent put =name - endfor - let syntaxPattern = syntaxPattern . "\\)" - - " define highlight - if (has("syntax") && exists("g:syntax_on")) - execute 'syntax match GPGUnknownRecipient "' . syntaxPattern . '"' - highlight clear GPGUnknownRecipient - highlight link GPGUnknownRecipient GPGHighlightUnknownRecipient - - syntax match GPGComment "^GPG:.*$" - execute 'syntax match GPGComment "' . s:GPGMagicString . '.*$"' - highlight clear GPGComment - highlight link GPGComment Comment - endif - - " delete the empty first line - silent normal! 1Gdd - - " jump to the first recipient - silent normal! G - - endif - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGEditRecipients()") -endfunction - -" Function: s:GPGFinishRecipientsBuffer() {{{2 -" -" create a new recipient list from RecipientsBuffer -" -function s:GPGFinishRecipientsBuffer() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGFinishRecipientsBuffer()") - - " guard for unencrypted files - if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0) - echohl GPGWarning - echom "File is not encrypted, all GPG functions disabled!" - echohl None - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGFinishRecipientsBuffer()") - return - endif - - " go to buffer before doing work - if (bufnr("%") != expand("<abuf>")) - " switch to scratch buffer window - execute 'silent! ' . bufwinnr(expand("<afile>")) . "wincmd w" - endif - - " delete the autocommand - autocmd! * <buffer> - - - " get the recipients from the scratch buffer - let recipients = [] - let lines = getline(1,"$") - for recipient in lines - " delete all text after magic string - let recipient = substitute(recipient, s:GPGMagicString . ".*$", "", "") - - " delete all spaces at beginning and end of the recipient - " also delete a '!' at the beginning of the recipient - let recipient = substitute(recipient, "^[[:space:]!]*\\(.\\{-}\\)[[:space:]]*$", "\\1", "") - - " delete comment lines - let recipient = substitute(recipient, "^GPG:.*$", "", "") - - " only do this if the line is not empty - if (strlen(recipient) > 0) - let gpgid = s:GPGNameToID(recipient) - if (strlen(gpgid) > 0) - if (match(recipients, gpgid) < 0) - let recipients += [gpgid] - endif - else - if (match(recipients, recipient) < 0) - let recipients += [recipient] - echohl GPGWarning - echom "The recipient \"" . recipient . "\" is not in your public keyring!" - echohl None - endif - endif - endif - endfor - - " write back the new recipient list to the corresponding buffer and mark it - " as modified. Buffer is now for sure a encrypted buffer. - call setbufvar(b:GPGCorrespondingTo, "GPGRecipients", recipients) - call setbufvar(b:GPGCorrespondingTo, "&mod", 1) - call setbufvar(b:GPGCorrespondingTo, "GPGEncrypted", 1) - - " check if there is any known recipient - if (len(recipients) == 0) - echohl GPGError - echom 'There are no known recipients!' - echohl None - endif - - " reset modified flag - set nomodified - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGFinishRecipientsBuffer()") -endfunction - -" Function: s:GPGViewOptions() {{{2 -" -" echo the recipients -" -function s:GPGViewOptions() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGViewOptions()") - - " guard for unencrypted files - if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0) - echohl GPGWarning - echom "File is not encrypted, all GPG functions disabled!" - echohl None - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGViewOptions()") - return - endif - - if (exists("b:GPGOptions")) - echo 'This file has following options:' - " echo the options - for option in b:GPGOptions - echo option - endfor - endif - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGViewOptions()") -endfunction - -" Function: s:GPGEditOptions() {{{2 -" -" create a scratch buffer with all recipients to add/remove recipients -" -function s:GPGEditOptions() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGEditOptions()") - - " guard for unencrypted files - if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0) - echohl GPGWarning - echom "File is not encrypted, all GPG functions disabled!" - echohl None - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGEditOptions()") - return - endif - - " only do this if it isn't already a GPGOptions_* buffer - if (match(bufname("%"), "^\\(GPGRecipients_\\|GPGOptions_\\)") != 0 && match(bufname("%"), "\.\\(gpg\\|asc\\|pgp\\)$") >= 0) - - " save buffer name - let buffername = bufname("%") - let editbuffername = "GPGOptions_" . buffername - - " check if this buffer exists - if (!bufexists(editbuffername)) - " create scratch buffer - execute 'silent! split ' . escape(editbuffername, ' *?\"'."'") - - " add a autocommand to regenerate the options after a write - autocmd BufHidden,BufUnload,BufWriteCmd <buffer> call s:GPGFinishOptionsBuffer() - else - if (bufwinnr(editbuffername) >= 0) - " switch to scratch buffer window - execute 'silent! ' . bufwinnr(editbuffername) . "wincmd w" - else - " split scratch buffer window - execute 'silent! sbuffer ' . escape(editbuffername, ' *?\"'."'") - - " add a autocommand to regenerate the options after a write - autocmd BufHidden,BufUnload,BufWriteCmd <buffer> call s:GPGFinishOptionsBuffer() - endif - - " empty the buffer - silent normal! 1GdG - endif - - " Mark the buffer as a scratch buffer - setlocal buftype=nofile - setlocal noswapfile - setlocal nowrap - setlocal nobuflisted - setlocal nonumber - - " so we know for which other buffer this edit buffer is - let b:GPGCorrespondingTo = buffername - - " put some comments to the scratch buffer - silent put ='GPG: ----------------------------------------------------------------------' - silent put ='GPG: THERE IS NO CHECK OF THE ENTERED OPTIONS!' - silent put ='GPG: YOU NEED TO KNOW WHAT YOU ARE DOING!' - silent put ='GPG: IF IN DOUBT, QUICKLY EXIT USING :x OR :bd.' - silent put ='GPG: Please edit the list of options, one option per line.' - silent put ='GPG: Please refer to the gpg documentation for valid options.' - silent put ='GPG: Lines beginning with \"GPG:\" are removed automatically.' - silent put ='GPG: Closing this buffer commits changes.' - silent put ='GPG: ----------------------------------------------------------------------' - - " put the options in the scratch buffer - let options = getbufvar(b:GPGCorrespondingTo, "GPGOptions") - - for option in options - silent put =option - endfor - - " delete the empty first line - silent normal! 1Gdd - - " jump to the first option - silent normal! G - - " define highlight - if (has("syntax") && exists("g:syntax_on")) - syntax match GPGComment "^GPG:.*$" - highlight clear GPGComment - highlight link GPGComment Comment - endif - endif - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGEditOptions()") -endfunction - -" Function: s:GPGFinishOptionsBuffer() {{{2 -" -" create a new option list from OptionsBuffer -" -function s:GPGFinishOptionsBuffer() - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGFinishOptionsBuffer()") - - " guard for unencrypted files - if (exists("b:GPGEncrypted") && b:GPGEncrypted == 0) - echohl GPGWarning - echom "File is not encrypted, all GPG functions disabled!" - echohl None - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGFinishOptionsBuffer()") - return - endif - - " go to buffer before doing work - if (bufnr("%") != expand("<abuf>")) - " switch to scratch buffer window - execute 'silent! ' . bufwinnr(expand("<afile>")) . "wincmd w" - endif - - " clear options and unknownOptions - let options = [] - let unknownOptions = [] - - " delete the autocommand - autocmd! * <buffer> - - " get the options from the scratch buffer - let lines = getline(1, "$") - for option in lines - " delete all spaces at beginning and end of the option - " also delete a '!' at the beginning of the option - let option = substitute(option, "^[[:space:]!]*\\(.\\{-}\\)[[:space:]]*$", "\\1", "") - " delete comment lines - let option = substitute(option, "^GPG:.*$", "", "") - - " only do this if the line is not empty - if (strlen(option) > 0 && match(options, option) < 0) - let options += [option] - endif - endfor - - " write back the new option list to the corresponding buffer and mark it - " as modified - call setbufvar(b:GPGCorrespondingTo, "GPGOptions", options) - call setbufvar(b:GPGCorrespondingTo, "&mod", 1) - - " reset modified flag - set nomodified - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGFinishOptionsBuffer()") -endfunction - -" Function: s:GPGCheckRecipients(tocheck) {{{2 -" -" check if recipients are known -" Returns: two lists recipients and unknownrecipients -" -function s:GPGCheckRecipients(tocheck) - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGCheckRecipients()") - - let recipients = [] - let unknownrecipients = [] - - if (type(a:tocheck) == type([])) - for recipient in a:tocheck - let gpgid = s:GPGNameToID(recipient) - if (strlen(gpgid) > 0) - if (match(recipients, gpgid) < 0) - let recipients += [gpgid] - endif - else - if (match(unknownrecipients, recipient) < 0) - let unknownrecipients += [recipient] - echohl GPGWarning - echom "The recipient \"" . recipient . "\" is not in your public keyring!" - echohl None - endif - end - endfor - endif - - call s:GPGDebug(2, "recipients are: " . string(recipients)) - call s:GPGDebug(2, "unknown recipients are: " . string(unknownrecipients)) - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGCheckRecipients()") - return [ recipients, unknownrecipients ] -endfunction - -" Function: s:GPGNameToID(name) {{{2 -" -" find GPG key ID corresponding to a name -" Returns: ID for the given name -" -function s:GPGNameToID(name) - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGNameToID()") - - " ask gpg for the id for a name - let commandline = s:GPGCommand . " --quiet --with-colons --fixed-list-mode --list-keys \"" . a:name . "\"" - call s:GPGDebug(2, "command: ". commandline) - let &shellredir = s:shellredir - let &shell = s:shell - let output = system(commandline) - let &shellredir = s:shellredirsave - let &shell = s:shellsave - call s:GPGDebug(2, "output: ". output) - - " when called with "--with-colons" gpg encodes its output _ALWAYS_ as UTF-8, - " so convert it, if necessary - if (&encoding != "utf-8") - let output = iconv(output, "utf-8", &encoding) - endif - let lines = split(output, "\n") - - " parse the output of gpg - let pubseen = 0 - let counter = 0 - let gpgids = [] - let choices = "The name \"" . a:name . "\" is ambiguous. Please select the correct key:\n" - for line in lines - let fields = split(line, ":") - " search for the next uid - if (pubseen == 1) - if (fields[0] == "uid") - let choices = choices . " " . fields[9] . "\n" - else - let pubseen = 0 - endif - endif - - " search for the next pub - if (pubseen == 0) - if (fields[0] == "pub") - let identity = fields[4] - let gpgids += [identity] - if exists("*strftime") - let choices = choices . counter . ": ID: 0x" . identity . " created at " . strftime("%c", fields[5]) . "\n" - else - let choices = choices . counter . ": ID: 0x" . identity . "\n" - endif - let counter = counter+1 - let pubseen = 1 - endif - endif - - endfor - - " counter > 1 means we have more than one results - let answer = 0 - if (counter > 1) - let choices = choices . "Enter number: " - let answer = input(choices, "0") - while (answer == "") - let answer = input("Enter number: ", "0") - endwhile - endif - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGIDToName()") - return get(gpgids, answer, "") -endfunction - -" Function: s:GPGIDToName(identity) {{{2 -" -" find name corresponding to a GPG key ID -" Returns: Name for the given ID -" -function s:GPGIDToName(identity) - call s:GPGDebug(3, ">>>>>>>> Entering s:GPGIDToName()") - - " TODO is the encryption subkey really unique? - - " ask gpg for the id for a name - let commandline = s:GPGCommand . " --quiet --with-colons --fixed-list-mode --list-keys " . a:identity - call s:GPGDebug(2, "command: ". commandline) - let &shellredir = s:shellredir - let &shell = s:shell - let output = system(commandline) - let &shellredir = s:shellredirsave - let &shell = s:shellsave - call s:GPGDebug(2, "output: ". output) - - " when called with "--with-colons" gpg encodes its output _ALWAYS_ as UTF-8, - " so convert it, if necessary - if (&encoding != "utf-8") - let output = iconv(output, "utf-8", &encoding) - endif - let lines = split(output, "\n") - - " parse the output of gpg - let pubseen = 0 - let uid = "" - for line in lines - let fields = split(line, ":") - if (pubseen == 0) " search for the next pub - if (fields[0] == "pub") - let pubseen = 1 - endif - else " search for the next uid - if (fields[0] == "uid") - let pubseen = 0 - if exists("*strftime") - let uid = fields[9] . s:GPGMagicString . "(ID: 0x" . a:identity . " created at " . strftime("%c", fields[5]) . ")" - else - let uid = fields[9] . s:GPGMagicString . "(ID: 0x" . a:identity . ")" - endif - break - endif - endif - endfor - - call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGIDToName()") - return uid -endfunction - -" Function: s:GPGDebug(level, text) {{{2 -" -" output debug message, if this message has high enough importance -" only define function if GPGDebugLevel set at all -" -function s:GPGDebug(level, text) - if exists("g:GPGDebugLevel") && g:GPGDebugLevel >= a:level - if exists("g:GPGDebugLog") - execute "redir >> " . g:GPGDebugLog - echom "GnuPG: " . a:text - redir END - else - echom "GnuPG: " . a:text - endif - endif -endfunction - -" Section: Commands {{{1 - -command! GPGViewRecipients call s:GPGViewRecipients() -command! GPGEditRecipients call s:GPGEditRecipients() -command! GPGViewOptions call s:GPGViewOptions() -command! GPGEditOptions call s:GPGEditOptions() - -" Section: Menu {{{1 - -if (has("menu")) - amenu <silent> Plugin.GnuPG.View\ Recipients :GPGViewRecipients<CR> - amenu <silent> Plugin.GnuPG.Edit\ Recipients :GPGEditRecipients<CR> - amenu <silent> Plugin.GnuPG.View\ Options :GPGViewOptions<CR> - amenu <silent> Plugin.GnuPG.Edit\ Options :GPGEditOptions<CR> -endif - -" vim600: set foldmethod=marker foldlevel=0 : diff --git a/vim-nerdtree/PKGBUILD b/vim-nerdtree/PKGBUILD deleted file mode 100644 index 80bb044..0000000 --- a/vim-nerdtree/PKGBUILD +++ /dev/null @@ -1,26 +0,0 @@ -# Maintainer: Laszlo Papp <djszapi @ gmail at com> -pkgname=vim-nerdtree -pkgver=4.1.0 -_scriptid=11834 -pkgrel=4 -pkgdesc="A tree explorer plugin for navigating the filesystem" -arch=('i686' 'x86_64') -url="http://www.vim.org/scripts/script.php?script_id=1658" -license=('custom') -depends=(vim) -groups=('vim-plugins') -install=vimdoc.install -source=(${pkgname}.zip::http://www.vim.org/scripts/download_script.php?src_id=${_scriptid} - license.txt) -md5sums=('a15fa66b36c3261e598d93dc830398f6' - 'efbd5986e691ce8c876fb86e8f5961ea') - -build() { - install -d ${pkgdir}/usr/share/vim/vimfiles/{doc,nerdtree_plugin,plugin} || return 1 - install -Dm755 ${srcdir}/doc/* ${pkgdir}/usr/share/vim/vimfiles/doc/ || return 1 - install -Dm755 ${srcdir}/nerdtree_plugin/* \ - ${pkgdir}/usr/share/vim/vimfiles/nerdtree_plugin/ || return 1 - install -Dm755 ${srcdir}/plugin/* ${pkgdir}/usr/share/vim/vimfiles/plugin/ || return 1 - install -Dm755 ${srcdir}/license.txt ${pkgdir}/usr/share/licenses/${pkgname}/license.txt || return 1 -} - diff --git a/vim-nerdtree/license.txt b/vim-nerdtree/license.txt deleted file mode 100644 index 226f27b..0000000 --- a/vim-nerdtree/license.txt +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (C) 2002-2007 Yegappan Lakshmanan -Permission is hereby granted to use and distribute this code, -with or without modifications, provided that this copyright -notice is copied with it. Like anything else that's free, -taglist.vim is provided *as is* and comes with no warranty of any -kind, either expressed or implied. In no event will the copyright -holder be liable for any damamges resulting from the use of this -software. diff --git a/vim-nerdtree/vimdoc.install b/vim-nerdtree/vimdoc.install deleted file mode 100644 index 220693c..0000000 --- a/vim-nerdtree/vimdoc.install +++ /dev/null @@ -1,19 +0,0 @@ -post_install() { - echo -n "Updating vim help tags..." - /usr/bin/vim --noplugins -u NONE -U NONE \ - --cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1 - echo "done." -} - -post_upgrade() { - post_install $1 -} - -post_remove() { - post_install -} - -op=$1 -shift - -$op $* diff --git a/virtualenv/PKGBUILD b/virtualenv/PKGBUILD deleted file mode 100644 index a3744d3..0000000 --- a/virtualenv/PKGBUILD +++ /dev/null @@ -1,20 +0,0 @@ -# Maintainer: Daniele Paolella <dp@mcrservice.it> -pkgname=virtualenv -pkgver=1.4.8 -pkgrel=1 -pkgdesc="Virtual Python Environment builder" -arch=('i686' 'x86_64') -url="http://pypi.python.org/pypi/virtualenv" -license=('MIT') -depends=('python' 'setuptools') -source=("http://pypi.python.org/packages/source/v/virtualenv/virtualenv-$pkgver.tar.gz") -md5sums=('74ded4025a56e538c1c8df6b9825a8b8') - -build() { - cd "$srcdir/virtualenv-$pkgver" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 - install -D -m644 "$srcdir/virtualenv-$pkgver/docs/license.txt" \ - "$pkgdir/usr/share/licenses/virtualenv/license.txt" -} - -# vim:set ts=2 sw=2 et: diff --git a/vnstati/PKGBUILD b/vnstati/PKGBUILD deleted file mode 100644 index 8b65f3b..0000000 --- a/vnstati/PKGBUILD +++ /dev/null @@ -1,24 +0,0 @@ -# Contributor: Florian Pritz <f-p@gmx.at> - -pkgname=vnstati -pkgver=1.10 -pkgrel=1 -pkgdesc="png image output support for vnStat" -arch=('i686' 'x86_64') -url="http://humdi.net/vnstat" -license=('GPL') -depends=('vnstat' 'gd') -source=("http://humdi.net/vnstat/vnstat-$pkgver.tar.gz") - -build() { - cd $srcdir/vnstat-$pkgver - make all || return 1 - install -s -D -m 755 src/vnstati $pkgdir/usr/bin/vnstati; - install -D -m 644 man/vnstati.1 $pkgdir/usr/share/man/man1/vnstati.1 - gzip -f9 $pkgdir/usr/share/man/man1/vnstati.1; -} - -# vim:set ts=2 sw=2 et: - -md5sums=('95421d968689130590348ceb80ff74a8') -sha1sums=('813177fb55296deaf5059bb111885616f4d8a86f') diff --git a/w3watch-git/PKGBUILD b/w3watch-git/PKGBUILD deleted file mode 100644 index dbae2bb..0000000 --- a/w3watch-git/PKGBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# Maintainer: Pierre Schmitz <pierre@archlinux.de> - -pkgname=w3watch-git -pkgver=20100122 -pkgrel=1 -pkgdesc='Watch the web and get notified on updates' -arch=('any') -url='http://git.archlinux.de/w3watch/' -depends=('bash' 'lynx' 'awk' 'diffutils' 'coreutils' 'grep') -license=('GPL') - -_gitroot='http://git.archlinux.de/~pierre/w3watch.git' -_gitname='w3watch' - -build() { - cd ${srcdir} - msg 'Connecting to GIT server....' - - if [ -d $_gitname ] ; then - pushd $_gitname && git pull origin - msg 'The local files are updated.' - popd - else - git clone $_gitroot - fi - - msg 'GIT checkout done or server timeout' - msg 'Starting make...' - install -D -m755 "${_gitname}/w3watch" \ - "${pkgdir}/usr/bin/w3watch" - install -D -m644 "${_gitname}/config.sample" \ - "${pkgdir}/usr/share/doc/w3watch/config.sample" -} diff --git a/warsow/PKGBUILD b/warsow/PKGBUILD deleted file mode 100644 index f295811..0000000 --- a/warsow/PKGBUILD +++ /dev/null @@ -1,83 +0,0 @@ -# Contributor: Slash <demodevil5[at]yahoo[dot]com> -# Contributor: Babets -# Contributor: Vain - -pkgname=warsow -pkgver=0.5 -pkgrel=3 -pkgdesc="Free online multiplayer competitive FPS based on the Qfusion engine." -url="http://www.warsow.net/" -license=('GPL' 'custom:Warsow Content License') -arch=('i686' 'x86_64') -depends=('curl' 'libjpeg' 'libvorbis' 'libxinerama' 'libxxf86dga' 'libxxf86vm' 'sdl') -makedepends=('mesa' 'openal' 'unzip') -source=('warsow.desktop' 'warsow.launcher' 'wsw-server.launcher' 'wswtv-server.launcher' \ -"http://www.derchris.eu/warsow/warsow_${pkgver}_unified.zip" \ -"http://www.derchris.eu/warsow/warsow_${pkgver}_sdk.zip") -md5sums=('f9bf60c80820237f7097c4e50a9582cd' - 'ec00081d81ad9802a8ca42fc2eac5498' - 'f73e10c26197178df71b941b10bf83d7' - 'd7e4a69835bbcf801e58307e9d6b951e' - 'd0cb961256bbc1b93bf240b8bcf8eff5' - 'acd0244435cc63967b0eb3468c21c454') -noextract=("warsow_${pkgver}_unified.zip" "warsow_${pkgver}_sdk.zip") - -build() { - cd $srcdir/ - - # Extract Game Data - unzip -o warsow_${pkgver}_unified.zip -d $srcdir/warsow - - # Extract Game Source Code - unzip -o warsow_${pkgver}_sdk.zip -d $srcdir/warsow-src - - # Create Destination Directories - install -d $pkgdir/opt/warsow/ - - # Move Data to Destination Directory - cp -r $srcdir/warsow/basewsw $pkgdir/opt/warsow - - # Patch Makefile to use correct program to query for system information - sed -i 's:openal-config:pkg-config:g' $srcdir/warsow-src/source/Makefile - - # Patch Sound Code to point to base openal library - sed -i 's:libopenal.so.0:libopenal.so:g' $srcdir/warsow-src/source/snd_openal/snd_main.c - - # Patch AngelScript so it compiles correctly on i686 - if [ "$CARCH" == "i686" ]; then - sed -i 's:CXXFLAGS = \(.*\):CXXFLAGS = -march=i686 \1:' \ - $srcdir/warsow-src/libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc/makefile - fi - - # Compile Warsow - cd $srcdir/warsow-src/source/ - make -j1 || return 1 - - # Move Compiled Data to Destination Directory - cp -r $srcdir/warsow-src/source/release/* \ - $pkgdir/opt/warsow - - # Install Custom License: Warsow Content License - install -D -m 0644 $srcdir/warsow/docs/license.txt \ - $pkgdir/usr/share/licenses/${pkgname}/license.txt - - # Install Client Game Launcher - install -D -m 0755 $srcdir/warsow.launcher \ - $pkgdir/usr/bin/warsow - - # Install Server Game Launcher - install -D -m 0755 $srcdir/wsw-server.launcher \ - $pkgdir/usr/bin/wsw-server - - # Install WSWTV Server Launcher - install -D -m 0755 $srcdir/wswtv-server.launcher \ - $pkgdir/usr/bin/wswtv-server - - # Install Client Desktop Shortcut - install -D -m 0644 $srcdir/warsow.desktop \ - $pkgdir/usr/share/applications/warsow.desktop - - # Install Icon - install -D -m 0644 $srcdir/warsow-src/source/win32/warsow.ico \ - $pkgdir/usr/share/pixmaps/warsow.ico -} diff --git a/warsow/libjpeg.patch b/warsow/libjpeg.patch deleted file mode 100644 index 54803a0..0000000 --- a/warsow/libjpeg.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- warsow-src/source/ref_gl/r_image.c 2009-06-03 21:52:13.000000000 +0200 -+++ warsow-src/source/ref_gl/r_image.c.new 2010-01-31 21:04:41.000000000 +0100 -@@ -924,7 +924,7 @@ - cinfo->src->bytes_in_buffer -= (size_t) num_bytes; - } - --static void jpeg_mem_src( j_decompress_ptr cinfo, qbyte *mem, int len ) -+/*static void jpeg_mem_src( j_decompress_ptr cinfo, qbyte *mem, int len ) - { - cinfo->src = (struct jpeg_source_mgr *) - ( *cinfo->mem->alloc_small )( (j_common_ptr) cinfo, -@@ -938,7 +938,7 @@ - cinfo->src->bytes_in_buffer = len; - cinfo->src->next_input_byte = mem; - } -- -+*/ - /* - ============= - LoadJPG diff --git a/warsow/r_image.c.new b/warsow/r_image.c.new deleted file mode 100644 index 84d6081..0000000 --- a/warsow/r_image.c.new +++ /dev/null @@ -1,2967 +0,0 @@ -/* -Copyright (C) 1997-2001 Id Software, Inc. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "r_local.h" - -#if defined ( __MACOSX__ ) -#include "libjpeg/jpeglib.h" -#else -#include "jpeglib.h" -#endif - -#define MAX_GLIMAGES 4096 -#define IMAGES_HASH_SIZE 64 - -static image_t images[MAX_GLIMAGES]; -image_t *r_lightmapTextures[MAX_GLIMAGES]; -static image_t *images_hash[IMAGES_HASH_SIZE]; -static unsigned int image_cur_hash; -static int r_numImages; - -static int *r_8to24table; - -static mempool_t *r_texturesPool; -static char *r_imagePathBuf, *r_imagePathBuf2; -static size_t r_sizeof_imagePathBuf, r_sizeof_imagePathBuf2; - -#undef ENSUREBUFSIZE -#define ENSUREBUFSIZE(buf,need) \ - if( r_sizeof_ ##buf < need ) \ - { \ - if( r_ ##buf ) \ - Mem_Free( r_ ##buf ); \ - r_sizeof_ ##buf += (((need) & (MAX_QPATH-1))+1) * MAX_QPATH; \ - r_ ##buf = Mem_Alloc( r_texturesPool, r_sizeof_ ##buf ); \ - } - -int gl_filter_min = GL_LINEAR_MIPMAP_NEAREST; -int gl_filter_max = GL_LINEAR; - -int gl_filter_depth = GL_LINEAR; - -int gl_anisotropic_filter = 0; - -void GL_SelectTexture( int tmu ) -{ - if( !glConfig.ext.multitexture ) - return; - if( tmu == glState.currentTMU ) - return; - - glState.currentTMU = tmu; - - if( qglActiveTextureARB ) - { - qglActiveTextureARB( tmu + GL_TEXTURE0_ARB ); - qglClientActiveTextureARB( tmu + GL_TEXTURE0_ARB ); - } - else if( qglSelectTextureSGIS ) - { - qglSelectTextureSGIS( tmu + GL_TEXTURE0_SGIS ); - } -} - -void GL_TexEnv( GLenum mode ) -{ - if( mode != ( GLenum )glState.currentEnvModes[glState.currentTMU] ) - { - qglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, mode ); - glState.currentEnvModes[glState.currentTMU] = ( int )mode; - } -} - -void GL_Bind( int tmu, image_t *tex ) -{ - GL_SelectTexture( tmu ); - - if( r_nobind->integer ) // performance evaluation option - tex = r_notexture; - if( glState.currentTextures[tmu] == tex->texnum ) - return; - - glState.currentTextures[tmu] = tex->texnum; - if( tex->flags & IT_CUBEMAP ) - qglBindTexture( GL_TEXTURE_CUBE_MAP_ARB, tex->texnum ); - else if( tex->depth != 1 ) - qglBindTexture( GL_TEXTURE_3D, tex->texnum ); - else - qglBindTexture( GL_TEXTURE_2D, tex->texnum ); -} - -void GL_LoadTexMatrix( const mat4x4_t m ) -{ - qglMatrixMode( GL_TEXTURE ); - qglLoadMatrixf( m ); - glState.texIdentityMatrix[glState.currentTMU] = qfalse; -} - -void GL_LoadIdentityTexMatrix( void ) -{ - if( !glState.texIdentityMatrix[glState.currentTMU] ) - { - qglMatrixMode( GL_TEXTURE ); - qglLoadIdentity(); - glState.texIdentityMatrix[glState.currentTMU] = qtrue; - } -} - -void GL_EnableTexGen( int coord, int mode ) -{ - int tmu = glState.currentTMU; - int bit, gen; - - bit = 1 << (coord - GL_S); - gen = GL_TEXTURE_GEN_S + (coord - GL_S); - - assert( gen == bound( GL_TEXTURE_GEN_S, gen, GL_TEXTURE_GEN_Q ) ); - - if( mode ) - { - if( !( glState.genSTEnabled[tmu] & bit ) ) - { - qglEnable( gen ); - glState.genSTEnabled[tmu] |= bit; - } - qglTexGeni( coord, GL_TEXTURE_GEN_MODE, mode ); - } - else - { - if( glState.genSTEnabled[tmu] & bit ) - { - qglDisable( gen ); - glState.genSTEnabled[tmu] &= ~bit; - } - } -} - -void GL_SetTexCoordArrayMode( int mode ) -{ - int tmu = glState.currentTMU; - int cmode = glState.texCoordArrayMode[tmu]; - - if( cmode != mode ) - { - if( cmode == GL_TEXTURE_COORD_ARRAY ) - qglDisableClientState( GL_TEXTURE_COORD_ARRAY ); - else if( cmode == GL_TEXTURE_CUBE_MAP_ARB ) - qglDisable( GL_TEXTURE_CUBE_MAP_ARB ); - - if( mode == GL_TEXTURE_COORD_ARRAY ) - qglEnableClientState( GL_TEXTURE_COORD_ARRAY ); - else if( mode == GL_TEXTURE_CUBE_MAP_ARB ) - qglEnable( GL_TEXTURE_CUBE_MAP_ARB ); - - glState.texCoordArrayMode[tmu] = mode; - } -} - -typedef struct -{ - char *name; - int minimize, maximize; -} glmode_t; - -glmode_t modes[] = { - { "GL_NEAREST", GL_NEAREST, GL_NEAREST }, - { "GL_LINEAR", GL_LINEAR, GL_LINEAR }, - { "GL_NEAREST_MIPMAP_NEAREST", GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST }, - { "GL_LINEAR_MIPMAP_NEAREST", GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR }, - { "GL_NEAREST_MIPMAP_LINEAR", GL_NEAREST_MIPMAP_LINEAR, GL_NEAREST }, - { "GL_LINEAR_MIPMAP_LINEAR", GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR } -}; - -#define NUM_GL_MODES ( sizeof( modes ) / sizeof( glmode_t ) ) - -/* -=============== -R_TextureMode -=============== -*/ -void R_TextureMode( char *string ) -{ - int i; - image_t *glt; - - for( i = 0; i < NUM_GL_MODES; i++ ) - { - if( !Q_stricmp( modes[i].name, string ) ) - break; - } - - if( i == NUM_GL_MODES ) - { - Com_Printf( "R_TextureMode: bad filter name\n" ); - return; - } - - gl_filter_min = modes[i].minimize; - gl_filter_max = modes[i].maximize; - - // change all the existing mipmap texture objects - for( i = 1, glt = images; i < r_numImages; i++, glt++ ) - { - if( glt->flags & (IT_NOFILTERING|IT_DEPTH) ) - continue; - - GL_Bind( 0, glt ); - - if( !( glt->flags & IT_NOMIPMAP ) ) - { - qglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min ); - qglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max ); - } - else - { - qglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max ); - qglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max ); - } - } -} - -/* -=============== -R_AnisotropicFilter= -=============== -*/ -void R_AnisotropicFilter( int value ) -{ - int i, old; - image_t *glt; - - if( !glConfig.ext.texture_filter_anisotropic ) - return; - - old = gl_anisotropic_filter; - gl_anisotropic_filter = bound( 1, value, glConfig.maxTextureFilterAnisotropic ); - if( gl_anisotropic_filter == old ) - return; - - // change all the existing mipmap texture objects - for( i = 1, glt = images; i < r_numImages; i++, glt++ ) - { - if( (glt->flags & (IT_NOFILTERING|IT_DEPTH|IT_NOMIPMAP)) ) - continue; - - GL_Bind( 0, glt ); - if( glt->upload_depth != 1 ) - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_MAX_ANISOTROPY_EXT, gl_anisotropic_filter ); - else - qglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, gl_anisotropic_filter ); - } -} - -/* -=============== -R_ImageList_f -=============== -*/ -void R_ImageList_f( void ) -{ - int i, num_depth = 0, bytes; - image_t *image; - double texels = 0, add, total_bytes = 0; - double depth_texels = 0; - - Com_Printf( "------------------\n" ); - - for( i = 0, image = images; i < r_numImages; i++, image++ ) - { - if( !image->upload_width || !image->upload_height || !image->upload_depth ) - continue; - - add = image->upload_width * image->upload_height * image->upload_depth; - if( !(image->flags & (IT_DEPTH|IT_NOFILTERING|IT_NOMIPMAP)) ) - add = (unsigned)floor( add / 0.75 ); - if( image->flags & IT_CUBEMAP ) - add *= 6; - - if( image->flags & IT_DEPTH ) - { - num_depth++; - depth_texels += image->upload_width * image->upload_height * image->upload_depth; - Com_Printf( " %4i %4i %4i: %s\n", image->upload_width, image->upload_height, image->upload_depth, - image->name ); - } - else - { - texels += add; - bytes = add * (image->flags & IT_LUMINANCE ? 1 : 4); - total_bytes += bytes; - - Com_Printf( " %4i %4i%s: %s%s%s%s %.1f KB\n", image->upload_width, image->upload_height, - image->upload_depth > 1 ? va( " %4i", image->upload_depth ) : "", - (image->flags & IT_NORGB ? "*A" : (image->flags & IT_NOALPHA ? "*C" : "")), - image->name, image->extension, ((image->flags & (IT_NOMIPMAP|IT_NOFILTERING)) ? "" : " (mip)"), bytes / 1024.0 ); - } - } - - Com_Printf( "Total texels count (counting mipmaps, approx): %.0f\n", texels ); - Com_Printf( "%i RGBA images, totalling %.3f megabytes\n", r_numImages - 1, total_bytes / 1048576.0 ); - if( num_depth ) - Com_Printf( "%i depth images, totalling %.0f texels\n", num_depth, depth_texels ); -} - -/* -================================================================= - -TEMPORARY IMAGE BUFFERS - -================================================================= -*/ - -enum -{ - TEXTURE_LOADING_BUF0,TEXTURE_LOADING_BUF1,TEXTURE_LOADING_BUF2,TEXTURE_LOADING_BUF3,TEXTURE_LOADING_BUF4,TEXTURE_LOADING_BUF5, - TEXTURE_RESAMPLING_BUF, - TEXTURE_LINE_BUF, - TEXTURE_CUT_BUF, - TEXTURE_FLIPPING_BUF0,TEXTURE_FLIPPING_BUF1,TEXTURE_FLIPPING_BUF2,TEXTURE_FLIPPING_BUF3,TEXTURE_FLIPPING_BUF4,TEXTURE_FLIPPING_BUF5, - - NUM_IMAGE_BUFFERS -}; - -static qbyte *r_aviBuffer; - -static qbyte *r_imageBuffers[NUM_IMAGE_BUFFERS]; -static size_t r_imageBufSize[NUM_IMAGE_BUFFERS]; - -#define R_PrepareImageBuffer(buffer,size) _R_PrepareImageBuffer(buffer,size,__FILE__,__LINE__) - -/* -============== -R_PrepareImageBuffer -============== -*/ -static qbyte *_R_PrepareImageBuffer( int buffer, size_t size, const char *filename, int fileline ) -{ - if( r_imageBufSize[buffer] < size ) - { - r_imageBufSize[buffer] = size; - if( r_imageBuffers[buffer] ) - Mem_Free( r_imageBuffers[buffer] ); - r_imageBuffers[buffer] = _Mem_Alloc( r_texturesPool, size, 0, 0, filename, fileline ); - } - - memset( r_imageBuffers[buffer], 255, size ); - - return r_imageBuffers[buffer]; -} - -/* -============== -R_FreeImageBuffers -============== -*/ -void R_FreeImageBuffers( void ) -{ - int i; - - for( i = 0; i < NUM_IMAGE_BUFFERS; i++ ) - { - if( r_imageBuffers[i] ) - { - Mem_Free( r_imageBuffers[i] ); - r_imageBuffers[i] = NULL; - } - r_imageBufSize[i] = 0; - } -} - -/* -================================================================= - -PCX LOADING - -================================================================= -*/ - -typedef struct -{ - char manufacturer; - char version; - char encoding; - char bits_per_pixel; - unsigned short xmin, ymin, xmax, ymax; - unsigned short hres, vres; - unsigned char palette[48]; - char reserved; - char color_planes; - unsigned short bytes_per_line; - unsigned short palette_type; - char filler[58]; - unsigned char data; // unbounded -} pcx_t; - -static qbyte pcx_pal[768]; - -/* -============== -LoadPCX -============== -*/ -static int LoadPCX( const char *filename, qbyte **pic, int *width, int *height, int side ) -{ - qbyte *raw; - pcx_t *pcx; - int x, y, samples = 3; - int len, columns, rows; - int dataByte, runLength; - qbyte *pal = pcx_pal, *pix; - qbyte stack[0x4000]; - - *pic = NULL; - - // - // load the file - // - len = FS_LoadFile( filename, (void **)&raw, stack, sizeof( stack ) ); - if( !raw ) - return 0; - - // - // parse the PCX file - // - pcx = (pcx_t *)raw; - - pcx->xmin = LittleShort( pcx->xmin ); - pcx->ymin = LittleShort( pcx->ymin ); - pcx->xmax = LittleShort( pcx->xmax ); - pcx->ymax = LittleShort( pcx->ymax ); - pcx->hres = LittleShort( pcx->hres ); - pcx->vres = LittleShort( pcx->vres ); - pcx->bytes_per_line = LittleShort( pcx->bytes_per_line ); - pcx->palette_type = LittleShort( pcx->palette_type ); - - raw = &pcx->data; - - if( pcx->manufacturer != 0x0a - || pcx->version != 5 - || pcx->encoding != 1 - || pcx->bits_per_pixel != 8 ) - { - Com_DPrintf( S_COLOR_YELLOW "Bad pcx file %s\n", filename ); - if( ( qbyte *)pcx != stack ) - FS_FreeFile( pcx ); - return 0; - } - - columns = pcx->xmax + 1; - rows = pcx->ymax + 1; - pix = *pic = R_PrepareImageBuffer( TEXTURE_LOADING_BUF0+side, columns * rows * 4 ); - memcpy( pal, (qbyte *)pcx + len - 768, 768 ); - - if( width ) - *width = columns; - if( height ) - *height = rows; - - for( y = 0; y < rows; y++ ) - { - for( x = 0; x < columns; ) - { - dataByte = *raw++; - - if( ( dataByte & 0xC0 ) == 0xC0 ) - { - runLength = dataByte & 0x3F; - dataByte = *raw++; - } - else - runLength = 1; - - while( runLength-- > 0 ) - { -#ifdef QUAKE2_JUNK - if( dataByte == 255 ) - { // hack Quake2 palette - pix[0] = 0; - pix[1] = 0; - pix[2] = 0; - pix[3] = 0; - samples = 4; - } - else -#endif - { - pix[0] = pal[dataByte*3+0]; - pix[1] = pal[dataByte*3+1]; - pix[2] = pal[dataByte*3+2]; - pix[3] = 255; - } - x++; pix += 4; - } - } - } - - if( raw - (qbyte *)pcx > len ) - { - Com_DPrintf( S_COLOR_YELLOW "PCX file %s was malformed", filename ); - *pic = NULL; - } - - if( (qbyte *)pcx != stack ) - FS_FreeFile( pcx ); - - return samples; -} - -/* -=============== -R_GetQ1Palette -=============== -*/ -static int *R_GetQ1Palette( void ) -{ - qbyte *raw; - int r, g, b, v; - int i, len; - qbyte stack[0x4000]; - int *out; - const qbyte *pal; - static const qbyte host_quakepal[768] = -#include "../qcommon/quake1pal.h" - ; - - // get the palette - len = FS_LoadFile( "gfx/palette.lmp", (void **)&raw, stack, sizeof( stack ) ); - pal = ( raw && len >= 768 ) ? raw : host_quakepal; - out = Mem_Alloc( r_texturesPool, sizeof( *out ) * 256 ); - - for( i = 0; i < 256; i++ ) - { - r = pal[i*3 + 0]; - g = pal[i*3 + 1]; - b = pal[i*3 + 2]; - - v = COLOR_RGBA( r, g, b, 255 ); - out[i] = LittleLong( v ); - } - - if( (qbyte *)raw != stack ) - FS_FreeFile( raw ); - - out[255] = 0; // 255 is transparent - - return out; -} - -/* -=============== -R_GetQ2Palette -=============== -*/ -static int *R_GetQ2Palette( void ) -{ - int i; - int *out; - qbyte *pic, *pal = pcx_pal; - int r, g, b; - unsigned v; - int width, height; - - // get the palette - LoadPCX( "pics/colormap.pcx", &pic, &width, &height, 0 ); - if( !pic ) - return NULL; - - out = Mem_Alloc( r_texturesPool, sizeof( *out ) * 256 ); - for( i = 0; i < 256; i++ ) - { - r = pal[i*3 + 0]; - g = pal[i*3 + 1]; - b = pal[i*3 + 2]; - - v = COLOR_RGBA( r, g, b, 255 ); - out[i] = LittleLong( v ); - } - - out[255] &= LittleLong( 0xffffff ); // 255 is transparent - return out; -} - -/* -=============== -R_GetPalette - -Loads Q1 or Q2 palette from disk if not already loaded -=============== -*/ -static int *R_GetPalette( int flags ) -{ - int i; - - if( !r_8to24table ) - { - if( flags & IT_MIPTEX ) - r_8to24table = R_GetQ1Palette(); - else if( flags & IT_WAL ) - r_8to24table = R_GetQ2Palette(); - - if( !r_8to24table ) - { - r_8to24table = Mem_Alloc( r_texturesPool, sizeof( *r_8to24table ) * 256 ); - - // whatever... - for( i = 0; i < 256; i++ ) - r_8to24table[i] = LittleLong( i ); - } - } - return r_8to24table; -} - -/* -========================================================= - -TARGA LOADING - -========================================================= -*/ - -typedef struct _TargaHeader -{ - unsigned char id_length, colormap_type, image_type; - unsigned short colormap_index, colormap_length; - unsigned char colormap_size; - unsigned short x_origin, y_origin, width, height; - unsigned char pixel_size, attributes; -} TargaHeader; - - -/* -============= -LoadTGA -============= -*/ -static int LoadTGA( const char *name, qbyte **pic, int *width, int *height, int side ) -{ - int i, columns, rows, row_inc, row, col; - qbyte *buf_p, *buffer, *pixbuf, *targa_rgba; - int length, samples, readpixelcount, pixelcount; - qbyte palette[256][4], red = 0, green = 0, blue = 0, alpha = 0; - qboolean compressed; - TargaHeader targa_header; - qbyte stack[0x4000]; - - *pic = NULL; - - // - // load the file - // - length = FS_LoadFile( name, (void **)&buffer, stack, sizeof( stack ) ); - if( !buffer ) - return 0; - - buf_p = buffer; - targa_header.id_length = *buf_p++; - targa_header.colormap_type = *buf_p++; - targa_header.image_type = *buf_p++; - - targa_header.colormap_index = buf_p[0] + buf_p[1] * 256; - buf_p += 2; - targa_header.colormap_length = buf_p[0] + buf_p[1] * 256; - buf_p += 2; - targa_header.colormap_size = *buf_p++; - targa_header.x_origin = LittleShort( *( (short *)buf_p ) ); - buf_p += 2; - targa_header.y_origin = LittleShort( *( (short *)buf_p ) ); - buf_p += 2; - targa_header.width = LittleShort( *( (short *)buf_p ) ); - buf_p += 2; - targa_header.height = LittleShort( *( (short *)buf_p ) ); - buf_p += 2; - targa_header.pixel_size = *buf_p++; - targa_header.attributes = *buf_p++; - if( targa_header.id_length != 0 ) - buf_p += targa_header.id_length; // skip TARGA image comment - - if( targa_header.image_type == 1 || targa_header.image_type == 9 ) - { - // uncompressed colormapped image - if( targa_header.pixel_size != 8 ) - { - Com_DPrintf( S_COLOR_YELLOW "LoadTGA: Only 8 bit images supported for type 1 and 9" ); - if( buffer != stack ) - FS_FreeFile( buffer ); - return 0; - } - if( targa_header.colormap_length != 256 ) - { - Com_DPrintf( S_COLOR_YELLOW "LoadTGA: Only 8 bit colormaps are supported for type 1 and 9" ); - if( buffer != stack ) - FS_FreeFile( buffer ); - return 0; - } - if( targa_header.colormap_index ) - { - Com_DPrintf( S_COLOR_YELLOW "LoadTGA: colormap_index is not supported for type 1 and 9" ); - if( buffer != stack ) - FS_FreeFile( buffer ); - return 0; - } - if( targa_header.colormap_size == 24 ) - { - for( i = 0; i < targa_header.colormap_length; i++ ) - { - palette[i][2] = *buf_p++; - palette[i][1] = *buf_p++; - palette[i][0] = *buf_p++; - palette[i][3] = 255; - } - } - else if( targa_header.colormap_size == 32 ) - { - for( i = 0; i < targa_header.colormap_length; i++ ) - { - palette[i][2] = *buf_p++; - palette[i][1] = *buf_p++; - palette[i][0] = *buf_p++; - palette[i][3] = *buf_p++; - } - } - else - { - Com_DPrintf( S_COLOR_YELLOW "LoadTGA: only 24 and 32 bit colormaps are supported for type 1 and 9" ); - if( buffer != stack ) - FS_FreeFile( buffer ); - return 0; - } - } - else if( targa_header.image_type == 2 || targa_header.image_type == 10 ) - { - // uncompressed or RLE compressed RGB - if( targa_header.pixel_size != 32 && targa_header.pixel_size != 24 ) - { - Com_DPrintf( S_COLOR_YELLOW "LoadTGA: Only 32 or 24 bit images supported for type 2 and 10" ); - if( buffer != stack ) - FS_FreeFile( buffer ); - return 0; - } - } - else if( targa_header.image_type == 3 || targa_header.image_type == 11 ) - { - // uncompressed grayscale - if( targa_header.pixel_size != 8 ) - { - Com_DPrintf( S_COLOR_YELLOW "LoadTGA: Only 8 bit images supported for type 3 and 11" ); - if( buffer != stack ) - FS_FreeFile( buffer ); - return 0; - } - } - - columns = targa_header.width; - if( width ) - *width = columns; - - rows = targa_header.height; - if( height ) - *height = rows; - - targa_rgba = R_PrepareImageBuffer( TEXTURE_LOADING_BUF0+side, columns * rows * 4 ); - *pic = targa_rgba; - - // if bit 5 of attributes isn't set, the image has been stored from bottom to top - if( targa_header.attributes & 0x20 ) - { - pixbuf = targa_rgba; - row_inc = 0; - } - else - { - pixbuf = targa_rgba + ( rows - 1 ) * columns * 4; - row_inc = -columns * 4 * 2; - } - - compressed = ( targa_header.image_type == 9 || targa_header.image_type == 10 || targa_header.image_type == 11 ); - for( row = col = 0, samples = 3; row < rows; ) - { - pixelcount = 0x10000; - readpixelcount = 0x10000; - - if( compressed ) - { - pixelcount = *buf_p++; - if( pixelcount & 0x80 ) // run-length packet - readpixelcount = 1; - pixelcount = 1 + ( pixelcount & 0x7f ); - } - - while( pixelcount-- && ( row < rows ) ) - { - if( readpixelcount-- > 0 ) - { - switch( targa_header.image_type ) - { - case 1: - case 9: - // colormapped image - blue = *buf_p++; - red = palette[blue][0]; - green = palette[blue][1]; - alpha = palette[blue][3]; - blue = palette[blue][2]; - if( alpha != 255 ) - samples = 4; - break; - case 2: - case 10: - // 24 or 32 bit image - blue = *buf_p++; - green = *buf_p++; - red = *buf_p++; - alpha = 255; - if( targa_header.pixel_size == 32 ) - { - alpha = *buf_p++; - if( alpha != 255 ) - samples = 4; - } - break; - case 3: - case 11: - // grayscale image - blue = green = red = *buf_p++; - alpha = 255; - break; - } - } - - *pixbuf++ = red; - *pixbuf++ = green; - *pixbuf++ = blue; - *pixbuf++ = alpha; - if( ++col == columns ) - { // run spans across rows - row++; - col = 0; - pixbuf += row_inc; - } - } - } - - if( buffer != stack ) - FS_FreeFile( buffer ); - - return samples; -} - -/* -================== -WriteTGA -================== -*/ -static qboolean WriteTGA( const char *name, qbyte *buffer, int width, int height, qboolean bgr ) -{ - int file, i, c, temp; - - if( FS_FOpenFile( name, &file, FS_WRITE ) == -1 ) - { - Com_Printf( "WriteTGA: Couldn't create %s\n", name ); - return qfalse; - } - - buffer[2] = 2; // uncompressed type - buffer[12] = width&255; - buffer[13] = width>>8; - buffer[14] = height&255; - buffer[15] = height>>8; - buffer[16] = 24; // pixel size - - // swap rgb to bgr - c = 18+width*height*3; - if( !bgr ) - { - for( i = 18; i < c; i += 3 ) - { - temp = buffer[i]; - buffer[i] = buffer[i+2]; - buffer[i+2] = temp; - } - } - FS_Write( buffer, c, file ); - FS_FCloseFile( file ); - - return qtrue; -} - -/* -========================================================= - -JPEG LOADING - -========================================================= -*/ - -static void jpg_noop( j_decompress_ptr cinfo ) -{ -} - -static boolean jpg_fill_input_buffer( j_decompress_ptr cinfo ) -{ - Com_DPrintf( "Premature end of jpeg file\n" ); - return 1; -} - -static void jpg_skip_input_data( j_decompress_ptr cinfo, long num_bytes ) -{ - cinfo->src->next_input_byte += (size_t) num_bytes; - cinfo->src->bytes_in_buffer -= (size_t) num_bytes; -} - -/*static void jpeg_mem_src( j_decompress_ptr cinfo, qbyte *mem, int len ) -{ - cinfo->src = (struct jpeg_source_mgr *) - ( *cinfo->mem->alloc_small )( (j_common_ptr) cinfo, - JPOOL_PERMANENT, - sizeof( struct jpeg_source_mgr ) ); - cinfo->src->init_source = jpg_noop; - cinfo->src->fill_input_buffer = jpg_fill_input_buffer; - cinfo->src->skip_input_data = jpg_skip_input_data; - cinfo->src->resync_to_restart = jpeg_resync_to_restart; - cinfo->src->term_source = jpg_noop; - cinfo->src->bytes_in_buffer = len; - cinfo->src->next_input_byte = mem; -} -*/ -/* -============= -LoadJPG -============= -*/ -static int LoadJPG( const char *name, qbyte **pic, int *width, int *height, int side ) -{ - unsigned int i, length, samples, l; - qbyte *img, *scan, *buffer, *line; - struct jpeg_error_mgr jerr; - struct jpeg_decompress_struct cinfo; - qbyte stack[0x4000]; - - *pic = NULL; - - // load the file - length = FS_LoadFile( name, (void **)&buffer, stack, sizeof( stack ) ); - if( !buffer ) - return 0; - - cinfo.err = jpeg_std_error( &jerr ); - jpeg_create_decompress( &cinfo ); - jpeg_mem_src( &cinfo, buffer, length ); - jpeg_read_header( &cinfo, TRUE ); - jpeg_start_decompress( &cinfo ); - samples = cinfo.output_components; - - if( samples != 3 && samples != 1 ) - { - Com_DPrintf( S_COLOR_YELLOW "Bad jpeg file %s\n", name ); - jpeg_destroy_decompress( &cinfo ); - if( buffer != stack ) - FS_FreeFile( buffer ); - return 0; - } - - if( width ) - *width = cinfo.output_width; - if( height ) - *height = cinfo.output_height; - - img = *pic = R_PrepareImageBuffer( TEXTURE_LOADING_BUF0+side, cinfo.output_width * cinfo.output_height * 4 ); - l = cinfo.output_width * samples; - if( sizeof( stack ) >= l + length ) - line = stack + length; - else - line = R_PrepareImageBuffer( TEXTURE_LINE_BUF, l ); - - while( cinfo.output_scanline < cinfo.output_height ) - { - scan = line; - if( !jpeg_read_scanlines( &cinfo, &scan, 1 ) ) - { - Com_Printf( S_COLOR_YELLOW "Bad jpeg file %s\n", name ); - jpeg_destroy_decompress( &cinfo ); - if( buffer != stack ) - FS_FreeFile( buffer ); - return 0; - } - - if( samples == 1 ) - { - for( i = 0; i < cinfo.output_width; i++, img += 4 ) - img[0] = img[1] = img[2] = *scan++; - } - else - { - for( i = 0; i < cinfo.output_width; i++, img += 4, scan += 3 ) - img[0] = scan[0], img[1] = scan[1], img[2] = scan[2]; - } - } - - jpeg_finish_decompress( &cinfo ); - jpeg_destroy_decompress( &cinfo ); - - if( buffer != stack ) - FS_FreeFile( buffer ); - - return 3; -} - -/* -================== -WriteJPG -================== -*/ -static qboolean WriteJPG( const char *name, qbyte *buffer, int width, int height, int quality ) -{ - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - char *fullname; - int fullname_size; - FILE *f; - JSAMPROW s[1]; - int offset, w3; - - // We can't use FS-functions with libjpeg - fullname_size = - sizeof( char ) * ( strlen( FS_WriteDirectory() ) + 1 + strlen( FS_GameDirectory() ) + 1 + strlen( name ) + 1 ); - fullname = Mem_TempMalloc( fullname_size ); - Q_snprintfz( fullname, fullname_size, "%s/%s/%s", FS_WriteDirectory(), FS_GameDirectory(), name ); - FS_CreateAbsolutePath( fullname ); - - if( !( f = fopen( fullname, "wb" ) ) ) - { - Com_Printf( "WriteJPG: Couldn't create %s\n", fullname ); - Mem_TempFree( fullname ); - return qfalse; - } - - // initialize the JPEG compression object - cinfo.err = jpeg_std_error( &jerr ); - jpeg_create_compress( &cinfo ); - jpeg_stdio_dest( &cinfo, f ); - - // setup JPEG parameters - cinfo.image_width = width; - cinfo.image_height = height; - cinfo.in_color_space = JCS_RGB; - cinfo.input_components = 3; - - jpeg_set_defaults( &cinfo ); - - if( ( quality > 100 ) || ( quality <= 0 ) ) - quality = 85; - - jpeg_set_quality( &cinfo, quality, TRUE ); - - // If quality is set high, disable chroma subsampling - if( quality >= 85 ) - { - cinfo.comp_info[0].h_samp_factor = 1; - cinfo.comp_info[0].v_samp_factor = 1; - } - - // start compression - jpeg_start_compress( &cinfo, qtrue ); - - // feed scanline data - w3 = cinfo.image_width * 3; - offset = w3 * cinfo.image_height - w3; - while( cinfo.next_scanline < cinfo.image_height ) - { - s[0] = &buffer[offset - cinfo.next_scanline * w3]; - jpeg_write_scanlines( &cinfo, s, 1 ); - } - - // finish compression - jpeg_finish_compress( &cinfo ); - jpeg_destroy_compress( &cinfo ); - - fclose( f ); - Mem_TempFree( fullname ); - - return qtrue; -} - -/* -========================================================= - -MIPTEX LOADING - -========================================================= -*/ - -/* -=============== -LoadMipTex -=============== -*/ -static int LoadMipTex( qbyte **pic, int width, int height, int flags ) -{ - unsigned int i; - int side = 0; - unsigned int p, s, *trans; - qbyte *data; - int *d_8to24table; - - data = *pic; - - // load palette from disk - d_8to24table = R_GetPalette( IT_MIPTEX ); - - s = width * height; - trans = ( unsigned int * )R_PrepareImageBuffer( TEXTURE_LOADING_BUF0+side, s * 4 ); - *pic = ( qbyte * )trans; - - if( flags & IT_SKY ) - { - unsigned j; - unsigned r, g, b, p; - unsigned transpix; - unsigned rgba; - int halfwidth = width >> 1; - - // a sky texture is 256*128, with the right side being a masked overlay - r = g = b = 0; - for( i = 0; i < (unsigned)height; i++ ) - { - for( j = 0; j < (unsigned)halfwidth; j++ ) - { - p = data[i*width + halfwidth + j]; - rgba = d_8to24table[p]; - trans[i*width + halfwidth + j] = rgba; - r += COLOR_R( rgba ); - g += COLOR_G( rgba ); - b += COLOR_B( rgba ); - } - } - - // make an average value for the back to avoid - // a fringe on the top level - transpix = COLOR_RGBA( r/(halfwidth*height), g/(halfwidth*height), b/(halfwidth*height), 0 ); - - for( i = 0; i < (unsigned)height; i++ ) - { - for( j = 0; j < (unsigned)halfwidth; j++ ) - { - p = data[i*width + j]; - trans[i*width + j] = p ? d_8to24table[p] : transpix; - } - } - return 4; - } - else if( flags & IT_MIPTEX_FULLBRIGHT ) - { - // this is a fullbright mask, so make all non-fullbright - // colors transparent - for( i = 0; i < s; i++ ) - { - p = data[i]; - if( p < 224 ) - trans[i] = 0; // transparent - else - trans[i] = d_8to24table[p]; // fullbright - } - return 4; - } - else - { - for( i = 0; i < s; i++ ) - { - p = data[i]; - trans[i] = d_8to24table[p]; - } - return 3; - } -} - -/* -=============== -R_MiptexHasFullbrights -=============== -*/ -qboolean R_MiptexHasFullbrights( qbyte *pixels, int width, int height ) -{ - int i; - int size = width * height; - - for( i = 0; i < size; i++ ) - { - if( pixels[i] >= 224 ) - return qtrue; - } - - return qfalse; -} - -/* -========================================================= - -WAL LOADING - -========================================================= -*/ - -/* -=============== -LoadWAL -=============== -*/ -static int LoadWAL( const char *name, qbyte **pic, int *width, int *height, int side ) -{ - unsigned int i, length; - unsigned int p, s, *trans; - unsigned int rows, columns; - int samples = 3; - qbyte *buffer, *data; - q2miptex_t *mt; - qbyte stack[0x4000]; - int *d_8to24table; - - *pic = NULL; - - // load palette from disk - d_8to24table = R_GetPalette( IT_WAL ); - - // load the file - length = FS_LoadFile( name, (void **)&buffer, stack, sizeof( stack ) ); - if( !buffer ) - return 0; - - mt = ( q2miptex_t * )buffer; - rows = LittleLong( mt->width ); - columns = LittleLong( mt->height ); - data = buffer + LittleLong( mt->offsets[0] ); - - if( width ) - *width = ( int )rows; - if( height ) - *height = ( int )columns; - - s = LittleLong( mt->width ) * LittleLong( mt->height ); - trans = ( unsigned int * )R_PrepareImageBuffer( TEXTURE_LOADING_BUF0+side, s * 4 ); - *pic = ( qbyte * )trans; - - for( i = 0; i < s ; i++ ) - { - p = data[i]; - trans[i] = d_8to24table[p]; - - if( p == 255 ) - { - // transparent, so scan around for another color - // to avoid alpha fringes - // FIXME: do a full flood fill so mips work... - if( i > rows && data[i-rows] != 255 ) - p = data[i-rows]; - else if( i < s-rows && data[i+rows] != 255 ) - p = data[i+rows]; - else if( i > 0 && data[i-1] != 255 ) - p = data[i-1]; - else if( i < s-1 && data[i+1] != 255 ) - p = data[i+1]; - else - p = 0; - - // copy rgb components - ((qbyte *)&trans[i])[0] = ((qbyte *)&d_8to24table[p])[0]; - ((qbyte *)&trans[i])[1] = ((qbyte *)&d_8to24table[p])[1]; - ((qbyte *)&trans[i])[2] = ((qbyte *)&d_8to24table[p])[2]; - - samples = 4; - } - } - - if( ( qbyte * )mt != stack ) - FS_FreeFile( mt ); - - return samples; -} - -//======================================================= - -/* -=============== -R_LoadImageFromDisk -=============== -*/ -static int R_LoadImageFromDisk( char *pathname, size_t pathname_size, qbyte **pic, int *width, int *height, int *flags, int side ) -{ - const char *extension; - - *pic = NULL; - *width = *height = 0; - - extension = FS_FirstExtension( pathname, IMAGE_EXTENSIONS, NUM_IMAGE_EXTENSIONS ); - if( extension ) - { - COM_ReplaceExtension( pathname, extension, pathname_size ); - if( !Q_stricmp( extension, ".jpg" ) ) - return LoadJPG( pathname, pic, width, height, side ); - if( !Q_stricmp( extension, ".tga" ) ) - return LoadTGA( pathname, pic, width, height, side ); - if( !Q_stricmp( extension, ".pcx" ) ) - return LoadPCX( pathname, pic, width, height, side ); - if( !Q_stricmp( extension, ".wal" ) ) - { - if( flags ) - *flags |= IT_WAL; - return LoadWAL( pathname, pic, width, height, side ); - } - } - - return 0; -} - -/* -================ -R_FlipTexture -================ -*/ -static void R_FlipTexture( const qbyte *in, qbyte *out, int width, int height, int samples, qboolean flipx, qboolean flipy, qboolean flipdiagonal ) -{ - int i, x, y; - const qbyte *p, *line; - int row_inc = ( flipy ? -samples : samples ) * width, col_inc = ( flipx ? -samples : samples ); - int row_ofs = ( flipy ? ( height - 1 ) * width * samples : 0 ), col_ofs = ( flipx ? ( width - 1 ) * samples : 0 ); - - if( flipdiagonal ) - { - for( x = 0, line = in + col_ofs; x < width; x++, line += col_inc ) - for( y = 0, p = line + row_ofs; y < height; y++, p += row_inc, out += samples ) - for( i = 0; i < samples; i++ ) - out[i] = p[i]; - } - else - { - for( y = 0, line = in + row_ofs; y < height; y++, line += row_inc ) - for( x = 0, p = line + col_ofs; x < width; x++, p += col_inc, out += samples ) - for( i = 0; i < samples; i++ ) - out[i] = p[i]; - } -} - -/* -================ -R_ResampleTexture -================ -*/ -static void R_ResampleTexture( const unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight ) -{ - int i, j; - const unsigned *inrow, *inrow2; - unsigned frac, fracstep; - unsigned *p1, *p2; - qbyte *pix1, *pix2, *pix3, *pix4; - - if( inwidth == outwidth && inheight == outheight ) - { - memcpy( out, in, inwidth * inheight * 4 ); - return; - } - - p1 = ( unsigned * )R_PrepareImageBuffer( TEXTURE_LINE_BUF, outwidth * 1 * sizeof( unsigned ) * 2 ); - p2 = p1 + outwidth; - - fracstep = inwidth * 0x10000 / outwidth; - - frac = fracstep >> 2; - for( i = 0; i < outwidth; i++ ) - { - p1[i] = 4 * ( frac >> 16 ); - frac += fracstep; - } - - frac = 3 * ( fracstep >> 2 ); - for( i = 0; i < outwidth; i++ ) - { - p2[i] = 4 * ( frac >> 16 ); - frac += fracstep; - } - - for( i = 0; i < outheight; i++, out += outwidth ) - { - inrow = in + inwidth * (int)( ( i + 0.25 ) * inheight / outheight ); - inrow2 = in + inwidth * (int)( ( i + 0.75 ) * inheight / outheight ); - - for( j = 0; j < outwidth; j++ ) - { - pix1 = (qbyte *)inrow + p1[j]; - pix2 = (qbyte *)inrow + p2[j]; - pix3 = (qbyte *)inrow2 + p1[j]; - pix4 = (qbyte *)inrow2 + p2[j]; - ( ( qbyte * )( out + j ) )[0] = ( pix1[0] + pix2[0] + pix3[0] + pix4[0] ) >> 2; - ( ( qbyte * )( out + j ) )[1] = ( pix1[1] + pix2[1] + pix3[1] + pix4[1] ) >> 2; - ( ( qbyte * )( out + j ) )[2] = ( pix1[2] + pix2[2] + pix3[2] + pix4[2] ) >> 2; - ( ( qbyte * )( out + j ) )[3] = ( pix1[3] + pix2[3] + pix3[3] + pix4[3] ) >> 2; - } - } -} - -/* -================ -R_HeightmapToNormalmap -================ -*/ -static int R_HeightmapToNormalmap( const qbyte *in, qbyte *out, int width, int height, float bumpScale ) -{ - int x, y; - vec3_t n; - float ibumpScale; - const qbyte *p0, *p1, *p2; - - if( !bumpScale ) - bumpScale = 1.0f; - bumpScale *= max( 0, r_lighting_bumpscale->value ); - ibumpScale = ( 255.0 * 3.0 ) / bumpScale; - - memset( out, 255, width * height * 4 ); - for( y = 0; y < height; y++ ) - { - for( x = 0; x < width; x++, out += 4 ) - { - p0 = in + ( y * width + x ) * 4; - p1 = ( x == width - 1 ) ? p0 - x * 4 : p0 + 4; - p2 = ( y == height - 1 ) ? in + x * 4 : p0 + width * 4; - - n[0] = ( p0[0] + p0[1] + p0[2] ) - ( p1[0] + p1[1] + p1[2] ); - n[1] = ( p2[0] + p2[1] + p2[2] ) - ( p0[0] + p0[1] + p0[2] ); - n[2] = ibumpScale; - VectorNormalize( n ); - - out[0] = ( n[0] + 1 ) * 127.5f; - out[1] = ( n[1] + 1 ) * 127.5f; - out[2] = ( n[2] + 1 ) * 127.5f; - out[3] = ( p0[0] + p0[1] + p0[2] ) / 3; - } - } - - return 4; -} - -/* -================ -R_MergeNormalmapDepthmap -================ -*/ -static int R_MergeNormalmapDepthmap( const char *pathname, qbyte *in, int iwidth, int iheight ) -{ - const char *p; - int width, height, samples; - qbyte *pic, *pic2; - char *depthName; - size_t depthNameSize; - - ENSUREBUFSIZE( imagePathBuf2, strlen( pathname ) + (strlen( "depth" ) + 1) + 5 ); - depthName = r_imagePathBuf2; - depthNameSize = r_sizeof_imagePathBuf2; - - Q_strncpyz( depthName, pathname, depthNameSize ); - - p = Q_strrstr( pathname, "_norm" ); - if( !p ) - p = pathname + strlen( pathname ); - Q_strncpyz( depthName + (p - pathname), "_depth", depthNameSize - (p - pathname) ); - - pic = NULL; - samples = R_LoadImageFromDisk( depthName, depthNameSize, &pic, &width, &height, NULL, 1 ); - - if( pic ) - { - if( (width == iwidth) && (height == iheight) ) - { - int i; - for( i = iwidth*iheight - 1, pic2 = pic; i > 0; i--, in += 4, pic2 += 4 ) - in[3] = ((int)pic2[0] + (int)pic2[1] + (int)pic2[2]) / 3; - return 4; - } - else - { - Com_Printf( S_COLOR_YELLOW "WARNING: different depth map dimensions differ from parent (%s)\n", depthName ); - } - } - - return 3; -} - -/* -================ -R_CutImage -================ -*/ -static void R_CutImage( qbyte *in, int inwidth, int height, qbyte *out, int x, int y, int outwidth, int outheight ) -{ - int i, j; - int *iin, *iout; - - if( x + outwidth > inwidth ) - outwidth = inwidth - x; - if( y + outheight > height ) - outheight = height - y; - - iout = (int *)out; - for( i = 0; i < outheight; i++ ) - { - iin = (int *)in + (y + i) * inwidth + x; - for( j = 0; j < outwidth; j++, iin++, iout++ ) - *iout = *iin; - } -} - -/* -================ -R_MipMap - -Operates in place, quartering the size of the texture -note: if given odd width/height this discards the last row/column of -pixels, rather than doing a proper box-filter scale down (LordHavoc) -================ -*/ -static void R_MipMap( qbyte *in, int width, int height ) -{ - int i, j; - qbyte *out; - - width <<= 2; - height >>= 1; - - out = in; - for( i = 0; i < height; i++, in += width ) - { - for( j = 0; j < width; j += 8, out += 4, in += 8 ) - { - out[0] = ( in[0] + in[4] + in[width+0] + in[width+4] )>>2; - out[1] = ( in[1] + in[5] + in[width+1] + in[width+5] )>>2; - out[2] = ( in[2] + in[6] + in[width+2] + in[width+6] )>>2; - out[3] = ( in[3] + in[7] + in[width+3] + in[width+7] )>>2; - } - } -} - -/* -=============== -R_TextureFormat -=============== -*/ -static int R_TextureFormat( int samples, qboolean noCompress ) -{ - int bits = r_texturebits->integer; - - if( glConfig.ext.texture_compression && !noCompress ) - { - if( samples == 3 ) - return GL_COMPRESSED_RGB_ARB; - return GL_COMPRESSED_RGBA_ARB; - } - - if( samples == 3 ) - { - if( bits == 16 ) - return GL_RGB5; - else if( bits == 32 ) - return GL_RGB8; - return GL_RGB; - } - - if( bits == 16 ) - return GL_RGBA4; - else if( bits == 32 ) - return GL_RGBA8; - return GL_RGBA; -} - -/* -=============== -R_Upload32 -=============== -*/ -void R_Upload32( qbyte **data, int width, int height, int flags, int *upload_width, int *upload_height, int *samples, qboolean subImage ) -{ - int i, c, comp, format; - int target, target2; - int numTextures; - unsigned *scaled = NULL; - int scaledWidth, scaledHeight; - qboolean driverMipmap = glConfig.ext.generate_mipmap && !(flags & IT_CUBEMAP); - - assert( samples ); - - // we can't properly mipmap a NPT-texture in software - if( glConfig.ext.texture_non_power_of_two && ( driverMipmap || (flags & IT_NOMIPMAP) ) ) - { - scaledWidth = width; - scaledHeight = height; - } - else - { - for( scaledWidth = 1; scaledWidth < width; scaledWidth <<= 1 ); - for( scaledHeight = 1; scaledHeight < height; scaledHeight <<= 1 ); - } - - if( flags & IT_SKY ) - { - // let people sample down the sky textures for speed - scaledWidth >>= r_skymip->integer; - scaledHeight >>= r_skymip->integer; - } - else if( !( flags & IT_NOPICMIP ) ) - { - // let people sample down the world textures for speed - scaledWidth >>= r_picmip->integer; - scaledHeight >>= r_picmip->integer; - } - - // don't ever bother with > maxSize textures - if( flags & IT_CUBEMAP ) - { - numTextures = 6; - target = GL_TEXTURE_CUBE_MAP_ARB; - target2 = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; - clamp( scaledWidth, 1, glConfig.maxTextureCubemapSize ); - clamp( scaledHeight, 1, glConfig.maxTextureCubemapSize ); - } - else - { - numTextures = 1; - target = GL_TEXTURE_2D; - target2 = GL_TEXTURE_2D; - clamp( scaledWidth, 1, glConfig.maxTextureSize ); - clamp( scaledHeight, 1, glConfig.maxTextureSize ); - } - - if( upload_width ) - *upload_width = scaledWidth; - if( upload_height ) - *upload_height = scaledHeight; - - // scan the texture for any non-255 alpha - if( flags & IT_LUMINANCE ) - { - *samples = 1; - } - else if( flags & ( IT_NORGB|IT_NOALPHA ) ) - { - qbyte *scan; - - if( flags & IT_NORGB ) - { - for( i = 0; i < numTextures && data[i]; i++ ) - { - scan = ( qbyte * )data[i]; - for( c = width * height; c > 0; c--, scan += 4 ) - scan[0] = scan[1] = scan[2] = 255; - } - } - else if( *samples == 4 ) - { - for( i = 0; i < numTextures && data[i]; i++ ) - { - scan = ( qbyte * )data[i] + 3; - for( c = width * height; c > 0; c--, scan += 4 ) - *scan = 255; - } - *samples = 3; - } - } - - if( flags & IT_DEPTH ) - { - comp = GL_DEPTH_COMPONENT; - format = GL_DEPTH_COMPONENT; - } - else if( flags & IT_LUMINANCE ) - { - comp = GL_LUMINANCE; - format = GL_LUMINANCE; - } - else - { - comp = R_TextureFormat( *samples, flags & IT_NOCOMPRESS ); - format = GL_RGBA; - } - - if( flags & IT_NOFILTERING ) - { - qglTexParameteri( target, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - qglTexParameteri( target, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - } - else if( flags & IT_DEPTH ) - { - qglTexParameteri( target, GL_TEXTURE_MIN_FILTER, gl_filter_depth ); - qglTexParameteri( target, GL_TEXTURE_MAG_FILTER, gl_filter_depth ); - - if( glConfig.ext.texture_filter_anisotropic ) - qglTexParameteri( target, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1 ); - } - else if( !( flags & IT_NOMIPMAP ) ) - { - qglTexParameteri( target, GL_TEXTURE_MIN_FILTER, gl_filter_min ); - qglTexParameteri( target, GL_TEXTURE_MAG_FILTER, gl_filter_max ); - - if( glConfig.ext.texture_filter_anisotropic ) - qglTexParameteri( target, GL_TEXTURE_MAX_ANISOTROPY_EXT, gl_anisotropic_filter ); - } - else - { - qglTexParameteri( target, GL_TEXTURE_MIN_FILTER, gl_filter_max ); - qglTexParameteri( target, GL_TEXTURE_MAG_FILTER, gl_filter_max ); - - if( glConfig.ext.texture_filter_anisotropic ) - qglTexParameteri( target, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1 ); - } - - // clamp if required - if( !( flags & IT_CLAMP ) ) - { - qglTexParameteri( target, GL_TEXTURE_WRAP_S, GL_REPEAT ); - qglTexParameteri( target, GL_TEXTURE_WRAP_T, GL_REPEAT ); - } - else if( glConfig.ext.texture_edge_clamp ) - { - qglTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); - qglTexParameteri( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); - } - else - { - qglTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP ); - qglTexParameteri( target, GL_TEXTURE_WRAP_T, GL_CLAMP ); - } - - if( ( scaledWidth == width ) && ( scaledHeight == height ) && ( flags & IT_NOMIPMAP ) ) - { - if( subImage ) - { - for( i = 0; i < numTextures; i++, target2++ ) - qglTexSubImage2D( target2, 0, 0, 0, scaledWidth, scaledHeight, format, GL_UNSIGNED_BYTE, data[i] ); - } - else - { - for( i = 0; i < numTextures; i++, target2++ ) - qglTexImage2D( target2, 0, comp, scaledWidth, scaledHeight, 0, format, GL_UNSIGNED_BYTE, data[i] ); - } - } - else - { - for( i = 0; i < numTextures; i++, target2++ ) - { - unsigned int *mip; - - if( scaledWidth == width && scaledHeight == height && driverMipmap ) - { - mip = (unsigned *)(data[i]); - } - else - { - if( !scaled ) - scaled = ( unsigned * )R_PrepareImageBuffer( TEXTURE_RESAMPLING_BUF, scaledWidth * scaledHeight * 4 ); - - // resample the texture - mip = scaled; - if( data[i] ) - R_ResampleTexture( (unsigned int *)( data[i] ), width, height, mip, scaledWidth, scaledHeight ); - else - mip = (unsigned *)NULL; - } - - // automatic mipmaps generation - if( !( flags & IT_NOMIPMAP ) && mip && driverMipmap ) - qglTexParameteri( target2, GL_GENERATE_MIPMAP_SGIS, GL_TRUE ); - - if( subImage ) - qglTexSubImage2D( target2, 0, 0, 0, scaledWidth, scaledHeight, format, GL_UNSIGNED_BYTE, mip ); - else - qglTexImage2D( target2, 0, comp, scaledWidth, scaledHeight, 0, format, GL_UNSIGNED_BYTE, mip ); - - // mipmaps generation - if( !( flags & IT_NOMIPMAP ) && mip && !driverMipmap ) - { - int w, h; - int miplevel = 0; - - w = scaledWidth; - h = scaledHeight; - while( w > 1 || h > 1 ) - { - R_MipMap( (qbyte *)mip, w, h ); - - w >>= 1; - h >>= 1; - if( w < 1 ) - w = 1; - if( h < 1 ) - h = 1; - miplevel++; - - if( subImage ) - qglTexSubImage2D( target2, miplevel, 0, 0, w, h, format, GL_UNSIGNED_BYTE, mip ); - else - qglTexImage2D( target2, miplevel, comp, w, h, 0, format, GL_UNSIGNED_BYTE, mip ); - } - } - } - } -} - -/* -=============== -R_Upload32_3D - -No resampling, scaling, mipmapping. Just to make 3D attenuation work ;) -=============== -*/ -void R_Upload32_3D_Fast( qbyte **data, int width, int height, int depth, int flags, int *upload_width, int *upload_height, int *upload_depth, int *samples, qboolean subImage ) -{ - int comp, format; - int scaledWidth, scaledHeight, scaledDepth; - - assert( samples ); - assert( ( flags & (IT_NOMIPMAP|IT_NOPICMIP) ) ); - - for( scaledWidth = 1; scaledWidth < width; scaledWidth <<= 1 ) ; - for( scaledHeight = 1; scaledHeight < height; scaledHeight <<= 1 ) ; - for( scaledDepth = 1; scaledDepth < depth; scaledDepth <<= 1 ) ; - - if( width != scaledWidth || height != scaledHeight || depth != scaledDepth ) - Com_Error( ERR_DROP, "R_Upload32_3D: bad texture dimensions (not a power of 2)" ); - if( scaledWidth > glConfig.maxTextureSize3D || scaledHeight > glConfig.maxTextureSize3D || scaledDepth > glConfig.maxTextureSize3D ) - Com_Error( ERR_DROP, "R_Upload32_3D: texture is too large (resizing is not supported)" ); - - if( upload_width ) - *upload_width = scaledWidth; - if( upload_height ) - *upload_height = scaledHeight; - if( upload_depth ) - *upload_depth = scaledDepth; - - if( flags & IT_LUMINANCE ) - { - comp = GL_LUMINANCE; - format = GL_LUMINANCE; - } - else - { - comp = R_TextureFormat( *samples, flags & IT_NOCOMPRESS ); - format = GL_RGBA; - } - - if( !( flags & IT_NOMIPMAP ) ) - { - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, gl_filter_min ); - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, gl_filter_max ); - - if( glConfig.ext.texture_filter_anisotropic ) - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_MAX_ANISOTROPY_EXT, gl_anisotropic_filter ); - } - else - { - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, gl_filter_max ); - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, gl_filter_max ); - - if( glConfig.ext.texture_filter_anisotropic ) - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1 ); - } - - // clamp if required - if( !( flags & IT_CLAMP ) ) - { - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT ); - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT ); - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT ); - } - else if( glConfig.ext.texture_edge_clamp ) - { - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE ); - } - else - { - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP ); - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP ); - qglTexParameteri( GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP ); - } - - if( subImage ) - qglTexSubImage3D( GL_TEXTURE_3D, 0, 0, 0, 0, scaledWidth, scaledHeight, scaledDepth, format, GL_UNSIGNED_BYTE, data[0] ); - else - qglTexImage3D( GL_TEXTURE_3D, 0, comp, scaledWidth, scaledHeight, scaledDepth, 0, format, GL_UNSIGNED_BYTE, data[0] ); -} - -/* -================ -R_InitPic -================ -*/ -static inline image_t *R_InitPic( const char *name, qbyte **pic, int width, int height, int depth, int flags, int samples ) -{ - image_t *image; - - if( r_numImages == MAX_GLIMAGES ) - Com_Error( ERR_DROP, "R_LoadPic: r_numImages == MAX_GLIMAGES" ); - - image = &images[r_numImages++]; - image->name = Mem_Alloc( r_texturesPool, strlen( name ) + 1 ); - strcpy( image->name, name ); - image->width = width; - image->height = height; - image->depth = image->upload_depth = depth; - image->flags = flags; - image->samples = samples; - image->fbo = 0; - - // add to hash table - if( image_cur_hash >= IMAGES_HASH_SIZE ) - image_cur_hash = Com_HashKey( name, IMAGES_HASH_SIZE ); - image->hash_next = images_hash[image_cur_hash]; - images_hash[image_cur_hash] = image; - - qglGenTextures( 1, &image->texnum ); - GL_Bind( 0, image ); - - if( depth == 1 ) - R_Upload32( pic, width, height, flags, &image->upload_width, &image->upload_height, &image->samples, qfalse ); - else - R_Upload32_3D_Fast( pic, width, height, depth, flags, &image->upload_width, &image->upload_height, &image->upload_depth, &image->samples, qfalse ); - - if( flags & IT_FRAMEBUFFER ) - { - image->fbo = R_RegisterFBObject (); - if( image->fbo - &&! R_AttachTextureToFBOject( image->fbo, image, (image->flags & IT_DEPTH ? qtrue : qfalse) ) ) - { - Com_Printf( S_COLOR_YELLOW "Warning: Error attaching texture to a FBO: %s\n", image->name ); - image->fbo = 0; - } - } - - image_cur_hash = IMAGES_HASH_SIZE+1; - return image; -} - -/* -================ -R_LoadPic -================ -*/ -image_t *R_LoadPic( const char *name, qbyte **pic, int width, int height, int flags, int samples ) -{ - qbyte **data = pic; - - if( flags & IT_MIPTEX ) - samples = LoadMipTex( data, width, height, flags ); - - if( !(flags & IT_CUBEMAP) ) - { - qbyte *temp; - - if( flags & IT_LEFTHALF ) - { - temp = R_PrepareImageBuffer( TEXTURE_CUT_BUF, width/2 * height * 4 ); - R_CutImage( *data, width, height, temp, 0, 0, width/2, height ); - data = &temp; - width /= 2; - } - else if( flags & IT_RIGHTHALF ) - { - temp = R_PrepareImageBuffer( TEXTURE_CUT_BUF, width/2 * height * 4 ); - R_CutImage( *data, width, height, temp, width/2, 0, width/2, height ); - data = &temp; - width /= 2; - } - - if( flags & ( IT_FLIPX|IT_FLIPY|IT_FLIPDIAGONAL ) ) - { - temp = R_PrepareImageBuffer( TEXTURE_FLIPPING_BUF0, width * height * 4 ); - R_FlipTexture( *data, temp, width, height, 4, (flags & IT_FLIPX), (flags & IT_FLIPY), (flags & IT_FLIPDIAGONAL) ); - data = &temp; - } - } - - return R_InitPic( name, data, width, height, 1, flags, samples ); -} - -/* -================ -R_Load3DPic -================ -*/ -image_t *R_Load3DPic( const char *name, qbyte **pic, int width, int height, int depth, int flags, int samples ) -{ - return R_InitPic( name, pic, width, height, depth, flags, samples ); -} - -/* -=============== -R_FindImage - -Finds or loads the given image -=============== -*/ -image_t *R_FindImage( const char *name, const char *suffix, int flags, float bumpScale ) -{ - int i, lastDot; - unsigned int len, key; - image_t *image; - int width = 1, height = 1, samples = 0; - char *pathname; - const char *extension = ""; - size_t pathsize; - - if( !name || !name[0] ) - return NULL; // Com_Error (ERR_DROP, "R_FindImage: NULL name"); - - ENSUREBUFSIZE( imagePathBuf, strlen( name ) + (suffix ? strlen( suffix ) : 0) + 5 ); - pathname = r_imagePathBuf; - pathsize = r_sizeof_imagePathBuf; - - lastDot = -1; - for( i = ( name[0] == '/' || name[0] == '\\' ), len = 0; name[i]; i++ ) - { - if( name[i] == '.' ) - lastDot = len; - if( name[i] == '\\' ) - pathname[len++] = '/'; - else - pathname[len++] = tolower( name[i] ); - } - - if( len < 5 ) - return NULL; - - if( lastDot != -1 ) - { - len = lastDot; - extension = &name[len]; - } - - pathname[len] = 0; - if( suffix ) - { - for( i = 0; suffix[i]; i++ ) - pathname[len++] = tolower( suffix[i] ); - } - - // look for it - key = image_cur_hash = Com_HashKey( pathname, IMAGES_HASH_SIZE ); - if( flags & IT_HEIGHTMAP ) - { - for( image = images_hash[key]; image; image = image->hash_next ) - { - if( ( ( image->flags & flags ) == flags ) && ( image->bumpScale == bumpScale ) && !strcmp( image->name, pathname ) ) - return image; - } - } - else - { - for( image = images_hash[key]; image; image = image->hash_next ) - { - if( ( ( image->flags & flags ) == flags ) && !strcmp( image->name, pathname ) ) - return image; - } - } - - pathname[len] = 0; - image = NULL; - - // - // load the pic from disk - // - if( flags & IT_CUBEMAP ) - { - qbyte *pic[6]; - struct cubemapSufAndFlip - { - char *suf; int flags; - } cubemapSides[2][6] = { - { - { "px", 0 }, { "nx", 0 }, { "py", 0 }, - { "ny", 0 }, { "pz", 0 }, { "nz", 0 } - }, - { - { "rt", IT_FLIPDIAGONAL }, { "lf", IT_FLIPX|IT_FLIPY|IT_FLIPDIAGONAL }, { "bk", IT_FLIPY }, - { "ft", IT_FLIPX }, { "up", IT_FLIPDIAGONAL }, { "dn", IT_FLIPDIAGONAL } - } - }; - int j, lastSize = 0; - - pathname[len] = '_'; - for( i = 0; i < 2; i++ ) - { - for( j = 0; j < 6; j++ ) - { - pathname[len+1] = cubemapSides[i][j].suf[0]; - pathname[len+2] = cubemapSides[i][j].suf[1]; - pathname[len+3] = 0; - - Q_strncatz( pathname, extension, pathsize ); - samples = R_LoadImageFromDisk( pathname, pathsize, &(pic[j]), &width, &height, &flags, j ); - if( pic[j] ) - { - if( width != height ) - { - Com_Printf( "Not square cubemap image %s\n", pathname ); - break; - } - if( !j ) - { - lastSize = width; - } - else if( lastSize != width ) - { - Com_Printf( "Different cubemap image size: %s\n", pathname ); - break; - } - if( cubemapSides[i][j].flags & ( IT_FLIPX|IT_FLIPY|IT_FLIPDIAGONAL ) ) - { - int flags = cubemapSides[i][j].flags; - qbyte *temp = R_PrepareImageBuffer( TEXTURE_FLIPPING_BUF0+j, width * height * 4 ); - R_FlipTexture( pic[j], temp, width, height, 4, (flags & IT_FLIPX), (flags & IT_FLIPY), (flags & IT_FLIPDIAGONAL) ); - pic[j] = temp; - } - continue; - } - break; - } - if( j == 6 ) - break; - } - - if( i != 2 ) - { - pathname[len] = 0; - image = R_LoadPic( pathname, pic, width, height, flags, samples ); - image->extension[0] = '.'; - Q_strncpyz( &image->extension[1], &pathname[len+4], sizeof( image->extension )-1 ); - } - } - else - { - qbyte *pic; - - Q_strncatz( pathname, extension, pathsize ); - samples = R_LoadImageFromDisk( pathname, pathsize, &pic, &width, &height, &flags, 0 ); - - if( pic ) - { - qbyte *temp; - - if( flags & IT_NORMALMAP ) - { - if( (samples == 3) && glConfig.ext.GLSL ) - samples = R_MergeNormalmapDepthmap( pathname, pic, width, height ); - } - else if( flags & IT_HEIGHTMAP ) - { - temp = R_PrepareImageBuffer( TEXTURE_FLIPPING_BUF0, width * height * 4 ); - samples = R_HeightmapToNormalmap( pic, temp, width, height, bumpScale ); - pic = temp; - } - - pathname[len] = 0; - image = R_LoadPic( pathname, &pic, width, height, flags, samples ); - image->extension[0] = '.'; - Q_strncpyz( &image->extension[1], &pathname[len+1], sizeof( image->extension )-1 ); - } - } - - return image; -} - -/* -============================================================================== - -SCREEN SHOTS - -============================================================================== -*/ - -/* -================== -R_ScreenShot -================== -*/ -static void R_ScreenShot( const char *name, qboolean silent ) -{ - char *checkname = NULL; - size_t checkname_size; - qbyte *buffer; - - if( name && name[0] && Q_stricmp(name, "*") ) - { - checkname_size = sizeof( char ) * ( strlen( "screenshots/" ) + strlen( name ) + strlen( ".jpg" ) + 1 ); - checkname = Mem_TempMalloc( checkname_size ); - Q_snprintfz( checkname, checkname_size, "screenshots/%s", name ); - - COM_SanitizeFilePath( checkname ); - - if( !COM_ValidateRelativeFilename( checkname ) ) - { - Com_Printf( "Invalid filename\n" ); - Mem_Free( checkname ); - return; - } - - if( r_screenshot_jpeg->integer ) - COM_DefaultExtension( checkname, ".jpg", checkname_size ); - else - COM_DefaultExtension( checkname, ".tga", checkname_size ); - } - - // - // find a file name to save it to - // - if( !checkname ) - { - static int lastIndex = 0; - - checkname_size = sizeof( char ) * ( strlen( "screenshots/wsw" ) + 5 + strlen( ".jpg" ) + 1 ); - checkname = Mem_TempMalloc( checkname_size ); - - // force a rescan - if( r_screenshot_jpeg->modified ) - { - lastIndex = 0; - r_screenshot_jpeg->modified = qfalse; - } - - for( ; lastIndex < 100000; lastIndex++ ) - { - if( r_screenshot_jpeg->integer ) - Q_snprintfz( checkname, checkname_size, "screenshots/wsw%05i.jpg", lastIndex ); - else - Q_snprintfz( checkname, checkname_size, "screenshots/wsw%05i.tga", lastIndex ); - if( FS_FOpenFile( checkname, NULL, FS_READ ) == -1 ) - break; // file doesn't exist - } - - if( lastIndex == 100000 ) - { - Com_Printf( "Couldn't create a file\n" ); - Mem_Free( checkname ); - return; - } - - lastIndex++; - } - - if( r_screenshot_jpeg->integer ) - { - buffer = Mem_Alloc( r_texturesPool, glState.width * glState.height * 3 ); - qglReadPixels( 0, 0, glState.width, glState.height, GL_RGB, GL_UNSIGNED_BYTE, buffer ); - - if( WriteJPG( checkname, buffer, glState.width, glState.height, r_screenshot_jpeg_quality->integer ) && !silent ) - Com_Printf( "Wrote %s\n", checkname ); - } - else - { - buffer = Mem_Alloc( r_texturesPool, 18 + glState.width * glState.height * 3 ); - qglReadPixels( 0, 0, glState.width, glState.height, glConfig.ext.bgra ? GL_BGR_EXT : GL_RGB, GL_UNSIGNED_BYTE, buffer + 18 ); - - if( WriteTGA( checkname, buffer, glState.width, glState.height, glConfig.ext.bgra ) && !silent ) - Com_Printf( "Wrote %s\n", checkname ); - } - - Mem_Free( buffer ); - Mem_Free( checkname ); -} - -/* -================== -R_ScreenShot_f -================== -*/ -void R_ScreenShot_f( void ) -{ - R_ScreenShot( Cmd_Argv( 1 ), Cmd_Argc() >= 3 && !Q_stricmp( Cmd_Argv( 2 ), "silent" ) ); -} - -/* -================== -R_EnvShot_f -================== -*/ -void R_EnvShot_f( void ) -{ - int i; - int size, maxSize; - qbyte *buffer, *bufferFlipped; - int checkname_size; - char *checkname; - struct cubemapSufAndFlip - { - char *suf; vec3_t angles; int flags; - } cubemapShots[6] = { - { "px", { 0, 0, 0 }, IT_FLIPX|IT_FLIPY|IT_FLIPDIAGONAL }, - { "nx", { 0, 180, 0 }, IT_FLIPDIAGONAL }, - { "py", { 0, 90, 0 }, IT_FLIPY }, - { "ny", { 0, 270, 0 }, IT_FLIPX }, - { "pz", { -90, 180, 0 }, IT_FLIPDIAGONAL }, - { "nz", { 90, 180, 0 }, IT_FLIPDIAGONAL } - }; - - if( !r_worldmodel ) - return; - - if( Cmd_Argc() != 3 ) - { - Com_Printf( "usage: envshot <name> <size>\n" ); - return; - } - - maxSize = min( glState.width, glState.height ); - if( maxSize > atoi( Cmd_Argv( 2 ) ) ) - maxSize = atoi( Cmd_Argv( 2 ) ); - - for( size = 1; size < maxSize; size <<= 1 ) ; - if( size > maxSize ) - size >>= 1; - - // do not render non-bmodel entities - ri.params |= RP_ENVVIEW; - - buffer = Mem_Alloc( r_texturesPool, (size * size * 3) * 2 + 18 ); - bufferFlipped = buffer + size * size * 3; - - checkname_size = sizeof( char ) * ( strlen( "env/" ) + strlen( Cmd_Argv( 1 ) ) + 1 + strlen( cubemapShots[0].suf ) + 4 + 1 ); - checkname = Mem_TempMalloc( checkname_size ); - - for( i = 0; i < 6; i++ ) - { - R_DrawCubemapView( r_lastRefdef.vieworg, cubemapShots[i].angles, size ); - - qglReadPixels( 0, glState.height - size, size, size, glConfig.ext.bgra ? GL_BGR_EXT : GL_RGB, GL_UNSIGNED_BYTE, buffer ); - - R_FlipTexture( buffer, bufferFlipped + 18, size, size, 3, ( cubemapShots[i].flags & IT_FLIPX ), ( cubemapShots[i].flags & IT_FLIPY ), ( cubemapShots[i].flags & IT_FLIPDIAGONAL ) ); - - Q_snprintfz( checkname, checkname_size, "env/%s_%s", Cmd_Argv( 1 ), cubemapShots[i].suf ); - //if( r_screenshot_jpeg->integer ) { - // COM_DefaultExtension( checkname, ".jpg", sizeof(checkname) ); - // if( WriteJPG( checkname, bufferFlipped, size, size, r_screenshot_jpeg_quality->integer ) ) - // Com_Printf( "Wrote envshot %s\n", checkname ); - //} else { - COM_DefaultExtension( checkname, ".tga", checkname_size ); - if( WriteTGA( checkname, bufferFlipped, size, size, glConfig.ext.bgra ) ) - Com_Printf( "Wrote envshot %s\n", checkname ); - //} - } - - // render non-bmodel entities again - ri.params &= ~RP_ENVVIEW; - - Mem_Free( checkname ); - Mem_Free( buffer ); -} - -/* -================== -R_BeginAviDemo -================== -*/ -void R_BeginAviDemo( void ) -{ - if( r_aviBuffer ) - Mem_Free( r_aviBuffer ); - r_aviBuffer = Mem_Alloc( r_texturesPool, 18 + glState.width * glState.height * 3 ); -} - -/* -================== -R_WriteAviFrame -================== -*/ -void R_WriteAviFrame( int frame, qboolean scissor ) -{ - int x, y, w, h; - int checkname_size; - char *checkname; - - if( !r_aviBuffer ) - return; - - if( scissor ) - { - x = r_lastRefdef.x; - y = glState.height - r_lastRefdef.height - r_lastRefdef.y; - w = r_lastRefdef.width; - h = r_lastRefdef.height; - } - else - { - x = 0; - y = 0; - w = glState.width; - h = glState.height; - } - - checkname_size = sizeof( char ) * ( strlen( "avi/avi" ) + 6 + 4 + 1 ); - checkname = Mem_TempMalloc( checkname_size ); - Q_snprintfz( checkname, checkname_size, "avi/avi%06i", frame ); - - if( r_screenshot_jpeg->integer ) - { - COM_DefaultExtension( checkname, ".jpg", checkname_size ); - qglReadPixels( x, y, w, h, GL_RGB, GL_UNSIGNED_BYTE, r_aviBuffer ); - WriteJPG( checkname, r_aviBuffer, w, h, r_screenshot_jpeg_quality->integer ); - } - else - { - COM_DefaultExtension( checkname, ".tga", checkname_size ); - qglReadPixels( x, y, w, h, glConfig.ext.bgra ? GL_BGR_EXT : GL_RGB, GL_UNSIGNED_BYTE, r_aviBuffer + 18 ); - WriteTGA( checkname, r_aviBuffer, w, h, glConfig.ext.bgra ); - } - - Mem_Free( checkname ); -} - -/* -================== -R_StopAviDemo -================== -*/ -void R_StopAviDemo( void ) -{ - if( r_aviBuffer ) - { - Mem_Free( r_aviBuffer ); - r_aviBuffer = NULL; - } -} - -//======================================================= - -/* -================== -R_InitNoTexture -================== -*/ -static qbyte *R_InitNoTexture( int *w, int *h, int *depth, int *flags, int *samples ) -{ - int x, y; - qbyte *data; - qbyte dottexture[8][8] = - { - { 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 1, 1, 1, 1, 0, 0, 0 }, - { 0, 1, 1, 1, 1, 0, 0, 0 }, - { 0, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0 }, - }; - - // - // also use this for bad textures, but without alpha - // - *w = *h = 8; - *depth = 1; - *flags = 0; - *samples = 3; - - data = R_PrepareImageBuffer( TEXTURE_LOADING_BUF0, 8 * 8 * 4 ); - for( x = 0; x < 8; x++ ) - { - for( y = 0; y < 8; y++ ) - { - data[( y*8 + x )*4+0] = dottexture[x&3][y&3]*127; - data[( y*8 + x )*4+1] = dottexture[x&3][y&3]*127; - data[( y*8 + x )*4+2] = dottexture[x&3][y&3]*127; - } - } - - return data; -} - -/* -================== -R_InitDynamicLightTexture -================== -*/ -static qbyte *R_InitDynamicLightTexture( int *w, int *h, int *depth, int *flags, int *samples ) -{ - vec3_t v = { 0, 0, 0 }; - float intensity; - int x, y, z, d, size; - qbyte *data; - - // - // dynamic light texture - // - if( glConfig.ext.texture3D ) - { - size = 32; - *depth = 32; - } - else - { - size = 64; - *depth = 1; - } - - *w = *h = size; - *flags = IT_NOPICMIP|IT_NOMIPMAP|IT_CLAMP|IT_NOCOMPRESS|IT_LUMINANCE; - *samples = 1; - - data = R_PrepareImageBuffer( TEXTURE_LOADING_BUF0, size * size * *depth ); - for( x = 0; x < size; x++ ) - { - for( y = 0; y < size; y++ ) - { - for( z = 0; z < *depth; z++ ) - { - v[0] = ( ( x + 0.5f ) * ( 2.0f / (float)size ) - 1.0f ); - v[1] = ( ( y + 0.5f ) * ( 2.0f / (float)size ) - 1.0f ); - if( *depth > 1 ) - v[2] = ( ( z + 0.5f ) * ( 2.0f / (float)*depth ) - 1.0f ); - - intensity = 1.0f - sqrt( DotProduct( v, v ) ); - if( intensity > 0 ) - intensity = intensity * intensity * 215.5f; - d = bound( 0, intensity, 255 ); - - data[( z*size+y )*size + x] = d; - } - } - } - return data; -} - -/* -================== -R_InitSolidColorTexture -================== -*/ -static qbyte *R_InitSolidColorTexture( int *w, int *h, int *depth, int *flags, int *samples, int color ) -{ - qbyte *data; - - // - // solid color texture - // - *w = *h = 1; - *depth = 1; - *flags = IT_NOPICMIP|IT_NOCOMPRESS; - *samples = 3; - - data = R_PrepareImageBuffer( TEXTURE_LOADING_BUF0, 1 * 1 * 4 ); - data[0] = data[1] = data[2] = color; - return data; -} - -/* -================== -R_InitParticleTexture -================== -*/ -static qbyte *R_InitParticleTexture( int *w, int *h, int *depth, int *flags, int *samples ) -{ - int x, y; - int dx2, dy, d; - qbyte *data; - - // - // particle texture - // - *w = *h = 16; - *depth = 1; - *flags = IT_NOPICMIP|IT_NOMIPMAP; - *samples = 4; - - data = R_PrepareImageBuffer( TEXTURE_LOADING_BUF0, 16 * 16 * 4 ); - for( x = 0; x < 16; x++ ) - { - dx2 = x - 8; - dx2 = dx2 * dx2; - - for( y = 0; y < 16; y++ ) - { - dy = y - 8; - d = 255 - 35 *sqrt( dx2 + dy *dy ); - data[( y*16 + x ) * 4 + 3] = bound( 0, d, 255 ); - } - } - return data; -} - -/* -================== -R_InitWhiteTexture -================== -*/ -static qbyte *R_InitWhiteTexture( int *w, int *h, int *depth, int *flags, int *samples ) -{ - return R_InitSolidColorTexture( w, h, depth, flags, samples, 255 ); -} - -/* -================== -R_InitBlackTexture -================== -*/ -static qbyte *R_InitBlackTexture( int *w, int *h, int *depth, int *flags, int *samples ) -{ - return R_InitSolidColorTexture( w, h, depth, flags, samples, 0 ); -} - -/* -================== -R_InitBlankBumpTexture -================== -*/ -static qbyte *R_InitBlankBumpTexture( int *w, int *h, int *depth, int *flags, int *samples ) -{ - qbyte *data = R_InitSolidColorTexture( w, h, depth, flags, samples, 128 ); - -/* - data[2] = 128; // normal X - data[1] = 128; // normal Y -*/ - data[0] = 255; // normal Z - data[3] = 128; // height - - return data; -} - -/* -================== -R_InitFogTexture -================== -*/ -static qbyte *R_InitFogTexture( int *w, int *h, int *depth, int *flags, int *samples ) -{ - qbyte *data; - int x, y; - double tw = 1.0f / ( (float)FOG_TEXTURE_WIDTH - 1.0f ); - double th = 1.0f / ( (float)FOG_TEXTURE_HEIGHT - 1.0f ); - double tx, ty, t; - - // - // fog texture - // - *w = FOG_TEXTURE_WIDTH; - *h = FOG_TEXTURE_HEIGHT; - *depth = 1; - *flags = IT_NOMIPMAP|IT_CLAMP; - *samples = 4; - - data = R_PrepareImageBuffer( TEXTURE_LOADING_BUF0, FOG_TEXTURE_WIDTH*FOG_TEXTURE_HEIGHT*4 ); - for( y = 0, ty = 0.0f; y < FOG_TEXTURE_HEIGHT; y++, ty += th ) - { - for( x = 0, tx = 0.0f; x < FOG_TEXTURE_WIDTH; x++, tx += tw ) - { - t = sqrt( tx ) * 255.0; - data[( x+y*FOG_TEXTURE_WIDTH )*4+3] = (qbyte)( min( t, 255.0 ) ); - } - data[y*4+3] = 0; - } - return data; -} - -/* -================== -R_InitCoronaTexture -================== -*/ -static qbyte *R_InitCoronaTexture( int *w, int *h, int *depth, int *flags, int *samples ) -{ - int x, y, a; - float dx, dy; - qbyte *data; - - // - // light corona texture - // - *w = *h = 32; - *depth = 1; - *flags = IT_NOMIPMAP|IT_NOPICMIP|IT_NOCOMPRESS|IT_CLAMP; - *samples = 4; - - data = R_PrepareImageBuffer( TEXTURE_LOADING_BUF0, 32 * 32 * 4 ); - for( y = 0; y < 32; y++ ) - { - dy = ( y - 15.5f ) * ( 1.0f / 16.0f ); - for( x = 0; x < 32; x++ ) - { - dx = ( x - 15.5f ) * ( 1.0f / 16.0f ); - a = (int)( ( ( 1.0f / ( dx * dx + dy * dy + 0.2f ) ) - ( 1.0f / ( 1.0f + 0.2 ) ) ) * 32.0f / ( 1.0f / ( 1.0f + 0.2 ) ) ); - clamp( a, 0, 255 ); - data[( y*32+x )*4+0] = data[( y*32+x )*4+1] = data[( y*32+x )*4+2] = a; - } - } - return data; -} - -/* -================== -R_InitScreenTexture -================== -*/ -static void R_InitScreenTexture( image_t **texture, const char *name, const char *key, int id, int screenWidth, int screenHeight, int size, int flags, int samples, qboolean screenLimit ) -{ - int limit; - int width, height; - image_t *t; - - // limit the texture size to either screen resolution in case we can't use FBO - // or hardware limits and ensure it's a POW2-texture if we don't support such textures - limit = glConfig.maxTextureSize; - if( size ) - limit = min( limit, size ); - if( limit < 1 ) - limit = 1; - width = height = limit; - - if( glConfig.ext.texture_non_power_of_two ) - { - if( screenLimit ) - { - width = min( screenWidth, limit ); - height = min( screenHeight, limit ); - } - } - else - { - if( screenLimit ) - limit = min( limit, min( screenWidth, screenHeight ) ); - for( size = 2; size <= limit; size <<= 1 ); - width = height = size >> 1; - } - - // create a new texture or update the old one - if( !( *texture ) || ( *texture )->width != width || ( *texture )->height != height ) - { - qbyte *data = NULL; - - if( !*texture ) - { - char uploadName[128]; - - if( key && *key ) - Q_snprintfz( uploadName, sizeof( uploadName ), "***%s_%s_%i***", name, key, id ); - else - Q_snprintfz( uploadName, sizeof( uploadName ), "***%s_%i***", name, id ); - *texture = R_LoadPic( uploadName, &data, width, height, flags, samples ); - return; - } - - t = *texture; - GL_Bind( 0, t ); - t->width = width; - t->height = height; - R_Upload32( &data, width, height, flags, &t->upload_width, &t->upload_height, &t->samples, qfalse ); - - // update FBO if attached - if( t->fbo ) - { - if( !R_AttachTextureToFBOject( t->fbo, t, (flags & IT_DEPTH ? qtrue : qfalse) ) ) - { - Com_Printf( S_COLOR_YELLOW "Warning: Error attaching texture to a FBO: %s\n", t->name ); - t->fbo = 0; - } - } - } -} - -/* -================== -R_InitPortalTexture -================== -*/ -void R_InitPortalTexture( image_t **texture, const char *key, int id, int screenWidth, int screenHeight, int flags ) -{ - int size = r_portalmaps_maxtexsize->integer ? r_portalmaps_maxtexsize->integer : glConfig.maxTextureSize; - qboolean screenLimit = qtrue; - -// if( size > glConfig.maxTextureSize / 2 ) size = glConfig.maxTextureSize / 2; - if( size > 2048 ) size = 2048; - - R_InitScreenTexture( texture, "r_portaltexture", key, id, screenWidth, screenHeight, size, IT_PORTALMAP|IT_FRAMEBUFFER|flags, 3, screenLimit ); -} - -/* -================== -R_InitShadowmapTexture -================== -*/ -void R_InitShadowmapTexture( image_t **texture, int id, int screenWidth, int screenHeight, int flags ) -{ - int size = r_shadows_maxtexsize->integer; - qboolean screenLimit = (!glConfig.ext.framebuffer_object ? qtrue : qfalse); - - R_InitScreenTexture( texture, "r_shadowmap", NULL, id, screenWidth, screenHeight, size, IT_SHADOWMAP|IT_FRAMEBUFFER|flags, 1, screenLimit ); -} - - -/* -=============== -R_FindPortalTextureSlot -=============== -*/ -int R_FindPortalTextureSlot( const char *key, int id ) -{ - int i; - image_t *image; - char uploadName[128]; - const char *name = "r_portaltexture"; - - if( key && *key ) - Q_snprintfz( uploadName, sizeof( uploadName ), "***%s_%s_%i***", name, key, id ); - else - Q_snprintfz( uploadName, sizeof( uploadName ), "***%s_%i***", name, id ); - - for( i = 0; ; i++ ) - { - image = r_portaltextures[i]; - if( !image ) - break; - - if( !strcmp( image->name, uploadName ) ) - return i+1; - } - - if( i == MAX_PORTAL_TEXTURES ) - return 0; - - return i+1; -} - -/* -================== -R_InitCinematicTexture -================== -*/ -static void R_InitCinematicTexture( void ) -{ - // reserve a dummy texture slot - r_cintexture = &images[r_numImages++]; - qglGenTextures( 1, &r_cintexture->texnum ); - r_cintexture->depth = 1; -} - -/* -================== -R_InitBuiltinTextures -================== -*/ -static void R_InitBuiltinTextures( void ) -{ - qbyte *data; - int w, h, depth, flags, samples; - image_t *image; - const struct - { - char *name; - image_t **image; - qbyte *( *init )( int *w, int *h, int *depth, int *flags, int *samples ); - } - textures[] = - { - { "***r_notexture***", &r_notexture, R_InitNoTexture }, - { "***r_whitetexture***", &r_whitetexture, R_InitWhiteTexture }, - { "***r_blacktexture***", &r_blacktexture, R_InitBlackTexture }, - { "***r_blankbumptexture***", &r_blankbumptexture, R_InitBlankBumpTexture }, - { "***r_dlighttexture***", &r_dlighttexture, R_InitDynamicLightTexture }, - { "***r_particletexture***", &r_particletexture, R_InitParticleTexture }, - { "***r_fogtexture***", &r_fogtexture, R_InitFogTexture }, - { "***r_coronatexture***", &r_coronatexture, R_InitCoronaTexture }, - - { NULL, NULL, NULL } - }; - size_t i, num_builtin_textures = sizeof( textures ) / sizeof( textures[0] ) - 1; - - for( i = 0; i < num_builtin_textures; i++ ) - { - data = textures[i].init( &w, &h, &depth, &flags, &samples ); - assert( data ); - - image = ( depth == 1 ? - R_LoadPic( textures[i].name, &data, w, h, flags, samples ) : - R_Load3DPic( textures[i].name, &data, w, h, depth, flags, samples ) - ); - - if( textures[i].image ) - *( textures[i].image ) = image; - } -} - -//======================================================= - -/* -=============== -R_InitImages -=============== -*/ -void R_InitImages( void ) -{ - r_texturesPool = Mem_AllocPool( NULL, "Textures" ); - image_cur_hash = IMAGES_HASH_SIZE+1; - - r_imagePathBuf = r_imagePathBuf2 = NULL; - r_sizeof_imagePathBuf = r_sizeof_imagePathBuf2 = 0; - - r_8to24table = NULL; - - R_InitCinematicTexture(); - R_InitBuiltinTextures(); - R_InitBloomTextures(); -} - -/* -=============== -R_ShutdownImages -=============== -*/ -void R_ShutdownImages( void ) -{ - int i; - - if( !r_texturesPool ) - return; - - R_StopAviDemo (); - - R_FreeImageBuffers (); - - for( i = 0; i < r_numImages; i++ ) - { - qglDeleteTextures( 1, &images[i].texnum ); - Mem_Free( images[i].name ); - } - - if( r_imagePathBuf ) - Mem_Free( r_imagePathBuf ); - if( r_imagePathBuf2 ) - Mem_Free( r_imagePathBuf2 ); - - if( r_8to24table ) - { - Mem_Free( r_8to24table ); - r_8to24table = NULL; - } - - Mem_FreePool( &r_texturesPool ); - - memset( r_portaltextures, 0, sizeof( image_t * ) * MAX_PORTAL_TEXTURES ); - memset( r_shadowmapTextures, 0, sizeof( image_t * ) * MAX_SHADOWGROUPS ); - - r_imagePathBuf = r_imagePathBuf2 = NULL; - r_sizeof_imagePathBuf = r_sizeof_imagePathBuf2 = 0; - - r_numImages = 0; - memset( images, 0, sizeof( images ) ); - memset( r_lightmapTextures, 0, sizeof( r_lightmapTextures ) ); - memset( images_hash, 0, sizeof( images_hash ) ); -} diff --git a/warsow/warsow.desktop b/warsow/warsow.desktop deleted file mode 100644 index 839e13e..0000000 --- a/warsow/warsow.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Warsow -GenericName=Warsow -Comment=Online Multiplayer Competitive FPS -Icon=/usr/share/pixmaps/warsow.ico -Exec=/usr/bin/warsow -Terminal=false -Type=Application -Categories=Application;Game -StartupNotify=true diff --git a/warsow/warsow.launcher b/warsow/warsow.launcher deleted file mode 100644 index 64dac41..0000000 --- a/warsow/warsow.launcher +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd "/opt/warsow" -./warsow $* -exit $? diff --git a/warsow/wsw-server.launcher b/warsow/wsw-server.launcher deleted file mode 100644 index 5035253..0000000 --- a/warsow/wsw-server.launcher +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd "/opt/warsow" -./wsw_server $* -exit $? diff --git a/warsow/wswtv-server.launcher b/warsow/wswtv-server.launcher deleted file mode 100644 index 10f70a2..0000000 --- a/warsow/wswtv-server.launcher +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd "/opt/warsow" -./wswtv_server $* -exit $? diff --git a/warzone-svn/PKGBUILD b/warzone-svn/PKGBUILD deleted file mode 100644 index ba41f7a..0000000 --- a/warzone-svn/PKGBUILD +++ /dev/null @@ -1,40 +0,0 @@ -# Maintainer: Arkham <arkham at archlinux dot us> -# Contributor: Markus Pargmann <scosu@gmx.de> - -pkgname=warzone-svn -pkgver=7830 -pkgrel=1 -pkgdesc="3D realtime strategy game on a future Earth (svn version)" -arch=('i686' 'x86_64') -url="http://wz2100.net/" -license=('GPL') -depends=('sdl_net' 'libgl' 'openal' 'libjpeg' 'libpng' 'libvorbis' 'libmad' 'physfs' 'quesoglc' 'flex' 'sqlite3') -makedepends=('subversion' 'gawk' 'zip' 'unzip' 'rsync' 'pkgconfig') -conflicts=('warzone') -provides=('warzone') -source=() -md5sums=() -options=('!strip') -export CFLAGS="-g -pipe" -export CXXFLAGS="-g -pipe" - -_svntrunk=http://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk -_svnmod=warzone - -build() { - cd $srcdir - svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod - msg "SVN checkout done or server timeout" - - msg "Preparing build dir" - rsync -a --delete $_svnmod/ build/ || return 1 - cd build || return 1 - - msg "Starting build" - ./autogen.sh - ./configure --prefix=/usr --enable-data --enable-debug=yes - sed -i -e 's/#define _XOPEN_SOURCE 600/#ifndef _XOPEN_SOURCE\n# define _XOPEN_SOURCE 600\n#endif/' config.h - - make || return 1 - make DESTDIR=$pkgdir install || return 1 -} diff --git a/weechat-git/PKGBUILD b/weechat-git/PKGBUILD deleted file mode 100644 index dc724fa..0000000 --- a/weechat-git/PKGBUILD +++ /dev/null @@ -1,50 +0,0 @@ -# Maintainer: Licia Todd <tigrmesh at aol dot com> -# Contributor: Tim Zebulla <amon at faumrahrer dot de> - -pkgname=weechat-git -pkgver=20100804 -pkgrel=1 -pkgdesc="Fast, light & extensible IRC client (curses UI)" -arch=('i686' 'x86_64') -url="http://weechat.flashtux.org" -license=('GPL3') -depends=('aspell' 'iksemel') -makedepends=('git' 'cmake') -optdepends=('tcl: tcl scripting support' - 'perl>=5.10: perl scripting support' - 'python>=2.6: python scripting support' - 'lua: lua scripting support' - 'ruby: ruby scripting support') -provides=('weechat') -conflicts=('weechat') -options=(!strip) -install=weechatgit.install - -_gitroot="git://git.sv.gnu.org/weechat.git" -_gitname="weechat" - -build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [ -d $_gitname ] ; then - cd $_gitname && git pull origin - msg "The local files are updated." - else - msg "First time connected - cloning repo, this may take a while..." - git clone $_gitroot - fi - - msg "GIT checkout done or server timeout" - msg "Starting cmake..." - - rm -rf "$srcdir/$_gitname-build" - git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" - - cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_DOC=ON -DPREFIX=/usr || return 1 - make DESTDIR="$pkgdir/" install -} -# note - to disable an option, use -DDISABLE_RUBY=ON -# this should change soon, and will be -DENABLE_RUBY=OFF -# also, you can see the configure options with ccmake, then just -DOPTIONHERE=ON/OFF diff --git a/weechat-git/weechatgit.install b/weechat-git/weechatgit.install deleted file mode 100644 index be10994..0000000 --- a/weechat-git/weechatgit.install +++ /dev/null @@ -1,6 +0,0 @@ -post_install() { - echo "------------------------------------------------------------------------------" - echo "You've just built weechat from GIT." - echo "This is a development version and may therefore be unstable." - echo "------------------------------------------------------------------------------" -} diff --git a/weechat/PKGBUILD b/weechat/PKGBUILD deleted file mode 100644 index 709bf93..0000000 --- a/weechat/PKGBUILD +++ /dev/null @@ -1,26 +0,0 @@ -# $Id$ -# Maintainer: Giovanni Scafora <giovanni@archlinux.org> -# Contributor: lucke <lucke at o2 dot pl> - -pkgname=weechat -pkgver=0.3.0 -pkgrel=2 -pkgdesc="Fast, light and extensible IRC client (curses UI)" -arch=('i686' 'x86_64') -url="http://www.weechat.org/" -license=('GPL') -depends=('gnutls>=2.6.4' 'aspell' 'tcl') -makedepends=('pkgconfig' 'perl>=5.10' 'python>=2.6' 'lua') -optdepends=('perl>=5.10' 'python>=2.6' 'lua' 'ruby') -source=(http://www.weechat.org/files/src/$pkgname-$pkgver.tar.bz2) -options=(!libtool) -md5sums=('c31cfc229e964ff9257cc9c7f9e6c9bc') - -build() { - cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix=/usr \ - --enable-ruby \ - --with-debug=0 LDFLAGS="-lm -ldl" - make || return 1 - make DESTDIR="${pkgdir}/" install -} diff --git a/wicd-kde/PKGBUILD b/wicd-kde/PKGBUILD deleted file mode 100644 index c5ef264..0000000 --- a/wicd-kde/PKGBUILD +++ /dev/null @@ -1,32 +0,0 @@ -# Contributor: Marvn <mistrmarvn@gmail.com> - -pkgname=wicd-kde -pkgver=0.2.2 -pkgrel=1 -pkgdesc="Wicd client build on the KDE Development Platform" -arch=("i686" "x86_64") -url="http://kde-apps.org/content/show.php/Wicd+Client+KDE?content=132366" -license=('GPL') -depends=('kdelibs' 'qt' 'wicd') -replaces=('wicd-client-kde') -conflicts=('wicd-client-kde') -makedepends=('cmake' 'automoc4') -source=("http://kde-apps.org/CONTENT/content-files/132366-wicd-kde-0.2.2.tar.gz") -md5sums=('b335154f13db95d1667db297e0c3da44') - -build() - -{ - cd ${srcdir}/${pkgname} || return 1 - - - cmake . -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DPYTHONBIN=python2 || return 1 - make || return 1 - -} - -package() -{ - cd ${srcdir}/${pkgname} || return 1 - make DESTDIR=${pkgdir} install || return 1 -} diff --git a/wizardpen/99-geniuspen.fdi b/wizardpen/99-geniuspen.fdi deleted file mode 100644 index 9df1cdc..0000000 --- a/wizardpen/99-geniuspen.fdi +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<deviceinfo version="0.2"> - <device> - <match key="info.product" contains="UC-LOGIC Tablet WP8060U"> - <merge key="input.x11_driver" type="string">wizardpen</merge> - <merge key="input.x11_options.TopX" type="string">695</merge> - <merge key="input.x11_options.TopY" type="string">2320</merge> - <merge key="input.x11_options.BottomX" type="string">32747</merge> - <merge key="input.x11_options.BottomY" type="string">32762</merge> -</match> - </device> -</deviceinfo> diff --git a/wizardpen/PKGBUILD b/wizardpen/PKGBUILD deleted file mode 100644 index b10c926..0000000 --- a/wizardpen/PKGBUILD +++ /dev/null @@ -1,37 +0,0 @@ - -# Contributor: Zerathidune <zerathidune@gmail.com> -pkgname=wizardpen -pkgver=0.6.1rc2 -pkgrel=4 -pkgdesc="Xorg driver for Genius tablets" -arch=('i686' 'x86_64') -url="http://specificcrap.arbitrarycrap.com/" -license=('GPL') -conflicts=(wizardpen-driver) -replaces=(wizardpen-driver) -source=(http://vagabond.ath.cx/distfiles/$pkgname-$pkgver.tar.gz - wizardpen.patch - 99-geniuspen.fdi) -md5sums=('f121264d460ecc333c1bfa47834ec559' - '8a1661695bd7ba640e3dd184dd97446d' - '5b6b4566c41821eb6d24f7a233b39cb2') - -build() { - cd "$srcdir/$pkgname-$pkgver" - patch src/wizardpen.c ../wizardpen.patch - ./configure --prefix=/usr - make || return 1 - make DESTDIR="$pkgdir" install - - cd calibrate - rm wizardpen-calibrate - make || return 1 - install -d $pkgdir/usr/bin - install -m 755 wizardpen-calibrate $pkgdir/usr/bin/ - - cd $srcdir - install -d $pkgdir/usr/share/hal/fdi/policy/10osvendor - install -m 644 99-geniuspen.fdi $pkgdir/usr/share/hal/fdi/policy/10osvendor/ -} - - diff --git a/wizardpen/wizardpen.patch b/wizardpen/wizardpen.patch deleted file mode 100644 index d3d4dc1..0000000 --- a/wizardpen/wizardpen.patch +++ /dev/null @@ -1,4 +0,0 @@ -656c656 -< if (InitValuatorClassDeviceStruct (dev, 3, xf86GetMotionEvents, ---- -> if (InitValuatorClassDeviceStruct (dev, 3, diff --git a/x264-git/PKGBUILD b/x264-git/PKGBUILD deleted file mode 100644 index 9c0a08b..0000000 --- a/x264-git/PKGBUILD +++ /dev/null @@ -1,50 +0,0 @@ -# Contributor: zhuqin <zhuqin83@gmail.com> - -pkgname=x264-git -pkgver=20100116 -pkgrel=1 -pkgdesc="free library for encoding H264/AVC video streams" -arch=('i686' 'x86_64') -license=('GPL') -depends=('libx11') -makedepends=('git' 'yasm' 'gettext') -url="http://www.videolan.org/developers/x264.html" -conflicts=('x264') -replaces=(x264-svn) -provides=("x264=$pkgver") -source=() -md5sums=() - -_gitroot="git://git.videolan.org/x264.git" -_gitname="x264" - -build() { - cd $srcdir - msg "Connecting to the GIT server...." - - if [[ -d $srcdir/$_gitname ]] ; then - cd $_gitname - git pull origin - msg "The local files are updated." - else - git clone $_gitroot - fi - - msg "GIT checkout done" - msg "Starting make..." - - rm -rf $srcdir/$_gitname-build - git clone $srcdir/$_gitname $srcdir/$_gitname-build - - cd $srcdir/$_gitname-build - - ./configure --prefix=/usr \ - --enable-visualize \ - --enable-shared \ - --enable-pic || return 1 - - make || return 1 - make DESTDIR=$pkgdir install || return 1 - - rm -rf $srcdir/$_gitname-build -} diff --git a/xautolock/PKGBUILD b/xautolock/PKGBUILD deleted file mode 100644 index 65945fa..0000000 --- a/xautolock/PKGBUILD +++ /dev/null @@ -1,24 +0,0 @@ -# Maintainer: Florian Pritz <f-p@gmx.at> -# Contributor: dorphell <dorphell@archlinux.org> -# Committer: Judd Vinet <jvinet@zeroflux.org> - -pkgname=xautolock -pkgver=2.2 -pkgrel=2 -pkgdesc="An automatic X screen-locker/screen-saver" -arch=(i686 x86_64) -url="ftp://ibiblio.org/pub/Linux/X11/screensavers/" -license=('GPL2') -depends=('libxss') -makedepends=('imake') -source=(ftp://ibiblio.org/pub/Linux/X11/screensavers/$pkgname-$pkgver.tgz) - -build() { - cd $srcdir/$pkgname-$pkgver - PATH=$PATH:/usr/X11R6/bin - xmkmf - make - make DESTDIR=${pkgdir}/ install - make DESTDIR=${pkgdir}/ install.man -} -md5sums=('9526347a202694ad235d731d9d3de91f') diff --git a/xbindkeys_config/Makefile.patch b/xbindkeys_config/Makefile.patch deleted file mode 100644 index 6385a55..0000000 --- a/xbindkeys_config/Makefile.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- Makefile 2003-06-08 16:10:25.000000000 +0200 -+++ Makefile.new 2009-06-05 16:16:14.000000000 +0200 -@@ -2,8 +2,8 @@ - - CC= gcc -O3 -Wall - STD= _GNU_SOURCE --GTK= `gtk-config --cflags --libs` --GTK2= `gtk-config --cflags` -+GTK= `pkg-config gtk+-2.0 --cflags --libs` -+GTK2= `pkg-config gtk+-2.0 --cflags` - OBJS= xbindkeys_config.o menu.o middle.o speedc.o - NOM= xbindkeys_config - diff --git a/xbindkeys_config/PKGBUILD b/xbindkeys_config/PKGBUILD deleted file mode 100644 index b0f4b3e..0000000 --- a/xbindkeys_config/PKGBUILD +++ /dev/null @@ -1,26 +0,0 @@ -#Maintainer: hellwoofa (at arcor dot de) -#PKGBUILD found at http://tur.berlios.de/pkgbuild/whatah/xbindkeys_config/PKGBUILD thx! -pkgname=xbindkeys_config -pkgver=0.1.3 -pkgrel=3 -pkgdesc="XBindKeys_Config is an easy to use gtk2 program for configuring Xbindkeys." -arch=(i686 x86_64) -url="http://hocwp.free.fr/xbindkeys/xbindkeys.html" -license=('GPL') -depends=('xbindkeys' 'gtk2') -source=(http://home.arcor.de/hellwoofa/$pkgname-$pkgver.tar.gz http://www.grogy.com/ports/x11/xbindkeys_config/files/patch-gtk2 Makefile.patch) - -build() { - cd $startdir/src/$pkgname-$pkgver - mkdir $startdir/pkg/usr/bin -p - patch -Np0 -i ../patch-gtk2 - patch -Np0 -i ../Makefile.patch - make || return 1 - make prefix=$startdir/pkg/usr install -} -md5sums=('c8983fd822e66c9f9bfbe5e99044a203' - '15414f9d7535eef173266c2444154501' - '831d245993cb9565ddc013d19ec914b1') -sha256sums=('aa4d8f31ec28aabc19a8a6e154f2abf974c337f88be2b77f63e6450f45a443e7' - 'f55e1420d1f9067e8a681271e50f957488d7df935e5be14d270fd57212d23b6c' - '2dd2c905d84513e1b1cf040b8d34d90b48f76bebf7aa47c58092bb1973faae2a') diff --git a/xbindkeys_config/patch-gtk2 b/xbindkeys_config/patch-gtk2 deleted file mode 100644 index 49ebdb2..0000000 --- a/xbindkeys_config/patch-gtk2 +++ /dev/null @@ -1,36 +0,0 @@ -diff -udp menu.c.orig menu.c ---- menu.c.orig Sun Apr 10 22:51:26 2005 -+++ menu.c Sun Apr 10 22:58:43 2005 -@@ -296,7 +296,7 @@ void menu_manual (GtkMenuItem *menuitem, - text = gtk_text_new(NULL,NULL); - - -- gtk_text_insert (GTK_TEXT(text), NULL, NULL, NULL, -+ gtk_text_insert (text, NULL, NULL, NULL, - MANUAL_TEXT, sizeof(MANUAL_TEXT)-1); - gtk_box_pack_start(GTK_BOX(vbox), text, TRUE, TRUE, 0); - gtk_widget_set_usize(text,300,250); -diff -udp middle.c.orig middle.c ---- middle.c.orig Sun Apr 10 22:59:11 2005 -+++ middle.c Sun Apr 10 23:00:21 2005 -@@ -565,7 +565,7 @@ void view_generated_file() - gtk_container_add (GTK_CONTAINER(src), text); - - while (fgets (line, sizeof(line), f)) -- gtk_text_insert (GTK_TEXT(text), NULL, NULL, NULL, -+ gtk_text_insert (text, NULL, NULL, NULL, - line, strlen(line)); - - gtk_container_add(GTK_CONTAINER(window),src); -Binary files work.orig/xbindkeys_config-0.1.3/xbindkeys_config and work/xbindkeys_config-0.1.3/xbindkeys_config differ -diff -udp xbindkeys_config.c.orig xbindkeys_config.c ---- xbindkeys_config.c.orig Sun Apr 10 22:49:47 2005 -+++ xbindkeys_config.c Sun Apr 10 22:50:56 2005 -@@ -95,7 +95,6 @@ int main (int argc, char *argv[]) - accel_group = gtk_accel_group_new(); - menu=xbindkeys_config_menu(accel_group); - gtk_box_pack_start(GTK_BOX(vbox),menu,FALSE,FALSE,0); -- gtk_accel_group_attach(accel_group, GTK_OBJECT(window)); - - middle= xbindkeys_config_middle(); - gtk_box_pack_start(GTK_BOX(vbox),middle,TRUE,TRUE,0); diff --git a/yaourt/PKGBUILD b/yaourt/PKGBUILD deleted file mode 100644 index 6ba116d..0000000 --- a/yaourt/PKGBUILD +++ /dev/null @@ -1,25 +0,0 @@ -# Author: Julien MISCHKOWITZ <wain@archlinux.fr> -# Author: tuxce <tuxce.net@gmail.com> -pkgname=yaourt -pkgver=0.9.3.2 -pkgrel=1 -pkgdesc="A Pacman frontend with more features and AUR support" -arch=(any) -url="http://www.archlinux.fr/yaourt-en/" -license="GPL" -depends=('wget' 'diffutils' 'pacman>=3.3.3' 'package-query') -makedepends=('gettext') -optdepends=('aurvote: vote for favorite packages from AUR for inclusion in [community]' - 'customizepkg: automatically modify PKGUILD during install/upgrade' - 'pacman-color: fully colorized output' - 'rsync: retrieve PKGBUILD from official repositories' - 'colordiff: colorized output with yaourt -C') -install=yaourt.install -backup=('etc/yaourtrc') -source=(http://archiwain.free.fr/os/i686/$pkgname/$pkgname-$pkgver.src.tar.gz) -md5sums=('349be19ecea6d1befd813014935e8772') - -build() { - cd $startdir/src/$pkgname-$pkgver - make install DESTDIR=$pkgdir || return 1 -} diff --git a/yaourt/yaourt.install b/yaourt/yaourt.install deleted file mode 100644 index 9bd680a..0000000 --- a/yaourt/yaourt.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - cat <<-EndOfMessage - ==> to use yaourt as user,add these entries to /etc/sudoers: - user ALL=NOPASSWD: /usr/bin/pacman - user ALL=NOPASSWD: /usr/bin/pacdiffviewer - (Please, use sudo very carefully) - ==> for a full colorized output, install pacman-color and set PacmanBin in /etc/yaourtrc - EndOfMessage - /bin/true -} - -post_upgrade() { - post_install -} diff --git a/youtube-viewer/PKGBUILD b/youtube-viewer/PKGBUILD deleted file mode 100644 index 4c386c8..0000000 --- a/youtube-viewer/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Maintainer: Trizen <echo dHJpemVueEBnbWFpbC5jb20K | base64 -d> - -pkgname=youtube-viewer -pkgver=20111011 -pkgrel=1 -pkgdesc="Youtube Viewer: Search and play YouTube videos with MPlayer." -arch=('any') -url="https://github.com/trizen/$pkgname" -license=('GPL') -makedepends=('git') -depends=('mplayer' 'perl-libwww') -optdepends=("gcap: for retrieving Youtube closed captions. [in AUR]") -_gitroot="git://github.com/trizen/$pkgname.git" -_gitname="$pkgname" - -build() { - msg "Connecting to github GIT server..." - - if [ -d $pkgname ]; then - cd $pkgname && git pull origin - else - git clone $_gitroot - - cd $pkgname - fi -} - -package() { - cd $pkgname - install -m 755 -D $pkgname "$pkgdir/usr/bin/$pkgname" -} diff --git a/youtube-viewer/youtube-viewer b/youtube-viewer/youtube-viewer deleted file mode 100644 index 09c93fd..0000000 --- a/youtube-viewer/youtube-viewer +++ /dev/null @@ -1,866 +0,0 @@ -#!/usr/bin/perl - -# Last edit on January 12 2011, 10:25 PM - -$appname = 'youtube-viewer'; -$version = 'v2.4.4'; - -=start -------------------------------------------------------- - (C) 2010-2011 by Trizen - WebSite: http://trizen.go.ro - Email: echo dHJpemVueEBnbWFpbC5jb20K | base64 -d -------------------------------------------------------- - -[?] What is this script for? - - This script is useful if do you hate the Flash Player and love YouTube. - - Using this script you can search and play YouTube Videos with MPlayer... - - Have fun! - -[!] Most important changes are written in the changelog! - - [CHANGELOG] - - First version with Windows support. Require SMPlayer to play videos. See MPlayer Line - NEW (v2.4.*) - - Code has been changed in a proportion of ~60% and optimized for speed // --480 became -4 - NEW (v2.4.*) - - Added mega-powers of omnibox to the STDIN :) - NEW (v2.3.*) - - Re-added the option to list and play youtube videos from a user profile. Usage: -u [user] - NEW (v2.3.*) - - Added a new option to play all video clips from a category. Usage: '-c 9' and insert 'all' - NEW (v2.3.*) - - Category area is more friendly... New options: -c [n] where 'n' is the number of category - NEW (v2.3.*) - - Added a new option to play only the audio track of a videoclip. Usage: [words] -n - NEW (v2.3.*) - - Added option for fullscreen (-f, --fullscreen). Usage: youtube-viewer [words] -f - NEW (v2.3.*) - - Added one new option '-c'. It shows available categories and will let you to choose one. - NEW (v2.3.*) - - Added one new option '-m'. It shows 3 pages of youtube video results. Usage: [words] -m - NEW (v2.3.*) - - For "-p" option has been added 3 pages of youtube video results (60 clips) - NEW (v2.3.*) - - Added "-prefer-ipv4" to the mplayer line (videoclips starts in no time now). - NEW (v2.3.*) - - Search and play videos at 480p, 720p. Ex: [words] --480, [words] -p --480 - NEW (v2.3.*) - - Search has been corrected due to some YouTube changes... - (v2.2.*) - - Added support to play a video at 480p even if it's resolution is higher. Ex: [url] --480 - (v2.2.*) - - Added a nice feature which prints some informations about the video which you watching at - (v2.2.*) - - Added support to play videos by your order. Example: after search results, insert: 3 5 2 1 - (v2.1.*) - - Added support for next pages of video results (press ENTER when ask you to insert number) - (v2.1.*) - - Bug fixed: "Numbers go crazy after more than 20 video results". - (v2.1.*) - - Added support to continue playing searched videos, usage: "youtube-viewer [words] -p" - (v2.1.*) - - Added support to print counted videos and support to insert the number of video to play it - (v2.1.*) - - Added support to search YouTube Videos in script (ex: youtube-viewer avatar trailer 2009) - (v2.0.*) - - Added support for script to choose automat quality if it is lower than 1080p - (v2.0.*) - - Added support to choose the quality only between 720p and 1080p (if it is available) - (v2.0.*) - - Added support for an YouTube video code (ex: youtube-viewer WVTWCPoUt8w) - (v1.0.*) - - Added support for 720p and 1080p YouTube Videos... - (v1.0.*) - - Special thanks to: - - Army (for bugs reports and for his great ideas) - - dhn (for adding youtube-viewer in freshports.org) - - And also many thanks to: - - everybody who use this script... -=cut - -require LWP::UserAgent; - -$os = $^O; -if ($os =~ /MSWin/) { - $MPlayerLine = '"C:\\Program Files\\SMPlayer\\mplayer\\mplayer.exe" -prefer-ipv4 -cache 10000 -cache-min 1'; -} -else { - $MPlayerLine = 'mplayer -prefer-ipv4 -cache 100000 -cache-min 1'; -} -$lwp = 'LWP::UserAgent'->new; -$lwp->agent('Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.634.0 Safari/534.16'); -unless ($os =~ /MSWin/) { - $bred = "\e[1;31m"; - $bgreen = "\e[1;32m"; - $reset = "\e[0m"; -} -$a = $ARGV[0]; -$b = $ARGV[1]; -unless ($b) { - $b = ''; -} -unless ($a) { - $a = ''; -} -if ($a =~ /^(-v|--version)$/) { - $appname =~ s/-/ /; - $appname =~ s/(.)(.+) (.)/\U$1\E\L$2 \E\U$3\E/g; - print "$appname $version\n"; - exit; -} -my($Picks, $pickcat, $Search); -$PickBackup = ''; -$SearchBackup = ''; -$MoreResults = ''; -$FirstPage = 1; -$NextPage = 1; -$username = 0; -$pick = ''; -if ($a =~ /^(-a|--author)$/) { - @_ = ('4', '2', ')', ':', '%', '.'); - foreach $_ (@_) { - $@ = '@'; - $_ = $@ | $_; - &_; - sub _ { - $@ = $] * ($] * 3 + 1); - print '=' x $@ . "\n"; - } - print "\t" x $] . "\U$_\n\E"; - &_; - } - exit; -} -$Working = "\n[...] Working... Please wait...$reset\n"; -$app = $0; -$app =~ s[(.*)/([^/]+)$][$2]; -for ($n = 0; $n <= $#ARGV; ++$n) { - push @args, $ARGV[$n]; -} -if ($args[0]) { - foreach $arg (@args) { - next if $arg eq ''; - $arg =~ s/--novideo/-n/; - $arg =~ s/--categories/-c/; - $arg =~ s/^-([-]?)f(.*)/-f/; - if ($arg eq '-n') { - $MPlayerLine =~ s/mplayer /mplayer -novideo /; - $MPlayerLine =~ s/mplayer.exe"/mplayer.exe" -novideo/; - $SearchBackup = ' --480'; - } - if ($arg =~ /^-([-]?)([\d]+)/) { - $SearchBackup .= " $arg"; - } - if ($arg eq '-c') { - $categories = 'TRUE'; - } - if ($arg eq '-m' or $arg eq '-p') { - $MoreResults = 1; - } - else { - $MoreResults = 0; - } - if ($arg eq '-f') { - $SearchBackup .= " $arg"; - $MPlayerLine =~ s/mplayer /mplayer -fs /; - $MPlayerLine =~ s/mplayer.exe"/mplayer.exe" -fs/; - } - } -} -if ($a eq '' or $a =~ /^([-]?)-([471]+)|^-f|^-m|^-n/ and $b eq '') { - &InsertURL; -} -if ($a) { - $a =~ s[http://.*embed/][]i; - if ($a =~ m[^http://] and not $a =~ /youtube\.com/) { - $connect = $lwp->get($a); - if ($connect->content =~ m[youtube.com/v/([\w\-]{11})]) { - $youtube = "v=$1"; - &GetYouTube; - } - } -} -if ($a =~ /^-g([^\=]*)=([\w]+)/) { - $NextPage = 0; - $a = "http://www.youtube.com/music/$2"; - $Search .= ' '; -} -elsif ($a =~ /^-g$/ and $b =~ /([\w]*)/) { - $NextPage = 0; - $a = "http://www.youtube.com/music/$b"; - $Search .= ' '; -} -sub InsertURL { - print "\n$bred=>>$reset$bgreen Insert an YouTube URL or search something...\n$reset> "; - chomp($youtube = <STDIN>); - if ($youtube =~ m[^http://] and not $youtube =~ /youtube\.com/) { - $connect = $lwp->get($youtube); - if ($connect->content =~ m[youtube.com/v/([\w\-]{11})]) { - $youtube = "v=$1"; - &GetYouTube; - } - } - elsif (not $youtube =~ m[youtube.com(.+)v([\=/]+)([\w\-]{11})] and $youtube) { - $SearchBackup .= ' ' . $youtube; - $Search = $youtube; - $number = 0; - &Trizen; - } - elsif (not $youtube =~ /youtube.com(.+)([\w\-]{11})/) { - print $bred; - print "\n(x_x) Invalid URL...\n\n"; - print $reset; - exit; - } - else { - print $bgreen . ''; - &GetYouTube; - } -} -if ($categories) { - foreach $arg (@args) { - if ($arg =~ /^([\d]+)$/) { - $catnr = $1; - } - } - unless ($catnr) { - $catnr = ''; - } -} -if ($a =~ /youtube.com/ and not $a =~ m[v([=/]+)([\w\-]+)]) { - $c = 'TRUE'; - $CatURL = $a; - &CatSearch; -} -else { - $c = ''; -} -if ($a =~ /^-u/ and not $b =~ /(.+)/) { - die "\nUsage: $0 -u [username]\n\t$0 [username] -u\n\n"; -} -if ($a =~ /^-([-]*)u/ and $b =~ /(.+)/ or $b =~ /^-([-]*)u/) { - if ($b =~ /^-([-]*)u/) { - $b = $a; - } - $username = 1; - $NextPage = 0; - $ytp = "http://gdata.youtube.com/feeds/api/users/$b/uploads"; - $connect = $lwp->get($ytp); - $cc = $connect->content; - if ($cc eq 'User not found') { - die "\n(x_x) $cc...\n\n"; - } - $cc =~ s/\n//g; - $cc =~ s/<title type='text'>/\nTITLE=/g; - @content = split(?\n?, $cc, 0); - foreach $_ (@content) { - if ($_ =~ /TITLE\=/) { - $_ =~ s[TITLE\=([^\<]+)</title>(.+)v\=([\w\-]{11})(.+)duration([^\']*)'([\d\:]+)'(.+)][v=$3+title="$1">+video-time">$6]; - push @Videos, $_; - } - } - print "\n"; - &PrintResults; -} -if ($a =~ /^([-]?)-c/) { - if ($catnr =~ /(.+)/) { - print $bgreen . "$Working"; - } - if ($b =~ /([-]?)-([\d]+)/) { - $PickBackup = $b; - } - $NextPage = 0; - $connect = $lwp->get('http://www.youtube.com/videos'); - @cates = split(/\n/, $connect->content, 0); - foreach $_ (@cates) { - if ($_ =~ m[<a href=\"(.+)\">(.+)</a>([\ ]*)]) { - push @cats, "$1 -*- $2"; - } - } - $nbr = 0; - foreach $cat (@cats) { - unless ($cat =~ /\?v=|http|title=\"|style=\"|onclick=\"/) { - foreach $_ ($number = 0) { - $number = $nbr + 1; - $nbr = $number; - while ($cat =~ /\"/) { - $cat =~ s/(.+)"(.+)-\*-/$1 -*-/; - } - push @categories, "$number - $cat\n" unless $cat =~ m[/t/|class=]g; - } - } - } - print "\n"; - foreach $_ (@categories) { - next if $_ =~ m[/music|press_room]g; - if ($_ =~ /opt_out/) { - $caturl = 'http://www.youtube.com/videos'; - $catname = 'Main videos'; - $pick = '1'; - } - if ($_ =~ /([\d]+) - (.+) -\*- (.+)/ and not $_ =~ /opt_out/) { - $caturl = $2; - $catname = $3; - $pick = $1; - } - if ($catnr eq '' and $pick < 10) { - print "$bred $pick$reset - $catname\n$bred"; - } - else { - if ($catnr eq '' and not $caturl =~ /ads/) { - print "$bred$pick$reset - $catname\n$bred"; - } - } - } - if (not $catnr =~ /(.+)/) { - print $bgreen; - print "\n=>> Insert the number of a category\n> "; - print $reset; - chomp($pickcat = <STDIN>); - } - else { - $pickcat = $catnr; - } - foreach $cat (@categories) { - if ($cat =~ /^$pickcat - (.+) -\*- (.+)/) { - $catname = $1; - $youtube = "http://www.youtube.com$1"; - $catname =~ s/^(.+)\?(.+)/$2/; - $connect = $lwp->get($youtube); - @content = split(/\n/, $connect->content, 0); - } - } - &CatSearch; - sub CatSearch { - if ($c =~ /(.+)/) { - $connect = $lwp->get($CatURL); - @content = split(/\n/, $connect->content, 0); - } - foreach $_ (@content) { - $_ =~ s[\&\;feature\=([\w\-]+)|\"\ data\-thumb(.+)\.jpg|src="http://(.+)gif\"|click="" onmousedown="][]g; - if ($pickcat) { - unless ($pickcat =~ /16/) { - $_ =~ s/\="http([^\"]+)"|yt.analytics([^\;]+)\;|"src//g; - $_ =~ s/" alt\="([^\"]+)"([\ ]*)//g; - } - } - else { - $_ =~ s/" src="(.+)\.jpg//g; - } - $_ =~ s/" onload="tn_load\(\)" data-thumb alt="([^\"]+)\" |" onload="tn_load\(\)src|src=//g; - push @Videos, $_ if $_ =~ /^</; - } - print "\n"; - &PrintResults; - } - ; -} -if ($a =~ m[youtube.com(.+)v([\=/]+)([\w\-]{11})]) { - $youtube = "http://www.youtube.com/watch?v=$3"; - print $bgreen . "$Working"; - &GetYouTube; -} -if ($a =~ /^([\w\-]{11})$/) { - $youtube = 'http://www.youtube.com/watch?v=' . $a; - if ($a =~ /([\d]+)/ or $a =~ /([A-Z]+)/) { - &GetYouTube; - } -} -if ($a =~ /^-h$/ or $a =~ /^--help$/) { - $appname =~ s/(.+)/\U$1\E/g; - $app =~ s/(.*)\\([^\\]+)$/$2/; - die "\n\t" . '=' x 17 . " $appname " . '=' x 17 . qq[ -\t\t\t\t by Trizen (trizen.go.ro) - - Usage: $app || [url] || [words] || [code] - -Base Options: $app [...] - [url] : play an YouTube video by URL - [code] : play an YouTube video by code - [words] : search and play YouTube videos - -Other options: - -c, --categories : shows available YouTube categories - -n, --novideo : plays only audio track of the video - [words] -f : plays all videos in fullscreen mode - [words] -p : plays all video results in order - [words] -m : shows 3 pages of video results (60 videos) - [words] -n : plays only the audio track of video results - [words] -4, -7 : plays video results at 480p resolution (or 720p) - [ytURL] -4, -7 : plays an YouTube video by URL at 480p (or 720p) - [username] -u : lists videos from a YouTube user profile - -h, --help : outputs this message... - -Tips and tricks: - 1. Search something and press enter for the next page. - 2. Search and play all video results by adding "-p" after keywords. - 3. After search results, you can insert: 3 5 8 1 to play videos in your order - 4. Play all audio tracks of video results by adding "-p -n" after keywords. - 5. To listen music from YouTube use: "-c -n 10" and insert "all" - 6. Play videos one after one in fullscreen mode: "[words] -p -f" - 7. Play all video results at 480p: "[words] -p -4" (or 720p => "-7") - 8. Play all videos from a user at 480p: "[username] -u -4" and insert "all" - 9. Play a genre of music from YT: "-g [genre]". Example: "-g reggae -n" - -]; -} -elsif ($a =~ /^-p/) { - die "Usage: $app [words] $a\n"; -} -elsif (not $a =~ /^-([-]?)4|^-([-]?)7|^-g|^-p|^-n|^-([-]?)1|^-f|^-m/ and $a =~ /^-/) { - die "Unknown option '${a}'\n"; -} -$Search = join(' ', @args) . ' '; -&Trizen; -sub Trizen { - $PageNumber = 1; - $FirstPage = 1; - $SearchBackup .= ' ' . $Search; - $Search =~ s/\ ([-]?)-([\d]+)|\ -p|\ -m|\ ([-]?)-f([^\ ]*)|\ -n//g; - $ys = "http://www.youtube.com/results?search_query=$Search&aq=f"; - if ($MoreResults eq 1) { - $ys = "http://www.youtube.com/results?search_query=$Search&aq=f"; - $connect = $lwp->get($ys); - push @source, $connect->content . "\n"; - for ($number = 2; $number <= 3; ++$number) { - $ys = "http://www.youtube.com/results?search_query=$Search". - "&suggested_categories=10%2C24&page=$number"; - $connect = $lwp->get($ys); - push @source, $connect->content . "\n"; - } - $source = join('', @source); - @content = split(?\n?, $source, 0); - print "\n"; - } - else { - $connect = $lwp->get($ys); - @content = split(/\n/, $connect->content, 0); - if ($connect->content =~ m[class="largeText">(.+)<a href="/results\?search_query=(.+)&search=Search(.+)"(.+)</a></span></div>]) { - $spell = $4; - $research = "http://www.youtube.com/results?search_query=$2&search=Search"; - $spell =~ s[<i>|</i>|<b>|</b>|>|<][]g; - print "\n$bgreen=>> Did you mean: "; - print "$bred$spell$reset (Y/n)\n> "; - chomp($yn = <STDIN>); - if ($yn eq '' or $yn =~ /y/i) { - $connect = $lwp->get($research); - splice @content; - @content = split(/\n/, $connect->content, 0); - } - } - elsif ($connect->content =~ m[Results for: <a href="/results\?search_query=(.+)">(.+)</a>]) { - $research = "http://www.youtube.com/results?search_query=$1&search=Search"; - print "$bgreen\n=>> Did you mean: $bred$2$reset (Y/n)\n> "; - chomp($yn = <STDIN>); - if ($yn eq '' or $yn =~ /y/i) { - $connect = $lwp->get($research); - splice @content; - @content = split(/\n/, $connect->content, 0); - } - } - print "\n"; - } - &Search; -} -sub Search { - splice @Videos; - splice @codes; - foreach $_ (@content) { - if ($_ =~ m[^<a href="/watch\?v=]) { - $_ =~ s/\" data-thumb(.+)\.jpg//g; - push @Videos, $_; - } - } - &PrintResults; -} -sub PrintResults { - $number = 0; - foreach $_ (@Videos) { - chomp($line = $_); - if ($line =~ /v\=([\w\-]{11})(.*)title="([^\"]+)(.*)time\">([\d\:]*)/) { - ++$number; - $code = $1; - $title = $3; - $time = $5; - unless ($time =~ /\:/) { - $sec = $time; - $time = $sec / 3600 % 24 . ':' . $sec / 60 % 60 . ':' . $sec % 60; - $time =~ s/^0\://; - unless ($time =~ /\:/) { - $time = "0:$time"; - } - if ($time =~ /(.):(.):(.+)/) { - $time = "$1:0$2:$3"; - } - if ($time =~ /^(.+):(.)$/) { - $time = "$1:0$2"; - } - } - push @codes, "$number - $code $time"; - $title =~ s/\&\#39;/'/g; - $title =~ s/\&/&/g; - $title =~ s/\"/"/g; - $title =~ s/\&\#([\d]+);|amp;|quot;//g; - $title =~ s/src class=$|class=$//g; - print "$bred"; - if ($number < 10) { - print ' '; - } - print "$number$reset - $title ($time)\n$bred"; - } - } - if ($SearchBackup) { - if ($SearchBackup =~ /\ -p/) { - for ($i = 1; $i <= $number; ++$i) { - push @picks2, "$i "; - } - $youtube = join('', @picks2); - @picks = split(' ', $youtube, 0); - &PicksArea; - } - } - print "\n$bred=>>$reset$bgreen Insert a number or search something else\n$reset> "; - chomp($youtube = <STDIN>); - $PickBackup = $youtube; - if ($youtube =~ /^(q|quit|exit)$/) { - print "\n[*] Exiting...\n\n"; - exit; - } - if ($PickBackup =~ m[^http://] and not $PickBackup =~ /youtube\.com/) { - $connect = $lwp->get($PickBackup); - if ($connect->content =~ m[youtube.com/v/([\w\-]{11})]) { - $youtube = "v=$1"; - &GetYouTube; - } - } - if ($PickBackup =~ /([\d]+) ([-]?)-([\d]+)/) { - $youtube = $1; - } - print $bgreen . "$Working"; - if ($youtube =~ /^([\d]+)$/) { - if ($youtube > $number or $youtube eq 0) { - print "\n"; - &PrintResults; - } - } - if ($youtube =~ /^([\d]+)$/) { - $PICK = $1; - &ForeachCode; - } - if ($youtube eq '' and $NextPage eq 1) { - $PageNumber = $FirstPage; - ++$PageNumber; - print "\n[!]$bgreen Page:$reset $PageNumber\n"; - $SearchURL = "http://www.youtube.com/results?search_query=$Search". - "&suggested_categories=10%2C24&page=$PageNumber"; - $connect = $lwp->get($SearchURL); - splice @content; - @content = split(/\n/, $connect->content, 0); - print "\n"; - $FirstPage = $PageNumber; - &Search; - } - elsif ($NextPage eq 0 and $youtube eq '') { - print "\n"; - &PrintResults; - } - if ($youtube eq 'all') { - $SearchBackup .= ' --1080'; - splice @picks; - for ($i = 1; $i <= $number; ++$i) { - push @picks, "$i"; - } - &PicksArea; - } - if ($youtube =~ m[v([=/]+)([\w\-]{11})]) { - $youtube = "http://youtube.com/watch?v=$2"; - &GetYouTube; - } - if ($youtube =~ /([\d]+) ([\d]+)/) { - @picks = split(' ', $youtube, 0); - &PicksArea; - sub PicksArea { - $NrOfPicks = @picks; - $no = 0; - $lastpick = ''; - $number = 0; - &ForeachPick; - } - - sub ForeachPick { - for ($number = $no; $number <= $NrOfPicks; ++$number) { - $no = $number; - $pick = $picks[$number]; - next if $lastpick eq $pick; - &PrintResults if $number eq $NrOfPicks; - $Picks = 'TRUE'; - $lastpick = $pick; - &PlayBack; - } - } - ; - } - if ($youtube ne 'all' and $youtube =~ /(.+)/ and not $youtube =~ /^(q|quit|exit)$/) { - $Search = $youtube; - &Trizen; - } -} -sub PlayBack { - foreach $Code (@codes) { - if ($Picks eq 'TRUE' and not $Code =~ /^$pick - /) { - next; - } - elsif ($Code =~ /^$pick - ([\w\-]{11})(.*)/ and $Picks eq 'TRUE') { - $VideoCode = $1; - $duration = $2; - $youtube = "http://www.youtube.com/watch?v=$1"; - } - elsif ($Code =~ /(.+)([\w\-]{11})(.*)/ and $Picks ne 'TRUE') { - $VideoCode = $2; - $duration = $2; - $youtube = "http://www.youtube.com/watch?v=$2"; - } - &GetYouTube; - } -} -sub VideoCheck { - if (not $connect->content =~ /itag=34/ and $connect->content =~ /itag=([\d]+)([\W]+)/) { - $itag = $1; - $streaming =~ s/(.*)http(.+)itag=$itag([^\%]*)(.+)/http$2itag=$itag$3/; - unless ($SearchBackup =~ / ([-]?)-f/) { - $MPlayerLine =~ s/-fs //; - } - &Description; - &MPlayer; - } - if ($b =~ /^([-]?)-4/ or $PickBackup =~ / ([-]?)-4/ or $SearchBackup =~ / ([-]?)-4/) { - $streaming =~ s/(.*)http(.+)itag=34([^\%]*)(.+)/http$2itag=34$3/; - unless ($SearchBackup =~ / ([-]?)-f/) { - $MPlayerLine =~ s/-fs //; - } - &Description; - &MPlayer; - } - if ($b =~ /^([-]?)-7/ or $PickBackup =~ / ([-]?)-7/ or $SearchBackup =~ / ([-]?)-7/) { - if ($connect->content =~ /itag=22/) { - $streaming =~ s/(.*)http(.+)itag=22([^\%]*)(.+)/http$2itag=22$3/; - $MPlayerLine =~ s/mplayer -p/mplayer -fs -p/; - $MPlayerLine =~ s/mplayer.exe" -p/mplayer.exe" -fs -p/; - &Description; - &MPlayer; - } - else { - unless ($SearchBackup =~ / ([-]?)-f/) { - $MPlayerLine =~ s/-fs //; - } - $streaming =~ s/(.*)http(.+)itag=34([^\%]*)(.+)/http$2itag=34$3/; - &Description; - &MPlayer; - } - } - if ($b =~ /^([-]?)-1/ or $PickBackup =~ / ([-]?)-1/ or $SearchBackup =~ / ([-]?)-1/) { - if ($connect->content =~ /fmt_list=37/) { - $streaming =~ s/(.*)http(.+)itag=37([^\%]*)(.+)/http$2itag=37$3/; - $MPlayerLine =~ s/mplayer -p/mplayer -fs -p/; - $MPlayerLine =~ s/mplayer.exe" -p/mplayer.exe" -fs -p/; - &Description; - &MPlayer; - } - elsif ($connect->content =~ /itag=22/) { - $streaming =~ s/(.*)http(.+)itag=22([^\%]*)(.+)/http$2itag=22$3/; - $MPlayerLine =~ s/mplayer -p/mplayer -fs -p/; - $MPlayerLine =~ s/mplayer.exe" -p/mplayer.exe" -fs -p/; - &Description; - &MPlayer; - } - else { - unless ($SearchBackup =~ / ([-]?)-f/) { - $MPlayerLine =~ s/-fs //; - } - $streaming =~ s/(.*)http(.+)itag=34([^\%]*)(.+)/http$2itag=34$3/; - &Description; - &MPlayer; - } - } - &Description; - &ResolutionSearch; -} -sub Description { - if ($connect->content =~ /likes\">([\d\.\,]+)(.+)dislikes\">([^\<]+)/) { - $like = $1; - $dislike = $3; - } - if ($connect->content =~ m[video-date" >([\ ]*)\n([\t\ ]*)(.+)\n([\ ]*)</span>]) { - $date = $3; - $date =~ s[<span>(.+)</span>][]; - } - if ($connect->content =~ /<meta name="title" content="(.+)">/) { - $title = $1; - $title =~ s/\&quot;/"/g; - $title =~ s/\&amp;/&/g; - $title =~ s/\&\#39;/'/g; - $title =~ s/\&\#([\d]+);//g; - } - print "\n$bred=>> $reset"; - print $bgreen; - print "$title\n"; - print $reset; - print '-' x 80; - if ($connect->content =~ m[description" >(.*)</p>]) { - $desc = $1; - $desc =~ s[<em>|</em>][]g; - $desc =~ s[<br\ />|<br/>][\n]g; - $desc =~ s[<a\ href\=\"\#\"\ onclick\=\"yt\.www\.watch\.player\.seekTo\((.+)\);return\ false;\">|<a\ href\=\"(.+)\"\ target\=\"\_blank\"\ title\=\"|\"\ rel\=\"nofollow\"\ dir="ltr\"\ class\=\"(.*)\">(.+)</a>|<wbr />|</a>|<wbr>\­|<wbr>][]g; - $desc =~ s/\"/"/g; - $desc =~ s/&/&/g; - $desc =~ s/\&\#39;/'/g; - $desc =~ s/\&\#([\d]+);//g; - print "\n$desc\n"; - } - print '-' x 80 . "\n"; - print "$bred=>> $reset"; - print $bgreen; - print "View & Download\n"; - print $reset; - print '-' x 80; - $get = $streaming; - $get =~ s/http:([^\%]+)(.*)/http:$1/; - $get =~ s/(.*)http/http/; - $get =~ s/\\//g; - print "\n* URL $url\n"; - print "* GET $get\n"; - print '-' x 80 . "\n"; - $count = $title =~ s/(.)/$1/gs; - if ($count <= 40) { - print "$bred\t\t=>> "; - } - elsif ($count >= 40 and $count <= 55) { - print "$bred\t=>> "; - } - elsif ($count >= 56) { - print "$bred =>> "; - } - print $bgreen; - print "$title"; - print $reset; - print "$bred <<=\n"; - print $reset; - if ($connect->content =~ m[href="/user/([\w\-]+)"><strong>]) { - print "\n* Uploaded by $1\n"; - } - if ($duration) { - print "* Duration:$duration\n"; - } - if ($connect->content =~ m[<strong>([\d\,]+)</strong>]) { - print "* Views: $1\n"; - } - if ($date =~ /(.+)/) { - print "* Date: $date\n"; - } - if ($like =~ /(.+)/) { - print "* Likes: $like+; Dislikes: $dislike-\n"; - } - print '-' x 80 . "\n\n"; -} -sub MPlayer { - $streaming =~ s/%(.+)$//; - `$MPlayerLine "$streaming"`; - print "\n"; - if ($Picks) { - if ($Picks eq 'TRUE') { - &ForeachPick; - } - } - if ($Search or $a =~ /^([-]?)-c/ or $username eq 1) { - &PrintResults; - } - exit; -} -sub ForeachCode { - foreach $code (@codes) { - if ($code =~ /^$PICK - ([\w\-]{11})(.*)/) { - $code = $1; - $duration = $2; - $youtube = 'http://www.youtube.com/watch?v=' . $code; - $url = $youtube; - } - } - &GetYouTube; -} -sub GetYouTube { - if ($youtube =~ m[v([=/]+)([\w\-]{11})]) { - $VideoCode = $2; - $youtube = 'http://www.youtube.com/watch?v=' . $2; - } - $Count = $VideoCode =~ s/(.)/$1/gs; - if ($Count ne 11) { - print "\n$bred(x_x) Invalid URL...$reset\n\n"; - exit; - } - unless ($youtube =~ /^http:/) { - $youtube = 'http://' . $youtube; - } - $connect = $lwp->get($youtube); - $url = $youtube; - if ($connect->content =~ /fmt_url_map=([^\&]+)\&/) { - $streaming = $1; - $streaming =~ s/%3A/:/gi; - $streaming =~ s[%2F][/]gi; - $streaming =~ s/%26/&/g; - $streaming =~ s/%3D/=/gi; - $streaming =~ s/%3F/?/gi; - $streaming =~ s/%252C/,/gi; - &VideoCheck; - } - else { - $unable = "$bred(x_x) Unable to play: $reset$url\n"; - print $bred; - print "\n(x_x) Something went wrong...\n\n"; - print $reset; - if (not $SearchBackup =~ / -p/ or $NrOfPicks eq '') { - print "$unable\n"; - } - if ($Search =~ /(.+)/) { - unless ($SearchBackup =~ / -p/) { - sleep 1; - &PrintResults; - } - } - else { - exit; - } - } - if ($streaming =~ /(.+)/) { - &Description; - } - else { - print $unable; - } - &ResolutionSearch; -} -sub ResolutionSearch { - if ($connect->content =~ /fmt_list=37/ and not $SearchBackup =~ / -p/) { - &pick; - } - elsif ($SearchBackup =~ /-p/) { - if ($connect->content =~ /fmt_list=37/) { - $streaming =~ s/(.*)http(.+)itag=37([^\%]*)(.+)/http$2itag=37$3/; - $MPlayerLine =~ s/mplayer -p/mplayer -fs -p/; - $MPlayerLine =~ s/mplayer.exe" -p/mplayer.exe" -fs -p/; - &Description; - &MPlayer; - } - } - if ($connect->content =~ /itag=22/) { - $streaming =~ s/(.*)http(.+)itag=22([^\%]*)(.+)/http$2itag=22$3/; - $MPlayerLine =~ s/mplayer -p/mplayer -fs -p/; - $MPlayerLine =~ s/mplayer.exe" -p/mplayer.exe" -fs -p/; - &MPlayer; - } - else { - $streaming =~ s/(.*)http(.+)itag=34([^\%]*)(.+)/http$2itag=34$3/; - unless ($SearchBackup =~ / ([-]?)-f/) { - $MPlayerLine =~ s/-fs //; - } - &MPlayer; - } -} -sub pick { - print "$bred=>>$reset $bgreen Please choose quality of video (default: 1)$reset\n\n"; - print " $bred 1$reset - 1280x720 (720p)\n $bred 2$reset - 1920x1080 (1080p)\n "; - print '=' x 23 . "\n"; - print $bgreen; - print "\n=>> Pick format: "; - print $reset; - chomp($pick = <STDIN>); - print '-' x 80 . "\n\n"; - if ($pick ne 2) { - $streaming =~ s/(.*)http(.+)itag=22([^\%]*)(.+)/http$2itag=22$3/; - $MPlayerLine =~ s/mplayer -p/mplayer -fs -p/; - $MPlayerLine =~ s/mplayer.exe" -p/mplayer.exe" -fs -p/; - &MPlayer; - } - if ($pick eq 2) { - $streaming =~ s/(.*)http(.+)itag=37([^\%]*)(.+)/http$2itag=37$3/; - $MPlayerLine =~ s/mplayer -p/mplayer -fs -p/; - $MPlayerLine =~ s/mplayer.exe" -p/mplayer.exe" -fs -p/; - &MPlayer; - } -} diff --git a/zabbix-agent/PKGBUILD b/zabbix-agent/PKGBUILD deleted file mode 100644 index f463225..0000000 --- a/zabbix-agent/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# Contributor: Enrico Morelli <morelli@cerm.unifi.it> -pkgname=zabbix-agent -pkgver=1.6.6 -pkgrel=1 -pkgdesc="Software for monitoring of your applications, network and servers." -arch=('i686' 'x86_64') -url="http://www.zabbix.com" -license=('GPL') -install=(zabbix-agent.install) -source=(http://downloads.sourceforge.net/sourceforge/zabbix/zabbix-$pkgver.tar.gz zabbix_agent.conf zabbix_agentd.conf zabbix-agentd zabbix-agent.install) - -md5sums=('52779160e71c12d47b97f7336e25c395' - '9c20157a77b1ee4915265971f338fb41' - '9e2a08c7dc89dccf6f7b21a156360713' - '664cd2ebfc711d722fc62c968704d0ca' - 'edbf10ac9776ee7ca3409a3f0ac83917') - - -build() { - cd $startdir/src/zabbix-$pkgver - ./configure --prefix=/usr --enable-agent - make || return 1 - make DESTDIR=$startdir/pkg install - install -d -m0750 $startdir/pkg/var/run/zabbix $startdir/pkg/var/log/zabbix - install -d $startdir/pkg/etc/zabbix - install -D -m0640 $startdir/src/zabbix_agent.conf $startdir/pkg/etc/zabbix/zabbix_agent.conf - install -D -m0640 $startdir/src/zabbix_agentd.conf $startdir/pkg/etc/zabbix/zabbix_agentd.conf - install -D -m0755 $startdir/src/zabbix-agentd $startdir/pkg/etc/rc.d/zabbix-agentd -} diff --git a/zabbix-agent/zabbix-agent.install b/zabbix-agent/zabbix-agent.install deleted file mode 100644 index 4ea1307..0000000 --- a/zabbix-agent/zabbix-agent.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - groupadd zabbix - useradd -g zabbix -d /dev/null zabbix - chown -R zabbix:zabbix /var/log/zabbix /var/run/zabbix /etc/zabbix -} - -post_remove() { - userdel zabbix - rm -rf /var/run/zabbix -} - -op=$1 -shift -$op $* diff --git a/zabbix-agent/zabbix-agentd b/zabbix-agent/zabbix-agentd deleted file mode 100644 index dc31c8e..0000000 --- a/zabbix-agent/zabbix-agentd +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# Source function library. -. /etc/rc.conf -. /etc/rc.d/functions - -# Check that networking is up. -if ck_daemon network; then - echo "Cannot run zabbix-agent without network - run network first" - exit -fi - - -start () { - stat_busy "Starting zabbix-agent" - /usr/sbin/zabbix_agentd &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon zabbix_agentd - stat_done - fi - } - -stop() { - stat_busy "Stopping zabbix-agent" - killall zabbix_agentd - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon zabbix_agentd - stat_done - fi - } - -# See how we were called. -case $1 in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - *) - echo $"Usage: zabbix-agent {start|stop|restart}" - exit 1 - esac - -exit $RETVAL diff --git a/zabbix-agent/zabbix_agent.conf b/zabbix-agent/zabbix_agent.conf deleted file mode 100644 index dfa5c1b..0000000 --- a/zabbix-agent/zabbix_agent.conf +++ /dev/null @@ -1,27 +0,0 @@ -# This is config file for zabbix_agent -# To get more information about ZABBIX, -# go http://www.zabbix.com - -# IP address of ZABBIX server -# Connections from other hosts will be denied - -Server=127.0.0.1 - -# Spend no more than Timeout seconds on processing -# Must be between 1 and 30 - -Timeout=3 - -####### USER-DEFINED MONITORED PARAMETERS ####### -# Format: UserParameter=<key>,<shell command> -# Note that shell command must not return empty string or EOL only -#UserParameter=system.test,who|wc -l -### Set of parameter for monitoring MySQL server (v3.23.42 and later) -### Change -u<username> and add -p<password> if required -#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l -#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" -#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" -#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" -#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" -#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" -#UserParameter=mysql.version,mysql -V diff --git a/zabbix-agent/zabbix_agentd.conf b/zabbix-agent/zabbix_agentd.conf deleted file mode 100644 index 1238980..0000000 --- a/zabbix-agent/zabbix_agentd.conf +++ /dev/null @@ -1,90 +0,0 @@ -# This is config file for zabbix_agentd -# To get more information about ZABBIX, go http://www.zabbix.com - -############ GENERAL PARAMETERS ################# - -# List of comma delimited IP addresses (or hostnames) of ZABBIX servers. -# No spaces allowed. First entry is used for sending active checks. -# Note that hostnames must resolve hostname->IP address and -# IP address->hostname. - -Server=127.0.0.1 - -# Server port for sending active checks - -#ServerPort=10051 - -# Unique hostname. Required for active checks. - -Hostname=ZABBIX Server - -# Listen port. Default is 10050 - -#ListenPort=10050 - -# IP address to bind agent -# If missing, bind to all available IPs - -#ListenIP=127.0.0.1 - -# Source IP address for outgouing connections -#SourceIP= - -# Number of pre-forked instances of zabbix_agentd. -# Default value is 5 -# This parameter must be between 1 and 16 - -StartAgents=5 - -# How often refresh list of active checks. 2 minutes by default. - -#RefreshActiveChecks=120 - -# Disable active checks. The agent will work in passive mode listening server. - -#DisableActive=1 - -# Enable remote commands for ZABBIX agent. By default remote commands disabled. - -#EnableRemoteCommands=1 - -# Specifies debug level -# 0 - debug is not created -# 1 - critical information -# 2 - error information -# 3 - warnings (default) -# 4 - for debugging (produces lots of information) - -DebugLevel=3 - -# Name of PID file - -PidFile=/var/run/zabbix/zabbix_agentd.pid - -# Name of log file. -# If not set, syslog will be used - -LogFile=/var/log/zabbix/zabbix_agentd.log - -# Maximum size of log file in MB. Set to 0 to disable automatic log rotation. -LogFileSize=1 - -# Spend no more than Timeout seconds on processing -# Must be between 1 and 30 - -Timeout=3 - -####### USER-DEFINED MONITORED PARAMETERS ####### -# Format: UserParameter=<key>,<shell command> -# Note that shell command must not return empty string or EOL only -#UserParameter=system.test,who|wc -l -### Set of parameter for monitoring MySQL server (v3.23.42 and later) -### Change -u<username> and add -p<password> if required -#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l -#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" -#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" -#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" -#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" -#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" -#UserParameter=mysql.version,mysql -V - diff --git a/zbar/PKGBUILD b/zbar/PKGBUILD deleted file mode 100644 index d33ab2e..0000000 --- a/zbar/PKGBUILD +++ /dev/null @@ -1,23 +0,0 @@ -# Contributor: Radu Andries <admiral0@tuxfamily.org> -pkgname=zbar -pkgver=0.10 -pkgrel=1 -pkgdesc="An open source software suite for reading bar codes from various sources" -arch=('i686' 'x86_64') -url="http://zbar.sourceforge.net/" -license=('LGPL') -depends=(imagemagick) -optdepends=("python: python library") -provides=() -source=("http://downloads.sourceforge.net/project/zbar/zbar/$pkgver/zbar-$pkgver.tar.bz2") - -build() { - cd "$srcdir/zbar-$pkgver" - - ./configure --prefix=/usr --without-qt --disable-video --without-gtk --without-x - make || return 1 - make DESTDIR="$pkgdir/" install -} - -# vim:set ts=2 sw=2 et: -md5sums=('0fd61eb590ac1bab62a77913c8b086a5') diff --git a/zsh-yaourt/PKGBUILD b/zsh-yaourt/PKGBUILD deleted file mode 100644 index 7872c67..0000000 --- a/zsh-yaourt/PKGBUILD +++ /dev/null @@ -1,18 +0,0 @@ -# Contributor: Jakub Ruzicka <yaccobb@centrum.cz> -# Contributor: Javier ‘Phrodo_00’ Aravena <phrodo.00@gmail.com> - -pkgname=zsh-yaourt -pkgver=0.2.3 -pkgrel=1 -pkgdesc="ZSH functions to tab-complete repo package names for yaourt" -url="http://bitbucket.org/Phrodo_00/zsh-yaourt" -depends=(zsh) -source=(_yaourt) -arch=('i686' 'x86_64') -license=('GPL') -md5sums=('59f0f4ef24e736b484d6e4788ef03c39') - -build() { - mkdir -p $startdir/pkg/usr/share/zsh/site-functions/ - install -m644 _yaourt $startdir/pkg/usr/share/zsh/site-functions/_yaourt -} diff --git a/zsh-yaourt/_yaourt b/zsh-yaourt/_yaourt deleted file mode 100644 index d76c9a2..0000000 --- a/zsh-yaourt/_yaourt +++ /dev/null @@ -1,344 +0,0 @@ -#compdef yaourt - -# copy this file to /usr/share/zsh/site-functions/_yaourt - -typeset -A opt_args - -# options for passing to _arguments: main pacman commands -_yaourt_opts_commands=( - '-A[Add a package to the system]' - '-Q[Query the package database]' - '-R[Remove a package from the system]' - '-S[Synchronize packages]' - '-U[Upgrade a package]' - '-V[Display version and exit]' - '-h[Display usage]' - '-B[backup pacman database]' - '-G[Get PKGBUILD]' -) - -# options for passing to _arguments: options common to all commands -_yaourt_opts_common=( - '-b[Alternate database location]:database_location:_files -/' - '-h[Display syntax for the given operation]' - '-r[Set alternate installation root]:installation root:_files -/' - '-v[Be more verbose]' - '--cachedir[Alternate package cache location]:cache_location:_files -/' - '--config[An alternate configuration file]:config file:_files' - '--logfile[An alternate log file]:config file:_files' - '--noconfirm[Do not ask for confirmation]' - '--noprogressbar[Do not show a progress bar when downloading files]' - '--noscriptlet[Do not execute the install scriptlet if one exists]' -) - -# options for passing to _arguments: options for --add and --update commands -_yaourt_opts_pkgfile=( - '-d[Skip dependency checks]' - '-f[Overwrite conflicting files]' - '*:package file:_files -g "*.pkg.tar.*"' -) - -# options for passing to _arguments: subactions for --query command -_yaourt_opts_query_actions=( - '-g[View all members of a package group]:*:package groups:->query_group' - '-o[Query the package that owns a file]:file:_files' - '-p[Package file to query]:*:package file:->query_file' - '-s[Search package names and descriptions]:*:search text:->query_search' -) - -# options for passing to _arguments: options for --query and subcommands -_yaourt_opts_query_modifiers=( - '-c[List package changelog]' - '-d[List packages installed as dependencies]' - '-e[List packages explicitly installed]' - '-i[View package information]' - '-ii[View package information including backup files]' - '-l[List package contents]' - '-m[List installed packages not found in sync db(s)]' - '-t[List packages not required by any package]' - '-u[List packages that can be upgraded]' -) - -# options for passing to _arguments: options for --remove command -_yaourt_opts_remove=( - '-c[Remove all dependent packages]' - '-d[Skip dependency checks]' - '-k[Only remove database entry, do not remove files]' - '-n[Remove protected configuration files]' - '-s[Remove dependencies not required by other packages]' - '*:installed package:_yaourt_completions_installed_packages' -) - -# options for passing to _arguments: options for --sync command -_yaourt_opts_sync_actions=( - '*-c[Remove old packages from cache]:*:clean:->sync_clean' - '*-cc[Remove all packages from cache]:*:clean:->sync_clean' - '-g[View all members of a package group]:*:package groups:->sync_group' - '-s[Search package names and descriptions]:*:search text:->sync_search' -) - -# options for passing to _arguments: options for --sync command -_yaourt_opts_sync_modifiers=( - '-d[Skip dependency checks]' - '-e[Install dependencies only]' - '-f[Overwrite conflicting files]' - '-i[View package information]' - '-l[List all packages in a repository]' - '-p[Print download URIs for each package to be installed]' - '-u[Upgrade all out-of-date packages]' - '-w[Download packages only]' - '-y[Download fresh package databases]' - '*--ignore[Ignore a package upgrade]:package: - _yaourt_completions_all_packages' - '*--ignoregroup[Ignore a group upgrade]:package group: - _yaourt_completions_all_groups' - '--asdeps[Install packages as non-explicitly installed]' - '--aur[Install packages from aur, even if they are in community, or, with the -u option, update packages installed from aur]' - '--devel[Used with -u updates all cvs/svn/git/hg/bzr packages]' -) - -# handles --action subcommand -_yaourt_action_add() { - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_pkgfile[@]" -} - -# handles --help subcommand -_yaourt_action_help() { - _arguments -s : \ - "$_yaourt_opts_commands[@]" -} - -# handles cases where no subcommand has yet been given -_yaourt_action_none() { - _arguments -s : \ - "$_yaourt_opts_commands[@]" -} - -# handles --query subcommand -_yaourt_action_query() { - local context state line - typeset -A opt_args - -# _arguments -s : \ -# "$_yaourt_opts_common[@]" \ -# "$_yaourt_opts_query_actions[@]" \ -# "$_yaourt_opts_query_modifiers[@]" - - case $state in - query_file) - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_query_modifiers[@]" \ - '*:package file:_files -g "*.pkg.tar.*"' - ;; - query_group) - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_query_modifiers[@]" \ - '*:groups:_yaourt_completions_installed_groups' - ;; - query_owner) - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_query_modifiers[@]" \ - '*:file:_files' - ;; - query_search) - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_query_modifiers[@]" \ - '*:search text: ' - ;; - *) - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_query_actions[@]" \ - "$_yaourt_opts_query_modifiers[@]" \ - '*:package:_yaourt_completions_installed_packages' - ;; - esac -} - -# handles --remove subcommand -_yaourt_action_remove() { - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_remove[@]" -} - -# handles --sync subcommand -_yaourt_action_sync() { - local context state line - typeset -A opt_args - -# _arguments -s : \ -# "$_yaourt_opts_common[@]" \ -# "$_yaourt_opts_sync_actions[@]" #\ -# #"$_yaourt_opts_sync_modifiers[@]" - - case $state in - sync_clean) - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_sync_modifiers[@]" \ - '*-c[Remove old packages from cache]' \ - ;; - sync_group) - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_sync_modifiers[@]" \ - '*:package group:_yaourt_completions_all_groups' - ;; - sync_search) - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_sync_modifiers[@]" \ - '*:search text: ' - ;; - *) - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_sync_modifiers[@]" \ - '*:package:_yaourt_completions_all_packages' - ;; - esac -} - -# handles --upgrade subcommand -_yaourt_action_upgrade() { - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_pkgfile[@]" -} - -# handles --version subcommand -_yaourt_action_version() { - # no further arguments - return 0 -} - -# provides completions for package groups -_yaourt_completions_all_groups() { - local -a cmd groups - _yaourt_get_command - groups=( $(_call_program groups $cmd[@] -Sg) ) - compadd "$@" -a groups -} - -# provides completions for packages available from repositories -# these can be specified as either 'package' or 'repository/package' -_yaourt_completions_all_packages() { - local -a cmd packages repositories packages_long - - repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options}) - typeset -U repositories - packages_long=(/var/lib/pacman/sync/${^repositories}/*(/)) - packages=(${(o)${${packages_long/\/var\/lib\/pacman\/sync\//}#*/}%-*-*} ) - typeset -U packages - _wanted packages expl "packages" compadd - "${(@)packages}" - if [[ $PREFIX != */* ]] ; then - repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options}) - typeset -U repositories - _wanted repo_packages expl "repository/package" compadd -S "/" $repositories - else - compset -P '*/' - packages_long=(/var/lib/pacman/sync/$IPREFIX*(/)) - packages=(${(o)${${packages_long/\/var\/lib\/pacman\/sync\//}#*/}%-*-*} ) - typeset -U packages - _wanted repo_packages expl "repository/package" compadd ${(@)packages} - fi -} - -# provides completions for package groups -_yaourt_completions_installed_groups() { - local -a cmd groups - _yaourt_get_command - groups=(${(o)${(f)"$(pacman -Qg)"}% *}) - typeset -U groups - compadd "$@" -a groups -} - -# provides completions for installed packages -_yaourt_completions_installed_packages() { - local -a cmd packages packages_long - packages_long=(/var/lib/pacman/local/*(/)) - packages=( ${${packages_long/\/var\/lib\/pacman\/local\//}%-*-*} ) - compadd "$@" -a packages -} - -# provides completions for repository names -_yaourt_completions_repositories() { - local -a cmd repositories - repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options}) - # Uniq the array - typeset -U repositories - compadd "$@" -a repositories -} - -# builds command for invoking pacman in a _call_program command - extracts -# relevant options already specified (config file, etc) -# $cmd must be declared by calling function -_yaourt_get_command() { - # this is mostly nicked from _perforce - cmd=( "pacman" ) - integer i - for (( i = 2; i < CURRENT - 1; i++ )); do - if [[ ${words[i]} = "--config" || ${words[i]} = "--root" ]]; then - cmd+=( ${words[i,i+1]} ) - fi - done -} - -# main dispatcher -_yaourt() { - case $words[2] in - -A*) _yaourt_action_add ;; - -Q*g*) # ipkg groups - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_query_modifiers[@]" \ - '*:groups:_yaourt_completions_installed_groups' - ;; - -Q*o*) # file - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_query_modifiers[@]" \ - '*:package file:_files' - ;; - -Q*p*) # file *.pkg.tar.* - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_query_modifiers[@]" \ - '*:package file:_files -g "*.pkg.tar.*"' - ;; - -Q*) _yaourt_action_query ;; - -R*) _yaourt_action_remove ;; - -S*c*) # no completion - return 0 - ;; - -S*l*) # repos - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_sync_modifiers[@]" \ - '*:package repo:_yaourt_completions_repositories' \ - ;; - -S*g*) # pkg groups - _arguments -s : \ - "$_yaourt_opts_common[@]" \ - "$_yaourt_opts_sync_modifiers[@]" \ - '*:package group:_yaourt_completions_all_groups' - ;; - -S*) _yaourt_action_sync ;; - -U*) _yaourt_action_upgrade ;; - -V*) _yaourt_action_version ;; - -h*) _yaourt_action_help ;; - - ) _yaourt_action_none ;; - * ) return 1 ;; - esac -} - -# run the main dispatcher -_yaourt "$@" - |