From 2f9f502d10d7ac92f051b40a71b31998c93e2607 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 16 Dec 2009 17:13:46 +0100 Subject: update mumble Signed-off-by: Florian Pritz --- mumble/PKGBUILD | 30 +++++++++++++++--------------- mumble/mumble11x.desktop | 11 +++++++++++ 2 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 mumble/mumble11x.desktop diff --git a/mumble/PKGBUILD b/mumble/PKGBUILD index faa2b76..5c669ac 100644 --- a/mumble/PKGBUILD +++ b/mumble/PKGBUILD @@ -1,51 +1,51 @@ +# Maintainer: Lauri Niskanen # Contributor: Sebastian.Salich@gmx.de -# Maintainer: Doc Angelo +# 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.1.8 -pkgrel=3 +pkgver=1.2.0 +pkgrel=1 arch=('i686' 'x86_64') pkgdesc="A voice chat application similar to TeamSpeak" license=('GPL') -depends=('alsa-lib' 'qt>=4.4.0' 'speex>=1.2rc1' 'lsb-release') -makedepends=('pkgconfig' 'boost') +depends=('qt>=4.4.0' 'speex>=1.2rc1' 'celt=>0.7.0' 'lsb-release' 'avahi' 'libsndfile' 'protobuf') +makedepends=('boost') 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" \ - mumble.install) -md5sums=('a7da012922d39b87c45d9f481d4b5efb' - 'dfa125deb91aa1abdaee7b6295fb488e') + mumble11x.desktop) +md5sums=('25872328c8bbc8282ad7ebdeacc0e8b6' + 'b85a15a46a8d0e9a28e87ff6678bb36a') build() { cd $srcdir/$pkgname-$pkgver # Building mumble /usr/bin/qmake main.pro \ - CONFIG+="no-bundled-speex no-speechd no-g15 no-xevie no-server no-embed-qt-translations" \ + 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.1.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.16x16.png $pkgdir/usr/share/icons/hicolor/16x16/apps/mumble.png - install -m644 -D ./icons/mumble.32x32.png $pkgdir/usr/share/icons/hicolor/32x32/apps/mumble.png - install -m644 -D ./icons/mumble.48x48.png $pkgdir/usr/share/icons/hicolor/48x48/apps/mumble.png - install -m644 -D ./icons/mumble.64x64.png $pkgdir/usr/share/icons/hicolor/64x64/apps/mumble.png + install -m644 -D ./icons/mumble.svg $pkgdir/usr/share/icons/hicolor/scalable/apps/mumble.svg } diff --git a/mumble/mumble11x.desktop b/mumble/mumble11x.desktop new file mode 100644 index 0000000..1305f7c --- /dev/null +++ b/mumble/mumble11x.desktop @@ -0,0 +1,11 @@ +[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 -- cgit v1.2.3-24-g4f1b From f56ccc71f9d5d564bdbed1946732a456f4a52a63 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 17 Jan 2010 11:58:41 +0100 Subject: updates Signed-off-by: Florian Pritz --- ack/PKGBUILD | 37 +++++++++++++++++++++++-------------- inxi/PKGBUILD | 2 +- mplayer-vdpau-nogui/PKGBUILD | 7 +++---- portbunny/PKGBUILD | 19 ++++++++++++++----- portbunny/timespec.patch | 20 ++++++++++++++++++++ 5 files changed, 61 insertions(+), 24 deletions(-) create mode 100644 portbunny/timespec.patch diff --git a/ack/PKGBUILD b/ack/PKGBUILD index 5fe7b01..4472bae 100644 --- a/ack/PKGBUILD +++ b/ack/PKGBUILD @@ -1,16 +1,25 @@ -# Maintainer: Michael S. Walker -pkgname=ack -pkgver=1.90 -pkgrel=1 -pkgdesc="A tool like grep, aimed at programmers with large trees of heterogeneous source code." -url="http://ack.googlecode.com" -arch=('i686' 'x86_64') -license=('GPL') -depends=('perl') -source=(http://ack.googlecode.com/svn/tags/$pkgver/$pkgname) -md5sums=('d15d059166beff6103d2401aa2d783c7') +# Maintainer: TDY +# Contributor: Michael S. Walker + +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 $startdir/src - install -D -m755 ack ${pkgdir}/usr/bin/ack -} \ No newline at end of file + 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/inxi/PKGBUILD b/inxi/PKGBUILD index 3014b8f..96baf59 100644 --- a/inxi/PKGBUILD +++ b/inxi/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Florian Pritz pkgname=inxi -pkgver=1.2.5 +pkgver=1.3.1 pkgrel=1 pkgdesc="script to get system information" arch=('any') diff --git a/mplayer-vdpau-nogui/PKGBUILD b/mplayer-vdpau-nogui/PKGBUILD index f59dfd3..78587d0 100644 --- a/mplayer-vdpau-nogui/PKGBUILD +++ b/mplayer-vdpau-nogui/PKGBUILD @@ -1,13 +1,13 @@ #Contributor: Reiser pkgname=mplayer-vdpau-nogui -pkgver=29964 +pkgver=30337 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' 'opencore-amr' 'libdvdnav>=4.1.3' 'lame' 'xvidcore' 'libvdpau') +depends=('ttf-dejavu' 'nvidia>=190.42' 'libvdpau' 'opencore-amr' 'libdvdnav>=4.1.3' 'lame' 'xvidcore') makedepends=('subversion') conflicts=('mplayer') provides=(mplayer=$pkgver) @@ -28,8 +28,7 @@ build() { patch -p1 < ../no_segfault_configure.diff ./configure --prefix=/usr --confdir=/etc/mplayer --disable-gui \ - --enable-ossaudio --disable-alsa --disable-pulse --enable-pthreads \ - --enable-runtime-cpudetection --enable-largefiles --enable-menu \ + --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 \ diff --git a/portbunny/PKGBUILD b/portbunny/PKGBUILD index 5f16fa0..fad01b9 100644 --- a/portbunny/PKGBUILD +++ b/portbunny/PKGBUILD @@ -11,10 +11,11 @@ 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") +source=("http://portbunny.recurity.com/tarballs/PortBunny050109-dev.tar.gz" "installpath.patch" "timespec.patch") build() { cd "$startdir/src/PortBunny050109-dev" - patch -p1 < ../installpath.patch + patch -p1 < $srcdir/installpath.patch + patch -p1 < $srcdir/timespec.patch make || return 1050109_dev mkdir -p $startdir/pkg/lib/modules/$(uname -r)/kernel/ $startdir/pkg/usr/share/portbunny || return 1 mkdir -p $startdir/pkg/usr/bin || return 1 @@ -23,6 +24,14 @@ build() { # vim:set ts=2 sw=2 et: md5sums=('792ceed6d20e5035f9dc1fcc318d2bbe' - 'd056310ab5b14b6f859907b6fac7ae5d') -sha256sums=('e916e93a562315e5dc9f35693d4f08720865e36676590da6742226bd80dfd13f' - 'fba5c7a24181d9066c03a94dc106208bdf183724e7cdd85948094a9c31dc23b8') + 'd056310ab5b14b6f859907b6fac7ae5d' + '42164c0e7d477538074afe942731bb8f') +sha1sums=('829a3c39bc021d81c600899cd4b25de2f01cce32' + 'd765395cda24edea41c66d213b14973a62e88e48' + 'c290f52d41abb64acceae8a1eec84ffac59febe9') +md5sums=('792ceed6d20e5035f9dc1fcc318d2bbe' + 'd056310ab5b14b6f859907b6fac7ae5d' + '4c1d452b454d78d36ce90f60a6c7ce90') +sha1sums=('829a3c39bc021d81c600899cd4b25de2f01cce32' + 'd765395cda24edea41c66d213b14973a62e88e48' + '8f4f93aeab397f39e5408d6090d34af73330c09c') diff --git a/portbunny/timespec.patch b/portbunny/timespec.patch new file mode 100644 index 0000000..6ac01ae --- /dev/null +++ b/portbunny/timespec.patch @@ -0,0 +1,20 @@ +--- 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 + + -- cgit v1.2.3-24-g4f1b From 64006164bbad9e1a0a383dde8aa86a5316c1a66f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 15 Jan 2010 15:44:57 +0100 Subject: add murmur Signed-off-by: Florian Pritz --- murmur/ChangeLog | 28 ++++++++++++++++ murmur/PKGBUILD | 85 +++++++++++++++++++++++++++-------------------- murmur/murmur.conf.d | 2 ++ murmur/murmur.dbus.conf | 22 ++++++++++++ murmur/murmur.install | 44 ++++++++++++------------ murmur/murmur.logrotate.d | 6 ++++ murmur/murmur.rc.d | 37 +++++++++++++++++++++ murmur/murmur.sh | 9 +++++ 8 files changed, 174 insertions(+), 59 deletions(-) create mode 100644 murmur/ChangeLog create mode 100644 murmur/murmur.conf.d create mode 100644 murmur/murmur.dbus.conf create mode 100644 murmur/murmur.logrotate.d create mode 100755 murmur/murmur.rc.d create mode 100644 murmur/murmur.sh diff --git a/murmur/ChangeLog b/murmur/ChangeLog new file mode 100644 index 0000000..f2dabfd --- /dev/null +++ b/murmur/ChangeLog @@ -0,0 +1,28 @@ +2009-12-18 Otto Allmendinger + * 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 + * 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 + * 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 index bc5ee00..46ea90c 100644 --- a/murmur/PKGBUILD +++ b/murmur/PKGBUILD @@ -1,45 +1,58 @@ -# Contributor: Sebastian.Salich@gmx.de -# Maintainer: Doc Angelo +# Maintainer: Otto Allmendinger +# Contributor: Malte Rabenseifner pkgname=murmur -pkgver=1.1.8 -pkgrel=1 -arch=('i686' 'x86_64') +pkgver=1.2.0 +pkgrel=8 pkgdesc="The voice chat application server for Mumble" +arch=('i686' 'x86_64') +url="http://mumble.sourceforge.net" license=('GPL') -backup=('etc/murmurd.ini') -depends=('qt>=4.4.0' 'libcap') -makedepends=('pkgconfig') -conflicts=('mumble<=1.1.4' 'mumble-server') -options=('!libtool') -url="http://mumble.sourceforge.net/" -source=("http://downloads.sourceforge.net/mumble/mumble-$pkgver.tar.gz" \ - murmurd \ - murmur.install \ - murmur-config.sh) -md5sums=('a7da012922d39b87c45d9f481d4b5efb' - 'e3c7be4cc45ff64a7b9e36605ac24497' - '5a9f17491006e979037ac148a3881fe2' - 'ceb7bf98b02ce49837b2ea7640c4b68d') -install=murmur.install +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" +) + +md5sums=('25872328c8bbc8282ad7ebdeacc0e8b6' + 'b99061be67c54bf0bb4a061fd1280281' + '11c1cc875e8021739ec2087252cf0533' + 'eddea4cdbd0bde4b960a67e16b5d5478' + 'c56726cb267ead68f37f35c28e36e6fa') build() { - cd $srcdir/mumble-$pkgver - - # Building murmur - /usr/bin/qmake main.pro "CONFIG+=no-client no-ice" || exit 1 - make || exit 1 + cd ${srcdir}/mumble-$pkgver + + qmake main.pro CONFIG+="no-client no-ice" || return 1 + make || return 1 - # create directories and copy files - install -m755 -D $startdir/murmurd $pkgdir/etc/rc.d/murmurd - install -m755 -D $startdir/murmur-config.sh $pkgdir/usr/bin/murmur-config.sh - install -m755 -D ./release/murmurd $pkgdir/usr/sbin/murmurd - install -m755 -d $pkgdir/usr/share/man/man1 - install -m644 -D ./man/mur* $pkgdir/usr/share/man/man1/ - install -m755 -d $pkgdir/var/lib/murmurd + 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 - # copy and modify murmurd.ini - sed 's|database=|database=/var/lib/murmurd/murmurd.sqlite|g;s|#logfile=murmur.log|logfile=/var/log/murmurd.log|g' ./scripts/murmur.ini > ./scripts/murmurd.ini - install -m644 -D ./scripts/murmurd.ini $pkgdir/etc/ - rm ./scripts/murmurd.ini + 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 } diff --git a/murmur/murmur.conf.d b/murmur/murmur.conf.d new file mode 100644 index 0000000..592194b --- /dev/null +++ b/murmur/murmur.conf.d @@ -0,0 +1,2 @@ +# Use /etc/murmur.ini as configuration file +PARAMS="-ini /etc/murmur.ini" diff --git a/murmur/murmur.dbus.conf b/murmur/murmur.dbus.conf new file mode 100644 index 0000000..cf937d7 --- /dev/null +++ b/murmur/murmur.dbus.conf @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + diff --git a/murmur/murmur.install b/murmur/murmur.install index d940c64..9e1446d 100644 --- a/murmur/murmur.install +++ b/murmur/murmur.install @@ -1,35 +1,33 @@ -# arg 1: the new package version -pre_install() { - /bin/true -} - post_install() { - echo ' -> The user SuperUser has a blank password! You can change' - echo ' -> this and administrate users with murmur-config.sh.' - echo '' -} -# arg 1: the new package version -# arg 2: the old package version -pre_upgrade() { - /bin/true + # 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() { - /bin/true + post_install } -# arg 1: the old package version pre_remove() { - /bin/true + [ -f /var/run/daemons/murmur ] && /etc/rc.d/murmur stop > /dev/null + killall -u murmur -5 + sleep 1 } -# arg 1: the old package version post_remove() { - /bin/true + /etc/rc.d/dbus reload > /dev/null + /usr/sbin/userdel murmur > /dev/null } - -op=$1 -shift -$op $* - \ No newline at end of file diff --git a/murmur/murmur.logrotate.d b/murmur/murmur.logrotate.d new file mode 100644 index 0000000..e113175 --- /dev/null +++ b/murmur/murmur.logrotate.d @@ -0,0 +1,6 @@ +/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 new file mode 100755 index 0000000..ae5d42d --- /dev/null +++ b/murmur/murmur.rc.d @@ -0,0 +1,37 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=$(pidof -o %PPID /usr/lib/murmur/murmur) +case "$1" in + start) + stat_busy "Starting murmur" + [ -z "$PID" ] && /usr/lib/murmur/murmur -ini /etc/murmurd/murmurd.ini + [ -z "$PID" ] && /usr/lib/murmur/murmur -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 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/murmur/murmur.sh b/murmur/murmur.sh new file mode 100644 index 0000000..26aa922 --- /dev/null +++ b/murmur/murmur.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Author: Otto Allmendinger +# Date: 2009-12-14 +# Description: Murmur wrapper script for pivilige separation +# + +ARGS="-ini /etc/murmur.ini $@" +su -c "/usr/lib/murmur/murmur ${ARGS}" - murmur -- cgit v1.2.3-24-g4f1b From e318f0b35c97d42347d4784cb5706e0f69d06532 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 15 Jan 2010 16:21:53 +0100 Subject: murmur: update Signed-off-by: Florian Pritz --- murmur/ChangeLog | 4 ++++ murmur/PKGBUILD | 15 +++++++-------- murmur/murmur.rc.d | 8 ++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/murmur/ChangeLog b/murmur/ChangeLog index f2dabfd..84fa086 100644 --- a/murmur/ChangeLog +++ b/murmur/ChangeLog @@ -1,3 +1,7 @@ +2010-01-9 Otto Allmendinger + * 1.2.1-1: + bump to version 1.2.1 + 2009-12-18 Otto Allmendinger * 1.2.0-8: included dbus configuration file, changed default dbus settings diff --git a/murmur/PKGBUILD b/murmur/PKGBUILD index 46ea90c..a906c62 100644 --- a/murmur/PKGBUILD +++ b/murmur/PKGBUILD @@ -2,8 +2,8 @@ # Contributor: Malte Rabenseifner pkgname=murmur -pkgver=1.2.0 -pkgrel=8 +pkgver=1.2.1 +pkgrel=1 pkgdesc="The voice chat application server for Mumble" arch=('i686' 'x86_64') url="http://mumble.sourceforge.net" @@ -22,12 +22,6 @@ source=("http://downloads.sourceforge.net/mumble/mumble-$pkgver.tar.gz" "murmur.logrotate.d" ) -md5sums=('25872328c8bbc8282ad7ebdeacc0e8b6' - 'b99061be67c54bf0bb4a061fd1280281' - '11c1cc875e8021739ec2087252cf0533' - 'eddea4cdbd0bde4b960a67e16b5d5478' - 'c56726cb267ead68f37f35c28e36e6fa') - build() { cd ${srcdir}/mumble-$pkgver @@ -56,3 +50,8 @@ build() { install -Dm644 README ${pkgdir}/usr/share/doc/murmur/README install -Dm644 man/murmurd.1 ${pkgdir}/usr/share/man/man1/murmurd.1 } +md5sums=('94b59aef3233b91705fa8cfcdd04d3e1' + '43203340a5210379228f2b0dffea6173' + '11c1cc875e8021739ec2087252cf0533' + 'eddea4cdbd0bde4b960a67e16b5d5478' + 'c56726cb267ead68f37f35c28e36e6fa') diff --git a/murmur/murmur.rc.d b/murmur/murmur.rc.d index ae5d42d..08f3223 100755 --- a/murmur/murmur.rc.d +++ b/murmur/murmur.rc.d @@ -3,12 +3,12 @@ . /etc/rc.conf . /etc/rc.d/functions -PID=$(pidof -o %PPID /usr/lib/murmur/murmur) +PID=$(pidof -o %PPID /usr/sbin/murmurd) case "$1" in start) stat_busy "Starting murmur" - [ -z "$PID" ] && /usr/lib/murmur/murmur -ini /etc/murmurd/murmurd.ini - [ -z "$PID" ] && /usr/lib/murmur/murmur -ini /etc/murmurd/murmurd-b52.ini + [ -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 @@ -28,7 +28,7 @@ case "$1" in ;; restart) $0 stop - sleep 3 + sleep 1 $0 start ;; *) -- cgit v1.2.3-24-g4f1b From cae7b71196612d90c08c39ba2bdc8d0d974aa412 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 17 Jan 2010 11:59:51 +0100 Subject: mass updates/adds Signed-off-by: Florian Pritz --- django-openid-auth/PKGBUILD | 18 ++ django-piston/PKGBUILD | 18 ++ django-registration/PKGBUILD | 17 +- django-voting-svn/PKGBUILD | 30 +++ dovecot-sieve/PKGBUILD | 4 +- imagemagick-nox/ChangeLog | 142 ++++++++++++ imagemagick-nox/ImageMagick-6.5.6-1.tar.bz2.part | 0 imagemagick-nox/ImageMagick-6.5.6.1-1.tar.bz2.part | 0 imagemagick-nox/PKGBUILD | 54 +++++ imagemagick-nox/add_delegate.patch | 8 + imagemagick-nox/libpng_mmx_patch_x86_64.patch | 12 + imagemagick-nox/perlmagick.rpath.patch | 10 + parched-git/LICENSE | 24 ++ parched-git/PKGBUILD | 35 +++ perl-ack/ChangeLog | 6 + perl-ack/PKGBUILD | 4 +- php-imagick/PKGBUILD | 25 +++ php-imagick/php-imagick.install | 14 ++ php-suhosin/PKGBUILD | 27 +++ php/mysqlnd-socket.patch | 11 + pyunit/PKGBUILD | 17 ++ pyunit/pyunit-1.4.1.tar.gz?use_mirror=surfnet | Bin 0 -> 23636 bytes spamass-milter/message.diff | 15 ++ vim-nerdtree/PKGBUILD | 8 +- vim-nerdtree/vimdoc.install | 2 +- vim/vim-7.2/7.2.235 | 94 ++++++++ vim/vim-7.2/7.2.236 | 81 +++++++ vim/vim-7.2/7.2.237 | 76 +++++++ vim/vim-7.2/7.2.238 | 117 ++++++++++ vim/vim-7.2/7.2.239 | 145 ++++++++++++ vim/vim-7.2/7.2.240 | 69 ++++++ vim/vim-7.2/7.2.241 | 169 ++++++++++++++ vim/vim-7.2/7.2.242 | 89 ++++++++ vim/vim-7.2/7.2.243 | 67 ++++++ vim/vim-7.2/7.2.244 | 174 +++++++++++++++ vim/vim-7.2/7.2.245 | 165 ++++++++++++++ vim/vim-7.2/7.2.246 | 53 +++++ vim/vim-7.2/7.2.247 | 86 ++++++++ vim/vim-7.2/7.2.248 | 158 +++++++++++++ vim/vim-7.2/7.2.249 | 47 ++++ vim/vim-7.2/7.2.250 | 55 +++++ vim/vim-7.2/7.2.251 | 71 ++++++ vim/vim-7.2/7.2.252 | 51 +++++ vim/vim-7.2/7.2.253 | 143 ++++++++++++ vim/vim-7.2/7.2.254 | 52 +++++ vim/vim-7.2/7.2.255 | 71 ++++++ vim/vim-7.2/7.2.256 | 59 +++++ vim/vim-7.2/7.2.257 | 61 ++++++ vim/vim-7.2/7.2.258 | 74 +++++++ vim/vim-7.2/7.2.259 | 160 ++++++++++++++ vim/vim-7.2/7.2.260 | 155 +++++++++++++ vim/vim-7.2/7.2.261 | 83 +++++++ vim/vim-7.2/7.2.262 | 189 ++++++++++++++++ vim/vim-7.2/7.2.263 | 87 ++++++++ vim/vim-7.2/7.2.264 | 168 ++++++++++++++ vim/vim-7.2/7.2.265 | 56 +++++ vim/vim-7.2/7.2.266 | 244 +++++++++++++++++++++ vim/vim-7.2/7.2.267 | 47 ++++ vim/vim-7.2/keymap/dvorak.vim | 82 +++++++ vim/vim-7.2/syntax/taskdata.vim | 43 ++++ vim/vim-7.2/syntax/taskedit.vim | 35 +++ weechat-git/PKGBUILD | 11 +- weechat/PKGBUILD | 26 +++ 63 files changed, 4093 insertions(+), 21 deletions(-) create mode 100644 django-openid-auth/PKGBUILD create mode 100644 django-piston/PKGBUILD create mode 100644 django-voting-svn/PKGBUILD create mode 100644 imagemagick-nox/ChangeLog create mode 100644 imagemagick-nox/ImageMagick-6.5.6-1.tar.bz2.part create mode 100644 imagemagick-nox/ImageMagick-6.5.6.1-1.tar.bz2.part create mode 100644 imagemagick-nox/PKGBUILD create mode 100644 imagemagick-nox/add_delegate.patch create mode 100644 imagemagick-nox/libpng_mmx_patch_x86_64.patch create mode 100644 imagemagick-nox/perlmagick.rpath.patch create mode 100644 parched-git/LICENSE create mode 100644 parched-git/PKGBUILD create mode 100644 php-imagick/PKGBUILD create mode 100644 php-imagick/php-imagick.install create mode 100644 php-suhosin/PKGBUILD create mode 100644 php/mysqlnd-socket.patch create mode 100644 pyunit/PKGBUILD create mode 100644 pyunit/pyunit-1.4.1.tar.gz?use_mirror=surfnet create mode 100644 spamass-milter/message.diff create mode 100644 vim/vim-7.2/7.2.235 create mode 100644 vim/vim-7.2/7.2.236 create mode 100644 vim/vim-7.2/7.2.237 create mode 100644 vim/vim-7.2/7.2.238 create mode 100644 vim/vim-7.2/7.2.239 create mode 100644 vim/vim-7.2/7.2.240 create mode 100644 vim/vim-7.2/7.2.241 create mode 100644 vim/vim-7.2/7.2.242 create mode 100644 vim/vim-7.2/7.2.243 create mode 100644 vim/vim-7.2/7.2.244 create mode 100644 vim/vim-7.2/7.2.245 create mode 100644 vim/vim-7.2/7.2.246 create mode 100644 vim/vim-7.2/7.2.247 create mode 100644 vim/vim-7.2/7.2.248 create mode 100644 vim/vim-7.2/7.2.249 create mode 100644 vim/vim-7.2/7.2.250 create mode 100644 vim/vim-7.2/7.2.251 create mode 100644 vim/vim-7.2/7.2.252 create mode 100644 vim/vim-7.2/7.2.253 create mode 100644 vim/vim-7.2/7.2.254 create mode 100644 vim/vim-7.2/7.2.255 create mode 100644 vim/vim-7.2/7.2.256 create mode 100644 vim/vim-7.2/7.2.257 create mode 100644 vim/vim-7.2/7.2.258 create mode 100644 vim/vim-7.2/7.2.259 create mode 100644 vim/vim-7.2/7.2.260 create mode 100644 vim/vim-7.2/7.2.261 create mode 100644 vim/vim-7.2/7.2.262 create mode 100644 vim/vim-7.2/7.2.263 create mode 100644 vim/vim-7.2/7.2.264 create mode 100644 vim/vim-7.2/7.2.265 create mode 100644 vim/vim-7.2/7.2.266 create mode 100644 vim/vim-7.2/7.2.267 create mode 100644 vim/vim-7.2/keymap/dvorak.vim create mode 100644 vim/vim-7.2/syntax/taskdata.vim create mode 100644 vim/vim-7.2/syntax/taskedit.vim create mode 100644 weechat/PKGBUILD diff --git a/django-openid-auth/PKGBUILD b/django-openid-auth/PKGBUILD new file mode 100644 index 0000000..ca3af95 --- /dev/null +++ b/django-openid-auth/PKGBUILD @@ -0,0 +1,18 @@ +# Maintainer: Laszlo Papp + +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 new file mode 100644 index 0000000..a635ff5 --- /dev/null +++ b/django-piston/PKGBUILD @@ -0,0 +1,18 @@ +# Maintainer: Laszlo Papp + +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 index 57ae43f..f8caa8c 100644 --- a/django-registration/PKGBUILD +++ b/django-registration/PKGBUILD @@ -1,18 +1,19 @@ # Contributor: Chaiwat Suttipongsakul +# Maintainer: Laszlo Papp + pkgname=django-registration -pkgver=0.7 -pkgrel=3 +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=('BSD') +license=('GPL') depends=('python' 'django') -source=(http://bitbucket.org/ubernostrum/$pkgname/get/v$pkgver.bz2) -md5sums=('3e3ec7b40b59671b19e1857fd55cf3d2') +source=("http://bitbucket.org/ubernostrum/django-registration/downloads/$pkgname-$pkgver-alpha-1.tar.gz") +md5sums=('e2a31be19ebeda41d235a4c52b7bffe7') -build() { - cd "$srcdir/$pkgname" +build() { + cd "$srcdir/$pkgname-$pkgver-alpha-1" python setup.py build || return 1 python setup.py install --root=$pkgdir --optimize=1 || 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 new file mode 100644 index 0000000..ec25884 --- /dev/null +++ b/django-voting-svn/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Laszlo Papp + +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/dovecot-sieve/PKGBUILD b/dovecot-sieve/PKGBUILD index 3d9e0ec..0beb6b1 100644 --- a/dovecot-sieve/PKGBUILD +++ b/dovecot-sieve/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Paul Ezvan pkgname=dovecot-sieve -pkgver=0.1.13 +pkgver=0.1.14 pkgrel=1 _dovecotvers=1.2 pkgdesc="Dovecot sieve plugin" @@ -9,7 +9,7 @@ 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=('6151ab50e24abc0384358b1618c8048f') +md5sums=('01a92883fde76a5f985b0343e81b0c3d') build() { diff --git a/imagemagick-nox/ChangeLog b/imagemagick-nox/ChangeLog new file mode 100644 index 0000000..f35cadc --- /dev/null +++ b/imagemagick-nox/ChangeLog @@ -0,0 +1,142 @@ +2009-08-05 Eric Belanger + + * imagemagick 6.5.4.8-1 + * Upstream update + +2009-07-23 Eric Belanger + + * imagemagick 6.5.4.5-1 + * Upstream update + +2009-06-05 Eric Belanger + + * imagemagick 6.5.3.2-1 + * Upstream update + * Removed insecure RPATH (close FS#14843) + +2009-05-21 Eric Belanger + + * imagemagick 6.5.2.7-1 + * Upstream update + +2009-04-29 Eric Belanger + + * imagemagick 6.5.1.9-1 + * Upstream update + +2009-03-31 Eric Belanger + + * imagemagick 6.5.0.10-1 + * Upstream update + +2009-03-17 Eric Belanger + + * imagemagick 6.5.0.1-1 + * Upstream update + +2009-02-27 Eric Belanger + + * imagemagick 6.4.9.7-1 + * Upstream update + +2009-02-07 Eric Belanger + + * imagemagick 6.4.9.2-1 + * Upstream update + +2009-01-30 Eric Belanger + + * imagemagick 6.4.8.10-1 + * Upstream update + +2008-12-29 Eric Belanger + + * imagemagick 6.4.8.2-1 + * Upstream update + +2008-12-14 Eric Belanger + + * imagemagick 6.4.7.8-1 + * Upstream update + +2008-12-05 Eric Belanger + + * imagemagick 6.4.7.0-1 + * Upstream update + * Rebuild against heimdal 1.2.1 + +2008-11-25 Eric Belanger + + * imagemagick 6.4.6.3-1 + * Upstream update + +2008-11-14 Eric Belanger + + * imagemagick 6.4.5.6-1 + * Upstream update + +2008-10-26 Eric Belanger + + * imagemagick 6.4.5.0-1 + * Upstream update + +2008-10-18 Eric Belanger + + * imagemagick 6.4.4.9-1 + * Upstream update + +2008-10-03 Eric Belanger + + * imagemagick 6.4.4.1-1 + * Upstream update + +2008-09-06 Eric Belanger + + * imagemagick 6.4.3.6-1 + * Upstream update + * Added JPEG2000 support (close FS#10544) + +2008-08-19 Eric Belanger + + * imagemagick 6.4.2.10-1 + * Upstream update + +2008-08-11 Eric Belanger + + * imagemagick 6.4.2.7-1 + * Upstream update + * Added bzip2 and libxml2 depends + * Disabled docs + +2008-07-18 Eric Belanger + + * imagemagick 6.4.2.4-1 + * Upstream update + +2008-06-23 Eric Belanger + + * imagemagick 6.4.2.1-1 + * Upstream update + * Fixed linking problem (close FS#10574) + +2008-05-19 Eric Belanger + + * imagemagick 6.4.1.3-1 + * Upstream update + +2008-04-30 Eric Belanger + + * imagemagick 6.4.1.0-1 + * Upstream update + +2008-04-24 Eric Belanger + + * imagemagick 6.4.0.9-1 + * Upstream update + +2008-03-29 Eric Belanger + + * 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 new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..e69de29 diff --git a/imagemagick-nox/PKGBUILD b/imagemagick-nox/PKGBUILD new file mode 100644 index 0000000..ac59e11 --- /dev/null +++ b/imagemagick-nox/PKGBUILD @@ -0,0 +1,54 @@ +# $Id$ +# Maintainer: Eric Belanger + +# NOTE: To circumvent linking problems (FS#10574), this package must now be built the following way: +# install old package, build new package, install new package, rebuild +# Just uninstalling ImageMagick before build fails as it is used during the build processs + +pkgname=imagemagick-nox +pkgver=6.5.7.10 +pkgrel=1 +pkgdesc="An image viewing/manipulation program, without X dependencies" +arch=('i686' 'x86_64') +url="http://www.imagemagick.org/" +license=('custom') +depends=('lcms>=1.18-2' 'gcc-libs' 'openexr>=1.6.1' 'libtool>=2.2' 'heimdal>=1.2.1' 'bzip2' 'libxml2') +provides=('imagemagick') +options=('!makeflags' '!docs') +source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.bz2 \ + libpng_mmx_patch_x86_64.patch add_delegate.patch perlmagick.rpath.patch) +md5sums=('5f2d4d0eacbeea48af5c4cfb37c4afe2' '069980fc2590c02aed86420996259302'\ + '7f5851c4450b73d52df55c7e806cc316' 'ff9974decbfe9846f8e347239d87e4eb') +sha1sums=('f3d802f2ba01f63c60847341149021a93967979c' 'e42f3acbe85b6098af75c5cecc9a254baaa0482c'\ + '19b40dcbc5bf8efb8ce7190fed17e2921de32ea5' '23405f80904b1de94ebd7bd6fe2a332471b8c283') + +build() { + cd "${srcdir}/ImageMagick-${pkgver%.*}-${pkgver##*.}" + + if [ "${CARCH}" = "x86_64" ]; then + patch -Np1 < ../libpng_mmx_patch_x86_64.patch || return 1 + fi + + patch -p0 < ../add_delegate.patch || return 1 + patch -p0 < ../perlmagick.rpath.patch || return 1 + sed -i "s/with_autotrace='no'/with_autotrace='yes'/" configure || return 1 + + # When there is a soname bump, remove 'LIBS=-lMagickWand' from configure line and build/install. Then, readd 'LIBS=-lMagickWand' and build/install twice. + LIBS=-lMagickWand ./configure --prefix=/usr --without-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 + make DESTDIR="${pkgdir}" install || return 1 + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" || return 1 + install -D -m644 NOTICE "${pkgdir}/usr/share/licenses/${pkgname}/NOTICE" || return 1 + + #Cleaning + find ${pkgdir} -name '*.bs' -exec rm {} \; || return 1 + find ${pkgdir} -name '.packlist' -exec rm {} \; || return 1 + find ${pkgdir} -name 'perllocal.pod' -exec rm {} \; || return 1 + + rm -f ${pkgdir}/usr/lib/*.la || return 1 +} diff --git a/imagemagick-nox/add_delegate.patch b/imagemagick-nox/add_delegate.patch new file mode 100644 index 0000000..6ba6009 --- /dev/null +++ b/imagemagick-nox/add_delegate.patch @@ -0,0 +1,8 @@ +--- 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 @@ + + + ++ + diff --git a/imagemagick-nox/libpng_mmx_patch_x86_64.patch b/imagemagick-nox/libpng_mmx_patch_x86_64.patch new file mode 100644 index 0000000..d86449a --- /dev/null +++ b/imagemagick-nox/libpng_mmx_patch_x86_64.patch @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..958c0f2 --- /dev/null +++ b/imagemagick-nox/perlmagick.rpath.patch @@ -0,0 +1,10 @@ +--- 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/parched-git/LICENSE b/parched-git/LICENSE new file mode 100644 index 0000000..787374a --- /dev/null +++ b/parched-git/LICENSE @@ -0,0 +1,24 @@ +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 new file mode 100644 index 0000000..1ba775f --- /dev/null +++ b/parched-git/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Laszlo Papp + +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/perl-ack/ChangeLog b/perl-ack/ChangeLog index 9561365..62c4e9f 100644 --- a/perl-ack/ChangeLog +++ b/perl-ack/ChangeLog @@ -1,3 +1,9 @@ +2009-12-20 Gerardo Exequiel Pozzi + + * 1.92-1 : + Updated to the latest version. + + 2009-09-11 Gerardo Exequiel Pozzi * 1.90-1 : diff --git a/perl-ack/PKGBUILD b/perl-ack/PKGBUILD index a01ace2..463514a 100644 --- a/perl-ack/PKGBUILD +++ b/perl-ack/PKGBUILD @@ -2,7 +2,7 @@ pkgname=perl-ack _pkgname=ack -pkgver=1.90 +pkgver=1.92 pkgrel=1 pkgdesc='A grep-like tool tailored to working with large trees of source' arch=('any') @@ -12,7 +12,7 @@ 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=('94d2790e5e3c74561ca0cd465a494db6') +md5sums=('c25b5a16d0a27386a75c91d531b86cea') build() { cd $srcdir/${_pkgname}-$pkgver diff --git a/php-imagick/PKGBUILD b/php-imagick/PKGBUILD new file mode 100644 index 0000000..80936d1 --- /dev/null +++ b/php-imagick/PKGBUILD @@ -0,0 +1,25 @@ +# Contributor: Evangelos Foutras + +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 new file mode 100644 index 0000000..266402b --- /dev/null +++ b/php-imagick/php-imagick.install @@ -0,0 +1,14 @@ +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 new file mode 100644 index 0000000..8925d13 --- /dev/null +++ b/php-suhosin/PKGBUILD @@ -0,0 +1,27 @@ +# $Id$ +# Maintainer: Pierre Schmitz + +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/mysqlnd-socket.patch b/php/mysqlnd-socket.patch new file mode 100644 index 0000000..7573ca1 --- /dev/null +++ b/php/mysqlnd-socket.patch @@ -0,0 +1,11 @@ +--- 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/pyunit/PKGBUILD b/pyunit/PKGBUILD new file mode 100644 index 0000000..331808b --- /dev/null +++ b/pyunit/PKGBUILD @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 0000000..50c259e Binary files /dev/null and b/pyunit/pyunit-1.4.1.tar.gz?use_mirror=surfnet differ diff --git a/spamass-milter/message.diff b/spamass-milter/message.diff new file mode 100644 index 0000000..53a32c3 --- /dev/null +++ b/spamass-milter/message.diff @@ -0,0 +1,15 @@ +--- src/spamass-milter-0.3.1/spamass-milter.cpp 2006-03-23 22:41:36.000000000 +0100 ++++ src_new/spamass-milter-0.3.1/spamass-milter.cpp 2010-01-02 01:52:00.000000000 +0100 +@@ -451,8 +451,10 @@ + } + if (do_reject) + { +- debug(D_MISC, "Rejecting"); +- smfi_setreply(ctx, "550", "5.7.1", "Blocked by SpamAssassin"); ++ const char *spam_status = assassin->spam_status().c_str(); ++ debug(D_MISC, "Rejecting %s", smfi_getsymval(ctx,"i")); ++ debug(D_MISC, spam_status); ++ smfi_setreply(ctx, "550", "5.7.1", "Your message seems to be Spam. Please contact postmaster@server-speed.net for more information."); + + + if (flag_bucket) diff --git a/vim-nerdtree/PKGBUILD b/vim-nerdtree/PKGBUILD index c9d5671..a321e33 100644 --- a/vim-nerdtree/PKGBUILD +++ b/vim-nerdtree/PKGBUILD @@ -2,7 +2,7 @@ pkgname=vim-nerdtree pkgver=4.0.0 _scriptid=11500 -pkgrel=1 +pkgrel=3 pkgdesc="A tree explorer plugin for navigating the filesystem" arch=('i686' 'x86_64') url="http://www.vim.org/scripts/script.php?script_id=1658" @@ -12,12 +12,14 @@ groups=('vim-plugins') install=vimdoc.install source=(${pkgname}.zip::http://www.vim.org/scripts/download_script.php?src_id=${_scriptid} license.txt) -md5sums=('985c217d687eceeb3146145a8bbe6cd9' +md5sums=('a359ce8f9bf5ccf238a53df5dd94725a' 'efbd5986e691ce8c876fb86e8f5961ea') build() { - install -d ${pkgdir}/usr/share/vim/vimfiles/{doc,plugin} || return 1 + 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/vimdoc.install b/vim-nerdtree/vimdoc.install index 1140029..220693c 100644 --- a/vim-nerdtree/vimdoc.install +++ b/vim-nerdtree/vimdoc.install @@ -1,6 +1,6 @@ post_install() { echo -n "Updating vim help tags..." - /usr/bin/vim/vimfiles --noplugins -u NONE -U NONE \ + /usr/bin/vim --noplugins -u NONE -U NONE \ --cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1 echo "done." } diff --git a/vim/vim-7.2/7.2.235 b/vim/vim-7.2/7.2.235 new file mode 100644 index 0000000..6aa8338 --- /dev/null +++ b/vim/vim-7.2/7.2.235 @@ -0,0 +1,94 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.235 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.235 +Problem: Using CTRL-O z= in Insert mode has a delay before redrawing. +Solution: Reset msg_didout and msg_scroll. +Files: src/misc1.c, src/spell.c + + +*** ../vim-7.2.234/src/misc1.c 2009-07-14 21:40:30.000000000 +0200 +--- src/misc1.c 2009-07-14 15:51:55.000000000 +0200 +*************** +*** 3276,3281 **** +--- 3276,3282 ---- + cmdline_row = msg_row - 1; + need_wait_return = FALSE; + msg_didany = FALSE; ++ msg_didout = FALSE; + } + else + cmdline_row = save_cmdline_row; +*** ../vim-7.2.234/src/spell.c 2009-05-17 13:30:58.000000000 +0200 +--- src/spell.c 2009-07-14 15:57:55.000000000 +0200 +*************** +*** 10252,10257 **** +--- 10252,10258 ---- + int limit; + int selected = count; + int badlen = 0; ++ int msg_scroll_save = msg_scroll; + + if (no_spell_checking(curwin)) + return; +*************** +*** 10416,10422 **** + selected = prompt_for_number(&mouse_used); + if (mouse_used) + selected -= lines_left; +! lines_left = Rows; /* avoid more prompt */ + } + + if (selected > 0 && selected <= sug.su_ga.ga_len && u_save_cursor() == OK) +--- 10417,10425 ---- + selected = prompt_for_number(&mouse_used); + if (mouse_used) + selected -= lines_left; +! lines_left = Rows; /* avoid more prompt */ +! /* don't delay for 'smd' in normal_cmd() */ +! msg_scroll = msg_scroll_save; + } + + if (selected > 0 && selected <= sug.su_ga.ga_len && u_save_cursor() == OK) +*************** +*** 10441,10447 **** + } + + /* Replace the word. */ +! p = alloc((unsigned)STRLEN(line) - stp->st_orglen + stp->st_wordlen + 1); + if (p != NULL) + { + c = (int)(sug.su_badptr - line); +--- 10444,10451 ---- + } + + /* Replace the word. */ +! p = alloc((unsigned)STRLEN(line) - stp->st_orglen +! + stp->st_wordlen + 1); + if (p != NULL) + { + c = (int)(sug.su_badptr - line); +*** ../vim-7.2.234/src/version.c 2009-07-14 21:40:30.000000000 +0200 +--- src/version.c 2009-07-22 11:00:34.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 235, + /**/ + +-- +From "know your smileys": + |-( Contact lenses, but has lost them + + /// 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/vim/vim-7.2/7.2.236 b/vim/vim-7.2/7.2.236 new file mode 100644 index 0000000..aeb1f57 --- /dev/null +++ b/vim/vim-7.2/7.2.236 @@ -0,0 +1,81 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.236 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.236 +Problem: Mac: Compiling with Ruby doesn't always work. +Solution: In configure filter out the --arch argument (Bjorn Winckler) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.2.235/src/configure.in 2009-05-26 22:58:43.000000000 +0200 +--- src/configure.in 2009-07-14 16:09:34.000000000 +0200 +*************** +*** 984,990 **** + fi + rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'` + if test "X$rubyldflags" != "X"; then +! LDFLAGS="$rubyldflags $LDFLAGS" + fi + RUBY_SRC="if_ruby.c" + RUBY_OBJ="objects/if_ruby.o" +--- 984,996 ---- + fi + rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'` + if test "X$rubyldflags" != "X"; then +! dnl Ruby on Mac OS X 10.5 adds "-arch" flags but these should only +! dnl be included if requested by passing --with-mac-arch to +! dnl configure, so strip these flags first (if present) +! rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//'` +! if test "X$rubyldflags" != "X"; then +! LDFLAGS="$rubyldflags $LDFLAGS" +! fi + fi + RUBY_SRC="if_ruby.c" + RUBY_OBJ="objects/if_ruby.o" +*** ../vim-7.2.235/src/auto/configure 2009-05-26 22:58:43.000000000 +0200 +--- src/auto/configure 2009-07-14 16:11:58.000000000 +0200 +*************** +*** 5780,5786 **** + fi + rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'` + if test "X$rubyldflags" != "X"; then +! LDFLAGS="$rubyldflags $LDFLAGS" + fi + RUBY_SRC="if_ruby.c" + RUBY_OBJ="objects/if_ruby.o" +--- 5780,5789 ---- + fi + rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'` + if test "X$rubyldflags" != "X"; then +! rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//'` +! if test "X$rubyldflags" != "X"; then +! LDFLAGS="$rubyldflags $LDFLAGS" +! fi + fi + RUBY_SRC="if_ruby.c" + RUBY_OBJ="objects/if_ruby.o" +*** ../vim-7.2.235/src/version.c 2009-07-22 11:03:38.000000000 +0200 +--- src/version.c 2009-07-22 11:14:38.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 236, + /**/ + +-- +From "know your smileys": + <|-) Chinese + <|-( Chinese and doesn't like these kind of jokes + + /// 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/vim/vim-7.2/7.2.237 b/vim/vim-7.2/7.2.237 new file mode 100644 index 0000000..3592d3d --- /dev/null +++ b/vim/vim-7.2/7.2.237 @@ -0,0 +1,76 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.237 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.237 +Problem: Crash on exit when window icon not set. +Solution: Copy terminal name when using it for the icon name. +Files: src/os_unix.c + + +*** ../vim-7.2.236/src/os_unix.c 2009-07-14 17:38:51.000000000 +0200 +--- src/os_unix.c 2009-07-14 18:30:04.000000000 +0200 +*************** +*** 1734,1742 **** + if (oldicon == NULL && !test_only) + { + if (STRNCMP(T_NAME, "builtin_", 8) == 0) +! oldicon = T_NAME + 8; + else +! oldicon = T_NAME; + } + + return retval; +--- 1734,1742 ---- + if (oldicon == NULL && !test_only) + { + if (STRNCMP(T_NAME, "builtin_", 8) == 0) +! oldicon = vim_strsave(T_NAME + 8); + else +! oldicon = vim_strsave(T_NAME); + } + + return retval; +*************** +*** 1939,1947 **** + if (!test_only) + { + if (STRNCMP(T_NAME, "builtin_", 8) == 0) +! oldicon = T_NAME + 8; + else +! oldicon = T_NAME; + } + return FALSE; + } +--- 1939,1947 ---- + if (!test_only) + { + if (STRNCMP(T_NAME, "builtin_", 8) == 0) +! oldicon = vim_strsave(T_NAME + 8); + else +! oldicon = vim_strsave(T_NAME); + } + return FALSE; + } +*** ../vim-7.2.236/src/version.c 2009-07-22 11:16:54.000000000 +0200 +--- src/version.c 2009-07-22 13:26:30.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 237, + /**/ + +-- +Common sense is what tells you that the world is flat. + + /// 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/vim/vim-7.2/7.2.238 b/vim/vim-7.2/7.2.238 new file mode 100644 index 0000000..a70976d --- /dev/null +++ b/vim/vim-7.2/7.2.238 @@ -0,0 +1,117 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.238 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.238 +Problem: Leaking memory when setting term to "builtin_dumb". +Solution: Free memory when resetting term option t_Co. +Files: src/option.c, src/proto/option.pro, src/term.c + + +*** ../vim-7.2.237/src/option.c 2009-06-16 17:50:56.000000000 +0200 +--- src/option.c 2009-07-22 12:49:19.000000000 +0200 +*************** +*** 403,410 **** + #define P_NUM 0x02 /* the option is numeric */ + #define P_STRING 0x04 /* the option is a string */ + #define P_ALLOCED 0x08 /* the string option is in allocated memory, +! must use vim_free() when assigning new +! value. Not set if default is the same. */ + #define P_EXPAND 0x10 /* environment expansion. NOTE: P_EXPAND can + never be used for local or hidden options! */ + #define P_NODEFAULT 0x40 /* don't set to default value */ +--- 403,411 ---- + #define P_NUM 0x02 /* the option is numeric */ + #define P_STRING 0x04 /* the option is a string */ + #define P_ALLOCED 0x08 /* the string option is in allocated memory, +! must use free_string_option() when +! assigning new value. Not set if default is +! the same. */ + #define P_EXPAND 0x10 /* environment expansion. NOTE: P_EXPAND can + never be used for local or hidden options! */ + #define P_NODEFAULT 0x40 /* don't set to default value */ +*************** +*** 8927,8932 **** +--- 8928,8955 ---- + } + + /* ++ * Free the string for one term option, if it was allocated. ++ * Set the string to empty_option and clear allocated flag. ++ * "var" points to the option value. ++ */ ++ void ++ free_one_termoption(var) ++ char_u *var; ++ { ++ struct vimoption *p; ++ ++ for (p = &options[0]; p->fullname != NULL; p++) ++ if (p->var == var) ++ { ++ if (p->flags & P_ALLOCED) ++ free_string_option(*(char_u **)(p->var)); ++ *(char_u **)(p->var) = empty_option; ++ p->flags &= ~P_ALLOCED; ++ break; ++ } ++ } ++ ++ /* + * Set the terminal option defaults to the current value. + * Used after setting the terminal name. + */ +*** ../vim-7.2.237/src/proto/option.pro 2009-02-21 20:27:00.000000000 +0100 +--- src/proto/option.pro 2009-07-22 12:52:31.000000000 +0200 +*************** +*** 29,34 **** +--- 29,35 ---- + int makefoldset __ARGS((FILE *fd)); + void clear_termoptions __ARGS((void)); + void free_termoptions __ARGS((void)); ++ void free_one_termoption __ARGS((char_u *var)); + void set_term_defaults __ARGS((void)); + void comp_col __ARGS((void)); + char_u *get_equalprg __ARGS((void)); +*** ../vim-7.2.237/src/term.c 2009-06-16 14:31:56.000000000 +0200 +--- src/term.c 2009-07-22 13:19:59.000000000 +0200 +*************** +*** 2881,2887 **** + + /* if 'Sb' and 'AB' are not defined, reset "Co" */ + if (*T_CSB == NUL && *T_CAB == NUL) +! T_CCO = empty_option; + + /* Set 'weirdinvert' according to value of 't_xs' */ + p_wiv = (*T_XS != NUL); +--- 2881,2887 ---- + + /* if 'Sb' and 'AB' are not defined, reset "Co" */ + if (*T_CSB == NUL && *T_CAB == NUL) +! free_one_termoption(T_CCO); + + /* Set 'weirdinvert' according to value of 't_xs' */ + p_wiv = (*T_XS != NUL); +*** ../vim-7.2.237/src/version.c 2009-07-22 13:27:50.000000000 +0200 +--- src/version.c 2009-07-22 14:25:44.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 238, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +95. Only communication in your household is through email. + + /// 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/vim/vim-7.2/7.2.239 b/vim/vim-7.2/7.2.239 new file mode 100644 index 0000000..26b80ee --- /dev/null +++ b/vim/vim-7.2/7.2.239 @@ -0,0 +1,145 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.239 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.239 +Problem: Using :diffpatch twice or when patching fails causes memory + corruption and/or a crash. (Bryan Venteicher) +Solution: Detect missing output file. Avoid using non-existing buffer. +Files: src/diff.c + + +*** ../vim-7.2.238/src/diff.c 2009-05-14 22:19:19.000000000 +0200 +--- src/diff.c 2009-07-22 16:06:21.000000000 +0200 +*************** +*** 893,898 **** +--- 893,899 ---- + char_u *browseFile = NULL; + int browse_flag = cmdmod.browse; + #endif ++ struct stat st; + + #ifdef FEAT_BROWSE + if (cmdmod.browse) +*************** +*** 999,1042 **** + STRCAT(buf, ".rej"); + mch_remove(buf); + +! if (curbuf->b_fname != NULL) + { +! newname = vim_strnsave(curbuf->b_fname, + (int)(STRLEN(curbuf->b_fname) + 4)); +! if (newname != NULL) +! STRCAT(newname, ".new"); +! } + + #ifdef FEAT_GUI +! need_mouse_correct = TRUE; + #endif +! /* don't use a new tab page, each tab page has its own diffs */ +! cmdmod.tab = 0; +! +! if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) != FAIL) +! { +! /* Pretend it was a ":split fname" command */ +! eap->cmdidx = CMD_split; +! eap->arg = tmp_new; +! do_exedit(eap, old_curwin); + +! if (curwin != old_curwin) /* split must have worked */ + { +! /* Set 'diff', 'scrollbind' on and 'wrap' off. */ +! diff_win_options(curwin, TRUE); +! diff_win_options(old_curwin, TRUE); + +! if (newname != NULL) + { +! /* do a ":file filename.new" on the patched buffer */ +! eap->arg = newname; +! ex_file(eap); + + #ifdef FEAT_AUTOCMD +! /* Do filetype detection with the new name. */ +! if (au_has_group((char_u *)"filetypedetect")) +! do_cmdline_cmd((char_u *)":doau filetypedetect BufRead"); + #endif + } + } + } +--- 1000,1050 ---- + STRCAT(buf, ".rej"); + mch_remove(buf); + +! /* Only continue if the output file was created. */ +! if (mch_stat((char *)tmp_new, &st) < 0 || st.st_size == 0) +! EMSG(_("E816: Cannot read patch output")); +! else + { +! if (curbuf->b_fname != NULL) +! { +! newname = vim_strnsave(curbuf->b_fname, + (int)(STRLEN(curbuf->b_fname) + 4)); +! if (newname != NULL) +! STRCAT(newname, ".new"); +! } + + #ifdef FEAT_GUI +! need_mouse_correct = TRUE; + #endif +! /* don't use a new tab page, each tab page has its own diffs */ +! cmdmod.tab = 0; + +! if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) != FAIL) + { +! /* Pretend it was a ":split fname" command */ +! eap->cmdidx = CMD_split; +! eap->arg = tmp_new; +! do_exedit(eap, old_curwin); + +! /* check that split worked and editing tmp_new */ +! if (curwin != old_curwin && win_valid(old_curwin)) + { +! /* Set 'diff', 'scrollbind' on and 'wrap' off. */ +! diff_win_options(curwin, TRUE); +! diff_win_options(old_curwin, TRUE); +! +! if (newname != NULL) +! { +! /* do a ":file filename.new" on the patched buffer */ +! eap->arg = newname; +! ex_file(eap); + + #ifdef FEAT_AUTOCMD +! /* Do filetype detection with the new name. */ +! if (au_has_group((char_u *)"filetypedetect")) +! do_cmdline_cmd((char_u *)":doau filetypedetect BufRead"); + #endif ++ } + } + } + } +*** ../vim-7.2.238/src/version.c 2009-07-22 14:27:33.000000000 +0200 +--- src/version.c 2009-07-22 16:21:29.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 239, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +97. Your mother tells you to remember something, and you look for + a File/Save command. + + /// 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/vim/vim-7.2/7.2.240 b/vim/vim-7.2/7.2.240 new file mode 100644 index 0000000..7a1c22e --- /dev/null +++ b/vim/vim-7.2/7.2.240 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.240 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.240 +Problem: Crash when using find/replace dialog repeatedly. (Michiel + Hartsuiker) +Solution: Avoid doing the operation while busy or recursively. Also refuse + replace when text is locked. +Files: src/gui.c + + +*** ../vim-7.2.239/src/gui.c 2009-06-24 18:31:36.000000000 +0200 +--- src/gui.c 2009-07-22 16:54:16.000000000 +0200 +*************** +*** 5004,5009 **** +--- 5004,5022 ---- + char_u *p; + regmatch_T regmatch; + int save_did_emsg = did_emsg; ++ static int busy = FALSE; ++ ++ /* When the screen is being updated we should not change buffers and ++ * windows structures, it may cause freed memory to be used. Also don't ++ * do this recursively (pressing "Find" quickly several times. */ ++ if (updating_screen || busy) ++ return FALSE; ++ ++ /* refuse replace when text cannot be changed */ ++ if ((type == FRD_REPLACE || type == FRD_REPLACEALL) && text_locked()) ++ return FALSE; ++ ++ busy = TRUE; + + ga_init2(&ga, 1, 100); + if (type == FRD_REPLACEALL) +*************** +*** 5094,5099 **** +--- 5107,5113 ---- + } + + vim_free(ga.ga_data); ++ busy = FALSE; + return (ga.ga_len > 0); + } + +*** ../vim-7.2.239/src/version.c 2009-07-22 16:22:33.000000000 +0200 +--- src/version.c 2009-07-29 11:09:13.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 240, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits. + + /// 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/vim/vim-7.2/7.2.241 b/vim/vim-7.2/7.2.241 new file mode 100644 index 0000000..42e9ade --- /dev/null +++ b/vim/vim-7.2/7.2.241 @@ -0,0 +1,169 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.241 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.241 +Problem: When using a combination of ":bufdo" and "doautoall" we may end up + in the wrong directory. (Ajit Thakkar) + Crash when triggering an autocommand in ":vimgrep". (Yukihiro + Nakadaira) +Solution: Clear w_localdir and globaldir when using the aucmd_win. + Use a separate flag to decide aucmd_win needs to be restored. +Files: src/fileio.c, src/globals.h, src/structs.h + + +*** ../vim-7.2.240/src/fileio.c 2009-07-01 17:11:40.000000000 +0200 +--- src/fileio.c 2009-07-22 19:08:55.000000000 +0200 +*************** +*** 8420,8425 **** +--- 8420,8429 ---- + if (aucmd_win == NULL) + win = curwin; + } ++ if (win == NULL && aucmd_win_used) ++ /* Strange recursive autocommand, fall back to using the current ++ * window. Expect a few side effects... */ ++ win = curwin; + + aco->save_curwin = curwin; + aco->save_curbuf = curbuf; +*************** +*** 8428,8433 **** +--- 8432,8438 ---- + /* There is a window for "buf" in the current tab page, make it the + * curwin. This is preferred, it has the least side effects (esp. if + * "buf" is curbuf). */ ++ aco->use_aucmd_win = FALSE; + curwin = win; + } + else +*************** +*** 8436,8444 **** +--- 8441,8460 ---- + * effects, insert it in a the current tab page. + * Anything related to a window (e.g., setting folds) may have + * unexpected results. */ ++ aco->use_aucmd_win = TRUE; ++ aucmd_win_used = TRUE; + aucmd_win->w_buffer = buf; + ++buf->b_nwindows; + win_init_empty(aucmd_win); /* set cursor and topline to safe values */ ++ vim_free(aucmd_win->w_localdir); ++ aucmd_win->w_localdir = NULL; ++ ++ /* Make sure w_localdir and globaldir are NULL to avoid a chdir() in ++ * win_enter_ext(). */ ++ aucmd_win->w_localdir = NULL; ++ aco->globaldir = globaldir; ++ globaldir = NULL; ++ + + #ifdef FEAT_WINDOWS + /* Split the current window, put the aucmd_win in the upper half. +*************** +*** 8472,8478 **** + int dummy; + #endif + +! if (aco->new_curwin == aucmd_win) + { + --curbuf->b_nwindows; + #ifdef FEAT_WINDOWS +--- 8488,8494 ---- + int dummy; + #endif + +! if (aco->use_aucmd_win) + { + --curbuf->b_nwindows; + #ifdef FEAT_WINDOWS +*************** +*** 8499,8504 **** +--- 8515,8521 ---- + /* Remove the window and frame from the tree of frames. */ + (void)winframe_remove(curwin, &dummy, NULL); + win_remove(curwin, NULL); ++ aucmd_win_used = FALSE; + last_status(FALSE); /* may need to remove last status line */ + restore_snapshot(SNAP_AUCMD_IDX, FALSE); + (void)win_comp_pos(); /* recompute window positions */ +*************** +*** 8517,8522 **** +--- 8534,8542 ---- + #endif + curbuf = curwin->w_buffer; + ++ vim_free(globaldir); ++ globaldir = aco->globaldir; ++ + /* the buffer contents may have changed */ + check_cursor(); + if (curwin->w_topline > curbuf->b_ml.ml_line_count) +*************** +*** 8541,8547 **** + #endif + { + /* Restore the buffer which was previously edited by curwin, if +! * it was chagned, we are still the same window and the buffer is + * valid. */ + if (curwin == aco->new_curwin + && curbuf != aco->new_curbuf +--- 8561,8567 ---- + #endif + { + /* Restore the buffer which was previously edited by curwin, if +! * it was changed, we are still the same window and the buffer is + * valid. */ + if (curwin == aco->new_curwin + && curbuf != aco->new_curbuf +*** ../vim-7.2.240/src/globals.h 2009-06-16 16:01:34.000000000 +0200 +--- src/globals.h 2009-07-22 19:50:53.000000000 +0200 +*************** +*** 541,546 **** +--- 541,547 ---- + + #ifdef FEAT_AUTOCMD + EXTERN win_T *aucmd_win; /* window used in aucmd_prepbuf() */ ++ EXTERN int aucmd_win_used INIT(= FALSE); /* aucmd_win is being used */ + #endif + + /* +*** ../vim-7.2.240/src/structs.h 2009-07-09 18:24:24.000000000 +0200 +--- src/structs.h 2009-07-22 18:58:35.000000000 +0200 +*************** +*** 2288,2296 **** +--- 2288,2298 ---- + { + buf_T *save_curbuf; /* saved curbuf */ + #ifdef FEAT_AUTOCMD ++ int use_aucmd_win; /* using aucmd_win */ + win_T *save_curwin; /* saved curwin */ + win_T *new_curwin; /* new curwin */ + buf_T *new_curbuf; /* new curbuf */ ++ char_u *globaldir; /* saved value of globaldir */ + #endif + } aco_save_T; + +*** ../vim-7.2.240/src/version.c 2009-07-29 11:10:31.000000000 +0200 +--- src/version.c 2009-07-29 12:06:31.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 241, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +114. You are counting items, you go "0,1,2,3,4,5,6,7,8,9,A,B,C,D...". + + /// 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/vim/vim-7.2/7.2.242 b/vim/vim-7.2/7.2.242 new file mode 100644 index 0000000..22341cd --- /dev/null +++ b/vim/vim-7.2/7.2.242 @@ -0,0 +1,89 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.242 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.242 +Problem: Setting 'lazyredraw' causes the cursor column to be recomputed. + (Tom Link) +Solution: Only recompute the cursor column for a boolean option if changes + the cursor position. +Files: src/option.c + + +*** ../vim-7.2.241/src/option.c 2009-07-22 14:27:33.000000000 +0200 +--- src/option.c 2009-07-29 10:03:39.000000000 +0200 +*************** +*** 7194,7199 **** +--- 7194,7207 ---- + compatible_set(); + } + ++ /* 'list', 'number' */ ++ else if ((int *)varp == &curwin->w_p_list ++ || (int *)varp == &curwin->w_p_nu) ++ { ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; ++ } ++ + else if ((int *)varp == &curbuf->b_p_ro) + { + /* when 'readonly' is reset globally, also reset readonlymode */ +*************** +*** 7645,7650 **** +--- 7653,7666 ---- + curbuf->b_p_imsearch = B_IMODE_USE_INSERT; + # endif + } ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; ++ } ++ ++ else if ((int *)varp == &p_arshape) ++ { ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; + } + #endif + +*************** +*** 7655,7662 **** + options[opt_idx].flags |= P_WAS_SET; + + comp_col(); /* in case 'ruler' or 'showcmd' changed */ +! if (curwin->w_curswant != MAXCOL) +! curwin->w_set_curswant = TRUE; /* in case 'list' changed */ + check_redraw(options[opt_idx].flags); + + return NULL; +--- 7671,7677 ---- + options[opt_idx].flags |= P_WAS_SET; + + comp_col(); /* in case 'ruler' or 'showcmd' changed */ +! + check_redraw(options[opt_idx].flags); + + return NULL; +*** ../vim-7.2.241/src/version.c 2009-07-29 12:09:49.000000000 +0200 +--- src/version.c 2009-07-29 15:40:43.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 242, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +117. You are more comfortable typing in 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/vim/vim-7.2/7.2.243 b/vim/vim-7.2/7.2.243 new file mode 100644 index 0000000..92a6580 --- /dev/null +++ b/vim/vim-7.2/7.2.243 @@ -0,0 +1,67 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.243 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.243 +Problem: Memory leak when using :vimgrep and resizing. (Dominique Pelle) +Solution: Free memory for aucmd_win when resizing and don't allocate it + twice. +Files: src/screen.c + + +*** ../vim-7.2.242/src/screen.c 2009-06-16 17:22:38.000000000 +0200 +--- src/screen.c 2009-07-29 15:59:37.000000000 +0200 +*************** +*** 7467,7472 **** +--- 7467,7476 ---- + */ + FOR_ALL_TAB_WINDOWS(tp, wp) + win_free_lsize(wp); ++ #ifdef FEAT_AUTOCMD ++ if (aucmd_win != NULL) ++ win_free_lsize(aucmd_win); ++ #endif + + new_ScreenLines = (schar_T *)lalloc((long_u)( + (Rows + 1) * Columns * sizeof(schar_T)), FALSE); +*************** +*** 7504,7510 **** + } + } + #ifdef FEAT_AUTOCMD +! if (aucmd_win != NULL && win_alloc_lines(aucmd_win) == FAIL) + outofmem = TRUE; + #endif + #ifdef FEAT_WINDOWS +--- 7508,7515 ---- + } + } + #ifdef FEAT_AUTOCMD +! if (aucmd_win != NULL && aucmd_win->w_lines == NULL +! && win_alloc_lines(aucmd_win) == FAIL) + outofmem = TRUE; + #endif + #ifdef FEAT_WINDOWS +*** ../vim-7.2.242/src/version.c 2009-07-29 15:41:32.000000000 +0200 +--- src/version.c 2009-07-29 16:07:47.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 243, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +118. You are on a first-name basis with your ISP's staff. + + /// 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/vim/vim-7.2/7.2.244 b/vim/vim-7.2/7.2.244 new file mode 100644 index 0000000..6c9b1fb --- /dev/null +++ b/vim/vim-7.2/7.2.244 @@ -0,0 +1,174 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.244 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.244 +Problem: When 'enc' is utf-8 and 'fenc' is latin1, writing a non-latin1 + character gives a conversion error without any hint what is wrong. +Solution: When known add the line number to the error message. +Files: src/fileio.c + + +*** ../vim-7.2.243/src/fileio.c 2009-07-29 12:09:49.000000000 +0200 +--- src/fileio.c 2009-07-29 17:04:06.000000000 +0200 +*************** +*** 121,126 **** +--- 121,128 ---- + char_u *bw_conv_buf; /* buffer for writing converted chars */ + int bw_conv_buflen; /* size of bw_conv_buf */ + int bw_conv_error; /* set for conversion error */ ++ linenr_T bw_conv_error_lnum; /* first line with error or zero */ ++ linenr_T bw_start_lnum; /* line number at start of buffer */ + # ifdef USE_ICONV + iconv_t bw_iconv_fd; /* descriptor for iconv() or -1 */ + # endif +*************** +*** 2924,2929 **** +--- 2925,2931 ---- + linenr_T lnum; + long nchars; + char_u *errmsg = NULL; ++ int errmsg_allocated = FALSE; + char_u *errnum = NULL; + char_u *buffer; + char_u smallbuf[SMBUFSIZE]; +*************** +*** 2987,2992 **** +--- 2989,2995 ---- + /* must init bw_conv_buf and bw_iconv_fd before jumping to "fail" */ + write_info.bw_conv_buf = NULL; + write_info.bw_conv_error = FALSE; ++ write_info.bw_conv_error_lnum = 0; + write_info.bw_restlen = 0; + # ifdef USE_ICONV + write_info.bw_iconv_fd = (iconv_t)-1; +*************** +*** 4243,4248 **** +--- 4245,4251 ---- + nchars += write_info.bw_len; + } + } ++ write_info.bw_start_lnum = start; + #endif + + write_info.bw_len = bufsize; +*************** +*** 4278,4283 **** +--- 4281,4289 ---- + nchars += bufsize; + s = buffer; + len = 0; ++ #ifdef FEAT_MBYTE ++ write_info.bw_start_lnum = lnum; ++ #endif + } + /* write failed or last line has no EOL: stop here */ + if (end == 0 +*************** +*** 4474,4480 **** + { + #ifdef FEAT_MBYTE + if (write_info.bw_conv_error) +! errmsg = (char_u *)_("E513: write error, conversion failed (make 'fenc' empty to override)"); + else + #endif + if (got_int) +--- 4480,4496 ---- + { + #ifdef FEAT_MBYTE + if (write_info.bw_conv_error) +! { +! if (write_info.bw_conv_error_lnum == 0) +! errmsg = (char_u *)_("E513: write error, conversion failed (make 'fenc' empty to override)"); +! else +! { +! errmsg_allocated = TRUE; +! errmsg = alloc(300); +! vim_snprintf((char *)errmsg, 300, _("E513: write error, conversion failed in line %ld (make 'fenc' empty to override)"), +! (long)write_info.bw_conv_error_lnum); +! } +! } + else + #endif + if (got_int) +*************** +*** 4550,4555 **** +--- 4566,4577 ---- + { + STRCAT(IObuff, _(" CONVERSION ERROR")); + c = TRUE; ++ if (write_info.bw_conv_error_lnum != 0) ++ { ++ int l = STRLEN(IObuff); ++ vim_snprintf((char *)IObuff + l, IOSIZE - l, _(" in line %ld;"), ++ (long)write_info.bw_conv_error_lnum); ++ } + } + else if (notconverted) + { +*************** +*** 4746,4751 **** +--- 4768,4775 ---- + } + STRCAT(IObuff, errmsg); + emsg(IObuff); ++ if (errmsg_allocated) ++ vim_free(errmsg); + + retval = FAIL; + if (end == 0) +*************** +*** 5105,5111 **** + c = buf[wlen]; + } + +! ip->bw_conv_error |= ucs2bytes(c, &p, flags); + } + if (flags & FIO_LATIN1) + len = (int)(p - buf); +--- 5129,5141 ---- + c = buf[wlen]; + } + +! if (ucs2bytes(c, &p, flags) && !ip->bw_conv_error) +! { +! ip->bw_conv_error = TRUE; +! ip->bw_conv_error_lnum = ip->bw_start_lnum; +! } +! if (c == NL) +! ++ip->bw_start_lnum; + } + if (flags & FIO_LATIN1) + len = (int)(p - buf); +*************** +*** 5386,5391 **** +--- 5416,5422 ---- + #ifdef FEAT_MBYTE + /* + * Convert a Unicode character to bytes. ++ * Return TRUE for an error, FALSE when it's OK. + */ + static int + ucs2bytes(c, pp, flags) +*** ../vim-7.2.243/src/version.c 2009-07-29 16:13:35.000000000 +0200 +--- src/version.c 2009-07-29 18:01:27.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 244, + /**/ + +-- +Support your right to bare arms! Wear short sleeves! + + /// 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/vim/vim-7.2/7.2.245 b/vim/vim-7.2/7.2.245 new file mode 100644 index 0000000..d046c97 --- /dev/null +++ b/vim/vim-7.2/7.2.245 @@ -0,0 +1,165 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.245 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.245 +Problem: When 'enc' is "utf-16" and 'fenc' is "utf-8" writing a file does + conversion while none should be done. (Yukihiro Nakadaira) When + 'fenc' is empty the file is written as utf-8 instead of utf-16. +Solution: Do proper comparison of encodings, taking into account that all + Unicode values for 'enc' use utf-8 internally. +Files: src/fileio.c + + +*** ../vim-7.2.244/src/fileio.c 2009-07-29 18:05:57.000000000 +0200 +--- src/fileio.c 2009-07-29 17:04:06.000000000 +0200 +*************** +*** 134,140 **** + #ifdef FEAT_MBYTE + static linenr_T readfile_linenr __ARGS((linenr_T linecnt, char_u *p, char_u *endp)); + static int ucs2bytes __ARGS((unsigned c, char_u **pp, int flags)); +! static int same_encoding __ARGS((char_u *a, char_u *b)); + static int get_fio_flags __ARGS((char_u *ptr)); + static char_u *check_for_bom __ARGS((char_u *p, long size, int *lenp, int flags)); + static int make_bom __ARGS((char_u *buf, char_u *name)); +--- 134,140 ---- + #ifdef FEAT_MBYTE + static linenr_T readfile_linenr __ARGS((linenr_T linecnt, char_u *p, char_u *endp)); + static int ucs2bytes __ARGS((unsigned c, char_u **pp, int flags)); +! static int need_conversion __ARGS((char_u *fenc)); + static int get_fio_flags __ARGS((char_u *ptr)); + static char_u *check_for_bom __ARGS((char_u *p, long size, int *lenp, int flags)); + static int make_bom __ARGS((char_u *buf, char_u *name)); +*************** +*** 1043,1055 **** + } + + /* +! * Conversion is required when the encoding of the file is different +! * from 'encoding' or 'encoding' is UTF-16, UCS-2 or UCS-4 (requires +! * conversion to UTF-8). + */ + fio_flags = 0; +! converted = (*fenc != NUL && !same_encoding(p_enc, fenc)); +! if (converted || enc_unicode != 0) + { + + /* "ucs-bom" means we need to check the first bytes of the file +--- 1043,1054 ---- + } + + /* +! * Conversion may be required when the encoding of the file is different +! * from 'encoding' or 'encoding' is UTF-16, UCS-2 or UCS-4. + */ + fio_flags = 0; +! converted = need_conversion(fenc); +! if (converted) + { + + /* "ucs-bom" means we need to check the first bytes of the file +*************** +*** 3969,3978 **** + fenc = buf->b_p_fenc; + + /* +! * The file needs to be converted when 'fileencoding' is set and +! * 'fileencoding' differs from 'encoding'. + */ +! converted = (*fenc != NUL && !same_encoding(p_enc, fenc)); + + /* + * Check if UTF-8 to UCS-2/4 or Latin1 conversion needs to be done. Or +--- 3968,3976 ---- + fenc = buf->b_p_fenc; + + /* +! * Check if the file needs to be converted. + */ +! converted = need_conversion(fenc); + + /* + * Check if UTF-8 to UCS-2/4 or Latin1 conversion needs to be done. Or +*************** +*** 5502,5521 **** + } + + /* +! * Return TRUE if "a" and "b" are the same 'encoding'. +! * Ignores difference between "ansi" and "latin1", "ucs-4" and "ucs-4be", etc. + */ + static int +! same_encoding(a, b) +! char_u *a; +! char_u *b; + { +! int f; + +! if (STRCMP(a, b) == 0) +! return TRUE; +! f = get_fio_flags(a); +! return (f != 0 && get_fio_flags(b) == f); + } + + /* +--- 5500,5536 ---- + } + + /* +! * Return TRUE if file encoding "fenc" requires conversion from or to +! * 'encoding'. + */ + static int +! need_conversion(fenc) +! char_u *fenc; + { +! int same_encoding; +! int enc_flags; +! int fenc_flags; + +! if (*fenc == NUL || STRCMP(p_enc, fenc) == 0) +! same_encoding = TRUE; +! else +! { +! /* Ignore difference between "ansi" and "latin1", "ucs-4" and +! * "ucs-4be", etc. */ +! enc_flags = get_fio_flags(p_enc); +! fenc_flags = get_fio_flags(fenc); +! same_encoding = (enc_flags != 0 && fenc_flags == enc_flags); +! } +! if (same_encoding) +! { +! /* Specified encoding matches with 'encoding'. This requires +! * conversion when 'encoding' is Unicode but not UTF-8. */ +! return enc_unicode != 0; +! } +! +! /* Encodings differ. However, conversion is not needed when 'enc' is any +! * Unicode encoding and the file is UTF-8. */ +! return !(enc_utf8 && fenc_flags == FIO_UTF8); + } + + /* +*** ../vim-7.2.244/src/version.c 2009-07-29 18:05:57.000000000 +0200 +--- src/version.c 2009-07-29 18:20:08.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 245, + /**/ + +-- +An actual excerpt from a classified section of a city newspaper: +"Illiterate? Write today for free help!" + + /// 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/vim/vim-7.2/7.2.246 b/vim/vim-7.2/7.2.246 new file mode 100644 index 0000000..5b1c978 --- /dev/null +++ b/vim/vim-7.2/7.2.246 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.246 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.246 +Problem: Cscope home page link is wrong. +Solution: Update the URL. (Sergey Khorev) +Files: runtime/doc/if_cscop.txt + + +*** ../vim-7.2.245/runtime/doc/if_cscop.txt 2009-07-09 21:22:36.000000000 +0200 +--- runtime/doc/if_cscop.txt 2009-09-11 11:19:31.000000000 +0200 +*************** +*** 481,487 **** + any problems, suggestions, patches, et al., you have for the usage of + cscope within Vim to him. + *cscope-win32* +! For a cscope version for Win32 see: http://iamphet.nm.ru/cscope/index.html + + Win32 support was added by Sergey Khorev . Contact + him if you have Win32-specific issues. +--- 481,488 ---- + any problems, suggestions, patches, et al., you have for the usage of + cscope within Vim to him. + *cscope-win32* +! For a cscope version for Win32 see: +! http://code.google.com/p/cscope-win32/ + + Win32 support was added by Sergey Khorev . Contact + him if you have Win32-specific issues. +*** ../vim-7.2.245/src/version.c 2009-07-29 18:24:59.000000000 +0200 +--- src/version.c 2009-09-11 11:29:02.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 246, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +221. Your wife melts your keyboard in the oven. + + /// 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/vim/vim-7.2/7.2.247 b/vim/vim-7.2/7.2.247 new file mode 100644 index 0000000..e18926d --- /dev/null +++ b/vim/vim-7.2/7.2.247 @@ -0,0 +1,86 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.247 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.247 +Problem: Mzscheme interface minor problem. +Solution: Better error message when build fails. (Sergey Khorev) +Files: src/if_mzsch.c + + +*** ../vim-7.2.246/src/if_mzsch.c 2009-07-09 20:06:30.000000000 +0200 +--- src/if_mzsch.c 2009-09-11 11:20:39.000000000 +0200 +*************** +*** 635,642 **** + #endif /* DYNAMIC_MZSCHEME */ + + /* need to put it here for dynamic stuff to work */ +! #ifdef INCLUDE_MZSCHEME_BASE + # include "mzscheme_base.c" + #endif + + /* +--- 635,644 ---- + #endif /* DYNAMIC_MZSCHEME */ + + /* need to put it here for dynamic stuff to work */ +! #if defined(INCLUDE_MZSCHEME_BASE) + # include "mzscheme_base.c" ++ #elif MZSCHEME_VERSION_MAJOR >= 400 ++ # error MzScheme 4.x must include mzscheme_base.c, for MinGW32 you need to define MZSCHEME_GENERATE_BASE=yes + #endif + + /* +*************** +*** 875,888 **** + #ifdef INCLUDE_MZSCHEME_BASE + { + /* +! * versions 4.x do not provide Scheme bindings by defaults + * we need to add them explicitly + */ + Scheme_Object *scheme_base_symbol = NULL; + MZ_GC_DECL_REG(1); + MZ_GC_VAR_IN_REG(0, scheme_base_symbol); + MZ_GC_REG(); +! /* invoke function from generated and included base.c */ + declare_modules(environment); + scheme_base_symbol = scheme_intern_symbol("scheme/base"); + MZ_GC_CHECK(); +--- 877,890 ---- + #ifdef INCLUDE_MZSCHEME_BASE + { + /* +! * versions 4.x do not provide Scheme bindings by default + * we need to add them explicitly + */ + Scheme_Object *scheme_base_symbol = NULL; + MZ_GC_DECL_REG(1); + MZ_GC_VAR_IN_REG(0, scheme_base_symbol); + MZ_GC_REG(); +! /* invoke function from generated and included mzscheme_base.c */ + declare_modules(environment); + scheme_base_symbol = scheme_intern_symbol("scheme/base"); + MZ_GC_CHECK(); +*** ../vim-7.2.246/src/version.c 2009-09-11 11:30:12.000000000 +0200 +--- src/version.c 2009-09-11 11:53:59.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 247, + /**/ + +-- +Your fault: 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/vim/vim-7.2/7.2.248 b/vim/vim-7.2/7.2.248 new file mode 100644 index 0000000..2254101 --- /dev/null +++ b/vim/vim-7.2/7.2.248 @@ -0,0 +1,158 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.248 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.248 (extra) +Problem: Mzscheme interface building minor problems. +Solution: Update Win32 makefiles. (Sergey Khorev) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak + + +*** ../vim-7.2.247/src/Make_cyg.mak 2007-09-30 22:28:48.000000000 +0200 +--- src/Make_cyg.mak 2009-09-11 11:23:23.000000000 +0200 +*************** +*** 212,224 **** + MZSCHEME_VER = 209_000 + endif + + ifeq (yes, $(DYNAMIC_MZSCHEME)) + DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\" + else + ifndef MZSCHEME_DLLS + MZSCHEME_DLLS = $(MZSCHEME) + endif +! EXTRA_LIBS += -L$(MZSCHEME_DLLS) -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER) + endif + endif + +--- 212,245 ---- + MZSCHEME_VER = 209_000 + endif + ++ ifndef MZSCHEME_PRECISE_GC ++ MZSCHEME_PRECISE_GC=no ++ endif ++ ++ # for version 4.x we need to generate byte-code for Scheme base ++ ifndef MZSCHEME_GENERATE_BASE ++ MZSCHEME_GENERATE_BASE=no ++ endif ++ + ifeq (yes, $(DYNAMIC_MZSCHEME)) + DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\" + else + ifndef MZSCHEME_DLLS + MZSCHEME_DLLS = $(MZSCHEME) + endif +! ifeq (yes,$(MZSCHEME_PRECISE_GC)) +! MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER) +! else +! MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER) +! endif +! EXTRA_LIBS += -L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)/lib $(MZSCHEME_LIB) +! endif +! ifeq (yes,$(MZSCHEME_GENERATE_BASE)) +! DEFINES += -DINCLUDE_MZSCHEME_BASE +! MZ_EXTRA_DEP += mzscheme_base.c +! endif +! ifeq (yes,$(MZSCHEME_PRECISE_GC)) +! DEFINES += -DMZ_PRECISE_GC + endif + endif + +*************** +*** 473,478 **** +--- 494,502 ---- + ifdef PERL + -$(DEL) if_perl.c + endif ++ ifdef MZSCHEME ++ -$(DEL) mzscheme_base.c ++ endif + -$(DEL) pathdef.c + $(MAKE) -C xxd -f Make_cyg.mak clean + $(MAKE) -C GvimExt -f Make_ming.mak clean +*************** +*** 523,531 **** +--- 547,561 ---- + $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_DEP) + $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o + ++ $(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP) ++ $(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o ++ + $(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h + $(RC) $(RCFLAGS) vim.rc -o $(OUTDIR)/vimrc.o + ++ mzscheme_base.c: ++ $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base ++ + pathdef.c: $(INCL) + ifneq (sh.exe, $(SHELL)) + @echo creating pathdef.c +*** ../vim-7.2.247/src/Make_ming.mak 2009-05-26 22:58:43.000000000 +0200 +--- src/Make_ming.mak 2009-09-11 11:23:28.000000000 +0200 +*************** +*** 135,141 **** + ifndef MZSCHEME_DLLS + MZSCHEME_DLLS=$(MZSCHEME) + endif +! MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) + endif + + endif +--- 135,141 ---- + ifndef MZSCHEME_DLLS + MZSCHEME_DLLS=$(MZSCHEME) + endif +! MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib + endif + + endif +*************** +*** 563,568 **** +--- 563,571 ---- + ifdef PERL + -$(DEL) if_perl.c + endif ++ ifdef MZSCHEME ++ -$(DEL) mzscheme_base.c ++ endif + $(MAKE) -C GvimExt -f Make_ming.mak clean + $(MAKE) -C xxd -f Make_cyg.mak clean + +*** ../vim-7.2.247/src/Make_mvc.mak 2009-06-16 16:45:14.000000000 +0200 +--- src/Make_mvc.mak 2009-09-11 11:23:28.000000000 +0200 +*************** +*** 865,870 **** +--- 865,871 ---- + - if exist dimm_i.c del dimm_i.c + - if exist dimm.tlb del dimm.tlb + - if exist dosinst.exe del dosinst.exe ++ - if exist mzscheme_base.c del mzscheme_base.c + cd xxd + $(MAKE) /NOLOGO -f Make_mvc.mak clean + cd .. +*** ../vim-7.2.247/src/version.c 2009-09-11 12:20:47.000000000 +0200 +--- src/version.c 2009-09-11 12:48:26.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 248, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +222. You send more than 20 personal e-mails a day. + + /// 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/vim/vim-7.2/7.2.249 b/vim/vim-7.2/7.2.249 new file mode 100644 index 0000000..33169f7 --- /dev/null +++ b/vim/vim-7.2/7.2.249 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.249 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.249 +Problem: The script to check .po files can't handle '%' in plural forms. +Solution: Remove "Plural-Forms:" from the checked string. +Files: src/po/check.vim + + +*** ../vim-7.2.248/src/po/check.vim 2008-06-09 14:45:38.000000000 +0200 +--- src/po/check.vim 2009-09-11 12:37:56.000000000 +0200 +*************** +*** 23,28 **** +--- 23,31 ---- + " remove '%', not used for formatting. + let idline = substitute(idline, "'%'", '', 'g') + ++ " remove '%' used for plural forms. ++ let idline = substitute(idline, '\\nPlural-Forms: .\+;\\n', '', '') ++ + " remove everything but % items. + return substitute(idline, '[^%]*\(%[-+ #''.0-9*]*l\=[dsuxXpoc%]\)\=', '\1', 'g') + endfunc +*** ../vim-7.2.248/src/version.c 2009-09-11 12:48:56.000000000 +0200 +--- src/version.c 2009-09-11 12:59:18.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 249, + /**/ + +-- +If evolution theories are correct, humans will soon grow a third +hand for operating the mouse. + + /// 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/vim/vim-7.2/7.2.250 b/vim/vim-7.2/7.2.250 new file mode 100644 index 0000000..2f30a24 --- /dev/null +++ b/vim/vim-7.2/7.2.250 @@ -0,0 +1,55 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.250 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.250 (extra) +Problem: Possible buffer overflow. +Solution: Compute the remaining space. (Dominique Pelle) +Files: src/GvimExt/gvimext.cpp + + +*** ../vim-7.2.249/src/GvimExt/gvimext.cpp 2008-07-24 20:51:11.000000000 +0200 +--- src/GvimExt/gvimext.cpp 2009-09-11 13:26:27.000000000 +0200 +*************** +*** 635,641 **** + } + // Now concatenate + strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1); +! strncat(temp, title, BUFSIZE - 1); + InsertMenu(hMenu, + indexMenu++, + MF_STRING|MF_BYPOSITION, +--- 635,643 ---- + } + // Now concatenate + strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1); +! temp[BUFSIZE - 1] = '\0'; +! strncat(temp, title, BUFSIZE - 1 - strlen(temp)); +! temp[BUFSIZE - 1] = '\0'; + InsertMenu(hMenu, + indexMenu++, + MF_STRING|MF_BYPOSITION, +*** ../vim-7.2.249/src/version.c 2009-09-11 12:59:57.000000000 +0200 +--- src/version.c 2009-09-11 13:23:45.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 250, + /**/ + + +-- +hundred-and-one symptoms of being an internet addict: +223. You set up a web-cam as your home's security system. + + /// 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/vim/vim-7.2/7.2.251 b/vim/vim-7.2/7.2.251 new file mode 100644 index 0000000..00cf0f0 --- /dev/null +++ b/vim/vim-7.2/7.2.251 @@ -0,0 +1,71 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.251 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.251 (after 7.2.044) +Problem: Compiler adds invalid memory bounds check. +Solution: Remove _FORTIFY_SOURCE=2 from CFLAGS. (Dominique Pelle) +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.2.250/src/auto/configure 2009-07-22 11:16:54.000000000 +0200 +--- src/auto/configure 2009-08-07 14:49:52.000000000 +0200 +*************** +*** 17135,17141 **** + { $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 +--- 17135,17141 ---- + { $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=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'` + { $as_echo "$as_me:$LINENO: result: yes" >&5 + $as_echo "yes" >&6; } + else +*** ../vim-7.2.250/src/configure.in 2009-07-22 11:16:54.000000000 +0200 +--- src/configure.in 2009-08-07 14:49:47.000000000 +0200 +*************** +*** 3233,3239 **** + 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) +--- 3233,3239 ---- + 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=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'` + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) +*** ../vim-7.2.250/src/version.c 2009-09-11 13:26:38.000000000 +0200 +--- src/version.c 2009-09-11 13:43:46.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 251, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +225. You sign up for free subscriptions for all the computer magazines + + /// 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/vim/vim-7.2/7.2.252 b/vim/vim-7.2/7.2.252 new file mode 100644 index 0000000..b7dc702 --- /dev/null +++ b/vim/vim-7.2/7.2.252 @@ -0,0 +1,51 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.252 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.252 +Problem: When using a multi-byte 'enc' the 'iskeyword' option cannot + contain characters above 128. +Solution: Use mb_ptr2char_adv(). +Files: src/charset.c + + +*** ../vim-7.2.251/src/charset.c 2009-05-14 22:19:19.000000000 +0200 +--- src/charset.c 2009-09-09 21:11:46.000000000 +0200 +*************** +*** 174,179 **** +--- 174,184 ---- + if (VIM_ISDIGIT(*p)) + c = getdigits(&p); + else ++ #ifdef FEAT_MBYTE ++ if (has_mbyte) ++ c = mb_ptr2char_adv(&p); ++ else ++ #endif + c = *p++; + c2 = -1; + if (*p == '-' && p[1] != NUL) +*** ../vim-7.2.251/src/version.c 2009-09-11 13:44:33.000000000 +0200 +--- src/version.c 2009-09-11 14:01:48.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 252, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +226. You sit down at the computer right after dinner and your spouse + says "See you in the morning." + + /// 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/vim/vim-7.2/7.2.253 b/vim/vim-7.2/7.2.253 new file mode 100644 index 0000000..354d444 --- /dev/null +++ b/vim/vim-7.2/7.2.253 @@ -0,0 +1,143 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.253 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.253 +Problem: Netbeans interface: getLength always uses current buffer. +Solution: Use ml_get_buf() instead of ml_get(). (Xavier de Gaye) +Files: src/netbeans.c + + +*** ../vim-7.2.252/src/netbeans.c 2009-06-24 16:49:50.000000000 +0200 +--- src/netbeans.c 2009-09-11 13:40:14.000000000 +0200 +*************** +*** 1499,1505 **** + return FAIL; + } + first = *pos; +! nbdebug((" FIRST POS: line %d, col %d\n", first.lnum, first.col)); + pos = off2pos(buf->bufp, off+count-1); + if (!pos) + { +--- 1499,1506 ---- + return FAIL; + } + first = *pos; +! nbdebug((" FIRST POS: line %d, col %d\n", +! first.lnum, first.col)); + pos = off2pos(buf->bufp, off+count-1); + if (!pos) + { +*************** +*** 1510,1516 **** + return FAIL; + } + last = *pos; +! nbdebug((" LAST POS: line %d, col %d\n", last.lnum, last.col)); + del_from_lnum = first.lnum; + del_to_lnum = last.lnum; + doupdate = 1; +--- 1511,1518 ---- + return FAIL; + } + last = *pos; +! nbdebug((" LAST POS: line %d, col %d\n", +! last.lnum, last.col)); + del_from_lnum = first.lnum; + del_to_lnum = last.lnum; + doupdate = 1; +*************** +*** 1521,1527 **** + next = off2pos(buf->bufp, off + count); + + /* Remove part of the first line. */ +! if (first.col != 0 || (next != NULL && first.lnum == next->lnum)) + { + if (first.lnum != last.lnum + || (next != NULL && first.lnum != next->lnum)) +--- 1523,1530 ---- + next = off2pos(buf->bufp, off + count); + + /* Remove part of the first line. */ +! if (first.col != 0 +! || (next != NULL && first.lnum == next->lnum)) + { + if (first.lnum != last.lnum + || (next != NULL && first.lnum != next->lnum)) +*************** +*** 1584,1590 **** + int id = buf_findsign_id(buf->bufp, (linenr_T)i); + if (id > 0) + { +! nbdebug((" Deleting sign %d on line %d\n", id, i)); + buf_delsign(buf->bufp, id); + } + else +--- 1587,1594 ---- + int id = buf_findsign_id(buf->bufp, (linenr_T)i); + if (id > 0) + { +! nbdebug((" Deleting sign %d on line %d\n", +! id, i)); + buf_delsign(buf->bufp, id); + } + else +*************** +*** 1593,1599 **** + } + } + +! nbdebug((" Deleting lines %d through %d\n", del_from_lnum, del_to_lnum)); + curwin->w_cursor.lnum = del_from_lnum; + curwin->w_cursor.col = 0; + del_lines(del_to_lnum - del_from_lnum + 1, FALSE); +--- 1597,1604 ---- + } + } + +! nbdebug((" Deleting lines %d through %d\n", +! del_from_lnum, del_to_lnum)); + curwin->w_cursor.lnum = del_from_lnum; + curwin->w_cursor.col = 0; + del_lines(del_to_lnum - del_from_lnum + 1, FALSE); +*************** +*** 3514,3520 **** + eol_size = 1; + for (lnum = 1; lnum <= bufp->b_ml.ml_line_count; ++lnum) + { +! char_count += (long)STRLEN(ml_get(lnum)) + eol_size; + /* Check for a CTRL-C every 100000 characters */ + if (char_count > last_check) + { +--- 3519,3526 ---- + eol_size = 1; + for (lnum = 1; lnum <= bufp->b_ml.ml_line_count; ++lnum) + { +! char_count += (long)STRLEN(ml_get_buf(bufp, lnum, FALSE)) +! + eol_size; + /* Check for a CTRL-C every 100000 characters */ + if (char_count > last_check) + { +*** ../vim-7.2.252/src/version.c 2009-09-11 14:02:25.000000000 +0200 +--- src/version.c 2009-09-11 14:18:45.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 253, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +227. You sleep next to your monitor. Or on top of it. + + /// 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/vim/vim-7.2/7.2.254 b/vim/vim-7.2/7.2.254 new file mode 100644 index 0000000..c8c57af --- /dev/null +++ b/vim/vim-7.2/7.2.254 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.254 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.254 +Problem: Compiler warning for assigning size_t to int. +Solution: Use size_t for the variable. (George Reilly) +Files: src/fileio.c + + +*** ../vim-7.2.253/src/fileio.c 2009-07-29 18:24:59.000000000 +0200 +--- src/fileio.c 2009-09-11 13:46:19.000000000 +0200 +*************** +*** 4568,4574 **** + c = TRUE; + if (write_info.bw_conv_error_lnum != 0) + { +! int l = STRLEN(IObuff); + vim_snprintf((char *)IObuff + l, IOSIZE - l, _(" in line %ld;"), + (long)write_info.bw_conv_error_lnum); + } +--- 4568,4574 ---- + c = TRUE; + if (write_info.bw_conv_error_lnum != 0) + { +! size_t l = STRLEN(IObuff); + vim_snprintf((char *)IObuff + l, IOSIZE - l, _(" in line %ld;"), + (long)write_info.bw_conv_error_lnum); + } +*** ../vim-7.2.253/src/version.c 2009-09-11 14:19:41.000000000 +0200 +--- src/version.c 2009-09-11 15:03:42.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 254, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +230. You spend your Friday nights typing away at your keyboard + + /// 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/vim/vim-7.2/7.2.255 b/vim/vim-7.2/7.2.255 new file mode 100644 index 0000000..1bb85b1 --- /dev/null +++ b/vim/vim-7.2/7.2.255 @@ -0,0 +1,71 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.255 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.255 (after 7.2.242) +Problem: Setting 'rightleft', 'linebreak' and 'wrap' may cause cursor to be + in wrong place. +Solution: Recompute the cursor column for these options. +Files: src/option.c + + +*** ../vim-7.2.254/src/option.c 2009-07-29 15:41:32.000000000 +0200 +--- src/option.c 2009-09-11 13:59:55.000000000 +0200 +*************** +*** 7430,7435 **** +--- 7430,7437 ---- + { + if (curwin->w_p_wrap) + curwin->w_leftcol = 0; ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; + } + + #ifdef FEAT_WINDOWS +*************** +*** 7664,7669 **** +--- 7666,7687 ---- + } + #endif + ++ #ifdef FEAT_LINEBREAK ++ if ((int *)varp == &curwin->w_p_lbr) ++ { ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; ++ } ++ #endif ++ ++ #ifdef FEAT_RIGHTLEFT ++ if ((int *)varp == &curwin->w_p_rl) ++ { ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; ++ } ++ #endif ++ + /* + * End of handling side effects for bool options. + */ +*** ../vim-7.2.254/src/version.c 2009-09-11 15:04:13.000000000 +0200 +--- src/version.c 2009-09-11 15:19:40.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 255, + /**/ + +-- +A computer without Windows is like a fish without a bicycle. + + /// 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/vim/vim-7.2/7.2.256 b/vim/vim-7.2/7.2.256 new file mode 100644 index 0000000..17361fb --- /dev/null +++ b/vim/vim-7.2/7.2.256 @@ -0,0 +1,59 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.256 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.256 +Problem: When 'guifont' was not set GTK font dialog doesn't have a default. + (Andreas Metzler) +Solution: Set default to DEFAULT_FONT. (James Vega) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.2.255/src/gui_gtk_x11.c 2009-07-01 18:04:30.000000000 +0200 +--- src/gui_gtk_x11.c 2009-09-11 14:21:32.000000000 +0200 +*************** +*** 4729,4734 **** +--- 4729,4737 ---- + if (oldval != NULL && *oldval != NUL) + gtk_font_selection_dialog_set_font_name( + GTK_FONT_SELECTION_DIALOG(gui.fontdlg), (char *)oldval); ++ else ++ gtk_font_selection_dialog_set_font_name( ++ GTK_FONT_SELECTION_DIALOG(gui.fontdlg), DEFAULT_FONT); + + if (gui.fontname) + { +*************** +*** 4816,4821 **** +--- 4819,4827 ---- + if (oldname != oldval) + vim_free(oldname); + } ++ else ++ gtk_font_selection_dialog_set_font_name( ++ GTK_FONT_SELECTION_DIALOG(dialog), DEFAULT_FONT); + + response = gtk_dialog_run(GTK_DIALOG(dialog)); + +*** ../vim-7.2.255/src/version.c 2009-09-11 15:20:22.000000000 +0200 +--- src/version.c 2009-09-11 15:45:36.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 256, + /**/ + +-- +Get a life? What is the URL where it can be downloaded? + + /// 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/vim/vim-7.2/7.2.257 b/vim/vim-7.2/7.2.257 new file mode 100644 index 0000000..a856a3a --- /dev/null +++ b/vim/vim-7.2/7.2.257 @@ -0,0 +1,61 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.257 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.257 +Problem: With GTK 2.17 lots of assertion error messages. +Solution: Remove check for static gravity. (Sebastian Droege) +Files: src/gui_gtk_f.c + + +*** ../vim-7.2.256/src/gui_gtk_f.c 2009-05-17 23:25:16.000000000 +0200 +--- src/gui_gtk_f.c 2009-09-11 15:15:41.000000000 +0200 +*************** +*** 860,870 **** + gtk_form_set_static_gravity(GdkWindow *window, gboolean use_static) + { + #ifdef HAVE_GTK2 +! gboolean static_gravity_supported; +! +! static_gravity_supported = gdk_window_set_static_gravities(window, +! use_static); +! g_return_if_fail(static_gravity_supported); + #else + XSetWindowAttributes xattributes; + +--- 860,868 ---- + gtk_form_set_static_gravity(GdkWindow *window, gboolean use_static) + { + #ifdef HAVE_GTK2 +! /* We don't check if static gravity is actually supported, because it +! * results in an annoying assertion error message. */ +! gdk_window_set_static_gravities(window, use_static); + #else + XSetWindowAttributes xattributes; + +*** ../vim-7.2.256/src/version.c 2009-09-11 15:46:20.000000000 +0200 +--- src/version.c 2009-09-11 16:16:52.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 257, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner + in the front doorway permanently so it always looks like you are + actually attempting to do something about that mess that has amassed + since you discovered the Internet. + + /// 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/vim/vim-7.2/7.2.258 b/vim/vim-7.2/7.2.258 new file mode 100644 index 0000000..98ddab5 --- /dev/null +++ b/vim/vim-7.2/7.2.258 @@ -0,0 +1,74 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.258 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.258 +Problem: v:beval_col and b:beval_text are wrong in UTF-8 text. (Tony + Mechelynck) +Solution: Use byte number instead of character number for the column. +Files: src/ui.c + + +*** ../vim-7.2.257/src/ui.c 2009-07-01 18:04:30.000000000 +0200 +--- src/ui.c 2009-09-11 16:11:50.000000000 +0200 +*************** +*** 3055,3072 **** + int vcol; + { + /* try to advance to the specified column */ +- int col = 0; + int count = 0; + char_u *ptr; + +! ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); + while (count <= vcol && *ptr != NUL) + { +- ++col; + count += win_lbr_chartabsize(wp, ptr, count, NULL); + mb_ptr_adv(ptr); + } +! return col; + } + #endif + +--- 3055,3071 ---- + int vcol; + { + /* try to advance to the specified column */ + int count = 0; + char_u *ptr; ++ char_u *start; + +! start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); + while (count <= vcol && *ptr != NUL) + { + count += win_lbr_chartabsize(wp, ptr, count, NULL); + mb_ptr_adv(ptr); + } +! return (int)(ptr - start); + } + #endif + +*** ../vim-7.2.257/src/version.c 2009-09-11 16:17:36.000000000 +0200 +--- src/version.c 2009-09-11 16:45:48.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 258, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +232. You start conversations with, "Have you gotten an ISDN line?" + + /// 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/vim/vim-7.2/7.2.259 b/vim/vim-7.2/7.2.259 new file mode 100644 index 0000000..0bf0ba1 --- /dev/null +++ b/vim/vim-7.2/7.2.259 @@ -0,0 +1,160 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.259 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.259 +Problem: exists() doesn't work properly for an empty aucmd group. +Solution: Change how au_exists() handles a missing pattern. Also add a + test for this. (Bob Hiestand) +Files: src/fileio.c, src/testdir/Makefile, src/testdir/test67.in, + src/testdir/test67.ok + + +*** ../vim-7.2.258/src/fileio.c 2009-09-11 15:04:13.000000000 +0200 +--- src/fileio.c 2009-09-11 16:37:08.000000000 +0200 +*************** +*** 9498,9512 **** + ap = first_autopat[(int)event]; + if (ap == NULL) + goto theend; +- if (pattern == NULL) +- { +- retval = TRUE; +- goto theend; +- } + + /* if pattern is "", special handling is needed which uses curbuf */ + /* for pattern ", fnamecmp() will work fine */ +! if (STRICMP(pattern, "") == 0) + buflocal_buf = curbuf; + + /* Check if there is an autocommand with the given pattern. */ +--- 9498,9507 ---- + ap = first_autopat[(int)event]; + if (ap == NULL) + goto theend; + + /* if pattern is "", special handling is needed which uses curbuf */ + /* for pattern ", fnamecmp() will work fine */ +! if (pattern != NULL && STRICMP(pattern, "") == 0) + buflocal_buf = curbuf; + + /* Check if there is an autocommand with the given pattern. */ +*************** +*** 9515,9523 **** + /* For buffer-local autocommands, fnamecmp() works fine. */ + if (ap->pat != NULL && ap->cmds != NULL + && (group == AUGROUP_ALL || ap->group == group) +! && (buflocal_buf == NULL +! ? fnamecmp(ap->pat, pattern) == 0 +! : ap->buflocal_nr == buflocal_buf->b_fnum)) + { + retval = TRUE; + break; +--- 9510,9519 ---- + /* For buffer-local autocommands, fnamecmp() works fine. */ + if (ap->pat != NULL && ap->cmds != NULL + && (group == AUGROUP_ALL || ap->group == group) +! && (pattern == NULL +! || (buflocal_buf == NULL +! ? fnamecmp(ap->pat, pattern) == 0 +! : ap->buflocal_nr == buflocal_buf->b_fnum))) + { + retval = TRUE; + break; +*** ../vim-7.2.258/src/testdir/Makefile 2009-06-24 18:07:55.000000000 +0200 +--- src/testdir/Makefile 2009-09-11 16:31:33.000000000 +0200 +*************** +*** 22,28 **** + test48.out test49.out test51.out test52.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 test66.out + + SCRIPTS_GUI = test16.out + +--- 22,28 ---- + test48.out test49.out test51.out test52.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 test66.out test67.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.2.258/src/testdir/test67.in 2009-09-11 17:23:47.000000000 +0200 +--- src/testdir/test67.in 2009-09-11 16:43:11.000000000 +0200 +*************** +*** 0 **** +--- 1,33 ---- ++ Test that groups and patterns are tested correctly when calling exists() for ++ autocommands. ++ ++ STARTTEST ++ :so small.vim ++ :let results=[] ++ :augroup auexists ++ :augroup END ++ :call add(results, "##BufEnter: " . exists("##BufEnter")) ++ :call add(results, "#BufEnter: " . exists("#BufEnter")) ++ :au BufEnter * let g:entered=1 ++ :call add(results, "#BufEnter: " . exists("#BufEnter")) ++ :call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) ++ :augroup auexists ++ :au BufEnter * let g:entered=1 ++ :augroup END ++ :call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) ++ :call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) ++ :au BufEnter *.test let g:entered=1 ++ :call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) ++ :edit testfile.test ++ :call add(results, "#BufEnter#: " . exists("#BufEnter#")) ++ :au BufEnter let g:entered=1 ++ :call add(results, "#BufEnter#: " . exists("#BufEnter#")) ++ :edit testfile2.test ++ :call add(results, "#BufEnter#: " . exists("#BufEnter#")) ++ :e test.out ++ :call append(0, results) ++ :$d ++ :w ++ :qa! ++ ENDTEST ++ +*** ../vim-7.2.258/src/testdir/test67.ok 2009-09-11 17:23:47.000000000 +0200 +--- src/testdir/test67.ok 2009-09-11 16:43:15.000000000 +0200 +*************** +*** 0 **** +--- 1,10 ---- ++ ##BufEnter: 1 ++ #BufEnter: 0 ++ #BufEnter: 1 ++ #auexists#BufEnter: 0 ++ #auexists#BufEnter: 1 ++ #BufEnter#*.test: 0 ++ #BufEnter#*.test: 1 ++ #BufEnter#: 0 ++ #BufEnter#: 1 ++ #BufEnter#: 0 +*** ../vim-7.2.258/src/version.c 2009-09-11 16:48:06.000000000 +0200 +--- src/version.c 2009-09-11 17:23:14.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 259, + /**/ + +-- +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/vim/vim-7.2/7.2.260 b/vim/vim-7.2/7.2.260 new file mode 100644 index 0000000..46d4365 --- /dev/null +++ b/vim/vim-7.2/7.2.260 @@ -0,0 +1,155 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.260 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.260 (extra part of 7.2.259) +Problem: exists() doesn't work properly for empty aucmd group. +Solution: Change how au_exists() handles a missing pattern. Also add a + test for this. (Bob Hiestand) +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms + + +*** ../vim-7.2.259/src/testdir/Make_amiga.mak 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_amiga.mak 2009-09-11 16:29:54.000000000 +0200 +*************** +*** 26,32 **** + 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 \ +! test66.out + + .SUFFIXES: .in .out + +--- 26,32 ---- + 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 \ +! test66.out test67.out + + .SUFFIXES: .in .out + +*************** +*** 112,114 **** +--- 112,115 ---- + test64.out: test64.in + test65.out: test65.in + test66.out: test66.in ++ test67.out: test67.in +*** ../vim-7.2.259/src/testdir/Make_dos.mak 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_dos.mak 2009-09-11 16:30:17.000000000 +0200 +*************** +*** 26,32 **** + 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 test66.out + + SCRIPTS32 = test50.out + +--- 26,32 ---- + 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 test66.out test67.out + + SCRIPTS32 = test50.out + +*** ../vim-7.2.259/src/testdir/Make_ming.mak 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_ming.mak 2009-09-11 16:30:37.000000000 +0200 +*************** +*** 45,51 **** + 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 test66.out + + SCRIPTS32 = test50.out + +--- 45,51 ---- + 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 test66.out test67.out + + SCRIPTS32 = test50.out + +*** ../vim-7.2.259/src/testdir/Make_os2.mak 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_os2.mak 2009-09-11 16:30:52.000000000 +0200 +*************** +*** 26,32 **** + 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 \ +! test66.out + + .SUFFIXES: .in .out + +--- 26,32 ---- + 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 \ +! test66.out test67.out + + .SUFFIXES: .in .out + +*** ../vim-7.2.259/src/testdir/Make_vms.mms 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_vms.mms 2009-09-11 16:31:06.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2009 Mar 05 + # + # 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. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2009 Sep 11 + # + # 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. +*************** +*** 69,75 **** + 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 \ +! test66.out + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +--- 69,75 ---- + 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 \ +! test66.out test67.out + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +*** ../vim-7.2.259/src/version.c 2009-09-11 17:24:01.000000000 +0200 +--- src/version.c 2009-09-18 14:57:05.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 260, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +251. You've never seen your closest friends who usually live WAY too far away. + + /// 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/vim/vim-7.2/7.2.261 b/vim/vim-7.2/7.2.261 new file mode 100644 index 0000000..4f8e72d --- /dev/null +++ b/vim/vim-7.2/7.2.261 @@ -0,0 +1,83 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.261 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.261 +Problem: When deleting lines with a specific folding configuration E38 may + appear. (Shahaf) +Solution: When adjusting nested folds for deleted lines take into account + that they don't start at the top of the enclosing fold. +Files: src/fold.c + + +*** ../vim-7.2.260/src/fold.c 2009-01-06 15:01:58.000000000 +0100 +--- src/fold.c 2009-09-18 14:43:23.000000000 +0200 +*************** +*** 1607,1617 **** + } + else + { +- /* 2, 3, or 5: need to correct nested folds too */ +- foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top, +- line2 - fp->fd_top, amount, amount_after); + if (fp->fd_top < top) + { + if (last <= line2) + { + /* 2. fold contains line1, line2 is below fold */ +--- 1607,1617 ---- + } + else + { + if (fp->fd_top < top) + { ++ /* 2 or 3: need to correct nested folds too */ ++ foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top, ++ line2 - fp->fd_top, amount, amount_after); + if (last <= line2) + { + /* 2. fold contains line1, line2 is below fold */ +*************** +*** 1628,1634 **** + } + else + { +! /* 5. fold is below line1 and contains line2 */ + if (amount == MAXLNUM) + { + fp->fd_len -= line2 - fp->fd_top + 1; +--- 1628,1638 ---- + } + else + { +! /* 5. fold is below line1 and contains line2; need to +! * correct nested folds too */ +! foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top, +! line2 - fp->fd_top, amount, +! amount_after + (fp->fd_top - top)); + if (amount == MAXLNUM) + { + fp->fd_len -= line2 - fp->fd_top + 1; +*** ../vim-7.2.260/src/version.c 2009-09-18 14:58:26.000000000 +0200 +--- src/version.c 2009-09-18 15:14:40.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 261, + /**/ + +-- +Emacs is a nice OS - but it lacks a good text editor. +That's why I am using Vim. --Anonymous + + /// 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/vim/vim-7.2/7.2.262 b/vim/vim-7.2/7.2.262 new file mode 100644 index 0000000..dc73c07 --- /dev/null +++ b/vim/vim-7.2/7.2.262 @@ -0,0 +1,189 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.262 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.262 +Problem: When using custom completion for a user command the pattern string + goes beyond the cursor position. (Hari Krishna Dara) +Solution: Truncate the string at the cursor position. +Files: src/ex_getln.c, src/structs.h + + +*** ../vim-7.2.261/src/ex_getln.c 2009-06-24 17:04:40.000000000 +0200 +--- src/ex_getln.c 2009-09-18 16:58:16.000000000 +0200 +*************** +*** 3266,3272 **** + int i, j; + char_u *p1; + char_u *p2; +- int oldlen; + int difflen; + int v; + +--- 3266,3271 ---- +*************** +*** 3291,3297 **** + out_flush(); + + i = (int)(xp->xp_pattern - ccline.cmdbuff); +! oldlen = ccline.cmdpos - i; + + if (type == WILD_NEXT || type == WILD_PREV) + { +--- 3290,3296 ---- + out_flush(); + + i = (int)(xp->xp_pattern - ccline.cmdbuff); +! xp->xp_pattern_len = ccline.cmdpos - i; + + if (type == WILD_NEXT || type == WILD_PREV) + { +*************** +*** 3305,3322 **** + /* + * Translate string into pattern and expand it. + */ +! if ((p1 = addstar(&ccline.cmdbuff[i], oldlen, xp->xp_context)) == NULL) + p2 = NULL; + else + { +! p2 = ExpandOne(xp, p1, vim_strnsave(&ccline.cmdbuff[i], oldlen), + WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE + |options, type); + vim_free(p1); + /* longest match: make sure it is not shorter (happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) + { +! for (j = 0; j < oldlen; ++j) + if (ccline.cmdbuff[i + j] == '*' + || ccline.cmdbuff[i + j] == '?') + break; +--- 3304,3323 ---- + /* + * Translate string into pattern and expand it. + */ +! if ((p1 = addstar(xp->xp_pattern, xp->xp_pattern_len, +! xp->xp_context)) == NULL) + p2 = NULL; + else + { +! p2 = ExpandOne(xp, p1, +! vim_strnsave(&ccline.cmdbuff[i], xp->xp_pattern_len), + WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE + |options, type); + vim_free(p1); + /* longest match: make sure it is not shorter (happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) + { +! for (j = 0; j < xp->xp_pattern_len; ++j) + if (ccline.cmdbuff[i + j] == '*' + || ccline.cmdbuff[i + j] == '?') + break; +*************** +*** 3331,3337 **** + + if (p2 != NULL && !got_int) + { +! difflen = (int)STRLEN(p2) - oldlen; + if (ccline.cmdlen + difflen > ccline.cmdbufflen - 4) + { + v = realloc_cmdbuff(ccline.cmdlen + difflen); +--- 3332,3338 ---- + + if (p2 != NULL && !got_int) + { +! difflen = (int)STRLEN(p2) - xp->xp_pattern_len; + if (ccline.cmdlen + difflen > ccline.cmdbufflen - 4) + { + v = realloc_cmdbuff(ccline.cmdlen + difflen); +*************** +*** 3620,3625 **** +--- 3621,3627 ---- + expand_T *xp; + { + xp->xp_pattern = NULL; ++ xp->xp_pattern_len = 0; + xp->xp_backslash = XP_BS_NONE; + #ifndef BACKSLASH_IN_FILENAME + xp->xp_shell = FALSE; +*************** +*** 4311,4318 **** + } + + /* add star to file name, or convert to regexp if not exp. files. */ +! file_str = addstar(xp->xp_pattern, +! (int)(str + col - xp->xp_pattern), xp->xp_context); + if (file_str == NULL) + return EXPAND_UNSUCCESSFUL; + +--- 4313,4320 ---- + } + + /* add star to file name, or convert to regexp if not exp. files. */ +! xp->xp_pattern_len = (int)(str + col - xp->xp_pattern); +! file_str = addstar(xp->xp_pattern, xp->xp_pattern_len, xp->xp_context); + if (file_str == NULL) + return EXPAND_UNSUCCESSFUL; + +*************** +*** 4781,4787 **** + sprintf((char *)num, "%d", ccline.cmdpos); + args[1] = ccline.cmdbuff; + } +! args[0] = xp->xp_pattern; + args[2] = num; + + /* Save the cmdline, we don't know what the function may do. */ +--- 4783,4789 ---- + sprintf((char *)num, "%d", ccline.cmdpos); + args[1] = ccline.cmdbuff; + } +! args[0] = vim_strnsave(xp->xp_pattern, xp->xp_pattern_len); + args[2] = num; + + /* Save the cmdline, we don't know what the function may do. */ +*************** +*** 4797,4802 **** +--- 4799,4805 ---- + if (ccline.cmdbuff != NULL) + ccline.cmdbuff[ccline.cmdlen] = keep; + ++ vim_free(args[0]); + return ret; + } + +*** ../vim-7.2.261/src/structs.h 2009-07-29 12:09:49.000000000 +0200 +--- src/structs.h 2009-09-18 15:33:15.000000000 +0200 +*************** +*** 432,437 **** +--- 432,438 ---- + { + int xp_context; /* type of expansion */ + char_u *xp_pattern; /* start of item to expand */ ++ int xp_pattern_len; /* bytes in xp_pattern before cursor */ + #if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL) + char_u *xp_arg; /* completion function */ + int xp_scriptID; /* SID for completion function */ +*** ../vim-7.2.261/src/version.c 2009-09-18 15:16:37.000000000 +0200 +--- src/version.c 2009-09-18 17:23:20.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 262, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +252. You vote for foreign officials. + + /// 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/vim/vim-7.2/7.2.263 b/vim/vim-7.2/7.2.263 new file mode 100644 index 0000000..fdbfa40 --- /dev/null +++ b/vim/vim-7.2/7.2.263 @@ -0,0 +1,87 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.263 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.263 +Problem: GTK2: when using the -geom argument with an offset from the right + edge and the size is smaller than the default, the Vim window is + not positioned properly. +Solution: Use another function to set the size. (Vitaly Minko) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.2.262/src/gui_gtk_x11.c 2009-09-11 15:46:20.000000000 +0200 +--- src/gui_gtk_x11.c 2009-09-23 15:43:52.000000000 +0200 +*************** +*** 4066,4071 **** +--- 4066,4073 ---- + { + guicolor_T fg_pixel = INVALCOLOR; + guicolor_T bg_pixel = INVALCOLOR; ++ guint pixel_width; ++ guint pixel_height; + + #ifdef HAVE_GTK2 + /* +*************** +*** 4106,4113 **** + unsigned int w, h; + int x = 0; + int y = 0; +- guint pixel_width; +- guint pixel_height; + + mask = XParseGeometry((char *)gui.geom, &x, &y, &w, &h); + +--- 4108,4113 ---- +*************** +*** 4160,4168 **** + } + } + +! gtk_form_set_size(GTK_FORM(gui.formwin), +! (guint)(gui_get_base_width() + Columns * gui.char_width), +! (guint)(gui_get_base_height() + Rows * gui.char_height)); + update_window_manager_hints(0, 0); + + if (foreground_argument != NULL) +--- 4160,4175 ---- + } + } + +! pixel_width = (guint)(gui_get_base_width() + Columns * gui.char_width); +! pixel_height = (guint)(gui_get_base_height() + Rows * gui.char_height); +! #ifdef HAVE_GTK2 +! /* For GTK2 changing the size of the form widget doesn't cause window +! * resizing. */ +! if (gtk_socket_id == 0) +! gtk_window_resize(GTK_WINDOW(gui.mainwin), pixel_width, pixel_height); +! #else +! gtk_form_set_size(GTK_FORM(gui.formwin), pixel_width, pixel_height); +! #endif + update_window_manager_hints(0, 0); + + if (foreground_argument != NULL) +*** ../vim-7.2.262/src/version.c 2009-09-18 17:24:54.000000000 +0200 +--- src/version.c 2009-09-23 17:34:08.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 263, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +267. You get an extra phone line so you can get phone calls. + + /// 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/vim/vim-7.2/7.2.264 b/vim/vim-7.2/7.2.264 new file mode 100644 index 0000000..808f291 --- /dev/null +++ b/vim/vim-7.2/7.2.264 @@ -0,0 +1,168 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.264 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.264 +Problem: GTK2: When the Vim window is maximized setting 'columns' or + 'lines' doesn't work. +Solution: Unmaximize the window before setting the size. (Vitaly Minko) +Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro + + +*** ../vim-7.2.263/src/gui.c 2009-07-29 11:10:31.000000000 +0200 +--- src/gui.c 2009-09-23 16:28:09.000000000 +0200 +*************** +*** 1386,1391 **** +--- 1386,1395 ---- + int min_height; + int screen_w; + int screen_h; ++ #ifdef HAVE_GTK2 ++ int un_maximize = mustset; ++ int did_adjust = 0; ++ #endif + + if (!gui.shell_created) + return; +*************** +*** 1425,1446 **** + if (Columns < MIN_COLUMNS) + Columns = MIN_COLUMNS; + width = Columns * gui.char_width + base_width; + } + if ((direction & RESIZE_VERT) && height > screen_h) + { + Rows = (screen_h - base_height) / gui.char_height; + check_shellsize(); + height = Rows * gui.char_height + base_height; + } + } + gui.num_cols = Columns; + gui.num_rows = Rows; + + min_width = base_width + MIN_COLUMNS * gui.char_width; + min_height = base_height + MIN_LINES * gui.char_height; +! # ifdef FEAT_WINDOWS + min_height += tabline_height() * gui.char_height; +! # endif + + gui_mch_set_shellsize(width, height, min_width, min_height, + base_width, base_height, direction); +--- 1429,1475 ---- + if (Columns < MIN_COLUMNS) + Columns = MIN_COLUMNS; + width = Columns * gui.char_width + base_width; ++ #ifdef HAVE_GTK2 ++ ++did_adjust; ++ #endif + } + if ((direction & RESIZE_VERT) && height > screen_h) + { + Rows = (screen_h - base_height) / gui.char_height; + check_shellsize(); + height = Rows * gui.char_height + base_height; ++ #ifdef HAVE_GTK2 ++ ++did_adjust; ++ #endif + } ++ #ifdef HAVE_GTK2 ++ if (did_adjust == 2 || (width + gui.char_width >= screen_w ++ && height + gui.char_height >= screen_h)) ++ /* don't unmaximize if at maximum size */ ++ un_maximize = FALSE; ++ #endif + } + gui.num_cols = Columns; + gui.num_rows = Rows; + + min_width = base_width + MIN_COLUMNS * gui.char_width; + min_height = base_height + MIN_LINES * gui.char_height; +! #ifdef FEAT_WINDOWS + min_height += tabline_height() * gui.char_height; +! #endif +! +! #ifdef HAVE_GTK2 +! if (un_maximize) +! { +! /* If the window size is smaller than the screen unmaximize the +! * window, otherwise resizing won't work. */ +! gui_mch_get_screen_dimensions(&screen_w, &screen_h); +! if ((width + gui.char_width < screen_w +! || height + gui.char_height * 2 < screen_h) +! && gui_mch_maximized()) +! gui_mch_unmaximize(); +! } +! #endif + + gui_mch_set_shellsize(width, height, min_width, min_height, + base_width, base_height, direction); +*** ../vim-7.2.263/src/gui_gtk_x11.c 2009-09-23 17:35:17.000000000 +0200 +--- src/gui_gtk_x11.c 2009-09-23 15:43:52.000000000 +0200 +*************** +*** 4376,4381 **** +--- 4376,4404 ---- + #endif + #endif /* HAVE_GTK2 */ + ++ #if defined(HAVE_GTK2) || defined(PROTO) ++ /* ++ * Return TRUE if the main window is maximized. ++ */ ++ int ++ gui_mch_maximized() ++ { ++ return (gui.mainwin != NULL && gui.mainwin->window != NULL ++ && (gdk_window_get_state(gui.mainwin->window) ++ & GDK_WINDOW_STATE_MAXIMIZED)); ++ } ++ ++ /* ++ * Unmaximize the main window ++ */ ++ void ++ gui_mch_unmaximize() ++ { ++ if (gui.mainwin != NULL) ++ gtk_window_unmaximize(GTK_WINDOW(gui.mainwin)); ++ } ++ #endif ++ + /* + * Set the windows size. + */ +*** ../vim-7.2.263/src/proto/gui_gtk_x11.pro 2007-05-05 19:18:54.000000000 +0200 +--- src/proto/gui_gtk_x11.pro 2009-09-23 15:43:45.000000000 +0200 +*************** +*** 16,21 **** +--- 16,23 ---- + void gui_mch_exit __ARGS((int rc)); + int gui_mch_get_winpos __ARGS((int *x, int *y)); + void gui_mch_set_winpos __ARGS((int x, int y)); ++ int gui_mch_maximized __ARGS((void)); ++ void gui_mch_unmaximize __ARGS((void)); + void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); + void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h)); + void gui_mch_settitle __ARGS((char_u *title, char_u *icon)); +*** ../vim-7.2.263/src/version.c 2009-09-23 17:35:17.000000000 +0200 +--- src/version.c 2009-09-23 18:12:21.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 264, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +268. You get up in the morning and go online before getting your 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/vim/vim-7.2/7.2.265 b/vim/vim-7.2/7.2.265 new file mode 100644 index 0000000..4685150 --- /dev/null +++ b/vim/vim-7.2/7.2.265 @@ -0,0 +1,56 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.265 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.265 +Problem: When using ":silent broken" inside try/catch silency may persist. + (dr-dr xp) +Solution: Set msg_silent when there is an error and it's bigger than the + saved value. +Files: src/ex_docmd.c + + +*** ../vim-7.2.264/src/ex_docmd.c 2009-07-09 20:13:59.000000000 +0200 +--- src/ex_docmd.c 2009-09-30 11:40:53.000000000 +0200 +*************** +*** 2695,2701 **** + { + /* messages could be enabled for a serious error, need to check if the + * counters don't become negative */ +! if (!did_emsg) + msg_silent = save_msg_silent; + emsg_silent -= did_esilent; + if (emsg_silent < 0) +--- 2695,2701 ---- + { + /* messages could be enabled for a serious error, need to check if the + * counters don't become negative */ +! if (!did_emsg || msg_silent > save_msg_silent) + msg_silent = save_msg_silent; + emsg_silent -= did_esilent; + if (emsg_silent < 0) +*** ../vim-7.2.264/src/version.c 2009-09-23 18:14:13.000000000 +0200 +--- src/version.c 2009-09-30 13:22:47.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 265, + /**/ + +-- +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/vim/vim-7.2/7.2.266 b/vim/vim-7.2/7.2.266 new file mode 100644 index 0000000..3a5ba77 --- /dev/null +++ b/vim/vim-7.2/7.2.266 @@ -0,0 +1,244 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.266 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.266 +Problem: When an expression abbreviation is triggered, the typed character + is unknown. +Solution: Make the typed character available in v:char. +Files: runtime/doc/map.txt, src/eval.c, src/getchar.c, src/ops.c, + src/proto/eval.pro + + +*** ../vim-7.2.265/runtime/doc/map.txt 2008-08-09 19:36:49.000000000 +0200 +--- runtime/doc/map.txt 2009-09-23 19:39:19.000000000 +0200 +*************** +*** 224,229 **** +--- 224,233 ---- + The result of the InsertDot() function will be inserted. It could check the + text before the cursor and start omni completion when some condition is met. + ++ For abbreviations |v:char| is set to the character that was typed to trigger ++ the abbreviation. You can use this to decide how to expand the {lhs}. You ++ can't change v:char and you should not insert it. ++ + Be very careful about side effects! The expression is evaluated while + obtaining characters, you may very well make the command dysfunctional. + For this reason the following is blocked: +*** ../vim-7.2.265/src/eval.c 2009-06-03 14:25:47.000000000 +0200 +--- src/eval.c 2009-09-23 19:36:32.000000000 +0200 +*************** +*** 18101,18106 **** +--- 18101,18131 ---- + } + + /* ++ * Set v:char to character "c". ++ */ ++ void ++ set_vim_var_char(c) ++ int c; ++ { ++ #ifdef FEAT_MBYTE ++ char_u buf[MB_MAXBYTES]; ++ #else ++ char_u buf[2]; ++ #endif ++ ++ #ifdef FEAT_MBYTE ++ if (has_mbyte) ++ buf[(*mb_char2bytes)(c, buf)] = NUL; ++ else ++ #endif ++ { ++ buf[0] = c; ++ buf[1] = NUL; ++ } ++ set_vim_var_string(VV_CHAR, buf, -1); ++ } ++ ++ /* + * Set v:count to "count" and v:count1 to "count1". + * When "set_prevcount" is TRUE first set v:prevcount from v:count. + */ +*** ../vim-7.2.265/src/getchar.c 2009-07-14 13:44:43.000000000 +0200 +--- src/getchar.c 2009-09-23 19:35:54.000000000 +0200 +*************** +*** 129,135 **** + static void validate_maphash __ARGS((void)); + static void showmap __ARGS((mapblock_T *mp, int local)); + #ifdef FEAT_EVAL +! static char_u *eval_map_expr __ARGS((char_u *str)); + #endif + + /* +--- 129,135 ---- + static void validate_maphash __ARGS((void)); + static void showmap __ARGS((mapblock_T *mp, int local)); + #ifdef FEAT_EVAL +! static char_u *eval_map_expr __ARGS((char_u *str, int c)); + #endif + + /* +*************** +*** 2446,2452 **** + if (tabuf.typebuf_valid) + { + vgetc_busy = 0; +! s = eval_map_expr(mp->m_str); + vgetc_busy = save_vgetc_busy; + } + else +--- 2446,2452 ---- + if (tabuf.typebuf_valid) + { + vgetc_busy = 0; +! s = eval_map_expr(mp->m_str, NUL); + vgetc_busy = save_vgetc_busy; + } + else +*************** +*** 4367,4375 **** + * abbreviation, but is not inserted into the input stream. + */ + j = 0; +- /* special key code, split up */ + if (c != Ctrl_RSB) + { + if (IS_SPECIAL(c) || c == K_SPECIAL) + { + tb[j++] = K_SPECIAL; +--- 4367,4375 ---- + * abbreviation, but is not inserted into the input stream. + */ + j = 0; + if (c != Ctrl_RSB) + { ++ /* special key code, split up */ + if (IS_SPECIAL(c) || c == K_SPECIAL) + { + tb[j++] = K_SPECIAL; +*************** +*** 4398,4404 **** + } + #ifdef FEAT_EVAL + if (mp->m_expr) +! s = eval_map_expr(mp->m_str); + else + #endif + s = mp->m_str; +--- 4398,4404 ---- + } + #ifdef FEAT_EVAL + if (mp->m_expr) +! s = eval_map_expr(mp->m_str, c); + else + #endif + s = mp->m_str; +*************** +*** 4434,4441 **** + * special characters. + */ + static char_u * +! eval_map_expr(str) + char_u *str; + { + char_u *res; + char_u *p; +--- 4434,4442 ---- + * special characters. + */ + static char_u * +! eval_map_expr(str, c) + char_u *str; ++ int c; /* NUL or typed character for abbreviation */ + { + char_u *res; + char_u *p; +*************** +*** 4452,4457 **** +--- 4453,4459 ---- + #ifdef FEAT_EX_EXTRA + ++ex_normal_lock; + #endif ++ set_vim_var_char(c); /* set v:char to the typed character */ + save_cursor = curwin->w_cursor; + p = eval_to_string(str, NULL, FALSE); + --textlock; +*** ../vim-7.2.265/src/ops.c 2009-07-01 18:04:30.000000000 +0200 +--- src/ops.c 2009-09-23 19:11:40.000000000 +0200 +*************** +*** 4473,4483 **** + int use_sandbox = was_set_insecurely((char_u *)"formatexpr", + OPT_LOCAL); + int r; +- #ifdef FEAT_MBYTE +- char_u buf[MB_MAXBYTES]; +- #else +- char_u buf[2]; +- #endif + + /* + * Set v:lnum to the first line number and v:count to the number of lines. +--- 4473,4478 ---- +*************** +*** 4485,4501 **** + */ + set_vim_var_nr(VV_LNUM, lnum); + set_vim_var_nr(VV_COUNT, count); +! +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! buf[(*mb_char2bytes)(c, buf)] = NUL; +! else +! #endif +! { +! buf[0] = c; +! buf[1] = NUL; +! } +! set_vim_var_string(VV_CHAR, buf, -1); + + /* + * Evaluate the function. +--- 4480,4486 ---- + */ + set_vim_var_nr(VV_LNUM, lnum); + set_vim_var_nr(VV_COUNT, count); +! set_vim_var_char(c); + + /* + * Evaluate the function. +*** ../vim-7.2.265/src/proto/eval.pro 2008-11-20 16:11:03.000000000 +0100 +--- src/proto/eval.pro 2009-09-23 19:36:30.000000000 +0200 +*************** +*** 61,66 **** +--- 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_vim_var_char __ARGS((int c)); + 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)); +*** ../vim-7.2.265/src/version.c 2009-09-30 13:23:57.000000000 +0200 +--- src/version.c 2009-09-30 15:11:29.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 266, + /**/ + +-- +Life would be so much easier if we could just look at the source code. + + /// 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/vim/vim-7.2/7.2.267 b/vim/vim-7.2/7.2.267 new file mode 100644 index 0000000..6df92c9 --- /dev/null +++ b/vim/vim-7.2/7.2.267 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.267 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.267 +Problem: Crash for narrow window and double-width character. +Solution: Check for zero width. (Taro Muraoka) +Files: src/charset.c + + +*** ../vim-7.2.266/src/charset.c 2009-09-11 14:02:25.000000000 +0200 +--- src/charset.c 2009-10-07 16:17:27.000000000 +0200 +*************** +*** 1218,1223 **** +--- 1218,1225 ---- + if ((int)vcol == width1 - 1) + return TRUE; + width2 = width1 + win_col_off2(wp); ++ if (width2 <= 0) ++ return FALSE; + return ((vcol - width1) % width2 == width2 - 1); + } + #endif /* FEAT_MBYTE */ +*** ../vim-7.2.266/src/version.c 2009-09-30 15:15:33.000000000 +0200 +--- src/version.c 2009-10-07 16:19:05.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 267, + /**/ + +-- +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/vim/vim-7.2/keymap/dvorak.vim b/vim/vim-7.2/keymap/dvorak.vim new file mode 100644 index 0000000..77dc530 --- /dev/null +++ b/vim/vim-7.2/keymap/dvorak.vim @@ -0,0 +1,82 @@ +" Maintainer: Ashish SHUKLA +" Last Changed: 2009 Jul 04 +" +" All characters are ASCII, conversion to another encoding (e.g., UTF-8) +" should work. + +let b:keymap_name = "en-dv" + +loadkeymap +q ' +w , +e . +r p +t y +y f +u g +i c +o r +p l +[ / +] = +\\ \\ +a a +s o +d e +f u +g i +h d +j h +k t +l n +; s +' - +z ; +x q +c j +v k +b x +n b +m m +, w +. v +/ z +Z : +X Q +C J +V K +B X +N B +M M +< W +> V +? Z +A A +S O +D E +F U +G I +H D +J H +K T +L N +: S +\" _ +Q " +W < +E > +R P +T Y +Y F +U G +I C +O R +P L +{ ? +} + +| | +- [ +_ { += ] ++ } + diff --git a/vim/vim-7.2/syntax/taskdata.vim b/vim/vim-7.2/syntax/taskdata.vim new file mode 100644 index 0000000..79186e0 --- /dev/null +++ b/vim/vim-7.2/syntax/taskdata.vim @@ -0,0 +1,43 @@ +" Vim syntax file +" Language: task data +" Maintainer: John Florian +" Updated: Wed Jul 8 19:46:20 EDT 2009 + + +" For version 5.x: Clear all syntax items. +" For version 6.x: Quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Key Names for values. +syn keyword taskdataKey description due end entry imask mask parent +syn keyword taskdataKey priority project recur start status tags uuid +syn match taskdataKey "annotation_\d\+" +syn match taskdataUndo "^time.*$" +syn match taskdataUndo "^\(old \|new \|---\)" + +" Values associated with key names. +" +" Strings +syn region taskdataString matchgroup=Normal start=+"+ end=+"+ + \ contains=taskdataEncoded,taskdataUUID,@Spell +" +" Special Embedded Characters (e.g., ",") +syn match taskdataEncoded "&\a\+;" contained +" UUIDs +syn match taskdataUUID "\x\{8}-\(\x\{4}-\)\{3}\x\{12}" contained + + +" The default methods for highlighting. Can be overridden later. +hi def link taskdataEncoded Function +hi def link taskdataKey Statement +hi def link taskdataString String +hi def link taskdataUUID Special +hi def link taskdataUndo Type + +let b:current_syntax = "taskdata" + +" vim:noexpandtab diff --git a/vim/vim-7.2/syntax/taskedit.vim b/vim/vim-7.2/syntax/taskedit.vim new file mode 100644 index 0000000..c7e0ea7 --- /dev/null +++ b/vim/vim-7.2/syntax/taskedit.vim @@ -0,0 +1,35 @@ +" Vim syntax file +" Language: support for 'task 42 edit' +" Maintainer: John Florian +" Updated: Wed Jul 8 19:46:32 EDT 2009 + + +" For version 5.x: Clear all syntax items. +" For version 6.x: Quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match taskeditHeading "^\s*#\s*Name\s\+Editable details\s*$" contained +syn match taskeditHeading "^\s*#\s*-\+\s\+-\+\s*$" contained +syn match taskeditReadOnly "^\s*#\s*\(UU\)\?ID:.*$" contained +syn match taskeditReadOnly "^\s*#\s*Status:.*$" contained +syn match taskeditReadOnly "^\s*#\s*i\?Mask:.*$" contained +syn match taskeditKey "^ *.\{-}:" nextgroup=taskeditString +syn match taskeditComment "^\s*#.*$" + \ contains=taskeditReadOnly,taskeditHeading +syn match taskeditString ".*$" contained contains=@Spell + + +" The default methods for highlighting. Can be overridden later. +hi def link taskeditComment Comment +hi def link taskeditHeading Function +hi def link taskeditKey Statement +hi def link taskeditReadOnly Special +hi def link taskeditString String + +let b:current_syntax = "taskedit" + +" vim:noexpandtab diff --git a/weechat-git/PKGBUILD b/weechat-git/PKGBUILD index 6c18c93..2f94f79 100644 --- a/weechat-git/PKGBUILD +++ b/weechat-git/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Tim Zebulla pkgname=weechat-git -pkgver=20091022 +pkgver=20100107 pkgrel=1 pkgdesc="Fast, light & extensible IRC client (curses UI)" arch=('i686' 'x86_64') @@ -13,7 +13,8 @@ makedepends=('git' 'cmake') optdepends=('tcl: tcl scripting support' 'perl>=5.10: perl scripting support' 'python>=2.6: python scripting support' - 'lua: lua scripting support') + 'lua: lua scripting support' + 'ruby: ruby scripting support') provides=('weechat') conflicts=('weechat') options=(!strip) @@ -41,9 +42,9 @@ build() { git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" cd "$srcdir/$_gitname-build" - cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_RUBY=ON -DDISABLE_DOC=ON -DPREFIX=/usr || return 1 + cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_DOC=ON -DPREFIX=/usr || return 1 make DESTDIR="$pkgdir/" install } -# note - to disable an option, use -DDISABLE_JABBER=ON -# this should change soon, and will be -DENABLE_JABBER=OFF +# 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/PKGBUILD b/weechat/PKGBUILD new file mode 100644 index 0000000..709bf93 --- /dev/null +++ b/weechat/PKGBUILD @@ -0,0 +1,26 @@ +# $Id$ +# Maintainer: Giovanni Scafora +# Contributor: lucke + +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 +} -- cgit v1.2.3-24-g4f1b From ca2d44a6820a66e074d753b32fdc7c3d86e58a3d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 17 Jan 2010 12:10:25 +0100 Subject: some more updates/adds Signed-off-by: Florian Pritz --- babl-git/PKGBUILD | 43 + celt/PKGBUILD | 28 + ffcast/PKGBUILD | 38 + ffmpeg-svn/PKGBUILD | 8 +- flvstreamer/PKGBUILD | 15 +- gecko-mediaplayer-svn/PKGBUILD | 28 + gegl-git/.DS_Store | Bin 0 -> 6148 bytes gegl-git/._.DS_Store | Bin 0 -> 82 bytes gegl-git/._PKGBUILD | Bin 0 -> 167 bytes gegl-git/._gegl-git.install | Bin 0 -> 197 bytes gegl-git/PKGBUILD | 43 + gegl-git/gegl-git.install | 15 + gimp-git/PKGBUILD | 61 + gimp-git/gimp-git.install | 23 + gimp-git/linux.gpl | 19 + gnome-mplayer-svn/PKGBUILD | 29 + kernel26-vserver/PKGBUILD | 187 + kernel26-vserver/config | 4564 +++ kernel26-vserver/config.x86_64 | 4338 +++ kernel26-vserver/kernel26-vserver.install | 144 + kernel26-vserver/kernel26-vserver.preset | 17 + kernel26-vserver/patch-2.6.31.6-vs2.3.0.36.24.diff | 28766 +++++++++++++++++++ libjpeg6/PKGBUILD | 38 + mbuffer/PKGBUILD | 6 +- mpd-git/PKGBUILD | 2 +- mumble-git/PKGBUILD | 69 + mumble-git/mumble.install | 11 + mumble-git/mumble11x.desktop | 11 + perl-class-inspector/PKGBUILD | 54 + perl-mail-checkuser/PKGBUILD | 53 + perl-params-util/ChangeLog | 19 + perl-params-util/PKGBUILD | 28 + smtp-cli/PKGBUILD | 19 + smtp-cli/smtp-cli | 814 + tcc-git/PKGBUILD | 2 +- vhba-module/PKGBUILD | 11 +- x264-git/PKGBUILD | 2 +- 37 files changed, 39485 insertions(+), 20 deletions(-) create mode 100644 babl-git/PKGBUILD create mode 100644 celt/PKGBUILD create mode 100644 ffcast/PKGBUILD create mode 100644 gecko-mediaplayer-svn/PKGBUILD create mode 100644 gegl-git/.DS_Store create mode 100644 gegl-git/._.DS_Store create mode 100644 gegl-git/._PKGBUILD create mode 100644 gegl-git/._gegl-git.install create mode 100644 gegl-git/PKGBUILD create mode 100644 gegl-git/gegl-git.install create mode 100644 gimp-git/PKGBUILD create mode 100644 gimp-git/gimp-git.install create mode 100644 gimp-git/linux.gpl create mode 100644 gnome-mplayer-svn/PKGBUILD create mode 100644 kernel26-vserver/PKGBUILD create mode 100644 kernel26-vserver/config create mode 100644 kernel26-vserver/config.x86_64 create mode 100644 kernel26-vserver/kernel26-vserver.install create mode 100644 kernel26-vserver/kernel26-vserver.preset create mode 100644 kernel26-vserver/patch-2.6.31.6-vs2.3.0.36.24.diff create mode 100644 libjpeg6/PKGBUILD create mode 100644 mumble-git/PKGBUILD create mode 100644 mumble-git/mumble.install create mode 100644 mumble-git/mumble11x.desktop create mode 100644 perl-class-inspector/PKGBUILD create mode 100644 perl-mail-checkuser/PKGBUILD create mode 100644 perl-params-util/ChangeLog create mode 100644 perl-params-util/PKGBUILD create mode 100644 smtp-cli/PKGBUILD create mode 100644 smtp-cli/smtp-cli diff --git a/babl-git/PKGBUILD b/babl-git/PKGBUILD new file mode 100644 index 0000000..6e7c00e --- /dev/null +++ b/babl-git/PKGBUILD @@ -0,0 +1,43 @@ +# Contributor: Alessio Biancalana + +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/celt/PKGBUILD b/celt/PKGBUILD new file mode 100644 index 0000000..b003294 --- /dev/null +++ b/celt/PKGBUILD @@ -0,0 +1,28 @@ +# Contributor: Lauri Niskanen +# Contributor: Ray Rashif + +pkgname=celt +pkgver=0.7.0 +pkgrel=2 +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=('0bb72abec367f4ef12551f79dda11b23') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr + make || return 1 + make DESTDIR="$pkgdir" install + + ln -s $pkgdir/usr/lib/libcelt.so.0.0.0 $pkgdir/usr/lib/libcelt.so.0.7 + ln -s $pkgdir/usr/lib/libcelt.so.0.0.0 $pkgdir/usr/lib/libcelt.so.0.7.0 + + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/BSD" +} + diff --git a/ffcast/PKGBUILD b/ffcast/PKGBUILD new file mode 100644 index 0000000..d1bf09d --- /dev/null +++ b/ffcast/PKGBUILD @@ -0,0 +1,38 @@ +# Contributor: lolilolicon + +pkgname=ffcast +pkgver=20091128 +pkgrel=1 +pkgdesc="bash script that takes screencast of given window area using ffmpeg/xwininfo/xrectsel" +arch=('i686' 'x86_64') +url="http://github.com/lolilolicon/ffcast" +license=('GPL v3') +makedepends=('git') +depends=('bash>=3.2' 'ffmpeg>=0.5' 'x264>=20090416' 'xorg-utils' 'bc') +source=() +md5sums=() + +_gitroot="git://github.com/lolilolicon/ffcast.git" +_gitname=master + +build() { + msg "Connecting to GIT server..." + if [ -d "$srcdir/$pkgname" ]; then + cd "$srcdir/$pkgname" && git pull origin $_gitname || return 1 + else + git clone "$_gitroot" "$srcdir/$pkgname" || return 1 + cd "$srcdir/$pkgname" && git checkout $_gitname || return 1 + fi + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf "$srcdir/$pkgname-build" + git clone "$srcdir/$pkgname" "$srcdir/$pkgname-build" + cd "$srcdir/$pkgname-build" + + make || return 1 + make PREFIX=/usr DESTDIR="$pkgdir" install || return 1 +} + +# vim:set ts=2 sw=2 et: diff --git a/ffmpeg-svn/PKGBUILD b/ffmpeg-svn/PKGBUILD index ae596b5..9b1cc30 100644 --- a/ffmpeg-svn/PKGBUILD +++ b/ffmpeg-svn/PKGBUILD @@ -1,13 +1,13 @@ # Contributor: raubkopierer pkgname=ffmpeg-svn -pkgver=20578 +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' 'faad2' 'faac' 'zlib' 'imlib2' 'x264' 'libtheora') +depends=('lame' 'sdl' 'zlib' 'imlib2' 'x264-git' 'libtheora' 'opencore-amr' 'faac') makedepends=('subversion') provides=("ffmpeg=`date +%Y%m%d`") conflicts=('ffmpeg') @@ -37,10 +37,12 @@ build() { --prefix=/usr \ --enable-gpl \ --enable-nonfree \ + --enable-version3 \ --enable-libmp3lame \ --enable-libfaac \ - --enable-libfaad \ --enable-libx264 \ + --enable-libopencore-amrnb \ + --enable-libopencore-amrwb \ --enable-libtheora \ --enable-postproc \ --enable-shared \ diff --git a/flvstreamer/PKGBUILD b/flvstreamer/PKGBUILD index b5a4adc..0ee7f55 100644 --- a/flvstreamer/PKGBUILD +++ b/flvstreamer/PKGBUILD @@ -1,18 +1,21 @@ # Maintainer: Stefan Husmann pkgname=flvstreamer -pkgver=1.8k +pkgver=1.9 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=('e70d4f2a154c06759debfb7426a09d6a') +source=("http://mirrors.zerg.biz/nongnu/flvstreamer/source/$pkgname-$pkgver.tar.gz") +md5sums=('8024c2a44b4fe9e39d1eec9b58f4da9e') build() { - cd $srcdir/$pkgname + cd $srcdir/$pkgname-$pkgver make $pkgname || return 1 make streams || return 1 - install -Dm755 ${pkgname}_x86 $pkgdir/usr/bin/$pkgname || return 1 - install -Dm755 streams_x86 $pkgdir/usr/bin/streams || return 1 +} +package() { + cd $srcdir/$pkgname-$pkgver + 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/gecko-mediaplayer-svn/PKGBUILD b/gecko-mediaplayer-svn/PKGBUILD new file mode 100644 index 0000000..5a55a92 --- /dev/null +++ b/gecko-mediaplayer-svn/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: evr +# Contributor: Jorge Mokross +pkgname=gecko-mediaplayer-svn +pkgver=345 +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 new file mode 100644 index 0000000..b3d7e1b Binary files /dev/null and b/gegl-git/.DS_Store differ diff --git a/gegl-git/._.DS_Store b/gegl-git/._.DS_Store new file mode 100644 index 0000000..460d887 Binary files /dev/null and b/gegl-git/._.DS_Store differ diff --git a/gegl-git/._PKGBUILD b/gegl-git/._PKGBUILD new file mode 100644 index 0000000..361f6aa Binary files /dev/null and b/gegl-git/._PKGBUILD differ diff --git a/gegl-git/._gegl-git.install b/gegl-git/._gegl-git.install new file mode 100644 index 0000000..120e8c8 Binary files /dev/null and b/gegl-git/._gegl-git.install differ diff --git a/gegl-git/PKGBUILD b/gegl-git/PKGBUILD new file mode 100644 index 0000000..faab426 --- /dev/null +++ b/gegl-git/PKGBUILD @@ -0,0 +1,43 @@ +# Contributor: Alessio Biancalana + +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 new file mode 100644 index 0000000..4d6aee5 --- /dev/null +++ b/gegl-git/gegl-git.install @@ -0,0 +1,15 @@ +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-git/PKGBUILD b/gimp-git/PKGBUILD new file mode 100644 index 0000000..f248c6e --- /dev/null +++ b/gimp-git/PKGBUILD @@ -0,0 +1,61 @@ +# Contributor: Alessio Biancalana + +pkgname=gimp-git +pkgver=20100109 +pkgrel=1 +pkgdesc="GNU Image Manipulation Program (GIT Version)" +arch=('i686' 'x86_64') +url="http://www.gimp.org/" +license=('GPL') +depends=('gtk2>=2.10' 'lcms>=1.16' 'libxpm>=3.5.6' 'libwmf>=0.2.8' \ + 'libxmu>=1.0.3' 'librsvg>=2.16.1' 'libmng>=1.0.9' 'desktop-file-utils' \ + 'libexif>=0.6.13' 'libart-lgpl>=2.3.19' 'pygtk>=2.10.4' 'dbus-glib' 'gtk-doc') +makedepends=('gutenprint>=5.0.0' 'intltool>=0.35.5' 'libgtkhtml>=2.6.3' \ + 'gnome-python>=2.16.2' 'poppler>=0.6' 'pkgconfig>=0.21' \ + 'libgnomeprintui>=2.18' 'alsa-lib>=1.0.0' 'gegl-git' +'libtool>=1.5' 'autoconf>=2.54' 'automake>=1.9.6' 'libxslt' 'libwebkit' +'pango' 'gettext' 'git') +options=('!libtool' '!makeflags') +provides=('gimp') +conflicts=('gimp' 'gimp-devel') +source=('gimp-git.install' 'linux.gpl') +install=('gimp-git.install') +md5sums=('c49a84c5333fbe0b49b49911a3da9d20' + 'bb27bc214261d36484093e857f015f38') + +_gitroot=('git://git.gnome.org/gimp') +_gitname=('gimp') + +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 --sysconfdir=/etc \ + --enable-mp --enable-gimp-console --disable-devel-docs \ + --enable-python --with-gif-compression=lzw \ + --without-aa + make || return 1 + make DESTDIR=${startdir}/pkg install-strip || return 1 + + install -Dm644 ${startdir}/src/linux.gpl \ + ${startdir}/pkg/usr/share/gimp/2.0/palettes/Linux.gpl + + #ln -s gimp-2.5 ${startdir}/pkg/usr/bin/gimp + #ln -s gimp-console-2.5 ${startdir}/pkg/usr/bin/gimp-console + #ln -s gimp-remote-2.5 ${startdir}/pkg/usr/bin/gimp-remote +} diff --git a/gimp-git/gimp-git.install b/gimp-git/gimp-git.install new file mode 100644 index 0000000..24e2c39 --- /dev/null +++ b/gimp-git/gimp-git.install @@ -0,0 +1,23 @@ +post_install() { + cat << EOM + +--> OPTIONAL PACKAGES: +--> Please install optional packages as necessary. They will be found and +--> used automatically: +--> gimp has built-in cups print support now. For more sophisticated printing, install gutenprint. +--> For help browser support, install libgtkhtml. + +EOM + + echo "update desktop mime database..." + update-desktop-database -q +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + echo "update desktop mime database..." + update-desktop-database -q +} diff --git a/gimp-git/linux.gpl b/gimp-git/linux.gpl new file mode 100644 index 0000000..0a73d89 --- /dev/null +++ b/gimp-git/linux.gpl @@ -0,0 +1,19 @@ +GIMP Palette +Name: linux +# + 0 0 0 + 0 0 170 + 0 170 0 + 0 170 170 +170 0 0 +170 0 170 +170 85 0 +170 170 170 + 85 85 85 + 85 85 255 + 85 255 85 + 85 255 255 +255 85 85 +255 85 255 +255 255 85 +255 255 255 diff --git a/gnome-mplayer-svn/PKGBUILD b/gnome-mplayer-svn/PKGBUILD new file mode 100644 index 0000000..5cd2632 --- /dev/null +++ b/gnome-mplayer-svn/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainter: evr +# Contributor: Jorge Mokross +pkgname=gnome-mplayer-svn +pkgver=1606 +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/kernel26-vserver/PKGBUILD b/kernel26-vserver/PKGBUILD new file mode 100644 index 0000000..de76e61 --- /dev/null +++ b/kernel26-vserver/PKGBUILD @@ -0,0 +1,187 @@ +# Contributor: Jonathan Liu +pkgname=kernel26-vserver +_kernelname=${pkgname#kernel26} +_basekernel=2.6.31 +pkgver=${_basekernel}.6 +pkgrel=1 +_patchname="patch-${pkgver}-1-ARCH" +_vserver=2.3.0.36.24 +pkgdesc="The Linux Kernel and modules with Linux-VServer" +arch=('i686' 'x86_64') +license=('GPL2') +groups=('base') +url="http://linux-vserver.org/" +backup=("etc/mkinitcpio.d/${pkgname}.preset") +depends=('coreutils' 'kernel26-firmware>=2.6.31' 'module-init-tools' 'mkinitcpio>=0.5.20') +install=$pkgname.install +source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2 + ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2 + http://vserver.13thfloor.at/Experimental/patch-${pkgver}-vs$_vserver.diff + # the main kernel config files + config config.x86_64 + # standard config files for mkinitcpio ramdisk + $pkgname.preset) +optdepends=('crda: to set the correct wireless channels of your country') +md5sums=('84c077a37684e4cbfa67b18154390d8a' + 'ab4ff4cf5a2373fd1842edd775e8bb48' + '838bfea8a7710c8d1d42931e47aaea3d' + '27bace59bdf0dff83bc4b02df97ead68' + '992c7f84276ddac4f2d8b667870f13d2' + '6952cf6ca4d430708390dacdcaefc623') + +build() { + KARCH=x86 + + cd ${srcdir}/linux-${_basekernel} + # Add -ARCH patches + # See http://projects.archlinux.org/git/?p=linux-2.6-ARCH.git;a=summary + patch -Np1 -i ${srcdir}/${_patchname} || return 1 + # Revert stripping of extra version in Makefile by -ARCH patches + ([ -n $(echo "$pkgver" | cut -d'.' -f 4) ] && \ + sed -i 's/EXTRAVERSION = /EXTRAVERSION = .'"$(echo "$pkgver" | cut -d'.' -f 4)"'/' Makefile) || return 1 + # Add Linux-VServer patches + patch -Np1 -i ${srcdir}/patch-${pkgver}-vs$_vserver.diff || return 1 + # Strip extra version + sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION = |g' Makefile || return 1 + + if [ "$CARCH" = "x86_64" ]; then + cat ../config.x86_64 >./.config + else + cat ../config >./.config + fi + # Strip local version + echo "-vs" >./localversion-vserver + # get kernel version + make prepare + _kernver="$(make kernelrelease)" + # load configuration + # Configure the kernel. Replace the line below with one of your choice. + #make menuconfig # CLI menu for configuration + #make xconfig # X-based configuration + #make oldconfig # using old config from previous kernel version + # ... or manually edit .config + #################### + # stop here + # this is useful to configure the kernel + #msg "Stopping build" + #return 1 + #################### + yes "" | make config + # build! + make bzImage modules || return 1 + mkdir -p ${pkgdir}/{lib/modules,boot} + make INSTALL_MOD_PATH=${pkgdir} modules_install || return 1 + cp System.map ${pkgdir}/boot/System.map26${_kernelname} + cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname} + install -D -m644 Makefile \ + ${pkgdir}/usr/src/linux-${_kernver}/Makefile + install -D -m644 kernel/Makefile \ + ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile + install -D -m644 .config \ + ${pkgdir}/usr/src/linux-${_kernver}/.config + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include + + for i in acpi asm-{generic,x86} config linux math-emu media net pcmcia scsi sound video; do + cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/ + done + + # copy arch includes for external modules + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86 + cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/ + + # copy files necessary for later builds, like nvidia and vmware + cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver} + cp -a scripts ${pkgdir}/usr/src/linux-${_kernver} + # fix permissions on scripts dir + chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts + #mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions + + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel + + cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/ + if [ "$CARCH" = "i686" ]; then + cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/ + fi + cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/ + + # add headers for lirc package + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video + cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/ + for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i + cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i + done + # add dm headers + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md + cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md + # add inotify.h + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux + cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/ + # add CLUSTERIP file for iptables + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/ipv4/netfilter/ + # add wireless headers + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/ + cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/ + # add dvb headers for external modules + # in reference to: + # http://bugs.archlinux.org/task/9912 + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core + cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/ + # add dvb headers for external modules + # in reference to: + # http://bugs.archlinux.org/task/11194 + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/ + cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/ + # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new + # in reference to: + # http://bugs.archlinux.org/task/13146 + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/ + cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/ + cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/ + # add xfs and shmem for aufs building + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm + cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h + # add headers vor virtualbox + # in reference to: + # http://bugs.archlinux.org/task/14568 + cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/ + # add headers for broadcom wl + # in reference to: + # http://bugs.archlinux.org/task/14568 + cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/ + # add vmlinux + cp vmlinux ${pkgdir}/usr/src/linux-${_kernver} + # copy in Kconfig files + for i in `find . -name "Kconfig*"`; do + mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'` + cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i + done + + cd ${pkgdir}/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm + + chown -R root.root ${pkgdir}/usr/src/linux-${_kernver} + find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \; + cd ${pkgdir}/lib/modules/${_kernver} && \ + (rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build) + # install fallback mkinitcpio.conf file and preset file for kernel + install -m644 -D ${srcdir}/${pkgname}.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset || return 1 + # set correct depmod command for install + sed \ + -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \ + -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \ + -i ${srcdir}/../${pkgname}.install + sed \ + -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \ + -e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \ + -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset + + echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver + # remove unneeded architectures + rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa} + # remove the firmware + rm -rf ${pkgdir}/lib/firmware +} + +# vim:set ts=2 sw=2 et: diff --git a/kernel26-vserver/config b/kernel26-vserver/config new file mode 100644 index 0000000..771c72b --- /dev/null +++ b/kernel26-vserver/config @@ -0,0 +1,4564 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.31 +# Sat Nov 14 15:34:22 2009 +# +# CONFIG_64BIT is not set +CONFIG_X86_32=y +# CONFIG_X86_64 is not set +CONFIG_X86=y +CONFIG_OUTPUT_FORMAT="elf32-i386" +CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_CLOCKSOURCE_WATCHDOG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_FAST_CMPXCHG_LOCAL=y +CONFIG_MMU=y +CONFIG_ZONE_DMA=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +# CONFIG_GENERIC_TIME_VSYSCALL is not set +CONFIG_ARCH_HAS_CPU_RELAX=y +CONFIG_ARCH_HAS_DEFAULT_IDLE=y +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_HAVE_SETUP_PER_CPU_AREA=y +CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y +# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ZONE_DMA32 is not set +CONFIG_ARCH_POPULATES_NODE_MAP=y +# CONFIG_AUDIT_ARCH is not set +CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_PENDING_IRQ=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_X86_32_SMP=y +CONFIG_X86_HT=y +CONFIG_X86_TRAMPOLINE=y +CONFIG_KTIME_SCALAR=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="-ARCH" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_LZMA=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +CONFIG_KERNEL_LZMA=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_AUDIT=y +CONFIG_AUDITSYSCALL=y +CONFIG_AUDIT_TREE=y + +# +# RCU Subsystem +# +CONFIG_CLASSIC_RCU=y +# CONFIG_TREE_RCU is not set +# CONFIG_PREEMPT_RCU is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_PREEMPT_RCU_TRACE is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=19 +CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y +# CONFIG_GROUP_SCHED is not set +# CONFIG_CGROUPS is not set +# CONFIG_SYSFS_DEPRECATED_V2 is not set +CONFIG_RELAY=y +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_PCSPKR_PLATFORM=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_COUNTERS=y + +# +# Performance Counters +# +CONFIG_PERF_COUNTERS=y +CONFIG_EVENT_PROFILE=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_PCI_QUIRKS=y +CONFIG_SLUB_DEBUG=y +CONFIG_STRIP_ASM_SYMS=y +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_TRACEPOINTS=y +CONFIG_MARKERS=y +CONFIG_OPROFILE=m +CONFIG_OPROFILE_IBS=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_IOREMAP_PROT=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_API_DEBUG=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_SLOW_WORK=y +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_PREEMPT_NOTIFIERS=y +CONFIG_FREEZER=y + +# +# Processor type and features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_SMP=y +# CONFIG_SPARSE_IRQ is not set +CONFIG_X86_MPPARSE=y +# CONFIG_X86_BIGSMP is not set +# CONFIG_X86_EXTENDED_PLATFORM is not set +CONFIG_SCHED_OMIT_FRAME_POINTER=y +CONFIG_PARAVIRT_GUEST=y +CONFIG_VMI=y +CONFIG_KVM_CLOCK=y +CONFIG_KVM_GUEST=y +CONFIG_LGUEST_GUEST=y +CONFIG_PARAVIRT=y +# CONFIG_PARAVIRT_SPINLOCKS is not set +CONFIG_PARAVIRT_CLOCK=y +# CONFIG_PARAVIRT_DEBUG is not set +# CONFIG_MEMTEST is not set +# CONFIG_M386 is not set +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +CONFIG_M686=y +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +# CONFIG_MVIAC7 is not set +# CONFIG_MPSC is not set +# CONFIG_MCORE2 is not set +# CONFIG_GENERIC_CPU is not set +CONFIG_X86_GENERIC=y +CONFIG_X86_CPU=y +CONFIG_X86_L1_CACHE_BYTES=64 +CONFIG_X86_INTERNODE_CACHE_BYTES=64 +CONFIG_X86_CMPXCHG=y +CONFIG_X86_L1_CACHE_SHIFT=5 +CONFIG_X86_XADD=y +# CONFIG_X86_PPRO_FENCE is not set +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_INTEL_USERCOPY=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y +CONFIG_X86_CMOV=y +CONFIG_X86_MINIMUM_CPU_FAMILY=4 +CONFIG_X86_DEBUGCTLMSR=y +CONFIG_CPU_SUP_INTEL=y +CONFIG_CPU_SUP_CYRIX_32=y +CONFIG_CPU_SUP_AMD=y +CONFIG_CPU_SUP_CENTAUR=y +CONFIG_CPU_SUP_TRANSMETA_32=y +CONFIG_CPU_SUP_UMC_32=y +# CONFIG_X86_DS is not set +CONFIG_HPET_TIMER=y +CONFIG_HPET_EMULATE_RTC=y +CONFIG_DMI=y +# CONFIG_IOMMU_HELPER is not set +CONFIG_IOMMU_API=y +CONFIG_NR_CPUS=8 +CONFIG_SCHED_SMT=y +CONFIG_SCHED_MC=y +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_X86_LOCAL_APIC=y +CONFIG_X86_IO_APIC=y +CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y +CONFIG_X86_MCE=y +# CONFIG_X86_OLD_MCE is not set +CONFIG_X86_NEW_MCE=y +CONFIG_X86_MCE_INTEL=y +CONFIG_X86_MCE_AMD=y +# CONFIG_X86_ANCIENT_MCE is not set +CONFIG_X86_MCE_THRESHOLD=y +# CONFIG_X86_MCE_INJECT is not set +CONFIG_X86_THERMAL_VECTOR=y +CONFIG_VM86=y +CONFIG_TOSHIBA=m +CONFIG_I8K=m +CONFIG_X86_REBOOTFIXUPS=y +CONFIG_MICROCODE=m +CONFIG_MICROCODE_INTEL=y +CONFIG_MICROCODE_AMD=y +CONFIG_MICROCODE_OLD_INTERFACE=y +CONFIG_X86_MSR=m +CONFIG_X86_CPUID=m +# CONFIG_X86_CPU_DEBUG is not set +# CONFIG_NOHIGHMEM is not set +CONFIG_HIGHMEM4G=y +# CONFIG_HIGHMEM64G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_HIGHMEM=y +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_SPARSEMEM_STATIC=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +CONFIG_HAVE_MLOCK=y +CONFIG_HAVE_MLOCKED_PAGE_BIT=y +CONFIG_MMU_NOTIFIER=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +# CONFIG_HIGHPTE is not set +CONFIG_X86_CHECK_BIOS_CORRUPTION=y +CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y +CONFIG_X86_RESERVE_LOW_64K=y +# CONFIG_MATH_EMULATION is not set +CONFIG_MTRR=y +CONFIG_MTRR_SANITIZER=y +CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 +CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 +CONFIG_X86_PAT=y +CONFIG_EFI=y +CONFIG_SECCOMP=y +CONFIG_CC_STACKPROTECTOR_ALL=y +CONFIG_CC_STACKPROTECTOR=y +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_300=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=300 +CONFIG_SCHED_HRTICK=y +CONFIG_KEXEC=y +# CONFIG_CRASH_DUMP is not set +# CONFIG_KEXEC_JUMP is not set +CONFIG_PHYSICAL_START=0x1000000 +# CONFIG_RELOCATABLE is not set +CONFIG_PHYSICAL_ALIGN=0x100000 +CONFIG_HOTPLUG_CPU=y +# CONFIG_COMPAT_VDSO is not set +# CONFIG_CMDLINE_BOOL is not set +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y + +# +# Power management and ACPI options +# +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_HIBERNATION_NVS=y +CONFIG_HIBERNATION=y +CONFIG_PM_STD_PARTITION="" +CONFIG_ACPI=y +CONFIG_ACPI_SLEEP=y +CONFIG_ACPI_PROCFS=y +CONFIG_ACPI_PROCFS_POWER=y +CONFIG_ACPI_SYSFS_POWER=y +CONFIG_ACPI_PROC_EVENT=y +CONFIG_ACPI_AC=m +CONFIG_ACPI_BATTERY=m +CONFIG_ACPI_BUTTON=m +CONFIG_ACPI_VIDEO=m +CONFIG_ACPI_FAN=m +CONFIG_ACPI_DOCK=y +CONFIG_ACPI_PROCESSOR=m +CONFIG_ACPI_HOTPLUG_CPU=y +CONFIG_ACPI_THERMAL=m +# CONFIG_ACPI_CUSTOM_DSDT is not set +CONFIG_ACPI_BLACKLIST_YEAR=0 +# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_PCI_SLOT=m +CONFIG_X86_PM_TIMER=y +CONFIG_ACPI_CONTAINER=m +CONFIG_ACPI_SBS=m +CONFIG_X86_APM_BOOT=y +CONFIG_APM=y +# CONFIG_APM_IGNORE_USER_SUSPEND is not set +CONFIG_APM_DO_ENABLE=y +# CONFIG_APM_CPU_IDLE is not set +# CONFIG_APM_DISPLAY_BLANK is not set +# CONFIG_APM_ALLOW_INTS is not set + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=m +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=m +CONFIG_CPU_FREQ_STAT_DETAILS=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=m +CONFIG_CPU_FREQ_GOV_USERSPACE=m +CONFIG_CPU_FREQ_GOV_ONDEMAND=m +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m + +# +# CPUFreq processor drivers +# +CONFIG_X86_ACPI_CPUFREQ=m +CONFIG_X86_POWERNOW_K6=m +CONFIG_X86_POWERNOW_K7=m +CONFIG_X86_POWERNOW_K7_ACPI=y +CONFIG_X86_POWERNOW_K8=m +CONFIG_X86_GX_SUSPMOD=m +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set +CONFIG_X86_SPEEDSTEP_ICH=m +CONFIG_X86_SPEEDSTEP_SMI=m +CONFIG_X86_P4_CLOCKMOD=m +CONFIG_X86_CPUFREQ_NFORCE2=m +CONFIG_X86_LONGRUN=m +CONFIG_X86_LONGHAUL=m +CONFIG_X86_E_POWERSAVER=m + +# +# shared options +# +CONFIG_X86_SPEEDSTEP_LIB=m +CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y + +# +# Bus options (PCI etc.) +# +CONFIG_PCI=y +# CONFIG_PCI_GOBIOS is not set +# CONFIG_PCI_GOMMCONFIG is not set +# CONFIG_PCI_GODIRECT is not set +# CONFIG_PCI_GOOLPC is not set +CONFIG_PCI_GOANY=y +CONFIG_PCI_BIOS=y +CONFIG_PCI_DIRECT=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCI_OLPC=y +CONFIG_PCI_DOMAINS=y +CONFIG_DMAR=y +# CONFIG_DMAR_DEFAULT_ON is not set +# CONFIG_DMAR_BROKEN_GFX_WA is not set +CONFIG_DMAR_FLOPPY_WA=y +CONFIG_PCIEPORTBUS=y +CONFIG_HOTPLUG_PCI_PCIE=m +CONFIG_PCIEAER=y +# CONFIG_PCIE_ECRC is not set +# CONFIG_PCIEAER_INJECT is not set +# CONFIG_PCIEASPM is not set +CONFIG_ARCH_SUPPORTS_MSI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_LEGACY=y +# CONFIG_PCI_DEBUG is not set +CONFIG_PCI_STUB=m +CONFIG_HT_IRQ=y +CONFIG_PCI_IOV=y +CONFIG_ISA_DMA_API=y +CONFIG_ISA=y +# CONFIG_EISA is not set +# CONFIG_MCA is not set +# CONFIG_SCx200 is not set +CONFIG_OLPC=y +CONFIG_K8_NB=y +CONFIG_PCCARD=m +# CONFIG_PCMCIA_DEBUG is not set +CONFIG_PCMCIA=m +CONFIG_PCMCIA_LOAD_CIS=y +CONFIG_PCMCIA_IOCTL=y +CONFIG_CARDBUS=y + +# +# PC-card bridges +# +CONFIG_YENTA=m +CONFIG_YENTA_O2=y +CONFIG_YENTA_RICOH=y +CONFIG_YENTA_TI=y +CONFIG_YENTA_ENE_TUNE=y +CONFIG_YENTA_TOSHIBA=y +CONFIG_PD6729=m +CONFIG_I82092=m +CONFIG_I82365=m +CONFIG_TCIC=m +CONFIG_PCMCIA_PROBE=y +CONFIG_PCCARD_NONSTATIC=m +CONFIG_HOTPLUG_PCI=m +CONFIG_HOTPLUG_PCI_FAKE=m +CONFIG_HOTPLUG_PCI_COMPAQ=m +# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set +CONFIG_HOTPLUG_PCI_IBM=m +CONFIG_HOTPLUG_PCI_ACPI=m +CONFIG_HOTPLUG_PCI_ACPI_IBM=m +CONFIG_HOTPLUG_PCI_CPCI=y +CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m +CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m +CONFIG_HOTPLUG_PCI_SHPC=m + +# +# Executable file formats / Emulations +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=y +CONFIG_HAVE_ATOMIC_IOMAP=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +CONFIG_XFRM_USER=m +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=m +CONFIG_NET_KEY=m +# CONFIG_NET_KEY_MIGRATE is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=m +CONFIG_INET_XFRM_MODE_TUNNEL=m +CONFIG_INET_XFRM_MODE_BEET=m +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_MIP6=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m +CONFIG_IPV6_SIT=m +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +# CONFIG_IPV6_MROUTE is not set +CONFIG_NETLABEL=y +CONFIG_NETWORK_SECMARK=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CT_ACCT=y +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_DCCP=m +CONFIG_NF_CT_PROTO_GRE=m +CONFIG_NF_CT_PROTO_SCTP=m +CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NETFILTER_TPROXY=m +CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_RATEEST=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_SECMARK=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_HL=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT=y +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_IP_VS=m +# CONFIG_IP_VS_IPV6 is not set +# CONFIG_IP_VS_DEBUG is not set +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_AH_ESP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PROTO_DCCP=m +CONFIG_NF_NAT_PROTO_GRE=m +CONFIG_NF_NAT_PROTO_UDPLITE=m +CONFIG_NF_NAT_PROTO_SCTP=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NF_NAT_AMANDA=m +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_SECURITY=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_CONNTRACK_IPV6=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_SECURITY=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_IP6=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +CONFIG_IP_DCCP=m +CONFIG_INET_DCCP_DIAG=m + +# +# DCCP CCIDs Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=y +# CONFIG_IP_DCCP_CCID3_DEBUG is not set +CONFIG_IP_DCCP_CCID3_RTO=100 +CONFIG_IP_DCCP_TFRC_LIB=y + +# +# DCCP Kernel Hacking +# +# CONFIG_IP_DCCP_DEBUG is not set +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +CONFIG_SCTP_HMAC_SHA1=y +# CONFIG_SCTP_HMAC_MD5 is not set +# CONFIG_TIPC is not set +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +# CONFIG_ATM_CLIP_NO_ICMP is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +# CONFIG_ATM_BR2684_IPFILTER is not set +CONFIG_STP=m +CONFIG_BRIDGE=m +# CONFIG_NET_DSA is not set +CONFIG_VLAN_8021Q=m +# CONFIG_VLAN_8021Q_GVRP is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +CONFIG_LLC2=m +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +CONFIG_DEV_APPLETALK=m +CONFIG_LTPC=m +CONFIG_COPS=m +CONFIG_COPS_DAYNA=y +CONFIG_COPS_TANGENT=y +CONFIG_IPDDP=m +CONFIG_IPDDP_ENCAP=y +CONFIG_IPDDP_DECAP=y +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +CONFIG_PHONET=m +CONFIG_IEEE802154=m +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_CLS_U32_MARK is not set +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +# CONFIG_NET_EMATCH is not set +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set + +# +# Network testing +# +CONFIG_NET_PKTGEN=m +CONFIG_NET_DROP_MONITOR=y +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +CONFIG_IRDA=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +# CONFIG_IRDA_DEBUG is not set + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +CONFIG_IRTTY_SIR=m + +# +# Dongle support +# +CONFIG_DONGLE=y +CONFIG_ESI_DONGLE=m +CONFIG_ACTISYS_DONGLE=m +CONFIG_TEKRAM_DONGLE=m +CONFIG_TOIM3232_DONGLE=m +CONFIG_LITELINK_DONGLE=m +CONFIG_MA600_DONGLE=m +CONFIG_GIRBIL_DONGLE=m +CONFIG_MCP2120_DONGLE=m +CONFIG_OLD_BELKIN_DONGLE=m +CONFIG_ACT200L_DONGLE=m +CONFIG_KINGSUN_DONGLE=m +CONFIG_KSDAZZLE_DONGLE=m +CONFIG_KS959_DONGLE=m + +# +# FIR device drivers +# +CONFIG_USB_IRDA=m +CONFIG_SIGMATEL_FIR=m +CONFIG_NSC_FIR=m +CONFIG_WINBOND_FIR=m +CONFIG_TOSHIBA_FIR=m +CONFIG_SMC_IRCC_FIR=m +CONFIG_ALI_FIR=m +CONFIG_VLSI_FIR=m +CONFIG_VIA_FIR=m +CONFIG_MCS_FIR=m +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +# CONFIG_BT_BNEP_MC_FILTER is not set +# CONFIG_BT_BNEP_PROTO_FILTER is not set +# CONFIG_BT_CMTP is not set +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIDTL1=m +CONFIG_BT_HCIBT3C=m +CONFIG_BT_HCIBLUECARD=m +CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIVHCI=m +CONFIG_AF_RXRPC=m +# CONFIG_AF_RXRPC_DEBUG is not set +CONFIG_RXKAD=m +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_CFG80211=m +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_DEBUGFS is not set +CONFIG_WIRELESS_OLD_REGULATORY=y +CONFIG_WIRELESS_EXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=m +CONFIG_LIB80211_CRYPT_WEP=m +CONFIG_LIB80211_CRYPT_CCMP=m +CONFIG_LIB80211_CRYPT_TKIP=m +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=m +CONFIG_MAC80211_DEFAULT_PS=y +CONFIG_MAC80211_DEFAULT_PS_VALUE=1 + +# +# Rate control algorithm selection +# +CONFIG_MAC80211_RC_MINSTREL=y +# CONFIG_MAC80211_RC_DEFAULT_PID is not set +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel" +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_DEBUG_MENU is not set +CONFIG_WIMAX=m +CONFIG_WIMAX_DEBUG_LEVEL=8 +CONFIG_RFKILL=m +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +CONFIG_NET_9P=m +CONFIG_NET_9P_VIRTIO=m +# CONFIG_NET_9P_DEBUG is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +CONFIG_CONNECTOR=m +CONFIG_MTD=m +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +CONFIG_MTD_TESTS=m +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=m +CONFIG_MTD_BLKDEVS=m +CONFIG_MTD_BLOCK=m +# CONFIG_MTD_BLOCK_RO is not set +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_RAM=m +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_TS5500 is not set +# CONFIG_MTD_INTEL_VR_NOR is not set +CONFIG_MTD_PLATRAM=m + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +CONFIG_MTD_SLRAM=m +CONFIG_MTD_PHRAM=m +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_NAND is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set + +# +# UBI - Unsorted block images +# +# CONFIG_MTD_UBI is not set +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_SERIAL=m +CONFIG_PARPORT_PC_FIFO=y +CONFIG_PARPORT_PC_SUPERIO=y +CONFIG_PARPORT_PC_PCMCIA=m +# CONFIG_PARPORT_GSC is not set +CONFIG_PARPORT_AX88796=m +CONFIG_PARPORT_1284=y +CONFIG_PARPORT_NOT_PC=y +CONFIG_PNP=y +# CONFIG_PNP_DEBUG_MESSAGES is not set + +# +# Protocols +# +CONFIG_ISAPNP=y +# CONFIG_PNPBIOS is not set +CONFIG_PNPACPI=y +CONFIG_BLK_DEV=y +CONFIG_BLK_DEV_FD=m +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +CONFIG_BLK_CPQ_DA=m +CONFIG_BLK_CPQ_CISS_DA=m +# CONFIG_CISS_SCSI_TAPE is not set +CONFIG_BLK_DEV_DAC960=m +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_VROOT=y +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_OSD=m +CONFIG_BLK_DEV_SX8=m +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +# CONFIG_BLK_DEV_XIP is not set +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set +CONFIG_ATA_OVER_ETH=m +CONFIG_VIRTIO_BLK=m +# CONFIG_BLK_DEV_HD is not set +CONFIG_MISC_DEVICES=y +# CONFIG_IBM_ASM is not set +CONFIG_PHANTOM=m +CONFIG_SGI_IOC4=m +CONFIG_TIFM_CORE=m +CONFIG_TIFM_7XX1=m +CONFIG_ICS932S401=m +CONFIG_ENCLOSURE_SERVICES=m +CONFIG_HP_ILO=m +CONFIG_DELL_LAPTOP=m +CONFIG_ISL29003=m +CONFIG_C2PORT=m +CONFIG_C2PORT_DURAMAR_2150=m + +# +# EEPROM support +# +CONFIG_EEPROM_AT24=m +CONFIG_EEPROM_AT25=m +CONFIG_EEPROM_LEGACY=m +CONFIG_EEPROM_MAX6875=m +CONFIG_EEPROM_93CX6=m +CONFIG_CB710_CORE=m +# CONFIG_CB710_DEBUG is not set +CONFIG_CB710_DEBUG_ASSUMPTIONS=y +CONFIG_HAVE_IDE=y +CONFIG_IDE=m + +# +# Please see Documentation/ide/ide.txt for help/info on IDE drives +# +CONFIG_IDE_XFER_MODE=y +CONFIG_IDE_TIMINGS=y +CONFIG_IDE_ATAPI=y +CONFIG_IDE_LEGACY=y +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_IDE_GD=m +CONFIG_IDE_GD_ATA=y +CONFIG_IDE_GD_ATAPI=y +CONFIG_BLK_DEV_IDECS=m +CONFIG_BLK_DEV_DELKIN=m +CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEACPI=y +# CONFIG_IDE_TASK_IOCTL is not set +CONFIG_IDE_PROC_FS=y + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=m +CONFIG_BLK_DEV_PLATFORM=m +CONFIG_BLK_DEV_CMD640=m +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set +CONFIG_BLK_DEV_IDEPNP=m +CONFIG_BLK_DEV_IDEDMA_SFF=y + +# +# PCI IDE chipsets support +# +CONFIG_BLK_DEV_IDEPCI=y +# CONFIG_BLK_DEV_OFFBOARD is not set +CONFIG_BLK_DEV_GENERIC=m +CONFIG_BLK_DEV_OPTI621=m +CONFIG_BLK_DEV_RZ1000=m +CONFIG_BLK_DEV_IDEDMA_PCI=y +CONFIG_BLK_DEV_AEC62XX=m +CONFIG_BLK_DEV_ALI15X3=m +CONFIG_BLK_DEV_AMD74XX=m +CONFIG_BLK_DEV_ATIIXP=m +CONFIG_BLK_DEV_CMD64X=m +CONFIG_BLK_DEV_TRIFLEX=m +CONFIG_BLK_DEV_CS5520=m +CONFIG_BLK_DEV_CS5530=m +CONFIG_BLK_DEV_CS5535=m +CONFIG_BLK_DEV_CS5536=m +CONFIG_BLK_DEV_HPT366=m +CONFIG_BLK_DEV_JMICRON=m +CONFIG_BLK_DEV_SC1200=m +CONFIG_BLK_DEV_PIIX=m +CONFIG_BLK_DEV_IT8172=m +CONFIG_BLK_DEV_IT8213=m +CONFIG_BLK_DEV_IT821X=m +CONFIG_BLK_DEV_NS87415=m +CONFIG_BLK_DEV_PDC202XX_OLD=m +CONFIG_BLK_DEV_PDC202XX_NEW=m +CONFIG_BLK_DEV_SVWKS=m +CONFIG_BLK_DEV_SIIMAGE=m +CONFIG_BLK_DEV_SIS5513=m +CONFIG_BLK_DEV_SLC90E66=m +CONFIG_BLK_DEV_TRM290=m +CONFIG_BLK_DEV_VIA82CXXX=m +CONFIG_BLK_DEV_TC86C001=m + +# +# Other IDE chipsets support +# + +# +# Note: most of these also require special kernel boot parameters +# +CONFIG_BLK_DEV_4DRIVES=m +CONFIG_BLK_DEV_ALI14XX=m +CONFIG_BLK_DEV_DTC2278=m +CONFIG_BLK_DEV_HT6560B=m +CONFIG_BLK_DEV_QD65XX=m +CONFIG_BLK_DEV_UMC8672=m +CONFIG_BLK_DEV_IDEDMA=y + +# +# SCSI device support +# +CONFIG_RAID_ATTRS=m +CONFIG_SCSI=m +CONFIG_SCSI_DMA=y +CONFIG_SCSI_TGT=m +CONFIG_SCSI_NETLINK=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m +CONFIG_BLK_DEV_SR=m +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m +CONFIG_CHR_DEV_SCH=m +CONFIG_SCSI_ENCLOSURE=m +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +CONFIG_SCSI_SPI_ATTRS=m +CONFIG_SCSI_FC_ATTRS=m +# CONFIG_SCSI_FC_TGT_ATTRS is not set +CONFIG_SCSI_ISCSI_ATTRS=m +CONFIG_SCSI_SAS_ATTRS=m +CONFIG_SCSI_SAS_LIBSAS=m +CONFIG_SCSI_SAS_ATA=y +CONFIG_SCSI_SAS_HOST_SMP=y +# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set +CONFIG_SCSI_SRP_ATTRS=m +CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=m +CONFIG_SCSI_CXGB3_ISCSI=m +CONFIG_SCSI_BNX2_ISCSI=m +CONFIG_BLK_DEV_3W_XXXX_RAID=m +CONFIG_SCSI_3W_9XXX=m +CONFIG_SCSI_7000FASST=m +CONFIG_SCSI_ACARD=m +CONFIG_SCSI_AHA152X=m +CONFIG_SCSI_AHA1542=m +CONFIG_SCSI_AACRAID=m +CONFIG_SCSI_AIC7XXX=m +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000 +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +CONFIG_AIC7XXX_REG_PRETTY_PRINT=y +# CONFIG_SCSI_AIC7XXX_OLD is not set +CONFIG_SCSI_AIC79XX=m +CONFIG_AIC79XX_CMDS_PER_DEVICE=32 +CONFIG_AIC79XX_RESET_DELAY_MS=15000 +# CONFIG_AIC79XX_DEBUG_ENABLE is not set +CONFIG_AIC79XX_DEBUG_MASK=0 +CONFIG_AIC79XX_REG_PRETTY_PRINT=y +CONFIG_SCSI_AIC94XX=m +# CONFIG_AIC94XX_DEBUG is not set +CONFIG_SCSI_MVSAS=m +# CONFIG_SCSI_MVSAS_DEBUG is not set +CONFIG_SCSI_DPT_I2O=m +CONFIG_SCSI_ADVANSYS=m +CONFIG_SCSI_IN2000=m +CONFIG_SCSI_ARCMSR=m +CONFIG_SCSI_ARCMSR_AER=y +CONFIG_MEGARAID_NEWGEN=y +CONFIG_MEGARAID_MM=m +CONFIG_MEGARAID_MAILBOX=m +CONFIG_MEGARAID_LEGACY=m +CONFIG_MEGARAID_SAS=m +CONFIG_SCSI_MPT2SAS=m +CONFIG_SCSI_MPT2SAS_MAX_SGE=128 +# CONFIG_SCSI_MPT2SAS_LOGGING is not set +CONFIG_SCSI_HPTIOP=m +CONFIG_SCSI_BUSLOGIC=m +# CONFIG_SCSI_FLASHPOINT is not set +CONFIG_LIBFC=m +CONFIG_LIBFCOE=m +CONFIG_FCOE=m +CONFIG_FCOE_FNIC=m +CONFIG_SCSI_DMX3191D=m +CONFIG_SCSI_DTC3280=m +CONFIG_SCSI_EATA=m +# CONFIG_SCSI_EATA_TAGGED_QUEUE is not set +# CONFIG_SCSI_EATA_LINKED_COMMANDS is not set +CONFIG_SCSI_EATA_MAX_TAGS=16 +CONFIG_SCSI_FUTURE_DOMAIN=m +CONFIG_SCSI_GDTH=m +CONFIG_SCSI_GENERIC_NCR5380=m +CONFIG_SCSI_GENERIC_NCR5380_MMIO=m +CONFIG_SCSI_GENERIC_NCR53C400=y +CONFIG_SCSI_IPS=m +CONFIG_SCSI_INITIO=m +CONFIG_SCSI_INIA100=m +CONFIG_SCSI_PPA=m +CONFIG_SCSI_IMM=m +# CONFIG_SCSI_IZIP_EPP16 is not set +# CONFIG_SCSI_IZIP_SLOW_CTR is not set +CONFIG_SCSI_NCR53C406A=m +CONFIG_SCSI_STEX=m +CONFIG_SCSI_SYM53C8XX_2=m +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 +CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 +CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 +CONFIG_SCSI_SYM53C8XX_MMIO=y +CONFIG_SCSI_IPR=m +# CONFIG_SCSI_IPR_TRACE is not set +# CONFIG_SCSI_IPR_DUMP is not set +CONFIG_SCSI_PAS16=m +CONFIG_SCSI_QLOGIC_FAS=m +CONFIG_SCSI_QLOGIC_1280=m +CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA_ISCSI=m +CONFIG_SCSI_LPFC=m +# CONFIG_SCSI_LPFC_DEBUG_FS is not set +CONFIG_SCSI_SYM53C416=m +CONFIG_SCSI_DC395x=m +CONFIG_SCSI_DC390T=m +CONFIG_SCSI_T128=m +CONFIG_SCSI_U14_34F=m +# CONFIG_SCSI_U14_34F_TAGGED_QUEUE is not set +# CONFIG_SCSI_U14_34F_LINKED_COMMANDS is not set +CONFIG_SCSI_U14_34F_MAX_TAGS=8 +CONFIG_SCSI_ULTRASTOR=m +CONFIG_SCSI_NSP32=m +# CONFIG_SCSI_DEBUG is not set +CONFIG_SCSI_SRP=m +CONFIG_SCSI_LOWLEVEL_PCMCIA=y +CONFIG_PCMCIA_AHA152X=m +CONFIG_PCMCIA_FDOMAIN=m +CONFIG_PCMCIA_NINJA_SCSI=m +CONFIG_PCMCIA_QLOGIC=m +CONFIG_PCMCIA_SYM53C500=m +CONFIG_SCSI_DH=m +CONFIG_SCSI_DH_RDAC=m +CONFIG_SCSI_DH_HP_SW=m +CONFIG_SCSI_DH_EMC=m +CONFIG_SCSI_DH_ALUA=m +CONFIG_SCSI_OSD_INITIATOR=m +CONFIG_SCSI_OSD_ULD=m +CONFIG_SCSI_OSD_DPRINT_SENSE=0 +# CONFIG_SCSI_OSD_DEBUG is not set +CONFIG_ATA=m +# CONFIG_ATA_NONSTANDARD is not set +CONFIG_ATA_ACPI=y +CONFIG_SATA_PMP=y +CONFIG_SATA_AHCI=m +CONFIG_SATA_SIL24=m +CONFIG_ATA_SFF=y +CONFIG_SATA_SVW=m +CONFIG_ATA_PIIX=m +CONFIG_SATA_MV=m +CONFIG_SATA_NV=m +CONFIG_PDC_ADMA=m +CONFIG_SATA_QSTOR=m +CONFIG_SATA_PROMISE=m +CONFIG_SATA_SX4=m +CONFIG_SATA_SIL=m +CONFIG_SATA_SIS=m +CONFIG_SATA_ULI=m +CONFIG_SATA_VIA=m +CONFIG_SATA_VITESSE=m +CONFIG_SATA_INIC162X=m +CONFIG_PATA_ACPI=m +CONFIG_PATA_ALI=m +CONFIG_PATA_AMD=m +CONFIG_PATA_ARTOP=m +CONFIG_PATA_ATIIXP=m +CONFIG_PATA_CMD640_PCI=m +CONFIG_PATA_CMD64X=m +CONFIG_PATA_CS5520=m +CONFIG_PATA_CS5530=m +CONFIG_PATA_CS5535=m +CONFIG_PATA_CS5536=m +CONFIG_PATA_CYPRESS=m +CONFIG_PATA_EFAR=m +CONFIG_ATA_GENERIC=m +CONFIG_PATA_HPT366=m +CONFIG_PATA_HPT37X=m +CONFIG_PATA_HPT3X2N=m +CONFIG_PATA_HPT3X3=m +# CONFIG_PATA_HPT3X3_DMA is not set +CONFIG_PATA_ISAPNP=m +CONFIG_PATA_IT821X=m +CONFIG_PATA_IT8213=m +CONFIG_PATA_JMICRON=m +CONFIG_PATA_LEGACY=m +CONFIG_PATA_TRIFLEX=m +CONFIG_PATA_MARVELL=m +CONFIG_PATA_MPIIX=m +CONFIG_PATA_OLDPIIX=m +CONFIG_PATA_NETCELL=m +CONFIG_PATA_NINJA32=m +CONFIG_PATA_NS87410=m +CONFIG_PATA_NS87415=m +CONFIG_PATA_OPTI=m +CONFIG_PATA_OPTIDMA=m +CONFIG_PATA_PCMCIA=m +CONFIG_PATA_PDC_OLD=m +CONFIG_PATA_QDI=m +CONFIG_PATA_RADISYS=m +CONFIG_PATA_RZ1000=m +CONFIG_PATA_SC1200=m +CONFIG_PATA_SERVERWORKS=m +CONFIG_PATA_PDC2027X=m +CONFIG_PATA_SIL680=m +CONFIG_PATA_SIS=m +CONFIG_PATA_VIA=m +CONFIG_PATA_WINBOND=m +CONFIG_PATA_WINBOND_VLB=m +CONFIG_PATA_SCH=m +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_RAID6_PQ=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_DEBUG is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_ZERO=m +CONFIG_DM_MULTIPATH=m +CONFIG_DM_MULTIPATH_QL=m +CONFIG_DM_MULTIPATH_ST=m +CONFIG_DM_DELAY=m +CONFIG_DM_UEVENT=y +CONFIG_FUSION=y +CONFIG_FUSION_SPI=m +CONFIG_FUSION_FC=m +CONFIG_FUSION_SAS=m +CONFIG_FUSION_MAX_SGE=128 +CONFIG_FUSION_CTL=m +# CONFIG_FUSION_LOGGING is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# You can enable one or both FireWire driver stacks. +# + +# +# See the help texts for more information. +# +# CONFIG_FIREWIRE is not set +CONFIG_IEEE1394=m +CONFIG_IEEE1394_OHCI1394=m +CONFIG_IEEE1394_PCILYNX=m +CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set +CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y +CONFIG_IEEE1394_ETH1394=m +CONFIG_IEEE1394_RAWIO=m +CONFIG_IEEE1394_VIDEO1394=m +CONFIG_IEEE1394_DV1394=m +# CONFIG_IEEE1394_VERBOSEDEBUG is not set +CONFIG_I2O=m +CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y +CONFIG_I2O_EXT_ADAPTEC=y +CONFIG_I2O_CONFIG=m +CONFIG_I2O_CONFIG_OLD_IOCTL=y +CONFIG_I2O_BUS=m +CONFIG_I2O_BLOCK=m +CONFIG_I2O_SCSI=m +CONFIG_I2O_PROC=m +CONFIG_MACINTOSH_DRIVERS=y +CONFIG_MAC_EMUMOUSEBTN=y +CONFIG_NETDEVICES=y +CONFIG_IFB=m +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_MACVLAN=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_NET_SB1000=m +# CONFIG_ARCNET is not set +CONFIG_PHYLIB=m + +# +# MII PHY device drivers +# +CONFIG_MARVELL_PHY=m +CONFIG_DAVICOM_PHY=m +CONFIG_QSEMI_PHY=m +CONFIG_LXT_PHY=m +CONFIG_CICADA_PHY=m +CONFIG_VITESSE_PHY=m +CONFIG_SMSC_PHY=m +CONFIG_BROADCOM_PHY=m +CONFIG_ICPLUS_PHY=m +CONFIG_REALTEK_PHY=m +CONFIG_NATIONAL_PHY=m +CONFIG_STE10XP=m +CONFIG_LSI_ET1011C_PHY=m +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_HAPPYMEAL=m +CONFIG_SUNGEM=m +CONFIG_CASSINI=m +CONFIG_NET_VENDOR_3COM=y +CONFIG_EL1=m +CONFIG_EL2=m +CONFIG_ELPLUS=m +CONFIG_EL16=m +CONFIG_EL3=m +CONFIG_3C515=m +CONFIG_VORTEX=m +CONFIG_TYPHOON=m +CONFIG_LANCE=m +CONFIG_NET_VENDOR_SMC=y +CONFIG_WD80x3=m +CONFIG_ULTRA=m +CONFIG_SMC9194=m +CONFIG_ENC28J60=m +# CONFIG_ENC28J60_WRITEVERIFY is not set +CONFIG_ETHOC=m +CONFIG_NET_VENDOR_RACAL=y +CONFIG_NI52=m +CONFIG_NI65=m +CONFIG_DNET=m +CONFIG_NET_TULIP=y +CONFIG_DE2104X=m +CONFIG_DE2104X_DSL=0 +CONFIG_TULIP=m +# CONFIG_TULIP_MWI is not set +# CONFIG_TULIP_MMIO is not set +# CONFIG_TULIP_NAPI is not set +CONFIG_DE4X5=m +CONFIG_WINBOND_840=m +CONFIG_DM9102=m +CONFIG_ULI526X=m +CONFIG_PCMCIA_XIRCOM=m +CONFIG_AT1700=m +CONFIG_DEPCA=m +CONFIG_HP100=m +CONFIG_NET_ISA=y +CONFIG_E2100=m +CONFIG_EWRK3=m +CONFIG_EEXPRESS=m +CONFIG_EEXPRESS_PRO=m +CONFIG_HPLAN_PLUS=m +CONFIG_HPLAN=m +CONFIG_LP486E=m +CONFIG_ETH16I=m +CONFIG_NE2000=m +CONFIG_ZNET=m +CONFIG_SEEQ8005=m +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +CONFIG_NET_PCI=y +CONFIG_PCNET32=m +CONFIG_AMD8111_ETH=m +CONFIG_ADAPTEC_STARFIRE=m +CONFIG_AC3200=m +CONFIG_APRICOT=m +CONFIG_B44=m +CONFIG_B44_PCI_AUTOSELECT=y +CONFIG_B44_PCICORE_AUTOSELECT=y +CONFIG_B44_PCI=y +CONFIG_FORCEDETH=m +# CONFIG_FORCEDETH_NAPI is not set +CONFIG_CS89x0=m +CONFIG_E100=m +CONFIG_FEALNX=m +CONFIG_NATSEMI=m +CONFIG_NE2K_PCI=m +CONFIG_8139CP=m +CONFIG_8139TOO=m +# CONFIG_8139TOO_PIO is not set +CONFIG_8139TOO_TUNE_TWISTER=y +CONFIG_8139TOO_8129=y +# CONFIG_8139_OLD_RX_RESET is not set +CONFIG_R6040=m +CONFIG_SIS900=m +CONFIG_EPIC100=m +CONFIG_SMSC9420=m +CONFIG_SUNDANCE=m +# CONFIG_SUNDANCE_MMIO is not set +CONFIG_TLAN=m +CONFIG_KS8842=m +CONFIG_KS8851=m +CONFIG_VIA_RHINE=m +# CONFIG_VIA_RHINE_MMIO is not set +CONFIG_SC92031=m +CONFIG_NET_POCKET=y +CONFIG_ATP=m +CONFIG_DE600=m +CONFIG_DE620=m +CONFIG_ATL2=m +CONFIG_NETDEV_1000=y +CONFIG_ACENIC=m +# CONFIG_ACENIC_OMIT_TIGON_I is not set +CONFIG_DL2K=m +CONFIG_E1000=m +CONFIG_E1000E=m +CONFIG_IP1000=m +CONFIG_IGB=m +CONFIG_IGB_DCA=y +CONFIG_IGBVF=m +CONFIG_NS83820=m +CONFIG_HAMACHI=m +CONFIG_YELLOWFIN=m +CONFIG_R8169=m +# CONFIG_R8169_VLAN is not set +CONFIG_SIS190=m +CONFIG_SKGE=m +# CONFIG_SKGE_DEBUG is not set +CONFIG_SKY2=m +# CONFIG_SKY2_DEBUG is not set +CONFIG_VIA_VELOCITY=m +CONFIG_TIGON3=m +CONFIG_BNX2=m +CONFIG_CNIC=m +CONFIG_QLA3XXX=m +CONFIG_ATL1=m +CONFIG_ATL1E=m +CONFIG_ATL1C=m +CONFIG_JME=m +CONFIG_NETDEV_10000=y +CONFIG_MDIO=m +CONFIG_CHELSIO_T1=m +CONFIG_CHELSIO_T1_1G=y +CONFIG_CHELSIO_T3_DEPENDS=y +CONFIG_CHELSIO_T3=m +CONFIG_ENIC=m +CONFIG_IXGBE=m +CONFIG_IXGBE_DCA=y +CONFIG_IXGB=m +CONFIG_S2IO=m +CONFIG_VXGE=m +# CONFIG_VXGE_DEBUG_TRACE_ALL is not set +CONFIG_MYRI10GE=m +CONFIG_MYRI10GE_DCA=y +CONFIG_NETXEN_NIC=m +CONFIG_NIU=m +CONFIG_MLX4_EN=m +CONFIG_MLX4_CORE=m +CONFIG_MLX4_DEBUG=y +CONFIG_TEHUTI=m +CONFIG_BNX2X=m +CONFIG_QLGE=m +CONFIG_SFC=m +CONFIG_SFC_MTD=y +CONFIG_BE2NET=m +# CONFIG_TR is not set + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +CONFIG_WLAN_80211=y +CONFIG_PCMCIA_RAYCS=m +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_CS=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_LIBERTAS_SPI=m +# CONFIG_LIBERTAS_DEBUG is not set +CONFIG_LIBERTAS_THINFIRM=m +CONFIG_LIBERTAS_THINFIRM_USB=m +CONFIG_AIRO=m +CONFIG_ATMEL=m +CONFIG_PCI_ATMEL=m +CONFIG_PCMCIA_ATMEL=m +CONFIG_AT76C50X_USB=m +CONFIG_AIRO_CS=m +CONFIG_PCMCIA_WL3501=m +CONFIG_PRISM54=m +CONFIG_USB_ZD1201=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_RTL8180=m +CONFIG_RTL8187=m +CONFIG_RTL8187_LEDS=y +CONFIG_ADM8211=m +# CONFIG_MAC80211_HWSIM is not set +CONFIG_MWL8K=m +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +CONFIG_P54_PCI=m +CONFIG_P54_SPI=m +CONFIG_P54_LEDS=y +CONFIG_ATH_COMMON=m +CONFIG_ATH5K=m +# CONFIG_ATH5K_DEBUG is not set +CONFIG_ATH9K=m +# CONFIG_ATH9K_DEBUG is not set +CONFIG_AR9170_USB=m +CONFIG_AR9170_LEDS=y +CONFIG_IPW2100=m +CONFIG_IPW2100_MONITOR=y +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +CONFIG_IPW2200_RADIOTAP=y +CONFIG_IPW2200_PROMISCUOUS=y +CONFIG_IPW2200_QOS=y +# CONFIG_IPW2200_DEBUG is not set +CONFIG_LIBIPW=m +# CONFIG_LIBIPW_DEBUG is not set +CONFIG_IWLWIFI=m +CONFIG_IWLWIFI_LEDS=y +CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT=y +# CONFIG_IWLWIFI_DEBUG is not set +CONFIG_IWLAGN=m +CONFIG_IWL4965=y +CONFIG_IWL5000=y +CONFIG_IWL3945=m +CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set +CONFIG_HOSTAP_PLX=m +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_CS=m +CONFIG_B43=m +CONFIG_B43_PCI_AUTOSELECT=y +CONFIG_B43_PCICORE_AUTOSELECT=y +CONFIG_B43_PCMCIA=y +CONFIG_B43_PIO=y +CONFIG_B43_LEDS=y +CONFIG_B43_HWRNG=y +# CONFIG_B43_DEBUG is not set +CONFIG_B43LEGACY=m +CONFIG_B43LEGACY_PCI_AUTOSELECT=y +CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y +CONFIG_B43LEGACY_LEDS=y +CONFIG_B43LEGACY_HWRNG=y +# CONFIG_B43LEGACY_DEBUG is not set +CONFIG_B43LEGACY_DMA=y +CONFIG_B43LEGACY_PIO=y +CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y +# CONFIG_B43LEGACY_DMA_MODE is not set +# CONFIG_B43LEGACY_PIO_MODE is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +CONFIG_RT2X00=m +CONFIG_RT2400PCI=m +CONFIG_RT2500PCI=m +CONFIG_RT61PCI=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2X00_LIB_PCI=m +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_HT=y +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +CONFIG_RT2X00_LIB_RFKILL=y +CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_DEBUG is not set +CONFIG_HERMES=m +CONFIG_HERMES_CACHE_FW_ON_INIT=y +CONFIG_PLX_HERMES=m +CONFIG_TMD_HERMES=m +CONFIG_NORTEL_HERMES=m +CONFIG_PCI_HERMES=m +CONFIG_PCMCIA_HERMES=m +CONFIG_PCMCIA_SPECTRUM=m +CONFIG_WL12XX=m +CONFIG_IWM=m +# CONFIG_IWM_DEBUG is not set + +# +# WiMAX Wireless Broadband devices +# +CONFIG_WIMAX_I2400M=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_WIMAX_I2400M_SDIO=m +CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 + +# +# USB Network Adapters +# +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SMSC95XX=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_CDC_PHONET=m +CONFIG_NET_PCMCIA=y +CONFIG_PCMCIA_3C589=m +CONFIG_PCMCIA_3C574=m +CONFIG_PCMCIA_FMVJ18X=m +CONFIG_PCMCIA_PCNET=m +CONFIG_PCMCIA_NMCLAN=m +CONFIG_PCMCIA_SMC91C92=m +CONFIG_PCMCIA_XIRC2PS=m +CONFIG_PCMCIA_AXNET=m +# CONFIG_WAN is not set +CONFIG_ATM_DRIVERS=y +# CONFIG_ATM_DUMMY is not set +CONFIG_ATM_TCP=m +CONFIG_ATM_LANAI=m +CONFIG_ATM_ENI=m +# CONFIG_ATM_ENI_DEBUG is not set +# CONFIG_ATM_ENI_TUNE_BURST is not set +CONFIG_ATM_FIRESTREAM=m +CONFIG_ATM_ZATM=m +# CONFIG_ATM_ZATM_DEBUG is not set +CONFIG_ATM_NICSTAR=m +# CONFIG_ATM_NICSTAR_USE_SUNI is not set +# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set +CONFIG_ATM_IDT77252=m +# CONFIG_ATM_IDT77252_DEBUG is not set +# CONFIG_ATM_IDT77252_RCV_ALL is not set +CONFIG_ATM_IDT77252_USE_SUNI=y +CONFIG_ATM_AMBASSADOR=m +# CONFIG_ATM_AMBASSADOR_DEBUG is not set +CONFIG_ATM_HORIZON=m +# CONFIG_ATM_HORIZON_DEBUG is not set +CONFIG_ATM_IA=m +# CONFIG_ATM_IA_DEBUG is not set +CONFIG_ATM_FORE200E=m +# CONFIG_ATM_FORE200E_USE_TASKLET is not set +CONFIG_ATM_FORE200E_TX_RETRY=16 +CONFIG_ATM_FORE200E_DEBUG=0 +CONFIG_ATM_HE=m +# CONFIG_ATM_HE_USE_SUNI is not set +CONFIG_ATM_SOLOS=m +CONFIG_IEEE802154_DRIVERS=m +CONFIG_IEEE802154_FAKEHARD=m +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PLIP=m +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +CONFIG_PPPOATM=m +CONFIG_PPPOL2TP=m +CONFIG_SLIP=m +# CONFIG_SLIP_COMPRESSED is not set +CONFIG_SLHC=m +# CONFIG_SLIP_SMART is not set +# CONFIG_SLIP_MODE_SLIP6 is not set +# CONFIG_NET_FC is not set +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +CONFIG_VIRTIO_NET=m +CONFIG_ISDN=y +CONFIG_MISDN=m +CONFIG_MISDN_DSP=m +CONFIG_MISDN_L1OIP=m + +# +# mISDN hardware drivers +# +CONFIG_MISDN_HFCPCI=m +CONFIG_MISDN_HFCMULTI=m +CONFIG_MISDN_HFCUSB=m +CONFIG_ISDN_I4L=m +CONFIG_ISDN_PPP=y +CONFIG_ISDN_PPP_VJ=y +CONFIG_ISDN_MPP=y +CONFIG_IPPP_FILTER=y +CONFIG_ISDN_PPP_BSDCOMP=m +CONFIG_ISDN_AUDIO=y +CONFIG_ISDN_TTY_FAX=y + +# +# ISDN feature submodules +# +CONFIG_ISDN_DIVERSION=m + +# +# ISDN4Linux hardware drivers +# + +# +# Passive cards +# +CONFIG_ISDN_DRV_HISAX=m + +# +# D-channel protocol features +# +CONFIG_HISAX_EURO=y +CONFIG_DE_AOC=y +# CONFIG_HISAX_NO_SENDCOMPLETE is not set +# CONFIG_HISAX_NO_LLC is not set +# CONFIG_HISAX_NO_KEYPAD is not set +CONFIG_HISAX_1TR6=y +CONFIG_HISAX_NI1=y +CONFIG_HISAX_MAX_CARDS=8 + +# +# HiSax supported cards +# +CONFIG_HISAX_16_0=y +CONFIG_HISAX_16_3=y +CONFIG_HISAX_TELESPCI=y +CONFIG_HISAX_S0BOX=y +CONFIG_HISAX_AVM_A1=y +CONFIG_HISAX_FRITZPCI=y +CONFIG_HISAX_AVM_A1_PCMCIA=y +CONFIG_HISAX_ELSA=y +CONFIG_HISAX_IX1MICROR2=y +CONFIG_HISAX_DIEHLDIVA=y +CONFIG_HISAX_ASUSCOM=y +CONFIG_HISAX_TELEINT=y +CONFIG_HISAX_HFCS=y +CONFIG_HISAX_SEDLBAUER=y +CONFIG_HISAX_SPORTSTER=y +CONFIG_HISAX_MIC=y +CONFIG_HISAX_NETJET=y +CONFIG_HISAX_NETJET_U=y +CONFIG_HISAX_NICCY=y +CONFIG_HISAX_ISURF=y +CONFIG_HISAX_HSTSAPHIR=y +CONFIG_HISAX_BKM_A4T=y +CONFIG_HISAX_SCT_QUADRO=y +CONFIG_HISAX_GAZEL=y +CONFIG_HISAX_HFC_PCI=y +CONFIG_HISAX_W6692=y +CONFIG_HISAX_HFC_SX=y +CONFIG_HISAX_ENTERNOW_PCI=y +# CONFIG_HISAX_DEBUG is not set + +# +# HiSax PCMCIA card service modules +# +CONFIG_HISAX_SEDLBAUER_CS=m +CONFIG_HISAX_ELSA_CS=m +CONFIG_HISAX_AVM_A1_CS=m +CONFIG_HISAX_TELES_CS=m + +# +# HiSax sub driver modules +# +CONFIG_HISAX_ST5481=m +CONFIG_HISAX_HFCUSB=m +CONFIG_HISAX_HFC4S8S=m +CONFIG_HISAX_FRITZ_PCIPNP=m +CONFIG_HISAX_HDLC=y + +# +# Active cards +# +CONFIG_ISDN_DRV_ICN=m +CONFIG_ISDN_DRV_PCBIT=m +CONFIG_ISDN_DRV_SC=m +CONFIG_ISDN_DRV_ACT2000=m +CONFIG_HYSDN=m +CONFIG_HYSDN_CAPI=y +CONFIG_ISDN_CAPI=m +CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y +CONFIG_CAPI_TRACE=y +CONFIG_ISDN_CAPI_MIDDLEWARE=y +CONFIG_ISDN_CAPI_CAPI20=m +CONFIG_ISDN_CAPI_CAPIFS_BOOL=y +CONFIG_ISDN_CAPI_CAPIFS=m +CONFIG_ISDN_CAPI_CAPIDRV=m + +# +# CAPI hardware drivers +# +CONFIG_CAPI_AVM=y +CONFIG_ISDN_DRV_AVMB1_B1ISA=m +CONFIG_ISDN_DRV_AVMB1_B1PCI=m +CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y +CONFIG_ISDN_DRV_AVMB1_T1ISA=m +CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m +CONFIG_ISDN_DRV_AVMB1_AVM_CS=m +CONFIG_ISDN_DRV_AVMB1_T1PCI=m +CONFIG_ISDN_DRV_AVMB1_C4=m +CONFIG_CAPI_EICON=y +CONFIG_ISDN_DIVAS=m +CONFIG_ISDN_DIVAS_BRIPCI=y +CONFIG_ISDN_DIVAS_PRIPCI=y +CONFIG_ISDN_DIVAS_DIVACAPI=m +CONFIG_ISDN_DIVAS_USERIDI=m +CONFIG_ISDN_DIVAS_MAINT=m +CONFIG_ISDN_DRV_GIGASET=m +CONFIG_GIGASET_BASE=m +CONFIG_GIGASET_M105=m +CONFIG_GIGASET_M101=m +# CONFIG_GIGASET_DEBUG is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=m +CONFIG_INPUT_POLLDEV=m + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +CONFIG_MOUSE_PS2_ELANTECH=y +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +CONFIG_MOUSE_PS2_OLPC=y +CONFIG_MOUSE_SERIAL=y +CONFIG_MOUSE_APPLETOUCH=m +CONFIG_MOUSE_BCM5974=m +CONFIG_MOUSE_INPORT=m +# CONFIG_MOUSE_ATIXL is not set +CONFIG_MOUSE_LOGIBM=m +CONFIG_MOUSE_PC110PAD=m +CONFIG_MOUSE_VSXXXAA=m +CONFIG_MOUSE_SYNAPTICS_I2C=m +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_ANALOG=m +CONFIG_JOYSTICK_A3D=m +CONFIG_JOYSTICK_ADI=m +CONFIG_JOYSTICK_COBRA=m +CONFIG_JOYSTICK_GF2K=m +CONFIG_JOYSTICK_GRIP=m +CONFIG_JOYSTICK_GRIP_MP=m +CONFIG_JOYSTICK_GUILLEMOT=m +CONFIG_JOYSTICK_INTERACT=m +CONFIG_JOYSTICK_SIDEWINDER=m +CONFIG_JOYSTICK_TMDC=m +CONFIG_JOYSTICK_IFORCE=m +CONFIG_JOYSTICK_IFORCE_USB=y +CONFIG_JOYSTICK_IFORCE_232=y +CONFIG_JOYSTICK_WARRIOR=m +CONFIG_JOYSTICK_MAGELLAN=m +CONFIG_JOYSTICK_SPACEORB=m +CONFIG_JOYSTICK_SPACEBALL=m +CONFIG_JOYSTICK_STINGER=m +CONFIG_JOYSTICK_TWIDJOY=m +CONFIG_JOYSTICK_ZHENHUA=m +CONFIG_JOYSTICK_DB9=m +CONFIG_JOYSTICK_GAMECON=m +CONFIG_JOYSTICK_TURBOGRAFX=m +CONFIG_JOYSTICK_JOYDUMP=m +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_JOYSTICK_WALKERA0701=m +CONFIG_INPUT_TABLET=y +CONFIG_TABLET_USB_ACECAD=m +CONFIG_TABLET_USB_AIPTEK=m +CONFIG_TABLET_USB_GTCO=m +CONFIG_TABLET_USB_KBTAB=m +CONFIG_TABLET_USB_WACOM=m +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_AD7877=m +CONFIG_TOUCHSCREEN_AD7879_I2C=m +CONFIG_TOUCHSCREEN_AD7879=m +CONFIG_TOUCHSCREEN_EETI=m +CONFIG_TOUCHSCREEN_FUJITSU=m +CONFIG_TOUCHSCREEN_GUNZE=m +CONFIG_TOUCHSCREEN_ELO=m +CONFIG_TOUCHSCREEN_WACOM_W8001=m +CONFIG_TOUCHSCREEN_MTOUCH=m +CONFIG_TOUCHSCREEN_INEXIO=m +CONFIG_TOUCHSCREEN_MK712=m +CONFIG_TOUCHSCREEN_HTCPEN=m +CONFIG_TOUCHSCREEN_PENMOUNT=m +CONFIG_TOUCHSCREEN_TOUCHRIGHT=m +CONFIG_TOUCHSCREEN_TOUCHWIN=m +CONFIG_TOUCHSCREEN_WM97XX=m +# CONFIG_TOUCHSCREEN_WM9705 is not set +# CONFIG_TOUCHSCREEN_WM9712 is not set +# CONFIG_TOUCHSCREEN_WM9713 is not set +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_USB_EGALAX=y +CONFIG_TOUCHSCREEN_USB_PANJIT=y +CONFIG_TOUCHSCREEN_USB_3M=y +CONFIG_TOUCHSCREEN_USB_ITM=y +CONFIG_TOUCHSCREEN_USB_ETURBO=y +CONFIG_TOUCHSCREEN_USB_GUNZE=y +CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y +CONFIG_TOUCHSCREEN_USB_IRTOUCH=y +CONFIG_TOUCHSCREEN_USB_IDEALTEK=y +CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y +CONFIG_TOUCHSCREEN_USB_GOTOP=y +CONFIG_TOUCHSCREEN_TOUCHIT213=m +CONFIG_TOUCHSCREEN_TSC2007=m +CONFIG_TOUCHSCREEN_W90X900=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_PCSPKR=m +CONFIG_INPUT_APANEL=m +CONFIG_INPUT_WISTRON_BTNS=m +CONFIG_INPUT_ATLAS_BTNS=m +CONFIG_INPUT_ATI_REMOTE=m +CONFIG_INPUT_ATI_REMOTE2=m +CONFIG_INPUT_KEYSPAN_REMOTE=m +CONFIG_INPUT_POWERMATE=m +CONFIG_INPUT_YEALINK=m +CONFIG_INPUT_CM109=m +CONFIG_INPUT_UINPUT=m +CONFIG_INPUT_PCF50633_PMU=m + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +CONFIG_SERIO_SERPORT=m +CONFIG_SERIO_CT82C710=m +CONFIG_SERIO_PARKBD=m +CONFIG_SERIO_PCIPS2=m +CONFIG_SERIO_LIBPS2=y +CONFIG_SERIO_RAW=m +CONFIG_GAMEPORT=m +CONFIG_GAMEPORT_NS558=m +CONFIG_GAMEPORT_L4=m +CONFIG_GAMEPORT_EMU10K1=m +CONFIG_GAMEPORT_FM801=m + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_DEVKMEM=y +CONFIG_SERIAL_NONSTANDARD=y +# CONFIG_COMPUTONE is not set +CONFIG_ROCKETPORT=m +CONFIG_CYCLADES=m +# CONFIG_CYZ_INTR is not set +# CONFIG_DIGIEPCA is not set +# CONFIG_MOXA_INTELLIO is not set +# CONFIG_MOXA_SMARTIO is not set +# CONFIG_ISI is not set +CONFIG_SYNCLINK=m +CONFIG_SYNCLINKMP=m +# CONFIG_SYNCLINK_GT is not set +CONFIG_N_HDLC=m +# CONFIG_RISCOM8 is not set +# CONFIG_SPECIALIX is not set +# CONFIG_STALDRV is not set +CONFIG_NOZOMI=m + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_PNP=y +CONFIG_SERIAL_8250_CS=m +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_MAX3100=m +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_JSM=m +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +CONFIG_PRINTER=m +# CONFIG_LP_CONSOLE is not set +CONFIG_PPDEV=m +CONFIG_HVC_DRIVER=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_IPMI_HANDLER=m +# CONFIG_IPMI_PANIC_EVENT is not set +CONFIG_IPMI_DEVICE_INTERFACE=m +CONFIG_IPMI_SI=m +CONFIG_IPMI_WATCHDOG=m +CONFIG_IPMI_POWEROFF=m +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_TIMERIOMEM=m +CONFIG_HW_RANDOM_INTEL=m +CONFIG_HW_RANDOM_AMD=m +CONFIG_HW_RANDOM_GEODE=m +CONFIG_HW_RANDOM_VIA=m +CONFIG_HW_RANDOM_VIRTIO=m +CONFIG_NVRAM=m +CONFIG_DTLK=m +CONFIG_R3964=m +CONFIG_APPLICOM=m +CONFIG_SONYPI=m + +# +# PCMCIA character devices +# +CONFIG_SYNCLINK_CS=m +CONFIG_CARDMAN_4000=m +CONFIG_CARDMAN_4040=m +CONFIG_IPWIRELESS=m +CONFIG_MWAVE=m +CONFIG_PC8736x_GPIO=m +CONFIG_NSC_GPIO=m +CONFIG_CS5535_GPIO=m +# CONFIG_RAW_DRIVER is not set +# CONFIG_HPET is not set +CONFIG_HANGCHECK_TIMER=m +CONFIG_TCG_TPM=m +CONFIG_TCG_TIS=m +CONFIG_TCG_NSC=m +CONFIG_TCG_ATMEL=m +CONFIG_TCG_INFINEON=m +CONFIG_TELCLOCK=m +CONFIG_DEVPORT=y +CONFIG_I2C=m +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=m +CONFIG_I2C_ALGOPCA=m + +# +# I2C Hardware Bus support +# + +# +# PC SMBus host controller drivers +# +CONFIG_I2C_ALI1535=m +CONFIG_I2C_ALI1563=m +CONFIG_I2C_ALI15X3=m +CONFIG_I2C_AMD756=m +CONFIG_I2C_AMD756_S4882=m +CONFIG_I2C_AMD8111=m +CONFIG_I2C_I801=m +CONFIG_I2C_ISCH=m +CONFIG_I2C_PIIX4=m +CONFIG_I2C_NFORCE2=m +CONFIG_I2C_NFORCE2_S4985=m +CONFIG_I2C_SIS5595=m +CONFIG_I2C_SIS630=m +CONFIG_I2C_SIS96X=m +CONFIG_I2C_VIA=m +CONFIG_I2C_VIAPRO=m + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +CONFIG_I2C_OCORES=m +CONFIG_I2C_SIMTEC=m + +# +# External I2C/SMBus adapter drivers +# +CONFIG_I2C_PARPORT=m +CONFIG_I2C_PARPORT_LIGHT=m +CONFIG_I2C_TAOS_EVM=m +CONFIG_I2C_TINY_USB=m + +# +# Graphics adapter I2C/DDC channel drivers +# +CONFIG_I2C_VOODOO3=m + +# +# Other I2C/SMBus bus drivers +# +CONFIG_I2C_PCA_ISA=m +CONFIG_I2C_PCA_PLATFORM=m +# CONFIG_I2C_STUB is not set +CONFIG_SCx200_ACB=m + +# +# Miscellaneous I2C Chip support +# +CONFIG_DS1682=m +CONFIG_SENSORS_PCF8574=m +CONFIG_PCF8575=m +CONFIG_SENSORS_PCA9539=m +CONFIG_SENSORS_TSL2550=m +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +CONFIG_SPI_BITBANG=m +CONFIG_SPI_BUTTERFLY=m +CONFIG_SPI_LM70_LLP=m + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=m +CONFIG_SPI_TLE62X0=m + +# +# PPS support +# +CONFIG_PPS=m +# CONFIG_PPS_DEBUG is not set +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +# CONFIG_GPIOLIB is not set +CONFIG_W1=m +CONFIG_W1_CON=y + +# +# 1-wire Bus Masters +# +CONFIG_W1_MASTER_MATROX=m +CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS2482=m + +# +# 1-wire Slaves +# +CONFIG_W1_SLAVE_THERM=m +CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2431=m +CONFIG_W1_SLAVE_DS2433=m +# CONFIG_W1_SLAVE_DS2433_CRC is not set +CONFIG_W1_SLAVE_DS2760=m +CONFIG_W1_SLAVE_BQ27000=m +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +CONFIG_PDA_POWER=m +CONFIG_WM8350_POWER=m +CONFIG_BATTERY_DS2760=m +CONFIG_BATTERY_DS2782=m +CONFIG_BATTERY_OLPC=m +CONFIG_BATTERY_BQ27x00=m +CONFIG_BATTERY_MAX17040=m +CONFIG_CHARGER_PCF50633=m +CONFIG_HWMON=y +CONFIG_HWMON_VID=m +CONFIG_SENSORS_ABITUGURU=m +CONFIG_SENSORS_ABITUGURU3=m +CONFIG_SENSORS_AD7414=m +CONFIG_SENSORS_AD7418=m +CONFIG_SENSORS_ADCXX=m +CONFIG_SENSORS_ADM1021=m +CONFIG_SENSORS_ADM1025=m +CONFIG_SENSORS_ADM1026=m +CONFIG_SENSORS_ADM1029=m +CONFIG_SENSORS_ADM1031=m +CONFIG_SENSORS_ADM9240=m +CONFIG_SENSORS_ADT7462=m +CONFIG_SENSORS_ADT7470=m +CONFIG_SENSORS_ADT7473=m +CONFIG_SENSORS_ADT7475=m +CONFIG_SENSORS_K8TEMP=m +CONFIG_SENSORS_ASB100=m +CONFIG_SENSORS_ATK0110=m +CONFIG_SENSORS_ATXP1=m +CONFIG_SENSORS_DS1621=m +CONFIG_SENSORS_I5K_AMB=m +CONFIG_SENSORS_F71805F=m +CONFIG_SENSORS_F71882FG=m +CONFIG_SENSORS_F75375S=m +CONFIG_SENSORS_FSCHER=m +CONFIG_SENSORS_FSCPOS=m +CONFIG_SENSORS_FSCHMD=m +CONFIG_SENSORS_G760A=m +CONFIG_SENSORS_GL518SM=m +CONFIG_SENSORS_GL520SM=m +CONFIG_SENSORS_CORETEMP=m +CONFIG_SENSORS_IBMAEM=m +CONFIG_SENSORS_IBMPEX=m +CONFIG_SENSORS_IT87=m +CONFIG_SENSORS_LM63=m +CONFIG_SENSORS_LM70=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_LM77=m +CONFIG_SENSORS_LM78=m +CONFIG_SENSORS_LM80=m +CONFIG_SENSORS_LM83=m +CONFIG_SENSORS_LM85=m +CONFIG_SENSORS_LM87=m +CONFIG_SENSORS_LM90=m +CONFIG_SENSORS_LM92=m +CONFIG_SENSORS_LM93=m +CONFIG_SENSORS_LTC4215=m +CONFIG_SENSORS_LTC4245=m +CONFIG_SENSORS_LM95241=m +CONFIG_SENSORS_MAX1111=m +CONFIG_SENSORS_MAX1619=m +CONFIG_SENSORS_MAX6650=m +CONFIG_SENSORS_PC87360=m +CONFIG_SENSORS_PC87427=m +CONFIG_SENSORS_PCF8591=m +CONFIG_SENSORS_SIS5595=m +CONFIG_SENSORS_DME1737=m +CONFIG_SENSORS_SMSC47M1=m +CONFIG_SENSORS_SMSC47M192=m +CONFIG_SENSORS_SMSC47B397=m +CONFIG_SENSORS_ADS7828=m +CONFIG_SENSORS_THMC50=m +CONFIG_SENSORS_TMP401=m +CONFIG_SENSORS_VIA686A=m +CONFIG_SENSORS_VT1211=m +CONFIG_SENSORS_VT8231=m +CONFIG_SENSORS_W83781D=m +CONFIG_SENSORS_W83791D=m +CONFIG_SENSORS_W83792D=m +CONFIG_SENSORS_W83793=m +CONFIG_SENSORS_W83L785TS=m +CONFIG_SENSORS_W83L786NG=m +CONFIG_SENSORS_W83627HF=m +CONFIG_SENSORS_W83627EHF=m +CONFIG_SENSORS_HDAPS=m +CONFIG_SENSORS_LIS3LV02D=m +CONFIG_SENSORS_APPLESMC=m +# CONFIG_HWMON_DEBUG_CHIP is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +CONFIG_SOFT_WATCHDOG=m +CONFIG_WM8350_WATCHDOG=m +CONFIG_ACQUIRE_WDT=m +CONFIG_ADVANTECH_WDT=m +CONFIG_ALIM1535_WDT=m +CONFIG_ALIM7101_WDT=m +CONFIG_SC520_WDT=m +CONFIG_EUROTECH_WDT=m +CONFIG_IB700_WDT=m +CONFIG_IBMASR=m +CONFIG_WAFER_WDT=m +CONFIG_I6300ESB_WDT=m +CONFIG_ITCO_WDT=m +CONFIG_ITCO_VENDOR_SUPPORT=y +CONFIG_IT8712F_WDT=m +CONFIG_IT87_WDT=m +CONFIG_HP_WATCHDOG=m +CONFIG_SC1200_WDT=m +CONFIG_PC87413_WDT=m +CONFIG_60XX_WDT=m +CONFIG_SBC8360_WDT=m +CONFIG_SBC7240_WDT=m +CONFIG_CPU5_WDT=m +CONFIG_SMSC_SCH311X_WDT=m +CONFIG_SMSC37B787_WDT=m +CONFIG_W83627HF_WDT=m +CONFIG_W83697HF_WDT=m +CONFIG_W83697UG_WDT=m +CONFIG_W83877F_WDT=m +CONFIG_W83977F_WDT=m +CONFIG_MACHZ_WDT=m +CONFIG_SBC_EPX_C3_WATCHDOG=m + +# +# ISA-based Watchdog Cards +# +CONFIG_PCWATCHDOG=m +CONFIG_MIXCOMWD=m +CONFIG_WDT=m + +# +# PCI-based Watchdog Cards +# +CONFIG_PCIPCWATCHDOG=m +CONFIG_WDTPCI=m + +# +# USB-based Watchdog Cards +# +CONFIG_USBPCWATCHDOG=m +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_SPROM=y +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +CONFIG_SSB_B43_PCI_BRIDGE=y +CONFIG_SSB_PCMCIAHOST_POSSIBLE=y +CONFIG_SSB_PCMCIAHOST=y +# CONFIG_SSB_DEBUG is not set +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +CONFIG_SSB_DRIVER_PCICORE=y + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=m +CONFIG_MFD_SM501=m +# CONFIG_HTC_PASIC3 is not set +# CONFIG_MFD_TMIO is not set +CONFIG_MFD_WM8400=m +CONFIG_MFD_WM8350=m +CONFIG_MFD_WM8350_I2C=m +CONFIG_MFD_PCF50633=m +CONFIG_PCF50633_ADC=m +CONFIG_PCF50633_GPIO=m +CONFIG_AB3100_CORE=m +# CONFIG_EZX_PCAP is not set +# CONFIG_REGULATOR is not set +CONFIG_MEDIA_SUPPORT=m + +# +# Multimedia core support +# +CONFIG_VIDEO_DEV=m +CONFIG_VIDEO_V4L2_COMMON=m +CONFIG_VIDEO_ALLOW_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m + +# +# Multimedia drivers +# +CONFIG_VIDEO_SAA7146=m +CONFIG_VIDEO_SAA7146_VV=m +# CONFIG_MEDIA_ATTACH is not set +CONFIG_MEDIA_TUNER=m +# CONFIG_MEDIA_TUNER_CUSTOMISE is not set +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA827X=m +CONFIG_MEDIA_TUNER_TDA18271=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_MT2131=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=m +CONFIG_VIDEO_V4L2=m +CONFIG_VIDEO_V4L1=m +CONFIG_VIDEOBUF_GEN=m +CONFIG_VIDEOBUF_DMA_SG=m +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DVB=m +CONFIG_VIDEO_BTCX=m +CONFIG_VIDEO_IR=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set +CONFIG_VIDEO_IR_I2C=m + +# +# Encoders/decoders and other helper chips +# + +# +# Audio decoders +# +CONFIG_VIDEO_TVAUDIO=m +CONFIG_VIDEO_TDA7432=m +CONFIG_VIDEO_TDA9840=m +CONFIG_VIDEO_TDA9875=m +CONFIG_VIDEO_TEA6415C=m +CONFIG_VIDEO_TEA6420=m +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS5345=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_M52790=m +CONFIG_VIDEO_TLV320AIC23B=m +CONFIG_VIDEO_WM8775=m +CONFIG_VIDEO_WM8739=m +CONFIG_VIDEO_VP27SMPX=m + +# +# RDS decoders +# +CONFIG_VIDEO_SAA6588=m + +# +# Video decoders +# +CONFIG_VIDEO_BT819=m +CONFIG_VIDEO_BT856=m +CONFIG_VIDEO_BT866=m +CONFIG_VIDEO_KS0127=m +CONFIG_VIDEO_OV7670=m +CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_TCM825X=m +CONFIG_VIDEO_SAA7110=m +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_SAA717X=m +CONFIG_VIDEO_SAA7191=m +CONFIG_VIDEO_TVP514X=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_VPX3220=m + +# +# Video and audio decoders +# +CONFIG_VIDEO_CX25840=m + +# +# MPEG video encoders +# +CONFIG_VIDEO_CX2341X=m + +# +# Video encoders +# +CONFIG_VIDEO_SAA7127=m +CONFIG_VIDEO_SAA7185=m +CONFIG_VIDEO_ADV7170=m +CONFIG_VIDEO_ADV7175=m +CONFIG_VIDEO_THS7303=m +CONFIG_VIDEO_ADV7343=m + +# +# Video improvement chips +# +CONFIG_VIDEO_UPD64031A=m +CONFIG_VIDEO_UPD64083=m +CONFIG_VIDEO_VIVI=m +CONFIG_VIDEO_BT848=m +CONFIG_VIDEO_BT848_DVB=y +CONFIG_VIDEO_PMS=m +CONFIG_VIDEO_BWQCAM=m +CONFIG_VIDEO_CQCAM=m +CONFIG_VIDEO_W9966=m +CONFIG_VIDEO_CPIA=m +CONFIG_VIDEO_CPIA_PP=m +CONFIG_VIDEO_CPIA_USB=m +CONFIG_VIDEO_CPIA2=m +CONFIG_VIDEO_SAA5246A=m +CONFIG_VIDEO_SAA5249=m +CONFIG_VIDEO_STRADIS=m +CONFIG_VIDEO_ZORAN=m +CONFIG_VIDEO_ZORAN_DC30=m +CONFIG_VIDEO_ZORAN_ZR36060=m +CONFIG_VIDEO_ZORAN_BUZ=m +CONFIG_VIDEO_ZORAN_DC10=m +CONFIG_VIDEO_ZORAN_LML33=m +CONFIG_VIDEO_ZORAN_LML33R10=m +CONFIG_VIDEO_ZORAN_AVS6EYES=m +CONFIG_VIDEO_MEYE=m +CONFIG_VIDEO_SAA7134=m +CONFIG_VIDEO_SAA7134_ALSA=m +CONFIG_VIDEO_SAA7134_DVB=m +CONFIG_VIDEO_MXB=m +CONFIG_VIDEO_HEXIUM_ORION=m +CONFIG_VIDEO_HEXIUM_GEMINI=m +CONFIG_VIDEO_CX88=m +CONFIG_VIDEO_CX88_ALSA=m +CONFIG_VIDEO_CX88_BLACKBIRD=m +CONFIG_VIDEO_CX88_DVB=m +CONFIG_VIDEO_CX88_MPEG=m +CONFIG_VIDEO_CX88_VP3054=m +CONFIG_VIDEO_CX23885=m +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_IVTV=m +CONFIG_VIDEO_FB_IVTV=m +CONFIG_VIDEO_CX18=m +CONFIG_VIDEO_CAFE_CCIC=m +CONFIG_SOC_CAMERA=m +CONFIG_SOC_CAMERA_MT9M001=m +CONFIG_SOC_CAMERA_MT9M111=m +CONFIG_SOC_CAMERA_MT9T031=m +CONFIG_SOC_CAMERA_MT9V022=m +CONFIG_SOC_CAMERA_TW9910=m +CONFIG_SOC_CAMERA_PLATFORM=m +CONFIG_SOC_CAMERA_OV772X=m +CONFIG_V4L_USB_DRIVERS=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SN9C20X_EVDEV=y +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_USBVIDEO=m +CONFIG_USB_VICAM=m +CONFIG_USB_IBMCAM=m +CONFIG_USB_KONICAWC=m +CONFIG_USB_QUICKCAM_MESSENGER=m +CONFIG_USB_ET61X251=m +CONFIG_VIDEO_OVCAMCHIP=m +CONFIG_USB_W9968CF=m +CONFIG_USB_OV511=m +CONFIG_USB_SE401=m +CONFIG_USB_SN9C102=m +CONFIG_USB_STV680=m +CONFIG_USB_ZC0301=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_RADIO_ADAPTERS=y +CONFIG_RADIO_CADET=m +CONFIG_RADIO_RTRACK=m +CONFIG_RADIO_RTRACK2=m +CONFIG_RADIO_AZTECH=m +CONFIG_RADIO_GEMTEK=m +CONFIG_RADIO_GEMTEK_PCI=m +CONFIG_RADIO_MAXIRADIO=m +CONFIG_RADIO_MAESTRO=m +CONFIG_RADIO_SF16FMI=m +CONFIG_RADIO_SF16FMR2=m +CONFIG_RADIO_TERRATEC=m +CONFIG_RADIO_TRUST=m +CONFIG_RADIO_TYPHOON=m +# CONFIG_RADIO_TYPHOON_PROC_FS is not set +CONFIG_RADIO_ZOLTRIX=m +CONFIG_USB_DSBR=m +CONFIG_USB_SI470X=m +CONFIG_USB_MR800=m +CONFIG_RADIO_TEA5764=m +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y + +# +# Supported SAA7146 based PCI Adapters +# +CONFIG_TTPCI_EEPROM=m +CONFIG_DVB_AV7110=m +CONFIG_DVB_AV7110_OSD=y +CONFIG_DVB_BUDGET_CORE=m +CONFIG_DVB_BUDGET=m +CONFIG_DVB_BUDGET_CI=m +CONFIG_DVB_BUDGET_AV=m +CONFIG_DVB_BUDGET_PATCH=m + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_TTUSB_BUDGET=m +CONFIG_DVB_TTUSB_DEC=m +CONFIG_SMS_SIANO_MDTV=m + +# +# Siano module components +# +CONFIG_SMS_USB_DRV=m +CONFIG_SMS_SDIO_DRV=m + +# +# Supported FlexCopII (B2C2) Adapters +# +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_DVB_B2C2_FLEXCOP_PCI=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set + +# +# Supported BT878 Adapters +# +CONFIG_DVB_BT8XX=m + +# +# Supported Pluto2 Adapters +# +CONFIG_DVB_PLUTO2=m + +# +# Supported SDMC DM1105 Adapters +# +CONFIG_DVB_DM1105=m + +# +# Supported FireWire (IEEE 1394) Adapters +# +CONFIG_DVB_FIREDTV=m +CONFIG_DVB_FIREDTV_IEEE1394=y +CONFIG_DVB_FIREDTV_INPUT=y + +# +# Supported DVB Frontends +# +# CONFIG_DVB_FE_CUSTOMISE is not set +CONFIG_DVB_STB0899=m +CONFIG_DVB_STB6100=m +CONFIG_DVB_CX24110=m +CONFIG_DVB_CX24123=m +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10036=m +CONFIG_DVB_S5H1420=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_TDA8083=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TDA8261=m +CONFIG_DVB_VES1X93=m +CONFIG_DVB_TUNER_ITD1000=m +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TDA826X=m +CONFIG_DVB_TUA6100=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_SP8870=m +CONFIG_DVB_SP887X=m +CONFIG_DVB_CX22700=m +CONFIG_DVB_CX22702=m +CONFIG_DVB_L64781=m +CONFIG_DVB_TDA1004X=m +CONFIG_DVB_NXT6000=m +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_AF9013=m +CONFIG_DVB_VES1820=m +CONFIG_DVB_TDA10021=m +CONFIG_DVB_TDA10023=m +CONFIG_DVB_STV0297=m +CONFIG_DVB_NXT200X=m +CONFIG_DVB_OR51211=m +CONFIG_DVB_OR51132=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_S5H1409=m +CONFIG_DVB_AU8522=m +CONFIG_DVB_S5H1411=m +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_LNBP21=m +CONFIG_DVB_ISL6405=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_LGS8GL5=m +CONFIG_DAB=y +CONFIG_USB_DABUSB=m + +# +# Graphics support +# +CONFIG_AGP=m +CONFIG_AGP_ALI=m +CONFIG_AGP_ATI=m +CONFIG_AGP_AMD=m +CONFIG_AGP_AMD64=m +CONFIG_AGP_INTEL=m +CONFIG_AGP_NVIDIA=m +CONFIG_AGP_SIS=m +CONFIG_AGP_SWORKS=m +CONFIG_AGP_VIA=m +CONFIG_AGP_EFFICEON=m +CONFIG_DRM=m +CONFIG_DRM_TTM=m +CONFIG_DRM_TDFX=m +CONFIG_DRM_R128=m +CONFIG_DRM_RADEON=m +CONFIG_DRM_I810=m +CONFIG_DRM_I830=m +CONFIG_DRM_I915=m +# CONFIG_DRM_I915_KMS is not set +CONFIG_DRM_MGA=m +CONFIG_DRM_SIS=m +CONFIG_DRM_VIA=m +CONFIG_DRM_SAVAGE=m +CONFIG_VGASTATE=m +CONFIG_VIDEO_OUTPUT_CONTROL=m +CONFIG_FB=y +CONFIG_FIRMWARE_EDID=y +CONFIG_FB_DDC=m +CONFIG_FB_BOOT_VESA_SUPPORT=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +CONFIG_FB_SYS_FILLRECT=m +CONFIG_FB_SYS_COPYAREA=m +CONFIG_FB_SYS_IMAGEBLIT=m +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=m +CONFIG_FB_SVGALIB=m +# CONFIG_FB_MACMODES is not set +CONFIG_FB_BACKLIGHT=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y + +# +# Frame buffer hardware drivers +# +CONFIG_FB_CIRRUS=m +CONFIG_FB_PM2=m +CONFIG_FB_PM2_FIFO_DISCONNECT=y +CONFIG_FB_CYBER2000=m +# CONFIG_FB_ARC is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_VGA16 is not set +CONFIG_FB_UVESA=m +CONFIG_FB_VESA=y +CONFIG_FB_EFI=y +# CONFIG_FB_N411 is not set +# CONFIG_FB_HGA is not set +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_NVIDIA=m +CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA_DEBUG is not set +CONFIG_FB_NVIDIA_BACKLIGHT=y +CONFIG_FB_RIVA=m +CONFIG_FB_RIVA_I2C=y +# CONFIG_FB_RIVA_DEBUG is not set +CONFIG_FB_RIVA_BACKLIGHT=y +CONFIG_FB_I810=m +# CONFIG_FB_I810_GTF is not set +CONFIG_FB_LE80578=m +CONFIG_FB_CARILLO_RANCH=m +# CONFIG_FB_MATROX is not set +CONFIG_FB_RADEON=m +CONFIG_FB_RADEON_I2C=y +CONFIG_FB_RADEON_BACKLIGHT=y +# CONFIG_FB_RADEON_DEBUG is not set +CONFIG_FB_ATY128=m +CONFIG_FB_ATY128_BACKLIGHT=y +CONFIG_FB_ATY=m +CONFIG_FB_ATY_CT=y +CONFIG_FB_ATY_GENERIC_LCD=y +CONFIG_FB_ATY_GX=y +CONFIG_FB_ATY_BACKLIGHT=y +CONFIG_FB_S3=m +CONFIG_FB_SAVAGE=m +CONFIG_FB_SAVAGE_I2C=y +CONFIG_FB_SAVAGE_ACCEL=y +CONFIG_FB_SIS=m +CONFIG_FB_SIS_300=y +CONFIG_FB_SIS_315=y +CONFIG_FB_VIA=m +CONFIG_FB_NEOMAGIC=m +CONFIG_FB_KYRO=m +CONFIG_FB_3DFX=m +CONFIG_FB_3DFX_ACCEL=y +CONFIG_FB_3DFX_I2C=y +CONFIG_FB_VOODOO1=m +CONFIG_FB_VT8623=m +CONFIG_FB_TRIDENT=m +# CONFIG_FB_ARK is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_CARMINE is not set +# CONFIG_FB_GEODE is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_SM501 is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_LCD_LTV350QV=m +CONFIG_LCD_ILI9320=m +CONFIG_LCD_TDO24M=m +CONFIG_LCD_VGG2432A4=m +CONFIG_LCD_PLATFORM=m +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_GENERIC=m +CONFIG_BACKLIGHT_PROGEAR=m +CONFIG_BACKLIGHT_CARILLO_RANCH=m +CONFIG_BACKLIGHT_MBP_NVIDIA=m +CONFIG_BACKLIGHT_SAHARA=m + +# +# Display device support +# +CONFIG_DISPLAY_SUPPORT=m + +# +# Display hardware drivers +# + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +# CONFIG_VGACON_SOFT_SCROLLBACK is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_SOUND=m +CONFIG_SOUND_OSS_CORE=y +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +CONFIG_SND_SEQ_DUMMY=m +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +CONFIG_SND_RAWMIDI_SEQ=m +CONFIG_SND_OPL3_LIB_SEQ=m +CONFIG_SND_OPL4_LIB_SEQ=m +CONFIG_SND_SBAWE_SEQ=m +CONFIG_SND_EMU10K1_SEQ=m +CONFIG_SND_MPU401_UART=m +CONFIG_SND_OPL3_LIB=m +CONFIG_SND_OPL4_LIB=m +CONFIG_SND_VX_LIB=m +CONFIG_SND_AC97_CODEC=m +CONFIG_SND_DRIVERS=y +# CONFIG_SND_PCSP is not set +CONFIG_SND_DUMMY=m +CONFIG_SND_VIRMIDI=m +CONFIG_SND_MTPAV=m +CONFIG_SND_MTS64=m +CONFIG_SND_SERIAL_U16550=m +CONFIG_SND_MPU401=m +CONFIG_SND_PORTMAN2X4=m +CONFIG_SND_AC97_POWER_SAVE=y +CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0 +CONFIG_SND_WSS_LIB=m +CONFIG_SND_SB_COMMON=m +CONFIG_SND_SB8_DSP=m +CONFIG_SND_SB16_DSP=m +CONFIG_SND_ISA=y +CONFIG_SND_ADLIB=m +CONFIG_SND_AD1816A=m +CONFIG_SND_AD1848=m +CONFIG_SND_ALS100=m +CONFIG_SND_AZT2320=m +CONFIG_SND_CMI8330=m +CONFIG_SND_CS4231=m +CONFIG_SND_CS4236=m +CONFIG_SND_DT019X=m +CONFIG_SND_ES968=m +CONFIG_SND_ES1688=m +CONFIG_SND_ES18XX=m +CONFIG_SND_SC6000=m +CONFIG_SND_GUSCLASSIC=m +CONFIG_SND_GUSEXTREME=m +CONFIG_SND_GUSMAX=m +CONFIG_SND_INTERWAVE=m +CONFIG_SND_INTERWAVE_STB=m +CONFIG_SND_OPL3SA2=m +CONFIG_SND_OPTI92X_AD1848=m +CONFIG_SND_OPTI92X_CS4231=m +CONFIG_SND_OPTI93X=m +CONFIG_SND_MIRO=m +CONFIG_SND_SB8=m +CONFIG_SND_SB16=m +CONFIG_SND_SBAWE=m +CONFIG_SND_SB16_CSP=y +CONFIG_SND_SGALAXY=m +CONFIG_SND_SSCAPE=m +CONFIG_SND_WAVEFRONT=m +CONFIG_SND_MSND_PINNACLE=m +CONFIG_SND_MSND_CLASSIC=m +CONFIG_SND_PCI=y +CONFIG_SND_AD1889=m +CONFIG_SND_ALS300=m +CONFIG_SND_ALS4000=m +CONFIG_SND_ALI5451=m +CONFIG_SND_ATIIXP=m +CONFIG_SND_ATIIXP_MODEM=m +CONFIG_SND_AU8810=m +CONFIG_SND_AU8820=m +CONFIG_SND_AU8830=m +CONFIG_SND_AW2=m +CONFIG_SND_AZT3328=m +CONFIG_SND_BT87X=m +# CONFIG_SND_BT87X_OVERCLOCK is not set +CONFIG_SND_CA0106=m +CONFIG_SND_CMIPCI=m +CONFIG_SND_OXYGEN_LIB=m +CONFIG_SND_OXYGEN=m +CONFIG_SND_CS4281=m +CONFIG_SND_CS46XX=m +CONFIG_SND_CS46XX_NEW_DSP=y +CONFIG_SND_CS5530=m +CONFIG_SND_CS5535AUDIO=m +CONFIG_SND_CTXFI=m +CONFIG_SND_DARLA20=m +CONFIG_SND_GINA20=m +CONFIG_SND_LAYLA20=m +CONFIG_SND_DARLA24=m +CONFIG_SND_GINA24=m +CONFIG_SND_LAYLA24=m +CONFIG_SND_MONA=m +CONFIG_SND_MIA=m +CONFIG_SND_ECHO3G=m +CONFIG_SND_INDIGO=m +CONFIG_SND_INDIGOIO=m +CONFIG_SND_INDIGODJ=m +CONFIG_SND_INDIGOIOX=m +CONFIG_SND_INDIGODJX=m +CONFIG_SND_EMU10K1=m +CONFIG_SND_EMU10K1X=m +CONFIG_SND_ENS1370=m +CONFIG_SND_ENS1371=m +CONFIG_SND_ES1938=m +CONFIG_SND_ES1968=m +CONFIG_SND_FM801=m +CONFIG_SND_FM801_TEA575X_BOOL=y +CONFIG_SND_FM801_TEA575X=m +CONFIG_SND_HDA_INTEL=m +CONFIG_SND_HDA_HWDEP=y +CONFIG_SND_HDA_RECONFIG=y +CONFIG_SND_HDA_INPUT_BEEP=y +CONFIG_SND_HDA_INPUT_JACK=y +CONFIG_SND_HDA_CODEC_REALTEK=y +CONFIG_SND_HDA_CODEC_ANALOG=y +CONFIG_SND_HDA_CODEC_SIGMATEL=y +CONFIG_SND_HDA_CODEC_VIA=y +CONFIG_SND_HDA_CODEC_ATIHDMI=y +CONFIG_SND_HDA_CODEC_NVHDMI=y +CONFIG_SND_HDA_CODEC_INTELHDMI=y +CONFIG_SND_HDA_ELD=y +CONFIG_SND_HDA_CODEC_CONEXANT=y +CONFIG_SND_HDA_CODEC_CA0110=y +CONFIG_SND_HDA_CODEC_CMEDIA=y +CONFIG_SND_HDA_CODEC_SI3054=y +CONFIG_SND_HDA_GENERIC=y +CONFIG_SND_HDA_POWER_SAVE=y +CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 +CONFIG_SND_HDSP=m +CONFIG_SND_HDSPM=m +CONFIG_SND_HIFIER=m +CONFIG_SND_ICE1712=m +CONFIG_SND_ICE1724=m +CONFIG_SND_INTEL8X0=m +CONFIG_SND_INTEL8X0M=m +CONFIG_SND_KORG1212=m +CONFIG_SND_LX6464ES=m +CONFIG_SND_MAESTRO3=m +CONFIG_SND_MIXART=m +CONFIG_SND_NM256=m +CONFIG_SND_PCXHR=m +CONFIG_SND_RIPTIDE=m +CONFIG_SND_RME32=m +CONFIG_SND_RME96=m +CONFIG_SND_RME9652=m +CONFIG_SND_SIS7019=m +CONFIG_SND_SONICVIBES=m +CONFIG_SND_TRIDENT=m +CONFIG_SND_VIA82XX=m +CONFIG_SND_VIA82XX_MODEM=m +CONFIG_SND_VIRTUOSO=m +CONFIG_SND_VX222=m +CONFIG_SND_YMFPCI=m +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_USX2Y=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_US122L=m +CONFIG_SND_PCMCIA=y +CONFIG_SND_VXPOCKET=m +CONFIG_SND_PDAUDIOCF=m +CONFIG_SND_SOC=m +CONFIG_SND_SOC_I2C_AND_SPI=m +# CONFIG_SND_SOC_ALL_CODECS is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_AC97_BUS=m +CONFIG_HID_SUPPORT=y +CONFIG_HID=m +# CONFIG_HID_DEBUG is not set +CONFIG_HIDRAW=y + +# +# USB Input Devices +# +CONFIG_USB_HID=m +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y + +# +# Special HID drivers +# +CONFIG_HID_A4TECH=m +CONFIG_HID_APPLE=m +CONFIG_HID_BELKIN=m +CONFIG_HID_CHERRY=m +CONFIG_HID_CHICONY=m +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EZKEY=m +CONFIG_HID_KYE=m +CONFIG_HID_GYRATION=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LOGITECH=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +CONFIG_HID_NTRIG=m +CONFIG_HID_PANTHERLORD=m +CONFIG_PANTHERLORD_FF=y +CONFIG_HID_PETALYNX=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TOPSEED=m +CONFIG_HID_THRUSTMASTER=m +CONFIG_THRUSTMASTER_FF=y +CONFIG_HID_WACOM=m +CONFIG_HID_ZEROPLUS=m +CONFIG_ZEROPLUS_FF=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +CONFIG_USB_DEVICE_CLASS=y +CONFIG_USB_DYNAMIC_MINORS=y +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +CONFIG_USB_MON=m +CONFIG_USB_WUSB=m +CONFIG_USB_WUSB_CBAF=m +# CONFIG_USB_WUSB_CBAF_DEBUG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_C67X00_HCD=m +CONFIG_USB_XHCI_HCD=m +# CONFIG_USB_XHCI_HCD_DEBUGGING is not set +CONFIG_USB_EHCI_HCD=m +CONFIG_USB_EHCI_ROOT_HUB_TT=y +# CONFIG_USB_EHCI_TT_NEWSCHED is not set +CONFIG_USB_OXU210HP_HCD=m +CONFIG_USB_ISP116X_HCD=m +CONFIG_USB_ISP1760_HCD=m +CONFIG_USB_OHCI_HCD=m +# CONFIG_USB_OHCI_HCD_SSB is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +CONFIG_USB_UHCI_HCD=m +CONFIG_USB_U132_HCD=m +CONFIG_USB_SL811_HCD=m +CONFIG_USB_SL811_CS=m +CONFIG_USB_R8A66597_HCD=m +CONFIG_USB_WHCI_HCD=m +CONFIG_USB_HWA_HCD=m +# CONFIG_USB_GADGET_MUSB_HDRC is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +CONFIG_USB_TMC=m + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DATAFAB=m +CONFIG_USB_STORAGE_FREECOM=m +CONFIG_USB_STORAGE_ISD200=m +CONFIG_USB_STORAGE_USBAT=m +CONFIG_USB_STORAGE_SDDR09=m +CONFIG_USB_STORAGE_SDDR55=m +CONFIG_USB_STORAGE_JUMPSHOT=m +CONFIG_USB_STORAGE_ALAUDA=m +CONFIG_USB_STORAGE_ONETOUCH=m +CONFIG_USB_STORAGE_KARMA=m +CONFIG_USB_STORAGE_CYPRESS_ATACB=m +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m + +# +# USB port drivers +# +CONFIG_USB_USS720=m +CONFIG_USB_SERIAL=m +CONFIG_USB_EZUSB=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_MOTOROLA=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_SAFE=m +# CONFIG_USB_SERIAL_SAFE_PADDED is not set +CONFIG_USB_SERIAL_SIEMENS_MPI=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_ADUTUX=m +CONFIG_USB_SEVSEG=m +CONFIG_USB_RIO500=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_BERRY_CHARGE=m +CONFIG_USB_LED=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +CONFIG_USB_APPLEDISPLAY=m +CONFIG_USB_SISUSBVGA=m +# CONFIG_USB_SISUSBVGA_CON is not set +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +CONFIG_USB_TEST=m +CONFIG_USB_ISIGHTFW=m +CONFIG_USB_VST=m +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m +CONFIG_USB_GADGET=m +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_DEBUG_FS is not set +CONFIG_USB_GADGET_VBUS_DRAW=2 +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_PXA25X is not set +# CONFIG_USB_GADGET_PXA27X is not set +# CONFIG_USB_GADGET_S3C_HSOTG is not set +# CONFIG_USB_GADGET_IMX is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_FSL_QE is not set +# CONFIG_USB_GADGET_CI13XXX is not set +CONFIG_USB_GADGET_NET2280=y +CONFIG_USB_NET2280=m +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LANGWELL is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_DUALSPEED=y +# CONFIG_USB_ZERO is not set +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +CONFIG_USB_GADGETFS=m +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +# CONFIG_USB_CDC_COMPOSITE is not set + +# +# OTG and related infrastructure +# +CONFIG_USB_OTG_UTILS=y +CONFIG_NOP_USB_XCEIV=m +CONFIG_UWB=m +CONFIG_UWB_HWA=m +CONFIG_UWB_WHCI=m +CONFIG_UWB_WLP=m +CONFIG_UWB_I1480U=m +CONFIG_UWB_I1480U_WLP=m +CONFIG_MMC=m +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=m +CONFIG_MMC_BLOCK_BOUNCE=y +CONFIG_SDIO_UART=m +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=m +CONFIG_MMC_SDHCI_PCI=m +CONFIG_MMC_RICOH_MMC=m +CONFIG_MMC_SDHCI_PLTFM=m +CONFIG_MMC_WBSD=m +CONFIG_MMC_TIFM_SD=m +CONFIG_MMC_SDRICOH_CS=m +CONFIG_MMC_CB710=m +CONFIG_MMC_VIA_SDMMC=m +CONFIG_MEMSTICK=m +# CONFIG_MEMSTICK_DEBUG is not set + +# +# MemoryStick drivers +# +# CONFIG_MEMSTICK_UNSAFE_RESUME is not set +CONFIG_MSPRO_BLOCK=m + +# +# MemoryStick Host Controller Drivers +# +CONFIG_MEMSTICK_TIFM_MS=m +CONFIG_MEMSTICK_JMICRON_38X=m +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=m + +# +# LED drivers +# +# CONFIG_LEDS_ALIX2 is not set +CONFIG_LEDS_PCA9532=m +CONFIG_LEDS_LP3944=m +CONFIG_LEDS_CLEVO_MAIL=m +CONFIG_LEDS_PCA955X=m +CONFIG_LEDS_WM8350=m +CONFIG_LEDS_DAC124S085=m +CONFIG_LEDS_BD2802=m + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_IDE_DISK=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=m +CONFIG_LEDS_TRIGGER_BACKLIGHT=m +CONFIG_LEDS_TRIGGER_DEFAULT_ON=m + +# +# iptables trigger is under Netfilter config (LED target) +# +CONFIG_ACCESSIBILITY=y +CONFIG_A11Y_BRAILLE_CONSOLE=y +# CONFIG_INFINIBAND is not set +CONFIG_EDAC=y + +# +# Reporting subsystems +# +# CONFIG_EDAC_DEBUG is not set +CONFIG_EDAC_MM_EDAC=m +CONFIG_EDAC_AMD76X=m +CONFIG_EDAC_E7XXX=m +CONFIG_EDAC_E752X=m +CONFIG_EDAC_I82875P=m +CONFIG_EDAC_I82975X=m +CONFIG_EDAC_I3000=m +CONFIG_EDAC_X38=m +CONFIG_EDAC_I5400=m +CONFIG_EDAC_I82860=m +CONFIG_EDAC_R82600=m +CONFIG_EDAC_I5000=m +CONFIG_EDAC_I5100=m +CONFIG_RTC_LIB=m +CONFIG_RTC_CLASS=m + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_TEST=m + +# +# I2C RTC drivers +# +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1374=m +CONFIG_RTC_DRV_DS1672=m +CONFIG_RTC_DRV_MAX6900=m +CONFIG_RTC_DRV_RS5C372=m +CONFIG_RTC_DRV_ISL1208=m +CONFIG_RTC_DRV_X1205=m +CONFIG_RTC_DRV_PCF8563=m +CONFIG_RTC_DRV_PCF8583=m +CONFIG_RTC_DRV_M41T80=m +CONFIG_RTC_DRV_M41T80_WDT=y +CONFIG_RTC_DRV_S35390A=m +CONFIG_RTC_DRV_FM3130=m +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_RX8025=m + +# +# SPI RTC drivers +# +CONFIG_RTC_DRV_M41T94=m +CONFIG_RTC_DRV_DS1305=m +CONFIG_RTC_DRV_DS1390=m +CONFIG_RTC_DRV_MAX6902=m +CONFIG_RTC_DRV_R9701=m +CONFIG_RTC_DRV_RS5C348=m +CONFIG_RTC_DRV_DS3234=m + +# +# Platform RTC drivers +# +CONFIG_RTC_DRV_CMOS=m +CONFIG_RTC_DRV_DS1286=m +CONFIG_RTC_DRV_DS1511=m +CONFIG_RTC_DRV_DS1553=m +CONFIG_RTC_DRV_DS1742=m +CONFIG_RTC_DRV_STK17TA8=m +CONFIG_RTC_DRV_M48T86=m +CONFIG_RTC_DRV_M48T35=m +CONFIG_RTC_DRV_M48T59=m +CONFIG_RTC_DRV_BQ4802=m +CONFIG_RTC_DRV_V3020=m +CONFIG_RTC_DRV_WM8350=m +CONFIG_RTC_DRV_PCF50633=m + +# +# on-CPU RTC drivers +# +CONFIG_DMADEVICES=y + +# +# DMA Devices +# +CONFIG_INTEL_IOATDMA=m +CONFIG_DMA_ENGINE=y + +# +# DMA Clients +# +CONFIG_NET_DMA=y +CONFIG_ASYNC_TX_DMA=y +# CONFIG_DMATEST is not set +CONFIG_DCA=m +CONFIG_AUXDISPLAY=y +CONFIG_KS0108=m +CONFIG_KS0108_PORT=0x378 +CONFIG_KS0108_DELAY=2 +CONFIG_CFAG12864B=m +CONFIG_CFAG12864B_RATE=20 +CONFIG_UIO=m +CONFIG_UIO_CIF=m +CONFIG_UIO_PDRV=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_UIO_SMX=m +CONFIG_UIO_AEC=m +CONFIG_UIO_SERCOS3=m + +# +# TI VLYNQ +# +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +CONFIG_ET131X=m +# CONFIG_ET131X_DEBUG is not set +CONFIG_SLICOSS=m +CONFIG_SXG=m +CONFIG_ME4000=m +CONFIG_MEILHAUS=m +CONFIG_ME0600=m +CONFIG_ME0900=m +CONFIG_ME1000=m +CONFIG_ME1400=m +CONFIG_ME1600=m +CONFIG_ME4600=m +CONFIG_ME6000=m +CONFIG_ME8100=m +CONFIG_ME8200=m +CONFIG_MEDUMMY=m +CONFIG_VIDEO_GO7007=m +CONFIG_VIDEO_GO7007_USB=m +# CONFIG_VIDEO_GO7007_USB_S2250_BOARD is not set +CONFIG_USB_IP_COMMON=m +CONFIG_USB_IP_VHCI_HCD=m +CONFIG_USB_IP_HOST=m +CONFIG_W35UND=m +CONFIG_PRISM2_USB=m +CONFIG_ECHO=m +CONFIG_USB_ATMEL=m +CONFIG_POCH=m +CONFIG_AGNX=m +CONFIG_OTUS=m +CONFIG_RT2860=m +CONFIG_RT2870=m +CONFIG_RT3070=m +CONFIG_COMEDI=m +# CONFIG_COMEDI_DEBUG is not set +CONFIG_COMEDI_PCI_DRIVERS=m +CONFIG_COMEDI_PCMCIA_DRIVERS=m +CONFIG_COMEDI_USB_DRIVERS=m +CONFIG_ASUS_OLED=m +# CONFIG_PANEL is not set +# CONFIG_ALTERA_PCIE_CHDMA is not set +CONFIG_RTL8187SE=m +CONFIG_RTL8192SU=m +# CONFIG_INPUT_MIMIO is not set +# CONFIG_TRANZPORT is not set +# CONFIG_EPL is not set + +# +# Android +# +# CONFIG_ANDROID is not set +CONFIG_DST=m +# CONFIG_DST_DEBUG is not set +CONFIG_POHMELFS=m +# CONFIG_POHMELFS_DEBUG is not set +CONFIG_POHMELFS_CRYPTO=y +CONFIG_STLC45XX=m +CONFIG_B3DFG=m +CONFIG_IDE_PHISON=m +CONFIG_PLAN9AUTH=m +CONFIG_HECI=m +CONFIG_LINE6_USB=m +CONFIG_DRM_RADEON_KMS=y +CONFIG_USB_SERIAL_QUATECH2=m +CONFIG_VT6655=m +CONFIG_USB_CPC=m +CONFIG_RDC_17F3101X=m +CONFIG_FB_UDL=m +CONFIG_X86_PLATFORM_DEVICES=y +CONFIG_ACER_WMI=m +CONFIG_ACERHDF=m +CONFIG_ASUS_LAPTOP=m +CONFIG_DELL_WMI=m +CONFIG_FUJITSU_LAPTOP=m +# CONFIG_FUJITSU_LAPTOP_DEBUG is not set +CONFIG_TC1100_WMI=m +CONFIG_HP_WMI=m +CONFIG_MSI_LAPTOP=m +CONFIG_PANASONIC_LAPTOP=m +CONFIG_COMPAL_LAPTOP=m +CONFIG_SONY_LAPTOP=m +# CONFIG_SONYPI_COMPAT is not set +CONFIG_THINKPAD_ACPI=m +# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set +# CONFIG_THINKPAD_ACPI_DEBUG is not set +# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set +CONFIG_THINKPAD_ACPI_VIDEO=y +CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y +CONFIG_INTEL_MENLOW=m +CONFIG_EEEPC_LAPTOP=m +CONFIG_ACPI_WMI=m +CONFIG_ACPI_ASUS=m +CONFIG_ACPI_TOSHIBA=m + +# +# Firmware Drivers +# +CONFIG_EDD=m +# CONFIG_EDD_OFF is not set +CONFIG_FIRMWARE_MEMMAP=y +CONFIG_EFI_VARS=m +CONFIG_DELL_RBU=m +CONFIG_DCDBAS=m +CONFIG_DMIID=y +# CONFIG_ISCSI_IBFT_FIND is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=m +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_EXT4_FS=m +CONFIG_EXT4DEV_COMPAT=y +CONFIG_EXT4_FS_XATTR=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_JBD2=m +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=m +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_RT=y +# CONFIG_XFS_DEBUG is not set +CONFIG_GFS2_FS=m +CONFIG_GFS2_FS_LOCKING_DLM=y +CONFIG_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m +CONFIG_OCFS2_FS_STATS=y +# CONFIG_OCFS2_DEBUG_MASKLOG is not set +# CONFIG_OCFS2_DEBUG_FS is not set +CONFIG_OCFS2_FS_POSIX_ACL=y +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_QUOTA_TREE=m +CONFIG_QFMT_V1=m +CONFIG_QFMT_V2=m +CONFIG_QUOTACTL=y +# CONFIG_AUTOFS_FS is not set +CONFIG_AUTOFS4_FS=m +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_GENERIC_ACL=y + +# +# Caches +# +CONFIG_FSCACHE=m +CONFIG_FSCACHE_STATS=y +CONFIG_FSCACHE_HISTOGRAM=y +# CONFIG_FSCACHE_DEBUG is not set +CONFIG_CACHEFILES=m +# CONFIG_CACHEFILES_DEBUG is not set +# CONFIG_CACHEFILES_HISTOGRAM is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=m +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_BEFS_FS=m +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS2_LZO is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +CONFIG_CRAMFS=m +CONFIG_SQUASHFS=m +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +CONFIG_OMFS_FS=m +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_UFS_DEBUG is not set +CONFIG_EXOFS_FS=m +# CONFIG_EXOFS_DEBUG is not set +CONFIG_NILFS2_FS=m +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +CONFIG_NFS_FSCACHE=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_RPCSEC_GSS_SPKM3=m +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_WEAK_PW_HASH=y +# CONFIG_CIFS_UPCALL is not set +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +CONFIG_NCPFS_SMALLDOS=y +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +CONFIG_AFS_FS=m +# CONFIG_AFS_DEBUG is not set +CONFIG_AFS_FSCACHE=y +CONFIG_9P_FS=m + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +CONFIG_SOLARIS_X86_PARTITION=y +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +CONFIG_KARMA_PARTITION=y +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m +CONFIG_DLM=m +# CONFIG_DLM_DEBUG is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +CONFIG_UNUSED_SYMBOLS=y +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +CONFIG_SCHED_DEBUG=y +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_HIGHMEM is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_VIRTUAL is not set +# CONFIG_DEBUG_WRITECOUNT is not set +CONFIG_DEBUG_MEMORY_INIT=y +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +CONFIG_ARCH_WANT_FRAME_POINTERS=y +# CONFIG_FRAME_POINTER is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_USER_STACKTRACE_SUPPORT=y +CONFIG_NOP_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y +CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_FTRACE_SYSCALLS=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_TRACING=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +CONFIG_HAVE_ARCH_KMEMCHECK=y +# CONFIG_KMEMCHECK is not set +CONFIG_STRICT_DEVMEM=y +CONFIG_X86_VERBOSE_BOOTUP=y +CONFIG_EARLY_PRINTK=y +# CONFIG_EARLY_PRINTK_DBGP is not set +# CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_X86_PTDUMP is not set +# CONFIG_DEBUG_RODATA is not set +# CONFIG_DEBUG_NX_TEST is not set +# CONFIG_4KSTACKS is not set +CONFIG_DOUBLEFAULT=y +# CONFIG_IOMMU_STRESS is not set +CONFIG_HAVE_MMIOTRACE_SUPPORT=y +CONFIG_IO_DELAY_TYPE_0X80=0 +CONFIG_IO_DELAY_TYPE_0XED=1 +CONFIG_IO_DELAY_TYPE_UDELAY=2 +CONFIG_IO_DELAY_TYPE_NONE=3 +CONFIG_IO_DELAY_0X80=y +# CONFIG_IO_DELAY_0XED is not set +# CONFIG_IO_DELAY_UDELAY is not set +# CONFIG_IO_DELAY_NONE is not set +CONFIG_DEFAULT_IO_DELAY_TYPE=0 +# CONFIG_DEBUG_BOOT_PARAMS is not set +# CONFIG_CPA_DEBUG is not set +# CONFIG_OPTIMIZE_INLINING is not set + +# +# Linux VServer +# +CONFIG_VSERVER_AUTO_LBACK=y +CONFIG_VSERVER_AUTO_SINGLE=y +CONFIG_VSERVER_COWBL=y +CONFIG_VSERVER_VTIME=y +CONFIG_VSERVER_DEVICE=y +CONFIG_VSERVER_PROC_SECURE=y +CONFIG_VSERVER_HARDCPU=y +CONFIG_VSERVER_IDLETIME=y +# CONFIG_VSERVER_IDLELIMIT is not set +# CONFIG_TAGGING_NONE is not set +# CONFIG_TAGGING_UID16 is not set +# CONFIG_TAGGING_GID16 is not set +CONFIG_TAGGING_ID24=y +# CONFIG_TAGGING_INTERN is not set +# CONFIG_TAG_NFSD is not set +CONFIG_VSERVER_PRIVACY=y +CONFIG_VSERVER_CONTEXTS=256 +CONFIG_VSERVER_WARN=y +# CONFIG_VSERVER_DEBUG is not set +CONFIG_VSERVER=y +CONFIG_VSERVER_SECURITY=y + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +CONFIG_SECURITY=y +CONFIG_SECURITYFS=y +CONFIG_SECURITY_NETWORK=y +# CONFIG_SECURITY_NETWORK_XFRM is not set +# CONFIG_SECURITY_PATH is not set +CONFIG_SECURITY_FILE_CAPABILITIES=y +# CONFIG_SECURITY_SELINUX is not set +# CONFIG_SECURITY_SMACK is not set +# CONFIG_SECURITY_TOMOYO is not set +# CONFIG_IMA is not set +CONFIG_XOR_BLOCKS=m +CONFIG_ASYNC_CORE=m +CONFIG_ASYNC_MEMCPY=m +CONFIG_ASYNC_XOR=m +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_FIPS=y +CONFIG_CRYPTO_ALGAPI=m +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=m +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=m +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_GF128MUL=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=m +CONFIG_CRYPTO_AUTHENC=m +CONFIG_CRYPTO_TEST=m + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=m +CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_SEQIV=m + +# +# Block modes +# +CONFIG_CRYPTO_CBC=m +CONFIG_CRYPTO_CTR=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_PCBC=m +CONFIG_CRYPTO_XTS=m + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_XCBC=m + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_CRC32C_INTEL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_AES_586=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_SALSA20=m +CONFIG_CRYPTO_SALSA20_586=m +CONFIG_CRYPTO_SEED=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m +CONFIG_CRYPTO_TWOFISH_586=m + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_ZLIB=m +CONFIG_CRYPTO_LZO=m + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=m +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_DEV_PADLOCK=m +CONFIG_CRYPTO_DEV_PADLOCK_AES=m +CONFIG_CRYPTO_DEV_PADLOCK_SHA=m +CONFIG_CRYPTO_DEV_GEODE=m +CONFIG_CRYPTO_DEV_HIFN_795X=m +CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y +CONFIG_HAVE_KVM=y +CONFIG_HAVE_KVM_IRQCHIP=y +CONFIG_VIRTUALIZATION=y +CONFIG_KVM=m +CONFIG_KVM_INTEL=m +CONFIG_KVM_AMD=m +# CONFIG_KVM_TRACE is not set +CONFIG_LGUEST=m +CONFIG_VIRTIO=y +CONFIG_VIRTIO_RING=y +CONFIG_VIRTIO_PCI=m +CONFIG_VIRTIO_BALLOON=m +CONFIG_BINARY_PRINTF=y + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC_T10DIF=m +CONFIG_CRC_ITU_T=m +CONFIG_CRC32=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=m +CONFIG_AUDIT_GENERIC=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m +CONFIG_LZO_COMPRESS=m +CONFIG_LZO_DECOMPRESS=m +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CHECK_SIGNATURE=y +CONFIG_NLATTR=y diff --git a/kernel26-vserver/config.x86_64 b/kernel26-vserver/config.x86_64 new file mode 100644 index 0000000..d581a04 --- /dev/null +++ b/kernel26-vserver/config.x86_64 @@ -0,0 +1,4338 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.31 +# Sat Nov 14 15:34:39 2009 +# +CONFIG_64BIT=y +# CONFIG_X86_32 is not set +CONFIG_X86_64=y +CONFIG_X86=y +CONFIG_OUTPUT_FORMAT="elf64-x86-64" +CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_CLOCKSOURCE_WATCHDOG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_FAST_CMPXCHG_LOCAL=y +CONFIG_MMU=y +CONFIG_ZONE_DMA=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_ARCH_HAS_CPU_RELAX=y +CONFIG_ARCH_HAS_DEFAULT_IDLE=y +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_HAVE_SETUP_PER_CPU_AREA=y +CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y +CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ZONE_DMA32=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_AUDIT_ARCH=y +CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_PENDING_IRQ=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_X86_64_SMP=y +CONFIG_X86_HT=y +CONFIG_X86_TRAMPOLINE=y +# CONFIG_KTIME_SCALAR is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="-ARCH" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_LZMA=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +CONFIG_KERNEL_LZMA=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_AUDIT=y +CONFIG_AUDITSYSCALL=y +CONFIG_AUDIT_TREE=y + +# +# RCU Subsystem +# +CONFIG_CLASSIC_RCU=y +# CONFIG_TREE_RCU is not set +# CONFIG_PREEMPT_RCU is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_PREEMPT_RCU_TRACE is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=19 +CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y +# CONFIG_GROUP_SCHED is not set +# CONFIG_CGROUPS is not set +# CONFIG_SYSFS_DEPRECATED_V2 is not set +CONFIG_RELAY=y +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_PCSPKR_PLATFORM=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_COUNTERS=y + +# +# Performance Counters +# +CONFIG_PERF_COUNTERS=y +CONFIG_EVENT_PROFILE=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_PCI_QUIRKS=y +CONFIG_SLUB_DEBUG=y +CONFIG_STRIP_ASM_SYMS=y +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_TRACEPOINTS=y +CONFIG_MARKERS=y +CONFIG_OPROFILE=m +CONFIG_OPROFILE_IBS=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_IOREMAP_PROT=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_API_DEBUG=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_SLOW_WORK=y +# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_INTEGRITY is not set +CONFIG_BLOCK_COMPAT=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_PREEMPT_NOTIFIERS=y +CONFIG_FREEZER=y + +# +# Processor type and features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_SMP=y +# CONFIG_SPARSE_IRQ is not set +CONFIG_X86_MPPARSE=y +# CONFIG_X86_EXTENDED_PLATFORM is not set +CONFIG_SCHED_OMIT_FRAME_POINTER=y +CONFIG_PARAVIRT_GUEST=y +# CONFIG_XEN is not set +CONFIG_KVM_CLOCK=y +CONFIG_KVM_GUEST=y +CONFIG_PARAVIRT=y +# CONFIG_PARAVIRT_SPINLOCKS is not set +CONFIG_PARAVIRT_CLOCK=y +# CONFIG_PARAVIRT_DEBUG is not set +# CONFIG_MEMTEST is not set +# CONFIG_M386 is not set +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +# CONFIG_M686 is not set +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +# CONFIG_MVIAC7 is not set +# CONFIG_MPSC is not set +# CONFIG_MCORE2 is not set +CONFIG_GENERIC_CPU=y +CONFIG_X86_CPU=y +CONFIG_X86_L1_CACHE_BYTES=64 +CONFIG_X86_INTERNODE_CACHE_BYTES=64 +CONFIG_X86_CMPXCHG=y +CONFIG_X86_L1_CACHE_SHIFT=6 +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_TSC=y +CONFIG_X86_CMPXCHG64=y +CONFIG_X86_CMOV=y +CONFIG_X86_MINIMUM_CPU_FAMILY=64 +CONFIG_X86_DEBUGCTLMSR=y +CONFIG_CPU_SUP_INTEL=y +CONFIG_CPU_SUP_AMD=y +CONFIG_CPU_SUP_CENTAUR=y +# CONFIG_X86_DS is not set +CONFIG_HPET_TIMER=y +CONFIG_HPET_EMULATE_RTC=y +CONFIG_DMI=y +CONFIG_GART_IOMMU=y +CONFIG_CALGARY_IOMMU=y +CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y +# CONFIG_AMD_IOMMU is not set +CONFIG_SWIOTLB=y +CONFIG_IOMMU_HELPER=y +# CONFIG_IOMMU_API is not set +# CONFIG_MAXSMP is not set +CONFIG_NR_CPUS=16 +CONFIG_SCHED_SMT=y +CONFIG_SCHED_MC=y +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_X86_LOCAL_APIC=y +CONFIG_X86_IO_APIC=y +CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y +CONFIG_X86_MCE=y +CONFIG_X86_NEW_MCE=y +CONFIG_X86_MCE_INTEL=y +CONFIG_X86_MCE_AMD=y +CONFIG_X86_MCE_THRESHOLD=y +# CONFIG_X86_MCE_INJECT is not set +CONFIG_X86_THERMAL_VECTOR=y +CONFIG_I8K=m +CONFIG_MICROCODE=m +CONFIG_MICROCODE_INTEL=y +CONFIG_MICROCODE_AMD=y +CONFIG_MICROCODE_OLD_INTERFACE=y +CONFIG_X86_MSR=m +CONFIG_X86_CPUID=m +# CONFIG_X86_CPU_DEBUG is not set +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y +CONFIG_DIRECT_GBPAGES=y +# CONFIG_NUMA is not set +CONFIG_ARCH_SPARSEMEM_DEFAULT=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_SELECT_MEMORY_MODEL=y +# CONFIG_FLATMEM_MANUAL is not set +# CONFIG_DISCONTIGMEM_MANUAL is not set +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPARSEMEM_VMEMMAP=y + +# +# Memory hotplug is currently incompatible with Software Suspend +# +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +CONFIG_HAVE_MLOCK=y +CONFIG_HAVE_MLOCKED_PAGE_BIT=y +CONFIG_MMU_NOTIFIER=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_X86_CHECK_BIOS_CORRUPTION=y +CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y +CONFIG_X86_RESERVE_LOW_64K=y +CONFIG_MTRR=y +CONFIG_MTRR_SANITIZER=y +CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 +CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 +CONFIG_X86_PAT=y +CONFIG_EFI=y +CONFIG_SECCOMP=y +CONFIG_CC_STACKPROTECTOR_ALL=y +CONFIG_CC_STACKPROTECTOR=y +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_300=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=300 +CONFIG_SCHED_HRTICK=y +CONFIG_KEXEC=y +# CONFIG_CRASH_DUMP is not set +CONFIG_KEXEC_JUMP=y +CONFIG_PHYSICAL_START=0x1000000 +# CONFIG_RELOCATABLE is not set +CONFIG_PHYSICAL_ALIGN=0x1000000 +CONFIG_HOTPLUG_CPU=y +# CONFIG_COMPAT_VDSO is not set +# CONFIG_CMDLINE_BOOL is not set +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y + +# +# Power management and ACPI options +# +CONFIG_ARCH_HIBERNATION_HEADER=y +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_HIBERNATION_NVS=y +CONFIG_HIBERNATION=y +CONFIG_PM_STD_PARTITION="" +CONFIG_ACPI=y +CONFIG_ACPI_SLEEP=y +CONFIG_ACPI_PROCFS=y +CONFIG_ACPI_PROCFS_POWER=y +CONFIG_ACPI_SYSFS_POWER=y +CONFIG_ACPI_PROC_EVENT=y +CONFIG_ACPI_AC=m +CONFIG_ACPI_BATTERY=m +CONFIG_ACPI_BUTTON=m +CONFIG_ACPI_VIDEO=m +CONFIG_ACPI_FAN=m +CONFIG_ACPI_DOCK=y +CONFIG_ACPI_PROCESSOR=m +CONFIG_ACPI_HOTPLUG_CPU=y +CONFIG_ACPI_THERMAL=m +# CONFIG_ACPI_CUSTOM_DSDT is not set +CONFIG_ACPI_BLACKLIST_YEAR=0 +# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_PCI_SLOT=m +CONFIG_X86_PM_TIMER=y +CONFIG_ACPI_CONTAINER=m +CONFIG_ACPI_SBS=m + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=m +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=m +CONFIG_CPU_FREQ_STAT_DETAILS=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=m +CONFIG_CPU_FREQ_GOV_USERSPACE=m +CONFIG_CPU_FREQ_GOV_ONDEMAND=m +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m + +# +# CPUFreq processor drivers +# +CONFIG_X86_ACPI_CPUFREQ=m +CONFIG_X86_POWERNOW_K8=m +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set +CONFIG_X86_P4_CLOCKMOD=m + +# +# shared options +# +CONFIG_X86_SPEEDSTEP_LIB=m +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y + +# +# Memory power savings +# +CONFIG_I7300_IDLE_IOAT_CHANNEL=y +CONFIG_I7300_IDLE=m + +# +# Bus options (PCI etc.) +# +CONFIG_PCI=y +CONFIG_PCI_DIRECT=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCI_DOMAINS=y +# CONFIG_DMAR is not set +# CONFIG_INTR_REMAP is not set +CONFIG_PCIEPORTBUS=y +CONFIG_HOTPLUG_PCI_PCIE=m +CONFIG_PCIEAER=y +# CONFIG_PCIE_ECRC is not set +# CONFIG_PCIEAER_INJECT is not set +# CONFIG_PCIEASPM is not set +CONFIG_ARCH_SUPPORTS_MSI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_LEGACY=y +# CONFIG_PCI_DEBUG is not set +CONFIG_PCI_STUB=m +CONFIG_HT_IRQ=y +CONFIG_PCI_IOV=y +CONFIG_ISA_DMA_API=y +CONFIG_K8_NB=y +CONFIG_PCCARD=m +# CONFIG_PCMCIA_DEBUG is not set +CONFIG_PCMCIA=m +CONFIG_PCMCIA_LOAD_CIS=y +CONFIG_PCMCIA_IOCTL=y +CONFIG_CARDBUS=y + +# +# PC-card bridges +# +CONFIG_YENTA=m +CONFIG_YENTA_O2=y +CONFIG_YENTA_RICOH=y +CONFIG_YENTA_TI=y +CONFIG_YENTA_ENE_TUNE=y +CONFIG_YENTA_TOSHIBA=y +CONFIG_PD6729=m +CONFIG_I82092=m +CONFIG_PCCARD_NONSTATIC=m +CONFIG_HOTPLUG_PCI=m +CONFIG_HOTPLUG_PCI_FAKE=m +CONFIG_HOTPLUG_PCI_ACPI=m +CONFIG_HOTPLUG_PCI_ACPI_IBM=m +CONFIG_HOTPLUG_PCI_CPCI=y +CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m +CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m +CONFIG_HOTPLUG_PCI_SHPC=m + +# +# Executable file formats / Emulations +# +CONFIG_BINFMT_ELF=y +CONFIG_COMPAT_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_HAVE_AOUT is not set +CONFIG_BINFMT_MISC=y +CONFIG_IA32_EMULATION=y +CONFIG_IA32_AOUT=m +CONFIG_COMPAT=y +CONFIG_COMPAT_FOR_U64_ALIGNMENT=y +CONFIG_SYSVIPC_COMPAT=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +CONFIG_XFRM_USER=m +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=m +CONFIG_NET_KEY=m +# CONFIG_NET_KEY_MIGRATE is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=m +CONFIG_INET_XFRM_MODE_TUNNEL=m +CONFIG_INET_XFRM_MODE_BEET=m +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_MIP6=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m +CONFIG_IPV6_SIT=m +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +# CONFIG_IPV6_MROUTE is not set +CONFIG_NETLABEL=y +CONFIG_NETWORK_SECMARK=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CT_ACCT=y +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_DCCP=m +CONFIG_NF_CT_PROTO_GRE=m +CONFIG_NF_CT_PROTO_SCTP=m +CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NETFILTER_TPROXY=m +CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_RATEEST=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_SECMARK=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_HL=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT=y +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_IP_VS=m +# CONFIG_IP_VS_IPV6 is not set +# CONFIG_IP_VS_DEBUG is not set +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_AH_ESP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PROTO_DCCP=m +CONFIG_NF_NAT_PROTO_GRE=m +CONFIG_NF_NAT_PROTO_UDPLITE=m +CONFIG_NF_NAT_PROTO_SCTP=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NF_NAT_AMANDA=m +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_SECURITY=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_CONNTRACK_IPV6=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_SECURITY=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_IP6=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +CONFIG_IP_DCCP=m +CONFIG_INET_DCCP_DIAG=m + +# +# DCCP CCIDs Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=y +# CONFIG_IP_DCCP_CCID3_DEBUG is not set +CONFIG_IP_DCCP_CCID3_RTO=100 +CONFIG_IP_DCCP_TFRC_LIB=y + +# +# DCCP Kernel Hacking +# +# CONFIG_IP_DCCP_DEBUG is not set +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +CONFIG_SCTP_HMAC_SHA1=y +# CONFIG_SCTP_HMAC_MD5 is not set +# CONFIG_TIPC is not set +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +# CONFIG_ATM_CLIP_NO_ICMP is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +# CONFIG_ATM_BR2684_IPFILTER is not set +CONFIG_STP=m +CONFIG_BRIDGE=m +# CONFIG_NET_DSA is not set +CONFIG_VLAN_8021Q=m +# CONFIG_VLAN_8021Q_GVRP is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +CONFIG_LLC2=m +CONFIG_IPX=m +# CONFIG_IPX_INTERN is not set +CONFIG_ATALK=m +CONFIG_DEV_APPLETALK=m +CONFIG_IPDDP=m +CONFIG_IPDDP_ENCAP=y +CONFIG_IPDDP_DECAP=y +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +CONFIG_PHONET=m +CONFIG_IEEE802154=m +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_CLS_U32_MARK is not set +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +# CONFIG_NET_EMATCH is not set +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set + +# +# Network testing +# +CONFIG_NET_PKTGEN=m +CONFIG_NET_DROP_MONITOR=y +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +CONFIG_IRDA=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +# CONFIG_IRDA_DEBUG is not set + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +CONFIG_IRTTY_SIR=m + +# +# Dongle support +# +CONFIG_DONGLE=y +CONFIG_ESI_DONGLE=m +CONFIG_ACTISYS_DONGLE=m +CONFIG_TEKRAM_DONGLE=m +CONFIG_TOIM3232_DONGLE=m +CONFIG_LITELINK_DONGLE=m +CONFIG_MA600_DONGLE=m +CONFIG_GIRBIL_DONGLE=m +CONFIG_MCP2120_DONGLE=m +CONFIG_OLD_BELKIN_DONGLE=m +CONFIG_ACT200L_DONGLE=m +CONFIG_KINGSUN_DONGLE=m +CONFIG_KSDAZZLE_DONGLE=m +CONFIG_KS959_DONGLE=m + +# +# FIR device drivers +# +CONFIG_USB_IRDA=m +CONFIG_SIGMATEL_FIR=m +CONFIG_NSC_FIR=m +CONFIG_WINBOND_FIR=m +CONFIG_SMC_IRCC_FIR=m +CONFIG_ALI_FIR=m +CONFIG_VLSI_FIR=m +CONFIG_VIA_FIR=m +CONFIG_MCS_FIR=m +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +# CONFIG_BT_BNEP_MC_FILTER is not set +# CONFIG_BT_BNEP_PROTO_FILTER is not set +# CONFIG_BT_CMTP is not set +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIDTL1=m +CONFIG_BT_HCIBT3C=m +CONFIG_BT_HCIBLUECARD=m +CONFIG_BT_HCIBTUART=m +CONFIG_BT_HCIVHCI=m +CONFIG_AF_RXRPC=m +# CONFIG_AF_RXRPC_DEBUG is not set +CONFIG_RXKAD=m +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_CFG80211=m +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_DEBUGFS is not set +# CONFIG_WIRELESS_OLD_REGULATORY is not set +CONFIG_WIRELESS_EXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=m +CONFIG_LIB80211_CRYPT_WEP=m +CONFIG_LIB80211_CRYPT_CCMP=m +CONFIG_LIB80211_CRYPT_TKIP=m +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=m +CONFIG_MAC80211_DEFAULT_PS=y +CONFIG_MAC80211_DEFAULT_PS_VALUE=1 + +# +# Rate control algorithm selection +# +CONFIG_MAC80211_RC_MINSTREL=y +# CONFIG_MAC80211_RC_DEFAULT_PID is not set +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel" +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_DEBUG_MENU is not set +CONFIG_WIMAX=m +CONFIG_WIMAX_DEBUG_LEVEL=8 +CONFIG_RFKILL=m +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +CONFIG_NET_9P=m +CONFIG_NET_9P_VIRTIO=m +# CONFIG_NET_9P_DEBUG is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +CONFIG_CONNECTOR=m +CONFIG_MTD=m +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +CONFIG_MTD_TESTS=m +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=m +CONFIG_MTD_BLKDEVS=m +CONFIG_MTD_BLOCK=m +# CONFIG_MTD_BLOCK_RO is not set +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_RAM=m +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_TS5500 is not set +# CONFIG_MTD_INTEL_VR_NOR is not set +CONFIG_MTD_PLATRAM=m + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +CONFIG_MTD_SLRAM=m +CONFIG_MTD_PHRAM=m +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_NAND is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set + +# +# UBI - Unsorted block images +# +# CONFIG_MTD_UBI is not set +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_SERIAL=m +CONFIG_PARPORT_PC_FIFO=y +CONFIG_PARPORT_PC_SUPERIO=y +CONFIG_PARPORT_PC_PCMCIA=m +# CONFIG_PARPORT_GSC is not set +CONFIG_PARPORT_AX88796=m +CONFIG_PARPORT_1284=y +CONFIG_PARPORT_NOT_PC=y +CONFIG_PNP=y +# CONFIG_PNP_DEBUG_MESSAGES is not set + +# +# Protocols +# +CONFIG_PNPACPI=y +CONFIG_BLK_DEV=y +CONFIG_BLK_DEV_FD=m +# CONFIG_PARIDE is not set +CONFIG_BLK_CPQ_DA=m +CONFIG_BLK_CPQ_CISS_DA=m +# CONFIG_CISS_SCSI_TAPE is not set +CONFIG_BLK_DEV_DAC960=m +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_VROOT=y +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_OSD=m +CONFIG_BLK_DEV_SX8=m +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +# CONFIG_BLK_DEV_XIP is not set +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set +CONFIG_ATA_OVER_ETH=m +CONFIG_VIRTIO_BLK=m +# CONFIG_BLK_DEV_HD is not set +CONFIG_MISC_DEVICES=y +# CONFIG_IBM_ASM is not set +CONFIG_PHANTOM=m +CONFIG_SGI_IOC4=m +CONFIG_TIFM_CORE=m +CONFIG_TIFM_7XX1=m +CONFIG_ICS932S401=m +CONFIG_ENCLOSURE_SERVICES=m +CONFIG_HP_ILO=m +CONFIG_DELL_LAPTOP=m +CONFIG_ISL29003=m +CONFIG_C2PORT=m +CONFIG_C2PORT_DURAMAR_2150=m + +# +# EEPROM support +# +CONFIG_EEPROM_AT24=m +CONFIG_EEPROM_AT25=m +CONFIG_EEPROM_LEGACY=m +CONFIG_EEPROM_MAX6875=m +CONFIG_EEPROM_93CX6=m +CONFIG_CB710_CORE=m +# CONFIG_CB710_DEBUG is not set +CONFIG_CB710_DEBUG_ASSUMPTIONS=y +CONFIG_HAVE_IDE=y +CONFIG_IDE=m + +# +# Please see Documentation/ide/ide.txt for help/info on IDE drives +# +CONFIG_IDE_XFER_MODE=y +CONFIG_IDE_TIMINGS=y +CONFIG_IDE_ATAPI=y +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_IDE_GD=m +CONFIG_IDE_GD_ATA=y +CONFIG_IDE_GD_ATAPI=y +CONFIG_BLK_DEV_IDECS=m +CONFIG_BLK_DEV_DELKIN=m +CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEACPI=y +# CONFIG_IDE_TASK_IOCTL is not set +CONFIG_IDE_PROC_FS=y + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=m +CONFIG_BLK_DEV_PLATFORM=m +CONFIG_BLK_DEV_CMD640=m +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set +CONFIG_BLK_DEV_IDEPNP=m +CONFIG_BLK_DEV_IDEDMA_SFF=y + +# +# PCI IDE chipsets support +# +CONFIG_BLK_DEV_IDEPCI=y +# CONFIG_BLK_DEV_OFFBOARD is not set +CONFIG_BLK_DEV_GENERIC=m +CONFIG_BLK_DEV_OPTI621=m +CONFIG_BLK_DEV_RZ1000=m +CONFIG_BLK_DEV_IDEDMA_PCI=y +CONFIG_BLK_DEV_AEC62XX=m +CONFIG_BLK_DEV_ALI15X3=m +CONFIG_BLK_DEV_AMD74XX=m +CONFIG_BLK_DEV_ATIIXP=m +CONFIG_BLK_DEV_CMD64X=m +CONFIG_BLK_DEV_TRIFLEX=m +CONFIG_BLK_DEV_CS5520=m +CONFIG_BLK_DEV_CS5530=m +CONFIG_BLK_DEV_HPT366=m +CONFIG_BLK_DEV_JMICRON=m +CONFIG_BLK_DEV_SC1200=m +CONFIG_BLK_DEV_PIIX=m +CONFIG_BLK_DEV_IT8172=m +CONFIG_BLK_DEV_IT8213=m +CONFIG_BLK_DEV_IT821X=m +CONFIG_BLK_DEV_NS87415=m +CONFIG_BLK_DEV_PDC202XX_OLD=m +CONFIG_BLK_DEV_PDC202XX_NEW=m +CONFIG_BLK_DEV_SVWKS=m +CONFIG_BLK_DEV_SIIMAGE=m +CONFIG_BLK_DEV_SIS5513=m +CONFIG_BLK_DEV_SLC90E66=m +CONFIG_BLK_DEV_TRM290=m +CONFIG_BLK_DEV_VIA82CXXX=m +CONFIG_BLK_DEV_TC86C001=m +CONFIG_BLK_DEV_IDEDMA=y + +# +# SCSI device support +# +CONFIG_RAID_ATTRS=m +CONFIG_SCSI=m +CONFIG_SCSI_DMA=y +CONFIG_SCSI_TGT=m +CONFIG_SCSI_NETLINK=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m +CONFIG_BLK_DEV_SR=m +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m +CONFIG_CHR_DEV_SCH=m +CONFIG_SCSI_ENCLOSURE=m +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +CONFIG_SCSI_SPI_ATTRS=m +CONFIG_SCSI_FC_ATTRS=m +# CONFIG_SCSI_FC_TGT_ATTRS is not set +CONFIG_SCSI_ISCSI_ATTRS=m +CONFIG_SCSI_SAS_ATTRS=m +CONFIG_SCSI_SAS_LIBSAS=m +CONFIG_SCSI_SAS_ATA=y +CONFIG_SCSI_SAS_HOST_SMP=y +# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set +CONFIG_SCSI_SRP_ATTRS=m +CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=m +CONFIG_SCSI_CXGB3_ISCSI=m +CONFIG_SCSI_BNX2_ISCSI=m +CONFIG_BLK_DEV_3W_XXXX_RAID=m +CONFIG_SCSI_3W_9XXX=m +CONFIG_SCSI_ACARD=m +CONFIG_SCSI_AACRAID=m +CONFIG_SCSI_AIC7XXX=m +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000 +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +CONFIG_AIC7XXX_REG_PRETTY_PRINT=y +# CONFIG_SCSI_AIC7XXX_OLD is not set +CONFIG_SCSI_AIC79XX=m +CONFIG_AIC79XX_CMDS_PER_DEVICE=32 +CONFIG_AIC79XX_RESET_DELAY_MS=15000 +# CONFIG_AIC79XX_DEBUG_ENABLE is not set +CONFIG_AIC79XX_DEBUG_MASK=0 +CONFIG_AIC79XX_REG_PRETTY_PRINT=y +CONFIG_SCSI_AIC94XX=m +# CONFIG_AIC94XX_DEBUG is not set +CONFIG_SCSI_MVSAS=m +# CONFIG_SCSI_MVSAS_DEBUG is not set +CONFIG_SCSI_DPT_I2O=m +CONFIG_SCSI_ADVANSYS=m +CONFIG_SCSI_ARCMSR=m +CONFIG_SCSI_ARCMSR_AER=y +CONFIG_MEGARAID_NEWGEN=y +CONFIG_MEGARAID_MM=m +CONFIG_MEGARAID_MAILBOX=m +CONFIG_MEGARAID_LEGACY=m +CONFIG_MEGARAID_SAS=m +CONFIG_SCSI_MPT2SAS=m +CONFIG_SCSI_MPT2SAS_MAX_SGE=128 +# CONFIG_SCSI_MPT2SAS_LOGGING is not set +CONFIG_SCSI_HPTIOP=m +CONFIG_SCSI_BUSLOGIC=m +CONFIG_LIBFC=m +CONFIG_LIBFCOE=m +CONFIG_FCOE=m +CONFIG_FCOE_FNIC=m +CONFIG_SCSI_DMX3191D=m +CONFIG_SCSI_EATA=m +# CONFIG_SCSI_EATA_TAGGED_QUEUE is not set +# CONFIG_SCSI_EATA_LINKED_COMMANDS is not set +CONFIG_SCSI_EATA_MAX_TAGS=16 +CONFIG_SCSI_FUTURE_DOMAIN=m +CONFIG_SCSI_GDTH=m +CONFIG_SCSI_IPS=m +CONFIG_SCSI_INITIO=m +CONFIG_SCSI_INIA100=m +CONFIG_SCSI_PPA=m +CONFIG_SCSI_IMM=m +# CONFIG_SCSI_IZIP_EPP16 is not set +# CONFIG_SCSI_IZIP_SLOW_CTR is not set +CONFIG_SCSI_STEX=m +CONFIG_SCSI_SYM53C8XX_2=m +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 +CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 +CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 +CONFIG_SCSI_SYM53C8XX_MMIO=y +CONFIG_SCSI_IPR=m +# CONFIG_SCSI_IPR_TRACE is not set +# CONFIG_SCSI_IPR_DUMP is not set +CONFIG_SCSI_QLOGIC_1280=m +CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA_ISCSI=m +CONFIG_SCSI_LPFC=m +# CONFIG_SCSI_LPFC_DEBUG_FS is not set +CONFIG_SCSI_DC395x=m +CONFIG_SCSI_DC390T=m +# CONFIG_SCSI_DEBUG is not set +CONFIG_SCSI_SRP=m +CONFIG_SCSI_LOWLEVEL_PCMCIA=y +CONFIG_PCMCIA_FDOMAIN=m +CONFIG_PCMCIA_QLOGIC=m +CONFIG_PCMCIA_SYM53C500=m +CONFIG_SCSI_DH=m +CONFIG_SCSI_DH_RDAC=m +CONFIG_SCSI_DH_HP_SW=m +CONFIG_SCSI_DH_EMC=m +CONFIG_SCSI_DH_ALUA=m +CONFIG_SCSI_OSD_INITIATOR=m +CONFIG_SCSI_OSD_ULD=m +CONFIG_SCSI_OSD_DPRINT_SENSE=0 +# CONFIG_SCSI_OSD_DEBUG is not set +CONFIG_ATA=m +# CONFIG_ATA_NONSTANDARD is not set +CONFIG_ATA_ACPI=y +CONFIG_SATA_PMP=y +CONFIG_SATA_AHCI=m +CONFIG_SATA_SIL24=m +CONFIG_ATA_SFF=y +CONFIG_SATA_SVW=m +CONFIG_ATA_PIIX=m +CONFIG_SATA_MV=m +CONFIG_SATA_NV=m +CONFIG_PDC_ADMA=m +CONFIG_SATA_QSTOR=m +CONFIG_SATA_PROMISE=m +CONFIG_SATA_SX4=m +CONFIG_SATA_SIL=m +CONFIG_SATA_SIS=m +CONFIG_SATA_ULI=m +CONFIG_SATA_VIA=m +CONFIG_SATA_VITESSE=m +CONFIG_SATA_INIC162X=m +CONFIG_PATA_ACPI=m +CONFIG_PATA_ALI=m +CONFIG_PATA_AMD=m +CONFIG_PATA_ARTOP=m +CONFIG_PATA_ATIIXP=m +CONFIG_PATA_CMD640_PCI=m +CONFIG_PATA_CMD64X=m +CONFIG_PATA_CS5520=m +CONFIG_PATA_CS5530=m +CONFIG_PATA_CYPRESS=m +CONFIG_PATA_EFAR=m +CONFIG_ATA_GENERIC=m +CONFIG_PATA_HPT366=m +CONFIG_PATA_HPT37X=m +CONFIG_PATA_HPT3X2N=m +CONFIG_PATA_HPT3X3=m +# CONFIG_PATA_HPT3X3_DMA is not set +CONFIG_PATA_IT821X=m +CONFIG_PATA_IT8213=m +CONFIG_PATA_JMICRON=m +CONFIG_PATA_TRIFLEX=m +CONFIG_PATA_MARVELL=m +CONFIG_PATA_MPIIX=m +CONFIG_PATA_OLDPIIX=m +CONFIG_PATA_NETCELL=m +CONFIG_PATA_NINJA32=m +CONFIG_PATA_NS87410=m +CONFIG_PATA_NS87415=m +CONFIG_PATA_OPTI=m +CONFIG_PATA_OPTIDMA=m +CONFIG_PATA_PCMCIA=m +CONFIG_PATA_PDC_OLD=m +CONFIG_PATA_RADISYS=m +CONFIG_PATA_RZ1000=m +CONFIG_PATA_SC1200=m +CONFIG_PATA_SERVERWORKS=m +CONFIG_PATA_PDC2027X=m +CONFIG_PATA_SIL680=m +CONFIG_PATA_SIS=m +CONFIG_PATA_VIA=m +CONFIG_PATA_WINBOND=m +CONFIG_PATA_SCH=m +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_RAID6_PQ=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_DEBUG is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_ZERO=m +CONFIG_DM_MULTIPATH=m +CONFIG_DM_MULTIPATH_QL=m +CONFIG_DM_MULTIPATH_ST=m +CONFIG_DM_DELAY=m +CONFIG_DM_UEVENT=y +CONFIG_FUSION=y +CONFIG_FUSION_SPI=m +CONFIG_FUSION_FC=m +CONFIG_FUSION_SAS=m +CONFIG_FUSION_MAX_SGE=128 +CONFIG_FUSION_CTL=m +# CONFIG_FUSION_LOGGING is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# You can enable one or both FireWire driver stacks. +# + +# +# See the help texts for more information. +# +# CONFIG_FIREWIRE is not set +CONFIG_IEEE1394=m +CONFIG_IEEE1394_OHCI1394=m +CONFIG_IEEE1394_PCILYNX=m +CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set +CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y +CONFIG_IEEE1394_ETH1394=m +CONFIG_IEEE1394_RAWIO=m +CONFIG_IEEE1394_VIDEO1394=m +CONFIG_IEEE1394_DV1394=m +# CONFIG_IEEE1394_VERBOSEDEBUG is not set +CONFIG_I2O=m +CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y +CONFIG_I2O_EXT_ADAPTEC=y +CONFIG_I2O_EXT_ADAPTEC_DMA64=y +CONFIG_I2O_CONFIG=m +CONFIG_I2O_CONFIG_OLD_IOCTL=y +CONFIG_I2O_BUS=m +CONFIG_I2O_BLOCK=m +CONFIG_I2O_SCSI=m +CONFIG_I2O_PROC=m +CONFIG_MACINTOSH_DRIVERS=y +CONFIG_MAC_EMUMOUSEBTN=y +CONFIG_NETDEVICES=y +CONFIG_IFB=m +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_MACVLAN=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_NET_SB1000=m +# CONFIG_ARCNET is not set +CONFIG_PHYLIB=m + +# +# MII PHY device drivers +# +CONFIG_MARVELL_PHY=m +CONFIG_DAVICOM_PHY=m +CONFIG_QSEMI_PHY=m +CONFIG_LXT_PHY=m +CONFIG_CICADA_PHY=m +CONFIG_VITESSE_PHY=m +CONFIG_SMSC_PHY=m +CONFIG_BROADCOM_PHY=m +CONFIG_ICPLUS_PHY=m +CONFIG_REALTEK_PHY=m +CONFIG_NATIONAL_PHY=m +CONFIG_STE10XP=m +CONFIG_LSI_ET1011C_PHY=m +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_HAPPYMEAL=m +CONFIG_SUNGEM=m +CONFIG_CASSINI=m +CONFIG_NET_VENDOR_3COM=y +CONFIG_VORTEX=m +CONFIG_TYPHOON=m +CONFIG_ENC28J60=m +# CONFIG_ENC28J60_WRITEVERIFY is not set +CONFIG_ETHOC=m +CONFIG_DNET=m +CONFIG_NET_TULIP=y +CONFIG_DE2104X=m +CONFIG_DE2104X_DSL=0 +CONFIG_TULIP=m +# CONFIG_TULIP_MWI is not set +# CONFIG_TULIP_MMIO is not set +# CONFIG_TULIP_NAPI is not set +CONFIG_DE4X5=m +CONFIG_WINBOND_840=m +CONFIG_DM9102=m +CONFIG_ULI526X=m +CONFIG_PCMCIA_XIRCOM=m +CONFIG_HP100=m +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +CONFIG_NET_PCI=y +CONFIG_PCNET32=m +CONFIG_AMD8111_ETH=m +CONFIG_ADAPTEC_STARFIRE=m +CONFIG_B44=m +CONFIG_B44_PCI_AUTOSELECT=y +CONFIG_B44_PCICORE_AUTOSELECT=y +CONFIG_B44_PCI=y +CONFIG_FORCEDETH=m +# CONFIG_FORCEDETH_NAPI is not set +CONFIG_E100=m +CONFIG_FEALNX=m +CONFIG_NATSEMI=m +CONFIG_NE2K_PCI=m +CONFIG_8139CP=m +CONFIG_8139TOO=m +# CONFIG_8139TOO_PIO is not set +CONFIG_8139TOO_TUNE_TWISTER=y +CONFIG_8139TOO_8129=y +# CONFIG_8139_OLD_RX_RESET is not set +CONFIG_R6040=m +CONFIG_SIS900=m +CONFIG_EPIC100=m +CONFIG_SMSC9420=m +CONFIG_SUNDANCE=m +# CONFIG_SUNDANCE_MMIO is not set +CONFIG_TLAN=m +CONFIG_KS8842=m +CONFIG_KS8851=m +CONFIG_VIA_RHINE=m +# CONFIG_VIA_RHINE_MMIO is not set +CONFIG_SC92031=m +CONFIG_NET_POCKET=y +CONFIG_ATP=m +CONFIG_DE600=m +CONFIG_DE620=m +CONFIG_ATL2=m +CONFIG_NETDEV_1000=y +CONFIG_ACENIC=m +# CONFIG_ACENIC_OMIT_TIGON_I is not set +CONFIG_DL2K=m +CONFIG_E1000=m +CONFIG_E1000E=m +CONFIG_IP1000=m +CONFIG_IGB=m +CONFIG_IGB_DCA=y +CONFIG_IGBVF=m +CONFIG_NS83820=m +CONFIG_HAMACHI=m +CONFIG_YELLOWFIN=m +CONFIG_R8169=m +# CONFIG_R8169_VLAN is not set +CONFIG_SIS190=m +CONFIG_SKGE=m +# CONFIG_SKGE_DEBUG is not set +CONFIG_SKY2=m +# CONFIG_SKY2_DEBUG is not set +CONFIG_VIA_VELOCITY=m +CONFIG_TIGON3=m +CONFIG_BNX2=m +CONFIG_CNIC=m +CONFIG_QLA3XXX=m +CONFIG_ATL1=m +CONFIG_ATL1E=m +CONFIG_ATL1C=m +CONFIG_JME=m +CONFIG_NETDEV_10000=y +CONFIG_MDIO=m +CONFIG_CHELSIO_T1=m +CONFIG_CHELSIO_T1_1G=y +CONFIG_CHELSIO_T3_DEPENDS=y +CONFIG_CHELSIO_T3=m +CONFIG_ENIC=m +CONFIG_IXGBE=m +CONFIG_IXGBE_DCA=y +CONFIG_IXGB=m +CONFIG_S2IO=m +CONFIG_VXGE=m +# CONFIG_VXGE_DEBUG_TRACE_ALL is not set +CONFIG_MYRI10GE=m +CONFIG_MYRI10GE_DCA=y +CONFIG_NETXEN_NIC=m +CONFIG_NIU=m +CONFIG_MLX4_EN=m +CONFIG_MLX4_CORE=m +CONFIG_MLX4_DEBUG=y +CONFIG_TEHUTI=m +CONFIG_BNX2X=m +CONFIG_QLGE=m +CONFIG_SFC=m +CONFIG_SFC_MTD=y +CONFIG_BE2NET=m +# CONFIG_TR is not set + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +CONFIG_WLAN_80211=y +CONFIG_PCMCIA_RAYCS=m +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_CS=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_LIBERTAS_SPI=m +# CONFIG_LIBERTAS_DEBUG is not set +CONFIG_LIBERTAS_THINFIRM=m +CONFIG_LIBERTAS_THINFIRM_USB=m +CONFIG_AIRO=m +CONFIG_ATMEL=m +CONFIG_PCI_ATMEL=m +CONFIG_PCMCIA_ATMEL=m +CONFIG_AT76C50X_USB=m +CONFIG_AIRO_CS=m +CONFIG_PCMCIA_WL3501=m +CONFIG_PRISM54=m +CONFIG_USB_ZD1201=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_RTL8180=m +CONFIG_RTL8187=m +CONFIG_RTL8187_LEDS=y +CONFIG_ADM8211=m +# CONFIG_MAC80211_HWSIM is not set +CONFIG_MWL8K=m +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +CONFIG_P54_PCI=m +CONFIG_P54_SPI=m +CONFIG_P54_LEDS=y +CONFIG_ATH_COMMON=m +CONFIG_ATH5K=m +# CONFIG_ATH5K_DEBUG is not set +CONFIG_ATH9K=m +# CONFIG_ATH9K_DEBUG is not set +CONFIG_AR9170_USB=m +CONFIG_AR9170_LEDS=y +CONFIG_IPW2100=m +CONFIG_IPW2100_MONITOR=y +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +CONFIG_IPW2200_RADIOTAP=y +CONFIG_IPW2200_PROMISCUOUS=y +CONFIG_IPW2200_QOS=y +# CONFIG_IPW2200_DEBUG is not set +CONFIG_LIBIPW=m +# CONFIG_LIBIPW_DEBUG is not set +CONFIG_IWLWIFI=m +CONFIG_IWLWIFI_LEDS=y +CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT=y +# CONFIG_IWLWIFI_DEBUG is not set +CONFIG_IWLAGN=m +CONFIG_IWL4965=y +CONFIG_IWL5000=y +CONFIG_IWL3945=m +CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set +CONFIG_HOSTAP_PLX=m +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_CS=m +CONFIG_B43=m +CONFIG_B43_PCI_AUTOSELECT=y +CONFIG_B43_PCICORE_AUTOSELECT=y +CONFIG_B43_PCMCIA=y +CONFIG_B43_PIO=y +CONFIG_B43_LEDS=y +CONFIG_B43_HWRNG=y +# CONFIG_B43_DEBUG is not set +CONFIG_B43LEGACY=m +CONFIG_B43LEGACY_PCI_AUTOSELECT=y +CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y +CONFIG_B43LEGACY_LEDS=y +CONFIG_B43LEGACY_HWRNG=y +# CONFIG_B43LEGACY_DEBUG is not set +CONFIG_B43LEGACY_DMA=y +CONFIG_B43LEGACY_PIO=y +CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y +# CONFIG_B43LEGACY_DMA_MODE is not set +# CONFIG_B43LEGACY_PIO_MODE is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +CONFIG_RT2X00=m +CONFIG_RT2400PCI=m +CONFIG_RT2500PCI=m +CONFIG_RT61PCI=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2X00_LIB_PCI=m +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_HT=y +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +CONFIG_RT2X00_LIB_RFKILL=y +CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_DEBUG is not set +CONFIG_HERMES=m +CONFIG_HERMES_CACHE_FW_ON_INIT=y +CONFIG_PLX_HERMES=m +CONFIG_TMD_HERMES=m +CONFIG_NORTEL_HERMES=m +CONFIG_PCI_HERMES=m +CONFIG_PCMCIA_HERMES=m +CONFIG_PCMCIA_SPECTRUM=m +CONFIG_WL12XX=m +CONFIG_IWM=m +# CONFIG_IWM_DEBUG is not set + +# +# WiMAX Wireless Broadband devices +# +CONFIG_WIMAX_I2400M=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_WIMAX_I2400M_SDIO=m +CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 + +# +# USB Network Adapters +# +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SMSC95XX=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_CDC_PHONET=m +CONFIG_NET_PCMCIA=y +CONFIG_PCMCIA_3C589=m +CONFIG_PCMCIA_3C574=m +CONFIG_PCMCIA_FMVJ18X=m +CONFIG_PCMCIA_PCNET=m +CONFIG_PCMCIA_NMCLAN=m +CONFIG_PCMCIA_SMC91C92=m +CONFIG_PCMCIA_XIRC2PS=m +CONFIG_PCMCIA_AXNET=m +# CONFIG_WAN is not set +CONFIG_ATM_DRIVERS=y +# CONFIG_ATM_DUMMY is not set +CONFIG_ATM_TCP=m +CONFIG_ATM_LANAI=m +CONFIG_ATM_ENI=m +# CONFIG_ATM_ENI_DEBUG is not set +# CONFIG_ATM_ENI_TUNE_BURST is not set +CONFIG_ATM_FIRESTREAM=m +CONFIG_ATM_ZATM=m +# CONFIG_ATM_ZATM_DEBUG is not set +CONFIG_ATM_IDT77252=m +# CONFIG_ATM_IDT77252_DEBUG is not set +# CONFIG_ATM_IDT77252_RCV_ALL is not set +CONFIG_ATM_IDT77252_USE_SUNI=y +CONFIG_ATM_AMBASSADOR=m +# CONFIG_ATM_AMBASSADOR_DEBUG is not set +CONFIG_ATM_HORIZON=m +# CONFIG_ATM_HORIZON_DEBUG is not set +CONFIG_ATM_IA=m +# CONFIG_ATM_IA_DEBUG is not set +CONFIG_ATM_FORE200E=m +# CONFIG_ATM_FORE200E_USE_TASKLET is not set +CONFIG_ATM_FORE200E_TX_RETRY=16 +CONFIG_ATM_FORE200E_DEBUG=0 +CONFIG_ATM_HE=m +# CONFIG_ATM_HE_USE_SUNI is not set +CONFIG_ATM_SOLOS=m +CONFIG_IEEE802154_DRIVERS=m +CONFIG_IEEE802154_FAKEHARD=m +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PLIP=m +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +CONFIG_PPPOATM=m +CONFIG_PPPOL2TP=m +CONFIG_SLIP=m +# CONFIG_SLIP_COMPRESSED is not set +CONFIG_SLHC=m +# CONFIG_SLIP_SMART is not set +# CONFIG_SLIP_MODE_SLIP6 is not set +# CONFIG_NET_FC is not set +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +CONFIG_VIRTIO_NET=m +CONFIG_ISDN=y +CONFIG_MISDN=m +CONFIG_MISDN_DSP=m +CONFIG_MISDN_L1OIP=m + +# +# mISDN hardware drivers +# +CONFIG_MISDN_HFCPCI=m +CONFIG_MISDN_HFCMULTI=m +CONFIG_MISDN_HFCUSB=m +CONFIG_ISDN_I4L=m +CONFIG_ISDN_PPP=y +CONFIG_ISDN_PPP_VJ=y +CONFIG_ISDN_MPP=y +CONFIG_IPPP_FILTER=y +CONFIG_ISDN_PPP_BSDCOMP=m +CONFIG_ISDN_AUDIO=y +CONFIG_ISDN_TTY_FAX=y + +# +# ISDN feature submodules +# +CONFIG_ISDN_DIVERSION=m + +# +# ISDN4Linux hardware drivers +# + +# +# Passive cards +# +CONFIG_ISDN_DRV_HISAX=m + +# +# D-channel protocol features +# +CONFIG_HISAX_EURO=y +CONFIG_DE_AOC=y +# CONFIG_HISAX_NO_SENDCOMPLETE is not set +# CONFIG_HISAX_NO_LLC is not set +# CONFIG_HISAX_NO_KEYPAD is not set +CONFIG_HISAX_1TR6=y +CONFIG_HISAX_NI1=y +CONFIG_HISAX_MAX_CARDS=8 + +# +# HiSax supported cards +# +CONFIG_HISAX_16_3=y +CONFIG_HISAX_TELESPCI=y +CONFIG_HISAX_S0BOX=y +CONFIG_HISAX_FRITZPCI=y +CONFIG_HISAX_AVM_A1_PCMCIA=y +CONFIG_HISAX_ELSA=y +CONFIG_HISAX_DIEHLDIVA=y +CONFIG_HISAX_SEDLBAUER=y +CONFIG_HISAX_NETJET=y +CONFIG_HISAX_NETJET_U=y +CONFIG_HISAX_NICCY=y +CONFIG_HISAX_BKM_A4T=y +CONFIG_HISAX_SCT_QUADRO=y +CONFIG_HISAX_GAZEL=y +CONFIG_HISAX_HFC_PCI=y +CONFIG_HISAX_W6692=y +CONFIG_HISAX_HFC_SX=y +CONFIG_HISAX_ENTERNOW_PCI=y +# CONFIG_HISAX_DEBUG is not set + +# +# HiSax PCMCIA card service modules +# +CONFIG_HISAX_SEDLBAUER_CS=m +CONFIG_HISAX_ELSA_CS=m +CONFIG_HISAX_AVM_A1_CS=m +CONFIG_HISAX_TELES_CS=m + +# +# HiSax sub driver modules +# +CONFIG_HISAX_ST5481=m +CONFIG_HISAX_HFCUSB=m +CONFIG_HISAX_HFC4S8S=m +CONFIG_HISAX_FRITZ_PCIPNP=m +CONFIG_HISAX_HDLC=y + +# +# Active cards +# +CONFIG_HYSDN=m +CONFIG_HYSDN_CAPI=y +CONFIG_ISDN_CAPI=m +CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y +CONFIG_CAPI_TRACE=y +CONFIG_ISDN_CAPI_MIDDLEWARE=y +CONFIG_ISDN_CAPI_CAPI20=m +CONFIG_ISDN_CAPI_CAPIFS_BOOL=y +CONFIG_ISDN_CAPI_CAPIFS=m +CONFIG_ISDN_CAPI_CAPIDRV=m + +# +# CAPI hardware drivers +# +CONFIG_CAPI_AVM=y +CONFIG_ISDN_DRV_AVMB1_B1PCI=m +CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y +CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m +CONFIG_ISDN_DRV_AVMB1_AVM_CS=m +CONFIG_ISDN_DRV_AVMB1_T1PCI=m +CONFIG_ISDN_DRV_AVMB1_C4=m +CONFIG_CAPI_EICON=y +CONFIG_ISDN_DIVAS=m +CONFIG_ISDN_DIVAS_BRIPCI=y +CONFIG_ISDN_DIVAS_PRIPCI=y +CONFIG_ISDN_DIVAS_DIVACAPI=m +CONFIG_ISDN_DIVAS_USERIDI=m +CONFIG_ISDN_DIVAS_MAINT=m +CONFIG_ISDN_DRV_GIGASET=m +CONFIG_GIGASET_BASE=m +CONFIG_GIGASET_M105=m +CONFIG_GIGASET_M101=m +# CONFIG_GIGASET_DEBUG is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=m +CONFIG_INPUT_POLLDEV=m + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +CONFIG_MOUSE_PS2_ELANTECH=y +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +CONFIG_MOUSE_SERIAL=y +CONFIG_MOUSE_APPLETOUCH=m +CONFIG_MOUSE_BCM5974=m +CONFIG_MOUSE_VSXXXAA=m +CONFIG_MOUSE_SYNAPTICS_I2C=m +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_ANALOG=m +CONFIG_JOYSTICK_A3D=m +CONFIG_JOYSTICK_ADI=m +CONFIG_JOYSTICK_COBRA=m +CONFIG_JOYSTICK_GF2K=m +CONFIG_JOYSTICK_GRIP=m +CONFIG_JOYSTICK_GRIP_MP=m +CONFIG_JOYSTICK_GUILLEMOT=m +CONFIG_JOYSTICK_INTERACT=m +CONFIG_JOYSTICK_SIDEWINDER=m +CONFIG_JOYSTICK_TMDC=m +CONFIG_JOYSTICK_IFORCE=m +CONFIG_JOYSTICK_IFORCE_USB=y +CONFIG_JOYSTICK_IFORCE_232=y +CONFIG_JOYSTICK_WARRIOR=m +CONFIG_JOYSTICK_MAGELLAN=m +CONFIG_JOYSTICK_SPACEORB=m +CONFIG_JOYSTICK_SPACEBALL=m +CONFIG_JOYSTICK_STINGER=m +CONFIG_JOYSTICK_TWIDJOY=m +CONFIG_JOYSTICK_ZHENHUA=m +CONFIG_JOYSTICK_DB9=m +CONFIG_JOYSTICK_GAMECON=m +CONFIG_JOYSTICK_TURBOGRAFX=m +CONFIG_JOYSTICK_JOYDUMP=m +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_JOYSTICK_WALKERA0701=m +CONFIG_INPUT_TABLET=y +CONFIG_TABLET_USB_ACECAD=m +CONFIG_TABLET_USB_AIPTEK=m +CONFIG_TABLET_USB_GTCO=m +CONFIG_TABLET_USB_KBTAB=m +CONFIG_TABLET_USB_WACOM=m +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_AD7877=m +CONFIG_TOUCHSCREEN_AD7879_I2C=m +CONFIG_TOUCHSCREEN_AD7879=m +CONFIG_TOUCHSCREEN_EETI=m +CONFIG_TOUCHSCREEN_FUJITSU=m +CONFIG_TOUCHSCREEN_GUNZE=m +CONFIG_TOUCHSCREEN_ELO=m +CONFIG_TOUCHSCREEN_WACOM_W8001=m +CONFIG_TOUCHSCREEN_MTOUCH=m +CONFIG_TOUCHSCREEN_INEXIO=m +CONFIG_TOUCHSCREEN_MK712=m +CONFIG_TOUCHSCREEN_PENMOUNT=m +CONFIG_TOUCHSCREEN_TOUCHRIGHT=m +CONFIG_TOUCHSCREEN_TOUCHWIN=m +CONFIG_TOUCHSCREEN_WM97XX=m +# CONFIG_TOUCHSCREEN_WM9705 is not set +# CONFIG_TOUCHSCREEN_WM9712 is not set +# CONFIG_TOUCHSCREEN_WM9713 is not set +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_USB_EGALAX=y +CONFIG_TOUCHSCREEN_USB_PANJIT=y +CONFIG_TOUCHSCREEN_USB_3M=y +CONFIG_TOUCHSCREEN_USB_ITM=y +CONFIG_TOUCHSCREEN_USB_ETURBO=y +CONFIG_TOUCHSCREEN_USB_GUNZE=y +CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y +CONFIG_TOUCHSCREEN_USB_IRTOUCH=y +CONFIG_TOUCHSCREEN_USB_IDEALTEK=y +CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y +CONFIG_TOUCHSCREEN_USB_GOTOP=y +CONFIG_TOUCHSCREEN_TOUCHIT213=m +CONFIG_TOUCHSCREEN_TSC2007=m +CONFIG_TOUCHSCREEN_W90X900=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_PCSPKR=m +CONFIG_INPUT_APANEL=m +CONFIG_INPUT_ATLAS_BTNS=m +CONFIG_INPUT_ATI_REMOTE=m +CONFIG_INPUT_ATI_REMOTE2=m +CONFIG_INPUT_KEYSPAN_REMOTE=m +CONFIG_INPUT_POWERMATE=m +CONFIG_INPUT_YEALINK=m +CONFIG_INPUT_CM109=m +CONFIG_INPUT_UINPUT=m +CONFIG_INPUT_PCF50633_PMU=m + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +CONFIG_SERIO_SERPORT=m +CONFIG_SERIO_CT82C710=m +CONFIG_SERIO_PARKBD=m +CONFIG_SERIO_PCIPS2=m +CONFIG_SERIO_LIBPS2=y +CONFIG_SERIO_RAW=m +CONFIG_GAMEPORT=m +CONFIG_GAMEPORT_NS558=m +CONFIG_GAMEPORT_L4=m +CONFIG_GAMEPORT_EMU10K1=m +CONFIG_GAMEPORT_FM801=m + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_DEVKMEM=y +CONFIG_SERIAL_NONSTANDARD=y +# CONFIG_COMPUTONE is not set +CONFIG_ROCKETPORT=m +CONFIG_CYCLADES=m +# CONFIG_CYZ_INTR is not set +# CONFIG_DIGIEPCA is not set +# CONFIG_MOXA_INTELLIO is not set +# CONFIG_MOXA_SMARTIO is not set +# CONFIG_ISI is not set +CONFIG_SYNCLINK=m +CONFIG_SYNCLINKMP=m +# CONFIG_SYNCLINK_GT is not set +CONFIG_N_HDLC=m +# CONFIG_RISCOM8 is not set +# CONFIG_SPECIALIX is not set +# CONFIG_STALDRV is not set +CONFIG_NOZOMI=m + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_PNP=y +CONFIG_SERIAL_8250_CS=m +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_MAX3100=m +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_JSM=m +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +CONFIG_PRINTER=m +# CONFIG_LP_CONSOLE is not set +CONFIG_PPDEV=m +CONFIG_HVC_DRIVER=y +CONFIG_VIRTIO_CONSOLE=m +CONFIG_IPMI_HANDLER=m +# CONFIG_IPMI_PANIC_EVENT is not set +CONFIG_IPMI_DEVICE_INTERFACE=m +CONFIG_IPMI_SI=m +CONFIG_IPMI_WATCHDOG=m +CONFIG_IPMI_POWEROFF=m +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_TIMERIOMEM=m +CONFIG_HW_RANDOM_INTEL=m +CONFIG_HW_RANDOM_AMD=m +CONFIG_HW_RANDOM_VIA=m +CONFIG_HW_RANDOM_VIRTIO=m +CONFIG_NVRAM=m +CONFIG_R3964=m +CONFIG_APPLICOM=m + +# +# PCMCIA character devices +# +CONFIG_SYNCLINK_CS=m +CONFIG_CARDMAN_4000=m +CONFIG_CARDMAN_4040=m +CONFIG_IPWIRELESS=m +CONFIG_MWAVE=m +CONFIG_PC8736x_GPIO=m +CONFIG_NSC_GPIO=m +# CONFIG_RAW_DRIVER is not set +# CONFIG_HPET is not set +CONFIG_HANGCHECK_TIMER=m +CONFIG_TCG_TPM=m +CONFIG_TCG_TIS=m +CONFIG_TCG_NSC=m +CONFIG_TCG_ATMEL=m +CONFIG_TCG_INFINEON=m +CONFIG_TELCLOCK=m +CONFIG_DEVPORT=y +CONFIG_I2C=m +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=m +CONFIG_I2C_ALGOPCA=m + +# +# I2C Hardware Bus support +# + +# +# PC SMBus host controller drivers +# +CONFIG_I2C_ALI1535=m +CONFIG_I2C_ALI1563=m +CONFIG_I2C_ALI15X3=m +CONFIG_I2C_AMD756=m +CONFIG_I2C_AMD756_S4882=m +CONFIG_I2C_AMD8111=m +CONFIG_I2C_I801=m +CONFIG_I2C_ISCH=m +CONFIG_I2C_PIIX4=m +CONFIG_I2C_NFORCE2=m +CONFIG_I2C_NFORCE2_S4985=m +CONFIG_I2C_SIS5595=m +CONFIG_I2C_SIS630=m +CONFIG_I2C_SIS96X=m +CONFIG_I2C_VIA=m +CONFIG_I2C_VIAPRO=m + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +CONFIG_I2C_OCORES=m +CONFIG_I2C_SIMTEC=m + +# +# External I2C/SMBus adapter drivers +# +CONFIG_I2C_PARPORT=m +CONFIG_I2C_PARPORT_LIGHT=m +CONFIG_I2C_TAOS_EVM=m +CONFIG_I2C_TINY_USB=m + +# +# Graphics adapter I2C/DDC channel drivers +# +CONFIG_I2C_VOODOO3=m + +# +# Other I2C/SMBus bus drivers +# +CONFIG_I2C_PCA_PLATFORM=m +# CONFIG_I2C_STUB is not set + +# +# Miscellaneous I2C Chip support +# +CONFIG_DS1682=m +CONFIG_SENSORS_PCF8574=m +CONFIG_PCF8575=m +CONFIG_SENSORS_PCA9539=m +CONFIG_SENSORS_TSL2550=m +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +CONFIG_SPI_BITBANG=m +CONFIG_SPI_BUTTERFLY=m +CONFIG_SPI_LM70_LLP=m + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=m +CONFIG_SPI_TLE62X0=m + +# +# PPS support +# +CONFIG_PPS=m +# CONFIG_PPS_DEBUG is not set +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +# CONFIG_GPIOLIB is not set +CONFIG_W1=m +CONFIG_W1_CON=y + +# +# 1-wire Bus Masters +# +CONFIG_W1_MASTER_MATROX=m +CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS2482=m + +# +# 1-wire Slaves +# +CONFIG_W1_SLAVE_THERM=m +CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2431=m +CONFIG_W1_SLAVE_DS2433=m +# CONFIG_W1_SLAVE_DS2433_CRC is not set +CONFIG_W1_SLAVE_DS2760=m +CONFIG_W1_SLAVE_BQ27000=m +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +CONFIG_PDA_POWER=m +CONFIG_WM8350_POWER=m +CONFIG_BATTERY_DS2760=m +CONFIG_BATTERY_DS2782=m +CONFIG_BATTERY_BQ27x00=m +CONFIG_BATTERY_MAX17040=m +CONFIG_CHARGER_PCF50633=m +CONFIG_HWMON=y +CONFIG_HWMON_VID=m +CONFIG_SENSORS_ABITUGURU=m +CONFIG_SENSORS_ABITUGURU3=m +CONFIG_SENSORS_AD7414=m +CONFIG_SENSORS_AD7418=m +CONFIG_SENSORS_ADCXX=m +CONFIG_SENSORS_ADM1021=m +CONFIG_SENSORS_ADM1025=m +CONFIG_SENSORS_ADM1026=m +CONFIG_SENSORS_ADM1029=m +CONFIG_SENSORS_ADM1031=m +CONFIG_SENSORS_ADM9240=m +CONFIG_SENSORS_ADT7462=m +CONFIG_SENSORS_ADT7470=m +CONFIG_SENSORS_ADT7473=m +CONFIG_SENSORS_ADT7475=m +CONFIG_SENSORS_K8TEMP=m +CONFIG_SENSORS_ASB100=m +CONFIG_SENSORS_ATK0110=m +CONFIG_SENSORS_ATXP1=m +CONFIG_SENSORS_DS1621=m +CONFIG_SENSORS_I5K_AMB=m +CONFIG_SENSORS_F71805F=m +CONFIG_SENSORS_F71882FG=m +CONFIG_SENSORS_F75375S=m +CONFIG_SENSORS_FSCHER=m +CONFIG_SENSORS_FSCPOS=m +CONFIG_SENSORS_FSCHMD=m +CONFIG_SENSORS_G760A=m +CONFIG_SENSORS_GL518SM=m +CONFIG_SENSORS_GL520SM=m +CONFIG_SENSORS_CORETEMP=m +CONFIG_SENSORS_IBMAEM=m +CONFIG_SENSORS_IBMPEX=m +CONFIG_SENSORS_IT87=m +CONFIG_SENSORS_LM63=m +CONFIG_SENSORS_LM70=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_LM77=m +CONFIG_SENSORS_LM78=m +CONFIG_SENSORS_LM80=m +CONFIG_SENSORS_LM83=m +CONFIG_SENSORS_LM85=m +CONFIG_SENSORS_LM87=m +CONFIG_SENSORS_LM90=m +CONFIG_SENSORS_LM92=m +CONFIG_SENSORS_LM93=m +CONFIG_SENSORS_LTC4215=m +CONFIG_SENSORS_LTC4245=m +CONFIG_SENSORS_LM95241=m +CONFIG_SENSORS_MAX1111=m +CONFIG_SENSORS_MAX1619=m +CONFIG_SENSORS_MAX6650=m +CONFIG_SENSORS_PC87360=m +CONFIG_SENSORS_PC87427=m +CONFIG_SENSORS_PCF8591=m +CONFIG_SENSORS_SIS5595=m +CONFIG_SENSORS_DME1737=m +CONFIG_SENSORS_SMSC47M1=m +CONFIG_SENSORS_SMSC47M192=m +CONFIG_SENSORS_SMSC47B397=m +CONFIG_SENSORS_ADS7828=m +CONFIG_SENSORS_THMC50=m +CONFIG_SENSORS_TMP401=m +CONFIG_SENSORS_VIA686A=m +CONFIG_SENSORS_VT1211=m +CONFIG_SENSORS_VT8231=m +CONFIG_SENSORS_W83781D=m +CONFIG_SENSORS_W83791D=m +CONFIG_SENSORS_W83792D=m +CONFIG_SENSORS_W83793=m +CONFIG_SENSORS_W83L785TS=m +CONFIG_SENSORS_W83L786NG=m +CONFIG_SENSORS_W83627HF=m +CONFIG_SENSORS_W83627EHF=m +CONFIG_SENSORS_HDAPS=m +CONFIG_SENSORS_LIS3LV02D=m +CONFIG_SENSORS_APPLESMC=m +# CONFIG_HWMON_DEBUG_CHIP is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +CONFIG_SOFT_WATCHDOG=m +CONFIG_WM8350_WATCHDOG=m +CONFIG_ACQUIRE_WDT=m +CONFIG_ADVANTECH_WDT=m +CONFIG_ALIM1535_WDT=m +CONFIG_ALIM7101_WDT=m +CONFIG_SC520_WDT=m +CONFIG_EUROTECH_WDT=m +CONFIG_IB700_WDT=m +CONFIG_IBMASR=m +CONFIG_WAFER_WDT=m +CONFIG_I6300ESB_WDT=m +CONFIG_ITCO_WDT=m +CONFIG_ITCO_VENDOR_SUPPORT=y +CONFIG_IT8712F_WDT=m +CONFIG_IT87_WDT=m +CONFIG_HP_WATCHDOG=m +CONFIG_SC1200_WDT=m +CONFIG_PC87413_WDT=m +CONFIG_60XX_WDT=m +CONFIG_SBC8360_WDT=m +CONFIG_CPU5_WDT=m +CONFIG_SMSC_SCH311X_WDT=m +CONFIG_SMSC37B787_WDT=m +CONFIG_W83627HF_WDT=m +CONFIG_W83697HF_WDT=m +CONFIG_W83697UG_WDT=m +CONFIG_W83877F_WDT=m +CONFIG_W83977F_WDT=m +CONFIG_MACHZ_WDT=m +CONFIG_SBC_EPX_C3_WATCHDOG=m + +# +# PCI-based Watchdog Cards +# +CONFIG_PCIPCWATCHDOG=m +CONFIG_WDTPCI=m + +# +# USB-based Watchdog Cards +# +CONFIG_USBPCWATCHDOG=m +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_SPROM=y +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +CONFIG_SSB_B43_PCI_BRIDGE=y +CONFIG_SSB_PCMCIAHOST_POSSIBLE=y +CONFIG_SSB_PCMCIAHOST=y +# CONFIG_SSB_DEBUG is not set +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +CONFIG_SSB_DRIVER_PCICORE=y + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=m +CONFIG_MFD_SM501=m +# CONFIG_HTC_PASIC3 is not set +# CONFIG_MFD_TMIO is not set +CONFIG_MFD_WM8400=m +CONFIG_MFD_WM8350=m +CONFIG_MFD_WM8350_I2C=m +CONFIG_MFD_PCF50633=m +CONFIG_PCF50633_ADC=m +CONFIG_PCF50633_GPIO=m +CONFIG_AB3100_CORE=m +# CONFIG_EZX_PCAP is not set +# CONFIG_REGULATOR is not set +CONFIG_MEDIA_SUPPORT=m + +# +# Multimedia core support +# +CONFIG_VIDEO_DEV=m +CONFIG_VIDEO_V4L2_COMMON=m +CONFIG_VIDEO_ALLOW_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m + +# +# Multimedia drivers +# +CONFIG_VIDEO_SAA7146=m +CONFIG_VIDEO_SAA7146_VV=m +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +# CONFIG_MEDIA_TUNER_CUSTOMISE is not set +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA827X=m +CONFIG_MEDIA_TUNER_TDA18271=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_MT2131=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=m +CONFIG_VIDEO_V4L2=m +CONFIG_VIDEO_V4L1=m +CONFIG_VIDEOBUF_GEN=m +CONFIG_VIDEOBUF_DMA_SG=m +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DVB=m +CONFIG_VIDEO_BTCX=m +CONFIG_VIDEO_IR=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set +CONFIG_VIDEO_IR_I2C=m + +# +# Encoders/decoders and other helper chips +# + +# +# Audio decoders +# +CONFIG_VIDEO_TVAUDIO=m +CONFIG_VIDEO_TDA7432=m +CONFIG_VIDEO_TDA9840=m +CONFIG_VIDEO_TDA9875=m +CONFIG_VIDEO_TEA6415C=m +CONFIG_VIDEO_TEA6420=m +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS5345=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_M52790=m +CONFIG_VIDEO_TLV320AIC23B=m +CONFIG_VIDEO_WM8775=m +CONFIG_VIDEO_WM8739=m +CONFIG_VIDEO_VP27SMPX=m + +# +# RDS decoders +# +CONFIG_VIDEO_SAA6588=m + +# +# Video decoders +# +CONFIG_VIDEO_BT819=m +CONFIG_VIDEO_BT856=m +CONFIG_VIDEO_BT866=m +CONFIG_VIDEO_KS0127=m +CONFIG_VIDEO_OV7670=m +CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_TCM825X=m +CONFIG_VIDEO_SAA7110=m +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_SAA717X=m +CONFIG_VIDEO_SAA7191=m +CONFIG_VIDEO_TVP514X=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_VPX3220=m + +# +# Video and audio decoders +# +CONFIG_VIDEO_CX25840=m + +# +# MPEG video encoders +# +CONFIG_VIDEO_CX2341X=m + +# +# Video encoders +# +CONFIG_VIDEO_SAA7127=m +CONFIG_VIDEO_SAA7185=m +CONFIG_VIDEO_ADV7170=m +CONFIG_VIDEO_ADV7175=m +CONFIG_VIDEO_THS7303=m +CONFIG_VIDEO_ADV7343=m + +# +# Video improvement chips +# +CONFIG_VIDEO_UPD64031A=m +CONFIG_VIDEO_UPD64083=m +CONFIG_VIDEO_VIVI=m +CONFIG_VIDEO_BT848=m +CONFIG_VIDEO_BT848_DVB=y +CONFIG_VIDEO_BWQCAM=m +CONFIG_VIDEO_CQCAM=m +CONFIG_VIDEO_W9966=m +CONFIG_VIDEO_CPIA=m +CONFIG_VIDEO_CPIA_PP=m +CONFIG_VIDEO_CPIA_USB=m +CONFIG_VIDEO_CPIA2=m +CONFIG_VIDEO_SAA5246A=m +CONFIG_VIDEO_SAA5249=m +CONFIG_VIDEO_STRADIS=m +CONFIG_VIDEO_ZORAN=m +CONFIG_VIDEO_ZORAN_DC30=m +CONFIG_VIDEO_ZORAN_ZR36060=m +CONFIG_VIDEO_ZORAN_BUZ=m +CONFIG_VIDEO_ZORAN_DC10=m +CONFIG_VIDEO_ZORAN_LML33=m +CONFIG_VIDEO_ZORAN_LML33R10=m +CONFIG_VIDEO_ZORAN_AVS6EYES=m +CONFIG_VIDEO_MEYE=m +CONFIG_VIDEO_SAA7134=m +CONFIG_VIDEO_SAA7134_ALSA=m +CONFIG_VIDEO_SAA7134_DVB=m +CONFIG_VIDEO_MXB=m +CONFIG_VIDEO_HEXIUM_ORION=m +CONFIG_VIDEO_HEXIUM_GEMINI=m +CONFIG_VIDEO_CX88=m +CONFIG_VIDEO_CX88_ALSA=m +CONFIG_VIDEO_CX88_BLACKBIRD=m +CONFIG_VIDEO_CX88_DVB=m +CONFIG_VIDEO_CX88_MPEG=m +CONFIG_VIDEO_CX88_VP3054=m +CONFIG_VIDEO_CX23885=m +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_IVTV=m +CONFIG_VIDEO_FB_IVTV=m +CONFIG_VIDEO_CX18=m +CONFIG_VIDEO_CAFE_CCIC=m +CONFIG_SOC_CAMERA=m +CONFIG_SOC_CAMERA_MT9M001=m +CONFIG_SOC_CAMERA_MT9M111=m +CONFIG_SOC_CAMERA_MT9T031=m +CONFIG_SOC_CAMERA_MT9V022=m +CONFIG_SOC_CAMERA_TW9910=m +CONFIG_SOC_CAMERA_PLATFORM=m +CONFIG_SOC_CAMERA_OV772X=m +CONFIG_V4L_USB_DRIVERS=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SN9C20X_EVDEV=y +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_USBVIDEO=m +CONFIG_USB_VICAM=m +CONFIG_USB_IBMCAM=m +CONFIG_USB_KONICAWC=m +CONFIG_USB_QUICKCAM_MESSENGER=m +CONFIG_USB_ET61X251=m +CONFIG_VIDEO_OVCAMCHIP=m +CONFIG_USB_W9968CF=m +CONFIG_USB_OV511=m +CONFIG_USB_SE401=m +CONFIG_USB_SN9C102=m +CONFIG_USB_STV680=m +CONFIG_USB_ZC0301=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_RADIO_ADAPTERS=y +CONFIG_RADIO_GEMTEK_PCI=m +CONFIG_RADIO_MAXIRADIO=m +CONFIG_RADIO_MAESTRO=m +CONFIG_USB_DSBR=m +CONFIG_USB_SI470X=m +CONFIG_USB_MR800=m +CONFIG_RADIO_TEA5764=m +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y + +# +# Supported SAA7146 based PCI Adapters +# +CONFIG_TTPCI_EEPROM=m +CONFIG_DVB_AV7110=m +CONFIG_DVB_AV7110_OSD=y +CONFIG_DVB_BUDGET_CORE=m +CONFIG_DVB_BUDGET=m +CONFIG_DVB_BUDGET_CI=m +CONFIG_DVB_BUDGET_AV=m +CONFIG_DVB_BUDGET_PATCH=m + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_TTUSB_BUDGET=m +CONFIG_DVB_TTUSB_DEC=m +CONFIG_SMS_SIANO_MDTV=m + +# +# Siano module components +# +CONFIG_SMS_USB_DRV=m +CONFIG_SMS_SDIO_DRV=m + +# +# Supported FlexCopII (B2C2) Adapters +# +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_DVB_B2C2_FLEXCOP_PCI=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set + +# +# Supported BT878 Adapters +# +CONFIG_DVB_BT8XX=m + +# +# Supported Pluto2 Adapters +# +CONFIG_DVB_PLUTO2=m + +# +# Supported SDMC DM1105 Adapters +# +CONFIG_DVB_DM1105=m + +# +# Supported FireWire (IEEE 1394) Adapters +# +CONFIG_DVB_FIREDTV=m +CONFIG_DVB_FIREDTV_IEEE1394=y +CONFIG_DVB_FIREDTV_INPUT=y + +# +# Supported DVB Frontends +# +# CONFIG_DVB_FE_CUSTOMISE is not set +CONFIG_DVB_STB0899=m +CONFIG_DVB_STB6100=m +CONFIG_DVB_CX24110=m +CONFIG_DVB_CX24123=m +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10036=m +CONFIG_DVB_S5H1420=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_TDA8083=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TDA8261=m +CONFIG_DVB_VES1X93=m +CONFIG_DVB_TUNER_ITD1000=m +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TDA826X=m +CONFIG_DVB_TUA6100=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_SP8870=m +CONFIG_DVB_SP887X=m +CONFIG_DVB_CX22700=m +CONFIG_DVB_CX22702=m +CONFIG_DVB_L64781=m +CONFIG_DVB_TDA1004X=m +CONFIG_DVB_NXT6000=m +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_AF9013=m +CONFIG_DVB_VES1820=m +CONFIG_DVB_TDA10021=m +CONFIG_DVB_TDA10023=m +CONFIG_DVB_STV0297=m +CONFIG_DVB_NXT200X=m +CONFIG_DVB_OR51211=m +CONFIG_DVB_OR51132=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_S5H1409=m +CONFIG_DVB_AU8522=m +CONFIG_DVB_S5H1411=m +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_LNBP21=m +CONFIG_DVB_ISL6405=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_LGS8GL5=m +CONFIG_DAB=y +CONFIG_USB_DABUSB=m + +# +# Graphics support +# +CONFIG_AGP=y +CONFIG_AGP_AMD64=y +CONFIG_AGP_INTEL=m +CONFIG_AGP_SIS=m +CONFIG_AGP_VIA=m +CONFIG_DRM=m +CONFIG_DRM_TTM=m +CONFIG_DRM_TDFX=m +CONFIG_DRM_R128=m +CONFIG_DRM_RADEON=m +CONFIG_DRM_I810=m +CONFIG_DRM_I830=m +CONFIG_DRM_I915=m +# CONFIG_DRM_I915_KMS is not set +CONFIG_DRM_MGA=m +CONFIG_DRM_SIS=m +CONFIG_DRM_VIA=m +CONFIG_DRM_SAVAGE=m +CONFIG_VGASTATE=m +CONFIG_VIDEO_OUTPUT_CONTROL=m +CONFIG_FB=y +CONFIG_FIRMWARE_EDID=y +CONFIG_FB_DDC=m +CONFIG_FB_BOOT_VESA_SUPPORT=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +CONFIG_FB_SYS_FILLRECT=m +CONFIG_FB_SYS_COPYAREA=m +CONFIG_FB_SYS_IMAGEBLIT=m +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=m +CONFIG_FB_SVGALIB=m +# CONFIG_FB_MACMODES is not set +CONFIG_FB_BACKLIGHT=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y + +# +# Frame buffer hardware drivers +# +CONFIG_FB_CIRRUS=m +CONFIG_FB_PM2=m +CONFIG_FB_PM2_FIFO_DISCONNECT=y +CONFIG_FB_CYBER2000=m +# CONFIG_FB_ARC is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_VGA16 is not set +CONFIG_FB_UVESA=m +CONFIG_FB_VESA=y +CONFIG_FB_EFI=y +# CONFIG_FB_N411 is not set +# CONFIG_FB_HGA is not set +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_NVIDIA=m +CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA_DEBUG is not set +CONFIG_FB_NVIDIA_BACKLIGHT=y +CONFIG_FB_RIVA=m +CONFIG_FB_RIVA_I2C=y +# CONFIG_FB_RIVA_DEBUG is not set +CONFIG_FB_RIVA_BACKLIGHT=y +CONFIG_FB_LE80578=m +CONFIG_FB_CARILLO_RANCH=m +# CONFIG_FB_MATROX is not set +CONFIG_FB_RADEON=m +CONFIG_FB_RADEON_I2C=y +CONFIG_FB_RADEON_BACKLIGHT=y +# CONFIG_FB_RADEON_DEBUG is not set +CONFIG_FB_ATY128=m +CONFIG_FB_ATY128_BACKLIGHT=y +CONFIG_FB_ATY=m +CONFIG_FB_ATY_CT=y +CONFIG_FB_ATY_GENERIC_LCD=y +CONFIG_FB_ATY_GX=y +CONFIG_FB_ATY_BACKLIGHT=y +CONFIG_FB_S3=m +CONFIG_FB_SAVAGE=m +CONFIG_FB_SAVAGE_I2C=y +CONFIG_FB_SAVAGE_ACCEL=y +CONFIG_FB_SIS=m +CONFIG_FB_SIS_300=y +CONFIG_FB_SIS_315=y +CONFIG_FB_VIA=m +CONFIG_FB_NEOMAGIC=m +CONFIG_FB_KYRO=m +CONFIG_FB_3DFX=m +CONFIG_FB_3DFX_ACCEL=y +CONFIG_FB_3DFX_I2C=y +CONFIG_FB_VOODOO1=m +CONFIG_FB_VT8623=m +CONFIG_FB_TRIDENT=m +# CONFIG_FB_ARK is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_CARMINE is not set +# CONFIG_FB_GEODE is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_SM501 is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_LCD_LTV350QV=m +CONFIG_LCD_ILI9320=m +CONFIG_LCD_TDO24M=m +CONFIG_LCD_VGG2432A4=m +CONFIG_LCD_PLATFORM=m +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_GENERIC=m +CONFIG_BACKLIGHT_PROGEAR=m +CONFIG_BACKLIGHT_CARILLO_RANCH=m +CONFIG_BACKLIGHT_MBP_NVIDIA=m +CONFIG_BACKLIGHT_SAHARA=m + +# +# Display device support +# +CONFIG_DISPLAY_SUPPORT=m + +# +# Display hardware drivers +# + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +# CONFIG_VGACON_SOFT_SCROLLBACK is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_SOUND=m +CONFIG_SOUND_OSS_CORE=y +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +CONFIG_SND_SEQ_DUMMY=m +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +CONFIG_SND_RAWMIDI_SEQ=m +CONFIG_SND_OPL3_LIB_SEQ=m +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +CONFIG_SND_EMU10K1_SEQ=m +CONFIG_SND_MPU401_UART=m +CONFIG_SND_OPL3_LIB=m +CONFIG_SND_VX_LIB=m +CONFIG_SND_AC97_CODEC=m +CONFIG_SND_DRIVERS=y +# CONFIG_SND_PCSP is not set +CONFIG_SND_DUMMY=m +CONFIG_SND_VIRMIDI=m +CONFIG_SND_MTPAV=m +CONFIG_SND_MTS64=m +CONFIG_SND_SERIAL_U16550=m +CONFIG_SND_MPU401=m +CONFIG_SND_PORTMAN2X4=m +CONFIG_SND_AC97_POWER_SAVE=y +CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0 +CONFIG_SND_SB_COMMON=m +CONFIG_SND_SB16_DSP=m +CONFIG_SND_PCI=y +CONFIG_SND_AD1889=m +CONFIG_SND_ALS300=m +CONFIG_SND_ALS4000=m +CONFIG_SND_ALI5451=m +CONFIG_SND_ATIIXP=m +CONFIG_SND_ATIIXP_MODEM=m +CONFIG_SND_AU8810=m +CONFIG_SND_AU8820=m +CONFIG_SND_AU8830=m +CONFIG_SND_AW2=m +CONFIG_SND_AZT3328=m +CONFIG_SND_BT87X=m +# CONFIG_SND_BT87X_OVERCLOCK is not set +CONFIG_SND_CA0106=m +CONFIG_SND_CMIPCI=m +CONFIG_SND_OXYGEN_LIB=m +CONFIG_SND_OXYGEN=m +CONFIG_SND_CS4281=m +CONFIG_SND_CS46XX=m +CONFIG_SND_CS46XX_NEW_DSP=y +CONFIG_SND_CS5530=m +CONFIG_SND_CTXFI=m +CONFIG_SND_DARLA20=m +CONFIG_SND_GINA20=m +CONFIG_SND_LAYLA20=m +CONFIG_SND_DARLA24=m +CONFIG_SND_GINA24=m +CONFIG_SND_LAYLA24=m +CONFIG_SND_MONA=m +CONFIG_SND_MIA=m +CONFIG_SND_ECHO3G=m +CONFIG_SND_INDIGO=m +CONFIG_SND_INDIGOIO=m +CONFIG_SND_INDIGODJ=m +CONFIG_SND_INDIGOIOX=m +CONFIG_SND_INDIGODJX=m +CONFIG_SND_EMU10K1=m +CONFIG_SND_EMU10K1X=m +CONFIG_SND_ENS1370=m +CONFIG_SND_ENS1371=m +CONFIG_SND_ES1938=m +CONFIG_SND_ES1968=m +CONFIG_SND_FM801=m +CONFIG_SND_FM801_TEA575X_BOOL=y +CONFIG_SND_FM801_TEA575X=m +CONFIG_SND_HDA_INTEL=m +CONFIG_SND_HDA_HWDEP=y +CONFIG_SND_HDA_RECONFIG=y +CONFIG_SND_HDA_INPUT_BEEP=y +CONFIG_SND_HDA_INPUT_JACK=y +CONFIG_SND_HDA_CODEC_REALTEK=y +CONFIG_SND_HDA_CODEC_ANALOG=y +CONFIG_SND_HDA_CODEC_SIGMATEL=y +CONFIG_SND_HDA_CODEC_VIA=y +CONFIG_SND_HDA_CODEC_ATIHDMI=y +CONFIG_SND_HDA_CODEC_NVHDMI=y +CONFIG_SND_HDA_CODEC_INTELHDMI=y +CONFIG_SND_HDA_ELD=y +CONFIG_SND_HDA_CODEC_CONEXANT=y +CONFIG_SND_HDA_CODEC_CA0110=y +CONFIG_SND_HDA_CODEC_CMEDIA=y +CONFIG_SND_HDA_CODEC_SI3054=y +CONFIG_SND_HDA_GENERIC=y +CONFIG_SND_HDA_POWER_SAVE=y +CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 +CONFIG_SND_HDSP=m +CONFIG_SND_HDSPM=m +CONFIG_SND_HIFIER=m +CONFIG_SND_ICE1712=m +CONFIG_SND_ICE1724=m +CONFIG_SND_INTEL8X0=m +CONFIG_SND_INTEL8X0M=m +CONFIG_SND_KORG1212=m +CONFIG_SND_LX6464ES=m +CONFIG_SND_MAESTRO3=m +CONFIG_SND_MIXART=m +CONFIG_SND_NM256=m +CONFIG_SND_PCXHR=m +CONFIG_SND_RIPTIDE=m +CONFIG_SND_RME32=m +CONFIG_SND_RME96=m +CONFIG_SND_RME9652=m +CONFIG_SND_SONICVIBES=m +CONFIG_SND_TRIDENT=m +CONFIG_SND_VIA82XX=m +CONFIG_SND_VIA82XX_MODEM=m +CONFIG_SND_VIRTUOSO=m +CONFIG_SND_VX222=m +CONFIG_SND_YMFPCI=m +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_USX2Y=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_US122L=m +CONFIG_SND_PCMCIA=y +CONFIG_SND_VXPOCKET=m +CONFIG_SND_PDAUDIOCF=m +CONFIG_SND_SOC=m +CONFIG_SND_SOC_I2C_AND_SPI=m +# CONFIG_SND_SOC_ALL_CODECS is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_AC97_BUS=m +CONFIG_HID_SUPPORT=y +CONFIG_HID=m +# CONFIG_HID_DEBUG is not set +CONFIG_HIDRAW=y + +# +# USB Input Devices +# +CONFIG_USB_HID=m +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y + +# +# Special HID drivers +# +CONFIG_HID_A4TECH=m +CONFIG_HID_APPLE=m +CONFIG_HID_BELKIN=m +CONFIG_HID_CHERRY=m +CONFIG_HID_CHICONY=m +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EZKEY=m +CONFIG_HID_KYE=m +CONFIG_HID_GYRATION=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LOGITECH=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +CONFIG_HID_NTRIG=m +CONFIG_HID_PANTHERLORD=m +CONFIG_PANTHERLORD_FF=y +CONFIG_HID_PETALYNX=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TOPSEED=m +CONFIG_HID_THRUSTMASTER=m +CONFIG_THRUSTMASTER_FF=y +CONFIG_HID_WACOM=m +CONFIG_HID_ZEROPLUS=m +CONFIG_ZEROPLUS_FF=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=m +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +CONFIG_USB_DEVICE_CLASS=y +CONFIG_USB_DYNAMIC_MINORS=y +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +CONFIG_USB_MON=m +CONFIG_USB_WUSB=m +CONFIG_USB_WUSB_CBAF=m +# CONFIG_USB_WUSB_CBAF_DEBUG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_C67X00_HCD=m +CONFIG_USB_XHCI_HCD=m +# CONFIG_USB_XHCI_HCD_DEBUGGING is not set +CONFIG_USB_EHCI_HCD=m +CONFIG_USB_EHCI_ROOT_HUB_TT=y +# CONFIG_USB_EHCI_TT_NEWSCHED is not set +# CONFIG_USB_OXU210HP_HCD is not set +CONFIG_USB_ISP116X_HCD=m +CONFIG_USB_ISP1760_HCD=m +CONFIG_USB_OHCI_HCD=m +# CONFIG_USB_OHCI_HCD_SSB is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +CONFIG_USB_UHCI_HCD=m +CONFIG_USB_U132_HCD=m +CONFIG_USB_SL811_HCD=m +CONFIG_USB_SL811_CS=m +CONFIG_USB_R8A66597_HCD=m +CONFIG_USB_WHCI_HCD=m +CONFIG_USB_HWA_HCD=m +# CONFIG_USB_GADGET_MUSB_HDRC is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +CONFIG_USB_TMC=m + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DATAFAB=m +CONFIG_USB_STORAGE_FREECOM=m +CONFIG_USB_STORAGE_ISD200=m +CONFIG_USB_STORAGE_USBAT=m +CONFIG_USB_STORAGE_SDDR09=m +CONFIG_USB_STORAGE_SDDR55=m +CONFIG_USB_STORAGE_JUMPSHOT=m +CONFIG_USB_STORAGE_ALAUDA=m +CONFIG_USB_STORAGE_ONETOUCH=m +CONFIG_USB_STORAGE_KARMA=m +CONFIG_USB_STORAGE_CYPRESS_ATACB=m +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m + +# +# USB port drivers +# +CONFIG_USB_USS720=m +CONFIG_USB_SERIAL=m +CONFIG_USB_EZUSB=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_MOTOROLA=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_SAFE=m +# CONFIG_USB_SERIAL_SAFE_PADDED is not set +CONFIG_USB_SERIAL_SIEMENS_MPI=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_ADUTUX=m +CONFIG_USB_SEVSEG=m +CONFIG_USB_RIO500=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_BERRY_CHARGE=m +CONFIG_USB_LED=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +CONFIG_USB_APPLEDISPLAY=m +CONFIG_USB_SISUSBVGA=m +# CONFIG_USB_SISUSBVGA_CON is not set +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +CONFIG_USB_TEST=m +CONFIG_USB_ISIGHTFW=m +CONFIG_USB_VST=m +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m +CONFIG_USB_GADGET=m +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_DEBUG_FS is not set +CONFIG_USB_GADGET_VBUS_DRAW=2 +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_PXA25X is not set +# CONFIG_USB_GADGET_PXA27X is not set +# CONFIG_USB_GADGET_S3C_HSOTG is not set +# CONFIG_USB_GADGET_IMX is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_FSL_QE is not set +# CONFIG_USB_GADGET_CI13XXX is not set +CONFIG_USB_GADGET_NET2280=y +CONFIG_USB_NET2280=m +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LANGWELL is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_DUALSPEED=y +# CONFIG_USB_ZERO is not set +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +CONFIG_USB_GADGETFS=m +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +# CONFIG_USB_CDC_COMPOSITE is not set + +# +# OTG and related infrastructure +# +CONFIG_USB_OTG_UTILS=y +CONFIG_NOP_USB_XCEIV=m +CONFIG_UWB=m +CONFIG_UWB_HWA=m +CONFIG_UWB_WHCI=m +CONFIG_UWB_WLP=m +CONFIG_UWB_I1480U=m +CONFIG_UWB_I1480U_WLP=m +CONFIG_MMC=m +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=m +CONFIG_MMC_BLOCK_BOUNCE=y +CONFIG_SDIO_UART=m +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=m +CONFIG_MMC_SDHCI_PCI=m +CONFIG_MMC_RICOH_MMC=m +CONFIG_MMC_SDHCI_PLTFM=m +CONFIG_MMC_WBSD=m +CONFIG_MMC_TIFM_SD=m +CONFIG_MMC_SPI=m +CONFIG_MMC_SDRICOH_CS=m +CONFIG_MMC_CB710=m +CONFIG_MMC_VIA_SDMMC=m +CONFIG_MEMSTICK=m +# CONFIG_MEMSTICK_DEBUG is not set + +# +# MemoryStick drivers +# +# CONFIG_MEMSTICK_UNSAFE_RESUME is not set +CONFIG_MSPRO_BLOCK=m + +# +# MemoryStick Host Controller Drivers +# +CONFIG_MEMSTICK_TIFM_MS=m +CONFIG_MEMSTICK_JMICRON_38X=m +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=m + +# +# LED drivers +# +# CONFIG_LEDS_ALIX2 is not set +CONFIG_LEDS_PCA9532=m +CONFIG_LEDS_LP3944=m +CONFIG_LEDS_CLEVO_MAIL=m +CONFIG_LEDS_PCA955X=m +CONFIG_LEDS_WM8350=m +CONFIG_LEDS_DAC124S085=m +CONFIG_LEDS_BD2802=m + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_IDE_DISK=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=m +CONFIG_LEDS_TRIGGER_BACKLIGHT=m +CONFIG_LEDS_TRIGGER_DEFAULT_ON=m + +# +# iptables trigger is under Netfilter config (LED target) +# +CONFIG_ACCESSIBILITY=y +CONFIG_A11Y_BRAILLE_CONSOLE=y +# CONFIG_INFINIBAND is not set +CONFIG_EDAC=y + +# +# Reporting subsystems +# +# CONFIG_EDAC_DEBUG is not set +CONFIG_EDAC_MM_EDAC=m +CONFIG_EDAC_AMD64=m +# CONFIG_EDAC_AMD64_ERROR_INJECTION is not set +CONFIG_EDAC_E752X=m +CONFIG_EDAC_I82975X=m +CONFIG_EDAC_I3000=m +CONFIG_EDAC_X38=m +CONFIG_EDAC_I5400=m +CONFIG_EDAC_I5000=m +CONFIG_EDAC_I5100=m +CONFIG_RTC_LIB=m +CONFIG_RTC_CLASS=m + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_TEST=m + +# +# I2C RTC drivers +# +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1374=m +CONFIG_RTC_DRV_DS1672=m +CONFIG_RTC_DRV_MAX6900=m +CONFIG_RTC_DRV_RS5C372=m +CONFIG_RTC_DRV_ISL1208=m +CONFIG_RTC_DRV_X1205=m +CONFIG_RTC_DRV_PCF8563=m +CONFIG_RTC_DRV_PCF8583=m +CONFIG_RTC_DRV_M41T80=m +CONFIG_RTC_DRV_M41T80_WDT=y +CONFIG_RTC_DRV_S35390A=m +CONFIG_RTC_DRV_FM3130=m +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_RX8025=m + +# +# SPI RTC drivers +# +CONFIG_RTC_DRV_M41T94=m +CONFIG_RTC_DRV_DS1305=m +CONFIG_RTC_DRV_DS1390=m +CONFIG_RTC_DRV_MAX6902=m +CONFIG_RTC_DRV_R9701=m +CONFIG_RTC_DRV_RS5C348=m +CONFIG_RTC_DRV_DS3234=m + +# +# Platform RTC drivers +# +CONFIG_RTC_DRV_CMOS=m +CONFIG_RTC_DRV_DS1286=m +CONFIG_RTC_DRV_DS1511=m +CONFIG_RTC_DRV_DS1553=m +CONFIG_RTC_DRV_DS1742=m +CONFIG_RTC_DRV_STK17TA8=m +CONFIG_RTC_DRV_M48T86=m +CONFIG_RTC_DRV_M48T35=m +CONFIG_RTC_DRV_M48T59=m +CONFIG_RTC_DRV_BQ4802=m +CONFIG_RTC_DRV_V3020=m +CONFIG_RTC_DRV_WM8350=m +CONFIG_RTC_DRV_PCF50633=m + +# +# on-CPU RTC drivers +# +CONFIG_DMADEVICES=y + +# +# DMA Devices +# +CONFIG_INTEL_IOATDMA=m +CONFIG_DMA_ENGINE=y + +# +# DMA Clients +# +CONFIG_NET_DMA=y +CONFIG_ASYNC_TX_DMA=y +# CONFIG_DMATEST is not set +CONFIG_DCA=m +CONFIG_AUXDISPLAY=y +CONFIG_KS0108=m +CONFIG_KS0108_PORT=0x378 +CONFIG_KS0108_DELAY=2 +CONFIG_CFAG12864B=m +CONFIG_CFAG12864B_RATE=20 +CONFIG_UIO=m +CONFIG_UIO_CIF=m +CONFIG_UIO_PDRV=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_UIO_SMX=m +CONFIG_UIO_AEC=m +CONFIG_UIO_SERCOS3=m + +# +# TI VLYNQ +# +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +CONFIG_ET131X=m +# CONFIG_ET131X_DEBUG is not set +CONFIG_SLICOSS=m +CONFIG_SXG=m +CONFIG_ME4000=m +CONFIG_MEILHAUS=m +CONFIG_ME0600=m +CONFIG_ME0900=m +CONFIG_ME1000=m +CONFIG_ME1400=m +CONFIG_ME1600=m +CONFIG_ME4600=m +CONFIG_ME6000=m +CONFIG_ME8100=m +CONFIG_ME8200=m +# CONFIG_MEDUMMY is not set +CONFIG_VIDEO_GO7007=m +CONFIG_VIDEO_GO7007_USB=m +# CONFIG_VIDEO_GO7007_USB_S2250_BOARD is not set +CONFIG_USB_IP_COMMON=m +CONFIG_USB_IP_VHCI_HCD=m +CONFIG_USB_IP_HOST=m +CONFIG_W35UND=m +CONFIG_PRISM2_USB=m +CONFIG_ECHO=m +CONFIG_USB_ATMEL=m +CONFIG_POCH=m +CONFIG_AGNX=m +CONFIG_OTUS=m +CONFIG_RT2860=m +CONFIG_RT2870=m +CONFIG_RT3070=m +CONFIG_COMEDI=m +# CONFIG_COMEDI_DEBUG is not set +CONFIG_COMEDI_PCI_DRIVERS=m +CONFIG_COMEDI_PCMCIA_DRIVERS=m +CONFIG_COMEDI_USB_DRIVERS=m +CONFIG_ASUS_OLED=m +# CONFIG_PANEL is not set +# CONFIG_ALTERA_PCIE_CHDMA is not set +CONFIG_RTL8187SE=m +CONFIG_RTL8192SU=m +# CONFIG_INPUT_MIMIO is not set +# CONFIG_TRANZPORT is not set +# CONFIG_EPL is not set + +# +# Android +# +# CONFIG_ANDROID is not set +CONFIG_DST=m +# CONFIG_DST_DEBUG is not set +CONFIG_POHMELFS=m +# CONFIG_POHMELFS_DEBUG is not set +CONFIG_POHMELFS_CRYPTO=y +CONFIG_STLC45XX=m +CONFIG_B3DFG=m +CONFIG_IDE_PHISON=m +CONFIG_PLAN9AUTH=m +CONFIG_HECI=m +CONFIG_LINE6_USB=m +CONFIG_DRM_RADEON_KMS=y +CONFIG_USB_SERIAL_QUATECH2=m +CONFIG_VT6655=m +CONFIG_USB_CPC=m +CONFIG_RDC_17F3101X=m +CONFIG_FB_UDL=m +CONFIG_X86_PLATFORM_DEVICES=y +CONFIG_ACER_WMI=m +CONFIG_ACERHDF=m +CONFIG_ASUS_LAPTOP=m +CONFIG_DELL_WMI=m +CONFIG_FUJITSU_LAPTOP=m +# CONFIG_FUJITSU_LAPTOP_DEBUG is not set +CONFIG_HP_WMI=m +CONFIG_MSI_LAPTOP=m +CONFIG_PANASONIC_LAPTOP=m +CONFIG_COMPAL_LAPTOP=m +CONFIG_SONY_LAPTOP=m +# CONFIG_SONYPI_COMPAT is not set +CONFIG_THINKPAD_ACPI=m +# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set +# CONFIG_THINKPAD_ACPI_DEBUG is not set +# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set +CONFIG_THINKPAD_ACPI_VIDEO=y +CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y +CONFIG_INTEL_MENLOW=m +CONFIG_EEEPC_LAPTOP=m +CONFIG_ACPI_WMI=m +CONFIG_ACPI_ASUS=m +CONFIG_ACPI_TOSHIBA=m + +# +# Firmware Drivers +# +CONFIG_EDD=m +# CONFIG_EDD_OFF is not set +CONFIG_FIRMWARE_MEMMAP=y +CONFIG_EFI_VARS=m +CONFIG_DELL_RBU=m +CONFIG_DCDBAS=m +CONFIG_DMIID=y +# CONFIG_ISCSI_IBFT_FIND is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=m +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_EXT4_FS=m +CONFIG_EXT4DEV_COMPAT=y +CONFIG_EXT4_FS_XATTR=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_JBD2=m +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=m +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_RT=y +# CONFIG_XFS_DEBUG is not set +CONFIG_GFS2_FS=m +CONFIG_GFS2_FS_LOCKING_DLM=y +CONFIG_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m +CONFIG_OCFS2_FS_STATS=y +# CONFIG_OCFS2_DEBUG_MASKLOG is not set +# CONFIG_OCFS2_DEBUG_FS is not set +CONFIG_OCFS2_FS_POSIX_ACL=y +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_QUOTA_TREE=m +CONFIG_QFMT_V1=m +CONFIG_QFMT_V2=m +CONFIG_QUOTACTL=y +# CONFIG_AUTOFS_FS is not set +CONFIG_AUTOFS4_FS=m +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_GENERIC_ACL=y + +# +# Caches +# +CONFIG_FSCACHE=m +CONFIG_FSCACHE_STATS=y +CONFIG_FSCACHE_HISTOGRAM=y +# CONFIG_FSCACHE_DEBUG is not set +CONFIG_CACHEFILES=m +# CONFIG_CACHEFILES_DEBUG is not set +# CONFIG_CACHEFILES_HISTOGRAM is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=m +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_BEFS_FS=m +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS2_LZO is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +CONFIG_CRAMFS=m +CONFIG_SQUASHFS=m +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +CONFIG_OMFS_FS=m +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_UFS_DEBUG is not set +CONFIG_EXOFS_FS=m +# CONFIG_EXOFS_DEBUG is not set +CONFIG_NILFS2_FS=m +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +CONFIG_NFS_FSCACHE=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_RPCSEC_GSS_SPKM3=m +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_WEAK_PW_HASH=y +# CONFIG_CIFS_UPCALL is not set +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +CONFIG_NCPFS_SMALLDOS=y +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +CONFIG_AFS_FS=m +# CONFIG_AFS_DEBUG is not set +CONFIG_AFS_FSCACHE=y +CONFIG_9P_FS=m + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +CONFIG_SOLARIS_X86_PARTITION=y +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +CONFIG_KARMA_PARTITION=y +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m +CONFIG_DLM=m +# CONFIG_DLM_DEBUG is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=2048 +CONFIG_MAGIC_SYSRQ=y +CONFIG_UNUSED_SYMBOLS=y +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +CONFIG_SCHED_DEBUG=y +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_VIRTUAL is not set +# CONFIG_DEBUG_WRITECOUNT is not set +CONFIG_DEBUG_MEMORY_INIT=y +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +CONFIG_ARCH_WANT_FRAME_POINTERS=y +# CONFIG_FRAME_POINTER is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_USER_STACKTRACE_SUPPORT=y +CONFIG_NOP_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y +CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_FTRACE_SYSCALLS=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_TRACING=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +CONFIG_HAVE_ARCH_KMEMCHECK=y +# CONFIG_KMEMCHECK is not set +CONFIG_STRICT_DEVMEM=y +CONFIG_X86_VERBOSE_BOOTUP=y +CONFIG_EARLY_PRINTK=y +# CONFIG_EARLY_PRINTK_DBGP is not set +# CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_X86_PTDUMP is not set +# CONFIG_DEBUG_RODATA is not set +# CONFIG_DEBUG_NX_TEST is not set +# CONFIG_IOMMU_DEBUG is not set +# CONFIG_IOMMU_STRESS is not set +CONFIG_HAVE_MMIOTRACE_SUPPORT=y +CONFIG_IO_DELAY_TYPE_0X80=0 +CONFIG_IO_DELAY_TYPE_0XED=1 +CONFIG_IO_DELAY_TYPE_UDELAY=2 +CONFIG_IO_DELAY_TYPE_NONE=3 +CONFIG_IO_DELAY_0X80=y +# CONFIG_IO_DELAY_0XED is not set +# CONFIG_IO_DELAY_UDELAY is not set +# CONFIG_IO_DELAY_NONE is not set +CONFIG_DEFAULT_IO_DELAY_TYPE=0 +# CONFIG_DEBUG_BOOT_PARAMS is not set +# CONFIG_CPA_DEBUG is not set +# CONFIG_OPTIMIZE_INLINING is not set + +# +# Linux VServer +# +CONFIG_VSERVER_AUTO_LBACK=y +CONFIG_VSERVER_AUTO_SINGLE=y +CONFIG_VSERVER_COWBL=y +CONFIG_VSERVER_VTIME=y +CONFIG_VSERVER_DEVICE=y +CONFIG_VSERVER_PROC_SECURE=y +CONFIG_VSERVER_HARDCPU=y +CONFIG_VSERVER_IDLETIME=y +# CONFIG_VSERVER_IDLELIMIT is not set +# CONFIG_TAGGING_NONE is not set +# CONFIG_TAGGING_UID16 is not set +# CONFIG_TAGGING_GID16 is not set +CONFIG_TAGGING_ID24=y +# CONFIG_TAGGING_INTERN is not set +# CONFIG_TAG_NFSD is not set +CONFIG_VSERVER_PRIVACY=y +CONFIG_VSERVER_CONTEXTS=768 +CONFIG_VSERVER_WARN=y +# CONFIG_VSERVER_DEBUG is not set +CONFIG_VSERVER=y +CONFIG_VSERVER_SECURITY=y + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +CONFIG_SECURITY=y +CONFIG_SECURITYFS=y +CONFIG_SECURITY_NETWORK=y +# CONFIG_SECURITY_NETWORK_XFRM is not set +# CONFIG_SECURITY_PATH is not set +CONFIG_SECURITY_FILE_CAPABILITIES=y +# CONFIG_SECURITY_SELINUX is not set +# CONFIG_SECURITY_SMACK is not set +# CONFIG_SECURITY_TOMOYO is not set +# CONFIG_IMA is not set +CONFIG_XOR_BLOCKS=m +CONFIG_ASYNC_CORE=m +CONFIG_ASYNC_MEMCPY=m +CONFIG_ASYNC_XOR=m +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_FIPS=y +CONFIG_CRYPTO_ALGAPI=m +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=m +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=m +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_GF128MUL=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=m +CONFIG_CRYPTO_AUTHENC=m +CONFIG_CRYPTO_TEST=m + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=m +CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_SEQIV=m + +# +# Block modes +# +CONFIG_CRYPTO_CBC=m +CONFIG_CRYPTO_CTR=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_PCBC=m +CONFIG_CRYPTO_XTS=m +CONFIG_CRYPTO_FPU=m + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_XCBC=m + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_CRC32C_INTEL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_AES_X86_64=m +CONFIG_CRYPTO_AES_NI_INTEL=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_SALSA20=m +CONFIG_CRYPTO_SALSA20_X86_64=m +CONFIG_CRYPTO_SEED=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m +CONFIG_CRYPTO_TWOFISH_X86_64=m + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_ZLIB=m +CONFIG_CRYPTO_LZO=m + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=m +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_DEV_PADLOCK=m +CONFIG_CRYPTO_DEV_PADLOCK_AES=m +CONFIG_CRYPTO_DEV_PADLOCK_SHA=m +CONFIG_CRYPTO_DEV_HIFN_795X=m +CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y +CONFIG_HAVE_KVM=y +CONFIG_HAVE_KVM_IRQCHIP=y +CONFIG_VIRTUALIZATION=y +CONFIG_KVM=m +CONFIG_KVM_INTEL=m +CONFIG_KVM_AMD=m +# CONFIG_KVM_TRACE is not set +CONFIG_VIRTIO=m +CONFIG_VIRTIO_RING=m +CONFIG_VIRTIO_PCI=m +CONFIG_VIRTIO_BALLOON=m +CONFIG_BINARY_PRINTF=y + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC_T10DIF=m +CONFIG_CRC_ITU_T=m +CONFIG_CRC32=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m +CONFIG_LZO_COMPRESS=m +CONFIG_LZO_DECOMPRESS=m +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CHECK_SIGNATURE=y +CONFIG_NLATTR=y diff --git a/kernel26-vserver/kernel26-vserver.install b/kernel26-vserver/kernel26-vserver.install new file mode 100644 index 0000000..c6d875c --- /dev/null +++ b/kernel26-vserver/kernel26-vserver.install @@ -0,0 +1,144 @@ +# arg 1: the new package version +# arg 2: the old package version + +KERNEL_NAME=-vserver +KERNEL_VERSION=2.6.31-vs-ARCH + +post_install () { + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod $KERNEL_VERSION + # generate init ramdisks + echo ">>> MKINITCPIO SETUP" + echo ">>> ----------------" + echo ">>> If you use LVM2, Encrypted root or software RAID," + echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ." + echo ">>> More information about mkinitcpio setup can be found here:" + echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio" + echo "" + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + /sbin/mkinitcpio -p kernel26${KERNEL_NAME} +} + +post_upgrade() { + pacman -Q grub &>/dev/null + hasgrub=$? + pacman -Q grub2 &>/dev/null + hasgrub2=$? + pacman -Q lilo &>/dev/null + haslilo=$? + # reminder notices + if [ $haslilo -eq 0 ]; then + echo ">>>" + if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then + echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting." + else + echo ">>> You appear to be using the LILO bootloader. You should run" + echo ">>> 'lilo' before rebooting." + fi + echo ">>>" + fi + + if grep "/boot" /etc/fstab 2>&1 >/dev/null; then + if ! grep "/boot" /etc/mtab 2>&1 >/dev/null; then + echo "WARNING: /boot appears to be a seperate partition but is not mounted" + echo " This is most likely not what you want. Please mount your /boot" + echo " partition and reinstall the kernel unless you are sure this is OK" + fi + fi + + if [ "`vercmp $2 2.6.13`" -lt 0 ]; then + # important upgrade notice + echo ">>>" + echo ">>> IMPORTANT KERNEL UPGRADE NOTICE" + echo ">>> -------------------------------" + echo ">>> As of kernel 2.6.13, DevFS is NO LONGER AVAILABLE!" + echo ">>> If you still use DevFS, please make the transition to uDev before" + echo ">>> rebooting. If you really need to stay with DevFS for some reason," + echo ">>> then you can manually downgrade to an older version:" + echo ">>>" + echo ">>> # pacman -U http://archlinux.org/~judd/kernel/kernel26-scsi-2.6.12.2-1.pkg.tar.gz" + echo ">>>" + echo ">>> If you choose to downgrade, don't forget to add kernel26-scsi to your" + echo ">>> IgnorePkg list in /etc/pacman.conf" + echo ">>>" + echo ">>> (NOTE: The following portion applies to uDev users as well!)" + echo ">>>" + echo ">>> If you use any DevFS paths in your GRUB menu.lst, then you will not" + echo ">>> be able to boot! Change your root= parameter to use the classic" + echo ">>> naming scheme." + echo ">>>" + echo ">>> EXAMPLES:" + echo ">>> - change root=/dev/discs/disc0/part3 to root=/dev/sda3" + echo ">>> - change root=/dev/md/0 to root=/dev/md0" + echo ">>>" + fi + # generate new init ramdisk + if [ "`vercmp $2 2.6.18`" -lt 0 ]; then + echo ">>> --------------------------------------------------------------" + echo ">>> | WARNING: |" + echo ">>> |mkinitrd is not supported anymore in kernel >=2.6.18 series!|" + echo ">>> | Please change to Mkinitcpio setup. |" + echo ">>> --------------------------------------------------------------" + echo ">>>" + fi + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod $KERNEL_VERSION + echo ">>> MKINITCPIO SETUP" + echo ">>> ----------------" + if [ "`vercmp $2 2.6.18`" -lt 0 ]; then + echo ">>> Please change your bootloader config files:" + echo ">>> Grub: /boot/grub/menu.lst | Lilo: /etc/lilo.conf" + echo "------------------------------------------------" + echo "| - initrd26.img to kernel26${KERNEL_NAME}.img |" + echo "| - initrd26-full.img to kernel26${KERNEL_NAME}-fallback.img |" + echo "------------------------------------------------" + fi + if [ "`vercmp $2 2.6.19`" -lt 0 ]; then + echo "" + echo ">>> New PATA/IDE subsystem - EXPERIMENTAL" + echo ">>> ----------" + echo ">>> To use the new pata drivers, change the 'ide' hook " + echo ">>> to 'pata' in /etc/mkinicpio.conf HOOKS=" + echo ">>> The new system changes: /dev/hd? to /dev/sd?" + echo ">>> Don't forget to modify GRUB, LILO and fstab to the" + echo ">>> new naming system. " + echo ">>> eg: hda3 --> sda3, hdc8 --> sdc8" + echo "" + echo ">>> piix/ata_piix (Intel chipsets) - IMPORTANT" + echo "----------" + echo ">>> If you have enabled ide/pata/sata HOOKs in /etc/mkinitcpio.conf" + echo ">>> the 'ata_piix' module will be used." + echo ">>> This may cause your devices to shift names, eg:" + echo ">>> - IDE: devices from hd? to sd?" + echo ">>> - SATA: sda might shift to sdc if you have 2 other disks on a PIIX IDE port." + echo ">>> To check if this will affect you, check 'mkinitcpio -M' for piix/ata_piix" + echo "" + fi + + echo ">>> If you use LVM2, Encrypted root or software RAID," + echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ." + echo ">>> More information about mkinitcpio setup can be found here:" + echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio" + echo "" + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." +if [ "`vercmp $2 2.6.19`" -lt 0 ]; then + /sbin/mkinitcpio -p kernel26${KERNEL_NAME} -m "ATTENTION:\nIf you get a kernel panic below +and are using an Intel chipset, append 'earlymodules=piix' to the +kernel commandline" +else + /sbin/mkinitcpio -p kernel26${KERNEL_NAME} +fi +if [ "`vercmp $2 2.6.21`" -lt 0 ]; then + echo "" + echo "Important ACPI Information:" + echo ">>> Since 2.6.20.7 all possible ACPI parts are modularized." + echo ">>> The modules are located at:" + echo ">>> /lib/modules/$(uname -r)/kernel/drivers/acpi" + echo ">>> For more information about ACPI modules check this wiki page:" + echo ">>> 'http://wiki.archlinux.org/index.php/ACPI_modules'" +fi +} + +# vim:set ts=2 sw=2 et: diff --git a/kernel26-vserver/kernel26-vserver.preset b/kernel26-vserver/kernel26-vserver.preset new file mode 100644 index 0000000..01b9a44 --- /dev/null +++ b/kernel26-vserver/kernel26-vserver.preset @@ -0,0 +1,17 @@ +# mkinitcpio preset file for kernel26-vserver + +######################################## +# DO NOT EDIT THIS LINE: +source /etc/mkinitcpio.d/kernel26-vserver.kver +######################################## +ALL_config="/etc/mkinitcpio.conf" + +PRESETS=('default' 'fallback') + +#default_config="/etc/mkinitcpio.conf" +default_image="/boot/kernel26-vserver.img" +#default_options="" + +#fallback_config="/etc/mkinitcpio.conf" +fallback_image="/boot/kernel26-vserver-fallback.img" +fallback_options="-S autodetect" diff --git a/kernel26-vserver/patch-2.6.31.6-vs2.3.0.36.24.diff b/kernel26-vserver/patch-2.6.31.6-vs2.3.0.36.24.diff new file mode 100644 index 0000000..9cd6e0b --- /dev/null +++ b/kernel26-vserver/patch-2.6.31.6-vs2.3.0.36.24.diff @@ -0,0 +1,28766 @@ +diff -NurpP --minimal linux-2.6.31.6/arch/alpha/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/Kconfig +--- linux-2.6.31.6/arch/alpha/Kconfig 2009-03-24 14:18:07.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -666,6 +666,8 @@ config DUMMY_CONSOLE + depends on VGA_HOSE + default y + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/alpha/kernel/entry.S linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/entry.S +--- linux-2.6.31.6/arch/alpha/kernel/entry.S 2009-06-11 17:11:46.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/entry.S 2009-09-10 16:11:43.000000000 +0200 +@@ -874,24 +874,15 @@ sys_getxgid: + .globl sys_getxpid + .ent sys_getxpid + sys_getxpid: ++ lda $sp, -16($sp) ++ stq $26, 0($sp) + .prologue 0 +- ldq $2, TI_TASK($8) + +- /* See linux/kernel/timer.c sys_getppid for discussion +- about this loop. */ +- ldq $3, TASK_GROUP_LEADER($2) +- ldq $4, TASK_REAL_PARENT($3) +- ldl $0, TASK_TGID($2) +-1: ldl $1, TASK_TGID($4) +-#ifdef CONFIG_SMP +- mov $4, $5 +- mb +- ldq $3, TASK_GROUP_LEADER($2) +- ldq $4, TASK_REAL_PARENT($3) +- cmpeq $4, $5, $5 +- beq $5, 1b +-#endif +- stq $1, 80($sp) ++ lda $16, 96($sp) ++ jsr $26, do_getxpid ++ ldq $26, 0($sp) ++ ++ lda $sp, 16($sp) + ret + .end sys_getxpid + +diff -NurpP --minimal linux-2.6.31.6/arch/alpha/kernel/osf_sys.c linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/osf_sys.c +--- linux-2.6.31.6/arch/alpha/kernel/osf_sys.c 2009-09-10 15:25:14.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/osf_sys.c 2009-09-10 16:11:43.000000000 +0200 +@@ -872,7 +872,7 @@ SYSCALL_DEFINE2(osf_gettimeofday, struct + { + if (tv) { + struct timeval ktv; +- do_gettimeofday(&ktv); ++ vx_gettimeofday(&ktv); + if (put_tv32(tv, &ktv)) + return -EFAULT; + } +diff -NurpP --minimal linux-2.6.31.6/arch/alpha/kernel/ptrace.c linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/ptrace.c +--- linux-2.6.31.6/arch/alpha/kernel/ptrace.c 2009-09-10 15:25:14.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/ptrace.c 2009-09-10 16:11:43.000000000 +0200 +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -NurpP --minimal linux-2.6.31.6/arch/alpha/kernel/systbls.S linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/systbls.S +--- linux-2.6.31.6/arch/alpha/kernel/systbls.S 2009-03-24 14:18:08.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/systbls.S 2009-09-10 16:11:43.000000000 +0200 +@@ -446,7 +446,7 @@ sys_call_table: + .quad sys_stat64 /* 425 */ + .quad sys_lstat64 + .quad sys_fstat64 +- .quad sys_ni_syscall /* sys_vserver */ ++ .quad sys_vserver /* sys_vserver */ + .quad sys_ni_syscall /* sys_mbind */ + .quad sys_ni_syscall /* sys_get_mempolicy */ + .quad sys_ni_syscall /* sys_set_mempolicy */ +diff -NurpP --minimal linux-2.6.31.6/arch/alpha/kernel/traps.c linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/traps.c +--- linux-2.6.31.6/arch/alpha/kernel/traps.c 2009-06-11 17:11:46.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/kernel/traps.c 2009-09-10 16:11:43.000000000 +0200 +@@ -183,7 +183,8 @@ die_if_kernel(char * str, struct pt_regs + #ifdef CONFIG_SMP + printk("CPU %d ", hard_smp_processor_id()); + #endif +- printk("%s(%d): %s %ld\n", current->comm, task_pid_nr(current), str, err); ++ printk("%s(%d[#%u]): %s %ld\n", current->comm, ++ task_pid_nr(current), current->xid, str, err); + dik_show_regs(regs, r9_15); + add_taint(TAINT_DIE); + dik_show_trace((unsigned long *)(regs+1)); +diff -NurpP --minimal linux-2.6.31.6/arch/alpha/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/mm/fault.c +--- linux-2.6.31.6/arch/alpha/mm/fault.c 2009-09-10 15:25:14.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/alpha/mm/fault.c 2009-09-10 16:11:43.000000000 +0200 +@@ -193,8 +193,8 @@ do_page_fault(unsigned long address, uns + down_read(&mm->mmap_sem); + goto survive; + } +- printk(KERN_ALERT "VM: killing process %s(%d)\n", +- current->comm, task_pid_nr(current)); ++ printk(KERN_ALERT "VM: killing process %s(%d:#%u)\n", ++ current->comm, task_pid_nr(current), current->xid); + if (!user_mode(regs)) + goto no_context; + do_group_exit(SIGKILL); +diff -NurpP --minimal linux-2.6.31.6/arch/arm/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/arm/Kconfig +--- linux-2.6.31.6/arch/arm/Kconfig 2009-09-10 15:25:14.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/arm/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -1483,6 +1483,8 @@ source "fs/Kconfig" + + source "arch/arm/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/arm/kernel/calls.S linux-2.6.31.6-vs2.3.0.36.24/arch/arm/kernel/calls.S +--- linux-2.6.31.6/arch/arm/kernel/calls.S 2009-09-10 15:25:15.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/arm/kernel/calls.S 2009-09-10 16:11:43.000000000 +0200 +@@ -322,7 +322,7 @@ + /* 310 */ CALL(sys_request_key) + CALL(sys_keyctl) + CALL(ABI(sys_semtimedop, sys_oabi_semtimedop)) +-/* vserver */ CALL(sys_ni_syscall) ++ CALL(sys_vserver) + CALL(sys_ioprio_set) + /* 315 */ CALL(sys_ioprio_get) + CALL(sys_inotify_init) +diff -NurpP --minimal linux-2.6.31.6/arch/arm/kernel/process.c linux-2.6.31.6-vs2.3.0.36.24/arch/arm/kernel/process.c +--- linux-2.6.31.6/arch/arm/kernel/process.c 2009-09-10 15:25:15.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/arm/kernel/process.c 2009-09-10 16:11:43.000000000 +0200 +@@ -269,7 +269,8 @@ void __show_regs(struct pt_regs *regs) + void show_regs(struct pt_regs * regs) + { + printk("\n"); +- printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm); ++ printk("Pid: %d[#%u], comm: %20s\n", ++ task_pid_nr(current), current->xid, current->comm); + __show_regs(regs); + __backtrace(); + } +diff -NurpP --minimal linux-2.6.31.6/arch/arm/kernel/traps.c linux-2.6.31.6-vs2.3.0.36.24/arch/arm/kernel/traps.c +--- linux-2.6.31.6/arch/arm/kernel/traps.c 2009-06-11 17:11:49.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/arm/kernel/traps.c 2009-09-10 16:11:43.000000000 +0200 +@@ -228,8 +228,8 @@ static void __die(const char *str, int e + str, err, ++die_counter); + print_modules(); + __show_regs(regs); +- printk("Process %s (pid: %d, stack limit = 0x%p)\n", +- tsk->comm, task_pid_nr(tsk), thread + 1); ++ printk("Process %s (pid: %d:#%u, stack limit = 0x%p)\n", ++ tsk->comm, task_pid_nr(tsk), tsk->xid, thread + 1); + + if (!user_mode(regs) || in_interrupt()) { + dump_mem("Stack: ", regs->ARM_sp, +diff -NurpP --minimal linux-2.6.31.6/arch/arm/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/arm/mm/fault.c +--- linux-2.6.31.6/arch/arm/mm/fault.c 2009-09-10 15:25:18.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/arm/mm/fault.c 2009-09-10 16:11:43.000000000 +0200 +@@ -294,7 +294,8 @@ do_page_fault(unsigned long addr, unsign + * happened to us that made us unable to handle + * the page fault gracefully. + */ +- printk("VM: killing process %s\n", tsk->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ tsk->comm, task_pid_nr(tsk), tsk->xid); + do_group_exit(SIGKILL); + return 0; + } +diff -NurpP --minimal linux-2.6.31.6/arch/avr32/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/avr32/mm/fault.c +--- linux-2.6.31.6/arch/avr32/mm/fault.c 2009-09-10 15:25:20.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/avr32/mm/fault.c 2009-09-29 17:32:09.000000000 +0200 +@@ -216,7 +216,8 @@ out_of_memory: + down_read(&mm->mmap_sem); + goto survive; + } +- printk("VM: Killing process %s\n", tsk->comm); ++ printk("VM: Killing process %s(%d:#%u)\n", ++ tsk->comm, task_pid_nr(tsk), tsk->xid); + if (user_mode(regs)) + do_group_exit(SIGKILL); + goto no_context; +diff -NurpP --minimal linux-2.6.31.6/arch/cris/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/cris/Kconfig +--- linux-2.6.31.6/arch/cris/Kconfig 2009-06-11 17:11:56.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/cris/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -685,6 +685,8 @@ source "drivers/staging/Kconfig" + + source "arch/cris/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/cris/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/cris/mm/fault.c +--- linux-2.6.31.6/arch/cris/mm/fault.c 2009-09-10 15:25:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/cris/mm/fault.c 2009-09-29 17:25:13.000000000 +0200 +@@ -245,7 +245,8 @@ do_page_fault(unsigned long address, str + + out_of_memory: + up_read(&mm->mmap_sem); +- printk("VM: killing process %s\n", tsk->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ tsk->comm, task_pid_nr(tsk), tsk->xid); + if (user_mode(regs)) + do_exit(SIGKILL); + goto no_context; +diff -NurpP --minimal linux-2.6.31.6/arch/frv/kernel/kernel_thread.S linux-2.6.31.6-vs2.3.0.36.24/arch/frv/kernel/kernel_thread.S +--- linux-2.6.31.6/arch/frv/kernel/kernel_thread.S 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/frv/kernel/kernel_thread.S 2009-09-10 16:11:43.000000000 +0200 +@@ -37,7 +37,7 @@ kernel_thread: + + # start by forking the current process, but with shared VM + setlos.p #__NR_clone,gr7 ; syscall number +- ori gr10,#CLONE_VM,gr8 ; first syscall arg [clone_flags] ++ ori gr10,#CLONE_KT,gr8 ; first syscall arg [clone_flags] + sethi.p #0xe4e4,gr9 ; second syscall arg [newsp] + setlo #0xe4e4,gr9 + setlos.p #0,gr10 ; third syscall arg [parent_tidptr] +diff -NurpP --minimal linux-2.6.31.6/arch/frv/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/frv/mm/fault.c +--- linux-2.6.31.6/arch/frv/mm/fault.c 2009-09-10 15:25:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/frv/mm/fault.c 2009-09-29 17:25:48.000000000 +0200 +@@ -257,7 +257,8 @@ asmlinkage void do_page_fault(int datamm + */ + out_of_memory: + up_read(&mm->mmap_sem); +- printk("VM: killing process %s\n", current->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ current->comm, task_pid_nr(current), current->xid); + if (user_mode(__frame)) + do_group_exit(SIGKILL); + goto no_context; +diff -NurpP --minimal linux-2.6.31.6/arch/h8300/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/h8300/Kconfig +--- linux-2.6.31.6/arch/h8300/Kconfig 2009-03-24 14:18:24.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/h8300/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -226,6 +226,8 @@ source "fs/Kconfig" + + source "arch/h8300/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/ia64/ia32/ia32_entry.S linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/ia32/ia32_entry.S +--- linux-2.6.31.6/arch/ia64/ia32/ia32_entry.S 2009-06-11 17:11:57.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/ia32/ia32_entry.S 2009-09-10 16:11:43.000000000 +0200 +@@ -451,7 +451,7 @@ ia32_syscall_table: + data8 sys_tgkill /* 270 */ + data8 compat_sys_utimes + data8 sys32_fadvise64_64 +- data8 sys_ni_syscall ++ data8 sys32_vserver + data8 sys_ni_syscall + data8 sys_ni_syscall /* 275 */ + data8 sys_ni_syscall +diff -NurpP --minimal linux-2.6.31.6/arch/ia64/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/Kconfig +--- linux-2.6.31.6/arch/ia64/Kconfig 2009-09-10 15:25:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -676,6 +676,8 @@ source "fs/Kconfig" + + source "arch/ia64/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/ia64/kernel/entry.S linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/entry.S +--- linux-2.6.31.6/arch/ia64/kernel/entry.S 2009-09-10 15:25:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/entry.S 2009-09-10 16:11:43.000000000 +0200 +@@ -1753,7 +1753,7 @@ sys_call_table: + data8 sys_mq_notify + data8 sys_mq_getsetattr + data8 sys_kexec_load +- data8 sys_ni_syscall // reserved for vserver ++ data8 sys_vserver + data8 sys_waitid // 1270 + data8 sys_add_key + data8 sys_request_key +diff -NurpP --minimal linux-2.6.31.6/arch/ia64/kernel/perfmon.c linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/perfmon.c +--- linux-2.6.31.6/arch/ia64/kernel/perfmon.c 2009-09-10 15:25:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/perfmon.c 2009-09-10 16:11:43.000000000 +0200 +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -2372,7 +2373,7 @@ pfm_smpl_buffer_alloc(struct task_struct + */ + insert_vm_struct(mm, vma); + +- mm->total_vm += size >> PAGE_SHIFT; ++ vx_vmpages_add(mm, size >> PAGE_SHIFT); + vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, + vma_pages(vma)); + up_write(&task->mm->mmap_sem); +diff -NurpP --minimal linux-2.6.31.6/arch/ia64/kernel/process.c linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/process.c +--- linux-2.6.31.6/arch/ia64/kernel/process.c 2009-06-11 17:11:57.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/process.c 2009-09-10 16:11:43.000000000 +0200 +@@ -110,8 +110,8 @@ show_regs (struct pt_regs *regs) + unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri; + + print_modules(); +- printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current), +- smp_processor_id(), current->comm); ++ printk("\nPid: %d[#%u], CPU %d, comm: %20s\n", task_pid_nr(current), ++ current->xid, smp_processor_id(), current->comm); + printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n", + regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(), + init_utsname()->release); +diff -NurpP --minimal linux-2.6.31.6/arch/ia64/kernel/ptrace.c linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/ptrace.c +--- linux-2.6.31.6/arch/ia64/kernel/ptrace.c 2009-09-10 15:25:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/ptrace.c 2009-09-10 16:11:43.000000000 +0200 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -NurpP --minimal linux-2.6.31.6/arch/ia64/kernel/traps.c linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/traps.c +--- linux-2.6.31.6/arch/ia64/kernel/traps.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/kernel/traps.c 2009-09-10 16:11:43.000000000 +0200 +@@ -60,8 +60,9 @@ die (const char *str, struct pt_regs *re + put_cpu(); + + if (++die.lock_owner_depth < 3) { +- printk("%s[%d]: %s %ld [%d]\n", +- current->comm, task_pid_nr(current), str, err, ++die_counter); ++ printk("%s[%d[#%u]]: %s %ld [%d]\n", ++ current->comm, task_pid_nr(current), current->xid, ++ str, err, ++die_counter); + if (notify_die(DIE_OOPS, str, regs, err, 255, SIGSEGV) + != NOTIFY_STOP) + show_regs(regs); +@@ -324,8 +325,9 @@ handle_fpu_swa (int fp_fault, struct pt_ + if ((last.count & 15) < 5 && (ia64_fetchadd(1, &last.count, acq) & 15) < 5) { + last.time = current_jiffies + 5 * HZ; + printk(KERN_WARNING +- "%s(%d): floating-point assist fault at ip %016lx, isr %016lx\n", +- current->comm, task_pid_nr(current), regs->cr_iip + ia64_psr(regs)->ri, isr); ++ "%s(%d[#%u]): floating-point assist fault at ip %016lx, isr %016lx\n", ++ current->comm, task_pid_nr(current), current->xid, ++ regs->cr_iip + ia64_psr(regs)->ri, isr); + } + } + } +diff -NurpP --minimal linux-2.6.31.6/arch/ia64/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/mm/fault.c +--- linux-2.6.31.6/arch/ia64/mm/fault.c 2009-09-10 15:25:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/ia64/mm/fault.c 2009-09-29 17:26:21.000000000 +0200 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -281,7 +282,8 @@ ia64_do_page_fault (unsigned long addres + down_read(&mm->mmap_sem); + goto survive; + } +- printk(KERN_CRIT "VM: killing process %s\n", current->comm); ++ printk(KERN_CRIT "VM: killing process %s(%d:#%u)\n", ++ current->comm, task_pid_nr(current), current->xid); + if (user_mode(regs)) + do_group_exit(SIGKILL); + goto no_context; +diff -NurpP --minimal linux-2.6.31.6/arch/m32r/kernel/traps.c linux-2.6.31.6-vs2.3.0.36.24/arch/m32r/kernel/traps.c +--- linux-2.6.31.6/arch/m32r/kernel/traps.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/m32r/kernel/traps.c 2009-09-10 16:11:43.000000000 +0200 +@@ -196,8 +196,9 @@ static void show_registers(struct pt_reg + } else { + printk("SPI: %08lx\n", sp); + } +- printk("Process %s (pid: %d, process nr: %d, stackpage=%08lx)", +- current->comm, task_pid_nr(current), 0xffff & i, 4096+(unsigned long)current); ++ printk("Process %s (pid: %d[#%u], process nr: %d, stackpage=%08lx)", ++ current->comm, task_pid_nr(current), current->xid, ++ 0xffff & i, 4096+(unsigned long)current); + + /* + * When in-kernel, we also print out the stack and code at the +diff -NurpP --minimal linux-2.6.31.6/arch/m32r/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/m32r/mm/fault.c +--- linux-2.6.31.6/arch/m32r/mm/fault.c 2009-09-10 15:25:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/m32r/mm/fault.c 2009-09-29 17:26:48.000000000 +0200 +@@ -276,7 +276,8 @@ out_of_memory: + down_read(&mm->mmap_sem); + goto survive; + } +- printk("VM: killing process %s\n", tsk->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ tsk->comm, task_pid_nr(tsk), tsk->xid); + if (error_code & ACE_USERMODE) + do_group_exit(SIGKILL); + goto no_context; +diff -NurpP --minimal linux-2.6.31.6/arch/m68k/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/m68k/Kconfig +--- linux-2.6.31.6/arch/m68k/Kconfig 2009-11-12 12:10:08.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/m68k/Kconfig 2009-11-12 12:26:38.000000000 +0100 +@@ -616,6 +616,8 @@ source "fs/Kconfig" + + source "arch/m68k/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/m68k/kernel/ptrace.c linux-2.6.31.6-vs2.3.0.36.24/arch/m68k/kernel/ptrace.c +--- linux-2.6.31.6/arch/m68k/kernel/ptrace.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/m68k/kernel/ptrace.c 2009-09-10 16:11:43.000000000 +0200 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -269,6 +270,8 @@ long arch_ptrace(struct task_struct *chi + ret = ptrace_request(child, request, addr, data); + break; + } ++ if (!vx_check(vx_task_xid(child), VS_WATCH_P | VS_IDENT)) ++ goto out_tsk; + + return ret; + out_eio: +diff -NurpP --minimal linux-2.6.31.6/arch/m68k/kernel/traps.c linux-2.6.31.6-vs2.3.0.36.24/arch/m68k/kernel/traps.c +--- linux-2.6.31.6/arch/m68k/kernel/traps.c 2009-09-10 15:25:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/m68k/kernel/traps.c 2009-09-10 16:11:43.000000000 +0200 +@@ -906,8 +906,8 @@ void show_registers(struct pt_regs *regs + printk("d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n", + regs->d4, regs->d5, regs->a0, regs->a1); + +- printk("Process %s (pid: %d, task=%p)\n", +- current->comm, task_pid_nr(current), current); ++ printk("Process %s (pid: %d[#%u], task=%p)\n", ++ current->comm, task_pid_nr(current), current->xid, current); + addr = (unsigned long)&fp->un; + printk("Frame format=%X ", regs->format); + switch (regs->format) { +diff -NurpP --minimal linux-2.6.31.6/arch/m68k/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/m68k/mm/fault.c +--- linux-2.6.31.6/arch/m68k/mm/fault.c 2009-09-10 15:25:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/m68k/mm/fault.c 2009-09-29 17:27:45.000000000 +0200 +@@ -186,7 +186,8 @@ out_of_memory: + goto survive; + } + +- printk("VM: killing process %s\n", current->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ current->comm, task_pid_nr(current), current->xid); + if (user_mode(regs)) + do_group_exit(SIGKILL); + +diff -NurpP --minimal linux-2.6.31.6/arch/m68knommu/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/m68knommu/Kconfig +--- linux-2.6.31.6/arch/m68knommu/Kconfig 2009-06-11 17:11:59.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/m68knommu/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -721,6 +721,8 @@ source "fs/Kconfig" + + source "arch/m68knommu/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/m68knommu/kernel/traps.c linux-2.6.31.6-vs2.3.0.36.24/arch/m68knommu/kernel/traps.c +--- linux-2.6.31.6/arch/m68knommu/kernel/traps.c 2009-09-10 15:25:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/m68knommu/kernel/traps.c 2009-09-10 16:11:43.000000000 +0200 +@@ -78,8 +78,9 @@ void die_if_kernel(char *str, struct pt_ + printk(KERN_EMERG "d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n", + fp->d4, fp->d5, fp->a0, fp->a1); + +- printk(KERN_EMERG "Process %s (pid: %d, stackpage=%08lx)\n", +- current->comm, current->pid, PAGE_SIZE+(unsigned long)current); ++ printk(KERN_EMERG "Process %s (pid: %d[#%u], stackpage=%08lx)\n", ++ current->comm, task_pid_nr(current), current->xid, ++ PAGE_SIZE+(unsigned long)current); + show_stack(NULL, (unsigned long *)(fp + 1)); + add_taint(TAINT_DIE); + do_exit(SIGSEGV); +diff -NurpP --minimal linux-2.6.31.6/arch/microblaze/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/microblaze/mm/fault.c +--- linux-2.6.31.6/arch/microblaze/mm/fault.c 2009-09-10 15:25:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/microblaze/mm/fault.c 2009-09-29 17:28:08.000000000 +0200 +@@ -279,7 +279,8 @@ out_of_memory: + goto survive; + } + up_read(&mm->mmap_sem); +- printk(KERN_WARNING "VM: killing process %s\n", current->comm); ++ printk(KERN_WARNING "VM: killing process %s(%d:#%u)\n", ++ current->comm, task_pid_nr(current), current->xid); + if (user_mode(regs)) + do_exit(SIGKILL); + bad_page_fault(regs, address, SIGKILL); +diff -NurpP --minimal linux-2.6.31.6/arch/mips/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/mips/Kconfig +--- linux-2.6.31.6/arch/mips/Kconfig 2009-09-10 15:25:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/mips/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -2186,6 +2186,8 @@ source "fs/Kconfig" + + source "arch/mips/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/mips/kernel/ptrace.c linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/ptrace.c +--- linux-2.6.31.6/arch/mips/kernel/ptrace.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/ptrace.c 2009-09-10 16:11:43.000000000 +0200 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -259,6 +260,9 @@ long arch_ptrace(struct task_struct *chi + { + int ret; + ++ if (!vx_check(vx_task_xid(child), VS_WATCH_P | VS_IDENT)) ++ goto out; ++ + switch (request) { + /* when I and D space are separate, these will need to be fixed. */ + case PTRACE_PEEKTEXT: /* read word at location addr. */ +diff -NurpP --minimal linux-2.6.31.6/arch/mips/kernel/scall32-o32.S linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/scall32-o32.S +--- linux-2.6.31.6/arch/mips/kernel/scall32-o32.S 2009-09-10 15:25:38.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/scall32-o32.S 2009-09-10 16:11:43.000000000 +0200 +@@ -597,7 +597,7 @@ einval: li v0, -ENOSYS + sys sys_mq_timedreceive 5 + sys sys_mq_notify 2 /* 4275 */ + sys sys_mq_getsetattr 3 +- sys sys_ni_syscall 0 /* sys_vserver */ ++ sys sys_vserver 3 + sys sys_waitid 5 + sys sys_ni_syscall 0 /* available, was setaltroot */ + sys sys_add_key 5 /* 4280 */ +diff -NurpP --minimal linux-2.6.31.6/arch/mips/kernel/scall64-64.S linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/scall64-64.S +--- linux-2.6.31.6/arch/mips/kernel/scall64-64.S 2009-09-10 15:25:38.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/scall64-64.S 2009-09-10 16:11:43.000000000 +0200 +@@ -434,7 +434,7 @@ sys_call_table: + PTR sys_mq_timedreceive + PTR sys_mq_notify + PTR sys_mq_getsetattr /* 5235 */ +- PTR sys_ni_syscall /* sys_vserver */ ++ PTR sys_vserver + PTR sys_waitid + PTR sys_ni_syscall /* available, was setaltroot */ + PTR sys_add_key +diff -NurpP --minimal linux-2.6.31.6/arch/mips/kernel/scall64-n32.S linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/scall64-n32.S +--- linux-2.6.31.6/arch/mips/kernel/scall64-n32.S 2009-09-10 15:25:38.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/scall64-n32.S 2009-09-10 16:11:43.000000000 +0200 +@@ -360,7 +360,7 @@ EXPORT(sysn32_call_table) + PTR compat_sys_mq_timedreceive + PTR compat_sys_mq_notify + PTR compat_sys_mq_getsetattr +- PTR sys_ni_syscall /* 6240, sys_vserver */ ++ PTR sys32_vserver /* 6240 */ + PTR compat_sys_waitid + PTR sys_ni_syscall /* available, was setaltroot */ + PTR sys_add_key +diff -NurpP --minimal linux-2.6.31.6/arch/mips/kernel/scall64-o32.S linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/scall64-o32.S +--- linux-2.6.31.6/arch/mips/kernel/scall64-o32.S 2009-09-10 15:25:38.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/scall64-o32.S 2009-09-10 16:11:43.000000000 +0200 +@@ -480,7 +480,7 @@ sys_call_table: + PTR compat_sys_mq_timedreceive + PTR compat_sys_mq_notify /* 4275 */ + PTR compat_sys_mq_getsetattr +- PTR sys_ni_syscall /* sys_vserver */ ++ PTR sys32_vserver + PTR sys_32_waitid + PTR sys_ni_syscall /* available, was setaltroot */ + PTR sys_add_key /* 4280 */ +diff -NurpP --minimal linux-2.6.31.6/arch/mips/kernel/traps.c linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/traps.c +--- linux-2.6.31.6/arch/mips/kernel/traps.c 2009-09-10 15:25:38.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/mips/kernel/traps.c 2009-09-10 16:11:43.000000000 +0200 +@@ -335,9 +335,10 @@ void show_registers(const struct pt_regs + + __show_regs(regs); + print_modules(); +- printk("Process %s (pid: %d, threadinfo=%p, task=%p, tls=%0*lx)\n", +- current->comm, current->pid, current_thread_info(), current, +- field, current_thread_info()->tp_value); ++ printk("Process %s (pid: %d:#%u, threadinfo=%p, task=%p, tls=%0*lx)\n", ++ current->comm, task_pid_nr(current), current->xid, ++ current_thread_info(), current, ++ field, current_thread_info()->tp_value); + if (cpu_has_userlocal) { + unsigned long tls; + +diff -NurpP --minimal linux-2.6.31.6/arch/mn10300/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/mn10300/mm/fault.c +--- linux-2.6.31.6/arch/mn10300/mm/fault.c 2009-09-10 15:25:39.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/mn10300/mm/fault.c 2009-09-29 17:28:34.000000000 +0200 +@@ -339,7 +339,8 @@ no_context: + out_of_memory: + up_read(&mm->mmap_sem); + monitor_signal(regs); +- printk(KERN_ALERT "VM: killing process %s\n", tsk->comm); ++ printk(KERN_ALERT "VM: killing process %s(%d:#%u)\n", ++ tsk->comm, task_pid_nr(tsk), tsk->xid); + if ((fault_code & MMUFCR_xFC_ACCESS) == MMUFCR_xFC_ACCESS_USR) + do_exit(SIGKILL); + goto no_context; +diff -NurpP --minimal linux-2.6.31.6/arch/parisc/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/parisc/Kconfig +--- linux-2.6.31.6/arch/parisc/Kconfig 2009-09-10 15:25:39.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/parisc/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -293,6 +293,8 @@ source "fs/Kconfig" + + source "arch/parisc/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/parisc/kernel/syscall_table.S linux-2.6.31.6-vs2.3.0.36.24/arch/parisc/kernel/syscall_table.S +--- linux-2.6.31.6/arch/parisc/kernel/syscall_table.S 2009-09-10 15:25:40.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/parisc/kernel/syscall_table.S 2009-09-10 16:11:43.000000000 +0200 +@@ -361,7 +361,7 @@ + ENTRY_COMP(mbind) /* 260 */ + ENTRY_COMP(get_mempolicy) + ENTRY_COMP(set_mempolicy) +- ENTRY_SAME(ni_syscall) /* 263: reserved for vserver */ ++ ENTRY_DIFF(vserver) + ENTRY_SAME(add_key) + ENTRY_SAME(request_key) /* 265 */ + ENTRY_SAME(keyctl) +diff -NurpP --minimal linux-2.6.31.6/arch/parisc/kernel/traps.c linux-2.6.31.6-vs2.3.0.36.24/arch/parisc/kernel/traps.c +--- linux-2.6.31.6/arch/parisc/kernel/traps.c 2009-09-10 15:25:40.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/parisc/kernel/traps.c 2009-09-10 16:11:43.000000000 +0200 +@@ -236,8 +236,9 @@ void die_if_kernel(char *str, struct pt_ + if (err == 0) + return; /* STFU */ + +- printk(KERN_CRIT "%s (pid %d): %s (code %ld) at " RFMT "\n", +- current->comm, task_pid_nr(current), str, err, regs->iaoq[0]); ++ printk(KERN_CRIT "%s (pid %d:#%u): %s (code %ld) at " RFMT "\n", ++ current->comm, task_pid_nr(current), current->xid, ++ str, err, regs->iaoq[0]); + #ifdef PRINT_USER_FAULTS + /* XXX for debugging only */ + show_regs(regs); +@@ -270,8 +271,8 @@ void die_if_kernel(char *str, struct pt_ + pdc_console_restart(); + + if (err) +- printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n", +- current->comm, task_pid_nr(current), str, err); ++ printk(KERN_CRIT "%s (pid %d:#%u): %s (code %ld)\n", ++ current->comm, task_pid_nr(current), current->xid, str, err); + + /* Wot's wrong wif bein' racy? */ + if (current->thread.flags & PARISC_KERNEL_DEATH) { +diff -NurpP --minimal linux-2.6.31.6/arch/parisc/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/parisc/mm/fault.c +--- linux-2.6.31.6/arch/parisc/mm/fault.c 2009-09-10 15:25:40.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/parisc/mm/fault.c 2009-09-10 16:11:43.000000000 +0200 +@@ -237,8 +237,9 @@ bad_area: + + #ifdef PRINT_USER_FAULTS + printk(KERN_DEBUG "\n"); +- printk(KERN_DEBUG "do_page_fault() pid=%d command='%s' type=%lu address=0x%08lx\n", +- task_pid_nr(tsk), tsk->comm, code, address); ++ printk(KERN_DEBUG "do_page_fault() pid=%d:#%u " ++ "command='%s' type=%lu address=0x%08lx\n", ++ task_pid_nr(tsk), tsk->xid, tsk->comm, code, address); + if (vma) { + printk(KERN_DEBUG "vm_start = 0x%08lx, vm_end = 0x%08lx\n", + vma->vm_start, vma->vm_end); +@@ -264,7 +265,8 @@ no_context: + + out_of_memory: + up_read(&mm->mmap_sem); +- printk(KERN_CRIT "VM: killing process %s\n", current->comm); ++ printk(KERN_CRIT "VM: killing process %s(%d:#%u)\n", ++ current->comm, current->pid, current->xid); + if (user_mode(regs)) + do_group_exit(SIGKILL); + goto no_context; +diff -NurpP --minimal linux-2.6.31.6/arch/powerpc/include/asm/unistd.h linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/include/asm/unistd.h +--- linux-2.6.31.6/arch/powerpc/include/asm/unistd.h 2009-09-10 15:25:41.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/include/asm/unistd.h 2009-10-22 01:07:37.000000000 +0200 +@@ -275,7 +275,7 @@ + #endif + #define __NR_rtas 255 + #define __NR_sys_debug_setcontext 256 +-/* Number 257 is reserved for vserver */ ++#define __NR_vserver 257 + #define __NR_migrate_pages 258 + #define __NR_mbind 259 + #define __NR_get_mempolicy 260 +diff -NurpP --minimal linux-2.6.31.6/arch/powerpc/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/Kconfig +--- linux-2.6.31.6/arch/powerpc/Kconfig 2009-09-10 15:25:40.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -933,6 +933,8 @@ source "lib/Kconfig" + + source "arch/powerpc/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + config KEYS_COMPAT +diff -NurpP --minimal linux-2.6.31.6/arch/powerpc/kernel/irq.c linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/kernel/irq.c +--- linux-2.6.31.6/arch/powerpc/kernel/irq.c 2009-09-10 15:25:41.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/kernel/irq.c 2009-09-10 16:15:56.000000000 +0200 +@@ -54,6 +54,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -NurpP --minimal linux-2.6.31.6/arch/powerpc/kernel/process.c linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/kernel/process.c +--- linux-2.6.31.6/arch/powerpc/kernel/process.c 2009-09-10 15:25:41.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/kernel/process.c 2009-09-10 16:11:43.000000000 +0200 +@@ -519,8 +519,9 @@ void show_regs(struct pt_regs * regs) + #else + printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); + #endif +- printk("TASK = %p[%d] '%s' THREAD: %p", +- current, task_pid_nr(current), current->comm, task_thread_info(current)); ++ printk("TASK = %p[%d,#%u] '%s' THREAD: %p", ++ current, task_pid_nr(current), current->xid, ++ current->comm, task_thread_info(current)); + + #ifdef CONFIG_SMP + printk(" CPU: %d", raw_smp_processor_id()); +diff -NurpP --minimal linux-2.6.31.6/arch/powerpc/kernel/traps.c linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/kernel/traps.c +--- linux-2.6.31.6/arch/powerpc/kernel/traps.c 2009-09-10 15:25:41.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/kernel/traps.c 2009-09-10 16:11:43.000000000 +0200 +@@ -931,8 +931,9 @@ void nonrecoverable_exception(struct pt_ + + void trace_syscall(struct pt_regs *regs) + { +- printk("Task: %p(%d), PC: %08lX/%08lX, Syscall: %3ld, Result: %s%ld %s\n", +- current, task_pid_nr(current), regs->nip, regs->link, regs->gpr[0], ++ printk("Task: %p(%d[#%u]), PC: %08lX/%08lX, Syscall: %3ld, Result: %s%ld %s\n", ++ current, task_pid_nr(current), current->xid, ++ regs->nip, regs->link, regs->gpr[0], + regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted()); + } + +diff -NurpP --minimal linux-2.6.31.6/arch/powerpc/kernel/vdso.c linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/kernel/vdso.c +--- linux-2.6.31.6/arch/powerpc/kernel/vdso.c 2009-03-24 14:18:35.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/kernel/vdso.c 2009-09-10 16:11:43.000000000 +0200 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -NurpP --minimal linux-2.6.31.6/arch/powerpc/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/mm/fault.c +--- linux-2.6.31.6/arch/powerpc/mm/fault.c 2009-09-10 15:25:41.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/powerpc/mm/fault.c 2009-09-10 16:11:43.000000000 +0200 +@@ -358,7 +358,8 @@ out_of_memory: + down_read(&mm->mmap_sem); + goto survive; + } +- printk("VM: killing process %s\n", current->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ current->comm, current->pid, current->xid); + if (user_mode(regs)) + do_group_exit(SIGKILL); + return SIGKILL; +diff -NurpP --minimal linux-2.6.31.6/arch/s390/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/s390/Kconfig +--- linux-2.6.31.6/arch/s390/Kconfig 2009-09-10 15:25:42.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/s390/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -624,6 +624,8 @@ source "fs/Kconfig" + + source "arch/s390/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/s390/kernel/ptrace.c linux-2.6.31.6-vs2.3.0.36.24/arch/s390/kernel/ptrace.c +--- linux-2.6.31.6/arch/s390/kernel/ptrace.c 2009-09-10 15:25:43.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/s390/kernel/ptrace.c 2009-09-10 16:17:22.000000000 +0200 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff -NurpP --minimal linux-2.6.31.6/arch/s390/kernel/syscalls.S linux-2.6.31.6-vs2.3.0.36.24/arch/s390/kernel/syscalls.S +--- linux-2.6.31.6/arch/s390/kernel/syscalls.S 2009-09-10 15:25:43.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/s390/kernel/syscalls.S 2009-09-10 16:11:43.000000000 +0200 +@@ -271,7 +271,7 @@ SYSCALL(sys_clock_settime,sys_clock_sett + SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260 */ + SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper) + SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys32_clock_nanosleep_wrapper) +-NI_SYSCALL /* reserved for vserver */ ++SYSCALL(sys_vserver,sys_vserver,sys32_vserver) + SYSCALL(sys_s390_fadvise64_64,sys_ni_syscall,sys32_fadvise64_64_wrapper) + SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper) + SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper) +diff -NurpP --minimal linux-2.6.31.6/arch/s390/lib/uaccess_pt.c linux-2.6.31.6-vs2.3.0.36.24/arch/s390/lib/uaccess_pt.c +--- linux-2.6.31.6/arch/s390/lib/uaccess_pt.c 2009-09-10 15:25:43.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/s390/lib/uaccess_pt.c 2009-09-29 17:29:02.000000000 +0200 +@@ -90,7 +90,8 @@ out_of_memory: + down_read(&mm->mmap_sem); + goto survive; + } +- printk("VM: killing process %s\n", current->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ current->comm, task_pid_nr(current), current->xid); + return ret; + + out_sigbus: +diff -NurpP --minimal linux-2.6.31.6/arch/sh/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/sh/Kconfig +--- linux-2.6.31.6/arch/sh/Kconfig 2009-09-10 15:25:43.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sh/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -813,6 +813,8 @@ source "fs/Kconfig" + + source "arch/sh/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/sh/kernel/irq.c linux-2.6.31.6-vs2.3.0.36.24/arch/sh/kernel/irq.c +--- linux-2.6.31.6/arch/sh/kernel/irq.c 2009-09-10 15:25:45.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sh/kernel/irq.c 2009-09-10 16:11:43.000000000 +0200 +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff -NurpP --minimal linux-2.6.31.6/arch/sh/kernel/vsyscall/vsyscall.c linux-2.6.31.6-vs2.3.0.36.24/arch/sh/kernel/vsyscall/vsyscall.c +--- linux-2.6.31.6/arch/sh/kernel/vsyscall/vsyscall.c 2009-03-24 14:18:42.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sh/kernel/vsyscall/vsyscall.c 2009-09-10 16:11:43.000000000 +0200 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + /* + * Should the kernel map a VDSO page into processes and pass its +diff -NurpP --minimal linux-2.6.31.6/arch/sh/mm/fault_32.c linux-2.6.31.6-vs2.3.0.36.24/arch/sh/mm/fault_32.c +--- linux-2.6.31.6/arch/sh/mm/fault_32.c 2009-09-10 15:25:45.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sh/mm/fault_32.c 2009-09-29 17:29:36.000000000 +0200 +@@ -246,7 +246,8 @@ out_of_memory: + down_read(&mm->mmap_sem); + goto survive; + } +- printk("VM: killing process %s\n", tsk->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ tsk->comm, task_pid_nr(tsk), tsk->xid); + if (user_mode(regs)) + do_group_exit(SIGKILL); + goto no_context; +diff -NurpP --minimal linux-2.6.31.6/arch/sh/mm/tlbflush_64.c linux-2.6.31.6-vs2.3.0.36.24/arch/sh/mm/tlbflush_64.c +--- linux-2.6.31.6/arch/sh/mm/tlbflush_64.c 2009-09-10 15:25:45.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sh/mm/tlbflush_64.c 2009-09-29 17:29:54.000000000 +0200 +@@ -306,7 +306,8 @@ out_of_memory: + down_read(&mm->mmap_sem); + goto survive; + } +- printk("VM: killing process %s\n", tsk->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ tsk->comm, task_pid_nr(tsk), tsk->xid); + if (user_mode(regs)) + do_group_exit(SIGKILL); + goto no_context; +diff -NurpP --minimal linux-2.6.31.6/arch/sparc/include/asm/tlb_64.h linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/include/asm/tlb_64.h +--- linux-2.6.31.6/arch/sparc/include/asm/tlb_64.h 2009-09-10 15:25:45.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/include/asm/tlb_64.h 2009-09-10 16:11:43.000000000 +0200 +@@ -3,6 +3,7 @@ + + #include + #include ++#include + #include + #include + #include +diff -NurpP --minimal linux-2.6.31.6/arch/sparc/include/asm/unistd.h linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/include/asm/unistd.h +--- linux-2.6.31.6/arch/sparc/include/asm/unistd.h 2009-09-10 15:25:45.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/include/asm/unistd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -335,7 +335,7 @@ + #define __NR_timer_getoverrun 264 + #define __NR_timer_delete 265 + #define __NR_timer_create 266 +-/* #define __NR_vserver 267 Reserved for VSERVER */ ++#define __NR_vserver 267 + #define __NR_io_setup 268 + #define __NR_io_destroy 269 + #define __NR_io_submit 270 +diff -NurpP --minimal linux-2.6.31.6/arch/sparc/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/Kconfig +--- linux-2.6.31.6/arch/sparc/Kconfig 2009-09-10 15:25:45.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -530,6 +530,8 @@ source "fs/Kconfig" + + source "arch/sparc/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/sparc/kernel/systbls_32.S linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/kernel/systbls_32.S +--- linux-2.6.31.6/arch/sparc/kernel/systbls_32.S 2009-09-10 15:25:45.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/kernel/systbls_32.S 2009-09-10 16:11:43.000000000 +0200 +@@ -70,7 +70,7 @@ sys_call_table: + /*250*/ .long sparc_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl + /*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep + /*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun +-/*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy ++/*265*/ .long sys_timer_delete, sys_timer_create, sys_vserver, sys_io_setup, sys_io_destroy + /*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink + /*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid + /*280*/ .long sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat +diff -NurpP --minimal linux-2.6.31.6/arch/sparc/kernel/systbls_64.S linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/kernel/systbls_64.S +--- linux-2.6.31.6/arch/sparc/kernel/systbls_64.S 2009-09-10 15:25:45.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/sparc/kernel/systbls_64.S 2009-09-10 16:11:43.000000000 +0200 +@@ -71,7 +71,7 @@ sys_call_table32: + /*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl + .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep + /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun +- .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy ++ .word sys_timer_delete, compat_sys_timer_create, sys32_vserver, compat_sys_io_setup, sys_io_destroy + /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink + .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid + /*280*/ .word sys32_tee, sys_add_key, sys_request_key, sys_keyctl, compat_sys_openat +@@ -146,7 +146,7 @@ sys_call_table: + /*250*/ .word sys_64_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl + .word sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep + /*260*/ .word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun +- .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy ++ .word sys_timer_delete, sys_timer_create, sys_vserver, sys_io_setup, sys_io_destroy + /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink + .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid + /*280*/ .word sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat +diff -NurpP --minimal linux-2.6.31.6/arch/x86/ia32/ia32entry.S linux-2.6.31.6-vs2.3.0.36.24/arch/x86/ia32/ia32entry.S +--- linux-2.6.31.6/arch/x86/ia32/ia32entry.S 2009-11-12 12:10:08.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/x86/ia32/ia32entry.S 2009-11-12 12:26:38.000000000 +0100 +@@ -777,7 +777,7 @@ ia32_sys_call_table: + .quad sys_tgkill /* 270 */ + .quad compat_sys_utimes + .quad sys32_fadvise64_64 +- .quad quiet_ni_syscall /* sys_vserver */ ++ .quad sys32_vserver + .quad sys_mbind + .quad compat_sys_get_mempolicy /* 275 */ + .quad sys_set_mempolicy +diff -NurpP --minimal linux-2.6.31.6/arch/x86/include/asm/unistd_64.h linux-2.6.31.6-vs2.3.0.36.24/arch/x86/include/asm/unistd_64.h +--- linux-2.6.31.6/arch/x86/include/asm/unistd_64.h 2009-09-10 15:25:47.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/x86/include/asm/unistd_64.h 2009-09-10 16:11:43.000000000 +0200 +@@ -535,7 +535,7 @@ __SYSCALL(__NR_tgkill, sys_tgkill) + #define __NR_utimes 235 + __SYSCALL(__NR_utimes, sys_utimes) + #define __NR_vserver 236 +-__SYSCALL(__NR_vserver, sys_ni_syscall) ++__SYSCALL(__NR_vserver, sys_vserver) + #define __NR_mbind 237 + __SYSCALL(__NR_mbind, sys_mbind) + #define __NR_set_mempolicy 238 +diff -NurpP --minimal linux-2.6.31.6/arch/x86/Kconfig linux-2.6.31.6-vs2.3.0.36.24/arch/x86/Kconfig +--- linux-2.6.31.6/arch/x86/Kconfig 2009-09-10 15:25:46.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/x86/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -2088,6 +2088,8 @@ source "fs/Kconfig" + + source "arch/x86/Kconfig.debug" + ++source "kernel/vserver/Kconfig" ++ + source "security/Kconfig" + + source "crypto/Kconfig" +diff -NurpP --minimal linux-2.6.31.6/arch/x86/kernel/syscall_table_32.S linux-2.6.31.6-vs2.3.0.36.24/arch/x86/kernel/syscall_table_32.S +--- linux-2.6.31.6/arch/x86/kernel/syscall_table_32.S 2009-09-10 15:25:47.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/x86/kernel/syscall_table_32.S 2009-09-10 16:11:43.000000000 +0200 +@@ -272,7 +272,7 @@ ENTRY(sys_call_table) + .long sys_tgkill /* 270 */ + .long sys_utimes + .long sys_fadvise64_64 +- .long sys_ni_syscall /* sys_vserver */ ++ .long sys_vserver + .long sys_mbind + .long sys_get_mempolicy + .long sys_set_mempolicy +diff -NurpP --minimal linux-2.6.31.6/arch/xtensa/mm/fault.c linux-2.6.31.6-vs2.3.0.36.24/arch/xtensa/mm/fault.c +--- linux-2.6.31.6/arch/xtensa/mm/fault.c 2009-09-10 15:25:48.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/arch/xtensa/mm/fault.c 2009-09-29 17:30:14.000000000 +0200 +@@ -151,7 +151,8 @@ out_of_memory: + down_read(&mm->mmap_sem); + goto survive; + } +- printk("VM: killing process %s\n", current->comm); ++ printk("VM: killing process %s(%d:#%u)\n", ++ current->comm, task_pid_nr(current), current->xid); + if (user_mode(regs)) + do_group_exit(SIGKILL); + bad_page_fault(regs, address, SIGKILL); +diff -NurpP --minimal linux-2.6.31.6/Documentation/scheduler/sched-cfs-hard-limits.txt linux-2.6.31.6-vs2.3.0.36.24/Documentation/scheduler/sched-cfs-hard-limits.txt +--- linux-2.6.31.6/Documentation/scheduler/sched-cfs-hard-limits.txt 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/Documentation/scheduler/sched-cfs-hard-limits.txt 2009-10-06 04:39:46.000000000 +0200 +@@ -0,0 +1,52 @@ ++CPU HARD LIMITS FOR CFS GROUPS ++============================== ++ ++1. Overview ++2. Interface ++3. Examples ++ ++1. Overview ++----------- ++ ++CFS is a proportional share scheduler which tries to divide the CPU time ++proportionately between tasks or groups of tasks (task group/cgroup) depending ++on the priority/weight of the task or shares assigned to groups of tasks. ++In CFS, a task/task group can get more than its share of CPU if there are ++enough idle CPU cycles available in the system, due to the work conserving ++nature of the scheduler. However in certain scenarios (like pay-per-use), ++it is desirable not to provide extra time to a group even in the presence ++of idle CPU cycles. This is where hard limiting can be of use. ++ ++Hard limits for task groups can be set by specifying how much CPU runtime a ++group can consume within a given period. If the group consumes more CPU time ++than the runtime in a given period, it gets throttled. None of the tasks of ++the throttled group gets to run until the runtime of the group gets refreshed ++at the beginning of the next period. ++ ++2. Interface ++------------ ++ ++Hard limit feature adds 3 cgroup files for CFS group scheduler: ++ ++cfs_runtime_us: Hard limit for the group in microseconds. ++ ++cfs_period_us: Time period in microseconds within which hard limits is ++enforced. ++ ++cfs_hard_limit: The control file to enable or disable hard limiting for the ++group. ++ ++A group gets created with default values for runtime and period and with ++hard limit disabled. Each group can set its own values for runtime and period ++independent of other groups in the system. ++ ++3. Examples ++----------- ++ ++# mount -t cgroup -ocpu none /cgroups/ ++# cd /cgroups ++# mkdir 1 ++# cd 1/ ++# echo 250000 > cfs_runtime_us /* set a 250ms runtime or limit */ ++# echo 500000 > cfs_period_us /* set a 500ms period */ ++# echo 1 > cfs_hard_limit /* enable hard limiting for group 1/ */ +diff -NurpP --minimal linux-2.6.31.6/Documentation/vserver/debug.txt linux-2.6.31.6-vs2.3.0.36.24/Documentation/vserver/debug.txt +--- linux-2.6.31.6/Documentation/vserver/debug.txt 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/Documentation/vserver/debug.txt 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,154 @@ ++ ++debug_cvirt: ++ ++ 2 4 "vx_map_tgid: %p/%llx: %d -> %d" ++ "vx_rmap_tgid: %p/%llx: %d -> %d" ++ ++debug_dlim: ++ ++ 0 1 "ALLOC (%p,#%d)%c inode (%d)" ++ "FREE (%p,#%d)%c inode" ++ 1 2 "ALLOC (%p,#%d)%c %lld bytes (%d)" ++ "FREE (%p,#%d)%c %lld bytes" ++ 2 4 "ADJUST: %lld,%lld on %ld,%ld [mult=%d]" ++ 3 8 "ext3_has_free_blocks(%p): %lu<%lu+1, %c, %u!=%u r=%d" ++ "ext3_has_free_blocks(%p): free=%lu, root=%lu" ++ "rcu_free_dl_info(%p)" ++ 4 10 "alloc_dl_info(%p,%d) = %p" ++ "dealloc_dl_info(%p)" ++ "get_dl_info(%p[#%d.%d])" ++ "put_dl_info(%p[#%d.%d])" ++ 5 20 "alloc_dl_info(%p,%d)*" ++ 6 40 "__hash_dl_info: %p[#%d]" ++ "__unhash_dl_info: %p[#%d]" ++ 7 80 "locate_dl_info(%p,#%d) = %p" ++ ++debug_misc: ++ ++ 0 1 "destroy_dqhash: %p [#0x%08x] c=%d" ++ "new_dqhash: %p [#0x%08x]" ++ "vroot[%d]_clr_dev: dev=%p[%lu,%d:%d]" ++ "vroot[%d]_get_real_bdev: dev=%p[%lu,%d:%d]" ++ "vroot[%d]_set_dev: dev=%p[%lu,%d:%d]" ++ "vroot_get_real_bdev not set" ++ 1 2 "cow_break_link(»%s«)" ++ "temp copy »%s«" ++ 2 4 "dentry_open(new): %p" ++ "dentry_open(old): %p" ++ "lookup_create(new): %p" ++ "old path »%s«" ++ "path_lookup(old): %d" ++ "vfs_create(new): %d" ++ "vfs_rename: %d" ++ "vfs_sendfile: %d" ++ 3 8 "fput(new_file=%p[#%d])" ++ "fput(old_file=%p[#%d])" ++ 4 10 "vx_info_kill(%p[#%d],%d,%d) = %d" ++ "vx_info_kill(%p[#%d],%d,%d)*" ++ 5 20 "vs_reboot(%p[#%d],%d)" ++ 6 40 "dropping task %p[#%u,%u] for %p[#%u,%u]" ++ ++debug_net: ++ ++ 2 4 "nx_addr_conflict(%p,%p) %d.%d,%d.%d" ++ 3 8 "inet_bind(%p) %d.%d.%d.%d, %d.%d.%d.%d, %d.%d.%d.%d" ++ "inet_bind(%p)* %p,%p;%lx %d.%d.%d.%d" ++ 4 10 "ip_route_connect(%p) %p,%p;%lx" ++ 5 20 "__addr_in_socket(%p,%d.%d.%d.%d) %p:%d.%d.%d.%d %p;%lx" ++ 6 40 "sk,egf: %p [#%d] (from %d)" ++ "sk,egn: %p [#%d] (from %d)" ++ "sk,req: %p [#%d] (from %d)" ++ "sk: %p [#%d] (from %d)" ++ "tw: %p [#%d] (from %d)" ++ 7 80 "__sock_recvmsg: %p[%p,%p,%p;%d]:%d/%d" ++ "__sock_sendmsg: %p[%p,%p,%p;%d]:%d/%d" ++ ++debug_nid: ++ ++ 0 1 "__lookup_nx_info(#%u): %p[#%u]" ++ "alloc_nx_info(%d) = %p" ++ "create_nx_info(%d) (dynamic rejected)" ++ "create_nx_info(%d) = %p (already there)" ++ "create_nx_info(%d) = %p (new)" ++ "dealloc_nx_info(%p)" ++ 1 2 "alloc_nx_info(%d)*" ++ "create_nx_info(%d)*" ++ 2 4 "get_nx_info(%p[#%d.%d])" ++ "put_nx_info(%p[#%d.%d])" ++ 3 8 "claim_nx_info(%p[#%d.%d.%d]) %p" ++ "clr_nx_info(%p[#%d.%d])" ++ "init_nx_info(%p[#%d.%d])" ++ "release_nx_info(%p[#%d.%d.%d]) %p" ++ "set_nx_info(%p[#%d.%d])" ++ 4 10 "__hash_nx_info: %p[#%d]" ++ "__nx_dynamic_id: [#%d]" ++ "__unhash_nx_info: %p[#%d.%d.%d]" ++ 5 20 "moved task %p into nxi:%p[#%d]" ++ "nx_migrate_task(%p,%p[#%d.%d.%d])" ++ "task_get_nx_info(%p)" ++ 6 40 "nx_clear_persistent(%p[#%d])" ++ ++debug_quota: ++ ++ 0 1 "quota_sync_dqh(%p,%d) discard inode %p" ++ 1 2 "quota_sync_dqh(%p,%d)" ++ "sync_dquots(%p,%d)" ++ "sync_dquots_dqh(%p,%d)" ++ 3 8 "do_quotactl(%p,%d,cmd=%d,id=%d,%p)" ++ ++debug_switch: ++ ++ 0 1 "vc: VCMD_%02d_%d[%d], %d,%p [%d,%d,%x,%x]" ++ 1 2 "vc: VCMD_%02d_%d[%d] = %08lx(%ld) [%d,%d]" ++ 4 10 "%s: (%s %s) returned %s with %d" ++ ++debug_tag: ++ ++ 7 80 "dx_parse_tag(»%s«): %d:#%d" ++ "dx_propagate_tag(%p[#%lu.%d]): %d,%d" ++ ++debug_xid: ++ ++ 0 1 "__lookup_vx_info(#%u): %p[#%u]" ++ "alloc_vx_info(%d) = %p" ++ "alloc_vx_info(%d)*" ++ "create_vx_info(%d) (dynamic rejected)" ++ "create_vx_info(%d) = %p (already there)" ++ "create_vx_info(%d) = %p (new)" ++ "dealloc_vx_info(%p)" ++ "loc_vx_info(%d) = %p (found)" ++ "loc_vx_info(%d) = %p (new)" ++ "loc_vx_info(%d) = %p (not available)" ++ 1 2 "create_vx_info(%d)*" ++ "loc_vx_info(%d)*" ++ 2 4 "get_vx_info(%p[#%d.%d])" ++ "put_vx_info(%p[#%d.%d])" ++ 3 8 "claim_vx_info(%p[#%d.%d.%d]) %p" ++ "clr_vx_info(%p[#%d.%d])" ++ "init_vx_info(%p[#%d.%d])" ++ "release_vx_info(%p[#%d.%d.%d]) %p" ++ "set_vx_info(%p[#%d.%d])" ++ 4 10 "__hash_vx_info: %p[#%d]" ++ "__unhash_vx_info: %p[#%d.%d.%d]" ++ "__vx_dynamic_id: [#%d]" ++ 5 20 "enter_vx_info(%p[#%d],%p) %p[#%d,%p]" ++ "leave_vx_info(%p[#%d,%p]) %p[#%d,%p]" ++ "moved task %p into vxi:%p[#%d]" ++ "task_get_vx_info(%p)" ++ "vx_migrate_task(%p,%p[#%d.%d])" ++ 6 40 "vx_clear_persistent(%p[#%d])" ++ "vx_exit_init(%p[#%d],%p[#%d,%d,%d])" ++ "vx_set_init(%p[#%d],%p[#%d,%d,%d])" ++ "vx_set_persistent(%p[#%d])" ++ "vx_set_reaper(%p[#%d],%p[#%d,%d])" ++ 7 80 "vx_child_reaper(%p[#%u,%u]) = %p[#%u,%u]" ++ ++ ++debug_limit: ++ ++ n 2^n "vx_acc_cres[%5d,%s,%2d]: %5d%s" ++ "vx_cres_avail[%5d,%s,%2d]: %5ld > %5d + %5d" ++ ++ m 2^m "vx_acc_page[%5d,%s,%2d]: %5d%s" ++ "vx_acc_pages[%5d,%s,%2d]: %5d += %5d" ++ "vx_pages_avail[%5d,%s,%2d]: %5ld > %5d + %5d" +diff -NurpP --minimal linux-2.6.31.6/drivers/block/Kconfig linux-2.6.31.6-vs2.3.0.36.24/drivers/block/Kconfig +--- linux-2.6.31.6/drivers/block/Kconfig 2009-09-10 15:25:49.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/block/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -271,6 +271,13 @@ config BLK_DEV_CRYPTOLOOP + instead, which can be configured to be on-disk compatible with the + cryptoloop device. + ++config BLK_DEV_VROOT ++ tristate "Virtual Root device support" ++ depends on QUOTACTL ++ ---help--- ++ Saying Y here will allow you to use quota/fs ioctls on a shared ++ partition within a virtual server without compromising security. ++ + config BLK_DEV_NBD + tristate "Network block device support" + depends on NET +diff -NurpP --minimal linux-2.6.31.6/drivers/block/loop.c linux-2.6.31.6-vs2.3.0.36.24/drivers/block/loop.c +--- linux-2.6.31.6/drivers/block/loop.c 2009-09-10 15:25:49.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/block/loop.c 2009-09-10 16:11:43.000000000 +0200 +@@ -74,6 +74,7 @@ + #include + #include + #include ++#include + + #include + +@@ -812,6 +813,7 @@ static int loop_set_fd(struct loop_devic + lo->lo_blocksize = lo_blocksize; + lo->lo_device = bdev; + lo->lo_flags = lo_flags; ++ lo->lo_xid = vx_current_xid(); + lo->lo_backing_file = file; + lo->transfer = transfer_none; + lo->ioctl = NULL; +@@ -937,6 +939,7 @@ static int loop_clr_fd(struct loop_devic + lo->lo_encrypt_key_size = 0; + lo->lo_flags = 0; + lo->lo_thread = NULL; ++ lo->lo_xid = 0; + memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE); + memset(lo->lo_crypt_name, 0, LO_NAME_SIZE); + memset(lo->lo_file_name, 0, LO_NAME_SIZE); +@@ -971,7 +974,7 @@ loop_set_status(struct loop_device *lo, + + if (lo->lo_encrypt_key_size && + lo->lo_key_owner != uid && +- !capable(CAP_SYS_ADMIN)) ++ !vx_capable(CAP_SYS_ADMIN, VXC_ADMIN_CLOOP)) + return -EPERM; + if (lo->lo_state != Lo_bound) + return -ENXIO; +@@ -1055,7 +1058,8 @@ loop_get_status(struct loop_device *lo, + memcpy(info->lo_crypt_name, lo->lo_crypt_name, LO_NAME_SIZE); + info->lo_encrypt_type = + lo->lo_encryption ? lo->lo_encryption->number : 0; +- if (lo->lo_encrypt_key_size && capable(CAP_SYS_ADMIN)) { ++ if (lo->lo_encrypt_key_size && ++ vx_capable(CAP_SYS_ADMIN, VXC_ADMIN_CLOOP)) { + info->lo_encrypt_key_size = lo->lo_encrypt_key_size; + memcpy(info->lo_encrypt_key, lo->lo_encrypt_key, + lo->lo_encrypt_key_size); +@@ -1399,6 +1403,9 @@ static int lo_open(struct block_device * + { + struct loop_device *lo = bdev->bd_disk->private_data; + ++ if (!vx_check(lo->lo_xid, VS_IDENT|VS_HOSTID|VS_ADMIN_P)) ++ return -EACCES; ++ + mutex_lock(&lo->lo_ctl_mutex); + lo->lo_refcnt++; + mutex_unlock(&lo->lo_ctl_mutex); +diff -NurpP --minimal linux-2.6.31.6/drivers/block/Makefile linux-2.6.31.6-vs2.3.0.36.24/drivers/block/Makefile +--- linux-2.6.31.6/drivers/block/Makefile 2009-09-10 15:25:49.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/block/Makefile 2009-09-10 16:11:43.000000000 +0200 +@@ -34,6 +34,7 @@ obj-$(CONFIG_VIODASD) += viodasd.o + obj-$(CONFIG_BLK_DEV_SX8) += sx8.o + obj-$(CONFIG_BLK_DEV_UB) += ub.o + obj-$(CONFIG_BLK_DEV_HD) += hd.o ++obj-$(CONFIG_BLK_DEV_VROOT) += vroot.o + + obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o + +diff -NurpP --minimal linux-2.6.31.6/drivers/block/vroot.c linux-2.6.31.6-vs2.3.0.36.24/drivers/block/vroot.c +--- linux-2.6.31.6/drivers/block/vroot.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/block/vroot.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,281 @@ ++/* ++ * linux/drivers/block/vroot.c ++ * ++ * written by Herbert Pötzl, 9/11/2002 ++ * ported to 2.6.10 by Herbert Pötzl, 30/12/2004 ++ * ++ * based on the loop.c code by Theodore Ts'o. ++ * ++ * Copyright (C) 2002-2007 by Herbert Pötzl. ++ * Redistribution of this file is permitted under the ++ * GNU General Public License. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++ ++static int max_vroot = 8; ++ ++static struct vroot_device *vroot_dev; ++static struct gendisk **disks; ++ ++ ++static int vroot_set_dev( ++ struct vroot_device *vr, ++ struct block_device *bdev, ++ unsigned int arg) ++{ ++ struct block_device *real_bdev; ++ struct file *file; ++ struct inode *inode; ++ int error; ++ ++ error = -EBUSY; ++ if (vr->vr_state != Vr_unbound) ++ goto out; ++ ++ error = -EBADF; ++ file = fget(arg); ++ if (!file) ++ goto out; ++ ++ error = -EINVAL; ++ inode = file->f_dentry->d_inode; ++ ++ ++ if (S_ISBLK(inode->i_mode)) { ++ real_bdev = inode->i_bdev; ++ vr->vr_device = real_bdev; ++ __iget(real_bdev->bd_inode); ++ } else ++ goto out_fput; ++ ++ vxdprintk(VXD_CBIT(misc, 0), ++ "vroot[%d]_set_dev: dev=" VXF_DEV, ++ vr->vr_number, VXD_DEV(real_bdev)); ++ ++ vr->vr_state = Vr_bound; ++ error = 0; ++ ++ out_fput: ++ fput(file); ++ out: ++ return error; ++} ++ ++static int vroot_clr_dev( ++ struct vroot_device *vr, ++ struct block_device *bdev) ++{ ++ struct block_device *real_bdev; ++ ++ if (vr->vr_state != Vr_bound) ++ return -ENXIO; ++ if (vr->vr_refcnt > 1) /* we needed one fd for the ioctl */ ++ return -EBUSY; ++ ++ real_bdev = vr->vr_device; ++ ++ vxdprintk(VXD_CBIT(misc, 0), ++ "vroot[%d]_clr_dev: dev=" VXF_DEV, ++ vr->vr_number, VXD_DEV(real_bdev)); ++ ++ bdput(real_bdev); ++ vr->vr_state = Vr_unbound; ++ vr->vr_device = NULL; ++ return 0; ++} ++ ++ ++static int vr_ioctl(struct block_device *bdev, fmode_t mode, ++ unsigned int cmd, unsigned long arg) ++{ ++ struct vroot_device *vr = bdev->bd_disk->private_data; ++ int err; ++ ++ down(&vr->vr_ctl_mutex); ++ switch (cmd) { ++ case VROOT_SET_DEV: ++ err = vroot_set_dev(vr, bdev, arg); ++ break; ++ case VROOT_CLR_DEV: ++ err = vroot_clr_dev(vr, bdev); ++ break; ++ default: ++ err = -EINVAL; ++ break; ++ } ++ up(&vr->vr_ctl_mutex); ++ return err; ++} ++ ++static int vr_open(struct block_device *bdev, fmode_t mode) ++{ ++ struct vroot_device *vr = bdev->bd_disk->private_data; ++ ++ down(&vr->vr_ctl_mutex); ++ vr->vr_refcnt++; ++ up(&vr->vr_ctl_mutex); ++ return 0; ++} ++ ++static int vr_release(struct gendisk *disk, fmode_t mode) ++{ ++ struct vroot_device *vr = disk->private_data; ++ ++ down(&vr->vr_ctl_mutex); ++ --vr->vr_refcnt; ++ up(&vr->vr_ctl_mutex); ++ return 0; ++} ++ ++static struct block_device_operations vr_fops = { ++ .owner = THIS_MODULE, ++ .open = vr_open, ++ .release = vr_release, ++ .ioctl = vr_ioctl, ++}; ++ ++struct block_device *__vroot_get_real_bdev(struct block_device *bdev) ++{ ++ struct inode *inode = bdev->bd_inode; ++ struct vroot_device *vr; ++ struct block_device *real_bdev; ++ int minor = iminor(inode); ++ ++ vr = &vroot_dev[minor]; ++ real_bdev = vr->vr_device; ++ ++ vxdprintk(VXD_CBIT(misc, 0), ++ "vroot[%d]_get_real_bdev: dev=" VXF_DEV, ++ vr->vr_number, VXD_DEV(real_bdev)); ++ ++ if (vr->vr_state != Vr_bound) ++ return ERR_PTR(-ENXIO); ++ ++ __iget(real_bdev->bd_inode); ++ return real_bdev; ++} ++ ++/* ++ * And now the modules code and kernel interface. ++ */ ++ ++module_param(max_vroot, int, 0); ++ ++MODULE_PARM_DESC(max_vroot, "Maximum number of vroot devices (1-256)"); ++MODULE_LICENSE("GPL"); ++MODULE_ALIAS_BLOCKDEV_MAJOR(VROOT_MAJOR); ++ ++MODULE_AUTHOR ("Herbert Pötzl"); ++MODULE_DESCRIPTION ("Virtual Root Device Mapper"); ++ ++ ++int __init vroot_init(void) ++{ ++ int err, i; ++ ++ if (max_vroot < 1 || max_vroot > 256) { ++ max_vroot = MAX_VROOT_DEFAULT; ++ printk(KERN_WARNING "vroot: invalid max_vroot " ++ "(must be between 1 and 256), " ++ "using default (%d)\n", max_vroot); ++ } ++ ++ if (register_blkdev(VROOT_MAJOR, "vroot")) ++ return -EIO; ++ ++ err = -ENOMEM; ++ vroot_dev = kmalloc(max_vroot * sizeof(struct vroot_device), GFP_KERNEL); ++ if (!vroot_dev) ++ goto out_mem1; ++ memset(vroot_dev, 0, max_vroot * sizeof(struct vroot_device)); ++ ++ disks = kmalloc(max_vroot * sizeof(struct gendisk *), GFP_KERNEL); ++ if (!disks) ++ goto out_mem2; ++ ++ for (i = 0; i < max_vroot; i++) { ++ disks[i] = alloc_disk(1); ++ if (!disks[i]) ++ goto out_mem3; ++ disks[i]->queue = blk_alloc_queue(GFP_KERNEL); ++ if (!disks[i]->queue) ++ goto out_mem3; ++ } ++ ++ for (i = 0; i < max_vroot; i++) { ++ struct vroot_device *vr = &vroot_dev[i]; ++ struct gendisk *disk = disks[i]; ++ ++ memset(vr, 0, sizeof(*vr)); ++ init_MUTEX(&vr->vr_ctl_mutex); ++ vr->vr_number = i; ++ disk->major = VROOT_MAJOR; ++ disk->first_minor = i; ++ disk->fops = &vr_fops; ++ sprintf(disk->disk_name, "vroot%d", i); ++ disk->private_data = vr; ++ } ++ ++ err = register_vroot_grb(&__vroot_get_real_bdev); ++ if (err) ++ goto out_mem3; ++ ++ for (i = 0; i < max_vroot; i++) ++ add_disk(disks[i]); ++ printk(KERN_INFO "vroot: loaded (max %d devices)\n", max_vroot); ++ return 0; ++ ++out_mem3: ++ while (i--) ++ put_disk(disks[i]); ++ kfree(disks); ++out_mem2: ++ kfree(vroot_dev); ++out_mem1: ++ unregister_blkdev(VROOT_MAJOR, "vroot"); ++ printk(KERN_ERR "vroot: ran out of memory\n"); ++ return err; ++} ++ ++void vroot_exit(void) ++{ ++ int i; ++ ++ if (unregister_vroot_grb(&__vroot_get_real_bdev)) ++ printk(KERN_WARNING "vroot: cannot unregister grb\n"); ++ ++ for (i = 0; i < max_vroot; i++) { ++ del_gendisk(disks[i]); ++ put_disk(disks[i]); ++ } ++ unregister_blkdev(VROOT_MAJOR, "vroot"); ++ ++ kfree(disks); ++ kfree(vroot_dev); ++} ++ ++module_init(vroot_init); ++module_exit(vroot_exit); ++ ++#ifndef MODULE ++ ++static int __init max_vroot_setup(char *str) ++{ ++ max_vroot = simple_strtol(str, NULL, 0); ++ return 1; ++} ++ ++__setup("max_vroot=", max_vroot_setup); ++ ++#endif ++ +diff -NurpP --minimal linux-2.6.31.6/drivers/char/sysrq.c linux-2.6.31.6-vs2.3.0.36.24/drivers/char/sysrq.c +--- linux-2.6.31.6/drivers/char/sysrq.c 2009-09-10 15:25:50.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/char/sysrq.c 2009-09-10 16:11:43.000000000 +0200 +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -382,6 +383,21 @@ static struct sysrq_key_op sysrq_unrt_op + .enable_mask = SYSRQ_ENABLE_RTNICE, + }; + ++ ++#ifdef CONFIG_VSERVER_DEBUG ++static void sysrq_handle_vxinfo(int key, struct tty_struct *tty) ++{ ++ dump_vx_info_inactive((key == 'x')?0:1); ++} ++ ++static struct sysrq_key_op sysrq_showvxinfo_op = { ++ .handler = sysrq_handle_vxinfo, ++ .help_msg = "conteXt", ++ .action_msg = "Show Context Info", ++ .enable_mask = SYSRQ_ENABLE_DUMP, ++}; ++#endif ++ + /* Key Operations table and lock */ + static DEFINE_SPINLOCK(sysrq_key_table_lock); + +@@ -436,7 +452,11 @@ static struct sysrq_key_op *sysrq_key_ta + NULL, /* v */ + &sysrq_showstate_blocked_op, /* w */ + /* x: May be registered on ppc/powerpc for xmon */ ++#ifdef CONFIG_VSERVER_DEBUG ++ &sysrq_showvxinfo_op, /* x */ ++#else + NULL, /* x */ ++#endif + /* y: May be registered on sparc64 for global register dump */ + NULL, /* y */ + &sysrq_ftrace_dump_op, /* z */ +@@ -451,6 +471,8 @@ static int sysrq_key_table_key2index(int + retval = key - '0'; + else if ((key >= 'a') && (key <= 'z')) + retval = key + 10 - 'a'; ++ else if ((key >= 'A') && (key <= 'Z')) ++ retval = key + 10 - 'A'; + else + retval = -1; + return retval; +diff -NurpP --minimal linux-2.6.31.6/drivers/char/tty_io.c linux-2.6.31.6-vs2.3.0.36.24/drivers/char/tty_io.c +--- linux-2.6.31.6/drivers/char/tty_io.c 2009-11-12 12:10:09.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/char/tty_io.c 2009-10-05 23:35:52.000000000 +0200 +@@ -106,6 +106,7 @@ + + #include + #include ++#include + + #undef TTY_DEBUG_HANGUP + +@@ -2236,6 +2237,7 @@ static int tiocspgrp(struct tty_struct * + return -ENOTTY; + if (get_user(pgrp_nr, p)) + return -EFAULT; ++ pgrp_nr = vx_rmap_pid(pgrp_nr); + if (pgrp_nr < 0) + return -EINVAL; + rcu_read_lock(); +diff -NurpP --minimal linux-2.6.31.6/drivers/infiniband/hw/ipath/ipath_user_pages.c linux-2.6.31.6-vs2.3.0.36.24/drivers/infiniband/hw/ipath/ipath_user_pages.c +--- linux-2.6.31.6/drivers/infiniband/hw/ipath/ipath_user_pages.c 2009-06-11 17:12:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/infiniband/hw/ipath/ipath_user_pages.c 2009-09-10 16:11:43.000000000 +0200 +@@ -33,6 +33,7 @@ + + #include + #include ++#include + + #include "ipath_kernel.h" + +@@ -61,7 +62,8 @@ static int __get_user_pages(unsigned lon + lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur >> + PAGE_SHIFT; + +- if (num_pages > lock_limit) { ++ if (num_pages > lock_limit || ++ !vx_vmlocked_avail(current->mm, num_pages)) { + ret = -ENOMEM; + goto bail; + } +@@ -78,7 +80,7 @@ static int __get_user_pages(unsigned lon + goto bail_release; + } + +- current->mm->locked_vm += num_pages; ++ vx_vmlocked_add(current->mm, num_pages); + + ret = 0; + goto bail; +@@ -177,7 +179,7 @@ void ipath_release_user_pages(struct pag + + __ipath_release_user_pages(p, num_pages, 1); + +- current->mm->locked_vm -= num_pages; ++ vx_vmlocked_sub(current->mm, num_pages); + + up_write(¤t->mm->mmap_sem); + } +@@ -194,7 +196,7 @@ static void user_pages_account(struct wo + container_of(_work, struct ipath_user_pages_work, work); + + down_write(&work->mm->mmap_sem); +- work->mm->locked_vm -= work->num_pages; ++ vx_vmlocked_sub(work->mm, work->num_pages); + up_write(&work->mm->mmap_sem); + mmput(work->mm); + kfree(work); +diff -NurpP --minimal linux-2.6.31.6/drivers/md/dm.c linux-2.6.31.6-vs2.3.0.36.24/drivers/md/dm.c +--- linux-2.6.31.6/drivers/md/dm.c 2009-11-12 12:10:10.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/md/dm.c 2009-11-12 12:26:38.000000000 +0100 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #include + +@@ -119,6 +120,7 @@ struct mapped_device { + rwlock_t map_lock; + atomic_t holders; + atomic_t open_count; ++ xid_t xid; + + unsigned long flags; + +@@ -323,6 +325,7 @@ static void __exit dm_exit(void) + static int dm_blk_open(struct block_device *bdev, fmode_t mode) + { + struct mapped_device *md; ++ int ret = -ENXIO; + + spin_lock(&_minor_lock); + +@@ -331,18 +334,19 @@ static int dm_blk_open(struct block_devi + goto out; + + if (test_bit(DMF_FREEING, &md->flags) || +- test_bit(DMF_DELETING, &md->flags)) { +- md = NULL; ++ test_bit(DMF_DELETING, &md->flags)) ++ goto out; ++ ++ ret = -EACCES; ++ if (!vx_check(md->xid, VS_IDENT|VS_HOSTID)) + goto out; +- } + + dm_get(md); + atomic_inc(&md->open_count); +- ++ ret = 0; + out: + spin_unlock(&_minor_lock); +- +- return md ? 0 : -ENXIO; ++ return ret; + } + + static int dm_blk_close(struct gendisk *disk, fmode_t mode) +@@ -551,6 +555,14 @@ int dm_set_geometry(struct mapped_device + return 0; + } + ++/* ++ * Get the xid associated with a dm device ++ */ ++xid_t dm_get_xid(struct mapped_device *md) ++{ ++ return md->xid; ++} ++ + /*----------------------------------------------------------------- + * CRUD START: + * A more elegant soln is in the works that uses the queue +@@ -1760,6 +1772,7 @@ static struct mapped_device *alloc_dev(i + INIT_LIST_HEAD(&md->uevent_list); + spin_lock_init(&md->uevent_lock); + ++ md->xid = vx_current_xid(); + md->queue = blk_init_queue(dm_request_fn, NULL); + if (!md->queue) + goto bad_queue; +diff -NurpP --minimal linux-2.6.31.6/drivers/md/dm.h linux-2.6.31.6-vs2.3.0.36.24/drivers/md/dm.h +--- linux-2.6.31.6/drivers/md/dm.h 2009-09-10 15:25:55.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/md/dm.h 2009-09-10 16:11:43.000000000 +0200 +@@ -41,6 +41,8 @@ struct dm_dev_internal { + struct dm_table; + struct dm_md_mempools; + ++xid_t dm_get_xid(struct mapped_device *md); ++ + /*----------------------------------------------------------------- + * Internal table functions. + *---------------------------------------------------------------*/ +diff -NurpP --minimal linux-2.6.31.6/drivers/md/dm-ioctl.c linux-2.6.31.6-vs2.3.0.36.24/drivers/md/dm-ioctl.c +--- linux-2.6.31.6/drivers/md/dm-ioctl.c 2009-09-10 15:25:55.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/md/dm-ioctl.c 2009-09-10 16:11:43.000000000 +0200 +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + #include + +@@ -101,7 +102,8 @@ static struct hash_cell *__get_name_cell + unsigned int h = hash_str(str); + + list_for_each_entry (hc, _name_buckets + h, name_list) +- if (!strcmp(hc->name, str)) { ++ if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) && ++ !strcmp(hc->name, str)) { + dm_get(hc->md); + return hc; + } +@@ -115,7 +117,8 @@ static struct hash_cell *__get_uuid_cell + unsigned int h = hash_str(str); + + list_for_each_entry (hc, _uuid_buckets + h, uuid_list) +- if (!strcmp(hc->uuid, str)) { ++ if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) && ++ !strcmp(hc->uuid, str)) { + dm_get(hc->md); + return hc; + } +@@ -352,6 +355,9 @@ typedef int (*ioctl_fn)(struct dm_ioctl + + static int remove_all(struct dm_ioctl *param, size_t param_size) + { ++ if (!vx_check(0, VS_ADMIN)) ++ return -EPERM; ++ + dm_hash_remove_all(1); + param->data_size = 0; + return 0; +@@ -399,6 +405,8 @@ static int list_devices(struct dm_ioctl + */ + for (i = 0; i < NUM_BUCKETS; i++) { + list_for_each_entry (hc, _name_buckets + i, name_list) { ++ if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT)) ++ continue; + needed += sizeof(struct dm_name_list); + needed += strlen(hc->name) + 1; + needed += ALIGN_MASK; +@@ -422,6 +430,8 @@ static int list_devices(struct dm_ioctl + */ + for (i = 0; i < NUM_BUCKETS; i++) { + list_for_each_entry (hc, _name_buckets + i, name_list) { ++ if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT)) ++ continue; + if (old_nl) + old_nl->next = (uint32_t) ((void *) nl - + (void *) old_nl); +@@ -612,10 +622,11 @@ static struct hash_cell *__find_device_h + if (!md) + goto out; + +- mdptr = dm_get_mdptr(md); ++ if (vx_check(dm_get_xid(md), VS_WATCH_P | VS_IDENT)) ++ mdptr = dm_get_mdptr(md); ++ + if (!mdptr) + dm_put(md); +- + out: + return mdptr; + } +@@ -1445,8 +1456,8 @@ static int ctl_ioctl(uint command, struc + ioctl_fn fn = NULL; + size_t param_size; + +- /* only root can play with this */ +- if (!capable(CAP_SYS_ADMIN)) ++ /* only root and certain contexts can play with this */ ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_ADMIN_MAPPER)) + return -EACCES; + + if (_IOC_TYPE(command) != DM_IOCTL) +diff -NurpP --minimal linux-2.6.31.6/drivers/net/tun.c linux-2.6.31.6-vs2.3.0.36.24/drivers/net/tun.c +--- linux-2.6.31.6/drivers/net/tun.c 2009-11-12 12:10:10.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/drivers/net/tun.c 2009-10-15 03:50:05.000000000 +0200 +@@ -61,6 +61,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -102,6 +103,7 @@ struct tun_struct { + unsigned int flags; + uid_t owner; + gid_t group; ++ nid_t nid; + + struct sk_buff_head readq; + +@@ -138,7 +140,7 @@ static int tun_attach(struct tun_struct + /* Check permissions */ + if (((tun->owner != -1 && cred->euid != tun->owner) || + (tun->group != -1 && !in_egroup_p(tun->group))) && +- !capable(CAP_NET_ADMIN)) ++ !cap_raised(current_cap(), CAP_NET_ADMIN)) + return -EPERM; + + netif_tx_lock_bh(tun->dev); +@@ -823,6 +825,7 @@ static void tun_setup(struct net_device + + tun->owner = -1; + tun->group = -1; ++ tun->nid = current->nid; + + dev->ethtool_ops = &tun_ethtool_ops; + dev->destructor = tun_free_netdev; +@@ -935,6 +938,9 @@ static int tun_set_iff(struct net *net, + else + return -EINVAL; + ++ if (!nx_check(tun->nid, VS_IDENT | VS_HOSTID | VS_ADMIN_P)) ++ return -EPERM; ++ + err = tun_attach(tun, file); + if (err < 0) + return err; +@@ -943,7 +949,7 @@ static int tun_set_iff(struct net *net, + char *name; + unsigned long flags = 0; + +- if (!capable(CAP_NET_ADMIN)) ++ if (!nx_capable(CAP_NET_ADMIN, NXC_TUN_CREATE)) + return -EPERM; + + /* Set dev type */ +@@ -1190,6 +1196,16 @@ static long tun_chr_ioctl(struct file *f + DBG(KERN_INFO "%s: group set to %d\n", tun->dev->name, tun->group); + break; + ++ case TUNSETNID: ++ if (!capable(CAP_CONTEXT)) ++ return -EPERM; ++ ++ /* Set nid owner of the device */ ++ tun->nid = (nid_t) arg; ++ ++ DBG(KERN_INFO "%s: nid owner set to %u\n", tun->dev->name, tun->nid); ++ break; ++ + case TUNSETLINK: + /* Only allow setting the type when the interface is down */ + if (tun->dev->flags & IFF_UP) { +diff -NurpP --minimal linux-2.6.31.6/fs/attr.c linux-2.6.31.6-vs2.3.0.36.24/fs/attr.c +--- linux-2.6.31.6/fs/attr.c 2009-06-11 17:13:01.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/attr.c 2009-09-10 16:11:43.000000000 +0200 +@@ -14,6 +14,9 @@ + #include + #include + #include ++#include ++#include ++#include + + /* Taken over from the old code... */ + +@@ -55,6 +58,10 @@ int inode_change_ok(struct inode *inode, + if (!is_owner_or_cap(inode)) + goto error; + } ++ ++ if (dx_permission(inode, MAY_WRITE)) ++ goto error; ++ + fine: + retval = 0; + error: +@@ -78,6 +85,8 @@ int inode_setattr(struct inode * inode, + inode->i_uid = attr->ia_uid; + if (ia_valid & ATTR_GID) + inode->i_gid = attr->ia_gid; ++ if ((ia_valid & ATTR_TAG) && IS_TAGGED(inode)) ++ inode->i_tag = attr->ia_tag; + if (ia_valid & ATTR_ATIME) + inode->i_atime = timespec_trunc(attr->ia_atime, + inode->i_sb->s_time_gran); +@@ -172,7 +181,8 @@ int notify_change(struct dentry * dentry + error = inode_change_ok(inode, attr); + if (!error) { + if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || +- (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) ++ (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid) || ++ (ia_valid & ATTR_TAG && attr->ia_tag != inode->i_tag)) + error = vfs_dq_transfer(inode, attr) ? + -EDQUOT : 0; + if (!error) +diff -NurpP --minimal linux-2.6.31.6/fs/binfmt_aout.c linux-2.6.31.6-vs2.3.0.36.24/fs/binfmt_aout.c +--- linux-2.6.31.6/fs/binfmt_aout.c 2009-03-24 14:22:24.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/binfmt_aout.c 2009-09-10 16:11:43.000000000 +0200 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -NurpP --minimal linux-2.6.31.6/fs/binfmt_elf.c linux-2.6.31.6-vs2.3.0.36.24/fs/binfmt_elf.c +--- linux-2.6.31.6/fs/binfmt_elf.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/binfmt_elf.c 2009-09-29 17:02:58.000000000 +0200 +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff -NurpP --minimal linux-2.6.31.6/fs/binfmt_flat.c linux-2.6.31.6-vs2.3.0.36.24/fs/binfmt_flat.c +--- linux-2.6.31.6/fs/binfmt_flat.c 2009-09-10 15:26:20.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/binfmt_flat.c 2009-09-10 16:11:43.000000000 +0200 +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -NurpP --minimal linux-2.6.31.6/fs/binfmt_som.c linux-2.6.31.6-vs2.3.0.36.24/fs/binfmt_som.c +--- linux-2.6.31.6/fs/binfmt_som.c 2009-06-11 17:13:02.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/binfmt_som.c 2009-09-10 16:11:43.000000000 +0200 +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -NurpP --minimal linux-2.6.31.6/fs/block_dev.c linux-2.6.31.6-vs2.3.0.36.24/fs/block_dev.c +--- linux-2.6.31.6/fs/block_dev.c 2009-09-10 15:26:20.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/block_dev.c 2009-09-10 17:01:13.000000000 +0200 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + #include "internal.h" + +@@ -550,6 +551,7 @@ struct block_device *bdget(dev_t dev) + bdev->bd_invalidated = 0; + inode->i_mode = S_IFBLK; + inode->i_rdev = dev; ++ inode->i_mdev = dev; + inode->i_bdev = bdev; + inode->i_data.a_ops = &def_blk_aops; + mapping_set_gfp_mask(&inode->i_data, GFP_USER); +@@ -596,6 +598,11 @@ EXPORT_SYMBOL(bdput); + static struct block_device *bd_acquire(struct inode *inode) + { + struct block_device *bdev; ++ dev_t mdev; ++ ++ if (!vs_map_blkdev(inode->i_rdev, &mdev, DATTR_OPEN)) ++ return NULL; ++ inode->i_mdev = mdev; + + spin_lock(&bdev_lock); + bdev = inode->i_bdev; +@@ -606,7 +613,7 @@ static struct block_device *bd_acquire(s + } + spin_unlock(&bdev_lock); + +- bdev = bdget(inode->i_rdev); ++ bdev = bdget(mdev); + if (bdev) { + spin_lock(&bdev_lock); + if (!inode->i_bdev) { +diff -NurpP --minimal linux-2.6.31.6/fs/btrfs/ctree.h linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/ctree.h +--- linux-2.6.31.6/fs/btrfs/ctree.h 2009-09-10 15:26:20.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/ctree.h 2009-10-08 07:39:48.000000000 +0200 +@@ -540,11 +540,14 @@ struct btrfs_inode_item { + /* modification sequence number for NFS */ + __le64 sequence; + ++ __le16 tag; + /* + * a little future expansion, for more than this we can + * just grow the inode item and version it + */ +- __le64 reserved[4]; ++ __le16 reserved16; ++ __le32 reserved32; ++ __le64 reserved[3]; + struct btrfs_timespec atime; + struct btrfs_timespec ctime; + struct btrfs_timespec mtime; +@@ -1119,6 +1122,8 @@ struct btrfs_root { + #define BTRFS_MOUNT_SSD_SPREAD (1 << 8) + #define BTRFS_MOUNT_NOSSD (1 << 9) + ++#define BTRFS_MOUNT_TAGGED (1 << 24) ++ + #define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt) + #define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt) + #define btrfs_test_opt(root, opt) ((root)->fs_info->mount_opt & \ +@@ -1138,6 +1143,10 @@ struct btrfs_root { + #define BTRFS_INODE_NOATIME (1 << 9) + #define BTRFS_INODE_DIRSYNC (1 << 10) + ++#define BTRFS_INODE_IXUNLINK (1 << 24) ++#define BTRFS_INODE_BARRIER (1 << 25) ++#define BTRFS_INODE_COW (1 << 26) ++ + + /* some macros to generate set/get funcs for the struct fields. This + * assumes there is a lefoo_to_cpu for every type, so lets make a simple +@@ -1340,6 +1349,7 @@ BTRFS_SETGET_FUNCS(inode_block_group, st + BTRFS_SETGET_FUNCS(inode_nlink, struct btrfs_inode_item, nlink, 32); + BTRFS_SETGET_FUNCS(inode_uid, struct btrfs_inode_item, uid, 32); + BTRFS_SETGET_FUNCS(inode_gid, struct btrfs_inode_item, gid, 32); ++BTRFS_SETGET_FUNCS(inode_tag, struct btrfs_inode_item, tag, 16); + BTRFS_SETGET_FUNCS(inode_mode, struct btrfs_inode_item, mode, 32); + BTRFS_SETGET_FUNCS(inode_rdev, struct btrfs_inode_item, rdev, 64); + BTRFS_SETGET_FUNCS(inode_flags, struct btrfs_inode_item, flags, 64); +@@ -2280,6 +2290,7 @@ int btrfs_cont_expand(struct inode *inod + long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg); + void btrfs_update_iflags(struct inode *inode); + void btrfs_inherit_iflags(struct inode *inode, struct inode *dir); ++int btrfs_sync_flags(struct inode *inode, int, int); + + /* file.c */ + int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync); +diff -NurpP --minimal linux-2.6.31.6/fs/btrfs/disk-io.c linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/disk-io.c +--- linux-2.6.31.6/fs/btrfs/disk-io.c 2009-09-10 15:26:20.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/disk-io.c 2009-10-08 06:43:17.000000000 +0200 +@@ -1673,6 +1673,9 @@ struct btrfs_root *open_ctree(struct sup + goto fail_iput; + } + ++ if (btrfs_test_opt(tree_root, TAGGED)) ++ sb->s_flags |= MS_TAGGED; ++ + features = btrfs_super_incompat_flags(disk_super) & + ~BTRFS_FEATURE_INCOMPAT_SUPP; + if (features) { +diff -NurpP --minimal linux-2.6.31.6/fs/btrfs/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/inode.c +--- linux-2.6.31.6/fs/btrfs/inode.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/inode.c 2009-10-08 14:17:12.000000000 +0200 +@@ -36,6 +36,8 @@ + #include + #include + #include ++#include ++ + #include "compat.h" + #include "ctree.h" + #include "disk-io.h" +@@ -2072,6 +2074,8 @@ static void btrfs_read_locked_inode(stru + int maybe_acls; + u64 alloc_group_block; + u32 rdev; ++ uid_t uid; ++ gid_t gid; + int ret; + + path = btrfs_alloc_path(); +@@ -2088,8 +2092,13 @@ static void btrfs_read_locked_inode(stru + + inode->i_mode = btrfs_inode_mode(leaf, inode_item); + inode->i_nlink = btrfs_inode_nlink(leaf, inode_item); +- inode->i_uid = btrfs_inode_uid(leaf, inode_item); +- inode->i_gid = btrfs_inode_gid(leaf, inode_item); ++ ++ uid = btrfs_inode_uid(leaf, inode_item); ++ gid = btrfs_inode_gid(leaf, inode_item); ++ inode->i_uid = INOTAG_UID(DX_TAG(inode), uid, gid); ++ inode->i_gid = INOTAG_GID(DX_TAG(inode), uid, gid); ++ inode->i_tag = INOTAG_TAG(DX_TAG(inode), uid, gid, ++ btrfs_inode_tag(leaf, inode_item)); + btrfs_i_size_write(inode, btrfs_inode_size(leaf, inode_item)); + + tspec = btrfs_inode_atime(inode_item); +@@ -2171,8 +2180,15 @@ static void fill_inode_item(struct btrfs + struct btrfs_inode_item *item, + struct inode *inode) + { +- btrfs_set_inode_uid(leaf, item, inode->i_uid); +- btrfs_set_inode_gid(leaf, item, inode->i_gid); ++ uid_t uid = TAGINO_UID(DX_TAG(inode), inode->i_uid, inode->i_tag); ++ gid_t gid = TAGINO_GID(DX_TAG(inode), inode->i_gid, inode->i_tag); ++ ++ btrfs_set_inode_uid(leaf, item, uid); ++ btrfs_set_inode_gid(leaf, item, gid); ++#ifdef CONFIG_TAGGING_INTERN ++ btrfs_set_inode_tag(leaf, item, inode->i_tag); ++#endif ++ + btrfs_set_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size); + btrfs_set_inode_mode(leaf, item, inode->i_mode); + btrfs_set_inode_nlink(leaf, item, inode->i_nlink); +@@ -3615,6 +3631,7 @@ static struct inode *btrfs_new_inode(str + } else + inode->i_gid = current_fsgid(); + ++ inode->i_tag = dx_current_fstag(root->fs_info->sb); + inode->i_mode = mode; + inode->i_ino = objectid; + inode_set_bytes(inode, 0); +@@ -5218,6 +5235,7 @@ static struct inode_operations btrfs_dir + .listxattr = btrfs_listxattr, + .removexattr = btrfs_removexattr, + .permission = btrfs_permission, ++ .sync_flags = btrfs_sync_flags, + }; + static struct inode_operations btrfs_dir_ro_inode_operations = { + .lookup = btrfs_lookup, +@@ -5289,6 +5307,7 @@ static struct inode_operations btrfs_fil + .permission = btrfs_permission, + .fallocate = btrfs_fallocate, + .fiemap = btrfs_fiemap, ++ .sync_flags = btrfs_sync_flags, + }; + static struct inode_operations btrfs_special_inode_operations = { + .getattr = btrfs_getattr, +diff -NurpP --minimal linux-2.6.31.6/fs/btrfs/ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/ioctl.c +--- linux-2.6.31.6/fs/btrfs/ioctl.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/ioctl.c 2009-10-08 05:58:29.000000000 +0200 +@@ -67,10 +67,13 @@ static unsigned int btrfs_flags_to_ioctl + { + unsigned int iflags = 0; + +- if (flags & BTRFS_INODE_SYNC) +- iflags |= FS_SYNC_FL; + if (flags & BTRFS_INODE_IMMUTABLE) + iflags |= FS_IMMUTABLE_FL; ++ if (flags & BTRFS_INODE_IXUNLINK) ++ iflags |= FS_IXUNLINK_FL; ++ ++ if (flags & BTRFS_INODE_SYNC) ++ iflags |= FS_SYNC_FL; + if (flags & BTRFS_INODE_APPEND) + iflags |= FS_APPEND_FL; + if (flags & BTRFS_INODE_NODUMP) +@@ -80,28 +83,78 @@ static unsigned int btrfs_flags_to_ioctl + if (flags & BTRFS_INODE_DIRSYNC) + iflags |= FS_DIRSYNC_FL; + ++ if (flags & BTRFS_INODE_BARRIER) ++ iflags |= FS_BARRIER_FL; ++ if (flags & BTRFS_INODE_COW) ++ iflags |= FS_COW_FL; + return iflags; + } + + /* +- * Update inode->i_flags based on the btrfs internal flags. ++ * Update inode->i_(v)flags based on the btrfs internal flags. + */ + void btrfs_update_iflags(struct inode *inode) + { + struct btrfs_inode *ip = BTRFS_I(inode); + +- inode->i_flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); ++ inode->i_flags &= ~(S_IMMUTABLE | S_IXUNLINK | ++ S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC); + +- if (ip->flags & BTRFS_INODE_SYNC) +- inode->i_flags |= S_SYNC; + if (ip->flags & BTRFS_INODE_IMMUTABLE) + inode->i_flags |= S_IMMUTABLE; ++ if (ip->flags & BTRFS_INODE_IXUNLINK) ++ inode->i_flags |= S_IXUNLINK; ++ ++ if (ip->flags & BTRFS_INODE_SYNC) ++ inode->i_flags |= S_SYNC; + if (ip->flags & BTRFS_INODE_APPEND) + inode->i_flags |= S_APPEND; + if (ip->flags & BTRFS_INODE_NOATIME) + inode->i_flags |= S_NOATIME; + if (ip->flags & BTRFS_INODE_DIRSYNC) + inode->i_flags |= S_DIRSYNC; ++ ++ inode->i_vflags &= ~(V_BARRIER | V_COW); ++ ++ if (ip->flags & BTRFS_INODE_BARRIER) ++ inode->i_vflags |= V_BARRIER; ++ if (ip->flags & BTRFS_INODE_COW) ++ inode->i_vflags |= V_COW; ++} ++ ++/* ++ * Update btrfs internal flags from inode->i_(v)flags. ++ */ ++void btrfs_update_flags(struct inode *inode) ++{ ++ struct btrfs_inode *ip = BTRFS_I(inode); ++ ++ unsigned int flags = inode->i_flags; ++ unsigned int vflags = inode->i_vflags; ++ ++ ip->flags &= ~(BTRFS_INODE_SYNC | BTRFS_INODE_APPEND | ++ BTRFS_INODE_IMMUTABLE | BTRFS_INODE_IXUNLINK | ++ BTRFS_INODE_NOATIME | BTRFS_INODE_DIRSYNC | ++ BTRFS_INODE_BARRIER | BTRFS_INODE_COW); ++ ++ if (flags & S_IMMUTABLE) ++ ip->flags |= BTRFS_INODE_IMMUTABLE; ++ if (flags & S_IXUNLINK) ++ ip->flags |= BTRFS_INODE_IXUNLINK; ++ ++ if (flags & S_SYNC) ++ ip->flags |= BTRFS_INODE_SYNC; ++ if (flags & S_APPEND) ++ ip->flags |= BTRFS_INODE_APPEND; ++ if (flags & S_NOATIME) ++ ip->flags |= BTRFS_INODE_NOATIME; ++ if (flags & S_DIRSYNC) ++ ip->flags |= BTRFS_INODE_DIRSYNC; ++ ++ if (vflags & V_BARRIER) ++ ip->flags |= BTRFS_INODE_BARRIER; ++ if (vflags & V_COW) ++ ip->flags |= BTRFS_INODE_COW; + } + + /* +@@ -119,7 +172,7 @@ void btrfs_inherit_iflags(struct inode * + flags = BTRFS_I(dir)->flags; + + if (S_ISREG(inode->i_mode)) +- flags &= ~BTRFS_INODE_DIRSYNC; ++ flags &= ~(BTRFS_INODE_DIRSYNC | BTRFS_INODE_BARRIER); + else if (!S_ISDIR(inode->i_mode)) + flags &= (BTRFS_INODE_NODUMP | BTRFS_INODE_NOATIME); + +@@ -127,6 +180,30 @@ void btrfs_inherit_iflags(struct inode * + btrfs_update_iflags(inode); + } + ++int btrfs_sync_flags(struct inode *inode, int flags, int vflags) ++{ ++ struct btrfs_inode *ip = BTRFS_I(inode); ++ struct btrfs_root *root = ip->root; ++ struct btrfs_trans_handle *trans; ++ int ret; ++ ++ trans = btrfs_join_transaction(root, 1); ++ BUG_ON(!trans); ++ ++ inode->i_flags = flags; ++ inode->i_vflags = vflags; ++ btrfs_update_flags(inode); ++ ++ ret = btrfs_update_inode(trans, root, inode); ++ BUG_ON(ret); ++ ++ btrfs_update_iflags(inode); ++ inode->i_ctime = CURRENT_TIME; ++ btrfs_end_transaction(trans, root); ++ ++ return 0; ++} ++ + static int btrfs_ioctl_getflags(struct file *file, void __user *arg) + { + struct btrfs_inode *ip = BTRFS_I(file->f_path.dentry->d_inode); +@@ -149,6 +226,7 @@ static int btrfs_ioctl_setflags(struct f + if (copy_from_user(&flags, arg, sizeof(flags))) + return -EFAULT; + ++ /* maybe add FS_IXUNLINK_FL ? */ + if (flags & ~(FS_IMMUTABLE_FL | FS_APPEND_FL | \ + FS_NOATIME_FL | FS_NODUMP_FL | \ + FS_SYNC_FL | FS_DIRSYNC_FL)) +@@ -161,7 +239,8 @@ static int btrfs_ioctl_setflags(struct f + + flags = btrfs_mask_flags(inode->i_mode, flags); + oldflags = btrfs_flags_to_ioctl(ip->flags); +- if ((flags ^ oldflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) { ++ if ((flags ^ oldflags) & (FS_APPEND_FL | ++ FS_IMMUTABLE_FL | FS_IXUNLINK_FL)) { + if (!capable(CAP_LINUX_IMMUTABLE)) { + ret = -EPERM; + goto out_unlock; +@@ -172,14 +251,19 @@ static int btrfs_ioctl_setflags(struct f + if (ret) + goto out_unlock; + +- if (flags & FS_SYNC_FL) +- ip->flags |= BTRFS_INODE_SYNC; +- else +- ip->flags &= ~BTRFS_INODE_SYNC; + if (flags & FS_IMMUTABLE_FL) + ip->flags |= BTRFS_INODE_IMMUTABLE; + else + ip->flags &= ~BTRFS_INODE_IMMUTABLE; ++ if (flags & FS_IXUNLINK_FL) ++ ip->flags |= BTRFS_INODE_IXUNLINK; ++ else ++ ip->flags &= ~BTRFS_INODE_IXUNLINK; ++ ++ if (flags & FS_SYNC_FL) ++ ip->flags |= BTRFS_INODE_SYNC; ++ else ++ ip->flags &= ~BTRFS_INODE_SYNC; + if (flags & FS_APPEND_FL) + ip->flags |= BTRFS_INODE_APPEND; + else +diff -NurpP --minimal linux-2.6.31.6/fs/btrfs/super.c linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/super.c +--- linux-2.6.31.6/fs/btrfs/super.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/btrfs/super.c 2009-10-08 07:27:04.000000000 +0200 +@@ -66,7 +66,8 @@ enum { + Opt_degraded, Opt_subvol, Opt_device, Opt_nodatasum, Opt_nodatacow, + Opt_max_extent, Opt_max_inline, Opt_alloc_start, Opt_nobarrier, + Opt_ssd, Opt_nossd, Opt_ssd_spread, Opt_thread_pool, Opt_noacl, +- Opt_compress, Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_err, ++ Opt_compress, Opt_notreelog, Opt_ratio, Opt_flushoncommit, ++ Opt_tag, Opt_notag, Opt_tagid, Opt_err, + }; + + static match_table_t tokens = { +@@ -88,6 +89,9 @@ static match_table_t tokens = { + {Opt_notreelog, "notreelog"}, + {Opt_flushoncommit, "flushoncommit"}, + {Opt_ratio, "metadata_ratio=%d"}, ++ {Opt_tag, "tag"}, ++ {Opt_notag, "notag"}, ++ {Opt_tagid, "tagid=%u"}, + {Opt_err, NULL}, + }; + +@@ -257,6 +261,22 @@ int btrfs_parse_options(struct btrfs_roo + info->metadata_ratio); + } + break; ++#ifndef CONFIG_TAGGING_NONE ++ case Opt_tag: ++ printk(KERN_INFO "btrfs: use tagging\n"); ++ btrfs_set_opt(info->mount_opt, TAGGED); ++ break; ++ case Opt_notag: ++ printk(KERN_INFO "btrfs: disabled tagging\n"); ++ btrfs_clear_opt(info->mount_opt, TAGGED); ++ break; ++#endif ++#ifdef CONFIG_PROPAGATE ++ case Opt_tagid: ++ /* use args[0] */ ++ btrfs_set_opt(info->mount_opt, TAGGED); ++ break; ++#endif + default: + break; + } +@@ -568,6 +588,12 @@ static int btrfs_remount(struct super_bl + if (ret) + return -EINVAL; + ++ if (btrfs_test_opt(root, TAGGED) && !(sb->s_flags & MS_TAGGED)) { ++ printk("btrfs: %s: tagging not permitted on remount.\n", ++ sb->s_id); ++ return -EINVAL; ++ } ++ + if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) + return 0; + +diff -NurpP --minimal linux-2.6.31.6/fs/char_dev.c linux-2.6.31.6-vs2.3.0.36.24/fs/char_dev.c +--- linux-2.6.31.6/fs/char_dev.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/char_dev.c 2009-09-10 16:11:43.000000000 +0200 +@@ -20,6 +20,8 @@ + #include + #include + #include ++#include ++#include + + #include "internal.h" + +@@ -357,14 +359,21 @@ static int chrdev_open(struct inode *ino + struct cdev *p; + struct cdev *new = NULL; + int ret = 0; ++ dev_t mdev; ++ ++ if (!vs_map_chrdev(inode->i_rdev, &mdev, DATTR_OPEN)) ++ return -EPERM; ++ inode->i_mdev = mdev; + + spin_lock(&cdev_lock); + p = inode->i_cdev; + if (!p) { + struct kobject *kobj; + int idx; ++ + spin_unlock(&cdev_lock); +- kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx); ++ ++ kobj = kobj_lookup(cdev_map, mdev, &idx); + if (!kobj) + return -ENXIO; + new = container_of(kobj, struct cdev, kobj); +diff -NurpP --minimal linux-2.6.31.6/fs/dcache.c linux-2.6.31.6-vs2.3.0.36.24/fs/dcache.c +--- linux-2.6.31.6/fs/dcache.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/dcache.c 2009-09-10 16:11:43.000000000 +0200 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include "internal.h" + + int sysctl_vfs_cache_pressure __read_mostly = 100; +@@ -229,6 +230,8 @@ repeat: + return; + } + ++ vx_dentry_dec(dentry); ++ + /* + * AV: ->d_delete() is _NOT_ allowed to block now. + */ +@@ -320,6 +323,7 @@ static inline struct dentry * __dget_loc + { + atomic_inc(&dentry->d_count); + dentry_lru_del_init(dentry); ++ vx_dentry_inc(dentry); + return dentry; + } + +@@ -918,6 +922,9 @@ struct dentry *d_alloc(struct dentry * p + struct dentry *dentry; + char *dname; + ++ if (!vx_dentry_avail(1)) ++ return NULL; ++ + dentry = kmem_cache_alloc(dentry_cache, GFP_KERNEL); + if (!dentry) + return NULL; +@@ -963,6 +970,7 @@ struct dentry *d_alloc(struct dentry * p + if (parent) + list_add(&dentry->d_u.d_child, &parent->d_subdirs); + dentry_stat.nr_dentry++; ++ vx_dentry_inc(dentry); + spin_unlock(&dcache_lock); + + return dentry; +@@ -1406,6 +1414,7 @@ struct dentry * __d_lookup(struct dentry + } + + atomic_inc(&dentry->d_count); ++ vx_dentry_inc(dentry); + found = dentry; + spin_unlock(&dentry->d_lock); + break; +diff -NurpP --minimal linux-2.6.31.6/fs/devpts/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/devpts/inode.c +--- linux-2.6.31.6/fs/devpts/inode.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/devpts/inode.c 2009-09-10 16:11:43.000000000 +0200 +@@ -19,12 +19,12 @@ + #include + #include + #include ++#include + #include + #include + #include + #include +- +-#define DEVPTS_SUPER_MAGIC 0x1cd1 ++#include + + #define DEVPTS_DEFAULT_MODE 0600 + /* +@@ -36,6 +36,20 @@ + #define DEVPTS_DEFAULT_PTMX_MODE 0000 + #define PTMX_MINOR 2 + ++static int devpts_permission(struct inode *inode, int mask) ++{ ++ int ret = -EACCES; ++ ++ /* devpts is xid tagged */ ++ if (vx_check((xid_t)inode->i_tag, VS_WATCH_P | VS_IDENT)) ++ ret = generic_permission(inode, mask, NULL); ++ return ret; ++} ++ ++static struct inode_operations devpts_file_inode_operations = { ++ .permission = devpts_permission, ++}; ++ + extern int pty_limit; /* Config limit on Unix98 ptys */ + static DEFINE_MUTEX(allocated_ptys_lock); + +@@ -263,6 +277,25 @@ static int devpts_show_options(struct se + return 0; + } + ++static int devpts_filter(struct dentry *de) ++{ ++ /* devpts is xid tagged */ ++ return vx_check((xid_t)de->d_inode->i_tag, VS_WATCH_P | VS_IDENT); ++} ++ ++static int devpts_readdir(struct file * filp, void * dirent, filldir_t filldir) ++{ ++ return dcache_readdir_filter(filp, dirent, filldir, devpts_filter); ++} ++ ++static struct file_operations devpts_dir_operations = { ++ .open = dcache_dir_open, ++ .release = dcache_dir_close, ++ .llseek = dcache_dir_lseek, ++ .read = generic_read_dir, ++ .readdir = devpts_readdir, ++}; ++ + static const struct super_operations devpts_sops = { + .statfs = simple_statfs, + .remount_fs = devpts_remount, +@@ -302,12 +335,15 @@ devpts_fill_super(struct super_block *s, + inode = new_inode(s); + if (!inode) + goto free_fsi; ++ + inode->i_ino = 1; + inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; + inode->i_op = &simple_dir_inode_operations; +- inode->i_fop = &simple_dir_operations; ++ inode->i_fop = &devpts_dir_operations; + inode->i_nlink = 2; ++ /* devpts is xid tagged */ ++ inode->i_tag = (tag_t)vx_current_xid(); + + s->s_root = d_alloc_root(inode); + if (s->s_root) +@@ -498,6 +534,9 @@ int devpts_pty_new(struct inode *ptmx_in + inode->i_gid = opts->setgid ? opts->gid : current_fsgid(); + inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + init_special_inode(inode, S_IFCHR|opts->mode, device); ++ /* devpts is xid tagged */ ++ inode->i_tag = (tag_t)vx_current_xid(); ++ inode->i_op = &devpts_file_inode_operations; + inode->i_private = tty; + tty->driver_data = inode; + +diff -NurpP --minimal linux-2.6.31.6/fs/exec.c linux-2.6.31.6-vs2.3.0.36.24/fs/exec.c +--- linux-2.6.31.6/fs/exec.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/exec.c 2009-09-10 16:11:43.000000000 +0200 +@@ -249,7 +249,9 @@ static int __bprm_mm_init(struct linux_b + if (err) + goto err; + +- mm->stack_vm = mm->total_vm = 1; ++ mm->total_vm = 0; ++ vx_vmpages_inc(mm); ++ mm->stack_vm = 1; + up_write(&mm->mmap_sem); + bprm->p = vma->vm_end - sizeof(void *); + return 0; +@@ -1471,7 +1473,7 @@ static int format_corename(char *corenam + /* UNIX time of coredump */ + case 't': { + struct timeval tv; +- do_gettimeofday(&tv); ++ vx_gettimeofday(&tv); + rc = snprintf(out_ptr, out_end - out_ptr, + "%lu", tv.tv_sec); + if (rc > out_end - out_ptr) +diff -NurpP --minimal linux-2.6.31.6/fs/ext2/balloc.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/balloc.c +--- linux-2.6.31.6/fs/ext2/balloc.c 2009-06-11 17:13:03.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/balloc.c 2009-09-10 16:11:43.000000000 +0200 +@@ -701,7 +701,6 @@ ext2_try_to_allocate(struct super_block + start = 0; + end = EXT2_BLOCKS_PER_GROUP(sb); + } +- + BUG_ON(start > EXT2_BLOCKS_PER_GROUP(sb)); + + repeat: +diff -NurpP --minimal linux-2.6.31.6/fs/ext2/ext2.h linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/ext2.h +--- linux-2.6.31.6/fs/ext2/ext2.h 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/ext2.h 2009-10-07 01:23:12.000000000 +0200 +@@ -131,6 +131,7 @@ extern int ext2_fiemap(struct inode *ino + int __ext2_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, unsigned flags, + struct page **pagep, void **fsdata); ++extern int ext2_sync_flags(struct inode *, int, int); + + /* ioctl.c */ + extern long ext2_ioctl(struct file *, unsigned int, unsigned long); +diff -NurpP --minimal linux-2.6.31.6/fs/ext2/file.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/file.c +--- linux-2.6.31.6/fs/ext2/file.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/file.c 2009-10-07 01:03:12.000000000 +0200 +@@ -87,4 +87,5 @@ const struct inode_operations ext2_file_ + .setattr = ext2_setattr, + .permission = ext2_permission, + .fiemap = ext2_fiemap, ++ .sync_flags = ext2_sync_flags, + }; +diff -NurpP --minimal linux-2.6.31.6/fs/ext2/ialloc.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/ialloc.c +--- linux-2.6.31.6/fs/ext2/ialloc.c 2009-06-11 17:13:03.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/ialloc.c 2009-10-12 05:05:34.000000000 +0200 +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include "ext2.h" + #include "xattr.h" + #include "acl.h" +@@ -560,6 +561,7 @@ got: + } else + inode->i_gid = current_fsgid(); + inode->i_mode = mode; ++ inode->i_tag = dx_current_fstag(sb); + + inode->i_ino = ino; + inode->i_blocks = 0; +diff -NurpP --minimal linux-2.6.31.6/fs/ext2/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/inode.c +--- linux-2.6.31.6/fs/ext2/inode.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/inode.c 2009-10-06 19:45:13.000000000 +0200 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include "ext2.h" + #include "acl.h" + #include "xip.h" +@@ -1038,7 +1039,7 @@ void ext2_truncate(struct inode *inode) + return; + if (ext2_inode_is_fast_symlink(inode)) + return; +- if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) ++ if (IS_APPEND(inode) || IS_IXORUNLINK(inode)) + return; + + blocksize = inode->i_sb->s_blocksize; +@@ -1176,36 +1177,61 @@ void ext2_set_inode_flags(struct inode * + { + unsigned int flags = EXT2_I(inode)->i_flags; + +- inode->i_flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); ++ inode->i_flags &= ~(S_IMMUTABLE | S_IXUNLINK | ++ S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC); ++ ++ ++ if (flags & EXT2_IMMUTABLE_FL) ++ inode->i_flags |= S_IMMUTABLE; ++ if (flags & EXT2_IXUNLINK_FL) ++ inode->i_flags |= S_IXUNLINK; ++ + if (flags & EXT2_SYNC_FL) + inode->i_flags |= S_SYNC; + if (flags & EXT2_APPEND_FL) + inode->i_flags |= S_APPEND; +- if (flags & EXT2_IMMUTABLE_FL) +- inode->i_flags |= S_IMMUTABLE; + if (flags & EXT2_NOATIME_FL) + inode->i_flags |= S_NOATIME; + if (flags & EXT2_DIRSYNC_FL) + inode->i_flags |= S_DIRSYNC; ++ ++ inode->i_vflags &= ~(V_BARRIER | V_COW); ++ ++ if (flags & EXT2_BARRIER_FL) ++ inode->i_vflags |= V_BARRIER; ++ if (flags & EXT2_COW_FL) ++ inode->i_vflags |= V_COW; + } + + /* Propagate flags from i_flags to EXT2_I(inode)->i_flags */ + void ext2_get_inode_flags(struct ext2_inode_info *ei) + { + unsigned int flags = ei->vfs_inode.i_flags; ++ unsigned int vflags = ei->vfs_inode.i_vflags; ++ ++ ei->i_flags &= ~(EXT2_SYNC_FL | EXT2_APPEND_FL | ++ EXT2_IMMUTABLE_FL | EXT2_IXUNLINK_FL | ++ EXT2_NOATIME_FL | EXT2_DIRSYNC_FL | ++ EXT2_BARRIER_FL | EXT2_COW_FL); ++ ++ if (flags & S_IMMUTABLE) ++ ei->i_flags |= EXT2_IMMUTABLE_FL; ++ if (flags & S_IXUNLINK) ++ ei->i_flags |= EXT2_IXUNLINK_FL; + +- ei->i_flags &= ~(EXT2_SYNC_FL|EXT2_APPEND_FL| +- EXT2_IMMUTABLE_FL|EXT2_NOATIME_FL|EXT2_DIRSYNC_FL); + if (flags & S_SYNC) + ei->i_flags |= EXT2_SYNC_FL; + if (flags & S_APPEND) + ei->i_flags |= EXT2_APPEND_FL; +- if (flags & S_IMMUTABLE) +- ei->i_flags |= EXT2_IMMUTABLE_FL; + if (flags & S_NOATIME) + ei->i_flags |= EXT2_NOATIME_FL; + if (flags & S_DIRSYNC) + ei->i_flags |= EXT2_DIRSYNC_FL; ++ ++ if (vflags & V_BARRIER) ++ ei->i_flags |= EXT2_BARRIER_FL; ++ if (vflags & V_COW) ++ ei->i_flags |= EXT2_COW_FL; + } + + struct inode *ext2_iget (struct super_block *sb, unsigned long ino) +@@ -1215,6 +1241,8 @@ struct inode *ext2_iget (struct super_bl + struct ext2_inode *raw_inode; + struct inode *inode; + long ret = -EIO; ++ uid_t uid; ++ gid_t gid; + int n; + + inode = iget_locked(sb, ino); +@@ -1233,12 +1261,17 @@ struct inode *ext2_iget (struct super_bl + } + + inode->i_mode = le16_to_cpu(raw_inode->i_mode); +- inode->i_uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low); +- inode->i_gid = (gid_t)le16_to_cpu(raw_inode->i_gid_low); ++ uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low); ++ gid = (gid_t)le16_to_cpu(raw_inode->i_gid_low); + if (!(test_opt (inode->i_sb, NO_UID32))) { +- inode->i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16; +- inode->i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16; ++ uid |= le16_to_cpu(raw_inode->i_uid_high) << 16; ++ gid |= le16_to_cpu(raw_inode->i_gid_high) << 16; + } ++ inode->i_uid = INOTAG_UID(DX_TAG(inode), uid, gid); ++ inode->i_gid = INOTAG_GID(DX_TAG(inode), uid, gid); ++ inode->i_tag = INOTAG_TAG(DX_TAG(inode), uid, gid, ++ le16_to_cpu(raw_inode->i_raw_tag)); ++ + inode->i_nlink = le16_to_cpu(raw_inode->i_links_count); + inode->i_size = le32_to_cpu(raw_inode->i_size); + inode->i_atime.tv_sec = (signed)le32_to_cpu(raw_inode->i_atime); +@@ -1336,8 +1369,8 @@ int ext2_write_inode(struct inode *inode + struct ext2_inode_info *ei = EXT2_I(inode); + struct super_block *sb = inode->i_sb; + ino_t ino = inode->i_ino; +- uid_t uid = inode->i_uid; +- gid_t gid = inode->i_gid; ++ uid_t uid = TAGINO_UID(DX_TAG(inode), inode->i_uid, inode->i_tag); ++ gid_t gid = TAGINO_GID(DX_TAG(inode), inode->i_gid, inode->i_tag); + struct buffer_head * bh; + struct ext2_inode * raw_inode = ext2_get_inode(sb, ino, &bh); + int n; +@@ -1373,6 +1406,9 @@ int ext2_write_inode(struct inode *inode + raw_inode->i_uid_high = 0; + raw_inode->i_gid_high = 0; + } ++#ifdef CONFIG_TAGGING_INTERN ++ raw_inode->i_raw_tag = cpu_to_le16(inode->i_tag); ++#endif + raw_inode->i_links_count = cpu_to_le16(inode->i_nlink); + raw_inode->i_size = cpu_to_le32(inode->i_size); + raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec); +@@ -1454,7 +1490,8 @@ int ext2_setattr(struct dentry *dentry, + if (error) + return error; + if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || +- (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { ++ (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid) || ++ (iattr->ia_valid & ATTR_TAG && iattr->ia_tag != inode->i_tag)) { + error = vfs_dq_transfer(inode, iattr) ? -EDQUOT : 0; + if (error) + return error; +diff -NurpP --minimal linux-2.6.31.6/fs/ext2/ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/ioctl.c +--- linux-2.6.31.6/fs/ext2/ioctl.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/ioctl.c 2009-10-07 01:01:20.000000000 +0200 +@@ -17,6 +17,16 @@ + #include + + ++int ext2_sync_flags(struct inode *inode, int flags, int vflags) ++{ ++ inode->i_flags = flags; ++ inode->i_vflags = vflags; ++ ext2_get_inode_flags(EXT2_I(inode)); ++ inode->i_ctime = CURRENT_TIME_SEC; ++ mark_inode_dirty(inode); ++ return 0; ++} ++ + long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) + { + struct inode *inode = filp->f_dentry->d_inode; +@@ -51,6 +61,11 @@ long ext2_ioctl(struct file *filp, unsig + + flags = ext2_mask_flags(inode->i_mode, flags); + ++ if (IS_BARRIER(inode)) { ++ vxwprintk_task(1, "messing with the barrier."); ++ return -EACCES; ++ } ++ + mutex_lock(&inode->i_mutex); + /* Is it quota file? Do not allow user to mess with it */ + if (IS_NOQUOTA(inode)) { +@@ -66,7 +81,9 @@ long ext2_ioctl(struct file *filp, unsig + * + * This test looks nicer. Thanks to Pauline Middelink + */ +- if ((flags ^ oldflags) & (EXT2_APPEND_FL | EXT2_IMMUTABLE_FL)) { ++ if ((oldflags & EXT2_IMMUTABLE_FL) || ++ ((flags ^ oldflags) & (EXT2_APPEND_FL | ++ EXT2_IMMUTABLE_FL | EXT2_IXUNLINK_FL))) { + if (!capable(CAP_LINUX_IMMUTABLE)) { + mutex_unlock(&inode->i_mutex); + ret = -EPERM; +@@ -74,7 +91,7 @@ long ext2_ioctl(struct file *filp, unsig + } + } + +- flags = flags & EXT2_FL_USER_MODIFIABLE; ++ flags &= EXT2_FL_USER_MODIFIABLE; + flags |= oldflags & ~EXT2_FL_USER_MODIFIABLE; + ei->i_flags = flags; + mutex_unlock(&inode->i_mutex); +diff -NurpP --minimal linux-2.6.31.6/fs/ext2/namei.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/namei.c +--- linux-2.6.31.6/fs/ext2/namei.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/namei.c 2009-10-07 01:08:06.000000000 +0200 +@@ -31,6 +31,7 @@ + */ + + #include ++#include + #include "ext2.h" + #include "xattr.h" + #include "acl.h" +@@ -74,6 +75,7 @@ static struct dentry *ext2_lookup(struct + return ERR_PTR(-EIO); + } else { + return ERR_CAST(inode); ++ dx_propagate_tag(nd, inode); + } + } + } +@@ -401,6 +403,7 @@ const struct inode_operations ext2_dir_i + #endif + .setattr = ext2_setattr, + .permission = ext2_permission, ++ .sync_flags = ext2_sync_flags, + }; + + const struct inode_operations ext2_special_inode_operations = { +diff -NurpP --minimal linux-2.6.31.6/fs/ext2/super.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/super.c +--- linux-2.6.31.6/fs/ext2/super.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext2/super.c 2009-10-06 22:47:11.000000000 +0200 +@@ -382,7 +382,8 @@ enum { + Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug, + Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr, + Opt_acl, Opt_noacl, Opt_xip, Opt_ignore, Opt_err, Opt_quota, +- Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation ++ Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation, ++ Opt_tag, Opt_notag, Opt_tagid + }; + + static const match_table_t tokens = { +@@ -410,6 +411,9 @@ static const match_table_t tokens = { + {Opt_acl, "acl"}, + {Opt_noacl, "noacl"}, + {Opt_xip, "xip"}, ++ {Opt_tag, "tag"}, ++ {Opt_notag, "notag"}, ++ {Opt_tagid, "tagid=%u"}, + {Opt_grpquota, "grpquota"}, + {Opt_ignore, "noquota"}, + {Opt_quota, "quota"}, +@@ -480,6 +484,20 @@ static int parse_options (char * options + case Opt_nouid32: + set_opt (sbi->s_mount_opt, NO_UID32); + break; ++#ifndef CONFIG_TAGGING_NONE ++ case Opt_tag: ++ set_opt (sbi->s_mount_opt, TAGGED); ++ break; ++ case Opt_notag: ++ clear_opt (sbi->s_mount_opt, TAGGED); ++ break; ++#endif ++#ifdef CONFIG_PROPAGATE ++ case Opt_tagid: ++ /* use args[0] */ ++ set_opt (sbi->s_mount_opt, TAGGED); ++ break; ++#endif + case Opt_nocheck: + clear_opt (sbi->s_mount_opt, CHECK); + break; +@@ -829,6 +847,8 @@ static int ext2_fill_super(struct super_ + if (!parse_options ((char *) data, sbi)) + goto failed_mount; + ++ if (EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_TAGGED) ++ sb->s_flags |= MS_TAGGED; + sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | + ((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? + MS_POSIXACL : 0); +@@ -1175,6 +1195,14 @@ static int ext2_remount (struct super_bl + goto restore_opts; + } + ++ if ((sbi->s_mount_opt & EXT2_MOUNT_TAGGED) && ++ !(sb->s_flags & MS_TAGGED)) { ++ printk("EXT2-fs: %s: tagging not permitted on remount.\n", ++ sb->s_id); ++ err = -EINVAL; ++ goto restore_opts; ++ } ++ + sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | + ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); + +diff -NurpP --minimal linux-2.6.31.6/fs/ext3/file.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/file.c +--- linux-2.6.31.6/fs/ext3/file.c 2009-06-11 17:13:03.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/file.c 2009-10-06 23:23:15.000000000 +0200 +@@ -139,5 +139,6 @@ const struct inode_operations ext3_file_ + #endif + .permission = ext3_permission, + .fiemap = ext3_fiemap, ++ .sync_flags = ext3_sync_flags, + }; + +diff -NurpP --minimal linux-2.6.31.6/fs/ext3/ialloc.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/ialloc.c +--- linux-2.6.31.6/fs/ext3/ialloc.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/ialloc.c 2009-10-12 05:06:13.000000000 +0200 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include + +@@ -548,6 +549,7 @@ got: + } else + inode->i_gid = current_fsgid(); + inode->i_mode = mode; ++ inode->i_tag = dx_current_fstag(sb); + + inode->i_ino = ino; + /* This is the optimal IO size (for stat), not the fs block size */ +diff -NurpP --minimal linux-2.6.31.6/fs/ext3/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/inode.c +--- linux-2.6.31.6/fs/ext3/inode.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/inode.c 2009-10-06 19:45:13.000000000 +0200 +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + #include "xattr.h" + #include "acl.h" + +@@ -2312,7 +2313,7 @@ static void ext3_free_branches(handle_t + + int ext3_can_truncate(struct inode *inode) + { +- if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) ++ if (IS_APPEND(inode) || IS_IXORUNLINK(inode)) + return 0; + if (S_ISREG(inode->i_mode)) + return 1; +@@ -2697,36 +2698,60 @@ void ext3_set_inode_flags(struct inode * + { + unsigned int flags = EXT3_I(inode)->i_flags; + +- inode->i_flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); ++ inode->i_flags &= ~(S_IMMUTABLE | S_IXUNLINK | ++ S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC); ++ ++ if (flags & EXT3_IMMUTABLE_FL) ++ inode->i_flags |= S_IMMUTABLE; ++ if (flags & EXT3_IXUNLINK_FL) ++ inode->i_flags |= S_IXUNLINK; ++ + if (flags & EXT3_SYNC_FL) + inode->i_flags |= S_SYNC; + if (flags & EXT3_APPEND_FL) + inode->i_flags |= S_APPEND; +- if (flags & EXT3_IMMUTABLE_FL) +- inode->i_flags |= S_IMMUTABLE; + if (flags & EXT3_NOATIME_FL) + inode->i_flags |= S_NOATIME; + if (flags & EXT3_DIRSYNC_FL) + inode->i_flags |= S_DIRSYNC; ++ ++ inode->i_vflags &= ~(V_BARRIER | V_COW); ++ ++ if (flags & EXT3_BARRIER_FL) ++ inode->i_vflags |= V_BARRIER; ++ if (flags & EXT3_COW_FL) ++ inode->i_vflags |= V_COW; + } + + /* Propagate flags from i_flags to EXT3_I(inode)->i_flags */ + void ext3_get_inode_flags(struct ext3_inode_info *ei) + { + unsigned int flags = ei->vfs_inode.i_flags; ++ unsigned int vflags = ei->vfs_inode.i_vflags; ++ ++ ei->i_flags &= ~(EXT3_SYNC_FL | EXT3_APPEND_FL | ++ EXT3_IMMUTABLE_FL | EXT3_IXUNLINK_FL | ++ EXT3_NOATIME_FL | EXT3_DIRSYNC_FL | ++ EXT3_BARRIER_FL | EXT3_COW_FL); ++ ++ if (flags & S_IMMUTABLE) ++ ei->i_flags |= EXT3_IMMUTABLE_FL; ++ if (flags & S_IXUNLINK) ++ ei->i_flags |= EXT3_IXUNLINK_FL; + +- ei->i_flags &= ~(EXT3_SYNC_FL|EXT3_APPEND_FL| +- EXT3_IMMUTABLE_FL|EXT3_NOATIME_FL|EXT3_DIRSYNC_FL); + if (flags & S_SYNC) + ei->i_flags |= EXT3_SYNC_FL; + if (flags & S_APPEND) + ei->i_flags |= EXT3_APPEND_FL; +- if (flags & S_IMMUTABLE) +- ei->i_flags |= EXT3_IMMUTABLE_FL; + if (flags & S_NOATIME) + ei->i_flags |= EXT3_NOATIME_FL; + if (flags & S_DIRSYNC) + ei->i_flags |= EXT3_DIRSYNC_FL; ++ ++ if (vflags & V_BARRIER) ++ ei->i_flags |= EXT3_BARRIER_FL; ++ if (vflags & V_COW) ++ ei->i_flags |= EXT3_COW_FL; + } + + struct inode *ext3_iget(struct super_block *sb, unsigned long ino) +@@ -2738,6 +2763,8 @@ struct inode *ext3_iget(struct super_blo + struct inode *inode; + long ret; + int block; ++ uid_t uid; ++ gid_t gid; + + inode = iget_locked(sb, ino); + if (!inode) +@@ -2754,12 +2781,17 @@ struct inode *ext3_iget(struct super_blo + bh = iloc.bh; + raw_inode = ext3_raw_inode(&iloc); + inode->i_mode = le16_to_cpu(raw_inode->i_mode); +- inode->i_uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low); +- inode->i_gid = (gid_t)le16_to_cpu(raw_inode->i_gid_low); ++ uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low); ++ gid = (gid_t)le16_to_cpu(raw_inode->i_gid_low); + if(!(test_opt (inode->i_sb, NO_UID32))) { +- inode->i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16; +- inode->i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16; ++ uid |= le16_to_cpu(raw_inode->i_uid_high) << 16; ++ gid |= le16_to_cpu(raw_inode->i_gid_high) << 16; + } ++ inode->i_uid = INOTAG_UID(DX_TAG(inode), uid, gid); ++ inode->i_gid = INOTAG_GID(DX_TAG(inode), uid, gid); ++ inode->i_tag = INOTAG_TAG(DX_TAG(inode), uid, gid, ++ le16_to_cpu(raw_inode->i_raw_tag)); ++ + inode->i_nlink = le16_to_cpu(raw_inode->i_links_count); + inode->i_size = le32_to_cpu(raw_inode->i_size); + inode->i_atime.tv_sec = (signed)le32_to_cpu(raw_inode->i_atime); +@@ -2890,6 +2922,8 @@ static int ext3_do_update_inode(handle_t + struct ext3_inode *raw_inode = ext3_raw_inode(iloc); + struct ext3_inode_info *ei = EXT3_I(inode); + struct buffer_head *bh = iloc->bh; ++ uid_t uid = TAGINO_UID(DX_TAG(inode), inode->i_uid, inode->i_tag); ++ gid_t gid = TAGINO_GID(DX_TAG(inode), inode->i_gid, inode->i_tag); + int err = 0, rc, block; + + /* For fields not not tracking in the in-memory inode, +@@ -2900,29 +2934,32 @@ static int ext3_do_update_inode(handle_t + ext3_get_inode_flags(ei); + raw_inode->i_mode = cpu_to_le16(inode->i_mode); + if(!(test_opt(inode->i_sb, NO_UID32))) { +- raw_inode->i_uid_low = cpu_to_le16(low_16_bits(inode->i_uid)); +- raw_inode->i_gid_low = cpu_to_le16(low_16_bits(inode->i_gid)); ++ raw_inode->i_uid_low = cpu_to_le16(low_16_bits(uid)); ++ raw_inode->i_gid_low = cpu_to_le16(low_16_bits(gid)); + /* + * Fix up interoperability with old kernels. Otherwise, old inodes get + * re-used with the upper 16 bits of the uid/gid intact + */ + if(!ei->i_dtime) { + raw_inode->i_uid_high = +- cpu_to_le16(high_16_bits(inode->i_uid)); ++ cpu_to_le16(high_16_bits(uid)); + raw_inode->i_gid_high = +- cpu_to_le16(high_16_bits(inode->i_gid)); ++ cpu_to_le16(high_16_bits(gid)); + } else { + raw_inode->i_uid_high = 0; + raw_inode->i_gid_high = 0; + } + } else { + raw_inode->i_uid_low = +- cpu_to_le16(fs_high2lowuid(inode->i_uid)); ++ cpu_to_le16(fs_high2lowuid(uid)); + raw_inode->i_gid_low = +- cpu_to_le16(fs_high2lowgid(inode->i_gid)); ++ cpu_to_le16(fs_high2lowgid(gid)); + raw_inode->i_uid_high = 0; + raw_inode->i_gid_high = 0; + } ++#ifdef CONFIG_TAGGING_INTERN ++ raw_inode->i_raw_tag = cpu_to_le16(inode->i_tag); ++#endif + raw_inode->i_links_count = cpu_to_le16(inode->i_nlink); + raw_inode->i_size = cpu_to_le32(ei->i_disksize); + raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec); +@@ -3074,7 +3111,8 @@ int ext3_setattr(struct dentry *dentry, + return error; + + if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || +- (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) { ++ (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid) || ++ (ia_valid & ATTR_TAG && attr->ia_tag != inode->i_tag)) { + handle_t *handle; + + /* (user+group)*(old+new) structure, inode write (sb, +@@ -3096,6 +3134,8 @@ int ext3_setattr(struct dentry *dentry, + inode->i_uid = attr->ia_uid; + if (attr->ia_valid & ATTR_GID) + inode->i_gid = attr->ia_gid; ++ if ((attr->ia_valid & ATTR_TAG) && IS_TAGGED(inode)) ++ inode->i_tag = attr->ia_tag; + error = ext3_mark_inode_dirty(handle, inode); + ext3_journal_stop(handle); + } +diff -NurpP --minimal linux-2.6.31.6/fs/ext3/ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/ioctl.c +--- linux-2.6.31.6/fs/ext3/ioctl.c 2009-06-11 17:13:03.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/ioctl.c 2009-10-07 00:08:00.000000000 +0200 +@@ -8,6 +8,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -17,6 +18,34 @@ + #include + #include + ++ ++int ext3_sync_flags(struct inode *inode, int flags, int vflags) ++{ ++ handle_t *handle = NULL; ++ struct ext3_iloc iloc; ++ int err; ++ ++ handle = ext3_journal_start(inode, 1); ++ if (IS_ERR(handle)) ++ return PTR_ERR(handle); ++ ++ if (IS_SYNC(inode)) ++ handle->h_sync = 1; ++ err = ext3_reserve_inode_write(handle, inode, &iloc); ++ if (err) ++ goto flags_err; ++ ++ inode->i_flags = flags; ++ inode->i_vflags = vflags; ++ ext3_get_inode_flags(EXT3_I(inode)); ++ inode->i_ctime = CURRENT_TIME_SEC; ++ ++ err = ext3_mark_iloc_dirty(handle, inode, &iloc); ++flags_err: ++ ext3_journal_stop(handle); ++ return err; ++} ++ + long ext3_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) + { + struct inode *inode = filp->f_dentry->d_inode; +@@ -50,6 +79,11 @@ long ext3_ioctl(struct file *filp, unsig + + flags = ext3_mask_flags(inode->i_mode, flags); + ++ if (IS_BARRIER(inode)) { ++ vxwprintk_task(1, "messing with the barrier."); ++ return -EACCES; ++ } ++ + mutex_lock(&inode->i_mutex); + + /* Is it quota file? Do not allow user to mess with it */ +@@ -68,7 +102,9 @@ long ext3_ioctl(struct file *filp, unsig + * + * This test looks nicer. Thanks to Pauline Middelink + */ +- if ((flags ^ oldflags) & (EXT3_APPEND_FL | EXT3_IMMUTABLE_FL)) { ++ if ((oldflags & EXT3_IMMUTABLE_FL) || ++ ((flags ^ oldflags) & (EXT3_APPEND_FL | ++ EXT3_IMMUTABLE_FL | EXT3_IXUNLINK_FL))) { + if (!capable(CAP_LINUX_IMMUTABLE)) + goto flags_out; + } +@@ -93,7 +129,7 @@ long ext3_ioctl(struct file *filp, unsig + if (err) + goto flags_err; + +- flags = flags & EXT3_FL_USER_MODIFIABLE; ++ flags &= EXT3_FL_USER_MODIFIABLE; + flags |= oldflags & ~EXT3_FL_USER_MODIFIABLE; + ei->i_flags = flags; + +diff -NurpP --minimal linux-2.6.31.6/fs/ext3/namei.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/namei.c +--- linux-2.6.31.6/fs/ext3/namei.c 2009-06-11 17:13:03.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/namei.c 2009-10-06 23:24:04.000000000 +0200 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include "namei.h" + #include "xattr.h" +@@ -912,6 +913,7 @@ restart: + if (bh) + ll_rw_block(READ_META, 1, &bh); + } ++ dx_propagate_tag(nd, inode); + } + if ((bh = bh_use[ra_ptr++]) == NULL) + goto next; +@@ -2446,6 +2448,7 @@ const struct inode_operations ext3_dir_i + .removexattr = generic_removexattr, + #endif + .permission = ext3_permission, ++ .sync_flags = ext3_sync_flags, + }; + + const struct inode_operations ext3_special_inode_operations = { +diff -NurpP --minimal linux-2.6.31.6/fs/ext3/super.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/super.c +--- linux-2.6.31.6/fs/ext3/super.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext3/super.c 2009-10-06 22:46:25.000000000 +0200 +@@ -787,7 +787,7 @@ enum { + Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, + Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, + Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, +- Opt_grpquota ++ Opt_grpquota, Opt_tag, Opt_notag, Opt_tagid + }; + + static const match_table_t tokens = { +@@ -840,6 +840,9 @@ static const match_table_t tokens = { + {Opt_usrquota, "usrquota"}, + {Opt_barrier, "barrier=%u"}, + {Opt_resize, "resize"}, ++ {Opt_tag, "tag"}, ++ {Opt_notag, "notag"}, ++ {Opt_tagid, "tagid=%u"}, + {Opt_err, NULL}, + }; + +@@ -932,6 +935,20 @@ static int parse_options (char *options, + case Opt_nouid32: + set_opt (sbi->s_mount_opt, NO_UID32); + break; ++#ifndef CONFIG_TAGGING_NONE ++ case Opt_tag: ++ set_opt (sbi->s_mount_opt, TAGGED); ++ break; ++ case Opt_notag: ++ clear_opt (sbi->s_mount_opt, TAGGED); ++ break; ++#endif ++#ifdef CONFIG_PROPAGATE ++ case Opt_tagid: ++ /* use args[0] */ ++ set_opt (sbi->s_mount_opt, TAGGED); ++ break; ++#endif + case Opt_nocheck: + clear_opt (sbi->s_mount_opt, CHECK); + break; +@@ -1656,6 +1673,9 @@ static int ext3_fill_super (struct super + NULL, 0)) + goto failed_mount; + ++ if (EXT3_SB(sb)->s_mount_opt & EXT3_MOUNT_TAGGED) ++ sb->s_flags |= MS_TAGGED; ++ + sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | + ((sbi->s_mount_opt & EXT3_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); + +@@ -2514,6 +2534,14 @@ static int ext3_remount (struct super_bl + if (sbi->s_mount_opt & EXT3_MOUNT_ABORT) + ext3_abort(sb, __func__, "Abort forced by user"); + ++ if ((sbi->s_mount_opt & EXT3_MOUNT_TAGGED) && ++ !(sb->s_flags & MS_TAGGED)) { ++ printk("EXT3-fs: %s: tagging not permitted on remount.\n", ++ sb->s_id); ++ err = -EINVAL; ++ goto restore_opts; ++ } ++ + sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | + ((sbi->s_mount_opt & EXT3_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); + +diff -NurpP --minimal linux-2.6.31.6/fs/ext4/ext4.h linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/ext4.h +--- linux-2.6.31.6/fs/ext4/ext4.h 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/ext4.h 2009-10-07 01:23:25.000000000 +0200 +@@ -252,8 +252,12 @@ struct flex_groups { + #define EXT4_HUGE_FILE_FL 0x00040000 /* Set to each huge file */ + #define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */ + #define EXT4_EXT_MIGRATE 0x00100000 /* Inode is migrating */ ++#define EXT4_IXUNLINK_FL 0x08000000 /* Immutable invert on unlink */ + #define EXT4_RESERVED_FL 0x80000000 /* reserved for ext4 lib */ + ++#define EXT4_BARRIER_FL 0x04000000 /* Barrier for chroot() */ ++#define EXT4_COW_FL 0x20000000 /* Copy on Write marker */ ++ + #define EXT4_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */ + #define EXT4_FL_USER_MODIFIABLE 0x000B80FF /* User modifiable flags */ + +@@ -423,7 +427,8 @@ struct ext4_inode { + __le16 l_i_file_acl_high; + __le16 l_i_uid_high; /* these 2 fields */ + __le16 l_i_gid_high; /* were reserved2[0] */ +- __u32 l_i_reserved2; ++ __le16 l_i_tag; /* Context Tag */ ++ __u16 l_i_reserved2; + } linux2; + struct { + __le16 h_i_reserved1; /* Obsoleted fragment number/size which are removed in ext4 */ +@@ -538,6 +543,7 @@ do { \ + #define i_gid_low i_gid + #define i_uid_high osd2.linux2.l_i_uid_high + #define i_gid_high osd2.linux2.l_i_gid_high ++#define i_raw_tag osd2.linux2.l_i_tag + #define i_reserved2 osd2.linux2.l_i_reserved2 + + #elif defined(__GNU__) +@@ -694,6 +700,7 @@ struct ext4_inode_info { + #define EXT4_MOUNT_QUOTA 0x80000 /* Some quota option set */ + #define EXT4_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ + #define EXT4_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ ++#define EXT4_MOUNT_TAGGED 0x400000 /* Enable Context Tags */ + #define EXT4_MOUNT_JOURNAL_CHECKSUM 0x800000 /* Journal checksums */ + #define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT 0x1000000 /* Journal Async Commit */ + #define EXT4_MOUNT_I_VERSION 0x2000000 /* i_version support */ +@@ -1655,6 +1662,7 @@ extern int ext4_get_blocks(handle_t *han + struct buffer_head *bh, int flags); + extern int ext4_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, + __u64 start, __u64 len); ++extern int ext4_sync_flags(struct inode *, int, int); + /* move_extent.c */ + extern int ext4_move_extents(struct file *o_filp, struct file *d_filp, + __u64 start_orig, __u64 start_donor, +diff -NurpP --minimal linux-2.6.31.6/fs/ext4/file.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/file.c +--- linux-2.6.31.6/fs/ext4/file.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/file.c 2009-10-07 01:03:26.000000000 +0200 +@@ -210,5 +210,6 @@ const struct inode_operations ext4_file_ + .permission = ext4_permission, + .fallocate = ext4_fallocate, + .fiemap = ext4_fiemap, ++ .sync_flags = ext4_sync_flags, + }; + +diff -NurpP --minimal linux-2.6.31.6/fs/ext4/ialloc.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/ialloc.c +--- linux-2.6.31.6/fs/ext4/ialloc.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/ialloc.c 2009-10-12 05:06:42.000000000 +0200 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + + #include "ext4.h" +@@ -995,6 +996,7 @@ got: + } else + inode->i_gid = current_fsgid(); + inode->i_mode = mode; ++ inode->i_tag = dx_current_fstag(sb); + + inode->i_ino = ino + group * EXT4_INODES_PER_GROUP(sb); + /* This is the optimal IO size (for stat), not the fs block size */ +diff -NurpP --minimal linux-2.6.31.6/fs/ext4/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/inode.c +--- linux-2.6.31.6/fs/ext4/inode.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/inode.c 2009-10-06 19:45:13.000000000 +0200 +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include "ext4_jbd2.h" + #include "xattr.h" +@@ -3901,7 +3902,7 @@ static void ext4_free_branches(handle_t + + int ext4_can_truncate(struct inode *inode) + { +- if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) ++ if (IS_APPEND(inode) || IS_IXORUNLINK(inode)) + return 0; + if (S_ISREG(inode->i_mode)) + return 1; +@@ -4253,36 +4254,60 @@ void ext4_set_inode_flags(struct inode * + { + unsigned int flags = EXT4_I(inode)->i_flags; + +- inode->i_flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); ++ inode->i_flags &= ~(S_IMMUTABLE | S_IXUNLINK | ++ S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC); ++ ++ if (flags & EXT4_IMMUTABLE_FL) ++ inode->i_flags |= S_IMMUTABLE; ++ if (flags & EXT4_IXUNLINK_FL) ++ inode->i_flags |= S_IXUNLINK; ++ + if (flags & EXT4_SYNC_FL) + inode->i_flags |= S_SYNC; + if (flags & EXT4_APPEND_FL) + inode->i_flags |= S_APPEND; +- if (flags & EXT4_IMMUTABLE_FL) +- inode->i_flags |= S_IMMUTABLE; + if (flags & EXT4_NOATIME_FL) + inode->i_flags |= S_NOATIME; + if (flags & EXT4_DIRSYNC_FL) + inode->i_flags |= S_DIRSYNC; ++ ++ inode->i_vflags &= ~(V_BARRIER | V_COW); ++ ++ if (flags & EXT4_BARRIER_FL) ++ inode->i_vflags |= V_BARRIER; ++ if (flags & EXT4_COW_FL) ++ inode->i_vflags |= V_COW; + } + + /* Propagate flags from i_flags to EXT4_I(inode)->i_flags */ + void ext4_get_inode_flags(struct ext4_inode_info *ei) + { + unsigned int flags = ei->vfs_inode.i_flags; ++ unsigned int vflags = ei->vfs_inode.i_vflags; ++ ++ ei->i_flags &= ~(EXT4_SYNC_FL | EXT4_APPEND_FL | ++ EXT4_IMMUTABLE_FL | EXT4_IXUNLINK_FL | ++ EXT4_NOATIME_FL | EXT4_DIRSYNC_FL | ++ EXT4_BARRIER_FL | EXT4_COW_FL); ++ ++ if (flags & S_IMMUTABLE) ++ ei->i_flags |= EXT4_IMMUTABLE_FL; ++ if (flags & S_IXUNLINK) ++ ei->i_flags |= EXT4_IXUNLINK_FL; + +- ei->i_flags &= ~(EXT4_SYNC_FL|EXT4_APPEND_FL| +- EXT4_IMMUTABLE_FL|EXT4_NOATIME_FL|EXT4_DIRSYNC_FL); + if (flags & S_SYNC) + ei->i_flags |= EXT4_SYNC_FL; + if (flags & S_APPEND) + ei->i_flags |= EXT4_APPEND_FL; +- if (flags & S_IMMUTABLE) +- ei->i_flags |= EXT4_IMMUTABLE_FL; + if (flags & S_NOATIME) + ei->i_flags |= EXT4_NOATIME_FL; + if (flags & S_DIRSYNC) + ei->i_flags |= EXT4_DIRSYNC_FL; ++ ++ if (vflags & V_BARRIER) ++ ei->i_flags |= EXT4_BARRIER_FL; ++ if (vflags & V_COW) ++ ei->i_flags |= EXT4_COW_FL; + } + + static blkcnt_t ext4_inode_blocks(struct ext4_inode *raw_inode, +@@ -4317,6 +4342,8 @@ struct inode *ext4_iget(struct super_blo + struct inode *inode; + long ret; + int block; ++ uid_t uid; ++ gid_t gid; + + inode = iget_locked(sb, ino); + if (!inode) +@@ -4332,12 +4359,16 @@ struct inode *ext4_iget(struct super_blo + bh = iloc.bh; + raw_inode = ext4_raw_inode(&iloc); + inode->i_mode = le16_to_cpu(raw_inode->i_mode); +- inode->i_uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low); +- inode->i_gid = (gid_t)le16_to_cpu(raw_inode->i_gid_low); ++ uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low); ++ gid = (gid_t)le16_to_cpu(raw_inode->i_gid_low); + if (!(test_opt(inode->i_sb, NO_UID32))) { +- inode->i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16; +- inode->i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16; ++ uid |= le16_to_cpu(raw_inode->i_uid_high) << 16; ++ gid |= le16_to_cpu(raw_inode->i_gid_high) << 16; + } ++ inode->i_uid = INOTAG_UID(DX_TAG(inode), uid, gid); ++ inode->i_gid = INOTAG_GID(DX_TAG(inode), uid, gid); ++ inode->i_tag = INOTAG_TAG(DX_TAG(inode), uid, gid, ++ le16_to_cpu(raw_inode->i_raw_tag)); + inode->i_nlink = le16_to_cpu(raw_inode->i_links_count); + + ei->i_state = 0; +@@ -4538,6 +4569,8 @@ static int ext4_do_update_inode(handle_t + struct ext4_inode *raw_inode = ext4_raw_inode(iloc); + struct ext4_inode_info *ei = EXT4_I(inode); + struct buffer_head *bh = iloc->bh; ++ uid_t uid = TAGINO_UID(DX_TAG(inode), inode->i_uid, inode->i_tag); ++ gid_t gid = TAGINO_GID(DX_TAG(inode), inode->i_gid, inode->i_tag); + int err = 0, rc, block; + + /* For fields not not tracking in the in-memory inode, +@@ -4548,29 +4581,32 @@ static int ext4_do_update_inode(handle_t + ext4_get_inode_flags(ei); + raw_inode->i_mode = cpu_to_le16(inode->i_mode); + if (!(test_opt(inode->i_sb, NO_UID32))) { +- raw_inode->i_uid_low = cpu_to_le16(low_16_bits(inode->i_uid)); +- raw_inode->i_gid_low = cpu_to_le16(low_16_bits(inode->i_gid)); ++ raw_inode->i_uid_low = cpu_to_le16(low_16_bits(uid)); ++ raw_inode->i_gid_low = cpu_to_le16(low_16_bits(gid)); + /* + * Fix up interoperability with old kernels. Otherwise, old inodes get + * re-used with the upper 16 bits of the uid/gid intact + */ + if (!ei->i_dtime) { + raw_inode->i_uid_high = +- cpu_to_le16(high_16_bits(inode->i_uid)); ++ cpu_to_le16(high_16_bits(uid)); + raw_inode->i_gid_high = +- cpu_to_le16(high_16_bits(inode->i_gid)); ++ cpu_to_le16(high_16_bits(gid)); + } else { + raw_inode->i_uid_high = 0; + raw_inode->i_gid_high = 0; + } + } else { + raw_inode->i_uid_low = +- cpu_to_le16(fs_high2lowuid(inode->i_uid)); ++ cpu_to_le16(fs_high2lowuid(uid)); + raw_inode->i_gid_low = +- cpu_to_le16(fs_high2lowgid(inode->i_gid)); ++ cpu_to_le16(fs_high2lowgid(gid)); + raw_inode->i_uid_high = 0; + raw_inode->i_gid_high = 0; + } ++#ifdef CONFIG_TAGGING_INTERN ++ raw_inode->i_raw_tag = cpu_to_le16(inode->i_tag); ++#endif + raw_inode->i_links_count = cpu_to_le16(inode->i_nlink); + + EXT4_INODE_SET_XTIME(i_ctime, inode, raw_inode); +@@ -4734,7 +4770,8 @@ int ext4_setattr(struct dentry *dentry, + return error; + + if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || +- (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) { ++ (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid) || ++ (ia_valid & ATTR_TAG && attr->ia_tag != inode->i_tag)) { + handle_t *handle; + + /* (user+group)*(old+new) structure, inode write (sb, +@@ -4756,6 +4793,8 @@ int ext4_setattr(struct dentry *dentry, + inode->i_uid = attr->ia_uid; + if (attr->ia_valid & ATTR_GID) + inode->i_gid = attr->ia_gid; ++ if ((attr->ia_valid & ATTR_TAG) && IS_TAGGED(inode)) ++ inode->i_tag = attr->ia_tag; + error = ext4_mark_inode_dirty(handle, inode); + ext4_journal_stop(handle); + } +diff -NurpP --minimal linux-2.6.31.6/fs/ext4/ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/ioctl.c +--- linux-2.6.31.6/fs/ext4/ioctl.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/ioctl.c 2009-10-07 04:03:02.000000000 +0200 +@@ -14,10 +14,39 @@ + #include + #include + #include ++#include + #include + #include "ext4_jbd2.h" + #include "ext4.h" + ++ ++int ext4_sync_flags(struct inode *inode, int flags, int vflags) ++{ ++ handle_t *handle = NULL; ++ struct ext4_iloc iloc; ++ int err; ++ ++ handle = ext4_journal_start(inode, 1); ++ if (IS_ERR(handle)) ++ return PTR_ERR(handle); ++ ++ if (IS_SYNC(inode)) ++ ext4_handle_sync(handle); ++ err = ext4_reserve_inode_write(handle, inode, &iloc); ++ if (err) ++ goto flags_err; ++ ++ inode->i_flags = flags; ++ inode->i_vflags = vflags; ++ ext4_get_inode_flags(EXT4_I(inode)); ++ inode->i_ctime = ext4_current_time(inode); ++ ++ err = ext4_mark_iloc_dirty(handle, inode, &iloc); ++flags_err: ++ ext4_journal_stop(handle); ++ return err; ++} ++ + long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) + { + struct inode *inode = filp->f_dentry->d_inode; +@@ -50,6 +79,11 @@ long ext4_ioctl(struct file *filp, unsig + + flags = ext4_mask_flags(inode->i_mode, flags); + ++ if (IS_BARRIER(inode)) { ++ vxwprintk_task(1, "messing with the barrier."); ++ return -EACCES; ++ } ++ + err = -EPERM; + mutex_lock(&inode->i_mutex); + /* Is it quota file? Do not allow user to mess with it */ +@@ -67,7 +101,9 @@ long ext4_ioctl(struct file *filp, unsig + * + * This test looks nicer. Thanks to Pauline Middelink + */ +- if ((flags ^ oldflags) & (EXT4_APPEND_FL | EXT4_IMMUTABLE_FL)) { ++ if ((oldflags & EXT4_IMMUTABLE_FL) || ++ ((flags ^ oldflags) & (EXT4_APPEND_FL | ++ EXT4_IMMUTABLE_FL | EXT4_IXUNLINK_FL))) { + if (!capable(CAP_LINUX_IMMUTABLE)) + goto flags_out; + } +diff -NurpP --minimal linux-2.6.31.6/fs/ext4/namei.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/namei.c +--- linux-2.6.31.6/fs/ext4/namei.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/namei.c 2009-10-07 01:08:37.000000000 +0200 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include "ext4.h" + #include "ext4_jbd2.h" + +@@ -941,6 +942,7 @@ restart: + if (bh) + ll_rw_block(READ_META, 1, &bh); + } ++ dx_propagate_tag(nd, inode); + } + if ((bh = bh_use[ra_ptr++]) == NULL) + goto next; +@@ -2538,6 +2540,7 @@ const struct inode_operations ext4_dir_i + #endif + .permission = ext4_permission, + .fiemap = ext4_fiemap, ++ .sync_flags = ext4_sync_flags, + }; + + const struct inode_operations ext4_special_inode_operations = { +diff -NurpP --minimal linux-2.6.31.6/fs/ext4/super.c linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/super.c +--- linux-2.6.31.6/fs/ext4/super.c 2009-09-10 15:26:21.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ext4/super.c 2009-10-06 22:47:27.000000000 +0200 +@@ -1057,7 +1057,8 @@ enum { + Opt_usrquota, Opt_grpquota, Opt_i_version, + Opt_stripe, Opt_delalloc, Opt_nodelalloc, + Opt_block_validity, Opt_noblock_validity, +- Opt_inode_readahead_blks, Opt_journal_ioprio ++ Opt_inode_readahead_blks, Opt_journal_ioprio, ++ Opt_tag, Opt_notag, Opt_tagid + }; + + static const match_table_t tokens = { +@@ -1123,6 +1124,9 @@ static const match_table_t tokens = { + {Opt_auto_da_alloc, "auto_da_alloc=%u"}, + {Opt_auto_da_alloc, "auto_da_alloc"}, + {Opt_noauto_da_alloc, "noauto_da_alloc"}, ++ {Opt_tag, "tag"}, ++ {Opt_notag, "notag"}, ++ {Opt_tagid, "tagid=%u"}, + {Opt_err, NULL}, + }; + +@@ -1220,6 +1224,20 @@ static int parse_options(char *options, + case Opt_nouid32: + set_opt(sbi->s_mount_opt, NO_UID32); + break; ++#ifndef CONFIG_TAGGING_NONE ++ case Opt_tag: ++ set_opt (sbi->s_mount_opt, TAGGED); ++ break; ++ case Opt_notag: ++ clear_opt (sbi->s_mount_opt, TAGGED); ++ break; ++#endif ++#ifdef CONFIG_PROPAGATE ++ case Opt_tagid: ++ /* use args[0] */ ++ set_opt (sbi->s_mount_opt, TAGGED); ++ break; ++#endif + case Opt_debug: + set_opt(sbi->s_mount_opt, DEBUG); + break; +@@ -2385,6 +2403,9 @@ static int ext4_fill_super(struct super_ + &journal_ioprio, NULL, 0)) + goto failed_mount; + ++ if (EXT4_SB(sb)->s_mount_opt & EXT4_MOUNT_TAGGED) ++ sb->s_flags |= MS_TAGGED; ++ + sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | + ((sbi->s_mount_opt & EXT4_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); + +@@ -3441,6 +3462,14 @@ static int ext4_remount(struct super_blo + if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) + ext4_abort(sb, __func__, "Abort forced by user"); + ++ if ((sbi->s_mount_opt & EXT4_MOUNT_TAGGED) && ++ !(sb->s_flags & MS_TAGGED)) { ++ printk("EXT4-fs: %s: tagging not permitted on remount.\n", ++ sb->s_id); ++ err = -EINVAL; ++ goto restore_opts; ++ } ++ + sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | + ((sbi->s_mount_opt & EXT4_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); + +diff -NurpP --minimal linux-2.6.31.6/fs/fcntl.c linux-2.6.31.6-vs2.3.0.36.24/fs/fcntl.c +--- linux-2.6.31.6/fs/fcntl.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/fcntl.c 2009-09-10 17:00:41.000000000 +0200 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -102,6 +103,8 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldf + + if (tofree) + filp_close(tofree, files); ++ else ++ vx_openfd_inc(newfd); /* fd was unused */ + + return newfd; + +@@ -347,6 +350,8 @@ SYSCALL_DEFINE3(fcntl, unsigned int, fd, + filp = fget(fd); + if (!filp) + goto out; ++ if (!vx_files_avail(1)) ++ goto out; + + err = security_file_fcntl(filp, cmd, arg); + if (err) { +diff -NurpP --minimal linux-2.6.31.6/fs/file.c linux-2.6.31.6-vs2.3.0.36.24/fs/file.c +--- linux-2.6.31.6/fs/file.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/file.c 2009-09-10 16:11:43.000000000 +0200 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + struct fdtable_defer { + spinlock_t lock; +@@ -367,6 +368,8 @@ struct files_struct *dup_fd(struct files + struct file *f = *old_fds++; + if (f) { + get_file(f); ++ /* TODO: sum it first for check and performance */ ++ vx_openfd_inc(open_files - i); + } else { + /* + * The fd may be claimed in the fd bitmap but not yet +@@ -475,6 +478,7 @@ repeat: + else + FD_CLR(fd, fdt->close_on_exec); + error = fd; ++ vx_openfd_inc(fd); + #if 1 + /* Sanity check */ + if (rcu_dereference(fdt->fd[fd]) != NULL) { +diff -NurpP --minimal linux-2.6.31.6/fs/file_table.c linux-2.6.31.6-vs2.3.0.36.24/fs/file_table.c +--- linux-2.6.31.6/fs/file_table.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/file_table.c 2009-09-10 16:11:43.000000000 +0200 +@@ -22,6 +22,8 @@ + #include + #include + #include ++#include ++#include + + #include + +@@ -131,6 +133,8 @@ struct file *get_empty_filp(void) + spin_lock_init(&f->f_lock); + eventpoll_init_file(f); + /* f->f_version: 0 */ ++ f->f_xid = vx_current_xid(); ++ vx_files_inc(f); + return f; + + over: +@@ -285,6 +289,8 @@ void __fput(struct file *file) + cdev_put(inode->i_cdev); + fops_put(file->f_op); + put_pid(file->f_owner.pid); ++ vx_files_dec(file); ++ file->f_xid = 0; + file_kill(file); + if (file->f_mode & FMODE_WRITE) + drop_file_write_access(file); +@@ -352,6 +358,8 @@ void put_filp(struct file *file) + { + if (atomic_long_dec_and_test(&file->f_count)) { + security_file_free(file); ++ vx_files_dec(file); ++ file->f_xid = 0; + file_kill(file); + file_free(file); + } +diff -NurpP --minimal linux-2.6.31.6/fs/fs_struct.c linux-2.6.31.6-vs2.3.0.36.24/fs/fs_struct.c +--- linux-2.6.31.6/fs/fs_struct.c 2009-06-11 17:13:04.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/fs_struct.c 2009-09-10 16:11:43.000000000 +0200 +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + /* + * Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values. +@@ -77,6 +78,7 @@ void free_fs_struct(struct fs_struct *fs + { + path_put(&fs->root); + path_put(&fs->pwd); ++ atomic_dec(&vs_global_fs); + kmem_cache_free(fs_cachep, fs); + } + +@@ -112,6 +114,7 @@ struct fs_struct *copy_fs_struct(struct + fs->pwd = old->pwd; + path_get(&old->pwd); + read_unlock(&old->lock); ++ atomic_inc(&vs_global_fs); + } + return fs; + } +diff -NurpP --minimal linux-2.6.31.6/fs/gfs2/file.c linux-2.6.31.6-vs2.3.0.36.24/fs/gfs2/file.c +--- linux-2.6.31.6/fs/gfs2/file.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/gfs2/file.c 2009-10-07 18:47:19.000000000 +0200 +@@ -133,6 +133,9 @@ static const u32 fsflags_to_gfs2[32] = { + [7] = GFS2_DIF_NOATIME, + [12] = GFS2_DIF_EXHASH, + [14] = GFS2_DIF_INHERIT_JDATA, ++ [27] = GFS2_DIF_IXUNLINK, ++ [26] = GFS2_DIF_BARRIER, ++ [29] = GFS2_DIF_COW, + }; + + static const u32 gfs2_to_fsflags[32] = { +@@ -142,6 +145,9 @@ static const u32 gfs2_to_fsflags[32] = { + [gfs2fl_NoAtime] = FS_NOATIME_FL, + [gfs2fl_ExHash] = FS_INDEX_FL, + [gfs2fl_InheritJdata] = FS_JOURNAL_DATA_FL, ++ [gfs2fl_IXUnlink] = FS_IXUNLINK_FL, ++ [gfs2fl_Barrier] = FS_BARRIER_FL, ++ [gfs2fl_Cow] = FS_COW_FL, + }; + + static int gfs2_get_flags(struct file *filp, u32 __user *ptr) +@@ -172,10 +178,16 @@ void gfs2_set_inode_flags(struct inode * + { + struct gfs2_inode *ip = GFS2_I(inode); + unsigned int flags = inode->i_flags; ++ unsigned int vflags = inode->i_vflags; ++ ++ flags &= ~(S_IMMUTABLE | S_IXUNLINK | ++ S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC); + +- flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); + if (ip->i_diskflags & GFS2_DIF_IMMUTABLE) + flags |= S_IMMUTABLE; ++ if (ip->i_diskflags & GFS2_DIF_IXUNLINK) ++ flags |= S_IXUNLINK; ++ + if (ip->i_diskflags & GFS2_DIF_APPENDONLY) + flags |= S_APPEND; + if (ip->i_diskflags & GFS2_DIF_NOATIME) +@@ -183,6 +195,43 @@ void gfs2_set_inode_flags(struct inode * + if (ip->i_diskflags & GFS2_DIF_SYNC) + flags |= S_SYNC; + inode->i_flags = flags; ++ ++ vflags &= ~(V_BARRIER | V_COW); ++ ++ if (ip->i_diskflags & GFS2_DIF_BARRIER) ++ vflags |= V_BARRIER; ++ if (ip->i_diskflags & GFS2_DIF_COW) ++ vflags |= V_COW; ++ inode->i_vflags = vflags; ++} ++ ++void gfs2_get_inode_flags(struct inode *inode) ++{ ++ struct gfs2_inode *ip = GFS2_I(inode); ++ unsigned int flags = inode->i_flags; ++ unsigned int vflags = inode->i_vflags; ++ ++ ip->i_diskflags &= ~(GFS2_DIF_APPENDONLY | ++ GFS2_DIF_NOATIME | GFS2_DIF_SYNC | ++ GFS2_DIF_IMMUTABLE | GFS2_DIF_IXUNLINK | ++ GFS2_DIF_BARRIER | GFS2_DIF_COW); ++ ++ if (flags & S_IMMUTABLE) ++ ip->i_diskflags |= GFS2_DIF_IMMUTABLE; ++ if (flags & S_IXUNLINK) ++ ip->i_diskflags |= GFS2_DIF_IXUNLINK; ++ ++ if (flags & S_APPEND) ++ ip->i_diskflags |= GFS2_DIF_APPENDONLY; ++ if (flags & S_NOATIME) ++ ip->i_diskflags |= GFS2_DIF_NOATIME; ++ if (flags & S_SYNC) ++ ip->i_diskflags |= GFS2_DIF_SYNC; ++ ++ if (vflags & V_BARRIER) ++ ip->i_diskflags |= GFS2_DIF_BARRIER; ++ if (vflags & V_COW) ++ ip->i_diskflags |= GFS2_DIF_COW; + } + + /* Flags that can be set by user space */ +@@ -287,6 +336,37 @@ static int gfs2_set_flags(struct file *f + return do_gfs2_set_flags(filp, gfsflags, ~GFS2_DIF_JDATA); + } + ++int gfs2_sync_flags(struct inode *inode, int flags, int vflags) ++{ ++ struct gfs2_inode *ip = GFS2_I(inode); ++ struct gfs2_sbd *sdp = GFS2_SB(inode); ++ struct buffer_head *bh; ++ struct gfs2_holder gh; ++ int error; ++ ++ error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); ++ if (error) ++ return error; ++ error = gfs2_trans_begin(sdp, RES_DINODE, 0); ++ if (error) ++ goto out; ++ error = gfs2_meta_inode_buffer(ip, &bh); ++ if (error) ++ goto out_trans_end; ++ gfs2_trans_add_bh(ip->i_gl, bh, 1); ++ inode->i_flags = flags; ++ inode->i_vflags = vflags; ++ gfs2_get_inode_flags(inode); ++ gfs2_dinode_out(ip, bh->b_data); ++ brelse(bh); ++ gfs2_set_aops(inode); ++out_trans_end: ++ gfs2_trans_end(sdp); ++out: ++ gfs2_glock_dq_uninit(&gh); ++ return error; ++} ++ + static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) + { + switch(cmd) { +diff -NurpP --minimal linux-2.6.31.6/fs/gfs2/inode.h linux-2.6.31.6-vs2.3.0.36.24/fs/gfs2/inode.h +--- linux-2.6.31.6/fs/gfs2/inode.h 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/gfs2/inode.h 2009-10-07 18:16:33.000000000 +0200 +@@ -109,6 +109,7 @@ extern const struct file_operations gfs2 + extern const struct file_operations gfs2_dir_fops_nolock; + + extern void gfs2_set_inode_flags(struct inode *inode); ++extern int gfs2_sync_flags(struct inode *inode, int flags, int vflags); + + #ifdef CONFIG_GFS2_FS_LOCKING_DLM + extern const struct file_operations gfs2_file_fops; +diff -NurpP --minimal linux-2.6.31.6/fs/gfs2/ops_inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/gfs2/ops_inode.c +--- linux-2.6.31.6/fs/gfs2/ops_inode.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/gfs2/ops_inode.c 2009-10-07 18:15:45.000000000 +0200 +@@ -1409,6 +1409,7 @@ const struct inode_operations gfs2_file_ + .listxattr = gfs2_listxattr, + .removexattr = gfs2_removexattr, + .fiemap = gfs2_fiemap, ++ .sync_flags = gfs2_sync_flags, + }; + + const struct inode_operations gfs2_dir_iops = { +@@ -1429,6 +1430,7 @@ const struct inode_operations gfs2_dir_i + .listxattr = gfs2_listxattr, + .removexattr = gfs2_removexattr, + .fiemap = gfs2_fiemap, ++ .sync_flags = gfs2_sync_flags, + }; + + const struct inode_operations gfs2_symlink_iops = { +diff -NurpP --minimal linux-2.6.31.6/fs/hfsplus/ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/hfsplus/ioctl.c +--- linux-2.6.31.6/fs/hfsplus/ioctl.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/hfsplus/ioctl.c 2009-09-10 16:11:43.000000000 +0200 +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include "hfsplus_fs.h" + +diff -NurpP --minimal linux-2.6.31.6/fs/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/inode.c +--- linux-2.6.31.6/fs/inode.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/inode.c 2009-10-05 23:35:52.000000000 +0200 +@@ -128,6 +128,9 @@ int inode_init_always(struct super_block + struct address_space *const mapping = &inode->i_data; + + inode->i_sb = sb; ++ ++ /* essential because of inode slab reuse */ ++ inode->i_tag = 0; + inode->i_blkbits = sb->s_blocksize_bits; + inode->i_flags = 0; + atomic_set(&inode->i_count, 1); +@@ -148,6 +151,7 @@ int inode_init_always(struct super_block + inode->i_bdev = NULL; + inode->i_cdev = NULL; + inode->i_rdev = 0; ++ inode->i_mdev = 0; + inode->dirtied_when = 0; + + if (security_inode_alloc(inode)) +@@ -304,6 +308,8 @@ void __iget(struct inode *inode) + inodes_stat.nr_unused--; + } + ++EXPORT_SYMBOL_GPL(__iget); ++ + /** + * clear_inode - clear an inode + * @inode: inode to clear +@@ -1588,9 +1594,11 @@ void init_special_inode(struct inode *in + if (S_ISCHR(mode)) { + inode->i_fop = &def_chr_fops; + inode->i_rdev = rdev; ++ inode->i_mdev = rdev; + } else if (S_ISBLK(mode)) { + inode->i_fop = &def_blk_fops; + inode->i_rdev = rdev; ++ inode->i_mdev = rdev; + } else if (S_ISFIFO(mode)) + inode->i_fop = &def_fifo_fops; + else if (S_ISSOCK(mode)) +diff -NurpP --minimal linux-2.6.31.6/fs/ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/ioctl.c +--- linux-2.6.31.6/fs/ioctl.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ioctl.c 2009-09-10 17:13:08.000000000 +0200 +@@ -16,6 +16,9 @@ + #include + #include + #include ++#include ++#include ++#include + + #include + +diff -NurpP --minimal linux-2.6.31.6/fs/ioprio.c linux-2.6.31.6-vs2.3.0.36.24/fs/ioprio.c +--- linux-2.6.31.6/fs/ioprio.c 2009-03-24 14:22:26.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ioprio.c 2009-09-10 16:11:43.000000000 +0200 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + int set_task_ioprio(struct task_struct *task, int ioprio) + { +@@ -123,6 +124,8 @@ SYSCALL_DEFINE3(ioprio_set, int, which, + else + pgrp = find_vpid(who); + do_each_pid_thread(pgrp, PIDTYPE_PGID, p) { ++ if (!vx_check(p->xid, VS_ADMIN_P | VS_IDENT)) ++ continue; + ret = set_task_ioprio(p, ioprio); + if (ret) + break; +@@ -212,6 +215,8 @@ SYSCALL_DEFINE2(ioprio_get, int, which, + else + pgrp = find_vpid(who); + do_each_pid_thread(pgrp, PIDTYPE_PGID, p) { ++ if (!vx_check(p->xid, VS_ADMIN_P | VS_IDENT)) ++ continue; + tmpio = get_task_ioprio(p); + if (tmpio < 0) + continue; +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/acl.c linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/acl.c +--- linux-2.6.31.6/fs/jfs/acl.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/acl.c 2009-09-10 16:11:43.000000000 +0200 +@@ -221,7 +221,8 @@ int jfs_setattr(struct dentry *dentry, s + return rc; + + if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || +- (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { ++ (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid) || ++ (iattr->ia_valid & ATTR_TAG && iattr->ia_tag != inode->i_tag)) { + if (vfs_dq_transfer(inode, iattr)) + return -EDQUOT; + } +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/file.c linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/file.c +--- linux-2.6.31.6/fs/jfs/file.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/file.c 2009-10-07 01:05:32.000000000 +0200 +@@ -98,6 +98,7 @@ const struct inode_operations jfs_file_i + .setattr = jfs_setattr, + .permission = jfs_permission, + #endif ++ .sync_flags = jfs_sync_flags, + }; + + const struct file_operations jfs_file_operations = { +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/ioctl.c +--- linux-2.6.31.6/fs/jfs/ioctl.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/ioctl.c 2009-10-07 04:09:15.000000000 +0200 +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -52,6 +53,16 @@ static long jfs_map_ext2(unsigned long f + } + + ++int jfs_sync_flags(struct inode *inode, int flags, int vflags) ++{ ++ inode->i_flags = flags; ++ inode->i_vflags = vflags; ++ jfs_get_inode_flags(JFS_IP(inode)); ++ inode->i_ctime = CURRENT_TIME_SEC; ++ mark_inode_dirty(inode); ++ return 0; ++} ++ + long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) + { + struct inode *inode = filp->f_dentry->d_inode; +@@ -85,6 +96,11 @@ long jfs_ioctl(struct file *filp, unsign + if (!S_ISDIR(inode->i_mode)) + flags &= ~JFS_DIRSYNC_FL; + ++ if (IS_BARRIER(inode)) { ++ vxwprintk_task(1, "messing with the barrier."); ++ return -EACCES; ++ } ++ + /* Is it quota file? Do not allow user to mess with it */ + if (IS_NOQUOTA(inode)) { + err = -EPERM; +@@ -102,8 +118,8 @@ long jfs_ioctl(struct file *filp, unsign + * the relevant capability. + */ + if ((oldflags & JFS_IMMUTABLE_FL) || +- ((flags ^ oldflags) & +- (JFS_APPEND_FL | JFS_IMMUTABLE_FL))) { ++ ((flags ^ oldflags) & (JFS_APPEND_FL | ++ JFS_IMMUTABLE_FL | JFS_IXUNLINK_FL))) { + if (!capable(CAP_LINUX_IMMUTABLE)) { + mutex_unlock(&inode->i_mutex); + err = -EPERM; +@@ -111,7 +127,7 @@ long jfs_ioctl(struct file *filp, unsign + } + } + +- flags = flags & JFS_FL_USER_MODIFIABLE; ++ flags &= JFS_FL_USER_MODIFIABLE; + flags |= oldflags & ~JFS_FL_USER_MODIFIABLE; + jfs_inode->mode2 = flags; + +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/jfs_dinode.h linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_dinode.h +--- linux-2.6.31.6/fs/jfs/jfs_dinode.h 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_dinode.h 2009-09-10 16:11:43.000000000 +0200 +@@ -161,9 +161,13 @@ struct dinode { + + #define JFS_APPEND_FL 0x01000000 /* writes to file may only append */ + #define JFS_IMMUTABLE_FL 0x02000000 /* Immutable file */ ++#define JFS_IXUNLINK_FL 0x08000000 /* Immutable invert on unlink */ + +-#define JFS_FL_USER_VISIBLE 0x03F80000 +-#define JFS_FL_USER_MODIFIABLE 0x03F80000 ++#define JFS_BARRIER_FL 0x04000000 /* Barrier for chroot() */ ++#define JFS_COW_FL 0x20000000 /* Copy on Write marker */ ++ ++#define JFS_FL_USER_VISIBLE 0x07F80000 ++#define JFS_FL_USER_MODIFIABLE 0x07F80000 + #define JFS_FL_INHERIT 0x03C80000 + + /* These are identical to EXT[23]_IOC_GETFLAGS/SETFLAGS */ +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/jfs_filsys.h linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_filsys.h +--- linux-2.6.31.6/fs/jfs/jfs_filsys.h 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_filsys.h 2009-09-10 16:11:43.000000000 +0200 +@@ -263,6 +263,7 @@ + #define JFS_NAME_MAX 255 + #define JFS_PATH_MAX BPSIZE + ++#define JFS_TAGGED 0x00800000 /* Context Tagging */ + + /* + * file system state (superblock state) +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/jfs_imap.c linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_imap.c +--- linux-2.6.31.6/fs/jfs/jfs_imap.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_imap.c 2009-09-10 16:11:43.000000000 +0200 +@@ -45,6 +45,7 @@ + #include + #include + #include ++#include + + #include "jfs_incore.h" + #include "jfs_inode.h" +@@ -3059,6 +3060,8 @@ static int copy_from_dinode(struct dinod + { + struct jfs_inode_info *jfs_ip = JFS_IP(ip); + struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb); ++ uid_t uid; ++ gid_t gid; + + jfs_ip->fileset = le32_to_cpu(dip->di_fileset); + jfs_ip->mode2 = le32_to_cpu(dip->di_mode); +@@ -3079,14 +3082,18 @@ static int copy_from_dinode(struct dinod + } + ip->i_nlink = le32_to_cpu(dip->di_nlink); + +- jfs_ip->saved_uid = le32_to_cpu(dip->di_uid); ++ uid = le32_to_cpu(dip->di_uid); ++ gid = le32_to_cpu(dip->di_gid); ++ ip->i_tag = INOTAG_TAG(DX_TAG(ip), uid, gid, 0); ++ ++ jfs_ip->saved_uid = INOTAG_UID(DX_TAG(ip), uid, gid); + if (sbi->uid == -1) + ip->i_uid = jfs_ip->saved_uid; + else { + ip->i_uid = sbi->uid; + } + +- jfs_ip->saved_gid = le32_to_cpu(dip->di_gid); ++ jfs_ip->saved_gid = INOTAG_GID(DX_TAG(ip), uid, gid); + if (sbi->gid == -1) + ip->i_gid = jfs_ip->saved_gid; + else { +@@ -3151,14 +3158,12 @@ static void copy_to_dinode(struct dinode + dip->di_size = cpu_to_le64(ip->i_size); + dip->di_nblocks = cpu_to_le64(PBLK2LBLK(ip->i_sb, ip->i_blocks)); + dip->di_nlink = cpu_to_le32(ip->i_nlink); +- if (sbi->uid == -1) +- dip->di_uid = cpu_to_le32(ip->i_uid); +- else +- dip->di_uid = cpu_to_le32(jfs_ip->saved_uid); +- if (sbi->gid == -1) +- dip->di_gid = cpu_to_le32(ip->i_gid); +- else +- dip->di_gid = cpu_to_le32(jfs_ip->saved_gid); ++ ++ dip->di_uid = cpu_to_le32(TAGINO_UID(DX_TAG(ip), ++ (sbi->uid == -1) ? ip->i_uid : jfs_ip->saved_uid, ip->i_tag)); ++ dip->di_gid = cpu_to_le32(TAGINO_GID(DX_TAG(ip), ++ (sbi->gid == -1) ? ip->i_gid : jfs_ip->saved_gid, ip->i_tag)); ++ + jfs_get_inode_flags(jfs_ip); + /* + * mode2 is only needed for storing the higher order bits. +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/jfs_inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_inode.c +--- linux-2.6.31.6/fs/jfs/jfs_inode.c 2009-06-11 17:13:05.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_inode.c 2009-10-12 05:07:16.000000000 +0200 +@@ -18,6 +18,7 @@ + + #include + #include ++#include + #include "jfs_incore.h" + #include "jfs_inode.h" + #include "jfs_filsys.h" +@@ -30,29 +31,46 @@ void jfs_set_inode_flags(struct inode *i + { + unsigned int flags = JFS_IP(inode)->mode2; + +- inode->i_flags &= ~(S_IMMUTABLE | S_APPEND | +- S_NOATIME | S_DIRSYNC | S_SYNC); ++ inode->i_flags &= ~(S_IMMUTABLE | S_IXUNLINK | ++ S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC); + + if (flags & JFS_IMMUTABLE_FL) + inode->i_flags |= S_IMMUTABLE; ++ if (flags & JFS_IXUNLINK_FL) ++ inode->i_flags |= S_IXUNLINK; ++ ++ if (flags & JFS_SYNC_FL) ++ inode->i_flags |= S_SYNC; + if (flags & JFS_APPEND_FL) + inode->i_flags |= S_APPEND; + if (flags & JFS_NOATIME_FL) + inode->i_flags |= S_NOATIME; + if (flags & JFS_DIRSYNC_FL) + inode->i_flags |= S_DIRSYNC; +- if (flags & JFS_SYNC_FL) +- inode->i_flags |= S_SYNC; ++ ++ inode->i_vflags &= ~(V_BARRIER | V_COW); ++ ++ if (flags & JFS_BARRIER_FL) ++ inode->i_vflags |= V_BARRIER; ++ if (flags & JFS_COW_FL) ++ inode->i_vflags |= V_COW; + } + + void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip) + { + unsigned int flags = jfs_ip->vfs_inode.i_flags; ++ unsigned int vflags = jfs_ip->vfs_inode.i_vflags; ++ ++ jfs_ip->mode2 &= ~(JFS_IMMUTABLE_FL | JFS_IXUNLINK_FL | ++ JFS_APPEND_FL | JFS_NOATIME_FL | ++ JFS_DIRSYNC_FL | JFS_SYNC_FL | ++ JFS_BARRIER_FL | JFS_COW_FL); + +- jfs_ip->mode2 &= ~(JFS_IMMUTABLE_FL | JFS_APPEND_FL | JFS_NOATIME_FL | +- JFS_DIRSYNC_FL | JFS_SYNC_FL); + if (flags & S_IMMUTABLE) + jfs_ip->mode2 |= JFS_IMMUTABLE_FL; ++ if (flags & S_IXUNLINK) ++ jfs_ip->mode2 |= JFS_IXUNLINK_FL; ++ + if (flags & S_APPEND) + jfs_ip->mode2 |= JFS_APPEND_FL; + if (flags & S_NOATIME) +@@ -61,6 +79,11 @@ void jfs_get_inode_flags(struct jfs_inod + jfs_ip->mode2 |= JFS_DIRSYNC_FL; + if (flags & S_SYNC) + jfs_ip->mode2 |= JFS_SYNC_FL; ++ ++ if (vflags & V_BARRIER) ++ jfs_ip->mode2 |= JFS_BARRIER_FL; ++ if (vflags & V_COW) ++ jfs_ip->mode2 |= JFS_COW_FL; + } + + /* +@@ -105,6 +128,7 @@ struct inode *ialloc(struct inode *paren + mode |= S_ISGID; + } else + inode->i_gid = current_fsgid(); ++ inode->i_tag = dx_current_fstag(sb); + + /* + * New inodes need to save sane values on disk when +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/jfs_inode.h linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_inode.h +--- linux-2.6.31.6/fs/jfs/jfs_inode.h 2009-06-11 17:13:05.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/jfs_inode.h 2009-10-07 01:25:26.000000000 +0200 +@@ -39,6 +39,7 @@ extern struct dentry *jfs_fh_to_dentry(s + extern struct dentry *jfs_fh_to_parent(struct super_block *sb, struct fid *fid, + int fh_len, int fh_type); + extern void jfs_set_inode_flags(struct inode *); ++extern int jfs_sync_flags(struct inode *, int, int); + extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int); + + extern const struct address_space_operations jfs_aops; +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/namei.c linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/namei.c +--- linux-2.6.31.6/fs/jfs/namei.c 2009-06-11 17:13:05.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/namei.c 2009-10-07 01:09:16.000000000 +0200 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include "jfs_incore.h" + #include "jfs_superblock.h" + #include "jfs_inode.h" +@@ -1476,6 +1477,7 @@ static struct dentry *jfs_lookup(struct + return ERR_CAST(ip); + } + ++ dx_propagate_tag(nd, ip); + dentry = d_splice_alias(ip, dentry); + + if (dentry && (JFS_SBI(dip->i_sb)->mntflag & JFS_OS2)) +@@ -1545,6 +1547,7 @@ const struct inode_operations jfs_dir_in + .setattr = jfs_setattr, + .permission = jfs_permission, + #endif ++ .sync_flags = jfs_sync_flags, + }; + + const struct file_operations jfs_dir_operations = { +diff -NurpP --minimal linux-2.6.31.6/fs/jfs/super.c linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/super.c +--- linux-2.6.31.6/fs/jfs/super.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/jfs/super.c 2009-09-10 17:10:55.000000000 +0200 +@@ -194,7 +194,8 @@ static void jfs_put_super(struct super_b + enum { + Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize, + Opt_resize_nosize, Opt_errors, Opt_ignore, Opt_err, Opt_quota, +- Opt_usrquota, Opt_grpquota, Opt_uid, Opt_gid, Opt_umask ++ Opt_usrquota, Opt_grpquota, Opt_uid, Opt_gid, Opt_umask, ++ Opt_tag, Opt_notag, Opt_tagid + }; + + static const match_table_t tokens = { +@@ -204,6 +205,10 @@ static const match_table_t tokens = { + {Opt_resize, "resize=%u"}, + {Opt_resize_nosize, "resize"}, + {Opt_errors, "errors=%s"}, ++ {Opt_tag, "tag"}, ++ {Opt_notag, "notag"}, ++ {Opt_tagid, "tagid=%u"}, ++ {Opt_tag, "tagxid"}, + {Opt_ignore, "noquota"}, + {Opt_ignore, "quota"}, + {Opt_usrquota, "usrquota"}, +@@ -338,6 +343,20 @@ static int parse_options(char *options, + } + break; + } ++#ifndef CONFIG_TAGGING_NONE ++ case Opt_tag: ++ *flag |= JFS_TAGGED; ++ break; ++ case Opt_notag: ++ *flag &= JFS_TAGGED; ++ break; ++#endif ++#ifdef CONFIG_PROPAGATE ++ case Opt_tagid: ++ /* use args[0] */ ++ *flag |= JFS_TAGGED; ++ break; ++#endif + default: + printk("jfs: Unrecognized mount option \"%s\" " + " or missing value\n", p); +@@ -369,6 +388,12 @@ static int jfs_remount(struct super_bloc + if (!parse_options(data, sb, &newLVSize, &flag)) { + return -EINVAL; + } ++ if ((flag & JFS_TAGGED) && !(sb->s_flags & MS_TAGGED)) { ++ printk(KERN_ERR "JFS: %s: tagging not permitted on remount.\n", ++ sb->s_id); ++ return -EINVAL; ++ } ++ + lock_kernel(); + if (newLVSize) { + if (sb->s_flags & MS_RDONLY) { +@@ -452,6 +477,9 @@ static int jfs_fill_super(struct super_b + #ifdef CONFIG_JFS_POSIX_ACL + sb->s_flags |= MS_POSIXACL; + #endif ++ /* map mount option tagxid */ ++ if (sbi->flag & JFS_TAGGED) ++ sb->s_flags |= MS_TAGGED; + + if (newLVSize) { + printk(KERN_ERR "resize option for remount only\n"); +diff -NurpP --minimal linux-2.6.31.6/fs/libfs.c linux-2.6.31.6-vs2.3.0.36.24/fs/libfs.c +--- linux-2.6.31.6/fs/libfs.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/libfs.c 2009-09-10 16:11:43.000000000 +0200 +@@ -127,7 +127,8 @@ static inline unsigned char dt_type(stru + * both impossible due to the lock on directory. + */ + +-int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir) ++static inline int do_dcache_readdir_filter(struct file *filp, ++ void *dirent, filldir_t filldir, int (*filter)(struct dentry *dentry)) + { + struct dentry *dentry = filp->f_path.dentry; + struct dentry *cursor = filp->private_data; +@@ -160,6 +161,8 @@ int dcache_readdir(struct file * filp, v + next = list_entry(p, struct dentry, d_u.d_child); + if (d_unhashed(next) || !next->d_inode) + continue; ++ if (filter && !filter(next)) ++ continue; + + spin_unlock(&dcache_lock); + if (filldir(dirent, next->d_name.name, +@@ -178,6 +181,18 @@ int dcache_readdir(struct file * filp, v + return 0; + } + ++int dcache_readdir(struct file *filp, void *dirent, filldir_t filldir) ++{ ++ return do_dcache_readdir_filter(filp, dirent, filldir, NULL); ++} ++ ++int dcache_readdir_filter(struct file *filp, void *dirent, filldir_t filldir, ++ int (*filter)(struct dentry *)) ++{ ++ return do_dcache_readdir_filter(filp, dirent, filldir, filter); ++} ++ ++ + ssize_t generic_read_dir(struct file *filp, char __user *buf, size_t siz, loff_t *ppos) + { + return -EISDIR; +@@ -836,6 +851,7 @@ EXPORT_SYMBOL(dcache_dir_close); + EXPORT_SYMBOL(dcache_dir_lseek); + EXPORT_SYMBOL(dcache_dir_open); + EXPORT_SYMBOL(dcache_readdir); ++EXPORT_SYMBOL(dcache_readdir_filter); + EXPORT_SYMBOL(generic_read_dir); + EXPORT_SYMBOL(get_sb_pseudo); + EXPORT_SYMBOL(simple_write_begin); +diff -NurpP --minimal linux-2.6.31.6/fs/locks.c linux-2.6.31.6-vs2.3.0.36.24/fs/locks.c +--- linux-2.6.31.6/fs/locks.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/locks.c 2009-09-10 16:11:43.000000000 +0200 +@@ -127,6 +127,8 @@ + #include + #include + #include ++#include ++#include + + #include + +@@ -148,6 +150,8 @@ static struct kmem_cache *filelock_cache + /* Allocate an empty lock structure. */ + static struct file_lock *locks_alloc_lock(void) + { ++ if (!vx_locks_avail(1)) ++ return NULL; + return kmem_cache_alloc(filelock_cache, GFP_KERNEL); + } + +@@ -174,6 +178,7 @@ static void locks_free_lock(struct file_ + BUG_ON(!list_empty(&fl->fl_block)); + BUG_ON(!list_empty(&fl->fl_link)); + ++ vx_locks_dec(fl); + locks_release_private(fl); + kmem_cache_free(filelock_cache, fl); + } +@@ -194,6 +199,7 @@ void locks_init_lock(struct file_lock *f + fl->fl_start = fl->fl_end = 0; + fl->fl_ops = NULL; + fl->fl_lmops = NULL; ++ fl->fl_xid = -1; + } + + EXPORT_SYMBOL(locks_init_lock); +@@ -248,6 +254,7 @@ void locks_copy_lock(struct file_lock *n + new->fl_file = fl->fl_file; + new->fl_ops = fl->fl_ops; + new->fl_lmops = fl->fl_lmops; ++ new->fl_xid = fl->fl_xid; + + locks_copy_private(new, fl); + } +@@ -286,6 +293,11 @@ static int flock_make_lock(struct file * + fl->fl_flags = FL_FLOCK; + fl->fl_type = type; + fl->fl_end = OFFSET_MAX; ++ ++ vxd_assert(filp->f_xid == vx_current_xid(), ++ "f_xid(%d) == current(%d)", filp->f_xid, vx_current_xid()); ++ fl->fl_xid = filp->f_xid; ++ vx_locks_inc(fl); + + *lock = fl; + return 0; +@@ -451,6 +463,7 @@ static int lease_init(struct file *filp, + + fl->fl_owner = current->files; + fl->fl_pid = current->tgid; ++ fl->fl_xid = vx_current_xid(); + + fl->fl_file = filp; + fl->fl_flags = FL_LEASE; +@@ -470,6 +483,11 @@ static struct file_lock *lease_alloc(str + if (fl == NULL) + return ERR_PTR(error); + ++ fl->fl_xid = vx_current_xid(); ++ if (filp) ++ vxd_assert(filp->f_xid == fl->fl_xid, ++ "f_xid(%d) == fl_xid(%d)", filp->f_xid, fl->fl_xid); ++ vx_locks_inc(fl); + error = lease_init(filp, type, fl); + if (error) { + locks_free_lock(fl); +@@ -770,6 +788,7 @@ static int flock_lock_file(struct file * + if (found) + cond_resched_bkl(); + ++ new_fl->fl_xid = -1; + find_conflict: + for_each_lock(inode, before) { + struct file_lock *fl = *before; +@@ -790,6 +809,7 @@ find_conflict: + goto out; + locks_copy_lock(new_fl, request); + locks_insert_lock(before, new_fl); ++ vx_locks_inc(new_fl); + new_fl = NULL; + error = 0; + +@@ -800,7 +820,8 @@ out: + return error; + } + +-static int __posix_lock_file(struct inode *inode, struct file_lock *request, struct file_lock *conflock) ++static int __posix_lock_file(struct inode *inode, struct file_lock *request, ++ struct file_lock *conflock, xid_t xid) + { + struct file_lock *fl; + struct file_lock *new_fl = NULL; +@@ -810,6 +831,8 @@ static int __posix_lock_file(struct inod + struct file_lock **before; + int error, added = 0; + ++ vxd_assert(xid == vx_current_xid(), ++ "xid(%d) == current(%d)", xid, vx_current_xid()); + /* + * We may need two file_lock structures for this operation, + * so we get them in advance to avoid races. +@@ -820,7 +843,11 @@ static int __posix_lock_file(struct inod + (request->fl_type != F_UNLCK || + request->fl_start != 0 || request->fl_end != OFFSET_MAX)) { + new_fl = locks_alloc_lock(); ++ new_fl->fl_xid = xid; ++ vx_locks_inc(new_fl); + new_fl2 = locks_alloc_lock(); ++ new_fl2->fl_xid = xid; ++ vx_locks_inc(new_fl2); + } + + lock_kernel(); +@@ -1019,7 +1046,8 @@ static int __posix_lock_file(struct inod + int posix_lock_file(struct file *filp, struct file_lock *fl, + struct file_lock *conflock) + { +- return __posix_lock_file(filp->f_path.dentry->d_inode, fl, conflock); ++ return __posix_lock_file(filp->f_path.dentry->d_inode, ++ fl, conflock, filp->f_xid); + } + EXPORT_SYMBOL(posix_lock_file); + +@@ -1109,7 +1137,7 @@ int locks_mandatory_area(int read_write, + fl.fl_end = offset + count - 1; + + for (;;) { +- error = __posix_lock_file(inode, &fl, NULL); ++ error = __posix_lock_file(inode, &fl, NULL, filp->f_xid); + if (error != FILE_LOCK_DEFERRED) + break; + error = wait_event_interruptible(fl.fl_wait, !fl.fl_next); +@@ -1424,6 +1452,7 @@ int generic_setlease(struct file *filp, + + locks_copy_lock(new_fl, lease); + locks_insert_lock(before, new_fl); ++ vx_locks_inc(new_fl); + + *flp = new_fl; + return 0; +@@ -1779,6 +1808,11 @@ int fcntl_setlk(unsigned int fd, struct + if (file_lock == NULL) + return -ENOLCK; + ++ vxd_assert(filp->f_xid == vx_current_xid(), ++ "f_xid(%d) == current(%d)", filp->f_xid, vx_current_xid()); ++ file_lock->fl_xid = filp->f_xid; ++ vx_locks_inc(file_lock); ++ + /* + * This might block, so we do it before checking the inode. + */ +@@ -1897,6 +1931,11 @@ int fcntl_setlk64(unsigned int fd, struc + if (file_lock == NULL) + return -ENOLCK; + ++ vxd_assert(filp->f_xid == vx_current_xid(), ++ "f_xid(%d) == current(%d)", filp->f_xid, vx_current_xid()); ++ file_lock->fl_xid = filp->f_xid; ++ vx_locks_inc(file_lock); ++ + /* + * This might block, so we do it before checking the inode. + */ +@@ -2162,8 +2201,11 @@ static int locks_show(struct seq_file *f + + lock_get_status(f, fl, (long)f->private, ""); + +- list_for_each_entry(bfl, &fl->fl_block, fl_block) ++ list_for_each_entry(bfl, &fl->fl_block, fl_block) { ++ if (!vx_check(fl->fl_xid, VS_WATCH_P | VS_IDENT)) ++ continue; + lock_get_status(f, bfl, (long)f->private, " ->"); ++ } + + f->private++; + return 0; +diff -NurpP --minimal linux-2.6.31.6/fs/namei.c linux-2.6.31.6-vs2.3.0.36.24/fs/namei.c +--- linux-2.6.31.6/fs/namei.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/namei.c 2009-10-15 03:49:19.000000000 +0200 +@@ -33,6 +33,14 @@ + #include + #include + #include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + + #define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE]) +@@ -169,6 +177,77 @@ void putname(const char *name) + EXPORT_SYMBOL(putname); + #endif + ++static inline int dx_barrier(struct inode *inode) ++{ ++ if (IS_BARRIER(inode) && !vx_check(0, VS_ADMIN | VS_WATCH)) { ++ vxwprintk_task(1, "did hit the barrier."); ++ return 1; ++ } ++ return 0; ++} ++ ++static int __dx_permission(struct inode *inode, int mask) ++{ ++ if (dx_barrier(inode)) ++ return -EACCES; ++ ++ if (inode->i_sb->s_magic == DEVPTS_SUPER_MAGIC) { ++ /* devpts is xid tagged */ ++ if (S_ISDIR(inode->i_mode) || ++ vx_check((xid_t)inode->i_tag, VS_IDENT | VS_WATCH_P)) ++ return 0; ++ } ++ else if (inode->i_sb->s_magic == PROC_SUPER_MAGIC) { ++ struct proc_dir_entry *de = PDE(inode); ++ ++ if (de && !vx_hide_check(0, de->vx_flags)) ++ goto out; ++ ++ if ((mask & (MAY_WRITE | MAY_APPEND))) { ++ struct pid *pid; ++ struct task_struct *tsk; ++ ++ if (vx_check(0, VS_ADMIN | VS_WATCH_P) || ++ vx_flags(VXF_STATE_SETUP, 0)) ++ return 0; ++ ++ pid = PROC_I(inode)->pid; ++ if (!pid) ++ goto out; ++ ++ tsk = pid_task(pid, PIDTYPE_PID); ++ vxdprintk(VXD_CBIT(tag, 0), "accessing %p[#%u]", ++ tsk, (tsk ? vx_task_xid(tsk) : 0)); ++ if (tsk && vx_check(vx_task_xid(tsk), VS_IDENT | VS_WATCH_P)) ++ return 0; ++ } ++ else { ++ /* FIXME: Should we block some entries here? */ ++ return 0; ++ } ++ } ++ else { ++ if (dx_notagcheck(inode->i_sb) || ++ dx_check(inode->i_tag, DX_HOSTID | DX_ADMIN | DX_WATCH | ++ DX_IDENT)) ++ return 0; ++ } ++ ++out: ++ return -EACCES; ++} ++ ++int dx_permission(struct inode *inode, int mask) ++{ ++ int ret = __dx_permission(inode, mask); ++ if (unlikely(ret)) { ++ vxwprintk_task(1, "denied %x access to %s:%p[#%d,%lu]", ++ mask, inode->i_sb->s_id, inode, inode->i_tag, ++ inode->i_ino); ++ } ++ return ret; ++} ++ + + /** + * generic_permission - check for access rights on a Posix-like filesystem +@@ -255,10 +334,14 @@ int inode_permission(struct inode *inode + /* + * Nobody gets write access to an immutable file. + */ +- if (IS_IMMUTABLE(inode)) ++ if (IS_IMMUTABLE(inode) && !IS_COW(inode)) + return -EACCES; + } + ++ retval = dx_permission(inode, mask); ++ if (retval) ++ return retval; ++ + if (inode->i_op->permission) + retval = inode->i_op->permission(inode, mask); + else +@@ -434,6 +517,8 @@ static int exec_permission_lite(struct i + { + umode_t mode = inode->i_mode; + ++ if (dx_barrier(inode)) ++ return -EACCES; + if (inode->i_op->permission) + return -EAGAIN; + +@@ -756,7 +841,8 @@ static __always_inline void follow_dotdo + + if (nd->path.dentry == nd->root.dentry && + nd->path.mnt == nd->root.mnt) { +- break; ++ /* for sane '/' avoid follow_mount() */ ++ return; + } + spin_lock(&dcache_lock); + if (nd->path.dentry != nd->path.mnt->mnt_root) { +@@ -792,16 +878,30 @@ static int do_lookup(struct nameidata *n + { + struct vfsmount *mnt = nd->path.mnt; + struct dentry *dentry = __d_lookup(nd->path.dentry, name); ++ struct inode *inode; + + if (!dentry) + goto need_lookup; + if (dentry->d_op && dentry->d_op->d_revalidate) + goto need_revalidate; ++ inode = dentry->d_inode; ++ if (!inode) ++ goto done; ++ ++ if (__dx_permission(inode, MAY_ACCESS)) ++ goto hidden; ++ + done: + path->mnt = mnt; + path->dentry = dentry; + __follow_mount(path); + return 0; ++hidden: ++ vxwprintk_task(1, "did lookup hidden %s:%p[#%d,%lu] »%s/%.*s«.", ++ inode->i_sb->s_id, inode, inode->i_tag, inode->i_ino, ++ vxd_path(&nd->path), name->len, name->name); ++ dput(dentry); ++ return -ENOENT; + + need_lookup: + dentry = real_lookup(nd->path.dentry, name, nd); +@@ -1389,7 +1489,7 @@ static int may_delete(struct inode *dir, + if (IS_APPEND(dir)) + return -EPERM; + if (check_sticky(dir, victim->d_inode)||IS_APPEND(victim->d_inode)|| +- IS_IMMUTABLE(victim->d_inode) || IS_SWAPFILE(victim->d_inode)) ++ IS_IXORUNLINK(victim->d_inode) || IS_SWAPFILE(victim->d_inode)) + return -EPERM; + if (isdir) { + if (!S_ISDIR(victim->d_inode->i_mode)) +@@ -1529,6 +1629,14 @@ int may_open(struct path *path, int acc_ + break; + } + ++#ifdef CONFIG_VSERVER_COWBL ++ if (IS_COW(inode) && (flag & FMODE_WRITE)) { ++ if (IS_COW_LINK(inode)) ++ return -EMLINK; ++ inode->i_flags &= ~(S_IXUNLINK|S_IMMUTABLE); ++ mark_inode_dirty(inode); ++ } ++#endif + error = inode_permission(inode, acc_mode); + if (error) + return error; +@@ -1677,7 +1785,11 @@ struct file *do_filp_open(int dfd, const + int count = 0; + int will_write; + int flag = open_to_namei_flags(open_flag); +- ++#ifdef CONFIG_VSERVER_COWBL ++ int rflag = flag; ++ int rmode = mode; ++restart: ++#endif + if (!acc_mode) + acc_mode = MAY_OPEN | ACC_MODE(flag); + +@@ -1825,6 +1937,25 @@ ok: + goto exit; + } + error = may_open(&nd.path, acc_mode, flag); ++#ifdef CONFIG_VSERVER_COWBL ++ if (error == -EMLINK) { ++ struct dentry *dentry; ++ dentry = cow_break_link(pathname); ++ if (IS_ERR(dentry)) { ++ error = PTR_ERR(dentry); ++ goto exit_cow; ++ } ++ dput(dentry); ++ if (will_write) ++ mnt_drop_write(nd.path.mnt); ++ release_open_intent(&nd); ++ path_put(&nd.path); ++ flag = rflag; ++ mode = rmode; ++ goto restart; ++ } ++exit_cow: ++#endif + if (error) { + if (will_write) + mnt_drop_write(nd.path.mnt); +@@ -1987,9 +2118,17 @@ int vfs_mknod(struct inode *dir, struct + if (error) + return error; + +- if ((S_ISCHR(mode) || S_ISBLK(mode)) && !capable(CAP_MKNOD)) ++ if (!(S_ISCHR(mode) || S_ISBLK(mode))) ++ goto okay; ++ ++ if (!capable(CAP_MKNOD)) + return -EPERM; + ++ if (S_ISCHR(mode) && !vs_chrdev_perm(dev, DATTR_CREATE)) ++ return -EPERM; ++ if (S_ISBLK(mode) && !vs_blkdev_perm(dev, DATTR_CREATE)) ++ return -EPERM; ++okay: + if (!dir->i_op->mknod) + return -EPERM; + +@@ -2456,7 +2595,7 @@ int vfs_link(struct dentry *old_dentry, + /* + * A link to an append-only or immutable file cannot be created. + */ +- if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) ++ if (IS_APPEND(inode) || IS_IXORUNLINK(inode)) + return -EPERM; + if (!dir->i_op->link) + return -EPERM; +@@ -2829,6 +2968,219 @@ int vfs_follow_link(struct nameidata *nd + return __vfs_follow_link(nd, link); + } + ++ ++#ifdef CONFIG_VSERVER_COWBL ++ ++#include ++ ++static inline ++long do_cow_splice(struct file *in, struct file *out, size_t len) ++{ ++ loff_t ppos = 0; ++ ++ return do_splice_direct(in, &ppos, out, len, 0); ++} ++ ++struct dentry *cow_break_link(const char *pathname) ++{ ++ int ret, mode, pathlen, redo = 0; ++ struct nameidata old_nd, dir_nd; ++ struct path old_path, new_path; ++ struct dentry *dir, *res = NULL; ++ struct file *old_file; ++ struct file *new_file; ++ char *to, *path, pad='\251'; ++ loff_t size; ++ ++ vxdprintk(VXD_CBIT(misc, 1), "cow_break_link(»%s«)", pathname); ++ path = kmalloc(PATH_MAX, GFP_KERNEL); ++ ret = -ENOMEM; ++ if (!path) ++ goto out; ++ ++ /* old_nd will have refs to dentry and mnt */ ++ ret = path_lookup(pathname, LOOKUP_FOLLOW, &old_nd); ++ vxdprintk(VXD_CBIT(misc, 2), "path_lookup(old): %d", ret); ++ if (ret < 0) ++ goto out_free_path; ++ ++ old_path = old_nd.path; ++ mode = old_path.dentry->d_inode->i_mode; ++ ++ to = d_path(&old_path, path, PATH_MAX-2); ++ pathlen = strlen(to); ++ vxdprintk(VXD_CBIT(misc, 2), "old path »%s« [»%.*s«:%d]", to, ++ old_path.dentry->d_name.len, old_path.dentry->d_name.name, ++ old_path.dentry->d_name.len); ++ ++ to[pathlen + 1] = 0; ++retry: ++ to[pathlen] = pad--; ++ ret = -EMLINK; ++ if (pad <= '\240') ++ goto out_rel_old; ++ ++ vxdprintk(VXD_CBIT(misc, 1), "temp copy »%s«", to); ++ /* dir_nd will have refs to dentry and mnt */ ++ ret = path_lookup(to, ++ LOOKUP_PARENT | LOOKUP_OPEN | LOOKUP_CREATE, &dir_nd); ++ vxdprintk(VXD_CBIT(misc, 2), ++ "path_lookup(new): %d", ret); ++ if (ret < 0) ++ goto retry; ++ ++ /* this puppy downs the inode mutex */ ++ new_path.dentry = lookup_create(&dir_nd, 0); ++ if (!new_path.dentry || IS_ERR(new_path.dentry)) { ++ vxdprintk(VXD_CBIT(misc, 2), ++ "lookup_create(new): %p", new_path.dentry); ++ mutex_unlock(&dir_nd.path.dentry->d_inode->i_mutex); ++ path_put(&dir_nd.path); ++ goto retry; ++ } ++ vxdprintk(VXD_CBIT(misc, 2), ++ "lookup_create(new): %p [»%.*s«:%d]", new_path.dentry, ++ new_path.dentry->d_name.len, new_path.dentry->d_name.name, ++ new_path.dentry->d_name.len); ++ dir = dir_nd.path.dentry; ++ ++ ret = vfs_create(dir_nd.path.dentry->d_inode, new_path.dentry, mode, &dir_nd); ++ vxdprintk(VXD_CBIT(misc, 2), ++ "vfs_create(new): %d", ret); ++ if (ret == -EEXIST) { ++ mutex_unlock(&dir->d_inode->i_mutex); ++ dput(new_path.dentry); ++ path_put(&dir_nd.path); ++ goto retry; ++ } ++ else if (ret < 0) ++ goto out_unlock_new; ++ ++ /* drop out early, ret passes ENOENT */ ++ ret = -ENOENT; ++ if ((redo = d_unhashed(old_path.dentry))) ++ goto out_unlock_new; ++ ++ new_path.mnt = dir_nd.path.mnt; ++ dget(old_path.dentry); ++ mntget(old_path.mnt); ++ /* this one cleans up the dentry/mnt in case of failure */ ++ old_file = dentry_open(old_path.dentry, old_path.mnt, ++ O_RDONLY, current_cred()); ++ vxdprintk(VXD_CBIT(misc, 2), ++ "dentry_open(old): %p", old_file); ++ if (!old_file || IS_ERR(old_file)) { ++ res = IS_ERR(old_file) ? (void *) old_file : res; ++ goto out_unlock_new; ++ } ++ ++ dget(new_path.dentry); ++ mntget(new_path.mnt); ++ /* this one cleans up the dentry/mnt in case of failure */ ++ new_file = dentry_open(new_path.dentry, new_path.mnt, ++ O_WRONLY, current_cred()); ++ vxdprintk(VXD_CBIT(misc, 2), ++ "dentry_open(new): %p", new_file); ++ ++ ret = IS_ERR(new_file) ? PTR_ERR(new_file) : -ENOENT; ++ if (!new_file || IS_ERR(new_file)) ++ goto out_fput_old; ++ ++ size = i_size_read(old_file->f_dentry->d_inode); ++ ret = do_cow_splice(old_file, new_file, size); ++ vxdprintk(VXD_CBIT(misc, 2), "do_splice_direct: %d", ret); ++ if (ret < 0) { ++ goto out_fput_both; ++ } else if (ret < size) { ++ ret = -ENOSPC; ++ goto out_fput_both; ++ } else { ++ struct inode *old_inode = old_path.dentry->d_inode; ++ struct inode *new_inode = new_path.dentry->d_inode; ++ struct iattr attr = { ++ .ia_uid = old_inode->i_uid, ++ .ia_gid = old_inode->i_gid, ++ .ia_valid = ATTR_UID | ATTR_GID ++ }; ++ ++ ret = inode_setattr(new_inode, &attr); ++ if (ret) ++ goto out_fput_both; ++ } ++ ++ mutex_lock(&old_path.dentry->d_inode->i_sb->s_vfs_rename_mutex); ++ ++ /* drop out late */ ++ ret = -ENOENT; ++ if ((redo = d_unhashed(old_path.dentry))) ++ goto out_unlock; ++ ++ vxdprintk(VXD_CBIT(misc, 2), ++ "vfs_rename: [»%*s«:%d] -> [»%*s«:%d]", ++ new_path.dentry->d_name.len, new_path.dentry->d_name.name, ++ new_path.dentry->d_name.len, ++ old_path.dentry->d_name.len, old_path.dentry->d_name.name, ++ old_path.dentry->d_name.len); ++ ret = vfs_rename(dir_nd.path.dentry->d_inode, new_path.dentry, ++ old_nd.path.dentry->d_parent->d_inode, old_path.dentry); ++ vxdprintk(VXD_CBIT(misc, 2), "vfs_rename: %d", ret); ++ res = new_path.dentry; ++ ++out_unlock: ++ mutex_unlock(&old_path.dentry->d_inode->i_sb->s_vfs_rename_mutex); ++ ++out_fput_both: ++ vxdprintk(VXD_CBIT(misc, 3), ++ "fput(new_file=%p[#%ld])", new_file, ++ atomic_long_read(&new_file->f_count)); ++ fput(new_file); ++ ++out_fput_old: ++ vxdprintk(VXD_CBIT(misc, 3), ++ "fput(old_file=%p[#%ld])", old_file, ++ atomic_long_read(&old_file->f_count)); ++ fput(old_file); ++ ++out_unlock_new: ++ mutex_unlock(&dir->d_inode->i_mutex); ++ if (!ret) ++ goto out_redo; ++ ++ /* error path cleanup */ ++ vfs_unlink(dir->d_inode, new_path.dentry); ++ dput(new_path.dentry); ++ ++out_redo: ++ if (!redo) ++ goto out_rel_both; ++ /* lookup dentry once again */ ++ path_put(&old_nd.path); ++ ret = path_lookup(pathname, LOOKUP_FOLLOW, &old_nd); ++ if (ret) ++ goto out_rel_both; ++ ++ new_path.dentry = old_nd.path.dentry; ++ vxdprintk(VXD_CBIT(misc, 2), ++ "path_lookup(redo): %p [»%.*s«:%d]", new_path.dentry, ++ new_path.dentry->d_name.len, new_path.dentry->d_name.name, ++ new_path.dentry->d_name.len); ++ dget(new_path.dentry); ++ res = new_path.dentry; ++ ++out_rel_both: ++ path_put(&dir_nd.path); ++out_rel_old: ++ path_put(&old_nd.path); ++out_free_path: ++ kfree(path); ++out: ++ if (ret) ++ res = ERR_PTR(ret); ++ return res; ++} ++ ++#endif ++ + /* get the link contents into pagecache */ + static char *page_getlink(struct dentry * dentry, struct page **ppage) + { +diff -NurpP --minimal linux-2.6.31.6/fs/namespace.c linux-2.6.31.6-vs2.3.0.36.24/fs/namespace.c +--- linux-2.6.31.6/fs/namespace.c 2009-09-10 15:26:22.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/namespace.c 2009-09-10 16:11:43.000000000 +0200 +@@ -29,6 +29,11 @@ + #include + #include + #include ++#include ++#include ++#include ++#include ++#include + #include + #include + #include "pnode.h" +@@ -567,6 +572,7 @@ static struct vfsmount *clone_mnt(struct + mnt->mnt_root = dget(root); + mnt->mnt_mountpoint = mnt->mnt_root; + mnt->mnt_parent = mnt; ++ mnt->mnt_tag = old->mnt_tag; + + if (flag & CL_SLAVE) { + list_add(&mnt->mnt_slave, &old->mnt_slave_list); +@@ -661,6 +667,31 @@ static inline void mangle(struct seq_fil + seq_escape(m, s, " \t\n\\"); + } + ++static int mnt_is_reachable(struct vfsmount *mnt) ++{ ++ struct path root; ++ struct dentry *point; ++ int ret; ++ ++ if (mnt == mnt->mnt_ns->root) ++ return 1; ++ ++ spin_lock(&vfsmount_lock); ++ root = current->fs->root; ++ point = root.dentry; ++ ++ while ((mnt != mnt->mnt_parent) && (mnt != root.mnt)) { ++ point = mnt->mnt_mountpoint; ++ mnt = mnt->mnt_parent; ++ } ++ ++ ret = (mnt == root.mnt) && is_subdir(point, root.dentry); ++ ++ spin_unlock(&vfsmount_lock); ++ ++ return ret; ++} ++ + /* + * Simple .show_options callback for filesystems which don't want to + * implement more complex mount option showing. +@@ -748,6 +779,8 @@ static int show_sb_opts(struct seq_file + { MS_SYNCHRONOUS, ",sync" }, + { MS_DIRSYNC, ",dirsync" }, + { MS_MANDLOCK, ",mand" }, ++ { MS_TAGGED, ",tag" }, ++ { MS_NOTAGCHECK, ",notagcheck" }, + { 0, NULL } + }; + const struct proc_fs_info *fs_infop; +@@ -795,10 +828,20 @@ static int show_vfsmnt(struct seq_file * + int err = 0; + struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; + +- mangle(m, mnt->mnt_devname ? mnt->mnt_devname : "none"); +- seq_putc(m, ' '); +- seq_path(m, &mnt_path, " \t\n\\"); +- seq_putc(m, ' '); ++ if (vx_flags(VXF_HIDE_MOUNT, 0)) ++ return SEQ_SKIP; ++ if (!mnt_is_reachable(mnt) && !vx_check(0, VS_WATCH_P)) ++ return SEQ_SKIP; ++ ++ if (!vx_check(0, VS_ADMIN|VS_WATCH) && ++ mnt == current->fs->root.mnt) { ++ seq_puts(m, "/dev/root / "); ++ } else { ++ mangle(m, mnt->mnt_devname ? mnt->mnt_devname : "none"); ++ seq_putc(m, ' '); ++ seq_path(m, &mnt_path, " \t\n\\"); ++ seq_putc(m, ' '); ++ } + show_type(m, mnt->mnt_sb); + seq_puts(m, __mnt_is_readonly(mnt) ? " ro" : " rw"); + err = show_sb_opts(m, mnt->mnt_sb); +@@ -828,6 +871,11 @@ static int show_mountinfo(struct seq_fil + struct path root = p->root; + int err = 0; + ++ if (vx_flags(VXF_HIDE_MOUNT, 0)) ++ return SEQ_SKIP; ++ if (!mnt_is_reachable(mnt) && !vx_check(0, VS_WATCH_P)) ++ return SEQ_SKIP; ++ + seq_printf(m, "%i %i %u:%u ", mnt->mnt_id, mnt->mnt_parent->mnt_id, + MAJOR(sb->s_dev), MINOR(sb->s_dev)); + seq_dentry(m, mnt->mnt_root, " \t\n\\"); +@@ -886,17 +934,27 @@ static int show_vfsstat(struct seq_file + struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; + int err = 0; + +- /* device */ +- if (mnt->mnt_devname) { +- seq_puts(m, "device "); +- mangle(m, mnt->mnt_devname); +- } else +- seq_puts(m, "no device"); ++ if (vx_flags(VXF_HIDE_MOUNT, 0)) ++ return SEQ_SKIP; ++ if (!mnt_is_reachable(mnt) && !vx_check(0, VS_WATCH_P)) ++ return SEQ_SKIP; + +- /* mount point */ +- seq_puts(m, " mounted on "); +- seq_path(m, &mnt_path, " \t\n\\"); +- seq_putc(m, ' '); ++ if (!vx_check(0, VS_ADMIN|VS_WATCH) && ++ mnt == current->fs->root.mnt) { ++ seq_puts(m, "device /dev/root mounted on / "); ++ } else { ++ /* device */ ++ if (mnt->mnt_devname) { ++ seq_puts(m, "device "); ++ mangle(m, mnt->mnt_devname); ++ } else ++ seq_puts(m, "no device"); ++ ++ /* mount point */ ++ seq_puts(m, " mounted on "); ++ seq_path(m, &mnt_path, " \t\n\\"); ++ seq_putc(m, ' '); ++ } + + /* file system type */ + seq_puts(m, "with fstype "); +@@ -1130,7 +1188,7 @@ SYSCALL_DEFINE2(umount, char __user *, n + goto dput_and_out; + + retval = -EPERM; +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_SECURE_MOUNT)) + goto dput_and_out; + + retval = do_umount(path.mnt, flags); +@@ -1156,7 +1214,7 @@ SYSCALL_DEFINE1(oldumount, char __user * + + static int mount_is_safe(struct path *path) + { +- if (capable(CAP_SYS_ADMIN)) ++ if (vx_capable(CAP_SYS_ADMIN, VXC_SECURE_MOUNT)) + return 0; + return -EPERM; + #ifdef notyet +@@ -1420,7 +1478,7 @@ static int do_change_type(struct path *p + int type = flag & ~MS_REC; + int err = 0; + +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_NAMESPACE)) + return -EPERM; + + if (path->dentry != path->mnt->mnt_root) +@@ -1447,11 +1505,13 @@ static int do_change_type(struct path *p + * do loopback mount. + */ + static int do_loopback(struct path *path, char *old_name, +- int recurse) ++ tag_t tag, unsigned long flags, int mnt_flags) + { + struct path old_path; + struct vfsmount *mnt = NULL; + int err = mount_is_safe(path); ++ int recurse = flags & MS_REC; ++ + if (err) + return err; + if (!old_name || !*old_name) +@@ -1485,6 +1545,7 @@ static int do_loopback(struct path *path + spin_unlock(&vfsmount_lock); + release_mounts(&umount_list); + } ++ mnt->mnt_flags = mnt_flags; + + out: + up_write(&namespace_sem); +@@ -1515,12 +1576,12 @@ static int change_mount_flags(struct vfs + * on it - tough luck. + */ + static int do_remount(struct path *path, int flags, int mnt_flags, +- void *data) ++ void *data, xid_t xid) + { + int err; + struct super_block *sb = path->mnt->mnt_sb; + +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_SECURE_REMOUNT)) + return -EPERM; + + if (!check_mnt(path->mnt)) +@@ -1562,7 +1623,7 @@ static int do_move_mount(struct path *pa + struct path old_path, parent_path; + struct vfsmount *p; + int err = 0; +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_SECURE_MOUNT)) + return -EPERM; + if (!old_name || !*old_name) + return -EINVAL; +@@ -1644,7 +1705,7 @@ static int do_new_mount(struct path *pat + return -EINVAL; + + /* we need capabilities... */ +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_SECURE_MOUNT)) + return -EPERM; + + lock_kernel(); +@@ -1891,6 +1952,7 @@ long do_mount(char *dev_name, char *dir_ + struct path path; + int retval = 0; + int mnt_flags = 0; ++ tag_t tag = 0; + + /* Discard magic */ + if ((flags & MS_MGC_MSK) == MS_MGC_VAL) +@@ -1910,6 +1972,12 @@ long do_mount(char *dev_name, char *dir_ + if (!(flags & MS_NOATIME)) + mnt_flags |= MNT_RELATIME; + ++ if (dx_parse_tag(data_page, &tag, 1, &mnt_flags, &flags)) { ++ /* FIXME: bind and re-mounts get the tag flag? */ ++ if (flags & (MS_BIND|MS_REMOUNT)) ++ flags |= MS_TAGID; ++ } ++ + /* Separate the per-mountpoint flags */ + if (flags & MS_NOSUID) + mnt_flags |= MNT_NOSUID; +@@ -1926,6 +1994,8 @@ long do_mount(char *dev_name, char *dir_ + if (flags & MS_RDONLY) + mnt_flags |= MNT_READONLY; + ++ if (!capable(CAP_SYS_ADMIN)) ++ mnt_flags |= MNT_NODEV; + flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | + MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT | + MS_STRICTATIME); +@@ -1942,9 +2012,9 @@ long do_mount(char *dev_name, char *dir_ + + if (flags & MS_REMOUNT) + retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags, +- data_page); ++ data_page, tag); + else if (flags & MS_BIND) +- retval = do_loopback(&path, dev_name, flags & MS_REC); ++ retval = do_loopback(&path, dev_name, tag, flags, mnt_flags); + else if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE)) + retval = do_change_type(&path, flags); + else if (flags & MS_MOVE) +@@ -2023,6 +2093,7 @@ static struct mnt_namespace *dup_mnt_ns( + q = next_mnt(q, new_ns->root); + } + up_write(&namespace_sem); ++ atomic_inc(&vs_global_mnt_ns); + + if (rootmnt) + mntput(rootmnt); +@@ -2165,9 +2236,10 @@ SYSCALL_DEFINE2(pivot_root, const char _ + down_write(&namespace_sem); + mutex_lock(&old.dentry->d_inode->i_mutex); + error = -EINVAL; +- if (IS_MNT_SHARED(old.mnt) || ++ if ((IS_MNT_SHARED(old.mnt) || + IS_MNT_SHARED(new.mnt->mnt_parent) || +- IS_MNT_SHARED(root.mnt->mnt_parent)) ++ IS_MNT_SHARED(root.mnt->mnt_parent)) && ++ !vx_flags(VXF_STATE_SETUP, 0)) + goto out2; + if (!check_mnt(root.mnt)) + goto out2; +@@ -2303,6 +2375,7 @@ void put_mnt_ns(struct mnt_namespace *ns + spin_unlock(&vfsmount_lock); + up_write(&namespace_sem); + release_mounts(&umount_list); ++ atomic_dec(&vs_global_mnt_ns); + kfree(ns); + } + EXPORT_SYMBOL(put_mnt_ns); +diff -NurpP --minimal linux-2.6.31.6/fs/nfs/client.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/client.c +--- linux-2.6.31.6/fs/nfs/client.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/client.c 2009-11-12 12:26:38.000000000 +0100 +@@ -732,6 +732,9 @@ static int nfs_init_server_rpcclient(str + if (server->flags & NFS_MOUNT_SOFT) + server->client->cl_softrtry = 1; + ++ server->client->cl_tag = 0; ++ if (server->flags & NFS_MOUNT_TAGGED) ++ server->client->cl_tag = 1; + return 0; + } + +@@ -899,6 +902,10 @@ static void nfs_server_set_fsinfo(struct + server->acdirmin = server->acdirmax = 0; + } + ++ /* FIXME: needs fsinfo ++ if (server->flags & NFS_MOUNT_TAGGED) ++ sb->s_flags |= MS_TAGGED; */ ++ + server->maxfilesize = fsinfo->maxfilesize; + + /* We're airborne Set socket buffersize */ +diff -NurpP --minimal linux-2.6.31.6/fs/nfs/dir.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/dir.c +--- linux-2.6.31.6/fs/nfs/dir.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/dir.c 2009-11-12 12:26:38.000000000 +0100 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include "nfs4_fs.h" + #include "delegation.h" +@@ -949,6 +950,7 @@ static struct dentry *nfs_lookup(struct + if (IS_ERR(res)) + goto out_unblock_sillyrename; + ++ dx_propagate_tag(nd, inode); + no_entry: + res = d_materialise_unique(dentry, inode); + if (res != NULL) { +diff -NurpP --minimal linux-2.6.31.6/fs/nfs/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/inode.c +--- linux-2.6.31.6/fs/nfs/inode.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/inode.c 2009-09-10 16:11:43.000000000 +0200 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -278,6 +279,8 @@ nfs_fhget(struct super_block *sb, struct + if (inode->i_state & I_NEW) { + struct nfs_inode *nfsi = NFS_I(inode); + unsigned long now = jiffies; ++ uid_t uid; ++ gid_t gid; + + /* We set i_ino for the few things that still rely on it, + * such as stat(2) */ +@@ -321,8 +324,8 @@ nfs_fhget(struct super_block *sb, struct + nfsi->change_attr = 0; + inode->i_size = 0; + inode->i_nlink = 0; +- inode->i_uid = -2; +- inode->i_gid = -2; ++ uid = -2; ++ gid = -2; + inode->i_blocks = 0; + memset(nfsi->cookieverf, 0, sizeof(nfsi->cookieverf)); + +@@ -341,9 +344,9 @@ nfs_fhget(struct super_block *sb, struct + if (fattr->valid & NFS_ATTR_FATTR_NLINK) + inode->i_nlink = fattr->nlink; + if (fattr->valid & NFS_ATTR_FATTR_OWNER) +- inode->i_uid = fattr->uid; ++ uid = fattr->uid; + if (fattr->valid & NFS_ATTR_FATTR_GROUP) +- inode->i_gid = fattr->gid; ++ gid = fattr->gid; + if (fattr->valid & NFS_ATTR_FATTR_BLOCKS_USED) + inode->i_blocks = fattr->du.nfs2.blocks; + if (fattr->valid & NFS_ATTR_FATTR_SPACE_USED) { +@@ -352,6 +355,11 @@ nfs_fhget(struct super_block *sb, struct + */ + inode->i_blocks = nfs_calc_block_size(fattr->du.nfs3.used); + } ++ inode->i_uid = INOTAG_UID(DX_TAG(inode), uid, gid); ++ inode->i_gid = INOTAG_GID(DX_TAG(inode), uid, gid); ++ inode->i_tag = INOTAG_TAG(DX_TAG(inode), uid, gid, 0); ++ /* maybe fattr->xid someday */ ++ + nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); + nfsi->attrtimeo_timestamp = now; + nfsi->access_cache = RB_ROOT; +@@ -492,6 +500,8 @@ void nfs_setattr_update_inode(struct ino + inode->i_uid = attr->ia_uid; + if ((attr->ia_valid & ATTR_GID) != 0) + inode->i_gid = attr->ia_gid; ++ if ((attr->ia_valid & ATTR_TAG) && IS_TAGGED(inode)) ++ inode->i_tag = attr->ia_tag; + NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; + spin_unlock(&inode->i_lock); + } +@@ -902,6 +912,9 @@ static int nfs_check_inode_attributes(st + struct nfs_inode *nfsi = NFS_I(inode); + loff_t cur_size, new_isize; + unsigned long invalid = 0; ++ uid_t uid; ++ gid_t gid; ++ tag_t tag; + + + /* Has the inode gone and changed behind our back? */ +@@ -925,13 +938,18 @@ static int nfs_check_inode_attributes(st + invalid |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; + } + ++ uid = INOTAG_UID(DX_TAG(inode), fattr->uid, fattr->gid); ++ gid = INOTAG_GID(DX_TAG(inode), fattr->uid, fattr->gid); ++ tag = INOTAG_TAG(DX_TAG(inode), fattr->uid, fattr->gid, 0); ++ + /* Have any file permissions changed? */ + if ((fattr->valid & NFS_ATTR_FATTR_MODE) && (inode->i_mode & S_IALLUGO) != (fattr->mode & S_IALLUGO)) + invalid |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS | NFS_INO_INVALID_ACL; +- if ((fattr->valid & NFS_ATTR_FATTR_OWNER) && inode->i_uid != fattr->uid) ++ if ((fattr->valid & NFS_ATTR_FATTR_OWNER) && uid != fattr->uid) + invalid |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS | NFS_INO_INVALID_ACL; +- if ((fattr->valid & NFS_ATTR_FATTR_GROUP) && inode->i_gid != fattr->gid) ++ if ((fattr->valid & NFS_ATTR_FATTR_GROUP) && gid != fattr->gid) + invalid |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS | NFS_INO_INVALID_ACL; ++ /* maybe check for tag too? */ + + /* Has the link count changed? */ + if ((fattr->valid & NFS_ATTR_FATTR_NLINK) && inode->i_nlink != fattr->nlink) +@@ -1145,6 +1163,9 @@ static int nfs_update_inode(struct inode + loff_t cur_isize, new_isize; + unsigned long invalid = 0; + unsigned long now = jiffies; ++ uid_t uid; ++ gid_t gid; ++ tag_t tag; + + dfprintk(VFS, "NFS: %s(%s/%ld ct=%d info=0x%x)\n", + __func__, inode->i_sb->s_id, inode->i_ino, +@@ -1233,6 +1254,9 @@ static int nfs_update_inode(struct inode + } + } + ++ uid = INOTAG_UID(DX_TAG(inode), fattr->uid, fattr->gid); ++ gid = INOTAG_GID(DX_TAG(inode), fattr->uid, fattr->gid); ++ tag = INOTAG_TAG(DX_TAG(inode), fattr->uid, fattr->gid, 0); + + if (fattr->valid & NFS_ATTR_FATTR_ATIME) + memcpy(&inode->i_atime, &fattr->atime, sizeof(inode->i_atime)); +@@ -1244,18 +1268,22 @@ static int nfs_update_inode(struct inode + } + } + if (fattr->valid & NFS_ATTR_FATTR_OWNER) { +- if (inode->i_uid != fattr->uid) { ++ if (uid != fattr->uid) { + invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; +- inode->i_uid = fattr->uid; ++ uid = fattr->uid; + } + } + if (fattr->valid & NFS_ATTR_FATTR_GROUP) { +- if (inode->i_gid != fattr->gid) { ++ if (gid != fattr->gid) { + invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; +- inode->i_gid = fattr->gid; ++ gid = fattr->gid; + } + } + ++ inode->i_uid = uid; ++ inode->i_gid = gid; ++ inode->i_tag = tag; ++ + if (fattr->valid & NFS_ATTR_FATTR_NLINK) { + if (inode->i_nlink != fattr->nlink) { + invalid |= NFS_INO_INVALID_ATTR; +diff -NurpP --minimal linux-2.6.31.6/fs/nfs/nfs3xdr.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/nfs3xdr.c +--- linux-2.6.31.6/fs/nfs/nfs3xdr.c 2009-06-11 17:13:06.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/nfs3xdr.c 2009-09-10 16:11:43.000000000 +0200 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include "internal.h" + + #define NFSDBG_FACILITY NFSDBG_XDR +@@ -177,7 +178,7 @@ xdr_decode_fattr(__be32 *p, struct nfs_f + } + + static inline __be32 * +-xdr_encode_sattr(__be32 *p, struct iattr *attr) ++xdr_encode_sattr(__be32 *p, struct iattr *attr, int tag) + { + if (attr->ia_valid & ATTR_MODE) { + *p++ = xdr_one; +@@ -185,15 +186,17 @@ xdr_encode_sattr(__be32 *p, struct iattr + } else { + *p++ = xdr_zero; + } +- if (attr->ia_valid & ATTR_UID) { ++ if (attr->ia_valid & ATTR_UID || ++ (tag && (attr->ia_valid & ATTR_TAG))) { + *p++ = xdr_one; +- *p++ = htonl(attr->ia_uid); ++ *p++ = htonl(TAGINO_UID(tag, attr->ia_uid, attr->ia_tag)); + } else { + *p++ = xdr_zero; + } +- if (attr->ia_valid & ATTR_GID) { ++ if (attr->ia_valid & ATTR_GID || ++ (tag && (attr->ia_valid & ATTR_TAG))) { + *p++ = xdr_one; +- *p++ = htonl(attr->ia_gid); ++ *p++ = htonl(TAGINO_GID(tag, attr->ia_gid, attr->ia_tag)); + } else { + *p++ = xdr_zero; + } +@@ -280,7 +283,8 @@ static int + nfs3_xdr_sattrargs(struct rpc_rqst *req, __be32 *p, struct nfs3_sattrargs *args) + { + p = xdr_encode_fhandle(p, args->fh); +- p = xdr_encode_sattr(p, args->sattr); ++ p = xdr_encode_sattr(p, args->sattr, ++ req->rq_task->tk_client->cl_tag); + *p++ = htonl(args->guard); + if (args->guard) + p = xdr_encode_time3(p, &args->guardtime); +@@ -385,7 +389,8 @@ nfs3_xdr_createargs(struct rpc_rqst *req + *p++ = args->verifier[0]; + *p++ = args->verifier[1]; + } else +- p = xdr_encode_sattr(p, args->sattr); ++ p = xdr_encode_sattr(p, args->sattr, ++ req->rq_task->tk_client->cl_tag); + + req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); + return 0; +@@ -399,7 +404,8 @@ nfs3_xdr_mkdirargs(struct rpc_rqst *req, + { + p = xdr_encode_fhandle(p, args->fh); + p = xdr_encode_array(p, args->name, args->len); +- p = xdr_encode_sattr(p, args->sattr); ++ p = xdr_encode_sattr(p, args->sattr, ++ req->rq_task->tk_client->cl_tag); + req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); + return 0; + } +@@ -412,7 +418,8 @@ nfs3_xdr_symlinkargs(struct rpc_rqst *re + { + p = xdr_encode_fhandle(p, args->fromfh); + p = xdr_encode_array(p, args->fromname, args->fromlen); +- p = xdr_encode_sattr(p, args->sattr); ++ p = xdr_encode_sattr(p, args->sattr, ++ req->rq_task->tk_client->cl_tag); + *p++ = htonl(args->pathlen); + req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); + +@@ -430,7 +437,8 @@ nfs3_xdr_mknodargs(struct rpc_rqst *req, + p = xdr_encode_fhandle(p, args->fh); + p = xdr_encode_array(p, args->name, args->len); + *p++ = htonl(args->type); +- p = xdr_encode_sattr(p, args->sattr); ++ p = xdr_encode_sattr(p, args->sattr, ++ req->rq_task->tk_client->cl_tag); + if (args->type == NF3CHR || args->type == NF3BLK) { + *p++ = htonl(MAJOR(args->rdev)); + *p++ = htonl(MINOR(args->rdev)); +diff -NurpP --minimal linux-2.6.31.6/fs/nfs/nfsroot.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/nfsroot.c +--- linux-2.6.31.6/fs/nfs/nfsroot.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/nfsroot.c 2009-09-10 16:11:43.000000000 +0200 +@@ -122,12 +122,12 @@ static int mount_port __initdata = 0; / + enum { + /* Options that take integer arguments */ + Opt_port, Opt_rsize, Opt_wsize, Opt_timeo, Opt_retrans, Opt_acregmin, +- Opt_acregmax, Opt_acdirmin, Opt_acdirmax, ++ Opt_acregmax, Opt_acdirmin, Opt_acdirmax, Opt_tagid, + /* Options that take no arguments */ + Opt_soft, Opt_hard, Opt_intr, + Opt_nointr, Opt_posix, Opt_noposix, Opt_cto, Opt_nocto, Opt_ac, + Opt_noac, Opt_lock, Opt_nolock, Opt_v2, Opt_v3, Opt_udp, Opt_tcp, +- Opt_acl, Opt_noacl, ++ Opt_acl, Opt_noacl, Opt_tag, Opt_notag, + /* Error token */ + Opt_err + }; +@@ -164,6 +164,9 @@ static const match_table_t tokens __init + {Opt_tcp, "tcp"}, + {Opt_acl, "acl"}, + {Opt_noacl, "noacl"}, ++ {Opt_tag, "tag"}, ++ {Opt_notag, "notag"}, ++ {Opt_tagid, "tagid=%u"}, + {Opt_err, NULL} + + }; +@@ -275,6 +278,20 @@ static int __init root_nfs_parse(char *n + case Opt_noacl: + nfs_data.flags |= NFS_MOUNT_NOACL; + break; ++#ifndef CONFIG_TAGGING_NONE ++ case Opt_tag: ++ nfs_data.flags |= NFS_MOUNT_TAGGED; ++ break; ++ case Opt_notag: ++ nfs_data.flags &= ~NFS_MOUNT_TAGGED; ++ break; ++#endif ++#ifdef CONFIG_PROPAGATE ++ case Opt_tagid: ++ /* use args[0] */ ++ nfs_data.flags |= NFS_MOUNT_TAGGED; ++ break; ++#endif + default: + printk(KERN_WARNING "Root-NFS: unknown " + "option: %s\n", p); +diff -NurpP --minimal linux-2.6.31.6/fs/nfs/super.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/super.c +--- linux-2.6.31.6/fs/nfs/super.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfs/super.c 2009-11-12 12:26:38.000000000 +0100 +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -546,6 +547,7 @@ static void nfs_show_mount_options(struc + { NFS_MOUNT_NORDIRPLUS, ",nordirplus", "" }, + { NFS_MOUNT_UNSHARED, ",nosharecache", "" }, + { NFS_MOUNT_NORESVPORT, ",noresvport", "" }, ++ { NFS_MOUNT_TAGGED, ",tag", "" }, + { 0, NULL, NULL } + }; + const struct proc_nfs_info *nfs_infop; +diff -NurpP --minimal linux-2.6.31.6/fs/nfsd/auth.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfsd/auth.c +--- linux-2.6.31.6/fs/nfsd/auth.c 2009-03-24 14:22:26.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfsd/auth.c 2009-09-10 16:11:43.000000000 +0200 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include "auth.h" + + int nfsexp_flags(struct svc_rqst *rqstp, struct svc_export *exp) +@@ -42,6 +43,9 @@ int nfsd_setuser(struct svc_rqst *rqstp, + + new->fsuid = rqstp->rq_cred.cr_uid; + new->fsgid = rqstp->rq_cred.cr_gid; ++ /* FIXME: this desperately needs a tag :) ++ new->xid = (xid_t)INOTAG_TAG(DX_TAG_NFSD, cred.cr_uid, cred.cr_gid, 0); ++ */ + + rqgi = rqstp->rq_cred.cr_group_info; + +diff -NurpP --minimal linux-2.6.31.6/fs/nfsd/nfs3xdr.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfsd/nfs3xdr.c +--- linux-2.6.31.6/fs/nfsd/nfs3xdr.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfsd/nfs3xdr.c 2009-09-10 16:11:43.000000000 +0200 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include "auth.h" + + #define NFSDDBG_FACILITY NFSDDBG_XDR +@@ -108,6 +109,8 @@ static __be32 * + decode_sattr3(__be32 *p, struct iattr *iap) + { + u32 tmp; ++ uid_t uid = 0; ++ gid_t gid = 0; + + iap->ia_valid = 0; + +@@ -117,12 +120,15 @@ decode_sattr3(__be32 *p, struct iattr *i + } + if (*p++) { + iap->ia_valid |= ATTR_UID; +- iap->ia_uid = ntohl(*p++); ++ uid = ntohl(*p++); + } + if (*p++) { + iap->ia_valid |= ATTR_GID; +- iap->ia_gid = ntohl(*p++); ++ gid = ntohl(*p++); + } ++ iap->ia_uid = INOTAG_UID(DX_TAG_NFSD, uid, gid); ++ iap->ia_gid = INOTAG_GID(DX_TAG_NFSD, uid, gid); ++ iap->ia_tag = INOTAG_TAG(DX_TAG_NFSD, uid, gid, 0); + if (*p++) { + u64 newsize; + +@@ -178,8 +184,12 @@ encode_fattr3(struct svc_rqst *rqstp, __ + *p++ = htonl(nfs3_ftypes[(stat->mode & S_IFMT) >> 12]); + *p++ = htonl((u32) stat->mode); + *p++ = htonl((u32) stat->nlink); +- *p++ = htonl((u32) nfsd_ruid(rqstp, stat->uid)); +- *p++ = htonl((u32) nfsd_rgid(rqstp, stat->gid)); ++ *p++ = htonl((u32) nfsd_ruid(rqstp, ++ TAGINO_UID(0 /* FIXME: DX_TAG(dentry->d_inode) */, ++ stat->uid, stat->tag))); ++ *p++ = htonl((u32) nfsd_rgid(rqstp, ++ TAGINO_GID(0 /* FIXME: DX_TAG(dentry->d_inode) */, ++ stat->gid, stat->tag))); + if (S_ISLNK(stat->mode) && stat->size > NFS3_MAXPATHLEN) { + p = xdr_encode_hyper(p, (u64) NFS3_MAXPATHLEN); + } else { +diff -NurpP --minimal linux-2.6.31.6/fs/nfsd/nfs4xdr.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfsd/nfs4xdr.c +--- linux-2.6.31.6/fs/nfsd/nfs4xdr.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfsd/nfs4xdr.c 2009-09-10 16:11:43.000000000 +0200 +@@ -57,6 +57,7 @@ + #include + #include + #include ++#include + + #define NFSDDBG_FACILITY NFSDDBG_XDR + +@@ -2052,14 +2053,18 @@ out_acl: + WRITE32(stat.nlink); + } + if (bmval1 & FATTR4_WORD1_OWNER) { +- status = nfsd4_encode_user(rqstp, stat.uid, &p, &buflen); ++ status = nfsd4_encode_user(rqstp, ++ TAGINO_UID(DX_TAG(dentry->d_inode), ++ stat.uid, stat.tag), &p, &buflen); + if (status == nfserr_resource) + goto out_resource; + if (status) + goto out; + } + if (bmval1 & FATTR4_WORD1_OWNER_GROUP) { +- status = nfsd4_encode_group(rqstp, stat.gid, &p, &buflen); ++ status = nfsd4_encode_group(rqstp, ++ TAGINO_GID(DX_TAG(dentry->d_inode), ++ stat.gid, stat.tag), &p, &buflen); + if (status == nfserr_resource) + goto out_resource; + if (status) +diff -NurpP --minimal linux-2.6.31.6/fs/nfsd/nfsxdr.c linux-2.6.31.6-vs2.3.0.36.24/fs/nfsd/nfsxdr.c +--- linux-2.6.31.6/fs/nfsd/nfsxdr.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/nfsd/nfsxdr.c 2009-09-10 16:11:43.000000000 +0200 +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include "auth.h" + + #define NFSDDBG_FACILITY NFSDDBG_XDR +@@ -98,6 +99,8 @@ static __be32 * + decode_sattr(__be32 *p, struct iattr *iap) + { + u32 tmp, tmp1; ++ uid_t uid = 0; ++ gid_t gid = 0; + + iap->ia_valid = 0; + +@@ -111,12 +114,15 @@ decode_sattr(__be32 *p, struct iattr *ia + } + if ((tmp = ntohl(*p++)) != (u32)-1) { + iap->ia_valid |= ATTR_UID; +- iap->ia_uid = tmp; ++ uid = tmp; + } + if ((tmp = ntohl(*p++)) != (u32)-1) { + iap->ia_valid |= ATTR_GID; +- iap->ia_gid = tmp; ++ gid = tmp; + } ++ iap->ia_uid = INOTAG_UID(DX_TAG_NFSD, uid, gid); ++ iap->ia_gid = INOTAG_GID(DX_TAG_NFSD, uid, gid); ++ iap->ia_tag = INOTAG_TAG(DX_TAG_NFSD, uid, gid, 0); + if ((tmp = ntohl(*p++)) != (u32)-1) { + iap->ia_valid |= ATTR_SIZE; + iap->ia_size = tmp; +@@ -161,8 +167,10 @@ encode_fattr(struct svc_rqst *rqstp, __b + *p++ = htonl(nfs_ftypes[type >> 12]); + *p++ = htonl((u32) stat->mode); + *p++ = htonl((u32) stat->nlink); +- *p++ = htonl((u32) nfsd_ruid(rqstp, stat->uid)); +- *p++ = htonl((u32) nfsd_rgid(rqstp, stat->gid)); ++ *p++ = htonl((u32) nfsd_ruid(rqstp, ++ TAGINO_UID(DX_TAG(dentry->d_inode), stat->uid, stat->tag))); ++ *p++ = htonl((u32) nfsd_rgid(rqstp, ++ TAGINO_GID(DX_TAG(dentry->d_inode), stat->gid, stat->tag))); + + if (S_ISLNK(type) && stat->size > NFS_MAXPATHLEN) { + *p++ = htonl(NFS_MAXPATHLEN); +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/dlm/dlmfs.c linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/dlm/dlmfs.c +--- linux-2.6.31.6/fs/ocfs2/dlm/dlmfs.c 2009-03-24 14:22:27.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/dlm/dlmfs.c 2009-09-10 16:11:43.000000000 +0200 +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include + + #include + +@@ -341,6 +342,7 @@ static struct inode *dlmfs_get_root_inod + inode->i_mode = mode; + inode->i_uid = current_fsuid(); + inode->i_gid = current_fsgid(); ++ inode->i_tag = dx_current_fstag(sb); + inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; + inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; + inc_nlink(inode); +@@ -366,6 +368,7 @@ static struct inode *dlmfs_get_inode(str + inode->i_mode = mode; + inode->i_uid = current_fsuid(); + inode->i_gid = current_fsgid(); ++ inode->i_tag = dx_current_fstag(sb); + inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; + inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; + +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/dlmglue.c linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/dlmglue.c +--- linux-2.6.31.6/fs/ocfs2/dlmglue.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/dlmglue.c 2009-09-10 16:11:43.000000000 +0200 +@@ -1960,6 +1960,7 @@ static void __ocfs2_stuff_meta_lvb(struc + lvb->lvb_iclusters = cpu_to_be32(oi->ip_clusters); + lvb->lvb_iuid = cpu_to_be32(inode->i_uid); + lvb->lvb_igid = cpu_to_be32(inode->i_gid); ++ lvb->lvb_itag = cpu_to_be16(inode->i_tag); + lvb->lvb_imode = cpu_to_be16(inode->i_mode); + lvb->lvb_inlink = cpu_to_be16(inode->i_nlink); + lvb->lvb_iatime_packed = +@@ -2014,6 +2015,7 @@ static void ocfs2_refresh_inode_from_lvb + + inode->i_uid = be32_to_cpu(lvb->lvb_iuid); + inode->i_gid = be32_to_cpu(lvb->lvb_igid); ++ inode->i_tag = be16_to_cpu(lvb->lvb_itag); + inode->i_mode = be16_to_cpu(lvb->lvb_imode); + inode->i_nlink = be16_to_cpu(lvb->lvb_inlink); + ocfs2_unpack_timespec(&inode->i_atime, +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/dlmglue.h linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/dlmglue.h +--- linux-2.6.31.6/fs/ocfs2/dlmglue.h 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/dlmglue.h 2009-09-10 16:11:43.000000000 +0200 +@@ -46,7 +46,8 @@ struct ocfs2_meta_lvb { + __be16 lvb_inlink; + __be32 lvb_iattr; + __be32 lvb_igeneration; +- __be32 lvb_reserved2; ++ __be16 lvb_itag; ++ __be16 lvb_reserved2; + }; + + #define OCFS2_QINFO_LVB_VERSION 1 +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/file.c linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/file.c +--- linux-2.6.31.6/fs/ocfs2/file.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/file.c 2009-10-06 19:45:13.000000000 +0200 +@@ -914,13 +914,15 @@ int ocfs2_setattr(struct dentry *dentry, + mlog(0, "uid change: %d\n", attr->ia_uid); + if (attr->ia_valid & ATTR_GID) + mlog(0, "gid change: %d\n", attr->ia_gid); ++ if (attr->ia_valid & ATTR_TAG) ++ mlog(0, "tag change: %d\n", attr->ia_tag); + if (attr->ia_valid & ATTR_SIZE) + mlog(0, "size change...\n"); + if (attr->ia_valid & (ATTR_ATIME | ATTR_MTIME | ATTR_CTIME)) + mlog(0, "time change...\n"); + + #define OCFS2_VALID_ATTRS (ATTR_ATIME | ATTR_MTIME | ATTR_CTIME | ATTR_SIZE \ +- | ATTR_GID | ATTR_UID | ATTR_MODE) ++ | ATTR_GID | ATTR_UID | ATTR_TAG | ATTR_MODE) + if (!(attr->ia_valid & OCFS2_VALID_ATTRS)) { + mlog(0, "can't handle attrs: 0x%x\n", attr->ia_valid); + return 0; +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/inode.c +--- linux-2.6.31.6/fs/ocfs2/inode.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/inode.c 2009-10-06 19:45:13.000000000 +0200 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #include + +@@ -78,11 +79,13 @@ void ocfs2_set_inode_flags(struct inode + { + unsigned int flags = OCFS2_I(inode)->ip_attr; + +- inode->i_flags &= ~(S_IMMUTABLE | ++ inode->i_flags &= ~(S_IMMUTABLE | S_IXUNLINK | + S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC); + + if (flags & OCFS2_IMMUTABLE_FL) + inode->i_flags |= S_IMMUTABLE; ++ if (flags & OCFS2_IXUNLINK_FL) ++ inode->i_flags |= S_IXUNLINK; + + if (flags & OCFS2_SYNC_FL) + inode->i_flags |= S_SYNC; +@@ -92,25 +95,44 @@ void ocfs2_set_inode_flags(struct inode + inode->i_flags |= S_NOATIME; + if (flags & OCFS2_DIRSYNC_FL) + inode->i_flags |= S_DIRSYNC; ++ ++ inode->i_vflags &= ~(V_BARRIER | V_COW); ++ ++ if (flags & OCFS2_BARRIER_FL) ++ inode->i_vflags |= V_BARRIER; ++ if (flags & OCFS2_COW_FL) ++ inode->i_vflags |= V_COW; + } + + /* Propagate flags from i_flags to OCFS2_I(inode)->ip_attr */ + void ocfs2_get_inode_flags(struct ocfs2_inode_info *oi) + { + unsigned int flags = oi->vfs_inode.i_flags; ++ unsigned int vflags = oi->vfs_inode.i_vflags; ++ ++ oi->ip_attr &= ~(OCFS2_SYNC_FL | OCFS2_APPEND_FL | ++ OCFS2_IMMUTABLE_FL | OCFS2_IXUNLINK_FL | ++ OCFS2_NOATIME_FL | OCFS2_DIRSYNC_FL | ++ OCFS2_BARRIER_FL | OCFS2_COW_FL); ++ ++ if (flags & S_IMMUTABLE) ++ oi->ip_attr |= OCFS2_IMMUTABLE_FL; ++ if (flags & S_IXUNLINK) ++ oi->ip_attr |= OCFS2_IXUNLINK_FL; + +- oi->ip_attr &= ~(OCFS2_SYNC_FL|OCFS2_APPEND_FL| +- OCFS2_IMMUTABLE_FL|OCFS2_NOATIME_FL|OCFS2_DIRSYNC_FL); + if (flags & S_SYNC) + oi->ip_attr |= OCFS2_SYNC_FL; + if (flags & S_APPEND) + oi->ip_attr |= OCFS2_APPEND_FL; +- if (flags & S_IMMUTABLE) +- oi->ip_attr |= OCFS2_IMMUTABLE_FL; + if (flags & S_NOATIME) + oi->ip_attr |= OCFS2_NOATIME_FL; + if (flags & S_DIRSYNC) + oi->ip_attr |= OCFS2_DIRSYNC_FL; ++ ++ if (vflags & V_BARRIER) ++ oi->ip_attr |= OCFS2_BARRIER_FL; ++ if (vflags & V_COW) ++ oi->ip_attr |= OCFS2_COW_FL; + } + + struct inode *ocfs2_ilookup(struct super_block *sb, u64 blkno) +@@ -245,6 +267,8 @@ void ocfs2_populate_inode(struct inode * + struct super_block *sb; + struct ocfs2_super *osb; + int use_plocks = 1; ++ uid_t uid; ++ gid_t gid; + + mlog_entry("(0x%p, size:%llu)\n", inode, + (unsigned long long)le64_to_cpu(fe->i_size)); +@@ -276,8 +300,12 @@ void ocfs2_populate_inode(struct inode * + inode->i_generation = le32_to_cpu(fe->i_generation); + inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev)); + inode->i_mode = le16_to_cpu(fe->i_mode); +- inode->i_uid = le32_to_cpu(fe->i_uid); +- inode->i_gid = le32_to_cpu(fe->i_gid); ++ uid = le32_to_cpu(fe->i_uid); ++ gid = le32_to_cpu(fe->i_gid); ++ inode->i_uid = INOTAG_UID(DX_TAG(inode), uid, gid); ++ inode->i_gid = INOTAG_GID(DX_TAG(inode), uid, gid); ++ inode->i_tag = INOTAG_TAG(DX_TAG(inode), uid, gid, ++ /* le16_to_cpu(raw_inode->i_raw_tag)i */ 0); + + /* Fast symlinks will have i_size but no allocated clusters. */ + if (S_ISLNK(inode->i_mode) && !fe->i_clusters) +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/inode.h linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/inode.h +--- linux-2.6.31.6/fs/ocfs2/inode.h 2009-06-11 17:13:07.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/inode.h 2009-10-07 01:26:15.000000000 +0200 +@@ -152,6 +152,7 @@ struct buffer_head *ocfs2_bread(struct i + + void ocfs2_set_inode_flags(struct inode *inode); + void ocfs2_get_inode_flags(struct ocfs2_inode_info *oi); ++int ocfs2_sync_flags(struct inode *inode, int, int); + + static inline blkcnt_t ocfs2_inode_sector_count(struct inode *inode) + { +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/ioctl.c +--- linux-2.6.31.6/fs/ocfs2/ioctl.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/ioctl.c 2009-10-07 04:20:18.000000000 +0200 +@@ -41,7 +41,41 @@ static int ocfs2_get_inode_attr(struct i + return status; + } + +-static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, ++int ocfs2_sync_flags(struct inode *inode, int flags, int vflags) ++{ ++ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); ++ struct buffer_head *bh = NULL; ++ handle_t *handle = NULL; ++ int status; ++ ++ status = ocfs2_inode_lock(inode, &bh, 1); ++ if (status < 0) { ++ mlog_errno(status); ++ return status; ++ } ++ handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); ++ if (IS_ERR(handle)) { ++ status = PTR_ERR(handle); ++ mlog_errno(status); ++ goto bail_unlock; ++ } ++ ++ inode->i_flags = flags; ++ inode->i_vflags = vflags; ++ ocfs2_get_inode_flags(OCFS2_I(inode)); ++ ++ status = ocfs2_mark_inode_dirty(handle, inode, bh); ++ if (status < 0) ++ mlog_errno(status); ++ ++ ocfs2_commit_trans(osb, handle); ++bail_unlock: ++ ocfs2_inode_unlock(inode, 1); ++ brelse(bh); ++ return status; ++} ++ ++int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, + unsigned mask) + { + struct ocfs2_inode_info *ocfs2_inode = OCFS2_I(inode); +@@ -66,6 +100,11 @@ static int ocfs2_set_inode_attr(struct i + if (!S_ISDIR(inode->i_mode)) + flags &= ~OCFS2_DIRSYNC_FL; + ++ if (IS_BARRIER(inode)) { ++ vxwprintk_task(1, "messing with the barrier."); ++ goto bail_unlock; ++ } ++ + handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); + if (IS_ERR(handle)) { + status = PTR_ERR(handle); +@@ -107,6 +146,7 @@ bail: + return status; + } + ++ + long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) + { + struct inode *inode = filp->f_path.dentry->d_inode; +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/namei.c linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/namei.c +--- linux-2.6.31.6/fs/ocfs2/namei.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/namei.c 2009-10-06 19:45:13.000000000 +0200 +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + + #define MLOG_MASK_PREFIX ML_NAMEI + #include +@@ -478,6 +479,7 @@ static int ocfs2_mknod_locked(struct ocf + u64 fe_blkno = 0; + u16 suballoc_bit; + u16 feat; ++ tag_t tag; + + mlog_entry("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, + inode->i_mode, (unsigned long)dev, dentry->d_name.len, +@@ -524,8 +526,11 @@ static int ocfs2_mknod_locked(struct ocf + fe->i_blkno = cpu_to_le64(fe_blkno); + fe->i_suballoc_bit = cpu_to_le16(suballoc_bit); + fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot); +- fe->i_uid = cpu_to_le32(inode->i_uid); +- fe->i_gid = cpu_to_le32(inode->i_gid); ++ ++ tag = dx_current_fstag(osb->sb); ++ fe->i_uid = cpu_to_le32(TAGINO_UID(DX_TAG(inode), inode->i_uid, tag)); ++ fe->i_gid = cpu_to_le32(TAGINO_GID(DX_TAG(inode), inode->i_gid, tag)); ++ inode->i_tag = tag; + fe->i_mode = cpu_to_le16(inode->i_mode); + if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) + fe->id1.dev1.i_rdev = cpu_to_le64(huge_encode_dev(dev)); +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/ocfs2_fs.h linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/ocfs2_fs.h +--- linux-2.6.31.6/fs/ocfs2/ocfs2_fs.h 2009-06-11 17:13:07.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/ocfs2_fs.h 2009-09-10 16:11:43.000000000 +0200 +@@ -225,18 +225,23 @@ + #define OCFS2_INDEXED_DIR_FL (0x0008) + + /* Inode attributes, keep in sync with EXT2 */ +-#define OCFS2_SECRM_FL (0x00000001) /* Secure deletion */ +-#define OCFS2_UNRM_FL (0x00000002) /* Undelete */ +-#define OCFS2_COMPR_FL (0x00000004) /* Compress file */ +-#define OCFS2_SYNC_FL (0x00000008) /* Synchronous updates */ +-#define OCFS2_IMMUTABLE_FL (0x00000010) /* Immutable file */ +-#define OCFS2_APPEND_FL (0x00000020) /* writes to file may only append */ +-#define OCFS2_NODUMP_FL (0x00000040) /* do not dump file */ +-#define OCFS2_NOATIME_FL (0x00000080) /* do not update atime */ +-#define OCFS2_DIRSYNC_FL (0x00010000) /* dirsync behaviour (directories only) */ ++#define OCFS2_SECRM_FL FS_SECRM_FL /* Secure deletion */ ++#define OCFS2_UNRM_FL FS_UNRM_FL /* Undelete */ ++#define OCFS2_COMPR_FL FS_COMPR_FL /* Compress file */ ++#define OCFS2_SYNC_FL FS_SYNC_FL /* Synchronous updates */ ++#define OCFS2_IMMUTABLE_FL FS_IMMUTABLE_FL /* Immutable file */ ++#define OCFS2_APPEND_FL FS_APPEND_FL /* writes to file may only append */ ++#define OCFS2_NODUMP_FL FS_NODUMP_FL /* do not dump file */ ++#define OCFS2_NOATIME_FL FS_NOATIME_FL /* do not update atime */ + +-#define OCFS2_FL_VISIBLE (0x000100FF) /* User visible flags */ +-#define OCFS2_FL_MODIFIABLE (0x000100FF) /* User modifiable flags */ ++#define OCFS2_DIRSYNC_FL FS_DIRSYNC_FL /* dirsync behaviour (directories only) */ ++#define OCFS2_IXUNLINK_FL FS_IXUNLINK_FL /* Immutable invert on unlink */ ++ ++#define OCFS2_BARRIER_FL FS_BARRIER_FL /* Barrier for chroot() */ ++#define OCFS2_COW_FL FS_COW_FL /* Copy on Write marker */ ++ ++#define OCFS2_FL_VISIBLE (0x010300FF) /* User visible flags */ ++#define OCFS2_FL_MODIFIABLE (0x010300FF) /* User modifiable flags */ + + /* + * Extent record flags (e_node.leaf.flags) +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/ocfs2.h linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/ocfs2.h +--- linux-2.6.31.6/fs/ocfs2/ocfs2.h 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/ocfs2.h 2009-09-10 16:11:43.000000000 +0200 +@@ -222,6 +222,7 @@ enum ocfs2_mount_options + OCFS2_MOUNT_POSIX_ACL = 1 << 8, /* POSIX access control lists */ + OCFS2_MOUNT_USRQUOTA = 1 << 9, /* We support user quotas */ + OCFS2_MOUNT_GRPQUOTA = 1 << 10, /* We support group quotas */ ++ OCFS2_MOUNT_TAGGED = 1 << 11, /* use tagging */ + }; + + #define OCFS2_OSB_SOFT_RO 0x0001 +diff -NurpP --minimal linux-2.6.31.6/fs/ocfs2/super.c linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/super.c +--- linux-2.6.31.6/fs/ocfs2/super.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/ocfs2/super.c 2009-10-06 22:50:39.000000000 +0200 +@@ -173,6 +173,7 @@ enum { + Opt_noacl, + Opt_usrquota, + Opt_grpquota, ++ Opt_tag, Opt_notag, Opt_tagid, + Opt_err, + }; + +@@ -199,6 +200,9 @@ static const match_table_t tokens = { + {Opt_noacl, "noacl"}, + {Opt_usrquota, "usrquota"}, + {Opt_grpquota, "grpquota"}, ++ {Opt_tag, "tag"}, ++ {Opt_notag, "notag"}, ++ {Opt_tagid, "tagid=%u"}, + {Opt_err, NULL} + }; + +@@ -605,6 +609,13 @@ static int ocfs2_remount(struct super_bl + goto out; + } + ++ if ((osb->s_mount_opt & OCFS2_MOUNT_TAGGED) != ++ (parsed_options.mount_opt & OCFS2_MOUNT_TAGGED)) { ++ ret = -EINVAL; ++ mlog(ML_ERROR, "Cannot change tagging on remount\n"); ++ goto out; ++ } ++ + if ((osb->s_mount_opt & OCFS2_MOUNT_HB_LOCAL) != + (parsed_options.mount_opt & OCFS2_MOUNT_HB_LOCAL)) { + ret = -EINVAL; +@@ -1146,6 +1157,9 @@ static int ocfs2_fill_super(struct super + + ocfs2_complete_mount_recovery(osb); + ++ if (osb->s_mount_opt & OCFS2_MOUNT_TAGGED) ++ sb->s_flags |= MS_TAGGED; ++ + if (ocfs2_mount_local(osb)) + snprintf(nodestr, sizeof(nodestr), "local"); + else +@@ -1424,6 +1438,20 @@ static int ocfs2_parse_options(struct su + printk(KERN_INFO "ocfs2 (no)acl options not supported\n"); + break; + #endif ++#ifndef CONFIG_TAGGING_NONE ++ case Opt_tag: ++ mopt->mount_opt |= OCFS2_MOUNT_TAGGED; ++ break; ++ case Opt_notag: ++ mopt->mount_opt &= ~OCFS2_MOUNT_TAGGED; ++ break; ++#endif ++#ifdef CONFIG_PROPAGATE ++ case Opt_tagid: ++ /* use args[0] */ ++ mopt->mount_opt |= OCFS2_MOUNT_TAGGED; ++ break; ++#endif + default: + mlog(ML_ERROR, + "Unrecognized mount option \"%s\" " +diff -NurpP --minimal linux-2.6.31.6/fs/open.c linux-2.6.31.6-vs2.3.0.36.24/fs/open.c +--- linux-2.6.31.6/fs/open.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/open.c 2009-10-15 03:54:42.000000000 +0200 +@@ -30,22 +30,30 @@ + #include + #include + #include ++#include ++#include ++#include ++#include + + int vfs_statfs(struct dentry *dentry, struct kstatfs *buf) + { + int retval = -ENODEV; + + if (dentry) { ++ struct super_block *sb = dentry->d_sb; ++ + retval = -ENOSYS; +- if (dentry->d_sb->s_op->statfs) { ++ if (sb->s_op->statfs) { + memset(buf, 0, sizeof(*buf)); + retval = security_sb_statfs(dentry); + if (retval) + return retval; +- retval = dentry->d_sb->s_op->statfs(dentry, buf); ++ retval = sb->s_op->statfs(dentry, buf); + if (retval == 0 && buf->f_frsize == 0) + buf->f_frsize = buf->f_bsize; + } ++ if (!vx_check(0, VS_ADMIN|VS_WATCH)) ++ vx_vsi_statfs(sb, buf); + } + return retval; + } +@@ -639,6 +647,10 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, cons + error = user_path_at(dfd, filename, LOOKUP_FOLLOW, &path); + if (error) + goto out; ++ ++ error = cow_check_and_break(&path); ++ if (error) ++ goto dput_and_out; + inode = path.dentry->d_inode; + + error = mnt_want_write(path.mnt); +@@ -672,11 +684,11 @@ static int chown_common(struct dentry * + newattrs.ia_valid = ATTR_CTIME; + if (user != (uid_t) -1) { + newattrs.ia_valid |= ATTR_UID; +- newattrs.ia_uid = user; ++ newattrs.ia_uid = dx_map_uid(user); + } + if (group != (gid_t) -1) { + newattrs.ia_valid |= ATTR_GID; +- newattrs.ia_gid = group; ++ newattrs.ia_gid = dx_map_gid(group); + } + if (!S_ISDIR(inode->i_mode)) + newattrs.ia_valid |= +@@ -699,7 +711,11 @@ SYSCALL_DEFINE3(chown, const char __user + error = mnt_want_write(path.mnt); + if (error) + goto out_release; +- error = chown_common(path.dentry, user, group); ++#ifdef CONFIG_VSERVER_COWBL ++ error = cow_check_and_break(&path); ++ if (!error) ++#endif ++ error = chown_common(path.dentry, user, group); + mnt_drop_write(path.mnt); + out_release: + path_put(&path); +@@ -724,7 +740,11 @@ SYSCALL_DEFINE5(fchownat, int, dfd, cons + error = mnt_want_write(path.mnt); + if (error) + goto out_release; +- error = chown_common(path.dentry, user, group); ++#ifdef CONFIG_VSERVER_COWBL ++ error = cow_check_and_break(&path); ++ if (!error) ++#endif ++ error = chown_common(path.dentry, user, group); + mnt_drop_write(path.mnt); + out_release: + path_put(&path); +@@ -743,7 +763,11 @@ SYSCALL_DEFINE3(lchown, const char __use + error = mnt_want_write(path.mnt); + if (error) + goto out_release; +- error = chown_common(path.dentry, user, group); ++#ifdef CONFIG_VSERVER_COWBL ++ error = cow_check_and_break(&path); ++ if (!error) ++#endif ++ error = chown_common(path.dentry, user, group); + mnt_drop_write(path.mnt); + out_release: + path_put(&path); +@@ -987,6 +1011,7 @@ static void __put_unused_fd(struct files + __FD_CLR(fd, fdt->open_fds); + if (fd < files->next_fd) + files->next_fd = fd; ++ vx_openfd_dec(fd); + } + + void put_unused_fd(unsigned int fd) +diff -NurpP --minimal linux-2.6.31.6/fs/proc/array.c linux-2.6.31.6-vs2.3.0.36.24/fs/proc/array.c +--- linux-2.6.31.6/fs/proc/array.c 2009-06-11 17:13:07.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/proc/array.c 2009-09-10 16:11:43.000000000 +0200 +@@ -82,6 +82,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -138,8 +140,9 @@ static const char *task_state_array[] = + "D (disk sleep)", /* 2 */ + "T (stopped)", /* 4 */ + "T (tracing stop)", /* 8 */ +- "Z (zombie)", /* 16 */ +- "X (dead)" /* 32 */ ++ "H (on hold)", /* 16 */ ++ "Z (zombie)", /* 32 */ ++ "X (dead)", /* 64 */ + }; + + static inline const char *get_task_state(struct task_struct *tsk) +@@ -166,6 +169,9 @@ static inline void task_state(struct seq + rcu_read_lock(); + ppid = pid_alive(p) ? + task_tgid_nr_ns(rcu_dereference(p->real_parent), ns) : 0; ++ if (unlikely(vx_current_initpid(p->pid))) ++ ppid = 0; ++ + tpid = 0; + if (pid_alive(p)) { + struct task_struct *tracer = tracehook_tracer_task(p); +@@ -281,7 +287,7 @@ static inline void task_sig(struct seq_f + } + + static void render_cap_t(struct seq_file *m, const char *header, +- kernel_cap_t *a) ++ struct vx_info *vxi, kernel_cap_t *a) + { + unsigned __capi; + +@@ -306,10 +312,11 @@ static inline void task_cap(struct seq_f + cap_bset = cred->cap_bset; + rcu_read_unlock(); + +- render_cap_t(m, "CapInh:\t", &cap_inheritable); +- render_cap_t(m, "CapPrm:\t", &cap_permitted); +- render_cap_t(m, "CapEff:\t", &cap_effective); +- render_cap_t(m, "CapBnd:\t", &cap_bset); ++ /* FIXME: maybe move the p->vx_info masking to __task_cred() ? */ ++ render_cap_t(m, "CapInh:\t", p->vx_info, &cap_inheritable); ++ render_cap_t(m, "CapPrm:\t", p->vx_info, &cap_permitted); ++ render_cap_t(m, "CapEff:\t", p->vx_info, &cap_effective); ++ render_cap_t(m, "CapBnd:\t", p->vx_info, &cap_bset); + } + + static inline void task_context_switch_counts(struct seq_file *m, +@@ -321,6 +328,42 @@ static inline void task_context_switch_c + p->nivcsw); + } + ++int proc_pid_nsproxy(struct seq_file *m, struct pid_namespace *ns, ++ struct pid *pid, struct task_struct *task) ++{ ++ seq_printf(m, "Proxy:\t%p(%c)\n" ++ "Count:\t%u\n" ++ "uts:\t%p(%c)\n" ++ "ipc:\t%p(%c)\n" ++ "mnt:\t%p(%c)\n" ++ "pid:\t%p(%c)\n" ++ "net:\t%p(%c)\n", ++ task->nsproxy, ++ (task->nsproxy == init_task.nsproxy ? 'I' : '-'), ++ atomic_read(&task->nsproxy->count), ++ task->nsproxy->uts_ns, ++ (task->nsproxy->uts_ns == init_task.nsproxy->uts_ns ? 'I' : '-'), ++ task->nsproxy->ipc_ns, ++ (task->nsproxy->ipc_ns == init_task.nsproxy->ipc_ns ? 'I' : '-'), ++ task->nsproxy->mnt_ns, ++ (task->nsproxy->mnt_ns == init_task.nsproxy->mnt_ns ? 'I' : '-'), ++ task->nsproxy->pid_ns, ++ (task->nsproxy->pid_ns == init_task.nsproxy->pid_ns ? 'I' : '-'), ++ task->nsproxy->net_ns, ++ (task->nsproxy->net_ns == init_task.nsproxy->net_ns ? 'I' : '-')); ++ return 0; ++} ++ ++void task_vs_id(struct seq_file *m, struct task_struct *task) ++{ ++ if (task_vx_flags(task, VXF_HIDE_VINFO, 0)) ++ return; ++ ++ seq_printf(m, "VxID: %d\n", vx_task_xid(task)); ++ seq_printf(m, "NxID: %d\n", nx_task_nid(task)); ++} ++ ++ + int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, + struct pid *pid, struct task_struct *task) + { +@@ -336,6 +379,7 @@ int proc_pid_status(struct seq_file *m, + task_sig(m, task); + task_cap(m, task); + cpuset_task_status_allowed(m, task); ++ task_vs_id(m, task); + #if defined(CONFIG_S390) + task_show_regs(m, task); + #endif +@@ -452,6 +496,17 @@ static int do_task_stat(struct seq_file + /* convert nsec -> ticks */ + start_time = nsec_to_clock_t(start_time); + ++ /* fixup start time for virt uptime */ ++ if (vx_flags(VXF_VIRT_UPTIME, 0)) { ++ unsigned long long bias = ++ current->vx_info->cvirt.bias_clock; ++ ++ if (start_time > bias) ++ start_time -= bias; ++ else ++ start_time = 0; ++ } ++ + seq_printf(m, "%d (%s) %c %d %d %d %d %d %u %lu \ + %lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \ + %lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %lu %ld\n", +diff -NurpP --minimal linux-2.6.31.6/fs/proc/base.c linux-2.6.31.6-vs2.3.0.36.24/fs/proc/base.c +--- linux-2.6.31.6/fs/proc/base.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/proc/base.c 2009-10-03 01:56:26.000000000 +0200 +@@ -81,6 +81,8 @@ + #include + #include + #include ++#include ++#include + #include "internal.h" + + /* NOTE: +@@ -1032,10 +1034,14 @@ static ssize_t oom_adjust_write(struct f + task = get_proc_task(file->f_path.dentry->d_inode); + if (!task) + return -ESRCH; +- if (oom_adjust < task->oomkilladj && !capable(CAP_SYS_RESOURCE)) { ++ if (oom_adjust < task->oomkilladj && ++ !vx_capable(CAP_SYS_RESOURCE, VXC_OOM_ADJUST)) { + put_task_struct(task); + return -EACCES; + } ++ /* prevent guest processes from circumventing the oom killer */ ++ if (vx_current_xid() && (oom_adjust == OOM_DISABLE)) ++ oom_adjust = OOM_ADJUST_MIN; + task->oomkilladj = oom_adjust; + put_task_struct(task); + if (end - buffer == 0) +@@ -1074,7 +1080,7 @@ static ssize_t proc_loginuid_write(struc + ssize_t length; + uid_t loginuid; + +- if (!capable(CAP_AUDIT_CONTROL)) ++ if (!vx_capable(CAP_AUDIT_CONTROL, VXC_AUDIT_CONTROL)) + return -EPERM; + + if (current != pid_task(proc_pid(inode), PIDTYPE_PID)) +@@ -1441,6 +1447,8 @@ static struct inode *proc_pid_make_inode + inode->i_gid = cred->egid; + rcu_read_unlock(); + } ++ /* procfs is xid tagged */ ++ inode->i_tag = (tag_t)vx_task_xid(task); + security_task_to_inode(task, inode); + + out: +@@ -1991,6 +1999,13 @@ static struct dentry *proc_pident_lookup + if (!task) + goto out_no_task; + ++ /* TODO: maybe we can come up with a generic approach? */ ++ if (task_vx_flags(task, VXF_HIDE_VINFO, 0) && ++ (dentry->d_name.len == 5) && ++ (!memcmp(dentry->d_name.name, "vinfo", 5) || ++ !memcmp(dentry->d_name.name, "ninfo", 5))) ++ goto out; ++ + /* + * Yes, it does not scale. And it should not. Don't add + * new entries into /proc// without very good reasons. +@@ -2382,7 +2397,7 @@ out_iput: + static struct dentry *proc_base_lookup(struct inode *dir, struct dentry *dentry) + { + struct dentry *error; +- struct task_struct *task = get_proc_task(dir); ++ struct task_struct *task = get_proc_task_real(dir); + const struct pid_entry *p, *last; + + error = ERR_PTR(-ENOENT); +@@ -2472,6 +2487,9 @@ static int proc_pid_personality(struct s + static const struct file_operations proc_task_operations; + static const struct inode_operations proc_task_inode_operations; + ++extern int proc_pid_vx_info(struct task_struct *, char *); ++extern int proc_pid_nx_info(struct task_struct *, char *); ++ + static const struct pid_entry tgid_base_stuff[] = { + DIR("task", S_IRUGO|S_IXUGO, proc_task_inode_operations, proc_task_operations), + DIR("fd", S_IRUSR|S_IXUSR, proc_fd_inode_operations, proc_fd_operations), +@@ -2530,6 +2548,8 @@ static const struct pid_entry tgid_base_ + #ifdef CONFIG_CGROUPS + REG("cgroup", S_IRUGO, proc_cgroup_operations), + #endif ++ INF("vinfo", S_IRUGO, proc_pid_vx_info), ++ INF("ninfo", S_IRUGO, proc_pid_nx_info), + INF("oom_score", S_IRUGO, proc_oom_score), + REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adjust_operations), + #ifdef CONFIG_AUDITSYSCALL +@@ -2545,6 +2565,7 @@ static const struct pid_entry tgid_base_ + #ifdef CONFIG_TASK_IO_ACCOUNTING + INF("io", S_IRUGO, proc_tgid_io_accounting), + #endif ++ ONE("nsproxy", S_IRUGO, proc_pid_nsproxy), + }; + + static int proc_tgid_base_readdir(struct file * filp, +@@ -2741,7 +2762,7 @@ retry: + iter.task = NULL; + pid = find_ge_pid(iter.tgid, ns); + if (pid) { +- iter.tgid = pid_nr_ns(pid, ns); ++ iter.tgid = pid_unmapped_nr_ns(pid, ns); + iter.task = pid_task(pid, PIDTYPE_PID); + /* What we to know is if the pid we have find is the + * pid of a thread_group_leader. Testing for task +@@ -2771,7 +2792,7 @@ static int proc_pid_fill_cache(struct fi + struct tgid_iter iter) + { + char name[PROC_NUMBUF]; +- int len = snprintf(name, sizeof(name), "%d", iter.tgid); ++ int len = snprintf(name, sizeof(name), "%d", vx_map_tgid(iter.tgid)); + return proc_fill_cache(filp, dirent, filldir, name, len, + proc_pid_instantiate, iter.task, NULL); + } +@@ -2780,7 +2801,7 @@ static int proc_pid_fill_cache(struct fi + int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) + { + unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY; +- struct task_struct *reaper = get_proc_task(filp->f_path.dentry->d_inode); ++ struct task_struct *reaper = get_proc_task_real(filp->f_path.dentry->d_inode); + struct tgid_iter iter; + struct pid_namespace *ns; + +@@ -2800,6 +2821,8 @@ int proc_pid_readdir(struct file * filp, + iter.task; + iter.tgid += 1, iter = next_tgid(ns, iter)) { + filp->f_pos = iter.tgid + TGID_OFFSET; ++ if (!vx_proc_task_visible(iter.task)) ++ continue; + if (proc_pid_fill_cache(filp, dirent, filldir, iter) < 0) { + put_task_struct(iter.task); + goto out; +@@ -2946,6 +2969,8 @@ static struct dentry *proc_task_lookup(s + tid = name_to_int(dentry); + if (tid == ~0U) + goto out; ++ if (vx_current_initpid(tid)) ++ goto out; + + ns = dentry->d_sb->s_fs_info; + rcu_read_lock(); +diff -NurpP --minimal linux-2.6.31.6/fs/proc/generic.c linux-2.6.31.6-vs2.3.0.36.24/fs/proc/generic.c +--- linux-2.6.31.6/fs/proc/generic.c 2009-06-11 17:13:07.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/proc/generic.c 2009-09-10 16:11:43.000000000 +0200 +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + + #include "internal.h" +@@ -425,6 +426,8 @@ struct dentry *proc_lookup_de(struct pro + for (de = de->subdir; de ; de = de->next) { + if (de->namelen != dentry->d_name.len) + continue; ++ if (!vx_hide_check(0, de->vx_flags)) ++ continue; + if (!memcmp(dentry->d_name.name, de->name, de->namelen)) { + unsigned int ino; + +@@ -433,6 +436,8 @@ struct dentry *proc_lookup_de(struct pro + spin_unlock(&proc_subdir_lock); + error = -EINVAL; + inode = proc_get_inode(dir->i_sb, ino, de); ++ /* generic proc entries belong to the host */ ++ inode->i_tag = 0; + goto out_unlock; + } + } +@@ -510,6 +515,8 @@ int proc_readdir_de(struct proc_dir_entr + + /* filldir passes info to user space */ + de_get(de); ++ if (!vx_hide_check(0, de->vx_flags)) ++ goto skip; + spin_unlock(&proc_subdir_lock); + if (filldir(dirent, de->name, de->namelen, filp->f_pos, + de->low_ino, de->mode >> 12) < 0) { +@@ -517,6 +524,7 @@ int proc_readdir_de(struct proc_dir_entr + goto out; + } + spin_lock(&proc_subdir_lock); ++ skip: + filp->f_pos++; + next = de->next; + de_put(de); +@@ -631,6 +639,7 @@ static struct proc_dir_entry *__proc_cre + ent->nlink = nlink; + atomic_set(&ent->count, 1); + ent->pde_users = 0; ++ ent->vx_flags = IATTR_PROC_DEFAULT; + spin_lock_init(&ent->pde_unload_lock); + ent->pde_unload_completion = NULL; + INIT_LIST_HEAD(&ent->pde_openers); +@@ -654,7 +663,8 @@ struct proc_dir_entry *proc_symlink(cons + kfree(ent->data); + kfree(ent); + ent = NULL; +- } ++ } else ++ ent->vx_flags = IATTR_PROC_SYMLINK; + } else { + kfree(ent); + ent = NULL; +diff -NurpP --minimal linux-2.6.31.6/fs/proc/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/proc/inode.c +--- linux-2.6.31.6/fs/proc/inode.c 2009-06-11 17:13:07.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/proc/inode.c 2009-09-10 16:11:43.000000000 +0200 +@@ -459,6 +459,8 @@ struct inode *proc_get_inode(struct supe + inode->i_uid = de->uid; + inode->i_gid = de->gid; + } ++ if (de->vx_flags) ++ PROC_I(inode)->vx_flags = de->vx_flags; + if (de->size) + inode->i_size = de->size; + if (de->nlink) +diff -NurpP --minimal linux-2.6.31.6/fs/proc/internal.h linux-2.6.31.6-vs2.3.0.36.24/fs/proc/internal.h +--- linux-2.6.31.6/fs/proc/internal.h 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/proc/internal.h 2009-09-10 16:11:43.000000000 +0200 +@@ -10,6 +10,7 @@ + */ + + #include ++#include + + extern struct proc_dir_entry proc_root; + #ifdef CONFIG_PROC_SYSCTL +@@ -51,6 +52,9 @@ extern int proc_pid_status(struct seq_fi + struct pid *pid, struct task_struct *task); + extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns, + struct pid *pid, struct task_struct *task); ++extern int proc_pid_nsproxy(struct seq_file *m, struct pid_namespace *ns, ++ struct pid *pid, struct task_struct *task); ++ + extern loff_t mem_lseek(struct file *file, loff_t offset, int orig); + + extern const struct file_operations proc_maps_operations; +@@ -70,11 +74,16 @@ static inline struct pid *proc_pid(struc + return PROC_I(inode)->pid; + } + +-static inline struct task_struct *get_proc_task(struct inode *inode) ++static inline struct task_struct *get_proc_task_real(struct inode *inode) + { + return get_pid_task(proc_pid(inode), PIDTYPE_PID); + } + ++static inline struct task_struct *get_proc_task(struct inode *inode) ++{ ++ return vx_get_proc_task(inode, proc_pid(inode)); ++} ++ + static inline int proc_fd(struct inode *inode) + { + return PROC_I(inode)->fd; +diff -NurpP --minimal linux-2.6.31.6/fs/proc/loadavg.c linux-2.6.31.6-vs2.3.0.36.24/fs/proc/loadavg.c +--- linux-2.6.31.6/fs/proc/loadavg.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/proc/loadavg.c 2009-11-05 04:12:09.000000000 +0100 +@@ -12,15 +12,27 @@ + + static int loadavg_proc_show(struct seq_file *m, void *v) + { ++ unsigned long running; ++ unsigned int threads; + unsigned long avnrun[3]; + + get_avenrun(avnrun, FIXED_1/200, 0); + ++ if (vx_flags(VXF_VIRT_LOAD, 0)) { ++ struct vx_info *vxi = current_vx_info(); ++ ++ running = atomic_read(&vxi->cvirt.nr_running); ++ threads = atomic_read(&vxi->cvirt.nr_threads); ++ } else { ++ running = nr_running(); ++ threads = nr_threads; ++ } ++ + seq_printf(m, "%lu.%02lu %lu.%02lu %lu.%02lu %ld/%d %d\n", + LOAD_INT(avnrun[0]), LOAD_FRAC(avnrun[0]), + LOAD_INT(avnrun[1]), LOAD_FRAC(avnrun[1]), + LOAD_INT(avnrun[2]), LOAD_FRAC(avnrun[2]), +- nr_running(), nr_threads, ++ running, threads, + task_active_pid_ns(current)->last_pid); + return 0; + } +diff -NurpP --minimal linux-2.6.31.6/fs/proc/meminfo.c linux-2.6.31.6-vs2.3.0.36.24/fs/proc/meminfo.c +--- linux-2.6.31.6/fs/proc/meminfo.c 2009-09-10 15:26:23.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/proc/meminfo.c 2009-09-10 16:11:43.000000000 +0200 +@@ -41,7 +41,7 @@ static int meminfo_proc_show(struct seq_ + + cached = global_page_state(NR_FILE_PAGES) - + total_swapcache_pages - i.bufferram; +- if (cached < 0) ++ if (cached < 0 || vx_flags(VXF_VIRT_MEM, 0)) + cached = 0; + + get_vmalloc_info(&vmi); +diff -NurpP --minimal linux-2.6.31.6/fs/proc/root.c linux-2.6.31.6-vs2.3.0.36.24/fs/proc/root.c +--- linux-2.6.31.6/fs/proc/root.c 2009-06-11 17:13:07.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/proc/root.c 2009-09-10 16:11:43.000000000 +0200 +@@ -18,9 +18,14 @@ + #include + #include + #include ++#include + + #include "internal.h" + ++struct proc_dir_entry *proc_virtual; ++ ++extern void proc_vx_init(void); ++ + static int proc_test_super(struct super_block *sb, void *data) + { + return sb->s_fs_info == data; +@@ -136,6 +141,7 @@ void __init proc_root_init(void) + #endif + proc_mkdir("bus", NULL); + proc_sys_init(); ++ proc_vx_init(); + } + + static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat +@@ -203,6 +209,7 @@ struct proc_dir_entry proc_root = { + .proc_iops = &proc_root_inode_operations, + .proc_fops = &proc_root_operations, + .parent = &proc_root, ++ .vx_flags = IATTR_ADMIN | IATTR_WATCH, + }; + + int pid_ns_prepare_proc(struct pid_namespace *ns) +diff -NurpP --minimal linux-2.6.31.6/fs/proc/uptime.c linux-2.6.31.6-vs2.3.0.36.24/fs/proc/uptime.c +--- linux-2.6.31.6/fs/proc/uptime.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/proc/uptime.c 2009-10-05 23:35:52.000000000 +0200 +@@ -4,22 +4,22 @@ + #include + #include + #include +-#include ++#include + #include + + static int uptime_proc_show(struct seq_file *m, void *v) + { + struct timespec uptime; + struct timespec idle; +- int i; +- cputime_t idletime = cputime_zero; +- +- for_each_possible_cpu(i) +- idletime = cputime64_add(idletime, kstat_cpu(i).cpustat.idle); ++ cputime_t idletime = cputime_add(init_task.utime, init_task.stime); + + do_posix_clock_monotonic_gettime(&uptime); + monotonic_to_bootbased(&uptime); + cputime_to_timespec(idletime, &idle); ++ ++ if (vx_flags(VXF_VIRT_UPTIME, 0)) ++ vx_vsi_uptime(&uptime, &idle); ++ + seq_printf(m, "%lu.%02lu %lu.%02lu\n", + (unsigned long) uptime.tv_sec, + (uptime.tv_nsec / (NSEC_PER_SEC / 100)), +diff -NurpP --minimal linux-2.6.31.6/fs/quota/quota.c linux-2.6.31.6-vs2.3.0.36.24/fs/quota/quota.c +--- linux-2.6.31.6/fs/quota/quota.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/quota/quota.c 2009-09-10 16:11:43.000000000 +0200 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + /* Check validity of generic quotactl commands */ + static int generic_quotactl_valid(struct super_block *sb, int type, int cmd, +@@ -83,11 +84,11 @@ static int generic_quotactl_valid(struct + if (cmd == Q_GETQUOTA) { + if (((type == USRQUOTA && current_euid() != id) || + (type == GRPQUOTA && !in_egroup_p(id))) && +- !capable(CAP_SYS_ADMIN)) ++ !vx_capable(CAP_SYS_ADMIN, VXC_QUOTA_CTL)) + return -EPERM; + } + else if (cmd != Q_GETFMT && cmd != Q_SYNC && cmd != Q_GETINFO) +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_QUOTA_CTL)) + return -EPERM; + + return 0; +@@ -135,10 +136,10 @@ static int xqm_quotactl_valid(struct sup + if (cmd == Q_XGETQUOTA) { + if (((type == XQM_USRQUOTA && current_euid() != id) || + (type == XQM_GRPQUOTA && !in_egroup_p(id))) && +- !capable(CAP_SYS_ADMIN)) ++ !vx_capable(CAP_SYS_ADMIN, VXC_QUOTA_CTL)) + return -EPERM; + } else if (cmd != Q_XGETQSTAT && cmd != Q_XQUOTASYNC) { +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_QUOTA_CTL)) + return -EPERM; + } + +@@ -351,6 +352,46 @@ static int do_quotactl(struct super_bloc + return 0; + } + ++#if defined(CONFIG_BLK_DEV_VROOT) || defined(CONFIG_BLK_DEV_VROOT_MODULE) ++ ++#include ++#include ++#include ++#include ++#include ++ ++static vroot_grb_func *vroot_get_real_bdev = NULL; ++ ++static spinlock_t vroot_grb_lock = SPIN_LOCK_UNLOCKED; ++ ++int register_vroot_grb(vroot_grb_func *func) { ++ int ret = -EBUSY; ++ ++ spin_lock(&vroot_grb_lock); ++ if (!vroot_get_real_bdev) { ++ vroot_get_real_bdev = func; ++ ret = 0; ++ } ++ spin_unlock(&vroot_grb_lock); ++ return ret; ++} ++EXPORT_SYMBOL(register_vroot_grb); ++ ++int unregister_vroot_grb(vroot_grb_func *func) { ++ int ret = -EINVAL; ++ ++ spin_lock(&vroot_grb_lock); ++ if (vroot_get_real_bdev) { ++ vroot_get_real_bdev = NULL; ++ ret = 0; ++ } ++ spin_unlock(&vroot_grb_lock); ++ return ret; ++} ++EXPORT_SYMBOL(unregister_vroot_grb); ++ ++#endif ++ + /* + * look up a superblock on which quota ops will be performed + * - use the name of a block device to find the superblock thereon +@@ -368,6 +409,22 @@ static struct super_block *quotactl_bloc + putname(tmp); + if (IS_ERR(bdev)) + return ERR_CAST(bdev); ++#if defined(CONFIG_BLK_DEV_VROOT) || defined(CONFIG_BLK_DEV_VROOT_MODULE) ++ if (bdev && bdev->bd_inode && ++ imajor(bdev->bd_inode) == VROOT_MAJOR) { ++ struct block_device *bdnew = (void *)-EINVAL; ++ ++ if (vroot_get_real_bdev) ++ bdnew = vroot_get_real_bdev(bdev); ++ else ++ vxdprintk(VXD_CBIT(misc, 0), ++ "vroot_get_real_bdev not set"); ++ bdput(bdev); ++ if (IS_ERR(bdnew)) ++ return ERR_PTR(PTR_ERR(bdnew)); ++ bdev = bdnew; ++ } ++#endif + sb = get_super(bdev); + bdput(bdev); + if (!sb) +diff -NurpP --minimal linux-2.6.31.6/fs/reiserfs/file.c linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/file.c +--- linux-2.6.31.6/fs/reiserfs/file.c 2009-06-11 17:13:08.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/file.c 2009-10-07 01:04:14.000000000 +0200 +@@ -307,4 +307,5 @@ const struct inode_operations reiserfs_f + .listxattr = reiserfs_listxattr, + .removexattr = reiserfs_removexattr, + .permission = reiserfs_permission, ++ .sync_flags = reiserfs_sync_flags, + }; +diff -NurpP --minimal linux-2.6.31.6/fs/reiserfs/inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/inode.c +--- linux-2.6.31.6/fs/reiserfs/inode.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/inode.c 2009-10-06 19:45:13.000000000 +0200 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + int reiserfs_commit_write(struct file *f, struct page *page, + unsigned from, unsigned to); +@@ -1117,6 +1118,8 @@ static void init_inode(struct inode *ino + struct buffer_head *bh; + struct item_head *ih; + __u32 rdev; ++ uid_t uid; ++ gid_t gid; + //int version = ITEM_VERSION_1; + + bh = PATH_PLAST_BUFFER(path); +@@ -1138,12 +1141,13 @@ static void init_inode(struct inode *ino + (struct stat_data_v1 *)B_I_PITEM(bh, ih); + unsigned long blocks; + ++ uid = sd_v1_uid(sd); ++ gid = sd_v1_gid(sd); ++ + set_inode_item_key_version(inode, KEY_FORMAT_3_5); + set_inode_sd_version(inode, STAT_DATA_V1); + inode->i_mode = sd_v1_mode(sd); + inode->i_nlink = sd_v1_nlink(sd); +- inode->i_uid = sd_v1_uid(sd); +- inode->i_gid = sd_v1_gid(sd); + inode->i_size = sd_v1_size(sd); + inode->i_atime.tv_sec = sd_v1_atime(sd); + inode->i_mtime.tv_sec = sd_v1_mtime(sd); +@@ -1185,11 +1189,12 @@ static void init_inode(struct inode *ino + // (directories and symlinks) + struct stat_data *sd = (struct stat_data *)B_I_PITEM(bh, ih); + ++ uid = sd_v2_uid(sd); ++ gid = sd_v2_gid(sd); ++ + inode->i_mode = sd_v2_mode(sd); + inode->i_nlink = sd_v2_nlink(sd); +- inode->i_uid = sd_v2_uid(sd); + inode->i_size = sd_v2_size(sd); +- inode->i_gid = sd_v2_gid(sd); + inode->i_mtime.tv_sec = sd_v2_mtime(sd); + inode->i_atime.tv_sec = sd_v2_atime(sd); + inode->i_ctime.tv_sec = sd_v2_ctime(sd); +@@ -1219,6 +1224,10 @@ static void init_inode(struct inode *ino + sd_attrs_to_i_attrs(sd_v2_attrs(sd), inode); + } + ++ inode->i_uid = INOTAG_UID(DX_TAG(inode), uid, gid); ++ inode->i_gid = INOTAG_GID(DX_TAG(inode), uid, gid); ++ inode->i_tag = INOTAG_TAG(DX_TAG(inode), uid, gid, 0); ++ + pathrelse(path); + if (S_ISREG(inode->i_mode)) { + inode->i_op = &reiserfs_file_inode_operations; +@@ -1241,13 +1250,15 @@ static void init_inode(struct inode *ino + static void inode2sd(void *sd, struct inode *inode, loff_t size) + { + struct stat_data *sd_v2 = (struct stat_data *)sd; ++ uid_t uid = TAGINO_UID(DX_TAG(inode), inode->i_uid, inode->i_tag); ++ gid_t gid = TAGINO_GID(DX_TAG(inode), inode->i_gid, inode->i_tag); + __u16 flags; + ++ set_sd_v2_uid(sd_v2, uid); ++ set_sd_v2_gid(sd_v2, gid); + set_sd_v2_mode(sd_v2, inode->i_mode); + set_sd_v2_nlink(sd_v2, inode->i_nlink); +- set_sd_v2_uid(sd_v2, inode->i_uid); + set_sd_v2_size(sd_v2, size); +- set_sd_v2_gid(sd_v2, inode->i_gid); + set_sd_v2_mtime(sd_v2, inode->i_mtime.tv_sec); + set_sd_v2_atime(sd_v2, inode->i_atime.tv_sec); + set_sd_v2_ctime(sd_v2, inode->i_ctime.tv_sec); +@@ -2828,14 +2839,19 @@ int reiserfs_commit_write(struct file *f + void sd_attrs_to_i_attrs(__u16 sd_attrs, struct inode *inode) + { + if (reiserfs_attrs(inode->i_sb)) { +- if (sd_attrs & REISERFS_SYNC_FL) +- inode->i_flags |= S_SYNC; +- else +- inode->i_flags &= ~S_SYNC; + if (sd_attrs & REISERFS_IMMUTABLE_FL) + inode->i_flags |= S_IMMUTABLE; + else + inode->i_flags &= ~S_IMMUTABLE; ++ if (sd_attrs & REISERFS_IXUNLINK_FL) ++ inode->i_flags |= S_IXUNLINK; ++ else ++ inode->i_flags &= ~S_IXUNLINK; ++ ++ if (sd_attrs & REISERFS_SYNC_FL) ++ inode->i_flags |= S_SYNC; ++ else ++ inode->i_flags &= ~S_SYNC; + if (sd_attrs & REISERFS_APPEND_FL) + inode->i_flags |= S_APPEND; + else +@@ -2848,6 +2864,15 @@ void sd_attrs_to_i_attrs(__u16 sd_attrs, + REISERFS_I(inode)->i_flags |= i_nopack_mask; + else + REISERFS_I(inode)->i_flags &= ~i_nopack_mask; ++ ++ if (sd_attrs & REISERFS_BARRIER_FL) ++ inode->i_vflags |= V_BARRIER; ++ else ++ inode->i_vflags &= ~V_BARRIER; ++ if (sd_attrs & REISERFS_COW_FL) ++ inode->i_vflags |= V_COW; ++ else ++ inode->i_vflags &= ~V_COW; + } + } + +@@ -2858,6 +2883,11 @@ void i_attrs_to_sd_attrs(struct inode *i + *sd_attrs |= REISERFS_IMMUTABLE_FL; + else + *sd_attrs &= ~REISERFS_IMMUTABLE_FL; ++ if (inode->i_flags & S_IXUNLINK) ++ *sd_attrs |= REISERFS_IXUNLINK_FL; ++ else ++ *sd_attrs &= ~REISERFS_IXUNLINK_FL; ++ + if (inode->i_flags & S_SYNC) + *sd_attrs |= REISERFS_SYNC_FL; + else +@@ -2870,6 +2900,15 @@ void i_attrs_to_sd_attrs(struct inode *i + *sd_attrs |= REISERFS_NOTAIL_FL; + else + *sd_attrs &= ~REISERFS_NOTAIL_FL; ++ ++ if (inode->i_vflags & V_BARRIER) ++ *sd_attrs |= REISERFS_BARRIER_FL; ++ else ++ *sd_attrs &= ~REISERFS_BARRIER_FL; ++ if (inode->i_vflags & V_COW) ++ *sd_attrs |= REISERFS_COW_FL; ++ else ++ *sd_attrs &= ~REISERFS_COW_FL; + } + } + +@@ -3090,9 +3129,11 @@ int reiserfs_setattr(struct dentry *dent + } + + error = inode_change_ok(inode, attr); ++ + if (!error) { + if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || +- (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) { ++ (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid) || ++ (ia_valid & ATTR_TAG && attr->ia_tag != inode->i_tag)) { + error = reiserfs_chown_xattrs(inode, attr); + + if (!error) { +@@ -3122,6 +3163,9 @@ int reiserfs_setattr(struct dentry *dent + inode->i_uid = attr->ia_uid; + if (attr->ia_valid & ATTR_GID) + inode->i_gid = attr->ia_gid; ++ if ((attr->ia_valid & ATTR_TAG) && ++ IS_TAGGED(inode)) ++ inode->i_tag = attr->ia_tag; + mark_inode_dirty(inode); + error = + journal_end(&th, inode->i_sb, jbegin_count); +diff -NurpP --minimal linux-2.6.31.6/fs/reiserfs/ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/ioctl.c +--- linux-2.6.31.6/fs/reiserfs/ioctl.c 2009-06-11 17:13:08.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/ioctl.c 2009-10-12 03:53:52.000000000 +0200 +@@ -7,11 +7,27 @@ + #include + #include + #include ++#include + #include + #include + #include + #include + ++ ++int reiserfs_sync_flags(struct inode *inode, int flags, int vflags) ++{ ++ __u16 sd_attrs = 0; ++ ++ inode->i_flags = flags; ++ inode->i_vflags = vflags; ++ ++ i_attrs_to_sd_attrs(inode, &sd_attrs); ++ REISERFS_I(inode)->i_attrs = sd_attrs; ++ inode->i_ctime = CURRENT_TIME_SEC; ++ mark_inode_dirty(inode); ++ return 0; ++} ++ + /* + ** reiserfs_ioctl - handler for ioctl for inode + ** supported commands: +@@ -23,7 +39,7 @@ + int reiserfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, + unsigned long arg) + { +- unsigned int flags; ++ unsigned int flags, oldflags; + int err = 0; + + switch (cmd) { +@@ -43,6 +59,7 @@ int reiserfs_ioctl(struct inode *inode, + + flags = REISERFS_I(inode)->i_attrs; + i_attrs_to_sd_attrs(inode, (__u16 *) & flags); ++ flags &= REISERFS_FL_USER_VISIBLE; + return put_user(flags, (int __user *)arg); + case REISERFS_IOC_SETFLAGS:{ + if (!reiserfs_attrs(inode->i_sb)) +@@ -60,6 +77,10 @@ int reiserfs_ioctl(struct inode *inode, + err = -EFAULT; + goto setflags_out; + } ++ if (IS_BARRIER(inode)) { ++ vxwprintk_task(1, "messing with the barrier."); ++ return -EACCES; ++ } + /* + * Is it quota file? Do not allow user to mess with it + */ +@@ -84,6 +105,10 @@ int reiserfs_ioctl(struct inode *inode, + goto setflags_out; + } + } ++ ++ oldflags = REISERFS_I(inode)->i_attrs; ++ flags &= REISERFS_FL_USER_MODIFIABLE; ++ flags |= oldflags & ~REISERFS_FL_USER_MODIFIABLE; + sd_attrs_to_i_attrs(flags, inode); + REISERFS_I(inode)->i_attrs = flags; + inode->i_ctime = CURRENT_TIME_SEC; +diff -NurpP --minimal linux-2.6.31.6/fs/reiserfs/namei.c linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/namei.c +--- linux-2.6.31.6/fs/reiserfs/namei.c 2009-06-11 17:13:08.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/namei.c 2009-10-07 01:09:49.000000000 +0200 +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + #define INC_DIR_INODE_NLINK(i) if (i->i_nlink != 1) { inc_nlink(i); if (i->i_nlink >= REISERFS_LINK_MAX) i->i_nlink=1; } + #define DEC_DIR_INODE_NLINK(i) if (i->i_nlink != 1) drop_nlink(i); +@@ -354,6 +355,7 @@ static struct dentry *reiserfs_lookup(st + if (retval == IO_ERROR) { + return ERR_PTR(-EIO); + } ++ dx_propagate_tag(nd, inode); + + return d_splice_alias(inode, dentry); + } +@@ -570,6 +572,7 @@ static int new_inode_init(struct inode * + } else { + inode->i_gid = current_fsgid(); + } ++ inode->i_tag = dx_current_fstag(inode->i_sb); + vfs_dq_init(inode); + return 0; + } +@@ -1515,6 +1518,7 @@ const struct inode_operations reiserfs_d + .listxattr = reiserfs_listxattr, + .removexattr = reiserfs_removexattr, + .permission = reiserfs_permission, ++ .sync_flags = reiserfs_sync_flags, + }; + + /* +diff -NurpP --minimal linux-2.6.31.6/fs/reiserfs/super.c linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/super.c +--- linux-2.6.31.6/fs/reiserfs/super.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/super.c 2009-10-07 03:27:01.000000000 +0200 +@@ -884,6 +884,14 @@ static int reiserfs_parse_options(struct + {"user_xattr",.setmask = 1 << REISERFS_UNSUPPORTED_OPT}, + {"nouser_xattr",.clrmask = 1 << REISERFS_UNSUPPORTED_OPT}, + #endif ++#ifndef CONFIG_TAGGING_NONE ++ {"tagxid",.setmask = 1 << REISERFS_TAGGED}, ++ {"tag",.setmask = 1 << REISERFS_TAGGED}, ++ {"notag",.clrmask = 1 << REISERFS_TAGGED}, ++#endif ++#ifdef CONFIG_PROPAGATE ++ {"tag",.arg_required = 'T',.values = NULL}, ++#endif + #ifdef CONFIG_REISERFS_FS_POSIX_ACL + {"acl",.setmask = 1 << REISERFS_POSIXACL}, + {"noacl",.clrmask = 1 << REISERFS_POSIXACL}, +@@ -1190,6 +1198,14 @@ static int reiserfs_remount(struct super + handle_quota_files(s, qf_names, &qfmt); + #endif + ++ if ((mount_options & (1 << REISERFS_TAGGED)) && ++ !(s->s_flags & MS_TAGGED)) { ++ reiserfs_warning(s, "super-vs01", ++ "reiserfs: tagging not permitted on remount."); ++ err = -EINVAL; ++ goto out_err; ++ } ++ + handle_attrs(s); + + /* Add options that are safe here */ +@@ -1652,6 +1668,10 @@ static int reiserfs_fill_super(struct su + goto error; + } + ++ /* map mount option tagxid */ ++ if (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_TAGGED)) ++ s->s_flags |= MS_TAGGED; ++ + rs = SB_DISK_SUPER_BLOCK(s); + /* Let's do basic sanity check to verify that underlying device is not + smaller than the filesystem. If the check fails then abort and scream, +diff -NurpP --minimal linux-2.6.31.6/fs/reiserfs/xattr.c linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/xattr.c +--- linux-2.6.31.6/fs/reiserfs/xattr.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/reiserfs/xattr.c 2009-09-10 16:11:43.000000000 +0200 +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff -NurpP --minimal linux-2.6.31.6/fs/stat.c linux-2.6.31.6-vs2.3.0.36.24/fs/stat.c +--- linux-2.6.31.6/fs/stat.c 2009-06-11 17:13:08.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/stat.c 2009-09-10 16:11:43.000000000 +0200 +@@ -26,6 +26,7 @@ void generic_fillattr(struct inode *inod + stat->nlink = inode->i_nlink; + stat->uid = inode->i_uid; + stat->gid = inode->i_gid; ++ stat->tag = inode->i_tag; + stat->rdev = inode->i_rdev; + stat->atime = inode->i_atime; + stat->mtime = inode->i_mtime; +diff -NurpP --minimal linux-2.6.31.6/fs/super.c linux-2.6.31.6-vs2.3.0.36.24/fs/super.c +--- linux-2.6.31.6/fs/super.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/super.c 2009-09-10 17:00:57.000000000 +0200 +@@ -37,6 +37,9 @@ + #include + #include + #include ++#include ++#include ++#include + #include + #include "internal.h" + +@@ -859,12 +862,18 @@ struct vfsmount * + vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void *data) + { + struct vfsmount *mnt; ++ struct super_block *sb; + char *secdata = NULL; + int error; + + if (!type) + return ERR_PTR(-ENODEV); + ++ error = -EPERM; ++ if ((type->fs_flags & FS_BINARY_MOUNTDATA) && ++ !vx_capable(CAP_SYS_ADMIN, VXC_BINARY_MOUNT)) ++ goto out; ++ + error = -ENOMEM; + mnt = alloc_vfsmnt(name); + if (!mnt) +@@ -883,9 +892,17 @@ vfs_kern_mount(struct file_system_type * + error = type->get_sb(type, flags, name, data, mnt); + if (error < 0) + goto out_free_secdata; +- BUG_ON(!mnt->mnt_sb); + +- error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata); ++ sb = mnt->mnt_sb; ++ BUG_ON(!sb); ++ ++ error = -EPERM; ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_BINARY_MOUNT) && !sb->s_bdev && ++ (sb->s_magic != PROC_SUPER_MAGIC) && ++ (sb->s_magic != DEVPTS_SUPER_MAGIC)) ++ goto out_sb; ++ ++ error = security_sb_kern_mount(sb, flags, secdata); + if (error) + goto out_sb; + +diff -NurpP --minimal linux-2.6.31.6/fs/sysfs/mount.c linux-2.6.31.6-vs2.3.0.36.24/fs/sysfs/mount.c +--- linux-2.6.31.6/fs/sysfs/mount.c 2009-06-11 17:13:08.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/sysfs/mount.c 2009-09-10 16:11:43.000000000 +0200 +@@ -47,7 +47,7 @@ static int sysfs_fill_super(struct super + + sb->s_blocksize = PAGE_CACHE_SIZE; + sb->s_blocksize_bits = PAGE_CACHE_SHIFT; +- sb->s_magic = SYSFS_MAGIC; ++ sb->s_magic = SYSFS_SUPER_MAGIC; + sb->s_op = &sysfs_ops; + sb->s_time_gran = 1; + sysfs_sb = sb; +diff -NurpP --minimal linux-2.6.31.6/fs/utimes.c linux-2.6.31.6-vs2.3.0.36.24/fs/utimes.c +--- linux-2.6.31.6/fs/utimes.c 2009-03-24 14:22:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/utimes.c 2009-09-10 16:11:43.000000000 +0200 +@@ -8,6 +8,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + +diff -NurpP --minimal linux-2.6.31.6/fs/xattr.c linux-2.6.31.6-vs2.3.0.36.24/fs/xattr.c +--- linux-2.6.31.6/fs/xattr.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xattr.c 2009-09-10 16:11:43.000000000 +0200 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + + +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_ioctl.c +--- linux-2.6.31.6/fs/xfs/linux-2.6/xfs_ioctl.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_ioctl.c 2009-10-07 15:57:55.000000000 +0200 +@@ -34,7 +34,6 @@ + #include "xfs_dir2_sf.h" + #include "xfs_dinode.h" + #include "xfs_inode.h" +-#include "xfs_ioctl.h" + #include "xfs_btree.h" + #include "xfs_ialloc.h" + #include "xfs_rtalloc.h" +@@ -742,6 +741,10 @@ xfs_merge_ioc_xflags( + xflags |= XFS_XFLAG_IMMUTABLE; + else + xflags &= ~XFS_XFLAG_IMMUTABLE; ++ if (flags & FS_IXUNLINK_FL) ++ xflags |= XFS_XFLAG_IXUNLINK; ++ else ++ xflags &= ~XFS_XFLAG_IXUNLINK; + if (flags & FS_APPEND_FL) + xflags |= XFS_XFLAG_APPEND; + else +@@ -770,6 +773,8 @@ xfs_di2lxflags( + + if (di_flags & XFS_DIFLAG_IMMUTABLE) + flags |= FS_IMMUTABLE_FL; ++ if (di_flags & XFS_DIFLAG_IXUNLINK) ++ flags |= FS_IXUNLINK_FL; + if (di_flags & XFS_DIFLAG_APPEND) + flags |= FS_APPEND_FL; + if (di_flags & XFS_DIFLAG_SYNC) +@@ -828,6 +833,8 @@ xfs_set_diflags( + di_flags = (ip->i_d.di_flags & XFS_DIFLAG_PREALLOC); + if (xflags & XFS_XFLAG_IMMUTABLE) + di_flags |= XFS_DIFLAG_IMMUTABLE; ++ if (xflags & XFS_XFLAG_IXUNLINK) ++ di_flags |= XFS_DIFLAG_IXUNLINK; + if (xflags & XFS_XFLAG_APPEND) + di_flags |= XFS_DIFLAG_APPEND; + if (xflags & XFS_XFLAG_SYNC) +@@ -870,6 +877,10 @@ xfs_diflags_to_linux( + inode->i_flags |= S_IMMUTABLE; + else + inode->i_flags &= ~S_IMMUTABLE; ++ if (xflags & XFS_XFLAG_IXUNLINK) ++ inode->i_flags |= S_IXUNLINK; ++ else ++ inode->i_flags &= ~S_IXUNLINK; + if (xflags & XFS_XFLAG_APPEND) + inode->i_flags |= S_APPEND; + else +@@ -1346,10 +1357,18 @@ xfs_file_ioctl( + case XFS_IOC_FSGETXATTRA: + return xfs_ioc_fsgetxattr(ip, 1, arg); + case XFS_IOC_FSSETXATTR: ++ if (IS_BARRIER(inode)) { ++ vxwprintk_task(1, "messing with the barrier."); ++ return -XFS_ERROR(EACCES); ++ } + return xfs_ioc_fssetxattr(ip, filp, arg); + case XFS_IOC_GETXFLAGS: + return xfs_ioc_getxflags(ip, arg); + case XFS_IOC_SETXFLAGS: ++ if (IS_BARRIER(inode)) { ++ vxwprintk_task(1, "messing with the barrier."); ++ return -XFS_ERROR(EACCES); ++ } + return xfs_ioc_setxflags(ip, filp, arg); + + case XFS_IOC_FSSETDM: { +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/linux-2.6/xfs_ioctl.h linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_ioctl.h +--- linux-2.6.31.6/fs/xfs/linux-2.6/xfs_ioctl.h 2009-03-24 14:22:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_ioctl.h 2009-10-07 15:59:45.000000000 +0200 +@@ -70,6 +70,12 @@ xfs_handle_to_dentry( + void __user *uhandle, + u32 hlen); + ++extern int ++xfs_sync_flags( ++ struct inode *inode, ++ int flags, ++ int vflags); ++ + extern long + xfs_file_ioctl( + struct file *filp, +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_iops.c +--- linux-2.6.31.6/fs/xfs/linux-2.6/xfs_iops.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_iops.c 2009-10-07 05:23:00.000000000 +0200 +@@ -36,6 +36,7 @@ + #include "xfs_attr_sf.h" + #include "xfs_dinode.h" + #include "xfs_inode.h" ++#include "xfs_ioctl.h" + #include "xfs_bmap.h" + #include "xfs_btree.h" + #include "xfs_ialloc.h" +@@ -56,6 +57,7 @@ + #include + #include + #include ++#include + + /* + * Bring the atime in the XFS inode uptodate. +@@ -513,6 +515,7 @@ xfs_vn_getattr( + stat->nlink = ip->i_d.di_nlink; + stat->uid = ip->i_d.di_uid; + stat->gid = ip->i_d.di_gid; ++ stat->tag = ip->i_d.di_tag; + stat->ino = ip->i_ino; + stat->atime = inode->i_atime; + stat->mtime.tv_sec = ip->i_d.di_mtime.t_sec; +@@ -706,6 +709,7 @@ static const struct inode_operations xfs + .listxattr = xfs_vn_listxattr, + .fallocate = xfs_vn_fallocate, + .fiemap = xfs_vn_fiemap, ++ .sync_flags = xfs_sync_flags, + }; + + static const struct inode_operations xfs_dir_inode_operations = { +@@ -731,6 +735,7 @@ static const struct inode_operations xfs + .getxattr = generic_getxattr, + .removexattr = generic_removexattr, + .listxattr = xfs_vn_listxattr, ++ .sync_flags = xfs_sync_flags, + }; + + static const struct inode_operations xfs_dir_ci_inode_operations = { +@@ -780,6 +785,10 @@ xfs_diflags_to_iflags( + inode->i_flags |= S_IMMUTABLE; + else + inode->i_flags &= ~S_IMMUTABLE; ++ if (ip->i_d.di_flags & XFS_DIFLAG_IXUNLINK) ++ inode->i_flags |= S_IXUNLINK; ++ else ++ inode->i_flags &= ~S_IXUNLINK; + if (ip->i_d.di_flags & XFS_DIFLAG_APPEND) + inode->i_flags |= S_APPEND; + else +@@ -792,6 +801,15 @@ xfs_diflags_to_iflags( + inode->i_flags |= S_NOATIME; + else + inode->i_flags &= ~S_NOATIME; ++ ++ if (ip->i_d.di_vflags & XFS_DIVFLAG_BARRIER) ++ inode->i_vflags |= V_BARRIER; ++ else ++ inode->i_vflags &= ~V_BARRIER; ++ if (ip->i_d.di_vflags & XFS_DIVFLAG_COW) ++ inode->i_vflags |= V_COW; ++ else ++ inode->i_vflags &= ~V_COW; + } + + /* +@@ -820,6 +838,7 @@ xfs_setup_inode( + inode->i_nlink = ip->i_d.di_nlink; + inode->i_uid = ip->i_d.di_uid; + inode->i_gid = ip->i_d.di_gid; ++ inode->i_tag = ip->i_d.di_tag; + + switch (inode->i_mode & S_IFMT) { + case S_IFBLK: +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/linux-2.6/xfs_linux.h linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_linux.h +--- linux-2.6.31.6/fs/xfs/linux-2.6/xfs_linux.h 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_linux.h 2009-09-10 16:11:43.000000000 +0200 +@@ -119,6 +119,7 @@ + + #define current_cpu() (raw_smp_processor_id()) + #define current_pid() (current->pid) ++#define current_fstag(cred,vp) (dx_current_fstag((vp)->i_sb)) + #define current_test_flags(f) (current->flags & (f)) + #define current_set_flags_nested(sp, f) \ + (*(sp) = current->flags, current->flags |= (f)) +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/linux-2.6/xfs_super.c linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_super.c +--- linux-2.6.31.6/fs/xfs/linux-2.6/xfs_super.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/linux-2.6/xfs_super.c 2009-09-10 17:01:53.000000000 +0200 +@@ -117,6 +117,9 @@ mempool_t *xfs_ioend_pool; + #define MNTOPT_DMAPI "dmapi" /* DMI enabled (DMAPI / XDSM) */ + #define MNTOPT_XDSM "xdsm" /* DMI enabled (DMAPI / XDSM) */ + #define MNTOPT_DMI "dmi" /* DMI enabled (DMAPI / XDSM) */ ++#define MNTOPT_TAGXID "tagxid" /* context tagging for inodes */ ++#define MNTOPT_TAGGED "tag" /* context tagging for inodes */ ++#define MNTOPT_NOTAGTAG "notag" /* do not use context tagging */ + + /* + * Table driven mount option parser. +@@ -125,10 +128,14 @@ mempool_t *xfs_ioend_pool; + * in the future, too. + */ + enum { ++ Opt_tag, Opt_notag, + Opt_barrier, Opt_nobarrier, Opt_err + }; + + static const match_table_t tokens = { ++ {Opt_tag, "tagxid"}, ++ {Opt_tag, "tag"}, ++ {Opt_notag, "notag"}, + {Opt_barrier, "barrier"}, + {Opt_nobarrier, "nobarrier"}, + {Opt_err, NULL} +@@ -382,6 +389,19 @@ xfs_parseargs( + } else if (!strcmp(this_char, "irixsgid")) { + cmn_err(CE_WARN, + "XFS: irixsgid is now a sysctl(2) variable, option is deprecated."); ++#ifndef CONFIG_TAGGING_NONE ++ } else if (!strcmp(this_char, MNTOPT_TAGGED)) { ++ mp->m_flags |= XFS_MOUNT_TAGGED; ++ } else if (!strcmp(this_char, MNTOPT_NOTAGTAG)) { ++ mp->m_flags &= ~XFS_MOUNT_TAGGED; ++ } else if (!strcmp(this_char, MNTOPT_TAGXID)) { ++ mp->m_flags |= XFS_MOUNT_TAGGED; ++#endif ++#ifdef CONFIG_PROPAGATE ++ } else if (!strcmp(this_char, MNTOPT_TAGGED)) { ++ /* use value */ ++ mp->m_flags |= XFS_MOUNT_TAGGED; ++#endif + } else { + cmn_err(CE_WARN, + "XFS: unknown mount option [%s].", this_char); +@@ -1244,6 +1264,16 @@ xfs_fs_remount( + case Opt_nobarrier: + mp->m_flags &= ~XFS_MOUNT_BARRIER; + break; ++ case Opt_tag: ++ if (!(sb->s_flags & MS_TAGGED)) { ++ printk(KERN_INFO ++ "XFS: %s: tagging not permitted on remount.\n", ++ sb->s_id); ++ return -EINVAL; ++ } ++ break; ++ case Opt_notag: ++ break; + default: + /* + * Logically we would return an error here to prevent +@@ -1451,6 +1481,9 @@ xfs_fs_fill_super( + + XFS_SEND_MOUNT(mp, DM_RIGHT_NULL, mtpt, mp->m_fsname); + ++ if (mp->m_flags & XFS_MOUNT_TAGGED) ++ sb->s_flags |= MS_TAGGED; ++ + sb->s_magic = XFS_SB_MAGIC; + sb->s_blocksize = mp->m_sb.sb_blocksize; + sb->s_blocksize_bits = ffs(sb->s_blocksize) - 1; +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_dinode.h linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_dinode.h +--- linux-2.6.31.6/fs/xfs/xfs_dinode.h 2009-06-11 17:13:09.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_dinode.h 2009-09-10 16:11:43.000000000 +0200 +@@ -50,7 +50,9 @@ typedef struct xfs_dinode { + __be32 di_gid; /* owner's group id */ + __be32 di_nlink; /* number of links to file */ + __be16 di_projid; /* owner's project id */ +- __u8 di_pad[8]; /* unused, zeroed space */ ++ __be16 di_tag; /* context tagging */ ++ __be16 di_vflags; /* vserver specific flags */ ++ __u8 di_pad[4]; /* unused, zeroed space */ + __be16 di_flushiter; /* incremented on flush */ + xfs_timestamp_t di_atime; /* time last accessed */ + xfs_timestamp_t di_mtime; /* time last modified */ +@@ -183,6 +185,8 @@ static inline void xfs_dinode_put_rdev(s + #define XFS_DIFLAG_EXTSZINHERIT_BIT 12 /* inherit inode extent size */ + #define XFS_DIFLAG_NODEFRAG_BIT 13 /* do not reorganize/defragment */ + #define XFS_DIFLAG_FILESTREAM_BIT 14 /* use filestream allocator */ ++#define XFS_DIFLAG_IXUNLINK_BIT 15 /* Immutable inver on unlink */ ++ + #define XFS_DIFLAG_REALTIME (1 << XFS_DIFLAG_REALTIME_BIT) + #define XFS_DIFLAG_PREALLOC (1 << XFS_DIFLAG_PREALLOC_BIT) + #define XFS_DIFLAG_NEWRTBM (1 << XFS_DIFLAG_NEWRTBM_BIT) +@@ -198,6 +202,7 @@ static inline void xfs_dinode_put_rdev(s + #define XFS_DIFLAG_EXTSZINHERIT (1 << XFS_DIFLAG_EXTSZINHERIT_BIT) + #define XFS_DIFLAG_NODEFRAG (1 << XFS_DIFLAG_NODEFRAG_BIT) + #define XFS_DIFLAG_FILESTREAM (1 << XFS_DIFLAG_FILESTREAM_BIT) ++#define XFS_DIFLAG_IXUNLINK (1 << XFS_DIFLAG_IXUNLINK_BIT) + + #ifdef CONFIG_XFS_RT + #define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) +@@ -210,6 +215,10 @@ static inline void xfs_dinode_put_rdev(s + XFS_DIFLAG_IMMUTABLE | XFS_DIFLAG_APPEND | XFS_DIFLAG_SYNC | \ + XFS_DIFLAG_NOATIME | XFS_DIFLAG_NODUMP | XFS_DIFLAG_RTINHERIT | \ + XFS_DIFLAG_PROJINHERIT | XFS_DIFLAG_NOSYMLINKS | XFS_DIFLAG_EXTSIZE | \ +- XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_NODEFRAG | XFS_DIFLAG_FILESTREAM) ++ XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_NODEFRAG | XFS_DIFLAG_FILESTREAM | \ ++ XFS_DIFLAG_IXUNLINK) ++ ++#define XFS_DIVFLAG_BARRIER 0x01 ++#define XFS_DIVFLAG_COW 0x02 + + #endif /* __XFS_DINODE_H__ */ +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_fs.h linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_fs.h +--- linux-2.6.31.6/fs/xfs/xfs_fs.h 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_fs.h 2009-09-10 16:11:43.000000000 +0200 +@@ -67,6 +67,9 @@ struct fsxattr { + #define XFS_XFLAG_EXTSZINHERIT 0x00001000 /* inherit inode extent size */ + #define XFS_XFLAG_NODEFRAG 0x00002000 /* do not defragment */ + #define XFS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */ ++#define XFS_XFLAG_IXUNLINK 0x00008000 /* immutable invert on unlink */ ++#define XFS_XFLAG_BARRIER 0x10000000 /* chroot() barrier */ ++#define XFS_XFLAG_COW 0x20000000 /* copy on write mark */ + #define XFS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */ + + /* +@@ -292,7 +295,8 @@ typedef struct xfs_bstat { + __s32 bs_extents; /* number of extents */ + __u32 bs_gen; /* generation count */ + __u16 bs_projid; /* project id */ +- unsigned char bs_pad[14]; /* pad space, unused */ ++ __u16 bs_tag; /* context tagging */ ++ unsigned char bs_pad[12]; /* pad space, unused */ + __u32 bs_dmevmask; /* DMIG event mask */ + __u16 bs_dmstate; /* DMIG state info */ + __u16 bs_aextents; /* attribute number of extents */ +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_ialloc.c linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_ialloc.c +--- linux-2.6.31.6/fs/xfs/xfs_ialloc.c 2009-06-11 17:13:09.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_ialloc.c 2009-09-10 16:11:43.000000000 +0200 +@@ -41,7 +41,6 @@ + #include "xfs_error.h" + #include "xfs_bmap.h" + +- + /* + * Allocation group level functions. + */ +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_inode.c linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_inode.c +--- linux-2.6.31.6/fs/xfs/xfs_inode.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_inode.c 2009-09-10 16:11:43.000000000 +0200 +@@ -249,6 +249,7 @@ xfs_inotobp( + return 0; + } + ++#include + + /* + * This routine is called to map an inode to the buffer containing +@@ -654,15 +655,25 @@ xfs_iformat_btree( + void + xfs_dinode_from_disk( + xfs_icdinode_t *to, +- xfs_dinode_t *from) ++ xfs_dinode_t *from, ++ int tagged) + { ++ uint32_t uid, gid, tag; ++ + to->di_magic = be16_to_cpu(from->di_magic); + to->di_mode = be16_to_cpu(from->di_mode); + to->di_version = from ->di_version; + to->di_format = from->di_format; + to->di_onlink = be16_to_cpu(from->di_onlink); +- to->di_uid = be32_to_cpu(from->di_uid); +- to->di_gid = be32_to_cpu(from->di_gid); ++ ++ uid = be32_to_cpu(from->di_uid); ++ gid = be32_to_cpu(from->di_gid); ++ tag = be16_to_cpu(from->di_tag); ++ ++ to->di_uid = INOTAG_UID(tagged, uid, gid); ++ to->di_gid = INOTAG_GID(tagged, uid, gid); ++ to->di_tag = INOTAG_TAG(tagged, uid, gid, tag); ++ + to->di_nlink = be32_to_cpu(from->di_nlink); + to->di_projid = be16_to_cpu(from->di_projid); + memcpy(to->di_pad, from->di_pad, sizeof(to->di_pad)); +@@ -683,21 +694,26 @@ xfs_dinode_from_disk( + to->di_dmevmask = be32_to_cpu(from->di_dmevmask); + to->di_dmstate = be16_to_cpu(from->di_dmstate); + to->di_flags = be16_to_cpu(from->di_flags); ++ to->di_vflags = be16_to_cpu(from->di_vflags); + to->di_gen = be32_to_cpu(from->di_gen); + } + + void + xfs_dinode_to_disk( + xfs_dinode_t *to, +- xfs_icdinode_t *from) ++ xfs_icdinode_t *from, ++ int tagged) + { + to->di_magic = cpu_to_be16(from->di_magic); + to->di_mode = cpu_to_be16(from->di_mode); + to->di_version = from ->di_version; + to->di_format = from->di_format; + to->di_onlink = cpu_to_be16(from->di_onlink); +- to->di_uid = cpu_to_be32(from->di_uid); +- to->di_gid = cpu_to_be32(from->di_gid); ++ ++ to->di_uid = cpu_to_be32(TAGINO_UID(tagged, from->di_uid, from->di_tag)); ++ to->di_gid = cpu_to_be32(TAGINO_GID(tagged, from->di_gid, from->di_tag)); ++ to->di_tag = cpu_to_be16(TAGINO_TAG(tagged, from->di_tag)); ++ + to->di_nlink = cpu_to_be32(from->di_nlink); + to->di_projid = cpu_to_be16(from->di_projid); + memcpy(to->di_pad, from->di_pad, sizeof(to->di_pad)); +@@ -718,12 +734,14 @@ xfs_dinode_to_disk( + to->di_dmevmask = cpu_to_be32(from->di_dmevmask); + to->di_dmstate = cpu_to_be16(from->di_dmstate); + to->di_flags = cpu_to_be16(from->di_flags); ++ to->di_vflags = cpu_to_be16(from->di_vflags); + to->di_gen = cpu_to_be32(from->di_gen); + } + + STATIC uint + _xfs_dic2xflags( +- __uint16_t di_flags) ++ __uint16_t di_flags, ++ __uint16_t di_vflags) + { + uint flags = 0; + +@@ -734,6 +752,8 @@ _xfs_dic2xflags( + flags |= XFS_XFLAG_PREALLOC; + if (di_flags & XFS_DIFLAG_IMMUTABLE) + flags |= XFS_XFLAG_IMMUTABLE; ++ if (di_flags & XFS_DIFLAG_IXUNLINK) ++ flags |= XFS_XFLAG_IXUNLINK; + if (di_flags & XFS_DIFLAG_APPEND) + flags |= XFS_XFLAG_APPEND; + if (di_flags & XFS_DIFLAG_SYNC) +@@ -758,6 +778,10 @@ _xfs_dic2xflags( + flags |= XFS_XFLAG_FILESTREAM; + } + ++ if (di_vflags & XFS_DIVFLAG_BARRIER) ++ flags |= FS_BARRIER_FL; ++ if (di_vflags & XFS_DIVFLAG_COW) ++ flags |= FS_COW_FL; + return flags; + } + +@@ -767,7 +791,7 @@ xfs_ip2xflags( + { + xfs_icdinode_t *dic = &ip->i_d; + +- return _xfs_dic2xflags(dic->di_flags) | ++ return _xfs_dic2xflags(dic->di_flags, dic->di_vflags) | + (XFS_IFORK_Q(ip) ? XFS_XFLAG_HASATTR : 0); + } + +@@ -775,7 +799,8 @@ uint + xfs_dic2xflags( + xfs_dinode_t *dip) + { +- return _xfs_dic2xflags(be16_to_cpu(dip->di_flags)) | ++ return _xfs_dic2xflags(be16_to_cpu(dip->di_flags), ++ be16_to_cpu(dip->di_vflags)) | + (XFS_DFORK_Q(dip) ? XFS_XFLAG_HASATTR : 0); + } + +@@ -811,7 +836,6 @@ xfs_iread( + if (error) + return error; + dip = (xfs_dinode_t *)xfs_buf_offset(bp, ip->i_imap.im_boffset); +- + /* + * If we got something that isn't an inode it means someone + * (nfs or dmi) has a stale handle. +@@ -836,7 +860,8 @@ xfs_iread( + * Otherwise, just get the truly permanent information. + */ + if (dip->di_mode) { +- xfs_dinode_from_disk(&ip->i_d, dip); ++ xfs_dinode_from_disk(&ip->i_d, dip, ++ mp->m_flags & XFS_MOUNT_TAGGED); + error = xfs_iformat(ip, dip); + if (error) { + #ifdef DEBUG +@@ -1036,6 +1061,7 @@ xfs_ialloc( + ASSERT(ip->i_d.di_nlink == nlink); + ip->i_d.di_uid = current_fsuid(); + ip->i_d.di_gid = current_fsgid(); ++ ip->i_d.di_tag = current_fstag(cr, &ip->i_vnode); + ip->i_d.di_projid = prid; + memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad)); + +@@ -1096,6 +1122,7 @@ xfs_ialloc( + ip->i_d.di_dmevmask = 0; + ip->i_d.di_dmstate = 0; + ip->i_d.di_flags = 0; ++ ip->i_d.di_vflags = 0; + flags = XFS_ILOG_CORE; + switch (mode & S_IFMT) { + case S_IFIFO: +@@ -2172,6 +2199,7 @@ xfs_ifree( + } + ip->i_d.di_mode = 0; /* mark incore inode as free */ + ip->i_d.di_flags = 0; ++ ip->i_d.di_vflags = 0; + ip->i_d.di_dmevmask = 0; + ip->i_d.di_forkoff = 0; /* mark the attr fork not in use */ + ip->i_df.if_ext_max = +@@ -3139,7 +3167,8 @@ xfs_iflush_int( + * because if the inode is dirty at all the core must + * be. + */ +- xfs_dinode_to_disk(dip, &ip->i_d); ++ xfs_dinode_to_disk(dip, &ip->i_d, ++ mp->m_flags & XFS_MOUNT_TAGGED); + + /* Wrap, we never let the log put out DI_MAX_FLUSH */ + if (ip->i_d.di_flushiter == DI_MAX_FLUSH) +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_inode.h linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_inode.h +--- linux-2.6.31.6/fs/xfs/xfs_inode.h 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_inode.h 2009-09-10 16:11:43.000000000 +0200 +@@ -135,7 +135,9 @@ typedef struct xfs_icdinode { + __uint32_t di_gid; /* owner's group id */ + __uint32_t di_nlink; /* number of links to file */ + __uint16_t di_projid; /* owner's project id */ +- __uint8_t di_pad[8]; /* unused, zeroed space */ ++ __uint16_t di_tag; /* context tagging */ ++ __uint16_t di_vflags; /* vserver specific flags */ ++ __uint8_t di_pad[4]; /* unused, zeroed space */ + __uint16_t di_flushiter; /* incremented on flush */ + xfs_ictimestamp_t di_atime; /* time last accessed */ + xfs_ictimestamp_t di_mtime; /* time last modified */ +@@ -573,9 +575,9 @@ int xfs_itobp(struct xfs_mount *, struc + int xfs_iread(struct xfs_mount *, struct xfs_trans *, + struct xfs_inode *, xfs_daddr_t, uint); + void xfs_dinode_from_disk(struct xfs_icdinode *, +- struct xfs_dinode *); ++ struct xfs_dinode *, int); + void xfs_dinode_to_disk(struct xfs_dinode *, +- struct xfs_icdinode *); ++ struct xfs_icdinode *, int); + void xfs_idestroy_fork(struct xfs_inode *, int); + void xfs_idata_realloc(struct xfs_inode *, int, int); + void xfs_iroot_realloc(struct xfs_inode *, int, int); +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_itable.c linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_itable.c +--- linux-2.6.31.6/fs/xfs/xfs_itable.c 2009-06-11 17:13:09.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_itable.c 2009-09-10 16:11:43.000000000 +0200 +@@ -82,6 +82,7 @@ xfs_bulkstat_one_iget( + buf->bs_mode = dic->di_mode; + buf->bs_uid = dic->di_uid; + buf->bs_gid = dic->di_gid; ++ buf->bs_tag = dic->di_tag; + buf->bs_size = dic->di_size; + /* + * We are reading the atime from the Linux inode because the +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_log_recover.c linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_log_recover.c +--- linux-2.6.31.6/fs/xfs/xfs_log_recover.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_log_recover.c 2009-09-10 16:11:43.000000000 +0200 +@@ -2467,7 +2467,8 @@ xlog_recover_do_inode_trans( + } + + /* The core is in in-core format */ +- xfs_dinode_to_disk(dip, (xfs_icdinode_t *)item->ri_buf[1].i_addr); ++ xfs_dinode_to_disk(dip, (xfs_icdinode_t *)item->ri_buf[1].i_addr, ++ mp->m_flags & XFS_MOUNT_TAGGED); + + /* the rest is in on-disk format */ + if (item->ri_buf[1].i_len > sizeof(struct xfs_icdinode)) { +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_mount.h linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_mount.h +--- linux-2.6.31.6/fs/xfs/xfs_mount.h 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_mount.h 2009-09-10 16:11:43.000000000 +0200 +@@ -283,6 +283,7 @@ typedef struct xfs_mount { + allocator */ + #define XFS_MOUNT_NOATTR2 (1ULL << 25) /* disable use of attr2 format */ + ++#define XFS_MOUNT_TAGGED (1ULL << 31) /* context tagging */ + + /* + * Default minimum read and write sizes. +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_vnodeops.c linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_vnodeops.c +--- linux-2.6.31.6/fs/xfs/xfs_vnodeops.c 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_vnodeops.c 2009-10-07 15:57:06.000000000 +0200 +@@ -54,6 +54,80 @@ + #include "xfs_filestream.h" + #include "xfs_vnodeops.h" + ++ ++STATIC void ++xfs_get_inode_flags( ++ xfs_inode_t *ip) ++{ ++ struct inode *inode = VFS_I(ip); ++ unsigned int flags = inode->i_flags; ++ unsigned int vflags = inode->i_vflags; ++ ++ if (flags & S_IMMUTABLE) ++ ip->i_d.di_flags |= XFS_DIFLAG_IMMUTABLE; ++ else ++ ip->i_d.di_flags &= ~XFS_DIFLAG_IMMUTABLE; ++ if (flags & S_IXUNLINK) ++ ip->i_d.di_flags |= XFS_DIFLAG_IXUNLINK; ++ else ++ ip->i_d.di_flags &= ~XFS_DIFLAG_IXUNLINK; ++ ++ if (vflags & V_BARRIER) ++ ip->i_d.di_vflags |= XFS_DIVFLAG_BARRIER; ++ else ++ ip->i_d.di_vflags &= ~XFS_DIVFLAG_BARRIER; ++ if (vflags & V_COW) ++ ip->i_d.di_vflags |= XFS_DIVFLAG_COW; ++ else ++ ip->i_d.di_vflags &= ~XFS_DIVFLAG_COW; ++} ++ ++int ++xfs_sync_flags( ++ struct inode *inode, ++ int flags, ++ int vflags) ++{ ++ struct xfs_inode *ip = XFS_I(inode); ++ struct xfs_mount *mp = ip->i_mount; ++ struct xfs_trans *tp; ++ unsigned int lock_flags = 0; ++ int code; ++ ++ tp = xfs_trans_alloc(mp, XFS_TRANS_SETATTR_NOT_SIZE); ++ code = xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0); ++ if (code) ++ goto error_out; ++ ++ lock_flags = XFS_ILOCK_EXCL; ++ xfs_ilock(ip, lock_flags); ++ ++ xfs_trans_ijoin(tp, ip, lock_flags); ++ xfs_trans_ihold(tp, ip); ++ ++ inode->i_flags = flags; ++ inode->i_vflags = vflags; ++ xfs_get_inode_flags(ip); ++ ++ xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); ++ xfs_ichgtime(ip, XFS_ICHGTIME_CHG); ++ ++ XFS_STATS_INC(xs_ig_attrchg); ++ ++ if (mp->m_flags & XFS_MOUNT_WSYNC) ++ xfs_trans_set_sync(tp); ++ code = xfs_trans_commit(tp, 0); ++ xfs_iunlock(ip, lock_flags); ++ return code; ++ ++error_out: ++ xfs_trans_cancel(tp, 0); ++ if (lock_flags) ++ xfs_iunlock(ip, lock_flags); ++ return code; ++} ++ ++ + int + xfs_setattr( + struct xfs_inode *ip, +@@ -69,6 +143,7 @@ xfs_setattr( + uint commit_flags=0; + uid_t uid=0, iuid=0; + gid_t gid=0, igid=0; ++ tag_t tag=0, itag=0; + int timeflags = 0; + struct xfs_dquot *udqp, *gdqp, *olddquot1, *olddquot2; + int need_iolock = 1; +@@ -165,7 +240,7 @@ xfs_setattr( + /* + * Change file ownership. Must be the owner or privileged. + */ +- if (mask & (ATTR_UID|ATTR_GID)) { ++ if (mask & (ATTR_UID|ATTR_GID|ATTR_TAG)) { + /* + * These IDs could have changed since we last looked at them. + * But, we're assured that if the ownership did change +@@ -174,8 +249,10 @@ xfs_setattr( + */ + iuid = ip->i_d.di_uid; + igid = ip->i_d.di_gid; ++ itag = ip->i_d.di_tag; + gid = (mask & ATTR_GID) ? iattr->ia_gid : igid; + uid = (mask & ATTR_UID) ? iattr->ia_uid : iuid; ++ tag = (mask & ATTR_TAG) ? iattr->ia_tag : itag; + + /* + * Do a quota reservation only if uid/gid is actually +@@ -183,7 +260,8 @@ xfs_setattr( + */ + if (XFS_IS_QUOTA_RUNNING(mp) && + ((XFS_IS_UQUOTA_ON(mp) && iuid != uid) || +- (XFS_IS_GQUOTA_ON(mp) && igid != gid))) { ++ (XFS_IS_GQUOTA_ON(mp) && igid != gid) || ++ (XFS_IS_GQUOTA_ON(mp) && itag != tag))) { + ASSERT(tp); + code = xfs_qm_vop_chown_reserve(tp, ip, udqp, gdqp, + capable(CAP_FOWNER) ? +@@ -336,7 +414,7 @@ xfs_setattr( + /* + * Change file ownership. Must be the owner or privileged. + */ +- if (mask & (ATTR_UID|ATTR_GID)) { ++ if (mask & (ATTR_UID|ATTR_GID|ATTR_TAG)) { + /* + * CAP_FSETID overrides the following restrictions: + * +@@ -352,6 +430,10 @@ xfs_setattr( + * Change the ownerships and register quota modifications + * in the transaction. + */ ++ if (itag != tag) { ++ ip->i_d.di_tag = tag; ++ inode->i_tag = tag; ++ } + if (iuid != uid) { + if (XFS_IS_QUOTA_RUNNING(mp) && XFS_IS_UQUOTA_ON(mp)) { + ASSERT(mask & ATTR_UID); +diff -NurpP --minimal linux-2.6.31.6/fs/xfs/xfs_vnodeops.h linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_vnodeops.h +--- linux-2.6.31.6/fs/xfs/xfs_vnodeops.h 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/fs/xfs/xfs_vnodeops.h 2009-09-10 16:11:43.000000000 +0200 +@@ -14,6 +14,7 @@ struct xfs_inode; + struct xfs_iomap; + + ++int xfs_sync_xflags(struct xfs_inode *ip); + int xfs_setattr(struct xfs_inode *ip, struct iattr *vap, int flags); + #define XFS_ATTR_DMI 0x01 /* invocation from a DMI function */ + #define XFS_ATTR_NONBLOCK 0x02 /* return EAGAIN if operation would block */ +diff -NurpP --minimal linux-2.6.31.6/include/asm-generic/tlb.h linux-2.6.31.6-vs2.3.0.36.24/include/asm-generic/tlb.h +--- linux-2.6.31.6/include/asm-generic/tlb.h 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/asm-generic/tlb.h 2009-09-10 16:11:43.000000000 +0200 +@@ -14,6 +14,7 @@ + #define _ASM_GENERIC__TLB_H + + #include ++#include + #include + #include + +diff -NurpP --minimal linux-2.6.31.6/include/linux/capability.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/capability.h +--- linux-2.6.31.6/include/linux/capability.h 2009-06-11 17:13:13.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/capability.h 2009-09-10 16:11:43.000000000 +0200 +@@ -285,6 +285,7 @@ struct cpu_vfs_cap_data { + arbitrary SCSI commands */ + /* Allow setting encryption key on loopback filesystem */ + /* Allow setting zone reclaim policy */ ++/* Allow the selection of a security context */ + + #define CAP_SYS_ADMIN 21 + +@@ -357,7 +358,13 @@ struct cpu_vfs_cap_data { + + #define CAP_MAC_ADMIN 33 + +-#define CAP_LAST_CAP CAP_MAC_ADMIN ++/* Allow context manipulations */ ++/* Allow changing context info on files */ ++ ++#define CAP_CONTEXT 34 ++ ++ ++#define CAP_LAST_CAP CAP_CONTEXT + + #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) + +diff -NurpP --minimal linux-2.6.31.6/include/linux/devpts_fs.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/devpts_fs.h +--- linux-2.6.31.6/include/linux/devpts_fs.h 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/devpts_fs.h 2009-09-10 16:11:43.000000000 +0200 +@@ -45,5 +45,4 @@ static inline void devpts_pty_kill(struc + + #endif + +- + #endif /* _LINUX_DEVPTS_FS_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/ext2_fs.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/ext2_fs.h +--- linux-2.6.31.6/include/linux/ext2_fs.h 2009-03-24 14:22:41.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/ext2_fs.h 2009-10-12 05:20:23.000000000 +0200 +@@ -189,8 +189,12 @@ struct ext2_group_desc + #define EXT2_NOTAIL_FL FS_NOTAIL_FL /* file tail should not be merged */ + #define EXT2_DIRSYNC_FL FS_DIRSYNC_FL /* dirsync behaviour (directories only) */ + #define EXT2_TOPDIR_FL FS_TOPDIR_FL /* Top of directory hierarchies*/ ++#define EXT2_IXUNLINK_FL FS_IXUNLINK_FL /* Immutable invert on unlink */ + #define EXT2_RESERVED_FL FS_RESERVED_FL /* reserved for ext2 lib */ + ++#define EXT2_BARRIER_FL FS_BARRIER_FL /* Barrier for chroot() */ ++#define EXT2_COW_FL FS_COW_FL /* Copy on Write marker */ ++ + #define EXT2_FL_USER_VISIBLE FS_FL_USER_VISIBLE /* User visible flags */ + #define EXT2_FL_USER_MODIFIABLE FS_FL_USER_MODIFIABLE /* User modifiable flags */ + +@@ -274,7 +278,8 @@ struct ext2_inode { + __u16 i_pad1; + __le16 l_i_uid_high; /* these 2 fields */ + __le16 l_i_gid_high; /* were reserved2[0] */ +- __u32 l_i_reserved2; ++ __le16 l_i_tag; /* Context Tag */ ++ __u16 l_i_reserved2; + } linux2; + struct { + __u8 h_i_frag; /* Fragment number */ +@@ -303,6 +308,7 @@ struct ext2_inode { + #define i_gid_low i_gid + #define i_uid_high osd2.linux2.l_i_uid_high + #define i_gid_high osd2.linux2.l_i_gid_high ++#define i_raw_tag osd2.linux2.l_i_tag + #define i_reserved2 osd2.linux2.l_i_reserved2 + #endif + +@@ -347,6 +353,7 @@ struct ext2_inode { + #define EXT2_MOUNT_USRQUOTA 0x020000 /* user quota */ + #define EXT2_MOUNT_GRPQUOTA 0x040000 /* group quota */ + #define EXT2_MOUNT_RESERVATION 0x080000 /* Preallocation */ ++#define EXT2_MOUNT_TAGGED (1<<24) /* Enable Context Tags */ + + + #define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt +diff -NurpP --minimal linux-2.6.31.6/include/linux/ext3_fs.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/ext3_fs.h +--- linux-2.6.31.6/include/linux/ext3_fs.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/ext3_fs.h 2009-10-12 05:20:40.000000000 +0200 +@@ -173,10 +173,14 @@ struct ext3_group_desc + #define EXT3_NOTAIL_FL 0x00008000 /* file tail should not be merged */ + #define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ + #define EXT3_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ ++#define EXT3_IXUNLINK_FL 0x08000000 /* Immutable invert on unlink */ + #define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */ + +-#define EXT3_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ +-#define EXT3_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ ++#define EXT3_BARRIER_FL 0x04000000 /* Barrier for chroot() */ ++#define EXT3_COW_FL 0x20000000 /* Copy on Write marker */ ++ ++#define EXT3_FL_USER_VISIBLE 0x0103DFFF /* User visible flags */ ++#define EXT3_FL_USER_MODIFIABLE 0x010380FF /* User modifiable flags */ + + /* Flags that should be inherited by new inodes from their parent. */ + #define EXT3_FL_INHERITED (EXT3_SECRM_FL | EXT3_UNRM_FL | EXT3_COMPR_FL |\ +@@ -320,7 +324,8 @@ struct ext3_inode { + __u16 i_pad1; + __le16 l_i_uid_high; /* these 2 fields */ + __le16 l_i_gid_high; /* were reserved2[0] */ +- __u32 l_i_reserved2; ++ __le16 l_i_tag; /* Context Tag */ ++ __u16 l_i_reserved2; + } linux2; + struct { + __u8 h_i_frag; /* Fragment number */ +@@ -351,6 +356,7 @@ struct ext3_inode { + #define i_gid_low i_gid + #define i_uid_high osd2.linux2.l_i_uid_high + #define i_gid_high osd2.linux2.l_i_gid_high ++#define i_raw_tag osd2.linux2.l_i_tag + #define i_reserved2 osd2.linux2.l_i_reserved2 + + #elif defined(__GNU__) +@@ -414,6 +420,7 @@ struct ext3_inode { + #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ + #define EXT3_MOUNT_DATA_ERR_ABORT 0x400000 /* Abort on file data write + * error in ordered mode */ ++#define EXT3_MOUNT_TAGGED (1<<24) /* Enable Context Tags */ + + /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ + #ifndef _LINUX_EXT2_FS_H +@@ -892,6 +899,7 @@ extern void ext3_get_inode_flags(struct + extern void ext3_set_aops(struct inode *inode); + extern int ext3_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, + u64 start, u64 len); ++extern int ext3_sync_flags(struct inode *, int, int); + + /* ioctl.c */ + extern long ext3_ioctl(struct file *, unsigned int, unsigned long); +diff -NurpP --minimal linux-2.6.31.6/include/linux/fs.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/fs.h +--- linux-2.6.31.6/include/linux/fs.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/fs.h 2009-10-06 23:35:53.000000000 +0200 +@@ -205,6 +205,9 @@ struct inodes_stat_t { + #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ + #define MS_I_VERSION (1<<23) /* Update inode I_version field */ + #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ ++#define MS_TAGGED (1<<25) /* use generic inode tagging */ ++#define MS_TAGID (1<<26) /* use specific tag for this mount */ ++#define MS_NOTAGCHECK (1<<27) /* don't check tags */ + #define MS_ACTIVE (1<<30) + #define MS_NOUSER (1<<31) + +@@ -231,6 +234,14 @@ struct inodes_stat_t { + #define S_NOCMTIME 128 /* Do not update file c/mtime */ + #define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ + #define S_PRIVATE 512 /* Inode is fs-internal */ ++#define S_IXUNLINK 1024 /* Immutable Invert on unlink */ ++ ++/* Linux-VServer related Inode flags */ ++ ++#define V_VALID 1 ++#define V_XATTR 2 ++#define V_BARRIER 4 /* Barrier for chroot() */ ++#define V_COW 8 /* Copy on Write */ + + /* + * Note that nosuid etc flags are inode-specific: setting some file-system +@@ -253,12 +264,15 @@ struct inodes_stat_t { + #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ + ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) + #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) +-#define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME) +-#define IS_I_VERSION(inode) __IS_FLG(inode, MS_I_VERSION) ++#define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME) ++#define IS_I_VERSION(inode) __IS_FLG(inode, MS_I_VERSION) ++#define IS_TAGGED(inode) __IS_FLG(inode, MS_TAGGED) + + #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) + #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) + #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) ++#define IS_IXUNLINK(inode) ((inode)->i_flags & S_IXUNLINK) ++#define IS_IXORUNLINK(inode) ((IS_IXUNLINK(inode) ? S_IMMUTABLE : 0) ^ IS_IMMUTABLE(inode)) + #define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL) + + #define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD) +@@ -266,6 +280,16 @@ struct inodes_stat_t { + #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) + #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) + ++#define IS_BARRIER(inode) (S_ISDIR((inode)->i_mode) && ((inode)->i_vflags & V_BARRIER)) ++ ++#ifdef CONFIG_VSERVER_COWBL ++# define IS_COW(inode) (IS_IXUNLINK(inode) && IS_IMMUTABLE(inode)) ++# define IS_COW_LINK(inode) (S_ISREG((inode)->i_mode) && ((inode)->i_nlink > 1)) ++#else ++# define IS_COW(inode) (0) ++# define IS_COW_LINK(inode) (0) ++#endif ++ + /* the read-only stuff doesn't really belong here, but any other place is + probably as bad and I don't want to create yet another include file. */ + +@@ -343,11 +367,14 @@ struct inodes_stat_t { + #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ + #define FS_EXTENT_FL 0x00080000 /* Extents */ + #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ ++#define FS_IXUNLINK_FL 0x08000000 /* Immutable invert on unlink */ + #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ + +-#define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ +-#define FS_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ ++#define FS_BARRIER_FL 0x04000000 /* Barrier for chroot() */ ++#define FS_COW_FL 0x20000000 /* Copy on Write marker */ + ++#define FS_FL_USER_VISIBLE 0x0103DFFF /* User visible flags */ ++#define FS_FL_USER_MODIFIABLE 0x010380FF /* User modifiable flags */ + + #define SYNC_FILE_RANGE_WAIT_BEFORE 1 + #define SYNC_FILE_RANGE_WRITE 2 +@@ -429,6 +456,7 @@ typedef void (dio_iodone_t)(struct kiocb + #define ATTR_KILL_PRIV (1 << 14) + #define ATTR_OPEN (1 << 15) /* Truncating from open(O_TRUNC) */ + #define ATTR_TIMES_SET (1 << 16) ++#define ATTR_TAG (1 << 17) + + /* + * This is the Inode Attributes structure, used for notify_change(). It +@@ -444,6 +472,7 @@ struct iattr { + umode_t ia_mode; + uid_t ia_uid; + gid_t ia_gid; ++ tag_t ia_tag; + loff_t ia_size; + struct timespec ia_atime; + struct timespec ia_mtime; +@@ -457,6 +486,9 @@ struct iattr { + struct file *ia_file; + }; + ++#define ATTR_FLAG_BARRIER 512 /* Barrier for chroot() */ ++#define ATTR_FLAG_IXUNLINK 1024 /* Immutable invert on unlink */ ++ + /* + * Includes for diskquotas. + */ +@@ -723,7 +755,9 @@ struct inode { + unsigned int i_nlink; + uid_t i_uid; + gid_t i_gid; ++ tag_t i_tag; + dev_t i_rdev; ++ dev_t i_mdev; + u64 i_version; + loff_t i_size; + #ifdef __NEED_I_SIZE_ORDERED +@@ -770,7 +804,8 @@ struct inode { + unsigned long i_state; + unsigned long dirtied_when; /* jiffies of first dirtying */ + +- unsigned int i_flags; ++ unsigned short i_flags; ++ unsigned short i_vflags; + + atomic_t i_writecount; + #ifdef CONFIG_SECURITY +@@ -858,12 +893,12 @@ static inline void i_size_write(struct i + + static inline unsigned iminor(const struct inode *inode) + { +- return MINOR(inode->i_rdev); ++ return MINOR(inode->i_mdev); + } + + static inline unsigned imajor(const struct inode *inode) + { +- return MAJOR(inode->i_rdev); ++ return MAJOR(inode->i_mdev); + } + + extern struct block_device *I_BDEV(struct inode *inode); +@@ -922,6 +957,7 @@ struct file { + loff_t f_pos; + struct fown_struct f_owner; + const struct cred *f_cred; ++ xid_t f_xid; + struct file_ra_state f_ra; + + u64 f_version; +@@ -1063,6 +1099,7 @@ struct file_lock { + struct file *fl_file; + loff_t fl_start; + loff_t fl_end; ++ xid_t fl_xid; + + struct fasync_struct * fl_fasync; /* for lease break notifications */ + unsigned long fl_break_time; /* for nonblocking lease breaks */ +@@ -1534,6 +1571,7 @@ struct inode_operations { + ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); + ssize_t (*listxattr) (struct dentry *, char *, size_t); + int (*removexattr) (struct dentry *, const char *); ++ int (*sync_flags) (struct inode *, int, int); + void (*truncate_range)(struct inode *, loff_t, loff_t); + long (*fallocate)(struct inode *inode, int mode, loff_t offset, + loff_t len); +@@ -1554,6 +1592,7 @@ extern ssize_t vfs_readv(struct file *, + unsigned long, loff_t *); + extern ssize_t vfs_writev(struct file *, const struct iovec __user *, + unsigned long, loff_t *); ++ssize_t vfs_sendfile(struct file *, struct file *, loff_t *, size_t, loff_t); + + struct super_operations { + struct inode *(*alloc_inode)(struct super_block *sb); +@@ -2328,6 +2367,7 @@ extern int dcache_dir_open(struct inode + extern int dcache_dir_close(struct inode *, struct file *); + extern loff_t dcache_dir_lseek(struct file *, loff_t, int); + extern int dcache_readdir(struct file *, void *, filldir_t); ++extern int dcache_readdir_filter(struct file *, void *, filldir_t, int (*)(struct dentry *)); + extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); + extern int simple_statfs(struct dentry *, struct kstatfs *); + extern int simple_link(struct dentry *, struct inode *, struct dentry *); +diff -NurpP --minimal linux-2.6.31.6/include/linux/gfs2_ondisk.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/gfs2_ondisk.h +--- linux-2.6.31.6/include/linux/gfs2_ondisk.h 2009-03-24 14:22:41.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/gfs2_ondisk.h 2009-10-07 18:20:44.000000000 +0200 +@@ -235,6 +235,9 @@ enum { + gfs2fl_NoAtime = 7, + gfs2fl_Sync = 8, + gfs2fl_System = 9, ++ gfs2fl_IXUnlink = 16, ++ gfs2fl_Barrier = 17, ++ gfs2fl_Cow = 18, + gfs2fl_TruncInProg = 29, + gfs2fl_InheritDirectio = 30, + gfs2fl_InheritJdata = 31, +@@ -251,6 +254,9 @@ enum { + #define GFS2_DIF_NOATIME 0x00000080 + #define GFS2_DIF_SYNC 0x00000100 + #define GFS2_DIF_SYSTEM 0x00000200 /* New in gfs2 */ ++#define GFS2_DIF_IXUNLINK 0x00010000 ++#define GFS2_DIF_BARRIER 0x00020000 ++#define GFS2_DIF_COW 0x00040000 + #define GFS2_DIF_TRUNC_IN_PROG 0x20000000 /* New in gfs2 */ + #define GFS2_DIF_INHERIT_DIRECTIO 0x40000000 + #define GFS2_DIF_INHERIT_JDATA 0x80000000 +diff -NurpP --minimal linux-2.6.31.6/include/linux/if_tun.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/if_tun.h +--- linux-2.6.31.6/include/linux/if_tun.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/if_tun.h 2009-09-10 16:11:43.000000000 +0200 +@@ -48,6 +48,7 @@ + #define TUNGETIFF _IOR('T', 210, unsigned int) + #define TUNGETSNDBUF _IOR('T', 211, int) + #define TUNSETSNDBUF _IOW('T', 212, int) ++#define TUNSETNID _IOW('T', 215, int) + + /* TUNSETIFF ifr flags */ + #define IFF_TUN 0x0001 +diff -NurpP --minimal linux-2.6.31.6/include/linux/init_task.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/init_task.h +--- linux-2.6.31.6/include/linux/init_task.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/init_task.h 2009-09-10 17:13:45.000000000 +0200 +@@ -173,6 +173,10 @@ extern struct cred init_cred; + INIT_LOCKDEP \ + INIT_FTRACE_GRAPH \ + INIT_TRACE_RECURSION \ ++ .xid = 0, \ ++ .vx_info = NULL, \ ++ .nid = 0, \ ++ .nx_info = NULL, \ + } + + +diff -NurpP --minimal linux-2.6.31.6/include/linux/interrupt.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/interrupt.h +--- linux-2.6.31.6/include/linux/interrupt.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/interrupt.h 2009-09-10 16:11:43.000000000 +0200 +@@ -9,8 +9,8 @@ + #include + #include + #include +-#include + #include ++#include + #include + #include + #include +diff -NurpP --minimal linux-2.6.31.6/include/linux/ipc.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/ipc.h +--- linux-2.6.31.6/include/linux/ipc.h 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/ipc.h 2009-09-10 16:11:43.000000000 +0200 +@@ -93,6 +93,7 @@ struct kern_ipc_perm + key_t key; + uid_t uid; + gid_t gid; ++ xid_t xid; + uid_t cuid; + gid_t cgid; + mode_t mode; +diff -NurpP --minimal linux-2.6.31.6/include/linux/Kbuild linux-2.6.31.6-vs2.3.0.36.24/include/linux/Kbuild +--- linux-2.6.31.6/include/linux/Kbuild 2009-09-10 15:26:24.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/Kbuild 2009-09-10 16:11:43.000000000 +0200 +@@ -376,5 +376,8 @@ unifdef-y += xattr.h + unifdef-y += xfrm.h + + objhdr-y += version.h ++ ++header-y += vserver/ + header-y += wimax.h + header-y += wimax/ ++ +diff -NurpP --minimal linux-2.6.31.6/include/linux/loop.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/loop.h +--- linux-2.6.31.6/include/linux/loop.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/loop.h 2009-09-10 16:11:43.000000000 +0200 +@@ -45,6 +45,7 @@ struct loop_device { + struct loop_func_table *lo_encryption; + __u32 lo_init[2]; + uid_t lo_key_owner; /* Who set the key */ ++ xid_t lo_xid; + int (*ioctl)(struct loop_device *, int cmd, + unsigned long arg); + +diff -NurpP --minimal linux-2.6.31.6/include/linux/magic.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/magic.h +--- linux-2.6.31.6/include/linux/magic.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/magic.h 2009-09-10 16:11:43.000000000 +0200 +@@ -3,7 +3,7 @@ + + #define ADFS_SUPER_MAGIC 0xadf5 + #define AFFS_SUPER_MAGIC 0xadff +-#define AFS_SUPER_MAGIC 0x5346414F ++#define AFS_SUPER_MAGIC 0x5346414F + #define AUTOFS_SUPER_MAGIC 0x0187 + #define CODA_SUPER_MAGIC 0x73757245 + #define CRAMFS_MAGIC 0x28cd3d45 /* some random number */ +@@ -36,6 +36,7 @@ + #define NFS_SUPER_MAGIC 0x6969 + #define OPENPROM_SUPER_MAGIC 0x9fa1 + #define PROC_SUPER_MAGIC 0x9fa0 ++#define DEVPTS_SUPER_MAGIC 0x1cd1 + #define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */ + + #define REISERFS_SUPER_MAGIC 0x52654973 /* used by gcc */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/major.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/major.h +--- linux-2.6.31.6/include/linux/major.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/major.h 2009-09-10 16:11:43.000000000 +0200 +@@ -15,6 +15,7 @@ + #define HD_MAJOR IDE0_MAJOR + #define PTY_SLAVE_MAJOR 3 + #define TTY_MAJOR 4 ++#define VROOT_MAJOR 4 + #define TTYAUX_MAJOR 5 + #define LP_MAJOR 6 + #define VCS_MAJOR 7 +diff -NurpP --minimal linux-2.6.31.6/include/linux/mm_types.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/mm_types.h +--- linux-2.6.31.6/include/linux/mm_types.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/mm_types.h 2009-09-10 16:11:43.000000000 +0200 +@@ -244,6 +244,7 @@ struct mm_struct { + + /* Architecture-specific MM context */ + mm_context_t context; ++ struct vx_info *mm_vx_info; + + /* Swap token stuff */ + /* +diff -NurpP --minimal linux-2.6.31.6/include/linux/mount.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/mount.h +--- linux-2.6.31.6/include/linux/mount.h 2009-09-10 15:26:25.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/mount.h 2009-09-10 17:14:39.000000000 +0200 +@@ -36,6 +36,9 @@ struct mnt_namespace; + #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ + #define MNT_PNODE_MASK 0x3000 /* propagation flag mask */ + ++#define MNT_TAGID 0x10000 ++#define MNT_NOTAG 0x20000 ++ + struct vfsmount { + struct list_head mnt_hash; + struct vfsmount *mnt_parent; /* fs we are mounted on */ +@@ -70,6 +73,7 @@ struct vfsmount { + #else + int mnt_writers; + #endif ++ tag_t mnt_tag; /* tagging used for vfsmount */ + }; + + static inline int *get_mnt_writers_ptr(struct vfsmount *mnt) +diff -NurpP --minimal linux-2.6.31.6/include/linux/net.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/net.h +--- linux-2.6.31.6/include/linux/net.h 2009-06-11 17:13:15.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/net.h 2009-09-10 16:11:43.000000000 +0200 +@@ -68,6 +68,7 @@ struct net; + #define SOCK_NOSPACE 2 + #define SOCK_PASSCRED 3 + #define SOCK_PASSSEC 4 ++#define SOCK_USER_SOCKET 5 + + #ifndef ARCH_HAS_SOCKET_TYPES + /** +diff -NurpP --minimal linux-2.6.31.6/include/linux/nfs_mount.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/nfs_mount.h +--- linux-2.6.31.6/include/linux/nfs_mount.h 2009-03-24 14:22:43.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/nfs_mount.h 2009-09-10 16:11:43.000000000 +0200 +@@ -63,7 +63,8 @@ struct nfs_mount_data { + #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ + #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ + #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ +-#define NFS_MOUNT_FLAGMASK 0xFFFF ++#define NFS_MOUNT_TAGGED 0x10000 /* context tagging */ ++#define NFS_MOUNT_FLAGMASK 0x1FFFF + + /* The following are for internal use only */ + #define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000 +diff -NurpP --minimal linux-2.6.31.6/include/linux/nsproxy.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/nsproxy.h +--- linux-2.6.31.6/include/linux/nsproxy.h 2009-06-11 17:13:17.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/nsproxy.h 2009-09-10 16:11:43.000000000 +0200 +@@ -3,6 +3,7 @@ + + #include + #include ++#include + + struct mnt_namespace; + struct uts_namespace; +@@ -63,22 +64,33 @@ static inline struct nsproxy *task_nspro + } + + int copy_namespaces(unsigned long flags, struct task_struct *tsk); ++struct nsproxy *copy_nsproxy(struct nsproxy *orig); + void exit_task_namespaces(struct task_struct *tsk); + void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new); + void free_nsproxy(struct nsproxy *ns); + int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **, + struct fs_struct *); + +-static inline void put_nsproxy(struct nsproxy *ns) ++#define get_nsproxy(n) __get_nsproxy(n, __FILE__, __LINE__) ++ ++static inline void __get_nsproxy(struct nsproxy *ns, ++ const char *_file, int _line) + { +- if (atomic_dec_and_test(&ns->count)) { +- free_nsproxy(ns); +- } ++ vxlprintk(VXD_CBIT(space, 0), "get_nsproxy(%p[%u])", ++ ns, atomic_read(&ns->count), _file, _line); ++ atomic_inc(&ns->count); + } + +-static inline void get_nsproxy(struct nsproxy *ns) ++#define put_nsproxy(n) __put_nsproxy(n, __FILE__, __LINE__) ++ ++static inline void __put_nsproxy(struct nsproxy *ns, ++ const char *_file, int _line) + { +- atomic_inc(&ns->count); ++ vxlprintk(VXD_CBIT(space, 0), "put_nsproxy(%p[%u])", ++ ns, atomic_read(&ns->count), _file, _line); ++ if (atomic_dec_and_test(&ns->count)) { ++ free_nsproxy(ns); ++ } + } + + #ifdef CONFIG_CGROUP_NS +diff -NurpP --minimal linux-2.6.31.6/include/linux/pid.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/pid.h +--- linux-2.6.31.6/include/linux/pid.h 2009-03-24 14:22:43.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/pid.h 2009-09-10 16:11:43.000000000 +0200 +@@ -8,7 +8,8 @@ enum pid_type + PIDTYPE_PID, + PIDTYPE_PGID, + PIDTYPE_SID, +- PIDTYPE_MAX ++ PIDTYPE_MAX, ++ PIDTYPE_REALPID + }; + + /* +@@ -160,6 +161,7 @@ static inline pid_t pid_nr(struct pid *p + } + + pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns); ++pid_t pid_unmapped_nr_ns(struct pid *pid, struct pid_namespace *ns); + pid_t pid_vnr(struct pid *pid); + + #define do_each_pid_task(pid, type, task) \ +diff -NurpP --minimal linux-2.6.31.6/include/linux/proc_fs.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/proc_fs.h +--- linux-2.6.31.6/include/linux/proc_fs.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/proc_fs.h 2009-09-10 16:11:43.000000000 +0200 +@@ -56,6 +56,7 @@ struct proc_dir_entry { + nlink_t nlink; + uid_t uid; + gid_t gid; ++ int vx_flags; + loff_t size; + const struct inode_operations *proc_iops; + /* +@@ -240,12 +241,18 @@ static inline void kclist_add(struct kco + extern void kclist_add(struct kcore_list *, void *, size_t); + #endif + ++struct vx_info; ++struct nx_info; ++ + union proc_op { + int (*proc_get_link)(struct inode *, struct path *); + int (*proc_read)(struct task_struct *task, char *page); + int (*proc_show)(struct seq_file *m, + struct pid_namespace *ns, struct pid *pid, + struct task_struct *task); ++ int (*proc_vs_read)(char *page); ++ int (*proc_vxi_read)(struct vx_info *vxi, char *page); ++ int (*proc_nxi_read)(struct nx_info *nxi, char *page); + }; + + struct ctl_table_header; +@@ -253,6 +260,7 @@ struct ctl_table; + + struct proc_inode { + struct pid *pid; ++ int vx_flags; + int fd; + union proc_op op; + struct proc_dir_entry *pde; +diff -NurpP --minimal linux-2.6.31.6/include/linux/quotaops.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/quotaops.h +--- linux-2.6.31.6/include/linux/quotaops.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/quotaops.h 2009-10-12 02:07:55.000000000 +0200 +@@ -8,6 +8,7 @@ + #define _LINUX_QUOTAOPS_ + + #include ++#include + + static inline struct quota_info *sb_dqopt(struct super_block *sb) + { +@@ -154,10 +155,14 @@ static inline void vfs_dq_init(struct in + * a transaction (deadlocks possible otherwise) */ + static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) + { ++ if (dl_alloc_space(inode, nr)) ++ return 1; + if (sb_any_quota_active(inode->i_sb)) { + /* Used space is updated in alloc_space() */ +- if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == NO_QUOTA) ++ if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == NO_QUOTA) { ++ dl_free_space(inode, nr); + return 1; ++ } + } + else + inode_add_bytes(inode, nr); +@@ -174,10 +179,14 @@ static inline int vfs_dq_prealloc_space( + + static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) + { ++ if (dl_alloc_space(inode, nr)) ++ return 1; + if (sb_any_quota_active(inode->i_sb)) { + /* Used space is updated in alloc_space() */ +- if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == NO_QUOTA) ++ if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == NO_QUOTA) { ++ dl_free_space(inode, nr); + return 1; ++ } + } + else + inode_add_bytes(inode, nr); +@@ -194,20 +203,28 @@ static inline int vfs_dq_alloc_space(str + + static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr) + { ++ if (dl_reserve_space(inode, nr)) ++ return 1; + if (sb_any_quota_active(inode->i_sb)) { + /* Used space is updated in alloc_space() */ +- if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA) ++ if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA) { ++ dl_release_space(inode, nr); + return 1; ++ } + } + return 0; + } + + static inline int vfs_dq_alloc_inode(struct inode *inode) + { ++ if (dl_alloc_inode(inode)) ++ return 1; + if (sb_any_quota_active(inode->i_sb)) { + vfs_dq_init(inode); +- if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA) ++ if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA) { ++ dl_free_inode(inode); + return 1; ++ } + } + return 0; + } +@@ -217,9 +234,13 @@ static inline int vfs_dq_alloc_inode(str + */ + static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr) + { ++ if (dl_claim_space(inode, nr)) ++ return 1; + if (sb_any_quota_active(inode->i_sb)) { +- if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA) ++ if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA) { ++ dl_release_space(inode, nr); + return 1; ++ } + } else + inode_add_bytes(inode, nr); + +@@ -235,6 +256,7 @@ void vfs_dq_release_reservation_space(st + { + if (sb_any_quota_active(inode->i_sb)) + inode->i_sb->dq_op->release_rsv(inode, nr); ++ dl_release_space(inode, nr); + } + + static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) +@@ -243,6 +265,7 @@ static inline void vfs_dq_free_space_nod + inode->i_sb->dq_op->free_space(inode, nr); + else + inode_sub_bytes(inode, nr); ++ dl_free_space(inode, nr); + } + + static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) +@@ -255,6 +278,7 @@ static inline void vfs_dq_free_inode(str + { + if (sb_any_quota_active(inode->i_sb)) + inode->i_sb->dq_op->free_inode(inode, 1); ++ dl_free_inode(inode); + } + + /* Cannot be called inside a transaction */ +@@ -358,6 +382,8 @@ static inline int vfs_dq_transfer(struct + + static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) + { ++ if (dl_alloc_space(inode, nr)) ++ return 1; + inode_add_bytes(inode, nr); + return 0; + } +@@ -371,6 +397,8 @@ static inline int vfs_dq_prealloc_space( + + static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) + { ++ if (dl_alloc_space(inode, nr)) ++ return 1; + inode_add_bytes(inode, nr); + return 0; + } +@@ -384,22 +412,28 @@ static inline int vfs_dq_alloc_space(str + + static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr) + { ++ if (dl_reserve_space(inode, nr)) ++ return 1; + return 0; + } + + static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr) + { ++ if (dl_claim_space(inode, nr)) ++ return 1; + return vfs_dq_alloc_space(inode, nr); + } + + static inline + int vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr) + { ++ dl_release_space(inode, nr); + return 0; + } + + static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) + { ++ dl_free_space(inode, nr); + inode_sub_bytes(inode, nr); + } + +diff -NurpP --minimal linux-2.6.31.6/include/linux/reiserfs_fs.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/reiserfs_fs.h +--- linux-2.6.31.6/include/linux/reiserfs_fs.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/reiserfs_fs.h 2009-10-07 01:27:41.000000000 +0200 +@@ -899,6 +899,11 @@ struct stat_data_v1 { + #define REISERFS_COMPR_FL FS_COMPR_FL + #define REISERFS_NOTAIL_FL FS_NOTAIL_FL + ++/* unfortunately reiserfs sdattr is only 16 bit */ ++#define REISERFS_IXUNLINK_FL (FS_IXUNLINK_FL >> 16) ++#define REISERFS_BARRIER_FL (FS_BARRIER_FL >> 16) ++#define REISERFS_COW_FL (FS_COW_FL >> 16) ++ + /* persistent flags that file inherits from the parent directory */ + #define REISERFS_INHERIT_MASK ( REISERFS_IMMUTABLE_FL | \ + REISERFS_SYNC_FL | \ +@@ -908,6 +913,9 @@ struct stat_data_v1 { + REISERFS_COMPR_FL | \ + REISERFS_NOTAIL_FL ) + ++#define REISERFS_FL_USER_VISIBLE 0x80FF ++#define REISERFS_FL_USER_MODIFIABLE 0x80FF ++ + /* Stat Data on disk (reiserfs version of UFS disk inode minus the + address blocks) */ + struct stat_data { +@@ -1989,6 +1997,7 @@ static inline void reiserfs_update_sd(st + void sd_attrs_to_i_attrs(__u16 sd_attrs, struct inode *inode); + void i_attrs_to_sd_attrs(struct inode *inode, __u16 * sd_attrs); + int reiserfs_setattr(struct dentry *dentry, struct iattr *attr); ++int reiserfs_sync_flags(struct inode *inode, int, int); + + /* namei.c */ + void set_de_name_and_namelen(struct reiserfs_dir_entry *de); +diff -NurpP --minimal linux-2.6.31.6/include/linux/reiserfs_fs_sb.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/reiserfs_fs_sb.h +--- linux-2.6.31.6/include/linux/reiserfs_fs_sb.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/reiserfs_fs_sb.h 2009-09-10 16:11:43.000000000 +0200 +@@ -456,6 +456,7 @@ enum reiserfs_mount_options { + REISERFS_EXPOSE_PRIVROOT, + REISERFS_BARRIER_NONE, + REISERFS_BARRIER_FLUSH, ++ REISERFS_TAGGED, + + /* Actions on error */ + REISERFS_ERROR_PANIC, +diff -NurpP --minimal linux-2.6.31.6/include/linux/sched.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/sched.h +--- linux-2.6.31.6/include/linux/sched.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/sched.h 2009-10-06 04:39:26.000000000 +0200 +@@ -383,25 +383,28 @@ extern void arch_unmap_area_topdown(stru + * The mm counters are not protected by its page_table_lock, + * so must be incremented atomically. + */ +-#define set_mm_counter(mm, member, value) atomic_long_set(&(mm)->_##member, value) +-#define get_mm_counter(mm, member) ((unsigned long)atomic_long_read(&(mm)->_##member)) +-#define add_mm_counter(mm, member, value) atomic_long_add(value, &(mm)->_##member) +-#define inc_mm_counter(mm, member) atomic_long_inc(&(mm)->_##member) +-#define dec_mm_counter(mm, member) atomic_long_dec(&(mm)->_##member) ++#define __set_mm_counter(mm, member, value) \ ++ atomic_long_set(&(mm)->_##member, value) ++#define get_mm_counter(mm, member) \ ++ ((unsigned long)atomic_long_read(&(mm)->_##member)) + + #else /* !USE_SPLIT_PTLOCKS */ + /* + * The mm counters are protected by its page_table_lock, + * so can be incremented directly. + */ +-#define set_mm_counter(mm, member, value) (mm)->_##member = (value) ++#define __set_mm_counter(mm, member, value) (mm)->_##member = (value) + #define get_mm_counter(mm, member) ((mm)->_##member) +-#define add_mm_counter(mm, member, value) (mm)->_##member += (value) +-#define inc_mm_counter(mm, member) (mm)->_##member++ +-#define dec_mm_counter(mm, member) (mm)->_##member-- + + #endif /* !USE_SPLIT_PTLOCKS */ + ++#define set_mm_counter(mm, member, value) \ ++ vx_ ## member ## pages_sub((mm), (get_mm_counter(mm, member) - value)) ++#define add_mm_counter(mm, member, value) \ ++ vx_ ## member ## pages_add((mm), (value)) ++#define inc_mm_counter(mm, member) vx_ ## member ## pages_inc((mm)) ++#define dec_mm_counter(mm, member) vx_ ## member ## pages_dec((mm)) ++ + #define get_mm_rss(mm) \ + (get_mm_counter(mm, file_rss) + get_mm_counter(mm, anon_rss)) + #define update_hiwater_rss(mm) do { \ +@@ -1024,7 +1027,7 @@ struct sched_domain; + struct sched_class { + const struct sched_class *next; + +- void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup); ++ int (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup); + void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); + void (*yield_task) (struct rq *rq); + +@@ -1124,6 +1127,7 @@ struct sched_entity { + u64 nr_failed_migrations_affine; + u64 nr_failed_migrations_running; + u64 nr_failed_migrations_hot; ++ u64 nr_failed_migrations_throttled; + u64 nr_forced_migrations; + u64 nr_forced2_migrations; + +@@ -1136,6 +1140,12 @@ struct sched_entity { + u64 nr_wakeups_affine_attempts; + u64 nr_wakeups_passive; + u64 nr_wakeups_idle; ++#ifdef CONFIG_CFS_HARD_LIMITS ++ u64 throttle_start; ++ u64 throttle_max; ++ u64 throttle_count; ++ u64 throttle_sum; ++#endif + #endif + + #ifdef CONFIG_FAIR_GROUP_SCHED +@@ -1335,6 +1345,14 @@ struct task_struct { + #endif + seccomp_t seccomp; + ++/* vserver context data */ ++ struct vx_info *vx_info; ++ struct nx_info *nx_info; ++ ++ xid_t xid; ++ nid_t nid; ++ tag_t tag; ++ + /* Thread group tracking */ + u32 parent_exec_id; + u32 self_exec_id; +@@ -1559,6 +1577,11 @@ struct pid_namespace; + pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, + struct pid_namespace *ns); + ++#include ++#include ++#include ++#include ++ + static inline pid_t task_pid_nr(struct task_struct *tsk) + { + return tsk->pid; +@@ -1572,7 +1595,8 @@ static inline pid_t task_pid_nr_ns(struc + + static inline pid_t task_pid_vnr(struct task_struct *tsk) + { +- return __task_pid_nr_ns(tsk, PIDTYPE_PID, NULL); ++ // return __task_pid_nr_ns(tsk, PIDTYPE_PID, NULL); ++ return vx_map_pid(__task_pid_nr_ns(tsk, PIDTYPE_PID, NULL)); + } + + +@@ -1585,7 +1609,7 @@ pid_t task_tgid_nr_ns(struct task_struct + + static inline pid_t task_tgid_vnr(struct task_struct *tsk) + { +- return pid_vnr(task_tgid(tsk)); ++ return vx_map_tgid(pid_vnr(task_tgid(tsk))); + } + + +diff -NurpP --minimal linux-2.6.31.6/include/linux/shmem_fs.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/shmem_fs.h +--- linux-2.6.31.6/include/linux/shmem_fs.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/shmem_fs.h 2009-09-10 16:11:43.000000000 +0200 +@@ -8,6 +8,9 @@ + + #define SHMEM_NR_DIRECT 16 + ++#define TMPFS_SUPER_MAGIC 0x01021994 ++ ++ + struct shmem_inode_info { + spinlock_t lock; + unsigned long flags; +diff -NurpP --minimal linux-2.6.31.6/include/linux/stat.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/stat.h +--- linux-2.6.31.6/include/linux/stat.h 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/stat.h 2009-09-10 16:11:43.000000000 +0200 +@@ -66,6 +66,7 @@ struct kstat { + unsigned int nlink; + uid_t uid; + gid_t gid; ++ tag_t tag; + dev_t rdev; + loff_t size; + struct timespec atime; +diff -NurpP --minimal linux-2.6.31.6/include/linux/sunrpc/auth.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/sunrpc/auth.h +--- linux-2.6.31.6/include/linux/sunrpc/auth.h 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/sunrpc/auth.h 2009-09-10 16:11:43.000000000 +0200 +@@ -25,6 +25,7 @@ + struct auth_cred { + uid_t uid; + gid_t gid; ++ tag_t tag; + struct group_info *group_info; + unsigned char machine_cred : 1; + }; +diff -NurpP --minimal linux-2.6.31.6/include/linux/sunrpc/clnt.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/sunrpc/clnt.h +--- linux-2.6.31.6/include/linux/sunrpc/clnt.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/sunrpc/clnt.h 2009-09-10 16:11:43.000000000 +0200 +@@ -43,7 +43,8 @@ struct rpc_clnt { + unsigned int cl_softrtry : 1,/* soft timeouts */ + cl_discrtry : 1,/* disconnect before retry */ + cl_autobind : 1,/* use getport() */ +- cl_chatty : 1;/* be verbose */ ++ cl_chatty : 1,/* be verbose */ ++ cl_tag : 1;/* context tagging */ + + struct rpc_rtt * cl_rtt; /* RTO estimator data */ + const struct rpc_timeout *cl_timeout; /* Timeout strategy */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/syscalls.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/syscalls.h +--- linux-2.6.31.6/include/linux/syscalls.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/syscalls.h 2009-09-10 16:11:43.000000000 +0200 +@@ -428,6 +428,8 @@ asmlinkage long sys_symlink(const char _ + asmlinkage long sys_unlink(const char __user *pathname); + asmlinkage long sys_rename(const char __user *oldname, + const char __user *newname); ++asmlinkage long sys_copyfile(const char __user *from, const char __user *to, ++ umode_t mode); + asmlinkage long sys_chmod(const char __user *filename, mode_t mode); + asmlinkage long sys_fchmod(unsigned int fd, mode_t mode); + +diff -NurpP --minimal linux-2.6.31.6/include/linux/sysctl.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/sysctl.h +--- linux-2.6.31.6/include/linux/sysctl.h 2009-06-11 17:13:18.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/sysctl.h 2009-09-10 16:11:43.000000000 +0200 +@@ -70,6 +70,7 @@ enum + CTL_ABI=9, /* Binary emulation */ + CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ + CTL_ARLAN=254, /* arlan wireless driver */ ++ CTL_VSERVER=4242, /* Linux-VServer debug */ + CTL_S390DBF=5677, /* s390 debug */ + CTL_SUNRPC=7249, /* sunrpc debug */ + CTL_PM=9899, /* frv power management */ +@@ -104,6 +105,7 @@ enum + + KERN_PANIC=15, /* int: panic timeout */ + KERN_REALROOTDEV=16, /* real root device to mount after initrd */ ++ KERN_VSHELPER=17, /* string: path to vshelper policy agent */ + + KERN_SPARC_REBOOT=21, /* reboot command on Sparc */ + KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/sysfs.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/sysfs.h +--- linux-2.6.31.6/include/linux/sysfs.h 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/sysfs.h 2009-09-10 16:11:43.000000000 +0200 +@@ -17,6 +17,8 @@ + #include + #include + ++#define SYSFS_SUPER_MAGIC 0x62656572 ++ + struct kobject; + struct module; + +diff -NurpP --minimal linux-2.6.31.6/include/linux/time.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/time.h +--- linux-2.6.31.6/include/linux/time.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/time.h 2009-09-10 16:11:43.000000000 +0200 +@@ -205,6 +205,9 @@ static __always_inline void timespec_add + a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); + a->tv_nsec = ns; + } ++ ++#include ++ + #endif /* __KERNEL__ */ + + #define NFDBITS __NFDBITS +diff -NurpP --minimal linux-2.6.31.6/include/linux/types.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/types.h +--- linux-2.6.31.6/include/linux/types.h 2009-09-10 15:26:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/types.h 2009-09-10 16:11:43.000000000 +0200 +@@ -37,6 +37,9 @@ typedef __kernel_uid32_t uid_t; + typedef __kernel_gid32_t gid_t; + typedef __kernel_uid16_t uid16_t; + typedef __kernel_gid16_t gid16_t; ++typedef unsigned int xid_t; ++typedef unsigned int nid_t; ++typedef unsigned int tag_t; + + typedef unsigned long uintptr_t; + +diff -NurpP --minimal linux-2.6.31.6/include/linux/vroot.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vroot.h +--- linux-2.6.31.6/include/linux/vroot.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vroot.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,51 @@ ++ ++/* ++ * include/linux/vroot.h ++ * ++ * written by Herbert Pötzl, 9/11/2002 ++ * ported to 2.6 by Herbert Pötzl, 30/12/2004 ++ * ++ * Copyright (C) 2002-2007 by Herbert Pötzl. ++ * Redistribution of this file is permitted under the ++ * GNU General Public License. ++ */ ++ ++#ifndef _LINUX_VROOT_H ++#define _LINUX_VROOT_H ++ ++ ++#ifdef __KERNEL__ ++ ++/* Possible states of device */ ++enum { ++ Vr_unbound, ++ Vr_bound, ++}; ++ ++struct vroot_device { ++ int vr_number; ++ int vr_refcnt; ++ ++ struct semaphore vr_ctl_mutex; ++ struct block_device *vr_device; ++ int vr_state; ++}; ++ ++ ++typedef struct block_device *(vroot_grb_func)(struct block_device *); ++ ++extern int register_vroot_grb(vroot_grb_func *); ++extern int unregister_vroot_grb(vroot_grb_func *); ++ ++#endif /* __KERNEL__ */ ++ ++#define MAX_VROOT_DEFAULT 8 ++ ++/* ++ * IOCTL commands --- we will commandeer 0x56 ('V') ++ */ ++ ++#define VROOT_SET_DEV 0x5600 ++#define VROOT_CLR_DEV 0x5601 ++ ++#endif /* _LINUX_VROOT_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_base.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_base.h +--- linux-2.6.31.6/include/linux/vs_base.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_base.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,10 @@ ++#ifndef _VS_BASE_H ++#define _VS_BASE_H ++ ++#include "vserver/base.h" ++#include "vserver/check.h" ++#include "vserver/debug.h" ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_context.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_context.h +--- linux-2.6.31.6/include/linux/vs_context.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_context.h 2009-09-30 02:28:59.000000000 +0200 +@@ -0,0 +1,242 @@ ++#ifndef _VS_CONTEXT_H ++#define _VS_CONTEXT_H ++ ++#include "vserver/base.h" ++#include "vserver/check.h" ++#include "vserver/context.h" ++#include "vserver/history.h" ++#include "vserver/debug.h" ++ ++#include ++ ++ ++#define get_vx_info(i) __get_vx_info(i, __FILE__, __LINE__, __HERE__) ++ ++static inline struct vx_info *__get_vx_info(struct vx_info *vxi, ++ const char *_file, int _line, void *_here) ++{ ++ if (!vxi) ++ return NULL; ++ ++ vxlprintk(VXD_CBIT(xid, 2), "get_vx_info(%p[#%d.%d])", ++ vxi, vxi ? vxi->vx_id : 0, ++ vxi ? atomic_read(&vxi->vx_usecnt) : 0, ++ _file, _line); ++ __vxh_get_vx_info(vxi, _here); ++ ++ atomic_inc(&vxi->vx_usecnt); ++ return vxi; ++} ++ ++ ++extern void free_vx_info(struct vx_info *); ++ ++#define put_vx_info(i) __put_vx_info(i, __FILE__, __LINE__, __HERE__) ++ ++static inline void __put_vx_info(struct vx_info *vxi, ++ const char *_file, int _line, void *_here) ++{ ++ if (!vxi) ++ return; ++ ++ vxlprintk(VXD_CBIT(xid, 2), "put_vx_info(%p[#%d.%d])", ++ vxi, vxi ? vxi->vx_id : 0, ++ vxi ? atomic_read(&vxi->vx_usecnt) : 0, ++ _file, _line); ++ __vxh_put_vx_info(vxi, _here); ++ ++ if (atomic_dec_and_test(&vxi->vx_usecnt)) ++ free_vx_info(vxi); ++} ++ ++ ++#define init_vx_info(p, i) \ ++ __init_vx_info(p, i, __FILE__, __LINE__, __HERE__) ++ ++static inline void __init_vx_info(struct vx_info **vxp, struct vx_info *vxi, ++ const char *_file, int _line, void *_here) ++{ ++ if (vxi) { ++ vxlprintk(VXD_CBIT(xid, 3), ++ "init_vx_info(%p[#%d.%d])", ++ vxi, vxi ? vxi->vx_id : 0, ++ vxi ? atomic_read(&vxi->vx_usecnt) : 0, ++ _file, _line); ++ __vxh_init_vx_info(vxi, vxp, _here); ++ ++ atomic_inc(&vxi->vx_usecnt); ++ } ++ *vxp = vxi; ++} ++ ++ ++#define set_vx_info(p, i) \ ++ __set_vx_info(p, i, __FILE__, __LINE__, __HERE__) ++ ++static inline void __set_vx_info(struct vx_info **vxp, struct vx_info *vxi, ++ const char *_file, int _line, void *_here) ++{ ++ struct vx_info *vxo; ++ ++ if (!vxi) ++ return; ++ ++ vxlprintk(VXD_CBIT(xid, 3), "set_vx_info(%p[#%d.%d])", ++ vxi, vxi ? vxi->vx_id : 0, ++ vxi ? atomic_read(&vxi->vx_usecnt) : 0, ++ _file, _line); ++ __vxh_set_vx_info(vxi, vxp, _here); ++ ++ atomic_inc(&vxi->vx_usecnt); ++ vxo = xchg(vxp, vxi); ++ BUG_ON(vxo); ++} ++ ++ ++#define clr_vx_info(p) __clr_vx_info(p, __FILE__, __LINE__, __HERE__) ++ ++static inline void __clr_vx_info(struct vx_info **vxp, ++ const char *_file, int _line, void *_here) ++{ ++ struct vx_info *vxo; ++ ++ vxo = xchg(vxp, NULL); ++ if (!vxo) ++ return; ++ ++ vxlprintk(VXD_CBIT(xid, 3), "clr_vx_info(%p[#%d.%d])", ++ vxo, vxo ? vxo->vx_id : 0, ++ vxo ? atomic_read(&vxo->vx_usecnt) : 0, ++ _file, _line); ++ __vxh_clr_vx_info(vxo, vxp, _here); ++ ++ if (atomic_dec_and_test(&vxo->vx_usecnt)) ++ free_vx_info(vxo); ++} ++ ++ ++#define claim_vx_info(v, p) \ ++ __claim_vx_info(v, p, __FILE__, __LINE__, __HERE__) ++ ++static inline void __claim_vx_info(struct vx_info *vxi, ++ struct task_struct *task, ++ const char *_file, int _line, void *_here) ++{ ++ vxlprintk(VXD_CBIT(xid, 3), "claim_vx_info(%p[#%d.%d.%d]) %p", ++ vxi, vxi ? vxi->vx_id : 0, ++ vxi ? atomic_read(&vxi->vx_usecnt) : 0, ++ vxi ? atomic_read(&vxi->vx_tasks) : 0, ++ task, _file, _line); ++ __vxh_claim_vx_info(vxi, task, _here); ++ ++ atomic_inc(&vxi->vx_tasks); ++} ++ ++ ++extern void unhash_vx_info(struct vx_info *); ++ ++#define release_vx_info(v, p) \ ++ __release_vx_info(v, p, __FILE__, __LINE__, __HERE__) ++ ++static inline void __release_vx_info(struct vx_info *vxi, ++ struct task_struct *task, ++ const char *_file, int _line, void *_here) ++{ ++ vxlprintk(VXD_CBIT(xid, 3), "release_vx_info(%p[#%d.%d.%d]) %p", ++ vxi, vxi ? vxi->vx_id : 0, ++ vxi ? atomic_read(&vxi->vx_usecnt) : 0, ++ vxi ? atomic_read(&vxi->vx_tasks) : 0, ++ task, _file, _line); ++ __vxh_release_vx_info(vxi, task, _here); ++ ++ might_sleep(); ++ ++ if (atomic_dec_and_test(&vxi->vx_tasks)) ++ unhash_vx_info(vxi); ++} ++ ++ ++#define task_get_vx_info(p) \ ++ __task_get_vx_info(p, __FILE__, __LINE__, __HERE__) ++ ++static inline struct vx_info *__task_get_vx_info(struct task_struct *p, ++ const char *_file, int _line, void *_here) ++{ ++ struct vx_info *vxi; ++ ++ task_lock(p); ++ vxlprintk(VXD_CBIT(xid, 5), "task_get_vx_info(%p)", ++ p, _file, _line); ++ vxi = __get_vx_info(p->vx_info, _file, _line, _here); ++ task_unlock(p); ++ return vxi; ++} ++ ++ ++static inline void __wakeup_vx_info(struct vx_info *vxi) ++{ ++ if (waitqueue_active(&vxi->vx_wait)) ++ wake_up_interruptible(&vxi->vx_wait); ++} ++ ++ ++#define enter_vx_info(v, s) __enter_vx_info(v, s, __FILE__, __LINE__) ++ ++static inline void __enter_vx_info(struct vx_info *vxi, ++ struct vx_info_save *vxis, const char *_file, int _line) ++{ ++ vxlprintk(VXD_CBIT(xid, 5), "enter_vx_info(%p[#%d],%p) %p[#%d,%p]", ++ vxi, vxi ? vxi->vx_id : 0, vxis, current, ++ current->xid, current->vx_info, _file, _line); ++ vxis->vxi = xchg(¤t->vx_info, vxi); ++ vxis->xid = current->xid; ++ current->xid = vxi ? vxi->vx_id : 0; ++} ++ ++#define leave_vx_info(s) __leave_vx_info(s, __FILE__, __LINE__) ++ ++static inline void __leave_vx_info(struct vx_info_save *vxis, ++ const char *_file, int _line) ++{ ++ vxlprintk(VXD_CBIT(xid, 5), "leave_vx_info(%p[#%d,%p]) %p[#%d,%p]", ++ vxis, vxis->xid, vxis->vxi, current, ++ current->xid, current->vx_info, _file, _line); ++ (void)xchg(¤t->vx_info, vxis->vxi); ++ current->xid = vxis->xid; ++} ++ ++ ++static inline void __enter_vx_admin(struct vx_info_save *vxis) ++{ ++ vxis->vxi = xchg(¤t->vx_info, NULL); ++ vxis->xid = xchg(¤t->xid, (xid_t)0); ++} ++ ++static inline void __leave_vx_admin(struct vx_info_save *vxis) ++{ ++ (void)xchg(¤t->xid, vxis->xid); ++ (void)xchg(¤t->vx_info, vxis->vxi); ++} ++ ++#define task_is_init(p) \ ++ __task_is_init(p, __FILE__, __LINE__, __HERE__) ++ ++static inline int __task_is_init(struct task_struct *p, ++ const char *_file, int _line, void *_here) ++{ ++ int is_init = is_global_init(p); ++ ++ task_lock(p); ++ if (p->vx_info) ++ is_init = p->vx_info->vx_initpid == p->pid; ++ task_unlock(p); ++ return is_init; ++} ++ ++extern void exit_vx_info(struct task_struct *, int); ++extern void exit_vx_info_early(struct task_struct *, int); ++ ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_cowbl.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_cowbl.h +--- linux-2.6.31.6/include/linux/vs_cowbl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_cowbl.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,47 @@ ++#ifndef _VS_COWBL_H ++#define _VS_COWBL_H ++ ++#include ++#include ++#include ++ ++extern struct dentry *cow_break_link(const char *pathname); ++ ++static inline int cow_check_and_break(struct path *path) ++{ ++ struct inode *inode = path->dentry->d_inode; ++ int error = 0; ++ ++ /* do we need this check? */ ++ if (IS_RDONLY(inode)) ++ return -EROFS; ++ ++ if (IS_COW(inode)) { ++ if (IS_COW_LINK(inode)) { ++ struct dentry *new_dentry, *old_dentry = path->dentry; ++ char *pp, *buf; ++ ++ buf = kmalloc(PATH_MAX, GFP_KERNEL); ++ if (!buf) { ++ return -ENOMEM; ++ } ++ pp = d_path(path, buf, PATH_MAX); ++ new_dentry = cow_break_link(pp); ++ kfree(buf); ++ if (!IS_ERR(new_dentry)) { ++ path->dentry = new_dentry; ++ dput(old_dentry); ++ } else ++ error = PTR_ERR(new_dentry); ++ } else { ++ inode->i_flags &= ~(S_IXUNLINK | S_IMMUTABLE); ++ inode->i_ctime = CURRENT_TIME; ++ mark_inode_dirty(inode); ++ } ++ } ++ return error; ++} ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_cvirt.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_cvirt.h +--- linux-2.6.31.6/include/linux/vs_cvirt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_cvirt.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,50 @@ ++#ifndef _VS_CVIRT_H ++#define _VS_CVIRT_H ++ ++#include "vserver/cvirt.h" ++#include "vserver/context.h" ++#include "vserver/base.h" ++#include "vserver/check.h" ++#include "vserver/debug.h" ++ ++ ++static inline void vx_activate_task(struct task_struct *p) ++{ ++ struct vx_info *vxi; ++ ++ if ((vxi = p->vx_info)) { ++ vx_update_load(vxi); ++ atomic_inc(&vxi->cvirt.nr_running); ++ } ++} ++ ++static inline void vx_deactivate_task(struct task_struct *p) ++{ ++ struct vx_info *vxi; ++ ++ if ((vxi = p->vx_info)) { ++ vx_update_load(vxi); ++ atomic_dec(&vxi->cvirt.nr_running); ++ } ++} ++ ++static inline void vx_uninterruptible_inc(struct task_struct *p) ++{ ++ struct vx_info *vxi; ++ ++ if ((vxi = p->vx_info)) ++ atomic_inc(&vxi->cvirt.nr_uninterruptible); ++} ++ ++static inline void vx_uninterruptible_dec(struct task_struct *p) ++{ ++ struct vx_info *vxi; ++ ++ if ((vxi = p->vx_info)) ++ atomic_dec(&vxi->cvirt.nr_uninterruptible); ++} ++ ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_device.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_device.h +--- linux-2.6.31.6/include/linux/vs_device.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_device.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,45 @@ ++#ifndef _VS_DEVICE_H ++#define _VS_DEVICE_H ++ ++#include "vserver/base.h" ++#include "vserver/device.h" ++#include "vserver/debug.h" ++ ++ ++#ifdef CONFIG_VSERVER_DEVICE ++ ++int vs_map_device(struct vx_info *, dev_t, dev_t *, umode_t); ++ ++#define vs_device_perm(v, d, m, p) \ ++ ((vs_map_device(current_vx_info(), d, NULL, m) & (p)) == (p)) ++ ++#else ++ ++static inline ++int vs_map_device(struct vx_info *vxi, ++ dev_t device, dev_t *target, umode_t mode) ++{ ++ if (target) ++ *target = device; ++ return ~0; ++} ++ ++#define vs_device_perm(v, d, m, p) ((p) == (p)) ++ ++#endif ++ ++ ++#define vs_map_chrdev(d, t, p) \ ++ ((vs_map_device(current_vx_info(), d, t, S_IFCHR) & (p)) == (p)) ++#define vs_map_blkdev(d, t, p) \ ++ ((vs_map_device(current_vx_info(), d, t, S_IFBLK) & (p)) == (p)) ++ ++#define vs_chrdev_perm(d, p) \ ++ vs_device_perm(current_vx_info(), d, S_IFCHR, p) ++#define vs_blkdev_perm(d, p) \ ++ vs_device_perm(current_vx_info(), d, S_IFBLK, p) ++ ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_dlimit.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_dlimit.h +--- linux-2.6.31.6/include/linux/vs_dlimit.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_dlimit.h 2009-10-12 02:50:50.000000000 +0200 +@@ -0,0 +1,216 @@ ++#ifndef _VS_DLIMIT_H ++#define _VS_DLIMIT_H ++ ++#include ++ ++#include "vserver/dlimit.h" ++#include "vserver/base.h" ++#include "vserver/debug.h" ++ ++ ++#define get_dl_info(i) __get_dl_info(i, __FILE__, __LINE__) ++ ++static inline struct dl_info *__get_dl_info(struct dl_info *dli, ++ const char *_file, int _line) ++{ ++ if (!dli) ++ return NULL; ++ vxlprintk(VXD_CBIT(dlim, 4), "get_dl_info(%p[#%d.%d])", ++ dli, dli ? dli->dl_tag : 0, ++ dli ? atomic_read(&dli->dl_usecnt) : 0, ++ _file, _line); ++ atomic_inc(&dli->dl_usecnt); ++ return dli; ++} ++ ++ ++#define free_dl_info(i) \ ++ call_rcu(&(i)->dl_rcu, rcu_free_dl_info) ++ ++#define put_dl_info(i) __put_dl_info(i, __FILE__, __LINE__) ++ ++static inline void __put_dl_info(struct dl_info *dli, ++ const char *_file, int _line) ++{ ++ if (!dli) ++ return; ++ vxlprintk(VXD_CBIT(dlim, 4), "put_dl_info(%p[#%d.%d])", ++ dli, dli ? dli->dl_tag : 0, ++ dli ? atomic_read(&dli->dl_usecnt) : 0, ++ _file, _line); ++ if (atomic_dec_and_test(&dli->dl_usecnt)) ++ free_dl_info(dli); ++} ++ ++ ++#define __dlimit_char(d) ((d) ? '*' : ' ') ++ ++static inline int __dl_alloc_space(struct super_block *sb, ++ tag_t tag, dlsize_t nr, const char *file, int line) ++{ ++ struct dl_info *dli = NULL; ++ int ret = 0; ++ ++ if (nr == 0) ++ goto out; ++ dli = locate_dl_info(sb, tag); ++ if (!dli) ++ goto out; ++ ++ spin_lock(&dli->dl_lock); ++ ret = (dli->dl_space_used + nr > dli->dl_space_total); ++ if (!ret) ++ dli->dl_space_used += nr; ++ spin_unlock(&dli->dl_lock); ++ put_dl_info(dli); ++out: ++ vxlprintk(VXD_CBIT(dlim, 1), ++ "ALLOC (%p,#%d)%c %lld bytes (%d)", ++ sb, tag, __dlimit_char(dli), (long long)nr, ++ ret, file, line); ++ return ret; ++} ++ ++static inline void __dl_free_space(struct super_block *sb, ++ tag_t tag, dlsize_t nr, const char *_file, int _line) ++{ ++ struct dl_info *dli = NULL; ++ ++ if (nr == 0) ++ goto out; ++ dli = locate_dl_info(sb, tag); ++ if (!dli) ++ goto out; ++ ++ spin_lock(&dli->dl_lock); ++ if (dli->dl_space_used > nr) ++ dli->dl_space_used -= nr; ++ else ++ dli->dl_space_used = 0; ++ spin_unlock(&dli->dl_lock); ++ put_dl_info(dli); ++out: ++ vxlprintk(VXD_CBIT(dlim, 1), ++ "FREE (%p,#%d)%c %lld bytes", ++ sb, tag, __dlimit_char(dli), (long long)nr, ++ _file, _line); ++} ++ ++static inline int __dl_alloc_inode(struct super_block *sb, ++ tag_t tag, const char *_file, int _line) ++{ ++ struct dl_info *dli; ++ int ret = 0; ++ ++ dli = locate_dl_info(sb, tag); ++ if (!dli) ++ goto out; ++ ++ spin_lock(&dli->dl_lock); ++ ret = (dli->dl_inodes_used >= dli->dl_inodes_total); ++ if (!ret) ++ dli->dl_inodes_used++; ++ spin_unlock(&dli->dl_lock); ++ put_dl_info(dli); ++out: ++ vxlprintk(VXD_CBIT(dlim, 0), ++ "ALLOC (%p,#%d)%c inode (%d)", ++ sb, tag, __dlimit_char(dli), ret, _file, _line); ++ return ret; ++} ++ ++static inline void __dl_free_inode(struct super_block *sb, ++ tag_t tag, const char *_file, int _line) ++{ ++ struct dl_info *dli; ++ ++ dli = locate_dl_info(sb, tag); ++ if (!dli) ++ goto out; ++ ++ spin_lock(&dli->dl_lock); ++ if (dli->dl_inodes_used > 1) ++ dli->dl_inodes_used--; ++ else ++ dli->dl_inodes_used = 0; ++ spin_unlock(&dli->dl_lock); ++ put_dl_info(dli); ++out: ++ vxlprintk(VXD_CBIT(dlim, 0), ++ "FREE (%p,#%d)%c inode", ++ sb, tag, __dlimit_char(dli), _file, _line); ++} ++ ++static inline void __dl_adjust_block(struct super_block *sb, tag_t tag, ++ unsigned long long *free_blocks, unsigned long long *root_blocks, ++ const char *_file, int _line) ++{ ++ struct dl_info *dli; ++ uint64_t broot, bfree; ++ ++ dli = locate_dl_info(sb, tag); ++ if (!dli) ++ return; ++ ++ spin_lock(&dli->dl_lock); ++ broot = (dli->dl_space_total - ++ (dli->dl_space_total >> 10) * dli->dl_nrlmult) ++ >> sb->s_blocksize_bits; ++ bfree = (dli->dl_space_total - dli->dl_space_used) ++ >> sb->s_blocksize_bits; ++ spin_unlock(&dli->dl_lock); ++ ++ vxlprintk(VXD_CBIT(dlim, 2), ++ "ADJUST: %lld,%lld on %lld,%lld [mult=%d]", ++ (long long)bfree, (long long)broot, ++ *free_blocks, *root_blocks, dli->dl_nrlmult, ++ _file, _line); ++ if (free_blocks) { ++ if (*free_blocks > bfree) ++ *free_blocks = bfree; ++ } ++ if (root_blocks) { ++ if (*root_blocks > broot) ++ *root_blocks = broot; ++ } ++ put_dl_info(dli); ++} ++ ++#define dl_prealloc_space(in, bytes) \ ++ __dl_alloc_space((in)->i_sb, (in)->i_tag, (dlsize_t)(bytes), \ ++ __FILE__, __LINE__ ) ++ ++#define dl_alloc_space(in, bytes) \ ++ __dl_alloc_space((in)->i_sb, (in)->i_tag, (dlsize_t)(bytes), \ ++ __FILE__, __LINE__ ) ++ ++#define dl_reserve_space(in, bytes) \ ++ __dl_alloc_space((in)->i_sb, (in)->i_tag, (dlsize_t)(bytes), \ ++ __FILE__, __LINE__ ) ++ ++#define dl_claim_space(in, bytes) (0) ++ ++#define dl_release_space(in, bytes) \ ++ __dl_free_space((in)->i_sb, (in)->i_tag, (dlsize_t)(bytes), \ ++ __FILE__, __LINE__ ) ++ ++#define dl_free_space(in, bytes) \ ++ __dl_free_space((in)->i_sb, (in)->i_tag, (dlsize_t)(bytes), \ ++ __FILE__, __LINE__ ) ++ ++ ++ ++#define dl_alloc_inode(in) \ ++ __dl_alloc_inode((in)->i_sb, (in)->i_tag, __FILE__, __LINE__ ) ++ ++#define dl_free_inode(in) \ ++ __dl_free_inode((in)->i_sb, (in)->i_tag, __FILE__, __LINE__ ) ++ ++ ++#define dl_adjust_block(sb, tag, fb, rb) \ ++ __dl_adjust_block(sb, tag, fb, rb, __FILE__, __LINE__ ) ++ ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/base.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/base.h +--- linux-2.6.31.6/include/linux/vserver/base.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/base.h 2009-11-05 04:16:31.000000000 +0100 +@@ -0,0 +1,159 @@ ++#ifndef _VX_BASE_H ++#define _VX_BASE_H ++ ++ ++/* context state changes */ ++ ++enum { ++ VSC_STARTUP = 1, ++ VSC_SHUTDOWN, ++ ++ VSC_NETUP, ++ VSC_NETDOWN, ++}; ++ ++ ++ ++#define vx_task_xid(t) ((t)->xid) ++ ++#define vx_current_xid() vx_task_xid(current) ++ ++#define current_vx_info() (current->vx_info) ++ ++ ++#define nx_task_nid(t) ((t)->nid) ++ ++#define nx_current_nid() nx_task_nid(current) ++ ++#define current_nx_info() (current->nx_info) ++ ++ ++/* generic flag merging */ ++ ++#define vs_check_flags(v, m, f) (((v) & (m)) ^ (f)) ++ ++#define vs_mask_flags(v, f, m) (((v) & ~(m)) | ((f) & (m))) ++ ++#define vs_mask_mask(v, f, m) (((v) & ~(m)) | ((v) & (f) & (m))) ++ ++#define vs_check_bit(v, n) ((v) & (1LL << (n))) ++ ++ ++/* context flags */ ++ ++#define __vx_flags(v) ((v) ? (v)->vx_flags : 0) ++ ++#define vx_current_flags() __vx_flags(current_vx_info()) ++ ++#define vx_info_flags(v, m, f) \ ++ vs_check_flags(__vx_flags(v), m, f) ++ ++#define task_vx_flags(t, m, f) \ ++ ((t) && vx_info_flags((t)->vx_info, m, f)) ++ ++#define vx_flags(m, f) vx_info_flags(current_vx_info(), m, f) ++ ++ ++/* context caps */ ++ ++#define __vx_ccaps(v) ((v) ? (v)->vx_ccaps : 0) ++ ++#define vx_current_ccaps() __vx_ccaps(current_vx_info()) ++ ++#define vx_info_ccaps(v, c) (__vx_ccaps(v) & (c)) ++ ++#define vx_ccaps(c) vx_info_ccaps(current_vx_info(), (c)) ++ ++ ++ ++/* network flags */ ++ ++#define __nx_flags(n) ((n) ? (n)->nx_flags : 0) ++ ++#define nx_current_flags() __nx_flags(current_nx_info()) ++ ++#define nx_info_flags(n, m, f) \ ++ vs_check_flags(__nx_flags(n), m, f) ++ ++#define task_nx_flags(t, m, f) \ ++ ((t) && nx_info_flags((t)->nx_info, m, f)) ++ ++#define nx_flags(m, f) nx_info_flags(current_nx_info(), m, f) ++ ++ ++/* network caps */ ++ ++#define __nx_ncaps(n) ((n) ? (n)->nx_ncaps : 0) ++ ++#define nx_current_ncaps() __nx_ncaps(current_nx_info()) ++ ++#define nx_info_ncaps(n, c) (__nx_ncaps(n) & (c)) ++ ++#define nx_ncaps(c) nx_info_ncaps(current_nx_info(), c) ++ ++ ++/* context mask capabilities */ ++ ++#define __vx_mcaps(v) ((v) ? (v)->vx_ccaps >> 32UL : ~0 ) ++ ++#define vx_info_mcaps(v, c) (__vx_mcaps(v) & (c)) ++ ++#define vx_mcaps(c) vx_info_mcaps(current_vx_info(), c) ++ ++ ++/* context bcap mask */ ++ ++#define __vx_bcaps(v) ((v)->vx_bcaps) ++ ++#define vx_current_bcaps() __vx_bcaps(current_vx_info()) ++ ++ ++/* mask given bcaps */ ++ ++#define vx_info_mbcaps(v, c) ((v) ? cap_intersect(__vx_bcaps(v), c) : c) ++ ++#define vx_mbcaps(c) vx_info_mbcaps(current_vx_info(), c) ++ ++ ++/* masked cap_bset */ ++ ++#define vx_info_cap_bset(v) vx_info_mbcaps(v, current->cap_bset) ++ ++#define vx_current_cap_bset() vx_info_cap_bset(current_vx_info()) ++ ++#if 0 ++#define vx_info_mbcap(v, b) \ ++ (!vx_info_flags(v, VXF_STATE_SETUP, 0) ? \ ++ vx_info_bcaps(v, b) : (b)) ++ ++#define task_vx_mbcap(t, b) \ ++ vx_info_mbcap((t)->vx_info, (t)->b) ++ ++#define vx_mbcap(b) task_vx_mbcap(current, b) ++#endif ++ ++#define vx_cap_raised(v, c, f) cap_raised(vx_info_mbcaps(v, c), f) ++ ++#define vx_capable(b, c) (capable(b) || \ ++ (cap_raised(current_cap(), b) && vx_ccaps(c))) ++ ++#define nx_capable(b, c) (capable(b) || \ ++ (cap_raised(current_cap(), b) && nx_ncaps(c))) ++ ++#define vx_task_initpid(t, n) \ ++ ((t)->vx_info && \ ++ ((t)->vx_info->vx_initpid == (n))) ++ ++#define vx_current_initpid(n) vx_task_initpid(current, n) ++ ++ ++#define __vx_state(v) ((v) ? ((v)->vx_state) : 0) ++ ++#define vx_info_state(v, m) (__vx_state(v) & (m)) ++ ++ ++#define __nx_state(n) ((n) ? ((n)->nx_state) : 0) ++ ++#define nx_info_state(n, m) (__nx_state(n) & (m)) ++ ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/cacct_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cacct_cmd.h +--- linux-2.6.31.6/include/linux/vserver/cacct_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cacct_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,23 @@ ++#ifndef _VX_CACCT_CMD_H ++#define _VX_CACCT_CMD_H ++ ++ ++/* virtual host info name commands */ ++ ++#define VCMD_sock_stat VC_CMD(VSTAT, 5, 0) ++ ++struct vcmd_sock_stat_v0 { ++ uint32_t field; ++ uint32_t count[3]; ++ uint64_t total[3]; ++}; ++ ++ ++#ifdef __KERNEL__ ++ ++#include ++ ++extern int vc_sock_stat(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_CACCT_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/cacct_def.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cacct_def.h +--- linux-2.6.31.6/include/linux/vserver/cacct_def.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cacct_def.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,43 @@ ++#ifndef _VX_CACCT_DEF_H ++#define _VX_CACCT_DEF_H ++ ++#include ++#include ++ ++ ++struct _vx_sock_acc { ++ atomic_long_t count; ++ atomic_long_t total; ++}; ++ ++/* context sub struct */ ++ ++struct _vx_cacct { ++ struct _vx_sock_acc sock[VXA_SOCK_SIZE][3]; ++ atomic_t slab[8]; ++ atomic_t page[6][8]; ++}; ++ ++#ifdef CONFIG_VSERVER_DEBUG ++ ++static inline void __dump_vx_cacct(struct _vx_cacct *cacct) ++{ ++ int i, j; ++ ++ printk("\t_vx_cacct:"); ++ for (i = 0; i < 6; i++) { ++ struct _vx_sock_acc *ptr = cacct->sock[i]; ++ ++ printk("\t [%d] =", i); ++ for (j = 0; j < 3; j++) { ++ printk(" [%d] = %8lu, %8lu", j, ++ atomic_long_read(&ptr[j].count), ++ atomic_long_read(&ptr[j].total)); ++ } ++ printk("\n"); ++ } ++} ++ ++#endif ++ ++#endif /* _VX_CACCT_DEF_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/cacct.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cacct.h +--- linux-2.6.31.6/include/linux/vserver/cacct.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cacct.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,15 @@ ++#ifndef _VX_CACCT_H ++#define _VX_CACCT_H ++ ++ ++enum sock_acc_field { ++ VXA_SOCK_UNSPEC = 0, ++ VXA_SOCK_UNIX, ++ VXA_SOCK_INET, ++ VXA_SOCK_INET6, ++ VXA_SOCK_PACKET, ++ VXA_SOCK_OTHER, ++ VXA_SOCK_SIZE /* array size */ ++}; ++ ++#endif /* _VX_CACCT_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/cacct_int.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cacct_int.h +--- linux-2.6.31.6/include/linux/vserver/cacct_int.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cacct_int.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,21 @@ ++#ifndef _VX_CACCT_INT_H ++#define _VX_CACCT_INT_H ++ ++ ++#ifdef __KERNEL__ ++ ++static inline ++unsigned long vx_sock_count(struct _vx_cacct *cacct, int type, int pos) ++{ ++ return atomic_long_read(&cacct->sock[type][pos].count); ++} ++ ++ ++static inline ++unsigned long vx_sock_total(struct _vx_cacct *cacct, int type, int pos) ++{ ++ return atomic_long_read(&cacct->sock[type][pos].total); ++} ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_CACCT_INT_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/check.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/check.h +--- linux-2.6.31.6/include/linux/vserver/check.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/check.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,89 @@ ++#ifndef _VS_CHECK_H ++#define _VS_CHECK_H ++ ++ ++#define MAX_S_CONTEXT 65535 /* Arbitrary limit */ ++ ++#ifdef CONFIG_VSERVER_DYNAMIC_IDS ++#define MIN_D_CONTEXT 49152 /* dynamic contexts start here */ ++#else ++#define MIN_D_CONTEXT 65536 ++#endif ++ ++/* check conditions */ ++ ++#define VS_ADMIN 0x0001 ++#define VS_WATCH 0x0002 ++#define VS_HIDE 0x0004 ++#define VS_HOSTID 0x0008 ++ ++#define VS_IDENT 0x0010 ++#define VS_EQUIV 0x0020 ++#define VS_PARENT 0x0040 ++#define VS_CHILD 0x0080 ++ ++#define VS_ARG_MASK 0x00F0 ++ ++#define VS_DYNAMIC 0x0100 ++#define VS_STATIC 0x0200 ++ ++#define VS_ATR_MASK 0x0F00 ++ ++#ifdef CONFIG_VSERVER_PRIVACY ++#define VS_ADMIN_P (0) ++#define VS_WATCH_P (0) ++#else ++#define VS_ADMIN_P VS_ADMIN ++#define VS_WATCH_P VS_WATCH ++#endif ++ ++#define VS_HARDIRQ 0x1000 ++#define VS_SOFTIRQ 0x2000 ++#define VS_IRQ 0x4000 ++ ++#define VS_IRQ_MASK 0xF000 ++ ++#include ++ ++/* ++ * check current context for ADMIN/WATCH and ++ * optionally against supplied argument ++ */ ++static inline int __vs_check(int cid, int id, unsigned int mode) ++{ ++ if (mode & VS_ARG_MASK) { ++ if ((mode & VS_IDENT) && (id == cid)) ++ return 1; ++ } ++ if (mode & VS_ATR_MASK) { ++ if ((mode & VS_DYNAMIC) && ++ (id >= MIN_D_CONTEXT) && ++ (id <= MAX_S_CONTEXT)) ++ return 1; ++ if ((mode & VS_STATIC) && ++ (id > 1) && (id < MIN_D_CONTEXT)) ++ return 1; ++ } ++ if (mode & VS_IRQ_MASK) { ++ if ((mode & VS_IRQ) && unlikely(in_interrupt())) ++ return 1; ++ if ((mode & VS_HARDIRQ) && unlikely(in_irq())) ++ return 1; ++ if ((mode & VS_SOFTIRQ) && unlikely(in_softirq())) ++ return 1; ++ } ++ return (((mode & VS_ADMIN) && (cid == 0)) || ++ ((mode & VS_WATCH) && (cid == 1)) || ++ ((mode & VS_HOSTID) && (id == 0))); ++} ++ ++#define vx_check(c, m) __vs_check(vx_current_xid(), c, (m) | VS_IRQ) ++ ++#define vx_weak_check(c, m) ((m) ? vx_check(c, m) : 1) ++ ++ ++#define nx_check(c, m) __vs_check(nx_current_nid(), c, m) ++ ++#define nx_weak_check(c, m) ((m) ? nx_check(c, m) : 1) ++ ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/context_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/context_cmd.h +--- linux-2.6.31.6/include/linux/vserver/context_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/context_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,128 @@ ++#ifndef _VX_CONTEXT_CMD_H ++#define _VX_CONTEXT_CMD_H ++ ++ ++/* vinfo commands */ ++ ++#define VCMD_task_xid VC_CMD(VINFO, 1, 0) ++ ++#ifdef __KERNEL__ ++extern int vc_task_xid(uint32_t); ++ ++#endif /* __KERNEL__ */ ++ ++#define VCMD_vx_info VC_CMD(VINFO, 5, 0) ++ ++struct vcmd_vx_info_v0 { ++ uint32_t xid; ++ uint32_t initpid; ++ /* more to come */ ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_vx_info(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++#define VCMD_ctx_stat VC_CMD(VSTAT, 0, 0) ++ ++struct vcmd_ctx_stat_v0 { ++ uint32_t usecnt; ++ uint32_t tasks; ++ /* more to come */ ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_ctx_stat(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++/* context commands */ ++ ++#define VCMD_ctx_create_v0 VC_CMD(VPROC, 1, 0) ++#define VCMD_ctx_create VC_CMD(VPROC, 1, 1) ++ ++struct vcmd_ctx_create { ++ uint64_t flagword; ++}; ++ ++#define VCMD_ctx_migrate_v0 VC_CMD(PROCMIG, 1, 0) ++#define VCMD_ctx_migrate VC_CMD(PROCMIG, 1, 1) ++ ++struct vcmd_ctx_migrate { ++ uint64_t flagword; ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_ctx_create(uint32_t, void __user *); ++extern int vc_ctx_migrate(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++ ++/* flag commands */ ++ ++#define VCMD_get_cflags VC_CMD(FLAGS, 1, 0) ++#define VCMD_set_cflags VC_CMD(FLAGS, 2, 0) ++ ++struct vcmd_ctx_flags_v0 { ++ uint64_t flagword; ++ uint64_t mask; ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_get_cflags(struct vx_info *, void __user *); ++extern int vc_set_cflags(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++ ++/* context caps commands */ ++ ++#define VCMD_get_ccaps VC_CMD(FLAGS, 3, 1) ++#define VCMD_set_ccaps VC_CMD(FLAGS, 4, 1) ++ ++struct vcmd_ctx_caps_v1 { ++ uint64_t ccaps; ++ uint64_t cmask; ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_get_ccaps(struct vx_info *, void __user *); ++extern int vc_set_ccaps(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++ ++/* bcaps commands */ ++ ++#define VCMD_get_bcaps VC_CMD(FLAGS, 9, 0) ++#define VCMD_set_bcaps VC_CMD(FLAGS, 10, 0) ++ ++struct vcmd_bcaps { ++ uint64_t bcaps; ++ uint64_t bmask; ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_get_bcaps(struct vx_info *, void __user *); ++extern int vc_set_bcaps(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++ ++/* OOM badness */ ++ ++#define VCMD_get_badness VC_CMD(MEMCTRL, 5, 0) ++#define VCMD_set_badness VC_CMD(MEMCTRL, 6, 0) ++ ++struct vcmd_badness_v0 { ++ int64_t bias; ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_get_badness(struct vx_info *, void __user *); ++extern int vc_set_badness(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_CONTEXT_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/context.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/context.h +--- linux-2.6.31.6/include/linux/vserver/context.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/context.h 2009-10-03 01:55:20.000000000 +0200 +@@ -0,0 +1,182 @@ ++#ifndef _VX_CONTEXT_H ++#define _VX_CONTEXT_H ++ ++#include ++#include ++ ++ ++/* context flags */ ++ ++#define VXF_INFO_SCHED 0x00000002 ++#define VXF_INFO_NPROC 0x00000004 ++#define VXF_INFO_PRIVATE 0x00000008 ++ ++#define VXF_INFO_INIT 0x00000010 ++#define VXF_INFO_HIDE 0x00000020 ++#define VXF_INFO_ULIMIT 0x00000040 ++#define VXF_INFO_NSPACE 0x00000080 ++ ++#define VXF_SCHED_HARD 0x00000100 ++#define VXF_SCHED_PRIO 0x00000200 ++#define VXF_SCHED_PAUSE 0x00000400 ++ ++#define VXF_VIRT_MEM 0x00010000 ++#define VXF_VIRT_UPTIME 0x00020000 ++#define VXF_VIRT_CPU 0x00040000 ++#define VXF_VIRT_LOAD 0x00080000 ++#define VXF_VIRT_TIME 0x00100000 ++ ++#define VXF_HIDE_MOUNT 0x01000000 ++/* was VXF_HIDE_NETIF 0x02000000 */ ++#define VXF_HIDE_VINFO 0x04000000 ++ ++#define VXF_STATE_SETUP (1ULL << 32) ++#define VXF_STATE_INIT (1ULL << 33) ++#define VXF_STATE_ADMIN (1ULL << 34) ++ ++#define VXF_SC_HELPER (1ULL << 36) ++#define VXF_REBOOT_KILL (1ULL << 37) ++#define VXF_PERSISTENT (1ULL << 38) ++ ++#define VXF_FORK_RSS (1ULL << 48) ++#define VXF_PROLIFIC (1ULL << 49) ++ ++#define VXF_IGNEG_NICE (1ULL << 52) ++ ++#define VXF_ONE_TIME (0x0007ULL << 32) ++ ++#define VXF_INIT_SET (VXF_STATE_SETUP | VXF_STATE_INIT | VXF_STATE_ADMIN) ++ ++ ++/* context migration */ ++ ++#define VXM_SET_INIT 0x00000001 ++#define VXM_SET_REAPER 0x00000002 ++ ++/* context caps */ ++ ++#define VXC_CAP_MASK 0x00000000 ++ ++#define VXC_SET_UTSNAME 0x00000001 ++#define VXC_SET_RLIMIT 0x00000002 ++#define VXC_FS_SECURITY 0x00000004 ++ ++/* was VXC_RAW_ICMP 0x00000100 */ ++#define VXC_SYSLOG 0x00001000 ++#define VXC_OOM_ADJUST 0x00002000 ++#define VXC_AUDIT_CONTROL 0x00004000 ++ ++#define VXC_SECURE_MOUNT 0x00010000 ++#define VXC_SECURE_REMOUNT 0x00020000 ++#define VXC_BINARY_MOUNT 0x00040000 ++ ++#define VXC_QUOTA_CTL 0x00100000 ++#define VXC_ADMIN_MAPPER 0x00200000 ++#define VXC_ADMIN_CLOOP 0x00400000 ++ ++#define VXC_KTHREAD 0x01000000 ++#define VXC_NAMESPACE 0x02000000 ++ ++ ++#ifdef __KERNEL__ ++ ++#include ++#include ++#include ++ ++#include "limit_def.h" ++#include "sched_def.h" ++#include "cvirt_def.h" ++#include "cacct_def.h" ++#include "device_def.h" ++ ++#define VX_SPACES 2 ++ ++struct _vx_info_pc { ++ struct _vx_sched_pc sched_pc; ++ struct _vx_cvirt_pc cvirt_pc; ++}; ++ ++struct vx_info { ++ struct hlist_node vx_hlist; /* linked list of contexts */ ++ xid_t vx_id; /* context id */ ++ atomic_t vx_usecnt; /* usage count */ ++ atomic_t vx_tasks; /* tasks count */ ++ struct vx_info *vx_parent; /* parent context */ ++ int vx_state; /* context state */ ++ ++ unsigned long vx_nsmask[VX_SPACES]; /* assignment mask */ ++ struct nsproxy *vx_nsproxy[VX_SPACES]; /* private namespaces */ ++ struct fs_struct *vx_fs[VX_SPACES]; /* private namespace fs */ ++ ++ uint64_t vx_flags; /* context flags */ ++ uint64_t vx_ccaps; /* context caps (vserver) */ ++ kernel_cap_t vx_bcaps; /* bounding caps (system) */ ++ // kernel_cap_t vx_cap_bset; /* the guest's bset */ ++ ++ struct task_struct *vx_reaper; /* guest reaper process */ ++ pid_t vx_initpid; /* PID of guest init */ ++ int64_t vx_badness_bias; /* OOM points bias */ ++ ++ struct _vx_limit limit; /* vserver limits */ ++ struct _vx_sched sched; /* vserver scheduler */ ++ struct _vx_cvirt cvirt; /* virtual/bias stuff */ ++ struct _vx_cacct cacct; /* context accounting */ ++ ++ struct _vx_device dmap; /* default device map targets */ ++ ++#ifndef CONFIG_SMP ++ struct _vx_info_pc info_pc; /* per cpu data */ ++#else ++ struct _vx_info_pc *ptr_pc; /* per cpu array */ ++#endif ++ ++ wait_queue_head_t vx_wait; /* context exit waitqueue */ ++ int reboot_cmd; /* last sys_reboot() cmd */ ++ int exit_code; /* last process exit code */ ++ ++ char vx_name[65]; /* vserver name */ ++}; ++ ++#ifndef CONFIG_SMP ++#define vx_ptr_pc(vxi) (&(vxi)->info_pc) ++#define vx_per_cpu(vxi, v, id) vx_ptr_pc(vxi)->v ++#else ++#define vx_ptr_pc(vxi) ((vxi)->ptr_pc) ++#define vx_per_cpu(vxi, v, id) per_cpu_ptr(vx_ptr_pc(vxi), id)->v ++#endif ++ ++#define vx_cpu(vxi, v) vx_per_cpu(vxi, v, smp_processor_id()) ++ ++ ++struct vx_info_save { ++ struct vx_info *vxi; ++ xid_t xid; ++}; ++ ++ ++/* status flags */ ++ ++#define VXS_HASHED 0x0001 ++#define VXS_PAUSED 0x0010 ++#define VXS_SHUTDOWN 0x0100 ++#define VXS_HELPER 0x1000 ++#define VXS_RELEASED 0x8000 ++ ++ ++extern void claim_vx_info(struct vx_info *, struct task_struct *); ++extern void release_vx_info(struct vx_info *, struct task_struct *); ++ ++extern struct vx_info *lookup_vx_info(int); ++extern struct vx_info *lookup_or_create_vx_info(int); ++ ++extern int get_xid_list(int, unsigned int *, int); ++extern int xid_is_hashed(xid_t); ++ ++extern int vx_migrate_task(struct task_struct *, struct vx_info *, int); ++ ++extern long vs_state_change(struct vx_info *, unsigned int); ++ ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_CONTEXT_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/cvirt_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cvirt_cmd.h +--- linux-2.6.31.6/include/linux/vserver/cvirt_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cvirt_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,53 @@ ++#ifndef _VX_CVIRT_CMD_H ++#define _VX_CVIRT_CMD_H ++ ++ ++/* virtual host info name commands */ ++ ++#define VCMD_set_vhi_name VC_CMD(VHOST, 1, 0) ++#define VCMD_get_vhi_name VC_CMD(VHOST, 2, 0) ++ ++struct vcmd_vhi_name_v0 { ++ uint32_t field; ++ char name[65]; ++}; ++ ++ ++enum vhi_name_field { ++ VHIN_CONTEXT = 0, ++ VHIN_SYSNAME, ++ VHIN_NODENAME, ++ VHIN_RELEASE, ++ VHIN_VERSION, ++ VHIN_MACHINE, ++ VHIN_DOMAINNAME, ++}; ++ ++ ++#ifdef __KERNEL__ ++ ++#include ++ ++extern int vc_set_vhi_name(struct vx_info *, void __user *); ++extern int vc_get_vhi_name(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++#define VCMD_virt_stat VC_CMD(VSTAT, 3, 0) ++ ++struct vcmd_virt_stat_v0 { ++ uint64_t offset; ++ uint64_t uptime; ++ uint32_t nr_threads; ++ uint32_t nr_running; ++ uint32_t nr_uninterruptible; ++ uint32_t nr_onhold; ++ uint32_t nr_forks; ++ uint32_t load[3]; ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_virt_stat(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_CVIRT_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/cvirt_def.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cvirt_def.h +--- linux-2.6.31.6/include/linux/vserver/cvirt_def.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cvirt_def.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,80 @@ ++#ifndef _VX_CVIRT_DEF_H ++#define _VX_CVIRT_DEF_H ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++struct _vx_usage_stat { ++ uint64_t user; ++ uint64_t nice; ++ uint64_t system; ++ uint64_t softirq; ++ uint64_t irq; ++ uint64_t idle; ++ uint64_t iowait; ++}; ++ ++struct _vx_syslog { ++ wait_queue_head_t log_wait; ++ spinlock_t logbuf_lock; /* lock for the log buffer */ ++ ++ unsigned long log_start; /* next char to be read by syslog() */ ++ unsigned long con_start; /* next char to be sent to consoles */ ++ unsigned long log_end; /* most-recently-written-char + 1 */ ++ unsigned long logged_chars; /* #chars since last read+clear operation */ ++ ++ char log_buf[1024]; ++}; ++ ++ ++/* context sub struct */ ++ ++struct _vx_cvirt { ++ atomic_t nr_threads; /* number of current threads */ ++ atomic_t nr_running; /* number of running threads */ ++ atomic_t nr_uninterruptible; /* number of uninterruptible threads */ ++ ++ atomic_t nr_onhold; /* processes on hold */ ++ uint32_t onhold_last; /* jiffies when put on hold */ ++ ++ struct timeval bias_tv; /* time offset to the host */ ++ struct timespec bias_idle; ++ struct timespec bias_uptime; /* context creation point */ ++ uint64_t bias_clock; /* offset in clock_t */ ++ ++ spinlock_t load_lock; /* lock for the load averages */ ++ atomic_t load_updates; /* nr of load updates done so far */ ++ uint32_t load_last; /* last time load was calculated */ ++ uint32_t load[3]; /* load averages 1,5,15 */ ++ ++ atomic_t total_forks; /* number of forks so far */ ++ ++ struct _vx_syslog syslog; ++}; ++ ++struct _vx_cvirt_pc { ++ struct _vx_usage_stat cpustat; ++}; ++ ++ ++#ifdef CONFIG_VSERVER_DEBUG ++ ++static inline void __dump_vx_cvirt(struct _vx_cvirt *cvirt) ++{ ++ printk("\t_vx_cvirt:\n"); ++ printk("\t threads: %4d, %4d, %4d, %4d\n", ++ atomic_read(&cvirt->nr_threads), ++ atomic_read(&cvirt->nr_running), ++ atomic_read(&cvirt->nr_uninterruptible), ++ atomic_read(&cvirt->nr_onhold)); ++ /* add rest here */ ++ printk("\t total_forks = %d\n", atomic_read(&cvirt->total_forks)); ++} ++ ++#endif ++ ++#endif /* _VX_CVIRT_DEF_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/cvirt.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cvirt.h +--- linux-2.6.31.6/include/linux/vserver/cvirt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/cvirt.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,20 @@ ++#ifndef _VX_CVIRT_H ++#define _VX_CVIRT_H ++ ++ ++#ifdef __KERNEL__ ++ ++struct timespec; ++ ++void vx_vsi_uptime(struct timespec *, struct timespec *); ++ ++ ++struct vx_info; ++ ++void vx_update_load(struct vx_info *); ++ ++ ++int vx_do_syslog(int, char __user *, int); ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_CVIRT_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/debug_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/debug_cmd.h +--- linux-2.6.31.6/include/linux/vserver/debug_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/debug_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,58 @@ ++#ifndef _VX_DEBUG_CMD_H ++#define _VX_DEBUG_CMD_H ++ ++ ++/* debug commands */ ++ ++#define VCMD_dump_history VC_CMD(DEBUG, 1, 0) ++ ++#define VCMD_read_history VC_CMD(DEBUG, 5, 0) ++#define VCMD_read_monitor VC_CMD(DEBUG, 6, 0) ++ ++struct vcmd_read_history_v0 { ++ uint32_t index; ++ uint32_t count; ++ char __user *data; ++}; ++ ++struct vcmd_read_monitor_v0 { ++ uint32_t index; ++ uint32_t count; ++ char __user *data; ++}; ++ ++ ++#ifdef __KERNEL__ ++ ++#ifdef CONFIG_COMPAT ++ ++#include ++ ++struct vcmd_read_history_v0_x32 { ++ uint32_t index; ++ uint32_t count; ++ compat_uptr_t data_ptr; ++}; ++ ++struct vcmd_read_monitor_v0_x32 { ++ uint32_t index; ++ uint32_t count; ++ compat_uptr_t data_ptr; ++}; ++ ++#endif /* CONFIG_COMPAT */ ++ ++extern int vc_dump_history(uint32_t); ++ ++extern int vc_read_history(uint32_t, void __user *); ++extern int vc_read_monitor(uint32_t, void __user *); ++ ++#ifdef CONFIG_COMPAT ++ ++extern int vc_read_history_x32(uint32_t, void __user *); ++extern int vc_read_monitor_x32(uint32_t, void __user *); ++ ++#endif /* CONFIG_COMPAT */ ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_DEBUG_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/debug.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/debug.h +--- linux-2.6.31.6/include/linux/vserver/debug.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/debug.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,127 @@ ++#ifndef _VX_DEBUG_H ++#define _VX_DEBUG_H ++ ++ ++#define VXD_CBIT(n, m) (vx_debug_ ## n & (1 << (m))) ++#define VXD_CMIN(n, m) (vx_debug_ ## n > (m)) ++#define VXD_MASK(n, m) (vx_debug_ ## n & (m)) ++ ++#define VXD_DEV(d) (d), (d)->bd_inode->i_ino, \ ++ imajor((d)->bd_inode), iminor((d)->bd_inode) ++#define VXF_DEV "%p[%lu,%d:%d]" ++ ++ ++#define vxd_path(p) \ ++ ({ static char _buffer[PATH_MAX]; \ ++ d_path(p, _buffer, sizeof(_buffer)); }) ++ ++#define vxd_cond_path(n) \ ++ ((n) ? vxd_path(&(n)->path) : "" ) ++ ++ ++#ifdef CONFIG_VSERVER_DEBUG ++ ++extern unsigned int vx_debug_switch; ++extern unsigned int vx_debug_xid; ++extern unsigned int vx_debug_nid; ++extern unsigned int vx_debug_tag; ++extern unsigned int vx_debug_net; ++extern unsigned int vx_debug_limit; ++extern unsigned int vx_debug_cres; ++extern unsigned int vx_debug_dlim; ++extern unsigned int vx_debug_quota; ++extern unsigned int vx_debug_cvirt; ++extern unsigned int vx_debug_space; ++extern unsigned int vx_debug_misc; ++ ++ ++#define VX_LOGLEVEL "vxD: " ++#define VX_PROC_FMT "%p: " ++#define VX_PROCESS current ++ ++#define vxdprintk(c, f, x...) \ ++ do { \ ++ if (c) \ ++ printk(VX_LOGLEVEL VX_PROC_FMT f "\n", \ ++ VX_PROCESS , ##x); \ ++ } while (0) ++ ++#define vxlprintk(c, f, x...) \ ++ do { \ ++ if (c) \ ++ printk(VX_LOGLEVEL f " @%s:%d\n", x); \ ++ } while (0) ++ ++#define vxfprintk(c, f, x...) \ ++ do { \ ++ if (c) \ ++ printk(VX_LOGLEVEL f " %s@%s:%d\n", x); \ ++ } while (0) ++ ++ ++struct vx_info; ++ ++void dump_vx_info(struct vx_info *, int); ++void dump_vx_info_inactive(int); ++ ++#else /* CONFIG_VSERVER_DEBUG */ ++ ++#define vx_debug_switch 0 ++#define vx_debug_xid 0 ++#define vx_debug_nid 0 ++#define vx_debug_tag 0 ++#define vx_debug_net 0 ++#define vx_debug_limit 0 ++#define vx_debug_cres 0 ++#define vx_debug_dlim 0 ++#define vx_debug_cvirt 0 ++ ++#define vxdprintk(x...) do { } while (0) ++#define vxlprintk(x...) do { } while (0) ++#define vxfprintk(x...) do { } while (0) ++ ++#endif /* CONFIG_VSERVER_DEBUG */ ++ ++ ++#ifdef CONFIG_VSERVER_WARN ++ ++#define VX_WARNLEVEL KERN_WARNING "vxW: " ++#define VX_WARN_TASK "[»%s«,%u:#%u|%u|%u] " ++#define VX_WARN_XID "[xid #%u] " ++#define VX_WARN_NID "[nid #%u] " ++#define VX_WARN_TAG "[tag #%u] " ++ ++#define vxwprintk(c, f, x...) \ ++ do { \ ++ if (c) \ ++ printk(VX_WARNLEVEL f "\n", ##x); \ ++ } while (0) ++ ++#else /* CONFIG_VSERVER_WARN */ ++ ++#define vxwprintk(x...) do { } while (0) ++ ++#endif /* CONFIG_VSERVER_WARN */ ++ ++#define vxwprintk_task(c, f, x...) \ ++ vxwprintk(c, VX_WARN_TASK f, \ ++ current->comm, current->pid, \ ++ current->xid, current->nid, current->tag, ##x) ++#define vxwprintk_xid(c, f, x...) \ ++ vxwprintk(c, VX_WARN_XID f, current->xid, x) ++#define vxwprintk_nid(c, f, x...) \ ++ vxwprintk(c, VX_WARN_NID f, current->nid, x) ++#define vxwprintk_tag(c, f, x...) \ ++ vxwprintk(c, VX_WARN_TAG f, current->tag, x) ++ ++#ifdef CONFIG_VSERVER_DEBUG ++#define vxd_assert_lock(l) assert_spin_locked(l) ++#define vxd_assert(c, f, x...) vxlprintk(!(c), \ ++ "assertion [" f "] failed.", ##x, __FILE__, __LINE__) ++#else ++#define vxd_assert_lock(l) do { } while (0) ++#define vxd_assert(c, f, x...) do { } while (0) ++#endif ++ ++ ++#endif /* _VX_DEBUG_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/device_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/device_cmd.h +--- linux-2.6.31.6/include/linux/vserver/device_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/device_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,44 @@ ++#ifndef _VX_DEVICE_CMD_H ++#define _VX_DEVICE_CMD_H ++ ++ ++/* device vserver commands */ ++ ++#define VCMD_set_mapping VC_CMD(DEVICE, 1, 0) ++#define VCMD_unset_mapping VC_CMD(DEVICE, 2, 0) ++ ++struct vcmd_set_mapping_v0 { ++ const char __user *device; ++ const char __user *target; ++ uint32_t flags; ++}; ++ ++ ++#ifdef __KERNEL__ ++ ++#ifdef CONFIG_COMPAT ++ ++#include ++ ++struct vcmd_set_mapping_v0_x32 { ++ compat_uptr_t device_ptr; ++ compat_uptr_t target_ptr; ++ uint32_t flags; ++}; ++ ++#endif /* CONFIG_COMPAT */ ++ ++#include ++ ++extern int vc_set_mapping(struct vx_info *, void __user *); ++extern int vc_unset_mapping(struct vx_info *, void __user *); ++ ++#ifdef CONFIG_COMPAT ++ ++extern int vc_set_mapping_x32(struct vx_info *, void __user *); ++extern int vc_unset_mapping_x32(struct vx_info *, void __user *); ++ ++#endif /* CONFIG_COMPAT */ ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_DEVICE_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/device_def.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/device_def.h +--- linux-2.6.31.6/include/linux/vserver/device_def.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/device_def.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,17 @@ ++#ifndef _VX_DEVICE_DEF_H ++#define _VX_DEVICE_DEF_H ++ ++#include ++ ++struct vx_dmap_target { ++ dev_t target; ++ uint32_t flags; ++}; ++ ++struct _vx_device { ++#ifdef CONFIG_VSERVER_DEVICE ++ struct vx_dmap_target targets[2]; ++#endif ++}; ++ ++#endif /* _VX_DEVICE_DEF_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/device.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/device.h +--- linux-2.6.31.6/include/linux/vserver/device.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/device.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,15 @@ ++#ifndef _VX_DEVICE_H ++#define _VX_DEVICE_H ++ ++ ++#define DATTR_CREATE 0x00000001 ++#define DATTR_OPEN 0x00000002 ++ ++#define DATTR_REMAP 0x00000010 ++ ++#define DATTR_MASK 0x00000013 ++ ++ ++#else /* _VX_DEVICE_H */ ++#warning duplicate inclusion ++#endif /* _VX_DEVICE_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/dlimit_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/dlimit_cmd.h +--- linux-2.6.31.6/include/linux/vserver/dlimit_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/dlimit_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,74 @@ ++#ifndef _VX_DLIMIT_CMD_H ++#define _VX_DLIMIT_CMD_H ++ ++ ++/* dlimit vserver commands */ ++ ++#define VCMD_add_dlimit VC_CMD(DLIMIT, 1, 0) ++#define VCMD_rem_dlimit VC_CMD(DLIMIT, 2, 0) ++ ++#define VCMD_set_dlimit VC_CMD(DLIMIT, 5, 0) ++#define VCMD_get_dlimit VC_CMD(DLIMIT, 6, 0) ++ ++struct vcmd_ctx_dlimit_base_v0 { ++ const char __user *name; ++ uint32_t flags; ++}; ++ ++struct vcmd_ctx_dlimit_v0 { ++ const char __user *name; ++ uint32_t space_used; /* used space in kbytes */ ++ uint32_t space_total; /* maximum space in kbytes */ ++ uint32_t inodes_used; /* used inodes */ ++ uint32_t inodes_total; /* maximum inodes */ ++ uint32_t reserved; /* reserved for root in % */ ++ uint32_t flags; ++}; ++ ++#define CDLIM_UNSET ((uint32_t)0UL) ++#define CDLIM_INFINITY ((uint32_t)~0UL) ++#define CDLIM_KEEP ((uint32_t)~1UL) ++ ++#ifdef __KERNEL__ ++ ++#ifdef CONFIG_COMPAT ++ ++#include ++ ++struct vcmd_ctx_dlimit_base_v0_x32 { ++ compat_uptr_t name_ptr; ++ uint32_t flags; ++}; ++ ++struct vcmd_ctx_dlimit_v0_x32 { ++ compat_uptr_t name_ptr; ++ uint32_t space_used; /* used space in kbytes */ ++ uint32_t space_total; /* maximum space in kbytes */ ++ uint32_t inodes_used; /* used inodes */ ++ uint32_t inodes_total; /* maximum inodes */ ++ uint32_t reserved; /* reserved for root in % */ ++ uint32_t flags; ++}; ++ ++#endif /* CONFIG_COMPAT */ ++ ++#include ++ ++extern int vc_add_dlimit(uint32_t, void __user *); ++extern int vc_rem_dlimit(uint32_t, void __user *); ++ ++extern int vc_set_dlimit(uint32_t, void __user *); ++extern int vc_get_dlimit(uint32_t, void __user *); ++ ++#ifdef CONFIG_COMPAT ++ ++extern int vc_add_dlimit_x32(uint32_t, void __user *); ++extern int vc_rem_dlimit_x32(uint32_t, void __user *); ++ ++extern int vc_set_dlimit_x32(uint32_t, void __user *); ++extern int vc_get_dlimit_x32(uint32_t, void __user *); ++ ++#endif /* CONFIG_COMPAT */ ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_DLIMIT_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/dlimit.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/dlimit.h +--- linux-2.6.31.6/include/linux/vserver/dlimit.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/dlimit.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,54 @@ ++#ifndef _VX_DLIMIT_H ++#define _VX_DLIMIT_H ++ ++#include "switch.h" ++ ++ ++#ifdef __KERNEL__ ++ ++/* keep in sync with CDLIM_INFINITY */ ++ ++#define DLIM_INFINITY (~0ULL) ++ ++#include ++#include ++ ++struct super_block; ++ ++struct dl_info { ++ struct hlist_node dl_hlist; /* linked list of contexts */ ++ struct rcu_head dl_rcu; /* the rcu head */ ++ tag_t dl_tag; /* context tag */ ++ atomic_t dl_usecnt; /* usage count */ ++ atomic_t dl_refcnt; /* reference count */ ++ ++ struct super_block *dl_sb; /* associated superblock */ ++ ++ spinlock_t dl_lock; /* protect the values */ ++ ++ unsigned long long dl_space_used; /* used space in bytes */ ++ unsigned long long dl_space_total; /* maximum space in bytes */ ++ unsigned long dl_inodes_used; /* used inodes */ ++ unsigned long dl_inodes_total; /* maximum inodes */ ++ ++ unsigned int dl_nrlmult; /* non root limit mult */ ++}; ++ ++struct rcu_head; ++ ++extern void rcu_free_dl_info(struct rcu_head *); ++extern void unhash_dl_info(struct dl_info *); ++ ++extern struct dl_info *locate_dl_info(struct super_block *, tag_t); ++ ++ ++struct kstatfs; ++ ++extern void vx_vsi_statfs(struct super_block *, struct kstatfs *); ++ ++typedef uint64_t dlsize_t; ++ ++#endif /* __KERNEL__ */ ++#else /* _VX_DLIMIT_H */ ++#warning duplicate inclusion ++#endif /* _VX_DLIMIT_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/global.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/global.h +--- linux-2.6.31.6/include/linux/vserver/global.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/global.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,19 @@ ++#ifndef _VX_GLOBAL_H ++#define _VX_GLOBAL_H ++ ++ ++extern atomic_t vx_global_ctotal; ++extern atomic_t vx_global_cactive; ++ ++extern atomic_t nx_global_ctotal; ++extern atomic_t nx_global_cactive; ++ ++extern atomic_t vs_global_nsproxy; ++extern atomic_t vs_global_fs; ++extern atomic_t vs_global_mnt_ns; ++extern atomic_t vs_global_uts_ns; ++extern atomic_t vs_global_user_ns; ++extern atomic_t vs_global_pid_ns; ++ ++ ++#endif /* _VX_GLOBAL_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/history.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/history.h +--- linux-2.6.31.6/include/linux/vserver/history.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/history.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,197 @@ ++#ifndef _VX_HISTORY_H ++#define _VX_HISTORY_H ++ ++ ++enum { ++ VXH_UNUSED = 0, ++ VXH_THROW_OOPS = 1, ++ ++ VXH_GET_VX_INFO, ++ VXH_PUT_VX_INFO, ++ VXH_INIT_VX_INFO, ++ VXH_SET_VX_INFO, ++ VXH_CLR_VX_INFO, ++ VXH_CLAIM_VX_INFO, ++ VXH_RELEASE_VX_INFO, ++ VXH_ALLOC_VX_INFO, ++ VXH_DEALLOC_VX_INFO, ++ VXH_HASH_VX_INFO, ++ VXH_UNHASH_VX_INFO, ++ VXH_LOC_VX_INFO, ++ VXH_LOOKUP_VX_INFO, ++ VXH_CREATE_VX_INFO, ++}; ++ ++struct _vxhe_vxi { ++ struct vx_info *ptr; ++ unsigned xid; ++ unsigned usecnt; ++ unsigned tasks; ++}; ++ ++struct _vxhe_set_clr { ++ void *data; ++}; ++ ++struct _vxhe_loc_lookup { ++ unsigned arg; ++}; ++ ++struct _vx_hist_entry { ++ void *loc; ++ unsigned short seq; ++ unsigned short type; ++ struct _vxhe_vxi vxi; ++ union { ++ struct _vxhe_set_clr sc; ++ struct _vxhe_loc_lookup ll; ++ }; ++}; ++ ++#ifdef CONFIG_VSERVER_HISTORY ++ ++extern unsigned volatile int vxh_active; ++ ++struct _vx_hist_entry *vxh_advance(void *loc); ++ ++ ++static inline ++void __vxh_copy_vxi(struct _vx_hist_entry *entry, struct vx_info *vxi) ++{ ++ entry->vxi.ptr = vxi; ++ if (vxi) { ++ entry->vxi.usecnt = atomic_read(&vxi->vx_usecnt); ++ entry->vxi.tasks = atomic_read(&vxi->vx_tasks); ++ entry->vxi.xid = vxi->vx_id; ++ } ++} ++ ++ ++#define __HERE__ current_text_addr() ++ ++#define __VXH_BODY(__type, __data, __here) \ ++ struct _vx_hist_entry *entry; \ ++ \ ++ preempt_disable(); \ ++ entry = vxh_advance(__here); \ ++ __data; \ ++ entry->type = __type; \ ++ preempt_enable(); ++ ++ ++ /* pass vxi only */ ++ ++#define __VXH_SMPL \ ++ __vxh_copy_vxi(entry, vxi) ++ ++static inline ++void __vxh_smpl(struct vx_info *vxi, int __type, void *__here) ++{ ++ __VXH_BODY(__type, __VXH_SMPL, __here) ++} ++ ++ /* pass vxi and data (void *) */ ++ ++#define __VXH_DATA \ ++ __vxh_copy_vxi(entry, vxi); \ ++ entry->sc.data = data ++ ++static inline ++void __vxh_data(struct vx_info *vxi, void *data, ++ int __type, void *__here) ++{ ++ __VXH_BODY(__type, __VXH_DATA, __here) ++} ++ ++ /* pass vxi and arg (long) */ ++ ++#define __VXH_LONG \ ++ __vxh_copy_vxi(entry, vxi); \ ++ entry->ll.arg = arg ++ ++static inline ++void __vxh_long(struct vx_info *vxi, long arg, ++ int __type, void *__here) ++{ ++ __VXH_BODY(__type, __VXH_LONG, __here) ++} ++ ++ ++static inline ++void __vxh_throw_oops(void *__here) ++{ ++ __VXH_BODY(VXH_THROW_OOPS, {}, __here); ++ /* prevent further acquisition */ ++ vxh_active = 0; ++} ++ ++ ++#define vxh_throw_oops() __vxh_throw_oops(__HERE__); ++ ++#define __vxh_get_vx_info(v, h) __vxh_smpl(v, VXH_GET_VX_INFO, h); ++#define __vxh_put_vx_info(v, h) __vxh_smpl(v, VXH_PUT_VX_INFO, h); ++ ++#define __vxh_init_vx_info(v, d, h) \ ++ __vxh_data(v, d, VXH_INIT_VX_INFO, h); ++#define __vxh_set_vx_info(v, d, h) \ ++ __vxh_data(v, d, VXH_SET_VX_INFO, h); ++#define __vxh_clr_vx_info(v, d, h) \ ++ __vxh_data(v, d, VXH_CLR_VX_INFO, h); ++ ++#define __vxh_claim_vx_info(v, d, h) \ ++ __vxh_data(v, d, VXH_CLAIM_VX_INFO, h); ++#define __vxh_release_vx_info(v, d, h) \ ++ __vxh_data(v, d, VXH_RELEASE_VX_INFO, h); ++ ++#define vxh_alloc_vx_info(v) \ ++ __vxh_smpl(v, VXH_ALLOC_VX_INFO, __HERE__); ++#define vxh_dealloc_vx_info(v) \ ++ __vxh_smpl(v, VXH_DEALLOC_VX_INFO, __HERE__); ++ ++#define vxh_hash_vx_info(v) \ ++ __vxh_smpl(v, VXH_HASH_VX_INFO, __HERE__); ++#define vxh_unhash_vx_info(v) \ ++ __vxh_smpl(v, VXH_UNHASH_VX_INFO, __HERE__); ++ ++#define vxh_loc_vx_info(v, l) \ ++ __vxh_long(v, l, VXH_LOC_VX_INFO, __HERE__); ++#define vxh_lookup_vx_info(v, l) \ ++ __vxh_long(v, l, VXH_LOOKUP_VX_INFO, __HERE__); ++#define vxh_create_vx_info(v, l) \ ++ __vxh_long(v, l, VXH_CREATE_VX_INFO, __HERE__); ++ ++extern void vxh_dump_history(void); ++ ++ ++#else /* CONFIG_VSERVER_HISTORY */ ++ ++#define __HERE__ 0 ++ ++#define vxh_throw_oops() do { } while (0) ++ ++#define __vxh_get_vx_info(v, h) do { } while (0) ++#define __vxh_put_vx_info(v, h) do { } while (0) ++ ++#define __vxh_init_vx_info(v, d, h) do { } while (0) ++#define __vxh_set_vx_info(v, d, h) do { } while (0) ++#define __vxh_clr_vx_info(v, d, h) do { } while (0) ++ ++#define __vxh_claim_vx_info(v, d, h) do { } while (0) ++#define __vxh_release_vx_info(v, d, h) do { } while (0) ++ ++#define vxh_alloc_vx_info(v) do { } while (0) ++#define vxh_dealloc_vx_info(v) do { } while (0) ++ ++#define vxh_hash_vx_info(v) do { } while (0) ++#define vxh_unhash_vx_info(v) do { } while (0) ++ ++#define vxh_loc_vx_info(v, l) do { } while (0) ++#define vxh_lookup_vx_info(v, l) do { } while (0) ++#define vxh_create_vx_info(v, l) do { } while (0) ++ ++#define vxh_dump_history() do { } while (0) ++ ++ ++#endif /* CONFIG_VSERVER_HISTORY */ ++ ++#endif /* _VX_HISTORY_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/inode_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/inode_cmd.h +--- linux-2.6.31.6/include/linux/vserver/inode_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/inode_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,59 @@ ++#ifndef _VX_INODE_CMD_H ++#define _VX_INODE_CMD_H ++ ++ ++/* inode vserver commands */ ++ ++#define VCMD_get_iattr VC_CMD(INODE, 1, 1) ++#define VCMD_set_iattr VC_CMD(INODE, 2, 1) ++ ++#define VCMD_fget_iattr VC_CMD(INODE, 3, 0) ++#define VCMD_fset_iattr VC_CMD(INODE, 4, 0) ++ ++struct vcmd_ctx_iattr_v1 { ++ const char __user *name; ++ uint32_t tag; ++ uint32_t flags; ++ uint32_t mask; ++}; ++ ++struct vcmd_ctx_fiattr_v0 { ++ uint32_t tag; ++ uint32_t flags; ++ uint32_t mask; ++}; ++ ++ ++#ifdef __KERNEL__ ++ ++ ++#ifdef CONFIG_COMPAT ++ ++#include ++ ++struct vcmd_ctx_iattr_v1_x32 { ++ compat_uptr_t name_ptr; ++ uint32_t tag; ++ uint32_t flags; ++ uint32_t mask; ++}; ++ ++#endif /* CONFIG_COMPAT */ ++ ++#include ++ ++extern int vc_get_iattr(void __user *); ++extern int vc_set_iattr(void __user *); ++ ++extern int vc_fget_iattr(uint32_t, void __user *); ++extern int vc_fset_iattr(uint32_t, void __user *); ++ ++#ifdef CONFIG_COMPAT ++ ++extern int vc_get_iattr_x32(void __user *); ++extern int vc_set_iattr_x32(void __user *); ++ ++#endif /* CONFIG_COMPAT */ ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_INODE_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/inode.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/inode.h +--- linux-2.6.31.6/include/linux/vserver/inode.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/inode.h 2009-10-06 23:34:11.000000000 +0200 +@@ -0,0 +1,39 @@ ++#ifndef _VX_INODE_H ++#define _VX_INODE_H ++ ++ ++#define IATTR_TAG 0x01000000 ++ ++#define IATTR_ADMIN 0x00000001 ++#define IATTR_WATCH 0x00000002 ++#define IATTR_HIDE 0x00000004 ++#define IATTR_FLAGS 0x00000007 ++ ++#define IATTR_BARRIER 0x00010000 ++#define IATTR_IXUNLINK 0x00020000 ++#define IATTR_IMMUTABLE 0x00040000 ++#define IATTR_COW 0x00080000 ++ ++#ifdef __KERNEL__ ++ ++ ++#ifdef CONFIG_VSERVER_PROC_SECURE ++#define IATTR_PROC_DEFAULT ( IATTR_ADMIN | IATTR_HIDE ) ++#define IATTR_PROC_SYMLINK ( IATTR_ADMIN ) ++#else ++#define IATTR_PROC_DEFAULT ( IATTR_ADMIN ) ++#define IATTR_PROC_SYMLINK ( IATTR_ADMIN ) ++#endif ++ ++#define vx_hide_check(c, m) (((m) & IATTR_HIDE) ? vx_check(c, m) : 1) ++ ++#endif /* __KERNEL__ */ ++ ++/* inode ioctls */ ++ ++#define FIOC_GETXFLG _IOR('x', 5, long) ++#define FIOC_SETXFLG _IOW('x', 6, long) ++ ++#else /* _VX_INODE_H */ ++#warning duplicate inclusion ++#endif /* _VX_INODE_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/Kbuild linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/Kbuild +--- linux-2.6.31.6/include/linux/vserver/Kbuild 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/Kbuild 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,8 @@ ++ ++unifdef-y += context_cmd.h network_cmd.h space_cmd.h \ ++ cacct_cmd.h cvirt_cmd.h limit_cmd.h dlimit_cmd.h \ ++ inode_cmd.h tag_cmd.h sched_cmd.h signal_cmd.h \ ++ debug_cmd.h device_cmd.h ++ ++unifdef-y += switch.h network.h monitor.h inode.h device.h ++ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/limit_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/limit_cmd.h +--- linux-2.6.31.6/include/linux/vserver/limit_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/limit_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,71 @@ ++#ifndef _VX_LIMIT_CMD_H ++#define _VX_LIMIT_CMD_H ++ ++ ++/* rlimit vserver commands */ ++ ++#define VCMD_get_rlimit VC_CMD(RLIMIT, 1, 0) ++#define VCMD_set_rlimit VC_CMD(RLIMIT, 2, 0) ++#define VCMD_get_rlimit_mask VC_CMD(RLIMIT, 3, 0) ++#define VCMD_reset_hits VC_CMD(RLIMIT, 7, 0) ++#define VCMD_reset_minmax VC_CMD(RLIMIT, 9, 0) ++ ++struct vcmd_ctx_rlimit_v0 { ++ uint32_t id; ++ uint64_t minimum; ++ uint64_t softlimit; ++ uint64_t maximum; ++}; ++ ++struct vcmd_ctx_rlimit_mask_v0 { ++ uint32_t minimum; ++ uint32_t softlimit; ++ uint32_t maximum; ++}; ++ ++#define VCMD_rlimit_stat VC_CMD(VSTAT, 1, 0) ++ ++struct vcmd_rlimit_stat_v0 { ++ uint32_t id; ++ uint32_t hits; ++ uint64_t value; ++ uint64_t minimum; ++ uint64_t maximum; ++}; ++ ++#define CRLIM_UNSET (0ULL) ++#define CRLIM_INFINITY (~0ULL) ++#define CRLIM_KEEP (~1ULL) ++ ++#ifdef __KERNEL__ ++ ++#ifdef CONFIG_IA32_EMULATION ++ ++struct vcmd_ctx_rlimit_v0_x32 { ++ uint32_t id; ++ uint64_t minimum; ++ uint64_t softlimit; ++ uint64_t maximum; ++} __attribute__ ((packed)); ++ ++#endif /* CONFIG_IA32_EMULATION */ ++ ++#include ++ ++extern int vc_get_rlimit_mask(uint32_t, void __user *); ++extern int vc_get_rlimit(struct vx_info *, void __user *); ++extern int vc_set_rlimit(struct vx_info *, void __user *); ++extern int vc_reset_hits(struct vx_info *, void __user *); ++extern int vc_reset_minmax(struct vx_info *, void __user *); ++ ++extern int vc_rlimit_stat(struct vx_info *, void __user *); ++ ++#ifdef CONFIG_IA32_EMULATION ++ ++extern int vc_get_rlimit_x32(struct vx_info *, void __user *); ++extern int vc_set_rlimit_x32(struct vx_info *, void __user *); ++ ++#endif /* CONFIG_IA32_EMULATION */ ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_LIMIT_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/limit_def.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/limit_def.h +--- linux-2.6.31.6/include/linux/vserver/limit_def.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/limit_def.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,47 @@ ++#ifndef _VX_LIMIT_DEF_H ++#define _VX_LIMIT_DEF_H ++ ++#include ++#include ++ ++#include "limit.h" ++ ++ ++struct _vx_res_limit { ++ rlim_t soft; /* Context soft limit */ ++ rlim_t hard; /* Context hard limit */ ++ ++ rlim_atomic_t rcur; /* Current value */ ++ rlim_t rmin; /* Context minimum */ ++ rlim_t rmax; /* Context maximum */ ++ ++ atomic_t lhit; /* Limit hits */ ++}; ++ ++/* context sub struct */ ++ ++struct _vx_limit { ++ struct _vx_res_limit res[NUM_LIMITS]; ++}; ++ ++#ifdef CONFIG_VSERVER_DEBUG ++ ++static inline void __dump_vx_limit(struct _vx_limit *limit) ++{ ++ int i; ++ ++ printk("\t_vx_limit:"); ++ for (i = 0; i < NUM_LIMITS; i++) { ++ printk("\t [%2d] = %8lu %8lu/%8lu, %8ld/%8ld, %8d\n", ++ i, (unsigned long)__rlim_get(limit, i), ++ (unsigned long)__rlim_rmin(limit, i), ++ (unsigned long)__rlim_rmax(limit, i), ++ (long)__rlim_soft(limit, i), ++ (long)__rlim_hard(limit, i), ++ atomic_read(&__rlim_lhit(limit, i))); ++ } ++} ++ ++#endif ++ ++#endif /* _VX_LIMIT_DEF_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/limit.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/limit.h +--- linux-2.6.31.6/include/linux/vserver/limit.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/limit.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,70 @@ ++#ifndef _VX_LIMIT_H ++#define _VX_LIMIT_H ++ ++#define VLIMIT_NSOCK 16 ++#define VLIMIT_OPENFD 17 ++#define VLIMIT_ANON 18 ++#define VLIMIT_SHMEM 19 ++#define VLIMIT_SEMARY 20 ++#define VLIMIT_NSEMS 21 ++#define VLIMIT_DENTRY 22 ++#define VLIMIT_MAPPED 23 ++ ++ ++#ifdef __KERNEL__ ++ ++#define VLIM_NOCHECK ((1L << VLIMIT_DENTRY) | (1L << RLIMIT_RSS)) ++ ++/* keep in sync with CRLIM_INFINITY */ ++ ++#define VLIM_INFINITY (~0ULL) ++ ++#include ++#include ++ ++#ifndef RLIM_INFINITY ++#warning RLIM_INFINITY is undefined ++#endif ++ ++#define __rlim_val(l, r, v) ((l)->res[r].v) ++ ++#define __rlim_soft(l, r) __rlim_val(l, r, soft) ++#define __rlim_hard(l, r) __rlim_val(l, r, hard) ++ ++#define __rlim_rcur(l, r) __rlim_val(l, r, rcur) ++#define __rlim_rmin(l, r) __rlim_val(l, r, rmin) ++#define __rlim_rmax(l, r) __rlim_val(l, r, rmax) ++ ++#define __rlim_lhit(l, r) __rlim_val(l, r, lhit) ++#define __rlim_hit(l, r) atomic_inc(&__rlim_lhit(l, r)) ++ ++typedef atomic_long_t rlim_atomic_t; ++typedef unsigned long rlim_t; ++ ++#define __rlim_get(l, r) atomic_long_read(&__rlim_rcur(l, r)) ++#define __rlim_set(l, r, v) atomic_long_set(&__rlim_rcur(l, r), v) ++#define __rlim_inc(l, r) atomic_long_inc(&__rlim_rcur(l, r)) ++#define __rlim_dec(l, r) atomic_long_dec(&__rlim_rcur(l, r)) ++#define __rlim_add(l, r, v) atomic_long_add(v, &__rlim_rcur(l, r)) ++#define __rlim_sub(l, r, v) atomic_long_sub(v, &__rlim_rcur(l, r)) ++ ++ ++#if (RLIM_INFINITY == VLIM_INFINITY) ++#define VX_VLIM(r) ((long long)(long)(r)) ++#define VX_RLIM(v) ((rlim_t)(v)) ++#else ++#define VX_VLIM(r) (((r) == RLIM_INFINITY) \ ++ ? VLIM_INFINITY : (long long)(r)) ++#define VX_RLIM(v) (((v) == VLIM_INFINITY) \ ++ ? RLIM_INFINITY : (rlim_t)(v)) ++#endif ++ ++struct sysinfo; ++ ++void vx_vsi_meminfo(struct sysinfo *); ++void vx_vsi_swapinfo(struct sysinfo *); ++ ++#define NUM_LIMITS 24 ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_LIMIT_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/limit_int.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/limit_int.h +--- linux-2.6.31.6/include/linux/vserver/limit_int.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/limit_int.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,198 @@ ++#ifndef _VX_LIMIT_INT_H ++#define _VX_LIMIT_INT_H ++ ++#include "context.h" ++ ++#ifdef __KERNEL__ ++ ++#define VXD_RCRES_COND(r) VXD_CBIT(cres, r) ++#define VXD_RLIMIT_COND(r) VXD_CBIT(limit, r) ++ ++extern const char *vlimit_name[NUM_LIMITS]; ++ ++static inline void __vx_acc_cres(struct vx_info *vxi, ++ int res, int dir, void *_data, char *_file, int _line) ++{ ++ if (VXD_RCRES_COND(res)) ++ vxlprintk(1, "vx_acc_cres[%5d,%s,%2d]: %5ld%s (%p)", ++ (vxi ? vxi->vx_id : -1), vlimit_name[res], res, ++ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0), ++ (dir > 0) ? "++" : "--", _data, _file, _line); ++ if (!vxi) ++ return; ++ ++ if (dir > 0) ++ __rlim_inc(&vxi->limit, res); ++ else ++ __rlim_dec(&vxi->limit, res); ++} ++ ++static inline void __vx_add_cres(struct vx_info *vxi, ++ int res, int amount, void *_data, char *_file, int _line) ++{ ++ if (VXD_RCRES_COND(res)) ++ vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5ld += %5d (%p)", ++ (vxi ? vxi->vx_id : -1), vlimit_name[res], res, ++ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0), ++ amount, _data, _file, _line); ++ if (amount == 0) ++ return; ++ if (!vxi) ++ return; ++ __rlim_add(&vxi->limit, res, amount); ++} ++ ++static inline ++int __vx_cres_adjust_max(struct _vx_limit *limit, int res, rlim_t value) ++{ ++ int cond = (value > __rlim_rmax(limit, res)); ++ ++ if (cond) ++ __rlim_rmax(limit, res) = value; ++ return cond; ++} ++ ++static inline ++int __vx_cres_adjust_min(struct _vx_limit *limit, int res, rlim_t value) ++{ ++ int cond = (value < __rlim_rmin(limit, res)); ++ ++ if (cond) ++ __rlim_rmin(limit, res) = value; ++ return cond; ++} ++ ++static inline ++void __vx_cres_fixup(struct _vx_limit *limit, int res, rlim_t value) ++{ ++ if (!__vx_cres_adjust_max(limit, res, value)) ++ __vx_cres_adjust_min(limit, res, value); ++} ++ ++ ++/* return values: ++ +1 ... no limit hit ++ -1 ... over soft limit ++ 0 ... over hard limit */ ++ ++static inline int __vx_cres_avail(struct vx_info *vxi, ++ int res, int num, char *_file, int _line) ++{ ++ struct _vx_limit *limit; ++ rlim_t value; ++ ++ if (VXD_RLIMIT_COND(res)) ++ vxlprintk(1, "vx_cres_avail[%5d,%s,%2d]: %5ld/%5ld > %5ld + %5d", ++ (vxi ? vxi->vx_id : -1), vlimit_name[res], res, ++ (vxi ? (long)__rlim_soft(&vxi->limit, res) : -1), ++ (vxi ? (long)__rlim_hard(&vxi->limit, res) : -1), ++ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0), ++ num, _file, _line); ++ if (!vxi) ++ return 1; ++ ++ limit = &vxi->limit; ++ value = __rlim_get(limit, res); ++ ++ if (!__vx_cres_adjust_max(limit, res, value)) ++ __vx_cres_adjust_min(limit, res, value); ++ ++ if (num == 0) ++ return 1; ++ ++ if (__rlim_soft(limit, res) == RLIM_INFINITY) ++ return -1; ++ if (value + num <= __rlim_soft(limit, res)) ++ return -1; ++ ++ if (__rlim_hard(limit, res) == RLIM_INFINITY) ++ return 1; ++ if (value + num <= __rlim_hard(limit, res)) ++ return 1; ++ ++ __rlim_hit(limit, res); ++ return 0; ++} ++ ++ ++static const int VLA_RSS[] = { RLIMIT_RSS, VLIMIT_ANON, VLIMIT_MAPPED, 0 }; ++ ++static inline ++rlim_t __vx_cres_array_sum(struct _vx_limit *limit, const int *array) ++{ ++ rlim_t value, sum = 0; ++ int res; ++ ++ while ((res = *array++)) { ++ value = __rlim_get(limit, res); ++ __vx_cres_fixup(limit, res, value); ++ sum += value; ++ } ++ return sum; ++} ++ ++static inline ++rlim_t __vx_cres_array_fixup(struct _vx_limit *limit, const int *array) ++{ ++ rlim_t value = __vx_cres_array_sum(limit, array + 1); ++ int res = *array; ++ ++ if (value == __rlim_get(limit, res)) ++ return value; ++ ++ __rlim_set(limit, res, value); ++ /* now adjust min/max */ ++ if (!__vx_cres_adjust_max(limit, res, value)) ++ __vx_cres_adjust_min(limit, res, value); ++ ++ return value; ++} ++ ++static inline int __vx_cres_array_avail(struct vx_info *vxi, ++ const int *array, int num, char *_file, int _line) ++{ ++ struct _vx_limit *limit; ++ rlim_t value = 0; ++ int res; ++ ++ if (num == 0) ++ return 1; ++ if (!vxi) ++ return 1; ++ ++ limit = &vxi->limit; ++ res = *array; ++ value = __vx_cres_array_sum(limit, array + 1); ++ ++ __rlim_set(limit, res, value); ++ __vx_cres_fixup(limit, res, value); ++ ++ return __vx_cres_avail(vxi, res, num, _file, _line); ++} ++ ++ ++static inline void vx_limit_fixup(struct _vx_limit *limit, int id) ++{ ++ rlim_t value; ++ int res; ++ ++ /* complex resources first */ ++ if ((id < 0) || (id == RLIMIT_RSS)) ++ __vx_cres_array_fixup(limit, VLA_RSS); ++ ++ for (res = 0; res < NUM_LIMITS; res++) { ++ if ((id > 0) && (res != id)) ++ continue; ++ ++ value = __rlim_get(limit, res); ++ __vx_cres_fixup(limit, res, value); ++ ++ /* not supposed to happen, maybe warn? */ ++ if (__rlim_rmax(limit, res) > __rlim_hard(limit, res)) ++ __rlim_rmax(limit, res) = __rlim_hard(limit, res); ++ } ++} ++ ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_LIMIT_INT_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/monitor.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/monitor.h +--- linux-2.6.31.6/include/linux/vserver/monitor.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/monitor.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,96 @@ ++#ifndef _VX_MONITOR_H ++#define _VX_MONITOR_H ++ ++#include ++ ++enum { ++ VXM_UNUSED = 0, ++ ++ VXM_SYNC = 0x10, ++ ++ VXM_UPDATE = 0x20, ++ VXM_UPDATE_1, ++ VXM_UPDATE_2, ++ ++ VXM_RQINFO_1 = 0x24, ++ VXM_RQINFO_2, ++ ++ VXM_ACTIVATE = 0x40, ++ VXM_DEACTIVATE, ++ VXM_IDLE, ++ ++ VXM_HOLD = 0x44, ++ VXM_UNHOLD, ++ ++ VXM_MIGRATE = 0x48, ++ VXM_RESCHED, ++ ++ /* all other bits are flags */ ++ VXM_SCHED = 0x80, ++}; ++ ++struct _vxm_update_1 { ++ uint32_t tokens_max; ++ uint32_t fill_rate; ++ uint32_t interval; ++}; ++ ++struct _vxm_update_2 { ++ uint32_t tokens_min; ++ uint32_t fill_rate; ++ uint32_t interval; ++}; ++ ++struct _vxm_rqinfo_1 { ++ uint16_t running; ++ uint16_t onhold; ++ uint16_t iowait; ++ uint16_t uintr; ++ uint32_t idle_tokens; ++}; ++ ++struct _vxm_rqinfo_2 { ++ uint32_t norm_time; ++ uint32_t idle_time; ++ uint32_t idle_skip; ++}; ++ ++struct _vxm_sched { ++ uint32_t tokens; ++ uint32_t norm_time; ++ uint32_t idle_time; ++}; ++ ++struct _vxm_task { ++ uint16_t pid; ++ uint16_t state; ++}; ++ ++struct _vxm_event { ++ uint32_t jif; ++ union { ++ uint32_t seq; ++ uint32_t sec; ++ }; ++ union { ++ uint32_t tokens; ++ uint32_t nsec; ++ struct _vxm_task tsk; ++ }; ++}; ++ ++struct _vx_mon_entry { ++ uint16_t type; ++ uint16_t xid; ++ union { ++ struct _vxm_event ev; ++ struct _vxm_sched sd; ++ struct _vxm_update_1 u1; ++ struct _vxm_update_2 u2; ++ struct _vxm_rqinfo_1 q1; ++ struct _vxm_rqinfo_2 q2; ++ }; ++}; ++ ++ ++#endif /* _VX_MONITOR_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/network_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/network_cmd.h +--- linux-2.6.31.6/include/linux/vserver/network_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/network_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,150 @@ ++#ifndef _VX_NETWORK_CMD_H ++#define _VX_NETWORK_CMD_H ++ ++ ++/* vinfo commands */ ++ ++#define VCMD_task_nid VC_CMD(VINFO, 2, 0) ++ ++#ifdef __KERNEL__ ++extern int vc_task_nid(uint32_t); ++ ++#endif /* __KERNEL__ */ ++ ++#define VCMD_nx_info VC_CMD(VINFO, 6, 0) ++ ++struct vcmd_nx_info_v0 { ++ uint32_t nid; ++ /* more to come */ ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_nx_info(struct nx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++#include ++#include ++ ++#define VCMD_net_create_v0 VC_CMD(VNET, 1, 0) ++#define VCMD_net_create VC_CMD(VNET, 1, 1) ++ ++struct vcmd_net_create { ++ uint64_t flagword; ++}; ++ ++#define VCMD_net_migrate VC_CMD(NETMIG, 1, 0) ++ ++#define VCMD_net_add VC_CMD(NETALT, 1, 0) ++#define VCMD_net_remove VC_CMD(NETALT, 2, 0) ++ ++struct vcmd_net_addr_v0 { ++ uint16_t type; ++ uint16_t count; ++ struct in_addr ip[4]; ++ struct in_addr mask[4]; ++}; ++ ++#define VCMD_net_add_ipv4 VC_CMD(NETALT, 1, 1) ++#define VCMD_net_remove_ipv4 VC_CMD(NETALT, 2, 1) ++ ++struct vcmd_net_addr_ipv4_v1 { ++ uint16_t type; ++ uint16_t flags; ++ struct in_addr ip; ++ struct in_addr mask; ++}; ++ ++#define VCMD_net_add_ipv6 VC_CMD(NETALT, 3, 1) ++#define VCMD_net_remove_ipv6 VC_CMD(NETALT, 4, 1) ++ ++struct vcmd_net_addr_ipv6_v1 { ++ uint16_t type; ++ uint16_t flags; ++ uint32_t prefix; ++ struct in6_addr ip; ++ struct in6_addr mask; ++}; ++ ++#define VCMD_add_match_ipv4 VC_CMD(NETALT, 5, 0) ++#define VCMD_get_match_ipv4 VC_CMD(NETALT, 6, 0) ++ ++struct vcmd_match_ipv4_v0 { ++ uint16_t type; ++ uint16_t flags; ++ uint16_t parent; ++ uint16_t prefix; ++ struct in_addr ip; ++ struct in_addr ip2; ++ struct in_addr mask; ++}; ++ ++#define VCMD_add_match_ipv6 VC_CMD(NETALT, 7, 0) ++#define VCMD_get_match_ipv6 VC_CMD(NETALT, 8, 0) ++ ++struct vcmd_match_ipv6_v0 { ++ uint16_t type; ++ uint16_t flags; ++ uint16_t parent; ++ uint16_t prefix; ++ struct in6_addr ip; ++ struct in6_addr ip2; ++ struct in6_addr mask; ++}; ++ ++ ++#ifdef __KERNEL__ ++extern int vc_net_create(uint32_t, void __user *); ++extern int vc_net_migrate(struct nx_info *, void __user *); ++ ++extern int vc_net_add(struct nx_info *, void __user *); ++extern int vc_net_remove(struct nx_info *, void __user *); ++ ++extern int vc_net_add_ipv4(struct nx_info *, void __user *); ++extern int vc_net_remove_ipv4(struct nx_info *, void __user *); ++ ++extern int vc_net_add_ipv6(struct nx_info *, void __user *); ++extern int vc_net_remove_ipv6(struct nx_info *, void __user *); ++ ++extern int vc_add_match_ipv4(struct nx_info *, void __user *); ++extern int vc_get_match_ipv4(struct nx_info *, void __user *); ++ ++extern int vc_add_match_ipv6(struct nx_info *, void __user *); ++extern int vc_get_match_ipv6(struct nx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++ ++/* flag commands */ ++ ++#define VCMD_get_nflags VC_CMD(FLAGS, 5, 0) ++#define VCMD_set_nflags VC_CMD(FLAGS, 6, 0) ++ ++struct vcmd_net_flags_v0 { ++ uint64_t flagword; ++ uint64_t mask; ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_get_nflags(struct nx_info *, void __user *); ++extern int vc_set_nflags(struct nx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++ ++/* network caps commands */ ++ ++#define VCMD_get_ncaps VC_CMD(FLAGS, 7, 0) ++#define VCMD_set_ncaps VC_CMD(FLAGS, 8, 0) ++ ++struct vcmd_net_caps_v0 { ++ uint64_t ncaps; ++ uint64_t cmask; ++}; ++ ++#ifdef __KERNEL__ ++extern int vc_get_ncaps(struct nx_info *, void __user *); ++extern int vc_set_ncaps(struct nx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_CONTEXT_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/network.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/network.h +--- linux-2.6.31.6/include/linux/vserver/network.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/network.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,146 @@ ++#ifndef _VX_NETWORK_H ++#define _VX_NETWORK_H ++ ++#include ++ ++ ++#define MAX_N_CONTEXT 65535 /* Arbitrary limit */ ++ ++ ++/* network flags */ ++ ++#define NXF_INFO_PRIVATE 0x00000008 ++ ++#define NXF_SINGLE_IP 0x00000100 ++#define NXF_LBACK_REMAP 0x00000200 ++#define NXF_LBACK_ALLOW 0x00000400 ++ ++#define NXF_HIDE_NETIF 0x02000000 ++#define NXF_HIDE_LBACK 0x04000000 ++ ++#define NXF_STATE_SETUP (1ULL << 32) ++#define NXF_STATE_ADMIN (1ULL << 34) ++ ++#define NXF_SC_HELPER (1ULL << 36) ++#define NXF_PERSISTENT (1ULL << 38) ++ ++#define NXF_ONE_TIME (0x0005ULL << 32) ++ ++ ++#define NXF_INIT_SET (__nxf_init_set()) ++ ++static inline uint64_t __nxf_init_set(void) { ++ return NXF_STATE_ADMIN ++#ifdef CONFIG_VSERVER_AUTO_LBACK ++ | NXF_LBACK_REMAP ++ | NXF_HIDE_LBACK ++#endif ++#ifdef CONFIG_VSERVER_AUTO_SINGLE ++ | NXF_SINGLE_IP ++#endif ++ | NXF_HIDE_NETIF; ++} ++ ++ ++/* network caps */ ++ ++#define NXC_TUN_CREATE 0x00000001 ++ ++#define NXC_RAW_ICMP 0x00000100 ++ ++ ++/* address types */ ++ ++#define NXA_TYPE_IPV4 0x0001 ++#define NXA_TYPE_IPV6 0x0002 ++ ++#define NXA_TYPE_NONE 0x0000 ++#define NXA_TYPE_ANY 0x00FF ++ ++#define NXA_TYPE_ADDR 0x0010 ++#define NXA_TYPE_MASK 0x0020 ++#define NXA_TYPE_RANGE 0x0040 ++ ++#define NXA_MASK_ALL (NXA_TYPE_ADDR | NXA_TYPE_MASK | NXA_TYPE_RANGE) ++ ++#define NXA_MOD_BCAST 0x0100 ++#define NXA_MOD_LBACK 0x0200 ++ ++#define NXA_LOOPBACK 0x1000 ++ ++#define NXA_MASK_BIND (NXA_MASK_ALL | NXA_MOD_BCAST | NXA_MOD_LBACK) ++#define NXA_MASK_SHOW (NXA_MASK_ALL | NXA_LOOPBACK) ++ ++#ifdef __KERNEL__ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++struct nx_addr_v4 { ++ struct nx_addr_v4 *next; ++ struct in_addr ip[2]; ++ struct in_addr mask; ++ uint16_t type; ++ uint16_t flags; ++}; ++ ++struct nx_addr_v6 { ++ struct nx_addr_v6 *next; ++ struct in6_addr ip; ++ struct in6_addr mask; ++ uint32_t prefix; ++ uint16_t type; ++ uint16_t flags; ++}; ++ ++struct nx_info { ++ struct hlist_node nx_hlist; /* linked list of nxinfos */ ++ nid_t nx_id; /* vnet id */ ++ atomic_t nx_usecnt; /* usage count */ ++ atomic_t nx_tasks; /* tasks count */ ++ int nx_state; /* context state */ ++ ++ uint64_t nx_flags; /* network flag word */ ++ uint64_t nx_ncaps; /* network capabilities */ ++ ++ struct in_addr v4_lback; /* Loopback address */ ++ struct in_addr v4_bcast; /* Broadcast address */ ++ struct nx_addr_v4 v4; /* First/Single ipv4 address */ ++#ifdef CONFIG_IPV6 ++ struct nx_addr_v6 v6; /* First/Single ipv6 address */ ++#endif ++ char nx_name[65]; /* network context name */ ++}; ++ ++ ++/* status flags */ ++ ++#define NXS_HASHED 0x0001 ++#define NXS_SHUTDOWN 0x0100 ++#define NXS_RELEASED 0x8000 ++ ++extern struct nx_info *lookup_nx_info(int); ++ ++extern int get_nid_list(int, unsigned int *, int); ++extern int nid_is_hashed(nid_t); ++ ++extern int nx_migrate_task(struct task_struct *, struct nx_info *); ++ ++extern long vs_net_change(struct nx_info *, unsigned int); ++ ++struct sock; ++ ++ ++#define NX_IPV4(n) ((n)->v4.type != NXA_TYPE_NONE) ++#ifdef CONFIG_IPV6 ++#define NX_IPV6(n) ((n)->v6.type != NXA_TYPE_NONE) ++#else ++#define NX_IPV6(n) (0) ++#endif ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_NETWORK_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/percpu.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/percpu.h +--- linux-2.6.31.6/include/linux/vserver/percpu.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/percpu.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,14 @@ ++#ifndef _VX_PERCPU_H ++#define _VX_PERCPU_H ++ ++#include "cvirt_def.h" ++#include "sched_def.h" ++ ++struct _vx_percpu { ++ struct _vx_cvirt_pc cvirt; ++ struct _vx_sched_pc sched; ++}; ++ ++#define PERCPU_PERCTX (sizeof(struct _vx_percpu)) ++ ++#endif /* _VX_PERCPU_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/pid.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/pid.h +--- linux-2.6.31.6/include/linux/vserver/pid.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/pid.h 2009-11-05 04:17:16.000000000 +0100 +@@ -0,0 +1,51 @@ ++#ifndef _VSERVER_PID_H ++#define _VSERVER_PID_H ++ ++/* pid faking stuff */ ++ ++#define vx_info_map_pid(v, p) \ ++ __vx_info_map_pid((v), (p), __func__, __FILE__, __LINE__) ++#define vx_info_map_tgid(v,p) vx_info_map_pid(v,p) ++#define vx_map_pid(p) vx_info_map_pid(current_vx_info(), p) ++#define vx_map_tgid(p) vx_map_pid(p) ++ ++static inline int __vx_info_map_pid(struct vx_info *vxi, int pid, ++ const char *func, const char *file, int line) ++{ ++ if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) { ++ vxfprintk(VXD_CBIT(cvirt, 2), ++ "vx_map_tgid: %p/%llx: %d -> %d", ++ vxi, (long long)vxi->vx_flags, pid, ++ (pid && pid == vxi->vx_initpid) ? 1 : pid, ++ func, file, line); ++ if (pid == 0) ++ return 0; ++ if (pid == vxi->vx_initpid) ++ return 1; ++ } ++ return pid; ++} ++ ++#define vx_info_rmap_pid(v, p) \ ++ __vx_info_rmap_pid((v), (p), __func__, __FILE__, __LINE__) ++#define vx_rmap_pid(p) vx_info_rmap_pid(current_vx_info(), p) ++#define vx_rmap_tgid(p) vx_rmap_pid(p) ++ ++static inline int __vx_info_rmap_pid(struct vx_info *vxi, int pid, ++ const char *func, const char *file, int line) ++{ ++ if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) { ++ vxfprintk(VXD_CBIT(cvirt, 2), ++ "vx_rmap_tgid: %p/%llx: %d -> %d", ++ vxi, (long long)vxi->vx_flags, pid, ++ (pid == 1) ? vxi->vx_initpid : pid, ++ func, file, line); ++ if ((pid == 1) && vxi->vx_initpid) ++ return vxi->vx_initpid; ++ if (pid == vxi->vx_initpid) ++ return ~0U; ++ } ++ return pid; ++} ++ ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/sched_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/sched_cmd.h +--- linux-2.6.31.6/include/linux/vserver/sched_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/sched_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,108 @@ ++#ifndef _VX_SCHED_CMD_H ++#define _VX_SCHED_CMD_H ++ ++ ++/* sched vserver commands */ ++ ++#define VCMD_set_sched_v2 VC_CMD(SCHED, 1, 2) ++#define VCMD_set_sched_v3 VC_CMD(SCHED, 1, 3) ++#define VCMD_set_sched_v4 VC_CMD(SCHED, 1, 4) ++ ++struct vcmd_set_sched_v2 { ++ int32_t fill_rate; ++ int32_t interval; ++ int32_t tokens; ++ int32_t tokens_min; ++ int32_t tokens_max; ++ uint64_t cpu_mask; ++}; ++ ++struct vcmd_set_sched_v3 { ++ uint32_t set_mask; ++ int32_t fill_rate; ++ int32_t interval; ++ int32_t tokens; ++ int32_t tokens_min; ++ int32_t tokens_max; ++ int32_t priority_bias; ++}; ++ ++struct vcmd_set_sched_v4 { ++ uint32_t set_mask; ++ int32_t fill_rate; ++ int32_t interval; ++ int32_t tokens; ++ int32_t tokens_min; ++ int32_t tokens_max; ++ int32_t prio_bias; ++ int32_t cpu_id; ++ int32_t bucket_id; ++}; ++ ++#define VCMD_set_sched VC_CMD(SCHED, 1, 5) ++#define VCMD_get_sched VC_CMD(SCHED, 2, 5) ++ ++struct vcmd_sched_v5 { ++ uint32_t mask; ++ int32_t cpu_id; ++ int32_t bucket_id; ++ int32_t fill_rate[2]; ++ int32_t interval[2]; ++ int32_t tokens; ++ int32_t tokens_min; ++ int32_t tokens_max; ++ int32_t prio_bias; ++}; ++ ++#define VXSM_FILL_RATE 0x0001 ++#define VXSM_INTERVAL 0x0002 ++#define VXSM_FILL_RATE2 0x0004 ++#define VXSM_INTERVAL2 0x0008 ++#define VXSM_TOKENS 0x0010 ++#define VXSM_TOKENS_MIN 0x0020 ++#define VXSM_TOKENS_MAX 0x0040 ++#define VXSM_PRIO_BIAS 0x0100 ++ ++#define VXSM_IDLE_TIME 0x0200 ++#define VXSM_FORCE 0x0400 ++ ++#define VXSM_V3_MASK 0x0173 ++#define VXSM_SET_MASK 0x01FF ++ ++#define VXSM_CPU_ID 0x1000 ++#define VXSM_BUCKET_ID 0x2000 ++ ++#define VXSM_MSEC 0x4000 ++ ++#define SCHED_KEEP (-2) /* only for v2 */ ++ ++#ifdef __KERNEL__ ++ ++#include ++ ++extern int vc_set_sched_v2(struct vx_info *, void __user *); ++extern int vc_set_sched_v3(struct vx_info *, void __user *); ++extern int vc_set_sched_v4(struct vx_info *, void __user *); ++extern int vc_set_sched(struct vx_info *, void __user *); ++extern int vc_get_sched(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++#define VCMD_sched_info VC_CMD(SCHED, 3, 0) ++ ++struct vcmd_sched_info { ++ int32_t cpu_id; ++ int32_t bucket_id; ++ uint64_t user_msec; ++ uint64_t sys_msec; ++ uint64_t hold_msec; ++ uint32_t token_usec; ++ int32_t vavavoom; ++}; ++ ++#ifdef __KERNEL__ ++ ++extern int vc_sched_info(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_SCHED_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/sched_def.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/sched_def.h +--- linux-2.6.31.6/include/linux/vserver/sched_def.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/sched_def.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,68 @@ ++#ifndef _VX_SCHED_DEF_H ++#define _VX_SCHED_DEF_H ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++/* context sub struct */ ++ ++struct _vx_sched { ++ spinlock_t tokens_lock; /* lock for token bucket */ ++ ++ int tokens; /* number of CPU tokens */ ++ int fill_rate[2]; /* Fill rate: add X tokens... */ ++ int interval[2]; /* Divisor: per Y jiffies */ ++ int tokens_min; /* Limit: minimum for unhold */ ++ int tokens_max; /* Limit: no more than N tokens */ ++ ++ int prio_bias; /* bias offset for priority */ ++ ++ unsigned update_mask; /* which features should be updated */ ++ cpumask_t update; /* CPUs which should update */ ++}; ++ ++struct _vx_sched_pc { ++ int tokens; /* number of CPU tokens */ ++ int flags; /* bucket flags */ ++ ++ int fill_rate[2]; /* Fill rate: add X tokens... */ ++ int interval[2]; /* Divisor: per Y jiffies */ ++ int tokens_min; /* Limit: minimum for unhold */ ++ int tokens_max; /* Limit: no more than N tokens */ ++ ++ int prio_bias; /* bias offset for priority */ ++ int vavavoom; /* last calculated vavavoom */ ++ ++ unsigned long norm_time; /* last time accounted */ ++ unsigned long idle_time; /* non linear time for fair sched */ ++ unsigned long token_time; /* token time for accounting */ ++ unsigned long onhold; /* jiffies when put on hold */ ++ ++ uint64_t user_ticks; /* token tick events */ ++ uint64_t sys_ticks; /* token tick events */ ++ uint64_t hold_ticks; /* token ticks paused */ ++}; ++ ++ ++#define VXSF_ONHOLD 0x0001 ++#define VXSF_IDLE_TIME 0x0100 ++ ++#ifdef CONFIG_VSERVER_DEBUG ++ ++static inline void __dump_vx_sched(struct _vx_sched *sched) ++{ ++ printk("\t_vx_sched:\n"); ++ printk("\t tokens: %4d/%4d, %4d/%4d, %4d, %4d\n", ++ sched->fill_rate[0], sched->interval[0], ++ sched->fill_rate[1], sched->interval[1], ++ sched->tokens_min, sched->tokens_max); ++ printk("\t priority = %4d\n", sched->prio_bias); ++} ++ ++#endif ++ ++#endif /* _VX_SCHED_DEF_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/sched.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/sched.h +--- linux-2.6.31.6/include/linux/vserver/sched.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/sched.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,26 @@ ++#ifndef _VX_SCHED_H ++#define _VX_SCHED_H ++ ++ ++#ifdef __KERNEL__ ++ ++struct timespec; ++ ++void vx_vsi_uptime(struct timespec *, struct timespec *); ++ ++ ++struct vx_info; ++ ++void vx_update_load(struct vx_info *); ++ ++ ++int vx_tokens_recalc(struct _vx_sched_pc *, ++ unsigned long *, unsigned long *, int [2]); ++ ++void vx_update_sched_param(struct _vx_sched *sched, ++ struct _vx_sched_pc *sched_pc); ++ ++#endif /* __KERNEL__ */ ++#else /* _VX_SCHED_H */ ++#warning duplicate inclusion ++#endif /* _VX_SCHED_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/signal_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/signal_cmd.h +--- linux-2.6.31.6/include/linux/vserver/signal_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/signal_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,43 @@ ++#ifndef _VX_SIGNAL_CMD_H ++#define _VX_SIGNAL_CMD_H ++ ++ ++/* signalling vserver commands */ ++ ++#define VCMD_ctx_kill VC_CMD(PROCTRL, 1, 0) ++#define VCMD_wait_exit VC_CMD(EVENT, 99, 0) ++ ++struct vcmd_ctx_kill_v0 { ++ int32_t pid; ++ int32_t sig; ++}; ++ ++struct vcmd_wait_exit_v0 { ++ int32_t reboot_cmd; ++ int32_t exit_code; ++}; ++ ++#ifdef __KERNEL__ ++ ++extern int vc_ctx_kill(struct vx_info *, void __user *); ++extern int vc_wait_exit(struct vx_info *, void __user *); ++ ++#endif /* __KERNEL__ */ ++ ++/* process alteration commands */ ++ ++#define VCMD_get_pflags VC_CMD(PROCALT, 5, 0) ++#define VCMD_set_pflags VC_CMD(PROCALT, 6, 0) ++ ++struct vcmd_pflags_v0 { ++ uint32_t flagword; ++ uint32_t mask; ++}; ++ ++#ifdef __KERNEL__ ++ ++extern int vc_get_pflags(uint32_t pid, void __user *); ++extern int vc_set_pflags(uint32_t pid, void __user *); ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_SIGNAL_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/signal.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/signal.h +--- linux-2.6.31.6/include/linux/vserver/signal.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/signal.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,14 @@ ++#ifndef _VX_SIGNAL_H ++#define _VX_SIGNAL_H ++ ++ ++#ifdef __KERNEL__ ++ ++struct vx_info; ++ ++int vx_info_kill(struct vx_info *, int, int); ++ ++#endif /* __KERNEL__ */ ++#else /* _VX_SIGNAL_H */ ++#warning duplicate inclusion ++#endif /* _VX_SIGNAL_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/space_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/space_cmd.h +--- linux-2.6.31.6/include/linux/vserver/space_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/space_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,38 @@ ++#ifndef _VX_SPACE_CMD_H ++#define _VX_SPACE_CMD_H ++ ++ ++#define VCMD_enter_space_v0 VC_CMD(PROCALT, 1, 0) ++#define VCMD_enter_space_v1 VC_CMD(PROCALT, 1, 1) ++#define VCMD_enter_space VC_CMD(PROCALT, 1, 2) ++ ++#define VCMD_set_space_v0 VC_CMD(PROCALT, 3, 0) ++#define VCMD_set_space_v1 VC_CMD(PROCALT, 3, 1) ++#define VCMD_set_space VC_CMD(PROCALT, 3, 2) ++ ++#define VCMD_get_space_mask_v0 VC_CMD(PROCALT, 4, 0) ++ ++#define VCMD_get_space_mask VC_CMD(VSPACE, 0, 1) ++#define VCMD_get_space_default VC_CMD(VSPACE, 1, 0) ++ ++ ++struct vcmd_space_mask_v1 { ++ uint64_t mask; ++}; ++ ++struct vcmd_space_mask_v2 { ++ uint64_t mask; ++ uint32_t index; ++}; ++ ++ ++#ifdef __KERNEL__ ++ ++extern int vc_enter_space_v1(struct vx_info *, void __user *); ++extern int vc_set_space_v1(struct vx_info *, void __user *); ++extern int vc_enter_space(struct vx_info *, void __user *); ++extern int vc_set_space(struct vx_info *, void __user *); ++extern int vc_get_space_mask(void __user *, int); ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_SPACE_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/space.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/space.h +--- linux-2.6.31.6/include/linux/vserver/space.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/space.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,12 @@ ++#ifndef _VX_SPACE_H ++#define _VX_SPACE_H ++ ++#include ++ ++struct vx_info; ++ ++int vx_set_space(struct vx_info *vxi, unsigned long mask, unsigned index); ++ ++#else /* _VX_SPACE_H */ ++#warning duplicate inclusion ++#endif /* _VX_SPACE_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/switch.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/switch.h +--- linux-2.6.31.6/include/linux/vserver/switch.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/switch.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,98 @@ ++#ifndef _VX_SWITCH_H ++#define _VX_SWITCH_H ++ ++#include ++ ++ ++#define VC_CATEGORY(c) (((c) >> 24) & 0x3F) ++#define VC_COMMAND(c) (((c) >> 16) & 0xFF) ++#define VC_VERSION(c) ((c) & 0xFFF) ++ ++#define VC_CMD(c, i, v) ((((VC_CAT_ ## c) & 0x3F) << 24) \ ++ | (((i) & 0xFF) << 16) | ((v) & 0xFFF)) ++ ++/* ++ ++ Syscall Matrix V2.8 ++ ++ |VERSION|CREATE |MODIFY |MIGRATE|CONTROL|EXPERIM| |SPECIAL|SPECIAL| ++ |STATS |DESTROY|ALTER |CHANGE |LIMIT |TEST | | | | ++ |INFO |SETUP | |MOVE | | | | | | ++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ ++ SYSTEM |VERSION|VSETUP |VHOST | | | | |DEVICE | | ++ HOST | 00| 01| 02| 03| 04| 05| | 06| 07| ++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ ++ CPU | |VPROC |PROCALT|PROCMIG|PROCTRL| | |SCHED. | | ++ PROCESS| 08| 09| 10| 11| 12| 13| | 14| 15| ++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ ++ MEMORY | | | | |MEMCTRL| | |SWAP | | ++ | 16| 17| 18| 19| 20| 21| | 22| 23| ++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ ++ NETWORK| |VNET |NETALT |NETMIG |NETCTL | | |SERIAL | | ++ | 24| 25| 26| 27| 28| 29| | 30| 31| ++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ ++ DISK | | | |TAGMIG |DLIMIT | | |INODE | | ++ VFS | 32| 33| 34| 35| 36| 37| | 38| 39| ++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ ++ OTHER |VSTAT | | | | | | |VINFO | | ++ | 40| 41| 42| 43| 44| 45| | 46| 47| ++ =======+=======+=======+=======+=======+=======+=======+ +=======+=======+ ++ SPECIAL|EVENT | | | |FLAGS | | |VSPACE | | ++ | 48| 49| 50| 51| 52| 53| | 54| 55| ++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ ++ SPECIAL|DEBUG | | | |RLIMIT |SYSCALL| | |COMPAT | ++ | 56| 57| 58| 59| 60|TEST 61| | 62| 63| ++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ ++ ++*/ ++ ++#define VC_CAT_VERSION 0 ++ ++#define VC_CAT_VSETUP 1 ++#define VC_CAT_VHOST 2 ++ ++#define VC_CAT_DEVICE 6 ++ ++#define VC_CAT_VPROC 9 ++#define VC_CAT_PROCALT 10 ++#define VC_CAT_PROCMIG 11 ++#define VC_CAT_PROCTRL 12 ++ ++#define VC_CAT_SCHED 14 ++#define VC_CAT_MEMCTRL 20 ++ ++#define VC_CAT_VNET 25 ++#define VC_CAT_NETALT 26 ++#define VC_CAT_NETMIG 27 ++#define VC_CAT_NETCTRL 28 ++ ++#define VC_CAT_TAGMIG 35 ++#define VC_CAT_DLIMIT 36 ++#define VC_CAT_INODE 38 ++ ++#define VC_CAT_VSTAT 40 ++#define VC_CAT_VINFO 46 ++#define VC_CAT_EVENT 48 ++ ++#define VC_CAT_FLAGS 52 ++#define VC_CAT_VSPACE 54 ++#define VC_CAT_DEBUG 56 ++#define VC_CAT_RLIMIT 60 ++ ++#define VC_CAT_SYSTEST 61 ++#define VC_CAT_COMPAT 63 ++ ++/* query version */ ++ ++#define VCMD_get_version VC_CMD(VERSION, 0, 0) ++#define VCMD_get_vci VC_CMD(VERSION, 1, 0) ++ ++ ++#ifdef __KERNEL__ ++ ++#include ++ ++#endif /* __KERNEL__ */ ++ ++#endif /* _VX_SWITCH_H */ ++ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/tag_cmd.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/tag_cmd.h +--- linux-2.6.31.6/include/linux/vserver/tag_cmd.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/tag_cmd.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,22 @@ ++#ifndef _VX_TAG_CMD_H ++#define _VX_TAG_CMD_H ++ ++ ++/* vinfo commands */ ++ ++#define VCMD_task_tag VC_CMD(VINFO, 3, 0) ++ ++#ifdef __KERNEL__ ++extern int vc_task_tag(uint32_t); ++ ++#endif /* __KERNEL__ */ ++ ++/* context commands */ ++ ++#define VCMD_tag_migrate VC_CMD(TAGMIG, 1, 0) ++ ++#ifdef __KERNEL__ ++extern int vc_tag_migrate(uint32_t); ++ ++#endif /* __KERNEL__ */ ++#endif /* _VX_TAG_CMD_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vserver/tag.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/tag.h +--- linux-2.6.31.6/include/linux/vserver/tag.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vserver/tag.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,143 @@ ++#ifndef _DX_TAG_H ++#define _DX_TAG_H ++ ++#include ++ ++ ++#define DX_TAG(in) (IS_TAGGED(in)) ++ ++ ++#ifdef CONFIG_TAG_NFSD ++#define DX_TAG_NFSD 1 ++#else ++#define DX_TAG_NFSD 0 ++#endif ++ ++ ++#ifdef CONFIG_TAGGING_NONE ++ ++#define MAX_UID 0xFFFFFFFF ++#define MAX_GID 0xFFFFFFFF ++ ++#define INOTAG_TAG(cond, uid, gid, tag) (0) ++ ++#define TAGINO_UID(cond, uid, tag) (uid) ++#define TAGINO_GID(cond, gid, tag) (gid) ++ ++#endif ++ ++ ++#ifdef CONFIG_TAGGING_GID16 ++ ++#define MAX_UID 0xFFFFFFFF ++#define MAX_GID 0x0000FFFF ++ ++#define INOTAG_TAG(cond, uid, gid, tag) \ ++ ((cond) ? (((gid) >> 16) & 0xFFFF) : 0) ++ ++#define TAGINO_UID(cond, uid, tag) (uid) ++#define TAGINO_GID(cond, gid, tag) \ ++ ((cond) ? (((gid) & 0xFFFF) | ((tag) << 16)) : (gid)) ++ ++#endif ++ ++ ++#ifdef CONFIG_TAGGING_ID24 ++ ++#define MAX_UID 0x00FFFFFF ++#define MAX_GID 0x00FFFFFF ++ ++#define INOTAG_TAG(cond, uid, gid, tag) \ ++ ((cond) ? ((((uid) >> 16) & 0xFF00) | (((gid) >> 24) & 0xFF)) : 0) ++ ++#define TAGINO_UID(cond, uid, tag) \ ++ ((cond) ? (((uid) & 0xFFFFFF) | (((tag) & 0xFF00) << 16)) : (uid)) ++#define TAGINO_GID(cond, gid, tag) \ ++ ((cond) ? (((gid) & 0xFFFFFF) | (((tag) & 0x00FF) << 24)) : (gid)) ++ ++#endif ++ ++ ++#ifdef CONFIG_TAGGING_UID16 ++ ++#define MAX_UID 0x0000FFFF ++#define MAX_GID 0xFFFFFFFF ++ ++#define INOTAG_TAG(cond, uid, gid, tag) \ ++ ((cond) ? (((uid) >> 16) & 0xFFFF) : 0) ++ ++#define TAGINO_UID(cond, uid, tag) \ ++ ((cond) ? (((uid) & 0xFFFF) | ((tag) << 16)) : (uid)) ++#define TAGINO_GID(cond, gid, tag) (gid) ++ ++#endif ++ ++ ++#ifdef CONFIG_TAGGING_INTERN ++ ++#define MAX_UID 0xFFFFFFFF ++#define MAX_GID 0xFFFFFFFF ++ ++#define INOTAG_TAG(cond, uid, gid, tag) \ ++ ((cond) ? (tag) : 0) ++ ++#define TAGINO_UID(cond, uid, tag) (uid) ++#define TAGINO_GID(cond, gid, tag) (gid) ++ ++#endif ++ ++ ++#ifndef CONFIG_TAGGING_NONE ++#define dx_current_fstag(sb) \ ++ ((sb)->s_flags & MS_TAGGED ? dx_current_tag() : 0) ++#else ++#define dx_current_fstag(sb) (0) ++#endif ++ ++#ifndef CONFIG_TAGGING_INTERN ++#define TAGINO_TAG(cond, tag) (0) ++#else ++#define TAGINO_TAG(cond, tag) ((cond) ? (tag) : 0) ++#endif ++ ++#define INOTAG_UID(cond, uid, gid) \ ++ ((cond) ? ((uid) & MAX_UID) : (uid)) ++#define INOTAG_GID(cond, uid, gid) \ ++ ((cond) ? ((gid) & MAX_GID) : (gid)) ++ ++ ++static inline uid_t dx_map_uid(uid_t uid) ++{ ++ if ((uid > MAX_UID) && (uid != -1)) ++ uid = -2; ++ return (uid & MAX_UID); ++} ++ ++static inline gid_t dx_map_gid(gid_t gid) ++{ ++ if ((gid > MAX_GID) && (gid != -1)) ++ gid = -2; ++ return (gid & MAX_GID); ++} ++ ++struct peer_tag { ++ int32_t xid; ++ int32_t nid; ++}; ++ ++#define dx_notagcheck(sb) ((sb) && ((sb)->s_flags & MS_NOTAGCHECK)) ++ ++int dx_parse_tag(char *string, tag_t *tag, int remove, int *mnt_flags, ++ unsigned long *flags); ++ ++#ifdef CONFIG_PROPAGATE ++ ++void __dx_propagate_tag(struct nameidata *nd, struct inode *inode); ++ ++#define dx_propagate_tag(n, i) __dx_propagate_tag(n, i) ++ ++#else ++#define dx_propagate_tag(n, i) do { } while (0) ++#endif ++ ++#endif /* _DX_TAG_H */ +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_inet6.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_inet6.h +--- linux-2.6.31.6/include/linux/vs_inet6.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_inet6.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,246 @@ ++#ifndef _VS_INET6_H ++#define _VS_INET6_H ++ ++#include "vserver/base.h" ++#include "vserver/network.h" ++#include "vserver/debug.h" ++ ++#include ++ ++#define NXAV6(a) &(a)->ip, &(a)->mask, (a)->prefix, (a)->type ++#define NXAV6_FMT "[%pI6/%pI6/%d:%04x]" ++ ++ ++#ifdef CONFIG_IPV6 ++ ++static inline ++int v6_addr_match(struct nx_addr_v6 *nxa, ++ const struct in6_addr *addr, uint16_t mask) ++{ ++ int ret = 0; ++ ++ switch (nxa->type & mask) { ++ case NXA_TYPE_MASK: ++ ret = ipv6_masked_addr_cmp(&nxa->ip, &nxa->mask, addr); ++ break; ++ case NXA_TYPE_ADDR: ++ ret = ipv6_addr_equal(&nxa->ip, addr); ++ break; ++ case NXA_TYPE_ANY: ++ ret = 1; ++ break; ++ } ++ vxdprintk(VXD_CBIT(net, 0), ++ "v6_addr_match(%p" NXAV6_FMT ",%pI6,%04x) = %d", ++ nxa, NXAV6(nxa), addr, mask, ret); ++ return ret; ++} ++ ++static inline ++int v6_addr_in_nx_info(struct nx_info *nxi, ++ const struct in6_addr *addr, uint16_t mask) ++{ ++ struct nx_addr_v6 *nxa; ++ int ret = 1; ++ ++ if (!nxi) ++ goto out; ++ for (nxa = &nxi->v6; nxa; nxa = nxa->next) ++ if (v6_addr_match(nxa, addr, mask)) ++ goto out; ++ ret = 0; ++out: ++ vxdprintk(VXD_CBIT(net, 0), ++ "v6_addr_in_nx_info(%p[#%u],%pI6,%04x) = %d", ++ nxi, nxi ? nxi->nx_id : 0, addr, mask, ret); ++ return ret; ++} ++ ++static inline ++int v6_nx_addr_match(struct nx_addr_v6 *nxa, struct nx_addr_v6 *addr, uint16_t mask) ++{ ++ /* FIXME: needs full range checks */ ++ return v6_addr_match(nxa, &addr->ip, mask); ++} ++ ++static inline ++int v6_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v6 *nxa, uint16_t mask) ++{ ++ struct nx_addr_v6 *ptr; ++ ++ for (ptr = &nxi->v6; ptr; ptr = ptr->next) ++ if (v6_nx_addr_match(ptr, nxa, mask)) ++ return 1; ++ return 0; ++} ++ ++ ++/* ++ * Check if a given address matches for a socket ++ * ++ * nxi: the socket's nx_info if any ++ * addr: to be verified address ++ */ ++static inline ++int v6_sock_addr_match ( ++ struct nx_info *nxi, ++ struct inet_sock *inet, ++ struct in6_addr *addr) ++{ ++ struct sock *sk = &inet->sk; ++ struct in6_addr *saddr = inet6_rcv_saddr(sk); ++ ++ if (!ipv6_addr_any(addr) && ++ ipv6_addr_equal(saddr, addr)) ++ return 1; ++ if (ipv6_addr_any(saddr)) ++ return v6_addr_in_nx_info(nxi, addr, -1); ++ return 0; ++} ++ ++/* ++ * check if address is covered by socket ++ * ++ * sk: the socket to check against ++ * addr: the address in question (must be != 0) ++ */ ++ ++static inline ++int __v6_addr_match_socket(const struct sock *sk, struct nx_addr_v6 *nxa) ++{ ++ struct nx_info *nxi = sk->sk_nx_info; ++ struct in6_addr *saddr = inet6_rcv_saddr(sk); ++ ++ vxdprintk(VXD_CBIT(net, 5), ++ "__v6_addr_in_socket(%p," NXAV6_FMT ") %p:%pI6 %p;%lx", ++ sk, NXAV6(nxa), nxi, saddr, sk->sk_socket, ++ (sk->sk_socket?sk->sk_socket->flags:0)); ++ ++ if (!ipv6_addr_any(saddr)) { /* direct address match */ ++ return v6_addr_match(nxa, saddr, -1); ++ } else if (nxi) { /* match against nx_info */ ++ return v6_nx_addr_in_nx_info(nxi, nxa, -1); ++ } else { /* unrestricted any socket */ ++ return 1; ++ } ++} ++ ++ ++/* inet related checks and helpers */ ++ ++ ++struct in_ifaddr; ++struct net_device; ++struct sock; ++ ++ ++#include ++#include ++#include ++ ++ ++int dev_in_nx_info(struct net_device *, struct nx_info *); ++int v6_dev_in_nx_info(struct net_device *, struct nx_info *); ++int nx_v6_addr_conflict(struct nx_info *, struct nx_info *); ++ ++ ++ ++static inline ++int v6_ifa_in_nx_info(struct inet6_ifaddr *ifa, struct nx_info *nxi) ++{ ++ if (!nxi) ++ return 1; ++ if (!ifa) ++ return 0; ++ return v6_addr_in_nx_info(nxi, &ifa->addr, -1); ++} ++ ++static inline ++int nx_v6_ifa_visible(struct nx_info *nxi, struct inet6_ifaddr *ifa) ++{ ++ vxdprintk(VXD_CBIT(net, 1), "nx_v6_ifa_visible(%p[#%u],%p) %d", ++ nxi, nxi ? nxi->nx_id : 0, ifa, ++ nxi ? v6_ifa_in_nx_info(ifa, nxi) : 0); ++ ++ if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0)) ++ return 1; ++ if (v6_ifa_in_nx_info(ifa, nxi)) ++ return 1; ++ return 0; ++} ++ ++ ++struct nx_v6_sock_addr { ++ struct in6_addr saddr; /* Address used for validation */ ++ struct in6_addr baddr; /* Address used for socket bind */ ++}; ++ ++static inline ++int v6_map_sock_addr(struct inet_sock *inet, struct sockaddr_in6 *addr, ++ struct nx_v6_sock_addr *nsa) ++{ ++ // struct sock *sk = &inet->sk; ++ // struct nx_info *nxi = sk->sk_nx_info; ++ struct in6_addr saddr = addr->sin6_addr; ++ struct in6_addr baddr = saddr; ++ ++ nsa->saddr = saddr; ++ nsa->baddr = baddr; ++ return 0; ++} ++ ++static inline ++void v6_set_sock_addr(struct inet_sock *inet, struct nx_v6_sock_addr *nsa) ++{ ++ // struct sock *sk = &inet->sk; ++ // struct in6_addr *saddr = inet6_rcv_saddr(sk); ++ ++ // *saddr = nsa->baddr; ++ // inet->saddr = nsa->baddr; ++} ++ ++static inline ++int nx_info_has_v6(struct nx_info *nxi) ++{ ++ if (!nxi) ++ return 1; ++ if (NX_IPV6(nxi)) ++ return 1; ++ return 0; ++} ++ ++#else /* CONFIG_IPV6 */ ++ ++static inline ++int nx_v6_dev_visible(struct nx_info *n, struct net_device *d) ++{ ++ return 1; ++} ++ ++ ++static inline ++int nx_v6_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s) ++{ ++ return 1; ++} ++ ++static inline ++int v6_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n) ++{ ++ return 1; ++} ++ ++static inline ++int nx_info_has_v6(struct nx_info *nxi) ++{ ++ return 0; ++} ++ ++#endif /* CONFIG_IPV6 */ ++ ++#define current_nx_info_has_v6() \ ++ nx_info_has_v6(current_nx_info()) ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_inet.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_inet.h +--- linux-2.6.31.6/include/linux/vs_inet.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_inet.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,342 @@ ++#ifndef _VS_INET_H ++#define _VS_INET_H ++ ++#include "vserver/base.h" ++#include "vserver/network.h" ++#include "vserver/debug.h" ++ ++#define IPI_LOOPBACK htonl(INADDR_LOOPBACK) ++ ++#define NXAV4(a) NIPQUAD((a)->ip[0]), NIPQUAD((a)->ip[1]), \ ++ NIPQUAD((a)->mask), (a)->type ++#define NXAV4_FMT "[" NIPQUAD_FMT "-" NIPQUAD_FMT "/" NIPQUAD_FMT ":%04x]" ++ ++ ++static inline ++int v4_addr_match(struct nx_addr_v4 *nxa, __be32 addr, uint16_t tmask) ++{ ++ __be32 ip = nxa->ip[0].s_addr; ++ __be32 mask = nxa->mask.s_addr; ++ __be32 bcast = ip | ~mask; ++ int ret = 0; ++ ++ switch (nxa->type & tmask) { ++ case NXA_TYPE_MASK: ++ ret = (ip == (addr & mask)); ++ break; ++ case NXA_TYPE_ADDR: ++ ret = 3; ++ if (addr == ip) ++ break; ++ /* fall through to broadcast */ ++ case NXA_MOD_BCAST: ++ ret = ((tmask & NXA_MOD_BCAST) && (addr == bcast)); ++ break; ++ case NXA_TYPE_RANGE: ++ ret = ((nxa->ip[0].s_addr <= addr) && ++ (nxa->ip[1].s_addr > addr)); ++ break; ++ case NXA_TYPE_ANY: ++ ret = 2; ++ break; ++ } ++ ++ vxdprintk(VXD_CBIT(net, 0), ++ "v4_addr_match(%p" NXAV4_FMT "," NIPQUAD_FMT ",%04x) = %d", ++ nxa, NXAV4(nxa), NIPQUAD(addr), tmask, ret); ++ return ret; ++} ++ ++static inline ++int v4_addr_in_nx_info(struct nx_info *nxi, __be32 addr, uint16_t tmask) ++{ ++ struct nx_addr_v4 *nxa; ++ int ret = 1; ++ ++ if (!nxi) ++ goto out; ++ ++ ret = 2; ++ /* allow 127.0.0.1 when remapping lback */ ++ if ((tmask & NXA_LOOPBACK) && ++ (addr == IPI_LOOPBACK) && ++ nx_info_flags(nxi, NXF_LBACK_REMAP, 0)) ++ goto out; ++ ret = 3; ++ /* check for lback address */ ++ if ((tmask & NXA_MOD_LBACK) && ++ (nxi->v4_lback.s_addr == addr)) ++ goto out; ++ ret = 4; ++ /* check for broadcast address */ ++ if ((tmask & NXA_MOD_BCAST) && ++ (nxi->v4_bcast.s_addr == addr)) ++ goto out; ++ ret = 5; ++ /* check for v4 addresses */ ++ for (nxa = &nxi->v4; nxa; nxa = nxa->next) ++ if (v4_addr_match(nxa, addr, tmask)) ++ goto out; ++ ret = 0; ++out: ++ vxdprintk(VXD_CBIT(net, 0), ++ "v4_addr_in_nx_info(%p[#%u]," NIPQUAD_FMT ",%04x) = %d", ++ nxi, nxi ? nxi->nx_id : 0, NIPQUAD(addr), tmask, ret); ++ return ret; ++} ++ ++static inline ++int v4_nx_addr_match(struct nx_addr_v4 *nxa, struct nx_addr_v4 *addr, uint16_t mask) ++{ ++ /* FIXME: needs full range checks */ ++ return v4_addr_match(nxa, addr->ip[0].s_addr, mask); ++} ++ ++static inline ++int v4_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v4 *nxa, uint16_t mask) ++{ ++ struct nx_addr_v4 *ptr; ++ ++ for (ptr = &nxi->v4; ptr; ptr = ptr->next) ++ if (v4_nx_addr_match(ptr, nxa, mask)) ++ return 1; ++ return 0; ++} ++ ++#include ++ ++/* ++ * Check if a given address matches for a socket ++ * ++ * nxi: the socket's nx_info if any ++ * addr: to be verified address ++ */ ++static inline ++int v4_sock_addr_match ( ++ struct nx_info *nxi, ++ struct inet_sock *inet, ++ __be32 addr) ++{ ++ __be32 saddr = inet->rcv_saddr; ++ __be32 bcast = nxi ? nxi->v4_bcast.s_addr : INADDR_BROADCAST; ++ ++ if (addr && (saddr == addr || bcast == addr)) ++ return 1; ++ if (!saddr) ++ return v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND); ++ return 0; ++} ++ ++ ++/* inet related checks and helpers */ ++ ++ ++struct in_ifaddr; ++struct net_device; ++struct sock; ++ ++#ifdef CONFIG_INET ++ ++#include ++#include ++#include ++#include ++ ++ ++int dev_in_nx_info(struct net_device *, struct nx_info *); ++int v4_dev_in_nx_info(struct net_device *, struct nx_info *); ++int nx_v4_addr_conflict(struct nx_info *, struct nx_info *); ++ ++ ++/* ++ * check if address is covered by socket ++ * ++ * sk: the socket to check against ++ * addr: the address in question (must be != 0) ++ */ ++ ++static inline ++int __v4_addr_match_socket(const struct sock *sk, struct nx_addr_v4 *nxa) ++{ ++ struct nx_info *nxi = sk->sk_nx_info; ++ __be32 saddr = inet_rcv_saddr(sk); ++ ++ vxdprintk(VXD_CBIT(net, 5), ++ "__v4_addr_in_socket(%p," NXAV4_FMT ") %p:" NIPQUAD_FMT " %p;%lx", ++ sk, NXAV4(nxa), nxi, NIPQUAD(saddr), sk->sk_socket, ++ (sk->sk_socket?sk->sk_socket->flags:0)); ++ ++ if (saddr) { /* direct address match */ ++ return v4_addr_match(nxa, saddr, -1); ++ } else if (nxi) { /* match against nx_info */ ++ return v4_nx_addr_in_nx_info(nxi, nxa, -1); ++ } else { /* unrestricted any socket */ ++ return 1; ++ } ++} ++ ++ ++ ++static inline ++int nx_dev_visible(struct nx_info *nxi, struct net_device *dev) ++{ ++ vxdprintk(VXD_CBIT(net, 1), "nx_dev_visible(%p[#%u],%p »%s«) %d", ++ nxi, nxi ? nxi->nx_id : 0, dev, dev->name, ++ nxi ? dev_in_nx_info(dev, nxi) : 0); ++ ++ if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0)) ++ return 1; ++ if (dev_in_nx_info(dev, nxi)) ++ return 1; ++ return 0; ++} ++ ++ ++static inline ++int v4_ifa_in_nx_info(struct in_ifaddr *ifa, struct nx_info *nxi) ++{ ++ if (!nxi) ++ return 1; ++ if (!ifa) ++ return 0; ++ return v4_addr_in_nx_info(nxi, ifa->ifa_local, NXA_MASK_SHOW); ++} ++ ++static inline ++int nx_v4_ifa_visible(struct nx_info *nxi, struct in_ifaddr *ifa) ++{ ++ vxdprintk(VXD_CBIT(net, 1), "nx_v4_ifa_visible(%p[#%u],%p) %d", ++ nxi, nxi ? nxi->nx_id : 0, ifa, ++ nxi ? v4_ifa_in_nx_info(ifa, nxi) : 0); ++ ++ if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0)) ++ return 1; ++ if (v4_ifa_in_nx_info(ifa, nxi)) ++ return 1; ++ return 0; ++} ++ ++ ++struct nx_v4_sock_addr { ++ __be32 saddr; /* Address used for validation */ ++ __be32 baddr; /* Address used for socket bind */ ++}; ++ ++static inline ++int v4_map_sock_addr(struct inet_sock *inet, struct sockaddr_in *addr, ++ struct nx_v4_sock_addr *nsa) ++{ ++ struct sock *sk = &inet->sk; ++ struct nx_info *nxi = sk->sk_nx_info; ++ __be32 saddr = addr->sin_addr.s_addr; ++ __be32 baddr = saddr; ++ ++ vxdprintk(VXD_CBIT(net, 3), ++ "inet_bind(%p)* %p,%p;%lx " NIPQUAD_FMT, ++ sk, sk->sk_nx_info, sk->sk_socket, ++ (sk->sk_socket ? sk->sk_socket->flags : 0), ++ NIPQUAD(saddr)); ++ ++ if (nxi) { ++ if (saddr == INADDR_ANY) { ++ if (nx_info_flags(nxi, NXF_SINGLE_IP, 0)) ++ baddr = nxi->v4.ip[0].s_addr; ++ } else if (saddr == IPI_LOOPBACK) { ++ if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0)) ++ baddr = nxi->v4_lback.s_addr; ++ } else { /* normal address bind */ ++ if (!v4_addr_in_nx_info(nxi, saddr, NXA_MASK_BIND)) ++ return -EADDRNOTAVAIL; ++ } ++ } ++ ++ vxdprintk(VXD_CBIT(net, 3), ++ "inet_bind(%p) " NIPQUAD_FMT ", " NIPQUAD_FMT, ++ sk, NIPQUAD(saddr), NIPQUAD(baddr)); ++ ++ nsa->saddr = saddr; ++ nsa->baddr = baddr; ++ return 0; ++} ++ ++static inline ++void v4_set_sock_addr(struct inet_sock *inet, struct nx_v4_sock_addr *nsa) ++{ ++ inet->saddr = nsa->baddr; ++ inet->rcv_saddr = nsa->baddr; ++} ++ ++ ++/* ++ * helper to simplify inet_lookup_listener ++ * ++ * nxi: the socket's nx_info if any ++ * addr: to be verified address ++ * saddr: socket address ++ */ ++static inline int v4_inet_addr_match ( ++ struct nx_info *nxi, ++ __be32 addr, ++ __be32 saddr) ++{ ++ if (addr && (saddr == addr)) ++ return 1; ++ if (!saddr) ++ return nxi ? v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND) : 1; ++ return 0; ++} ++ ++static inline __be32 nx_map_sock_lback(struct nx_info *nxi, __be32 addr) ++{ ++ if (nx_info_flags(nxi, NXF_HIDE_LBACK, 0) && ++ (addr == nxi->v4_lback.s_addr)) ++ return IPI_LOOPBACK; ++ return addr; ++} ++ ++static inline ++int nx_info_has_v4(struct nx_info *nxi) ++{ ++ if (!nxi) ++ return 1; ++ if (NX_IPV4(nxi)) ++ return 1; ++ if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0)) ++ return 1; ++ return 0; ++} ++ ++#else /* CONFIG_INET */ ++ ++static inline ++int nx_dev_visible(struct nx_info *n, struct net_device *d) ++{ ++ return 1; ++} ++ ++static inline ++int nx_v4_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s) ++{ ++ return 1; ++} ++ ++static inline ++int v4_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n) ++{ ++ return 1; ++} ++ ++static inline ++int nx_info_has_v4(struct nx_info *nxi) ++{ ++ return 0; ++} ++ ++#endif /* CONFIG_INET */ ++ ++#define current_nx_info_has_v4() \ ++ nx_info_has_v4(current_nx_info()) ++ ++#else ++// #warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_limit.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_limit.h +--- linux-2.6.31.6/include/linux/vs_limit.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_limit.h 2009-11-05 04:14:38.000000000 +0100 +@@ -0,0 +1,140 @@ ++#ifndef _VS_LIMIT_H ++#define _VS_LIMIT_H ++ ++#include "vserver/limit.h" ++#include "vserver/base.h" ++#include "vserver/context.h" ++#include "vserver/debug.h" ++#include "vserver/context.h" ++#include "vserver/limit_int.h" ++ ++ ++#define vx_acc_cres(v, d, p, r) \ ++ __vx_acc_cres(v, r, d, p, __FILE__, __LINE__) ++ ++#define vx_acc_cres_cond(x, d, p, r) \ ++ __vx_acc_cres(((x) == vx_current_xid()) ? current_vx_info() : 0, \ ++ r, d, p, __FILE__, __LINE__) ++ ++ ++#define vx_add_cres(v, a, p, r) \ ++ __vx_add_cres(v, r, a, p, __FILE__, __LINE__) ++#define vx_sub_cres(v, a, p, r) vx_add_cres(v, -(a), p, r) ++ ++#define vx_add_cres_cond(x, a, p, r) \ ++ __vx_add_cres(((x) == vx_current_xid()) ? current_vx_info() : 0, \ ++ r, a, p, __FILE__, __LINE__) ++#define vx_sub_cres_cond(x, a, p, r) vx_add_cres_cond(x, -(a), p, r) ++ ++ ++/* process and file limits */ ++ ++#define vx_nproc_inc(p) \ ++ vx_acc_cres((p)->vx_info, 1, p, RLIMIT_NPROC) ++ ++#define vx_nproc_dec(p) \ ++ vx_acc_cres((p)->vx_info,-1, p, RLIMIT_NPROC) ++ ++#define vx_files_inc(f) \ ++ vx_acc_cres_cond((f)->f_xid, 1, f, RLIMIT_NOFILE) ++ ++#define vx_files_dec(f) \ ++ vx_acc_cres_cond((f)->f_xid,-1, f, RLIMIT_NOFILE) ++ ++#define vx_locks_inc(l) \ ++ vx_acc_cres_cond((l)->fl_xid, 1, l, RLIMIT_LOCKS) ++ ++#define vx_locks_dec(l) \ ++ vx_acc_cres_cond((l)->fl_xid,-1, l, RLIMIT_LOCKS) ++ ++#define vx_openfd_inc(f) \ ++ vx_acc_cres(current_vx_info(), 1, (void *)(long)(f), VLIMIT_OPENFD) ++ ++#define vx_openfd_dec(f) \ ++ vx_acc_cres(current_vx_info(),-1, (void *)(long)(f), VLIMIT_OPENFD) ++ ++ ++#define vx_cres_avail(v, n, r) \ ++ __vx_cres_avail(v, r, n, __FILE__, __LINE__) ++ ++ ++#define vx_nproc_avail(n) \ ++ vx_cres_avail(current_vx_info(), n, RLIMIT_NPROC) ++ ++#define vx_files_avail(n) \ ++ vx_cres_avail(current_vx_info(), n, RLIMIT_NOFILE) ++ ++#define vx_locks_avail(n) \ ++ vx_cres_avail(current_vx_info(), n, RLIMIT_LOCKS) ++ ++#define vx_openfd_avail(n) \ ++ vx_cres_avail(current_vx_info(), n, VLIMIT_OPENFD) ++ ++ ++/* dentry limits */ ++ ++#define vx_dentry_inc(d) do { \ ++ if (atomic_read(&d->d_count) == 1) \ ++ vx_acc_cres(current_vx_info(), 1, d, VLIMIT_DENTRY); \ ++ } while (0) ++ ++#define vx_dentry_dec(d) do { \ ++ if (atomic_read(&d->d_count) == 0) \ ++ vx_acc_cres(current_vx_info(),-1, d, VLIMIT_DENTRY); \ ++ } while (0) ++ ++#define vx_dentry_avail(n) \ ++ vx_cres_avail(current_vx_info(), n, VLIMIT_DENTRY) ++ ++ ++/* socket limits */ ++ ++#define vx_sock_inc(s) \ ++ vx_acc_cres((s)->sk_vx_info, 1, s, VLIMIT_NSOCK) ++ ++#define vx_sock_dec(s) \ ++ vx_acc_cres((s)->sk_vx_info,-1, s, VLIMIT_NSOCK) ++ ++#define vx_sock_avail(n) \ ++ vx_cres_avail(current_vx_info(), n, VLIMIT_NSOCK) ++ ++ ++/* ipc resource limits */ ++ ++#define vx_ipcmsg_add(v, u, a) \ ++ vx_add_cres(v, a, u, RLIMIT_MSGQUEUE) ++ ++#define vx_ipcmsg_sub(v, u, a) \ ++ vx_sub_cres(v, a, u, RLIMIT_MSGQUEUE) ++ ++#define vx_ipcmsg_avail(v, a) \ ++ vx_cres_avail(v, a, RLIMIT_MSGQUEUE) ++ ++ ++#define vx_ipcshm_add(v, k, a) \ ++ vx_add_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM) ++ ++#define vx_ipcshm_sub(v, k, a) \ ++ vx_sub_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM) ++ ++#define vx_ipcshm_avail(v, a) \ ++ vx_cres_avail(v, a, VLIMIT_SHMEM) ++ ++ ++#define vx_semary_inc(a) \ ++ vx_acc_cres(current_vx_info(), 1, a, VLIMIT_SEMARY) ++ ++#define vx_semary_dec(a) \ ++ vx_acc_cres(current_vx_info(), -1, a, VLIMIT_SEMARY) ++ ++ ++#define vx_nsems_add(a,n) \ ++ vx_add_cres(current_vx_info(), n, a, VLIMIT_NSEMS) ++ ++#define vx_nsems_sub(a,n) \ ++ vx_sub_cres(current_vx_info(), n, a, VLIMIT_NSEMS) ++ ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_memory.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_memory.h +--- linux-2.6.31.6/include/linux/vs_memory.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_memory.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,159 @@ ++#ifndef _VS_MEMORY_H ++#define _VS_MEMORY_H ++ ++#include "vserver/limit.h" ++#include "vserver/base.h" ++#include "vserver/context.h" ++#include "vserver/debug.h" ++#include "vserver/context.h" ++#include "vserver/limit_int.h" ++ ++ ++#define __acc_add_long(a, v) (*(v) += (a)) ++#define __acc_inc_long(v) (++*(v)) ++#define __acc_dec_long(v) (--*(v)) ++ ++#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS ++#define __acc_add_atomic(a, v) atomic_long_add(a, v) ++#define __acc_inc_atomic(v) atomic_long_inc(v) ++#define __acc_dec_atomic(v) atomic_long_dec(v) ++#else /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */ ++#define __acc_add_atomic(a, v) __acc_add_long(a, v) ++#define __acc_inc_atomic(v) __acc_inc_long(v) ++#define __acc_dec_atomic(v) __acc_dec_long(v) ++#endif /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */ ++ ++ ++#define vx_acc_page(m, d, v, r) do { \ ++ if ((d) > 0) \ ++ __acc_inc_long(&(m)->v); \ ++ else \ ++ __acc_dec_long(&(m)->v); \ ++ __vx_acc_cres(m->mm_vx_info, r, d, m, __FILE__, __LINE__); \ ++} while (0) ++ ++#define vx_acc_page_atomic(m, d, v, r) do { \ ++ if ((d) > 0) \ ++ __acc_inc_atomic(&(m)->v); \ ++ else \ ++ __acc_dec_atomic(&(m)->v); \ ++ __vx_acc_cres(m->mm_vx_info, r, d, m, __FILE__, __LINE__); \ ++} while (0) ++ ++ ++#define vx_acc_pages(m, p, v, r) do { \ ++ unsigned long __p = (p); \ ++ __acc_add_long(__p, &(m)->v); \ ++ __vx_add_cres(m->mm_vx_info, r, __p, m, __FILE__, __LINE__); \ ++} while (0) ++ ++#define vx_acc_pages_atomic(m, p, v, r) do { \ ++ unsigned long __p = (p); \ ++ __acc_add_atomic(__p, &(m)->v); \ ++ __vx_add_cres(m->mm_vx_info, r, __p, m, __FILE__, __LINE__); \ ++} while (0) ++ ++ ++ ++#define vx_acc_vmpage(m, d) \ ++ vx_acc_page(m, d, total_vm, RLIMIT_AS) ++#define vx_acc_vmlpage(m, d) \ ++ vx_acc_page(m, d, locked_vm, RLIMIT_MEMLOCK) ++#define vx_acc_file_rsspage(m, d) \ ++ vx_acc_page_atomic(m, d, _file_rss, VLIMIT_MAPPED) ++#define vx_acc_anon_rsspage(m, d) \ ++ vx_acc_page_atomic(m, d, _anon_rss, VLIMIT_ANON) ++ ++#define vx_acc_vmpages(m, p) \ ++ vx_acc_pages(m, p, total_vm, RLIMIT_AS) ++#define vx_acc_vmlpages(m, p) \ ++ vx_acc_pages(m, p, locked_vm, RLIMIT_MEMLOCK) ++#define vx_acc_file_rsspages(m, p) \ ++ vx_acc_pages_atomic(m, p, _file_rss, VLIMIT_MAPPED) ++#define vx_acc_anon_rsspages(m, p) \ ++ vx_acc_pages_atomic(m, p, _anon_rss, VLIMIT_ANON) ++ ++#define vx_pages_add(s, r, p) __vx_add_cres(s, r, p, 0, __FILE__, __LINE__) ++#define vx_pages_sub(s, r, p) vx_pages_add(s, r, -(p)) ++ ++#define vx_vmpages_inc(m) vx_acc_vmpage(m, 1) ++#define vx_vmpages_dec(m) vx_acc_vmpage(m, -1) ++#define vx_vmpages_add(m, p) vx_acc_vmpages(m, p) ++#define vx_vmpages_sub(m, p) vx_acc_vmpages(m, -(p)) ++ ++#define vx_vmlocked_inc(m) vx_acc_vmlpage(m, 1) ++#define vx_vmlocked_dec(m) vx_acc_vmlpage(m, -1) ++#define vx_vmlocked_add(m, p) vx_acc_vmlpages(m, p) ++#define vx_vmlocked_sub(m, p) vx_acc_vmlpages(m, -(p)) ++ ++#define vx_file_rsspages_inc(m) vx_acc_file_rsspage(m, 1) ++#define vx_file_rsspages_dec(m) vx_acc_file_rsspage(m, -1) ++#define vx_file_rsspages_add(m, p) vx_acc_file_rsspages(m, p) ++#define vx_file_rsspages_sub(m, p) vx_acc_file_rsspages(m, -(p)) ++ ++#define vx_anon_rsspages_inc(m) vx_acc_anon_rsspage(m, 1) ++#define vx_anon_rsspages_dec(m) vx_acc_anon_rsspage(m, -1) ++#define vx_anon_rsspages_add(m, p) vx_acc_anon_rsspages(m, p) ++#define vx_anon_rsspages_sub(m, p) vx_acc_anon_rsspages(m, -(p)) ++ ++ ++#define vx_pages_avail(m, p, r) \ ++ __vx_cres_avail((m)->mm_vx_info, r, p, __FILE__, __LINE__) ++ ++#define vx_vmpages_avail(m, p) vx_pages_avail(m, p, RLIMIT_AS) ++#define vx_vmlocked_avail(m, p) vx_pages_avail(m, p, RLIMIT_MEMLOCK) ++#define vx_anon_avail(m, p) vx_pages_avail(m, p, VLIMIT_ANON) ++#define vx_mapped_avail(m, p) vx_pages_avail(m, p, VLIMIT_MAPPED) ++ ++#define vx_rss_avail(m, p) \ ++ __vx_cres_array_avail((m)->mm_vx_info, VLA_RSS, p, __FILE__, __LINE__) ++ ++ ++enum { ++ VXPT_UNKNOWN = 0, ++ VXPT_ANON, ++ VXPT_NONE, ++ VXPT_FILE, ++ VXPT_SWAP, ++ VXPT_WRITE ++}; ++ ++#if 0 ++#define vx_page_fault(mm, vma, type, ret) ++#else ++ ++static inline ++void __vx_page_fault(struct mm_struct *mm, ++ struct vm_area_struct *vma, int type, int ret) ++{ ++ struct vx_info *vxi = mm->mm_vx_info; ++ int what; ++/* ++ static char *page_type[6] = ++ { "UNKNOWN", "ANON", "NONE", "FILE", "SWAP", "WRITE" }; ++ static char *page_what[4] = ++ { "FAULT_OOM", "FAULT_SIGBUS", "FAULT_MINOR", "FAULT_MAJOR" }; ++*/ ++ ++ if (!vxi) ++ return; ++ ++ what = (ret & 0x3); ++ ++/* printk("[%d] page[%d][%d] %2x %s %s\n", vxi->vx_id, ++ type, what, ret, page_type[type], page_what[what]); ++*/ ++ if (ret & VM_FAULT_WRITE) ++ what |= 0x4; ++ atomic_inc(&vxi->cacct.page[type][what]); ++} ++ ++#define vx_page_fault(mm, vma, type, ret) __vx_page_fault(mm, vma, type, ret) ++#endif ++ ++ ++extern unsigned long vx_badness(struct task_struct *task, struct mm_struct *mm); ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_network.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_network.h +--- linux-2.6.31.6/include/linux/vs_network.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_network.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,169 @@ ++#ifndef _NX_VS_NETWORK_H ++#define _NX_VS_NETWORK_H ++ ++#include "vserver/context.h" ++#include "vserver/network.h" ++#include "vserver/base.h" ++#include "vserver/check.h" ++#include "vserver/debug.h" ++ ++#include ++ ++ ++#define get_nx_info(i) __get_nx_info(i, __FILE__, __LINE__) ++ ++static inline struct nx_info *__get_nx_info(struct nx_info *nxi, ++ const char *_file, int _line) ++{ ++ if (!nxi) ++ return NULL; ++ ++ vxlprintk(VXD_CBIT(nid, 2), "get_nx_info(%p[#%d.%d])", ++ nxi, nxi ? nxi->nx_id : 0, ++ nxi ? atomic_read(&nxi->nx_usecnt) : 0, ++ _file, _line); ++ ++ atomic_inc(&nxi->nx_usecnt); ++ return nxi; ++} ++ ++ ++extern void free_nx_info(struct nx_info *); ++ ++#define put_nx_info(i) __put_nx_info(i, __FILE__, __LINE__) ++ ++static inline void __put_nx_info(struct nx_info *nxi, const char *_file, int _line) ++{ ++ if (!nxi) ++ return; ++ ++ vxlprintk(VXD_CBIT(nid, 2), "put_nx_info(%p[#%d.%d])", ++ nxi, nxi ? nxi->nx_id : 0, ++ nxi ? atomic_read(&nxi->nx_usecnt) : 0, ++ _file, _line); ++ ++ if (atomic_dec_and_test(&nxi->nx_usecnt)) ++ free_nx_info(nxi); ++} ++ ++ ++#define init_nx_info(p, i) __init_nx_info(p, i, __FILE__, __LINE__) ++ ++static inline void __init_nx_info(struct nx_info **nxp, struct nx_info *nxi, ++ const char *_file, int _line) ++{ ++ if (nxi) { ++ vxlprintk(VXD_CBIT(nid, 3), ++ "init_nx_info(%p[#%d.%d])", ++ nxi, nxi ? nxi->nx_id : 0, ++ nxi ? atomic_read(&nxi->nx_usecnt) : 0, ++ _file, _line); ++ ++ atomic_inc(&nxi->nx_usecnt); ++ } ++ *nxp = nxi; ++} ++ ++ ++#define set_nx_info(p, i) __set_nx_info(p, i, __FILE__, __LINE__) ++ ++static inline void __set_nx_info(struct nx_info **nxp, struct nx_info *nxi, ++ const char *_file, int _line) ++{ ++ struct nx_info *nxo; ++ ++ if (!nxi) ++ return; ++ ++ vxlprintk(VXD_CBIT(nid, 3), "set_nx_info(%p[#%d.%d])", ++ nxi, nxi ? nxi->nx_id : 0, ++ nxi ? atomic_read(&nxi->nx_usecnt) : 0, ++ _file, _line); ++ ++ atomic_inc(&nxi->nx_usecnt); ++ nxo = xchg(nxp, nxi); ++ BUG_ON(nxo); ++} ++ ++#define clr_nx_info(p) __clr_nx_info(p, __FILE__, __LINE__) ++ ++static inline void __clr_nx_info(struct nx_info **nxp, ++ const char *_file, int _line) ++{ ++ struct nx_info *nxo; ++ ++ nxo = xchg(nxp, NULL); ++ if (!nxo) ++ return; ++ ++ vxlprintk(VXD_CBIT(nid, 3), "clr_nx_info(%p[#%d.%d])", ++ nxo, nxo ? nxo->nx_id : 0, ++ nxo ? atomic_read(&nxo->nx_usecnt) : 0, ++ _file, _line); ++ ++ if (atomic_dec_and_test(&nxo->nx_usecnt)) ++ free_nx_info(nxo); ++} ++ ++ ++#define claim_nx_info(v, p) __claim_nx_info(v, p, __FILE__, __LINE__) ++ ++static inline void __claim_nx_info(struct nx_info *nxi, ++ struct task_struct *task, const char *_file, int _line) ++{ ++ vxlprintk(VXD_CBIT(nid, 3), "claim_nx_info(%p[#%d.%d.%d]) %p", ++ nxi, nxi ? nxi->nx_id : 0, ++ nxi?atomic_read(&nxi->nx_usecnt):0, ++ nxi?atomic_read(&nxi->nx_tasks):0, ++ task, _file, _line); ++ ++ atomic_inc(&nxi->nx_tasks); ++} ++ ++ ++extern void unhash_nx_info(struct nx_info *); ++ ++#define release_nx_info(v, p) __release_nx_info(v, p, __FILE__, __LINE__) ++ ++static inline void __release_nx_info(struct nx_info *nxi, ++ struct task_struct *task, const char *_file, int _line) ++{ ++ vxlprintk(VXD_CBIT(nid, 3), "release_nx_info(%p[#%d.%d.%d]) %p", ++ nxi, nxi ? nxi->nx_id : 0, ++ nxi ? atomic_read(&nxi->nx_usecnt) : 0, ++ nxi ? atomic_read(&nxi->nx_tasks) : 0, ++ task, _file, _line); ++ ++ might_sleep(); ++ ++ if (atomic_dec_and_test(&nxi->nx_tasks)) ++ unhash_nx_info(nxi); ++} ++ ++ ++#define task_get_nx_info(i) __task_get_nx_info(i, __FILE__, __LINE__) ++ ++static __inline__ struct nx_info *__task_get_nx_info(struct task_struct *p, ++ const char *_file, int _line) ++{ ++ struct nx_info *nxi; ++ ++ task_lock(p); ++ vxlprintk(VXD_CBIT(nid, 5), "task_get_nx_info(%p)", ++ p, _file, _line); ++ nxi = __get_nx_info(p->nx_info, _file, _line); ++ task_unlock(p); ++ return nxi; ++} ++ ++ ++static inline void exit_nx_info(struct task_struct *p) ++{ ++ if (p->nx_info) ++ release_nx_info(p->nx_info, p); ++} ++ ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_pid.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_pid.h +--- linux-2.6.31.6/include/linux/vs_pid.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_pid.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,95 @@ ++#ifndef _VS_PID_H ++#define _VS_PID_H ++ ++#include "vserver/base.h" ++#include "vserver/check.h" ++#include "vserver/context.h" ++#include "vserver/debug.h" ++#include "vserver/pid.h" ++#include ++ ++ ++#define VXF_FAKE_INIT (VXF_INFO_INIT | VXF_STATE_INIT) ++ ++static inline ++int vx_proc_task_visible(struct task_struct *task) ++{ ++ if ((task->pid == 1) && ++ !vx_flags(VXF_FAKE_INIT, VXF_FAKE_INIT)) ++ /* show a blend through init */ ++ goto visible; ++ if (vx_check(vx_task_xid(task), VS_WATCH | VS_IDENT)) ++ goto visible; ++ return 0; ++visible: ++ return 1; ++} ++ ++#define find_task_by_real_pid(pid) find_task_by_pid_ns(pid, &init_pid_ns) ++ ++#if 0 ++ ++static inline ++struct task_struct *vx_find_proc_task_by_pid(int pid) ++{ ++ struct task_struct *task = find_task_by_real_pid(pid); ++ ++ if (task && !vx_proc_task_visible(task)) { ++ vxdprintk(VXD_CBIT(misc, 6), ++ "dropping task (find) %p[#%u,%u] for %p[#%u,%u]", ++ task, task->xid, task->pid, ++ current, current->xid, current->pid); ++ task = NULL; ++ } ++ return task; ++} ++ ++#endif ++ ++static inline ++struct task_struct *vx_get_proc_task(struct inode *inode, struct pid *pid) ++{ ++ struct task_struct *task = get_pid_task(pid, PIDTYPE_PID); ++ ++ if (task && !vx_proc_task_visible(task)) { ++ vxdprintk(VXD_CBIT(misc, 6), ++ "dropping task (get) %p[#%u,%u] for %p[#%u,%u]", ++ task, task->xid, task->pid, ++ current, current->xid, current->pid); ++ put_task_struct(task); ++ task = NULL; ++ } ++ return task; ++} ++ ++#if 0 ++ ++static inline ++struct task_struct *vx_child_reaper(struct task_struct *p) ++{ ++ struct vx_info *vxi = p->vx_info; ++ struct task_struct *reaper = child_reaper(p); ++ ++ if (!vxi) ++ goto out; ++ ++ BUG_ON(!p->vx_info->vx_reaper); ++ ++ /* child reaper for the guest reaper */ ++ if (vxi->vx_reaper == p) ++ goto out; ++ ++ reaper = vxi->vx_reaper; ++out: ++ vxdprintk(VXD_CBIT(xid, 7), ++ "vx_child_reaper(%p[#%u,%u]) = %p[#%u,%u]", ++ p, p->xid, p->pid, reaper, reaper->xid, reaper->pid); ++ return reaper; ++} ++ ++#endif ++ ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_sched.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_sched.h +--- linux-2.6.31.6/include/linux/vs_sched.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_sched.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,110 @@ ++#ifndef _VS_SCHED_H ++#define _VS_SCHED_H ++ ++#include "vserver/base.h" ++#include "vserver/context.h" ++#include "vserver/sched.h" ++ ++ ++#define VAVAVOOM_RATIO 50 ++ ++#define MAX_PRIO_BIAS 20 ++#define MIN_PRIO_BIAS -20 ++ ++ ++#ifdef CONFIG_VSERVER_HARDCPU ++ ++/* ++ * effective_prio - return the priority that is based on the static ++ * priority but is modified by bonuses/penalties. ++ * ++ * We scale the actual sleep average [0 .... MAX_SLEEP_AVG] ++ * into a -4 ... 0 ... +4 bonus/penalty range. ++ * ++ * Additionally, we scale another amount based on the number of ++ * CPU tokens currently held by the context, if the process is ++ * part of a context (and the appropriate SCHED flag is set). ++ * This ranges from -5 ... 0 ... +15, quadratically. ++ * ++ * So, the total bonus is -9 .. 0 .. +19 ++ * We use ~50% of the full 0...39 priority range so that: ++ * ++ * 1) nice +19 interactive tasks do not preempt nice 0 CPU hogs. ++ * 2) nice -20 CPU hogs do not get preempted by nice 0 tasks. ++ * unless that context is far exceeding its CPU allocation. ++ * ++ * Both properties are important to certain workloads. ++ */ ++static inline ++int vx_effective_vavavoom(struct _vx_sched_pc *sched_pc, int max_prio) ++{ ++ int vavavoom, max; ++ ++ /* lots of tokens = lots of vavavoom ++ * no tokens = no vavavoom */ ++ if ((vavavoom = sched_pc->tokens) >= 0) { ++ max = sched_pc->tokens_max; ++ vavavoom = max - vavavoom; ++ max = max * max; ++ vavavoom = max_prio * VAVAVOOM_RATIO / 100 ++ * (vavavoom*vavavoom - (max >> 2)) / max; ++ return vavavoom; ++ } ++ return 0; ++} ++ ++ ++static inline ++int vx_adjust_prio(struct task_struct *p, int prio, int max_user) ++{ ++ struct vx_info *vxi = p->vx_info; ++ struct _vx_sched_pc *sched_pc; ++ ++ if (!vxi) ++ return prio; ++ ++ sched_pc = &vx_cpu(vxi, sched_pc); ++ if (vx_info_flags(vxi, VXF_SCHED_PRIO, 0)) { ++ int vavavoom = vx_effective_vavavoom(sched_pc, max_user); ++ ++ sched_pc->vavavoom = vavavoom; ++ prio += vavavoom; ++ } ++ prio += sched_pc->prio_bias; ++ return prio; ++} ++ ++#else /* !CONFIG_VSERVER_HARDCPU */ ++ ++static inline ++int vx_adjust_prio(struct task_struct *p, int prio, int max_user) ++{ ++ struct vx_info *vxi = p->vx_info; ++ ++ if (vxi) ++ prio += vx_cpu(vxi, sched_pc).prio_bias; ++ return prio; ++} ++ ++#endif /* CONFIG_VSERVER_HARDCPU */ ++ ++ ++static inline void vx_account_user(struct vx_info *vxi, ++ cputime_t cputime, int nice) ++{ ++ if (!vxi) ++ return; ++ vx_cpu(vxi, sched_pc).user_ticks += cputime; ++} ++ ++static inline void vx_account_system(struct vx_info *vxi, ++ cputime_t cputime, int idle) ++{ ++ if (!vxi) ++ return; ++ vx_cpu(vxi, sched_pc).sys_ticks += cputime; ++} ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_socket.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_socket.h +--- linux-2.6.31.6/include/linux/vs_socket.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_socket.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,67 @@ ++#ifndef _VS_SOCKET_H ++#define _VS_SOCKET_H ++ ++#include "vserver/debug.h" ++#include "vserver/base.h" ++#include "vserver/cacct.h" ++#include "vserver/context.h" ++#include "vserver/tag.h" ++ ++ ++/* socket accounting */ ++ ++#include ++ ++static inline int vx_sock_type(int family) ++{ ++ switch (family) { ++ case PF_UNSPEC: ++ return VXA_SOCK_UNSPEC; ++ case PF_UNIX: ++ return VXA_SOCK_UNIX; ++ case PF_INET: ++ return VXA_SOCK_INET; ++ case PF_INET6: ++ return VXA_SOCK_INET6; ++ case PF_PACKET: ++ return VXA_SOCK_PACKET; ++ default: ++ return VXA_SOCK_OTHER; ++ } ++} ++ ++#define vx_acc_sock(v, f, p, s) \ ++ __vx_acc_sock(v, f, p, s, __FILE__, __LINE__) ++ ++static inline void __vx_acc_sock(struct vx_info *vxi, ++ int family, int pos, int size, char *file, int line) ++{ ++ if (vxi) { ++ int type = vx_sock_type(family); ++ ++ atomic_long_inc(&vxi->cacct.sock[type][pos].count); ++ atomic_long_add(size, &vxi->cacct.sock[type][pos].total); ++ } ++} ++ ++#define vx_sock_recv(sk, s) \ ++ vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 0, s) ++#define vx_sock_send(sk, s) \ ++ vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 1, s) ++#define vx_sock_fail(sk, s) \ ++ vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 2, s) ++ ++ ++#define sock_vx_init(s) do { \ ++ (s)->sk_xid = 0; \ ++ (s)->sk_vx_info = NULL; \ ++ } while (0) ++ ++#define sock_nx_init(s) do { \ ++ (s)->sk_nid = 0; \ ++ (s)->sk_nx_info = NULL; \ ++ } while (0) ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_tag.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_tag.h +--- linux-2.6.31.6/include/linux/vs_tag.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_tag.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,47 @@ ++#ifndef _VS_TAG_H ++#define _VS_TAG_H ++ ++#include ++ ++/* check conditions */ ++ ++#define DX_ADMIN 0x0001 ++#define DX_WATCH 0x0002 ++#define DX_HOSTID 0x0008 ++ ++#define DX_IDENT 0x0010 ++ ++#define DX_ARG_MASK 0x0010 ++ ++ ++#define dx_task_tag(t) ((t)->tag) ++ ++#define dx_current_tag() dx_task_tag(current) ++ ++#define dx_check(c, m) __dx_check(dx_current_tag(), c, m) ++ ++#define dx_weak_check(c, m) ((m) ? dx_check(c, m) : 1) ++ ++ ++/* ++ * check current context for ADMIN/WATCH and ++ * optionally against supplied argument ++ */ ++static inline int __dx_check(tag_t cid, tag_t id, unsigned int mode) ++{ ++ if (mode & DX_ARG_MASK) { ++ if ((mode & DX_IDENT) && (id == cid)) ++ return 1; ++ } ++ return (((mode & DX_ADMIN) && (cid == 0)) || ++ ((mode & DX_WATCH) && (cid == 1)) || ++ ((mode & DX_HOSTID) && (id == 0))); ++} ++ ++struct inode; ++int dx_permission(struct inode *inode, int mask); ++ ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/linux/vs_time.h linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_time.h +--- linux-2.6.31.6/include/linux/vs_time.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/linux/vs_time.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,19 @@ ++#ifndef _VS_TIME_H ++#define _VS_TIME_H ++ ++ ++/* time faking stuff */ ++ ++#ifdef CONFIG_VSERVER_VTIME ++ ++extern void vx_gettimeofday(struct timeval *tv); ++extern int vx_settimeofday(struct timespec *ts); ++ ++#else ++#define vx_gettimeofday(t) do_gettimeofday(t) ++#define vx_settimeofday(t) do_settimeofday(t) ++#endif ++ ++#else ++#warning duplicate inclusion ++#endif +diff -NurpP --minimal linux-2.6.31.6/include/net/addrconf.h linux-2.6.31.6-vs2.3.0.36.24/include/net/addrconf.h +--- linux-2.6.31.6/include/net/addrconf.h 2009-06-11 17:13:18.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/net/addrconf.h 2009-09-10 16:11:43.000000000 +0200 +@@ -84,7 +84,8 @@ extern int ipv6_dev_get_saddr(struct n + struct net_device *dev, + const struct in6_addr *daddr, + unsigned int srcprefs, +- struct in6_addr *saddr); ++ struct in6_addr *saddr, ++ struct nx_info *nxi); + extern int ipv6_get_lladdr(struct net_device *dev, + struct in6_addr *addr, + unsigned char banned_flags); +diff -NurpP --minimal linux-2.6.31.6/include/net/af_unix.h linux-2.6.31.6-vs2.3.0.36.24/include/net/af_unix.h +--- linux-2.6.31.6/include/net/af_unix.h 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/net/af_unix.h 2009-09-10 16:11:43.000000000 +0200 +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + #include + + extern void unix_inflight(struct file *fp); +diff -NurpP --minimal linux-2.6.31.6/include/net/inet_timewait_sock.h linux-2.6.31.6-vs2.3.0.36.24/include/net/inet_timewait_sock.h +--- linux-2.6.31.6/include/net/inet_timewait_sock.h 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/net/inet_timewait_sock.h 2009-09-10 16:11:43.000000000 +0200 +@@ -117,6 +117,10 @@ struct inet_timewait_sock { + #define tw_hash __tw_common.skc_hash + #define tw_prot __tw_common.skc_prot + #define tw_net __tw_common.skc_net ++#define tw_xid __tw_common.skc_xid ++#define tw_vx_info __tw_common.skc_vx_info ++#define tw_nid __tw_common.skc_nid ++#define tw_nx_info __tw_common.skc_nx_info + int tw_timeout; + volatile unsigned char tw_substate; + /* 3 bits hole, try to pack */ +diff -NurpP --minimal linux-2.6.31.6/include/net/route.h linux-2.6.31.6-vs2.3.0.36.24/include/net/route.h +--- linux-2.6.31.6/include/net/route.h 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/net/route.h 2009-11-05 03:48:31.000000000 +0100 +@@ -135,6 +135,9 @@ static inline void ip_rt_put(struct rtab + dst_release(&rt->u.dst); + } + ++#include ++#include ++ + #define IPTOS_RT_MASK (IPTOS_TOS_MASK & ~3) + + extern const __u8 ip_tos2prio[16]; +@@ -144,6 +147,9 @@ static inline char rt_tos2priority(u8 to + return ip_tos2prio[IPTOS_TOS(tos)>>1]; + } + ++extern int ip_v4_find_src(struct net *net, struct nx_info *, ++ struct rtable **, struct flowi *); ++ + static inline int ip_route_connect(struct rtable **rp, __be32 dst, + __be32 src, u32 tos, int oif, u8 protocol, + __be16 sport, __be16 dport, struct sock *sk, +@@ -161,11 +167,24 @@ static inline int ip_route_connect(struc + + int err; + struct net *net = sock_net(sk); ++ struct nx_info *nx_info = current_nx_info(); + + if (inet_sk(sk)->transparent) + fl.flags |= FLOWI_FLAG_ANYSRC; + +- if (!dst || !src) { ++ if (sk) ++ nx_info = sk->sk_nx_info; ++ ++ vxdprintk(VXD_CBIT(net, 4), ++ "ip_route_connect(%p) %p,%p;%lx", ++ sk, nx_info, sk->sk_socket, ++ (sk->sk_socket?sk->sk_socket->flags:0)); ++ ++ err = ip_v4_find_src(net, nx_info, rp, &fl); ++ if (err) ++ return err; ++ ++ if (!fl.fl4_dst || !fl.fl4_src) { + err = __ip_route_output_key(net, rp, &fl); + if (err) + return err; +diff -NurpP --minimal linux-2.6.31.6/include/net/sock.h linux-2.6.31.6-vs2.3.0.36.24/include/net/sock.h +--- linux-2.6.31.6/include/net/sock.h 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/include/net/sock.h 2009-09-10 17:15:39.000000000 +0200 +@@ -139,6 +139,10 @@ struct sock_common { + #ifdef CONFIG_NET_NS + struct net *skc_net; + #endif ++ xid_t skc_xid; ++ struct vx_info *skc_vx_info; ++ nid_t skc_nid; ++ struct nx_info *skc_nx_info; + }; + + /** +@@ -225,6 +229,10 @@ struct sock { + #define sk_bind_node __sk_common.skc_bind_node + #define sk_prot __sk_common.skc_prot + #define sk_net __sk_common.skc_net ++#define sk_xid __sk_common.skc_xid ++#define sk_vx_info __sk_common.skc_vx_info ++#define sk_nid __sk_common.skc_nid ++#define sk_nx_info __sk_common.skc_nx_info + kmemcheck_bitfield_begin(flags); + unsigned char sk_shutdown : 2, + sk_no_check : 2, +diff -NurpP --minimal linux-2.6.31.6/init/Kconfig linux-2.6.31.6-vs2.3.0.36.24/init/Kconfig +--- linux-2.6.31.6/init/Kconfig 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/init/Kconfig 2009-10-06 04:38:47.000000000 +0200 +@@ -492,6 +492,19 @@ config CGROUP_SCHED + + endchoice + ++config CFS_HARD_LIMITS ++ bool "Hard Limits for CFS Group Scheduler" ++ depends on EXPERIMENTAL ++ depends on FAIR_GROUP_SCHED && CGROUP_SCHED ++ default n ++ help ++ This option enables hard limiting of CPU time obtained by ++ a fair task group. Use this if you want to throttle a group of tasks ++ based on its CPU usage. For more details refer to ++ Documentation/scheduler/sched-cfs-hard-limits.txt ++ ++ Say N if unsure. ++ + menuconfig CGROUPS + boolean "Control Group support" + help +diff -NurpP --minimal linux-2.6.31.6/init/main.c linux-2.6.31.6-vs2.3.0.36.24/init/main.c +--- linux-2.6.31.6/init/main.c 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/init/main.c 2009-09-10 16:11:43.000000000 +0200 +@@ -69,6 +69,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -381,12 +382,14 @@ EXPORT_SYMBOL(__per_cpu_offset); + + static void __init setup_per_cpu_areas(void) + { +- unsigned long size, i; ++ unsigned long size, vspc, i; + char *ptr; + unsigned long nr_possible_cpus = num_possible_cpus(); + ++ vspc = PERCPU_PERCTX * CONFIG_VSERVER_CONTEXTS; ++ + /* Copy section for each CPU (we discard the original) */ +- size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); ++ size = ALIGN(PERCPU_ENOUGH_ROOM + vspc, PAGE_SIZE); + ptr = alloc_bootmem_pages(size * nr_possible_cpus); + + for_each_possible_cpu(i) { +diff -NurpP --minimal linux-2.6.31.6/ipc/mqueue.c linux-2.6.31.6-vs2.3.0.36.24/ipc/mqueue.c +--- linux-2.6.31.6/ipc/mqueue.c 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/ipc/mqueue.c 2009-09-10 16:31:20.000000000 +0200 +@@ -33,6 +33,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include "util.h" +@@ -66,6 +68,7 @@ struct mqueue_inode_info { + struct sigevent notify; + struct pid* notify_owner; + struct user_struct *user; /* user who created, for accounting */ ++ struct vx_info *vxi; + struct sock *notify_sock; + struct sk_buff *notify_cookie; + +@@ -125,6 +128,7 @@ static struct inode *mqueue_get_inode(st + if (S_ISREG(mode)) { + struct mqueue_inode_info *info; + struct task_struct *p = current; ++ struct vx_info *vxi = p->vx_info; + unsigned long mq_bytes, mq_msg_tblsz; + + inode->i_fop = &mqueue_file_operations; +@@ -139,6 +143,7 @@ static struct inode *mqueue_get_inode(st + info->notify_owner = NULL; + info->qsize = 0; + info->user = NULL; /* set when all is ok */ ++ info->vxi = NULL; + memset(&info->attr, 0, sizeof(info->attr)); + info->attr.mq_maxmsg = ipc_ns->mq_msg_max; + info->attr.mq_msgsize = ipc_ns->mq_msgsize_max; +@@ -153,22 +158,26 @@ static struct inode *mqueue_get_inode(st + spin_lock(&mq_lock); + if (u->mq_bytes + mq_bytes < u->mq_bytes || + u->mq_bytes + mq_bytes > +- p->signal->rlim[RLIMIT_MSGQUEUE].rlim_cur) { ++ p->signal->rlim[RLIMIT_MSGQUEUE].rlim_cur || ++ !vx_ipcmsg_avail(vxi, mq_bytes)) { + spin_unlock(&mq_lock); + goto out_inode; + } + u->mq_bytes += mq_bytes; ++ vx_ipcmsg_add(vxi, u, mq_bytes); + spin_unlock(&mq_lock); + + info->messages = kmalloc(mq_msg_tblsz, GFP_KERNEL); + if (!info->messages) { + spin_lock(&mq_lock); + u->mq_bytes -= mq_bytes; ++ vx_ipcmsg_sub(vxi, u, mq_bytes); + spin_unlock(&mq_lock); + goto out_inode; + } + /* all is ok */ + info->user = get_uid(u); ++ info->vxi = get_vx_info(vxi); + } else if (S_ISDIR(mode)) { + inc_nlink(inode); + /* Some things misbehave if size == 0 on a directory */ +@@ -269,8 +278,11 @@ static void mqueue_delete_inode(struct i + (info->attr.mq_maxmsg * info->attr.mq_msgsize)); + user = info->user; + if (user) { ++ struct vx_info *vxi = info->vxi; ++ + spin_lock(&mq_lock); + user->mq_bytes -= mq_bytes; ++ vx_ipcmsg_sub(vxi, user, mq_bytes); + /* + * get_ns_from_inode() ensures that the + * (ipc_ns = sb->s_fs_info) is either a valid ipc_ns +@@ -280,6 +292,7 @@ static void mqueue_delete_inode(struct i + if (ipc_ns) + ipc_ns->mq_queues_count--; + spin_unlock(&mq_lock); ++ put_vx_info(vxi); + free_uid(user); + } + if (ipc_ns) +diff -NurpP --minimal linux-2.6.31.6/ipc/msg.c linux-2.6.31.6-vs2.3.0.36.24/ipc/msg.c +--- linux-2.6.31.6/ipc/msg.c 2009-03-24 14:22:44.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/ipc/msg.c 2009-09-10 16:11:43.000000000 +0200 +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -190,6 +191,7 @@ static int newque(struct ipc_namespace * + + msq->q_perm.mode = msgflg & S_IRWXUGO; + msq->q_perm.key = key; ++ msq->q_perm.xid = vx_current_xid(); + + msq->q_perm.security = NULL; + retval = security_msg_queue_alloc(msq); +diff -NurpP --minimal linux-2.6.31.6/ipc/namespace.c linux-2.6.31.6-vs2.3.0.36.24/ipc/namespace.c +--- linux-2.6.31.6/ipc/namespace.c 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/ipc/namespace.c 2009-09-10 16:11:43.000000000 +0200 +@@ -11,6 +11,8 @@ + #include + #include + #include ++#include ++#include + + #include "util.h" + +diff -NurpP --minimal linux-2.6.31.6/ipc/sem.c linux-2.6.31.6-vs2.3.0.36.24/ipc/sem.c +--- linux-2.6.31.6/ipc/sem.c 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/ipc/sem.c 2009-09-10 16:11:43.000000000 +0200 +@@ -83,6 +83,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include "util.h" +@@ -255,6 +257,7 @@ static int newary(struct ipc_namespace * + + sma->sem_perm.mode = (semflg & S_IRWXUGO); + sma->sem_perm.key = key; ++ sma->sem_perm.xid = vx_current_xid(); + + sma->sem_perm.security = NULL; + retval = security_sem_alloc(sma); +@@ -270,6 +273,9 @@ static int newary(struct ipc_namespace * + return id; + } + ns->used_sems += nsems; ++ /* FIXME: obsoleted? */ ++ vx_semary_inc(sma); ++ vx_nsems_add(sma, nsems); + + sma->sem_base = (struct sem *) &sma[1]; + INIT_LIST_HEAD(&sma->sem_pending); +@@ -546,6 +552,9 @@ static void freeary(struct ipc_namespace + sem_unlock(sma); + + ns->used_sems -= sma->sem_nsems; ++ /* FIXME: obsoleted? */ ++ vx_nsems_sub(sma, sma->sem_nsems); ++ vx_semary_dec(sma); + security_sem_free(sma); + ipc_rcu_putref(sma); + } +diff -NurpP --minimal linux-2.6.31.6/ipc/shm.c linux-2.6.31.6-vs2.3.0.36.24/ipc/shm.c +--- linux-2.6.31.6/ipc/shm.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/ipc/shm.c 2009-11-05 04:17:37.000000000 +0100 +@@ -40,6 +40,8 @@ + #include + #include + #include ++#include ++#include + + #include + +@@ -169,7 +171,12 @@ static void shm_open(struct vm_area_stru + */ + static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp) + { +- ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT; ++ struct vx_info *vxi = lookup_vx_info(shp->shm_perm.xid); ++ int numpages = (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT; ++ ++ vx_ipcshm_sub(vxi, shp, numpages); ++ ns->shm_tot -= numpages; ++ + shm_rmid(ns, shp); + shm_unlock(shp); + if (!is_file_hugepages(shp->shm_file)) +@@ -179,6 +186,7 @@ static void shm_destroy(struct ipc_names + shp->mlock_user); + fput (shp->shm_file); + security_shm_free(shp); ++ put_vx_info(vxi); + ipc_rcu_putref(shp); + } + +@@ -349,11 +357,15 @@ static int newseg(struct ipc_namespace * + if (ns->shm_tot + numpages > ns->shm_ctlall) + return -ENOSPC; + ++ if (!vx_ipcshm_avail(current_vx_info(), numpages)) ++ return -ENOSPC; ++ + shp = ipc_rcu_alloc(sizeof(*shp)); + if (!shp) + return -ENOMEM; + + shp->shm_perm.key = key; ++ shp->shm_perm.xid = vx_current_xid(); + shp->shm_perm.mode = (shmflg & S_IRWXUGO); + shp->mlock_user = NULL; + +@@ -407,6 +419,7 @@ static int newseg(struct ipc_namespace * + ns->shm_tot += numpages; + error = shp->shm_perm.id; + shm_unlock(shp); ++ vx_ipcshm_add(current_vx_info(), key, numpages); + return error; + + no_id: +diff -NurpP --minimal linux-2.6.31.6/kernel/capability.c linux-2.6.31.6-vs2.3.0.36.24/kernel/capability.c +--- linux-2.6.31.6/kernel/capability.c 2009-03-24 14:22:44.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/capability.c 2009-09-10 16:11:43.000000000 +0200 +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include "cred-internals.h" + +@@ -122,6 +123,7 @@ static int cap_validate_magic(cap_user_h + return 0; + } + ++ + /* + * The only thing that can change the capabilities of the current + * process is the current process. As such, we can't be in this code +@@ -289,6 +291,8 @@ error: + return ret; + } + ++#include ++ + /** + * capable - Determine if the current task has a superior capability in effect + * @cap: The capability to be tested for +@@ -301,6 +305,9 @@ error: + */ + int capable(int cap) + { ++ /* here for now so we don't require task locking */ ++ if (vs_check_bit(VXC_CAP_MASK, cap) && !vx_mcaps(1L << cap)) ++ return 0; + if (unlikely(!cap_valid(cap))) { + printk(KERN_CRIT "capable() called with invalid cap=%u\n", cap); + BUG(); +diff -NurpP --minimal linux-2.6.31.6/kernel/compat.c linux-2.6.31.6-vs2.3.0.36.24/kernel/compat.c +--- linux-2.6.31.6/kernel/compat.c 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/compat.c 2009-09-10 16:11:43.000000000 +0200 +@@ -902,7 +902,7 @@ asmlinkage long compat_sys_time(compat_t + compat_time_t i; + struct timeval tv; + +- do_gettimeofday(&tv); ++ vx_gettimeofday(&tv); + i = tv.tv_sec; + + if (tloc) { +@@ -927,7 +927,7 @@ asmlinkage long compat_sys_stime(compat_ + if (err) + return err; + +- do_settimeofday(&tv); ++ vx_settimeofday(&tv); + return 0; + } + +diff -NurpP --minimal linux-2.6.31.6/kernel/exit.c linux-2.6.31.6-vs2.3.0.36.24/kernel/exit.c +--- linux-2.6.31.6/kernel/exit.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/exit.c 2009-10-15 03:49:19.000000000 +0200 +@@ -48,6 +48,10 @@ + #include + #include + #include ++#include ++#include ++#include ++#include + #include + + #include +@@ -488,9 +492,11 @@ static void close_files(struct files_str + filp_close(file, files); + cond_resched(); + } ++ vx_openfd_dec(i); + } + i++; + set >>= 1; ++ cond_resched(); + } + } + } +@@ -1007,10 +1013,15 @@ NORET_TYPE void do_exit(long code) + if (tsk->splice_pipe) + __free_pipe_info(tsk->splice_pipe); + ++ /* needs to stay after exit_notify() */ ++ exit_vx_info(tsk, code); ++ exit_nx_info(tsk); ++ + preempt_disable(); + /* causes final put_task_struct in finish_task_switch(). */ + tsk->state = TASK_DEAD; + schedule(); ++ printk("bad task: %p [%lx]\n", current, current->state); + BUG(); + /* Avoid "noreturn function does return". */ + for (;;) +diff -NurpP --minimal linux-2.6.31.6/kernel/fork.c linux-2.6.31.6-vs2.3.0.36.24/kernel/fork.c +--- linux-2.6.31.6/kernel/fork.c 2009-11-12 12:10:11.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/fork.c 2009-11-05 04:17:43.000000000 +0100 +@@ -62,6 +62,10 @@ + #include + #include + #include ++#include ++#include ++#include ++#include + + #include + #include +@@ -141,6 +145,8 @@ void free_task(struct task_struct *tsk) + prop_local_destroy_single(&tsk->dirties); + free_thread_info(tsk->stack); + rt_mutex_debug_task_free(tsk); ++ clr_vx_info(&tsk->vx_info); ++ clr_nx_info(&tsk->nx_info); + ftrace_graph_exit_task(tsk); + free_task_struct(tsk); + } +@@ -284,6 +290,8 @@ static int dup_mmap(struct mm_struct *mm + mm->free_area_cache = oldmm->mmap_base; + mm->cached_hole_size = ~0UL; + mm->map_count = 0; ++ __set_mm_counter(mm, file_rss, 0); ++ __set_mm_counter(mm, anon_rss, 0); + cpumask_clear(mm_cpumask(mm)); + mm->mm_rb = RB_ROOT; + rb_link = &mm->mm_rb.rb_node; +@@ -295,7 +303,7 @@ static int dup_mmap(struct mm_struct *mm + + if (mpnt->vm_flags & VM_DONTCOPY) { + long pages = vma_pages(mpnt); +- mm->total_vm -= pages; ++ vx_vmpages_sub(mm, pages); + vm_stat_account(mm, mpnt->vm_flags, mpnt->vm_file, + -pages); + continue; +@@ -428,8 +436,8 @@ static struct mm_struct * mm_init(struct + mm->flags = (current->mm) ? current->mm->flags : default_dump_filter; + mm->core_state = NULL; + mm->nr_ptes = 0; +- set_mm_counter(mm, file_rss, 0); +- set_mm_counter(mm, anon_rss, 0); ++ __set_mm_counter(mm, file_rss, 0); ++ __set_mm_counter(mm, anon_rss, 0); + spin_lock_init(&mm->page_table_lock); + spin_lock_init(&mm->ioctx_lock); + INIT_HLIST_HEAD(&mm->ioctx_list); +@@ -440,6 +448,7 @@ static struct mm_struct * mm_init(struct + if (likely(!mm_alloc_pgd(mm))) { + mm->def_flags = 0; + mmu_notifier_mm_init(mm); ++ set_vx_info(&mm->mm_vx_info, p->vx_info); + return mm; + } + +@@ -473,6 +482,7 @@ void __mmdrop(struct mm_struct *mm) + mm_free_pgd(mm); + destroy_context(mm); + mmu_notifier_mm_destroy(mm); ++ clr_vx_info(&mm->mm_vx_info); + free_mm(mm); + } + EXPORT_SYMBOL_GPL(__mmdrop); +@@ -605,6 +615,7 @@ struct mm_struct *dup_mm(struct task_str + goto fail_nomem; + + memcpy(mm, oldmm, sizeof(*mm)); ++ mm->mm_vx_info = NULL; + + /* Initializing for Swap token stuff */ + mm->token_priority = 0; +@@ -638,6 +649,7 @@ fail_nocontext: + * If init_new_context() failed, we cannot use mmput() to free the mm + * because it calls destroy_context() + */ ++ clr_vx_info(&mm->mm_vx_info); + mm_free_pgd(mm); + free_mm(mm); + return NULL; +@@ -946,6 +958,8 @@ static struct task_struct *copy_process( + int retval; + struct task_struct *p; + int cgroup_callbacks_done = 0; ++ struct vx_info *vxi; ++ struct nx_info *nxi; + + if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS)) + return ERR_PTR(-EINVAL); +@@ -982,12 +996,28 @@ static struct task_struct *copy_process( + DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled); + DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled); + #endif ++ init_vx_info(&p->vx_info, current_vx_info()); ++ init_nx_info(&p->nx_info, current_nx_info()); ++ ++ /* check vserver memory */ ++ if (p->mm && !(clone_flags & CLONE_VM)) { ++ if (vx_vmpages_avail(p->mm, p->mm->total_vm)) ++ vx_pages_add(p->vx_info, RLIMIT_AS, p->mm->total_vm); ++ else ++ goto bad_fork_free; ++ } ++ if (p->mm && vx_flags(VXF_FORK_RSS, 0)) { ++ if (!vx_rss_avail(p->mm, get_mm_counter(p->mm, file_rss))) ++ goto bad_fork_cleanup_vm; ++ } + retval = -EAGAIN; ++ if (!vx_nproc_avail(1)) ++ goto bad_fork_cleanup_vm; + if (atomic_read(&p->real_cred->user->processes) >= + p->signal->rlim[RLIMIT_NPROC].rlim_cur) { + if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) && + p->real_cred->user != INIT_USER) +- goto bad_fork_free; ++ goto bad_fork_cleanup_vm; + } + + retval = copy_creds(p, clone_flags); +@@ -1260,6 +1290,18 @@ static struct task_struct *copy_process( + + total_forks++; + spin_unlock(¤t->sighand->siglock); ++ ++ /* p is copy of current */ ++ vxi = p->vx_info; ++ if (vxi) { ++ claim_vx_info(vxi, p); ++ atomic_inc(&vxi->cvirt.nr_threads); ++ atomic_inc(&vxi->cvirt.total_forks); ++ vx_nproc_inc(p); ++ } ++ nxi = p->nx_info; ++ if (nxi) ++ claim_nx_info(nxi, p); + write_unlock_irq(&tasklist_lock); + proc_fork_connector(p); + cgroup_post_fork(p); +@@ -1305,6 +1347,9 @@ bad_fork_cleanup_count: + atomic_dec(&p->cred->user->processes); + put_cred(p->real_cred); + put_cred(p->cred); ++bad_fork_cleanup_vm: ++ if (p->mm && !(clone_flags & CLONE_VM)) ++ vx_pages_sub(p->vx_info, RLIMIT_AS, p->mm->total_vm); + bad_fork_free: + free_task(p); + fork_out: +diff -NurpP --minimal linux-2.6.31.6/kernel/kthread.c linux-2.6.31.6-vs2.3.0.36.24/kernel/kthread.c +--- linux-2.6.31.6/kernel/kthread.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/kthread.c 2009-09-10 16:43:27.000000000 +0200 +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + + #define KTHREAD_NICE_LEVEL (-5) +diff -NurpP --minimal linux-2.6.31.6/kernel/Makefile linux-2.6.31.6-vs2.3.0.36.24/kernel/Makefile +--- linux-2.6.31.6/kernel/Makefile 2009-09-10 15:26:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/Makefile 2009-09-10 16:11:43.000000000 +0200 +@@ -23,6 +23,7 @@ CFLAGS_REMOVE_cgroup-debug.o = -pg + CFLAGS_REMOVE_sched_clock.o = -pg + endif + ++obj-y += vserver/ + obj-$(CONFIG_FREEZER) += freezer.o + obj-$(CONFIG_PROFILING) += profile.o + obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o +diff -NurpP --minimal linux-2.6.31.6/kernel/nsproxy.c linux-2.6.31.6-vs2.3.0.36.24/kernel/nsproxy.c +--- linux-2.6.31.6/kernel/nsproxy.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/nsproxy.c 2009-09-10 17:37:49.000000000 +0200 +@@ -19,6 +19,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + +@@ -31,8 +33,11 @@ static inline struct nsproxy *create_nsp + struct nsproxy *nsproxy; + + nsproxy = kmem_cache_alloc(nsproxy_cachep, GFP_KERNEL); +- if (nsproxy) ++ if (nsproxy) { + atomic_set(&nsproxy->count, 1); ++ atomic_inc(&vs_global_nsproxy); ++ } ++ vxdprintk(VXD_CBIT(space, 2), "create_nsproxy = %p[1]", nsproxy); + return nsproxy; + } + +@@ -41,41 +46,52 @@ static inline struct nsproxy *create_nsp + * Return the newly created nsproxy. Do not attach this to the task, + * leave it to the caller to do proper locking and attach it to task. + */ +-static struct nsproxy *create_new_namespaces(unsigned long flags, +- struct task_struct *tsk, struct fs_struct *new_fs) ++static struct nsproxy *unshare_namespaces(unsigned long flags, ++ struct nsproxy *orig, struct fs_struct *new_fs) + { + struct nsproxy *new_nsp; + int err; + ++ vxdprintk(VXD_CBIT(space, 4), ++ "unshare_namespaces(0x%08lx,%p,%p)", ++ flags, orig, new_fs); ++ + new_nsp = create_nsproxy(); + if (!new_nsp) + return ERR_PTR(-ENOMEM); + +- new_nsp->mnt_ns = copy_mnt_ns(flags, tsk->nsproxy->mnt_ns, new_fs); ++ new_nsp->mnt_ns = copy_mnt_ns(flags, orig->mnt_ns, new_fs); + if (IS_ERR(new_nsp->mnt_ns)) { + err = PTR_ERR(new_nsp->mnt_ns); + goto out_ns; + } + +- new_nsp->uts_ns = copy_utsname(flags, tsk->nsproxy->uts_ns); ++ new_nsp->uts_ns = copy_utsname(flags, orig->uts_ns); + if (IS_ERR(new_nsp->uts_ns)) { + err = PTR_ERR(new_nsp->uts_ns); + goto out_uts; + } + +- new_nsp->ipc_ns = copy_ipcs(flags, tsk->nsproxy->ipc_ns); ++ new_nsp->ipc_ns = copy_ipcs(flags, orig->ipc_ns); + if (IS_ERR(new_nsp->ipc_ns)) { + err = PTR_ERR(new_nsp->ipc_ns); + goto out_ipc; + } + +- new_nsp->pid_ns = copy_pid_ns(flags, task_active_pid_ns(tsk)); ++ new_nsp->pid_ns = copy_pid_ns(flags, orig->pid_ns); + if (IS_ERR(new_nsp->pid_ns)) { + err = PTR_ERR(new_nsp->pid_ns); + goto out_pid; + } + +- new_nsp->net_ns = copy_net_ns(flags, tsk->nsproxy->net_ns); ++ /* disabled now? ++ new_nsp->user_ns = copy_user_ns(flags, orig->user_ns); ++ if (IS_ERR(new_nsp->user_ns)) { ++ err = PTR_ERR(new_nsp->user_ns); ++ goto out_user; ++ } */ ++ ++ new_nsp->net_ns = copy_net_ns(flags, orig->net_ns); + if (IS_ERR(new_nsp->net_ns)) { + err = PTR_ERR(new_nsp->net_ns); + goto out_net; +@@ -100,6 +116,38 @@ out_ns: + return ERR_PTR(err); + } + ++static struct nsproxy *create_new_namespaces(int flags, struct task_struct *tsk, ++ struct fs_struct *new_fs) ++{ ++ return unshare_namespaces(flags, tsk->nsproxy, new_fs); ++} ++ ++/* ++ * copies the nsproxy, setting refcount to 1, and grabbing a ++ * reference to all contained namespaces. ++ */ ++struct nsproxy *copy_nsproxy(struct nsproxy *orig) ++{ ++ struct nsproxy *ns = create_nsproxy(); ++ ++ if (ns) { ++ memcpy(ns, orig, sizeof(struct nsproxy)); ++ atomic_set(&ns->count, 1); ++ ++ if (ns->mnt_ns) ++ get_mnt_ns(ns->mnt_ns); ++ if (ns->uts_ns) ++ get_uts_ns(ns->uts_ns); ++ if (ns->ipc_ns) ++ get_ipc_ns(ns->ipc_ns); ++ if (ns->pid_ns) ++ get_pid_ns(ns->pid_ns); ++ if (ns->net_ns) ++ get_net(ns->net_ns); ++ } ++ return ns; ++} ++ + /* + * called from clone. This now handles copy for nsproxy and all + * namespaces therein. +@@ -107,9 +155,12 @@ out_ns: + int copy_namespaces(unsigned long flags, struct task_struct *tsk) + { + struct nsproxy *old_ns = tsk->nsproxy; +- struct nsproxy *new_ns; ++ struct nsproxy *new_ns = NULL; + int err = 0; + ++ vxdprintk(VXD_CBIT(space, 7), "copy_namespaces(0x%08lx,%p[%p])", ++ flags, tsk, old_ns); ++ + if (!old_ns) + return 0; + +@@ -119,7 +170,7 @@ int copy_namespaces(unsigned long flags, + CLONE_NEWPID | CLONE_NEWNET))) + return 0; + +- if (!capable(CAP_SYS_ADMIN)) { ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_NAMESPACE)) { + err = -EPERM; + goto out; + } +@@ -146,6 +197,9 @@ int copy_namespaces(unsigned long flags, + + out: + put_nsproxy(old_ns); ++ vxdprintk(VXD_CBIT(space, 3), ++ "copy_namespaces(0x%08lx,%p[%p]) = %d [%p]", ++ flags, tsk, old_ns, err, new_ns); + return err; + } + +@@ -159,7 +213,9 @@ void free_nsproxy(struct nsproxy *ns) + put_ipc_ns(ns->ipc_ns); + if (ns->pid_ns) + put_pid_ns(ns->pid_ns); +- put_net(ns->net_ns); ++ if (ns->net_ns) ++ put_net(ns->net_ns); ++ atomic_dec(&vs_global_nsproxy); + kmem_cache_free(nsproxy_cachep, ns); + } + +@@ -172,11 +228,15 @@ int unshare_nsproxy_namespaces(unsigned + { + int err = 0; + ++ vxdprintk(VXD_CBIT(space, 4), ++ "unshare_nsproxy_namespaces(0x%08lx,[%p])", ++ unshare_flags, current->nsproxy); ++ + if (!(unshare_flags & (CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC | + CLONE_NEWNET))) + return 0; + +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_NAMESPACE)) + return -EPERM; + + *new_nsp = create_new_namespaces(unshare_flags, current, +diff -NurpP --minimal linux-2.6.31.6/kernel/pid.c linux-2.6.31.6-vs2.3.0.36.24/kernel/pid.c +--- linux-2.6.31.6/kernel/pid.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/pid.c 2009-09-10 16:36:49.000000000 +0200 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #define pid_hashfn(nr, ns) \ + hash_long((unsigned long)nr + (unsigned long)ns, pidhash_shift) +@@ -305,7 +306,7 @@ EXPORT_SYMBOL_GPL(find_pid_ns); + + struct pid *find_vpid(int nr) + { +- return find_pid_ns(nr, current->nsproxy->pid_ns); ++ return find_pid_ns(vx_rmap_pid(nr), current->nsproxy->pid_ns); + } + EXPORT_SYMBOL_GPL(find_vpid); + +@@ -365,6 +366,9 @@ void transfer_pid(struct task_struct *ol + struct task_struct *pid_task(struct pid *pid, enum pid_type type) + { + struct task_struct *result = NULL; ++ ++ if (type == PIDTYPE_REALPID) ++ type = PIDTYPE_PID; + if (pid) { + struct hlist_node *first; + first = rcu_dereference(pid->tasks[type].first); +@@ -380,7 +384,7 @@ EXPORT_SYMBOL(pid_task); + */ + struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns) + { +- return pid_task(find_pid_ns(nr, ns), PIDTYPE_PID); ++ return pid_task(find_pid_ns(vx_rmap_pid(nr), ns), PIDTYPE_PID); + } + + struct task_struct *find_task_by_vpid(pid_t vnr) +@@ -422,7 +426,7 @@ struct pid *find_get_pid(pid_t nr) + } + EXPORT_SYMBOL_GPL(find_get_pid); + +-pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns) ++pid_t pid_unmapped_nr_ns(struct pid *pid, struct pid_namespace *ns) + { + struct upid *upid; + pid_t nr = 0; +@@ -435,6 +439,11 @@ pid_t pid_nr_ns(struct pid *pid, struct + return nr; + } + ++pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns) ++{ ++ return vx_map_pid(pid_unmapped_nr_ns(pid, ns)); ++} ++ + pid_t pid_vnr(struct pid *pid) + { + return pid_nr_ns(pid, current->nsproxy->pid_ns); +diff -NurpP --minimal linux-2.6.31.6/kernel/pid_namespace.c linux-2.6.31.6-vs2.3.0.36.24/kernel/pid_namespace.c +--- linux-2.6.31.6/kernel/pid_namespace.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/pid_namespace.c 2009-09-10 16:11:43.000000000 +0200 +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #define BITS_PER_PAGE (PAGE_SIZE*8) + +@@ -86,6 +87,7 @@ static struct pid_namespace *create_pid_ + goto out_free_map; + + kref_init(&ns->kref); ++ atomic_inc(&vs_global_pid_ns); + ns->level = level; + ns->parent = get_pid_ns(parent_pid_ns); + +@@ -111,6 +113,7 @@ static void destroy_pid_namespace(struct + + for (i = 0; i < PIDMAP_ENTRIES; i++) + kfree(ns->pidmap[i].page); ++ atomic_dec(&vs_global_pid_ns); + kmem_cache_free(pid_ns_cachep, ns); + } + +diff -NurpP --minimal linux-2.6.31.6/kernel/posix-timers.c linux-2.6.31.6-vs2.3.0.36.24/kernel/posix-timers.c +--- linux-2.6.31.6/kernel/posix-timers.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/posix-timers.c 2009-10-24 23:47:04.000000000 +0200 +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + + /* + * Management arrays for POSIX timers. Timers are kept in slab memory +@@ -328,6 +329,7 @@ int posix_timer_event(struct k_itimer *t + { + struct task_struct *task; + int shared, ret = -1; ++ + /* + * FIXME: if ->sigq is queued we can race with + * dequeue_signal()->do_schedule_next_timer(). +@@ -344,10 +346,18 @@ int posix_timer_event(struct k_itimer *t + rcu_read_lock(); + task = pid_task(timr->it_pid, PIDTYPE_PID); + if (task) { ++ struct vx_info_save vxis; ++ struct vx_info *vxi; ++ ++ vxi = get_vx_info(task->vx_info); ++ enter_vx_info(vxi, &vxis); + shared = !(timr->it_sigev_notify & SIGEV_THREAD_ID); + ret = send_sigqueue(timr->sigq, task, shared); ++ leave_vx_info(&vxis); ++ put_vx_info(vxi); + } + rcu_read_unlock(); ++ + /* If we failed to send the signal the timer stops. */ + return ret > 0; + } +diff -NurpP --minimal linux-2.6.31.6/kernel/printk.c linux-2.6.31.6-vs2.3.0.36.24/kernel/printk.c +--- linux-2.6.31.6/kernel/printk.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/printk.c 2009-09-10 16:11:43.000000000 +0200 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include + +@@ -270,18 +271,13 @@ int do_syslog(int type, char __user *buf + unsigned i, j, limit, count; + int do_clear = 0; + char c; +- int error = 0; ++ int error; + + error = security_syslog(type); + if (error) + return error; + +- switch (type) { +- case 0: /* Close log */ +- break; +- case 1: /* Open log */ +- break; +- case 2: /* Read from log */ ++ if ((type >= 2) && (type <= 4)) { + error = -EINVAL; + if (!buf || len < 0) + goto out; +@@ -292,6 +288,16 @@ int do_syslog(int type, char __user *buf + error = -EFAULT; + goto out; + } ++ } ++ if (!vx_check(0, VS_ADMIN|VS_WATCH)) ++ return vx_do_syslog(type, buf, len); ++ ++ switch (type) { ++ case 0: /* Close log */ ++ break; ++ case 1: /* Open log */ ++ break; ++ case 2: /* Read from log */ + error = wait_event_interruptible(log_wait, + (log_start - log_end)); + if (error) +@@ -316,16 +322,6 @@ int do_syslog(int type, char __user *buf + do_clear = 1; + /* FALL THRU */ + case 3: /* Read last kernel messages */ +- error = -EINVAL; +- if (!buf || len < 0) +- goto out; +- error = 0; +- if (!len) +- goto out; +- if (!access_ok(VERIFY_WRITE, buf, len)) { +- error = -EFAULT; +- goto out; +- } + count = len; + if (count > log_buf_len) + count = log_buf_len; +diff -NurpP --minimal linux-2.6.31.6/kernel/ptrace.c linux-2.6.31.6-vs2.3.0.36.24/kernel/ptrace.c +--- linux-2.6.31.6/kernel/ptrace.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/ptrace.c 2009-09-10 16:11:43.000000000 +0200 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* +@@ -151,6 +152,11 @@ int __ptrace_may_access(struct task_stru + dumpable = get_dumpable(task->mm); + if (!dumpable && !capable(CAP_SYS_PTRACE)) + return -EPERM; ++ if (!vx_check(task->xid, VS_ADMIN_P|VS_IDENT)) ++ return -EPERM; ++ if (!vx_check(task->xid, VS_IDENT) && ++ !task_vx_flags(task, VXF_STATE_ADMIN, 0)) ++ return -EACCES; + + return security_ptrace_may_access(task, mode); + } +@@ -618,6 +624,10 @@ SYSCALL_DEFINE4(ptrace, long, request, l + goto out; + } + ++ ret = -EPERM; ++ if (!vx_check(vx_task_xid(child), VS_WATCH_P | VS_IDENT)) ++ goto out_put_task_struct; ++ + if (request == PTRACE_ATTACH) { + ret = ptrace_attach(child); + /* +diff -NurpP --minimal linux-2.6.31.6/kernel/sched.c linux-2.6.31.6-vs2.3.0.36.24/kernel/sched.c +--- linux-2.6.31.6/kernel/sched.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/sched.c 2009-11-05 04:17:49.000000000 +0100 +@@ -72,6 +72,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -262,6 +264,15 @@ static DEFINE_MUTEX(sched_domains_mutex) + + #include + ++#if defined(CONFIG_FAIR_GROUP_SCHED) && defined(CONFIG_CFS_HARD_LIMITS) ++struct cfs_bandwidth { ++ spinlock_t cfs_runtime_lock; ++ ktime_t cfs_period; ++ u64 cfs_runtime; ++ struct hrtimer cfs_period_timer; ++}; ++#endif ++ + struct cfs_rq; + + static LIST_HEAD(task_groups); +@@ -282,6 +293,11 @@ struct task_group { + /* runqueue "owned" by this group on each cpu */ + struct cfs_rq **cfs_rq; + unsigned long shares; ++#ifdef CONFIG_CFS_HARD_LIMITS ++ struct cfs_bandwidth cfs_bandwidth; ++ /* If set, throttle when the group exceeds its bandwidth */ ++ int hard_limit_enabled; ++#endif + #endif + + #ifdef CONFIG_RT_GROUP_SCHED +@@ -477,6 +493,20 @@ struct cfs_rq { + unsigned long rq_weight; + #endif + #endif ++#ifdef CONFIG_CFS_HARD_LIMITS ++ /* set when the group is throttled on this cpu */ ++ int cfs_throttled; ++ ++ /* runtime currently consumed by the group on this rq */ ++ u64 cfs_time; ++ ++ /* runtime available to the group on this rq */ ++ u64 cfs_runtime; ++#endif ++ /* ++ * Number of tasks at this heirarchy. ++ */ ++ unsigned long nr_tasks_running; + }; + + /* Real-Time classes' related field in a runqueue: */ +@@ -661,6 +691,11 @@ struct rq { + /* BKL stats */ + unsigned int bkl_count; + #endif ++ /* ++ * Protects the cfs runtime related fields of all cfs_rqs under ++ * this rq ++ */ ++ spinlock_t runtime_lock; + }; + + static DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); +@@ -1552,6 +1587,7 @@ update_group_shares_cpu(struct task_grou + } + } + ++static inline int cfs_rq_throttled(struct cfs_rq *cfs_rq); + /* + * Re-compute the task group their per cpu shares over the given domain. + * This needs to be done in a bottom-up fashion because the rq weight of a +@@ -1569,9 +1605,11 @@ static int tg_shares_up(struct task_grou + * If there are currently no tasks on the cpu pretend there + * is one of average load so that when a new task gets to + * run here it will not get delayed by group starvation. ++ * Also if the group is throttled on this cpu, pretend that ++ * it has no tasks. + */ + weight = tg->cfs_rq[i]->load.weight; +- if (!weight) ++ if (!weight || cfs_rq_throttled(tg->cfs_rq[i])) + weight = NICE_0_LOAD; + + tg->cfs_rq[i]->rq_weight = weight; +@@ -1595,6 +1633,7 @@ static int tg_shares_up(struct task_grou + * Compute the cpu's hierarchical load factor for each task group. + * This needs to be done in a top-down fashion because the load of a child + * group is a fraction of its parents load. ++ * A throttled group's h_load is set to 0. + */ + static int tg_load_down(struct task_group *tg, void *data) + { +@@ -1603,6 +1642,8 @@ static int tg_load_down(struct task_grou + + if (!tg->parent) { + load = cpu_rq(cpu)->load.weight; ++ } else if (cfs_rq_throttled(tg->cfs_rq[cpu])) { ++ load = 0; + } else { + load = tg->parent->cfs_rq[cpu]->h_load; + load *= tg->cfs_rq[cpu]->shares; +@@ -1732,6 +1773,187 @@ static void cfs_rq_set_shares(struct cfs + + static void calc_load_account_active(struct rq *this_rq); + ++ ++#if defined(CONFIG_RT_GROUP_SCHED) || defined(CONFIG_FAIR_GROUP_SCHED) ++ ++#ifdef CONFIG_SMP ++static inline const struct cpumask *sched_bw_period_mask(void) ++{ ++ return cpu_rq(smp_processor_id())->rd->span; ++} ++#else /* !CONFIG_SMP */ ++static inline const struct cpumask *sched_bw_period_mask(void) ++{ ++ return cpu_online_mask; ++} ++#endif /* CONFIG_SMP */ ++ ++#else ++static inline const struct cpumask *sched_bw_period_mask(void) ++{ ++ return cpu_online_mask; ++} ++ ++#endif ++ ++#ifdef CONFIG_FAIR_GROUP_SCHED ++#ifdef CONFIG_CFS_HARD_LIMITS ++ ++/* ++ * Runtime allowed for a cfs group before it is hard limited. ++ * default: Infinite which means no hard limiting. ++ */ ++u64 sched_cfs_runtime = RUNTIME_INF; ++ ++/* ++ * period over which we hard limit the cfs group's bandwidth. ++ * default: 0.5s ++ */ ++u64 sched_cfs_period = 500000; ++ ++static inline u64 global_cfs_period(void) ++{ ++ return sched_cfs_period * NSEC_PER_USEC; ++} ++ ++static inline u64 global_cfs_runtime(void) ++{ ++ return RUNTIME_INF; ++} ++ ++int task_group_throttled(struct task_group *tg, int cpu); ++void do_sched_cfs_period_timer(struct cfs_bandwidth *cfs_b); ++ ++static inline int cfs_bandwidth_enabled(struct task_group *tg) ++{ ++ return tg->hard_limit_enabled; ++} ++ ++static inline void rq_runtime_lock(struct rq *rq) ++{ ++ spin_lock(&rq->runtime_lock); ++} ++ ++static inline void rq_runtime_unlock(struct rq *rq) ++{ ++ spin_unlock(&rq->runtime_lock); ++} ++ ++/* ++ * Refresh the runtimes of the throttled groups. ++ * But nothing much to do now, will populate this in later patches. ++ */ ++static enum hrtimer_restart sched_cfs_period_timer(struct hrtimer *timer) ++{ ++ struct cfs_bandwidth *cfs_b = ++ container_of(timer, struct cfs_bandwidth, cfs_period_timer); ++ ++ do_sched_cfs_period_timer(cfs_b); ++ hrtimer_add_expires_ns(timer, ktime_to_ns(cfs_b->cfs_period)); ++ return HRTIMER_RESTART; ++} ++ ++/* ++ * TODO: Check if this kind of timer setup is sufficient for cfs or ++ * should we do what rt is doing. ++ */ ++static void start_cfs_bandwidth(struct task_group *tg) ++{ ++ struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth; ++ ++ /* ++ * Timer isn't setup for groups with infinite runtime or for groups ++ * for which hard limiting isn't enabled. ++ */ ++ if (!cfs_bandwidth_enabled(tg) || (cfs_b->cfs_runtime == RUNTIME_INF)) ++ return; ++ ++ if (hrtimer_active(&cfs_b->cfs_period_timer)) ++ return; ++ ++ hrtimer_start_range_ns(&cfs_b->cfs_period_timer, cfs_b->cfs_period, ++ 0, HRTIMER_MODE_REL); ++} ++ ++static void init_cfs_bandwidth(struct task_group *tg) ++{ ++ struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth; ++ ++ cfs_b->cfs_period = ns_to_ktime(global_cfs_period()); ++ cfs_b->cfs_runtime = global_cfs_runtime(); ++ ++ spin_lock_init(&cfs_b->cfs_runtime_lock); ++ ++ hrtimer_init(&cfs_b->cfs_period_timer, ++ CLOCK_MONOTONIC, HRTIMER_MODE_REL); ++ cfs_b->cfs_period_timer.function = &sched_cfs_period_timer; ++} ++ ++static inline void destroy_cfs_bandwidth(struct task_group *tg) ++{ ++ hrtimer_cancel(&tg->cfs_bandwidth.cfs_period_timer); ++} ++ ++static void init_cfs_hard_limits(struct cfs_rq *cfs_rq, struct task_group *tg) ++{ ++ cfs_rq->cfs_time = 0; ++ cfs_rq->cfs_throttled = 0; ++ cfs_rq->cfs_runtime = tg->cfs_bandwidth.cfs_runtime; ++ tg->hard_limit_enabled = 0; ++} ++ ++#else /* !CONFIG_CFS_HARD_LIMITS */ ++ ++static void init_cfs_bandwidth(struct task_group *tg) ++{ ++ return; ++} ++ ++static inline void destroy_cfs_bandwidth(struct task_group *tg) ++{ ++ return; ++} ++ ++static void init_cfs_hard_limits(struct cfs_rq *cfs_rq, struct task_group *tg) ++{ ++ return; ++} ++ ++static inline void rq_runtime_lock(struct rq *rq) ++{ ++ return; ++} ++ ++static inline void rq_runtime_unlock(struct rq *rq) ++{ ++ return; ++} ++ ++#endif /* CONFIG_CFS_HARD_LIMITS */ ++#else /* !CONFIG_FAIR_GROUP_SCHED */ ++ ++static inline void rq_runtime_lock(struct rq *rq) ++{ ++ return; ++} ++ ++static inline void rq_runtime_unlock(struct rq *rq) ++{ ++ return; ++} ++ ++int task_group_throttled(struct task_group *tg, int cpu) ++{ ++ return 0; ++} ++ ++static inline int cfs_rq_throttled(struct cfs_rq *cfs_rq) ++{ ++ return 0; ++} ++ ++#endif /* CONFIG_FAIR_GROUP_SCHED */ ++ + #include "sched_stats.h" + #include "sched_idletask.c" + #include "sched_fair.c" +@@ -1781,14 +2003,17 @@ static void update_avg(u64 *avg, u64 sam + *avg += diff >> 3; + } + +-static void enqueue_task(struct rq *rq, struct task_struct *p, int wakeup) ++static int enqueue_task(struct rq *rq, struct task_struct *p, int wakeup) + { ++ int ret; ++ + if (wakeup) + p->se.start_runtime = p->se.sum_exec_runtime; + + sched_info_queued(p); +- p->sched_class->enqueue_task(rq, p, wakeup); ++ ret = p->sched_class->enqueue_task(rq, p, wakeup); + p->se.on_rq = 1; ++ return ret; + } + + static void dequeue_task(struct rq *rq, struct task_struct *p, int sleep) +@@ -1863,8 +2088,15 @@ static void activate_task(struct rq *rq, + if (task_contributes_to_load(p)) + rq->nr_uninterruptible--; + +- enqueue_task(rq, p, wakeup); +- inc_nr_running(rq); ++ /* ++ * Increment rq->nr_running only if enqueue_task() succeeds. ++ * enqueue_task() can fail when the task being activated belongs ++ * to a throttled group. In this case, the task gets enqueued to ++ * throttled group and the group will be enqueued later when it ++ * gets unthrottled. rq->nr_running gets incremented at that time. ++ */ ++ if (!enqueue_task(rq, p, wakeup)) ++ inc_nr_running(rq); + } + + /* +@@ -2981,9 +3213,17 @@ EXPORT_SYMBOL(avenrun); + */ + void get_avenrun(unsigned long *loads, unsigned long offset, int shift) + { +- loads[0] = (avenrun[0] + offset) << shift; +- loads[1] = (avenrun[1] + offset) << shift; +- loads[2] = (avenrun[2] + offset) << shift; ++ if (vx_flags(VXF_VIRT_LOAD, 0)) { ++ struct vx_info *vxi = current_vx_info(); ++ ++ loads[0] = (vxi->cvirt.load[0] + offset) << shift; ++ loads[1] = (vxi->cvirt.load[1] + offset) << shift; ++ loads[2] = (vxi->cvirt.load[2] + offset) << shift; ++ } else { ++ loads[0] = (avenrun[0] + offset) << shift; ++ loads[1] = (avenrun[1] + offset) << shift; ++ loads[2] = (avenrun[2] + offset) << shift; ++ } + } + + static unsigned long +@@ -3201,6 +3441,7 @@ int can_migrate_task(struct task_struct + * 1) running (obviously), or + * 2) cannot be migrated to this CPU due to cpus_allowed, or + * 3) are cache-hot on their current CPU. ++ * 4) end up in throttled task groups on this CPU. + */ + if (!cpumask_test_cpu(this_cpu, &p->cpus_allowed)) { + schedstat_inc(p, se.nr_failed_migrations_affine); +@@ -3214,6 +3455,18 @@ int can_migrate_task(struct task_struct + } + + /* ++ * Don't migrate the task if it belongs to a ++ * - throttled group on its current cpu ++ * - throttled group on this_cpu ++ * - group whose hierarchy is throttled on this_cpu ++ */ ++ if (cfs_rq_throttled(cfs_rq_of(&p->se)) || ++ task_group_throttled(task_group(p), this_cpu)) { ++ schedstat_inc(p, se.nr_failed_migrations_throttled); ++ return 0; ++ } ++ ++ /* + * Aggressive migration if: + * 1) task is cache cold, or + * 2) too many balance attempts have failed. +@@ -4912,16 +5165,19 @@ void account_user_time(struct task_struc + cputime_t cputime_scaled) + { + struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat; ++ struct vx_info *vxi = p->vx_info; /* p is _always_ current */ + cputime64_t tmp; ++ int nice = (TASK_NICE(p) > 0); + + /* Add user time to process. */ + p->utime = cputime_add(p->utime, cputime); + p->utimescaled = cputime_add(p->utimescaled, cputime_scaled); ++ vx_account_user(vxi, cputime, nice); + account_group_user_time(p, cputime); + + /* Add user time to cpustat. */ + tmp = cputime_to_cputime64(cputime); +- if (TASK_NICE(p) > 0) ++ if (nice) + cpustat->nice = cputime64_add(cpustat->nice, tmp); + else + cpustat->user = cputime64_add(cpustat->user, tmp); +@@ -4967,6 +5223,7 @@ void account_system_time(struct task_str + cputime_t cputime, cputime_t cputime_scaled) + { + struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat; ++ struct vx_info *vxi = p->vx_info; /* p is _always_ current */ + cputime64_t tmp; + + if ((p->flags & PF_VCPU) && (irq_count() - hardirq_offset == 0)) { +@@ -4977,6 +5234,7 @@ void account_system_time(struct task_str + /* Add system time to process. */ + p->stime = cputime_add(p->stime, cputime); + p->stimescaled = cputime_add(p->stimescaled, cputime_scaled); ++ vx_account_system(vxi, cputime, 0 /* do we have idle time? */); + account_group_system_time(p, cputime); + + /* Add system time to cpustat. */ +@@ -5896,8 +6154,10 @@ void rt_mutex_setprio(struct task_struct + oldprio = p->prio; + on_rq = p->se.on_rq; + running = task_current(rq, p); +- if (on_rq) ++ if (on_rq) { + dequeue_task(rq, p, 0); ++ dec_nr_running(rq); ++ } + if (running) + p->sched_class->put_prev_task(rq, p); + +@@ -5911,7 +6171,8 @@ void rt_mutex_setprio(struct task_struct + if (running) + p->sched_class->set_curr_task(rq); + if (on_rq) { +- enqueue_task(rq, p, 0); ++ if (!enqueue_task(rq, p, 0)) ++ inc_nr_running(rq); + + check_class_changed(rq, p, prev_class, oldprio, running); + } +@@ -5945,8 +6206,10 @@ void set_user_nice(struct task_struct *p + goto out_unlock; + } + on_rq = p->se.on_rq; +- if (on_rq) ++ if (on_rq) { + dequeue_task(rq, p, 0); ++ dec_nr_running(rq); ++ } + + p->static_prio = NICE_TO_PRIO(nice); + set_load_weight(p); +@@ -5955,7 +6218,8 @@ void set_user_nice(struct task_struct *p + delta = p->prio - old_prio; + + if (on_rq) { +- enqueue_task(rq, p, 0); ++ if (!enqueue_task(rq, p, 0)) ++ inc_nr_running(rq); + /* + * If the task increased its priority or is running and + * lowered its priority, then reschedule its CPU: +@@ -6012,7 +6276,7 @@ SYSCALL_DEFINE1(nice, int, increment) + nice = 19; + + if (increment < 0 && !can_nice(current, nice)) +- return -EPERM; ++ return vx_flags(VXF_IGNEG_NICE, 0) ? 0 : -EPERM; + + retval = security_task_setnice(current, nice); + if (retval) +@@ -9119,6 +9383,7 @@ static void init_tg_cfs_entry(struct tas + struct rq *rq = cpu_rq(cpu); + tg->cfs_rq[cpu] = cfs_rq; + init_cfs_rq(cfs_rq, rq); ++ init_cfs_hard_limits(cfs_rq, tg); + cfs_rq->tg = tg; + if (add) + list_add(&cfs_rq->leaf_cfs_rq_list, &rq->leaf_cfs_rq_list); +@@ -9248,6 +9513,10 @@ void __init sched_init(void) + #endif /* CONFIG_USER_SCHED */ + #endif /* CONFIG_RT_GROUP_SCHED */ + ++#ifdef CONFIG_FAIR_GROUP_SCHED ++ init_cfs_bandwidth(&init_task_group); ++#endif ++ + #ifdef CONFIG_GROUP_SCHED + list_add(&init_task_group.list, &task_groups); + INIT_LIST_HEAD(&init_task_group.children); +@@ -9264,6 +9533,7 @@ void __init sched_init(void) + + rq = cpu_rq(i); + spin_lock_init(&rq->lock); ++ spin_lock_init(&rq->runtime_lock); + rq->nr_running = 0; + rq->calc_load_active = 0; + rq->calc_load_update = jiffies + LOAD_FREQ; +@@ -9537,6 +9807,7 @@ static void free_fair_sched_group(struct + { + int i; + ++ destroy_cfs_bandwidth(tg); + for_each_possible_cpu(i) { + if (tg->cfs_rq) + kfree(tg->cfs_rq[i]); +@@ -9563,6 +9834,7 @@ int alloc_fair_sched_group(struct task_g + if (!tg->se) + goto err; + ++ init_cfs_bandwidth(tg); + tg->shares = NICE_0_LOAD; + + for_each_possible_cpu(i) { +@@ -9795,8 +10067,10 @@ void sched_move_task(struct task_struct + running = task_current(rq, tsk); + on_rq = tsk->se.on_rq; + +- if (on_rq) ++ if (on_rq) { + dequeue_task(rq, tsk, 0); ++ dec_nr_running(rq); ++ } + if (unlikely(running)) + tsk->sched_class->put_prev_task(rq, tsk); + +@@ -9810,7 +10084,8 @@ void sched_move_task(struct task_struct + if (unlikely(running)) + tsk->sched_class->set_curr_task(rq); + if (on_rq) +- enqueue_task(rq, tsk, 0); ++ if (!enqueue_task(rq, tsk, 0)) ++ inc_nr_running(rq); + + task_rq_unlock(rq, &flags); + } +@@ -10257,6 +10532,134 @@ static u64 cpu_shares_read_u64(struct cg + + return (u64) tg->shares; + } ++ ++#ifdef CONFIG_CFS_HARD_LIMITS ++ ++static int tg_set_cfs_bandwidth(struct task_group *tg, ++ u64 cfs_period, u64 cfs_runtime) ++{ ++ int i, err = 0; ++ ++ spin_lock_irq(&tg->cfs_bandwidth.cfs_runtime_lock); ++ tg->cfs_bandwidth.cfs_period = ns_to_ktime(cfs_period); ++ tg->cfs_bandwidth.cfs_runtime = cfs_runtime; ++ ++ for_each_possible_cpu(i) { ++ struct cfs_rq *cfs_rq = tg->cfs_rq[i]; ++ ++ rq_runtime_lock(rq_of(cfs_rq)); ++ cfs_rq->cfs_runtime = cfs_runtime; ++ rq_runtime_unlock(rq_of(cfs_rq)); ++ } ++ ++ start_cfs_bandwidth(tg); ++ spin_unlock_irq(&tg->cfs_bandwidth.cfs_runtime_lock); ++ return err; ++} ++ ++int tg_set_cfs_runtime(struct task_group *tg, long cfs_runtime_us) ++{ ++ u64 cfs_runtime, cfs_period; ++ ++ cfs_period = ktime_to_ns(tg->cfs_bandwidth.cfs_period); ++ cfs_runtime = (u64)cfs_runtime_us * NSEC_PER_USEC; ++ if (cfs_runtime_us < 0) ++ cfs_runtime = RUNTIME_INF; ++ ++ return tg_set_cfs_bandwidth(tg, cfs_period, cfs_runtime); ++} ++ ++long tg_get_cfs_runtime(struct task_group *tg) ++{ ++ u64 cfs_runtime_us; ++ ++ if (tg->cfs_bandwidth.cfs_runtime == RUNTIME_INF) ++ return -1; ++ ++ cfs_runtime_us = tg->cfs_bandwidth.cfs_runtime; ++ do_div(cfs_runtime_us, NSEC_PER_USEC); ++ return cfs_runtime_us; ++} ++ ++int tg_set_cfs_period(struct task_group *tg, long cfs_period_us) ++{ ++ u64 cfs_runtime, cfs_period; ++ ++ cfs_period = (u64)cfs_period_us * NSEC_PER_USEC; ++ cfs_runtime = tg->cfs_bandwidth.cfs_runtime; ++ ++ if (cfs_period == 0) ++ return -EINVAL; ++ ++ return tg_set_cfs_bandwidth(tg, cfs_period, cfs_runtime); ++} ++ ++long tg_get_cfs_period(struct task_group *tg) ++{ ++ u64 cfs_period_us; ++ ++ cfs_period_us = ktime_to_ns(tg->cfs_bandwidth.cfs_period); ++ do_div(cfs_period_us, NSEC_PER_USEC); ++ return cfs_period_us; ++} ++ ++int tg_set_hard_limit_enabled(struct task_group *tg, u64 val) ++{ ++ local_irq_disable(); ++ spin_lock(&tg->cfs_bandwidth.cfs_runtime_lock); ++ if (val > 0) { ++ tg->hard_limit_enabled = 1; ++ start_cfs_bandwidth(tg); ++ spin_unlock(&tg->cfs_bandwidth.cfs_runtime_lock); ++ } else { ++ destroy_cfs_bandwidth(tg); ++ tg->hard_limit_enabled = 0; ++ spin_unlock(&tg->cfs_bandwidth.cfs_runtime_lock); ++ /* ++ * Hard limiting is being disabled for this group. ++ * Refresh runtimes and put the throttled entities ++ * of the group back onto runqueue. ++ */ ++ do_sched_cfs_period_timer(&tg->cfs_bandwidth); ++ } ++ local_irq_enable(); ++ return 0; ++} ++ ++static s64 cpu_cfs_runtime_read_s64(struct cgroup *cgrp, struct cftype *cft) ++{ ++ return tg_get_cfs_runtime(cgroup_tg(cgrp)); ++} ++ ++static int cpu_cfs_runtime_write_s64(struct cgroup *cgrp, struct cftype *cftype, ++ s64 cfs_runtime_us) ++{ ++ return tg_set_cfs_runtime(cgroup_tg(cgrp), cfs_runtime_us); ++} ++ ++static u64 cpu_cfs_period_read_u64(struct cgroup *cgrp, struct cftype *cft) ++{ ++ return tg_get_cfs_period(cgroup_tg(cgrp)); ++} ++ ++static int cpu_cfs_period_write_u64(struct cgroup *cgrp, struct cftype *cftype, ++ u64 cfs_period_us) ++{ ++ return tg_set_cfs_period(cgroup_tg(cgrp), cfs_period_us); ++} ++ ++static u64 cpu_cfs_hard_limit_read_u64(struct cgroup *cgrp, struct cftype *cft) ++{ ++ return cfs_bandwidth_enabled(cgroup_tg(cgrp)); ++} ++ ++static int cpu_cfs_hard_limit_write_u64(struct cgroup *cgrp, ++ struct cftype *cftype, u64 val) ++{ ++ return tg_set_hard_limit_enabled(cgroup_tg(cgrp), val); ++} ++ ++#endif /* CONFIG_CFS_HARD_LIMITS */ + #endif /* CONFIG_FAIR_GROUP_SCHED */ + + #ifdef CONFIG_RT_GROUP_SCHED +@@ -10290,6 +10693,23 @@ static struct cftype cpu_files[] = { + .read_u64 = cpu_shares_read_u64, + .write_u64 = cpu_shares_write_u64, + }, ++#ifdef CONFIG_CFS_HARD_LIMITS ++ { ++ .name = "cfs_runtime_us", ++ .read_s64 = cpu_cfs_runtime_read_s64, ++ .write_s64 = cpu_cfs_runtime_write_s64, ++ }, ++ { ++ .name = "cfs_period_us", ++ .read_u64 = cpu_cfs_period_read_u64, ++ .write_u64 = cpu_cfs_period_write_u64, ++ }, ++ { ++ .name = "cfs_hard_limit", ++ .read_u64 = cpu_cfs_hard_limit_read_u64, ++ .write_u64 = cpu_cfs_hard_limit_write_u64, ++ }, ++#endif /* CONFIG_CFS_HARD_LIMITS */ + #endif + #ifdef CONFIG_RT_GROUP_SCHED + { +diff -NurpP --minimal linux-2.6.31.6/kernel/sched_debug.c linux-2.6.31.6-vs2.3.0.36.24/kernel/sched_debug.c +--- linux-2.6.31.6/kernel/sched_debug.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/sched_debug.c 2009-10-06 04:39:26.000000000 +0200 +@@ -80,6 +80,11 @@ static void print_cfs_group_stats(struct + PN(se->wait_max); + PN(se->wait_sum); + P(se->wait_count); ++#ifdef CONFIG_CFS_HARD_LIMITS ++ PN(se->throttle_max); ++ PN(se->throttle_sum); ++ P(se->throttle_count); ++#endif + #endif + P(se->load.weight); + #undef PN +@@ -214,6 +219,18 @@ void print_cfs_rq(struct seq_file *m, in + #ifdef CONFIG_SMP + SEQ_printf(m, " .%-30s: %lu\n", "shares", cfs_rq->shares); + #endif ++ SEQ_printf(m, " .%-30s: %ld\n", "nr_tasks_running", ++ cfs_rq->nr_tasks_running); ++#ifdef CONFIG_CFS_HARD_LIMITS ++ spin_lock_irqsave(&rq->lock, flags); ++ SEQ_printf(m, " .%-30s: %d\n", "cfs_throttled", ++ cfs_rq->cfs_throttled); ++ SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "cfs_time", ++ SPLIT_NS(cfs_rq->cfs_time)); ++ SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "cfs_runtime", ++ SPLIT_NS(cfs_rq->cfs_runtime)); ++ spin_unlock_irqrestore(&rq->lock, flags); ++#endif + print_cfs_group_stats(m, cpu, cfs_rq->tg); + #endif + } +@@ -310,7 +327,7 @@ static int sched_debug_show(struct seq_f + u64 now = ktime_to_ns(ktime_get()); + int cpu; + +- SEQ_printf(m, "Sched Debug Version: v0.09, %s %.*s\n", ++ SEQ_printf(m, "Sched Debug Version: v0.10, %s %.*s\n", + init_utsname()->release, + (int)strcspn(init_utsname()->version, " "), + init_utsname()->version); +@@ -415,6 +432,7 @@ void proc_sched_show_task(struct task_st + P(se.nr_failed_migrations_affine); + P(se.nr_failed_migrations_running); + P(se.nr_failed_migrations_hot); ++ P(se.nr_failed_migrations_throttled); + P(se.nr_forced_migrations); + P(se.nr_forced2_migrations); + P(se.nr_wakeups); +@@ -489,6 +507,7 @@ void proc_sched_set_task(struct task_str + p->se.nr_failed_migrations_affine = 0; + p->se.nr_failed_migrations_running = 0; + p->se.nr_failed_migrations_hot = 0; ++ p->se.nr_failed_migrations_throttled = 0; + p->se.nr_forced_migrations = 0; + p->se.nr_forced2_migrations = 0; + p->se.nr_wakeups = 0; +diff -NurpP --minimal linux-2.6.31.6/kernel/sched_fair.c linux-2.6.31.6-vs2.3.0.36.24/kernel/sched_fair.c +--- linux-2.6.31.6/kernel/sched_fair.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/sched_fair.c 2009-10-06 04:39:37.000000000 +0200 +@@ -186,6 +186,286 @@ find_matching_se(struct sched_entity **s + } + } + ++#ifdef CONFIG_CFS_HARD_LIMITS ++ ++static inline void update_stats_throttle_start(struct cfs_rq *cfs_rq, ++ struct sched_entity *se) ++{ ++ schedstat_set(se->throttle_start, rq_of(cfs_rq)->clock); ++} ++ ++static inline void update_stats_throttle_end(struct cfs_rq *cfs_rq, ++ struct sched_entity *se) ++{ ++ schedstat_set(se->throttle_max, max(se->throttle_max, ++ rq_of(cfs_rq)->clock - se->throttle_start)); ++ schedstat_set(se->throttle_count, se->throttle_count + 1); ++ schedstat_set(se->throttle_sum, se->throttle_sum + ++ rq_of(cfs_rq)->clock - se->throttle_start); ++ schedstat_set(se->throttle_start, 0); ++} ++ ++static void double_rq_runtime_lock(struct rq *rq1, struct rq *rq2) ++ __acquires(rq1->runtime_lock) ++ __acquires(rq2->runtime_lock) ++{ ++ BUG_ON(!irqs_disabled()); ++ if (rq1 == rq2) { ++ spin_lock(&rq1->runtime_lock); ++ __acquire(rq2->runtime_lock); /* Fake it out ;) */ ++ } else { ++ if (rq1 < rq2) { ++ spin_lock(&rq1->runtime_lock); ++ spin_lock_nested(&rq2->runtime_lock, ++ SINGLE_DEPTH_NESTING); ++ } else { ++ spin_lock(&rq2->runtime_lock); ++ spin_lock_nested(&rq1->runtime_lock, ++ SINGLE_DEPTH_NESTING); ++ } ++ } ++ update_rq_clock(rq1); ++ update_rq_clock(rq2); ++} ++ ++static void double_rq_runtime_unlock(struct rq *rq1, struct rq *rq2) ++ __releases(rq1->runtime_lock) ++ __releases(rq2->runtime_lock) ++{ ++ spin_unlock(&rq1->runtime_lock); ++ if (rq1 != rq2) ++ spin_unlock(&rq2->runtime_lock); ++ else ++ __release(rq2->runtime_lock); ++} ++ ++static inline int cfs_rq_throttled(struct cfs_rq *cfs_rq) ++{ ++ return cfs_rq->cfs_throttled; ++} ++ ++/* ++ * Ran out of runtime, check if we can borrow some from others ++ * instead of getting throttled right away. ++ */ ++static void do_cfs_balance_runtime(struct cfs_rq *cfs_rq) ++{ ++ struct rq *rq = rq_of(cfs_rq); ++ struct cfs_bandwidth *cfs_b = &cfs_rq->tg->cfs_bandwidth; ++ const struct cpumask *span = sched_bw_period_mask(); ++ int i, weight; ++ u64 cfs_period; ++ struct task_group *tg = container_of(cfs_b, struct task_group, ++ cfs_bandwidth); ++ ++ weight = cpumask_weight(span); ++ spin_lock(&cfs_b->cfs_runtime_lock); ++ cfs_period = ktime_to_ns(cfs_b->cfs_period); ++ ++ for_each_cpu(i, span) { ++ struct cfs_rq *borrow_cfs_rq = tg->cfs_rq[i]; ++ struct rq *borrow_rq = rq_of(borrow_cfs_rq); ++ s64 diff; ++ ++ if (borrow_cfs_rq == cfs_rq) ++ continue; ++ ++ double_rq_runtime_lock(rq, borrow_rq); ++ if (borrow_cfs_rq->cfs_runtime == RUNTIME_INF) { ++ double_rq_runtime_unlock(rq, borrow_rq); ++ continue; ++ } ++ ++ diff = borrow_cfs_rq->cfs_runtime - borrow_cfs_rq->cfs_time; ++ if (diff > 0) { ++ diff = div_u64((u64)diff, weight); ++ if (cfs_rq->cfs_runtime + diff > cfs_period) ++ diff = cfs_period - cfs_rq->cfs_runtime; ++ borrow_cfs_rq->cfs_runtime -= diff; ++ cfs_rq->cfs_runtime += diff; ++ if (cfs_rq->cfs_runtime == cfs_period) { ++ double_rq_runtime_unlock(rq, borrow_rq); ++ break; ++ } ++ } ++ double_rq_runtime_unlock(rq, borrow_rq); ++ } ++ spin_unlock(&cfs_b->cfs_runtime_lock); ++} ++ ++/* ++ * Called with rq->runtime_lock held. ++ */ ++static void cfs_balance_runtime(struct cfs_rq *cfs_rq) ++{ ++ struct rq *rq = rq_of(cfs_rq); ++ ++ rq_runtime_unlock(rq); ++ do_cfs_balance_runtime(cfs_rq); ++ rq_runtime_lock(rq); ++} ++ ++/* ++ * Check if group entity exceeded its runtime. If so, mark the cfs_rq as ++ * throttled mark the current task for reschedling. ++ */ ++static void sched_cfs_runtime_exceeded(struct sched_entity *se, ++ struct task_struct *tsk_curr, unsigned long delta_exec) ++{ ++ struct cfs_rq *cfs_rq; ++ ++ cfs_rq = group_cfs_rq(se); ++ ++ if (!cfs_bandwidth_enabled(cfs_rq->tg)) ++ return; ++ ++ if (cfs_rq->cfs_runtime == RUNTIME_INF) ++ return; ++ ++ cfs_rq->cfs_time += delta_exec; ++ ++ if (cfs_rq_throttled(cfs_rq)) ++ return; ++ ++ if (cfs_rq->cfs_time > cfs_rq->cfs_runtime) ++ cfs_balance_runtime(cfs_rq); ++ ++ if (cfs_rq->cfs_time > cfs_rq->cfs_runtime) { ++ cfs_rq->cfs_throttled = 1; ++ update_stats_throttle_start(cfs_rq, se); ++ resched_task(tsk_curr); ++ } ++} ++ ++/* ++ * Check if the entity is throttled. ++ */ ++static int entity_throttled(struct sched_entity *se) ++{ ++ struct cfs_rq *cfs_rq; ++ ++ /* Only group entities can be throttled */ ++ if (entity_is_task(se)) ++ return 0; ++ ++ cfs_rq = group_cfs_rq(se); ++ if (cfs_rq_throttled(cfs_rq)) ++ return 1; ++ return 0; ++} ++ ++int task_group_throttled(struct task_group *tg, int cpu) ++{ ++ struct sched_entity *se = tg->se[cpu]; ++ ++ for_each_sched_entity(se) { ++ if (entity_throttled(se)) ++ return 1; ++ } ++ return 0; ++} ++ ++static void enqueue_entity_locked(struct cfs_rq *cfs_rq, ++ struct sched_entity *se, int wakeup); ++static void add_cfs_rq_tasks_running(struct sched_entity *se, ++ unsigned long count); ++static void sub_cfs_rq_tasks_running(struct sched_entity *se, ++ unsigned long count); ++ ++static void enqueue_throttled_entity(struct rq *rq, struct sched_entity *se) ++{ ++ unsigned long nr_tasks = 0; ++ struct sched_entity *se_tmp = se; ++ int throttled = 0; ++ ++ for_each_sched_entity(se) { ++ if (se->on_rq) ++ break; ++ ++ if (entity_throttled(se)) { ++ throttled = 1; ++ break; ++ } ++ ++ enqueue_entity_locked(cfs_rq_of(se), se, 0); ++ nr_tasks += group_cfs_rq(se)->nr_tasks_running; ++ } ++ ++ if (!nr_tasks) ++ return; ++ ++ /* ++ * Add the number of tasks this entity has to ++ * all of its parent entities. ++ */ ++ add_cfs_rq_tasks_running(se_tmp, nr_tasks); ++ ++ /* ++ * Add the number of tasks this entity has to ++ * this cpu's rq only if the entity got enqueued all the ++ * way up without any throttled entity in the hierarchy. ++ */ ++ if (!throttled) ++ rq->nr_running += nr_tasks; ++} ++ ++/* ++ * Refresh runtimes of all cfs_rqs in this group, i,e., ++ * refresh runtimes of the representative cfs_rq of this ++ * tg on all cpus. Enqueue any throttled entity back. ++ */ ++void do_sched_cfs_period_timer(struct cfs_bandwidth *cfs_b) ++{ ++ int i; ++ const struct cpumask *span = sched_bw_period_mask(); ++ struct task_group *tg = container_of(cfs_b, struct task_group, ++ cfs_bandwidth); ++ unsigned long flags; ++ ++ for_each_cpu(i, span) { ++ struct rq *rq = cpu_rq(i); ++ struct cfs_rq *cfs_rq = tg->cfs_rq[i]; ++ struct sched_entity *se = tg->se[i]; ++ ++ spin_lock_irqsave(&rq->lock, flags); ++ rq_runtime_lock(rq); ++ cfs_rq->cfs_time = 0; ++ if (cfs_rq_throttled(cfs_rq)) { ++ update_rq_clock(rq); ++ update_stats_throttle_end(cfs_rq, se); ++ cfs_rq->cfs_throttled = 0; ++ enqueue_throttled_entity(rq, se); ++ } ++ rq_runtime_unlock(rq); ++ spin_unlock_irqrestore(&rq->lock, flags); ++ } ++} ++ ++#else ++ ++static inline int cfs_rq_throttled(struct cfs_rq *cfs_rq) ++{ ++ return 0; ++} ++ ++int task_group_throttled(struct task_group *tg, int cpu) ++{ ++ return 0; ++} ++ ++static void sched_cfs_runtime_exceeded(struct sched_entity *se, ++ struct task_struct *tsk_curr, unsigned long delta_exec) ++{ ++ return; ++} ++ ++static int entity_throttled(struct sched_entity *se) ++{ ++ return 0; ++} ++ ++#endif /* CONFIG_CFS_HARD_LIMITS */ ++ + #else /* CONFIG_FAIR_GROUP_SCHED */ + + static inline struct rq *rq_of(struct cfs_rq *cfs_rq) +@@ -241,8 +521,47 @@ find_matching_se(struct sched_entity **s + { + } + ++static void sched_cfs_runtime_exceeded(struct sched_entity *se, ++ struct task_struct *tsk_curr, unsigned long delta_exec) ++{ ++ return; ++} ++ ++static int entity_throttled(struct sched_entity *se) ++{ ++ return 0; ++} ++ + #endif /* CONFIG_FAIR_GROUP_SCHED */ + ++static void add_cfs_rq_tasks_running(struct sched_entity *se, ++ unsigned long count) ++{ ++ struct cfs_rq *cfs_rq; ++ ++ for_each_sched_entity(se) { ++ /* ++ * If any entity in the hierarchy is throttled, don't ++ * propogate the tasks count up since this entity isn't ++ * on rq yet. ++ */ ++ if (entity_throttled(se)) ++ break; ++ cfs_rq = cfs_rq_of(se); ++ cfs_rq->nr_tasks_running += count; ++ } ++} ++ ++static void sub_cfs_rq_tasks_running(struct sched_entity *se, ++ unsigned long count) ++{ ++ struct cfs_rq *cfs_rq; ++ ++ for_each_sched_entity(se) { ++ cfs_rq = cfs_rq_of(se); ++ cfs_rq->nr_tasks_running -= count; ++ } ++} + + /************************************************************** + * Scheduling class tree data structure manipulation methods: +@@ -481,10 +800,12 @@ __update_curr(struct cfs_rq *cfs_rq, str + update_min_vruntime(cfs_rq); + } + +-static void update_curr(struct cfs_rq *cfs_rq) ++static void update_curr_common(struct cfs_rq *cfs_rq) + { + struct sched_entity *curr = cfs_rq->curr; +- u64 now = rq_of(cfs_rq)->clock; ++ struct rq *rq = rq_of(cfs_rq); ++ struct task_struct *tsk_curr = rq->curr; ++ u64 now = rq->clock; + unsigned long delta_exec; + + if (unlikely(!curr)) +@@ -507,9 +828,23 @@ static void update_curr(struct cfs_rq *c + + cpuacct_charge(curtask, delta_exec); + account_group_exec_runtime(curtask, delta_exec); ++ } else { ++ sched_cfs_runtime_exceeded(curr, tsk_curr, delta_exec); + } + } + ++static void update_curr(struct cfs_rq *cfs_rq) ++{ ++ rq_runtime_lock(rq_of(cfs_rq)); ++ update_curr_common(cfs_rq); ++ rq_runtime_unlock(rq_of(cfs_rq)); ++} ++ ++static inline void update_curr_locked(struct cfs_rq *cfs_rq) ++{ ++ update_curr_common(cfs_rq); ++} ++ + static inline void + update_stats_wait_start(struct cfs_rq *cfs_rq, struct sched_entity *se) + { +@@ -713,13 +1048,9 @@ place_entity(struct cfs_rq *cfs_rq, stru + se->vruntime = vruntime; + } + +-static void +-enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup) ++static void enqueue_entity_common(struct cfs_rq *cfs_rq, ++ struct sched_entity *se, int wakeup) + { +- /* +- * Update run-time statistics of the 'current'. +- */ +- update_curr(cfs_rq); + account_entity_enqueue(cfs_rq, se); + + if (wakeup) { +@@ -731,6 +1062,29 @@ enqueue_entity(struct cfs_rq *cfs_rq, st + check_spread(cfs_rq, se); + if (se != cfs_rq->curr) + __enqueue_entity(cfs_rq, se); ++ ++ if (entity_is_task(se)) ++ vx_activate_task(task_of(se)); ++} ++ ++static void enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, ++ int wakeup) ++{ ++ /* ++ * Update run-time statistics of the 'current'. ++ */ ++ update_curr(cfs_rq); ++ enqueue_entity_common(cfs_rq, se, wakeup); ++} ++ ++static void enqueue_entity_locked(struct cfs_rq *cfs_rq, ++ struct sched_entity *se, int wakeup) ++{ ++ /* ++ * Update run-time statistics of the 'current'. ++ */ ++ update_curr_locked(cfs_rq); ++ enqueue_entity_common(cfs_rq, se, wakeup); + } + + static void __clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se) +@@ -774,6 +1128,8 @@ dequeue_entity(struct cfs_rq *cfs_rq, st + + if (se != cfs_rq->curr) + __dequeue_entity(cfs_rq, se); ++ if (entity_is_task(se)) ++ vx_deactivate_task(task_of(se)); + account_entity_dequeue(cfs_rq, se); + update_min_vruntime(cfs_rq); + } +@@ -844,8 +1200,40 @@ static struct sched_entity *pick_next_en + return se; + } + ++/* ++ * Called from put_prev_entity() ++ * If a group entity (@se) is found to be throttled, it will not be put back ++ * on @cfs_rq, which is equivalent to dequeing it. ++ */ ++static void dequeue_throttled_entity(struct cfs_rq *cfs_rq, ++ struct sched_entity *se) ++{ ++ unsigned long nr_tasks = group_cfs_rq(se)->nr_tasks_running; ++ ++ __clear_buddies(cfs_rq, se); ++ account_entity_dequeue(cfs_rq, se); ++ cfs_rq->curr = NULL; ++ ++ if (!nr_tasks) ++ return; ++ ++ /* ++ * Decrement the number of tasks this entity has from ++ * all of its parent entities. ++ */ ++ sub_cfs_rq_tasks_running(se, nr_tasks); ++ ++ /* ++ * Decrement the number of tasks this entity has from ++ * this cpu's rq. ++ */ ++ rq_of(cfs_rq)->nr_running -= nr_tasks; ++} ++ + static void put_prev_entity(struct cfs_rq *cfs_rq, struct sched_entity *prev) + { ++ struct cfs_rq *gcfs_rq = group_cfs_rq(prev); ++ + /* + * If still on the runqueue then deactivate_task() + * was not called and update_curr() has to be done: +@@ -855,6 +1243,18 @@ static void put_prev_entity(struct cfs_r + + check_spread(cfs_rq, prev); + if (prev->on_rq) { ++ /* ++ * If the group entity is throttled or if it has no ++ * no child entities, then don't enqueue it back. ++ */ ++ rq_runtime_lock(rq_of(cfs_rq)); ++ if (entity_throttled(prev) || ++ (gcfs_rq && !gcfs_rq->nr_running)) { ++ dequeue_throttled_entity(cfs_rq, prev); ++ rq_runtime_unlock(rq_of(cfs_rq)); ++ return; ++ } ++ rq_runtime_unlock(rq_of(cfs_rq)); + update_stats_wait_start(cfs_rq, prev); + /* Put 'current' back into the tree. */ + __enqueue_entity(cfs_rq, prev); +@@ -955,21 +1355,32 @@ static inline void hrtick_update(struct + * The enqueue_task method is called before nr_running is + * increased. Here we update the fair scheduling stats and + * then put the task into the rbtree: ++ * Don't enqueue a throttled entity further into the hierarchy. + */ +-static void enqueue_task_fair(struct rq *rq, struct task_struct *p, int wakeup) ++static int enqueue_task_fair(struct rq *rq, struct task_struct *p, int wakeup) + { + struct cfs_rq *cfs_rq; + struct sched_entity *se = &p->se; ++ int throttled = 0; + ++ rq_runtime_lock(rq); + for_each_sched_entity(se) { + if (se->on_rq) + break; ++ if (entity_throttled(se)) { ++ throttled = 1; ++ break; ++ } + cfs_rq = cfs_rq_of(se); +- enqueue_entity(cfs_rq, se, wakeup); ++ enqueue_entity_locked(cfs_rq, se, wakeup); + wakeup = 1; + } + ++ add_cfs_rq_tasks_running(&p->se, 1); ++ rq_runtime_unlock(rq); ++ + hrtick_update(rq); ++ return throttled; + } + + /* +@@ -991,6 +1402,7 @@ static void dequeue_task_fair(struct rq + sleep = 1; + } + ++ sub_cfs_rq_tasks_running(&p->se, 1); + hrtick_update(rq); + } + +@@ -1518,6 +1930,7 @@ static struct task_struct *pick_next_tas + + do { + se = pick_next_entity(cfs_rq); ++ + /* + * If se was a buddy, clear it so that it will have to earn + * the favour again. +@@ -1627,9 +2040,9 @@ load_balance_fair(struct rq *this_rq, in + u64 rem_load, moved_load; + + /* +- * empty group ++ * empty group or a group with no h_load (throttled) + */ +- if (!busiest_cfs_rq->task_weight) ++ if (!busiest_cfs_rq->task_weight || !busiest_h_load) + continue; + + rem_load = (u64)rem_load_move * busiest_weight; +diff -NurpP --minimal linux-2.6.31.6/kernel/sched_rt.c linux-2.6.31.6-vs2.3.0.36.24/kernel/sched_rt.c +--- linux-2.6.31.6/kernel/sched_rt.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/sched_rt.c 2009-10-06 04:39:02.000000000 +0200 +@@ -222,18 +222,6 @@ static int rt_se_boosted(struct sched_rt + return p->prio != p->normal_prio; + } + +-#ifdef CONFIG_SMP +-static inline const struct cpumask *sched_rt_period_mask(void) +-{ +- return cpu_rq(smp_processor_id())->rd->span; +-} +-#else +-static inline const struct cpumask *sched_rt_period_mask(void) +-{ +- return cpu_online_mask; +-} +-#endif +- + static inline + struct rt_rq *sched_rt_period_rt_rq(struct rt_bandwidth *rt_b, int cpu) + { +@@ -283,11 +271,6 @@ static inline int rt_rq_throttled(struct + return rt_rq->rt_throttled; + } + +-static inline const struct cpumask *sched_rt_period_mask(void) +-{ +- return cpu_online_mask; +-} +- + static inline + struct rt_rq *sched_rt_period_rt_rq(struct rt_bandwidth *rt_b, int cpu) + { +@@ -505,7 +488,7 @@ static int do_sched_rt_period_timer(stru + if (!rt_bandwidth_enabled() || rt_b->rt_runtime == RUNTIME_INF) + return 1; + +- span = sched_rt_period_mask(); ++ span = sched_bw_period_mask(); + for_each_cpu(i, span) { + int enqueue = 0; + struct rt_rq *rt_rq = sched_rt_period_rt_rq(rt_b, i); +@@ -863,7 +846,7 @@ static void dequeue_rt_entity(struct sch + /* + * Adding/removing a task to/from a priority array: + */ +-static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup) ++static int enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup) + { + struct sched_rt_entity *rt_se = &p->rt; + +@@ -876,6 +859,7 @@ static void enqueue_task_rt(struct rq *r + enqueue_pushable_task(rq, p); + + inc_cpu_load(rq, p->se.load.weight); ++ return 0; + } + + static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) +diff -NurpP --minimal linux-2.6.31.6/kernel/signal.c linux-2.6.31.6-vs2.3.0.36.24/kernel/signal.c +--- linux-2.6.31.6/kernel/signal.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/signal.c 2009-09-10 16:43:45.000000000 +0200 +@@ -27,6 +27,8 @@ + #include + #include + #include ++#include ++#include + #include + + #include +@@ -598,6 +600,14 @@ static int check_kill_permission(int sig + if (!valid_signal(sig)) + return -EINVAL; + ++ if ((info != SEND_SIG_NOINFO) && ++ (is_si_special(info) || !SI_FROMUSER(info))) ++ goto skip; ++ ++ vxdprintk(VXD_CBIT(misc, 7), ++ "check_kill_permission(%d,%p,%p[#%u,%u])", ++ sig, info, t, vx_task_xid(t), t->pid); ++ + if (info != SEND_SIG_NOINFO && (is_si_special(info) || SI_FROMKERNEL(info))) + return 0; + +@@ -625,6 +635,20 @@ static int check_kill_permission(int sig + } + } + ++ error = -EPERM; ++ if (t->pid == 1 && current->xid) ++ return error; ++ ++ error = -ESRCH; ++ /* FIXME: we shouldn't return ESRCH ever, to avoid ++ loops, maybe ENOENT or EACCES? */ ++ if (!vx_check(vx_task_xid(t), VS_WATCH_P | VS_IDENT)) { ++ vxdprintk(current->xid || VXD_CBIT(misc, 7), ++ "signal %d[%p] xid mismatch %p[#%u,%u] xid=#%u", ++ sig, info, t, vx_task_xid(t), t->pid, current->xid); ++ return error; ++ } ++skip: + return security_task_kill(t, info, sig, 0); + } + +@@ -1112,7 +1136,7 @@ int kill_pid_info(int sig, struct siginf + rcu_read_lock(); + retry: + p = pid_task(pid, PIDTYPE_PID); +- if (p) { ++ if (p && vx_check(vx_task_xid(p), VS_IDENT)) { + error = group_send_sig_info(sig, info, p); + if (unlikely(error == -ESRCH)) + /* +@@ -1151,7 +1175,7 @@ int kill_pid_info_as_uid(int sig, struct + + read_lock(&tasklist_lock); + p = pid_task(pid, PIDTYPE_PID); +- if (!p) { ++ if (!p || !vx_check(vx_task_xid(p), VS_IDENT)) { + ret = -ESRCH; + goto out_unlock; + } +@@ -1205,8 +1229,10 @@ static int kill_something_info(int sig, + struct task_struct * p; + + for_each_process(p) { +- if (task_pid_vnr(p) > 1 && +- !same_thread_group(p, current)) { ++ if (vx_check(vx_task_xid(p), VS_ADMIN|VS_IDENT) && ++ task_pid_vnr(p) > 1 && ++ !same_thread_group(p, current) && ++ !vx_current_initpid(p->pid)) { + int err = group_send_sig_info(sig, info, p); + ++count; + if (err != -EPERM) +@@ -1892,6 +1918,11 @@ relock: + !sig_kernel_only(signr)) + continue; + ++ /* virtual init is protected against user signals */ ++ if ((info->si_code == SI_USER) && ++ vx_current_initpid(current->pid)) ++ continue; ++ + if (sig_kernel_stop(signr)) { + /* + * The default action is to stop all threads in +diff -NurpP --minimal linux-2.6.31.6/kernel/softirq.c linux-2.6.31.6-vs2.3.0.36.24/kernel/softirq.c +--- linux-2.6.31.6/kernel/softirq.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/softirq.c 2009-09-10 16:33:13.000000000 +0200 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #define CREATE_TRACE_POINTS + #include +diff -NurpP --minimal linux-2.6.31.6/kernel/sys.c linux-2.6.31.6-vs2.3.0.36.24/kernel/sys.c +--- linux-2.6.31.6/kernel/sys.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/sys.c 2009-10-06 03:52:09.000000000 +0200 +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -130,7 +131,10 @@ static int set_one_prio(struct task_stru + goto out; + } + if (niceval < task_nice(p) && !can_nice(p, niceval)) { +- error = -EACCES; ++ if (vx_flags(VXF_IGNEG_NICE, 0)) ++ error = 0; ++ else ++ error = -EACCES; + goto out; + } + no_nice = security_task_setnice(p, niceval); +@@ -179,6 +183,8 @@ SYSCALL_DEFINE3(setpriority, int, which, + else + pgrp = task_pgrp(current); + do_each_pid_thread(pgrp, PIDTYPE_PGID, p) { ++ if (!vx_check(p->xid, VS_ADMIN_P | VS_IDENT)) ++ continue; + error = set_one_prio(p, niceval, error); + } while_each_pid_thread(pgrp, PIDTYPE_PGID, p); + break; +@@ -240,6 +246,8 @@ SYSCALL_DEFINE2(getpriority, int, which, + else + pgrp = task_pgrp(current); + do_each_pid_thread(pgrp, PIDTYPE_PGID, p) { ++ if (!vx_check(p->xid, VS_ADMIN_P | VS_IDENT)) ++ continue; + niceval = 20 - task_nice(p); + if (niceval > retval) + retval = niceval; +@@ -349,6 +357,9 @@ void kernel_power_off(void) + machine_power_off(); + } + EXPORT_SYMBOL_GPL(kernel_power_off); ++ ++long vs_reboot(unsigned int, void __user *); ++ + /* + * Reboot system call: for obvious reasons only root may call it, + * and even root needs to set up some magic numbers in the registers +@@ -381,6 +392,9 @@ SYSCALL_DEFINE4(reboot, int, magic1, int + if ((cmd == LINUX_REBOOT_CMD_POWER_OFF) && !pm_power_off) + cmd = LINUX_REBOOT_CMD_HALT; + ++ if (!vx_check(0, VS_ADMIN|VS_WATCH)) ++ return vs_reboot(cmd, arg); ++ + lock_kernel(); + switch (cmd) { + case LINUX_REBOOT_CMD_RESTART: +@@ -1131,7 +1145,7 @@ SYSCALL_DEFINE2(sethostname, char __user + int errno; + char tmp[__NEW_UTS_LEN]; + +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_SET_UTSNAME)) + return -EPERM; + if (len < 0 || len > __NEW_UTS_LEN) + return -EINVAL; +@@ -1180,7 +1194,7 @@ SYSCALL_DEFINE2(setdomainname, char __us + int errno; + char tmp[__NEW_UTS_LEN]; + +- if (!capable(CAP_SYS_ADMIN)) ++ if (!vx_capable(CAP_SYS_ADMIN, VXC_SET_UTSNAME)) + return -EPERM; + if (len < 0 || len > __NEW_UTS_LEN) + return -EINVAL; +@@ -1249,7 +1263,7 @@ SYSCALL_DEFINE2(setrlimit, unsigned int, + return -EINVAL; + old_rlim = current->signal->rlim + resource; + if ((new_rlim.rlim_max > old_rlim->rlim_max) && +- !capable(CAP_SYS_RESOURCE)) ++ !vx_capable(CAP_SYS_RESOURCE, VXC_SET_RLIMIT)) + return -EPERM; + if (resource == RLIMIT_NOFILE && new_rlim.rlim_max > sysctl_nr_open) + return -EPERM; +diff -NurpP --minimal linux-2.6.31.6/kernel/sysctl.c linux-2.6.31.6-vs2.3.0.36.24/kernel/sysctl.c +--- linux-2.6.31.6/kernel/sysctl.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/sysctl.c 2009-09-10 16:11:43.000000000 +0200 +@@ -119,6 +119,7 @@ static int ngroups_max = NGROUPS_MAX; + extern char modprobe_path[]; + extern int modules_disabled; + #endif ++extern char vshelper_path[]; + #ifdef CONFIG_CHR_DEV_SG + extern int sg_big_buff; + #endif +@@ -572,6 +573,15 @@ static struct ctl_table kern_table[] = { + .strategy = &sysctl_string, + }, + #endif ++ { ++ .ctl_name = KERN_VSHELPER, ++ .procname = "vshelper", ++ .data = &vshelper_path, ++ .maxlen = 256, ++ .mode = 0644, ++ .proc_handler = &proc_dostring, ++ .strategy = &sysctl_string, ++ }, + #ifdef CONFIG_CHR_DEV_SG + { + .ctl_name = KERN_SG_BIG_BUFF, +diff -NurpP --minimal linux-2.6.31.6/kernel/sysctl_check.c linux-2.6.31.6-vs2.3.0.36.24/kernel/sysctl_check.c +--- linux-2.6.31.6/kernel/sysctl_check.c 2009-06-11 17:13:26.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/sysctl_check.c 2009-09-10 16:11:43.000000000 +0200 +@@ -39,6 +39,7 @@ static const struct trans_ctl_table tran + + { KERN_PANIC, "panic" }, + { KERN_REALROOTDEV, "real-root-dev" }, ++ { KERN_VSHELPER, "vshelper", }, + + { KERN_SPARC_REBOOT, "reboot-cmd" }, + { KERN_CTLALTDEL, "ctrl-alt-del" }, +@@ -1217,6 +1218,22 @@ static const struct trans_ctl_table tran + {} + }; + ++static struct trans_ctl_table trans_vserver_table[] = { ++ { 1, "debug_switch" }, ++ { 2, "debug_xid" }, ++ { 3, "debug_nid" }, ++ { 4, "debug_tag" }, ++ { 5, "debug_net" }, ++ { 6, "debug_limit" }, ++ { 7, "debug_cres" }, ++ { 8, "debug_dlim" }, ++ { 9, "debug_quota" }, ++ { 10, "debug_cvirt" }, ++ { 11, "debug_space" }, ++ { 12, "debug_misc" }, ++ {} ++}; ++ + static const struct trans_ctl_table trans_root_table[] = { + { CTL_KERN, "kernel", trans_kern_table }, + { CTL_VM, "vm", trans_vm_table }, +@@ -1233,6 +1250,7 @@ static const struct trans_ctl_table tran + { CTL_SUNRPC, "sunrpc", trans_sunrpc_table }, + { CTL_PM, "pm", trans_pm_table }, + { CTL_FRV, "frv", trans_frv_table }, ++ { CTL_VSERVER, "vserver", trans_vserver_table }, + {} + }; + +diff -NurpP --minimal linux-2.6.31.6/kernel/time.c linux-2.6.31.6-vs2.3.0.36.24/kernel/time.c +--- linux-2.6.31.6/kernel/time.c 2009-03-24 14:22:45.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/time.c 2009-09-10 16:11:43.000000000 +0200 +@@ -63,6 +63,7 @@ EXPORT_SYMBOL(sys_tz); + SYSCALL_DEFINE1(time, time_t __user *, tloc) + { + time_t i = get_seconds(); ++/* FIXME: do_gettimeofday(&tv) -> vx_gettimeofday(&tv) */ + + if (tloc) { + if (put_user(i,tloc)) +@@ -93,7 +94,7 @@ SYSCALL_DEFINE1(stime, time_t __user *, + if (err) + return err; + +- do_settimeofday(&tv); ++ vx_settimeofday(&tv); + return 0; + } + +@@ -104,7 +105,7 @@ SYSCALL_DEFINE2(gettimeofday, struct tim + { + if (likely(tv != NULL)) { + struct timeval ktv; +- do_gettimeofday(&ktv); ++ vx_gettimeofday(&ktv); + if (copy_to_user(tv, &ktv, sizeof(ktv))) + return -EFAULT; + } +@@ -179,7 +180,7 @@ int do_sys_settimeofday(struct timespec + /* SMP safe, again the code in arch/foo/time.c should + * globally block out interrupts when it runs. + */ +- return do_settimeofday(tv); ++ return vx_settimeofday(tv); + } + return 0; + } +@@ -311,7 +312,7 @@ void getnstimeofday(struct timespec *tv) + { + struct timeval x; + +- do_gettimeofday(&x); ++ vx_gettimeofday(&x); + tv->tv_sec = x.tv_sec; + tv->tv_nsec = x.tv_usec * NSEC_PER_USEC; + } +diff -NurpP --minimal linux-2.6.31.6/kernel/timer.c linux-2.6.31.6-vs2.3.0.36.24/kernel/timer.c +--- linux-2.6.31.6/kernel/timer.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/timer.c 2009-10-06 04:09:06.000000000 +0200 +@@ -39,6 +39,10 @@ + #include + #include + #include ++#include ++#include ++#include ++#include + + #include + #include +@@ -1214,12 +1218,6 @@ SYSCALL_DEFINE1(alarm, unsigned int, sec + + #endif + +-#ifndef __alpha__ +- +-/* +- * The Alpha uses getxpid, getxuid, and getxgid instead. Maybe this +- * should be moved into arch/i386 instead? +- */ + + /** + * sys_getpid - return the thread group id of the current process +@@ -1248,10 +1246,23 @@ SYSCALL_DEFINE0(getppid) + rcu_read_lock(); + pid = task_tgid_vnr(current->real_parent); + rcu_read_unlock(); ++ return vx_map_pid(pid); ++} + +- return pid; ++#ifdef __alpha__ ++ ++/* ++ * The Alpha uses getxpid, getxuid, and getxgid instead. ++ */ ++ ++asmlinkage long do_getxpid(long *ppid) ++{ ++ *ppid = sys_getppid(); ++ return sys_getpid(); + } + ++#else /* _alpha_ */ ++ + SYSCALL_DEFINE0(getuid) + { + /* Only we change this so SMP safe */ +diff -NurpP --minimal linux-2.6.31.6/kernel/user.c linux-2.6.31.6-vs2.3.0.36.24/kernel/user.c +--- linux-2.6.31.6/kernel/user.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/user.c 2009-09-10 16:11:43.000000000 +0200 +@@ -251,10 +251,10 @@ static struct kobj_type uids_ktype = { + * + * See Documentation/scheduler/sched-design-CFS.txt for ramifications. + */ +-static int uids_user_create(struct user_struct *up) ++static int uids_user_create(struct user_namespace *ns, struct user_struct *up) + { + struct kobject *kobj = &up->kobj; +- int error; ++ int error = 0; + + memset(kobj, 0, sizeof(struct kobject)); + if (up->user_ns != &init_user_ns) +@@ -282,7 +282,7 @@ int __init uids_sysfs_init(void) + if (!uids_kset) + return -ENOMEM; + +- return uids_user_create(&root_user); ++ return uids_user_create(NULL, &root_user); + } + + /* delayed work function to remove sysfs directory for a user and free up +@@ -353,7 +353,8 @@ static struct user_struct *uid_hash_find + } + + int uids_sysfs_init(void) { return 0; } +-static inline int uids_user_create(struct user_struct *up) { return 0; } ++static inline int uids_user_create(struct user_namespace *ns, ++ struct user_struct *up) { return 0; } + static inline void uids_mutex_lock(void) { } + static inline void uids_mutex_unlock(void) { } + +@@ -450,7 +451,7 @@ struct user_struct *alloc_uid(struct use + + new->user_ns = get_user_ns(ns); + +- if (uids_user_create(new)) ++ if (uids_user_create(ns, new)) + goto out_destoy_sched; + + /* +diff -NurpP --minimal linux-2.6.31.6/kernel/user_namespace.c linux-2.6.31.6-vs2.3.0.36.24/kernel/user_namespace.c +--- linux-2.6.31.6/kernel/user_namespace.c 2009-03-24 14:22:45.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/user_namespace.c 2009-09-10 16:11:43.000000000 +0200 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + /* + * Create a new user namespace, deriving the creator from the user in the +@@ -30,6 +31,7 @@ int create_user_ns(struct cred *new) + return -ENOMEM; + + kref_init(&ns->kref); ++ atomic_inc(&vs_global_user_ns); + + for (n = 0; n < UIDHASH_SZ; ++n) + INIT_HLIST_HEAD(ns->uidhash_table + n); +@@ -78,6 +80,8 @@ void free_user_ns(struct kref *kref) + struct user_namespace *ns = + container_of(kref, struct user_namespace, kref); + ++ /* FIXME: maybe move into destroyer? */ ++ atomic_dec(&vs_global_user_ns); + INIT_WORK(&ns->destroyer, free_user_ns_work); + schedule_work(&ns->destroyer); + } +diff -NurpP --minimal linux-2.6.31.6/kernel/utsname.c linux-2.6.31.6-vs2.3.0.36.24/kernel/utsname.c +--- linux-2.6.31.6/kernel/utsname.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/utsname.c 2009-09-10 16:44:37.000000000 +0200 +@@ -14,14 +14,17 @@ + #include + #include + #include ++#include + + static struct uts_namespace *create_uts_ns(void) + { + struct uts_namespace *uts_ns; + + uts_ns = kmalloc(sizeof(struct uts_namespace), GFP_KERNEL); +- if (uts_ns) ++ if (uts_ns) { + kref_init(&uts_ns->kref); ++ atomic_inc(&vs_global_uts_ns); ++ } + return uts_ns; + } + +@@ -71,5 +74,6 @@ void free_uts_ns(struct kref *kref) + struct uts_namespace *ns; + + ns = container_of(kref, struct uts_namespace, kref); ++ atomic_dec(&vs_global_uts_ns); + kfree(ns); + } +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/cacct.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cacct.c +--- linux-2.6.31.6/kernel/vserver/cacct.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cacct.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,42 @@ ++/* ++ * linux/kernel/vserver/cacct.c ++ * ++ * Virtual Server: Context Accounting ++ * ++ * Copyright (C) 2006-2007 Herbert Pötzl ++ * ++ * V0.01 added accounting stats ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++ ++int vc_sock_stat(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_sock_stat_v0 vc_data; ++ int j, field; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ field = vc_data.field; ++ if ((field < 0) || (field >= VXA_SOCK_SIZE)) ++ return -EINVAL; ++ ++ for (j = 0; j < 3; j++) { ++ vc_data.count[j] = vx_sock_count(&vxi->cacct, field, j); ++ vc_data.total[j] = vx_sock_total(&vxi->cacct, field, j); ++ } ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/cacct_init.h linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cacct_init.h +--- linux-2.6.31.6/kernel/vserver/cacct_init.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cacct_init.h 2009-09-29 17:15:22.000000000 +0200 +@@ -0,0 +1,25 @@ ++ ++ ++static inline void vx_info_init_cacct(struct _vx_cacct *cacct) ++{ ++ int i, j; ++ ++ ++ for (i = 0; i < VXA_SOCK_SIZE; i++) { ++ for (j = 0; j < 3; j++) { ++ atomic_long_set(&cacct->sock[i][j].count, 0); ++ atomic_long_set(&cacct->sock[i][j].total, 0); ++ } ++ } ++ for (i = 0; i < 8; i++) ++ atomic_set(&cacct->slab[i], 0); ++ for (i = 0; i < 5; i++) ++ for (j = 0; j < 4; j++) ++ atomic_set(&cacct->page[i][j], 0); ++} ++ ++static inline void vx_info_exit_cacct(struct _vx_cacct *cacct) ++{ ++ return; ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/cacct_proc.h linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cacct_proc.h +--- linux-2.6.31.6/kernel/vserver/cacct_proc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cacct_proc.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,53 @@ ++#ifndef _VX_CACCT_PROC_H ++#define _VX_CACCT_PROC_H ++ ++#include ++ ++ ++#define VX_SOCKA_TOP \ ++ "Type\t recv #/bytes\t\t send #/bytes\t\t fail #/bytes\n" ++ ++static inline int vx_info_proc_cacct(struct _vx_cacct *cacct, char *buffer) ++{ ++ int i, j, length = 0; ++ static char *type[VXA_SOCK_SIZE] = { ++ "UNSPEC", "UNIX", "INET", "INET6", "PACKET", "OTHER" ++ }; ++ ++ length += sprintf(buffer + length, VX_SOCKA_TOP); ++ for (i = 0; i < VXA_SOCK_SIZE; i++) { ++ length += sprintf(buffer + length, "%s:", type[i]); ++ for (j = 0; j < 3; j++) { ++ length += sprintf(buffer + length, ++ "\t%10lu/%-10lu", ++ vx_sock_count(cacct, i, j), ++ vx_sock_total(cacct, i, j)); ++ } ++ buffer[length++] = '\n'; ++ } ++ ++ length += sprintf(buffer + length, "\n"); ++ length += sprintf(buffer + length, ++ "slab:\t %8u %8u %8u %8u\n", ++ atomic_read(&cacct->slab[1]), ++ atomic_read(&cacct->slab[4]), ++ atomic_read(&cacct->slab[0]), ++ atomic_read(&cacct->slab[2])); ++ ++ length += sprintf(buffer + length, "\n"); ++ for (i = 0; i < 5; i++) { ++ length += sprintf(buffer + length, ++ "page[%d]: %8u %8u %8u %8u\t %8u %8u %8u %8u\n", i, ++ atomic_read(&cacct->page[i][0]), ++ atomic_read(&cacct->page[i][1]), ++ atomic_read(&cacct->page[i][2]), ++ atomic_read(&cacct->page[i][3]), ++ atomic_read(&cacct->page[i][4]), ++ atomic_read(&cacct->page[i][5]), ++ atomic_read(&cacct->page[i][6]), ++ atomic_read(&cacct->page[i][7])); ++ } ++ return length; ++} ++ ++#endif /* _VX_CACCT_PROC_H */ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/context.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/context.c +--- linux-2.6.31.6/kernel/vserver/context.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/context.c 2009-11-05 04:18:09.000000000 +0100 +@@ -0,0 +1,1032 @@ ++/* ++ * linux/kernel/vserver/context.c ++ * ++ * Virtual Server: Context Support ++ * ++ * Copyright (C) 2003-2007 Herbert Pötzl ++ * ++ * V0.01 context helper ++ * V0.02 vx_ctx_kill syscall command ++ * V0.03 replaced context_info calls ++ * V0.04 redesign of struct (de)alloc ++ * V0.05 rlimit basic implementation ++ * V0.06 task_xid and info commands ++ * V0.07 context flags and caps ++ * V0.08 switch to RCU based hash ++ * V0.09 revert to non RCU for now ++ * V0.10 and back to working RCU hash ++ * V0.11 and back to locking again ++ * V0.12 referenced context store ++ * V0.13 separate per cpu data ++ * V0.14 changed vcmds to vxi arg ++ * V0.15 added context stat ++ * V0.16 have __create claim() the vxi ++ * V0.17 removed older and legacy stuff ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "cvirt_init.h" ++#include "cacct_init.h" ++#include "limit_init.h" ++#include "sched_init.h" ++ ++ ++atomic_t vx_global_ctotal = ATOMIC_INIT(0); ++atomic_t vx_global_cactive = ATOMIC_INIT(0); ++ ++ ++/* now inactive context structures */ ++ ++static struct hlist_head vx_info_inactive = HLIST_HEAD_INIT; ++ ++static spinlock_t vx_info_inactive_lock = SPIN_LOCK_UNLOCKED; ++ ++ ++/* __alloc_vx_info() ++ ++ * allocate an initialized vx_info struct ++ * doesn't make it visible (hash) */ ++ ++static struct vx_info *__alloc_vx_info(xid_t xid) ++{ ++ struct vx_info *new = NULL; ++ int cpu, index; ++ ++ vxdprintk(VXD_CBIT(xid, 0), "alloc_vx_info(%d)*", xid); ++ ++ /* would this benefit from a slab cache? */ ++ new = kmalloc(sizeof(struct vx_info), GFP_KERNEL); ++ if (!new) ++ return 0; ++ ++ memset(new, 0, sizeof(struct vx_info)); ++#ifdef CONFIG_SMP ++ new->ptr_pc = alloc_percpu(struct _vx_info_pc); ++ if (!new->ptr_pc) ++ goto error; ++#endif ++ new->vx_id = xid; ++ INIT_HLIST_NODE(&new->vx_hlist); ++ atomic_set(&new->vx_usecnt, 0); ++ atomic_set(&new->vx_tasks, 0); ++ new->vx_parent = NULL; ++ new->vx_state = 0; ++ init_waitqueue_head(&new->vx_wait); ++ ++ /* prepare reaper */ ++ get_task_struct(init_pid_ns.child_reaper); ++ new->vx_reaper = init_pid_ns.child_reaper; ++ new->vx_badness_bias = 0; ++ ++ /* rest of init goes here */ ++ vx_info_init_limit(&new->limit); ++ vx_info_init_sched(&new->sched); ++ vx_info_init_cvirt(&new->cvirt); ++ vx_info_init_cacct(&new->cacct); ++ ++ /* per cpu data structures */ ++ for_each_possible_cpu(cpu) { ++ vx_info_init_sched_pc( ++ &vx_per_cpu(new, sched_pc, cpu), cpu); ++ vx_info_init_cvirt_pc( ++ &vx_per_cpu(new, cvirt_pc, cpu), cpu); ++ } ++ ++ new->vx_flags = VXF_INIT_SET; ++ cap_set_init_eff(new->vx_bcaps); ++ new->vx_ccaps = 0; ++ // new->vx_cap_bset = current->cap_bset; ++ ++ new->reboot_cmd = 0; ++ new->exit_code = 0; ++ ++ // preconfig fs entries ++ for (index = 0; index < VX_SPACES; index++) { ++ write_lock(&init_fs.lock); ++ init_fs.users++; ++ write_unlock(&init_fs.lock); ++ new->vx_fs[index] = &init_fs; ++ } ++ ++ vxdprintk(VXD_CBIT(xid, 0), ++ "alloc_vx_info(%d) = %p", xid, new); ++ vxh_alloc_vx_info(new); ++ atomic_inc(&vx_global_ctotal); ++ return new; ++#ifdef CONFIG_SMP ++error: ++ kfree(new); ++ return 0; ++#endif ++} ++ ++/* __dealloc_vx_info() ++ ++ * final disposal of vx_info */ ++ ++static void __dealloc_vx_info(struct vx_info *vxi) ++{ ++ struct vx_info_save vxis; ++ int cpu; ++ ++ vxdprintk(VXD_CBIT(xid, 0), ++ "dealloc_vx_info(%p)", vxi); ++ vxh_dealloc_vx_info(vxi); ++ ++#ifdef CONFIG_VSERVER_WARN ++ enter_vx_info(vxi, &vxis); ++ vx_info_exit_limit(&vxi->limit); ++ vx_info_exit_sched(&vxi->sched); ++ vx_info_exit_cvirt(&vxi->cvirt); ++ vx_info_exit_cacct(&vxi->cacct); ++ ++ for_each_possible_cpu(cpu) { ++ vx_info_exit_sched_pc( ++ &vx_per_cpu(vxi, sched_pc, cpu), cpu); ++ vx_info_exit_cvirt_pc( ++ &vx_per_cpu(vxi, cvirt_pc, cpu), cpu); ++ } ++ leave_vx_info(&vxis); ++#endif ++ ++ vxi->vx_id = -1; ++ vxi->vx_state |= VXS_RELEASED; ++ ++#ifdef CONFIG_SMP ++ free_percpu(vxi->ptr_pc); ++#endif ++ kfree(vxi); ++ atomic_dec(&vx_global_ctotal); ++} ++ ++static void __shutdown_vx_info(struct vx_info *vxi) ++{ ++ struct nsproxy *nsproxy; ++ struct fs_struct *fs; ++ int index, kill; ++ ++ might_sleep(); ++ ++ vxi->vx_state |= VXS_SHUTDOWN; ++ vs_state_change(vxi, VSC_SHUTDOWN); ++ ++ for (index = 0; index < VX_SPACES; index++) { ++ nsproxy = xchg(&vxi->vx_nsproxy[index], NULL); ++ if (nsproxy) ++ put_nsproxy(nsproxy); ++ ++ fs = xchg(&vxi->vx_fs[index], NULL); ++ write_lock(&fs->lock); ++ kill = !--fs->users; ++ write_unlock(&fs->lock); ++ if (kill) ++ free_fs_struct(fs); ++ } ++} ++ ++/* exported stuff */ ++ ++void free_vx_info(struct vx_info *vxi) ++{ ++ unsigned long flags; ++ unsigned index; ++ ++ /* check for reference counts first */ ++ BUG_ON(atomic_read(&vxi->vx_usecnt)); ++ BUG_ON(atomic_read(&vxi->vx_tasks)); ++ ++ /* context must not be hashed */ ++ BUG_ON(vx_info_state(vxi, VXS_HASHED)); ++ ++ /* context shutdown is mandatory */ ++ BUG_ON(!vx_info_state(vxi, VXS_SHUTDOWN)); ++ ++ /* nsproxy and fs check */ ++ for (index = 0; index < VX_SPACES; index++) { ++ BUG_ON(vxi->vx_nsproxy[index]); ++ BUG_ON(vxi->vx_fs[index]); ++ } ++ ++ spin_lock_irqsave(&vx_info_inactive_lock, flags); ++ hlist_del(&vxi->vx_hlist); ++ spin_unlock_irqrestore(&vx_info_inactive_lock, flags); ++ ++ __dealloc_vx_info(vxi); ++} ++ ++ ++/* hash table for vx_info hash */ ++ ++#define VX_HASH_SIZE 13 ++ ++static struct hlist_head vx_info_hash[VX_HASH_SIZE] = ++ { [0 ... VX_HASH_SIZE-1] = HLIST_HEAD_INIT }; ++ ++static spinlock_t vx_info_hash_lock = SPIN_LOCK_UNLOCKED; ++ ++ ++static inline unsigned int __hashval(xid_t xid) ++{ ++ return (xid % VX_HASH_SIZE); ++} ++ ++ ++ ++/* __hash_vx_info() ++ ++ * add the vxi to the global hash table ++ * requires the hash_lock to be held */ ++ ++static inline void __hash_vx_info(struct vx_info *vxi) ++{ ++ struct hlist_head *head; ++ ++ vxd_assert_lock(&vx_info_hash_lock); ++ vxdprintk(VXD_CBIT(xid, 4), ++ "__hash_vx_info: %p[#%d]", vxi, vxi->vx_id); ++ vxh_hash_vx_info(vxi); ++ ++ /* context must not be hashed */ ++ BUG_ON(vx_info_state(vxi, VXS_HASHED)); ++ ++ vxi->vx_state |= VXS_HASHED; ++ head = &vx_info_hash[__hashval(vxi->vx_id)]; ++ hlist_add_head(&vxi->vx_hlist, head); ++ atomic_inc(&vx_global_cactive); ++} ++ ++/* __unhash_vx_info() ++ ++ * remove the vxi from the global hash table ++ * requires the hash_lock to be held */ ++ ++static inline void __unhash_vx_info(struct vx_info *vxi) ++{ ++ unsigned long flags; ++ ++ vxd_assert_lock(&vx_info_hash_lock); ++ vxdprintk(VXD_CBIT(xid, 4), ++ "__unhash_vx_info: %p[#%d.%d.%d]", vxi, vxi->vx_id, ++ atomic_read(&vxi->vx_usecnt), atomic_read(&vxi->vx_tasks)); ++ vxh_unhash_vx_info(vxi); ++ ++ /* context must be hashed */ ++ BUG_ON(!vx_info_state(vxi, VXS_HASHED)); ++ /* but without tasks */ ++ BUG_ON(atomic_read(&vxi->vx_tasks)); ++ ++ vxi->vx_state &= ~VXS_HASHED; ++ hlist_del_init(&vxi->vx_hlist); ++ spin_lock_irqsave(&vx_info_inactive_lock, flags); ++ hlist_add_head(&vxi->vx_hlist, &vx_info_inactive); ++ spin_unlock_irqrestore(&vx_info_inactive_lock, flags); ++ atomic_dec(&vx_global_cactive); ++} ++ ++ ++/* __lookup_vx_info() ++ ++ * requires the hash_lock to be held ++ * doesn't increment the vx_refcnt */ ++ ++static inline struct vx_info *__lookup_vx_info(xid_t xid) ++{ ++ struct hlist_head *head = &vx_info_hash[__hashval(xid)]; ++ struct hlist_node *pos; ++ struct vx_info *vxi; ++ ++ vxd_assert_lock(&vx_info_hash_lock); ++ hlist_for_each(pos, head) { ++ vxi = hlist_entry(pos, struct vx_info, vx_hlist); ++ ++ if (vxi->vx_id == xid) ++ goto found; ++ } ++ vxi = NULL; ++found: ++ vxdprintk(VXD_CBIT(xid, 0), ++ "__lookup_vx_info(#%u): %p[#%u]", ++ xid, vxi, vxi ? vxi->vx_id : 0); ++ vxh_lookup_vx_info(vxi, xid); ++ return vxi; ++} ++ ++ ++/* __create_vx_info() ++ ++ * create the requested context ++ * get(), claim() and hash it */ ++ ++static struct vx_info *__create_vx_info(int id) ++{ ++ struct vx_info *new, *vxi = NULL; ++ ++ vxdprintk(VXD_CBIT(xid, 1), "create_vx_info(%d)*", id); ++ ++ if (!(new = __alloc_vx_info(id))) ++ return ERR_PTR(-ENOMEM); ++ ++ /* required to make dynamic xids unique */ ++ spin_lock(&vx_info_hash_lock); ++ ++ /* static context requested */ ++ if ((vxi = __lookup_vx_info(id))) { ++ vxdprintk(VXD_CBIT(xid, 0), ++ "create_vx_info(%d) = %p (already there)", id, vxi); ++ if (vx_info_flags(vxi, VXF_STATE_SETUP, 0)) ++ vxi = ERR_PTR(-EBUSY); ++ else ++ vxi = ERR_PTR(-EEXIST); ++ goto out_unlock; ++ } ++ /* new context */ ++ vxdprintk(VXD_CBIT(xid, 0), ++ "create_vx_info(%d) = %p (new)", id, new); ++ claim_vx_info(new, NULL); ++ __hash_vx_info(get_vx_info(new)); ++ vxi = new, new = NULL; ++ ++out_unlock: ++ spin_unlock(&vx_info_hash_lock); ++ vxh_create_vx_info(IS_ERR(vxi) ? NULL : vxi, id); ++ if (new) ++ __dealloc_vx_info(new); ++ return vxi; ++} ++ ++ ++/* exported stuff */ ++ ++ ++void unhash_vx_info(struct vx_info *vxi) ++{ ++ __shutdown_vx_info(vxi); ++ spin_lock(&vx_info_hash_lock); ++ __unhash_vx_info(vxi); ++ spin_unlock(&vx_info_hash_lock); ++ __wakeup_vx_info(vxi); ++} ++ ++ ++/* lookup_vx_info() ++ ++ * search for a vx_info and get() it ++ * negative id means current */ ++ ++struct vx_info *lookup_vx_info(int id) ++{ ++ struct vx_info *vxi = NULL; ++ ++ if (id < 0) { ++ vxi = get_vx_info(current_vx_info()); ++ } else if (id > 1) { ++ spin_lock(&vx_info_hash_lock); ++ vxi = get_vx_info(__lookup_vx_info(id)); ++ spin_unlock(&vx_info_hash_lock); ++ } ++ return vxi; ++} ++ ++/* xid_is_hashed() ++ ++ * verify that xid is still hashed */ ++ ++int xid_is_hashed(xid_t xid) ++{ ++ int hashed; ++ ++ spin_lock(&vx_info_hash_lock); ++ hashed = (__lookup_vx_info(xid) != NULL); ++ spin_unlock(&vx_info_hash_lock); ++ return hashed; ++} ++ ++#ifdef CONFIG_PROC_FS ++ ++/* get_xid_list() ++ ++ * get a subset of hashed xids for proc ++ * assumes size is at least one */ ++ ++int get_xid_list(int index, unsigned int *xids, int size) ++{ ++ int hindex, nr_xids = 0; ++ ++ /* only show current and children */ ++ if (!vx_check(0, VS_ADMIN | VS_WATCH)) { ++ if (index > 0) ++ return 0; ++ xids[nr_xids] = vx_current_xid(); ++ return 1; ++ } ++ ++ for (hindex = 0; hindex < VX_HASH_SIZE; hindex++) { ++ struct hlist_head *head = &vx_info_hash[hindex]; ++ struct hlist_node *pos; ++ ++ spin_lock(&vx_info_hash_lock); ++ hlist_for_each(pos, head) { ++ struct vx_info *vxi; ++ ++ if (--index > 0) ++ continue; ++ ++ vxi = hlist_entry(pos, struct vx_info, vx_hlist); ++ xids[nr_xids] = vxi->vx_id; ++ if (++nr_xids >= size) { ++ spin_unlock(&vx_info_hash_lock); ++ goto out; ++ } ++ } ++ /* keep the lock time short */ ++ spin_unlock(&vx_info_hash_lock); ++ } ++out: ++ return nr_xids; ++} ++#endif ++ ++#ifdef CONFIG_VSERVER_DEBUG ++ ++void dump_vx_info_inactive(int level) ++{ ++ struct hlist_node *entry, *next; ++ ++ hlist_for_each_safe(entry, next, &vx_info_inactive) { ++ struct vx_info *vxi = ++ list_entry(entry, struct vx_info, vx_hlist); ++ ++ dump_vx_info(vxi, level); ++ } ++} ++ ++#endif ++ ++#if 0 ++int vx_migrate_user(struct task_struct *p, struct vx_info *vxi) ++{ ++ struct user_struct *new_user, *old_user; ++ ++ if (!p || !vxi) ++ BUG(); ++ ++ if (vx_info_flags(vxi, VXF_INFO_PRIVATE, 0)) ++ return -EACCES; ++ ++ new_user = alloc_uid(vxi->vx_id, p->uid); ++ if (!new_user) ++ return -ENOMEM; ++ ++ old_user = p->user; ++ if (new_user != old_user) { ++ atomic_inc(&new_user->processes); ++ atomic_dec(&old_user->processes); ++ p->user = new_user; ++ } ++ free_uid(old_user); ++ return 0; ++} ++#endif ++ ++#if 0 ++void vx_mask_cap_bset(struct vx_info *vxi, struct task_struct *p) ++{ ++ // p->cap_effective &= vxi->vx_cap_bset; ++ p->cap_effective = ++ cap_intersect(p->cap_effective, vxi->cap_bset); ++ // p->cap_inheritable &= vxi->vx_cap_bset; ++ p->cap_inheritable = ++ cap_intersect(p->cap_inheritable, vxi->cap_bset); ++ // p->cap_permitted &= vxi->vx_cap_bset; ++ p->cap_permitted = ++ cap_intersect(p->cap_permitted, vxi->cap_bset); ++} ++#endif ++ ++ ++#include ++#include ++ ++static int vx_openfd_task(struct task_struct *tsk) ++{ ++ struct files_struct *files = tsk->files; ++ struct fdtable *fdt; ++ const unsigned long *bptr; ++ int count, total; ++ ++ /* no rcu_read_lock() because of spin_lock() */ ++ spin_lock(&files->file_lock); ++ fdt = files_fdtable(files); ++ bptr = fdt->open_fds->fds_bits; ++ count = fdt->max_fds / (sizeof(unsigned long) * 8); ++ for (total = 0; count > 0; count--) { ++ if (*bptr) ++ total += hweight_long(*bptr); ++ bptr++; ++ } ++ spin_unlock(&files->file_lock); ++ return total; ++} ++ ++ ++/* for *space compatibility */ ++ ++asmlinkage long sys_unshare(unsigned long); ++ ++/* ++ * migrate task to new context ++ * gets vxi, puts old_vxi on change ++ * optionally unshares namespaces (hack) ++ */ ++ ++int vx_migrate_task(struct task_struct *p, struct vx_info *vxi, int unshare) ++{ ++ struct vx_info *old_vxi; ++ int ret = 0; ++ ++ if (!p || !vxi) ++ BUG(); ++ ++ vxdprintk(VXD_CBIT(xid, 5), ++ "vx_migrate_task(%p,%p[#%d.%d])", p, vxi, ++ vxi->vx_id, atomic_read(&vxi->vx_usecnt)); ++ ++ if (vx_info_flags(vxi, VXF_INFO_PRIVATE, 0) && ++ !vx_info_flags(vxi, VXF_STATE_SETUP, 0)) ++ return -EACCES; ++ ++ if (vx_info_state(vxi, VXS_SHUTDOWN)) ++ return -EFAULT; ++ ++ old_vxi = task_get_vx_info(p); ++ if (old_vxi == vxi) ++ goto out; ++ ++// if (!(ret = vx_migrate_user(p, vxi))) { ++ { ++ int openfd; ++ ++ task_lock(p); ++ openfd = vx_openfd_task(p); ++ ++ if (old_vxi) { ++ atomic_dec(&old_vxi->cvirt.nr_threads); ++ atomic_dec(&old_vxi->cvirt.nr_running); ++ __rlim_dec(&old_vxi->limit, RLIMIT_NPROC); ++ /* FIXME: what about the struct files here? */ ++ __rlim_sub(&old_vxi->limit, VLIMIT_OPENFD, openfd); ++ /* account for the executable */ ++ __rlim_dec(&old_vxi->limit, VLIMIT_DENTRY); ++ } ++ atomic_inc(&vxi->cvirt.nr_threads); ++ atomic_inc(&vxi->cvirt.nr_running); ++ __rlim_inc(&vxi->limit, RLIMIT_NPROC); ++ /* FIXME: what about the struct files here? */ ++ __rlim_add(&vxi->limit, VLIMIT_OPENFD, openfd); ++ /* account for the executable */ ++ __rlim_inc(&vxi->limit, VLIMIT_DENTRY); ++ ++ if (old_vxi) { ++ release_vx_info(old_vxi, p); ++ clr_vx_info(&p->vx_info); ++ } ++ claim_vx_info(vxi, p); ++ set_vx_info(&p->vx_info, vxi); ++ p->xid = vxi->vx_id; ++ ++ vxdprintk(VXD_CBIT(xid, 5), ++ "moved task %p into vxi:%p[#%d]", ++ p, vxi, vxi->vx_id); ++ ++ // vx_mask_cap_bset(vxi, p); ++ task_unlock(p); ++ ++ /* hack for *spaces to provide compatibility */ ++ if (unshare) { ++ struct nsproxy *old_nsp, *new_nsp; ++ ++ ret = unshare_nsproxy_namespaces( ++ CLONE_NEWUTS | CLONE_NEWIPC | CLONE_NEWUSER, ++ &new_nsp, NULL); ++ if (ret) ++ goto out; ++ ++ old_nsp = xchg(&p->nsproxy, new_nsp); ++ vx_set_space(vxi, ++ CLONE_NEWUTS | CLONE_NEWIPC | CLONE_NEWUSER, 0); ++ put_nsproxy(old_nsp); ++ } ++ } ++out: ++ put_vx_info(old_vxi); ++ return ret; ++} ++ ++int vx_set_reaper(struct vx_info *vxi, struct task_struct *p) ++{ ++ struct task_struct *old_reaper; ++ ++ if (!vxi) ++ return -EINVAL; ++ ++ vxdprintk(VXD_CBIT(xid, 6), ++ "vx_set_reaper(%p[#%d],%p[#%d,%d])", ++ vxi, vxi->vx_id, p, p->xid, p->pid); ++ ++ old_reaper = vxi->vx_reaper; ++ if (old_reaper == p) ++ return 0; ++ ++ /* set new child reaper */ ++ get_task_struct(p); ++ vxi->vx_reaper = p; ++ put_task_struct(old_reaper); ++ return 0; ++} ++ ++int vx_set_init(struct vx_info *vxi, struct task_struct *p) ++{ ++ if (!vxi) ++ return -EINVAL; ++ ++ vxdprintk(VXD_CBIT(xid, 6), ++ "vx_set_init(%p[#%d],%p[#%d,%d,%d])", ++ vxi, vxi->vx_id, p, p->xid, p->pid, p->tgid); ++ ++ vxi->vx_flags &= ~VXF_STATE_INIT; ++ // vxi->vx_initpid = p->tgid; ++ vxi->vx_initpid = p->pid; ++ return 0; ++} ++ ++void vx_exit_init(struct vx_info *vxi, struct task_struct *p, int code) ++{ ++ vxdprintk(VXD_CBIT(xid, 6), ++ "vx_exit_init(%p[#%d],%p[#%d,%d,%d])", ++ vxi, vxi->vx_id, p, p->xid, p->pid, p->tgid); ++ ++ vxi->exit_code = code; ++ vxi->vx_initpid = 0; ++} ++ ++ ++void vx_set_persistent(struct vx_info *vxi) ++{ ++ vxdprintk(VXD_CBIT(xid, 6), ++ "vx_set_persistent(%p[#%d])", vxi, vxi->vx_id); ++ ++ get_vx_info(vxi); ++ claim_vx_info(vxi, NULL); ++} ++ ++void vx_clear_persistent(struct vx_info *vxi) ++{ ++ vxdprintk(VXD_CBIT(xid, 6), ++ "vx_clear_persistent(%p[#%d])", vxi, vxi->vx_id); ++ ++ release_vx_info(vxi, NULL); ++ put_vx_info(vxi); ++} ++ ++void vx_update_persistent(struct vx_info *vxi) ++{ ++ if (vx_info_flags(vxi, VXF_PERSISTENT, 0)) ++ vx_set_persistent(vxi); ++ else ++ vx_clear_persistent(vxi); ++} ++ ++ ++/* task must be current or locked */ ++ ++void exit_vx_info(struct task_struct *p, int code) ++{ ++ struct vx_info *vxi = p->vx_info; ++ ++ if (vxi) { ++ atomic_dec(&vxi->cvirt.nr_threads); ++ vx_nproc_dec(p); ++ ++ vxi->exit_code = code; ++ release_vx_info(vxi, p); ++ } ++} ++ ++void exit_vx_info_early(struct task_struct *p, int code) ++{ ++ struct vx_info *vxi = p->vx_info; ++ ++ if (vxi) { ++ if (vxi->vx_initpid == p->pid) ++ vx_exit_init(vxi, p, code); ++ if (vxi->vx_reaper == p) ++ vx_set_reaper(vxi, init_pid_ns.child_reaper); ++ } ++} ++ ++ ++/* vserver syscall commands below here */ ++ ++/* taks xid and vx_info functions */ ++ ++#include ++ ++ ++int vc_task_xid(uint32_t id) ++{ ++ xid_t xid; ++ ++ if (id) { ++ struct task_struct *tsk; ++ ++ read_lock(&tasklist_lock); ++ tsk = find_task_by_real_pid(id); ++ xid = (tsk) ? tsk->xid : -ESRCH; ++ read_unlock(&tasklist_lock); ++ } else ++ xid = vx_current_xid(); ++ return xid; ++} ++ ++ ++int vc_vx_info(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_vx_info_v0 vc_data; ++ ++ vc_data.xid = vxi->vx_id; ++ vc_data.initpid = vxi->vx_initpid; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++ ++int vc_ctx_stat(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_stat_v0 vc_data; ++ ++ vc_data.usecnt = atomic_read(&vxi->vx_usecnt); ++ vc_data.tasks = atomic_read(&vxi->vx_tasks); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++ ++/* context functions */ ++ ++int vc_ctx_create(uint32_t xid, void __user *data) ++{ ++ struct vcmd_ctx_create vc_data = { .flagword = VXF_INIT_SET }; ++ struct vx_info *new_vxi; ++ int ret; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ if ((xid > MAX_S_CONTEXT) || (xid < 2)) ++ return -EINVAL; ++ ++ new_vxi = __create_vx_info(xid); ++ if (IS_ERR(new_vxi)) ++ return PTR_ERR(new_vxi); ++ ++ /* initial flags */ ++ new_vxi->vx_flags = vc_data.flagword; ++ ++ ret = -ENOEXEC; ++ if (vs_state_change(new_vxi, VSC_STARTUP)) ++ goto out; ++ ++ ret = vx_migrate_task(current, new_vxi, (!data)); ++ if (ret) ++ goto out; ++ ++ /* return context id on success */ ++ ret = new_vxi->vx_id; ++ ++ /* get a reference for persistent contexts */ ++ if ((vc_data.flagword & VXF_PERSISTENT)) ++ vx_set_persistent(new_vxi); ++out: ++ release_vx_info(new_vxi, NULL); ++ put_vx_info(new_vxi); ++ return ret; ++} ++ ++ ++int vc_ctx_migrate(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_migrate vc_data = { .flagword = 0 }; ++ int ret; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = vx_migrate_task(current, vxi, 0); ++ if (ret) ++ return ret; ++ if (vc_data.flagword & VXM_SET_INIT) ++ ret = vx_set_init(vxi, current); ++ if (ret) ++ return ret; ++ if (vc_data.flagword & VXM_SET_REAPER) ++ ret = vx_set_reaper(vxi, current); ++ return ret; ++} ++ ++ ++int vc_get_cflags(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_flags_v0 vc_data; ++ ++ vc_data.flagword = vxi->vx_flags; ++ ++ /* special STATE flag handling */ ++ vc_data.mask = vs_mask_flags(~0ULL, vxi->vx_flags, VXF_ONE_TIME); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++int vc_set_cflags(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_flags_v0 vc_data; ++ uint64_t mask, trigger; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ /* special STATE flag handling */ ++ mask = vs_mask_mask(vc_data.mask, vxi->vx_flags, VXF_ONE_TIME); ++ trigger = (mask & vxi->vx_flags) ^ (mask & vc_data.flagword); ++ ++ if (vxi == current_vx_info()) { ++ /* if (trigger & VXF_STATE_SETUP) ++ vx_mask_cap_bset(vxi, current); */ ++ if (trigger & VXF_STATE_INIT) { ++ int ret; ++ ++ ret = vx_set_init(vxi, current); ++ if (ret) ++ return ret; ++ ret = vx_set_reaper(vxi, current); ++ if (ret) ++ return ret; ++ } ++ } ++ ++ vxi->vx_flags = vs_mask_flags(vxi->vx_flags, ++ vc_data.flagword, mask); ++ if (trigger & VXF_PERSISTENT) ++ vx_update_persistent(vxi); ++ ++ return 0; ++} ++ ++ ++static inline uint64_t caps_from_cap_t(kernel_cap_t c) ++{ ++ uint64_t v = c.cap[0] | ((uint64_t)c.cap[1] << 32); ++ ++ // printk("caps_from_cap_t(%08x:%08x) = %016llx\n", c.cap[1], c.cap[0], v); ++ return v; ++} ++ ++static inline kernel_cap_t cap_t_from_caps(uint64_t v) ++{ ++ kernel_cap_t c = __cap_empty_set; ++ ++ c.cap[0] = v & 0xFFFFFFFF; ++ c.cap[1] = (v >> 32) & 0xFFFFFFFF; ++ ++ // printk("cap_t_from_caps(%016llx) = %08x:%08x\n", v, c.cap[1], c.cap[0]); ++ return c; ++} ++ ++ ++static int do_get_caps(struct vx_info *vxi, uint64_t *bcaps, uint64_t *ccaps) ++{ ++ if (bcaps) ++ *bcaps = caps_from_cap_t(vxi->vx_bcaps); ++ if (ccaps) ++ *ccaps = vxi->vx_ccaps; ++ ++ return 0; ++} ++ ++int vc_get_ccaps(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_caps_v1 vc_data; ++ int ret; ++ ++ ret = do_get_caps(vxi, NULL, &vc_data.ccaps); ++ if (ret) ++ return ret; ++ vc_data.cmask = ~0ULL; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++static int do_set_caps(struct vx_info *vxi, ++ uint64_t bcaps, uint64_t bmask, uint64_t ccaps, uint64_t cmask) ++{ ++ uint64_t bcold = caps_from_cap_t(vxi->vx_bcaps); ++ ++#if 0 ++ printk("do_set_caps(%16llx, %16llx, %16llx, %16llx)\n", ++ bcaps, bmask, ccaps, cmask); ++#endif ++ vxi->vx_bcaps = cap_t_from_caps( ++ vs_mask_flags(bcold, bcaps, bmask)); ++ vxi->vx_ccaps = vs_mask_flags(vxi->vx_ccaps, ccaps, cmask); ++ ++ return 0; ++} ++ ++int vc_set_ccaps(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_caps_v1 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_set_caps(vxi, 0, 0, vc_data.ccaps, vc_data.cmask); ++} ++ ++int vc_get_bcaps(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_bcaps vc_data; ++ int ret; ++ ++ ret = do_get_caps(vxi, &vc_data.bcaps, NULL); ++ if (ret) ++ return ret; ++ vc_data.bmask = ~0ULL; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++int vc_set_bcaps(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_bcaps vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_set_caps(vxi, vc_data.bcaps, vc_data.bmask, 0, 0); ++} ++ ++ ++int vc_get_badness(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_badness_v0 vc_data; ++ ++ vc_data.bias = vxi->vx_badness_bias; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++int vc_set_badness(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_badness_v0 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ vxi->vx_badness_bias = vc_data.bias; ++ return 0; ++} ++ ++#include ++ ++EXPORT_SYMBOL_GPL(free_vx_info); ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/cvirt.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cvirt.c +--- linux-2.6.31.6/kernel/vserver/cvirt.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cvirt.c 2009-11-05 04:21:59.000000000 +0100 +@@ -0,0 +1,304 @@ ++/* ++ * linux/kernel/vserver/cvirt.c ++ * ++ * Virtual Server: Context Virtualization ++ * ++ * Copyright (C) 2004-2007 Herbert Pötzl ++ * ++ * V0.01 broken out from limit.c ++ * V0.02 added utsname stuff ++ * V0.03 changed vcmds to vxi arg ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++void vx_vsi_uptime(struct timespec *uptime, struct timespec *idle) ++{ ++ struct vx_info *vxi = current_vx_info(); ++ ++ set_normalized_timespec(uptime, ++ uptime->tv_sec - vxi->cvirt.bias_uptime.tv_sec, ++ uptime->tv_nsec - vxi->cvirt.bias_uptime.tv_nsec); ++ if (!idle) ++ return; ++ set_normalized_timespec(idle, ++ idle->tv_sec - vxi->cvirt.bias_idle.tv_sec, ++ idle->tv_nsec - vxi->cvirt.bias_idle.tv_nsec); ++ return; ++} ++ ++uint64_t vx_idle_jiffies(void) ++{ ++ return init_task.utime + init_task.stime; ++} ++ ++ ++ ++static inline uint32_t __update_loadavg(uint32_t load, ++ int wsize, int delta, int n) ++{ ++ unsigned long long calc, prev; ++ ++ /* just set it to n */ ++ if (unlikely(delta >= wsize)) ++ return (n << FSHIFT); ++ ++ calc = delta * n; ++ calc <<= FSHIFT; ++ prev = (wsize - delta); ++ prev *= load; ++ calc += prev; ++ do_div(calc, wsize); ++ return calc; ++} ++ ++ ++void vx_update_load(struct vx_info *vxi) ++{ ++ uint32_t now, last, delta; ++ unsigned int nr_running, nr_uninterruptible; ++ unsigned int total; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&vxi->cvirt.load_lock, flags); ++ ++ now = jiffies; ++ last = vxi->cvirt.load_last; ++ delta = now - last; ++ ++ if (delta < 5*HZ) ++ goto out; ++ ++ nr_running = atomic_read(&vxi->cvirt.nr_running); ++ nr_uninterruptible = atomic_read(&vxi->cvirt.nr_uninterruptible); ++ total = nr_running + nr_uninterruptible; ++ ++ vxi->cvirt.load[0] = __update_loadavg(vxi->cvirt.load[0], ++ 60*HZ, delta, total); ++ vxi->cvirt.load[1] = __update_loadavg(vxi->cvirt.load[1], ++ 5*60*HZ, delta, total); ++ vxi->cvirt.load[2] = __update_loadavg(vxi->cvirt.load[2], ++ 15*60*HZ, delta, total); ++ ++ vxi->cvirt.load_last = now; ++out: ++ atomic_inc(&vxi->cvirt.load_updates); ++ spin_unlock_irqrestore(&vxi->cvirt.load_lock, flags); ++} ++ ++ ++/* ++ * Commands to do_syslog: ++ * ++ * 0 -- Close the log. Currently a NOP. ++ * 1 -- Open the log. Currently a NOP. ++ * 2 -- Read from the log. ++ * 3 -- Read all messages remaining in the ring buffer. ++ * 4 -- Read and clear all messages remaining in the ring buffer ++ * 5 -- Clear ring buffer. ++ * 6 -- Disable printk's to console ++ * 7 -- Enable printk's to console ++ * 8 -- Set level of messages printed to console ++ * 9 -- Return number of unread characters in the log buffer ++ * 10 -- Return size of the log buffer ++ */ ++int vx_do_syslog(int type, char __user *buf, int len) ++{ ++ int error = 0; ++ int do_clear = 0; ++ struct vx_info *vxi = current_vx_info(); ++ struct _vx_syslog *log; ++ ++ if (!vxi) ++ return -EINVAL; ++ log = &vxi->cvirt.syslog; ++ ++ switch (type) { ++ case 0: /* Close log */ ++ case 1: /* Open log */ ++ break; ++ case 2: /* Read from log */ ++ error = wait_event_interruptible(log->log_wait, ++ (log->log_start - log->log_end)); ++ if (error) ++ break; ++ spin_lock_irq(&log->logbuf_lock); ++ spin_unlock_irq(&log->logbuf_lock); ++ break; ++ case 4: /* Read/clear last kernel messages */ ++ do_clear = 1; ++ /* fall through */ ++ case 3: /* Read last kernel messages */ ++ return 0; ++ ++ case 5: /* Clear ring buffer */ ++ return 0; ++ ++ case 6: /* Disable logging to console */ ++ case 7: /* Enable logging to console */ ++ case 8: /* Set level of messages printed to console */ ++ break; ++ ++ case 9: /* Number of chars in the log buffer */ ++ return 0; ++ case 10: /* Size of the log buffer */ ++ return 0; ++ default: ++ error = -EINVAL; ++ break; ++ } ++ return error; ++} ++ ++ ++/* virtual host info names */ ++ ++static char *vx_vhi_name(struct vx_info *vxi, int id) ++{ ++ struct nsproxy *nsproxy; ++ struct uts_namespace *uts; ++ ++ if (id == VHIN_CONTEXT) ++ return vxi->vx_name; ++ ++ nsproxy = vxi->vx_nsproxy[0]; ++ if (!nsproxy) ++ return NULL; ++ ++ uts = nsproxy->uts_ns; ++ if (!uts) ++ return NULL; ++ ++ switch (id) { ++ case VHIN_SYSNAME: ++ return uts->name.sysname; ++ case VHIN_NODENAME: ++ return uts->name.nodename; ++ case VHIN_RELEASE: ++ return uts->name.release; ++ case VHIN_VERSION: ++ return uts->name.version; ++ case VHIN_MACHINE: ++ return uts->name.machine; ++ case VHIN_DOMAINNAME: ++ return uts->name.domainname; ++ default: ++ return NULL; ++ } ++ return NULL; ++} ++ ++int vc_set_vhi_name(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_vhi_name_v0 vc_data; ++ char *name; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ name = vx_vhi_name(vxi, vc_data.field); ++ if (!name) ++ return -EINVAL; ++ ++ memcpy(name, vc_data.name, 65); ++ return 0; ++} ++ ++int vc_get_vhi_name(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_vhi_name_v0 vc_data; ++ char *name; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ name = vx_vhi_name(vxi, vc_data.field); ++ if (!name) ++ return -EINVAL; ++ ++ memcpy(vc_data.name, name, 65); ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++ ++int vc_virt_stat(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_virt_stat_v0 vc_data; ++ struct _vx_cvirt *cvirt = &vxi->cvirt; ++ struct timespec uptime; ++ ++ do_posix_clock_monotonic_gettime(&uptime); ++ set_normalized_timespec(&uptime, ++ uptime.tv_sec - cvirt->bias_uptime.tv_sec, ++ uptime.tv_nsec - cvirt->bias_uptime.tv_nsec); ++ ++ vc_data.offset = timeval_to_ns(&cvirt->bias_tv); ++ vc_data.uptime = timespec_to_ns(&uptime); ++ vc_data.nr_threads = atomic_read(&cvirt->nr_threads); ++ vc_data.nr_running = atomic_read(&cvirt->nr_running); ++ vc_data.nr_uninterruptible = atomic_read(&cvirt->nr_uninterruptible); ++ vc_data.nr_onhold = atomic_read(&cvirt->nr_onhold); ++ vc_data.nr_forks = atomic_read(&cvirt->total_forks); ++ vc_data.load[0] = cvirt->load[0]; ++ vc_data.load[1] = cvirt->load[1]; ++ vc_data.load[2] = cvirt->load[2]; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++ ++#ifdef CONFIG_VSERVER_VTIME ++ ++/* virtualized time base */ ++ ++void vx_gettimeofday(struct timeval *tv) ++{ ++ struct vx_info *vxi; ++ ++ do_gettimeofday(tv); ++ if (!vx_flags(VXF_VIRT_TIME, 0)) ++ return; ++ ++ vxi = current_vx_info(); ++ tv->tv_sec += vxi->cvirt.bias_tv.tv_sec; ++ tv->tv_usec += vxi->cvirt.bias_tv.tv_usec; ++ ++ if (tv->tv_usec >= USEC_PER_SEC) { ++ tv->tv_sec++; ++ tv->tv_usec -= USEC_PER_SEC; ++ } else if (tv->tv_usec < 0) { ++ tv->tv_sec--; ++ tv->tv_usec += USEC_PER_SEC; ++ } ++} ++ ++int vx_settimeofday(struct timespec *ts) ++{ ++ struct timeval tv; ++ struct vx_info *vxi; ++ ++ if (!vx_flags(VXF_VIRT_TIME, 0)) ++ return do_settimeofday(ts); ++ ++ do_gettimeofday(&tv); ++ vxi = current_vx_info(); ++ vxi->cvirt.bias_tv.tv_sec = ts->tv_sec - tv.tv_sec; ++ vxi->cvirt.bias_tv.tv_usec = ++ (ts->tv_nsec/NSEC_PER_USEC) - tv.tv_usec; ++ return 0; ++} ++ ++#endif ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/cvirt_init.h linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cvirt_init.h +--- linux-2.6.31.6/kernel/vserver/cvirt_init.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cvirt_init.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,69 @@ ++ ++ ++extern uint64_t vx_idle_jiffies(void); ++ ++static inline void vx_info_init_cvirt(struct _vx_cvirt *cvirt) ++{ ++ uint64_t idle_jiffies = vx_idle_jiffies(); ++ uint64_t nsuptime; ++ ++ do_posix_clock_monotonic_gettime(&cvirt->bias_uptime); ++ nsuptime = (unsigned long long)cvirt->bias_uptime.tv_sec ++ * NSEC_PER_SEC + cvirt->bias_uptime.tv_nsec; ++ cvirt->bias_clock = nsec_to_clock_t(nsuptime); ++ cvirt->bias_tv.tv_sec = 0; ++ cvirt->bias_tv.tv_usec = 0; ++ ++ jiffies_to_timespec(idle_jiffies, &cvirt->bias_idle); ++ atomic_set(&cvirt->nr_threads, 0); ++ atomic_set(&cvirt->nr_running, 0); ++ atomic_set(&cvirt->nr_uninterruptible, 0); ++ atomic_set(&cvirt->nr_onhold, 0); ++ ++ spin_lock_init(&cvirt->load_lock); ++ cvirt->load_last = jiffies; ++ atomic_set(&cvirt->load_updates, 0); ++ cvirt->load[0] = 0; ++ cvirt->load[1] = 0; ++ cvirt->load[2] = 0; ++ atomic_set(&cvirt->total_forks, 0); ++ ++ spin_lock_init(&cvirt->syslog.logbuf_lock); ++ init_waitqueue_head(&cvirt->syslog.log_wait); ++ cvirt->syslog.log_start = 0; ++ cvirt->syslog.log_end = 0; ++ cvirt->syslog.con_start = 0; ++ cvirt->syslog.logged_chars = 0; ++} ++ ++static inline ++void vx_info_init_cvirt_pc(struct _vx_cvirt_pc *cvirt_pc, int cpu) ++{ ++ // cvirt_pc->cpustat = { 0 }; ++} ++ ++static inline void vx_info_exit_cvirt(struct _vx_cvirt *cvirt) ++{ ++ int value; ++ ++ vxwprintk_xid((value = atomic_read(&cvirt->nr_threads)), ++ "!!! cvirt: %p[nr_threads] = %d on exit.", ++ cvirt, value); ++ vxwprintk_xid((value = atomic_read(&cvirt->nr_running)), ++ "!!! cvirt: %p[nr_running] = %d on exit.", ++ cvirt, value); ++ vxwprintk_xid((value = atomic_read(&cvirt->nr_uninterruptible)), ++ "!!! cvirt: %p[nr_uninterruptible] = %d on exit.", ++ cvirt, value); ++ vxwprintk_xid((value = atomic_read(&cvirt->nr_onhold)), ++ "!!! cvirt: %p[nr_onhold] = %d on exit.", ++ cvirt, value); ++ return; ++} ++ ++static inline ++void vx_info_exit_cvirt_pc(struct _vx_cvirt_pc *cvirt_pc, int cpu) ++{ ++ return; ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/cvirt_proc.h linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cvirt_proc.h +--- linux-2.6.31.6/kernel/vserver/cvirt_proc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/cvirt_proc.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,135 @@ ++#ifndef _VX_CVIRT_PROC_H ++#define _VX_CVIRT_PROC_H ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++static inline ++int vx_info_proc_nsproxy(struct nsproxy *nsproxy, char *buffer) ++{ ++ struct mnt_namespace *ns; ++ struct uts_namespace *uts; ++ struct ipc_namespace *ipc; ++ struct path path; ++ char *pstr, *root; ++ int length = 0; ++ ++ if (!nsproxy) ++ goto out; ++ ++ length += sprintf(buffer + length, ++ "NSProxy:\t%p [%p,%p,%p]\n", ++ nsproxy, nsproxy->mnt_ns, ++ nsproxy->uts_ns, nsproxy->ipc_ns); ++ ++ ns = nsproxy->mnt_ns; ++ if (!ns) ++ goto skip_ns; ++ ++ pstr = kmalloc(PATH_MAX, GFP_KERNEL); ++ if (!pstr) ++ goto skip_ns; ++ ++ path.mnt = ns->root; ++ path.dentry = ns->root->mnt_root; ++ root = d_path(&path, pstr, PATH_MAX - 2); ++ length += sprintf(buffer + length, ++ "Namespace:\t%p [#%u]\n" ++ "RootPath:\t%s\n", ++ ns, atomic_read(&ns->count), ++ root); ++ kfree(pstr); ++skip_ns: ++ ++ uts = nsproxy->uts_ns; ++ if (!uts) ++ goto skip_uts; ++ ++ length += sprintf(buffer + length, ++ "SysName:\t%.*s\n" ++ "NodeName:\t%.*s\n" ++ "Release:\t%.*s\n" ++ "Version:\t%.*s\n" ++ "Machine:\t%.*s\n" ++ "DomainName:\t%.*s\n", ++ __NEW_UTS_LEN, uts->name.sysname, ++ __NEW_UTS_LEN, uts->name.nodename, ++ __NEW_UTS_LEN, uts->name.release, ++ __NEW_UTS_LEN, uts->name.version, ++ __NEW_UTS_LEN, uts->name.machine, ++ __NEW_UTS_LEN, uts->name.domainname); ++skip_uts: ++ ++ ipc = nsproxy->ipc_ns; ++ if (!ipc) ++ goto skip_ipc; ++ ++ length += sprintf(buffer + length, ++ "SEMS:\t\t%d %d %d %d %d\n" ++ "MSG:\t\t%d %d %d\n" ++ "SHM:\t\t%lu %lu %d %d\n", ++ ipc->sem_ctls[0], ipc->sem_ctls[1], ++ ipc->sem_ctls[2], ipc->sem_ctls[3], ++ ipc->used_sems, ++ ipc->msg_ctlmax, ipc->msg_ctlmnb, ipc->msg_ctlmni, ++ (unsigned long)ipc->shm_ctlmax, ++ (unsigned long)ipc->shm_ctlall, ++ ipc->shm_ctlmni, ipc->shm_tot); ++skip_ipc: ++out: ++ return length; ++} ++ ++ ++#include ++ ++#define LOAD_INT(x) ((x) >> FSHIFT) ++#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1 - 1)) * 100) ++ ++static inline ++int vx_info_proc_cvirt(struct _vx_cvirt *cvirt, char *buffer) ++{ ++ int length = 0; ++ int a, b, c; ++ ++ length += sprintf(buffer + length, ++ "BiasUptime:\t%lu.%02lu\n", ++ (unsigned long)cvirt->bias_uptime.tv_sec, ++ (cvirt->bias_uptime.tv_nsec / (NSEC_PER_SEC / 100))); ++ ++ a = cvirt->load[0] + (FIXED_1 / 200); ++ b = cvirt->load[1] + (FIXED_1 / 200); ++ c = cvirt->load[2] + (FIXED_1 / 200); ++ length += sprintf(buffer + length, ++ "nr_threads:\t%d\n" ++ "nr_running:\t%d\n" ++ "nr_unintr:\t%d\n" ++ "nr_onhold:\t%d\n" ++ "load_updates:\t%d\n" ++ "loadavg:\t%d.%02d %d.%02d %d.%02d\n" ++ "total_forks:\t%d\n", ++ atomic_read(&cvirt->nr_threads), ++ atomic_read(&cvirt->nr_running), ++ atomic_read(&cvirt->nr_uninterruptible), ++ atomic_read(&cvirt->nr_onhold), ++ atomic_read(&cvirt->load_updates), ++ LOAD_INT(a), LOAD_FRAC(a), ++ LOAD_INT(b), LOAD_FRAC(b), ++ LOAD_INT(c), LOAD_FRAC(c), ++ atomic_read(&cvirt->total_forks)); ++ return length; ++} ++ ++static inline ++int vx_info_proc_cvirt_pc(struct _vx_cvirt_pc *cvirt_pc, ++ char *buffer, int cpu) ++{ ++ int length = 0; ++ return length; ++} ++ ++#endif /* _VX_CVIRT_PROC_H */ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/debug.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/debug.c +--- linux-2.6.31.6/kernel/vserver/debug.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/debug.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,32 @@ ++/* ++ * kernel/vserver/debug.c ++ * ++ * Copyright (C) 2005-2007 Herbert Pötzl ++ * ++ * V0.01 vx_info dump support ++ * ++ */ ++ ++#include ++ ++#include ++ ++ ++void dump_vx_info(struct vx_info *vxi, int level) ++{ ++ printk("vx_info %p[#%d, %d.%d, %4x]\n", vxi, vxi->vx_id, ++ atomic_read(&vxi->vx_usecnt), ++ atomic_read(&vxi->vx_tasks), ++ vxi->vx_state); ++ if (level > 0) { ++ __dump_vx_limit(&vxi->limit); ++ __dump_vx_sched(&vxi->sched); ++ __dump_vx_cvirt(&vxi->cvirt); ++ __dump_vx_cacct(&vxi->cacct); ++ } ++ printk("---\n"); ++} ++ ++ ++EXPORT_SYMBOL_GPL(dump_vx_info); ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/device.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/device.c +--- linux-2.6.31.6/kernel/vserver/device.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/device.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,443 @@ ++/* ++ * linux/kernel/vserver/device.c ++ * ++ * Linux-VServer: Device Support ++ * ++ * Copyright (C) 2006 Herbert Pötzl ++ * Copyright (C) 2007 Daniel Hokka Zakrisson ++ * ++ * V0.01 device mapping basics ++ * V0.02 added defaults ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++#define DMAP_HASH_BITS 4 ++ ++ ++struct vs_mapping { ++ union { ++ struct hlist_node hlist; ++ struct list_head list; ++ } u; ++#define dm_hlist u.hlist ++#define dm_list u.list ++ xid_t xid; ++ dev_t device; ++ struct vx_dmap_target target; ++}; ++ ++ ++static struct hlist_head dmap_main_hash[1 << DMAP_HASH_BITS]; ++ ++static spinlock_t dmap_main_hash_lock = SPIN_LOCK_UNLOCKED; ++ ++static struct vx_dmap_target dmap_defaults[2] = { ++ { .flags = DATTR_OPEN }, ++ { .flags = DATTR_OPEN }, ++}; ++ ++ ++struct kmem_cache *dmap_cachep __read_mostly; ++ ++int __init dmap_cache_init(void) ++{ ++ dmap_cachep = kmem_cache_create("dmap_cache", ++ sizeof(struct vs_mapping), 0, ++ SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); ++ return 0; ++} ++ ++__initcall(dmap_cache_init); ++ ++ ++static inline unsigned int __hashval(dev_t dev, int bits) ++{ ++ return hash_long((unsigned long)dev, bits); ++} ++ ++ ++/* __hash_mapping() ++ * add the mapping to the hash table ++ */ ++static inline void __hash_mapping(struct vx_info *vxi, struct vs_mapping *vdm) ++{ ++ spinlock_t *hash_lock = &dmap_main_hash_lock; ++ struct hlist_head *head, *hash = dmap_main_hash; ++ int device = vdm->device; ++ ++ spin_lock(hash_lock); ++ vxdprintk(VXD_CBIT(misc, 8), "__hash_mapping: %p[#%d] %08x:%08x", ++ vxi, vxi ? vxi->vx_id : 0, device, vdm->target.target); ++ ++ head = &hash[__hashval(device, DMAP_HASH_BITS)]; ++ hlist_add_head(&vdm->dm_hlist, head); ++ spin_unlock(hash_lock); ++} ++ ++ ++static inline int __mode_to_default(umode_t mode) ++{ ++ switch (mode) { ++ case S_IFBLK: ++ return 0; ++ case S_IFCHR: ++ return 1; ++ default: ++ BUG(); ++ } ++} ++ ++ ++/* __set_default() ++ * set a default ++ */ ++static inline void __set_default(struct vx_info *vxi, umode_t mode, ++ struct vx_dmap_target *vdmt) ++{ ++ spinlock_t *hash_lock = &dmap_main_hash_lock; ++ spin_lock(hash_lock); ++ ++ if (vxi) ++ vxi->dmap.targets[__mode_to_default(mode)] = *vdmt; ++ else ++ dmap_defaults[__mode_to_default(mode)] = *vdmt; ++ ++ ++ spin_unlock(hash_lock); ++ ++ vxdprintk(VXD_CBIT(misc, 8), "__set_default: %p[#%u] %08x %04x", ++ vxi, vxi ? vxi->vx_id : 0, vdmt->target, vdmt->flags); ++} ++ ++ ++/* __remove_default() ++ * remove a default ++ */ ++static inline int __remove_default(struct vx_info *vxi, umode_t mode) ++{ ++ spinlock_t *hash_lock = &dmap_main_hash_lock; ++ spin_lock(hash_lock); ++ ++ if (vxi) ++ vxi->dmap.targets[__mode_to_default(mode)].flags = 0; ++ else /* remove == reset */ ++ dmap_defaults[__mode_to_default(mode)].flags = DATTR_OPEN | mode; ++ ++ spin_unlock(hash_lock); ++ return 0; ++} ++ ++ ++/* __find_mapping() ++ * find a mapping in the hash table ++ * ++ * caller must hold hash_lock ++ */ ++static inline int __find_mapping(xid_t xid, dev_t device, umode_t mode, ++ struct vs_mapping **local, struct vs_mapping **global) ++{ ++ struct hlist_head *hash = dmap_main_hash; ++ struct hlist_head *head = &hash[__hashval(device, DMAP_HASH_BITS)]; ++ struct hlist_node *pos; ++ struct vs_mapping *vdm; ++ ++ *local = NULL; ++ if (global) ++ *global = NULL; ++ ++ hlist_for_each(pos, head) { ++ vdm = hlist_entry(pos, struct vs_mapping, dm_hlist); ++ ++ if ((vdm->device == device) && ++ !((vdm->target.flags ^ mode) & S_IFMT)) { ++ if (vdm->xid == xid) { ++ *local = vdm; ++ return 1; ++ } else if (global && vdm->xid == 0) ++ *global = vdm; ++ } ++ } ++ ++ if (global && *global) ++ return 0; ++ else ++ return -ENOENT; ++} ++ ++ ++/* __lookup_mapping() ++ * find a mapping and store the result in target and flags ++ */ ++static inline int __lookup_mapping(struct vx_info *vxi, ++ dev_t device, dev_t *target, int *flags, umode_t mode) ++{ ++ spinlock_t *hash_lock = &dmap_main_hash_lock; ++ struct vs_mapping *vdm, *global; ++ struct vx_dmap_target *vdmt; ++ int ret = 0; ++ xid_t xid = vxi->vx_id; ++ int index; ++ ++ spin_lock(hash_lock); ++ if (__find_mapping(xid, device, mode, &vdm, &global) > 0) { ++ ret = 1; ++ vdmt = &vdm->target; ++ goto found; ++ } ++ ++ index = __mode_to_default(mode); ++ if (vxi && vxi->dmap.targets[index].flags) { ++ ret = 2; ++ vdmt = &vxi->dmap.targets[index]; ++ } else if (global) { ++ ret = 3; ++ vdmt = &global->target; ++ goto found; ++ } else { ++ ret = 4; ++ vdmt = &dmap_defaults[index]; ++ } ++ ++found: ++ if (target && (vdmt->flags & DATTR_REMAP)) ++ *target = vdmt->target; ++ else if (target) ++ *target = device; ++ if (flags) ++ *flags = vdmt->flags; ++ ++ spin_unlock(hash_lock); ++ ++ return ret; ++} ++ ++ ++/* __remove_mapping() ++ * remove a mapping from the hash table ++ */ ++static inline int __remove_mapping(struct vx_info *vxi, dev_t device, ++ umode_t mode) ++{ ++ spinlock_t *hash_lock = &dmap_main_hash_lock; ++ struct vs_mapping *vdm = NULL; ++ int ret = 0; ++ ++ spin_lock(hash_lock); ++ ++ ret = __find_mapping((vxi ? vxi->vx_id : 0), device, mode, &vdm, ++ NULL); ++ vxdprintk(VXD_CBIT(misc, 8), "__remove_mapping: %p[#%d] %08x %04x", ++ vxi, vxi ? vxi->vx_id : 0, device, mode); ++ if (ret < 0) ++ goto out; ++ hlist_del(&vdm->dm_hlist); ++ ++out: ++ spin_unlock(hash_lock); ++ if (vdm) ++ kmem_cache_free(dmap_cachep, vdm); ++ return ret; ++} ++ ++ ++ ++int vs_map_device(struct vx_info *vxi, ++ dev_t device, dev_t *target, umode_t mode) ++{ ++ int ret, flags = DATTR_MASK; ++ ++ if (!vxi) { ++ if (target) ++ *target = device; ++ goto out; ++ } ++ ret = __lookup_mapping(vxi, device, target, &flags, mode); ++ vxdprintk(VXD_CBIT(misc, 8), "vs_map_device: %08x target: %08x flags: %04x mode: %04x mapped=%d", ++ device, target ? *target : 0, flags, mode, ret); ++out: ++ return (flags & DATTR_MASK); ++} ++ ++ ++ ++static int do_set_mapping(struct vx_info *vxi, ++ dev_t device, dev_t target, int flags, umode_t mode) ++{ ++ if (device) { ++ struct vs_mapping *new; ++ ++ new = kmem_cache_alloc(dmap_cachep, GFP_KERNEL); ++ if (!new) ++ return -ENOMEM; ++ ++ INIT_HLIST_NODE(&new->dm_hlist); ++ new->device = device; ++ new->target.target = target; ++ new->target.flags = flags | mode; ++ new->xid = (vxi ? vxi->vx_id : 0); ++ ++ vxdprintk(VXD_CBIT(misc, 8), "do_set_mapping: %08x target: %08x flags: %04x", device, target, flags); ++ __hash_mapping(vxi, new); ++ } else { ++ struct vx_dmap_target new = { ++ .target = target, ++ .flags = flags | mode, ++ }; ++ __set_default(vxi, mode, &new); ++ } ++ return 0; ++} ++ ++ ++static int do_unset_mapping(struct vx_info *vxi, ++ dev_t device, dev_t target, int flags, umode_t mode) ++{ ++ int ret = -EINVAL; ++ ++ if (device) { ++ ret = __remove_mapping(vxi, device, mode); ++ if (ret < 0) ++ goto out; ++ } else { ++ ret = __remove_default(vxi, mode); ++ if (ret < 0) ++ goto out; ++ } ++ ++out: ++ return ret; ++} ++ ++ ++static inline int __user_device(const char __user *name, dev_t *dev, ++ umode_t *mode) ++{ ++ struct nameidata nd; ++ int ret; ++ ++ if (!name) { ++ *dev = 0; ++ return 0; ++ } ++ ret = user_lpath(name, &nd.path); ++ if (ret) ++ return ret; ++ if (nd.path.dentry->d_inode) { ++ *dev = nd.path.dentry->d_inode->i_rdev; ++ *mode = nd.path.dentry->d_inode->i_mode; ++ } ++ path_put(&nd.path); ++ return 0; ++} ++ ++static inline int __mapping_mode(dev_t device, dev_t target, ++ umode_t device_mode, umode_t target_mode, umode_t *mode) ++{ ++ if (device) ++ *mode = device_mode & S_IFMT; ++ else if (target) ++ *mode = target_mode & S_IFMT; ++ else ++ return -EINVAL; ++ ++ /* if both given, device and target mode have to match */ ++ if (device && target && ++ ((device_mode ^ target_mode) & S_IFMT)) ++ return -EINVAL; ++ return 0; ++} ++ ++ ++static inline int do_mapping(struct vx_info *vxi, const char __user *device_path, ++ const char __user *target_path, int flags, int set) ++{ ++ dev_t device = ~0, target = ~0; ++ umode_t device_mode = 0, target_mode = 0, mode; ++ int ret; ++ ++ ret = __user_device(device_path, &device, &device_mode); ++ if (ret) ++ return ret; ++ ret = __user_device(target_path, &target, &target_mode); ++ if (ret) ++ return ret; ++ ++ ret = __mapping_mode(device, target, ++ device_mode, target_mode, &mode); ++ if (ret) ++ return ret; ++ ++ if (set) ++ return do_set_mapping(vxi, device, target, ++ flags, mode); ++ else ++ return do_unset_mapping(vxi, device, target, ++ flags, mode); ++} ++ ++ ++int vc_set_mapping(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_set_mapping_v0 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_mapping(vxi, vc_data.device, vc_data.target, ++ vc_data.flags, 1); ++} ++ ++int vc_unset_mapping(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_set_mapping_v0 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_mapping(vxi, vc_data.device, vc_data.target, ++ vc_data.flags, 0); ++} ++ ++ ++#ifdef CONFIG_COMPAT ++ ++int vc_set_mapping_x32(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_set_mapping_v0_x32 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_mapping(vxi, compat_ptr(vc_data.device_ptr), ++ compat_ptr(vc_data.target_ptr), vc_data.flags, 1); ++} ++ ++int vc_unset_mapping_x32(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_set_mapping_v0_x32 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_mapping(vxi, compat_ptr(vc_data.device_ptr), ++ compat_ptr(vc_data.target_ptr), vc_data.flags, 0); ++} ++ ++#endif /* CONFIG_COMPAT */ ++ ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/dlimit.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/dlimit.c +--- linux-2.6.31.6/kernel/vserver/dlimit.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/dlimit.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,522 @@ ++/* ++ * linux/kernel/vserver/dlimit.c ++ * ++ * Virtual Server: Context Disk Limits ++ * ++ * Copyright (C) 2004-2007 Herbert Pötzl ++ * ++ * V0.01 initial version ++ * V0.02 compat32 splitup ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++/* __alloc_dl_info() ++ ++ * allocate an initialized dl_info struct ++ * doesn't make it visible (hash) */ ++ ++static struct dl_info *__alloc_dl_info(struct super_block *sb, tag_t tag) ++{ ++ struct dl_info *new = NULL; ++ ++ vxdprintk(VXD_CBIT(dlim, 5), ++ "alloc_dl_info(%p,%d)*", sb, tag); ++ ++ /* would this benefit from a slab cache? */ ++ new = kmalloc(sizeof(struct dl_info), GFP_KERNEL); ++ if (!new) ++ return 0; ++ ++ memset(new, 0, sizeof(struct dl_info)); ++ new->dl_tag = tag; ++ new->dl_sb = sb; ++ INIT_RCU_HEAD(&new->dl_rcu); ++ INIT_HLIST_NODE(&new->dl_hlist); ++ spin_lock_init(&new->dl_lock); ++ atomic_set(&new->dl_refcnt, 0); ++ atomic_set(&new->dl_usecnt, 0); ++ ++ /* rest of init goes here */ ++ ++ vxdprintk(VXD_CBIT(dlim, 4), ++ "alloc_dl_info(%p,%d) = %p", sb, tag, new); ++ return new; ++} ++ ++/* __dealloc_dl_info() ++ ++ * final disposal of dl_info */ ++ ++static void __dealloc_dl_info(struct dl_info *dli) ++{ ++ vxdprintk(VXD_CBIT(dlim, 4), ++ "dealloc_dl_info(%p)", dli); ++ ++ dli->dl_hlist.next = LIST_POISON1; ++ dli->dl_tag = -1; ++ dli->dl_sb = 0; ++ ++ BUG_ON(atomic_read(&dli->dl_usecnt)); ++ BUG_ON(atomic_read(&dli->dl_refcnt)); ++ ++ kfree(dli); ++} ++ ++ ++/* hash table for dl_info hash */ ++ ++#define DL_HASH_SIZE 13 ++ ++struct hlist_head dl_info_hash[DL_HASH_SIZE]; ++ ++static spinlock_t dl_info_hash_lock = SPIN_LOCK_UNLOCKED; ++ ++ ++static inline unsigned int __hashval(struct super_block *sb, tag_t tag) ++{ ++ return ((tag ^ (unsigned long)sb) % DL_HASH_SIZE); ++} ++ ++ ++ ++/* __hash_dl_info() ++ ++ * add the dli to the global hash table ++ * requires the hash_lock to be held */ ++ ++static inline void __hash_dl_info(struct dl_info *dli) ++{ ++ struct hlist_head *head; ++ ++ vxdprintk(VXD_CBIT(dlim, 6), ++ "__hash_dl_info: %p[#%d]", dli, dli->dl_tag); ++ get_dl_info(dli); ++ head = &dl_info_hash[__hashval(dli->dl_sb, dli->dl_tag)]; ++ hlist_add_head_rcu(&dli->dl_hlist, head); ++} ++ ++/* __unhash_dl_info() ++ ++ * remove the dli from the global hash table ++ * requires the hash_lock to be held */ ++ ++static inline void __unhash_dl_info(struct dl_info *dli) ++{ ++ vxdprintk(VXD_CBIT(dlim, 6), ++ "__unhash_dl_info: %p[#%d]", dli, dli->dl_tag); ++ hlist_del_rcu(&dli->dl_hlist); ++ put_dl_info(dli); ++} ++ ++ ++/* __lookup_dl_info() ++ ++ * requires the rcu_read_lock() ++ * doesn't increment the dl_refcnt */ ++ ++static inline struct dl_info *__lookup_dl_info(struct super_block *sb, tag_t tag) ++{ ++ struct hlist_head *head = &dl_info_hash[__hashval(sb, tag)]; ++ struct hlist_node *pos; ++ struct dl_info *dli; ++ ++ hlist_for_each_entry_rcu(dli, pos, head, dl_hlist) { ++ ++ if (dli->dl_tag == tag && dli->dl_sb == sb) { ++ return dli; ++ } ++ } ++ return NULL; ++} ++ ++ ++struct dl_info *locate_dl_info(struct super_block *sb, tag_t tag) ++{ ++ struct dl_info *dli; ++ ++ rcu_read_lock(); ++ dli = get_dl_info(__lookup_dl_info(sb, tag)); ++ vxdprintk(VXD_CBIT(dlim, 7), ++ "locate_dl_info(%p,#%d) = %p", sb, tag, dli); ++ rcu_read_unlock(); ++ return dli; ++} ++ ++void rcu_free_dl_info(struct rcu_head *head) ++{ ++ struct dl_info *dli = container_of(head, struct dl_info, dl_rcu); ++ int usecnt, refcnt; ++ ++ BUG_ON(!dli || !head); ++ ++ usecnt = atomic_read(&dli->dl_usecnt); ++ BUG_ON(usecnt < 0); ++ ++ refcnt = atomic_read(&dli->dl_refcnt); ++ BUG_ON(refcnt < 0); ++ ++ vxdprintk(VXD_CBIT(dlim, 3), ++ "rcu_free_dl_info(%p)", dli); ++ if (!usecnt) ++ __dealloc_dl_info(dli); ++ else ++ printk("!!! rcu didn't free\n"); ++} ++ ++ ++ ++ ++static int do_addrem_dlimit(uint32_t id, const char __user *name, ++ uint32_t flags, int add) ++{ ++ struct path path; ++ int ret; ++ ++ ret = user_lpath(name, &path); ++ if (!ret) { ++ struct super_block *sb; ++ struct dl_info *dli; ++ ++ ret = -EINVAL; ++ if (!path.dentry->d_inode) ++ goto out_release; ++ if (!(sb = path.dentry->d_inode->i_sb)) ++ goto out_release; ++ ++ if (add) { ++ dli = __alloc_dl_info(sb, id); ++ spin_lock(&dl_info_hash_lock); ++ ++ ret = -EEXIST; ++ if (__lookup_dl_info(sb, id)) ++ goto out_unlock; ++ __hash_dl_info(dli); ++ dli = NULL; ++ } else { ++ spin_lock(&dl_info_hash_lock); ++ dli = __lookup_dl_info(sb, id); ++ ++ ret = -ESRCH; ++ if (!dli) ++ goto out_unlock; ++ __unhash_dl_info(dli); ++ } ++ ret = 0; ++ out_unlock: ++ spin_unlock(&dl_info_hash_lock); ++ if (add && dli) ++ __dealloc_dl_info(dli); ++ out_release: ++ path_put(&path); ++ } ++ return ret; ++} ++ ++int vc_add_dlimit(uint32_t id, void __user *data) ++{ ++ struct vcmd_ctx_dlimit_base_v0 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_addrem_dlimit(id, vc_data.name, vc_data.flags, 1); ++} ++ ++int vc_rem_dlimit(uint32_t id, void __user *data) ++{ ++ struct vcmd_ctx_dlimit_base_v0 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_addrem_dlimit(id, vc_data.name, vc_data.flags, 0); ++} ++ ++#ifdef CONFIG_COMPAT ++ ++int vc_add_dlimit_x32(uint32_t id, void __user *data) ++{ ++ struct vcmd_ctx_dlimit_base_v0_x32 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_addrem_dlimit(id, ++ compat_ptr(vc_data.name_ptr), vc_data.flags, 1); ++} ++ ++int vc_rem_dlimit_x32(uint32_t id, void __user *data) ++{ ++ struct vcmd_ctx_dlimit_base_v0_x32 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_addrem_dlimit(id, ++ compat_ptr(vc_data.name_ptr), vc_data.flags, 0); ++} ++ ++#endif /* CONFIG_COMPAT */ ++ ++ ++static inline ++int do_set_dlimit(uint32_t id, const char __user *name, ++ uint32_t space_used, uint32_t space_total, ++ uint32_t inodes_used, uint32_t inodes_total, ++ uint32_t reserved, uint32_t flags) ++{ ++ struct path path; ++ int ret; ++ ++ ret = user_lpath(name, &path); ++ if (!ret) { ++ struct super_block *sb; ++ struct dl_info *dli; ++ ++ ret = -EINVAL; ++ if (!path.dentry->d_inode) ++ goto out_release; ++ if (!(sb = path.dentry->d_inode->i_sb)) ++ goto out_release; ++ if ((reserved != CDLIM_KEEP && ++ reserved > 100) || ++ (inodes_used != CDLIM_KEEP && ++ inodes_used > inodes_total) || ++ (space_used != CDLIM_KEEP && ++ space_used > space_total)) ++ goto out_release; ++ ++ ret = -ESRCH; ++ dli = locate_dl_info(sb, id); ++ if (!dli) ++ goto out_release; ++ ++ spin_lock(&dli->dl_lock); ++ ++ if (inodes_used != CDLIM_KEEP) ++ dli->dl_inodes_used = inodes_used; ++ if (inodes_total != CDLIM_KEEP) ++ dli->dl_inodes_total = inodes_total; ++ if (space_used != CDLIM_KEEP) { ++ dli->dl_space_used = space_used; ++ dli->dl_space_used <<= 10; ++ } ++ if (space_total == CDLIM_INFINITY) ++ dli->dl_space_total = DLIM_INFINITY; ++ else if (space_total != CDLIM_KEEP) { ++ dli->dl_space_total = space_total; ++ dli->dl_space_total <<= 10; ++ } ++ if (reserved != CDLIM_KEEP) ++ dli->dl_nrlmult = (1 << 10) * (100 - reserved) / 100; ++ ++ spin_unlock(&dli->dl_lock); ++ ++ put_dl_info(dli); ++ ret = 0; ++ ++ out_release: ++ path_put(&path); ++ } ++ return ret; ++} ++ ++int vc_set_dlimit(uint32_t id, void __user *data) ++{ ++ struct vcmd_ctx_dlimit_v0 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_set_dlimit(id, vc_data.name, ++ vc_data.space_used, vc_data.space_total, ++ vc_data.inodes_used, vc_data.inodes_total, ++ vc_data.reserved, vc_data.flags); ++} ++ ++#ifdef CONFIG_COMPAT ++ ++int vc_set_dlimit_x32(uint32_t id, void __user *data) ++{ ++ struct vcmd_ctx_dlimit_v0_x32 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_set_dlimit(id, compat_ptr(vc_data.name_ptr), ++ vc_data.space_used, vc_data.space_total, ++ vc_data.inodes_used, vc_data.inodes_total, ++ vc_data.reserved, vc_data.flags); ++} ++ ++#endif /* CONFIG_COMPAT */ ++ ++ ++static inline ++int do_get_dlimit(uint32_t id, const char __user *name, ++ uint32_t *space_used, uint32_t *space_total, ++ uint32_t *inodes_used, uint32_t *inodes_total, ++ uint32_t *reserved, uint32_t *flags) ++{ ++ struct path path; ++ int ret; ++ ++ ret = user_lpath(name, &path); ++ if (!ret) { ++ struct super_block *sb; ++ struct dl_info *dli; ++ ++ ret = -EINVAL; ++ if (!path.dentry->d_inode) ++ goto out_release; ++ if (!(sb = path.dentry->d_inode->i_sb)) ++ goto out_release; ++ ++ ret = -ESRCH; ++ dli = locate_dl_info(sb, id); ++ if (!dli) ++ goto out_release; ++ ++ spin_lock(&dli->dl_lock); ++ *inodes_used = dli->dl_inodes_used; ++ *inodes_total = dli->dl_inodes_total; ++ *space_used = dli->dl_space_used >> 10; ++ if (dli->dl_space_total == DLIM_INFINITY) ++ *space_total = CDLIM_INFINITY; ++ else ++ *space_total = dli->dl_space_total >> 10; ++ ++ *reserved = 100 - ((dli->dl_nrlmult * 100 + 512) >> 10); ++ spin_unlock(&dli->dl_lock); ++ ++ put_dl_info(dli); ++ ret = -EFAULT; ++ ++ ret = 0; ++ out_release: ++ path_put(&path); ++ } ++ return ret; ++} ++ ++ ++int vc_get_dlimit(uint32_t id, void __user *data) ++{ ++ struct vcmd_ctx_dlimit_v0 vc_data; ++ int ret; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = do_get_dlimit(id, vc_data.name, ++ &vc_data.space_used, &vc_data.space_total, ++ &vc_data.inodes_used, &vc_data.inodes_total, ++ &vc_data.reserved, &vc_data.flags); ++ if (ret) ++ return ret; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++#ifdef CONFIG_COMPAT ++ ++int vc_get_dlimit_x32(uint32_t id, void __user *data) ++{ ++ struct vcmd_ctx_dlimit_v0_x32 vc_data; ++ int ret; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = do_get_dlimit(id, compat_ptr(vc_data.name_ptr), ++ &vc_data.space_used, &vc_data.space_total, ++ &vc_data.inodes_used, &vc_data.inodes_total, ++ &vc_data.reserved, &vc_data.flags); ++ if (ret) ++ return ret; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++#endif /* CONFIG_COMPAT */ ++ ++ ++void vx_vsi_statfs(struct super_block *sb, struct kstatfs *buf) ++{ ++ struct dl_info *dli; ++ __u64 blimit, bfree, bavail; ++ __u32 ifree; ++ ++ dli = locate_dl_info(sb, dx_current_tag()); ++ if (!dli) ++ return; ++ ++ spin_lock(&dli->dl_lock); ++ if (dli->dl_inodes_total == (unsigned long)DLIM_INFINITY) ++ goto no_ilim; ++ ++ /* reduce max inodes available to limit */ ++ if (buf->f_files > dli->dl_inodes_total) ++ buf->f_files = dli->dl_inodes_total; ++ ++ ifree = dli->dl_inodes_total - dli->dl_inodes_used; ++ /* reduce free inodes to min */ ++ if (ifree < buf->f_ffree) ++ buf->f_ffree = ifree; ++ ++no_ilim: ++ if (dli->dl_space_total == DLIM_INFINITY) ++ goto no_blim; ++ ++ blimit = dli->dl_space_total >> sb->s_blocksize_bits; ++ ++ if (dli->dl_space_total < dli->dl_space_used) ++ bfree = 0; ++ else ++ bfree = (dli->dl_space_total - dli->dl_space_used) ++ >> sb->s_blocksize_bits; ++ ++ bavail = ((dli->dl_space_total >> 10) * dli->dl_nrlmult); ++ if (bavail < dli->dl_space_used) ++ bavail = 0; ++ else ++ bavail = (bavail - dli->dl_space_used) ++ >> sb->s_blocksize_bits; ++ ++ /* reduce max space available to limit */ ++ if (buf->f_blocks > blimit) ++ buf->f_blocks = blimit; ++ ++ /* reduce free space to min */ ++ if (bfree < buf->f_bfree) ++ buf->f_bfree = bfree; ++ ++ /* reduce avail space to min */ ++ if (bavail < buf->f_bavail) ++ buf->f_bavail = bavail; ++ ++no_blim: ++ spin_unlock(&dli->dl_lock); ++ put_dl_info(dli); ++ ++ return; ++} ++ ++#include ++ ++EXPORT_SYMBOL_GPL(locate_dl_info); ++EXPORT_SYMBOL_GPL(rcu_free_dl_info); ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/helper.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/helper.c +--- linux-2.6.31.6/kernel/vserver/helper.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/helper.c 2009-11-05 04:22:08.000000000 +0100 +@@ -0,0 +1,199 @@ ++/* ++ * linux/kernel/vserver/helper.c ++ * ++ * Virtual Context Support ++ * ++ * Copyright (C) 2004-2007 Herbert Pötzl ++ * ++ * V0.01 basic helper ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++char vshelper_path[255] = "/sbin/vshelper"; ++ ++ ++static int do_vshelper(char *name, char *argv[], char *envp[], int sync) ++{ ++ int ret; ++ ++ if ((ret = call_usermodehelper(name, argv, envp, sync))) { ++ printk( KERN_WARNING ++ "%s: (%s %s) returned %s with %d\n", ++ name, argv[1], argv[2], ++ sync ? "sync" : "async", ret); ++ } ++ vxdprintk(VXD_CBIT(switch, 4), ++ "%s: (%s %s) returned %s with %d", ++ name, argv[1], argv[2], sync ? "sync" : "async", ret); ++ return ret; ++} ++ ++/* ++ * vshelper path is set via /proc/sys ++ * invoked by vserver sys_reboot(), with ++ * the following arguments ++ * ++ * argv [0] = vshelper_path; ++ * argv [1] = action: "restart", "halt", "poweroff", ... ++ * argv [2] = context identifier ++ * ++ * envp [*] = type-specific parameters ++ */ ++ ++long vs_reboot_helper(struct vx_info *vxi, int cmd, void __user *arg) ++{ ++ char id_buf[8], cmd_buf[16]; ++ char uid_buf[16], pid_buf[16]; ++ int ret; ++ ++ char *argv[] = {vshelper_path, NULL, id_buf, 0}; ++ char *envp[] = {"HOME=/", "TERM=linux", ++ "PATH=/sbin:/usr/sbin:/bin:/usr/bin", ++ uid_buf, pid_buf, cmd_buf, 0}; ++ ++ if (vx_info_state(vxi, VXS_HELPER)) ++ return -EAGAIN; ++ vxi->vx_state |= VXS_HELPER; ++ ++ snprintf(id_buf, sizeof(id_buf)-1, "%d", vxi->vx_id); ++ ++ snprintf(cmd_buf, sizeof(cmd_buf)-1, "VS_CMD=%08x", cmd); ++ snprintf(uid_buf, sizeof(uid_buf)-1, "VS_UID=%d", current_uid()); ++ snprintf(pid_buf, sizeof(pid_buf)-1, "VS_PID=%d", current->pid); ++ ++ switch (cmd) { ++ case LINUX_REBOOT_CMD_RESTART: ++ argv[1] = "restart"; ++ break; ++ ++ case LINUX_REBOOT_CMD_HALT: ++ argv[1] = "halt"; ++ break; ++ ++ case LINUX_REBOOT_CMD_POWER_OFF: ++ argv[1] = "poweroff"; ++ break; ++ ++ case LINUX_REBOOT_CMD_SW_SUSPEND: ++ argv[1] = "swsusp"; ++ break; ++ ++ default: ++ vxi->vx_state &= ~VXS_HELPER; ++ return 0; ++ } ++ ++ ret = do_vshelper(vshelper_path, argv, envp, 0); ++ vxi->vx_state &= ~VXS_HELPER; ++ __wakeup_vx_info(vxi); ++ return (ret) ? -EPERM : 0; ++} ++ ++ ++long vs_reboot(unsigned int cmd, void __user *arg) ++{ ++ struct vx_info *vxi = current_vx_info(); ++ long ret = 0; ++ ++ vxdprintk(VXD_CBIT(misc, 5), ++ "vs_reboot(%p[#%d],%d)", ++ vxi, vxi ? vxi->vx_id : 0, cmd); ++ ++ ret = vs_reboot_helper(vxi, cmd, arg); ++ if (ret) ++ return ret; ++ ++ vxi->reboot_cmd = cmd; ++ if (vx_info_flags(vxi, VXF_REBOOT_KILL, 0)) { ++ switch (cmd) { ++ case LINUX_REBOOT_CMD_RESTART: ++ case LINUX_REBOOT_CMD_HALT: ++ case LINUX_REBOOT_CMD_POWER_OFF: ++ vx_info_kill(vxi, 0, SIGKILL); ++ vx_info_kill(vxi, 1, SIGKILL); ++ default: ++ break; ++ } ++ } ++ return 0; ++} ++ ++ ++/* ++ * argv [0] = vshelper_path; ++ * argv [1] = action: "startup", "shutdown" ++ * argv [2] = context identifier ++ * ++ * envp [*] = type-specific parameters ++ */ ++ ++long vs_state_change(struct vx_info *vxi, unsigned int cmd) ++{ ++ char id_buf[8], cmd_buf[16]; ++ char *argv[] = {vshelper_path, NULL, id_buf, 0}; ++ char *envp[] = {"HOME=/", "TERM=linux", ++ "PATH=/sbin:/usr/sbin:/bin:/usr/bin", cmd_buf, 0}; ++ ++ if (!vx_info_flags(vxi, VXF_SC_HELPER, 0)) ++ return 0; ++ ++ snprintf(id_buf, sizeof(id_buf)-1, "%d", vxi->vx_id); ++ snprintf(cmd_buf, sizeof(cmd_buf)-1, "VS_CMD=%08x", cmd); ++ ++ switch (cmd) { ++ case VSC_STARTUP: ++ argv[1] = "startup"; ++ break; ++ case VSC_SHUTDOWN: ++ argv[1] = "shutdown"; ++ break; ++ default: ++ return 0; ++ } ++ ++ return do_vshelper(vshelper_path, argv, envp, 1); ++} ++ ++ ++/* ++ * argv [0] = vshelper_path; ++ * argv [1] = action: "netup", "netdown" ++ * argv [2] = context identifier ++ * ++ * envp [*] = type-specific parameters ++ */ ++ ++long vs_net_change(struct nx_info *nxi, unsigned int cmd) ++{ ++ char id_buf[8], cmd_buf[16]; ++ char *argv[] = {vshelper_path, NULL, id_buf, 0}; ++ char *envp[] = {"HOME=/", "TERM=linux", ++ "PATH=/sbin:/usr/sbin:/bin:/usr/bin", cmd_buf, 0}; ++ ++ if (!nx_info_flags(nxi, NXF_SC_HELPER, 0)) ++ return 0; ++ ++ snprintf(id_buf, sizeof(id_buf)-1, "%d", nxi->nx_id); ++ snprintf(cmd_buf, sizeof(cmd_buf)-1, "VS_CMD=%08x", cmd); ++ ++ switch (cmd) { ++ case VSC_NETUP: ++ argv[1] = "netup"; ++ break; ++ case VSC_NETDOWN: ++ argv[1] = "netdown"; ++ break; ++ default: ++ return 0; ++ } ++ ++ return do_vshelper(vshelper_path, argv, envp, 1); ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/history.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/history.c +--- linux-2.6.31.6/kernel/vserver/history.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/history.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,258 @@ ++/* ++ * kernel/vserver/history.c ++ * ++ * Virtual Context History Backtrace ++ * ++ * Copyright (C) 2004-2007 Herbert Pötzl ++ * ++ * V0.01 basic structure ++ * V0.02 hash/unhash and trace ++ * V0.03 preemption fixes ++ * ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++ ++#ifdef CONFIG_VSERVER_HISTORY ++#define VXH_SIZE CONFIG_VSERVER_HISTORY_SIZE ++#else ++#define VXH_SIZE 64 ++#endif ++ ++struct _vx_history { ++ unsigned int counter; ++ ++ struct _vx_hist_entry entry[VXH_SIZE + 1]; ++}; ++ ++ ++DEFINE_PER_CPU(struct _vx_history, vx_history_buffer); ++ ++unsigned volatile int vxh_active = 1; ++ ++static atomic_t sequence = ATOMIC_INIT(0); ++ ++ ++/* vxh_advance() ++ ++ * requires disabled preemption */ ++ ++struct _vx_hist_entry *vxh_advance(void *loc) ++{ ++ unsigned int cpu = smp_processor_id(); ++ struct _vx_history *hist = &per_cpu(vx_history_buffer, cpu); ++ struct _vx_hist_entry *entry; ++ unsigned int index; ++ ++ index = vxh_active ? (hist->counter++ % VXH_SIZE) : VXH_SIZE; ++ entry = &hist->entry[index]; ++ ++ entry->seq = atomic_inc_return(&sequence); ++ entry->loc = loc; ++ return entry; ++} ++ ++EXPORT_SYMBOL_GPL(vxh_advance); ++ ++ ++#define VXH_LOC_FMTS "(#%04x,*%d):%p" ++ ++#define VXH_LOC_ARGS(e) (e)->seq, cpu, (e)->loc ++ ++ ++#define VXH_VXI_FMTS "%p[#%d,%d.%d]" ++ ++#define VXH_VXI_ARGS(e) (e)->vxi.ptr, \ ++ (e)->vxi.ptr ? (e)->vxi.xid : 0, \ ++ (e)->vxi.ptr ? (e)->vxi.usecnt : 0, \ ++ (e)->vxi.ptr ? (e)->vxi.tasks : 0 ++ ++void vxh_dump_entry(struct _vx_hist_entry *e, unsigned cpu) ++{ ++ switch (e->type) { ++ case VXH_THROW_OOPS: ++ printk( VXH_LOC_FMTS " oops \n", VXH_LOC_ARGS(e)); ++ break; ++ ++ case VXH_GET_VX_INFO: ++ case VXH_PUT_VX_INFO: ++ printk( VXH_LOC_FMTS " %s_vx_info " VXH_VXI_FMTS "\n", ++ VXH_LOC_ARGS(e), ++ (e->type == VXH_GET_VX_INFO) ? "get" : "put", ++ VXH_VXI_ARGS(e)); ++ break; ++ ++ case VXH_INIT_VX_INFO: ++ case VXH_SET_VX_INFO: ++ case VXH_CLR_VX_INFO: ++ printk( VXH_LOC_FMTS " %s_vx_info " VXH_VXI_FMTS " @%p\n", ++ VXH_LOC_ARGS(e), ++ (e->type == VXH_INIT_VX_INFO) ? "init" : ++ ((e->type == VXH_SET_VX_INFO) ? "set" : "clr"), ++ VXH_VXI_ARGS(e), e->sc.data); ++ break; ++ ++ case VXH_CLAIM_VX_INFO: ++ case VXH_RELEASE_VX_INFO: ++ printk( VXH_LOC_FMTS " %s_vx_info " VXH_VXI_FMTS " @%p\n", ++ VXH_LOC_ARGS(e), ++ (e->type == VXH_CLAIM_VX_INFO) ? "claim" : "release", ++ VXH_VXI_ARGS(e), e->sc.data); ++ break; ++ ++ case VXH_ALLOC_VX_INFO: ++ case VXH_DEALLOC_VX_INFO: ++ printk( VXH_LOC_FMTS " %s_vx_info " VXH_VXI_FMTS "\n", ++ VXH_LOC_ARGS(e), ++ (e->type == VXH_ALLOC_VX_INFO) ? "alloc" : "dealloc", ++ VXH_VXI_ARGS(e)); ++ break; ++ ++ case VXH_HASH_VX_INFO: ++ case VXH_UNHASH_VX_INFO: ++ printk( VXH_LOC_FMTS " __%s_vx_info " VXH_VXI_FMTS "\n", ++ VXH_LOC_ARGS(e), ++ (e->type == VXH_HASH_VX_INFO) ? "hash" : "unhash", ++ VXH_VXI_ARGS(e)); ++ break; ++ ++ case VXH_LOC_VX_INFO: ++ case VXH_LOOKUP_VX_INFO: ++ case VXH_CREATE_VX_INFO: ++ printk( VXH_LOC_FMTS " __%s_vx_info [#%d] -> " VXH_VXI_FMTS "\n", ++ VXH_LOC_ARGS(e), ++ (e->type == VXH_CREATE_VX_INFO) ? "create" : ++ ((e->type == VXH_LOC_VX_INFO) ? "loc" : "lookup"), ++ e->ll.arg, VXH_VXI_ARGS(e)); ++ break; ++ } ++} ++ ++static void __vxh_dump_history(void) ++{ ++ unsigned int i, cpu; ++ ++ printk("History:\tSEQ: %8x\tNR_CPUS: %d\n", ++ atomic_read(&sequence), NR_CPUS); ++ ++ for (i = 0; i < VXH_SIZE; i++) { ++ for_each_online_cpu(cpu) { ++ struct _vx_history *hist = ++ &per_cpu(vx_history_buffer, cpu); ++ unsigned int index = (hist->counter - i) % VXH_SIZE; ++ struct _vx_hist_entry *entry = &hist->entry[index]; ++ ++ vxh_dump_entry(entry, cpu); ++ } ++ } ++} ++ ++void vxh_dump_history(void) ++{ ++ vxh_active = 0; ++#ifdef CONFIG_SMP ++ local_irq_enable(); ++ smp_send_stop(); ++ local_irq_disable(); ++#endif ++ __vxh_dump_history(); ++} ++ ++ ++/* vserver syscall commands below here */ ++ ++ ++int vc_dump_history(uint32_t id) ++{ ++ vxh_active = 0; ++ __vxh_dump_history(); ++ vxh_active = 1; ++ ++ return 0; ++} ++ ++ ++int do_read_history(struct __user _vx_hist_entry *data, ++ int cpu, uint32_t *index, uint32_t *count) ++{ ++ int pos, ret = 0; ++ struct _vx_history *hist = &per_cpu(vx_history_buffer, cpu); ++ int end = hist->counter; ++ int start = end - VXH_SIZE + 2; ++ int idx = *index; ++ ++ /* special case: get current pos */ ++ if (!*count) { ++ *index = end; ++ return 0; ++ } ++ ++ /* have we lost some data? */ ++ if (idx < start) ++ idx = start; ++ ++ for (pos = 0; (pos < *count) && (idx < end); pos++, idx++) { ++ struct _vx_hist_entry *entry = ++ &hist->entry[idx % VXH_SIZE]; ++ ++ /* send entry to userspace */ ++ ret = copy_to_user(&data[pos], entry, sizeof(*entry)); ++ if (ret) ++ break; ++ } ++ /* save new index and count */ ++ *index = idx; ++ *count = pos; ++ return ret ? ret : (*index < end); ++} ++ ++int vc_read_history(uint32_t id, void __user *data) ++{ ++ struct vcmd_read_history_v0 vc_data; ++ int ret; ++ ++ if (id >= NR_CPUS) ++ return -EINVAL; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = do_read_history((struct __user _vx_hist_entry *)vc_data.data, ++ id, &vc_data.index, &vc_data.count); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return ret; ++} ++ ++#ifdef CONFIG_COMPAT ++ ++int vc_read_history_x32(uint32_t id, void __user *data) ++{ ++ struct vcmd_read_history_v0_x32 vc_data; ++ int ret; ++ ++ if (id >= NR_CPUS) ++ return -EINVAL; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = do_read_history((struct __user _vx_hist_entry *) ++ compat_ptr(vc_data.data_ptr), ++ id, &vc_data.index, &vc_data.count); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return ret; ++} ++ ++#endif /* CONFIG_COMPAT */ ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/inet.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/inet.c +--- linux-2.6.31.6/kernel/vserver/inet.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/inet.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,225 @@ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++int nx_v4_addr_conflict(struct nx_info *nxi1, struct nx_info *nxi2) ++{ ++ int ret = 0; ++ ++ if (!nxi1 || !nxi2 || nxi1 == nxi2) ++ ret = 1; ++ else { ++ struct nx_addr_v4 *ptr; ++ ++ for (ptr = &nxi1->v4; ptr; ptr = ptr->next) { ++ if (v4_nx_addr_in_nx_info(nxi2, ptr, -1)) { ++ ret = 1; ++ break; ++ } ++ } ++ } ++ ++ vxdprintk(VXD_CBIT(net, 2), ++ "nx_v4_addr_conflict(%p,%p): %d", ++ nxi1, nxi2, ret); ++ ++ return ret; ++} ++ ++ ++#ifdef CONFIG_IPV6 ++ ++int nx_v6_addr_conflict(struct nx_info *nxi1, struct nx_info *nxi2) ++{ ++ int ret = 0; ++ ++ if (!nxi1 || !nxi2 || nxi1 == nxi2) ++ ret = 1; ++ else { ++ struct nx_addr_v6 *ptr; ++ ++ for (ptr = &nxi1->v6; ptr; ptr = ptr->next) { ++ if (v6_nx_addr_in_nx_info(nxi2, ptr, -1)) { ++ ret = 1; ++ break; ++ } ++ } ++ } ++ ++ vxdprintk(VXD_CBIT(net, 2), ++ "nx_v6_addr_conflict(%p,%p): %d", ++ nxi1, nxi2, ret); ++ ++ return ret; ++} ++ ++#endif ++ ++int v4_dev_in_nx_info(struct net_device *dev, struct nx_info *nxi) ++{ ++ struct in_device *in_dev; ++ struct in_ifaddr **ifap; ++ struct in_ifaddr *ifa; ++ int ret = 0; ++ ++ if (!dev) ++ goto out; ++ in_dev = in_dev_get(dev); ++ if (!in_dev) ++ goto out; ++ ++ for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL; ++ ifap = &ifa->ifa_next) { ++ if (v4_addr_in_nx_info(nxi, ifa->ifa_local, NXA_MASK_SHOW)) { ++ ret = 1; ++ break; ++ } ++ } ++ in_dev_put(in_dev); ++out: ++ return ret; ++} ++ ++ ++#ifdef CONFIG_IPV6 ++ ++int v6_dev_in_nx_info(struct net_device *dev, struct nx_info *nxi) ++{ ++ struct inet6_dev *in_dev; ++ struct inet6_ifaddr **ifap; ++ struct inet6_ifaddr *ifa; ++ int ret = 0; ++ ++ if (!dev) ++ goto out; ++ in_dev = in6_dev_get(dev); ++ if (!in_dev) ++ goto out; ++ ++ for (ifap = &in_dev->addr_list; (ifa = *ifap) != NULL; ++ ifap = &ifa->if_next) { ++ if (v6_addr_in_nx_info(nxi, &ifa->addr, -1)) { ++ ret = 1; ++ break; ++ } ++ } ++ in6_dev_put(in_dev); ++out: ++ return ret; ++} ++ ++#endif ++ ++int dev_in_nx_info(struct net_device *dev, struct nx_info *nxi) ++{ ++ int ret = 1; ++ ++ if (!nxi) ++ goto out; ++ if (nxi->v4.type && v4_dev_in_nx_info(dev, nxi)) ++ goto out; ++#ifdef CONFIG_IPV6 ++ ret = 2; ++ if (nxi->v6.type && v6_dev_in_nx_info(dev, nxi)) ++ goto out; ++#endif ++ ret = 0; ++out: ++ vxdprintk(VXD_CBIT(net, 3), ++ "dev_in_nx_info(%p,%p[#%d]) = %d", ++ dev, nxi, nxi ? nxi->nx_id : 0, ret); ++ return ret; ++} ++ ++int ip_v4_find_src(struct net *net, struct nx_info *nxi, ++ struct rtable **rp, struct flowi *fl) ++{ ++ if (!nxi) ++ return 0; ++ ++ /* FIXME: handle lback only case */ ++ if (!NX_IPV4(nxi)) ++ return -EPERM; ++ ++ vxdprintk(VXD_CBIT(net, 4), ++ "ip_v4_find_src(%p[#%u]) " NIPQUAD_FMT " -> " NIPQUAD_FMT, ++ nxi, nxi ? nxi->nx_id : 0, ++ NIPQUAD(fl->fl4_src), NIPQUAD(fl->fl4_dst)); ++ ++ /* single IP is unconditional */ ++ if (nx_info_flags(nxi, NXF_SINGLE_IP, 0) && ++ (fl->fl4_src == INADDR_ANY)) ++ fl->fl4_src = nxi->v4.ip[0].s_addr; ++ ++ if (fl->fl4_src == INADDR_ANY) { ++ struct nx_addr_v4 *ptr; ++ __be32 found = 0; ++ int err; ++ ++ err = __ip_route_output_key(net, rp, fl); ++ if (!err) { ++ found = (*rp)->rt_src; ++ ip_rt_put(*rp); ++ vxdprintk(VXD_CBIT(net, 4), ++ "ip_v4_find_src(%p[#%u]) rok[%u]: " NIPQUAD_FMT, ++ nxi, nxi ? nxi->nx_id : 0, fl->oif, NIPQUAD(found)); ++ if (v4_addr_in_nx_info(nxi, found, NXA_MASK_BIND)) ++ goto found; ++ } ++ ++ for (ptr = &nxi->v4; ptr; ptr = ptr->next) { ++ __be32 primary = ptr->ip[0].s_addr; ++ __be32 mask = ptr->mask.s_addr; ++ __be32 neta = primary & mask; ++ ++ vxdprintk(VXD_CBIT(net, 4), "ip_v4_find_src(%p[#%u]) chk: " ++ NIPQUAD_FMT "/" NIPQUAD_FMT "/" NIPQUAD_FMT, ++ nxi, nxi ? nxi->nx_id : 0, NIPQUAD(primary), ++ NIPQUAD(mask), NIPQUAD(neta)); ++ if ((found & mask) != neta) ++ continue; ++ ++ fl->fl4_src = primary; ++ err = __ip_route_output_key(net, rp, fl); ++ vxdprintk(VXD_CBIT(net, 4), ++ "ip_v4_find_src(%p[#%u]) rok[%u]: " NIPQUAD_FMT, ++ nxi, nxi ? nxi->nx_id : 0, fl->oif, NIPQUAD(primary)); ++ if (!err) { ++ found = (*rp)->rt_src; ++ ip_rt_put(*rp); ++ if (found == primary) ++ goto found; ++ } ++ } ++ /* still no source ip? */ ++ found = ipv4_is_loopback(fl->fl4_dst) ++ ? IPI_LOOPBACK : nxi->v4.ip[0].s_addr; ++ found: ++ /* assign src ip to flow */ ++ fl->fl4_src = found; ++ ++ } else { ++ if (!v4_addr_in_nx_info(nxi, fl->fl4_src, NXA_MASK_BIND)) ++ return -EPERM; ++ } ++ ++ if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0)) { ++ if (ipv4_is_loopback(fl->fl4_dst)) ++ fl->fl4_dst = nxi->v4_lback.s_addr; ++ if (ipv4_is_loopback(fl->fl4_src)) ++ fl->fl4_src = nxi->v4_lback.s_addr; ++ } else if (ipv4_is_loopback(fl->fl4_dst) && ++ !nx_info_flags(nxi, NXF_LBACK_ALLOW, 0)) ++ return -EPERM; ++ ++ return 0; ++} ++ ++EXPORT_SYMBOL_GPL(ip_v4_find_src); ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/init.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/init.c +--- linux-2.6.31.6/kernel/vserver/init.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/init.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,45 @@ ++/* ++ * linux/kernel/init.c ++ * ++ * Virtual Server Init ++ * ++ * Copyright (C) 2004-2007 Herbert Pötzl ++ * ++ * V0.01 basic structure ++ * ++ */ ++ ++#include ++ ++int vserver_register_sysctl(void); ++void vserver_unregister_sysctl(void); ++ ++ ++static int __init init_vserver(void) ++{ ++ int ret = 0; ++ ++#ifdef CONFIG_VSERVER_DEBUG ++ vserver_register_sysctl(); ++#endif ++ return ret; ++} ++ ++ ++static void __exit exit_vserver(void) ++{ ++ ++#ifdef CONFIG_VSERVER_DEBUG ++ vserver_unregister_sysctl(); ++#endif ++ return; ++} ++ ++/* FIXME: GFP_ZONETYPES gone ++long vx_slab[GFP_ZONETYPES]; */ ++long vx_area; ++ ++ ++module_init(init_vserver); ++module_exit(exit_vserver); ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/inode.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/inode.c +--- linux-2.6.31.6/kernel/vserver/inode.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/inode.c 2009-10-09 20:55:03.000000000 +0200 +@@ -0,0 +1,433 @@ ++/* ++ * linux/kernel/vserver/inode.c ++ * ++ * Virtual Server: File System Support ++ * ++ * Copyright (C) 2004-2007 Herbert Pötzl ++ * ++ * V0.01 separated from vcontext V0.05 ++ * V0.02 moved to tag (instead of xid) ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++static int __vc_get_iattr(struct inode *in, uint32_t *tag, uint32_t *flags, uint32_t *mask) ++{ ++ struct proc_dir_entry *entry; ++ ++ if (!in || !in->i_sb) ++ return -ESRCH; ++ ++ *flags = IATTR_TAG ++ | (IS_IMMUTABLE(in) ? IATTR_IMMUTABLE : 0) ++ | (IS_IXUNLINK(in) ? IATTR_IXUNLINK : 0) ++ | (IS_BARRIER(in) ? IATTR_BARRIER : 0) ++ | (IS_COW(in) ? IATTR_COW : 0); ++ *mask = IATTR_IXUNLINK | IATTR_IMMUTABLE | IATTR_COW; ++ ++ if (S_ISDIR(in->i_mode)) ++ *mask |= IATTR_BARRIER; ++ ++ if (IS_TAGGED(in)) { ++ *tag = in->i_tag; ++ *mask |= IATTR_TAG; ++ } ++ ++ switch (in->i_sb->s_magic) { ++ case PROC_SUPER_MAGIC: ++ entry = PROC_I(in)->pde; ++ ++ /* check for specific inodes? */ ++ if (entry) ++ *mask |= IATTR_FLAGS; ++ if (entry) ++ *flags |= (entry->vx_flags & IATTR_FLAGS); ++ else ++ *flags |= (PROC_I(in)->vx_flags & IATTR_FLAGS); ++ break; ++ ++ case DEVPTS_SUPER_MAGIC: ++ *tag = in->i_tag; ++ *mask |= IATTR_TAG; ++ break; ++ ++ default: ++ break; ++ } ++ return 0; ++} ++ ++int vc_get_iattr(void __user *data) ++{ ++ struct path path; ++ struct vcmd_ctx_iattr_v1 vc_data = { .tag = -1 }; ++ int ret; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = user_lpath(vc_data.name, &path); ++ if (!ret) { ++ ret = __vc_get_iattr(path.dentry->d_inode, ++ &vc_data.tag, &vc_data.flags, &vc_data.mask); ++ path_put(&path); ++ } ++ if (ret) ++ return ret; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ ret = -EFAULT; ++ return ret; ++} ++ ++#ifdef CONFIG_COMPAT ++ ++int vc_get_iattr_x32(void __user *data) ++{ ++ struct path path; ++ struct vcmd_ctx_iattr_v1_x32 vc_data = { .tag = -1 }; ++ int ret; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = user_lpath(compat_ptr(vc_data.name_ptr), &path); ++ if (!ret) { ++ ret = __vc_get_iattr(path.dentry->d_inode, ++ &vc_data.tag, &vc_data.flags, &vc_data.mask); ++ path_put(&path); ++ } ++ if (ret) ++ return ret; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ ret = -EFAULT; ++ return ret; ++} ++ ++#endif /* CONFIG_COMPAT */ ++ ++ ++int vc_fget_iattr(uint32_t fd, void __user *data) ++{ ++ struct file *filp; ++ struct vcmd_ctx_fiattr_v0 vc_data = { .tag = -1 }; ++ int ret; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ filp = fget(fd); ++ if (!filp || !filp->f_dentry || !filp->f_dentry->d_inode) ++ return -EBADF; ++ ++ ret = __vc_get_iattr(filp->f_dentry->d_inode, ++ &vc_data.tag, &vc_data.flags, &vc_data.mask); ++ ++ fput(filp); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ ret = -EFAULT; ++ return ret; ++} ++ ++ ++static int __vc_set_iattr(struct dentry *de, uint32_t *tag, uint32_t *flags, uint32_t *mask) ++{ ++ struct inode *in = de->d_inode; ++ int error = 0, is_proc = 0, has_tag = 0; ++ struct iattr attr = { 0 }; ++ ++ if (!in || !in->i_sb) ++ return -ESRCH; ++ ++ is_proc = (in->i_sb->s_magic == PROC_SUPER_MAGIC); ++ if ((*mask & IATTR_FLAGS) && !is_proc) ++ return -EINVAL; ++ ++ has_tag = IS_TAGGED(in) || ++ (in->i_sb->s_magic == DEVPTS_SUPER_MAGIC); ++ if ((*mask & IATTR_TAG) && !has_tag) ++ return -EINVAL; ++ ++ mutex_lock(&in->i_mutex); ++ if (*mask & IATTR_TAG) { ++ attr.ia_tag = *tag; ++ attr.ia_valid |= ATTR_TAG; ++ } ++ ++ if (*mask & IATTR_FLAGS) { ++ struct proc_dir_entry *entry = PROC_I(in)->pde; ++ unsigned int iflags = PROC_I(in)->vx_flags; ++ ++ iflags = (iflags & ~(*mask & IATTR_FLAGS)) ++ | (*flags & IATTR_FLAGS); ++ PROC_I(in)->vx_flags = iflags; ++ if (entry) ++ entry->vx_flags = iflags; ++ } ++ ++ if (*mask & (IATTR_IMMUTABLE | IATTR_IXUNLINK | ++ IATTR_BARRIER | IATTR_COW)) { ++ int iflags = in->i_flags; ++ int vflags = in->i_vflags; ++ ++ if (*mask & IATTR_IMMUTABLE) { ++ if (*flags & IATTR_IMMUTABLE) ++ iflags |= S_IMMUTABLE; ++ else ++ iflags &= ~S_IMMUTABLE; ++ } ++ if (*mask & IATTR_IXUNLINK) { ++ if (*flags & IATTR_IXUNLINK) ++ iflags |= S_IXUNLINK; ++ else ++ iflags &= ~S_IXUNLINK; ++ } ++ if (S_ISDIR(in->i_mode) && (*mask & IATTR_BARRIER)) { ++ if (*flags & IATTR_BARRIER) ++ vflags |= V_BARRIER; ++ else ++ vflags &= ~V_BARRIER; ++ } ++ if (S_ISREG(in->i_mode) && (*mask & IATTR_COW)) { ++ if (*flags & IATTR_COW) ++ vflags |= V_COW; ++ else ++ vflags &= ~V_COW; ++ } ++ if (in->i_op && in->i_op->sync_flags) { ++ error = in->i_op->sync_flags(in, iflags, vflags); ++ if (error) ++ goto out; ++ } ++ } ++ ++ if (attr.ia_valid) { ++ if (in->i_op && in->i_op->setattr) ++ error = in->i_op->setattr(de, &attr); ++ else { ++ error = inode_change_ok(in, &attr); ++ if (!error) ++ error = inode_setattr(in, &attr); ++ } ++ } ++ ++out: ++ mutex_unlock(&in->i_mutex); ++ return error; ++} ++ ++int vc_set_iattr(void __user *data) ++{ ++ struct path path; ++ struct vcmd_ctx_iattr_v1 vc_data; ++ int ret; ++ ++ if (!capable(CAP_LINUX_IMMUTABLE)) ++ return -EPERM; ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = user_lpath(vc_data.name, &path); ++ if (!ret) { ++ ret = __vc_set_iattr(path.dentry, ++ &vc_data.tag, &vc_data.flags, &vc_data.mask); ++ path_put(&path); ++ } ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ ret = -EFAULT; ++ return ret; ++} ++ ++#ifdef CONFIG_COMPAT ++ ++int vc_set_iattr_x32(void __user *data) ++{ ++ struct path path; ++ struct vcmd_ctx_iattr_v1_x32 vc_data; ++ int ret; ++ ++ if (!capable(CAP_LINUX_IMMUTABLE)) ++ return -EPERM; ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = user_lpath(compat_ptr(vc_data.name_ptr), &path); ++ if (!ret) { ++ ret = __vc_set_iattr(path.dentry, ++ &vc_data.tag, &vc_data.flags, &vc_data.mask); ++ path_put(&path); ++ } ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ ret = -EFAULT; ++ return ret; ++} ++ ++#endif /* CONFIG_COMPAT */ ++ ++int vc_fset_iattr(uint32_t fd, void __user *data) ++{ ++ struct file *filp; ++ struct vcmd_ctx_fiattr_v0 vc_data; ++ int ret; ++ ++ if (!capable(CAP_LINUX_IMMUTABLE)) ++ return -EPERM; ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ filp = fget(fd); ++ if (!filp || !filp->f_dentry || !filp->f_dentry->d_inode) ++ return -EBADF; ++ ++ ret = __vc_set_iattr(filp->f_dentry, &vc_data.tag, ++ &vc_data.flags, &vc_data.mask); ++ ++ fput(filp); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return ret; ++} ++ ++ ++enum { Opt_notagcheck, Opt_tag, Opt_notag, Opt_tagid, Opt_err }; ++ ++static match_table_t tokens = { ++ {Opt_notagcheck, "notagcheck"}, ++#ifdef CONFIG_PROPAGATE ++ {Opt_notag, "notag"}, ++ {Opt_tag, "tag"}, ++ {Opt_tagid, "tagid=%u"}, ++#endif ++ {Opt_err, NULL} ++}; ++ ++ ++static void __dx_parse_remove(char *string, char *opt) ++{ ++ char *p = strstr(string, opt); ++ char *q = p; ++ ++ if (p) { ++ while (*q != '\0' && *q != ',') ++ q++; ++ while (*q) ++ *p++ = *q++; ++ while (*p) ++ *p++ = '\0'; ++ } ++} ++ ++int dx_parse_tag(char *string, tag_t *tag, int remove, int *mnt_flags, ++ unsigned long *flags) ++{ ++ int set = 0; ++ substring_t args[MAX_OPT_ARGS]; ++ int token, option = 0; ++ char *s, *p, *opts; ++ ++ if (!string) ++ return 0; ++ s = kstrdup(string, GFP_KERNEL | GFP_ATOMIC); ++ if (!s) ++ return 0; ++ ++ opts = s; ++ while ((p = strsep(&opts, ",")) != NULL) { ++ token = match_token(p, tokens, args); ++ ++ vxdprintk(VXD_CBIT(tag, 7), ++ "dx_parse_tag(»%s«): %d:#%d", ++ p, token, option); ++ ++ switch (token) { ++#ifdef CONFIG_PROPAGATE ++ case Opt_tag: ++ if (tag) ++ *tag = 0; ++ if (remove) ++ __dx_parse_remove(s, "tag"); ++ *mnt_flags |= MNT_TAGID; ++ set |= MNT_TAGID; ++ break; ++ case Opt_notag: ++ if (remove) ++ __dx_parse_remove(s, "notag"); ++ *mnt_flags |= MNT_NOTAG; ++ set |= MNT_NOTAG; ++ break; ++ case Opt_tagid: ++ if (tag && !match_int(args, &option)) ++ *tag = option; ++ if (remove) ++ __dx_parse_remove(s, "tagid"); ++ *mnt_flags |= MNT_TAGID; ++ set |= MNT_TAGID; ++ break; ++#endif ++ case Opt_notagcheck: ++ if (remove) ++ __dx_parse_remove(s, "notagcheck"); ++ *flags |= MS_NOTAGCHECK; ++ set |= MS_NOTAGCHECK; ++ break; ++ } ++ } ++ if (set) ++ strcpy(string, s); ++ kfree(s); ++ return set; ++} ++ ++#ifdef CONFIG_PROPAGATE ++ ++void __dx_propagate_tag(struct nameidata *nd, struct inode *inode) ++{ ++ tag_t new_tag = 0; ++ struct vfsmount *mnt; ++ int propagate; ++ ++ if (!nd) ++ return; ++ mnt = nd->path.mnt; ++ if (!mnt) ++ return; ++ ++ propagate = (mnt->mnt_flags & MNT_TAGID); ++ if (propagate) ++ new_tag = mnt->mnt_tag; ++ ++ vxdprintk(VXD_CBIT(tag, 7), ++ "dx_propagate_tag(%p[#%lu.%d]): %d,%d", ++ inode, inode->i_ino, inode->i_tag, ++ new_tag, (propagate) ? 1 : 0); ++ ++ if (propagate) ++ inode->i_tag = new_tag; ++} ++ ++#include ++ ++EXPORT_SYMBOL_GPL(__dx_propagate_tag); ++ ++#endif /* CONFIG_PROPAGATE */ ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/Kconfig linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/Kconfig +--- linux-2.6.31.6/kernel/vserver/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,251 @@ ++# ++# Linux VServer configuration ++# ++ ++menu "Linux VServer" ++ ++config VSERVER_AUTO_LBACK ++ bool "Automatically Assign Loopback IP" ++ default y ++ help ++ Automatically assign a guest specific loopback ++ IP and add it to the kernel network stack on ++ startup. ++ ++config VSERVER_AUTO_SINGLE ++ bool "Automatic Single IP Special Casing" ++ depends on EXPERIMENTAL ++ default y ++ help ++ This allows network contexts with a single IP to ++ automatically remap 0.0.0.0 bindings to that IP, ++ avoiding further network checks and improving ++ performance. ++ ++ (note: such guests do not allow to change the ip ++ on the fly and do not show loopback addresses) ++ ++config VSERVER_COWBL ++ bool "Enable COW Immutable Link Breaking" ++ default y ++ help ++ This enables the COW (Copy-On-Write) link break code. ++ It allows you to treat unified files like normal files ++ when writing to them (which will implicitely break the ++ link and create a copy of the unified file) ++ ++config VSERVER_VTIME ++ bool "Enable Virtualized Guest Time" ++ depends on EXPERIMENTAL ++ default n ++ help ++ This enables per guest time offsets to allow for ++ adjusting the system clock individually per guest. ++ this adds some overhead to the time functions and ++ therefore should not be enabled without good reason. ++ ++config VSERVER_DEVICE ++ bool "Enable Guest Device Mapping" ++ depends on EXPERIMENTAL ++ default n ++ help ++ This enables generic device remapping. ++ ++config VSERVER_PROC_SECURE ++ bool "Enable Proc Security" ++ depends on PROC_FS ++ default y ++ help ++ This configures ProcFS security to initially hide ++ non-process entries for all contexts except the main and ++ spectator context (i.e. for all guests), which is a secure ++ default. ++ ++ (note: on 1.2x the entries were visible by default) ++ ++config VSERVER_HARDCPU ++ bool "Enable Hard CPU Limits" ++ default y ++ help ++ Activate the Hard CPU Limits ++ ++ This will compile in code that allows the Token Bucket ++ Scheduler to put processes on hold when a context's ++ tokens are depleted (provided that its per-context ++ sched_hard flag is set). ++ ++ Processes belonging to that context will not be able ++ to consume CPU resources again until a per-context ++ configured minimum of tokens has been reached. ++ ++config VSERVER_IDLETIME ++ bool "Avoid idle CPUs by skipping Time" ++ depends on VSERVER_HARDCPU ++ default y ++ help ++ This option allows the scheduler to artificially ++ advance time (per cpu) when otherwise the idle ++ task would be scheduled, thus keeping the cpu ++ busy and sharing the available resources among ++ certain contexts. ++ ++config VSERVER_IDLELIMIT ++ bool "Limit the IDLE task" ++ depends on VSERVER_HARDCPU ++ default n ++ help ++ Limit the idle slices, so the the next context ++ will be scheduled as soon as possible. ++ ++ This might improve interactivity and latency, but ++ will also marginally increase scheduling overhead. ++ ++choice ++ prompt "Persistent Inode Tagging" ++ default TAGGING_ID24 ++ help ++ This adds persistent context information to filesystems ++ mounted with the tagxid option. Tagging is a requirement ++ for per-context disk limits and per-context quota. ++ ++ ++config TAGGING_NONE ++ bool "Disabled" ++ help ++ do not store per-context information in inodes. ++ ++config TAGGING_UID16 ++ bool "UID16/GID32" ++ help ++ reduces UID to 16 bit, but leaves GID at 32 bit. ++ ++config TAGGING_GID16 ++ bool "UID32/GID16" ++ help ++ reduces GID to 16 bit, but leaves UID at 32 bit. ++ ++config TAGGING_ID24 ++ bool "UID24/GID24" ++ help ++ uses the upper 8bit from UID and GID for XID tagging ++ which leaves 24bit for UID/GID each, which should be ++ more than sufficient for normal use. ++ ++config TAGGING_INTERN ++ bool "UID32/GID32" ++ help ++ this uses otherwise reserved inode fields in the on ++ disk representation, which limits the use to a few ++ filesystems (currently ext2 and ext3) ++ ++endchoice ++ ++config TAG_NFSD ++ bool "Tag NFSD User Auth and Files" ++ default n ++ help ++ Enable this if you do want the in-kernel NFS ++ Server to use the tagging specified above. ++ (will require patched clients too) ++ ++config VSERVER_PRIVACY ++ bool "Honor Privacy Aspects of Guests" ++ default n ++ help ++ When enabled, most context checks will disallow ++ access to structures assigned to a specific context, ++ like ptys or loop devices. ++ ++config VSERVER_CONTEXTS ++ int "Maximum number of Contexts (1-65533)" if EMBEDDED ++ range 1 65533 ++ default "768" if 64BIT ++ default "256" ++ help ++ This setting will optimize certain data structures ++ and memory allocations according to the expected ++ maximum. ++ ++ note: this is not a strict upper limit. ++ ++config VSERVER_WARN ++ bool "VServer Warnings" ++ default y ++ help ++ This enables various runtime warnings, which will ++ notify about potential manipulation attempts or ++ resource shortage. It is generally considered to ++ be a good idea to have that enabled. ++ ++config VSERVER_DEBUG ++ bool "VServer Debugging Code" ++ default n ++ help ++ Set this to yes if you want to be able to activate ++ debugging output at runtime. It adds a very small ++ overhead to all vserver related functions and ++ increases the kernel size by about 20k. ++ ++config VSERVER_HISTORY ++ bool "VServer History Tracing" ++ depends on VSERVER_DEBUG ++ default n ++ help ++ Set this to yes if you want to record the history of ++ linux-vserver activities, so they can be replayed in ++ the event of a kernel panic or oops. ++ ++config VSERVER_HISTORY_SIZE ++ int "Per-CPU History Size (32-65536)" ++ depends on VSERVER_HISTORY ++ range 32 65536 ++ default 64 ++ help ++ This allows you to specify the number of entries in ++ the per-CPU history buffer. ++ ++config VSERVER_MONITOR ++ bool "VServer Scheduling Monitor" ++ depends on VSERVER_DISABLED ++ default n ++ help ++ Set this to yes if you want to record the scheduling ++ decisions, so that they can be relayed to userspace ++ for detailed analysis. ++ ++config VSERVER_MONITOR_SIZE ++ int "Per-CPU Monitor Queue Size (32-65536)" ++ depends on VSERVER_MONITOR ++ range 32 65536 ++ default 1024 ++ help ++ This allows you to specify the number of entries in ++ the per-CPU scheduling monitor buffer. ++ ++config VSERVER_MONITOR_SYNC ++ int "Per-CPU Monitor Sync Interval (0-65536)" ++ depends on VSERVER_MONITOR ++ range 0 65536 ++ default 256 ++ help ++ This allows you to specify the interval in ticks ++ when a time sync entry is inserted. ++ ++endmenu ++ ++ ++config VSERVER ++ bool ++ default y ++ select NAMESPACES ++ select UTS_NS ++ select IPC_NS ++ select USER_NS ++ select SYSVIPC ++ ++config VSERVER_SECURITY ++ bool ++ depends on SECURITY ++ default y ++ select SECURITY_CAPABILITIES ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/limit.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/limit.c +--- linux-2.6.31.6/kernel/vserver/limit.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/limit.c 2009-11-05 04:22:22.000000000 +0100 +@@ -0,0 +1,333 @@ ++/* ++ * linux/kernel/vserver/limit.c ++ * ++ * Virtual Server: Context Limits ++ * ++ * Copyright (C) 2004-2007 Herbert Pötzl ++ * ++ * V0.01 broken out from vcontext V0.05 ++ * V0.02 changed vcmds to vxi arg ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++const char *vlimit_name[NUM_LIMITS] = { ++ [RLIMIT_CPU] = "CPU", ++ [RLIMIT_RSS] = "RSS", ++ [RLIMIT_NPROC] = "NPROC", ++ [RLIMIT_NOFILE] = "NOFILE", ++ [RLIMIT_MEMLOCK] = "VML", ++ [RLIMIT_AS] = "VM", ++ [RLIMIT_LOCKS] = "LOCKS", ++ [RLIMIT_SIGPENDING] = "SIGP", ++ [RLIMIT_MSGQUEUE] = "MSGQ", ++ ++ [VLIMIT_NSOCK] = "NSOCK", ++ [VLIMIT_OPENFD] = "OPENFD", ++ [VLIMIT_ANON] = "ANON", ++ [VLIMIT_SHMEM] = "SHMEM", ++ [VLIMIT_DENTRY] = "DENTRY", ++}; ++ ++EXPORT_SYMBOL_GPL(vlimit_name); ++ ++#define MASK_ENTRY(x) (1 << (x)) ++ ++const struct vcmd_ctx_rlimit_mask_v0 vlimit_mask = { ++ /* minimum */ ++ 0 ++ , /* softlimit */ ++ MASK_ENTRY( RLIMIT_RSS ) | ++ MASK_ENTRY( VLIMIT_ANON ) | ++ 0 ++ , /* maximum */ ++ MASK_ENTRY( RLIMIT_RSS ) | ++ MASK_ENTRY( RLIMIT_NPROC ) | ++ MASK_ENTRY( RLIMIT_NOFILE ) | ++ MASK_ENTRY( RLIMIT_MEMLOCK ) | ++ MASK_ENTRY( RLIMIT_AS ) | ++ MASK_ENTRY( RLIMIT_LOCKS ) | ++ MASK_ENTRY( RLIMIT_MSGQUEUE ) | ++ ++ MASK_ENTRY( VLIMIT_NSOCK ) | ++ MASK_ENTRY( VLIMIT_OPENFD ) | ++ MASK_ENTRY( VLIMIT_ANON ) | ++ MASK_ENTRY( VLIMIT_SHMEM ) | ++ MASK_ENTRY( VLIMIT_DENTRY ) | ++ 0 ++}; ++ /* accounting only */ ++uint32_t account_mask = ++ MASK_ENTRY( VLIMIT_SEMARY ) | ++ MASK_ENTRY( VLIMIT_NSEMS ) | ++ MASK_ENTRY( VLIMIT_MAPPED ) | ++ 0; ++ ++ ++static int is_valid_vlimit(int id) ++{ ++ uint32_t mask = vlimit_mask.minimum | ++ vlimit_mask.softlimit | vlimit_mask.maximum; ++ return mask & (1 << id); ++} ++ ++static int is_accounted_vlimit(int id) ++{ ++ if (is_valid_vlimit(id)) ++ return 1; ++ return account_mask & (1 << id); ++} ++ ++ ++static inline uint64_t vc_get_soft(struct vx_info *vxi, int id) ++{ ++ rlim_t limit = __rlim_soft(&vxi->limit, id); ++ return VX_VLIM(limit); ++} ++ ++static inline uint64_t vc_get_hard(struct vx_info *vxi, int id) ++{ ++ rlim_t limit = __rlim_hard(&vxi->limit, id); ++ return VX_VLIM(limit); ++} ++ ++static int do_get_rlimit(struct vx_info *vxi, uint32_t id, ++ uint64_t *minimum, uint64_t *softlimit, uint64_t *maximum) ++{ ++ if (!is_valid_vlimit(id)) ++ return -EINVAL; ++ ++ if (minimum) ++ *minimum = CRLIM_UNSET; ++ if (softlimit) ++ *softlimit = vc_get_soft(vxi, id); ++ if (maximum) ++ *maximum = vc_get_hard(vxi, id); ++ return 0; ++} ++ ++int vc_get_rlimit(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_rlimit_v0 vc_data; ++ int ret; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = do_get_rlimit(vxi, vc_data.id, ++ &vc_data.minimum, &vc_data.softlimit, &vc_data.maximum); ++ if (ret) ++ return ret; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++static int do_set_rlimit(struct vx_info *vxi, uint32_t id, ++ uint64_t minimum, uint64_t softlimit, uint64_t maximum) ++{ ++ if (!is_valid_vlimit(id)) ++ return -EINVAL; ++ ++ if (maximum != CRLIM_KEEP) ++ __rlim_hard(&vxi->limit, id) = VX_RLIM(maximum); ++ if (softlimit != CRLIM_KEEP) ++ __rlim_soft(&vxi->limit, id) = VX_RLIM(softlimit); ++ ++ /* clamp soft limit */ ++ if (__rlim_soft(&vxi->limit, id) > __rlim_hard(&vxi->limit, id)) ++ __rlim_soft(&vxi->limit, id) = __rlim_hard(&vxi->limit, id); ++ ++ return 0; ++} ++ ++int vc_set_rlimit(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_rlimit_v0 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_set_rlimit(vxi, vc_data.id, ++ vc_data.minimum, vc_data.softlimit, vc_data.maximum); ++} ++ ++#ifdef CONFIG_IA32_EMULATION ++ ++int vc_set_rlimit_x32(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_rlimit_v0_x32 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_set_rlimit(vxi, vc_data.id, ++ vc_data.minimum, vc_data.softlimit, vc_data.maximum); ++} ++ ++int vc_get_rlimit_x32(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_rlimit_v0_x32 vc_data; ++ int ret; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = do_get_rlimit(vxi, vc_data.id, ++ &vc_data.minimum, &vc_data.softlimit, &vc_data.maximum); ++ if (ret) ++ return ret; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++#endif /* CONFIG_IA32_EMULATION */ ++ ++ ++int vc_get_rlimit_mask(uint32_t id, void __user *data) ++{ ++ if (copy_to_user(data, &vlimit_mask, sizeof(vlimit_mask))) ++ return -EFAULT; ++ return 0; ++} ++ ++ ++static inline void vx_reset_hits(struct _vx_limit *limit) ++{ ++ int lim; ++ ++ for (lim = 0; lim < NUM_LIMITS; lim++) { ++ atomic_set(&__rlim_lhit(limit, lim), 0); ++ } ++} ++ ++int vc_reset_hits(struct vx_info *vxi, void __user *data) ++{ ++ vx_reset_hits(&vxi->limit); ++ return 0; ++} ++ ++static inline void vx_reset_minmax(struct _vx_limit *limit) ++{ ++ rlim_t value; ++ int lim; ++ ++ for (lim = 0; lim < NUM_LIMITS; lim++) { ++ value = __rlim_get(limit, lim); ++ __rlim_rmax(limit, lim) = value; ++ __rlim_rmin(limit, lim) = value; ++ } ++} ++ ++int vc_reset_minmax(struct vx_info *vxi, void __user *data) ++{ ++ vx_reset_minmax(&vxi->limit); ++ return 0; ++} ++ ++ ++int vc_rlimit_stat(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_rlimit_stat_v0 vc_data; ++ struct _vx_limit *limit = &vxi->limit; ++ int id; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ id = vc_data.id; ++ if (!is_accounted_vlimit(id)) ++ return -EINVAL; ++ ++ vx_limit_fixup(limit, id); ++ vc_data.hits = atomic_read(&__rlim_lhit(limit, id)); ++ vc_data.value = __rlim_get(limit, id); ++ vc_data.minimum = __rlim_rmin(limit, id); ++ vc_data.maximum = __rlim_rmax(limit, id); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++ ++void vx_vsi_meminfo(struct sysinfo *val) ++{ ++ struct vx_info *vxi = current_vx_info(); ++ unsigned long totalram, freeram; ++ rlim_t v; ++ ++ /* we blindly accept the max */ ++ v = __rlim_soft(&vxi->limit, RLIMIT_RSS); ++ totalram = (v != RLIM_INFINITY) ? v : val->totalram; ++ ++ /* total minus used equals free */ ++ v = __vx_cres_array_fixup(&vxi->limit, VLA_RSS); ++ freeram = (v < totalram) ? totalram - v : 0; ++ ++ val->totalram = totalram; ++ val->freeram = freeram; ++ val->bufferram = 0; ++ val->totalhigh = 0; ++ val->freehigh = 0; ++ return; ++} ++ ++void vx_vsi_swapinfo(struct sysinfo *val) ++{ ++ struct vx_info *vxi = current_vx_info(); ++ unsigned long totalswap, freeswap; ++ rlim_t v, w; ++ ++ v = __rlim_soft(&vxi->limit, RLIMIT_RSS); ++ if (v == RLIM_INFINITY) { ++ val->freeswap = val->totalswap; ++ return; ++ } ++ ++ /* we blindly accept the max */ ++ w = __rlim_hard(&vxi->limit, RLIMIT_RSS); ++ totalswap = (w != RLIM_INFINITY) ? (w - v) : val->totalswap; ++ ++ /* currently 'used' swap */ ++ w = __vx_cres_array_fixup(&vxi->limit, VLA_RSS); ++ w -= (w > v) ? v : w; ++ ++ /* total minus used equals free */ ++ freeswap = (w < totalswap) ? totalswap - w : 0; ++ ++ val->totalswap = totalswap; ++ val->freeswap = freeswap; ++ return; ++} ++ ++ ++unsigned long vx_badness(struct task_struct *task, struct mm_struct *mm) ++{ ++ struct vx_info *vxi = mm->mm_vx_info; ++ unsigned long points; ++ rlim_t v, w; ++ ++ if (!vxi) ++ return 0; ++ ++ points = vxi->vx_badness_bias; ++ ++ v = __vx_cres_array_fixup(&vxi->limit, VLA_RSS); ++ w = __rlim_soft(&vxi->limit, RLIMIT_RSS); ++ points += (v > w) ? (v - w) : 0; ++ ++ return points; ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/limit_init.h linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/limit_init.h +--- linux-2.6.31.6/kernel/vserver/limit_init.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/limit_init.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,31 @@ ++ ++ ++static inline void vx_info_init_limit(struct _vx_limit *limit) ++{ ++ int lim; ++ ++ for (lim = 0; lim < NUM_LIMITS; lim++) { ++ __rlim_soft(limit, lim) = RLIM_INFINITY; ++ __rlim_hard(limit, lim) = RLIM_INFINITY; ++ __rlim_set(limit, lim, 0); ++ atomic_set(&__rlim_lhit(limit, lim), 0); ++ __rlim_rmin(limit, lim) = 0; ++ __rlim_rmax(limit, lim) = 0; ++ } ++} ++ ++static inline void vx_info_exit_limit(struct _vx_limit *limit) ++{ ++ rlim_t value; ++ int lim; ++ ++ for (lim = 0; lim < NUM_LIMITS; lim++) { ++ if ((1 << lim) & VLIM_NOCHECK) ++ continue; ++ value = __rlim_get(limit, lim); ++ vxwprintk_xid(value, ++ "!!! limit: %p[%s,%d] = %ld on exit.", ++ limit, vlimit_name[lim], lim, (long)value); ++ } ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/limit_proc.h linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/limit_proc.h +--- linux-2.6.31.6/kernel/vserver/limit_proc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/limit_proc.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,57 @@ ++#ifndef _VX_LIMIT_PROC_H ++#define _VX_LIMIT_PROC_H ++ ++#include ++ ++ ++#define VX_LIMIT_FMT ":\t%8ld\t%8ld/%8ld\t%8lld/%8lld\t%6d\n" ++#define VX_LIMIT_TOP \ ++ "Limit\t current\t min/max\t\t soft/hard\t\thits\n" ++ ++#define VX_LIMIT_ARG(r) \ ++ (unsigned long)__rlim_get(limit, r), \ ++ (unsigned long)__rlim_rmin(limit, r), \ ++ (unsigned long)__rlim_rmax(limit, r), \ ++ VX_VLIM(__rlim_soft(limit, r)), \ ++ VX_VLIM(__rlim_hard(limit, r)), \ ++ atomic_read(&__rlim_lhit(limit, r)) ++ ++static inline int vx_info_proc_limit(struct _vx_limit *limit, char *buffer) ++{ ++ vx_limit_fixup(limit, -1); ++ return sprintf(buffer, VX_LIMIT_TOP ++ "PROC" VX_LIMIT_FMT ++ "VM" VX_LIMIT_FMT ++ "VML" VX_LIMIT_FMT ++ "RSS" VX_LIMIT_FMT ++ "ANON" VX_LIMIT_FMT ++ "RMAP" VX_LIMIT_FMT ++ "FILES" VX_LIMIT_FMT ++ "OFD" VX_LIMIT_FMT ++ "LOCKS" VX_LIMIT_FMT ++ "SOCK" VX_LIMIT_FMT ++ "MSGQ" VX_LIMIT_FMT ++ "SHM" VX_LIMIT_FMT ++ "SEMA" VX_LIMIT_FMT ++ "SEMS" VX_LIMIT_FMT ++ "DENT" VX_LIMIT_FMT, ++ VX_LIMIT_ARG(RLIMIT_NPROC), ++ VX_LIMIT_ARG(RLIMIT_AS), ++ VX_LIMIT_ARG(RLIMIT_MEMLOCK), ++ VX_LIMIT_ARG(RLIMIT_RSS), ++ VX_LIMIT_ARG(VLIMIT_ANON), ++ VX_LIMIT_ARG(VLIMIT_MAPPED), ++ VX_LIMIT_ARG(RLIMIT_NOFILE), ++ VX_LIMIT_ARG(VLIMIT_OPENFD), ++ VX_LIMIT_ARG(RLIMIT_LOCKS), ++ VX_LIMIT_ARG(VLIMIT_NSOCK), ++ VX_LIMIT_ARG(RLIMIT_MSGQUEUE), ++ VX_LIMIT_ARG(VLIMIT_SHMEM), ++ VX_LIMIT_ARG(VLIMIT_SEMARY), ++ VX_LIMIT_ARG(VLIMIT_NSEMS), ++ VX_LIMIT_ARG(VLIMIT_DENTRY)); ++} ++ ++#endif /* _VX_LIMIT_PROC_H */ ++ ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/Makefile linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/Makefile +--- linux-2.6.31.6/kernel/vserver/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/Makefile 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,18 @@ ++# ++# Makefile for the Linux vserver routines. ++# ++ ++ ++obj-y += vserver.o ++ ++vserver-y := switch.o context.o space.o sched.o network.o inode.o \ ++ limit.o cvirt.o cacct.o signal.o helper.o init.o \ ++ dlimit.o tag.o ++ ++vserver-$(CONFIG_INET) += inet.o ++vserver-$(CONFIG_PROC_FS) += proc.o ++vserver-$(CONFIG_VSERVER_DEBUG) += sysctl.o debug.o ++vserver-$(CONFIG_VSERVER_HISTORY) += history.o ++vserver-$(CONFIG_VSERVER_MONITOR) += monitor.o ++vserver-$(CONFIG_VSERVER_DEVICE) += device.o ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/monitor.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/monitor.c +--- linux-2.6.31.6/kernel/vserver/monitor.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/monitor.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,138 @@ ++/* ++ * kernel/vserver/monitor.c ++ * ++ * Virtual Context Scheduler Monitor ++ * ++ * Copyright (C) 2006-2007 Herbert Pötzl ++ * ++ * V0.01 basic design ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++ ++#ifdef CONFIG_VSERVER_MONITOR ++#define VXM_SIZE CONFIG_VSERVER_MONITOR_SIZE ++#else ++#define VXM_SIZE 64 ++#endif ++ ++struct _vx_monitor { ++ unsigned int counter; ++ ++ struct _vx_mon_entry entry[VXM_SIZE+1]; ++}; ++ ++ ++DEFINE_PER_CPU(struct _vx_monitor, vx_monitor_buffer); ++ ++unsigned volatile int vxm_active = 1; ++ ++static atomic_t sequence = ATOMIC_INIT(0); ++ ++ ++/* vxm_advance() ++ ++ * requires disabled preemption */ ++ ++struct _vx_mon_entry *vxm_advance(int cpu) ++{ ++ struct _vx_monitor *mon = &per_cpu(vx_monitor_buffer, cpu); ++ struct _vx_mon_entry *entry; ++ unsigned int index; ++ ++ index = vxm_active ? (mon->counter++ % VXM_SIZE) : VXM_SIZE; ++ entry = &mon->entry[index]; ++ ++ entry->ev.seq = atomic_inc_return(&sequence); ++ entry->ev.jif = jiffies; ++ return entry; ++} ++ ++EXPORT_SYMBOL_GPL(vxm_advance); ++ ++ ++int do_read_monitor(struct __user _vx_mon_entry *data, ++ int cpu, uint32_t *index, uint32_t *count) ++{ ++ int pos, ret = 0; ++ struct _vx_monitor *mon = &per_cpu(vx_monitor_buffer, cpu); ++ int end = mon->counter; ++ int start = end - VXM_SIZE + 2; ++ int idx = *index; ++ ++ /* special case: get current pos */ ++ if (!*count) { ++ *index = end; ++ return 0; ++ } ++ ++ /* have we lost some data? */ ++ if (idx < start) ++ idx = start; ++ ++ for (pos = 0; (pos < *count) && (idx < end); pos++, idx++) { ++ struct _vx_mon_entry *entry = ++ &mon->entry[idx % VXM_SIZE]; ++ ++ /* send entry to userspace */ ++ ret = copy_to_user(&data[pos], entry, sizeof(*entry)); ++ if (ret) ++ break; ++ } ++ /* save new index and count */ ++ *index = idx; ++ *count = pos; ++ return ret ? ret : (*index < end); ++} ++ ++int vc_read_monitor(uint32_t id, void __user *data) ++{ ++ struct vcmd_read_monitor_v0 vc_data; ++ int ret; ++ ++ if (id >= NR_CPUS) ++ return -EINVAL; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = do_read_monitor((struct __user _vx_mon_entry *)vc_data.data, ++ id, &vc_data.index, &vc_data.count); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return ret; ++} ++ ++#ifdef CONFIG_COMPAT ++ ++int vc_read_monitor_x32(uint32_t id, void __user *data) ++{ ++ struct vcmd_read_monitor_v0_x32 vc_data; ++ int ret; ++ ++ if (id >= NR_CPUS) ++ return -EINVAL; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ ret = do_read_monitor((struct __user _vx_mon_entry *) ++ compat_ptr(vc_data.data_ptr), ++ id, &vc_data.index, &vc_data.count); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return ret; ++} ++ ++#endif /* CONFIG_COMPAT */ ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/network.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/network.c +--- linux-2.6.31.6/kernel/vserver/network.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/network.c 2009-11-05 03:49:07.000000000 +0100 +@@ -0,0 +1,864 @@ ++/* ++ * linux/kernel/vserver/network.c ++ * ++ * Virtual Server: Network Support ++ * ++ * Copyright (C) 2003-2007 Herbert Pötzl ++ * ++ * V0.01 broken out from vcontext V0.05 ++ * V0.02 cleaned up implementation ++ * V0.03 added equiv nx commands ++ * V0.04 switch to RCU based hash ++ * V0.05 and back to locking again ++ * V0.06 changed vcmds to nxi arg ++ * V0.07 have __create claim() the nxi ++ * ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++ ++atomic_t nx_global_ctotal = ATOMIC_INIT(0); ++atomic_t nx_global_cactive = ATOMIC_INIT(0); ++ ++static struct kmem_cache *nx_addr_v4_cachep = NULL; ++static struct kmem_cache *nx_addr_v6_cachep = NULL; ++ ++ ++static int __init init_network(void) ++{ ++ nx_addr_v4_cachep = kmem_cache_create("nx_v4_addr_cache", ++ sizeof(struct nx_addr_v4), 0, ++ SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); ++ nx_addr_v6_cachep = kmem_cache_create("nx_v6_addr_cache", ++ sizeof(struct nx_addr_v6), 0, ++ SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); ++ return 0; ++} ++ ++ ++/* __alloc_nx_addr_v4() */ ++ ++static inline struct nx_addr_v4 *__alloc_nx_addr_v4(void) ++{ ++ struct nx_addr_v4 *nxa = kmem_cache_alloc( ++ nx_addr_v4_cachep, GFP_KERNEL); ++ ++ if (!IS_ERR(nxa)) ++ memset(nxa, 0, sizeof(*nxa)); ++ return nxa; ++} ++ ++/* __dealloc_nx_addr_v4() */ ++ ++static inline void __dealloc_nx_addr_v4(struct nx_addr_v4 *nxa) ++{ ++ kmem_cache_free(nx_addr_v4_cachep, nxa); ++} ++ ++/* __dealloc_nx_addr_v4_all() */ ++ ++static inline void __dealloc_nx_addr_v4_all(struct nx_addr_v4 *nxa) ++{ ++ while (nxa) { ++ struct nx_addr_v4 *next = nxa->next; ++ ++ __dealloc_nx_addr_v4(nxa); ++ nxa = next; ++ } ++} ++ ++ ++#ifdef CONFIG_IPV6 ++ ++/* __alloc_nx_addr_v6() */ ++ ++static inline struct nx_addr_v6 *__alloc_nx_addr_v6(void) ++{ ++ struct nx_addr_v6 *nxa = kmem_cache_alloc( ++ nx_addr_v6_cachep, GFP_KERNEL); ++ ++ if (!IS_ERR(nxa)) ++ memset(nxa, 0, sizeof(*nxa)); ++ return nxa; ++} ++ ++/* __dealloc_nx_addr_v6() */ ++ ++static inline void __dealloc_nx_addr_v6(struct nx_addr_v6 *nxa) ++{ ++ kmem_cache_free(nx_addr_v6_cachep, nxa); ++} ++ ++/* __dealloc_nx_addr_v6_all() */ ++ ++static inline void __dealloc_nx_addr_v6_all(struct nx_addr_v6 *nxa) ++{ ++ while (nxa) { ++ struct nx_addr_v6 *next = nxa->next; ++ ++ __dealloc_nx_addr_v6(nxa); ++ nxa = next; ++ } ++} ++ ++#endif /* CONFIG_IPV6 */ ++ ++/* __alloc_nx_info() ++ ++ * allocate an initialized nx_info struct ++ * doesn't make it visible (hash) */ ++ ++static struct nx_info *__alloc_nx_info(nid_t nid) ++{ ++ struct nx_info *new = NULL; ++ ++ vxdprintk(VXD_CBIT(nid, 1), "alloc_nx_info(%d)*", nid); ++ ++ /* would this benefit from a slab cache? */ ++ new = kmalloc(sizeof(struct nx_info), GFP_KERNEL); ++ if (!new) ++ return 0; ++ ++ memset(new, 0, sizeof(struct nx_info)); ++ new->nx_id = nid; ++ INIT_HLIST_NODE(&new->nx_hlist); ++ atomic_set(&new->nx_usecnt, 0); ++ atomic_set(&new->nx_tasks, 0); ++ new->nx_state = 0; ++ ++ new->nx_flags = NXF_INIT_SET; ++ ++ /* rest of init goes here */ ++ ++ new->v4_lback.s_addr = htonl(INADDR_LOOPBACK); ++ new->v4_bcast.s_addr = htonl(INADDR_BROADCAST); ++ ++ vxdprintk(VXD_CBIT(nid, 0), ++ "alloc_nx_info(%d) = %p", nid, new); ++ atomic_inc(&nx_global_ctotal); ++ return new; ++} ++ ++/* __dealloc_nx_info() ++ ++ * final disposal of nx_info */ ++ ++static void __dealloc_nx_info(struct nx_info *nxi) ++{ ++ vxdprintk(VXD_CBIT(nid, 0), ++ "dealloc_nx_info(%p)", nxi); ++ ++ nxi->nx_hlist.next = LIST_POISON1; ++ nxi->nx_id = -1; ++ ++ BUG_ON(atomic_read(&nxi->nx_usecnt)); ++ BUG_ON(atomic_read(&nxi->nx_tasks)); ++ ++ __dealloc_nx_addr_v4_all(nxi->v4.next); ++ ++ nxi->nx_state |= NXS_RELEASED; ++ kfree(nxi); ++ atomic_dec(&nx_global_ctotal); ++} ++ ++static void __shutdown_nx_info(struct nx_info *nxi) ++{ ++ nxi->nx_state |= NXS_SHUTDOWN; ++ vs_net_change(nxi, VSC_NETDOWN); ++} ++ ++/* exported stuff */ ++ ++void free_nx_info(struct nx_info *nxi) ++{ ++ /* context shutdown is mandatory */ ++ BUG_ON(nxi->nx_state != NXS_SHUTDOWN); ++ ++ /* context must not be hashed */ ++ BUG_ON(nxi->nx_state & NXS_HASHED); ++ ++ BUG_ON(atomic_read(&nxi->nx_usecnt)); ++ BUG_ON(atomic_read(&nxi->nx_tasks)); ++ ++ __dealloc_nx_info(nxi); ++} ++ ++ ++void __nx_set_lback(struct nx_info *nxi) ++{ ++ int nid = nxi->nx_id; ++ __be32 lback = htonl(INADDR_LOOPBACK ^ ((nid & 0xFFFF) << 8)); ++ ++ nxi->v4_lback.s_addr = lback; ++} ++ ++extern int __nx_inet_add_lback(__be32 addr); ++extern int __nx_inet_del_lback(__be32 addr); ++ ++ ++/* hash table for nx_info hash */ ++ ++#define NX_HASH_SIZE 13 ++ ++struct hlist_head nx_info_hash[NX_HASH_SIZE]; ++ ++static spinlock_t nx_info_hash_lock = SPIN_LOCK_UNLOCKED; ++ ++ ++static inline unsigned int __hashval(nid_t nid) ++{ ++ return (nid % NX_HASH_SIZE); ++} ++ ++ ++ ++/* __hash_nx_info() ++ ++ * add the nxi to the global hash table ++ * requires the hash_lock to be held */ ++ ++static inline void __hash_nx_info(struct nx_info *nxi) ++{ ++ struct hlist_head *head; ++ ++ vxd_assert_lock(&nx_info_hash_lock); ++ vxdprintk(VXD_CBIT(nid, 4), ++ "__hash_nx_info: %p[#%d]", nxi, nxi->nx_id); ++ ++ /* context must not be hashed */ ++ BUG_ON(nx_info_state(nxi, NXS_HASHED)); ++ ++ nxi->nx_state |= NXS_HASHED; ++ head = &nx_info_hash[__hashval(nxi->nx_id)]; ++ hlist_add_head(&nxi->nx_hlist, head); ++ atomic_inc(&nx_global_cactive); ++} ++ ++/* __unhash_nx_info() ++ ++ * remove the nxi from the global hash table ++ * requires the hash_lock to be held */ ++ ++static inline void __unhash_nx_info(struct nx_info *nxi) ++{ ++ vxd_assert_lock(&nx_info_hash_lock); ++ vxdprintk(VXD_CBIT(nid, 4), ++ "__unhash_nx_info: %p[#%d.%d.%d]", nxi, nxi->nx_id, ++ atomic_read(&nxi->nx_usecnt), atomic_read(&nxi->nx_tasks)); ++ ++ /* context must be hashed */ ++ BUG_ON(!nx_info_state(nxi, NXS_HASHED)); ++ /* but without tasks */ ++ BUG_ON(atomic_read(&nxi->nx_tasks)); ++ ++ nxi->nx_state &= ~NXS_HASHED; ++ hlist_del(&nxi->nx_hlist); ++ atomic_dec(&nx_global_cactive); ++} ++ ++ ++/* __lookup_nx_info() ++ ++ * requires the hash_lock to be held ++ * doesn't increment the nx_refcnt */ ++ ++static inline struct nx_info *__lookup_nx_info(nid_t nid) ++{ ++ struct hlist_head *head = &nx_info_hash[__hashval(nid)]; ++ struct hlist_node *pos; ++ struct nx_info *nxi; ++ ++ vxd_assert_lock(&nx_info_hash_lock); ++ hlist_for_each(pos, head) { ++ nxi = hlist_entry(pos, struct nx_info, nx_hlist); ++ ++ if (nxi->nx_id == nid) ++ goto found; ++ } ++ nxi = NULL; ++found: ++ vxdprintk(VXD_CBIT(nid, 0), ++ "__lookup_nx_info(#%u): %p[#%u]", ++ nid, nxi, nxi ? nxi->nx_id : 0); ++ return nxi; ++} ++ ++ ++/* __create_nx_info() ++ ++ * create the requested context ++ * get(), claim() and hash it */ ++ ++static struct nx_info *__create_nx_info(int id) ++{ ++ struct nx_info *new, *nxi = NULL; ++ ++ vxdprintk(VXD_CBIT(nid, 1), "create_nx_info(%d)*", id); ++ ++ if (!(new = __alloc_nx_info(id))) ++ return ERR_PTR(-ENOMEM); ++ ++ /* required to make dynamic xids unique */ ++ spin_lock(&nx_info_hash_lock); ++ ++ /* static context requested */ ++ if ((nxi = __lookup_nx_info(id))) { ++ vxdprintk(VXD_CBIT(nid, 0), ++ "create_nx_info(%d) = %p (already there)", id, nxi); ++ if (nx_info_flags(nxi, NXF_STATE_SETUP, 0)) ++ nxi = ERR_PTR(-EBUSY); ++ else ++ nxi = ERR_PTR(-EEXIST); ++ goto out_unlock; ++ } ++ /* new context */ ++ vxdprintk(VXD_CBIT(nid, 0), ++ "create_nx_info(%d) = %p (new)", id, new); ++ claim_nx_info(new, NULL); ++ __nx_set_lback(new); ++ __hash_nx_info(get_nx_info(new)); ++ nxi = new, new = NULL; ++ ++out_unlock: ++ spin_unlock(&nx_info_hash_lock); ++ if (new) ++ __dealloc_nx_info(new); ++ return nxi; ++} ++ ++ ++ ++/* exported stuff */ ++ ++ ++void unhash_nx_info(struct nx_info *nxi) ++{ ++ __shutdown_nx_info(nxi); ++ spin_lock(&nx_info_hash_lock); ++ __unhash_nx_info(nxi); ++ spin_unlock(&nx_info_hash_lock); ++} ++ ++/* lookup_nx_info() ++ ++ * search for a nx_info and get() it ++ * negative id means current */ ++ ++struct nx_info *lookup_nx_info(int id) ++{ ++ struct nx_info *nxi = NULL; ++ ++ if (id < 0) { ++ nxi = get_nx_info(current_nx_info()); ++ } else if (id > 1) { ++ spin_lock(&nx_info_hash_lock); ++ nxi = get_nx_info(__lookup_nx_info(id)); ++ spin_unlock(&nx_info_hash_lock); ++ } ++ return nxi; ++} ++ ++/* nid_is_hashed() ++ ++ * verify that nid is still hashed */ ++ ++int nid_is_hashed(nid_t nid) ++{ ++ int hashed; ++ ++ spin_lock(&nx_info_hash_lock); ++ hashed = (__lookup_nx_info(nid) != NULL); ++ spin_unlock(&nx_info_hash_lock); ++ return hashed; ++} ++ ++ ++#ifdef CONFIG_PROC_FS ++ ++/* get_nid_list() ++ ++ * get a subset of hashed nids for proc ++ * assumes size is at least one */ ++ ++int get_nid_list(int index, unsigned int *nids, int size) ++{ ++ int hindex, nr_nids = 0; ++ ++ /* only show current and children */ ++ if (!nx_check(0, VS_ADMIN | VS_WATCH)) { ++ if (index > 0) ++ return 0; ++ nids[nr_nids] = nx_current_nid(); ++ return 1; ++ } ++ ++ for (hindex = 0; hindex < NX_HASH_SIZE; hindex++) { ++ struct hlist_head *head = &nx_info_hash[hindex]; ++ struct hlist_node *pos; ++ ++ spin_lock(&nx_info_hash_lock); ++ hlist_for_each(pos, head) { ++ struct nx_info *nxi; ++ ++ if (--index > 0) ++ continue; ++ ++ nxi = hlist_entry(pos, struct nx_info, nx_hlist); ++ nids[nr_nids] = nxi->nx_id; ++ if (++nr_nids >= size) { ++ spin_unlock(&nx_info_hash_lock); ++ goto out; ++ } ++ } ++ /* keep the lock time short */ ++ spin_unlock(&nx_info_hash_lock); ++ } ++out: ++ return nr_nids; ++} ++#endif ++ ++ ++/* ++ * migrate task to new network ++ * gets nxi, puts old_nxi on change ++ */ ++ ++int nx_migrate_task(struct task_struct *p, struct nx_info *nxi) ++{ ++ struct nx_info *old_nxi; ++ int ret = 0; ++ ++ if (!p || !nxi) ++ BUG(); ++ ++ vxdprintk(VXD_CBIT(nid, 5), ++ "nx_migrate_task(%p,%p[#%d.%d.%d])", ++ p, nxi, nxi->nx_id, ++ atomic_read(&nxi->nx_usecnt), ++ atomic_read(&nxi->nx_tasks)); ++ ++ if (nx_info_flags(nxi, NXF_INFO_PRIVATE, 0) && ++ !nx_info_flags(nxi, NXF_STATE_SETUP, 0)) ++ return -EACCES; ++ ++ if (nx_info_state(nxi, NXS_SHUTDOWN)) ++ return -EFAULT; ++ ++ /* maybe disallow this completely? */ ++ old_nxi = task_get_nx_info(p); ++ if (old_nxi == nxi) ++ goto out; ++ ++ task_lock(p); ++ if (old_nxi) ++ clr_nx_info(&p->nx_info); ++ claim_nx_info(nxi, p); ++ set_nx_info(&p->nx_info, nxi); ++ p->nid = nxi->nx_id; ++ task_unlock(p); ++ ++ vxdprintk(VXD_CBIT(nid, 5), ++ "moved task %p into nxi:%p[#%d]", ++ p, nxi, nxi->nx_id); ++ ++ if (old_nxi) ++ release_nx_info(old_nxi, p); ++ ret = 0; ++out: ++ put_nx_info(old_nxi); ++ return ret; ++} ++ ++ ++void nx_set_persistent(struct nx_info *nxi) ++{ ++ vxdprintk(VXD_CBIT(nid, 6), ++ "nx_set_persistent(%p[#%d])", nxi, nxi->nx_id); ++ ++ get_nx_info(nxi); ++ claim_nx_info(nxi, NULL); ++} ++ ++void nx_clear_persistent(struct nx_info *nxi) ++{ ++ vxdprintk(VXD_CBIT(nid, 6), ++ "nx_clear_persistent(%p[#%d])", nxi, nxi->nx_id); ++ ++ release_nx_info(nxi, NULL); ++ put_nx_info(nxi); ++} ++ ++void nx_update_persistent(struct nx_info *nxi) ++{ ++ if (nx_info_flags(nxi, NXF_PERSISTENT, 0)) ++ nx_set_persistent(nxi); ++ else ++ nx_clear_persistent(nxi); ++} ++ ++/* vserver syscall commands below here */ ++ ++/* taks nid and nx_info functions */ ++ ++#include ++ ++ ++int vc_task_nid(uint32_t id) ++{ ++ nid_t nid; ++ ++ if (id) { ++ struct task_struct *tsk; ++ ++ read_lock(&tasklist_lock); ++ tsk = find_task_by_real_pid(id); ++ nid = (tsk) ? tsk->nid : -ESRCH; ++ read_unlock(&tasklist_lock); ++ } else ++ nid = nx_current_nid(); ++ return nid; ++} ++ ++ ++int vc_nx_info(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_nx_info_v0 vc_data; ++ ++ vc_data.nid = nxi->nx_id; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++ ++/* network functions */ ++ ++int vc_net_create(uint32_t nid, void __user *data) ++{ ++ struct vcmd_net_create vc_data = { .flagword = NXF_INIT_SET }; ++ struct nx_info *new_nxi; ++ int ret; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ if ((nid > MAX_S_CONTEXT) || (nid < 2)) ++ return -EINVAL; ++ ++ new_nxi = __create_nx_info(nid); ++ if (IS_ERR(new_nxi)) ++ return PTR_ERR(new_nxi); ++ ++ /* initial flags */ ++ new_nxi->nx_flags = vc_data.flagword; ++ ++ ret = -ENOEXEC; ++ if (vs_net_change(new_nxi, VSC_NETUP)) ++ goto out; ++ ++ ret = nx_migrate_task(current, new_nxi); ++ if (ret) ++ goto out; ++ ++ /* return context id on success */ ++ ret = new_nxi->nx_id; ++ ++ /* get a reference for persistent contexts */ ++ if ((vc_data.flagword & NXF_PERSISTENT)) ++ nx_set_persistent(new_nxi); ++out: ++ release_nx_info(new_nxi, NULL); ++ put_nx_info(new_nxi); ++ return ret; ++} ++ ++ ++int vc_net_migrate(struct nx_info *nxi, void __user *data) ++{ ++ return nx_migrate_task(current, nxi); ++} ++ ++ ++ ++int do_add_v4_addr(struct nx_info *nxi, __be32 ip, __be32 ip2, __be32 mask, ++ uint16_t type, uint16_t flags) ++{ ++ struct nx_addr_v4 *nxa = &nxi->v4; ++ ++ if (NX_IPV4(nxi)) { ++ /* locate last entry */ ++ for (; nxa->next; nxa = nxa->next); ++ nxa->next = __alloc_nx_addr_v4(); ++ nxa = nxa->next; ++ ++ if (IS_ERR(nxa)) ++ return PTR_ERR(nxa); ++ } ++ ++ if (nxi->v4.next) ++ /* remove single ip for ip list */ ++ nxi->nx_flags &= ~NXF_SINGLE_IP; ++ ++ nxa->ip[0].s_addr = ip; ++ nxa->ip[1].s_addr = ip2; ++ nxa->mask.s_addr = mask; ++ nxa->type = type; ++ nxa->flags = flags; ++ return 0; ++} ++ ++ ++int vc_net_add(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_addr_v0 vc_data; ++ int index, ret = 0; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ switch (vc_data.type) { ++ case NXA_TYPE_IPV4: ++ if ((vc_data.count < 1) || (vc_data.count > 4)) ++ return -EINVAL; ++ ++ index = 0; ++ while (index < vc_data.count) { ++ ret = do_add_v4_addr(nxi, vc_data.ip[index].s_addr, 0, ++ vc_data.mask[index].s_addr, NXA_TYPE_ADDR, 0); ++ if (ret) ++ return ret; ++ index++; ++ } ++ ret = index; ++ break; ++ ++ case NXA_TYPE_IPV4|NXA_MOD_BCAST: ++ nxi->v4_bcast = vc_data.ip[0]; ++ ret = 1; ++ break; ++ ++ case NXA_TYPE_IPV4|NXA_MOD_LBACK: ++ nxi->v4_lback = vc_data.ip[0]; ++ ret = 1; ++ break; ++ ++ default: ++ ret = -EINVAL; ++ break; ++ } ++ return ret; ++} ++ ++int vc_net_remove(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_addr_v0 vc_data; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ switch (vc_data.type) { ++ case NXA_TYPE_ANY: ++ __dealloc_nx_addr_v4_all(xchg(&nxi->v4.next, NULL)); ++ memset(&nxi->v4, 0, sizeof(nxi->v4)); ++ break; ++ ++ default: ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++ ++int vc_net_add_ipv4(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_addr_ipv4_v1 vc_data; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ switch (vc_data.type) { ++ case NXA_TYPE_ADDR: ++ case NXA_TYPE_RANGE: ++ case NXA_TYPE_MASK: ++ return do_add_v4_addr(nxi, vc_data.ip.s_addr, 0, ++ vc_data.mask.s_addr, vc_data.type, vc_data.flags); ++ ++ case NXA_TYPE_ADDR | NXA_MOD_BCAST: ++ nxi->v4_bcast = vc_data.ip; ++ break; ++ ++ case NXA_TYPE_ADDR | NXA_MOD_LBACK: ++ nxi->v4_lback = vc_data.ip; ++ break; ++ ++ default: ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++int vc_net_remove_ipv4(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_addr_ipv4_v1 vc_data; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ switch (vc_data.type) { ++/* case NXA_TYPE_ADDR: ++ break; */ ++ ++ case NXA_TYPE_ANY: ++ __dealloc_nx_addr_v4_all(xchg(&nxi->v4.next, NULL)); ++ memset(&nxi->v4, 0, sizeof(nxi->v4)); ++ break; ++ ++ default: ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++ ++#ifdef CONFIG_IPV6 ++ ++int do_add_v6_addr(struct nx_info *nxi, ++ struct in6_addr *ip, struct in6_addr *mask, ++ uint32_t prefix, uint16_t type, uint16_t flags) ++{ ++ struct nx_addr_v6 *nxa = &nxi->v6; ++ ++ if (NX_IPV6(nxi)) { ++ /* locate last entry */ ++ for (; nxa->next; nxa = nxa->next); ++ nxa->next = __alloc_nx_addr_v6(); ++ nxa = nxa->next; ++ ++ if (IS_ERR(nxa)) ++ return PTR_ERR(nxa); ++ } ++ ++ nxa->ip = *ip; ++ nxa->mask = *mask; ++ nxa->prefix = prefix; ++ nxa->type = type; ++ nxa->flags = flags; ++ return 0; ++} ++ ++ ++int vc_net_add_ipv6(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_addr_ipv6_v1 vc_data; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ switch (vc_data.type) { ++ case NXA_TYPE_ADDR: ++ case NXA_TYPE_MASK: ++ return do_add_v6_addr(nxi, &vc_data.ip, &vc_data.mask, ++ vc_data.prefix, vc_data.type, vc_data.flags); ++ default: ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++int vc_net_remove_ipv6(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_addr_ipv6_v1 vc_data; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ switch (vc_data.type) { ++ case NXA_TYPE_ANY: ++ __dealloc_nx_addr_v6_all(xchg(&nxi->v6.next, NULL)); ++ memset(&nxi->v6, 0, sizeof(nxi->v6)); ++ break; ++ ++ default: ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++#endif /* CONFIG_IPV6 */ ++ ++ ++int vc_get_nflags(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_flags_v0 vc_data; ++ ++ vc_data.flagword = nxi->nx_flags; ++ ++ /* special STATE flag handling */ ++ vc_data.mask = vs_mask_flags(~0ULL, nxi->nx_flags, NXF_ONE_TIME); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++int vc_set_nflags(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_flags_v0 vc_data; ++ uint64_t mask, trigger; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ /* special STATE flag handling */ ++ mask = vs_mask_mask(vc_data.mask, nxi->nx_flags, NXF_ONE_TIME); ++ trigger = (mask & nxi->nx_flags) ^ (mask & vc_data.flagword); ++ ++ nxi->nx_flags = vs_mask_flags(nxi->nx_flags, ++ vc_data.flagword, mask); ++ if (trigger & NXF_PERSISTENT) ++ nx_update_persistent(nxi); ++ ++ return 0; ++} ++ ++int vc_get_ncaps(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_caps_v0 vc_data; ++ ++ vc_data.ncaps = nxi->nx_ncaps; ++ vc_data.cmask = ~0ULL; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++int vc_set_ncaps(struct nx_info *nxi, void __user *data) ++{ ++ struct vcmd_net_caps_v0 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ nxi->nx_ncaps = vs_mask_flags(nxi->nx_ncaps, ++ vc_data.ncaps, vc_data.cmask); ++ return 0; ++} ++ ++ ++#include ++ ++module_init(init_network); ++ ++EXPORT_SYMBOL_GPL(free_nx_info); ++EXPORT_SYMBOL_GPL(unhash_nx_info); ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/proc.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/proc.c +--- linux-2.6.31.6/kernel/vserver/proc.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/proc.c 2009-09-10 17:45:54.000000000 +0200 +@@ -0,0 +1,1098 @@ ++/* ++ * linux/kernel/vserver/proc.c ++ * ++ * Virtual Context Support ++ * ++ * Copyright (C) 2003-2007 Herbert Pötzl ++ * ++ * V0.01 basic structure ++ * V0.02 adaptation vs1.3.0 ++ * V0.03 proc permissions ++ * V0.04 locking/generic ++ * V0.05 next generation procfs ++ * V0.06 inode validation ++ * V0.07 generic rewrite vid ++ * V0.08 remove inode type ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "cvirt_proc.h" ++#include "cacct_proc.h" ++#include "limit_proc.h" ++#include "sched_proc.h" ++#include "vci_config.h" ++ ++ ++static inline char *print_cap_t(char *buffer, kernel_cap_t *c) ++{ ++ unsigned __capi; ++ ++ CAP_FOR_EACH_U32(__capi) { ++ buffer += sprintf(buffer, "%08x", ++ c->cap[(_KERNEL_CAPABILITY_U32S-1) - __capi]); ++ } ++ return buffer; ++} ++ ++ ++static struct proc_dir_entry *proc_virtual; ++ ++static struct proc_dir_entry *proc_virtnet; ++ ++ ++/* first the actual feeds */ ++ ++ ++static int proc_vci(char *buffer) ++{ ++ return sprintf(buffer, ++ "VCIVersion:\t%04x:%04x\n" ++ "VCISyscall:\t%d\n" ++ "VCIKernel:\t%08x\n", ++ VCI_VERSION >> 16, ++ VCI_VERSION & 0xFFFF, ++ __NR_vserver, ++ vci_kernel_config()); ++} ++ ++static int proc_virtual_info(char *buffer) ++{ ++ return proc_vci(buffer); ++} ++ ++static int proc_virtual_status(char *buffer) ++{ ++ return sprintf(buffer, ++ "#CTotal:\t%d\n" ++ "#CActive:\t%d\n" ++ "#NSProxy:\t%d\t%d %d %d %d %d %d\n" ++ "#InitTask:\t%d\t%d %d\n", ++ atomic_read(&vx_global_ctotal), ++ atomic_read(&vx_global_cactive), ++ atomic_read(&vs_global_nsproxy), ++ atomic_read(&vs_global_fs), ++ atomic_read(&vs_global_mnt_ns), ++ atomic_read(&vs_global_uts_ns), ++ atomic_read(&nr_ipc_ns), ++ atomic_read(&vs_global_user_ns), ++ atomic_read(&vs_global_pid_ns), ++ atomic_read(&init_task.usage), ++ atomic_read(&init_task.nsproxy->count), ++ init_task.fs->users); ++} ++ ++ ++int proc_vxi_info(struct vx_info *vxi, char *buffer) ++{ ++ int length; ++ ++ length = sprintf(buffer, ++ "ID:\t%d\n" ++ "Info:\t%p\n" ++ "Init:\t%d\n" ++ "OOM:\t%lld\n", ++ vxi->vx_id, ++ vxi, ++ vxi->vx_initpid, ++ vxi->vx_badness_bias); ++ return length; ++} ++ ++int proc_vxi_status(struct vx_info *vxi, char *buffer) ++{ ++ char *orig = buffer; ++ ++ buffer += sprintf(buffer, ++ "UseCnt:\t%d\n" ++ "Tasks:\t%d\n" ++ "Flags:\t%016llx\n", ++ atomic_read(&vxi->vx_usecnt), ++ atomic_read(&vxi->vx_tasks), ++ (unsigned long long)vxi->vx_flags); ++ ++ buffer += sprintf(buffer, "BCaps:\t"); ++ buffer = print_cap_t(buffer, &vxi->vx_bcaps); ++ buffer += sprintf(buffer, "\n"); ++ ++ buffer += sprintf(buffer, ++ "CCaps:\t%016llx\n" ++ "Spaces:\t%08lx %08lx\n", ++ (unsigned long long)vxi->vx_ccaps, ++ vxi->vx_nsmask[0], vxi->vx_nsmask[1]); ++ return buffer - orig; ++} ++ ++int proc_vxi_limit(struct vx_info *vxi, char *buffer) ++{ ++ return vx_info_proc_limit(&vxi->limit, buffer); ++} ++ ++int proc_vxi_sched(struct vx_info *vxi, char *buffer) ++{ ++ int cpu, length; ++ ++ length = vx_info_proc_sched(&vxi->sched, buffer); ++ for_each_online_cpu(cpu) { ++ length += vx_info_proc_sched_pc( ++ &vx_per_cpu(vxi, sched_pc, cpu), ++ buffer + length, cpu); ++ } ++ return length; ++} ++ ++int proc_vxi_nsproxy0(struct vx_info *vxi, char *buffer) ++{ ++ return vx_info_proc_nsproxy(vxi->vx_nsproxy[0], buffer); ++} ++ ++int proc_vxi_nsproxy1(struct vx_info *vxi, char *buffer) ++{ ++ return vx_info_proc_nsproxy(vxi->vx_nsproxy[1], buffer); ++} ++ ++int proc_vxi_cvirt(struct vx_info *vxi, char *buffer) ++{ ++ int cpu, length; ++ ++ vx_update_load(vxi); ++ length = vx_info_proc_cvirt(&vxi->cvirt, buffer); ++ for_each_online_cpu(cpu) { ++ length += vx_info_proc_cvirt_pc( ++ &vx_per_cpu(vxi, cvirt_pc, cpu), ++ buffer + length, cpu); ++ } ++ return length; ++} ++ ++int proc_vxi_cacct(struct vx_info *vxi, char *buffer) ++{ ++ return vx_info_proc_cacct(&vxi->cacct, buffer); ++} ++ ++ ++static int proc_virtnet_info(char *buffer) ++{ ++ return proc_vci(buffer); ++} ++ ++static int proc_virtnet_status(char *buffer) ++{ ++ return sprintf(buffer, ++ "#CTotal:\t%d\n" ++ "#CActive:\t%d\n", ++ atomic_read(&nx_global_ctotal), ++ atomic_read(&nx_global_cactive)); ++} ++ ++int proc_nxi_info(struct nx_info *nxi, char *buffer) ++{ ++ struct nx_addr_v4 *v4a; ++#ifdef CONFIG_IPV6 ++ struct nx_addr_v6 *v6a; ++#endif ++ int length, i; ++ ++ length = sprintf(buffer, ++ "ID:\t%d\n" ++ "Info:\t%p\n" ++ "Bcast:\t" NIPQUAD_FMT "\n" ++ "Lback:\t" NIPQUAD_FMT "\n", ++ nxi->nx_id, ++ nxi, ++ NIPQUAD(nxi->v4_bcast.s_addr), ++ NIPQUAD(nxi->v4_lback.s_addr)); ++ ++ if (!NX_IPV4(nxi)) ++ goto skip_v4; ++ for (i = 0, v4a = &nxi->v4; v4a; i++, v4a = v4a->next) ++ length += sprintf(buffer + length, "%d:\t" NXAV4_FMT "\n", ++ i, NXAV4(v4a)); ++skip_v4: ++#ifdef CONFIG_IPV6 ++ if (!NX_IPV6(nxi)) ++ goto skip_v6; ++ for (i = 0, v6a = &nxi->v6; v6a; i++, v6a = v6a->next) ++ length += sprintf(buffer + length, "%d:\t" NXAV6_FMT "\n", ++ i, NXAV6(v6a)); ++skip_v6: ++#endif ++ return length; ++} ++ ++int proc_nxi_status(struct nx_info *nxi, char *buffer) ++{ ++ int length; ++ ++ length = sprintf(buffer, ++ "UseCnt:\t%d\n" ++ "Tasks:\t%d\n" ++ "Flags:\t%016llx\n" ++ "NCaps:\t%016llx\n", ++ atomic_read(&nxi->nx_usecnt), ++ atomic_read(&nxi->nx_tasks), ++ (unsigned long long)nxi->nx_flags, ++ (unsigned long long)nxi->nx_ncaps); ++ return length; ++} ++ ++ ++ ++/* here the inode helpers */ ++ ++struct vs_entry { ++ int len; ++ char *name; ++ mode_t mode; ++ struct inode_operations *iop; ++ struct file_operations *fop; ++ union proc_op op; ++}; ++ ++static struct inode *vs_proc_make_inode(struct super_block *sb, struct vs_entry *p) ++{ ++ struct inode *inode = new_inode(sb); ++ ++ if (!inode) ++ goto out; ++ ++ inode->i_mode = p->mode; ++ if (p->iop) ++ inode->i_op = p->iop; ++ if (p->fop) ++ inode->i_fop = p->fop; ++ ++ inode->i_nlink = (p->mode & S_IFDIR) ? 2 : 1; ++ inode->i_flags |= S_IMMUTABLE; ++ ++ inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; ++ ++ inode->i_uid = 0; ++ inode->i_gid = 0; ++ inode->i_tag = 0; ++out: ++ return inode; ++} ++ ++static struct dentry *vs_proc_instantiate(struct inode *dir, ++ struct dentry *dentry, int id, void *ptr) ++{ ++ struct vs_entry *p = ptr; ++ struct inode *inode = vs_proc_make_inode(dir->i_sb, p); ++ struct dentry *error = ERR_PTR(-EINVAL); ++ ++ if (!inode) ++ goto out; ++ ++ PROC_I(inode)->op = p->op; ++ PROC_I(inode)->fd = id; ++ d_add(dentry, inode); ++ error = NULL; ++out: ++ return error; ++} ++ ++/* Lookups */ ++ ++typedef struct dentry *instantiate_t(struct inode *, struct dentry *, int, void *); ++ ++/* ++ * Fill a directory entry. ++ * ++ * If possible create the dcache entry and derive our inode number and ++ * file type from dcache entry. ++ * ++ * Since all of the proc inode numbers are dynamically generated, the inode ++ * numbers do not exist until the inode is cache. This means creating the ++ * the dcache entry in readdir is necessary to keep the inode numbers ++ * reported by readdir in sync with the inode numbers reported ++ * by stat. ++ */ ++static int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir, ++ char *name, int len, instantiate_t instantiate, int id, void *ptr) ++{ ++ struct dentry *child, *dir = filp->f_dentry; ++ struct inode *inode; ++ struct qstr qname; ++ ino_t ino = 0; ++ unsigned type = DT_UNKNOWN; ++ ++ qname.name = name; ++ qname.len = len; ++ qname.hash = full_name_hash(name, len); ++ ++ child = d_lookup(dir, &qname); ++ if (!child) { ++ struct dentry *new; ++ new = d_alloc(dir, &qname); ++ if (new) { ++ child = instantiate(dir->d_inode, new, id, ptr); ++ if (child) ++ dput(new); ++ else ++ child = new; ++ } ++ } ++ if (!child || IS_ERR(child) || !child->d_inode) ++ goto end_instantiate; ++ inode = child->d_inode; ++ if (inode) { ++ ino = inode->i_ino; ++ type = inode->i_mode >> 12; ++ } ++ dput(child); ++end_instantiate: ++ if (!ino) ++ ino = find_inode_number(dir, &qname); ++ if (!ino) ++ ino = 1; ++ return filldir(dirent, name, len, filp->f_pos, ino, type); ++} ++ ++ ++ ++/* get and revalidate vx_info/xid */ ++ ++static inline ++struct vx_info *get_proc_vx_info(struct inode *inode) ++{ ++ return lookup_vx_info(PROC_I(inode)->fd); ++} ++ ++static int proc_xid_revalidate(struct dentry *dentry, struct nameidata *nd) ++{ ++ struct inode *inode = dentry->d_inode; ++ xid_t xid = PROC_I(inode)->fd; ++ ++ if (!xid || xid_is_hashed(xid)) ++ return 1; ++ d_drop(dentry); ++ return 0; ++} ++ ++ ++/* get and revalidate nx_info/nid */ ++ ++static int proc_nid_revalidate(struct dentry *dentry, struct nameidata *nd) ++{ ++ struct inode *inode = dentry->d_inode; ++ nid_t nid = PROC_I(inode)->fd; ++ ++ if (!nid || nid_is_hashed(nid)) ++ return 1; ++ d_drop(dentry); ++ return 0; ++} ++ ++ ++ ++#define PROC_BLOCK_SIZE (PAGE_SIZE - 1024) ++ ++static ssize_t proc_vs_info_read(struct file *file, char __user *buf, ++ size_t count, loff_t *ppos) ++{ ++ struct inode *inode = file->f_dentry->d_inode; ++ unsigned long page; ++ ssize_t length = 0; ++ ++ if (count > PROC_BLOCK_SIZE) ++ count = PROC_BLOCK_SIZE; ++ ++ /* fade that out as soon as stable */ ++ WARN_ON(PROC_I(inode)->fd); ++ ++ if (!(page = __get_free_page(GFP_KERNEL))) ++ return -ENOMEM; ++ ++ BUG_ON(!PROC_I(inode)->op.proc_vs_read); ++ length = PROC_I(inode)->op.proc_vs_read((char *)page); ++ ++ if (length >= 0) ++ length = simple_read_from_buffer(buf, count, ppos, ++ (char *)page, length); ++ ++ free_page(page); ++ return length; ++} ++ ++static ssize_t proc_vx_info_read(struct file *file, char __user *buf, ++ size_t count, loff_t *ppos) ++{ ++ struct inode *inode = file->f_dentry->d_inode; ++ struct vx_info *vxi = NULL; ++ xid_t xid = PROC_I(inode)->fd; ++ unsigned long page; ++ ssize_t length = 0; ++ ++ if (count > PROC_BLOCK_SIZE) ++ count = PROC_BLOCK_SIZE; ++ ++ /* fade that out as soon as stable */ ++ WARN_ON(!xid); ++ vxi = lookup_vx_info(xid); ++ if (!vxi) ++ goto out; ++ ++ length = -ENOMEM; ++ if (!(page = __get_free_page(GFP_KERNEL))) ++ goto out_put; ++ ++ BUG_ON(!PROC_I(inode)->op.proc_vxi_read); ++ length = PROC_I(inode)->op.proc_vxi_read(vxi, (char *)page); ++ ++ if (length >= 0) ++ length = simple_read_from_buffer(buf, count, ppos, ++ (char *)page, length); ++ ++ free_page(page); ++out_put: ++ put_vx_info(vxi); ++out: ++ return length; ++} ++ ++static ssize_t proc_nx_info_read(struct file *file, char __user *buf, ++ size_t count, loff_t *ppos) ++{ ++ struct inode *inode = file->f_dentry->d_inode; ++ struct nx_info *nxi = NULL; ++ nid_t nid = PROC_I(inode)->fd; ++ unsigned long page; ++ ssize_t length = 0; ++ ++ if (count > PROC_BLOCK_SIZE) ++ count = PROC_BLOCK_SIZE; ++ ++ /* fade that out as soon as stable */ ++ WARN_ON(!nid); ++ nxi = lookup_nx_info(nid); ++ if (!nxi) ++ goto out; ++ ++ length = -ENOMEM; ++ if (!(page = __get_free_page(GFP_KERNEL))) ++ goto out_put; ++ ++ BUG_ON(!PROC_I(inode)->op.proc_nxi_read); ++ length = PROC_I(inode)->op.proc_nxi_read(nxi, (char *)page); ++ ++ if (length >= 0) ++ length = simple_read_from_buffer(buf, count, ppos, ++ (char *)page, length); ++ ++ free_page(page); ++out_put: ++ put_nx_info(nxi); ++out: ++ return length; ++} ++ ++ ++ ++/* here comes the lower level */ ++ ++ ++#define NOD(NAME, MODE, IOP, FOP, OP) { \ ++ .len = sizeof(NAME) - 1, \ ++ .name = (NAME), \ ++ .mode = MODE, \ ++ .iop = IOP, \ ++ .fop = FOP, \ ++ .op = OP, \ ++} ++ ++ ++#define DIR(NAME, MODE, OTYPE) \ ++ NOD(NAME, (S_IFDIR | (MODE)), \ ++ &proc_ ## OTYPE ## _inode_operations, \ ++ &proc_ ## OTYPE ## _file_operations, { } ) ++ ++#define INF(NAME, MODE, OTYPE) \ ++ NOD(NAME, (S_IFREG | (MODE)), NULL, \ ++ &proc_vs_info_file_operations, \ ++ { .proc_vs_read = &proc_##OTYPE } ) ++ ++#define VINF(NAME, MODE, OTYPE) \ ++ NOD(NAME, (S_IFREG | (MODE)), NULL, \ ++ &proc_vx_info_file_operations, \ ++ { .proc_vxi_read = &proc_##OTYPE } ) ++ ++#define NINF(NAME, MODE, OTYPE) \ ++ NOD(NAME, (S_IFREG | (MODE)), NULL, \ ++ &proc_nx_info_file_operations, \ ++ { .proc_nxi_read = &proc_##OTYPE } ) ++ ++ ++static struct file_operations proc_vs_info_file_operations = { ++ .read = proc_vs_info_read, ++}; ++ ++static struct file_operations proc_vx_info_file_operations = { ++ .read = proc_vx_info_read, ++}; ++ ++static struct dentry_operations proc_xid_dentry_operations = { ++ .d_revalidate = proc_xid_revalidate, ++}; ++ ++static struct vs_entry vx_base_stuff[] = { ++ VINF("info", S_IRUGO, vxi_info), ++ VINF("status", S_IRUGO, vxi_status), ++ VINF("limit", S_IRUGO, vxi_limit), ++ VINF("sched", S_IRUGO, vxi_sched), ++ VINF("nsproxy", S_IRUGO, vxi_nsproxy0), ++ VINF("nsproxy1",S_IRUGO, vxi_nsproxy1), ++ VINF("cvirt", S_IRUGO, vxi_cvirt), ++ VINF("cacct", S_IRUGO, vxi_cacct), ++ {} ++}; ++ ++ ++ ++ ++static struct dentry *proc_xid_instantiate(struct inode *dir, ++ struct dentry *dentry, int id, void *ptr) ++{ ++ dentry->d_op = &proc_xid_dentry_operations; ++ return vs_proc_instantiate(dir, dentry, id, ptr); ++} ++ ++static struct dentry *proc_xid_lookup(struct inode *dir, ++ struct dentry *dentry, struct nameidata *nd) ++{ ++ struct vs_entry *p = vx_base_stuff; ++ struct dentry *error = ERR_PTR(-ENOENT); ++ ++ for (; p->name; p++) { ++ if (p->len != dentry->d_name.len) ++ continue; ++ if (!memcmp(dentry->d_name.name, p->name, p->len)) ++ break; ++ } ++ if (!p->name) ++ goto out; ++ ++ error = proc_xid_instantiate(dir, dentry, PROC_I(dir)->fd, p); ++out: ++ return error; ++} ++ ++static int proc_xid_readdir(struct file *filp, ++ void *dirent, filldir_t filldir) ++{ ++ struct dentry *dentry = filp->f_dentry; ++ struct inode *inode = dentry->d_inode; ++ struct vs_entry *p = vx_base_stuff; ++ int size = sizeof(vx_base_stuff) / sizeof(struct vs_entry); ++ int pos, index; ++ u64 ino; ++ ++ pos = filp->f_pos; ++ switch (pos) { ++ case 0: ++ ino = inode->i_ino; ++ if (filldir(dirent, ".", 1, pos, ino, DT_DIR) < 0) ++ goto out; ++ pos++; ++ /* fall through */ ++ case 1: ++ ino = parent_ino(dentry); ++ if (filldir(dirent, "..", 2, pos, ino, DT_DIR) < 0) ++ goto out; ++ pos++; ++ /* fall through */ ++ default: ++ index = pos - 2; ++ if (index >= size) ++ goto out; ++ for (p += index; p->name; p++) { ++ if (proc_fill_cache(filp, dirent, filldir, p->name, p->len, ++ vs_proc_instantiate, PROC_I(inode)->fd, p)) ++ goto out; ++ pos++; ++ } ++ } ++out: ++ filp->f_pos = pos; ++ return 1; ++} ++ ++ ++ ++static struct file_operations proc_nx_info_file_operations = { ++ .read = proc_nx_info_read, ++}; ++ ++static struct dentry_operations proc_nid_dentry_operations = { ++ .d_revalidate = proc_nid_revalidate, ++}; ++ ++static struct vs_entry nx_base_stuff[] = { ++ NINF("info", S_IRUGO, nxi_info), ++ NINF("status", S_IRUGO, nxi_status), ++ {} ++}; ++ ++ ++static struct dentry *proc_nid_instantiate(struct inode *dir, ++ struct dentry *dentry, int id, void *ptr) ++{ ++ dentry->d_op = &proc_nid_dentry_operations; ++ return vs_proc_instantiate(dir, dentry, id, ptr); ++} ++ ++static struct dentry *proc_nid_lookup(struct inode *dir, ++ struct dentry *dentry, struct nameidata *nd) ++{ ++ struct vs_entry *p = nx_base_stuff; ++ struct dentry *error = ERR_PTR(-ENOENT); ++ ++ for (; p->name; p++) { ++ if (p->len != dentry->d_name.len) ++ continue; ++ if (!memcmp(dentry->d_name.name, p->name, p->len)) ++ break; ++ } ++ if (!p->name) ++ goto out; ++ ++ error = proc_nid_instantiate(dir, dentry, PROC_I(dir)->fd, p); ++out: ++ return error; ++} ++ ++static int proc_nid_readdir(struct file *filp, ++ void *dirent, filldir_t filldir) ++{ ++ struct dentry *dentry = filp->f_dentry; ++ struct inode *inode = dentry->d_inode; ++ struct vs_entry *p = nx_base_stuff; ++ int size = sizeof(nx_base_stuff) / sizeof(struct vs_entry); ++ int pos, index; ++ u64 ino; ++ ++ pos = filp->f_pos; ++ switch (pos) { ++ case 0: ++ ino = inode->i_ino; ++ if (filldir(dirent, ".", 1, pos, ino, DT_DIR) < 0) ++ goto out; ++ pos++; ++ /* fall through */ ++ case 1: ++ ino = parent_ino(dentry); ++ if (filldir(dirent, "..", 2, pos, ino, DT_DIR) < 0) ++ goto out; ++ pos++; ++ /* fall through */ ++ default: ++ index = pos - 2; ++ if (index >= size) ++ goto out; ++ for (p += index; p->name; p++) { ++ if (proc_fill_cache(filp, dirent, filldir, p->name, p->len, ++ vs_proc_instantiate, PROC_I(inode)->fd, p)) ++ goto out; ++ pos++; ++ } ++ } ++out: ++ filp->f_pos = pos; ++ return 1; ++} ++ ++ ++#define MAX_MULBY10 ((~0U - 9) / 10) ++ ++static inline int atovid(const char *str, int len) ++{ ++ int vid, c; ++ ++ vid = 0; ++ while (len-- > 0) { ++ c = *str - '0'; ++ str++; ++ if (c > 9) ++ return -1; ++ if (vid >= MAX_MULBY10) ++ return -1; ++ vid *= 10; ++ vid += c; ++ if (!vid) ++ return -1; ++ } ++ return vid; ++} ++ ++/* now the upper level (virtual) */ ++ ++ ++static struct file_operations proc_xid_file_operations = { ++ .read = generic_read_dir, ++ .readdir = proc_xid_readdir, ++}; ++ ++static struct inode_operations proc_xid_inode_operations = { ++ .lookup = proc_xid_lookup, ++}; ++ ++static struct vs_entry vx_virtual_stuff[] = { ++ INF("info", S_IRUGO, virtual_info), ++ INF("status", S_IRUGO, virtual_status), ++ DIR(NULL, S_IRUGO | S_IXUGO, xid), ++}; ++ ++ ++static struct dentry *proc_virtual_lookup(struct inode *dir, ++ struct dentry *dentry, struct nameidata *nd) ++{ ++ struct vs_entry *p = vx_virtual_stuff; ++ struct dentry *error = ERR_PTR(-ENOENT); ++ int id = 0; ++ ++ for (; p->name; p++) { ++ if (p->len != dentry->d_name.len) ++ continue; ++ if (!memcmp(dentry->d_name.name, p->name, p->len)) ++ break; ++ } ++ if (p->name) ++ goto instantiate; ++ ++ id = atovid(dentry->d_name.name, dentry->d_name.len); ++ if ((id < 0) || !xid_is_hashed(id)) ++ goto out; ++ ++instantiate: ++ error = proc_xid_instantiate(dir, dentry, id, p); ++out: ++ return error; ++} ++ ++static struct file_operations proc_nid_file_operations = { ++ .read = generic_read_dir, ++ .readdir = proc_nid_readdir, ++}; ++ ++static struct inode_operations proc_nid_inode_operations = { ++ .lookup = proc_nid_lookup, ++}; ++ ++static struct vs_entry nx_virtnet_stuff[] = { ++ INF("info", S_IRUGO, virtnet_info), ++ INF("status", S_IRUGO, virtnet_status), ++ DIR(NULL, S_IRUGO | S_IXUGO, nid), ++}; ++ ++ ++static struct dentry *proc_virtnet_lookup(struct inode *dir, ++ struct dentry *dentry, struct nameidata *nd) ++{ ++ struct vs_entry *p = nx_virtnet_stuff; ++ struct dentry *error = ERR_PTR(-ENOENT); ++ int id = 0; ++ ++ for (; p->name; p++) { ++ if (p->len != dentry->d_name.len) ++ continue; ++ if (!memcmp(dentry->d_name.name, p->name, p->len)) ++ break; ++ } ++ if (p->name) ++ goto instantiate; ++ ++ id = atovid(dentry->d_name.name, dentry->d_name.len); ++ if ((id < 0) || !nid_is_hashed(id)) ++ goto out; ++ ++instantiate: ++ error = proc_nid_instantiate(dir, dentry, id, p); ++out: ++ return error; ++} ++ ++ ++#define PROC_MAXVIDS 32 ++ ++int proc_virtual_readdir(struct file *filp, ++ void *dirent, filldir_t filldir) ++{ ++ struct dentry *dentry = filp->f_dentry; ++ struct inode *inode = dentry->d_inode; ++ struct vs_entry *p = vx_virtual_stuff; ++ int size = sizeof(vx_virtual_stuff) / sizeof(struct vs_entry); ++ int pos, index; ++ unsigned int xid_array[PROC_MAXVIDS]; ++ char buf[PROC_NUMBUF]; ++ unsigned int nr_xids, i; ++ u64 ino; ++ ++ pos = filp->f_pos; ++ switch (pos) { ++ case 0: ++ ino = inode->i_ino; ++ if (filldir(dirent, ".", 1, pos, ino, DT_DIR) < 0) ++ goto out; ++ pos++; ++ /* fall through */ ++ case 1: ++ ino = parent_ino(dentry); ++ if (filldir(dirent, "..", 2, pos, ino, DT_DIR) < 0) ++ goto out; ++ pos++; ++ /* fall through */ ++ default: ++ index = pos - 2; ++ if (index >= size) ++ goto entries; ++ for (p += index; p->name; p++) { ++ if (proc_fill_cache(filp, dirent, filldir, p->name, p->len, ++ vs_proc_instantiate, 0, p)) ++ goto out; ++ pos++; ++ } ++ entries: ++ index = pos - size; ++ p = &vx_virtual_stuff[size - 1]; ++ nr_xids = get_xid_list(index, xid_array, PROC_MAXVIDS); ++ for (i = 0; i < nr_xids; i++) { ++ int n, xid = xid_array[i]; ++ unsigned int j = PROC_NUMBUF; ++ ++ n = xid; ++ do ++ buf[--j] = '0' + (n % 10); ++ while (n /= 10); ++ ++ if (proc_fill_cache(filp, dirent, filldir, ++ buf + j, PROC_NUMBUF - j, ++ vs_proc_instantiate, xid, p)) ++ goto out; ++ pos++; ++ } ++ } ++out: ++ filp->f_pos = pos; ++ return 0; ++} ++ ++static int proc_virtual_getattr(struct vfsmount *mnt, ++ struct dentry *dentry, struct kstat *stat) ++{ ++ struct inode *inode = dentry->d_inode; ++ ++ generic_fillattr(inode, stat); ++ stat->nlink = 2 + atomic_read(&vx_global_cactive); ++ return 0; ++} ++ ++static struct file_operations proc_virtual_dir_operations = { ++ .read = generic_read_dir, ++ .readdir = proc_virtual_readdir, ++}; ++ ++static struct inode_operations proc_virtual_dir_inode_operations = { ++ .getattr = proc_virtual_getattr, ++ .lookup = proc_virtual_lookup, ++}; ++ ++ ++ ++ ++ ++int proc_virtnet_readdir(struct file *filp, ++ void *dirent, filldir_t filldir) ++{ ++ struct dentry *dentry = filp->f_dentry; ++ struct inode *inode = dentry->d_inode; ++ struct vs_entry *p = nx_virtnet_stuff; ++ int size = sizeof(nx_virtnet_stuff) / sizeof(struct vs_entry); ++ int pos, index; ++ unsigned int nid_array[PROC_MAXVIDS]; ++ char buf[PROC_NUMBUF]; ++ unsigned int nr_nids, i; ++ u64 ino; ++ ++ pos = filp->f_pos; ++ switch (pos) { ++ case 0: ++ ino = inode->i_ino; ++ if (filldir(dirent, ".", 1, pos, ino, DT_DIR) < 0) ++ goto out; ++ pos++; ++ /* fall through */ ++ case 1: ++ ino = parent_ino(dentry); ++ if (filldir(dirent, "..", 2, pos, ino, DT_DIR) < 0) ++ goto out; ++ pos++; ++ /* fall through */ ++ default: ++ index = pos - 2; ++ if (index >= size) ++ goto entries; ++ for (p += index; p->name; p++) { ++ if (proc_fill_cache(filp, dirent, filldir, p->name, p->len, ++ vs_proc_instantiate, 0, p)) ++ goto out; ++ pos++; ++ } ++ entries: ++ index = pos - size; ++ p = &nx_virtnet_stuff[size - 1]; ++ nr_nids = get_nid_list(index, nid_array, PROC_MAXVIDS); ++ for (i = 0; i < nr_nids; i++) { ++ int n, nid = nid_array[i]; ++ unsigned int j = PROC_NUMBUF; ++ ++ n = nid; ++ do ++ buf[--j] = '0' + (n % 10); ++ while (n /= 10); ++ ++ if (proc_fill_cache(filp, dirent, filldir, ++ buf + j, PROC_NUMBUF - j, ++ vs_proc_instantiate, nid, p)) ++ goto out; ++ pos++; ++ } ++ } ++out: ++ filp->f_pos = pos; ++ return 0; ++} ++ ++static int proc_virtnet_getattr(struct vfsmount *mnt, ++ struct dentry *dentry, struct kstat *stat) ++{ ++ struct inode *inode = dentry->d_inode; ++ ++ generic_fillattr(inode, stat); ++ stat->nlink = 2 + atomic_read(&nx_global_cactive); ++ return 0; ++} ++ ++static struct file_operations proc_virtnet_dir_operations = { ++ .read = generic_read_dir, ++ .readdir = proc_virtnet_readdir, ++}; ++ ++static struct inode_operations proc_virtnet_dir_inode_operations = { ++ .getattr = proc_virtnet_getattr, ++ .lookup = proc_virtnet_lookup, ++}; ++ ++ ++ ++void proc_vx_init(void) ++{ ++ struct proc_dir_entry *ent; ++ ++ ent = proc_mkdir("virtual", 0); ++ if (ent) { ++ ent->proc_fops = &proc_virtual_dir_operations; ++ ent->proc_iops = &proc_virtual_dir_inode_operations; ++ } ++ proc_virtual = ent; ++ ++ ent = proc_mkdir("virtnet", 0); ++ if (ent) { ++ ent->proc_fops = &proc_virtnet_dir_operations; ++ ent->proc_iops = &proc_virtnet_dir_inode_operations; ++ } ++ proc_virtnet = ent; ++} ++ ++ ++ ++ ++/* per pid info */ ++ ++ ++int proc_pid_vx_info(struct task_struct *p, char *buffer) ++{ ++ struct vx_info *vxi; ++ char *orig = buffer; ++ ++ buffer += sprintf(buffer, "XID:\t%d\n", vx_task_xid(p)); ++ ++ vxi = task_get_vx_info(p); ++ if (!vxi) ++ goto out; ++ ++ buffer += sprintf(buffer, "BCaps:\t"); ++ buffer = print_cap_t(buffer, &vxi->vx_bcaps); ++ buffer += sprintf(buffer, "\n"); ++ buffer += sprintf(buffer, "CCaps:\t%016llx\n", ++ (unsigned long long)vxi->vx_ccaps); ++ buffer += sprintf(buffer, "CFlags:\t%016llx\n", ++ (unsigned long long)vxi->vx_flags); ++ buffer += sprintf(buffer, "CIPid:\t%d\n", vxi->vx_initpid); ++ ++ put_vx_info(vxi); ++out: ++ return buffer - orig; ++} ++ ++ ++int proc_pid_nx_info(struct task_struct *p, char *buffer) ++{ ++ struct nx_info *nxi; ++ struct nx_addr_v4 *v4a; ++#ifdef CONFIG_IPV6 ++ struct nx_addr_v6 *v6a; ++#endif ++ char *orig = buffer; ++ int i; ++ ++ buffer += sprintf(buffer, "NID:\t%d\n", nx_task_nid(p)); ++ ++ nxi = task_get_nx_info(p); ++ if (!nxi) ++ goto out; ++ ++ buffer += sprintf(buffer, "NCaps:\t%016llx\n", ++ (unsigned long long)nxi->nx_ncaps); ++ buffer += sprintf(buffer, "NFlags:\t%016llx\n", ++ (unsigned long long)nxi->nx_flags); ++ ++ buffer += sprintf(buffer, ++ "V4Root[bcast]:\t" NIPQUAD_FMT "\n", ++ NIPQUAD(nxi->v4_bcast.s_addr)); ++ buffer += sprintf (buffer, ++ "V4Root[lback]:\t" NIPQUAD_FMT "\n", ++ NIPQUAD(nxi->v4_lback.s_addr)); ++ if (!NX_IPV4(nxi)) ++ goto skip_v4; ++ for (i = 0, v4a = &nxi->v4; v4a; i++, v4a = v4a->next) ++ buffer += sprintf(buffer, "V4Root[%d]:\t" NXAV4_FMT "\n", ++ i, NXAV4(v4a)); ++skip_v4: ++#ifdef CONFIG_IPV6 ++ if (!NX_IPV6(nxi)) ++ goto skip_v6; ++ for (i = 0, v6a = &nxi->v6; v6a; i++, v6a = v6a->next) ++ buffer += sprintf(buffer, "V6Root[%d]:\t" NXAV6_FMT "\n", ++ i, NXAV6(v6a)); ++skip_v6: ++#endif ++ put_nx_info(nxi); ++out: ++ return buffer - orig; ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/sched.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/sched.c +--- linux-2.6.31.6/kernel/vserver/sched.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/sched.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,414 @@ ++/* ++ * linux/kernel/vserver/sched.c ++ * ++ * Virtual Server: Scheduler Support ++ * ++ * Copyright (C) 2004-2007 Herbert Pötzl ++ * ++ * V0.01 adapted Sam Vilains version to 2.6.3 ++ * V0.02 removed legacy interface ++ * V0.03 changed vcmds to vxi arg ++ * V0.04 removed older and legacy interfaces ++ * ++ */ ++ ++#include ++#include ++#include ++ ++#include ++ ++ ++#define vxd_check_range(val, min, max) do { \ ++ vxlprintk((val < min) || (val > max), \ ++ "check_range(%ld,%ld,%ld)", \ ++ (long)val, (long)min, (long)max, \ ++ __FILE__, __LINE__); \ ++ } while (0) ++ ++ ++void vx_update_sched_param(struct _vx_sched *sched, ++ struct _vx_sched_pc *sched_pc) ++{ ++ unsigned int set_mask = sched->update_mask; ++ ++ if (set_mask & VXSM_FILL_RATE) ++ sched_pc->fill_rate[0] = sched->fill_rate[0]; ++ if (set_mask & VXSM_INTERVAL) ++ sched_pc->interval[0] = sched->interval[0]; ++ if (set_mask & VXSM_FILL_RATE2) ++ sched_pc->fill_rate[1] = sched->fill_rate[1]; ++ if (set_mask & VXSM_INTERVAL2) ++ sched_pc->interval[1] = sched->interval[1]; ++ if (set_mask & VXSM_TOKENS) ++ sched_pc->tokens = sched->tokens; ++ if (set_mask & VXSM_TOKENS_MIN) ++ sched_pc->tokens_min = sched->tokens_min; ++ if (set_mask & VXSM_TOKENS_MAX) ++ sched_pc->tokens_max = sched->tokens_max; ++ if (set_mask & VXSM_PRIO_BIAS) ++ sched_pc->prio_bias = sched->prio_bias; ++ ++ if (set_mask & VXSM_IDLE_TIME) ++ sched_pc->flags |= VXSF_IDLE_TIME; ++ else ++ sched_pc->flags &= ~VXSF_IDLE_TIME; ++ ++ /* reset time */ ++ sched_pc->norm_time = jiffies; ++} ++ ++ ++/* ++ * recalculate the context's scheduling tokens ++ * ++ * ret > 0 : number of tokens available ++ * ret < 0 : on hold, check delta_min[] ++ * -1 only jiffies ++ * -2 also idle time ++ * ++ */ ++int vx_tokens_recalc(struct _vx_sched_pc *sched_pc, ++ unsigned long *norm_time, unsigned long *idle_time, int delta_min[2]) ++{ ++ long delta; ++ long tokens = 0; ++ int flags = sched_pc->flags; ++ ++ /* how much time did pass? */ ++ delta = *norm_time - sched_pc->norm_time; ++ // printk("@ %ld, %ld, %ld\n", *norm_time, sched_pc->norm_time, jiffies); ++ vxd_check_range(delta, 0, INT_MAX); ++ ++ if (delta >= sched_pc->interval[0]) { ++ long tokens, integral; ++ ++ /* calc integral token part */ ++ tokens = delta / sched_pc->interval[0]; ++ integral = tokens * sched_pc->interval[0]; ++ tokens *= sched_pc->fill_rate[0]; ++#ifdef CONFIG_VSERVER_HARDCPU ++ delta_min[0] = delta - integral; ++ vxd_check_range(delta_min[0], 0, sched_pc->interval[0]); ++#endif ++ /* advance time */ ++ sched_pc->norm_time += delta; ++ ++ /* add tokens */ ++ sched_pc->tokens += tokens; ++ sched_pc->token_time += tokens; ++ } else ++ delta_min[0] = delta; ++ ++#ifdef CONFIG_VSERVER_IDLETIME ++ if (!(flags & VXSF_IDLE_TIME)) ++ goto skip_idle; ++ ++ /* how much was the idle skip? */ ++ delta = *idle_time - sched_pc->idle_time; ++ vxd_check_range(delta, 0, INT_MAX); ++ ++ if (delta >= sched_pc->interval[1]) { ++ long tokens, integral; ++ ++ /* calc fair share token part */ ++ tokens = delta / sched_pc->interval[1]; ++ integral = tokens * sched_pc->interval[1]; ++ tokens *= sched_pc->fill_rate[1]; ++ delta_min[1] = delta - integral; ++ vxd_check_range(delta_min[1], 0, sched_pc->interval[1]); ++ ++ /* advance idle time */ ++ sched_pc->idle_time += integral; ++ ++ /* add tokens */ ++ sched_pc->tokens += tokens; ++ sched_pc->token_time += tokens; ++ } else ++ delta_min[1] = delta; ++skip_idle: ++#endif ++ ++ /* clip at maximum */ ++ if (sched_pc->tokens > sched_pc->tokens_max) ++ sched_pc->tokens = sched_pc->tokens_max; ++ tokens = sched_pc->tokens; ++ ++ if ((flags & VXSF_ONHOLD)) { ++ /* can we unhold? */ ++ if (tokens >= sched_pc->tokens_min) { ++ flags &= ~VXSF_ONHOLD; ++ sched_pc->hold_ticks += ++ *norm_time - sched_pc->onhold; ++ } else ++ goto on_hold; ++ } else { ++ /* put on hold? */ ++ if (tokens <= 0) { ++ flags |= VXSF_ONHOLD; ++ sched_pc->onhold = *norm_time; ++ goto on_hold; ++ } ++ } ++ sched_pc->flags = flags; ++ return tokens; ++ ++on_hold: ++ tokens = sched_pc->tokens_min - tokens; ++ sched_pc->flags = flags; ++ // BUG_ON(tokens < 0); probably doesn't hold anymore ++ ++#ifdef CONFIG_VSERVER_HARDCPU ++ /* next interval? */ ++ if (!sched_pc->fill_rate[0]) ++ delta_min[0] = HZ; ++ else if (tokens > sched_pc->fill_rate[0]) ++ delta_min[0] += sched_pc->interval[0] * ++ tokens / sched_pc->fill_rate[0]; ++ else ++ delta_min[0] = sched_pc->interval[0] - delta_min[0]; ++ vxd_check_range(delta_min[0], 0, INT_MAX); ++ ++#ifdef CONFIG_VSERVER_IDLETIME ++ if (!(flags & VXSF_IDLE_TIME)) ++ return -1; ++ ++ /* next interval? */ ++ if (!sched_pc->fill_rate[1]) ++ delta_min[1] = HZ; ++ else if (tokens > sched_pc->fill_rate[1]) ++ delta_min[1] += sched_pc->interval[1] * ++ tokens / sched_pc->fill_rate[1]; ++ else ++ delta_min[1] = sched_pc->interval[1] - delta_min[1]; ++ vxd_check_range(delta_min[1], 0, INT_MAX); ++ ++ return -2; ++#else ++ return -1; ++#endif /* CONFIG_VSERVER_IDLETIME */ ++#else ++ return 0; ++#endif /* CONFIG_VSERVER_HARDCPU */ ++} ++ ++static inline unsigned long msec_to_ticks(unsigned long msec) ++{ ++ return msecs_to_jiffies(msec); ++} ++ ++static inline unsigned long ticks_to_msec(unsigned long ticks) ++{ ++ return jiffies_to_msecs(ticks); ++} ++ ++static inline unsigned long ticks_to_usec(unsigned long ticks) ++{ ++ return jiffies_to_usecs(ticks); ++} ++ ++ ++static int do_set_sched(struct vx_info *vxi, struct vcmd_sched_v5 *data) ++{ ++ unsigned int set_mask = data->mask; ++ unsigned int update_mask; ++ int i, cpu; ++ ++ /* Sanity check data values */ ++ if (data->tokens_max <= 0) ++ data->tokens_max = HZ; ++ if (data->tokens_min < 0) ++ data->tokens_min = HZ / 3; ++ if (data->tokens_min >= data->tokens_max) ++ data->tokens_min = data->tokens_max; ++ ++ if (data->prio_bias > MAX_PRIO_BIAS) ++ data->prio_bias = MAX_PRIO_BIAS; ++ if (data->prio_bias < MIN_PRIO_BIAS) ++ data->prio_bias = MIN_PRIO_BIAS; ++ ++ spin_lock(&vxi->sched.tokens_lock); ++ ++ /* sync up on delayed updates */ ++ for_each_cpu_mask(cpu, vxi->sched.update) ++ vx_update_sched_param(&vxi->sched, ++ &vx_per_cpu(vxi, sched_pc, cpu)); ++ ++ if (set_mask & VXSM_FILL_RATE) ++ vxi->sched.fill_rate[0] = data->fill_rate[0]; ++ if (set_mask & VXSM_FILL_RATE2) ++ vxi->sched.fill_rate[1] = data->fill_rate[1]; ++ if (set_mask & VXSM_INTERVAL) ++ vxi->sched.interval[0] = (set_mask & VXSM_MSEC) ? ++ msec_to_ticks(data->interval[0]) : data->interval[0]; ++ if (set_mask & VXSM_INTERVAL2) ++ vxi->sched.interval[1] = (set_mask & VXSM_MSEC) ? ++ msec_to_ticks(data->interval[1]) : data->interval[1]; ++ if (set_mask & VXSM_TOKENS) ++ vxi->sched.tokens = data->tokens; ++ if (set_mask & VXSM_TOKENS_MIN) ++ vxi->sched.tokens_min = data->tokens_min; ++ if (set_mask & VXSM_TOKENS_MAX) ++ vxi->sched.tokens_max = data->tokens_max; ++ if (set_mask & VXSM_PRIO_BIAS) ++ vxi->sched.prio_bias = data->prio_bias; ++ ++ /* Sanity check rate/interval */ ++ for (i = 0; i < 2; i++) { ++ if (data->fill_rate[i] < 0) ++ data->fill_rate[i] = 0; ++ if (data->interval[i] <= 0) ++ data->interval[i] = HZ; ++ } ++ ++ update_mask = vxi->sched.update_mask & VXSM_SET_MASK; ++ update_mask |= (set_mask & (VXSM_SET_MASK | VXSM_IDLE_TIME)); ++ vxi->sched.update_mask = update_mask; ++ ++#ifdef CONFIG_SMP ++ rmb(); ++ if (set_mask & VXSM_CPU_ID) { ++ vxi->sched.update = cpumask_of_cpu(data->cpu_id); ++ cpus_and(vxi->sched.update, cpu_online_map, ++ vxi->sched.update); ++ } else ++ vxi->sched.update = cpu_online_map; ++ ++ /* forced reload? */ ++ if (set_mask & VXSM_FORCE) { ++ for_each_cpu_mask(cpu, vxi->sched.update) ++ vx_update_sched_param(&vxi->sched, ++ &vx_per_cpu(vxi, sched_pc, cpu)); ++ vxi->sched.update = CPU_MASK_NONE; ++ } ++#else ++ /* on UP we update immediately */ ++ vx_update_sched_param(&vxi->sched, ++ &vx_per_cpu(vxi, sched_pc, 0)); ++#endif ++ ++ spin_unlock(&vxi->sched.tokens_lock); ++ return 0; ++} ++ ++ ++#define COPY_IDS(C) C(cpu_id); C(bucket_id) ++#define COPY_PRI(C) C(prio_bias) ++#define COPY_TOK(C) C(tokens); C(tokens_min); C(tokens_max) ++#define COPY_FRI(C) C(fill_rate[0]); C(interval[0]); \ ++ C(fill_rate[1]); C(interval[1]); ++ ++#define COPY_VALUE(name) vc_data.name = data->name ++ ++static int do_set_sched_v4(struct vx_info *vxi, struct vcmd_set_sched_v4 *data) ++{ ++ struct vcmd_sched_v5 vc_data; ++ ++ vc_data.mask = data->set_mask; ++ COPY_IDS(COPY_VALUE); ++ COPY_PRI(COPY_VALUE); ++ COPY_TOK(COPY_VALUE); ++ vc_data.fill_rate[0] = vc_data.fill_rate[1] = data->fill_rate; ++ vc_data.interval[0] = vc_data.interval[1] = data->interval; ++ return do_set_sched(vxi, &vc_data); ++} ++ ++int vc_set_sched_v4(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_set_sched_v4 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_set_sched_v4(vxi, &vc_data); ++} ++ ++ /* latest interface is v5 */ ++ ++int vc_set_sched(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_sched_v5 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return do_set_sched(vxi, &vc_data); ++} ++ ++ ++#define COPY_PRI(C) C(prio_bias) ++#define COPY_TOK(C) C(tokens); C(tokens_min); C(tokens_max) ++#define COPY_FRI(C) C(fill_rate[0]); C(interval[0]); \ ++ C(fill_rate[1]); C(interval[1]); ++ ++#define COPY_VALUE(name) vc_data.name = data->name ++ ++ ++int vc_get_sched(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_sched_v5 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ if (vc_data.mask & VXSM_CPU_ID) { ++ int cpu = vc_data.cpu_id; ++ struct _vx_sched_pc *data; ++ ++ if (!cpu_possible(cpu)) ++ return -EINVAL; ++ ++ data = &vx_per_cpu(vxi, sched_pc, cpu); ++ COPY_TOK(COPY_VALUE); ++ COPY_PRI(COPY_VALUE); ++ COPY_FRI(COPY_VALUE); ++ ++ if (data->flags & VXSF_IDLE_TIME) ++ vc_data.mask |= VXSM_IDLE_TIME; ++ } else { ++ struct _vx_sched *data = &vxi->sched; ++ ++ COPY_TOK(COPY_VALUE); ++ COPY_PRI(COPY_VALUE); ++ COPY_FRI(COPY_VALUE); ++ } ++ ++ if (vc_data.mask & VXSM_MSEC) { ++ vc_data.interval[0] = ticks_to_msec(vc_data.interval[0]); ++ vc_data.interval[1] = ticks_to_msec(vc_data.interval[1]); ++ } ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ ++ ++int vc_sched_info(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_sched_info vc_data; ++ int cpu; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ cpu = vc_data.cpu_id; ++ if (!cpu_possible(cpu)) ++ return -EINVAL; ++ ++ if (vxi) { ++ struct _vx_sched_pc *sched_pc = ++ &vx_per_cpu(vxi, sched_pc, cpu); ++ ++ vc_data.user_msec = ticks_to_msec(sched_pc->user_ticks); ++ vc_data.sys_msec = ticks_to_msec(sched_pc->sys_ticks); ++ vc_data.hold_msec = ticks_to_msec(sched_pc->hold_ticks); ++ vc_data.vavavoom = sched_pc->vavavoom; ++ } ++ vc_data.token_usec = ticks_to_usec(1); ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ return -EFAULT; ++ return 0; ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/sched_init.h linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/sched_init.h +--- linux-2.6.31.6/kernel/vserver/sched_init.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/sched_init.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,50 @@ ++ ++static inline void vx_info_init_sched(struct _vx_sched *sched) ++{ ++ static struct lock_class_key tokens_lock_key; ++ ++ /* scheduling; hard code starting values as constants */ ++ sched->fill_rate[0] = 1; ++ sched->interval[0] = 4; ++ sched->fill_rate[1] = 1; ++ sched->interval[1] = 8; ++ sched->tokens = HZ >> 2; ++ sched->tokens_min = HZ >> 4; ++ sched->tokens_max = HZ >> 1; ++ sched->tokens_lock = SPIN_LOCK_UNLOCKED; ++ sched->prio_bias = 0; ++ ++ lockdep_set_class(&sched->tokens_lock, &tokens_lock_key); ++} ++ ++static inline ++void vx_info_init_sched_pc(struct _vx_sched_pc *sched_pc, int cpu) ++{ ++ sched_pc->fill_rate[0] = 1; ++ sched_pc->interval[0] = 4; ++ sched_pc->fill_rate[1] = 1; ++ sched_pc->interval[1] = 8; ++ sched_pc->tokens = HZ >> 2; ++ sched_pc->tokens_min = HZ >> 4; ++ sched_pc->tokens_max = HZ >> 1; ++ sched_pc->prio_bias = 0; ++ sched_pc->vavavoom = 0; ++ sched_pc->token_time = 0; ++ sched_pc->idle_time = 0; ++ sched_pc->norm_time = jiffies; ++ ++ sched_pc->user_ticks = 0; ++ sched_pc->sys_ticks = 0; ++ sched_pc->hold_ticks = 0; ++} ++ ++static inline void vx_info_exit_sched(struct _vx_sched *sched) ++{ ++ return; ++} ++ ++static inline ++void vx_info_exit_sched_pc(struct _vx_sched_pc *sched_pc, int cpu) ++{ ++ return; ++} +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/sched_proc.h linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/sched_proc.h +--- linux-2.6.31.6/kernel/vserver/sched_proc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/sched_proc.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,57 @@ ++#ifndef _VX_SCHED_PROC_H ++#define _VX_SCHED_PROC_H ++ ++ ++static inline ++int vx_info_proc_sched(struct _vx_sched *sched, char *buffer) ++{ ++ int length = 0; ++ ++ length += sprintf(buffer, ++ "FillRate:\t%8d,%d\n" ++ "Interval:\t%8d,%d\n" ++ "TokensMin:\t%8d\n" ++ "TokensMax:\t%8d\n" ++ "PrioBias:\t%8d\n", ++ sched->fill_rate[0], ++ sched->fill_rate[1], ++ sched->interval[0], ++ sched->interval[1], ++ sched->tokens_min, ++ sched->tokens_max, ++ sched->prio_bias); ++ return length; ++} ++ ++static inline ++int vx_info_proc_sched_pc(struct _vx_sched_pc *sched_pc, ++ char *buffer, int cpu) ++{ ++ int length = 0; ++ ++ length += sprintf(buffer + length, ++ "cpu %d: %lld %lld %lld %ld %ld", cpu, ++ (unsigned long long)sched_pc->user_ticks, ++ (unsigned long long)sched_pc->sys_ticks, ++ (unsigned long long)sched_pc->hold_ticks, ++ sched_pc->token_time, ++ sched_pc->idle_time); ++ length += sprintf(buffer + length, ++ " %c%c %d %d %d %d/%d %d/%d", ++ (sched_pc->flags & VXSF_ONHOLD) ? 'H' : 'R', ++ (sched_pc->flags & VXSF_IDLE_TIME) ? 'I' : '-', ++ sched_pc->tokens, ++ sched_pc->tokens_min, ++ sched_pc->tokens_max, ++ sched_pc->fill_rate[0], ++ sched_pc->interval[0], ++ sched_pc->fill_rate[1], ++ sched_pc->interval[1]); ++ length += sprintf(buffer + length, ++ " %d %d\n", ++ sched_pc->prio_bias, ++ sched_pc->vavavoom); ++ return length; ++} ++ ++#endif /* _VX_SCHED_PROC_H */ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/signal.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/signal.c +--- linux-2.6.31.6/kernel/vserver/signal.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/signal.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,132 @@ ++/* ++ * linux/kernel/vserver/signal.c ++ * ++ * Virtual Server: Signal Support ++ * ++ * Copyright (C) 2003-2007 Herbert Pötzl ++ * ++ * V0.01 broken out from vcontext V0.05 ++ * V0.02 changed vcmds to vxi arg ++ * V0.03 adjusted siginfo for kill ++ * ++ */ ++ ++#include ++ ++#include ++#include ++#include ++ ++ ++int vx_info_kill(struct vx_info *vxi, int pid, int sig) ++{ ++ int retval, count = 0; ++ struct task_struct *p; ++ struct siginfo *sip = SEND_SIG_PRIV; ++ ++ retval = -ESRCH; ++ vxdprintk(VXD_CBIT(misc, 4), ++ "vx_info_kill(%p[#%d],%d,%d)*", ++ vxi, vxi->vx_id, pid, sig); ++ read_lock(&tasklist_lock); ++ switch (pid) { ++ case 0: ++ case -1: ++ for_each_process(p) { ++ int err = 0; ++ ++ if (vx_task_xid(p) != vxi->vx_id || p->pid <= 1 || ++ (pid && vxi->vx_initpid == p->pid)) ++ continue; ++ ++ err = group_send_sig_info(sig, sip, p); ++ ++count; ++ if (err != -EPERM) ++ retval = err; ++ } ++ break; ++ ++ case 1: ++ if (vxi->vx_initpid) { ++ pid = vxi->vx_initpid; ++ /* for now, only SIGINT to private init ... */ ++ if (!vx_info_flags(vxi, VXF_STATE_ADMIN, 0) && ++ /* ... as long as there are tasks left */ ++ (atomic_read(&vxi->vx_tasks) > 1)) ++ sig = SIGINT; ++ } ++ /* fallthrough */ ++ default: ++ p = find_task_by_real_pid(pid); ++ if (p) { ++ if (vx_task_xid(p) == vxi->vx_id) ++ retval = group_send_sig_info(sig, sip, p); ++ } ++ break; ++ } ++ read_unlock(&tasklist_lock); ++ vxdprintk(VXD_CBIT(misc, 4), ++ "vx_info_kill(%p[#%d],%d,%d,%ld) = %d", ++ vxi, vxi->vx_id, pid, sig, (long)sip, retval); ++ return retval; ++} ++ ++int vc_ctx_kill(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_ctx_kill_v0 vc_data; ++ ++ if (copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ /* special check to allow guest shutdown */ ++ if (!vx_info_flags(vxi, VXF_STATE_ADMIN, 0) && ++ /* forbid killall pid=0 when init is present */ ++ (((vc_data.pid < 1) && vxi->vx_initpid) || ++ (vc_data.pid > 1))) ++ return -EACCES; ++ ++ return vx_info_kill(vxi, vc_data.pid, vc_data.sig); ++} ++ ++ ++static int __wait_exit(struct vx_info *vxi) ++{ ++ DECLARE_WAITQUEUE(wait, current); ++ int ret = 0; ++ ++ add_wait_queue(&vxi->vx_wait, &wait); ++ set_current_state(TASK_INTERRUPTIBLE); ++ ++wait: ++ if (vx_info_state(vxi, ++ VXS_SHUTDOWN | VXS_HASHED | VXS_HELPER) == VXS_SHUTDOWN) ++ goto out; ++ if (signal_pending(current)) { ++ ret = -ERESTARTSYS; ++ goto out; ++ } ++ schedule(); ++ goto wait; ++ ++out: ++ set_current_state(TASK_RUNNING); ++ remove_wait_queue(&vxi->vx_wait, &wait); ++ return ret; ++} ++ ++ ++ ++int vc_wait_exit(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_wait_exit_v0 vc_data; ++ int ret; ++ ++ ret = __wait_exit(vxi); ++ vc_data.reboot_cmd = vxi->reboot_cmd; ++ vc_data.exit_code = vxi->exit_code; ++ ++ if (copy_to_user(data, &vc_data, sizeof(vc_data))) ++ ret = -EFAULT; ++ return ret; ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/space.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/space.c +--- linux-2.6.31.6/kernel/vserver/space.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/space.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,375 @@ ++/* ++ * linux/kernel/vserver/space.c ++ * ++ * Virtual Server: Context Space Support ++ * ++ * Copyright (C) 2003-2007 Herbert Pötzl ++ * ++ * V0.01 broken out from context.c 0.07 ++ * V0.02 added task locking for namespace ++ * V0.03 broken out vx_enter_namespace ++ * V0.04 added *space support and commands ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++atomic_t vs_global_nsproxy = ATOMIC_INIT(0); ++atomic_t vs_global_fs = ATOMIC_INIT(0); ++atomic_t vs_global_mnt_ns = ATOMIC_INIT(0); ++atomic_t vs_global_uts_ns = ATOMIC_INIT(0); ++atomic_t vs_global_user_ns = ATOMIC_INIT(0); ++atomic_t vs_global_pid_ns = ATOMIC_INIT(0); ++ ++ ++/* namespace functions */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++static const struct vcmd_space_mask_v1 space_mask_v0 = { ++ .mask = CLONE_FS | ++ CLONE_NEWNS | ++ CLONE_NEWUTS | ++ CLONE_NEWIPC | ++ CLONE_NEWUSER | ++ 0 ++}; ++ ++static const struct vcmd_space_mask_v1 space_mask = { ++ .mask = CLONE_FS | ++ CLONE_NEWNS | ++ CLONE_NEWUTS | ++ CLONE_NEWIPC | ++ CLONE_NEWUSER | ++#ifdef CONFIG_PID_NS ++ CLONE_NEWPID | ++#endif ++#ifdef CONFIG_NET_NS ++ CLONE_NEWNET | ++#endif ++ 0 ++}; ++ ++static const struct vcmd_space_mask_v1 default_space_mask = { ++ .mask = CLONE_FS | ++ CLONE_NEWNS | ++ CLONE_NEWUTS | ++ CLONE_NEWIPC | ++ CLONE_NEWUSER | ++#ifdef CONFIG_PID_NS ++// CLONE_NEWPID | ++#endif ++ 0 ++}; ++ ++/* ++ * build a new nsproxy mix ++ * assumes that both proxies are 'const' ++ * does not touch nsproxy refcounts ++ * will hold a reference on the result. ++ */ ++ ++struct nsproxy *vs_mix_nsproxy(struct nsproxy *old_nsproxy, ++ struct nsproxy *new_nsproxy, unsigned long mask) ++{ ++ struct mnt_namespace *old_ns; ++ struct uts_namespace *old_uts; ++ struct ipc_namespace *old_ipc; ++#ifdef CONFIG_PID_NS ++ struct pid_namespace *old_pid; ++#endif ++#ifdef CONFIG_NET_NS ++ struct net *old_net; ++#endif ++ struct nsproxy *nsproxy; ++ ++ nsproxy = copy_nsproxy(old_nsproxy); ++ if (!nsproxy) ++ goto out; ++ ++ if (mask & CLONE_NEWNS) { ++ old_ns = nsproxy->mnt_ns; ++ nsproxy->mnt_ns = new_nsproxy->mnt_ns; ++ if (nsproxy->mnt_ns) ++ get_mnt_ns(nsproxy->mnt_ns); ++ } else ++ old_ns = NULL; ++ ++ if (mask & CLONE_NEWUTS) { ++ old_uts = nsproxy->uts_ns; ++ nsproxy->uts_ns = new_nsproxy->uts_ns; ++ if (nsproxy->uts_ns) ++ get_uts_ns(nsproxy->uts_ns); ++ } else ++ old_uts = NULL; ++ ++ if (mask & CLONE_NEWIPC) { ++ old_ipc = nsproxy->ipc_ns; ++ nsproxy->ipc_ns = new_nsproxy->ipc_ns; ++ if (nsproxy->ipc_ns) ++ get_ipc_ns(nsproxy->ipc_ns); ++ } else ++ old_ipc = NULL; ++ ++#ifdef CONFIG_PID_NS ++ if (mask & CLONE_NEWPID) { ++ old_pid = nsproxy->pid_ns; ++ nsproxy->pid_ns = new_nsproxy->pid_ns; ++ if (nsproxy->pid_ns) ++ get_pid_ns(nsproxy->pid_ns); ++ } else ++ old_pid = NULL; ++#endif ++#ifdef CONFIG_NET_NS ++ if (mask & CLONE_NEWNET) { ++ old_net = nsproxy->net_ns; ++ nsproxy->net_ns = new_nsproxy->net_ns; ++ if (nsproxy->net_ns) ++ get_net(nsproxy->net_ns); ++ } else ++ old_net = NULL; ++#endif ++ if (old_ns) ++ put_mnt_ns(old_ns); ++ if (old_uts) ++ put_uts_ns(old_uts); ++ if (old_ipc) ++ put_ipc_ns(old_ipc); ++#ifdef CONFIG_PID_NS ++ if (old_pid) ++ put_pid_ns(old_pid); ++#endif ++#ifdef CONFIG_NET_NS ++ if (old_net) ++ put_net(old_net); ++#endif ++out: ++ return nsproxy; ++} ++ ++ ++/* ++ * merge two nsproxy structs into a new one. ++ * will hold a reference on the result. ++ */ ++ ++static inline ++struct nsproxy *__vs_merge_nsproxy(struct nsproxy *old, ++ struct nsproxy *proxy, unsigned long mask) ++{ ++ struct nsproxy null_proxy = { .mnt_ns = NULL }; ++ ++ if (!proxy) ++ return NULL; ++ ++ if (mask) { ++ /* vs_mix_nsproxy returns with reference */ ++ return vs_mix_nsproxy(old ? old : &null_proxy, ++ proxy, mask); ++ } ++ get_nsproxy(proxy); ++ return proxy; ++} ++ ++ ++int vx_enter_space(struct vx_info *vxi, unsigned long mask, unsigned index) ++{ ++ struct nsproxy *proxy, *proxy_cur, *proxy_new; ++ struct fs_struct *fs_cur, *fs = NULL; ++ int ret, kill = 0; ++ ++ vxdprintk(VXD_CBIT(space, 8), "vx_enter_space(%p[#%u],0x%08lx,%d)", ++ vxi, vxi->vx_id, mask, index); ++ ++ if (vx_info_flags(vxi, VXF_INFO_PRIVATE, 0)) ++ return -EACCES; ++ ++ if (!mask) ++ mask = vxi->vx_nsmask[index]; ++ ++ if ((mask & vxi->vx_nsmask[index]) != mask) ++ return -EINVAL; ++ ++ if (mask & CLONE_FS) { ++ fs = copy_fs_struct(vxi->vx_fs[index]); ++ if (!fs) ++ return -ENOMEM; ++ } ++ proxy = vxi->vx_nsproxy[index]; ++ ++ vxdprintk(VXD_CBIT(space, 9), ++ "vx_enter_space(%p[#%u],0x%08lx,%d) -> (%p,%p)", ++ vxi, vxi->vx_id, mask, index, proxy, fs); ++ ++ task_lock(current); ++ fs_cur = current->fs; ++ ++ if (mask & CLONE_FS) { ++ write_lock(&fs_cur->lock); ++ current->fs = fs; ++ kill = !--fs_cur->users; ++ write_unlock(&fs_cur->lock); ++ } ++ ++ proxy_cur = current->nsproxy; ++ get_nsproxy(proxy_cur); ++ task_unlock(current); ++ ++ if (kill) ++ free_fs_struct(fs_cur); ++ ++ proxy_new = __vs_merge_nsproxy(proxy_cur, proxy, mask); ++ if (IS_ERR(proxy_new)) { ++ ret = PTR_ERR(proxy_new); ++ goto out_put; ++ } ++ ++ proxy_new = xchg(¤t->nsproxy, proxy_new); ++ ret = 0; ++ ++ if (proxy_new) ++ put_nsproxy(proxy_new); ++out_put: ++ if (proxy_cur) ++ put_nsproxy(proxy_cur); ++ return ret; ++} ++ ++ ++int vx_set_space(struct vx_info *vxi, unsigned long mask, unsigned index) ++{ ++ struct nsproxy *proxy_vxi, *proxy_cur, *proxy_new; ++ struct fs_struct *fs_vxi, *fs; ++ int ret, kill = 0; ++ ++ vxdprintk(VXD_CBIT(space, 8), "vx_set_space(%p[#%u],0x%08lx,%d)", ++ vxi, vxi->vx_id, mask, index); ++#if 0 ++ if (!mask) ++ mask = default_space_mask.mask; ++#endif ++ if ((mask & space_mask.mask) != mask) ++ return -EINVAL; ++ ++ proxy_vxi = vxi->vx_nsproxy[index]; ++ fs_vxi = vxi->vx_fs[index]; ++ ++ if (mask & CLONE_FS) { ++ fs = copy_fs_struct(current->fs); ++ if (!fs) ++ return -ENOMEM; ++ } ++ ++ task_lock(current); ++ ++ if (mask & CLONE_FS) { ++ write_lock(&fs_vxi->lock); ++ vxi->vx_fs[index] = fs; ++ kill = !--fs_vxi->users; ++ write_unlock(&fs_vxi->lock); ++ } ++ ++ proxy_cur = current->nsproxy; ++ get_nsproxy(proxy_cur); ++ task_unlock(current); ++ ++ if (kill) ++ free_fs_struct(fs_vxi); ++ ++ proxy_new = __vs_merge_nsproxy(proxy_vxi, proxy_cur, mask); ++ if (IS_ERR(proxy_new)) { ++ ret = PTR_ERR(proxy_new); ++ goto out_put; ++ } ++ ++ proxy_new = xchg(&vxi->vx_nsproxy[index], proxy_new); ++ vxi->vx_nsmask[index] |= mask; ++ ret = 0; ++ ++ if (proxy_new) ++ put_nsproxy(proxy_new); ++out_put: ++ if (proxy_cur) ++ put_nsproxy(proxy_cur); ++ return ret; ++} ++ ++ ++int vc_enter_space_v1(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_space_mask_v1 vc_data = { .mask = 0 }; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return vx_enter_space(vxi, vc_data.mask, 0); ++} ++ ++int vc_enter_space(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_space_mask_v2 vc_data = { .mask = 0 }; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ if (vc_data.index >= VX_SPACES) ++ return -EINVAL; ++ ++ return vx_enter_space(vxi, vc_data.mask, vc_data.index); ++} ++ ++int vc_set_space_v1(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_space_mask_v1 vc_data = { .mask = 0 }; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ return vx_set_space(vxi, vc_data.mask, 0); ++} ++ ++int vc_set_space(struct vx_info *vxi, void __user *data) ++{ ++ struct vcmd_space_mask_v2 vc_data = { .mask = 0 }; ++ ++ if (data && copy_from_user(&vc_data, data, sizeof(vc_data))) ++ return -EFAULT; ++ ++ if (vc_data.index >= VX_SPACES) ++ return -EINVAL; ++ ++ return vx_set_space(vxi, vc_data.mask, vc_data.index); ++} ++ ++int vc_get_space_mask(void __user *data, int type) ++{ ++ const struct vcmd_space_mask_v1 *mask; ++ ++ if (type == 0) ++ mask = &space_mask_v0; ++ else if (type == 1) ++ mask = &space_mask; ++ else ++ mask = &default_space_mask; ++ ++ vxdprintk(VXD_CBIT(space, 10), ++ "vc_get_space_mask(%d) = %08llx", type, mask->mask); ++ ++ if (copy_to_user(data, mask, sizeof(*mask))) ++ return -EFAULT; ++ return 0; ++} ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/switch.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/switch.c +--- linux-2.6.31.6/kernel/vserver/switch.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/switch.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,546 @@ ++/* ++ * linux/kernel/vserver/switch.c ++ * ++ * Virtual Server: Syscall Switch ++ * ++ * Copyright (C) 2003-2007 Herbert Pötzl ++ * ++ * V0.01 syscall switch ++ * V0.02 added signal to context ++ * V0.03 added rlimit functions ++ * V0.04 added iattr, task/xid functions ++ * V0.05 added debug/history stuff ++ * V0.06 added compat32 layer ++ * V0.07 vcmd args and perms ++ * V0.08 added status commands ++ * V0.09 added tag commands ++ * V0.10 added oom bias ++ * V0.11 added device commands ++ * ++ */ ++ ++#include ++#include ++#include ++ ++#include "vci_config.h" ++ ++ ++static inline ++int vc_get_version(uint32_t id) ++{ ++ return VCI_VERSION; ++} ++ ++static inline ++int vc_get_vci(uint32_t id) ++{ ++ return vci_kernel_config(); ++} ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++ ++#ifdef CONFIG_COMPAT ++#define __COMPAT(name, id, data, compat) \ ++ (compat) ? name ## _x32(id, data) : name(id, data) ++#define __COMPAT_NO_ID(name, data, compat) \ ++ (compat) ? name ## _x32(data) : name(data) ++#else ++#define __COMPAT(name, id, data, compat) \ ++ name(id, data) ++#define __COMPAT_NO_ID(name, data, compat) \ ++ name(data) ++#endif ++ ++ ++static inline ++long do_vcmd(uint32_t cmd, uint32_t id, ++ struct vx_info *vxi, struct nx_info *nxi, ++ void __user *data, int compat) ++{ ++ switch (cmd) { ++ ++ case VCMD_get_version: ++ return vc_get_version(id); ++ case VCMD_get_vci: ++ return vc_get_vci(id); ++ ++ case VCMD_task_xid: ++ return vc_task_xid(id); ++ case VCMD_vx_info: ++ return vc_vx_info(vxi, data); ++ ++ case VCMD_task_nid: ++ return vc_task_nid(id); ++ case VCMD_nx_info: ++ return vc_nx_info(nxi, data); ++ ++ case VCMD_task_tag: ++ return vc_task_tag(id); ++ ++ case VCMD_set_space_v1: ++ return vc_set_space_v1(vxi, data); ++ /* this is version 2 */ ++ case VCMD_set_space: ++ return vc_set_space(vxi, data); ++ ++ case VCMD_get_space_mask_v0: ++ return vc_get_space_mask(data, 0); ++ /* this is version 1 */ ++ case VCMD_get_space_mask: ++ return vc_get_space_mask(data, 1); ++ ++ case VCMD_get_space_default: ++ return vc_get_space_mask(data, -1); ++ ++#ifdef CONFIG_IA32_EMULATION ++ case VCMD_get_rlimit: ++ return __COMPAT(vc_get_rlimit, vxi, data, compat); ++ case VCMD_set_rlimit: ++ return __COMPAT(vc_set_rlimit, vxi, data, compat); ++#else ++ case VCMD_get_rlimit: ++ return vc_get_rlimit(vxi, data); ++ case VCMD_set_rlimit: ++ return vc_set_rlimit(vxi, data); ++#endif ++ case VCMD_get_rlimit_mask: ++ return vc_get_rlimit_mask(id, data); ++ case VCMD_reset_hits: ++ return vc_reset_hits(vxi, data); ++ case VCMD_reset_minmax: ++ return vc_reset_minmax(vxi, data); ++ ++ case VCMD_get_vhi_name: ++ return vc_get_vhi_name(vxi, data); ++ case VCMD_set_vhi_name: ++ return vc_set_vhi_name(vxi, data); ++ ++ case VCMD_ctx_stat: ++ return vc_ctx_stat(vxi, data); ++ case VCMD_virt_stat: ++ return vc_virt_stat(vxi, data); ++ case VCMD_sock_stat: ++ return vc_sock_stat(vxi, data); ++ case VCMD_rlimit_stat: ++ return vc_rlimit_stat(vxi, data); ++ ++ case VCMD_set_cflags: ++ return vc_set_cflags(vxi, data); ++ case VCMD_get_cflags: ++ return vc_get_cflags(vxi, data); ++ ++ /* this is version 1 */ ++ case VCMD_set_ccaps: ++ return vc_set_ccaps(vxi, data); ++ /* this is version 1 */ ++ case VCMD_get_ccaps: ++ return vc_get_ccaps(vxi, data); ++ case VCMD_set_bcaps: ++ return vc_set_bcaps(vxi, data); ++ case VCMD_get_bcaps: ++ return vc_get_bcaps(vxi, data); ++ ++ case VCMD_set_badness: ++ return vc_set_badness(vxi, data); ++ case VCMD_get_badness: ++ return vc_get_badness(vxi, data); ++ ++ case VCMD_set_nflags: ++ return vc_set_nflags(nxi, data); ++ case VCMD_get_nflags: ++ return vc_get_nflags(nxi, data); ++ ++ case VCMD_set_ncaps: ++ return vc_set_ncaps(nxi, data); ++ case VCMD_get_ncaps: ++ return vc_get_ncaps(nxi, data); ++ ++ case VCMD_set_sched_v4: ++ return vc_set_sched_v4(vxi, data); ++ /* this is version 5 */ ++ case VCMD_set_sched: ++ return vc_set_sched(vxi, data); ++ case VCMD_get_sched: ++ return vc_get_sched(vxi, data); ++ case VCMD_sched_info: ++ return vc_sched_info(vxi, data); ++ ++ case VCMD_add_dlimit: ++ return __COMPAT(vc_add_dlimit, id, data, compat); ++ case VCMD_rem_dlimit: ++ return __COMPAT(vc_rem_dlimit, id, data, compat); ++ case VCMD_set_dlimit: ++ return __COMPAT(vc_set_dlimit, id, data, compat); ++ case VCMD_get_dlimit: ++ return __COMPAT(vc_get_dlimit, id, data, compat); ++ ++ case VCMD_ctx_kill: ++ return vc_ctx_kill(vxi, data); ++ ++ case VCMD_wait_exit: ++ return vc_wait_exit(vxi, data); ++ ++ case VCMD_get_iattr: ++ return __COMPAT_NO_ID(vc_get_iattr, data, compat); ++ case VCMD_set_iattr: ++ return __COMPAT_NO_ID(vc_set_iattr, data, compat); ++ ++ case VCMD_fget_iattr: ++ return vc_fget_iattr(id, data); ++ case VCMD_fset_iattr: ++ return vc_fset_iattr(id, data); ++ ++ case VCMD_enter_space_v0: ++ return vc_enter_space_v1(vxi, NULL); ++ case VCMD_enter_space_v1: ++ return vc_enter_space_v1(vxi, data); ++ /* this is version 2 */ ++ case VCMD_enter_space: ++ return vc_enter_space(vxi, data); ++ ++ case VCMD_ctx_create_v0: ++ return vc_ctx_create(id, NULL); ++ case VCMD_ctx_create: ++ return vc_ctx_create(id, data); ++ case VCMD_ctx_migrate_v0: ++ return vc_ctx_migrate(vxi, NULL); ++ case VCMD_ctx_migrate: ++ return vc_ctx_migrate(vxi, data); ++ ++ case VCMD_net_create_v0: ++ return vc_net_create(id, NULL); ++ case VCMD_net_create: ++ return vc_net_create(id, data); ++ case VCMD_net_migrate: ++ return vc_net_migrate(nxi, data); ++ ++ case VCMD_tag_migrate: ++ return vc_tag_migrate(id); ++ ++ case VCMD_net_add: ++ return vc_net_add(nxi, data); ++ case VCMD_net_remove: ++ return vc_net_remove(nxi, data); ++ ++ case VCMD_net_add_ipv4: ++ return vc_net_add_ipv4(nxi, data); ++ case VCMD_net_remove_ipv4: ++ return vc_net_remove_ipv4(nxi, data); ++#ifdef CONFIG_IPV6 ++ case VCMD_net_add_ipv6: ++ return vc_net_add_ipv6(nxi, data); ++ case VCMD_net_remove_ipv6: ++ return vc_net_remove_ipv6(nxi, data); ++#endif ++/* case VCMD_add_match_ipv4: ++ return vc_add_match_ipv4(nxi, data); ++ case VCMD_get_match_ipv4: ++ return vc_get_match_ipv4(nxi, data); ++#ifdef CONFIG_IPV6 ++ case VCMD_add_match_ipv6: ++ return vc_add_match_ipv6(nxi, data); ++ case VCMD_get_match_ipv6: ++ return vc_get_match_ipv6(nxi, data); ++#endif */ ++ ++#ifdef CONFIG_VSERVER_DEVICE ++ case VCMD_set_mapping: ++ return __COMPAT(vc_set_mapping, vxi, data, compat); ++ case VCMD_unset_mapping: ++ return __COMPAT(vc_unset_mapping, vxi, data, compat); ++#endif ++#ifdef CONFIG_VSERVER_HISTORY ++ case VCMD_dump_history: ++ return vc_dump_history(id); ++ case VCMD_read_history: ++ return __COMPAT(vc_read_history, id, data, compat); ++#endif ++#ifdef CONFIG_VSERVER_MONITOR ++ case VCMD_read_monitor: ++ return __COMPAT(vc_read_monitor, id, data, compat); ++#endif ++ default: ++ vxwprintk_task(1, "unimplemented VCMD_%02d_%d[%d]", ++ VC_CATEGORY(cmd), VC_COMMAND(cmd), VC_VERSION(cmd)); ++ } ++ return -ENOSYS; ++} ++ ++ ++#define __VCMD(vcmd, _perm, _args, _flags) \ ++ case VCMD_ ## vcmd: perm = _perm; \ ++ args = _args; flags = _flags; break ++ ++ ++#define VCA_NONE 0x00 ++#define VCA_VXI 0x01 ++#define VCA_NXI 0x02 ++ ++#define VCF_NONE 0x00 ++#define VCF_INFO 0x01 ++#define VCF_ADMIN 0x02 ++#define VCF_ARES 0x06 /* includes admin */ ++#define VCF_SETUP 0x08 ++ ++#define VCF_ZIDOK 0x10 /* zero id okay */ ++ ++ ++static inline ++long do_vserver(uint32_t cmd, uint32_t id, void __user *data, int compat) ++{ ++ long ret; ++ int permit = -1, state = 0; ++ int perm = -1, args = 0, flags = 0; ++ struct vx_info *vxi = NULL; ++ struct nx_info *nxi = NULL; ++ ++ switch (cmd) { ++ /* unpriviledged commands */ ++ __VCMD(get_version, 0, VCA_NONE, 0); ++ __VCMD(get_vci, 0, VCA_NONE, 0); ++ __VCMD(get_rlimit_mask, 0, VCA_NONE, 0); ++ __VCMD(get_space_mask_v0,0, VCA_NONE, 0); ++ __VCMD(get_space_mask, 0, VCA_NONE, 0); ++ __VCMD(get_space_default,0, VCA_NONE, 0); ++ ++ /* info commands */ ++ __VCMD(task_xid, 2, VCA_NONE, 0); ++ __VCMD(reset_hits, 2, VCA_VXI, 0); ++ __VCMD(reset_minmax, 2, VCA_VXI, 0); ++ __VCMD(vx_info, 3, VCA_VXI, VCF_INFO); ++ __VCMD(get_bcaps, 3, VCA_VXI, VCF_INFO); ++ __VCMD(get_ccaps, 3, VCA_VXI, VCF_INFO); ++ __VCMD(get_cflags, 3, VCA_VXI, VCF_INFO); ++ __VCMD(get_badness, 3, VCA_VXI, VCF_INFO); ++ __VCMD(get_vhi_name, 3, VCA_VXI, VCF_INFO); ++ __VCMD(get_rlimit, 3, VCA_VXI, VCF_INFO); ++ ++ __VCMD(ctx_stat, 3, VCA_VXI, VCF_INFO); ++ __VCMD(virt_stat, 3, VCA_VXI, VCF_INFO); ++ __VCMD(sock_stat, 3, VCA_VXI, VCF_INFO); ++ __VCMD(rlimit_stat, 3, VCA_VXI, VCF_INFO); ++ ++ __VCMD(task_nid, 2, VCA_NONE, 0); ++ __VCMD(nx_info, 3, VCA_NXI, VCF_INFO); ++ __VCMD(get_ncaps, 3, VCA_NXI, VCF_INFO); ++ __VCMD(get_nflags, 3, VCA_NXI, VCF_INFO); ++ ++ __VCMD(task_tag, 2, VCA_NONE, 0); ++ ++ __VCMD(get_iattr, 2, VCA_NONE, 0); ++ __VCMD(fget_iattr, 2, VCA_NONE, 0); ++ __VCMD(get_dlimit, 3, VCA_NONE, VCF_INFO); ++ __VCMD(get_sched, 3, VCA_VXI, VCF_INFO); ++ __VCMD(sched_info, 3, VCA_VXI, VCF_INFO | VCF_ZIDOK); ++ ++ /* lower admin commands */ ++ __VCMD(wait_exit, 4, VCA_VXI, VCF_INFO); ++ __VCMD(ctx_create_v0, 5, VCA_NONE, 0); ++ __VCMD(ctx_create, 5, VCA_NONE, 0); ++ __VCMD(ctx_migrate_v0, 5, VCA_VXI, VCF_ADMIN); ++ __VCMD(ctx_migrate, 5, VCA_VXI, VCF_ADMIN); ++ __VCMD(enter_space_v0, 5, VCA_VXI, VCF_ADMIN); ++ __VCMD(enter_space_v1, 5, VCA_VXI, VCF_ADMIN); ++ __VCMD(enter_space, 5, VCA_VXI, VCF_ADMIN); ++ ++ __VCMD(net_create_v0, 5, VCA_NONE, 0); ++ __VCMD(net_create, 5, VCA_NONE, 0); ++ __VCMD(net_migrate, 5, VCA_NXI, VCF_ADMIN); ++ ++ __VCMD(tag_migrate, 5, VCA_NONE, VCF_ADMIN); ++ ++ /* higher admin commands */ ++ __VCMD(ctx_kill, 6, VCA_VXI, VCF_ARES); ++ __VCMD(set_space_v1, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ __VCMD(set_space, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ ++ __VCMD(set_ccaps, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ __VCMD(set_bcaps, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ __VCMD(set_cflags, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ __VCMD(set_badness, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ ++ __VCMD(set_vhi_name, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ __VCMD(set_rlimit, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ __VCMD(set_sched, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ __VCMD(set_sched_v4, 7, VCA_VXI, VCF_ARES | VCF_SETUP); ++ ++ __VCMD(set_ncaps, 7, VCA_NXI, VCF_ARES | VCF_SETUP); ++ __VCMD(set_nflags, 7, VCA_NXI, VCF_ARES | VCF_SETUP); ++ __VCMD(net_add, 8, VCA_NXI, VCF_ARES | VCF_SETUP); ++ __VCMD(net_remove, 8, VCA_NXI, VCF_ARES | VCF_SETUP); ++ __VCMD(net_add_ipv4, 8, VCA_NXI, VCF_ARES | VCF_SETUP); ++ __VCMD(net_remove_ipv4, 8, VCA_NXI, VCF_ARES | VCF_SETUP); ++#ifdef CONFIG_IPV6 ++ __VCMD(net_add_ipv6, 8, VCA_NXI, VCF_ARES | VCF_SETUP); ++ __VCMD(net_remove_ipv6, 8, VCA_NXI, VCF_ARES | VCF_SETUP); ++#endif ++ __VCMD(set_iattr, 7, VCA_NONE, 0); ++ __VCMD(fset_iattr, 7, VCA_NONE, 0); ++ __VCMD(set_dlimit, 7, VCA_NONE, VCF_ARES); ++ __VCMD(add_dlimit, 8, VCA_NONE, VCF_ARES); ++ __VCMD(rem_dlimit, 8, VCA_NONE, VCF_ARES); ++ ++#ifdef CONFIG_VSERVER_DEVICE ++ __VCMD(set_mapping, 8, VCA_VXI, VCF_ARES|VCF_ZIDOK); ++ __VCMD(unset_mapping, 8, VCA_VXI, VCF_ARES|VCF_ZIDOK); ++#endif ++ /* debug level admin commands */ ++#ifdef CONFIG_VSERVER_HISTORY ++ __VCMD(dump_history, 9, VCA_NONE, 0); ++ __VCMD(read_history, 9, VCA_NONE, 0); ++#endif ++#ifdef CONFIG_VSERVER_MONITOR ++ __VCMD(read_monitor, 9, VCA_NONE, 0); ++#endif ++ ++ default: ++ perm = -1; ++ } ++ ++ vxdprintk(VXD_CBIT(switch, 0), ++ "vc: VCMD_%02d_%d[%d], %d,%p [%d,%d,%x,%x]", ++ VC_CATEGORY(cmd), VC_COMMAND(cmd), ++ VC_VERSION(cmd), id, data, compat, ++ perm, args, flags); ++ ++ ret = -ENOSYS; ++ if (perm < 0) ++ goto out; ++ ++ state = 1; ++ if (!capable(CAP_CONTEXT)) ++ goto out; ++ ++ state = 2; ++ /* moved here from the individual commands */ ++ ret = -EPERM; ++ if ((perm > 1) && !capable(CAP_SYS_ADMIN)) ++ goto out; ++ ++ state = 3; ++ /* vcmd involves resource management */ ++ ret = -EPERM; ++ if ((flags & VCF_ARES) && !capable(CAP_SYS_RESOURCE)) ++ goto out; ++ ++ state = 4; ++ /* various legacy exceptions */ ++ switch (cmd) { ++ /* will go away when spectator is a cap */ ++ case VCMD_ctx_migrate_v0: ++ case VCMD_ctx_migrate: ++ if (id == 1) { ++ current->xid = 1; ++ ret = 1; ++ goto out; ++ } ++ break; ++ ++ /* will go away when spectator is a cap */ ++ case VCMD_net_migrate: ++ if (id == 1) { ++ current->nid = 1; ++ ret = 1; ++ goto out; ++ } ++ break; ++ } ++ ++ /* vcmds are fine by default */ ++ permit = 1; ++ ++ /* admin type vcmds require admin ... */ ++ if (flags & VCF_ADMIN) ++ permit = vx_check(0, VS_ADMIN) ? 1 : 0; ++ ++ /* ... but setup type vcmds override that */ ++ if (!permit && (flags & VCF_SETUP)) ++ permit = vx_flags(VXF_STATE_SETUP, 0) ? 2 : 0; ++ ++ state = 5; ++ ret = -EPERM; ++ if (!permit) ++ goto out; ++ ++ state = 6; ++ if (!id && (flags & VCF_ZIDOK)) ++ goto skip_id; ++ ++ ret = -ESRCH; ++ if (args & VCA_VXI) { ++ vxi = lookup_vx_info(id); ++ if (!vxi) ++ goto out; ++ ++ if ((flags & VCF_ADMIN) && ++ /* special case kill for shutdown */ ++ (cmd != VCMD_ctx_kill) && ++ /* can context be administrated? */ ++ !vx_info_flags(vxi, VXF_STATE_ADMIN, 0)) { ++ ret = -EACCES; ++ goto out_vxi; ++ } ++ } ++ state = 7; ++ if (args & VCA_NXI) { ++ nxi = lookup_nx_info(id); ++ if (!nxi) ++ goto out_vxi; ++ ++ if ((flags & VCF_ADMIN) && ++ /* can context be administrated? */ ++ !nx_info_flags(nxi, NXF_STATE_ADMIN, 0)) { ++ ret = -EACCES; ++ goto out_nxi; ++ } ++ } ++skip_id: ++ state = 8; ++ ret = do_vcmd(cmd, id, vxi, nxi, data, compat); ++ ++out_nxi: ++ if ((args & VCA_NXI) && nxi) ++ put_nx_info(nxi); ++out_vxi: ++ if ((args & VCA_VXI) && vxi) ++ put_vx_info(vxi); ++out: ++ vxdprintk(VXD_CBIT(switch, 1), ++ "vc: VCMD_%02d_%d[%d] = %08lx(%ld) [%d,%d]", ++ VC_CATEGORY(cmd), VC_COMMAND(cmd), ++ VC_VERSION(cmd), ret, ret, state, permit); ++ return ret; ++} ++ ++asmlinkage long ++sys_vserver(uint32_t cmd, uint32_t id, void __user *data) ++{ ++ return do_vserver(cmd, id, data, 0); ++} ++ ++#ifdef CONFIG_COMPAT ++ ++asmlinkage long ++sys32_vserver(uint32_t cmd, uint32_t id, void __user *data) ++{ ++ return do_vserver(cmd, id, data, 1); ++} ++ ++#endif /* CONFIG_COMPAT */ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/sysctl.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/sysctl.c +--- linux-2.6.31.6/kernel/vserver/sysctl.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/sysctl.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,244 @@ ++/* ++ * kernel/vserver/sysctl.c ++ * ++ * Virtual Context Support ++ * ++ * Copyright (C) 2004-2007 Herbert Pötzl ++ * ++ * V0.01 basic structure ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++enum { ++ CTL_DEBUG_ERROR = 0, ++ CTL_DEBUG_SWITCH = 1, ++ CTL_DEBUG_XID, ++ CTL_DEBUG_NID, ++ CTL_DEBUG_TAG, ++ CTL_DEBUG_NET, ++ CTL_DEBUG_LIMIT, ++ CTL_DEBUG_CRES, ++ CTL_DEBUG_DLIM, ++ CTL_DEBUG_QUOTA, ++ CTL_DEBUG_CVIRT, ++ CTL_DEBUG_SPACE, ++ CTL_DEBUG_MISC, ++}; ++ ++ ++unsigned int vx_debug_switch = 0; ++unsigned int vx_debug_xid = 0; ++unsigned int vx_debug_nid = 0; ++unsigned int vx_debug_tag = 0; ++unsigned int vx_debug_net = 0; ++unsigned int vx_debug_limit = 0; ++unsigned int vx_debug_cres = 0; ++unsigned int vx_debug_dlim = 0; ++unsigned int vx_debug_quota = 0; ++unsigned int vx_debug_cvirt = 0; ++unsigned int vx_debug_space = 0; ++unsigned int vx_debug_misc = 0; ++ ++ ++static struct ctl_table_header *vserver_table_header; ++static ctl_table vserver_root_table[]; ++ ++ ++void vserver_register_sysctl(void) ++{ ++ if (!vserver_table_header) { ++ vserver_table_header = register_sysctl_table(vserver_root_table); ++ } ++ ++} ++ ++void vserver_unregister_sysctl(void) ++{ ++ if (vserver_table_header) { ++ unregister_sysctl_table(vserver_table_header); ++ vserver_table_header = NULL; ++ } ++} ++ ++ ++static int proc_dodebug(ctl_table *table, int write, ++ struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) ++{ ++ char tmpbuf[20], *p, c; ++ unsigned int value; ++ size_t left, len; ++ ++ if ((*ppos && !write) || !*lenp) { ++ *lenp = 0; ++ return 0; ++ } ++ ++ left = *lenp; ++ ++ if (write) { ++ if (!access_ok(VERIFY_READ, buffer, left)) ++ return -EFAULT; ++ p = (char *)buffer; ++ while (left && __get_user(c, p) >= 0 && isspace(c)) ++ left--, p++; ++ if (!left) ++ goto done; ++ ++ if (left > sizeof(tmpbuf) - 1) ++ return -EINVAL; ++ if (copy_from_user(tmpbuf, p, left)) ++ return -EFAULT; ++ tmpbuf[left] = '\0'; ++ ++ for (p = tmpbuf, value = 0; '0' <= *p && *p <= '9'; p++, left--) ++ value = 10 * value + (*p - '0'); ++ if (*p && !isspace(*p)) ++ return -EINVAL; ++ while (left && isspace(*p)) ++ left--, p++; ++ *(unsigned int *)table->data = value; ++ } else { ++ if (!access_ok(VERIFY_WRITE, buffer, left)) ++ return -EFAULT; ++ len = sprintf(tmpbuf, "%d", *(unsigned int *)table->data); ++ if (len > left) ++ len = left; ++ if (__copy_to_user(buffer, tmpbuf, len)) ++ return -EFAULT; ++ if ((left -= len) > 0) { ++ if (put_user('\n', (char *)buffer + len)) ++ return -EFAULT; ++ left--; ++ } ++ } ++ ++done: ++ *lenp -= left; ++ *ppos += *lenp; ++ return 0; ++} ++ ++static int zero; ++ ++#define CTL_ENTRY(ctl, name) \ ++ { \ ++ .ctl_name = ctl, \ ++ .procname = #name, \ ++ .data = &vx_ ## name, \ ++ .maxlen = sizeof(int), \ ++ .mode = 0644, \ ++ .proc_handler = &proc_dodebug, \ ++ .strategy = &sysctl_intvec, \ ++ .extra1 = &zero, \ ++ } ++ ++static ctl_table vserver_debug_table[] = { ++ CTL_ENTRY(CTL_DEBUG_SWITCH, debug_switch), ++ CTL_ENTRY(CTL_DEBUG_XID, debug_xid), ++ CTL_ENTRY(CTL_DEBUG_NID, debug_nid), ++ CTL_ENTRY(CTL_DEBUG_TAG, debug_tag), ++ CTL_ENTRY(CTL_DEBUG_NET, debug_net), ++ CTL_ENTRY(CTL_DEBUG_LIMIT, debug_limit), ++ CTL_ENTRY(CTL_DEBUG_CRES, debug_cres), ++ CTL_ENTRY(CTL_DEBUG_DLIM, debug_dlim), ++ CTL_ENTRY(CTL_DEBUG_QUOTA, debug_quota), ++ CTL_ENTRY(CTL_DEBUG_CVIRT, debug_cvirt), ++ CTL_ENTRY(CTL_DEBUG_SPACE, debug_space), ++ CTL_ENTRY(CTL_DEBUG_MISC, debug_misc), ++ { .ctl_name = 0 } ++}; ++ ++static ctl_table vserver_root_table[] = { ++ { ++ .ctl_name = CTL_VSERVER, ++ .procname = "vserver", ++ .mode = 0555, ++ .child = vserver_debug_table ++ }, ++ { .ctl_name = 0 } ++}; ++ ++ ++static match_table_t tokens = { ++ { CTL_DEBUG_SWITCH, "switch=%x" }, ++ { CTL_DEBUG_XID, "xid=%x" }, ++ { CTL_DEBUG_NID, "nid=%x" }, ++ { CTL_DEBUG_TAG, "tag=%x" }, ++ { CTL_DEBUG_NET, "net=%x" }, ++ { CTL_DEBUG_LIMIT, "limit=%x" }, ++ { CTL_DEBUG_CRES, "cres=%x" }, ++ { CTL_DEBUG_DLIM, "dlim=%x" }, ++ { CTL_DEBUG_QUOTA, "quota=%x" }, ++ { CTL_DEBUG_CVIRT, "cvirt=%x" }, ++ { CTL_DEBUG_SPACE, "space=%x" }, ++ { CTL_DEBUG_MISC, "misc=%x" }, ++ { CTL_DEBUG_ERROR, NULL } ++}; ++ ++#define HANDLE_CASE(id, name, val) \ ++ case CTL_DEBUG_ ## id: \ ++ vx_debug_ ## name = val; \ ++ printk("vs_debug_" #name "=0x%x\n", val); \ ++ break ++ ++ ++static int __init vs_debug_setup(char *str) ++{ ++ char *p; ++ int token; ++ ++ printk("vs_debug_setup(%s)\n", str); ++ while ((p = strsep(&str, ",")) != NULL) { ++ substring_t args[MAX_OPT_ARGS]; ++ unsigned int value; ++ ++ if (!*p) ++ continue; ++ ++ token = match_token(p, tokens, args); ++ value = (token > 0) ? simple_strtoul(args[0].from, NULL, 0) : 0; ++ ++ switch (token) { ++ HANDLE_CASE(SWITCH, switch, value); ++ HANDLE_CASE(XID, xid, value); ++ HANDLE_CASE(NID, nid, value); ++ HANDLE_CASE(TAG, tag, value); ++ HANDLE_CASE(NET, net, value); ++ HANDLE_CASE(LIMIT, limit, value); ++ HANDLE_CASE(CRES, cres, value); ++ HANDLE_CASE(DLIM, dlim, value); ++ HANDLE_CASE(QUOTA, quota, value); ++ HANDLE_CASE(CVIRT, cvirt, value); ++ HANDLE_CASE(SPACE, space, value); ++ HANDLE_CASE(MISC, misc, value); ++ default: ++ return -EINVAL; ++ break; ++ } ++ } ++ return 1; ++} ++ ++__setup("vsdebug=", vs_debug_setup); ++ ++ ++ ++EXPORT_SYMBOL_GPL(vx_debug_switch); ++EXPORT_SYMBOL_GPL(vx_debug_xid); ++EXPORT_SYMBOL_GPL(vx_debug_nid); ++EXPORT_SYMBOL_GPL(vx_debug_net); ++EXPORT_SYMBOL_GPL(vx_debug_limit); ++EXPORT_SYMBOL_GPL(vx_debug_cres); ++EXPORT_SYMBOL_GPL(vx_debug_dlim); ++EXPORT_SYMBOL_GPL(vx_debug_quota); ++EXPORT_SYMBOL_GPL(vx_debug_cvirt); ++EXPORT_SYMBOL_GPL(vx_debug_space); ++EXPORT_SYMBOL_GPL(vx_debug_misc); ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/tag.c linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/tag.c +--- linux-2.6.31.6/kernel/vserver/tag.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/tag.c 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,63 @@ ++/* ++ * linux/kernel/vserver/tag.c ++ * ++ * Virtual Server: Shallow Tag Space ++ * ++ * Copyright (C) 2007 Herbert Pötzl ++ * ++ * V0.01 basic implementation ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++ ++int dx_migrate_task(struct task_struct *p, tag_t tag) ++{ ++ if (!p) ++ BUG(); ++ ++ vxdprintk(VXD_CBIT(tag, 5), ++ "dx_migrate_task(%p[#%d],#%d)", p, p->tag, tag); ++ ++ task_lock(p); ++ p->tag = tag; ++ task_unlock(p); ++ ++ vxdprintk(VXD_CBIT(tag, 5), ++ "moved task %p into [#%d]", p, tag); ++ return 0; ++} ++ ++/* vserver syscall commands below here */ ++ ++/* taks xid and vx_info functions */ ++ ++ ++int vc_task_tag(uint32_t id) ++{ ++ tag_t tag; ++ ++ if (id) { ++ struct task_struct *tsk; ++ read_lock(&tasklist_lock); ++ tsk = find_task_by_real_pid(id); ++ tag = (tsk) ? tsk->tag : -ESRCH; ++ read_unlock(&tasklist_lock); ++ } else ++ tag = dx_current_tag(); ++ return tag; ++} ++ ++ ++int vc_tag_migrate(uint32_t tag) ++{ ++ return dx_migrate_task(current, tag & 0xFFFF); ++} ++ ++ +diff -NurpP --minimal linux-2.6.31.6/kernel/vserver/vci_config.h linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/vci_config.h +--- linux-2.6.31.6/kernel/vserver/vci_config.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/kernel/vserver/vci_config.h 2009-09-10 16:11:43.000000000 +0200 +@@ -0,0 +1,81 @@ ++ ++/* interface version */ ++ ++#define VCI_VERSION 0x00020304 ++ ++ ++enum { ++ VCI_KCBIT_NO_DYNAMIC = 0, ++ ++ VCI_KCBIT_PROC_SECURE = 4, ++ VCI_KCBIT_HARDCPU = 5, ++ VCI_KCBIT_IDLELIMIT = 6, ++ VCI_KCBIT_IDLETIME = 7, ++ ++ VCI_KCBIT_COWBL = 8, ++ VCI_KCBIT_FULLCOWBL = 9, ++ VCI_KCBIT_SPACES = 10, ++ VCI_KCBIT_NETV2 = 11, ++ ++ VCI_KCBIT_DEBUG = 16, ++ VCI_KCBIT_HISTORY = 20, ++ VCI_KCBIT_TAGGED = 24, ++ VCI_KCBIT_PPTAG = 28, ++ ++ VCI_KCBIT_MORE = 31, ++}; ++ ++ ++static inline uint32_t vci_kernel_config(void) ++{ ++ return ++ (1 << VCI_KCBIT_NO_DYNAMIC) | ++ ++ /* configured features */ ++#ifdef CONFIG_VSERVER_PROC_SECURE ++ (1 << VCI_KCBIT_PROC_SECURE) | ++#endif ++#ifdef CONFIG_VSERVER_HARDCPU ++ (1 << VCI_KCBIT_HARDCPU) | ++#endif ++#ifdef CONFIG_VSERVER_IDLELIMIT ++ (1 << VCI_KCBIT_IDLELIMIT) | ++#endif ++#ifdef CONFIG_VSERVER_IDLETIME ++ (1 << VCI_KCBIT_IDLETIME) | ++#endif ++#ifdef CONFIG_VSERVER_COWBL ++ (1 << VCI_KCBIT_COWBL) | ++ (1 << VCI_KCBIT_FULLCOWBL) | ++#endif ++ (1 << VCI_KCBIT_SPACES) | ++ (1 << VCI_KCBIT_NETV2) | ++ ++ /* debug options */ ++#ifdef CONFIG_VSERVER_DEBUG ++ (1 << VCI_KCBIT_DEBUG) | ++#endif ++#ifdef CONFIG_VSERVER_HISTORY ++ (1 << VCI_KCBIT_HISTORY) | ++#endif ++ ++ /* inode context tagging */ ++#if defined(CONFIG_TAGGING_NONE) ++ (0 << VCI_KCBIT_TAGGED) | ++#elif defined(CONFIG_TAGGING_UID16) ++ (1 << VCI_KCBIT_TAGGED) | ++#elif defined(CONFIG_TAGGING_GID16) ++ (2 << VCI_KCBIT_TAGGED) | ++#elif defined(CONFIG_TAGGING_ID24) ++ (3 << VCI_KCBIT_TAGGED) | ++#elif defined(CONFIG_TAGGING_INTERN) ++ (4 << VCI_KCBIT_TAGGED) | ++#elif defined(CONFIG_TAGGING_RUNTIME) ++ (5 << VCI_KCBIT_TAGGED) | ++#else ++ (7 << VCI_KCBIT_TAGGED) | ++#endif ++ (1 << VCI_KCBIT_PPTAG) | ++ 0; ++} ++ +diff -NurpP --minimal linux-2.6.31.6/Makefile linux-2.6.31.6-vs2.3.0.36.24/Makefile +--- linux-2.6.31.6/Makefile 2009-11-12 12:10:08.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/Makefile 2009-11-12 12:53:59.000000000 +0100 +@@ -1,7 +1,7 @@ + VERSION = 2 + PATCHLEVEL = 6 + SUBLEVEL = 31 +-EXTRAVERSION = .6 ++EXTRAVERSION = .6-vs2.3.0.36.24 + NAME = Man-Eating Seals of Antiquity + + # *DOCUMENTATION* +diff -NurpP --minimal linux-2.6.31.6/mm/filemap_xip.c linux-2.6.31.6-vs2.3.0.36.24/mm/filemap_xip.c +--- linux-2.6.31.6/mm/filemap_xip.c 2009-06-11 17:13:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/filemap_xip.c 2009-09-10 16:11:43.000000000 +0200 +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + +diff -NurpP --minimal linux-2.6.31.6/mm/fremap.c linux-2.6.31.6-vs2.3.0.36.24/mm/fremap.c +--- linux-2.6.31.6/mm/fremap.c 2009-03-24 14:22:45.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/fremap.c 2009-09-10 16:11:43.000000000 +0200 +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -NurpP --minimal linux-2.6.31.6/mm/hugetlb.c linux-2.6.31.6-vs2.3.0.36.24/mm/hugetlb.c +--- linux-2.6.31.6/mm/hugetlb.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/hugetlb.c 2009-10-05 23:35:52.000000000 +0200 +@@ -24,6 +24,7 @@ + #include + + #include ++#include + #include "internal.h" + + const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL; +diff -NurpP --minimal linux-2.6.31.6/mm/memory.c linux-2.6.31.6-vs2.3.0.36.24/mm/memory.c +--- linux-2.6.31.6/mm/memory.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/memory.c 2009-10-05 23:35:52.000000000 +0200 +@@ -55,6 +55,7 @@ + #include + #include + #include ++// #include + + #include + #include +@@ -613,6 +614,9 @@ static int copy_pte_range(struct mm_stru + int progress = 0; + int rss[2]; + ++ if (!vx_rss_avail(dst_mm, ((end - addr)/PAGE_SIZE + 1))) ++ return -ENOMEM; ++ + again: + rss[1] = rss[0] = 0; + dst_pte = pte_alloc_map_lock(dst_mm, dst_pmd, addr, &dst_ptl); +@@ -2627,6 +2631,8 @@ static int do_anonymous_page(struct mm_s + /* Allocate our own private page. */ + pte_unmap(page_table); + ++ if (!vx_rss_avail(mm, 1)) ++ goto oom; + if (unlikely(anon_vma_prepare(vma))) + goto oom; + page = alloc_zeroed_user_highpage_movable(vma, address); +@@ -2910,6 +2916,7 @@ static inline int handle_pte_fault(struc + { + pte_t entry; + spinlock_t *ptl; ++ int ret = 0, type = VXPT_UNKNOWN; + + entry = *pte; + if (!pte_present(entry)) { +@@ -2934,9 +2941,12 @@ static inline int handle_pte_fault(struc + if (unlikely(!pte_same(*pte, entry))) + goto unlock; + if (flags & FAULT_FLAG_WRITE) { +- if (!pte_write(entry)) +- return do_wp_page(mm, vma, address, ++ if (!pte_write(entry)) { ++ ret = do_wp_page(mm, vma, address, + pte, pmd, ptl, entry); ++ type = VXPT_WRITE; ++ goto out; ++ } + entry = pte_mkdirty(entry); + } + entry = pte_mkyoung(entry); +@@ -2954,7 +2964,10 @@ static inline int handle_pte_fault(struc + } + unlock: + pte_unmap_unlock(pte, ptl); +- return 0; ++ ret = 0; ++out: ++ vx_page_fault(mm, vma, type, ret); ++ return ret; + } + + /* +diff -NurpP --minimal linux-2.6.31.6/mm/mlock.c linux-2.6.31.6-vs2.3.0.36.24/mm/mlock.c +--- linux-2.6.31.6/mm/mlock.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/mlock.c 2009-10-05 23:35:52.000000000 +0200 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include "internal.h" + +@@ -378,7 +379,7 @@ success: + nr_pages = (end - start) >> PAGE_SHIFT; + if (!lock) + nr_pages = -nr_pages; +- mm->locked_vm += nr_pages; ++ vx_vmlocked_add(mm, nr_pages); + + /* + * vm_flags is protected by the mmap_sem held in write mode. +@@ -451,7 +452,7 @@ static int do_mlock(unsigned long start, + + SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len) + { +- unsigned long locked; ++ unsigned long locked, grow; + unsigned long lock_limit; + int error = -ENOMEM; + +@@ -464,8 +465,10 @@ SYSCALL_DEFINE2(mlock, unsigned long, st + len = PAGE_ALIGN(len + (start & ~PAGE_MASK)); + start &= PAGE_MASK; + +- locked = len >> PAGE_SHIFT; +- locked += current->mm->locked_vm; ++ grow = len >> PAGE_SHIFT; ++ if (!vx_vmlocked_avail(current->mm, grow)) ++ goto out; ++ locked = current->mm->locked_vm + grow; + + lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur; + lock_limit >>= PAGE_SHIFT; +@@ -473,6 +476,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, st + /* check against resource limits */ + if ((locked <= lock_limit) || capable(CAP_IPC_LOCK)) + error = do_mlock(start, len, 1); ++out: + up_write(¤t->mm->mmap_sem); + return error; + } +@@ -534,6 +538,8 @@ SYSCALL_DEFINE1(mlockall, int, flags) + lock_limit >>= PAGE_SHIFT; + + ret = -ENOMEM; ++ if (!vx_vmlocked_avail(current->mm, current->mm->total_vm)) ++ goto out; + if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) || + capable(CAP_IPC_LOCK)) + ret = do_mlockall(flags); +@@ -608,8 +614,10 @@ int account_locked_memory(struct mm_stru + if (lim < vm) + goto out; + +- mm->total_vm += pgsz; +- mm->locked_vm += pgsz; ++ // mm->total_vm += pgsz; ++ vx_vmpages_add(mm, pgsz); ++ // mm->locked_vm += pgsz; ++ vx_vmlocked_add(mm, pgsz); + + error = 0; + out: +@@ -623,8 +631,10 @@ void refund_locked_memory(struct mm_stru + + down_write(&mm->mmap_sem); + +- mm->total_vm -= pgsz; +- mm->locked_vm -= pgsz; ++ // mm->total_vm -= pgsz; ++ vx_vmpages_sub(mm, pgsz); ++ // mm->locked_vm -= pgsz; ++ vx_vmlocked_sub(mm, pgsz); + + up_write(&mm->mmap_sem); + } +diff -NurpP --minimal linux-2.6.31.6/mm/mmap.c linux-2.6.31.6-vs2.3.0.36.24/mm/mmap.c +--- linux-2.6.31.6/mm/mmap.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/mmap.c 2009-10-05 23:35:52.000000000 +0200 +@@ -1222,7 +1222,8 @@ munmap_back: + out: + perf_counter_mmap(vma); + +- mm->total_vm += len >> PAGE_SHIFT; ++ // mm->total_vm += len >> PAGE_SHIFT; ++ vx_vmpages_add(mm, len >> PAGE_SHIFT); + vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); + if (vm_flags & VM_LOCKED) { + /* +@@ -1231,7 +1232,8 @@ out: + long nr_pages = mlock_vma_pages_range(vma, addr, addr + len); + if (nr_pages < 0) + return nr_pages; /* vma gone! */ +- mm->locked_vm += (len >> PAGE_SHIFT) - nr_pages; ++ // mm->locked_vm += (len >> PAGE_SHIFT) - nr_pages; ++ vx_vmlocked_add(mm, (len >> PAGE_SHIFT) - nr_pages); + } else if ((flags & MAP_POPULATE) && !(flags & MAP_NONBLOCK)) + make_pages_present(addr, addr + len); + return addr; +@@ -1578,9 +1580,9 @@ static int acct_stack_growth(struct vm_a + return -ENOMEM; + + /* Ok, everything looks good - let it rip */ +- mm->total_vm += grow; ++ vx_vmpages_add(mm, grow); + if (vma->vm_flags & VM_LOCKED) +- mm->locked_vm += grow; ++ vx_vmlocked_add(mm, grow); + vm_stat_account(mm, vma->vm_flags, vma->vm_file, grow); + return 0; + } +@@ -1755,7 +1757,8 @@ static void remove_vma_list(struct mm_st + do { + long nrpages = vma_pages(vma); + +- mm->total_vm -= nrpages; ++ // mm->total_vm -= nrpages; ++ vx_vmpages_sub(mm, nrpages); + vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages); + vma = remove_vma(vma); + } while (vma); +@@ -1927,7 +1930,8 @@ int do_munmap(struct mm_struct *mm, unsi + struct vm_area_struct *tmp = vma; + while (tmp && tmp->vm_start < end) { + if (tmp->vm_flags & VM_LOCKED) { +- mm->locked_vm -= vma_pages(tmp); ++ // mm->locked_vm -= vma_pages(tmp); ++ vx_vmlocked_sub(mm, vma_pages(tmp)); + munlock_vma_pages_all(tmp); + } + tmp = tmp->vm_next; +@@ -2016,6 +2020,8 @@ unsigned long do_brk(unsigned long addr, + lock_limit >>= PAGE_SHIFT; + if (locked > lock_limit && !capable(CAP_IPC_LOCK)) + return -EAGAIN; ++ if (!vx_vmlocked_avail(mm, len >> PAGE_SHIFT)) ++ return -ENOMEM; + } + + /* +@@ -2042,7 +2048,8 @@ unsigned long do_brk(unsigned long addr, + if (mm->map_count > sysctl_max_map_count) + return -ENOMEM; + +- if (security_vm_enough_memory(len >> PAGE_SHIFT)) ++ if (security_vm_enough_memory(len >> PAGE_SHIFT) || ++ !vx_vmpages_avail(mm, len >> PAGE_SHIFT)) + return -ENOMEM; + + /* Can we just expand an old private anonymous mapping? */ +@@ -2068,10 +2075,13 @@ unsigned long do_brk(unsigned long addr, + vma->vm_page_prot = vm_get_page_prot(flags); + vma_link(mm, vma, prev, rb_link, rb_parent); + out: +- mm->total_vm += len >> PAGE_SHIFT; ++ // mm->total_vm += len >> PAGE_SHIFT; ++ vx_vmpages_add(mm, len >> PAGE_SHIFT); ++ + if (flags & VM_LOCKED) { + if (!mlock_vma_pages_range(vma, addr, addr + len)) +- mm->locked_vm += (len >> PAGE_SHIFT); ++ // mm->locked_vm += (len >> PAGE_SHIFT); ++ vx_vmlocked_add(mm, len >> PAGE_SHIFT); + } + return addr; + } +@@ -2114,6 +2124,11 @@ void exit_mmap(struct mm_struct *mm) + free_pgtables(tlb, vma, FIRST_USER_ADDRESS, 0); + tlb_finish_mmu(tlb, 0, end); + ++ set_mm_counter(mm, file_rss, 0); ++ set_mm_counter(mm, anon_rss, 0); ++ vx_vmpages_sub(mm, mm->total_vm); ++ vx_vmlocked_sub(mm, mm->locked_vm); ++ + /* + * Walk the list again, actually closing and freeing it, + * with preemption enabled, without holding any MM locks. +@@ -2153,7 +2168,8 @@ int insert_vm_struct(struct mm_struct * + if (__vma && __vma->vm_start < vma->vm_end) + return -ENOMEM; + if ((vma->vm_flags & VM_ACCOUNT) && +- security_vm_enough_memory_mm(mm, vma_pages(vma))) ++ (security_vm_enough_memory_mm(mm, vma_pages(vma)) || ++ !vx_vmpages_avail(mm, vma_pages(vma)))) + return -ENOMEM; + vma_link(mm, vma, prev, rb_link, rb_parent); + return 0; +@@ -2229,6 +2245,8 @@ int may_expand_vm(struct mm_struct *mm, + + if (cur + npages > lim) + return 0; ++ if (!vx_vmpages_avail(mm, npages)) ++ return 0; + return 1; + } + +@@ -2306,7 +2324,7 @@ int install_special_mapping(struct mm_st + return -ENOMEM; + } + +- mm->total_vm += len >> PAGE_SHIFT; ++ vx_vmpages_add(mm, len >> PAGE_SHIFT); + + perf_counter_mmap(vma); + +diff -NurpP --minimal linux-2.6.31.6/mm/mremap.c linux-2.6.31.6-vs2.3.0.36.24/mm/mremap.c +--- linux-2.6.31.6/mm/mremap.c 2009-03-24 14:22:45.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/mremap.c 2009-09-10 16:11:43.000000000 +0200 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -220,7 +221,7 @@ static unsigned long move_vma(struct vm_ + * If this were a serious issue, we'd add a flag to do_munmap(). + */ + hiwater_vm = mm->hiwater_vm; +- mm->total_vm += new_len >> PAGE_SHIFT; ++ vx_vmpages_add(mm, new_len >> PAGE_SHIFT); + vm_stat_account(mm, vma->vm_flags, vma->vm_file, new_len>>PAGE_SHIFT); + + if (do_munmap(mm, old_addr, old_len) < 0) { +@@ -238,7 +239,7 @@ static unsigned long move_vma(struct vm_ + } + + if (vm_flags & VM_LOCKED) { +- mm->locked_vm += new_len >> PAGE_SHIFT; ++ vx_vmlocked_add(mm, new_len >> PAGE_SHIFT); + if (new_len > old_len) + mlock_vma_pages_range(new_vma, new_addr + old_len, + new_addr + new_len); +@@ -349,6 +350,9 @@ unsigned long do_mremap(unsigned long ad + ret = -EAGAIN; + if (locked > lock_limit && !capable(CAP_IPC_LOCK)) + goto out; ++ if (!vx_vmlocked_avail(current->mm, ++ (new_len - old_len) >> PAGE_SHIFT)) ++ goto out; + } + if (!may_expand_vm(mm, (new_len - old_len) >> PAGE_SHIFT)) { + ret = -ENOMEM; +@@ -377,10 +381,12 @@ unsigned long do_mremap(unsigned long ad + vma_adjust(vma, vma->vm_start, + addr + new_len, vma->vm_pgoff, NULL); + +- mm->total_vm += pages; ++ // mm->total_vm += pages; ++ vx_vmpages_add(mm, pages); + vm_stat_account(mm, vma->vm_flags, vma->vm_file, pages); + if (vma->vm_flags & VM_LOCKED) { +- mm->locked_vm += pages; ++ // mm->locked_vm += pages; ++ vx_vmlocked_add(mm, pages); + mlock_vma_pages_range(vma, addr + old_len, + addr + new_len); + } +diff -NurpP --minimal linux-2.6.31.6/mm/nommu.c linux-2.6.31.6-vs2.3.0.36.24/mm/nommu.c +--- linux-2.6.31.6/mm/nommu.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/nommu.c 2009-11-12 12:26:38.000000000 +0100 +@@ -1368,7 +1368,7 @@ unsigned long do_mmap_pgoff(struct file + /* okay... we have a mapping; now we have to register it */ + result = vma->vm_start; + +- current->mm->total_vm += len >> PAGE_SHIFT; ++ vx_vmpages_add(current->mm, len >> PAGE_SHIFT); + + share: + add_vma_to_mm(current->mm, vma); +@@ -1628,7 +1628,7 @@ void exit_mmap(struct mm_struct *mm) + + kenter(""); + +- mm->total_vm = 0; ++ vx_vmpages_sub(mm, mm->total_vm); + + while ((vma = mm->mmap)) { + mm->mmap = vma->vm_next; +diff -NurpP --minimal linux-2.6.31.6/mm/oom_kill.c linux-2.6.31.6-vs2.3.0.36.24/mm/oom_kill.c +--- linux-2.6.31.6/mm/oom_kill.c 2009-06-11 17:13:27.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/oom_kill.c 2009-11-12 12:50:49.000000000 +0100 +@@ -27,6 +27,8 @@ + #include + #include + #include ++#include ++#include + + int sysctl_panic_on_oom; + int sysctl_oom_kill_allocating_task; +@@ -159,9 +161,21 @@ unsigned long badness(struct task_struct + points >>= -(p->oomkilladj); + } + ++ /* ++ * add points for context badness and ++ * reduce badness for processes belonging to ++ * a different context ++ */ ++ ++ points += vx_badness(p, mm); ++ ++ if ((vx_current_xid() > 1) && ++ vx_current_xid() != vx_task_xid(p)) ++ points /= 16; ++ + #ifdef DEBUG +- printk(KERN_DEBUG "OOMkill: task %d (%s) got %lu points\n", +- p->pid, p->comm, points); ++ printk(KERN_DEBUG "OOMkill: task %d:#%u (%s) got %d points\n", ++ task_pid_nr(p), p->xid, p->comm, points); + #endif + return points; + } +@@ -215,8 +229,8 @@ static struct task_struct *select_bad_pr + */ + if (!p->mm) + continue; +- /* skip the init task */ +- if (is_global_init(p)) ++ /* skip the init task, global and per guest */ ++ if (task_is_init(p)) + continue; + if (mem && !task_in_mem_cgroup(p, mem)) + continue; +@@ -330,8 +344,8 @@ static void __oom_kill_task(struct task_ + } + + if (verbose) +- printk(KERN_ERR "Killed process %d (%s)\n", +- task_pid_nr(p), p->comm); ++ printk(KERN_ERR "Killed process %s(%d:#%u)\n", ++ p->comm, task_pid_nr(p), p->xid); + + /* + * We give our sacrificial lamb high priority and access to +@@ -415,8 +429,8 @@ static int oom_kill_process(struct task_ + return 0; + } + +- printk(KERN_ERR "%s: kill process %d (%s) score %li or a child\n", +- message, task_pid_nr(p), p->comm, points); ++ printk(KERN_ERR "%s: kill process %s(%d:#%u) score %li or a child\n", ++ message, p->comm, task_pid_nr(p), p->xid, points); + + /* Try to kill a child first */ + list_for_each_entry(c, &p->children, sibling) { +diff -NurpP --minimal linux-2.6.31.6/mm/page_alloc.c linux-2.6.31.6-vs2.3.0.36.24/mm/page_alloc.c +--- linux-2.6.31.6/mm/page_alloc.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/page_alloc.c 2009-10-05 23:35:52.000000000 +0200 +@@ -48,6 +48,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -2078,6 +2080,9 @@ void si_meminfo(struct sysinfo *val) + val->totalhigh = totalhigh_pages; + val->freehigh = nr_free_highpages(); + val->mem_unit = PAGE_SIZE; ++ ++ if (vx_flags(VXF_VIRT_MEM, 0)) ++ vx_vsi_meminfo(val); + } + + EXPORT_SYMBOL(si_meminfo); +@@ -2098,6 +2103,9 @@ void si_meminfo_node(struct sysinfo *val + val->freehigh = 0; + #endif + val->mem_unit = PAGE_SIZE; ++ ++ if (vx_flags(VXF_VIRT_MEM, 0)) ++ vx_vsi_meminfo(val); + } + #endif + +diff -NurpP --minimal linux-2.6.31.6/mm/rmap.c linux-2.6.31.6-vs2.3.0.36.24/mm/rmap.c +--- linux-2.6.31.6/mm/rmap.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/rmap.c 2009-09-10 16:11:43.000000000 +0200 +@@ -50,6 +50,7 @@ + #include + #include + #include ++#include + + #include + +diff -NurpP --minimal linux-2.6.31.6/mm/shmem.c linux-2.6.31.6-vs2.3.0.36.24/mm/shmem.c +--- linux-2.6.31.6/mm/shmem.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/shmem.c 2009-09-10 16:11:43.000000000 +0200 +@@ -1777,7 +1777,7 @@ static int shmem_statfs(struct dentry *d + { + struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb); + +- buf->f_type = TMPFS_MAGIC; ++ buf->f_type = TMPFS_SUPER_MAGIC; + buf->f_bsize = PAGE_CACHE_SIZE; + buf->f_namelen = NAME_MAX; + spin_lock(&sbinfo->stat_lock); +@@ -2346,7 +2346,7 @@ static int shmem_fill_super(struct super + sb->s_maxbytes = SHMEM_MAX_BYTES; + sb->s_blocksize = PAGE_CACHE_SIZE; + sb->s_blocksize_bits = PAGE_CACHE_SHIFT; +- sb->s_magic = TMPFS_MAGIC; ++ sb->s_magic = TMPFS_SUPER_MAGIC; + sb->s_op = &shmem_ops; + sb->s_time_gran = 1; + #ifdef CONFIG_TMPFS_POSIX_ACL +diff -NurpP --minimal linux-2.6.31.6/mm/slab.c linux-2.6.31.6-vs2.3.0.36.24/mm/slab.c +--- linux-2.6.31.6/mm/slab.c 2009-09-10 15:26:28.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/slab.c 2009-09-10 16:11:43.000000000 +0200 +@@ -431,6 +431,8 @@ static void kmem_list3_init(struct kmem_ + #define STATS_INC_FREEMISS(x) do { } while (0) + #endif + ++#include "slab_vs.h" ++ + #if DEBUG + + /* +@@ -3253,6 +3255,7 @@ retry: + + obj = slab_get_obj(cachep, slabp, nodeid); + check_slabp(cachep, slabp); ++ vx_slab_alloc(cachep, flags); + l3->free_objects--; + /* move slabp to correct slabp list: */ + list_del(&slabp->list); +@@ -3329,6 +3332,7 @@ __cache_alloc_node(struct kmem_cache *ca + /* ___cache_alloc_node can fall back to other nodes */ + ptr = ____cache_alloc_node(cachep, flags, nodeid); + out: ++ vx_slab_alloc(cachep, flags); + local_irq_restore(save_flags); + ptr = cache_alloc_debugcheck_after(cachep, flags, ptr, caller); + kmemleak_alloc_recursive(ptr, obj_size(cachep), 1, cachep->flags, +@@ -3515,6 +3519,7 @@ static inline void __cache_free(struct k + check_irq_off(); + kmemleak_free_recursive(objp, cachep->flags); + objp = cache_free_debugcheck(cachep, objp, __builtin_return_address(0)); ++ vx_slab_free(cachep); + + kmemcheck_slab_free(cachep, objp, obj_size(cachep)); + +diff -NurpP --minimal linux-2.6.31.6/mm/slab_vs.h linux-2.6.31.6-vs2.3.0.36.24/mm/slab_vs.h +--- linux-2.6.31.6/mm/slab_vs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/slab_vs.h 2009-11-05 04:25:04.000000000 +0100 +@@ -0,0 +1,29 @@ ++ ++#include ++ ++#include ++ ++static inline ++void vx_slab_alloc(struct kmem_cache *cachep, gfp_t flags) ++{ ++ int what = gfp_zone(cachep->gfpflags); ++ struct vx_info *vxi = current_vx_info(); ++ ++ if (!vxi) ++ return; ++ ++ atomic_add(cachep->buffer_size, &vxi->cacct.slab[what]); ++} ++ ++static inline ++void vx_slab_free(struct kmem_cache *cachep) ++{ ++ int what = gfp_zone(cachep->gfpflags); ++ struct vx_info *vxi = current_vx_info(); ++ ++ if (!vxi) ++ return; ++ ++ atomic_sub(cachep->buffer_size, &vxi->cacct.slab[what]); ++} ++ +diff -NurpP --minimal linux-2.6.31.6/mm/swapfile.c linux-2.6.31.6-vs2.3.0.36.24/mm/swapfile.c +--- linux-2.6.31.6/mm/swapfile.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/mm/swapfile.c 2009-11-12 12:26:38.000000000 +0100 +@@ -34,6 +34,8 @@ + #include + #include + #include ++#include ++#include + + static DEFINE_SPINLOCK(swap_lock); + static unsigned int nr_swapfiles; +@@ -1678,6 +1680,8 @@ static void *swap_next(struct seq_file * + if (v == SEQ_START_TOKEN) + ptr = swap_info; + else { ++ if (vx_flags(VXF_VIRT_MEM, 0)) ++ return NULL; + ptr = v; + ptr++; + } +@@ -1705,6 +1709,16 @@ static int swap_show(struct seq_file *sw + + if (ptr == SEQ_START_TOKEN) { + seq_puts(swap,"Filename\t\t\t\tType\t\tSize\tUsed\tPriority\n"); ++ if (vx_flags(VXF_VIRT_MEM, 0)) { ++ struct sysinfo si; ++ ++ vx_vsi_swapinfo(&si); ++ if (si.totalswap < (1 << 10)) ++ return 0; ++ seq_printf(swap, "%s\t\t\t\t\t%s\t%lu\t%lu\t%d\n", ++ "hdv0", "partition", si.totalswap >> 10, ++ (si.totalswap - si.freeswap) >> 10, -1); ++ } + return 0; + } + +@@ -2060,6 +2074,8 @@ void si_swapinfo(struct sysinfo *val) + val->freeswap = nr_swap_pages + nr_to_be_unused; + val->totalswap = total_swap_pages + nr_to_be_unused; + spin_unlock(&swap_lock); ++ if (vx_flags(VXF_VIRT_MEM, 0)) ++ vx_vsi_swapinfo(val); + } + + /* +diff -NurpP --minimal linux-2.6.31.6/net/core/dev.c linux-2.6.31.6-vs2.3.0.36.24/net/core/dev.c +--- linux-2.6.31.6/net/core/dev.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/core/dev.c 2009-11-08 16:59:44.000000000 +0100 +@@ -126,6 +126,7 @@ + #include + #include + #include ++#include + #include + + #include "net-sysfs.h" +@@ -586,7 +587,8 @@ struct net_device *__dev_get_by_name(str + hlist_for_each(p, dev_name_hash(net, name)) { + struct net_device *dev + = hlist_entry(p, struct net_device, name_hlist); +- if (!strncmp(dev->name, name, IFNAMSIZ)) ++ if (!strncmp(dev->name, name, IFNAMSIZ) && ++ nx_dev_visible(current_nx_info(), dev)) + return dev; + } + return NULL; +@@ -635,7 +637,8 @@ struct net_device *__dev_get_by_index(st + hlist_for_each(p, dev_index_hash(net, ifindex)) { + struct net_device *dev + = hlist_entry(p, struct net_device, index_hlist); +- if (dev->ifindex == ifindex) ++ if ((dev->ifindex == ifindex) && ++ nx_dev_visible(current_nx_info(), dev)) + return dev; + } + return NULL; +@@ -686,10 +689,12 @@ struct net_device *dev_getbyhwaddr(struc + + ASSERT_RTNL(); + +- for_each_netdev(net, dev) ++ for_each_netdev(net, dev) { + if (dev->type == type && +- !memcmp(dev->dev_addr, ha, dev->addr_len)) ++ !memcmp(dev->dev_addr, ha, dev->addr_len) && ++ nx_dev_visible(current_nx_info(), dev)) + return dev; ++ } + + return NULL; + } +@@ -701,9 +706,11 @@ struct net_device *__dev_getfirstbyhwtyp + struct net_device *dev; + + ASSERT_RTNL(); +- for_each_netdev(net, dev) +- if (dev->type == type) ++ for_each_netdev(net, dev) { ++ if ((dev->type == type) && ++ nx_dev_visible(current_nx_info(), dev)) + return dev; ++ } + + return NULL; + } +@@ -821,6 +828,8 @@ static int __dev_alloc_name(struct net * + continue; + if (i < 0 || i >= max_netdevices) + continue; ++ if (!nx_dev_visible(current_nx_info(), d)) ++ continue; + + /* avoid cases where sscanf is not exact inverse of printf */ + snprintf(buf, IFNAMSIZ, name, i); +@@ -2941,6 +2950,8 @@ static int dev_ifconf(struct net *net, c + + total = 0; + for_each_netdev(net, dev) { ++ if (!nx_dev_visible(current_nx_info(), dev)) ++ continue; + for (i = 0; i < NPROTO; i++) { + if (gifconf_list[i]) { + int done; +@@ -3009,6 +3020,9 @@ static void dev_seq_printf_stats(struct + { + const struct net_device_stats *stats = dev_get_stats(dev); + ++ if (!nx_dev_visible(current_nx_info(), dev)) ++ return; ++ + seq_printf(seq, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu " + "%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n", + dev->name, stats->rx_bytes, stats->rx_packets, +@@ -5257,6 +5271,15 @@ int dev_change_net_namespace(struct net_ + goto out; + #endif + ++#ifdef CONFIG_SYSFS ++ /* Don't allow real devices to be moved when sysfs ++ * is enabled. ++ */ ++ err = -EINVAL; ++ if (dev->dev.parent) ++ goto out; ++#endif ++ + /* Ensure the device has been registrered */ + err = -EINVAL; + if (dev->reg_state != NETREG_REGISTERED) +@@ -5317,6 +5340,8 @@ int dev_change_net_namespace(struct net_ + + netdev_unregister_kobject(dev); + ++ netdev_unregister_kobject(dev); ++ + /* Actually switch the network namespace */ + dev_net_set(dev, net); + +diff -NurpP --minimal linux-2.6.31.6/net/core/net-sysfs.c linux-2.6.31.6-vs2.3.0.36.24/net/core/net-sysfs.c +--- linux-2.6.31.6/net/core/net-sysfs.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/core/net-sysfs.c 2009-09-10 16:11:43.000000000 +0200 +@@ -513,6 +513,9 @@ int netdev_register_kobject(struct net_d + if (dev_net(net) != &init_net) + return 0; + ++ if (dev_net(net) != &init_net) ++ return 0; ++ + return device_add(dev); + } + +diff -NurpP --minimal linux-2.6.31.6/net/core/rtnetlink.c linux-2.6.31.6-vs2.3.0.36.24/net/core/rtnetlink.c +--- linux-2.6.31.6/net/core/rtnetlink.c 2009-06-11 17:13:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/core/rtnetlink.c 2009-11-05 03:50:06.000000000 +0100 +@@ -690,6 +690,8 @@ static int rtnl_dump_ifinfo(struct sk_bu + + idx = 0; + for_each_netdev(net, dev) { ++ if (!nx_dev_visible(skb->sk->sk_nx_info, dev)) ++ continue; + if (idx < s_idx) + goto cont; + if (rtnl_fill_ifinfo(skb, dev, RTM_NEWLINK, +@@ -1235,6 +1237,9 @@ void rtmsg_ifinfo(int type, struct net_d + struct sk_buff *skb; + int err = -ENOBUFS; + ++ if (!nx_dev_visible(current_nx_info(), dev)) ++ return; ++ + skb = nlmsg_new(if_nlmsg_size(dev), GFP_KERNEL); + if (skb == NULL) + goto errout; +diff -NurpP --minimal linux-2.6.31.6/net/core/sock.c linux-2.6.31.6-vs2.3.0.36.24/net/core/sock.c +--- linux-2.6.31.6/net/core/sock.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/core/sock.c 2009-11-05 04:25:28.000000000 +0100 +@@ -125,6 +125,10 @@ + #include + + #include ++#include ++#include ++#include ++#include + + #ifdef CONFIG_INET + #include +@@ -974,6 +978,8 @@ static struct sock *sk_prot_alloc(struct + if (!try_module_get(prot->owner)) + goto out_free_sec; + } ++ sock_vx_init(sk); ++ sock_nx_init(sk); + + return sk; + +@@ -1053,6 +1059,11 @@ static void __sk_free(struct sock *sk) + __func__, atomic_read(&sk->sk_omem_alloc)); + + put_net(sock_net(sk)); ++ vx_sock_dec(sk); ++ clr_vx_info(&sk->sk_vx_info); ++ sk->sk_xid = -1; ++ clr_nx_info(&sk->sk_nx_info); ++ sk->sk_nid = -1; + sk_prot_free(sk->sk_prot_creator, sk); + } + +@@ -1100,6 +1111,8 @@ struct sock *sk_clone(const struct sock + + /* SANITY */ + get_net(sock_net(newsk)); ++ sock_vx_init(newsk); ++ sock_nx_init(newsk); + sk_node_init(&newsk->sk_node); + sock_lock_init(newsk); + bh_lock_sock(newsk); +@@ -1154,6 +1167,12 @@ struct sock *sk_clone(const struct sock + smp_wmb(); + atomic_set(&newsk->sk_refcnt, 2); + ++ set_vx_info(&newsk->sk_vx_info, sk->sk_vx_info); ++ newsk->sk_xid = sk->sk_xid; ++ vx_sock_inc(newsk); ++ set_nx_info(&newsk->sk_nx_info, sk->sk_nx_info); ++ newsk->sk_nid = sk->sk_nid; ++ + /* + * Increment the counter in the same struct proto as the master + * sock (sk_refcnt_debug_inc uses newsk->sk_prot->socks, that +@@ -1872,6 +1891,12 @@ void sock_init_data(struct socket *sock, + + sk->sk_stamp = ktime_set(-1L, 0); + ++ set_vx_info(&sk->sk_vx_info, current_vx_info()); ++ sk->sk_xid = vx_current_xid(); ++ vx_sock_inc(sk); ++ set_nx_info(&sk->sk_nx_info, current_nx_info()); ++ sk->sk_nid = nx_current_nid(); ++ + /* + * Before updating sk_refcnt, we must commit prior changes to memory + * (Documentation/RCU/rculist_nulls.txt for details) +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/af_inet.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/af_inet.c +--- linux-2.6.31.6/net/ipv4/af_inet.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/af_inet.c 2009-09-10 16:11:43.000000000 +0200 +@@ -115,6 +115,7 @@ + #ifdef CONFIG_IP_MROUTE + #include + #endif ++#include + + + /* The inetsw table contains everything that inet_create needs to +@@ -324,9 +325,12 @@ lookup_protocol: + } + + err = -EPERM; ++ if ((protocol == IPPROTO_ICMP) && ++ nx_capable(answer->capability, NXC_RAW_ICMP)) ++ goto override; + if (answer->capability > 0 && !capable(answer->capability)) + goto out_rcu_unlock; +- ++override: + err = -EAFNOSUPPORT; + if (!inet_netns_ok(net, protocol)) + goto out_rcu_unlock; +@@ -444,6 +448,7 @@ int inet_bind(struct socket *sock, struc + struct sockaddr_in *addr = (struct sockaddr_in *)uaddr; + struct sock *sk = sock->sk; + struct inet_sock *inet = inet_sk(sk); ++ struct nx_v4_sock_addr nsa; + unsigned short snum; + int chk_addr_ret; + int err; +@@ -457,7 +462,11 @@ int inet_bind(struct socket *sock, struc + if (addr_len < sizeof(struct sockaddr_in)) + goto out; + +- chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr); ++ err = v4_map_sock_addr(inet, addr, &nsa); ++ if (err) ++ goto out; ++ ++ chk_addr_ret = inet_addr_type(sock_net(sk), nsa.saddr); + + /* Not specified by any standard per-se, however it breaks too + * many applications when removed. It is unfortunate since +@@ -469,7 +478,7 @@ int inet_bind(struct socket *sock, struc + err = -EADDRNOTAVAIL; + if (!sysctl_ip_nonlocal_bind && + !(inet->freebind || inet->transparent) && +- addr->sin_addr.s_addr != htonl(INADDR_ANY) && ++ nsa.saddr != htonl(INADDR_ANY) && + chk_addr_ret != RTN_LOCAL && + chk_addr_ret != RTN_MULTICAST && + chk_addr_ret != RTN_BROADCAST) +@@ -494,7 +503,7 @@ int inet_bind(struct socket *sock, struc + if (sk->sk_state != TCP_CLOSE || inet->num) + goto out_release_sock; + +- inet->rcv_saddr = inet->saddr = addr->sin_addr.s_addr; ++ v4_set_sock_addr(inet, &nsa); + if (chk_addr_ret == RTN_MULTICAST || chk_addr_ret == RTN_BROADCAST) + inet->saddr = 0; /* Use device */ + +@@ -687,11 +696,13 @@ int inet_getname(struct socket *sock, st + peer == 1)) + return -ENOTCONN; + sin->sin_port = inet->dport; +- sin->sin_addr.s_addr = inet->daddr; ++ sin->sin_addr.s_addr = ++ nx_map_sock_lback(sk->sk_nx_info, inet->daddr); + } else { + __be32 addr = inet->rcv_saddr; + if (!addr) + addr = inet->saddr; ++ addr = nx_map_sock_lback(sk->sk_nx_info, addr); + sin->sin_port = inet->sport; + sin->sin_addr.s_addr = addr; + } +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/devinet.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/devinet.c +--- linux-2.6.31.6/net/ipv4/devinet.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/devinet.c 2009-11-05 03:50:40.000000000 +0100 +@@ -413,6 +413,7 @@ struct in_device *inetdev_by_index(struc + return in_dev; + } + ++ + /* Called only from RTNL semaphored context. No locks. */ + + struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix, +@@ -653,6 +654,8 @@ int devinet_ioctl(struct net *net, unsig + *colon = ':'; + + if ((in_dev = __in_dev_get_rtnl(dev)) != NULL) { ++ struct nx_info *nxi = current_nx_info(); ++ + if (tryaddrmatch) { + /* Matthias Andree */ + /* compare label and address (4.4BSD style) */ +@@ -661,6 +664,8 @@ int devinet_ioctl(struct net *net, unsig + This is checked above. */ + for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL; + ifap = &ifa->ifa_next) { ++ if (!nx_v4_ifa_visible(nxi, ifa)) ++ continue; + if (!strcmp(ifr.ifr_name, ifa->ifa_label) && + sin_orig.sin_addr.s_addr == + ifa->ifa_address) { +@@ -673,9 +678,12 @@ int devinet_ioctl(struct net *net, unsig + comparing just the label */ + if (!ifa) { + for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL; +- ifap = &ifa->ifa_next) ++ ifap = &ifa->ifa_next) { ++ if (!nx_v4_ifa_visible(nxi, ifa)) ++ continue; + if (!strcmp(ifr.ifr_name, ifa->ifa_label)) + break; ++ } + } + } + +@@ -826,6 +834,8 @@ static int inet_gifconf(struct net_devic + goto out; + + for (; ifa; ifa = ifa->ifa_next) { ++ if (!nx_v4_ifa_visible(current_nx_info(), ifa)) ++ continue; + if (!buf) { + done += sizeof(ifr); + continue; +@@ -1164,6 +1174,7 @@ static int inet_dump_ifaddr(struct sk_bu + struct net_device *dev; + struct in_device *in_dev; + struct in_ifaddr *ifa; ++ struct sock *sk = skb->sk; + int s_ip_idx, s_idx = cb->args[0]; + + s_ip_idx = ip_idx = cb->args[1]; +@@ -1178,6 +1189,8 @@ static int inet_dump_ifaddr(struct sk_bu + + for (ifa = in_dev->ifa_list, ip_idx = 0; ifa; + ifa = ifa->ifa_next, ip_idx++) { ++ if (sk && !nx_v4_ifa_visible(sk->sk_nx_info, ifa)) ++ continue; + if (ip_idx < s_ip_idx) + continue; + if (inet_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid, +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/fib_hash.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/fib_hash.c +--- linux-2.6.31.6/net/ipv4/fib_hash.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/fib_hash.c 2009-11-05 03:50:54.000000000 +0100 +@@ -1021,7 +1021,7 @@ static int fib_seq_show(struct seq_file + prefix = f->fn_key; + mask = FZ_MASK(iter->zone); + flags = fib_flag_trans(fa->fa_type, mask, fi); +- if (fi) ++ if (fi && nx_dev_visible(current_nx_info(), fi->fib_dev)) + seq_printf(seq, + "%s\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u%n", + fi->fib_dev ? fi->fib_dev->name : "*", prefix, +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/inet_connection_sock.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/inet_connection_sock.c +--- linux-2.6.31.6/net/ipv4/inet_connection_sock.c 2009-06-11 17:13:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/inet_connection_sock.c 2009-11-05 04:54:58.000000000 +0100 +@@ -49,10 +49,40 @@ void inet_get_local_port_range(int *low, + } + EXPORT_SYMBOL(inet_get_local_port_range); + ++int ipv4_rcv_saddr_equal(const struct sock *sk1, const struct sock *sk2) ++{ ++ __be32 sk1_rcv_saddr = inet_rcv_saddr(sk1), ++ sk2_rcv_saddr = inet_rcv_saddr(sk2); ++ ++ if (inet_v6_ipv6only(sk2)) ++ return 0; ++ ++ if (sk1_rcv_saddr && ++ sk2_rcv_saddr && ++ sk1_rcv_saddr == sk2_rcv_saddr) ++ return 1; ++ ++ if (sk1_rcv_saddr && ++ !sk2_rcv_saddr && ++ v4_addr_in_nx_info(sk2->sk_nx_info, sk1_rcv_saddr, NXA_MASK_BIND)) ++ return 1; ++ ++ if (sk2_rcv_saddr && ++ !sk1_rcv_saddr && ++ v4_addr_in_nx_info(sk1->sk_nx_info, sk2_rcv_saddr, NXA_MASK_BIND)) ++ return 1; ++ ++ if (!sk1_rcv_saddr && ++ !sk2_rcv_saddr && ++ nx_v4_addr_conflict(sk1->sk_nx_info, sk2->sk_nx_info)) ++ return 1; ++ ++ return 0; ++} ++ + int inet_csk_bind_conflict(const struct sock *sk, + const struct inet_bind_bucket *tb) + { +- const __be32 sk_rcv_saddr = inet_rcv_saddr(sk); + struct sock *sk2; + struct hlist_node *node; + int reuse = sk->sk_reuse; +@@ -72,9 +102,7 @@ int inet_csk_bind_conflict(const struct + sk->sk_bound_dev_if == sk2->sk_bound_dev_if)) { + if (!reuse || !sk2->sk_reuse || + sk2->sk_state == TCP_LISTEN) { +- const __be32 sk2_rcv_saddr = inet_rcv_saddr(sk2); +- if (!sk2_rcv_saddr || !sk_rcv_saddr || +- sk2_rcv_saddr == sk_rcv_saddr) ++ if (ipv4_rcv_saddr_equal(sk, sk2)) + break; + } + } +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/inet_diag.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/inet_diag.c +--- linux-2.6.31.6/net/ipv4/inet_diag.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/inet_diag.c 2009-09-10 16:11:43.000000000 +0200 +@@ -32,6 +32,8 @@ + #include + + #include ++#include ++#include + + static const struct inet_diag_handler **inet_diag_table; + +@@ -118,8 +120,8 @@ static int inet_csk_diag_fill(struct soc + + r->id.idiag_sport = inet->sport; + r->id.idiag_dport = inet->dport; +- r->id.idiag_src[0] = inet->rcv_saddr; +- r->id.idiag_dst[0] = inet->daddr; ++ r->id.idiag_src[0] = nx_map_sock_lback(sk->sk_nx_info, inet->rcv_saddr); ++ r->id.idiag_dst[0] = nx_map_sock_lback(sk->sk_nx_info, inet->daddr); + + #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) + if (r->idiag_family == AF_INET6) { +@@ -204,8 +206,8 @@ static int inet_twsk_diag_fill(struct in + r->id.idiag_cookie[1] = (u32)(((unsigned long)tw >> 31) >> 1); + r->id.idiag_sport = tw->tw_sport; + r->id.idiag_dport = tw->tw_dport; +- r->id.idiag_src[0] = tw->tw_rcv_saddr; +- r->id.idiag_dst[0] = tw->tw_daddr; ++ r->id.idiag_src[0] = nx_map_sock_lback(tw->tw_nx_info, tw->tw_rcv_saddr); ++ r->id.idiag_dst[0] = nx_map_sock_lback(tw->tw_nx_info, tw->tw_daddr); + r->idiag_state = tw->tw_substate; + r->idiag_timer = 3; + r->idiag_expires = DIV_ROUND_UP(tmo * 1000, HZ); +@@ -262,6 +264,7 @@ static int inet_diag_get_exact(struct sk + err = -EINVAL; + + if (req->idiag_family == AF_INET) { ++ /* TODO: lback */ + sk = inet_lookup(&init_net, hashinfo, req->id.idiag_dst[0], + req->id.idiag_dport, req->id.idiag_src[0], + req->id.idiag_sport, req->id.idiag_if); +@@ -504,6 +507,7 @@ static int inet_csk_diag_dump(struct soc + } else + #endif + { ++ /* TODO: lback */ + entry.saddr = &inet->rcv_saddr; + entry.daddr = &inet->daddr; + } +@@ -540,6 +544,7 @@ static int inet_twsk_diag_dump(struct in + } else + #endif + { ++ /* TODO: lback */ + entry.saddr = &tw->tw_rcv_saddr; + entry.daddr = &tw->tw_daddr; + } +@@ -586,8 +591,8 @@ static int inet_diag_fill_req(struct sk_ + + r->id.idiag_sport = inet->sport; + r->id.idiag_dport = ireq->rmt_port; +- r->id.idiag_src[0] = ireq->loc_addr; +- r->id.idiag_dst[0] = ireq->rmt_addr; ++ r->id.idiag_src[0] = nx_map_sock_lback(sk->sk_nx_info, ireq->loc_addr); ++ r->id.idiag_dst[0] = nx_map_sock_lback(sk->sk_nx_info, ireq->rmt_addr); + r->idiag_expires = jiffies_to_msecs(tmo); + r->idiag_rqueue = 0; + r->idiag_wqueue = 0; +@@ -657,6 +662,7 @@ static int inet_diag_dump_reqs(struct sk + continue; + + if (bc) { ++ /* TODO: lback */ + entry.saddr = + #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) + (entry.family == AF_INET6) ? +@@ -727,6 +733,8 @@ static int inet_diag_dump(struct sk_buff + sk_nulls_for_each(sk, node, &ilb->head) { + struct inet_sock *inet = inet_sk(sk); + ++ if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (num < s_num) { + num++; + continue; +@@ -793,6 +801,8 @@ skip_listen_ht: + sk_nulls_for_each(sk, node, &head->chain) { + struct inet_sock *inet = inet_sk(sk); + ++ if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (num < s_num) + goto next_normal; + if (!(r->idiag_states & (1 << sk->sk_state))) +@@ -817,6 +827,8 @@ next_normal: + inet_twsk_for_each(tw, node, + &head->twchain) { + ++ if (!nx_check(tw->tw_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (num < s_num) + goto next_dying; + if (r->id.idiag_sport != tw->tw_sport && +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/inet_hashtables.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/inet_hashtables.c +--- linux-2.6.31.6/net/ipv4/inet_hashtables.c 2009-06-11 17:13:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/inet_hashtables.c 2009-09-10 16:11:43.000000000 +0200 +@@ -21,6 +21,7 @@ + + #include + #include ++#include + #include + + /* +@@ -134,6 +135,11 @@ static inline int compute_score(struct s + if (rcv_saddr != daddr) + return -1; + score += 2; ++ } else { ++ /* block non nx_info ips */ ++ if (!v4_addr_in_nx_info(sk->sk_nx_info, ++ daddr, NXA_MASK_BIND)) ++ return -1; + } + if (sk->sk_bound_dev_if) { + if (sk->sk_bound_dev_if != dif) +@@ -151,7 +157,6 @@ static inline int compute_score(struct s + * wildcarded during the search since they can never be otherwise. + */ + +- + struct sock *__inet_lookup_listener(struct net *net, + struct inet_hashinfo *hashinfo, + const __be32 daddr, const unsigned short hnum, +@@ -174,6 +179,7 @@ begin: + hiscore = score; + } + } ++ + /* + * if the nulls value we got at the end of this lookup is + * not the expected one, we must restart lookup. +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/netfilter/nf_nat_helper.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/netfilter/nf_nat_helper.c +--- linux-2.6.31.6/net/ipv4/netfilter/nf_nat_helper.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/netfilter/nf_nat_helper.c 2009-09-10 16:11:43.000000000 +0200 +@@ -19,6 +19,7 @@ + #include + + #include ++#include + #include + #include + #include +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/netfilter.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/netfilter.c +--- linux-2.6.31.6/net/ipv4/netfilter.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/netfilter.c 2009-09-10 16:11:43.000000000 +0200 +@@ -4,7 +4,7 @@ + #include + #include + #include +-#include ++// #include + #include + #include + #include +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/raw.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/raw.c +--- linux-2.6.31.6/net/ipv4/raw.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/raw.c 2009-09-10 17:17:12.000000000 +0200 +@@ -117,7 +117,7 @@ static struct sock *__raw_v4_lookup(stru + + if (net_eq(sock_net(sk), net) && inet->num == num && + !(inet->daddr && inet->daddr != raddr) && +- !(inet->rcv_saddr && inet->rcv_saddr != laddr) && ++ v4_sock_addr_match(sk->sk_nx_info, inet, laddr) && + !(sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif)) + goto found; /* gotcha */ + } +@@ -372,6 +372,12 @@ static int raw_send_hdrinc(struct sock * + icmp_out_count(net, ((struct icmphdr *) + skb_transport_header(skb))->type); + ++ err = -EPERM; ++ if (!nx_check(0, VS_ADMIN) && !capable(CAP_NET_RAW) && ++ sk->sk_nx_info && ++ !v4_addr_in_nx_info(sk->sk_nx_info, iph->saddr, NXA_MASK_BIND)) ++ goto error_free; ++ + err = NF_HOOK(PF_INET, NF_INET_LOCAL_OUT, skb, NULL, rt->u.dst.dev, + dst_output); + if (err > 0) +@@ -383,6 +389,7 @@ out: + + error_fault: + err = -EFAULT; ++error_free: + kfree_skb(skb); + error: + IP_INC_STATS(net, IPSTATS_MIB_OUTDISCARDS); +@@ -551,6 +558,13 @@ static int raw_sendmsg(struct kiocb *ioc + } + + security_sk_classify_flow(sk, &fl); ++ if (sk->sk_nx_info) { ++ err = ip_v4_find_src(sock_net(sk), ++ sk->sk_nx_info, &rt, &fl); ++ ++ if (err) ++ goto done; ++ } + err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk, 1); + } + if (err) +@@ -620,17 +634,19 @@ static int raw_bind(struct sock *sk, str + { + struct inet_sock *inet = inet_sk(sk); + struct sockaddr_in *addr = (struct sockaddr_in *) uaddr; ++ struct nx_v4_sock_addr nsa = { 0 }; + int ret = -EINVAL; + int chk_addr_ret; + + if (sk->sk_state != TCP_CLOSE || addr_len < sizeof(struct sockaddr_in)) + goto out; +- chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr); ++ v4_map_sock_addr(inet, addr, &nsa); ++ chk_addr_ret = inet_addr_type(sock_net(sk), nsa.saddr); + ret = -EADDRNOTAVAIL; +- if (addr->sin_addr.s_addr && chk_addr_ret != RTN_LOCAL && ++ if (nsa.saddr && chk_addr_ret != RTN_LOCAL && + chk_addr_ret != RTN_MULTICAST && chk_addr_ret != RTN_BROADCAST) + goto out; +- inet->rcv_saddr = inet->saddr = addr->sin_addr.s_addr; ++ v4_set_sock_addr(inet, &nsa); + if (chk_addr_ret == RTN_MULTICAST || chk_addr_ret == RTN_BROADCAST) + inet->saddr = 0; /* Use device */ + sk_dst_reset(sk); +@@ -682,7 +698,8 @@ static int raw_recvmsg(struct kiocb *ioc + /* Copy the address. */ + if (sin) { + sin->sin_family = AF_INET; +- sin->sin_addr.s_addr = ip_hdr(skb)->saddr; ++ sin->sin_addr.s_addr = ++ nx_map_sock_lback(sk->sk_nx_info, ip_hdr(skb)->saddr); + sin->sin_port = 0; + memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); + } +@@ -860,7 +877,8 @@ static struct sock *raw_get_first(struct + struct hlist_node *node; + + sk_for_each(sk, node, &state->h->ht[state->bucket]) +- if (sock_net(sk) == seq_file_net(seq)) ++ if ((sock_net(sk) == seq_file_net(seq)) && ++ nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT)) + goto found; + } + sk = NULL; +@@ -876,7 +894,8 @@ static struct sock *raw_get_next(struct + sk = sk_next(sk); + try_again: + ; +- } while (sk && sock_net(sk) != seq_file_net(seq)); ++ } while (sk && ((sock_net(sk) != seq_file_net(seq)) || ++ !nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT))); + + if (!sk && ++state->bucket < RAW_HTABLE_SIZE) { + sk = sk_head(&state->h->ht[state->bucket]); +@@ -935,7 +954,10 @@ static void raw_sock_seq_show(struct seq + + seq_printf(seq, "%4d: %08X:%04X %08X:%04X" + " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d\n", +- i, src, srcp, dest, destp, sp->sk_state, ++ i, ++ nx_map_sock_lback(current_nx_info(), src), srcp, ++ nx_map_sock_lback(current_nx_info(), dest), destp, ++ sp->sk_state, + sk_wmem_alloc_get(sp), + sk_rmem_alloc_get(sp), + 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp), +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/tcp.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/tcp.c +--- linux-2.6.31.6/net/ipv4/tcp.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/tcp.c 2009-09-10 16:11:43.000000000 +0200 +@@ -264,6 +264,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/tcp_ipv4.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/tcp_ipv4.c +--- linux-2.6.31.6/net/ipv4/tcp_ipv4.c 2009-09-10 15:26:29.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/tcp_ipv4.c 2009-09-10 16:11:43.000000000 +0200 +@@ -1887,6 +1887,12 @@ static void *listening_get_next(struct s + req = req->dl_next; + while (1) { + while (req) { ++ vxdprintk(VXD_CBIT(net, 6), ++ "sk,req: %p [#%d] (from %d)", req->sk, ++ (req->sk)?req->sk->sk_nid:0, nx_current_nid()); ++ if (req->sk && ++ !nx_check(req->sk->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (req->rsk_ops->family == st->family) { + cur = req; + goto out; +@@ -1911,6 +1917,10 @@ get_req: + } + get_sk: + sk_nulls_for_each_from(sk, node) { ++ vxdprintk(VXD_CBIT(net, 6), "sk: %p [#%d] (from %d)", ++ sk, sk->sk_nid, nx_current_nid()); ++ if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (sk->sk_family == st->family && net_eq(sock_net(sk), net)) { + cur = sk; + goto out; +@@ -1974,6 +1984,11 @@ static void *established_get_first(struc + + spin_lock_bh(lock); + sk_nulls_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) { ++ vxdprintk(VXD_CBIT(net, 6), ++ "sk,egf: %p [#%d] (from %d)", ++ sk, sk->sk_nid, nx_current_nid()); ++ if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (sk->sk_family != st->family || + !net_eq(sock_net(sk), net)) { + continue; +@@ -1984,6 +1999,11 @@ static void *established_get_first(struc + st->state = TCP_SEQ_STATE_TIME_WAIT; + inet_twsk_for_each(tw, node, + &tcp_hashinfo.ehash[st->bucket].twchain) { ++ vxdprintk(VXD_CBIT(net, 6), ++ "tw: %p [#%d] (from %d)", ++ tw, tw->tw_nid, nx_current_nid()); ++ if (!nx_check(tw->tw_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (tw->tw_family != st->family || + !net_eq(twsk_net(tw), net)) { + continue; +@@ -2012,7 +2032,9 @@ static void *established_get_next(struct + tw = cur; + tw = tw_next(tw); + get_tw: +- while (tw && (tw->tw_family != st->family || !net_eq(twsk_net(tw), net))) { ++ while (tw && (tw->tw_family != st->family || ++ !net_eq(twsk_net(tw), net) || ++ !nx_check(tw->tw_nid, VS_WATCH_P | VS_IDENT))) { + tw = tw_next(tw); + } + if (tw) { +@@ -2035,6 +2057,11 @@ get_tw: + sk = sk_nulls_next(sk); + + sk_nulls_for_each_from(sk, node) { ++ vxdprintk(VXD_CBIT(net, 6), ++ "sk,egn: %p [#%d] (from %d)", ++ sk, sk->sk_nid, nx_current_nid()); ++ if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (sk->sk_family == st->family && net_eq(sock_net(sk), net)) + goto found; + } +@@ -2186,9 +2213,9 @@ static void get_openreq4(struct sock *sk + seq_printf(f, "%4d: %08X:%04X %08X:%04X" + " %02X %08X:%08X %02X:%08lX %08X %5d %8d %u %d %p%n", + i, +- ireq->loc_addr, ++ nx_map_sock_lback(current_nx_info(), ireq->loc_addr), + ntohs(inet_sk(sk)->sport), +- ireq->rmt_addr, ++ nx_map_sock_lback(current_nx_info(), ireq->rmt_addr), + ntohs(ireq->rmt_port), + TCP_SYN_RECV, + 0, 0, /* could print option size, but that is af dependent. */ +@@ -2231,7 +2258,10 @@ static void get_tcp4_sock(struct sock *s + + seq_printf(f, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX " + "%08X %5d %8d %lu %d %p %lu %lu %u %u %d%n", +- i, src, srcp, dest, destp, sk->sk_state, ++ i, ++ nx_map_sock_lback(current_nx_info(), src), srcp, ++ nx_map_sock_lback(current_nx_info(), dest), destp, ++ sk->sk_state, + tp->write_seq - tp->snd_una, + sk->sk_state == TCP_LISTEN ? sk->sk_ack_backlog : + (tp->rcv_nxt - tp->copied_seq), +@@ -2267,7 +2297,10 @@ static void get_timewait4_sock(struct in + + seq_printf(f, "%4d: %08X:%04X %08X:%04X" + " %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %p%n", +- i, src, srcp, dest, destp, tw->tw_substate, 0, 0, ++ i, ++ nx_map_sock_lback(current_nx_info(), src), srcp, ++ nx_map_sock_lback(current_nx_info(), dest), destp, ++ tw->tw_substate, 0, 0, + 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0, + atomic_read(&tw->tw_refcnt), tw, len); + } +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/tcp_minisocks.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/tcp_minisocks.c +--- linux-2.6.31.6/net/ipv4/tcp_minisocks.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/tcp_minisocks.c 2009-10-15 03:49:19.000000000 +0200 +@@ -26,6 +26,10 @@ + #include + #include + ++#include ++#include ++#include ++ + #ifdef CONFIG_SYSCTL + #define SYNC_INIT 0 /* let the user enable it */ + #else +@@ -294,6 +298,11 @@ void tcp_time_wait(struct sock *sk, int + tcptw->tw_ts_recent = tp->rx_opt.ts_recent; + tcptw->tw_ts_recent_stamp = tp->rx_opt.ts_recent_stamp; + ++ tw->tw_xid = sk->sk_xid; ++ tw->tw_vx_info = NULL; ++ tw->tw_nid = sk->sk_nid; ++ tw->tw_nx_info = NULL; ++ + #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) + if (tw->tw_family == PF_INET6) { + struct ipv6_pinfo *np = inet6_sk(sk); +diff -NurpP --minimal linux-2.6.31.6/net/ipv4/udp.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/udp.c +--- linux-2.6.31.6/net/ipv4/udp.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv4/udp.c 2009-11-05 04:54:58.000000000 +0100 +@@ -222,14 +222,7 @@ fail: + return error; + } + +-static int ipv4_rcv_saddr_equal(const struct sock *sk1, const struct sock *sk2) +-{ +- struct inet_sock *inet1 = inet_sk(sk1), *inet2 = inet_sk(sk2); +- +- return ( !ipv6_only_sock(sk2) && +- (!inet1->rcv_saddr || !inet2->rcv_saddr || +- inet1->rcv_saddr == inet2->rcv_saddr )); +-} ++extern int ipv4_rcv_saddr_equal(const struct sock *, const struct sock *); + + int udp_v4_get_port(struct sock *sk, unsigned short snum) + { +@@ -251,6 +244,11 @@ static inline int compute_score(struct s + if (inet->rcv_saddr != daddr) + return -1; + score += 2; ++ } else { ++ /* block non nx_info ips */ ++ if (!v4_addr_in_nx_info(sk->sk_nx_info, ++ daddr, NXA_MASK_BIND)) ++ return -1; + } + if (inet->daddr) { + if (inet->daddr != saddr) +@@ -271,6 +269,7 @@ static inline int compute_score(struct s + return score; + } + ++ + /* UDP is nearly always wildcards out the wazoo, it makes no sense to try + * harder than this. -DaveM + */ +@@ -292,6 +291,11 @@ begin: + sk_nulls_for_each_rcu(sk, node, &hslot->head) { + score = compute_score(sk, net, saddr, hnum, sport, + daddr, dport, dif); ++ /* FIXME: disabled? ++ if (score == 9) { ++ result = sk; ++ break; ++ } else */ + if (score > badness) { + result = sk; + badness = score; +@@ -305,6 +309,7 @@ begin: + if (get_nulls_value(node) != hash) + goto begin; + ++ + if (result) { + if (unlikely(!atomic_inc_not_zero(&result->sk_refcnt))) + result = NULL; +@@ -314,6 +319,7 @@ begin: + goto begin; + } + } ++ + rcu_read_unlock(); + return result; + } +@@ -356,7 +362,7 @@ static inline struct sock *udp_v4_mcast_ + s->sk_hash != hnum || + (inet->daddr && inet->daddr != rmt_addr) || + (inet->dport != rmt_port && inet->dport) || +- (inet->rcv_saddr && inet->rcv_saddr != loc_addr) || ++ !v4_sock_addr_match(sk->sk_nx_info, inet, loc_addr) || + ipv6_only_sock(s) || + (s->sk_bound_dev_if && s->sk_bound_dev_if != dif)) + continue; +@@ -698,8 +704,13 @@ int udp_sendmsg(struct kiocb *iocb, stru + { .sport = inet->sport, + .dport = dport } } }; + struct net *net = sock_net(sk); ++ struct nx_info *nxi = sk->sk_nx_info; + + security_sk_classify_flow(sk, &fl); ++ err = ip_v4_find_src(net, nxi, &rt, &fl); ++ if (err) ++ goto out; ++ + err = ip_route_output_flow(net, &rt, &fl, sk, 1); + if (err) { + if (err == -ENETUNREACH) +@@ -945,7 +956,8 @@ try_again: + { + sin->sin_family = AF_INET; + sin->sin_port = udp_hdr(skb)->source; +- sin->sin_addr.s_addr = ip_hdr(skb)->saddr; ++ sin->sin_addr.s_addr = nx_map_sock_lback( ++ skb->sk->sk_nx_info, ip_hdr(skb)->saddr); + memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); + } + if (inet->cmsg_flags) +@@ -1599,6 +1611,8 @@ static struct sock *udp_get_first(struct + sk_nulls_for_each(sk, node, &hslot->head) { + if (!net_eq(sock_net(sk), net)) + continue; ++ if (!nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (sk->sk_family == state->family) + goto found; + } +@@ -1616,7 +1630,9 @@ static struct sock *udp_get_next(struct + + do { + sk = sk_nulls_next(sk); +- } while (sk && (!net_eq(sock_net(sk), net) || sk->sk_family != state->family)); ++ } while (sk && (!net_eq(sock_net(sk), net) || ++ sk->sk_family != state->family || ++ !nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT))); + + if (!sk) { + if (state->bucket < UDP_HTABLE_SIZE) +@@ -1721,7 +1737,10 @@ static void udp4_format_sock(struct sock + + seq_printf(f, "%4d: %08X:%04X %08X:%04X" + " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d%n", +- bucket, src, srcp, dest, destp, sp->sk_state, ++ bucket, ++ nx_map_sock_lback(current_nx_info(), src), srcp, ++ nx_map_sock_lback(current_nx_info(), dest), destp, ++ sp->sk_state, + sk_wmem_alloc_get(sp), + sk_rmem_alloc_get(sp), + 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp), +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/addrconf.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/addrconf.c +--- linux-2.6.31.6/net/ipv6/addrconf.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/addrconf.c 2009-09-10 16:11:43.000000000 +0200 +@@ -86,6 +86,8 @@ + + #include + #include ++#include ++#include + + /* Set to 3 to get tracing... */ + #define ACONF_DEBUG 2 +@@ -1117,7 +1119,7 @@ out: + + int ipv6_dev_get_saddr(struct net *net, struct net_device *dst_dev, + const struct in6_addr *daddr, unsigned int prefs, +- struct in6_addr *saddr) ++ struct in6_addr *saddr, struct nx_info *nxi) + { + struct ipv6_saddr_score scores[2], + *score = &scores[0], *hiscore = &scores[1]; +@@ -1190,6 +1192,8 @@ int ipv6_dev_get_saddr(struct net *net, + dev->name); + continue; + } ++ if (!v6_addr_in_nx_info(nxi, &score->ifa->addr, -1)) ++ continue; + + score->rule = -1; + bitmap_zero(score->scorebits, IPV6_SADDR_RULE_MAX); +@@ -2979,7 +2983,10 @@ static void if6_seq_stop(struct seq_file + static int if6_seq_show(struct seq_file *seq, void *v) + { + struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v; +- seq_printf(seq, "%pi6 %02x %02x %02x %02x %8s\n", ++ ++ if (nx_check(0, VS_ADMIN|VS_WATCH) || ++ v6_addr_in_nx_info(current_nx_info(), &ifp->addr, -1)) ++ seq_printf(seq, "%pi6 %02x %02x %02x %02x %8s\n", + &ifp->addr, + ifp->idev->dev->ifindex, + ifp->prefix_len, +@@ -3476,6 +3483,12 @@ static int inet6_dump_addr(struct sk_buf + struct ifmcaddr6 *ifmca; + struct ifacaddr6 *ifaca; + struct net *net = sock_net(skb->sk); ++ struct nx_info *nxi = skb->sk ? skb->sk->sk_nx_info : NULL; ++ ++ /* disable ipv6 on non v6 guests */ ++ if (nxi && !nx_info_has_v6(nxi)) ++ return skb->len; ++ + + s_idx = cb->args[0]; + s_ip_idx = ip_idx = cb->args[1]; +@@ -3497,6 +3510,8 @@ static int inet6_dump_addr(struct sk_buf + ifa = ifa->if_next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; ++ if (!v6_addr_in_nx_info(nxi, &ifa->addr, -1)) ++ continue; + err = inet6_fill_ifaddr(skb, ifa, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, +@@ -3510,6 +3525,8 @@ static int inet6_dump_addr(struct sk_buf + ifmca = ifmca->next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; ++ if (!v6_addr_in_nx_info(nxi, &ifmca->mca_addr, -1)) ++ continue; + err = inet6_fill_ifmcaddr(skb, ifmca, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, +@@ -3523,6 +3540,8 @@ static int inet6_dump_addr(struct sk_buf + ifaca = ifaca->aca_next, ip_idx++) { + if (ip_idx < s_ip_idx) + continue; ++ if (!v6_addr_in_nx_info(nxi, &ifaca->aca_addr, -1)) ++ continue; + err = inet6_fill_ifacaddr(skb, ifaca, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq, +@@ -3809,12 +3828,19 @@ static int inet6_dump_ifinfo(struct sk_b + int s_idx = cb->args[0]; + struct net_device *dev; + struct inet6_dev *idev; ++ struct nx_info *nxi = skb->sk ? skb->sk->sk_nx_info : NULL; ++ ++ /* FIXME: maybe disable ipv6 on non v6 guests? ++ if (skb->sk && skb->sk->sk_vx_info) ++ return skb->len; */ + + read_lock(&dev_base_lock); + idx = 0; + for_each_netdev(net, dev) { + if (idx < s_idx) + goto cont; ++ if (!v6_dev_in_nx_info(dev, nxi)) ++ goto cont; + if ((idev = in6_dev_get(dev)) == NULL) + goto cont; + err = inet6_fill_ifinfo(skb, idev, NETLINK_CB(cb->skb).pid, +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/af_inet6.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/af_inet6.c +--- linux-2.6.31.6/net/ipv6/af_inet6.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/af_inet6.c 2009-09-10 16:11:43.000000000 +0200 +@@ -41,6 +41,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -158,9 +160,12 @@ lookup_protocol: + } + + err = -EPERM; ++ if ((protocol == IPPROTO_ICMPV6) && ++ nx_capable(answer->capability, NXC_RAW_ICMP)) ++ goto override; + if (answer->capability > 0 && !capable(answer->capability)) + goto out_rcu_unlock; +- ++override: + sock->ops = answer->ops; + answer_prot = answer->prot; + answer_no_check = answer->no_check; +@@ -259,6 +264,7 @@ int inet6_bind(struct socket *sock, stru + struct inet_sock *inet = inet_sk(sk); + struct ipv6_pinfo *np = inet6_sk(sk); + struct net *net = sock_net(sk); ++ struct nx_v6_sock_addr nsa; + __be32 v4addr = 0; + unsigned short snum; + int addr_type = 0; +@@ -270,6 +276,11 @@ int inet6_bind(struct socket *sock, stru + + if (addr_len < SIN6_LEN_RFC2133) + return -EINVAL; ++ ++ err = v6_map_sock_addr(inet, addr, &nsa); ++ if (err) ++ return err; ++ + addr_type = ipv6_addr_type(&addr->sin6_addr); + if ((addr_type & IPV6_ADDR_MULTICAST) && sock->type == SOCK_STREAM) + return -EINVAL; +@@ -301,6 +312,7 @@ int inet6_bind(struct socket *sock, stru + /* Reproduce AF_INET checks to make the bindings consitant */ + v4addr = addr->sin6_addr.s6_addr32[3]; + chk_addr_ret = inet_addr_type(net, v4addr); ++ + if (!sysctl_ip_nonlocal_bind && + !(inet->freebind || inet->transparent) && + v4addr != htonl(INADDR_ANY) && +@@ -310,6 +322,10 @@ int inet6_bind(struct socket *sock, stru + err = -EADDRNOTAVAIL; + goto out; + } ++ if (!v4_addr_in_nx_info(sk->sk_nx_info, v4addr, NXA_MASK_BIND)) { ++ err = -EADDRNOTAVAIL; ++ goto out; ++ } + } else { + if (addr_type != IPV6_ADDR_ANY) { + struct net_device *dev = NULL; +@@ -335,6 +351,11 @@ int inet6_bind(struct socket *sock, stru + } + } + ++ if (!v6_addr_in_nx_info(sk->sk_nx_info, &addr->sin6_addr, -1)) { ++ err = -EADDRNOTAVAIL; ++ goto out; ++ } ++ + /* ipv4 addr of the socket is invalid. Only the + * unspecified and mapped address have a v4 equivalent. + */ +@@ -353,6 +374,8 @@ int inet6_bind(struct socket *sock, stru + } + } + ++ v6_set_sock_addr(inet, &nsa); ++ + inet->rcv_saddr = v4addr; + inet->saddr = v4addr; + +@@ -448,9 +471,11 @@ int inet6_getname(struct socket *sock, s + return -ENOTCONN; + sin->sin6_port = inet->dport; + ipv6_addr_copy(&sin->sin6_addr, &np->daddr); ++ /* FIXME: remap lback? */ + if (np->sndflow) + sin->sin6_flowinfo = np->flow_label; + } else { ++ /* FIXME: remap lback? */ + if (ipv6_addr_any(&np->rcv_saddr)) + ipv6_addr_copy(&sin->sin6_addr, &np->saddr); + else +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/fib6_rules.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/fib6_rules.c +--- linux-2.6.31.6/net/ipv6/fib6_rules.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/fib6_rules.c 2009-09-10 16:11:43.000000000 +0200 +@@ -96,7 +96,7 @@ static int fib6_rule_action(struct fib_r + if (ipv6_dev_get_saddr(net, + ip6_dst_idev(&rt->u.dst)->dev, + &flp->fl6_dst, srcprefs, +- &saddr)) ++ &saddr, NULL)) + goto again; + if (!ipv6_prefix_equal(&saddr, &r->src.addr, + r->src.plen)) +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/inet6_hashtables.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/inet6_hashtables.c +--- linux-2.6.31.6/net/ipv6/inet6_hashtables.c 2009-03-24 14:22:46.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/inet6_hashtables.c 2009-09-10 16:11:43.000000000 +0200 +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + #include + #include +@@ -76,7 +77,6 @@ struct sock *__inet6_lookup_established( + unsigned int slot = hash & (hashinfo->ehash_size - 1); + struct inet_ehash_bucket *head = &hashinfo->ehash[slot]; + +- + rcu_read_lock(); + begin: + sk_nulls_for_each_rcu(sk, node, &head->chain) { +@@ -88,7 +88,7 @@ begin: + sock_put(sk); + goto begin; + } +- goto out; ++ goto out; + } + } + if (get_nulls_value(node) != slot) +@@ -134,6 +134,9 @@ static int inline compute_score(struct s + if (!ipv6_addr_equal(&np->rcv_saddr, daddr)) + return -1; + score++; ++ } else { ++ if (!v6_addr_in_nx_info(sk->sk_nx_info, daddr, -1)) ++ return -1; + } + if (sk->sk_bound_dev_if) { + if (sk->sk_bound_dev_if != dif) +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/ip6_output.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/ip6_output.c +--- linux-2.6.31.6/net/ipv6/ip6_output.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/ip6_output.c 2009-09-10 16:11:43.000000000 +0200 +@@ -951,7 +951,7 @@ static int ip6_dst_lookup_tail(struct so + err = ipv6_dev_get_saddr(net, ip6_dst_idev(*dst)->dev, + &fl->fl6_dst, + sk ? inet6_sk(sk)->srcprefs : 0, +- &fl->fl6_src); ++ &fl->fl6_src, sk->sk_nx_info); + if (err) + goto out_err_release; + } +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/Kconfig linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/Kconfig +--- linux-2.6.31.6/net/ipv6/Kconfig 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/Kconfig 2009-09-10 16:11:43.000000000 +0200 +@@ -4,8 +4,8 @@ + + # IPv6 as module will cause a CRASH if you try to unload it + menuconfig IPV6 +- tristate "The IPv6 protocol" +- default m ++ bool "The IPv6 protocol" ++ default n + ---help--- + This is complemental support for the IP version 6. + You will still be able to do traditional IPv4 networking as well. +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/ndisc.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/ndisc.c +--- linux-2.6.31.6/net/ipv6/ndisc.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/ndisc.c 2009-09-10 16:11:43.000000000 +0200 +@@ -589,7 +589,7 @@ static void ndisc_send_na(struct net_dev + } else { + if (ipv6_dev_get_saddr(dev_net(dev), dev, daddr, + inet6_sk(dev_net(dev)->ipv6.ndisc_sk)->srcprefs, +- &tmpaddr)) ++ &tmpaddr, NULL /* FIXME: ? */ )) + return; + src_addr = &tmpaddr; + } +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/raw.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/raw.c +--- linux-2.6.31.6/net/ipv6/raw.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/raw.c 2009-09-10 16:11:43.000000000 +0200 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -281,6 +282,13 @@ static int rawv6_bind(struct sock *sk, s + } + } + ++ if (!v6_addr_in_nx_info(sk->sk_nx_info, &addr->sin6_addr, -1)) { ++ err = -EADDRNOTAVAIL; ++ if (dev) ++ dev_put(dev); ++ goto out; ++ } ++ + /* ipv4 addr of the socket is invalid. Only the + * unspecified and mapped address have a v4 equivalent. + */ +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/route.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/route.c +--- linux-2.6.31.6/net/ipv6/route.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/route.c 2009-09-10 16:11:43.000000000 +0200 +@@ -2257,7 +2257,8 @@ static int rt6_fill_node(struct net *net + struct inet6_dev *idev = ip6_dst_idev(&rt->u.dst); + struct in6_addr saddr_buf; + if (ipv6_dev_get_saddr(net, idev ? idev->dev : NULL, +- dst, 0, &saddr_buf) == 0) ++ dst, 0, &saddr_buf, ++ (skb->sk ? skb->sk->sk_nx_info : NULL)) == 0) + NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf); + } + +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/tcp_ipv6.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/tcp_ipv6.c +--- linux-2.6.31.6/net/ipv6/tcp_ipv6.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/tcp_ipv6.c 2009-09-10 16:11:43.000000000 +0200 +@@ -68,6 +68,7 @@ + + #include + #include ++#include + + static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb); + static void tcp_v6_reqsk_send_ack(struct sock *sk, struct sk_buff *skb, +@@ -156,8 +157,15 @@ static int tcp_v6_connect(struct sock *s + * connect() to INADDR_ANY means loopback (BSD'ism). + */ + +- if(ipv6_addr_any(&usin->sin6_addr)) +- usin->sin6_addr.s6_addr[15] = 0x1; ++ if(ipv6_addr_any(&usin->sin6_addr)) { ++ struct nx_info *nxi = sk->sk_nx_info; ++ ++ if (nxi && nx_info_has_v6(nxi)) ++ /* FIXME: remap lback? */ ++ usin->sin6_addr = nxi->v6.ip; ++ else ++ usin->sin6_addr.s6_addr[15] = 0x1; ++ } + + addr_type = ipv6_addr_type(&usin->sin6_addr); + +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/udp.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/udp.c +--- linux-2.6.31.6/net/ipv6/udp.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/udp.c 2009-11-05 05:04:49.000000000 +0100 +@@ -47,6 +47,7 @@ + + #include + #include ++#include + #include "udp_impl.h" + + int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2) +@@ -61,24 +62,49 @@ int ipv6_rcv_saddr_equal(const struct so + int addr_type2 = sk2_rcv_saddr6 ? ipv6_addr_type(sk2_rcv_saddr6) : IPV6_ADDR_MAPPED; + + /* if both are mapped, treat as IPv4 */ +- if (addr_type == IPV6_ADDR_MAPPED && addr_type2 == IPV6_ADDR_MAPPED) +- return (!sk2_ipv6only && ++ if (addr_type == IPV6_ADDR_MAPPED && addr_type2 == IPV6_ADDR_MAPPED) { ++ if (!sk2_ipv6only && + (!sk_rcv_saddr || !sk2_rcv_saddr || +- sk_rcv_saddr == sk2_rcv_saddr)); ++ sk_rcv_saddr == sk2_rcv_saddr)) ++ goto vs_v4; ++ else ++ return 0; ++ } + + if (addr_type2 == IPV6_ADDR_ANY && + !(sk2_ipv6only && addr_type == IPV6_ADDR_MAPPED)) +- return 1; ++ goto vs; + + if (addr_type == IPV6_ADDR_ANY && + !(sk_ipv6only && addr_type2 == IPV6_ADDR_MAPPED)) +- return 1; ++ goto vs; + + if (sk2_rcv_saddr6 && + ipv6_addr_equal(sk_rcv_saddr6, sk2_rcv_saddr6)) +- return 1; ++ goto vs; + + return 0; ++ ++vs_v4: ++ if (!sk_rcv_saddr && !sk2_rcv_saddr) ++ return nx_v4_addr_conflict(sk->sk_nx_info, sk2->sk_nx_info); ++ if (!sk2_rcv_saddr) ++ return v4_addr_in_nx_info(sk->sk_nx_info, sk2_rcv_saddr, -1); ++ if (!sk_rcv_saddr) ++ return v4_addr_in_nx_info(sk2->sk_nx_info, sk_rcv_saddr, -1); ++ return 1; ++vs: ++ if (addr_type2 == IPV6_ADDR_ANY && addr_type == IPV6_ADDR_ANY) ++ return nx_v6_addr_conflict(sk->sk_nx_info, sk2->sk_nx_info); ++ else if (addr_type2 == IPV6_ADDR_ANY) ++ return v6_addr_in_nx_info(sk2->sk_nx_info, sk_rcv_saddr6, -1); ++ else if (addr_type == IPV6_ADDR_ANY) { ++ if (addr_type2 == IPV6_ADDR_MAPPED) ++ return nx_v4_addr_conflict(sk->sk_nx_info, sk2->sk_nx_info); ++ else ++ return v6_addr_in_nx_info(sk->sk_nx_info, sk2_rcv_saddr6, -1); ++ } ++ return 1; + } + + int udp_v6_get_port(struct sock *sk, unsigned short snum) +@@ -109,6 +135,10 @@ static inline int compute_score(struct s + if (!ipv6_addr_equal(&np->rcv_saddr, daddr)) + return -1; + score++; ++ } else { ++ /* block non nx_info ips */ ++ if (!v6_addr_in_nx_info(sk->sk_nx_info, daddr, -1)) ++ return -1; + } + if (!ipv6_addr_any(&np->daddr)) { + if (!ipv6_addr_equal(&np->daddr, saddr)) +diff -NurpP --minimal linux-2.6.31.6/net/ipv6/xfrm6_policy.c linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/xfrm6_policy.c +--- linux-2.6.31.6/net/ipv6/xfrm6_policy.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/ipv6/xfrm6_policy.c 2009-09-10 16:11:43.000000000 +0200 +@@ -63,7 +63,7 @@ static int xfrm6_get_saddr(struct net *n + dev = ip6_dst_idev(dst)->dev; + ipv6_dev_get_saddr(dev_net(dev), dev, + (struct in6_addr *)&daddr->a6, 0, +- (struct in6_addr *)&saddr->a6); ++ (struct in6_addr *)&saddr->a6, NULL); + dst_release(dst); + return 0; + } +diff -NurpP --minimal linux-2.6.31.6/net/netlink/af_netlink.c linux-2.6.31.6-vs2.3.0.36.24/net/netlink/af_netlink.c +--- linux-2.6.31.6/net/netlink/af_netlink.c 2009-09-10 15:26:30.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/netlink/af_netlink.c 2009-09-10 16:11:43.000000000 +0200 +@@ -55,6 +55,9 @@ + #include + #include + #include ++#include ++#include ++#include + + #include + #include +@@ -1831,6 +1834,8 @@ static struct sock *netlink_seq_socket_i + sk_for_each(s, node, &hash->table[j]) { + if (sock_net(s) != seq_file_net(seq)) + continue; ++ if (!nx_check(s->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (off == pos) { + iter->link = i; + iter->hash_idx = j; +@@ -1865,7 +1870,8 @@ static void *netlink_seq_next(struct seq + s = v; + do { + s = sk_next(s); +- } while (s && sock_net(s) != seq_file_net(seq)); ++ } while (s && (sock_net(s) != seq_file_net(seq) || ++ !nx_check(s->sk_nid, VS_WATCH_P | VS_IDENT))); + if (s) + return s; + +@@ -1877,7 +1883,8 @@ static void *netlink_seq_next(struct seq + + for (; j <= hash->mask; j++) { + s = sk_head(&hash->table[j]); +- while (s && sock_net(s) != seq_file_net(seq)) ++ while (s && (sock_net(s) != seq_file_net(seq) || ++ !nx_check(s->sk_nid, VS_WATCH_P | VS_IDENT))) + s = sk_next(s); + if (s) { + iter->link = i; +diff -NurpP --minimal linux-2.6.31.6/net/sctp/ipv6.c linux-2.6.31.6-vs2.3.0.36.24/net/sctp/ipv6.c +--- linux-2.6.31.6/net/sctp/ipv6.c 2009-09-10 15:26:31.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/sctp/ipv6.c 2009-09-10 16:11:43.000000000 +0200 +@@ -316,7 +316,8 @@ static void sctp_v6_get_saddr(struct sct + dst ? ip6_dst_idev(dst)->dev : NULL, + &daddr->v6.sin6_addr, + inet6_sk(&sk->inet.sk)->srcprefs, +- &saddr->v6.sin6_addr); ++ &saddr->v6.sin6_addr, ++ asoc->base.sk->sk_nx_info); + SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: %pI6\n", + &saddr->v6.sin6_addr); + return; +diff -NurpP --minimal linux-2.6.31.6/net/socket.c linux-2.6.31.6-vs2.3.0.36.24/net/socket.c +--- linux-2.6.31.6/net/socket.c 2009-09-10 15:26:31.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/socket.c 2009-09-10 16:11:43.000000000 +0200 +@@ -95,6 +95,10 @@ + + #include + #include ++#include ++#include ++#include ++#include + + static int sock_no_open(struct inode *irrelevant, struct file *dontcare); + static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, +@@ -559,7 +563,7 @@ static inline int __sock_sendmsg(struct + struct msghdr *msg, size_t size) + { + struct sock_iocb *si = kiocb_to_siocb(iocb); +- int err; ++ int err, len; + + si->sock = sock; + si->scm = NULL; +@@ -570,7 +574,22 @@ static inline int __sock_sendmsg(struct + if (err) + return err; + +- return sock->ops->sendmsg(iocb, sock, msg, size); ++ len = sock->ops->sendmsg(iocb, sock, msg, size); ++ if (sock->sk) { ++ if (len == size) ++ vx_sock_send(sock->sk, size); ++ else ++ vx_sock_fail(sock->sk, size); ++ } ++ vxdprintk(VXD_CBIT(net, 7), ++ "__sock_sendmsg: %p[%p,%p,%p;%d/%d]:%d/%d", ++ sock, sock->sk, ++ (sock->sk)?sock->sk->sk_nx_info:0, ++ (sock->sk)?sock->sk->sk_vx_info:0, ++ (sock->sk)?sock->sk->sk_xid:0, ++ (sock->sk)?sock->sk->sk_nid:0, ++ (unsigned int)size, len); ++ return len; + } + + int sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) +@@ -671,7 +690,7 @@ EXPORT_SYMBOL_GPL(__sock_recv_timestamp) + static inline int __sock_recvmsg(struct kiocb *iocb, struct socket *sock, + struct msghdr *msg, size_t size, int flags) + { +- int err; ++ int err, len; + struct sock_iocb *si = kiocb_to_siocb(iocb); + + si->sock = sock; +@@ -684,7 +703,18 @@ static inline int __sock_recvmsg(struct + if (err) + return err; + +- return sock->ops->recvmsg(iocb, sock, msg, size, flags); ++ len = sock->ops->recvmsg(iocb, sock, msg, size, flags); ++ if ((len >= 0) && sock->sk) ++ vx_sock_recv(sock->sk, len); ++ vxdprintk(VXD_CBIT(net, 7), ++ "__sock_recvmsg: %p[%p,%p,%p;%d/%d]:%d/%d", ++ sock, sock->sk, ++ (sock->sk)?sock->sk->sk_nx_info:0, ++ (sock->sk)?sock->sk->sk_vx_info:0, ++ (sock->sk)?sock->sk->sk_xid:0, ++ (sock->sk)?sock->sk->sk_nid:0, ++ (unsigned int)size, len); ++ return len; + } + + int sock_recvmsg(struct socket *sock, struct msghdr *msg, +@@ -1155,6 +1185,13 @@ static int __sock_create(struct net *net + if (type < 0 || type >= SOCK_MAX) + return -EINVAL; + ++ if (!nx_check(0, VS_ADMIN)) { ++ if (family == PF_INET && !current_nx_info_has_v4()) ++ return -EAFNOSUPPORT; ++ if (family == PF_INET6 && !current_nx_info_has_v6()) ++ return -EAFNOSUPPORT; ++ } ++ + /* Compatibility. + + This uglymoron is moved from INET layer to here to avoid +@@ -1287,6 +1324,7 @@ SYSCALL_DEFINE3(socket, int, family, int + if (retval < 0) + goto out; + ++ set_bit(SOCK_USER_SOCKET, &sock->flags); + retval = sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK)); + if (retval < 0) + goto out_release; +@@ -1328,10 +1366,12 @@ SYSCALL_DEFINE4(socketpair, int, family, + err = sock_create(family, type, protocol, &sock1); + if (err < 0) + goto out; ++ set_bit(SOCK_USER_SOCKET, &sock1->flags); + + err = sock_create(family, type, protocol, &sock2); + if (err < 0) + goto out_release_1; ++ set_bit(SOCK_USER_SOCKET, &sock2->flags); + + err = sock1->ops->socketpair(sock1, sock2); + if (err < 0) +diff -NurpP --minimal linux-2.6.31.6/net/sunrpc/auth.c linux-2.6.31.6-vs2.3.0.36.24/net/sunrpc/auth.c +--- linux-2.6.31.6/net/sunrpc/auth.c 2009-03-24 14:22:48.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/sunrpc/auth.c 2009-09-10 16:11:43.000000000 +0200 +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #ifdef RPC_DEBUG + # define RPCDBG_FACILITY RPCDBG_AUTH +@@ -360,6 +361,7 @@ rpcauth_lookupcred(struct rpc_auth *auth + memset(&acred, 0, sizeof(acred)); + acred.uid = cred->fsuid; + acred.gid = cred->fsgid; ++ acred.tag = dx_current_tag(); + acred.group_info = get_group_info(((struct cred *)cred)->group_info); + + ret = auth->au_ops->lookup_cred(auth, &acred, flags); +@@ -400,6 +402,7 @@ rpcauth_bind_root_cred(struct rpc_task * + struct auth_cred acred = { + .uid = 0, + .gid = 0, ++ .tag = dx_current_tag(), + }; + struct rpc_cred *ret; + +diff -NurpP --minimal linux-2.6.31.6/net/sunrpc/auth_unix.c linux-2.6.31.6-vs2.3.0.36.24/net/sunrpc/auth_unix.c +--- linux-2.6.31.6/net/sunrpc/auth_unix.c 2008-12-25 00:26:37.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/sunrpc/auth_unix.c 2009-09-10 16:11:43.000000000 +0200 +@@ -11,12 +11,14 @@ + #include + #include + #include ++#include + + #define NFS_NGROUPS 16 + + struct unx_cred { + struct rpc_cred uc_base; + gid_t uc_gid; ++ tag_t uc_tag; + gid_t uc_gids[NFS_NGROUPS]; + }; + #define uc_uid uc_base.cr_uid +@@ -78,6 +80,7 @@ unx_create_cred(struct rpc_auth *auth, s + groups = NFS_NGROUPS; + + cred->uc_gid = acred->gid; ++ cred->uc_tag = acred->tag; + for (i = 0; i < groups; i++) + cred->uc_gids[i] = GROUP_AT(acred->group_info, i); + if (i < NFS_NGROUPS) +@@ -119,7 +122,9 @@ unx_match(struct auth_cred *acred, struc + unsigned int i; + + +- if (cred->uc_uid != acred->uid || cred->uc_gid != acred->gid) ++ if (cred->uc_uid != acred->uid || ++ cred->uc_gid != acred->gid || ++ cred->uc_tag != acred->tag) + return 0; + + if (acred->group_info != NULL) +@@ -142,7 +147,7 @@ unx_marshal(struct rpc_task *task, __be3 + struct rpc_clnt *clnt = task->tk_client; + struct unx_cred *cred = container_of(task->tk_msg.rpc_cred, struct unx_cred, uc_base); + __be32 *base, *hold; +- int i; ++ int i, tag; + + *p++ = htonl(RPC_AUTH_UNIX); + base = p++; +@@ -152,9 +157,12 @@ unx_marshal(struct rpc_task *task, __be3 + * Copy the UTS nodename captured when the client was created. + */ + p = xdr_encode_array(p, clnt->cl_nodename, clnt->cl_nodelen); ++ tag = task->tk_client->cl_tag; + +- *p++ = htonl((u32) cred->uc_uid); +- *p++ = htonl((u32) cred->uc_gid); ++ *p++ = htonl((u32) TAGINO_UID(tag, ++ cred->uc_uid, cred->uc_tag)); ++ *p++ = htonl((u32) TAGINO_GID(tag, ++ cred->uc_gid, cred->uc_tag)); + hold = p++; + for (i = 0; i < 16 && cred->uc_gids[i] != (gid_t) NOGROUP; i++) + *p++ = htonl((u32) cred->uc_gids[i]); +diff -NurpP --minimal linux-2.6.31.6/net/sunrpc/clnt.c linux-2.6.31.6-vs2.3.0.36.24/net/sunrpc/clnt.c +--- linux-2.6.31.6/net/sunrpc/clnt.c 2009-09-10 15:26:31.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/sunrpc/clnt.c 2009-09-10 16:11:43.000000000 +0200 +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -339,6 +340,9 @@ struct rpc_clnt *rpc_create(struct rpc_c + if (!(args->flags & RPC_CLNT_CREATE_QUIET)) + clnt->cl_chatty = 1; + ++ /* TODO: handle RPC_CLNT_CREATE_TAGGED ++ if (args->flags & RPC_CLNT_CREATE_TAGGED) ++ clnt->cl_tag = 1; */ + return clnt; + } + EXPORT_SYMBOL_GPL(rpc_create); +diff -NurpP --minimal linux-2.6.31.6/net/unix/af_unix.c linux-2.6.31.6-vs2.3.0.36.24/net/unix/af_unix.c +--- linux-2.6.31.6/net/unix/af_unix.c 2009-11-12 12:10:12.000000000 +0100 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/unix/af_unix.c 2009-11-12 12:26:38.000000000 +0100 +@@ -114,6 +114,8 @@ + #include + #include + #include ++#include ++#include + + static struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1]; + static DEFINE_SPINLOCK(unix_table_lock); +@@ -258,6 +260,8 @@ static struct sock *__unix_find_socket_b + if (!net_eq(sock_net(s), net)) + continue; + ++ if (!nx_check(s->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (u->addr->len == len && + !memcmp(u->addr->name, sunname, len)) + goto found; +@@ -2114,6 +2118,8 @@ static struct sock *unix_seq_idx(struct + for (s = first_unix_socket(&iter->i); s; s = next_unix_socket(&iter->i, s)) { + if (sock_net(s) != seq_file_net(seq)) + continue; ++ if (!nx_check(s->sk_nid, VS_WATCH_P | VS_IDENT)) ++ continue; + if (off == pos) + return s; + ++off; +@@ -2138,7 +2144,8 @@ static void *unix_seq_next(struct seq_fi + sk = first_unix_socket(&iter->i); + else + sk = next_unix_socket(&iter->i, sk); +- while (sk && (sock_net(sk) != seq_file_net(seq))) ++ while (sk && (sock_net(sk) != seq_file_net(seq) || ++ !nx_check(sk->sk_nid, VS_WATCH_P | VS_IDENT))) + sk = next_unix_socket(&iter->i, sk); + return sk; + } +diff -NurpP --minimal linux-2.6.31.6/net/x25/af_x25.c linux-2.6.31.6-vs2.3.0.36.24/net/x25/af_x25.c +--- linux-2.6.31.6/net/x25/af_x25.c 2009-09-10 15:26:31.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/net/x25/af_x25.c 2009-09-10 16:11:43.000000000 +0200 +@@ -519,7 +519,10 @@ static int x25_create(struct net *net, s + + x25 = x25_sk(sk); + +- sock_init_data(sock, sk); ++ sk->sk_socket = sock; ++ sk->sk_type = sock->type; ++ sk->sk_sleep = &sock->wait; ++ sock->sk = sk; + + x25_init_timers(sk); + +diff -NurpP --minimal linux-2.6.31.6/scripts/checksyscalls.sh linux-2.6.31.6-vs2.3.0.36.24/scripts/checksyscalls.sh +--- linux-2.6.31.6/scripts/checksyscalls.sh 2009-09-10 15:26:31.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/scripts/checksyscalls.sh 2009-09-10 16:11:43.000000000 +0200 +@@ -194,7 +194,6 @@ cat << EOF + #define __IGNORE_afs_syscall + #define __IGNORE_getpmsg + #define __IGNORE_putpmsg +-#define __IGNORE_vserver + EOF + } + +diff -NurpP --minimal linux-2.6.31.6/security/commoncap.c linux-2.6.31.6-vs2.3.0.36.24/security/commoncap.c +--- linux-2.6.31.6/security/commoncap.c 2009-09-10 15:26:32.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/security/commoncap.c 2009-09-10 16:32:54.000000000 +0200 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + /* + * If a non-root user executes a setuid-root binary in +@@ -52,7 +53,7 @@ static void warn_setuid_and_fcaps_mixed( + + int cap_netlink_send(struct sock *sk, struct sk_buff *skb) + { +- NETLINK_CB(skb).eff_cap = current_cap(); ++ NETLINK_CB(skb).eff_cap = vx_mbcaps(current_cap()); + return 0; + } + +@@ -62,6 +63,7 @@ int cap_netlink_recv(struct sk_buff *skb + return -EPERM; + return 0; + } ++ + EXPORT_SYMBOL(cap_netlink_recv); + + /** +@@ -82,7 +84,22 @@ EXPORT_SYMBOL(cap_netlink_recv); + int cap_capable(struct task_struct *tsk, const struct cred *cred, int cap, + int audit) + { +- return cap_raised(cred->cap_effective, cap) ? 0 : -EPERM; ++ struct vx_info *vxi = tsk->vx_info; ++ ++#if 0 ++ printk("cap_capable() VXF_STATE_SETUP = %llx, raised = %x, eff = %08x:%08x\n", ++ vx_info_flags(vxi, VXF_STATE_SETUP, 0), ++ cap_raised(tsk->cap_effective, cap), ++ tsk->cap_effective.cap[1], tsk->cap_effective.cap[0]); ++#endif ++ ++ /* special case SETUP */ ++ if (vx_info_flags(vxi, VXF_STATE_SETUP, 0) && ++ /* FIXME: maybe use cred instead? */ ++ cap_raised(tsk->cred->cap_effective, cap)) ++ return 0; ++ ++ return vx_cap_raised(vxi, cred->cap_effective, cap) ? 0 : -EPERM; + } + + /** +@@ -618,7 +635,7 @@ int cap_inode_setxattr(struct dentry *de + + if (!strncmp(name, XATTR_SECURITY_PREFIX, + sizeof(XATTR_SECURITY_PREFIX) - 1) && +- !capable(CAP_SYS_ADMIN)) ++ !vx_capable(CAP_SYS_ADMIN, VXC_FS_SECURITY)) + return -EPERM; + return 0; + } +@@ -962,7 +979,8 @@ error: + */ + int cap_syslog(int type) + { +- if ((type != 3 && type != 10) && !capable(CAP_SYS_ADMIN)) ++ if ((type != 3 && type != 10) && ++ !vx_capable(CAP_SYS_ADMIN, VXC_SYSLOG)) + return -EPERM; + return 0; + } +@@ -1014,3 +1032,4 @@ int cap_file_mmap(struct file *file, uns + } + return ret; + } ++ +diff -NurpP --minimal linux-2.6.31.6/security/selinux/hooks.c linux-2.6.31.6-vs2.3.0.36.24/security/selinux/hooks.c +--- linux-2.6.31.6/security/selinux/hooks.c 2009-09-10 15:26:32.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/security/selinux/hooks.c 2009-09-10 16:11:43.000000000 +0200 +@@ -64,7 +64,6 @@ + #include + #include + #include /* for Unix socket types */ +-#include /* for Unix socket types */ + #include + #include + #include +diff -NurpP --minimal linux-2.6.31.6/security/selinux/include/av_permissions.h linux-2.6.31.6-vs2.3.0.36.24/security/selinux/include/av_permissions.h +--- linux-2.6.31.6/security/selinux/include/av_permissions.h 2009-06-11 17:13:33.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/security/selinux/include/av_permissions.h 2009-09-29 17:20:23.000000000 +0200 +@@ -542,6 +542,7 @@ + #define CAPABILITY__SETFCAP 0x80000000UL + #define CAPABILITY2__MAC_OVERRIDE 0x00000001UL + #define CAPABILITY2__MAC_ADMIN 0x00000002UL ++#define CAPABILITY2__CONTEXT 0x00000004UL + #define NETLINK_ROUTE_SOCKET__IOCTL 0x00000001UL + #define NETLINK_ROUTE_SOCKET__READ 0x00000002UL + #define NETLINK_ROUTE_SOCKET__WRITE 0x00000004UL +diff -NurpP --minimal linux-2.6.31.6/security/selinux/include/av_perm_to_string.h linux-2.6.31.6-vs2.3.0.36.24/security/selinux/include/av_perm_to_string.h +--- linux-2.6.31.6/security/selinux/include/av_perm_to_string.h 2009-06-11 17:13:33.000000000 +0200 ++++ linux-2.6.31.6-vs2.3.0.36.24/security/selinux/include/av_perm_to_string.h 2009-09-29 17:20:23.000000000 +0200 +@@ -141,6 +141,7 @@ + S_(SECCLASS_CAPABILITY, CAPABILITY__SETFCAP, "setfcap") + S_(SECCLASS_CAPABILITY2, CAPABILITY2__MAC_OVERRIDE, "mac_override") + S_(SECCLASS_CAPABILITY2, CAPABILITY2__MAC_ADMIN, "mac_admin") ++ S_(SECCLASS_CAPABILITY2, CAPABILITY2__CONTEXT, "context") + S_(SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_READ, "nlmsg_read") + S_(SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_WRITE, "nlmsg_write") + S_(SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_READ, "nlmsg_read") diff --git a/libjpeg6/PKGBUILD b/libjpeg6/PKGBUILD new file mode 100644 index 0000000..50f5701 --- /dev/null +++ b/libjpeg6/PKGBUILD @@ -0,0 +1,38 @@ +# Contributor: Mikael Eriksson +# Resurected from svn, originaly by +# Maintainer: Allan McRae +# Committer: Judd Vinet + +pkgname=libjpeg6 +pkgver=6b +pkgrel=7 +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) +md5sums=('dbd5f3b47ed13132f04c685d608a7547') + +build() { + cd $srcdir/jpeg-$pkgver + cp /usr/share/libtool/config/config.{guess,sub} . + sed -i "s#./libtool#libtool#" configure + ./configure --prefix=/usr --enable-shared --enable-static + make || 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 +} diff --git a/mbuffer/PKGBUILD b/mbuffer/PKGBUILD index 702bd1f..7de5464 100644 --- a/mbuffer/PKGBUILD +++ b/mbuffer/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Florian "Bluewind" Pritz # Contributor: Tim Karreman pkgname=mbuffer -pkgver=20090628 +pkgver=20091227 pkgrel=1 pkgdesc="a tool for buffering data streams" arch=(i686 x86_64) @@ -16,5 +16,5 @@ build() { make || return 1 make DESTDIR=$startdir/pkg install || return 1 } -md5sums=('66a39f6e3289f2e181b4861e6a301b01') -sha1sums=('d0f62f672c98faf0f50ace6ba90c40594fb1321a') +md5sums=('191663396b4b1752d7104803631b9e54') +sha1sums=('9beb1e711d755329c041a52011688065cbb597dd') diff --git a/mpd-git/PKGBUILD b/mpd-git/PKGBUILD index 095ec53..b607e5a 100644 --- a/mpd-git/PKGBUILD +++ b/mpd-git/PKGBUILD @@ -1,7 +1,7 @@ # Contributor: Slash pkgname=mpd-git -pkgver=20091123 +pkgver=20100111 pkgrel=1 pkgdesc="music daemon that plays mp3, flac, aac, mod, wav, mpc and ogg files" url="http://musicpd.org" diff --git a/mumble-git/PKGBUILD b/mumble-git/PKGBUILD new file mode 100644 index 0000000..4ecb52e --- /dev/null +++ b/mumble-git/PKGBUILD @@ -0,0 +1,69 @@ +# Contributor: Lauri Niskanen +# Contributor: schlaefer + +pkgname=mumble-git +pkgver=20091223 +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') +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.1 $pkgdir/usr/lib/mumble/ +ln -s libmumble.so.1.2.1 $pkgdir/usr/lib/mumble/libmumble.so +ln -s libmumble.so.1.2.1 $pkgdir/usr/lib/mumble/libmumble.so.1 +ln -s libmumble.so.1.2.1 $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 new file mode 100644 index 0000000..8eea713 --- /dev/null +++ b/mumble-git/mumble.install @@ -0,0 +1,11 @@ +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 new file mode 100644 index 0000000..1305f7c --- /dev/null +++ b/mumble-git/mumble11x.desktop @@ -0,0 +1,11 @@ +[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/perl-class-inspector/PKGBUILD b/perl-class-inspector/PKGBUILD new file mode 100644 index 0000000..a4ffbd7 --- /dev/null +++ b/perl-class-inspector/PKGBUILD @@ -0,0 +1,54 @@ +# 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 "ERROR unable to detect source directory" + echo "--> this is often due to CPAN's lack of standard naming conventions" + echo "--> 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-mail-checkuser/PKGBUILD b/perl-mail-checkuser/PKGBUILD new file mode 100644 index 0000000..208a78b --- /dev/null +++ b/perl-mail-checkuser/PKGBUILD @@ -0,0 +1,53 @@ +# PKGBUILD generated by pacpan +pkgname=perl-mail-checkuser +_realname=Mail-CheckUser +pkgver=1.21 +pkgrel=1 +pkgdesc="no description available" +arch=(i686 x86_64) +license=('unknown: check http://search.cpan.org/src/ILYAM/Mail-CheckUser-1.21/README.txt') +url="http://search.cpan.org/~ilyam/Mail-CheckUser" +options=(!emptydirs) + +depends=('perl') + +#provides=('Mail-CheckUser') +provides=('perl-mail-checkuser=1.21' 'perl-mail-checkuser=1.21') + +source=(http://search.cpan.org/CPAN/authors/id/I/IL/ILYAM/Mail-CheckUser-1.21.tar.gz) +md5sums=('32a57a4679e2bde8a85201617776d69f') + +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 "ERROR unable to detect source directory" + echo "--> this is often due to CPAN's lack of standard naming conventions" + echo "--> 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-params-util/ChangeLog b/perl-params-util/ChangeLog new file mode 100644 index 0000000..c555f14 --- /dev/null +++ b/perl-params-util/ChangeLog @@ -0,0 +1,19 @@ +2009-05-30 Gerardo Exequiel Pozzi + + * 1.00-1 : + Updated to the latest version. + + +2009-05-21 Gerardo Exequiel Pozzi + + * 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 + + * 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 new file mode 100644 index 0000000..7812bbb --- /dev/null +++ b/perl-params-util/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: Gerardo Exequiel Pozzi +# Contributor: Francois Charette + +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/smtp-cli/PKGBUILD b/smtp-cli/PKGBUILD new file mode 100644 index 0000000..7ba2f0b --- /dev/null +++ b/smtp-cli/PKGBUILD @@ -0,0 +1,19 @@ +# Contributor: Florian "Bluewind" Pritz +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 new file mode 100644 index 0000000..b732219 --- /dev/null +++ b/smtp-cli/smtp-cli @@ -0,0 +1,814 @@ +#!/usr/bin/perl + +# +# Command line SMTP client with STARTTLS, SMTP-AUTH and IPv6 support. +# Michal Ludvig , 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 = ; + close(FILE); + } + if (defined($body_html) and -f $body_html) { + local $/=undef; + open(FILE, $body_html); + $body_html = ; + 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 () + { + 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 (c) 2003-2009 + http://smtp-cli.logix.cz + +Usage: smtp-cli [--options] + + --host= Host name or address of the SMTP server. + (default: localhost) + --port= 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 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 for SMTP authentication. + --pass= 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 to use in MAIL FROM command. + --to=
Address to use in RCPT TO command. Can be + used multiple times. + + Send a complete RFC822-compliant email message: + --data= 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 of the message + --body-plain= + --body-html= + Plaintext and/or HTML body of the message + If both are provided the message is sent + as multipart. + --attach=[\@] + 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=[\@] + Attach a given filename (typically a picture) + as a 'related' part to the above 'body-html'. + Refer to these pictures as + 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[=] 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/tcc-git/PKGBUILD b/tcc-git/PKGBUILD index c1ce4a5..a062c1e 100644 --- a/tcc-git/PKGBUILD +++ b/tcc-git/PKGBUILD @@ -1,5 +1,5 @@ pkgname=tcc-git -pkgver=20091020 +pkgver=20091226 pkgrel=1 pkgdesc="Tiny C Compiler - small, simple, and fast single-pass C compiler" arch=('i686' 'x86_64') diff --git a/vhba-module/PKGBUILD b/vhba-module/PKGBUILD index 1b63748..6743122 100644 --- a/vhba-module/PKGBUILD +++ b/vhba-module/PKGBUILD @@ -1,21 +1,22 @@ -# $Id$ +# $Id: PKGBUILD 6231 2009-12-05 18:35:20Z ibiru $ # Maintainer: Mateusz Herych # Contributor: Charles Lindsay pkgname=vhba-module pkgver=1.2.1 -pkgrel=3 +pkgrel=5 pkgdesc="Kernel module that emulates SCSI devices" arch=('i686' 'x86_64') url="http://cdemu.sourceforge.net/" license=('GPL2') -depends=('kernel26>=2.6.31' 'kernel26<2.6.32') +depends=('kernel26>=2.6.32' 'kernel26<2.6.33') +makedepends=('kernel26-headers>=2.6.32') install=vhba-module.install source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2) md5sums=('a3b6ad798f2b72ef599df797ef79e5ec') build() { - cd $startdir/src/$pkgname-$pkgver + cd $srcdir/$pkgname-$pkgver make KDIR=/usr/src/linux-`uname -r` || return 1 - install -D vhba.ko $startdir/pkg/lib/modules/`uname -r`/extra/vhba.ko || return 1 + install -D vhba.ko $pkgdir/lib/modules/`uname -r`/extra/vhba.ko || return 1 } diff --git a/x264-git/PKGBUILD b/x264-git/PKGBUILD index 5b43dab..9c0a08b 100644 --- a/x264-git/PKGBUILD +++ b/x264-git/PKGBUILD @@ -1,7 +1,7 @@ # Contributor: zhuqin pkgname=x264-git -pkgver=20091122 +pkgver=20100116 pkgrel=1 pkgdesc="free library for encoding H264/AVC video streams" arch=('i686' 'x86_64') -- cgit v1.2.3-24-g4f1b From 9b41a9f296d33aca74d3ad0e5e411e23b91b729b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 17 Jan 2010 17:04:15 +0100 Subject: add wireshark-cli Signed-off-by: Florian Pritz --- wireshark-cli/PKGBUILD | 33 ++++++++++++++++++++++++++ wireshark-cli/wireshark-1.1.2--as-needed.patch | 20 ++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 wireshark-cli/PKGBUILD create mode 100644 wireshark-cli/wireshark-1.1.2--as-needed.patch diff --git a/wireshark-cli/PKGBUILD b/wireshark-cli/PKGBUILD new file mode 100644 index 0000000..24736e9 --- /dev/null +++ b/wireshark-cli/PKGBUILD @@ -0,0 +1,33 @@ +# Contributor: Hugo Doria +# Maintainer: Florian "Bluewind" Pritz + +pkgname=wireshark-cli +pkgver=1.2.5 +pkgrel=1 +pkgdesc="A free network protocol analyzer for Unix/Linux and Windows - no GUI" +arch=('i686' 'x86_64') +license=('GPL2') +depends=('heimdal>=1.3.1' 'libpcap>=1.0.0' 'bash' 'gnutls>=2.4.1' 'libcap>=2.16') +makedepends=('bison' 'flex') +url="http://www.wireshark.org/" +replaces=('ethereal') +conflicts=('wireshark') +options=(!libtool) +source=(http://www.wireshark.org/download/src/wireshark-${pkgver}.tar.gz wireshark-1.1.2--as-needed.patch) + +build() { + cd ${srcdir}/wireshark-${pkgver} + export CFLAGS="-fno-unit-at-a-time ${CFLAGS}" + + patch -Np1 -i $srcdir/wireshark-1.1.2--as-needed.patch || return 1 + autoreconf -f -i || return 1 + + ./configure --prefix=/usr --with-ssl --disable-wireshark --disable-gtktest || return 1 + make all || return 1 + make DESTDIR=${pkgdir} install || return 1 +} + +md5sums=('fdc1bc9815ee7ba067094edf60f7b9ff' + 'cc87d7eb31f256df751b3371b1c426e9') +sha1sums=('525b9062674a2951f790a2621ddf14e5cea5be48' + '7a743a42542fa59423870a0205e8ed7aa6bde70e') diff --git a/wireshark-cli/wireshark-1.1.2--as-needed.patch b/wireshark-cli/wireshark-1.1.2--as-needed.patch new file mode 100644 index 0000000..7da659c --- /dev/null +++ b/wireshark-cli/wireshark-1.1.2--as-needed.patch @@ -0,0 +1,20 @@ +diff --git a/epan/Makefile.am b/epan/Makefile.am +index b2a569d..717e233 100644 +--- a/epan/Makefile.am ++++ b/epan/Makefile.am +@@ -130,6 +130,7 @@ libwireshark_la_LIBADD = \ + dissectors/libdirtydissectors.la $(wslua_lib) @SOCKET_LIBS@ @NSL_LIBS@ \ + @C_ARES_LIBS@ @ADNS_LIBS@ @LIBGCRYPT_LIBS@ @LIBGNUTLS_LIBS@ \ + @KRB5_LIBS@ @SSL_LIBS@ @LIBSMI_LDFLAGS@ @GEOIP_LIBS@ \ ++ ${top_builddir}/wiretap/libwiretap.la \ + ${top_builddir}/wsutil/libwsutil.la -lm + + libwireshark_la_DEPENDENCIES = \ +@@ -137,6 +138,7 @@ libwireshark_la_DEPENDENCIES = \ + libwireshark_asmopt.la crypt/libairpdcap.la ftypes/libftypes.la \ + dfilter/libdfilter.la dissectors/libdissectors.la \ + dissectors/libdirtydissectors.la $(wslua_lib) \ ++ ${top_builddir}/wiretap/libwiretap.la \ + ${top_builddir}/wsutil/libwsutil.la + + #EXTRA_PROGRAMS = reassemble_test -- cgit v1.2.3-24-g4f1b From 9c3a05dd8ce0a5180b1a47a21ec73bf4ab951ac3 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 22 Jan 2010 13:34:14 +0100 Subject: inxi upstream update Signed-off-by: Florian Pritz --- inxi/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inxi/PKGBUILD b/inxi/PKGBUILD index 96baf59..02be1c8 100644 --- a/inxi/PKGBUILD +++ b/inxi/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Florian Pritz pkgname=inxi -pkgver=1.3.1 +pkgver=1.3.2 pkgrel=1 pkgdesc="script to get system information" arch=('any') -- cgit v1.2.3-24-g4f1b From a0c21e79a8608b8db3e3d32a278514a75708207a Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 22 Jan 2010 19:25:52 +0100 Subject: thunar-notrash: fix for new libpng Signed-off-by: Florian Pritz --- thunar-notrash/PKGBUILD | 15 +++++++++++---- thunar-notrash/libpng-1.4.patch | 12 ++++++++++++ thunar-notrash/thunar-vfs-fix-umask.patch | 11 +++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 thunar-notrash/libpng-1.4.patch create mode 100644 thunar-notrash/thunar-vfs-fix-umask.patch diff --git a/thunar-notrash/PKGBUILD b/thunar-notrash/PKGBUILD index ac83f3d..cc687f3 100644 --- a/thunar-notrash/PKGBUILD +++ b/thunar-notrash/PKGBUILD @@ -18,11 +18,14 @@ optdepends=('gamin: a fam replacement to make thunar monitor changes to files options=('!libtool') install=${pkgname}.install source=(http://www.xfce.org/archive/xfce-4.6.1/src/Thunar-${pkgver}.tar.bz2 Ability_to_disable_trash_on_Thunar.patch -) + thunar-vfs-fix-umask.patch libpng-1.4.patch) build() { cd ${srcdir}/Thunar-${pkgver} patch -p2 < $srcdir/Ability_to_disable_trash_on_Thunar.patch + patch -p1 < ../libpng-1.4.patch + patch -Np0 -i ${srcdir}/thunar-vfs-fix-umask.patch + ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \ --localstatedir=/var --disable-static \ --disable-gnome-thumbnailers --enable-exif --enable-pcre \ @@ -33,6 +36,10 @@ build() { ${pkgdir}/usr/share/applications/Thunar-folder-handler.desktop } md5sums=('218373aa45d74b6ba8c69c4d5af3bb19' - '55816882bbeac5bb1153f0b195a220d7') -sha256sums=('7a2b6b493463756bbc9c54144fab2f2163bc84f0896b4c06fd225d11025a210d' - 'e235ac3f5559d685051bb747b348238a925de32653e8e8c9b8b89c1e0bb56a67') + '55816882bbeac5bb1153f0b195a220d7' + '7247041fd2c411e4a129d3f90350893c' + 'ee998c20ba13d0cb18741da8b7d67328') +sha1sums=('2fcd3a7b0e27b01f059dffc8ffdac94e2b2aa064' + 'c4b110b2a83b6d7b88e04bb550d20c598ffe6f82' + '47526f997627264813843cf466c5ee9335047458' + '99f520655582acb5bffbee72bf0bc37aef37bc69') diff --git a/thunar-notrash/libpng-1.4.patch b/thunar-notrash/libpng-1.4.patch new file mode 100644 index 0000000..7f38165 --- /dev/null +++ b/thunar-notrash/libpng-1.4.patch @@ -0,0 +1,12 @@ +diff -Naur Thunar-1.0.1.orig/thunar-vfs/thunar-vfs-thumb.c Thunar-1.0.1/thunar-vfs/thunar-vfs-thumb.c +--- Thunar-1.0.1.orig/thunar-vfs/thunar-vfs-thumb.c 2010-01-20 21:31:35.000000000 -0500 ++++ Thunar-1.0.1/thunar-vfs/thunar-vfs-thumb.c 2010-01-20 21:34:51.000000000 -0500 +@@ -1169,7 +1169,7 @@ + goto done0; + + /* verify the png signature */ +- if (G_LIKELY (png_check_sig ((png_bytep) signature, sizeof (signature)))) ++ if (G_LIKELY (!png_sig_cmp ((png_bytep) signature, 0, sizeof (signature)))) + rewind (fp); + else + goto done0; diff --git a/thunar-notrash/thunar-vfs-fix-umask.patch b/thunar-notrash/thunar-vfs-fix-umask.patch new file mode 100644 index 0000000..dbfc1f8 --- /dev/null +++ b/thunar-notrash/thunar-vfs-fix-umask.patch @@ -0,0 +1,11 @@ +--- 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; + } + -- cgit v1.2.3-24-g4f1b From b6288aa4d7fc95fcdb2bdd812db8f8483f7c8e1d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 22 Jan 2010 21:45:03 +0100 Subject: upstream update Signed-off-by: Florian Pritz --- gom/PKGBUILD | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gom/PKGBUILD b/gom/PKGBUILD index dccf3ee..41e25f0 100644 --- a/gom/PKGBUILD +++ b/gom/PKGBUILD @@ -1,11 +1,11 @@ # Contributor: Florian Pritz pkgname=gom -pkgver=0.30.1 +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/etch/gom" +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") @@ -19,5 +19,5 @@ build() { } # vim:set ts=2 sw=2 et: -md5sums=('c6f23ae183a010f5691c2ab020496a55') -sha256sums=('21b379b92d521fd6268aeaf4931fac5f2fc6d709760a941a8d6dc5973a607f3c') +md5sums=('7e53cdf68a54be2ff07fd8183c1b17b0') +sha1sums=('1048c8a823dc823d8e9bc35b96ee5c09fb9555fe') -- cgit v1.2.3-24-g4f1b From 967d0ca2059e801d18a921083a835e61a5bb17d9 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 22 Jan 2010 21:48:04 +0100 Subject: upstream update Signed-off-by: Florian Pritz --- jabberbot/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jabberbot/PKGBUILD b/jabberbot/PKGBUILD index c5b2bd7..8df7237 100644 --- a/jabberbot/PKGBUILD +++ b/jabberbot/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Florian Pritz pkgname=jabberbot -pkgver=0.8 +pkgver=0.9 pkgrel=1 pkgdesc="A simple Jabber Bot for Python" arch=('any') @@ -15,5 +15,5 @@ build() { } # vim:set ts=2 sw=2 et: -md5sums=('364828c62536f44495e7f810591ec224') -sha1sums=('bb5de0bda4967656c9be0ca69bb6bda332405751') +md5sums=('2262df265f6ba387f1ace1bf417d0275') +sha1sums=('0672d49b07c37a84167c8357f6e89ec76ebce7f6') -- cgit v1.2.3-24-g4f1b From 8188a93406cf6bae1a356d22ebd84c3cad0f5e6a Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 22 Jan 2010 21:57:00 +0100 Subject: upstream update Signed-off-by: Florian Pritz --- vnstati/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vnstati/PKGBUILD b/vnstati/PKGBUILD index 4c88b80..8b65f3b 100644 --- a/vnstati/PKGBUILD +++ b/vnstati/PKGBUILD @@ -1,7 +1,7 @@ # Contributor: Florian Pritz pkgname=vnstati -pkgver=1.9 +pkgver=1.10 pkgrel=1 pkgdesc="png image output support for vnStat" arch=('i686' 'x86_64') @@ -20,5 +20,5 @@ build() { # vim:set ts=2 sw=2 et: -md5sums=('ebaf8352fa3674faea2fe2ce1001a38d') -sha256sums=('0193e9042e4bc3e21616a8f39610c31a9d1bdaec370ad1ce1a3abcc841f52fd6') +md5sums=('95421d968689130590348ceb80ff74a8') +sha1sums=('813177fb55296deaf5059bb111885616f4d8a86f') -- cgit v1.2.3-24-g4f1b From 4efa028fc82176689995f24a217cd0cc56668637 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 30 Jan 2010 01:11:15 +0100 Subject: update Signed-off-by: Florian Pritz --- vhba-module/PKGBUILD | 16 +++++++++------- vhba-module/vhba-module.install | 19 ++++++++----------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/vhba-module/PKGBUILD b/vhba-module/PKGBUILD index 6743122..cf6b507 100644 --- a/vhba-module/PKGBUILD +++ b/vhba-module/PKGBUILD @@ -1,22 +1,24 @@ -# $Id: PKGBUILD 6231 2009-12-05 18:35:20Z ibiru $ +# $Id: PKGBUILD 6790 2009-12-22 18:03:34Z ibiru $ # Maintainer: Mateusz Herych # Contributor: Charles Lindsay pkgname=vhba-module pkgver=1.2.1 -pkgrel=5 +_kernver='2.6.32-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.32' 'kernel26<2.6.33') -makedepends=('kernel26-headers>=2.6.32') +depends=('kernel26>=2.6.32.2' 'kernel26<2.6.33') +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-`uname -r` || return 1 - install -D vhba.ko $pkgdir/lib/modules/`uname -r`/extra/vhba.ko || return 1 + 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 index 4f7e460..422ff82 100644 --- a/vhba-module/vhba-module.install +++ b/vhba-module/vhba-module.install @@ -1,19 +1,16 @@ -# Copied/modified from frandom.install - -# arg 1: the new package version -# arg 2: the old package version - -post_install () { +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." - depmod -a + KERNEL_VERSION='2.6.32-ARCH' + depmod $KERNEL_VERSION > /dev/null 2>&1 } -pre_remove () { - rmmod vhba 2> /dev/null +post_upgrade() { + post_install } -post_remove () { - depmod -a +post_remove() { + KERNEL_VERSION='2.6.32-ARCH' + depmod $KERNEL_VERSION > /dev/null 2>&1 } -- cgit v1.2.3-24-g4f1b From ebecfe6e1af32dbd729c4e0bd9760ea4abdceda7 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 4 Feb 2010 00:29:01 +0100 Subject: update Signed-off-by: Florian Pritz --- inxi/PKGBUILD | 2 +- wireshark-cli/PKGBUILD | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inxi/PKGBUILD b/inxi/PKGBUILD index 02be1c8..77db587 100644 --- a/inxi/PKGBUILD +++ b/inxi/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Florian Pritz pkgname=inxi -pkgver=1.3.2 +pkgver=1.3.9 pkgrel=1 pkgdesc="script to get system information" arch=('any') diff --git a/wireshark-cli/PKGBUILD b/wireshark-cli/PKGBUILD index 24736e9..6946fb4 100644 --- a/wireshark-cli/PKGBUILD +++ b/wireshark-cli/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: Florian "Bluewind" Pritz pkgname=wireshark-cli -pkgver=1.2.5 +pkgver=1.2.6 pkgrel=1 pkgdesc="A free network protocol analyzer for Unix/Linux and Windows - no GUI" arch=('i686' 'x86_64') @@ -27,7 +27,7 @@ build() { make DESTDIR=${pkgdir} install || return 1 } -md5sums=('fdc1bc9815ee7ba067094edf60f7b9ff' +md5sums=('7de7f59486c034b0cc30743494f14556' 'cc87d7eb31f256df751b3371b1c426e9') -sha1sums=('525b9062674a2951f790a2621ddf14e5cea5be48' +sha1sums=('62f5571e4786d3fa0cfc3d528f69a5c431e42d75' '7a743a42542fa59423870a0205e8ed7aa6bde70e') -- cgit v1.2.3-24-g4f1b From fe77f2c750890ca9e88381bb3c692f901958f700 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 4 Feb 2010 00:32:54 +0100 Subject: update Signed-off-by: Florian Pritz --- highlight/PKGBUILD | 4 ++-- w3watch-git/PKGBUILD | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/highlight/PKGBUILD b/highlight/PKGBUILD index 71e67de..a288a5d 100644 --- a/highlight/PKGBUILD +++ b/highlight/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Jan Fader pkgname=highlight -pkgver=2.13 +pkgver=2.14 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" @@ -8,7 +8,7 @@ license=('GPL') arch=('i686' 'x86_64') install= source=(http://www.andre-simon.de/zip/$pkgname-$pkgver.tar.bz2) -md5sums=('1f5d325e24f25d7d17d223c8ab3a2785') +md5sums=('1f29f0e9a9bf280e96912e1fa5706d0d') build() { cd "$startdir/src/$pkgname-$pkgver" diff --git a/w3watch-git/PKGBUILD b/w3watch-git/PKGBUILD index 6c376dc..dbae2bb 100644 --- a/w3watch-git/PKGBUILD +++ b/w3watch-git/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Pierre Schmitz pkgname=w3watch-git -pkgver=20090829 +pkgver=20100122 pkgrel=1 pkgdesc='Watch the web and get notified on updates' arch=('any') -- cgit v1.2.3-24-g4f1b From 24e406d49c869888143b9abf58f3e0a354c52dfe Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 4 Feb 2010 12:28:59 +0100 Subject: update Signed-off-by: Florian Pritz --- imagemagick-nox/PKGBUILD | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/imagemagick-nox/PKGBUILD b/imagemagick-nox/PKGBUILD index ac59e11..600594a 100644 --- a/imagemagick-nox/PKGBUILD +++ b/imagemagick-nox/PKGBUILD @@ -6,7 +6,7 @@ # Just uninstalling ImageMagick before build fails as it is used during the build processs pkgname=imagemagick-nox -pkgver=6.5.7.10 +pkgver=6.5.9.1 pkgrel=1 pkgdesc="An image viewing/manipulation program, without X dependencies" arch=('i686' 'x86_64') @@ -17,10 +17,6 @@ provides=('imagemagick') options=('!makeflags' '!docs') source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.bz2 \ libpng_mmx_patch_x86_64.patch add_delegate.patch perlmagick.rpath.patch) -md5sums=('5f2d4d0eacbeea48af5c4cfb37c4afe2' '069980fc2590c02aed86420996259302'\ - '7f5851c4450b73d52df55c7e806cc316' 'ff9974decbfe9846f8e347239d87e4eb') -sha1sums=('f3d802f2ba01f63c60847341149021a93967979c' 'e42f3acbe85b6098af75c5cecc9a254baaa0482c'\ - '19b40dcbc5bf8efb8ce7190fed17e2921de32ea5' '23405f80904b1de94ebd7bd6fe2a332471b8c283') build() { cd "${srcdir}/ImageMagick-${pkgver%.*}-${pkgver##*.}" @@ -52,3 +48,7 @@ build() { rm -f ${pkgdir}/usr/lib/*.la || return 1 } +md5sums=('045089aa726b5e709097c5544f181d55' + '069980fc2590c02aed86420996259302' + '7f5851c4450b73d52df55c7e806cc316' + 'ff9974decbfe9846f8e347239d87e4eb') -- cgit v1.2.3-24-g4f1b From fe18e6f963b10777583dda8cc5ad8e0229dc4a05 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 6 Feb 2010 21:56:38 +0100 Subject: thunar-notrash: fix pkgrel Signed-off-by: Florian Pritz --- thunar-notrash/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thunar-notrash/PKGBUILD b/thunar-notrash/PKGBUILD index cc687f3..241479f 100644 --- a/thunar-notrash/PKGBUILD +++ b/thunar-notrash/PKGBUILD @@ -4,7 +4,7 @@ pkgname=thunar-notrash pkgver=1.0.1 -pkgrel=1 +pkgrel=2 pkgdesc="new modern file manager for Xfce with patch to disable trash" arch=(i686 x86_64) license=('GPL2' 'LGPL2') -- cgit v1.2.3-24-g4f1b From fb7ca9fcebda89c0f78dbc8200e35c4dd5d7c71d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 20:36:39 +0100 Subject: upstream update Signed-off-by: Florian Pritz --- inxi/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inxi/PKGBUILD b/inxi/PKGBUILD index 77db587..00bcaa7 100644 --- a/inxi/PKGBUILD +++ b/inxi/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Florian Pritz pkgname=inxi -pkgver=1.3.9 +pkgver=1.4.6 pkgrel=1 pkgdesc="script to get system information" arch=('any') -- cgit v1.2.3-24-g4f1b From 351991ce3e10dfae9cf57e7cf79fcca9b01c585b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 20:37:34 +0100 Subject: update Signed-off-by: Florian Pritz --- cdrtools/PKGBUILD | 10 +++++----- firefox-nightly/ChangeLog | 3 +++ firefox-nightly/PKGBUILD | 5 +++-- gimp-git/PKGBUILD | 2 +- gspoof/PKGBUILD | 4 +--- gvim/PKGBUILD | 17 ++++++++++------- gvim/fetch_patches.sh | 23 ++++++++++++++--------- libjpeg6/PKGBUILD | 13 +++++++++---- mplayer-vdpau-nogui/PKGBUILD | 2 +- mtr-cli/PKGBUILD | 5 +++-- mumble-git/PKGBUILD | 2 +- smplayer-svn/PKGBUILD | 2 +- vim-nerdtree/PKGBUILD | 8 ++++---- vim/PKGBUILD | 27 ++++++++++++++------------- vim/vimrc | 6 +++--- wireshark/PKGBUILD | 29 ----------------------------- wireshark/wireshark.desktop | 10 ---------- wireshark/wireshark.png | Bin 18535 -> 0 bytes 18 files changed, 73 insertions(+), 95 deletions(-) delete mode 100644 wireshark/PKGBUILD delete mode 100644 wireshark/wireshark.desktop delete mode 100644 wireshark/wireshark.png diff --git a/cdrtools/PKGBUILD b/cdrtools/PKGBUILD index 5196fd1..19fc892 100644 --- a/cdrtools/PKGBUILD +++ b/cdrtools/PKGBUILD @@ -1,7 +1,7 @@ -# Former contributor: Tuxbubling , alejandronova -# Contributor: Lukas Jirkovsky +# Maintainer: Lukas Jirkovsky +# Contributor: Tuxbubling , alejandronova pkgname=cdrtools -pkgver=2.01.01a66 +pkgver=2.01.01a76 pkgrel=1 pkgdesc="Original cdrtools, supporting CD, DVD and BluRay burning" arch=('i686' 'x86_64') @@ -12,8 +12,8 @@ conflicts=('cdrkit') provides=('cdrkit') backup=('etc/default/cdrecord' 'etc/default/rscsi') install=cdrtools.install -source=(ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-$pkgver.tar.gz) -md5sums=('b9d40bddf1ce75989d0a36b939f0c3fb') +source=(http://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-$pkgver.tar.gz) +md5sums=('1cc6e28c7eeee39d21dec5dfc5b851ef') build() { cd "$srcdir"/cdrtools-${pkgver%%a*} diff --git a/firefox-nightly/ChangeLog b/firefox-nightly/ChangeLog index 606e7d9..74ab85e 100644 --- a/firefox-nightly/ChangeLog +++ b/firefox-nightly/ChangeLog @@ -1,3 +1,6 @@ +firefox-nightly 3.7a2pre-1 + + New version + firefox-nightly 3.7a1pre-2 + Fixed wrong url, thanks to kumyco diff --git a/firefox-nightly/PKGBUILD b/firefox-nightly/PKGBUILD index a74ab05..009bc84 100644 --- a/firefox-nightly/PKGBUILD +++ b/firefox-nightly/PKGBUILD @@ -1,4 +1,5 @@ -# Maintainer: coderoar +# Maintainer: Cedric MATHIEU +# Contributor: coderoar arch=('i686' 'x86_64') license=('MPL' 'GPL' 'LGPL') @@ -6,7 +7,7 @@ license=('MPL' 'GPL' 'LGPL') pkgname=firefox-nightly pkgdesc='Standalone web browser from mozilla.org, nightly build.' url='http://www.mozilla.org/projects/firefox' -pkgver=3.7a1pre +pkgver=3.7a2pre pkgrel=$(date +%Y_%m_%d_%T) source=( 'firefox-nightly.desktop' 'firefox-nightly-safe.desktop' ) diff --git a/gimp-git/PKGBUILD b/gimp-git/PKGBUILD index f248c6e..58223f8 100644 --- a/gimp-git/PKGBUILD +++ b/gimp-git/PKGBUILD @@ -1,7 +1,7 @@ # Contributor: Alessio Biancalana pkgname=gimp-git -pkgver=20100109 +pkgver=20100131 pkgrel=1 pkgdesc="GNU Image Manipulation Program (GIT Version)" arch=('i686' 'x86_64') diff --git a/gspoof/PKGBUILD b/gspoof/PKGBUILD index fe656d8..856f8c2 100755 --- a/gspoof/PKGBUILD +++ b/gspoof/PKGBUILD @@ -1,5 +1,4 @@ # Contributor: Florian Pritz - pkgname=gspoof pkgver=3.2 pkgrel=1 @@ -10,6 +9,7 @@ license=('GPL') depends=('libnet>=1.1.1' 'gtk') source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz) noextract=() +md5sums=('7a1d124a1d0bed87e19b239d559ba880') build() { cd "$srcdir/$pkgname-$pkgver" @@ -21,5 +21,3 @@ build() { cp -r pixmap $pkgdir/usr/share/$pkgname/pixmap/ } -md5sums=('7a1d124a1d0bed87e19b239d559ba880') -sha256sums=('65f12bf8ca23d3fa6af0cedda4fb6c28c955a909e1787bd5dda14404a0280019') diff --git a/gvim/PKGBUILD b/gvim/PKGBUILD index 6d48d95..47e42f5 100644 --- a/gvim/PKGBUILD +++ b/gvim/PKGBUILD @@ -1,22 +1,25 @@ -# $Id$ +# $Id: PKGBUILD 53532 2009-10-02 06:43:56Z francois $ # Maintainer: tobias [ tobias at archlinux org ] pkgname=gvim _srcver=7.2 -_patchlevel=218 +_patchlevel=359 pkgver=${_srcver}.${_patchlevel} -pkgrel=1 +pkgrel=2 pkgdesc="the vim text editor with advanced features enabled, such as a gui mode" arch=(i686 x86_64) license=('custom:vim') url="http://www.vim.org" -depends=("vim=${pkgver}" 'perl' 'python' 'libxt' 'desktop-file-utils' 'gtk2') -makedepends=('pkgconfig' 'sed') +depends=("vim>=${pkgver}" 'python' 'libxt' 'desktop-file-utils' 'gtk2') +makedepends=('pkgconfig' 'sed' 'perl') install=${pkgname}.install source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \ ${pkgname}.desktop fetch_patches.sh) +md5sums=('f0901284b338e448bfd79ccca0041254' '35e04482f07c57221c9a751aaa3b8dac' \ + 'd8884786979e0e520c112faf2e176f05' '2be104c0372dd6dae19cb7968c03cd4f' \ + 'df640c8196c480795fdda24c817e0f11') build() { @@ -31,8 +34,8 @@ build() ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \ --with-compiledby=ArchLinux --with-features=big \ --with-x=yes --disable-gpm --enable-gui=gtk2 \ - --enable-multibyte --enable-cscope \ - --enable-perlinterp --enable-pythoninterp + --enable-multibyte --enable-cscope --enable-netbeans \ + --enable-perlinterp --enable-pythoninterp --disable-rubyinterp make || return 1 # install everything first ... make VIMRCLOC=/etc DESTDIR=${pkgdir} install diff --git a/gvim/fetch_patches.sh b/gvim/fetch_patches.sh index 41b8564..56ba47b 100644 --- a/gvim/fetch_patches.sh +++ b/gvim/fetch_patches.sh @@ -1,8 +1,8 @@ # the external logic for pulling in patches get_patches() { - _patchdir=${startdir}/src/patches - cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//") + _patchdir=${srcdir}/patches + cd ${srcdir}/vim$(echo ${_srcver} | sed "s/\.//") if [ -d ${_patchdir} ]; then rm -rf ${_patchdir} echo -e "\tremove patches from old build" @@ -19,9 +19,10 @@ get_patches() { downloads=0 for _line in $(/bin/cat MD5SUMS); do + _file=$(echo $_line | cut -d ' ' -f3) + [ ${_file##*.} == "gz" ] && continue 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} ./ @@ -44,17 +45,21 @@ get_patches() { done ######## - - rm *.gz - + if [ ${downloads} != ${_patchlevel} ]; then - echo -e "Number of patches does not match the patchlevel!\nEdit the PKGBUILD accordingly!" - # return 1 + echo "" + echo -e "\t\tWARNING!" + echo "You are not building the latest available version! A newer patchlevel" + echo "seems to be available. Please edit the PKGBUILD and add the latest" + echo "${downloads} as pkgrel number!" + echo "" + sleep 10 fi IFS=$_OLDIFS rm MD5SUMS cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//") - for _patch in $(/bin/ls ${_patchdir}); do + for _patchnum in $(/usr/bin/seq 1 ${_patchlevel}); do + _patch=${_srcver}.$(printf "%03d" ${_patchnum}) patch -Np0 -i ${_patchdir}/${_patch} || return 1 done rm -rf ${_patchdir} diff --git a/libjpeg6/PKGBUILD b/libjpeg6/PKGBUILD index 50f5701..6a24d66 100644 --- a/libjpeg6/PKGBUILD +++ b/libjpeg6/PKGBUILD @@ -5,7 +5,7 @@ pkgname=libjpeg6 pkgver=6b -pkgrel=7 +pkgrel=9 pkgdesc="Library of JPEG support functions" arch=('i686' 'x86_64') url="http://www.ijg.org/" @@ -13,15 +13,18 @@ license=('custom') depends=('glibc') makedepends=('libtool') options=(!libtool) -source=(ftp://ftp.debian.org/debian/pool/main/libj/libjpeg6b/libjpeg6b_6b.orig.tar.gz) -md5sums=('dbd5f3b47ed13132f04c685d608a7547') +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 || return 1 + 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 @@ -36,3 +39,5 @@ build() { 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/mplayer-vdpau-nogui/PKGBUILD b/mplayer-vdpau-nogui/PKGBUILD index 78587d0..37c3c83 100644 --- a/mplayer-vdpau-nogui/PKGBUILD +++ b/mplayer-vdpau-nogui/PKGBUILD @@ -1,7 +1,7 @@ #Contributor: Reiser pkgname=mplayer-vdpau-nogui -pkgver=30337 +pkgver=30385 pkgrel=1 pkgdesc="Famous multimedia player, dev. version, without its GUI and support for nvidia VDPAU" arch=('i686' 'x86_64') diff --git a/mtr-cli/PKGBUILD b/mtr-cli/PKGBUILD index bde81eb..9db3001 100644 --- a/mtr-cli/PKGBUILD +++ b/mtr-cli/PKGBUILD @@ -3,18 +3,19 @@ pkgname=mtr-cli pkgver=0.75 -pkgrel=4 +pkgrel=5 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) url="http://www.bitwizard.nl/mtr/" md5sums=('23baca52d0922c2ecba7eba05317868c') build() { cd "${srcdir}/mtr-${pkgver}" - ./configure --prefix=/usr --disable-gtk2 || return 1 + ./configure --prefix=/usr --disable-gtktest --without-gtk || return 1 make || return 1 make DESTDIR="${pkgdir}" install || return 1 } diff --git a/mumble-git/PKGBUILD b/mumble-git/PKGBUILD index 4ecb52e..134bfc3 100644 --- a/mumble-git/PKGBUILD +++ b/mumble-git/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: schlaefer pkgname=mumble-git -pkgver=20091223 +pkgver=20100225 pkgrel=1 pkgdesc="A voice chat application similar to TeamSpeak" arch=('i686' 'x86_64') diff --git a/smplayer-svn/PKGBUILD b/smplayer-svn/PKGBUILD index a67f38f..9a7eed3 100644 --- a/smplayer-svn/PKGBUILD +++ b/smplayer-svn/PKGBUILD @@ -3,7 +3,7 @@ # Fixes by: WAntilles pkgname=smplayer-svn -pkgver=3238 +pkgver=3412 pkgrel=1 _latestver=0.6.8 pkgdesc="A complete front-end for MPlayer" diff --git a/vim-nerdtree/PKGBUILD b/vim-nerdtree/PKGBUILD index a321e33..80bb044 100644 --- a/vim-nerdtree/PKGBUILD +++ b/vim-nerdtree/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: Laszlo Papp pkgname=vim-nerdtree -pkgver=4.0.0 -_scriptid=11500 -pkgrel=3 +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" @@ -12,7 +12,7 @@ groups=('vim-plugins') install=vimdoc.install source=(${pkgname}.zip::http://www.vim.org/scripts/download_script.php?src_id=${_scriptid} license.txt) -md5sums=('a359ce8f9bf5ccf238a53df5dd94725a' +md5sums=('a15fa66b36c3261e598d93dc830398f6' 'efbd5986e691ce8c876fb86e8f5961ea') build() { diff --git a/vim/PKGBUILD b/vim/PKGBUILD index d879d73..746c917 100644 --- a/vim/PKGBUILD +++ b/vim/PKGBUILD @@ -1,18 +1,17 @@ -# $Id$ +# $Id: PKGBUILD 68412 2010-02-12 20:04:30Z dgriffiths $ # Maintainer: tobias [ tobias at archlinux org ] pkgname=vim _srcver=7.2 -_patchlevel=267 +_patchlevel=359 pkgver=${_srcver}.${_patchlevel} pkgrel=1 pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor' arch=(i686 x86_64) license=('custom:vim') url="http://www.vim.org" -depends=('gpm' 'coreutils' 'python') -makedepends=('wget' 'sed' 'grep' 'gettext' 'perl') -optdepends=('perl: the runtime provides a few useful perl scripts') +depends=('gpm' 'coreutils' 'perl') +makedepends=('wget' 'sed' 'grep' 'gettext') backup=(etc/vimrc) install=${pkgname}.install # we need the extra-stuff to get all patches applied smoothly @@ -20,6 +19,10 @@ source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \ fetch_patches.sh fetch_runtime.sh vimrc archlinux.vim) +md5sums=('f0901284b338e448bfd79ccca0041254' '35e04482f07c57221c9a751aaa3b8dac' \ + 'd8884786979e0e520c112faf2e176f05' '6d7e8d7868e8bfaa9a5880cd9c439320' \ + '45c1c3c6aff7de0d8fc2a9d8cd5cec7d' '3f42c68545b5b1afb2e9a5b2731ef063' \ + '10353a61aadc3f276692d0e17db1478e') build() { @@ -28,6 +31,7 @@ build() . ${srcdir}/fetch_patches.sh . ${srcdir}/fetch_runtime.sh get_patches || return 1 + cd ${srcdir}/${_versiondir} sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h @@ -36,7 +40,7 @@ build() --with-compiledby=ArchLinux --with-features=big \ --enable-gpm --enable-acl --with-x=no --disable-gui \ --enable-multibyte --enable-cscope \ - --enable-perlinterp --enable-pythoninterp + --enable-perlinterp #--with-global-runtime=/usr/share/vim --with-vim-name=vim \ make || return 1 make VIMRCLOC=/etc DESTDIR=${pkgdir} install @@ -57,6 +61,10 @@ build() rm -f evim.1 # this does not make sense in the console version done + # fix FS#17216 + sed -i 's|messages,/var|messages,/var/log/messages.log,/var|' \ + ${pkgdir}/usr/share/vim/vim72/filetype.vim + _runtimedir="${pkgdir}/usr/share/vim/${_versiondir}/" update_runtime cd ${srcdir}/${_versiondir} @@ -67,10 +75,3 @@ build() cd ${pkgdir}/usr/share/licenses/vim ln -s ../../vim/${_versiondir}/doc/uganda.txt license.txt } -md5sums=('f0901284b338e448bfd79ccca0041254' - '35e04482f07c57221c9a751aaa3b8dac' - 'd8884786979e0e520c112faf2e176f05' - '6d7e8d7868e8bfaa9a5880cd9c439320' - '45c1c3c6aff7de0d8fc2a9d8cd5cec7d' - '98a6065e21cba417870a66b78e9f0210' - '10353a61aadc3f276692d0e17db1478e') diff --git a/vim/vimrc b/vim/vimrc index 627d028..f292bd5 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -10,7 +10,7 @@ " properly set to work with the Vim-related packages available in Debian. runtime! archlinux.vim - -" For more option refer to /usr/share/vim/vim72/vimrc_example.vim or the vim -" manual +" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim' +" Or better yet, read /usr/share/vim/vim72/vimrc_example.vim or the vim manual +" and configure vim to your own liking! diff --git a/wireshark/PKGBUILD b/wireshark/PKGBUILD deleted file mode 100644 index 56ac8b7..0000000 --- a/wireshark/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# $Id$ -# Maintainer: Hugo Doria - -pkgname=wireshark -pkgver=1.2.1 -pkgrel=1 -pkgdesc="A free network protocol analyzer for Unix/Linux and Windows" -arch=('i686' 'x86_64') -license=('GPL2') -depends=('gtk2>=2.14.5' 'heimdal>=1.2.1' 'libpcap>=1.0.0' 'bash' 'gnutls>=2.4.1' 'libcap>=2.16') -makedepends=('bison' 'flex') -url="http://www.wireshark.org/" -replaces=('ethereal') -options=(!libtool) -source=(http://www.wireshark.org/download/src/${pkgname}-${pkgver}.tar.gz wireshark.desktop wireshark.png) -md5sums=('56d760eeec0001b9a0b816ace3e99e44' - '504ede44c02b2a52f6cbd3bffdf93b8d' - 'e771800a8c977fe223583a453bc27397') - -build() { - cd ${srcdir}/${pkgname}-${pkgver} - export CFLAGS="-fno-unit-at-a-time ${CFLAGS}" - ./configure --prefix=/usr --with-ssl || return 1 - make all || return 1 - make DESTDIR=${pkgdir} install || return 1 - - install -Dm644 ${srcdir}/wireshark.png ${pkgdir}/usr/share/icons/wireshark.png - install -Dm644 ${srcdir}/wireshark.desktop ${pkgdir}/usr/share/applications/wireshark.desktop -} diff --git a/wireshark/wireshark.desktop b/wireshark/wireshark.desktop deleted file mode 100644 index f4317f6..0000000 --- a/wireshark/wireshark.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -GenericName=Wireshark -Comment=Network protocol analyzer -Name=wireshark -Exec=wireshark -Icon=/usr/share/icons/wireshark.png -Type=Application -Terminal=false -Categories=Application;Network; diff --git a/wireshark/wireshark.png b/wireshark/wireshark.png deleted file mode 100644 index 4e40263..0000000 Binary files a/wireshark/wireshark.png and /dev/null differ -- cgit v1.2.3-24-g4f1b From f23d273a395cbdfd8a1197adc3509ba3dfb4637b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 20:40:50 +0100 Subject: update Signed-off-by: Florian Pritz --- amavisd-milter/PKGBUILD | 31 + dc3dd/PKGBUILD | 21 + gajim-hg/PKGBUILD | 48 + gajim-hg/gajim.install | 11 + gvim/vim-7.2/7.2.219 | 71 + gvim/vim-7.2/7.2.220 | 95 ++ gvim/vim-7.2/7.2.221 | 247 +++ gvim/vim-7.2/7.2.222 | 59 + gvim/vim-7.2/7.2.223 | 165 ++ gvim/vim-7.2/7.2.224 | 88 + gvim/vim-7.2/7.2.225 | 97 ++ gvim/vim-7.2/7.2.226 | 268 +++ gvim/vim-7.2/7.2.227 | 52 + gvim/vim-7.2/7.2.228 | 573 +++++++ gvim/vim-7.2/7.2.229 | 60 + gvim/vim-7.2/7.2.230 | 87 + gvim/vim-7.2/7.2.231 | 49 + gvim/vim-7.2/7.2.232 | 102 ++ gvim/vim-7.2/7.2.233 | 96 ++ gvim/vim-7.2/7.2.234 | 111 ++ gvim/vim-7.2/7.2.235 | 94 ++ gvim/vim-7.2/7.2.236 | 81 + gvim/vim-7.2/7.2.237 | 76 + gvim/vim-7.2/7.2.238 | 117 ++ gvim/vim-7.2/7.2.239 | 145 ++ gvim/vim-7.2/7.2.240 | 69 + gvim/vim-7.2/7.2.241 | 169 ++ gvim/vim-7.2/7.2.242 | 89 + gvim/vim-7.2/7.2.243 | 67 + gvim/vim-7.2/7.2.244 | 174 ++ gvim/vim-7.2/7.2.245 | 165 ++ gvim/vim-7.2/7.2.246 | 53 + gvim/vim-7.2/7.2.247 | 86 + gvim/vim-7.2/7.2.248 | 158 ++ gvim/vim-7.2/7.2.249 | 47 + gvim/vim-7.2/7.2.250 | 55 + gvim/vim-7.2/7.2.251 | 71 + gvim/vim-7.2/7.2.252 | 51 + gvim/vim-7.2/7.2.253 | 143 ++ gvim/vim-7.2/7.2.254 | 52 + gvim/vim-7.2/7.2.255 | 71 + gvim/vim-7.2/7.2.256 | 59 + gvim/vim-7.2/7.2.257 | 61 + gvim/vim-7.2/7.2.258 | 74 + gvim/vim-7.2/7.2.259 | 160 ++ gvim/vim-7.2/7.2.260 | 155 ++ gvim/vim-7.2/7.2.261 | 83 + gvim/vim-7.2/7.2.262 | 189 +++ gvim/vim-7.2/7.2.263 | 87 + gvim/vim-7.2/7.2.264 | 168 ++ gvim/vim-7.2/7.2.265 | 56 + gvim/vim-7.2/7.2.266 | 244 +++ gvim/vim-7.2/7.2.267 | 47 + gvim/vim-7.2/7.2.268 | 80 + gvim/vim-7.2/7.2.269 | 261 +++ gvim/vim-7.2/7.2.270 | 72 + gvim/vim-7.2/7.2.271 | 92 ++ gvim/vim-7.2/7.2.272 | 82 + gvim/vim-7.2/7.2.273 | 130 ++ gvim/vim-7.2/7.2.274 | 130 ++ gvim/vim-7.2/7.2.275 | 95 ++ gvim/vim-7.2/7.2.276 | 63 + gvim/vim-7.2/7.2.277 | 66 + gvim/vim-7.2/7.2.278 | 74 + gvim/vim-7.2/7.2.279 | 120 ++ gvim/vim-7.2/7.2.280 | 251 +++ gvim/vim-7.2/7.2.281 | 81 + gvim/vim-7.2/7.2.282 | 47 + gvim/vim-7.2/7.2.283 | 73 + gvim/vim-7.2/7.2.284 | 52 + gvim/vim-7.2/7.2.285 | 56 + gvim/vim-7.2/7.2.286 | 227 +++ gvim/vim-7.2/7.2.287 | 54 + gvim/vim-7.2/7.2.288 | 52 + gvim/vim-7.2/7.2.289 | 120 ++ gvim/vim-7.2/7.2.290 | 157 ++ gvim/vim-7.2/7.2.291 | 53 + gvim/vim-7.2/7.2.292 | 55 + gvim/vim-7.2/7.2.293 | 66 + gvim/vim-7.2/7.2.294 | 285 ++++ gvim/vim-7.2/7.2.295 | 142 ++ gvim/vim-7.2/7.2.296 | 53 + gvim/vim-7.2/7.2.297 | 70 + gvim/vim-7.2/7.2.298 | 48 + gvim/vim-7.2/7.2.299 | 54 + gvim/vim-7.2/7.2.300 | 201 +++ gvim/vim-7.2/7.2.301 | 777 +++++++++ gvim/vim-7.2/7.2.302 | 140 ++ gvim/vim-7.2/7.2.303 | 70 + gvim/vim-7.2/7.2.304 | 58 + gvim/vim-7.2/7.2.305 | 105 ++ gvim/vim-7.2/7.2.306 | 48 + gvim/vim-7.2/7.2.307 | 181 +++ gvim/vim-7.2/7.2.308 | 182 +++ gvim/vim-7.2/7.2.309 | 48 + gvim/vim-7.2/7.2.310 | 63 + gvim/vim-7.2/7.2.311 | 52 + gvim/vim-7.2/7.2.312 | 312 ++++ gvim/vim-7.2/7.2.313 | 117 ++ gvim/vim-7.2/7.2.314 | 56 + gvim/vim-7.2/7.2.315 | 134 ++ gvim/vim-7.2/7.2.316 | 83 + gvim/vim-7.2/7.2.317 | 148 ++ gvim/vim-7.2/7.2.318 | 91 ++ gvim/vim-7.2/7.2.319 | 63 + gvim/vim-7.2/7.2.320 | 199 +++ gvim/vim-7.2/7.2.321 | 59 + gvim/vim-7.2/7.2.322 | 49 + gvim/vim-7.2/7.2.323 | 95 ++ gvim/vim-7.2/7.2.324 | 66 + gvim/vim-7.2/7.2.325 | 52 + gvim/vim-7.2/7.2.326 | 54 + gvim/vim-7.2/7.2.327 | 323 ++++ gvim/vim-7.2/7.2.328 | 52 + gvim/vim-7.2/7.2.329 | 48 + gvim/vim-7.2/7.2.330 | 1531 ++++++++++++++++++ gvim/vim-7.2/7.2.331 | 47 + gvim/vim-7.2/7.2.332 | 101 ++ gvim/vim-7.2/7.2.333 | 371 +++++ gvim/vim-7.2/7.2.334 | 347 ++++ gvim/vim-7.2/7.2.335 | 103 ++ gvim/vim-7.2/7.2.336 | 841 ++++++++++ gvim/vim-7.2/7.2.337 | 112 ++ gvim/vim-7.2/7.2.338 | 129 ++ gvim/vim-7.2/7.2.339 | 78 + gvim/vim-7.2/7.2.340 | 54 + gvim/vim-7.2/7.2.341 | 69 + gvim/vim-7.2/7.2.342 | 95 ++ gvim/vim-7.2/7.2.343 | 51 + gvim/vim-7.2/7.2.344 | 60 + gvim/vim-7.2/7.2.345 | 47 + gvim/vim-7.2/7.2.346 | 110 ++ gvim/vim-7.2/7.2.347 | 138 ++ gvim/vim-7.2/7.2.348 | 254 +++ gvim/vim-7.2/7.2.349 | 53 + gvim/vim-7.2/7.2.350 | 86 + gvim/vim-7.2/7.2.351 | 78 + gvim/vim-7.2/7.2.352 | 62 + gvim/vim-7.2/7.2.353 | 173 ++ gvim/vim-7.2/7.2.354 | 78 + gvim/vim-7.2/7.2.355 | 88 + gvim/vim-7.2/7.2.356 | 69 + gvim/vim-7.2/7.2.357 | 49 + gvim/vim-7.2/7.2.358 | 78 + gvim/vim-7.2/7.2.359 | 68 + iron/LICENSE | 27 + iron/PKGBUILD | 48 + iron/iron.desktop | 10 + iron/iron.install | 14 + iron/iron.png | Bin 0 -> 77287 bytes iron/iron.sh | 2 + iron/libjpeg.so.62-i686.xz | Bin 0 -> 60900 bytes iron/libjpeg.so.62-x86_64.xz | Bin 0 -> 65852 bytes libjpeg6/locale-fixes.patch | 41 + nikto/PKGBUILD | 25 + nikto/nikto.install | 13 + nikto/nikto.sh | 4 + vim/vim-7.2/7.2.268 | 80 + vim/vim-7.2/7.2.269 | 261 +++ vim/vim-7.2/7.2.270 | 72 + vim/vim-7.2/7.2.271 | 92 ++ vim/vim-7.2/7.2.272 | 82 + vim/vim-7.2/7.2.273 | 130 ++ vim/vim-7.2/7.2.274 | 130 ++ vim/vim-7.2/7.2.275 | 95 ++ vim/vim-7.2/7.2.276 | 63 + vim/vim-7.2/7.2.277 | 66 + vim/vim-7.2/7.2.278 | 74 + vim/vim-7.2/7.2.279 | 120 ++ vim/vim-7.2/7.2.280 | 251 +++ vim/vim-7.2/7.2.281 | 81 + vim/vim-7.2/7.2.282 | 47 + vim/vim-7.2/7.2.283 | 73 + vim/vim-7.2/7.2.284 | 52 + vim/vim-7.2/7.2.285 | 56 + vim/vim-7.2/7.2.286 | 227 +++ vim/vim-7.2/7.2.287 | 54 + vim/vim-7.2/7.2.288 | 52 + vim/vim-7.2/7.2.289 | 120 ++ vim/vim-7.2/7.2.290 | 157 ++ vim/vim-7.2/7.2.291 | 53 + vim/vim-7.2/7.2.292 | 55 + vim/vim-7.2/7.2.293 | 66 + vim/vim-7.2/7.2.294 | 285 ++++ vim/vim-7.2/7.2.295 | 142 ++ vim/vim-7.2/7.2.296 | 53 + vim/vim-7.2/7.2.297 | 70 + vim/vim-7.2/7.2.298 | 48 + vim/vim-7.2/7.2.299 | 54 + vim/vim-7.2/7.2.300 | 201 +++ vim/vim-7.2/7.2.301 | 777 +++++++++ vim/vim-7.2/7.2.302 | 140 ++ vim/vim-7.2/7.2.303 | 70 + vim/vim-7.2/7.2.304 | 58 + vim/vim-7.2/7.2.305 | 105 ++ vim/vim-7.2/7.2.306 | 48 + vim/vim-7.2/7.2.307 | 181 +++ vim/vim-7.2/7.2.308 | 182 +++ vim/vim-7.2/7.2.309 | 48 + vim/vim-7.2/7.2.310 | 63 + vim/vim-7.2/7.2.311 | 52 + vim/vim-7.2/7.2.312 | 312 ++++ vim/vim-7.2/7.2.313 | 117 ++ vim/vim-7.2/7.2.314 | 56 + vim/vim-7.2/7.2.315 | 134 ++ vim/vim-7.2/7.2.316 | 83 + vim/vim-7.2/7.2.317 | 148 ++ vim/vim-7.2/7.2.318 | 91 ++ vim/vim-7.2/7.2.319 | 63 + vim/vim-7.2/7.2.320 | 199 +++ vim/vim-7.2/7.2.321 | 59 + vim/vim-7.2/7.2.322 | 49 + vim/vim-7.2/7.2.323 | 95 ++ vim/vim-7.2/7.2.324 | 66 + vim/vim-7.2/7.2.325 | 52 + vim/vim-7.2/7.2.326 | 54 + vim/vim-7.2/7.2.327 | 323 ++++ vim/vim-7.2/7.2.328 | 52 + vim/vim-7.2/7.2.329 | 48 + vim/vim-7.2/7.2.330 | 1531 ++++++++++++++++++ vim/vim-7.2/7.2.331 | 47 + vim/vim-7.2/7.2.332 | 101 ++ vim/vim-7.2/7.2.333 | 371 +++++ vim/vim-7.2/7.2.334 | 347 ++++ vim/vim-7.2/7.2.335 | 103 ++ vim/vim-7.2/7.2.336 | 841 ++++++++++ vim/vim-7.2/7.2.337 | 112 ++ vim/vim-7.2/7.2.338 | 129 ++ vim/vim-7.2/7.2.339 | 78 + vim/vim-7.2/7.2.340 | 54 + vim/vim-7.2/7.2.341 | 69 + vim/vim-7.2/7.2.342 | 95 ++ vim/vim-7.2/7.2.343 | 51 + vim/vim-7.2/7.2.344 | 60 + vim/vim-7.2/7.2.345 | 47 + vim/vim-7.2/7.2.346 | 110 ++ vim/vim-7.2/7.2.347 | 138 ++ vim/vim-7.2/7.2.348 | 254 +++ vim/vim-7.2/7.2.349 | 53 + vim/vim-7.2/7.2.350 | 86 + vim/vim-7.2/7.2.351 | 78 + vim/vim-7.2/7.2.352 | 62 + vim/vim-7.2/7.2.353 | 173 ++ vim/vim-7.2/7.2.354 | 78 + vim/vim-7.2/7.2.355 | 88 + vim/vim-7.2/7.2.356 | 69 + vim/vim-7.2/7.2.357 | 49 + vim/vim-7.2/7.2.358 | 78 + vim/vim-7.2/7.2.359 | 68 + vim/vim-7.2/spell/check/check_aa.aff | 50 + vim/vim-7.2/spell/check/check_aa.dic | 12 + vim/vim-7.2/spell/check/check_bb.aff | 50 + vim/vim-7.2/spell/check/check_bb.dic | 12 + vim/vim-7.2/spell/check/main.aap | 15 + vim/vim-7.2/spell/tet/main.aap | 79 + vim/vim-7.2/spell/tet/tet_ID.diff | 26 + vim/vim-7.2/tutor/tutor.bj | 987 +++++++++++ vim/vim-7.2/tutor/tutor.bj.utf-8 | 987 +++++++++++ vim/vim-7.2/tutor/tutor.eo | 989 ++++++++++++ vim/vim-7.2/tutor/tutor.nb | 973 +++++++++++ vim/vim-7.2/tutor/tutor.nb.utf-8 | 973 +++++++++++ warsow/libjpeg.patch | 20 + warsow/r_image.c.new | 2967 ++++++++++++++++++++++++++++++++++ 263 files changed, 39285 insertions(+) create mode 100644 amavisd-milter/PKGBUILD create mode 100644 dc3dd/PKGBUILD create mode 100644 gajim-hg/PKGBUILD create mode 100644 gajim-hg/gajim.install create mode 100644 gvim/vim-7.2/7.2.219 create mode 100644 gvim/vim-7.2/7.2.220 create mode 100644 gvim/vim-7.2/7.2.221 create mode 100644 gvim/vim-7.2/7.2.222 create mode 100644 gvim/vim-7.2/7.2.223 create mode 100644 gvim/vim-7.2/7.2.224 create mode 100644 gvim/vim-7.2/7.2.225 create mode 100644 gvim/vim-7.2/7.2.226 create mode 100644 gvim/vim-7.2/7.2.227 create mode 100644 gvim/vim-7.2/7.2.228 create mode 100644 gvim/vim-7.2/7.2.229 create mode 100644 gvim/vim-7.2/7.2.230 create mode 100644 gvim/vim-7.2/7.2.231 create mode 100644 gvim/vim-7.2/7.2.232 create mode 100644 gvim/vim-7.2/7.2.233 create mode 100644 gvim/vim-7.2/7.2.234 create mode 100644 gvim/vim-7.2/7.2.235 create mode 100644 gvim/vim-7.2/7.2.236 create mode 100644 gvim/vim-7.2/7.2.237 create mode 100644 gvim/vim-7.2/7.2.238 create mode 100644 gvim/vim-7.2/7.2.239 create mode 100644 gvim/vim-7.2/7.2.240 create mode 100644 gvim/vim-7.2/7.2.241 create mode 100644 gvim/vim-7.2/7.2.242 create mode 100644 gvim/vim-7.2/7.2.243 create mode 100644 gvim/vim-7.2/7.2.244 create mode 100644 gvim/vim-7.2/7.2.245 create mode 100644 gvim/vim-7.2/7.2.246 create mode 100644 gvim/vim-7.2/7.2.247 create mode 100644 gvim/vim-7.2/7.2.248 create mode 100644 gvim/vim-7.2/7.2.249 create mode 100644 gvim/vim-7.2/7.2.250 create mode 100644 gvim/vim-7.2/7.2.251 create mode 100644 gvim/vim-7.2/7.2.252 create mode 100644 gvim/vim-7.2/7.2.253 create mode 100644 gvim/vim-7.2/7.2.254 create mode 100644 gvim/vim-7.2/7.2.255 create mode 100644 gvim/vim-7.2/7.2.256 create mode 100644 gvim/vim-7.2/7.2.257 create mode 100644 gvim/vim-7.2/7.2.258 create mode 100644 gvim/vim-7.2/7.2.259 create mode 100644 gvim/vim-7.2/7.2.260 create mode 100644 gvim/vim-7.2/7.2.261 create mode 100644 gvim/vim-7.2/7.2.262 create mode 100644 gvim/vim-7.2/7.2.263 create mode 100644 gvim/vim-7.2/7.2.264 create mode 100644 gvim/vim-7.2/7.2.265 create mode 100644 gvim/vim-7.2/7.2.266 create mode 100644 gvim/vim-7.2/7.2.267 create mode 100644 gvim/vim-7.2/7.2.268 create mode 100644 gvim/vim-7.2/7.2.269 create mode 100644 gvim/vim-7.2/7.2.270 create mode 100644 gvim/vim-7.2/7.2.271 create mode 100644 gvim/vim-7.2/7.2.272 create mode 100644 gvim/vim-7.2/7.2.273 create mode 100644 gvim/vim-7.2/7.2.274 create mode 100644 gvim/vim-7.2/7.2.275 create mode 100644 gvim/vim-7.2/7.2.276 create mode 100644 gvim/vim-7.2/7.2.277 create mode 100644 gvim/vim-7.2/7.2.278 create mode 100644 gvim/vim-7.2/7.2.279 create mode 100644 gvim/vim-7.2/7.2.280 create mode 100644 gvim/vim-7.2/7.2.281 create mode 100644 gvim/vim-7.2/7.2.282 create mode 100644 gvim/vim-7.2/7.2.283 create mode 100644 gvim/vim-7.2/7.2.284 create mode 100644 gvim/vim-7.2/7.2.285 create mode 100644 gvim/vim-7.2/7.2.286 create mode 100644 gvim/vim-7.2/7.2.287 create mode 100644 gvim/vim-7.2/7.2.288 create mode 100644 gvim/vim-7.2/7.2.289 create mode 100644 gvim/vim-7.2/7.2.290 create mode 100644 gvim/vim-7.2/7.2.291 create mode 100644 gvim/vim-7.2/7.2.292 create mode 100644 gvim/vim-7.2/7.2.293 create mode 100644 gvim/vim-7.2/7.2.294 create mode 100644 gvim/vim-7.2/7.2.295 create mode 100644 gvim/vim-7.2/7.2.296 create mode 100644 gvim/vim-7.2/7.2.297 create mode 100644 gvim/vim-7.2/7.2.298 create mode 100644 gvim/vim-7.2/7.2.299 create mode 100644 gvim/vim-7.2/7.2.300 create mode 100644 gvim/vim-7.2/7.2.301 create mode 100644 gvim/vim-7.2/7.2.302 create mode 100644 gvim/vim-7.2/7.2.303 create mode 100644 gvim/vim-7.2/7.2.304 create mode 100644 gvim/vim-7.2/7.2.305 create mode 100644 gvim/vim-7.2/7.2.306 create mode 100644 gvim/vim-7.2/7.2.307 create mode 100644 gvim/vim-7.2/7.2.308 create mode 100644 gvim/vim-7.2/7.2.309 create mode 100644 gvim/vim-7.2/7.2.310 create mode 100644 gvim/vim-7.2/7.2.311 create mode 100644 gvim/vim-7.2/7.2.312 create mode 100644 gvim/vim-7.2/7.2.313 create mode 100644 gvim/vim-7.2/7.2.314 create mode 100644 gvim/vim-7.2/7.2.315 create mode 100644 gvim/vim-7.2/7.2.316 create mode 100644 gvim/vim-7.2/7.2.317 create mode 100644 gvim/vim-7.2/7.2.318 create mode 100644 gvim/vim-7.2/7.2.319 create mode 100644 gvim/vim-7.2/7.2.320 create mode 100644 gvim/vim-7.2/7.2.321 create mode 100644 gvim/vim-7.2/7.2.322 create mode 100644 gvim/vim-7.2/7.2.323 create mode 100644 gvim/vim-7.2/7.2.324 create mode 100644 gvim/vim-7.2/7.2.325 create mode 100644 gvim/vim-7.2/7.2.326 create mode 100644 gvim/vim-7.2/7.2.327 create mode 100644 gvim/vim-7.2/7.2.328 create mode 100644 gvim/vim-7.2/7.2.329 create mode 100644 gvim/vim-7.2/7.2.330 create mode 100644 gvim/vim-7.2/7.2.331 create mode 100644 gvim/vim-7.2/7.2.332 create mode 100644 gvim/vim-7.2/7.2.333 create mode 100644 gvim/vim-7.2/7.2.334 create mode 100644 gvim/vim-7.2/7.2.335 create mode 100644 gvim/vim-7.2/7.2.336 create mode 100644 gvim/vim-7.2/7.2.337 create mode 100644 gvim/vim-7.2/7.2.338 create mode 100644 gvim/vim-7.2/7.2.339 create mode 100644 gvim/vim-7.2/7.2.340 create mode 100644 gvim/vim-7.2/7.2.341 create mode 100644 gvim/vim-7.2/7.2.342 create mode 100644 gvim/vim-7.2/7.2.343 create mode 100644 gvim/vim-7.2/7.2.344 create mode 100644 gvim/vim-7.2/7.2.345 create mode 100644 gvim/vim-7.2/7.2.346 create mode 100644 gvim/vim-7.2/7.2.347 create mode 100644 gvim/vim-7.2/7.2.348 create mode 100644 gvim/vim-7.2/7.2.349 create mode 100644 gvim/vim-7.2/7.2.350 create mode 100644 gvim/vim-7.2/7.2.351 create mode 100644 gvim/vim-7.2/7.2.352 create mode 100644 gvim/vim-7.2/7.2.353 create mode 100644 gvim/vim-7.2/7.2.354 create mode 100644 gvim/vim-7.2/7.2.355 create mode 100644 gvim/vim-7.2/7.2.356 create mode 100644 gvim/vim-7.2/7.2.357 create mode 100644 gvim/vim-7.2/7.2.358 create mode 100644 gvim/vim-7.2/7.2.359 create mode 100644 iron/LICENSE create mode 100644 iron/PKGBUILD create mode 100644 iron/iron.desktop create mode 100644 iron/iron.install create mode 100644 iron/iron.png create mode 100644 iron/iron.sh create mode 100644 iron/libjpeg.so.62-i686.xz create mode 100644 iron/libjpeg.so.62-x86_64.xz create mode 100644 libjpeg6/locale-fixes.patch create mode 100644 nikto/PKGBUILD create mode 100644 nikto/nikto.install create mode 100644 nikto/nikto.sh create mode 100644 vim/vim-7.2/7.2.268 create mode 100644 vim/vim-7.2/7.2.269 create mode 100644 vim/vim-7.2/7.2.270 create mode 100644 vim/vim-7.2/7.2.271 create mode 100644 vim/vim-7.2/7.2.272 create mode 100644 vim/vim-7.2/7.2.273 create mode 100644 vim/vim-7.2/7.2.274 create mode 100644 vim/vim-7.2/7.2.275 create mode 100644 vim/vim-7.2/7.2.276 create mode 100644 vim/vim-7.2/7.2.277 create mode 100644 vim/vim-7.2/7.2.278 create mode 100644 vim/vim-7.2/7.2.279 create mode 100644 vim/vim-7.2/7.2.280 create mode 100644 vim/vim-7.2/7.2.281 create mode 100644 vim/vim-7.2/7.2.282 create mode 100644 vim/vim-7.2/7.2.283 create mode 100644 vim/vim-7.2/7.2.284 create mode 100644 vim/vim-7.2/7.2.285 create mode 100644 vim/vim-7.2/7.2.286 create mode 100644 vim/vim-7.2/7.2.287 create mode 100644 vim/vim-7.2/7.2.288 create mode 100644 vim/vim-7.2/7.2.289 create mode 100644 vim/vim-7.2/7.2.290 create mode 100644 vim/vim-7.2/7.2.291 create mode 100644 vim/vim-7.2/7.2.292 create mode 100644 vim/vim-7.2/7.2.293 create mode 100644 vim/vim-7.2/7.2.294 create mode 100644 vim/vim-7.2/7.2.295 create mode 100644 vim/vim-7.2/7.2.296 create mode 100644 vim/vim-7.2/7.2.297 create mode 100644 vim/vim-7.2/7.2.298 create mode 100644 vim/vim-7.2/7.2.299 create mode 100644 vim/vim-7.2/7.2.300 create mode 100644 vim/vim-7.2/7.2.301 create mode 100644 vim/vim-7.2/7.2.302 create mode 100644 vim/vim-7.2/7.2.303 create mode 100644 vim/vim-7.2/7.2.304 create mode 100644 vim/vim-7.2/7.2.305 create mode 100644 vim/vim-7.2/7.2.306 create mode 100644 vim/vim-7.2/7.2.307 create mode 100644 vim/vim-7.2/7.2.308 create mode 100644 vim/vim-7.2/7.2.309 create mode 100644 vim/vim-7.2/7.2.310 create mode 100644 vim/vim-7.2/7.2.311 create mode 100644 vim/vim-7.2/7.2.312 create mode 100644 vim/vim-7.2/7.2.313 create mode 100644 vim/vim-7.2/7.2.314 create mode 100644 vim/vim-7.2/7.2.315 create mode 100644 vim/vim-7.2/7.2.316 create mode 100644 vim/vim-7.2/7.2.317 create mode 100644 vim/vim-7.2/7.2.318 create mode 100644 vim/vim-7.2/7.2.319 create mode 100644 vim/vim-7.2/7.2.320 create mode 100644 vim/vim-7.2/7.2.321 create mode 100644 vim/vim-7.2/7.2.322 create mode 100644 vim/vim-7.2/7.2.323 create mode 100644 vim/vim-7.2/7.2.324 create mode 100644 vim/vim-7.2/7.2.325 create mode 100644 vim/vim-7.2/7.2.326 create mode 100644 vim/vim-7.2/7.2.327 create mode 100644 vim/vim-7.2/7.2.328 create mode 100644 vim/vim-7.2/7.2.329 create mode 100644 vim/vim-7.2/7.2.330 create mode 100644 vim/vim-7.2/7.2.331 create mode 100644 vim/vim-7.2/7.2.332 create mode 100644 vim/vim-7.2/7.2.333 create mode 100644 vim/vim-7.2/7.2.334 create mode 100644 vim/vim-7.2/7.2.335 create mode 100644 vim/vim-7.2/7.2.336 create mode 100644 vim/vim-7.2/7.2.337 create mode 100644 vim/vim-7.2/7.2.338 create mode 100644 vim/vim-7.2/7.2.339 create mode 100644 vim/vim-7.2/7.2.340 create mode 100644 vim/vim-7.2/7.2.341 create mode 100644 vim/vim-7.2/7.2.342 create mode 100644 vim/vim-7.2/7.2.343 create mode 100644 vim/vim-7.2/7.2.344 create mode 100644 vim/vim-7.2/7.2.345 create mode 100644 vim/vim-7.2/7.2.346 create mode 100644 vim/vim-7.2/7.2.347 create mode 100644 vim/vim-7.2/7.2.348 create mode 100644 vim/vim-7.2/7.2.349 create mode 100644 vim/vim-7.2/7.2.350 create mode 100644 vim/vim-7.2/7.2.351 create mode 100644 vim/vim-7.2/7.2.352 create mode 100644 vim/vim-7.2/7.2.353 create mode 100644 vim/vim-7.2/7.2.354 create mode 100644 vim/vim-7.2/7.2.355 create mode 100644 vim/vim-7.2/7.2.356 create mode 100644 vim/vim-7.2/7.2.357 create mode 100644 vim/vim-7.2/7.2.358 create mode 100644 vim/vim-7.2/7.2.359 create mode 100644 vim/vim-7.2/spell/check/check_aa.aff create mode 100644 vim/vim-7.2/spell/check/check_aa.dic create mode 100644 vim/vim-7.2/spell/check/check_bb.aff create mode 100644 vim/vim-7.2/spell/check/check_bb.dic create mode 100644 vim/vim-7.2/spell/check/main.aap create mode 100644 vim/vim-7.2/spell/tet/main.aap create mode 100644 vim/vim-7.2/spell/tet/tet_ID.diff create mode 100644 vim/vim-7.2/tutor/tutor.bj create mode 100644 vim/vim-7.2/tutor/tutor.bj.utf-8 create mode 100644 vim/vim-7.2/tutor/tutor.eo create mode 100644 vim/vim-7.2/tutor/tutor.nb create mode 100644 vim/vim-7.2/tutor/tutor.nb.utf-8 create mode 100644 warsow/libjpeg.patch create mode 100644 warsow/r_image.c.new diff --git a/amavisd-milter/PKGBUILD b/amavisd-milter/PKGBUILD new file mode 100644 index 0000000..1a96459 --- /dev/null +++ b/amavisd-milter/PKGBUILD @@ -0,0 +1,31 @@ +# Contributor: Florian "Bluewind" Pritz +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/dc3dd/PKGBUILD b/dc3dd/PKGBUILD new file mode 100644 index 0000000..494e876 --- /dev/null +++ b/dc3dd/PKGBUILD @@ -0,0 +1,21 @@ +# 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/gajim-hg/PKGBUILD b/gajim-hg/PKGBUILD new file mode 100644 index 0000000..71a8de6 --- /dev/null +++ b/gajim-hg/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Benjamin Richter +# Contributor: Changaco +# Contributor: Artyom Smirnov + +pkgname=gajim-hg +pkgver=11794 +pkgrel=1 +pkgdesc="Jabber/XMMP instant messenger client written in PyGTK" +arch=('i686' 'x86_64') +url="http://gajim.org" +license=('GPL') +depends=('python>=2.5' 'pygtk>=2.16' 'xdg-utils') +makedepends=('mercurial' 'intltool>=0.40.1') +optdepends=( + 'libxss: idle' + 'pyopenssl: secure SSL/TLS' + 'pycrypto: End to end encryption' + 'dbus-glib: link-local messaging (install avahi!)' + 'avahi: link-local messaging (install dbus-glib!)' + 'dnsutils: SRV support' + 'gtkspell: Spell checking (install aspell-LANG!)' + 'gnome-python-desktop: Keyring support' + 'python-notify: Notification popups' + 'dbus-python' + 'farsight2: for Jingle support') +provides=('gajim') +conflicts=('gajim' 'gajim-svn') +replaces=('gajim-svn') +options=(!libtool) +install=gajim.install +source=() +md5sums=() + +_hgroot=http://hg.gajim.org +_hgrepo=gajim + +build() { + rm -rf "{$srcdir}/build" + + cd "${srcdir}/${_hgrepo}" + [[ $(hg branch) == default ]] || hg update default + hg archive "${srcdir}/build" + + cd "${srcdir}/build" + ./autogen.sh --prefix=/usr || return 1 + make || return 1 + make DESTDIR="${pkgdir}" install || return 1 +} diff --git a/gajim-hg/gajim.install b/gajim-hg/gajim.install new file mode 100644 index 0000000..46e1cf8 --- /dev/null +++ b/gajim-hg/gajim.install @@ -0,0 +1,11 @@ +post_install() { + xdg-icon-resource forceupdate +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/gvim/vim-7.2/7.2.219 b/gvim/vim-7.2/7.2.219 new file mode 100644 index 0000000..f9bbec0 --- /dev/null +++ b/gvim/vim-7.2/7.2.219 @@ -0,0 +1,71 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.219 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.219 (extra) +Problem: Photon GUI is outdated. +Solution: Updates for QNX 6.4.0. (Sean Boudreau) +Files: src/gui_photon.c + + +*** ../vim-7.2.218/src/gui_photon.c 2007-05-10 20:23:35.000000000 +0200 +--- src/gui_photon.c 2009-07-01 16:08:36.000000000 +0200 +*************** +*** 838,844 **** +--- 838,849 ---- + static void + gui_ph_draw_start( void ) + { ++ PhGC_t *gc; ++ ++ gc = PgGetGC(); + PgSetRegion( PtWidgetRid( PtFindDisjoint( gui.vimTextArea ) ) ); ++ PgClearClippingsCx( gc ); ++ PgClearTranslationCx( gc ); + + PtWidgetOffset( gui.vimTextArea, &gui_ph_raw_offset ); + PhTranslatePoint( &gui_ph_raw_offset, PtWidgetPos( gui.vimTextArea, NULL ) ); +*************** +*** 2970,2976 **** + if( vim_font_name == NULL ) + { + /* Default font */ +! vim_font_name = "PC Term"; + } + + if( STRCMP( vim_font_name, "*" ) == 0 ) +--- 2975,2981 ---- + if( vim_font_name == NULL ) + { + /* Default font */ +! vim_font_name = "PC Terminal"; + } + + if( STRCMP( vim_font_name, "*" ) == 0 ) +*** ../vim-7.2.218/src/version.c 2009-06-24 18:31:36.000000000 +0200 +--- src/version.c 2009-07-01 16:11:34.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 219, + /**/ + +-- +"Oh, no! NOT the Spanish Inquisition!" +"NOBODY expects the Spanish Inquisition!!!" + -- Monty Python sketch -- +"Oh, no! NOT another option!" +"EVERYBODY expects another option!!!" + -- Discussion in vim-dev mailing list -- + + /// 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/gvim/vim-7.2/7.2.220 b/gvim/vim-7.2/7.2.220 new file mode 100644 index 0000000..b3d63f3 --- /dev/null +++ b/gvim/vim-7.2/7.2.220 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.220 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.220 (after 7.2.215) +Problem: a BufEnter autocommand that changes directory causes problems. + (Ajit Thakkar) +Solution: Disable autocommands when opening a hidden buffer in a window. +Files: src/fileio.c + + +*** ../vim-7.2.219/src/fileio.c 2009-06-24 17:31:27.000000000 +0200 +--- src/fileio.c 2009-07-01 17:02:46.000000000 +0200 +*************** +*** 8441,8453 **** + win_init_empty(aucmd_win); /* set cursor and topline to safe values */ + + #ifdef FEAT_WINDOWS +! /* Split the current window, put the aucmd_win in the upper half. */ + make_snapshot(SNAP_AUCMD_IDX); + save_ea = p_ea; + p_ea = FALSE; + (void)win_split_ins(0, WSP_TOP, aucmd_win, 0); + (void)win_comp_pos(); /* recompute window positions */ + p_ea = save_ea; + #endif + curwin = aucmd_win; + } +--- 8441,8456 ---- + win_init_empty(aucmd_win); /* set cursor and topline to safe values */ + + #ifdef FEAT_WINDOWS +! /* Split the current window, put the aucmd_win in the upper half. +! * We don't want the BufEnter or WinEnter autocommands. */ +! block_autocmds(); + make_snapshot(SNAP_AUCMD_IDX); + save_ea = p_ea; + p_ea = FALSE; + (void)win_split_ins(0, WSP_TOP, aucmd_win, 0); + (void)win_comp_pos(); /* recompute window positions */ + p_ea = save_ea; ++ unblock_autocmds(); + #endif + curwin = aucmd_win; + } +*************** +*** 8474,8480 **** + --curbuf->b_nwindows; + #ifdef FEAT_WINDOWS + /* Find "aucmd_win", it can't be closed, but it may be in another tab +! * page. */ + if (curwin != aucmd_win) + { + tabpage_T *tp; +--- 8477,8484 ---- + --curbuf->b_nwindows; + #ifdef FEAT_WINDOWS + /* Find "aucmd_win", it can't be closed, but it may be in another tab +! * page. Do not trigger autocommands here. */ +! block_autocmds(); + if (curwin != aucmd_win) + { + tabpage_T *tp; +*************** +*** 8498,8503 **** +--- 8502,8508 ---- + last_status(FALSE); /* may need to remove last status line */ + restore_snapshot(SNAP_AUCMD_IDX, FALSE); + (void)win_comp_pos(); /* recompute window positions */ ++ unblock_autocmds(); + + if (win_valid(aco->save_curwin)) + curwin = aco->save_curwin; +*** ../vim-7.2.219/src/version.c 2009-07-01 16:12:54.000000000 +0200 +--- src/version.c 2009-07-01 17:10:22.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 220, + /**/ + +-- +Microsoft is to software what McDonalds is to gourmet cooking + + /// 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/gvim/vim-7.2/7.2.221 b/gvim/vim-7.2/7.2.221 new file mode 100644 index 0000000..3c6180e --- /dev/null +++ b/gvim/vim-7.2/7.2.221 @@ -0,0 +1,247 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.221 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.221 +Problem: X cut_buffer0 text is used as-is, it may be in the wrong encoding. +Solution: Convert between 'enc' and latin1. (James Vega) +Files: src/gui_gtk_x11.c, src/message.c, src/ops.c, src/proto/ui.pro, + src/ui.c + + +*** ../vim-7.2.220/src/gui_gtk_x11.c 2009-06-16 15:23:07.000000000 +0200 +--- src/gui_gtk_x11.c 2009-07-01 11:55:34.000000000 +0200 +*************** +*** 6717,6724 **** + { + GdkAtom target; + unsigned i; +- int nbytes; +- char_u *buffer; + time_t start; + + for (i = 0; i < N_SELECTION_TARGETS; ++i) +--- 6717,6722 ---- +*************** +*** 6746,6767 **** + } + + /* Final fallback position - use the X CUT_BUFFER0 store */ +! nbytes = 0; +! buffer = (char_u *)XFetchBuffer(GDK_WINDOW_XDISPLAY(gui.mainwin->window), +! &nbytes, 0); +! if (nbytes > 0) +! { +! /* Got something */ +! clip_yank_selection(MCHAR, buffer, (long)nbytes, cbd); +! if (p_verbose > 0) +! { +! verbose_enter(); +! smsg((char_u *)_("Used CUT_BUFFER0 instead of empty selection")); +! verbose_leave(); +! } +! } +! if (buffer != NULL) +! XFree(buffer); + } + + /* +--- 6744,6750 ---- + } + + /* Final fallback position - use the X CUT_BUFFER0 store */ +! yank_cut_buffer0(GDK_WINDOW_XDISPLAY(gui.mainwin->window), cbd); + } + + /* +*** ../vim-7.2.220/src/message.c 2009-05-17 13:30:58.000000000 +0200 +--- src/message.c 2009-07-01 16:43:08.000000000 +0200 +*************** +*** 107,113 **** + } + + #if defined(FEAT_EVAL) || defined(FEAT_X11) || defined(USE_XSMP) \ +! || defined(PROTO) + /* + * Like msg() but keep it silent when 'verbosefile' is set. + */ +--- 107,113 ---- + } + + #if defined(FEAT_EVAL) || defined(FEAT_X11) || defined(USE_XSMP) \ +! || defined(FEAT_GUI_GTK) || defined(PROTO) + /* + * Like msg() but keep it silent when 'verbosefile' is set. + */ +*** ../vim-7.2.220/src/ops.c 2009-05-26 18:12:13.000000000 +0200 +--- src/ops.c 2009-07-01 12:15:31.000000000 +0200 +*************** +*** 5591,5596 **** +--- 5591,5619 ---- + if (dpy != NULL && str != NULL && motion_type >= 0 + && len < 1024*1024 && len > 0) + { ++ #ifdef FEAT_MBYTE ++ /* The CUT_BUFFER0 is supposed to always contain latin1. Convert from ++ * 'enc' when it is a multi-byte encoding. When 'enc' is an 8-bit ++ * encoding conversion usually doesn't work, so keep the text as-is. ++ */ ++ if (has_mbyte) ++ { ++ char_u *conv_str = str; ++ vimconv_T vc; ++ ++ vc.vc_type = CONV_NONE; ++ if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK) ++ { ++ conv_str = string_convert(&vc, str, (int*)&len); ++ if (conv_str != NULL) ++ { ++ vim_free(str); ++ str = conv_str; ++ } ++ convert_setup(&vc, NULL, NULL); ++ } ++ } ++ #endif + XStoreBuffer(dpy, (char *)str, (int)len, 0); + XFlush(dpy); + } +*** ../vim-7.2.220/src/proto/ui.pro 2007-05-05 19:58:49.000000000 +0200 +--- src/proto/ui.pro 2009-07-01 11:48:11.000000000 +0200 +*************** +*** 48,53 **** +--- 48,54 ---- + void open_app_context __ARGS((void)); + void x11_setup_atoms __ARGS((Display *dpy)); + void clip_x11_request_selection __ARGS((Widget myShell, Display *dpy, VimClipboard *cbd)); ++ void yank_cut_buffer0 __ARGS((Display *dpy, VimClipboard *cbd)); + void clip_x11_lose_selection __ARGS((Widget myShell, VimClipboard *cbd)); + int clip_x11_own_selection __ARGS((Widget myShell, VimClipboard *cbd)); + void clip_x11_set_selection __ARGS((VimClipboard *cbd)); +*** ../vim-7.2.220/src/ui.c 2009-05-17 13:30:58.000000000 +0200 +--- src/ui.c 2009-07-01 15:44:07.000000000 +0200 +*************** +*** 2104,2111 **** + Atom type; + static int success; + int i; +- int nbytes = 0; +- char_u *buffer; + time_t start_time; + int timed_out = FALSE; + +--- 2104,2109 ---- +*************** +*** 2185,2199 **** + } + + /* Final fallback position - use the X CUT_BUFFER0 store */ +! buffer = (char_u *)XFetchBuffer(dpy, &nbytes, 0); +! if (nbytes > 0) +! { +! /* Got something */ +! clip_yank_selection(MCHAR, buffer, (long)nbytes, cbd); +! XFree((void *)buffer); +! if (p_verbose > 0) +! verb_msg((char_u *)_("Used CUT_BUFFER0 instead of empty selection")); +! } + } + + static Boolean clip_x11_convert_selection_cb __ARGS((Widget, Atom *, Atom *, Atom *, XtPointer *, long_u *, int *)); +--- 2183,2189 ---- + } + + /* Final fallback position - use the X CUT_BUFFER0 store */ +! yank_cut_buffer0(dpy, cbd); + } + + static Boolean clip_x11_convert_selection_cb __ARGS((Widget, Atom *, Atom *, Atom *, XtPointer *, long_u *, int *)); +*************** +*** 2369,2374 **** +--- 2359,2418 ---- + } + #endif + ++ #if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11) \ ++ || defined(FEAT_GUI_GTK) || defined(PROTO) ++ /* ++ * Get the contents of the X CUT_BUFFER0 and put it in "cbd". ++ */ ++ void ++ yank_cut_buffer0(dpy, cbd) ++ Display *dpy; ++ VimClipboard *cbd; ++ { ++ int nbytes = 0; ++ char_u *buffer = (char_u *)XFetchBuffer(dpy, &nbytes, 0); ++ ++ if (nbytes > 0) ++ { ++ #ifdef FEAT_MBYTE ++ int done = FALSE; ++ ++ /* CUT_BUFFER0 is supposed to be always latin1. Convert to 'enc' when ++ * using a multi-byte encoding. Conversion between two 8-bit ++ * character sets usually fails and the text might actually be in ++ * 'enc' anyway. */ ++ if (has_mbyte) ++ { ++ char_u *conv_buf = buffer; ++ vimconv_T vc; ++ ++ vc.vc_type = CONV_NONE; ++ if (convert_setup(&vc, (char_u *)"latin1", p_enc) == OK) ++ { ++ conv_buf = string_convert(&vc, buffer, &nbytes); ++ if (conv_buf != NULL) ++ { ++ clip_yank_selection(MCHAR, conv_buf, (long)nbytes, cbd); ++ vim_free(conv_buf); ++ done = TRUE; ++ } ++ convert_setup(&vc, NULL, NULL); ++ } ++ } ++ if (!done) /* use the text without conversion */ ++ #endif ++ clip_yank_selection(MCHAR, buffer, (long)nbytes, cbd); ++ XFree((void *)buffer); ++ if (p_verbose > 0) ++ { ++ verbose_enter(); ++ verb_msg((char_u *)_("Used CUT_BUFFER0 instead of empty selection")); ++ verbose_leave(); ++ } ++ } ++ } ++ #endif ++ + #if defined(FEAT_MOUSE) || defined(PROTO) + + /* +*** ../vim-7.2.220/src/version.c 2009-07-01 17:11:40.000000000 +0200 +--- src/version.c 2009-07-01 17:56:02.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 221, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +40. You tell the cab driver you live at + http://123.elm.street/house/bluetrim.html +41. You actually try that 123.elm.street 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/gvim/vim-7.2/7.2.222 b/gvim/vim-7.2/7.2.222 new file mode 100644 index 0000000..dcf0b36 --- /dev/null +++ b/gvim/vim-7.2/7.2.222 @@ -0,0 +1,59 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.222 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.222 +Problem: ":mksession" doesn't work properly with 'acd' set. +Solution: Make it work. (Yakov Lerner) +Files: src/ex_docmd.c + + +*** ../vim-7.2.221/src/ex_docmd.c 2009-05-16 17:29:37.000000000 +0200 +--- src/ex_docmd.c 2009-07-01 20:18:22.000000000 +0200 +*************** +*** 8686,8691 **** +--- 8693,8700 ---- + } + + #ifdef FEAT_SESSION ++ /* Use the short file name until ":lcd" is used. We also don't use the ++ * short file name when 'acd' is set, that is checked later. */ + did_lcd = FALSE; + + /* ":mkview" or ":mkview 9": generate file name with 'viewdir' */ +*************** +*** 10573,10578 **** +--- 10582,10590 ---- + if (buf->b_sfname != NULL + && flagp == &ssop_flags + && (ssop_flags & (SSOP_CURDIR | SSOP_SESDIR)) ++ #ifdef FEAT_AUTOCHDIR ++ && !p_acd ++ #endif + && !did_lcd) + name = buf->b_sfname; + else +*** ../vim-7.2.221/src/version.c 2009-07-01 18:04:30.000000000 +0200 +--- src/version.c 2009-07-01 20:16:19.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 222, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +43. You tell the kids they can't use the computer because "Daddy's got work to + do" and you don't even have a job. + + /// 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/gvim/vim-7.2/7.2.223 b/gvim/vim-7.2/7.2.223 new file mode 100644 index 0000000..cac2126 --- /dev/null +++ b/gvim/vim-7.2/7.2.223 @@ -0,0 +1,165 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.223 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.223 +Problem: When a script is run with ":silent" it is not able to give warning + messages. +Solution: Add the ":unsilent" command. +Files: runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c + + +*** ../vim-7.2.222/runtime/doc/various.txt 2008-08-09 19:36:54.000000000 +0200 +--- runtime/doc/various.txt 2009-07-09 15:52:54.000000000 +0200 +*************** +*** 508,513 **** +--- 508,524 ---- + messages though. Use ":silent" in the command itself + to avoid that: ":silent menu .... :silent command". + ++ *:uns* *:unsilent* ++ :uns[ilent] {command} Execute {command} not silently. Only makes a ++ difference when |:silent| was used to get to this ++ command. ++ Use this for giving a message even when |:silent| was ++ used. In this example |:silent| is used to avoid the ++ message about reading the file and |:unsilent| to be ++ able to list the first line of each file. > ++ :silent argdo unsilent echo expand('%') . ": " . getline(1) ++ < ++ + *:verb* *:verbose* + :[count]verb[ose] {command} + Execute {command} with 'verbose' set to [count]. If +*** ../vim-7.2.222/src/ex_cmds.h 2008-11-09 13:43:25.000000000 +0100 +--- src/ex_cmds.h 2009-07-01 18:12:55.000000000 +0200 +*************** +*** 991,996 **** +--- 991,998 ---- + BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_unmenu, "unmenu", ex_menu, + BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), ++ EX(CMD_unsilent, "unsilent", ex_wrongmodifier, ++ NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN), + EX(CMD_update, "update", ex_update, + RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR), + EX(CMD_vglobal, "vglobal", ex_global, +*** ../vim-7.2.222/src/ex_docmd.c 2009-07-01 20:18:43.000000000 +0200 +--- src/ex_docmd.c 2009-07-09 15:24:03.000000000 +0200 +*************** +*** 1677,1684 **** + char_u *errormsg = NULL; /* error message */ + exarg_T ea; /* Ex command arguments */ + long verbose_save = -1; +! int save_msg_scroll = 0; +! int did_silent = 0; + int did_esilent = 0; + #ifdef HAVE_SANDBOX + int did_sandbox = FALSE; +--- 1677,1684 ---- + char_u *errormsg = NULL; /* error message */ + exarg_T ea; /* Ex command arguments */ + long verbose_save = -1; +! int save_msg_scroll = msg_scroll; +! int save_msg_silent = -1; + int did_esilent = 0; + #ifdef HAVE_SANDBOX + int did_sandbox = FALSE; +*************** +*** 1856,1864 **** + } + if (!checkforcmd(&ea.cmd, "silent", 3)) + break; +! ++did_silent; + ++msg_silent; +- save_msg_scroll = msg_scroll; + if (*ea.cmd == '!' && !vim_iswhite(ea.cmd[-1])) + { + /* ":silent!", but not "silent !cmd" */ +--- 1856,1864 ---- + } + if (!checkforcmd(&ea.cmd, "silent", 3)) + break; +! if (save_msg_silent == -1) +! save_msg_silent = msg_silent; + ++msg_silent; + if (*ea.cmd == '!' && !vim_iswhite(ea.cmd[-1])) + { + /* ":silent!", but not "silent !cmd" */ +*************** +*** 1886,1891 **** +--- 1886,1898 ---- + #endif + continue; + ++ case 'u': if (!checkforcmd(&ea.cmd, "unsilent", 3)) ++ break; ++ if (save_msg_silent == -1) ++ save_msg_silent = msg_silent; ++ msg_silent = 0; ++ continue; ++ + case 'v': if (checkforcmd(&ea.cmd, "vertical", 4)) + { + #ifdef FEAT_VERTSPLIT +*************** +*** 2684,2696 **** + + cmdmod = save_cmdmod; + +! if (did_silent > 0) + { + /* messages could be enabled for a serious error, need to check if the + * counters don't become negative */ +! msg_silent -= did_silent; +! if (msg_silent < 0) +! msg_silent = 0; + emsg_silent -= did_esilent; + if (emsg_silent < 0) + emsg_silent = 0; +--- 2691,2702 ---- + + cmdmod = save_cmdmod; + +! if (save_msg_silent != -1) + { + /* messages could be enabled for a serious error, need to check if the + * counters don't become negative */ +! if (!did_emsg) +! msg_silent = save_msg_silent; + emsg_silent -= did_esilent; + if (emsg_silent < 0) + emsg_silent = 0; +*************** +*** 2987,2992 **** +--- 2993,2999 ---- + {"silent", 3, FALSE}, + {"tab", 3, TRUE}, + {"topleft", 2, FALSE}, ++ {"unsilent", 3, FALSE}, + {"verbose", 4, TRUE}, + {"vertical", 4, FALSE}, + }; +*** ../vim-7.2.222/src/version.c 2009-07-01 20:18:43.000000000 +0200 +--- src/version.c 2009-07-09 15:53:05.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 223, + /**/ + +-- +Q: How many legs does a giraffe have? +A: Eight: two in front, two behind, two on the left and two on the right + + /// 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/gvim/vim-7.2/7.2.224 b/gvim/vim-7.2/7.2.224 new file mode 100644 index 0000000..d988eed --- /dev/null +++ b/gvim/vim-7.2/7.2.224 @@ -0,0 +1,88 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.224 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.224 +Problem: Crash when using 'completefunc'. (Ingo Karkat) +Solution: Disallow entering edit() recursively when doing completion. +Files: src/edit.c + + +*** ../vim-7.2.223/src/edit.c 2009-05-26 11:01:43.000000000 +0200 +--- src/edit.c 2009-07-09 18:01:49.000000000 +0200 +*************** +*** 114,119 **** +--- 114,123 ---- + * FALSE the word to be completed must be located. */ + static int compl_started = FALSE; + ++ /* Set when doing something for completion that may call edit() recursively, ++ * which is not allowed. */ ++ static int compl_busy = FALSE; ++ + static int compl_matches = 0; + static char_u *compl_pattern = NULL; + static int compl_direction = FORWARD; +*************** +*** 346,352 **** + + #ifdef FEAT_INS_EXPAND + /* Don't allow recursive insert mode when busy with completion. */ +! if (compl_started || pum_visible()) + { + EMSG(_(e_secure)); + return FALSE; +--- 350,356 ---- + + #ifdef FEAT_INS_EXPAND + /* Don't allow recursive insert mode when busy with completion. */ +! if (compl_started || compl_busy || pum_visible()) + { + EMSG(_(e_secure)); + return FALSE; +*************** +*** 1340,1347 **** +--- 1344,1353 ---- + goto normalchar; + + docomplete: ++ compl_busy = TRUE; + if (ins_complete(c) == FAIL) + compl_cont_status = 0; ++ compl_busy = FALSE; + break; + #endif /* FEAT_INS_EXPAND */ + +*************** +*** 3172,3177 **** +--- 3178,3184 ---- + vim_free(match); + } while (compl_curr_match != NULL && compl_curr_match != compl_first_match); + compl_first_match = compl_curr_match = NULL; ++ compl_shown_match = NULL; + } + + static void +*** ../vim-7.2.223/src/version.c 2009-07-09 15:55:34.000000000 +0200 +--- src/version.c 2009-07-09 18:14:16.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 224, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +77. The phone company asks you to test drive their new PBX system + + /// 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/gvim/vim-7.2/7.2.225 b/gvim/vim-7.2/7.2.225 new file mode 100644 index 0000000..32a4d35 --- /dev/null +++ b/gvim/vim-7.2/7.2.225 @@ -0,0 +1,97 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.225 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.225 +Problem: When using ":normal" a saved character may be executed. +Solution: Also store old_char when saving typeahead. +Files: src/getchar.c, src/structs.h + + +*** ../vim-7.2.224/src/getchar.c 2009-02-22 23:42:08.000000000 +0100 +--- src/getchar.c 2009-07-09 18:09:13.000000000 +0200 +*************** +*** 1309,1314 **** +--- 1309,1317 ---- + return OK; + } + ++ static int old_char = -1; /* character put back by vungetc() */ ++ static int old_mod_mask; /* mod_mask for ungotten character */ ++ + #if defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) || defined(PROTO) + + /* +*************** +*** 1323,1328 **** +--- 1326,1335 ---- + if (!tp->typebuf_valid) + typebuf = tp->save_typebuf; + ++ tp->old_char = old_char; ++ tp->old_mod_mask = old_mod_mask; ++ old_char = -1; ++ + tp->save_stuffbuff = stuffbuff; + stuffbuff.bh_first.b_next = NULL; + # ifdef USE_INPUT_BUF +*************** +*** 1344,1349 **** +--- 1351,1359 ---- + typebuf = tp->save_typebuf; + } + ++ old_char = tp->old_char; ++ old_mod_mask = tp->old_mod_mask; ++ + free_buff(&stuffbuff); + stuffbuff = tp->save_stuffbuff; + # ifdef USE_INPUT_BUF +*************** +*** 1499,1507 **** + #define KL_PART_KEY -1 /* keylen value for incomplete key-code */ + #define KL_PART_MAP -2 /* keylen value for incomplete mapping */ + +- static int old_char = -1; /* character put back by vungetc() */ +- static int old_mod_mask; /* mod_mask for ungotten character */ +- + /* + * Get the next input character. + * Can return a special key or a multi-byte character. +--- 1509,1514 ---- +*** ../vim-7.2.224/src/structs.h 2009-06-16 16:01:34.000000000 +0200 +--- src/structs.h 2009-07-09 18:09:20.000000000 +0200 +*************** +*** 882,887 **** +--- 882,889 ---- + { + typebuf_T save_typebuf; + int typebuf_valid; /* TRUE when save_typebuf valid */ ++ int old_char; ++ int old_mod_mask; + struct buffheader save_stuffbuff; + #ifdef USE_INPUT_BUF + char_u *save_inputbuf; +*** ../vim-7.2.224/src/version.c 2009-07-09 18:15:19.000000000 +0200 +--- src/version.c 2009-07-09 18:21:56.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 225, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +78. You find yourself dialing IP numbers on the 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/gvim/vim-7.2/7.2.226 b/gvim/vim-7.2/7.2.226 new file mode 100644 index 0000000..d922a08 --- /dev/null +++ b/gvim/vim-7.2/7.2.226 @@ -0,0 +1,268 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.226 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.226 +Problem: ml_get error after deleting the last line. (Xavier de Gaye) +Solution: When adjusting marks a callback may be invoked. Adjust the cursor + position before invoking deleted_lines_mark(). +Files: src/ex_cmds.c, src/ex_docmd.c, src/if_mzsch.c, src/if_python.c, + src/if_perl.xs, src/misc1.c + + +*** ../vim-7.2.225/src/ex_cmds.c 2009-05-17 13:30:58.000000000 +0200 +--- src/ex_cmds.c 2009-07-09 12:56:51.000000000 +0200 +*************** +*** 4013,4018 **** +--- 4013,4021 ---- + break; + ml_delete(eap->line1, FALSE); + } ++ ++ /* make sure the cursor is not beyond the end of the file now */ ++ check_cursor_lnum(); + deleted_lines_mark(eap->line1, (long)(eap->line2 - lnum)); + + /* ":append" on the line above the deleted lines. */ +*** ../vim-7.2.225/src/ex_docmd.c 2009-07-09 15:55:34.000000000 +0200 +--- src/ex_docmd.c 2009-07-09 15:24:03.000000000 +0200 +*************** +*** 7845,7854 **** + if (*ml_get(lnum) == NUL && u_savedel(lnum, 1L) == OK) + { + ml_delete(lnum, FALSE); +- deleted_lines_mark(lnum, 1L); + if (curwin->w_cursor.lnum > 1 + && curwin->w_cursor.lnum >= lnum) + --curwin->w_cursor.lnum; + } + } + redraw_curbuf_later(VALID); +--- 7845,7854 ---- + if (*ml_get(lnum) == NUL && u_savedel(lnum, 1L) == OK) + { + ml_delete(lnum, FALSE); + if (curwin->w_cursor.lnum > 1 + && curwin->w_cursor.lnum >= lnum) + --curwin->w_cursor.lnum; ++ deleted_lines_mark(lnum, 1L); + } + } + redraw_curbuf_later(VALID); +*** ../vim-7.2.225/src/if_mzsch.c 2009-06-24 17:51:01.000000000 +0200 +--- src/if_mzsch.c 2009-07-09 12:59:17.000000000 +0200 +*************** +*** 2169,2177 **** + curbuf = savebuf; + raise_vim_exn(_("cannot delete line")); + } +- deleted_lines_mark((linenr_T)n, 1L); + if (buf->buf == curwin->w_buffer) + mz_fix_cursor(n, n + 1, -1); + + curbuf = savebuf; + +--- 2169,2177 ---- + curbuf = savebuf; + raise_vim_exn(_("cannot delete line")); + } + if (buf->buf == curwin->w_buffer) + mz_fix_cursor(n, n + 1, -1); ++ deleted_lines_mark((linenr_T)n, 1L); + + curbuf = savebuf; + +*************** +*** 2299,2307 **** + curbuf = savebuf; + raise_vim_exn(_("cannot delete line")); + } +- deleted_lines_mark((linenr_T)lo, (long)old_len); + if (buf->buf == curwin->w_buffer) + mz_fix_cursor(lo, hi, -old_len); + } + + curbuf = savebuf; +--- 2299,2307 ---- + curbuf = savebuf; + raise_vim_exn(_("cannot delete line")); + } + if (buf->buf == curwin->w_buffer) + mz_fix_cursor(lo, hi, -old_len); ++ deleted_lines_mark((linenr_T)lo, (long)old_len); + } + + curbuf = savebuf; +*** ../vim-7.2.225/src/if_python.c 2009-05-21 23:25:38.000000000 +0200 +--- src/if_python.c 2009-07-09 12:59:45.000000000 +0200 +*************** +*** 2497,2505 **** + PyErr_SetVim(_("cannot delete line")); + else + { +- deleted_lines_mark((linenr_T)n, 1L); + if (buf == curwin->w_buffer) + py_fix_cursor((linenr_T)n, (linenr_T)n + 1, (linenr_T)-1); + } + + curbuf = savebuf; +--- 2497,2505 ---- + PyErr_SetVim(_("cannot delete line")); + else + { + if (buf == curwin->w_buffer) + py_fix_cursor((linenr_T)n, (linenr_T)n + 1, (linenr_T)-1); ++ deleted_lines_mark((linenr_T)n, 1L); + } + + curbuf = savebuf; +*************** +*** 2596,2605 **** + break; + } + } +- deleted_lines_mark((linenr_T)lo, (long)i); +- + if (buf == curwin->w_buffer) + py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n); + } + + curbuf = savebuf; +--- 2596,2604 ---- + break; + } + } + if (buf == curwin->w_buffer) + py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n); ++ deleted_lines_mark((linenr_T)lo, (long)i); + } + + curbuf = savebuf; +*** ../vim-7.2.225/src/if_perl.xs 2009-06-16 16:01:34.000000000 +0200 +--- src/if_perl.xs 2009-07-09 13:02:16.000000000 +0200 +*************** +*** 1233,1241 **** + if (u_savedel(lnum, 1) == OK) + { + ml_delete(lnum, 0); + deleted_lines_mark(lnum, 1L); +- if (aco.save_curbuf == curbuf) +- check_cursor(); + } + + /* restore curwin/curbuf and a few other things */ +--- 1235,1242 ---- + if (u_savedel(lnum, 1) == OK) + { + ml_delete(lnum, 0); ++ check_cursor(); + deleted_lines_mark(lnum, 1L); + } + + /* restore curwin/curbuf and a few other things */ +*** ../vim-7.2.225/src/misc1.c 2009-06-24 16:25:23.000000000 +0200 +--- src/misc1.c 2009-07-09 13:00:59.000000000 +0200 +*************** +*** 2345,2356 **** + int undo; /* if TRUE, prepare for undo */ + { + long n; + + if (nlines <= 0) + return; + + /* save the deleted lines for undo */ +! if (undo && u_savedel(curwin->w_cursor.lnum, nlines) == FAIL) + return; + + for (n = 0; n < nlines; ) +--- 2345,2357 ---- + int undo; /* if TRUE, prepare for undo */ + { + long n; ++ linenr_T first = curwin->w_cursor.lnum; + + if (nlines <= 0) + return; + + /* save the deleted lines for undo */ +! if (undo && u_savedel(first, nlines) == FAIL) + return; + + for (n = 0; n < nlines; ) +*************** +*** 2358,2375 **** + if (curbuf->b_ml.ml_flags & ML_EMPTY) /* nothing to delete */ + break; + +! ml_delete(curwin->w_cursor.lnum, TRUE); + ++n; + + /* If we delete the last line in the file, stop */ +! if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count) + break; + } +- /* adjust marks, mark the buffer as changed and prepare for displaying */ +- deleted_lines_mark(curwin->w_cursor.lnum, n); + + curwin->w_cursor.col = 0; + check_cursor_lnum(); + } + + int +--- 2359,2379 ---- + if (curbuf->b_ml.ml_flags & ML_EMPTY) /* nothing to delete */ + break; + +! ml_delete(first, TRUE); + ++n; + + /* If we delete the last line in the file, stop */ +! if (first > curbuf->b_ml.ml_line_count) + break; + } + ++ /* Correct the cursor position before calling deleted_lines_mark(), it may ++ * trigger a callback to display the cursor. */ + curwin->w_cursor.col = 0; + check_cursor_lnum(); ++ ++ /* adjust marks, mark the buffer as changed and prepare for displaying */ ++ deleted_lines_mark(first, n); + } + + int +*************** +*** 2621,2626 **** +--- 2625,2632 ---- + + /* + * Like deleted_lines(), but adjust marks first. ++ * Make sure the cursor is on a valid line before calling, a GUI callback may ++ * be triggered to display the cursor. + */ + void + deleted_lines_mark(lnum, count) +*** ../vim-7.2.225/src/version.c 2009-07-09 18:24:24.000000000 +0200 +--- src/version.c 2009-07-09 20:01:16.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 226, + /**/ + +-- +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/gvim/vim-7.2/7.2.227 b/gvim/vim-7.2/7.2.227 new file mode 100644 index 0000000..8499212 --- /dev/null +++ b/gvim/vim-7.2/7.2.227 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.227 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.227 +Problem: When using ":cd" in a script there is no way to track this. +Solution: Display the directory when 'verbose' is 5 or higher. +Files: src/ex_docmd.c + + +*** ../vim-7.2.226/src/ex_docmd.c 2009-07-09 20:06:30.000000000 +0200 +--- src/ex_docmd.c 2009-07-09 15:24:03.000000000 +0200 +*************** +*** 7964,7970 **** + shorten_fnames(TRUE); + + /* Echo the new current directory if the command was typed. */ +! if (KeyTyped) + ex_pwd(eap); + } + vim_free(tofree); +--- 7964,7970 ---- + shorten_fnames(TRUE); + + /* Echo the new current directory if the command was typed. */ +! if (KeyTyped || p_verbose >= 5) + ex_pwd(eap); + } + vim_free(tofree); +*** ../vim-7.2.226/src/version.c 2009-07-09 20:06:30.000000000 +0200 +--- src/version.c 2009-07-09 20:13:13.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 227, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +83. Batteries in the TV remote now last for months. + + /// 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/gvim/vim-7.2/7.2.228 b/gvim/vim-7.2/7.2.228 new file mode 100644 index 0000000..a906bef --- /dev/null +++ b/gvim/vim-7.2/7.2.228 @@ -0,0 +1,573 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.228 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.228 +Problem: Cscope is limited to 8 connections. +Solution: Allocated the connection array to handle any number of + connections. (Dominique Pelle) +Files: runtime/doc/if_cscop.txt, src/if_cscope.h, src/if_cscope.c + + +*** ../vim-7.2.227/runtime/doc/if_cscop.txt 2009-03-18 14:30:46.000000000 +0100 +--- runtime/doc/if_cscop.txt 2009-07-09 15:40:48.000000000 +0200 +*************** +*** 355,367 **** + The DJGPP-built version from http://cscope.sourceforge.net is known to not + work with Vim. + +! There are a couple of hard-coded limitations: +! +! 1. The maximum number of cscope connections allowed is 8. Do you +! really need more? +! +! 2. Doing a |:tjump| when |:cstag| searches the tag files is not +! configurable (e.g., you can't do a tselect instead). + + ============================================================================== + 6. Suggested usage *cscope-suggestions* +--- 355,362 ---- + The DJGPP-built version from http://cscope.sourceforge.net is known to not + work with Vim. + +! Hard-coded limitation: doing a |:tjump| when |:cstag| searches the tag files +! is not configurable (e.g., you can't do a tselect instead). + + ============================================================================== + 6. Suggested usage *cscope-suggestions* +*** ../vim-7.2.227/src/if_cscope.h 2008-08-25 04:35:13.000000000 +0200 +--- src/if_cscope.h 2009-07-09 15:39:32.000000000 +0200 +*************** +*** 25,31 **** + + #define CSCOPE_SUCCESS 0 + #define CSCOPE_FAILURE -1 +- #define CSCOPE_MAX_CONNECTIONS 8 /* you actually need more? */ + + #define CSCOPE_DBFILE "cscope.out" + #define CSCOPE_PROMPT ">> " +--- 25,30 ---- +*** ../vim-7.2.227/src/if_cscope.c 2009-05-16 17:29:37.000000000 +0200 +--- src/if_cscope.c 2009-07-09 15:39:32.000000000 +0200 +*************** +*** 46,52 **** + static int cs_find __ARGS((exarg_T *eap)); + static int cs_find_common __ARGS((char *opt, char *pat, int, int, int)); + static int cs_help __ARGS((exarg_T *eap)); +- static void cs_init __ARGS((void)); + static void clear_csinfo __ARGS((int i)); + static int cs_insert_filelist __ARGS((char *, char *, char *, + struct stat *)); +--- 46,51 ---- +*************** +*** 66,72 **** + static int cs_show __ARGS((exarg_T *eap)); + + +! static csinfo_T csinfo[CSCOPE_MAX_CONNECTIONS]; + static int eap_arg_len; /* length of eap->arg, set in + cs_lookup_cmd() */ + static cscmd_T cs_cmds[] = +--- 65,74 ---- + static int cs_show __ARGS((exarg_T *eap)); + + +! static csinfo_T * csinfo = NULL; +! static int csinfo_size = 0; /* number of items allocated in +! csinfo[] */ +! + static int eap_arg_len; /* length of eap->arg, set in + cs_lookup_cmd() */ + static cscmd_T cs_cmds[] = +*************** +*** 144,166 **** + } + case EXP_CSCOPE_KILL: + { +! static char_u connection[2]; + + /* ":cscope kill" accepts connection numbers or partial names of + * the pathname of the cscope database as argument. Only complete + * with connection numbers. -1 can also be used to kill all + * connections. */ +! for (i = 0, current_idx = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (csinfo[i].fname == NULL) + continue; + if (current_idx++ == idx) + { +! /* Connection number fits in one character since +! * CSCOPE_MAX_CONNECTIONS is < 10 */ +! connection[0] = i + '0'; +! connection[1] = NUL; +! return connection; + } + } + return (current_idx == idx && idx > 0) ? (char_u *)"-1" : NULL; +--- 146,165 ---- + } + case EXP_CSCOPE_KILL: + { +! static char connection[5]; + + /* ":cscope kill" accepts connection numbers or partial names of + * the pathname of the cscope database as argument. Only complete + * with connection numbers. -1 can also be used to kill all + * connections. */ +! for (i = 0, current_idx = 0; i < csinfo_size; i++) + { + if (csinfo[i].fname == NULL) + continue; + if (current_idx++ == idx) + { +! vim_snprintf(connection, sizeof(connection), "%d", i); +! return (char_u *)connection; + } + } + return (current_idx == idx && idx > 0) ? (char_u *)"-1" : NULL; +*************** +*** 223,229 **** + { + cscmd_T *cmdp; + +- cs_init(); + if ((cmdp = cs_lookup_cmd(eap)) == NULL) + { + cs_help(eap); +--- 222,227 ---- +*************** +*** 284,291 **** + { + int ret = FALSE; + +- cs_init(); +- + if (*eap->arg == NUL) + { + (void)EMSG(_("E562: Usage: cstag ")); +--- 282,287 ---- +*************** +*** 441,447 **** + if (num < 0 || num > 4 || (num > 0 && !dbpath)) + return FALSE; + +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (!csinfo[i].fname) + continue; +--- 437,443 ---- + if (num < 0 || num > 4 || (num > 0 && !dbpath)) + return FALSE; + +! for (i = 0; i < csinfo_size; i++) + { + if (!csinfo[i].fname) + continue; +*************** +*** 684,690 **** + short i; + short cnt = 0; + +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (csinfo[i].fname != NULL) + cnt++; +--- 680,686 ---- + short i; + short cnt = 0; + +! for (i = 0; i < csinfo_size; i++) + { + if (csinfo[i].fname != NULL) + cnt++; +*************** +*** 1112,1118 **** + { + int i; + char *cmd; +! int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches; + #ifdef FEAT_QUICKFIX + char cmdletter; + char *qfpos; +--- 1108,1115 ---- + { + int i; + char *cmd; +! int *nummatches; +! int totmatches; + #ifdef FEAT_QUICKFIX + char cmdletter; + char *qfpos; +*************** +*** 1123,1135 **** + if (cmd == NULL) + return FALSE; + + /* send query to all open connections, then count the total number + * of matches so we can alloc matchesp all in one swell foop + */ +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + nummatches[i] = 0; + totmatches = 0; +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (csinfo[i].fname == NULL || csinfo[i].to_fp == NULL) + continue; +--- 1120,1136 ---- + if (cmd == NULL) + return FALSE; + ++ nummatches = (int *)alloc(sizeof(int)*csinfo_size); ++ if (nummatches == NULL) ++ return FALSE; ++ + /* send query to all open connections, then count the total number + * of matches so we can alloc matchesp all in one swell foop + */ +! for (i = 0; i < csinfo_size; i++) + nummatches[i] = 0; + totmatches = 0; +! for (i = 0; i < csinfo_size; i++) + { + if (csinfo[i].fname == NULL || csinfo[i].to_fp == NULL) + continue; +*************** +*** 1154,1160 **** +--- 1155,1164 ---- + char *buf; + + if (!verbose) ++ { ++ vim_free(nummatches); + return FALSE; ++ } + + buf = (char *)alloc((unsigned)(strlen(opt) + strlen(pat) + strlen(nf))); + if (buf == NULL) +*************** +*** 1165,1170 **** +--- 1169,1175 ---- + (void)EMSG(buf); + vim_free(buf); + } ++ vim_free(nummatches); + return FALSE; + } + +*************** +*** 1217,1222 **** +--- 1222,1228 ---- + (void)EMSG(buf); + vim_free(buf); + } ++ vim_free(nummatches); + return FALSE; + } + } +*************** +*** 1264,1269 **** +--- 1270,1276 ---- + } + mch_remove(tmp); + vim_free(tmp); ++ vim_free(nummatches); + return TRUE; + } + else +*************** +*** 1275,1280 **** +--- 1282,1288 ---- + /* read output */ + cs_fill_results((char *)pat, totmatches, nummatches, &matches, + &contexts, &matched); ++ vim_free(nummatches); + if (matches == NULL) + return FALSE; + +*************** +*** 1328,1353 **** + } /* cs_help */ + + +- /* +- * PRIVATE: cs_init +- * +- * initialize cscope structure if not already +- */ +- static void +- cs_init() +- { +- short i; +- static int init_already = FALSE; +- +- if (init_already) +- return; +- +- for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) +- clear_csinfo(i); +- +- init_already = TRUE; +- } /* cs_init */ +- + static void + clear_csinfo(i) + int i; +--- 1336,1341 ---- +*************** +*** 1444,1450 **** + #endif + + i = -1; /* can be set to the index of an empty item in csinfo */ +! for (j = 0; j < CSCOPE_MAX_CONNECTIONS; j++) + { + if (csinfo[j].fname != NULL + #if defined(UNIX) +--- 1432,1438 ---- + #endif + + i = -1; /* can be set to the index of an empty item in csinfo */ +! for (j = 0; j < csinfo_size; j++) + { + if (csinfo[j].fname != NULL + #if defined(UNIX) +*************** +*** 1471,1479 **** + + if (i == -1) + { +! if (p_csverbose) +! (void)EMSG(_("E569: maximum number of cscope connections reached")); +! return -1; + } + + if ((csinfo[i].fname = (char *)alloc((unsigned)strlen(fname)+1)) == NULL) +--- 1459,1483 ---- + + if (i == -1) + { +! i = csinfo_size; +! if (csinfo_size == 0) +! { +! /* First time allocation: allocate only 1 connection. It should +! * be enough for most users. If more is needed, csinfo will be +! * reallocated. */ +! csinfo_size = 1; +! csinfo = (csinfo_T *)alloc_clear(sizeof(csinfo_T)); +! } +! else +! { +! /* Reallocate space for more connections. */ +! csinfo_size *= 2; +! csinfo = vim_realloc(csinfo, sizeof(csinfo_T)*csinfo_size); +! } +! if (csinfo == NULL) +! return -1; +! for (j = csinfo_size/2; j < csinfo_size; j++) +! clear_csinfo(j); + } + + if ((csinfo[i].fname = (char *)alloc((unsigned)strlen(fname)+1)) == NULL) +*************** +*** 1580,1594 **** + /* It must be part of a name. We will try to find a match + * within all the names in the csinfo data structure + */ +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (csinfo[i].fname != NULL && strstr(csinfo[i].fname, stok)) + break; + } + } + +! if ((i >= CSCOPE_MAX_CONNECTIONS || i < -1 || csinfo[i].fname == NULL) +! && i != -1) + { + if (p_csverbose) + (void)EMSG2(_("E261: cscope connection %s not found"), stok); +--- 1584,1597 ---- + /* It must be part of a name. We will try to find a match + * within all the names in the csinfo data structure + */ +! for (i = 0; i < csinfo_size; i++) + { + if (csinfo[i].fname != NULL && strstr(csinfo[i].fname, stok)) + break; + } + } + +! if ((i != -1) && (i >= csinfo_size || i < -1 || csinfo[i].fname == NULL)) + { + if (p_csverbose) + (void)EMSG2(_("E261: cscope connection %s not found"), stok); +*************** +*** 1597,1603 **** + { + if (i == -1) + { +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (csinfo[i].fname) + cs_kill_execute(i, csinfo[i].fname); +--- 1600,1606 ---- + { + if (i == -1) + { +! for (i = 0; i < csinfo_size; i++) + { + if (csinfo[i].fname) + cs_kill_execute(i, csinfo[i].fname); +*************** +*** 1857,1863 **** + if (buf == NULL) + return; + +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (nummatches_a[i] < 1) + continue; +--- 1860,1866 ---- + if (buf == NULL) + return; + +! for (i = 0; i < csinfo_size; i++) + { + if (nummatches_a[i] < 1) + continue; +*************** +*** 1929,1935 **** + if ((cntxts = (char **)alloc(sizeof(char *) * totmatches)) == NULL) + goto parse_out; + +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (nummatches_a[i] < 1) + continue; +--- 1932,1938 ---- + if ((cntxts = (char **)alloc(sizeof(char *) * totmatches)) == NULL) + goto parse_out; + +! for (i = 0; i < csinfo_size; i++) + { + if (nummatches_a[i] < 1) + continue; +*************** +*** 2383,2392 **** + int i; + char buf[20]; /* for sprintf " (#%d)" */ + + /* malloc our db and ppath list */ +! dblist = (char **)alloc(CSCOPE_MAX_CONNECTIONS * sizeof(char *)); +! pplist = (char **)alloc(CSCOPE_MAX_CONNECTIONS * sizeof(char *)); +! fllist = (char **)alloc(CSCOPE_MAX_CONNECTIONS * sizeof(char *)); + if (dblist == NULL || pplist == NULL || fllist == NULL) + { + vim_free(dblist); +--- 2386,2398 ---- + int i; + char buf[20]; /* for sprintf " (#%d)" */ + ++ if (csinfo_size == 0) ++ return CSCOPE_SUCCESS; ++ + /* malloc our db and ppath list */ +! dblist = (char **)alloc(csinfo_size * sizeof(char *)); +! pplist = (char **)alloc(csinfo_size * sizeof(char *)); +! fllist = (char **)alloc(csinfo_size * sizeof(char *)); + if (dblist == NULL || pplist == NULL || fllist == NULL) + { + vim_free(dblist); +*************** +*** 2395,2401 **** + return CSCOPE_FAILURE; + } + +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + dblist[i] = csinfo[i].fname; + pplist[i] = csinfo[i].ppath; +--- 2401,2407 ---- + return CSCOPE_FAILURE; + } + +! for (i = 0; i < csinfo_size; i++) + { + dblist[i] = csinfo[i].fname; + pplist[i] = csinfo[i].ppath; +*************** +*** 2405,2411 **** + } + + /* rebuild the cscope connection list */ +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (dblist[i] != NULL) + { +--- 2411,2417 ---- + } + + /* rebuild the cscope connection list */ +! for (i = 0; i < csinfo_size; i++) + { + if (dblist[i] != NULL) + { +*************** +*** 2502,2508 **** + MSG_PUTS_ATTR( + _(" # pid database name prepend path\n"), + hl_attr(HLF_T)); +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + { + if (csinfo[i].fname == NULL) + continue; +--- 2508,2514 ---- + MSG_PUTS_ATTR( + _(" # pid database name prepend path\n"), + hl_attr(HLF_T)); +! for (i = 0; i < csinfo_size; i++) + { + if (csinfo[i].fname == NULL) + continue; +*************** +*** 2531,2538 **** + { + int i; + +! for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) + cs_release_csp(i, TRUE); + } + + #endif /* FEAT_CSCOPE */ +--- 2537,2546 ---- + { + int i; + +! for (i = 0; i < csinfo_size; i++) + cs_release_csp(i, TRUE); ++ vim_free(csinfo); ++ csinfo_size = 0; + } + + #endif /* FEAT_CSCOPE */ +*** ../vim-7.2.227/src/version.c 2009-07-09 20:13:59.000000000 +0200 +--- src/version.c 2009-07-09 21:21:48.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 228, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +84. Books in your bookcase bear the names Bongo, WinSock and Inside OLE + + /// 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/gvim/vim-7.2/7.2.229 b/gvim/vim-7.2/7.2.229 new file mode 100644 index 0000000..bafaef0 --- /dev/null +++ b/gvim/vim-7.2/7.2.229 @@ -0,0 +1,60 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.229 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.229 +Problem: Warning for shadowed variable. +Solution: Rename "wait" to "wait_time". +Files: src/os_unix.c + + +*** ../vim-7.2.228/src/os_unix.c 2009-06-16 15:12:11.000000000 +0200 +--- src/os_unix.c 2009-07-09 16:24:14.000000000 +0200 +*************** +*** 1138,1147 **** + * 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 + +--- 1138,1147 ---- + * to happen). + */ + { +! long wait_time; +! for (wait_time = 0; !sigcont_received && wait_time <= 3L; wait_time++) + /* Loop is not entered most of the time */ +! mch_delay(wait_time, FALSE); + } + # endif + +*** ../vim-7.2.228/src/version.c 2009-07-09 21:22:36.000000000 +0200 +--- src/version.c 2009-07-14 12:18:21.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 229, + /**/ + +-- +From "know your smileys": + :-) Funny + |-) Funny Oriental + (-: Funny Australian + + /// 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/gvim/vim-7.2/7.2.230 b/gvim/vim-7.2/7.2.230 new file mode 100644 index 0000000..32379d2 --- /dev/null +++ b/gvim/vim-7.2/7.2.230 @@ -0,0 +1,87 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.230 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.230 +Problem: A few old lint-style ARGUSED comments. +Solution: Change to the new UNUSED style. +Files: src/getchar.c + + +*** ../vim-7.2.229/src/getchar.c 2009-07-09 18:24:24.000000000 +0200 +--- src/getchar.c 2009-07-09 18:09:13.000000000 +0200 +*************** +*** 3708,3718 **** + * Clear all mappings or abbreviations. + * 'abbr' should be FALSE for mappings, TRUE for abbreviations. + */ +- /*ARGSUSED*/ + void + map_clear(cmdp, arg, forceit, abbr) + char_u *cmdp; +! char_u *arg; + int forceit; + int abbr; + { +--- 3708,3717 ---- + * Clear all mappings or abbreviations. + * 'abbr' should be FALSE for mappings, TRUE for abbreviations. + */ + void + map_clear(cmdp, arg, forceit, abbr) + char_u *cmdp; +! char_u *arg UNUSED; + int forceit; + int abbr; + { +*************** +*** 3741,3753 **** + /* + * Clear all mappings in "mode". + */ +- /*ARGSUSED*/ + void + map_clear_int(buf, mode, local, abbr) +! buf_T *buf; /* buffer for local mappings */ +! int mode; /* mode in which to delete */ +! int local; /* TRUE for buffer-local mappings */ +! int abbr; /* TRUE for abbreviations */ + { + mapblock_T *mp, **mpp; + int hash; +--- 3740,3751 ---- + /* + * Clear all mappings in "mode". + */ + void + map_clear_int(buf, mode, local, abbr) +! buf_T *buf UNUSED; /* buffer for local mappings */ +! int mode; /* mode in which to delete */ +! int local UNUSED; /* TRUE for buffer-local mappings */ +! int abbr; /* TRUE for abbreviations */ + { + mapblock_T *mp, **mpp; + int hash; +*** ../vim-7.2.229/src/version.c 2009-07-14 12:20:28.000000000 +0200 +--- src/version.c 2009-07-14 13:44:05.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 230, + /**/ + +-- +From "know your smileys": + :~) A man with a tape recorder up his nose + + /// 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/gvim/vim-7.2/7.2.231 b/gvim/vim-7.2/7.2.231 new file mode 100644 index 0000000..0f9a6d1 --- /dev/null +++ b/gvim/vim-7.2/7.2.231 @@ -0,0 +1,49 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.231 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.231 +Problem: Warning for unreacheable code. +Solution: Add #ifdef. +Files: src/if_perl.xs + + +*** ../vim-7.2.230/src/if_perl.xs 2009-07-09 20:06:30.000000000 +0200 +--- src/if_perl.xs 2009-07-09 13:02:16.000000000 +0200 +*************** +*** 720,728 **** +--- 720,730 ---- + #ifdef HAVE_SANDBOX + if (sandbox) + { ++ # ifndef MAKE_TEST /* avoid a warning for unreachable code */ + if ((safe = perl_get_sv( "VIM::safe", FALSE )) == NULL || !SvTRUE(safe)) + EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); + else ++ # endif + { + PUSHMARK(SP); + XPUSHs(safe); +*** ../vim-7.2.230/src/version.c 2009-07-14 13:44:43.000000000 +0200 +--- src/version.c 2009-07-14 16:04:07.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 231, + /**/ + +-- +From "know your smileys": + ~#:-( I just washed my hair, and I can't do nuthin' with it. + + /// 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/gvim/vim-7.2/7.2.232 b/gvim/vim-7.2/7.2.232 new file mode 100644 index 0000000..02727c7 --- /dev/null +++ b/gvim/vim-7.2/7.2.232 @@ -0,0 +1,102 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.232 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.232 +Problem: Cannot debug problems with being in a wrong directory. +Solution: When 'verbose' is 5 or higher report directory changes. +Files: src/os_unix.c, src/os_unix.h, src/proto/os_unix.pro + + +*** ../vim-7.2.231/src/os_unix.c 2009-07-14 12:20:28.000000000 +0200 +--- src/os_unix.c 2009-07-14 17:13:15.000000000 +0200 +*************** +*** 319,324 **** +--- 319,341 ---- + {-1, "Unknown!", FALSE} + }; + ++ int ++ mch_chdir(path) ++ char *path; ++ { ++ if (p_verbose >= 5) ++ { ++ verbose_enter(); ++ smsg((char_u *)"chdir(%s)", path); ++ verbose_leave(); ++ } ++ # ifdef VMS ++ return chdir(vms_fixfilename(path)); ++ # else ++ return chdir(path); ++ # endif ++ } ++ + /* + * Write s[len] to the screen. + */ +*************** +*** 2424,2429 **** +--- 2441,2452 ---- + #ifdef HAVE_FCHDIR + if (fd >= 0) + { ++ if (p_verbose >= 5) ++ { ++ verbose_enter(); ++ MSG("fchdir() to previous dir"); ++ verbose_leave(); ++ } + l = fchdir(fd); + close(fd); + } +*** ../vim-7.2.231/src/os_unix.h 2009-05-16 16:36:25.000000000 +0200 +--- src/os_unix.h 2009-07-14 16:55:05.000000000 +0200 +*************** +*** 482,492 **** + # else + int mch_rename __ARGS((const char *src, const char *dest)); + # endif +- # ifdef VMS +- # define mch_chdir(s) chdir(vms_fixfilename(s)) +- # else +- # define mch_chdir(s) chdir(s) +- # endif + # ifndef VMS + # ifdef __MVS__ + /* on OS390 Unix getenv() doesn't return a pointer to persistent +--- 482,487 ---- +*** ../vim-7.2.231/src/proto/os_unix.pro 2008-06-24 23:58:57.000000000 +0200 +--- src/proto/os_unix.pro 2009-07-14 16:58:08.000000000 +0200 +*************** +*** 1,4 **** +--- 1,5 ---- + /* os_unix.c */ ++ int mch_chdir __ARGS((char *path)); + void mch_write __ARGS((char_u *s, int len)); + int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt)); + int mch_char_avail __ARGS((void)); +*** ../vim-7.2.231/src/version.c 2009-07-14 16:05:14.000000000 +0200 +--- src/version.c 2009-07-14 17:37:15.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 232, + /**/ + +-- +From "know your smileys": + O:-) Saint + + /// 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/gvim/vim-7.2/7.2.233 b/gvim/vim-7.2/7.2.233 new file mode 100644 index 0000000..f9fbd84 --- /dev/null +++ b/gvim/vim-7.2/7.2.233 @@ -0,0 +1,96 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.233 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.233 (extra part of 7.2.232) +Problem: Cannot debug problems with being in a wrong directory. +Solution: When 'verbose' is 5 or higher report directory changes. +Files: src/os_msdos.c, src/os_mswin.c, src/os_riscos.c, src/os_mac.h + + +*** ../vim-7.2.232/src/os_msdos.c 2008-06-24 23:30:18.000000000 +0200 +--- src/os_msdos.c 2009-07-14 16:50:57.000000000 +0200 +*************** +*** 2039,2044 **** +--- 2039,2050 ---- + { + if (path[0] == NUL) /* just checking... */ + return 0; ++ if (p_verbose >= 5) ++ { ++ verbose_enter(); ++ smsg((char_u *)"chdir(%s)", path); ++ verbose_leave(); ++ } + if (path[1] == ':') /* has a drive name */ + { + if (change_drive(TOLOWER_ASC(path[0]) - 'a' + 1)) +*** ../vim-7.2.232/src/os_mswin.c 2009-05-14 22:00:37.000000000 +0200 +--- src/os_mswin.c 2009-07-14 16:53:03.000000000 +0200 +*************** +*** 653,658 **** +--- 653,664 ---- + if (path[0] == NUL) /* just checking... */ + return -1; + ++ if (p_verbose >= 5) ++ { ++ verbose_enter(); ++ smsg((char_u *)"chdir(%s)", path); ++ verbose_leave(); ++ } + if (isalpha(path[0]) && path[1] == ':') /* has a drive name */ + { + /* If we can change to the drive, skip that part of the path. If we +*** ../vim-7.2.232/src/os_riscos.c 2006-03-07 23:25:50.000000000 +0100 +--- src/os_riscos.c 2009-07-14 16:53:35.000000000 +0200 +*************** +*** 1203,1208 **** +--- 1203,1214 ---- + int retval; + char_u *new_dir; + ++ if (p_verbose >= 5) ++ { ++ verbose_enter(); ++ smsg((char_u *)"chdir(%s)", dir); ++ verbose_leave(); ++ } + length = strlen(dir); + if (dir[length - 1] != '.') + return chdir(dir); /* No trailing dots - nothing to do. */ +*** ../vim-7.2.232/src/os_mac.h 2009-06-24 16:41:01.000000000 +0200 +--- src/os_mac.h 2009-07-14 16:54:33.000000000 +0200 +*************** +*** 291,297 **** + # define HAVE_SETENV + # define HAVE_RENAME + # endif +- # define mch_chdir(s) chdir(s) + #endif + + #if defined(MACOS_X) && !defined(HAVE_CONFIG_H) +--- 291,296 ---- +*** ../vim-7.2.232/src/version.c 2009-07-14 17:38:51.000000000 +0200 +--- src/version.c 2009-07-14 18:35:30.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 233, + /**/ + +-- +From "know your smileys": + :-O>-o Smiley American tourist (note big mouth and camera) + + /// 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/gvim/vim-7.2/7.2.234 b/gvim/vim-7.2/7.2.234 new file mode 100644 index 0000000..dd44d5d --- /dev/null +++ b/gvim/vim-7.2/7.2.234 @@ -0,0 +1,111 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.234 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.234 +Problem: It is not possible to ignore file names without a suffix. +Solution: Use an empty entry in 'suffixes' for file names without a dot. +Files: runtime/doc/cmdline.txt, src/misc1.c + + +*** ../vim-7.2.233/runtime/doc/cmdline.txt 2008-11-09 13:43:25.000000000 +0100 +--- runtime/doc/cmdline.txt 2009-07-14 13:35:56.000000000 +0200 +*************** +*** 441,453 **** + those files with an extension that is in the 'suffixes' option are ignored. + The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending + in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored. +! It is impossible to ignore suffixes with two dots. Examples: + + pattern: files: match: ~ + test* test.c test.h test.o test.c + test* test.h test.o test.h and test.o + test* test.i test.h test.c test.i and test.c + + If there is more than one matching file (after ignoring the ones matching + the 'suffixes' option) the first file name is inserted. You can see that + there is only one match when you type 'wildchar' twice and the completed +--- 439,458 ---- + those files with an extension that is in the 'suffixes' option are ignored. + The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending + in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored. +! +! An empty entry, two consecutive commas, match a file name that does not +! contain a ".", thus has no suffix. This is useful to ignore "prog" and prefer +! "prog.c". +! +! Examples: + + pattern: files: match: ~ + test* test.c test.h test.o test.c + test* test.h test.o test.h and test.o + test* test.i test.h test.c test.i and test.c + ++ It is impossible to ignore suffixes with two dots. ++ + If there is more than one matching file (after ignoring the ones matching + the 'suffixes' option) the first file name is inserted. You can see that + there is only one match when you type 'wildchar' twice and the completed +*** ../vim-7.2.233/src/misc1.c 2009-07-09 20:06:30.000000000 +0200 +--- src/misc1.c 2009-07-14 15:51:55.000000000 +0200 +*************** +*** 8533,8543 **** + for (setsuf = p_su; *setsuf; ) + { + setsuflen = copy_option_part(&setsuf, suf_buf, MAXSUFLEN, ".,"); +! if (fnamelen >= setsuflen +! && fnamencmp(suf_buf, fname + fnamelen - setsuflen, +! (size_t)setsuflen) == 0) +! break; +! setsuflen = 0; + } + return (setsuflen != 0); + } +--- 8534,8558 ---- + for (setsuf = p_su; *setsuf; ) + { + setsuflen = copy_option_part(&setsuf, suf_buf, MAXSUFLEN, ".,"); +! if (setsuflen == 0) +! { +! char_u *tail = gettail(fname); +! +! /* empty entry: match name without a '.' */ +! if (vim_strchr(tail, '.') == NULL) +! { +! setsuflen = 1; +! break; +! } +! } +! else +! { +! if (fnamelen >= setsuflen +! && fnamencmp(suf_buf, fname + fnamelen - setsuflen, +! (size_t)setsuflen) == 0) +! break; +! setsuflen = 0; +! } + } + return (setsuflen != 0); + } +*** ../vim-7.2.233/src/version.c 2009-07-14 18:38:09.000000000 +0200 +--- src/version.c 2009-07-14 21:38:30.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 234, + /**/ + +-- +How many light bulbs does it take to change a person? + + /// 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/gvim/vim-7.2/7.2.235 b/gvim/vim-7.2/7.2.235 new file mode 100644 index 0000000..6aa8338 --- /dev/null +++ b/gvim/vim-7.2/7.2.235 @@ -0,0 +1,94 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.235 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.235 +Problem: Using CTRL-O z= in Insert mode has a delay before redrawing. +Solution: Reset msg_didout and msg_scroll. +Files: src/misc1.c, src/spell.c + + +*** ../vim-7.2.234/src/misc1.c 2009-07-14 21:40:30.000000000 +0200 +--- src/misc1.c 2009-07-14 15:51:55.000000000 +0200 +*************** +*** 3276,3281 **** +--- 3276,3282 ---- + cmdline_row = msg_row - 1; + need_wait_return = FALSE; + msg_didany = FALSE; ++ msg_didout = FALSE; + } + else + cmdline_row = save_cmdline_row; +*** ../vim-7.2.234/src/spell.c 2009-05-17 13:30:58.000000000 +0200 +--- src/spell.c 2009-07-14 15:57:55.000000000 +0200 +*************** +*** 10252,10257 **** +--- 10252,10258 ---- + int limit; + int selected = count; + int badlen = 0; ++ int msg_scroll_save = msg_scroll; + + if (no_spell_checking(curwin)) + return; +*************** +*** 10416,10422 **** + selected = prompt_for_number(&mouse_used); + if (mouse_used) + selected -= lines_left; +! lines_left = Rows; /* avoid more prompt */ + } + + if (selected > 0 && selected <= sug.su_ga.ga_len && u_save_cursor() == OK) +--- 10417,10425 ---- + selected = prompt_for_number(&mouse_used); + if (mouse_used) + selected -= lines_left; +! lines_left = Rows; /* avoid more prompt */ +! /* don't delay for 'smd' in normal_cmd() */ +! msg_scroll = msg_scroll_save; + } + + if (selected > 0 && selected <= sug.su_ga.ga_len && u_save_cursor() == OK) +*************** +*** 10441,10447 **** + } + + /* Replace the word. */ +! p = alloc((unsigned)STRLEN(line) - stp->st_orglen + stp->st_wordlen + 1); + if (p != NULL) + { + c = (int)(sug.su_badptr - line); +--- 10444,10451 ---- + } + + /* Replace the word. */ +! p = alloc((unsigned)STRLEN(line) - stp->st_orglen +! + stp->st_wordlen + 1); + if (p != NULL) + { + c = (int)(sug.su_badptr - line); +*** ../vim-7.2.234/src/version.c 2009-07-14 21:40:30.000000000 +0200 +--- src/version.c 2009-07-22 11:00:34.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 235, + /**/ + +-- +From "know your smileys": + |-( Contact lenses, but has lost them + + /// 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/gvim/vim-7.2/7.2.236 b/gvim/vim-7.2/7.2.236 new file mode 100644 index 0000000..aeb1f57 --- /dev/null +++ b/gvim/vim-7.2/7.2.236 @@ -0,0 +1,81 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.236 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.236 +Problem: Mac: Compiling with Ruby doesn't always work. +Solution: In configure filter out the --arch argument (Bjorn Winckler) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.2.235/src/configure.in 2009-05-26 22:58:43.000000000 +0200 +--- src/configure.in 2009-07-14 16:09:34.000000000 +0200 +*************** +*** 984,990 **** + fi + rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'` + if test "X$rubyldflags" != "X"; then +! LDFLAGS="$rubyldflags $LDFLAGS" + fi + RUBY_SRC="if_ruby.c" + RUBY_OBJ="objects/if_ruby.o" +--- 984,996 ---- + fi + rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'` + if test "X$rubyldflags" != "X"; then +! dnl Ruby on Mac OS X 10.5 adds "-arch" flags but these should only +! dnl be included if requested by passing --with-mac-arch to +! dnl configure, so strip these flags first (if present) +! rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//'` +! if test "X$rubyldflags" != "X"; then +! LDFLAGS="$rubyldflags $LDFLAGS" +! fi + fi + RUBY_SRC="if_ruby.c" + RUBY_OBJ="objects/if_ruby.o" +*** ../vim-7.2.235/src/auto/configure 2009-05-26 22:58:43.000000000 +0200 +--- src/auto/configure 2009-07-14 16:11:58.000000000 +0200 +*************** +*** 5780,5786 **** + fi + rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'` + if test "X$rubyldflags" != "X"; then +! LDFLAGS="$rubyldflags $LDFLAGS" + fi + RUBY_SRC="if_ruby.c" + RUBY_OBJ="objects/if_ruby.o" +--- 5780,5789 ---- + fi + rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'` + if test "X$rubyldflags" != "X"; then +! rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//'` +! if test "X$rubyldflags" != "X"; then +! LDFLAGS="$rubyldflags $LDFLAGS" +! fi + fi + RUBY_SRC="if_ruby.c" + RUBY_OBJ="objects/if_ruby.o" +*** ../vim-7.2.235/src/version.c 2009-07-22 11:03:38.000000000 +0200 +--- src/version.c 2009-07-22 11:14:38.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 236, + /**/ + +-- +From "know your smileys": + <|-) Chinese + <|-( Chinese and doesn't like these kind of jokes + + /// 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/gvim/vim-7.2/7.2.237 b/gvim/vim-7.2/7.2.237 new file mode 100644 index 0000000..3592d3d --- /dev/null +++ b/gvim/vim-7.2/7.2.237 @@ -0,0 +1,76 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.237 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.237 +Problem: Crash on exit when window icon not set. +Solution: Copy terminal name when using it for the icon name. +Files: src/os_unix.c + + +*** ../vim-7.2.236/src/os_unix.c 2009-07-14 17:38:51.000000000 +0200 +--- src/os_unix.c 2009-07-14 18:30:04.000000000 +0200 +*************** +*** 1734,1742 **** + if (oldicon == NULL && !test_only) + { + if (STRNCMP(T_NAME, "builtin_", 8) == 0) +! oldicon = T_NAME + 8; + else +! oldicon = T_NAME; + } + + return retval; +--- 1734,1742 ---- + if (oldicon == NULL && !test_only) + { + if (STRNCMP(T_NAME, "builtin_", 8) == 0) +! oldicon = vim_strsave(T_NAME + 8); + else +! oldicon = vim_strsave(T_NAME); + } + + return retval; +*************** +*** 1939,1947 **** + if (!test_only) + { + if (STRNCMP(T_NAME, "builtin_", 8) == 0) +! oldicon = T_NAME + 8; + else +! oldicon = T_NAME; + } + return FALSE; + } +--- 1939,1947 ---- + if (!test_only) + { + if (STRNCMP(T_NAME, "builtin_", 8) == 0) +! oldicon = vim_strsave(T_NAME + 8); + else +! oldicon = vim_strsave(T_NAME); + } + return FALSE; + } +*** ../vim-7.2.236/src/version.c 2009-07-22 11:16:54.000000000 +0200 +--- src/version.c 2009-07-22 13:26:30.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 237, + /**/ + +-- +Common sense is what tells you that the world is flat. + + /// 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/gvim/vim-7.2/7.2.238 b/gvim/vim-7.2/7.2.238 new file mode 100644 index 0000000..a70976d --- /dev/null +++ b/gvim/vim-7.2/7.2.238 @@ -0,0 +1,117 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.238 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.238 +Problem: Leaking memory when setting term to "builtin_dumb". +Solution: Free memory when resetting term option t_Co. +Files: src/option.c, src/proto/option.pro, src/term.c + + +*** ../vim-7.2.237/src/option.c 2009-06-16 17:50:56.000000000 +0200 +--- src/option.c 2009-07-22 12:49:19.000000000 +0200 +*************** +*** 403,410 **** + #define P_NUM 0x02 /* the option is numeric */ + #define P_STRING 0x04 /* the option is a string */ + #define P_ALLOCED 0x08 /* the string option is in allocated memory, +! must use vim_free() when assigning new +! value. Not set if default is the same. */ + #define P_EXPAND 0x10 /* environment expansion. NOTE: P_EXPAND can + never be used for local or hidden options! */ + #define P_NODEFAULT 0x40 /* don't set to default value */ +--- 403,411 ---- + #define P_NUM 0x02 /* the option is numeric */ + #define P_STRING 0x04 /* the option is a string */ + #define P_ALLOCED 0x08 /* the string option is in allocated memory, +! must use free_string_option() when +! assigning new value. Not set if default is +! the same. */ + #define P_EXPAND 0x10 /* environment expansion. NOTE: P_EXPAND can + never be used for local or hidden options! */ + #define P_NODEFAULT 0x40 /* don't set to default value */ +*************** +*** 8927,8932 **** +--- 8928,8955 ---- + } + + /* ++ * Free the string for one term option, if it was allocated. ++ * Set the string to empty_option and clear allocated flag. ++ * "var" points to the option value. ++ */ ++ void ++ free_one_termoption(var) ++ char_u *var; ++ { ++ struct vimoption *p; ++ ++ for (p = &options[0]; p->fullname != NULL; p++) ++ if (p->var == var) ++ { ++ if (p->flags & P_ALLOCED) ++ free_string_option(*(char_u **)(p->var)); ++ *(char_u **)(p->var) = empty_option; ++ p->flags &= ~P_ALLOCED; ++ break; ++ } ++ } ++ ++ /* + * Set the terminal option defaults to the current value. + * Used after setting the terminal name. + */ +*** ../vim-7.2.237/src/proto/option.pro 2009-02-21 20:27:00.000000000 +0100 +--- src/proto/option.pro 2009-07-22 12:52:31.000000000 +0200 +*************** +*** 29,34 **** +--- 29,35 ---- + int makefoldset __ARGS((FILE *fd)); + void clear_termoptions __ARGS((void)); + void free_termoptions __ARGS((void)); ++ void free_one_termoption __ARGS((char_u *var)); + void set_term_defaults __ARGS((void)); + void comp_col __ARGS((void)); + char_u *get_equalprg __ARGS((void)); +*** ../vim-7.2.237/src/term.c 2009-06-16 14:31:56.000000000 +0200 +--- src/term.c 2009-07-22 13:19:59.000000000 +0200 +*************** +*** 2881,2887 **** + + /* if 'Sb' and 'AB' are not defined, reset "Co" */ + if (*T_CSB == NUL && *T_CAB == NUL) +! T_CCO = empty_option; + + /* Set 'weirdinvert' according to value of 't_xs' */ + p_wiv = (*T_XS != NUL); +--- 2881,2887 ---- + + /* if 'Sb' and 'AB' are not defined, reset "Co" */ + if (*T_CSB == NUL && *T_CAB == NUL) +! free_one_termoption(T_CCO); + + /* Set 'weirdinvert' according to value of 't_xs' */ + p_wiv = (*T_XS != NUL); +*** ../vim-7.2.237/src/version.c 2009-07-22 13:27:50.000000000 +0200 +--- src/version.c 2009-07-22 14:25:44.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 238, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +95. Only communication in your household is through email. + + /// 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/gvim/vim-7.2/7.2.239 b/gvim/vim-7.2/7.2.239 new file mode 100644 index 0000000..26b80ee --- /dev/null +++ b/gvim/vim-7.2/7.2.239 @@ -0,0 +1,145 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.239 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.239 +Problem: Using :diffpatch twice or when patching fails causes memory + corruption and/or a crash. (Bryan Venteicher) +Solution: Detect missing output file. Avoid using non-existing buffer. +Files: src/diff.c + + +*** ../vim-7.2.238/src/diff.c 2009-05-14 22:19:19.000000000 +0200 +--- src/diff.c 2009-07-22 16:06:21.000000000 +0200 +*************** +*** 893,898 **** +--- 893,899 ---- + char_u *browseFile = NULL; + int browse_flag = cmdmod.browse; + #endif ++ struct stat st; + + #ifdef FEAT_BROWSE + if (cmdmod.browse) +*************** +*** 999,1042 **** + STRCAT(buf, ".rej"); + mch_remove(buf); + +! if (curbuf->b_fname != NULL) + { +! newname = vim_strnsave(curbuf->b_fname, + (int)(STRLEN(curbuf->b_fname) + 4)); +! if (newname != NULL) +! STRCAT(newname, ".new"); +! } + + #ifdef FEAT_GUI +! need_mouse_correct = TRUE; + #endif +! /* don't use a new tab page, each tab page has its own diffs */ +! cmdmod.tab = 0; +! +! if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) != FAIL) +! { +! /* Pretend it was a ":split fname" command */ +! eap->cmdidx = CMD_split; +! eap->arg = tmp_new; +! do_exedit(eap, old_curwin); + +! if (curwin != old_curwin) /* split must have worked */ + { +! /* Set 'diff', 'scrollbind' on and 'wrap' off. */ +! diff_win_options(curwin, TRUE); +! diff_win_options(old_curwin, TRUE); + +! if (newname != NULL) + { +! /* do a ":file filename.new" on the patched buffer */ +! eap->arg = newname; +! ex_file(eap); + + #ifdef FEAT_AUTOCMD +! /* Do filetype detection with the new name. */ +! if (au_has_group((char_u *)"filetypedetect")) +! do_cmdline_cmd((char_u *)":doau filetypedetect BufRead"); + #endif + } + } + } +--- 1000,1050 ---- + STRCAT(buf, ".rej"); + mch_remove(buf); + +! /* Only continue if the output file was created. */ +! if (mch_stat((char *)tmp_new, &st) < 0 || st.st_size == 0) +! EMSG(_("E816: Cannot read patch output")); +! else + { +! if (curbuf->b_fname != NULL) +! { +! newname = vim_strnsave(curbuf->b_fname, + (int)(STRLEN(curbuf->b_fname) + 4)); +! if (newname != NULL) +! STRCAT(newname, ".new"); +! } + + #ifdef FEAT_GUI +! need_mouse_correct = TRUE; + #endif +! /* don't use a new tab page, each tab page has its own diffs */ +! cmdmod.tab = 0; + +! if (win_split(0, (diff_flags & DIFF_VERTICAL) ? WSP_VERT : 0) != FAIL) + { +! /* Pretend it was a ":split fname" command */ +! eap->cmdidx = CMD_split; +! eap->arg = tmp_new; +! do_exedit(eap, old_curwin); + +! /* check that split worked and editing tmp_new */ +! if (curwin != old_curwin && win_valid(old_curwin)) + { +! /* Set 'diff', 'scrollbind' on and 'wrap' off. */ +! diff_win_options(curwin, TRUE); +! diff_win_options(old_curwin, TRUE); +! +! if (newname != NULL) +! { +! /* do a ":file filename.new" on the patched buffer */ +! eap->arg = newname; +! ex_file(eap); + + #ifdef FEAT_AUTOCMD +! /* Do filetype detection with the new name. */ +! if (au_has_group((char_u *)"filetypedetect")) +! do_cmdline_cmd((char_u *)":doau filetypedetect BufRead"); + #endif ++ } + } + } + } +*** ../vim-7.2.238/src/version.c 2009-07-22 14:27:33.000000000 +0200 +--- src/version.c 2009-07-22 16:21:29.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 239, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +97. Your mother tells you to remember something, and you look for + a File/Save command. + + /// 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/gvim/vim-7.2/7.2.240 b/gvim/vim-7.2/7.2.240 new file mode 100644 index 0000000..7a1c22e --- /dev/null +++ b/gvim/vim-7.2/7.2.240 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.240 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.240 +Problem: Crash when using find/replace dialog repeatedly. (Michiel + Hartsuiker) +Solution: Avoid doing the operation while busy or recursively. Also refuse + replace when text is locked. +Files: src/gui.c + + +*** ../vim-7.2.239/src/gui.c 2009-06-24 18:31:36.000000000 +0200 +--- src/gui.c 2009-07-22 16:54:16.000000000 +0200 +*************** +*** 5004,5009 **** +--- 5004,5022 ---- + char_u *p; + regmatch_T regmatch; + int save_did_emsg = did_emsg; ++ static int busy = FALSE; ++ ++ /* When the screen is being updated we should not change buffers and ++ * windows structures, it may cause freed memory to be used. Also don't ++ * do this recursively (pressing "Find" quickly several times. */ ++ if (updating_screen || busy) ++ return FALSE; ++ ++ /* refuse replace when text cannot be changed */ ++ if ((type == FRD_REPLACE || type == FRD_REPLACEALL) && text_locked()) ++ return FALSE; ++ ++ busy = TRUE; + + ga_init2(&ga, 1, 100); + if (type == FRD_REPLACEALL) +*************** +*** 5094,5099 **** +--- 5107,5113 ---- + } + + vim_free(ga.ga_data); ++ busy = FALSE; + return (ga.ga_len > 0); + } + +*** ../vim-7.2.239/src/version.c 2009-07-22 16:22:33.000000000 +0200 +--- src/version.c 2009-07-29 11:09:13.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 240, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits. + + /// 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/gvim/vim-7.2/7.2.241 b/gvim/vim-7.2/7.2.241 new file mode 100644 index 0000000..42e9ade --- /dev/null +++ b/gvim/vim-7.2/7.2.241 @@ -0,0 +1,169 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.241 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.241 +Problem: When using a combination of ":bufdo" and "doautoall" we may end up + in the wrong directory. (Ajit Thakkar) + Crash when triggering an autocommand in ":vimgrep". (Yukihiro + Nakadaira) +Solution: Clear w_localdir and globaldir when using the aucmd_win. + Use a separate flag to decide aucmd_win needs to be restored. +Files: src/fileio.c, src/globals.h, src/structs.h + + +*** ../vim-7.2.240/src/fileio.c 2009-07-01 17:11:40.000000000 +0200 +--- src/fileio.c 2009-07-22 19:08:55.000000000 +0200 +*************** +*** 8420,8425 **** +--- 8420,8429 ---- + if (aucmd_win == NULL) + win = curwin; + } ++ if (win == NULL && aucmd_win_used) ++ /* Strange recursive autocommand, fall back to using the current ++ * window. Expect a few side effects... */ ++ win = curwin; + + aco->save_curwin = curwin; + aco->save_curbuf = curbuf; +*************** +*** 8428,8433 **** +--- 8432,8438 ---- + /* There is a window for "buf" in the current tab page, make it the + * curwin. This is preferred, it has the least side effects (esp. if + * "buf" is curbuf). */ ++ aco->use_aucmd_win = FALSE; + curwin = win; + } + else +*************** +*** 8436,8444 **** +--- 8441,8460 ---- + * effects, insert it in a the current tab page. + * Anything related to a window (e.g., setting folds) may have + * unexpected results. */ ++ aco->use_aucmd_win = TRUE; ++ aucmd_win_used = TRUE; + aucmd_win->w_buffer = buf; + ++buf->b_nwindows; + win_init_empty(aucmd_win); /* set cursor and topline to safe values */ ++ vim_free(aucmd_win->w_localdir); ++ aucmd_win->w_localdir = NULL; ++ ++ /* Make sure w_localdir and globaldir are NULL to avoid a chdir() in ++ * win_enter_ext(). */ ++ aucmd_win->w_localdir = NULL; ++ aco->globaldir = globaldir; ++ globaldir = NULL; ++ + + #ifdef FEAT_WINDOWS + /* Split the current window, put the aucmd_win in the upper half. +*************** +*** 8472,8478 **** + int dummy; + #endif + +! if (aco->new_curwin == aucmd_win) + { + --curbuf->b_nwindows; + #ifdef FEAT_WINDOWS +--- 8488,8494 ---- + int dummy; + #endif + +! if (aco->use_aucmd_win) + { + --curbuf->b_nwindows; + #ifdef FEAT_WINDOWS +*************** +*** 8499,8504 **** +--- 8515,8521 ---- + /* Remove the window and frame from the tree of frames. */ + (void)winframe_remove(curwin, &dummy, NULL); + win_remove(curwin, NULL); ++ aucmd_win_used = FALSE; + last_status(FALSE); /* may need to remove last status line */ + restore_snapshot(SNAP_AUCMD_IDX, FALSE); + (void)win_comp_pos(); /* recompute window positions */ +*************** +*** 8517,8522 **** +--- 8534,8542 ---- + #endif + curbuf = curwin->w_buffer; + ++ vim_free(globaldir); ++ globaldir = aco->globaldir; ++ + /* the buffer contents may have changed */ + check_cursor(); + if (curwin->w_topline > curbuf->b_ml.ml_line_count) +*************** +*** 8541,8547 **** + #endif + { + /* Restore the buffer which was previously edited by curwin, if +! * it was chagned, we are still the same window and the buffer is + * valid. */ + if (curwin == aco->new_curwin + && curbuf != aco->new_curbuf +--- 8561,8567 ---- + #endif + { + /* Restore the buffer which was previously edited by curwin, if +! * it was changed, we are still the same window and the buffer is + * valid. */ + if (curwin == aco->new_curwin + && curbuf != aco->new_curbuf +*** ../vim-7.2.240/src/globals.h 2009-06-16 16:01:34.000000000 +0200 +--- src/globals.h 2009-07-22 19:50:53.000000000 +0200 +*************** +*** 541,546 **** +--- 541,547 ---- + + #ifdef FEAT_AUTOCMD + EXTERN win_T *aucmd_win; /* window used in aucmd_prepbuf() */ ++ EXTERN int aucmd_win_used INIT(= FALSE); /* aucmd_win is being used */ + #endif + + /* +*** ../vim-7.2.240/src/structs.h 2009-07-09 18:24:24.000000000 +0200 +--- src/structs.h 2009-07-22 18:58:35.000000000 +0200 +*************** +*** 2288,2296 **** +--- 2288,2298 ---- + { + buf_T *save_curbuf; /* saved curbuf */ + #ifdef FEAT_AUTOCMD ++ int use_aucmd_win; /* using aucmd_win */ + win_T *save_curwin; /* saved curwin */ + win_T *new_curwin; /* new curwin */ + buf_T *new_curbuf; /* new curbuf */ ++ char_u *globaldir; /* saved value of globaldir */ + #endif + } aco_save_T; + +*** ../vim-7.2.240/src/version.c 2009-07-29 11:10:31.000000000 +0200 +--- src/version.c 2009-07-29 12:06:31.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 241, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +114. You are counting items, you go "0,1,2,3,4,5,6,7,8,9,A,B,C,D...". + + /// 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/gvim/vim-7.2/7.2.242 b/gvim/vim-7.2/7.2.242 new file mode 100644 index 0000000..22341cd --- /dev/null +++ b/gvim/vim-7.2/7.2.242 @@ -0,0 +1,89 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.242 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.242 +Problem: Setting 'lazyredraw' causes the cursor column to be recomputed. + (Tom Link) +Solution: Only recompute the cursor column for a boolean option if changes + the cursor position. +Files: src/option.c + + +*** ../vim-7.2.241/src/option.c 2009-07-22 14:27:33.000000000 +0200 +--- src/option.c 2009-07-29 10:03:39.000000000 +0200 +*************** +*** 7194,7199 **** +--- 7194,7207 ---- + compatible_set(); + } + ++ /* 'list', 'number' */ ++ else if ((int *)varp == &curwin->w_p_list ++ || (int *)varp == &curwin->w_p_nu) ++ { ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; ++ } ++ + else if ((int *)varp == &curbuf->b_p_ro) + { + /* when 'readonly' is reset globally, also reset readonlymode */ +*************** +*** 7645,7650 **** +--- 7653,7666 ---- + curbuf->b_p_imsearch = B_IMODE_USE_INSERT; + # endif + } ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; ++ } ++ ++ else if ((int *)varp == &p_arshape) ++ { ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; + } + #endif + +*************** +*** 7655,7662 **** + options[opt_idx].flags |= P_WAS_SET; + + comp_col(); /* in case 'ruler' or 'showcmd' changed */ +! if (curwin->w_curswant != MAXCOL) +! curwin->w_set_curswant = TRUE; /* in case 'list' changed */ + check_redraw(options[opt_idx].flags); + + return NULL; +--- 7671,7677 ---- + options[opt_idx].flags |= P_WAS_SET; + + comp_col(); /* in case 'ruler' or 'showcmd' changed */ +! + check_redraw(options[opt_idx].flags); + + return NULL; +*** ../vim-7.2.241/src/version.c 2009-07-29 12:09:49.000000000 +0200 +--- src/version.c 2009-07-29 15:40:43.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 242, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +117. You are more comfortable typing in 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/gvim/vim-7.2/7.2.243 b/gvim/vim-7.2/7.2.243 new file mode 100644 index 0000000..92a6580 --- /dev/null +++ b/gvim/vim-7.2/7.2.243 @@ -0,0 +1,67 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.243 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.243 +Problem: Memory leak when using :vimgrep and resizing. (Dominique Pelle) +Solution: Free memory for aucmd_win when resizing and don't allocate it + twice. +Files: src/screen.c + + +*** ../vim-7.2.242/src/screen.c 2009-06-16 17:22:38.000000000 +0200 +--- src/screen.c 2009-07-29 15:59:37.000000000 +0200 +*************** +*** 7467,7472 **** +--- 7467,7476 ---- + */ + FOR_ALL_TAB_WINDOWS(tp, wp) + win_free_lsize(wp); ++ #ifdef FEAT_AUTOCMD ++ if (aucmd_win != NULL) ++ win_free_lsize(aucmd_win); ++ #endif + + new_ScreenLines = (schar_T *)lalloc((long_u)( + (Rows + 1) * Columns * sizeof(schar_T)), FALSE); +*************** +*** 7504,7510 **** + } + } + #ifdef FEAT_AUTOCMD +! if (aucmd_win != NULL && win_alloc_lines(aucmd_win) == FAIL) + outofmem = TRUE; + #endif + #ifdef FEAT_WINDOWS +--- 7508,7515 ---- + } + } + #ifdef FEAT_AUTOCMD +! if (aucmd_win != NULL && aucmd_win->w_lines == NULL +! && win_alloc_lines(aucmd_win) == FAIL) + outofmem = TRUE; + #endif + #ifdef FEAT_WINDOWS +*** ../vim-7.2.242/src/version.c 2009-07-29 15:41:32.000000000 +0200 +--- src/version.c 2009-07-29 16:07:47.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 243, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +118. You are on a first-name basis with your ISP's staff. + + /// 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/gvim/vim-7.2/7.2.244 b/gvim/vim-7.2/7.2.244 new file mode 100644 index 0000000..6c9b1fb --- /dev/null +++ b/gvim/vim-7.2/7.2.244 @@ -0,0 +1,174 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.244 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.244 +Problem: When 'enc' is utf-8 and 'fenc' is latin1, writing a non-latin1 + character gives a conversion error without any hint what is wrong. +Solution: When known add the line number to the error message. +Files: src/fileio.c + + +*** ../vim-7.2.243/src/fileio.c 2009-07-29 12:09:49.000000000 +0200 +--- src/fileio.c 2009-07-29 17:04:06.000000000 +0200 +*************** +*** 121,126 **** +--- 121,128 ---- + char_u *bw_conv_buf; /* buffer for writing converted chars */ + int bw_conv_buflen; /* size of bw_conv_buf */ + int bw_conv_error; /* set for conversion error */ ++ linenr_T bw_conv_error_lnum; /* first line with error or zero */ ++ linenr_T bw_start_lnum; /* line number at start of buffer */ + # ifdef USE_ICONV + iconv_t bw_iconv_fd; /* descriptor for iconv() or -1 */ + # endif +*************** +*** 2924,2929 **** +--- 2925,2931 ---- + linenr_T lnum; + long nchars; + char_u *errmsg = NULL; ++ int errmsg_allocated = FALSE; + char_u *errnum = NULL; + char_u *buffer; + char_u smallbuf[SMBUFSIZE]; +*************** +*** 2987,2992 **** +--- 2989,2995 ---- + /* must init bw_conv_buf and bw_iconv_fd before jumping to "fail" */ + write_info.bw_conv_buf = NULL; + write_info.bw_conv_error = FALSE; ++ write_info.bw_conv_error_lnum = 0; + write_info.bw_restlen = 0; + # ifdef USE_ICONV + write_info.bw_iconv_fd = (iconv_t)-1; +*************** +*** 4243,4248 **** +--- 4245,4251 ---- + nchars += write_info.bw_len; + } + } ++ write_info.bw_start_lnum = start; + #endif + + write_info.bw_len = bufsize; +*************** +*** 4278,4283 **** +--- 4281,4289 ---- + nchars += bufsize; + s = buffer; + len = 0; ++ #ifdef FEAT_MBYTE ++ write_info.bw_start_lnum = lnum; ++ #endif + } + /* write failed or last line has no EOL: stop here */ + if (end == 0 +*************** +*** 4474,4480 **** + { + #ifdef FEAT_MBYTE + if (write_info.bw_conv_error) +! errmsg = (char_u *)_("E513: write error, conversion failed (make 'fenc' empty to override)"); + else + #endif + if (got_int) +--- 4480,4496 ---- + { + #ifdef FEAT_MBYTE + if (write_info.bw_conv_error) +! { +! if (write_info.bw_conv_error_lnum == 0) +! errmsg = (char_u *)_("E513: write error, conversion failed (make 'fenc' empty to override)"); +! else +! { +! errmsg_allocated = TRUE; +! errmsg = alloc(300); +! vim_snprintf((char *)errmsg, 300, _("E513: write error, conversion failed in line %ld (make 'fenc' empty to override)"), +! (long)write_info.bw_conv_error_lnum); +! } +! } + else + #endif + if (got_int) +*************** +*** 4550,4555 **** +--- 4566,4577 ---- + { + STRCAT(IObuff, _(" CONVERSION ERROR")); + c = TRUE; ++ if (write_info.bw_conv_error_lnum != 0) ++ { ++ int l = STRLEN(IObuff); ++ vim_snprintf((char *)IObuff + l, IOSIZE - l, _(" in line %ld;"), ++ (long)write_info.bw_conv_error_lnum); ++ } + } + else if (notconverted) + { +*************** +*** 4746,4751 **** +--- 4768,4775 ---- + } + STRCAT(IObuff, errmsg); + emsg(IObuff); ++ if (errmsg_allocated) ++ vim_free(errmsg); + + retval = FAIL; + if (end == 0) +*************** +*** 5105,5111 **** + c = buf[wlen]; + } + +! ip->bw_conv_error |= ucs2bytes(c, &p, flags); + } + if (flags & FIO_LATIN1) + len = (int)(p - buf); +--- 5129,5141 ---- + c = buf[wlen]; + } + +! if (ucs2bytes(c, &p, flags) && !ip->bw_conv_error) +! { +! ip->bw_conv_error = TRUE; +! ip->bw_conv_error_lnum = ip->bw_start_lnum; +! } +! if (c == NL) +! ++ip->bw_start_lnum; + } + if (flags & FIO_LATIN1) + len = (int)(p - buf); +*************** +*** 5386,5391 **** +--- 5416,5422 ---- + #ifdef FEAT_MBYTE + /* + * Convert a Unicode character to bytes. ++ * Return TRUE for an error, FALSE when it's OK. + */ + static int + ucs2bytes(c, pp, flags) +*** ../vim-7.2.243/src/version.c 2009-07-29 16:13:35.000000000 +0200 +--- src/version.c 2009-07-29 18:01:27.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 244, + /**/ + +-- +Support your right to bare arms! Wear short sleeves! + + /// 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/gvim/vim-7.2/7.2.245 b/gvim/vim-7.2/7.2.245 new file mode 100644 index 0000000..d046c97 --- /dev/null +++ b/gvim/vim-7.2/7.2.245 @@ -0,0 +1,165 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.245 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.245 +Problem: When 'enc' is "utf-16" and 'fenc' is "utf-8" writing a file does + conversion while none should be done. (Yukihiro Nakadaira) When + 'fenc' is empty the file is written as utf-8 instead of utf-16. +Solution: Do proper comparison of encodings, taking into account that all + Unicode values for 'enc' use utf-8 internally. +Files: src/fileio.c + + +*** ../vim-7.2.244/src/fileio.c 2009-07-29 18:05:57.000000000 +0200 +--- src/fileio.c 2009-07-29 17:04:06.000000000 +0200 +*************** +*** 134,140 **** + #ifdef FEAT_MBYTE + static linenr_T readfile_linenr __ARGS((linenr_T linecnt, char_u *p, char_u *endp)); + static int ucs2bytes __ARGS((unsigned c, char_u **pp, int flags)); +! static int same_encoding __ARGS((char_u *a, char_u *b)); + static int get_fio_flags __ARGS((char_u *ptr)); + static char_u *check_for_bom __ARGS((char_u *p, long size, int *lenp, int flags)); + static int make_bom __ARGS((char_u *buf, char_u *name)); +--- 134,140 ---- + #ifdef FEAT_MBYTE + static linenr_T readfile_linenr __ARGS((linenr_T linecnt, char_u *p, char_u *endp)); + static int ucs2bytes __ARGS((unsigned c, char_u **pp, int flags)); +! static int need_conversion __ARGS((char_u *fenc)); + static int get_fio_flags __ARGS((char_u *ptr)); + static char_u *check_for_bom __ARGS((char_u *p, long size, int *lenp, int flags)); + static int make_bom __ARGS((char_u *buf, char_u *name)); +*************** +*** 1043,1055 **** + } + + /* +! * Conversion is required when the encoding of the file is different +! * from 'encoding' or 'encoding' is UTF-16, UCS-2 or UCS-4 (requires +! * conversion to UTF-8). + */ + fio_flags = 0; +! converted = (*fenc != NUL && !same_encoding(p_enc, fenc)); +! if (converted || enc_unicode != 0) + { + + /* "ucs-bom" means we need to check the first bytes of the file +--- 1043,1054 ---- + } + + /* +! * Conversion may be required when the encoding of the file is different +! * from 'encoding' or 'encoding' is UTF-16, UCS-2 or UCS-4. + */ + fio_flags = 0; +! converted = need_conversion(fenc); +! if (converted) + { + + /* "ucs-bom" means we need to check the first bytes of the file +*************** +*** 3969,3978 **** + fenc = buf->b_p_fenc; + + /* +! * The file needs to be converted when 'fileencoding' is set and +! * 'fileencoding' differs from 'encoding'. + */ +! converted = (*fenc != NUL && !same_encoding(p_enc, fenc)); + + /* + * Check if UTF-8 to UCS-2/4 or Latin1 conversion needs to be done. Or +--- 3968,3976 ---- + fenc = buf->b_p_fenc; + + /* +! * Check if the file needs to be converted. + */ +! converted = need_conversion(fenc); + + /* + * Check if UTF-8 to UCS-2/4 or Latin1 conversion needs to be done. Or +*************** +*** 5502,5521 **** + } + + /* +! * Return TRUE if "a" and "b" are the same 'encoding'. +! * Ignores difference between "ansi" and "latin1", "ucs-4" and "ucs-4be", etc. + */ + static int +! same_encoding(a, b) +! char_u *a; +! char_u *b; + { +! int f; + +! if (STRCMP(a, b) == 0) +! return TRUE; +! f = get_fio_flags(a); +! return (f != 0 && get_fio_flags(b) == f); + } + + /* +--- 5500,5536 ---- + } + + /* +! * Return TRUE if file encoding "fenc" requires conversion from or to +! * 'encoding'. + */ + static int +! need_conversion(fenc) +! char_u *fenc; + { +! int same_encoding; +! int enc_flags; +! int fenc_flags; + +! if (*fenc == NUL || STRCMP(p_enc, fenc) == 0) +! same_encoding = TRUE; +! else +! { +! /* Ignore difference between "ansi" and "latin1", "ucs-4" and +! * "ucs-4be", etc. */ +! enc_flags = get_fio_flags(p_enc); +! fenc_flags = get_fio_flags(fenc); +! same_encoding = (enc_flags != 0 && fenc_flags == enc_flags); +! } +! if (same_encoding) +! { +! /* Specified encoding matches with 'encoding'. This requires +! * conversion when 'encoding' is Unicode but not UTF-8. */ +! return enc_unicode != 0; +! } +! +! /* Encodings differ. However, conversion is not needed when 'enc' is any +! * Unicode encoding and the file is UTF-8. */ +! return !(enc_utf8 && fenc_flags == FIO_UTF8); + } + + /* +*** ../vim-7.2.244/src/version.c 2009-07-29 18:05:57.000000000 +0200 +--- src/version.c 2009-07-29 18:20:08.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 245, + /**/ + +-- +An actual excerpt from a classified section of a city newspaper: +"Illiterate? Write today for free help!" + + /// 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/gvim/vim-7.2/7.2.246 b/gvim/vim-7.2/7.2.246 new file mode 100644 index 0000000..5b1c978 --- /dev/null +++ b/gvim/vim-7.2/7.2.246 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.246 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.246 +Problem: Cscope home page link is wrong. +Solution: Update the URL. (Sergey Khorev) +Files: runtime/doc/if_cscop.txt + + +*** ../vim-7.2.245/runtime/doc/if_cscop.txt 2009-07-09 21:22:36.000000000 +0200 +--- runtime/doc/if_cscop.txt 2009-09-11 11:19:31.000000000 +0200 +*************** +*** 481,487 **** + any problems, suggestions, patches, et al., you have for the usage of + cscope within Vim to him. + *cscope-win32* +! For a cscope version for Win32 see: http://iamphet.nm.ru/cscope/index.html + + Win32 support was added by Sergey Khorev . Contact + him if you have Win32-specific issues. +--- 481,488 ---- + any problems, suggestions, patches, et al., you have for the usage of + cscope within Vim to him. + *cscope-win32* +! For a cscope version for Win32 see: +! http://code.google.com/p/cscope-win32/ + + Win32 support was added by Sergey Khorev . Contact + him if you have Win32-specific issues. +*** ../vim-7.2.245/src/version.c 2009-07-29 18:24:59.000000000 +0200 +--- src/version.c 2009-09-11 11:29:02.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 246, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +221. Your wife melts your keyboard in the oven. + + /// 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/gvim/vim-7.2/7.2.247 b/gvim/vim-7.2/7.2.247 new file mode 100644 index 0000000..e18926d --- /dev/null +++ b/gvim/vim-7.2/7.2.247 @@ -0,0 +1,86 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.247 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.247 +Problem: Mzscheme interface minor problem. +Solution: Better error message when build fails. (Sergey Khorev) +Files: src/if_mzsch.c + + +*** ../vim-7.2.246/src/if_mzsch.c 2009-07-09 20:06:30.000000000 +0200 +--- src/if_mzsch.c 2009-09-11 11:20:39.000000000 +0200 +*************** +*** 635,642 **** + #endif /* DYNAMIC_MZSCHEME */ + + /* need to put it here for dynamic stuff to work */ +! #ifdef INCLUDE_MZSCHEME_BASE + # include "mzscheme_base.c" + #endif + + /* +--- 635,644 ---- + #endif /* DYNAMIC_MZSCHEME */ + + /* need to put it here for dynamic stuff to work */ +! #if defined(INCLUDE_MZSCHEME_BASE) + # include "mzscheme_base.c" ++ #elif MZSCHEME_VERSION_MAJOR >= 400 ++ # error MzScheme 4.x must include mzscheme_base.c, for MinGW32 you need to define MZSCHEME_GENERATE_BASE=yes + #endif + + /* +*************** +*** 875,888 **** + #ifdef INCLUDE_MZSCHEME_BASE + { + /* +! * versions 4.x do not provide Scheme bindings by defaults + * we need to add them explicitly + */ + Scheme_Object *scheme_base_symbol = NULL; + MZ_GC_DECL_REG(1); + MZ_GC_VAR_IN_REG(0, scheme_base_symbol); + MZ_GC_REG(); +! /* invoke function from generated and included base.c */ + declare_modules(environment); + scheme_base_symbol = scheme_intern_symbol("scheme/base"); + MZ_GC_CHECK(); +--- 877,890 ---- + #ifdef INCLUDE_MZSCHEME_BASE + { + /* +! * versions 4.x do not provide Scheme bindings by default + * we need to add them explicitly + */ + Scheme_Object *scheme_base_symbol = NULL; + MZ_GC_DECL_REG(1); + MZ_GC_VAR_IN_REG(0, scheme_base_symbol); + MZ_GC_REG(); +! /* invoke function from generated and included mzscheme_base.c */ + declare_modules(environment); + scheme_base_symbol = scheme_intern_symbol("scheme/base"); + MZ_GC_CHECK(); +*** ../vim-7.2.246/src/version.c 2009-09-11 11:30:12.000000000 +0200 +--- src/version.c 2009-09-11 11:53:59.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 247, + /**/ + +-- +Your fault: 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/gvim/vim-7.2/7.2.248 b/gvim/vim-7.2/7.2.248 new file mode 100644 index 0000000..2254101 --- /dev/null +++ b/gvim/vim-7.2/7.2.248 @@ -0,0 +1,158 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.248 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.248 (extra) +Problem: Mzscheme interface building minor problems. +Solution: Update Win32 makefiles. (Sergey Khorev) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak + + +*** ../vim-7.2.247/src/Make_cyg.mak 2007-09-30 22:28:48.000000000 +0200 +--- src/Make_cyg.mak 2009-09-11 11:23:23.000000000 +0200 +*************** +*** 212,224 **** + MZSCHEME_VER = 209_000 + endif + + ifeq (yes, $(DYNAMIC_MZSCHEME)) + DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\" + else + ifndef MZSCHEME_DLLS + MZSCHEME_DLLS = $(MZSCHEME) + endif +! EXTRA_LIBS += -L$(MZSCHEME_DLLS) -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER) + endif + endif + +--- 212,245 ---- + MZSCHEME_VER = 209_000 + endif + ++ ifndef MZSCHEME_PRECISE_GC ++ MZSCHEME_PRECISE_GC=no ++ endif ++ ++ # for version 4.x we need to generate byte-code for Scheme base ++ ifndef MZSCHEME_GENERATE_BASE ++ MZSCHEME_GENERATE_BASE=no ++ endif ++ + ifeq (yes, $(DYNAMIC_MZSCHEME)) + DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\" + else + ifndef MZSCHEME_DLLS + MZSCHEME_DLLS = $(MZSCHEME) + endif +! ifeq (yes,$(MZSCHEME_PRECISE_GC)) +! MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER) +! else +! MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER) +! endif +! EXTRA_LIBS += -L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)/lib $(MZSCHEME_LIB) +! endif +! ifeq (yes,$(MZSCHEME_GENERATE_BASE)) +! DEFINES += -DINCLUDE_MZSCHEME_BASE +! MZ_EXTRA_DEP += mzscheme_base.c +! endif +! ifeq (yes,$(MZSCHEME_PRECISE_GC)) +! DEFINES += -DMZ_PRECISE_GC + endif + endif + +*************** +*** 473,478 **** +--- 494,502 ---- + ifdef PERL + -$(DEL) if_perl.c + endif ++ ifdef MZSCHEME ++ -$(DEL) mzscheme_base.c ++ endif + -$(DEL) pathdef.c + $(MAKE) -C xxd -f Make_cyg.mak clean + $(MAKE) -C GvimExt -f Make_ming.mak clean +*************** +*** 523,531 **** +--- 547,561 ---- + $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_DEP) + $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o + ++ $(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP) ++ $(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o ++ + $(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h + $(RC) $(RCFLAGS) vim.rc -o $(OUTDIR)/vimrc.o + ++ mzscheme_base.c: ++ $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base ++ + pathdef.c: $(INCL) + ifneq (sh.exe, $(SHELL)) + @echo creating pathdef.c +*** ../vim-7.2.247/src/Make_ming.mak 2009-05-26 22:58:43.000000000 +0200 +--- src/Make_ming.mak 2009-09-11 11:23:28.000000000 +0200 +*************** +*** 135,141 **** + ifndef MZSCHEME_DLLS + MZSCHEME_DLLS=$(MZSCHEME) + endif +! MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) + endif + + endif +--- 135,141 ---- + ifndef MZSCHEME_DLLS + MZSCHEME_DLLS=$(MZSCHEME) + endif +! MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib + endif + + endif +*************** +*** 563,568 **** +--- 563,571 ---- + ifdef PERL + -$(DEL) if_perl.c + endif ++ ifdef MZSCHEME ++ -$(DEL) mzscheme_base.c ++ endif + $(MAKE) -C GvimExt -f Make_ming.mak clean + $(MAKE) -C xxd -f Make_cyg.mak clean + +*** ../vim-7.2.247/src/Make_mvc.mak 2009-06-16 16:45:14.000000000 +0200 +--- src/Make_mvc.mak 2009-09-11 11:23:28.000000000 +0200 +*************** +*** 865,870 **** +--- 865,871 ---- + - if exist dimm_i.c del dimm_i.c + - if exist dimm.tlb del dimm.tlb + - if exist dosinst.exe del dosinst.exe ++ - if exist mzscheme_base.c del mzscheme_base.c + cd xxd + $(MAKE) /NOLOGO -f Make_mvc.mak clean + cd .. +*** ../vim-7.2.247/src/version.c 2009-09-11 12:20:47.000000000 +0200 +--- src/version.c 2009-09-11 12:48:26.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 248, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +222. You send more than 20 personal e-mails a day. + + /// 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/gvim/vim-7.2/7.2.249 b/gvim/vim-7.2/7.2.249 new file mode 100644 index 0000000..33169f7 --- /dev/null +++ b/gvim/vim-7.2/7.2.249 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.249 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.249 +Problem: The script to check .po files can't handle '%' in plural forms. +Solution: Remove "Plural-Forms:" from the checked string. +Files: src/po/check.vim + + +*** ../vim-7.2.248/src/po/check.vim 2008-06-09 14:45:38.000000000 +0200 +--- src/po/check.vim 2009-09-11 12:37:56.000000000 +0200 +*************** +*** 23,28 **** +--- 23,31 ---- + " remove '%', not used for formatting. + let idline = substitute(idline, "'%'", '', 'g') + ++ " remove '%' used for plural forms. ++ let idline = substitute(idline, '\\nPlural-Forms: .\+;\\n', '', '') ++ + " remove everything but % items. + return substitute(idline, '[^%]*\(%[-+ #''.0-9*]*l\=[dsuxXpoc%]\)\=', '\1', 'g') + endfunc +*** ../vim-7.2.248/src/version.c 2009-09-11 12:48:56.000000000 +0200 +--- src/version.c 2009-09-11 12:59:18.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 249, + /**/ + +-- +If evolution theories are correct, humans will soon grow a third +hand for operating the mouse. + + /// 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/gvim/vim-7.2/7.2.250 b/gvim/vim-7.2/7.2.250 new file mode 100644 index 0000000..2f30a24 --- /dev/null +++ b/gvim/vim-7.2/7.2.250 @@ -0,0 +1,55 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.250 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.250 (extra) +Problem: Possible buffer overflow. +Solution: Compute the remaining space. (Dominique Pelle) +Files: src/GvimExt/gvimext.cpp + + +*** ../vim-7.2.249/src/GvimExt/gvimext.cpp 2008-07-24 20:51:11.000000000 +0200 +--- src/GvimExt/gvimext.cpp 2009-09-11 13:26:27.000000000 +0200 +*************** +*** 635,641 **** + } + // Now concatenate + strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1); +! strncat(temp, title, BUFSIZE - 1); + InsertMenu(hMenu, + indexMenu++, + MF_STRING|MF_BYPOSITION, +--- 635,643 ---- + } + // Now concatenate + strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1); +! temp[BUFSIZE - 1] = '\0'; +! strncat(temp, title, BUFSIZE - 1 - strlen(temp)); +! temp[BUFSIZE - 1] = '\0'; + InsertMenu(hMenu, + indexMenu++, + MF_STRING|MF_BYPOSITION, +*** ../vim-7.2.249/src/version.c 2009-09-11 12:59:57.000000000 +0200 +--- src/version.c 2009-09-11 13:23:45.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 250, + /**/ + + +-- +hundred-and-one symptoms of being an internet addict: +223. You set up a web-cam as your home's security system. + + /// 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/gvim/vim-7.2/7.2.251 b/gvim/vim-7.2/7.2.251 new file mode 100644 index 0000000..00cf0f0 --- /dev/null +++ b/gvim/vim-7.2/7.2.251 @@ -0,0 +1,71 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.251 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.251 (after 7.2.044) +Problem: Compiler adds invalid memory bounds check. +Solution: Remove _FORTIFY_SOURCE=2 from CFLAGS. (Dominique Pelle) +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.2.250/src/auto/configure 2009-07-22 11:16:54.000000000 +0200 +--- src/auto/configure 2009-08-07 14:49:52.000000000 +0200 +*************** +*** 17135,17141 **** + { $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 +--- 17135,17141 ---- + { $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=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'` + { $as_echo "$as_me:$LINENO: result: yes" >&5 + $as_echo "yes" >&6; } + else +*** ../vim-7.2.250/src/configure.in 2009-07-22 11:16:54.000000000 +0200 +--- src/configure.in 2009-08-07 14:49:47.000000000 +0200 +*************** +*** 3233,3239 **** + 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) +--- 3233,3239 ---- + 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=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'` + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) +*** ../vim-7.2.250/src/version.c 2009-09-11 13:26:38.000000000 +0200 +--- src/version.c 2009-09-11 13:43:46.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 251, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +225. You sign up for free subscriptions for all the computer magazines + + /// 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/gvim/vim-7.2/7.2.252 b/gvim/vim-7.2/7.2.252 new file mode 100644 index 0000000..b7dc702 --- /dev/null +++ b/gvim/vim-7.2/7.2.252 @@ -0,0 +1,51 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.252 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.252 +Problem: When using a multi-byte 'enc' the 'iskeyword' option cannot + contain characters above 128. +Solution: Use mb_ptr2char_adv(). +Files: src/charset.c + + +*** ../vim-7.2.251/src/charset.c 2009-05-14 22:19:19.000000000 +0200 +--- src/charset.c 2009-09-09 21:11:46.000000000 +0200 +*************** +*** 174,179 **** +--- 174,184 ---- + if (VIM_ISDIGIT(*p)) + c = getdigits(&p); + else ++ #ifdef FEAT_MBYTE ++ if (has_mbyte) ++ c = mb_ptr2char_adv(&p); ++ else ++ #endif + c = *p++; + c2 = -1; + if (*p == '-' && p[1] != NUL) +*** ../vim-7.2.251/src/version.c 2009-09-11 13:44:33.000000000 +0200 +--- src/version.c 2009-09-11 14:01:48.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 252, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +226. You sit down at the computer right after dinner and your spouse + says "See you in the morning." + + /// 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/gvim/vim-7.2/7.2.253 b/gvim/vim-7.2/7.2.253 new file mode 100644 index 0000000..354d444 --- /dev/null +++ b/gvim/vim-7.2/7.2.253 @@ -0,0 +1,143 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.253 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.253 +Problem: Netbeans interface: getLength always uses current buffer. +Solution: Use ml_get_buf() instead of ml_get(). (Xavier de Gaye) +Files: src/netbeans.c + + +*** ../vim-7.2.252/src/netbeans.c 2009-06-24 16:49:50.000000000 +0200 +--- src/netbeans.c 2009-09-11 13:40:14.000000000 +0200 +*************** +*** 1499,1505 **** + return FAIL; + } + first = *pos; +! nbdebug((" FIRST POS: line %d, col %d\n", first.lnum, first.col)); + pos = off2pos(buf->bufp, off+count-1); + if (!pos) + { +--- 1499,1506 ---- + return FAIL; + } + first = *pos; +! nbdebug((" FIRST POS: line %d, col %d\n", +! first.lnum, first.col)); + pos = off2pos(buf->bufp, off+count-1); + if (!pos) + { +*************** +*** 1510,1516 **** + return FAIL; + } + last = *pos; +! nbdebug((" LAST POS: line %d, col %d\n", last.lnum, last.col)); + del_from_lnum = first.lnum; + del_to_lnum = last.lnum; + doupdate = 1; +--- 1511,1518 ---- + return FAIL; + } + last = *pos; +! nbdebug((" LAST POS: line %d, col %d\n", +! last.lnum, last.col)); + del_from_lnum = first.lnum; + del_to_lnum = last.lnum; + doupdate = 1; +*************** +*** 1521,1527 **** + next = off2pos(buf->bufp, off + count); + + /* Remove part of the first line. */ +! if (first.col != 0 || (next != NULL && first.lnum == next->lnum)) + { + if (first.lnum != last.lnum + || (next != NULL && first.lnum != next->lnum)) +--- 1523,1530 ---- + next = off2pos(buf->bufp, off + count); + + /* Remove part of the first line. */ +! if (first.col != 0 +! || (next != NULL && first.lnum == next->lnum)) + { + if (first.lnum != last.lnum + || (next != NULL && first.lnum != next->lnum)) +*************** +*** 1584,1590 **** + int id = buf_findsign_id(buf->bufp, (linenr_T)i); + if (id > 0) + { +! nbdebug((" Deleting sign %d on line %d\n", id, i)); + buf_delsign(buf->bufp, id); + } + else +--- 1587,1594 ---- + int id = buf_findsign_id(buf->bufp, (linenr_T)i); + if (id > 0) + { +! nbdebug((" Deleting sign %d on line %d\n", +! id, i)); + buf_delsign(buf->bufp, id); + } + else +*************** +*** 1593,1599 **** + } + } + +! nbdebug((" Deleting lines %d through %d\n", del_from_lnum, del_to_lnum)); + curwin->w_cursor.lnum = del_from_lnum; + curwin->w_cursor.col = 0; + del_lines(del_to_lnum - del_from_lnum + 1, FALSE); +--- 1597,1604 ---- + } + } + +! nbdebug((" Deleting lines %d through %d\n", +! del_from_lnum, del_to_lnum)); + curwin->w_cursor.lnum = del_from_lnum; + curwin->w_cursor.col = 0; + del_lines(del_to_lnum - del_from_lnum + 1, FALSE); +*************** +*** 3514,3520 **** + eol_size = 1; + for (lnum = 1; lnum <= bufp->b_ml.ml_line_count; ++lnum) + { +! char_count += (long)STRLEN(ml_get(lnum)) + eol_size; + /* Check for a CTRL-C every 100000 characters */ + if (char_count > last_check) + { +--- 3519,3526 ---- + eol_size = 1; + for (lnum = 1; lnum <= bufp->b_ml.ml_line_count; ++lnum) + { +! char_count += (long)STRLEN(ml_get_buf(bufp, lnum, FALSE)) +! + eol_size; + /* Check for a CTRL-C every 100000 characters */ + if (char_count > last_check) + { +*** ../vim-7.2.252/src/version.c 2009-09-11 14:02:25.000000000 +0200 +--- src/version.c 2009-09-11 14:18:45.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 253, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +227. You sleep next to your monitor. Or on top of it. + + /// 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/gvim/vim-7.2/7.2.254 b/gvim/vim-7.2/7.2.254 new file mode 100644 index 0000000..c8c57af --- /dev/null +++ b/gvim/vim-7.2/7.2.254 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.254 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.254 +Problem: Compiler warning for assigning size_t to int. +Solution: Use size_t for the variable. (George Reilly) +Files: src/fileio.c + + +*** ../vim-7.2.253/src/fileio.c 2009-07-29 18:24:59.000000000 +0200 +--- src/fileio.c 2009-09-11 13:46:19.000000000 +0200 +*************** +*** 4568,4574 **** + c = TRUE; + if (write_info.bw_conv_error_lnum != 0) + { +! int l = STRLEN(IObuff); + vim_snprintf((char *)IObuff + l, IOSIZE - l, _(" in line %ld;"), + (long)write_info.bw_conv_error_lnum); + } +--- 4568,4574 ---- + c = TRUE; + if (write_info.bw_conv_error_lnum != 0) + { +! size_t l = STRLEN(IObuff); + vim_snprintf((char *)IObuff + l, IOSIZE - l, _(" in line %ld;"), + (long)write_info.bw_conv_error_lnum); + } +*** ../vim-7.2.253/src/version.c 2009-09-11 14:19:41.000000000 +0200 +--- src/version.c 2009-09-11 15:03:42.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 254, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +230. You spend your Friday nights typing away at your keyboard + + /// 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/gvim/vim-7.2/7.2.255 b/gvim/vim-7.2/7.2.255 new file mode 100644 index 0000000..1bb85b1 --- /dev/null +++ b/gvim/vim-7.2/7.2.255 @@ -0,0 +1,71 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.255 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.255 (after 7.2.242) +Problem: Setting 'rightleft', 'linebreak' and 'wrap' may cause cursor to be + in wrong place. +Solution: Recompute the cursor column for these options. +Files: src/option.c + + +*** ../vim-7.2.254/src/option.c 2009-07-29 15:41:32.000000000 +0200 +--- src/option.c 2009-09-11 13:59:55.000000000 +0200 +*************** +*** 7430,7435 **** +--- 7430,7437 ---- + { + if (curwin->w_p_wrap) + curwin->w_leftcol = 0; ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; + } + + #ifdef FEAT_WINDOWS +*************** +*** 7664,7669 **** +--- 7666,7687 ---- + } + #endif + ++ #ifdef FEAT_LINEBREAK ++ if ((int *)varp == &curwin->w_p_lbr) ++ { ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; ++ } ++ #endif ++ ++ #ifdef FEAT_RIGHTLEFT ++ if ((int *)varp == &curwin->w_p_rl) ++ { ++ if (curwin->w_curswant != MAXCOL) ++ curwin->w_set_curswant = TRUE; ++ } ++ #endif ++ + /* + * End of handling side effects for bool options. + */ +*** ../vim-7.2.254/src/version.c 2009-09-11 15:04:13.000000000 +0200 +--- src/version.c 2009-09-11 15:19:40.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 255, + /**/ + +-- +A computer without Windows is like a fish without a bicycle. + + /// 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/gvim/vim-7.2/7.2.256 b/gvim/vim-7.2/7.2.256 new file mode 100644 index 0000000..17361fb --- /dev/null +++ b/gvim/vim-7.2/7.2.256 @@ -0,0 +1,59 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.256 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.256 +Problem: When 'guifont' was not set GTK font dialog doesn't have a default. + (Andreas Metzler) +Solution: Set default to DEFAULT_FONT. (James Vega) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.2.255/src/gui_gtk_x11.c 2009-07-01 18:04:30.000000000 +0200 +--- src/gui_gtk_x11.c 2009-09-11 14:21:32.000000000 +0200 +*************** +*** 4729,4734 **** +--- 4729,4737 ---- + if (oldval != NULL && *oldval != NUL) + gtk_font_selection_dialog_set_font_name( + GTK_FONT_SELECTION_DIALOG(gui.fontdlg), (char *)oldval); ++ else ++ gtk_font_selection_dialog_set_font_name( ++ GTK_FONT_SELECTION_DIALOG(gui.fontdlg), DEFAULT_FONT); + + if (gui.fontname) + { +*************** +*** 4816,4821 **** +--- 4819,4827 ---- + if (oldname != oldval) + vim_free(oldname); + } ++ else ++ gtk_font_selection_dialog_set_font_name( ++ GTK_FONT_SELECTION_DIALOG(dialog), DEFAULT_FONT); + + response = gtk_dialog_run(GTK_DIALOG(dialog)); + +*** ../vim-7.2.255/src/version.c 2009-09-11 15:20:22.000000000 +0200 +--- src/version.c 2009-09-11 15:45:36.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 256, + /**/ + +-- +Get a life? What is the URL where it can be downloaded? + + /// 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/gvim/vim-7.2/7.2.257 b/gvim/vim-7.2/7.2.257 new file mode 100644 index 0000000..a856a3a --- /dev/null +++ b/gvim/vim-7.2/7.2.257 @@ -0,0 +1,61 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.257 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.257 +Problem: With GTK 2.17 lots of assertion error messages. +Solution: Remove check for static gravity. (Sebastian Droege) +Files: src/gui_gtk_f.c + + +*** ../vim-7.2.256/src/gui_gtk_f.c 2009-05-17 23:25:16.000000000 +0200 +--- src/gui_gtk_f.c 2009-09-11 15:15:41.000000000 +0200 +*************** +*** 860,870 **** + gtk_form_set_static_gravity(GdkWindow *window, gboolean use_static) + { + #ifdef HAVE_GTK2 +! gboolean static_gravity_supported; +! +! static_gravity_supported = gdk_window_set_static_gravities(window, +! use_static); +! g_return_if_fail(static_gravity_supported); + #else + XSetWindowAttributes xattributes; + +--- 860,868 ---- + gtk_form_set_static_gravity(GdkWindow *window, gboolean use_static) + { + #ifdef HAVE_GTK2 +! /* We don't check if static gravity is actually supported, because it +! * results in an annoying assertion error message. */ +! gdk_window_set_static_gravities(window, use_static); + #else + XSetWindowAttributes xattributes; + +*** ../vim-7.2.256/src/version.c 2009-09-11 15:46:20.000000000 +0200 +--- src/version.c 2009-09-11 16:16:52.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 257, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner + in the front doorway permanently so it always looks like you are + actually attempting to do something about that mess that has amassed + since you discovered the Internet. + + /// 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/gvim/vim-7.2/7.2.258 b/gvim/vim-7.2/7.2.258 new file mode 100644 index 0000000..98ddab5 --- /dev/null +++ b/gvim/vim-7.2/7.2.258 @@ -0,0 +1,74 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.258 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.258 +Problem: v:beval_col and b:beval_text are wrong in UTF-8 text. (Tony + Mechelynck) +Solution: Use byte number instead of character number for the column. +Files: src/ui.c + + +*** ../vim-7.2.257/src/ui.c 2009-07-01 18:04:30.000000000 +0200 +--- src/ui.c 2009-09-11 16:11:50.000000000 +0200 +*************** +*** 3055,3072 **** + int vcol; + { + /* try to advance to the specified column */ +- int col = 0; + int count = 0; + char_u *ptr; + +! ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); + while (count <= vcol && *ptr != NUL) + { +- ++col; + count += win_lbr_chartabsize(wp, ptr, count, NULL); + mb_ptr_adv(ptr); + } +! return col; + } + #endif + +--- 3055,3071 ---- + int vcol; + { + /* try to advance to the specified column */ + int count = 0; + char_u *ptr; ++ char_u *start; + +! start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); + while (count <= vcol && *ptr != NUL) + { + count += win_lbr_chartabsize(wp, ptr, count, NULL); + mb_ptr_adv(ptr); + } +! return (int)(ptr - start); + } + #endif + +*** ../vim-7.2.257/src/version.c 2009-09-11 16:17:36.000000000 +0200 +--- src/version.c 2009-09-11 16:45:48.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 258, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +232. You start conversations with, "Have you gotten an ISDN line?" + + /// 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/gvim/vim-7.2/7.2.259 b/gvim/vim-7.2/7.2.259 new file mode 100644 index 0000000..0bf0ba1 --- /dev/null +++ b/gvim/vim-7.2/7.2.259 @@ -0,0 +1,160 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.259 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.259 +Problem: exists() doesn't work properly for an empty aucmd group. +Solution: Change how au_exists() handles a missing pattern. Also add a + test for this. (Bob Hiestand) +Files: src/fileio.c, src/testdir/Makefile, src/testdir/test67.in, + src/testdir/test67.ok + + +*** ../vim-7.2.258/src/fileio.c 2009-09-11 15:04:13.000000000 +0200 +--- src/fileio.c 2009-09-11 16:37:08.000000000 +0200 +*************** +*** 9498,9512 **** + ap = first_autopat[(int)event]; + if (ap == NULL) + goto theend; +- if (pattern == NULL) +- { +- retval = TRUE; +- goto theend; +- } + + /* if pattern is "", special handling is needed which uses curbuf */ + /* for pattern ", fnamecmp() will work fine */ +! if (STRICMP(pattern, "") == 0) + buflocal_buf = curbuf; + + /* Check if there is an autocommand with the given pattern. */ +--- 9498,9507 ---- + ap = first_autopat[(int)event]; + if (ap == NULL) + goto theend; + + /* if pattern is "", special handling is needed which uses curbuf */ + /* for pattern ", fnamecmp() will work fine */ +! if (pattern != NULL && STRICMP(pattern, "") == 0) + buflocal_buf = curbuf; + + /* Check if there is an autocommand with the given pattern. */ +*************** +*** 9515,9523 **** + /* For buffer-local autocommands, fnamecmp() works fine. */ + if (ap->pat != NULL && ap->cmds != NULL + && (group == AUGROUP_ALL || ap->group == group) +! && (buflocal_buf == NULL +! ? fnamecmp(ap->pat, pattern) == 0 +! : ap->buflocal_nr == buflocal_buf->b_fnum)) + { + retval = TRUE; + break; +--- 9510,9519 ---- + /* For buffer-local autocommands, fnamecmp() works fine. */ + if (ap->pat != NULL && ap->cmds != NULL + && (group == AUGROUP_ALL || ap->group == group) +! && (pattern == NULL +! || (buflocal_buf == NULL +! ? fnamecmp(ap->pat, pattern) == 0 +! : ap->buflocal_nr == buflocal_buf->b_fnum))) + { + retval = TRUE; + break; +*** ../vim-7.2.258/src/testdir/Makefile 2009-06-24 18:07:55.000000000 +0200 +--- src/testdir/Makefile 2009-09-11 16:31:33.000000000 +0200 +*************** +*** 22,28 **** + test48.out test49.out test51.out test52.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 test66.out + + SCRIPTS_GUI = test16.out + +--- 22,28 ---- + test48.out test49.out test51.out test52.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 test66.out test67.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.2.258/src/testdir/test67.in 2009-09-11 17:23:47.000000000 +0200 +--- src/testdir/test67.in 2009-09-11 16:43:11.000000000 +0200 +*************** +*** 0 **** +--- 1,33 ---- ++ Test that groups and patterns are tested correctly when calling exists() for ++ autocommands. ++ ++ STARTTEST ++ :so small.vim ++ :let results=[] ++ :augroup auexists ++ :augroup END ++ :call add(results, "##BufEnter: " . exists("##BufEnter")) ++ :call add(results, "#BufEnter: " . exists("#BufEnter")) ++ :au BufEnter * let g:entered=1 ++ :call add(results, "#BufEnter: " . exists("#BufEnter")) ++ :call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) ++ :augroup auexists ++ :au BufEnter * let g:entered=1 ++ :augroup END ++ :call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) ++ :call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) ++ :au BufEnter *.test let g:entered=1 ++ :call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) ++ :edit testfile.test ++ :call add(results, "#BufEnter#: " . exists("#BufEnter#")) ++ :au BufEnter let g:entered=1 ++ :call add(results, "#BufEnter#: " . exists("#BufEnter#")) ++ :edit testfile2.test ++ :call add(results, "#BufEnter#: " . exists("#BufEnter#")) ++ :e test.out ++ :call append(0, results) ++ :$d ++ :w ++ :qa! ++ ENDTEST ++ +*** ../vim-7.2.258/src/testdir/test67.ok 2009-09-11 17:23:47.000000000 +0200 +--- src/testdir/test67.ok 2009-09-11 16:43:15.000000000 +0200 +*************** +*** 0 **** +--- 1,10 ---- ++ ##BufEnter: 1 ++ #BufEnter: 0 ++ #BufEnter: 1 ++ #auexists#BufEnter: 0 ++ #auexists#BufEnter: 1 ++ #BufEnter#*.test: 0 ++ #BufEnter#*.test: 1 ++ #BufEnter#: 0 ++ #BufEnter#: 1 ++ #BufEnter#: 0 +*** ../vim-7.2.258/src/version.c 2009-09-11 16:48:06.000000000 +0200 +--- src/version.c 2009-09-11 17:23:14.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 259, + /**/ + +-- +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/gvim/vim-7.2/7.2.260 b/gvim/vim-7.2/7.2.260 new file mode 100644 index 0000000..46d4365 --- /dev/null +++ b/gvim/vim-7.2/7.2.260 @@ -0,0 +1,155 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.260 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.260 (extra part of 7.2.259) +Problem: exists() doesn't work properly for empty aucmd group. +Solution: Change how au_exists() handles a missing pattern. Also add a + test for this. (Bob Hiestand) +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms + + +*** ../vim-7.2.259/src/testdir/Make_amiga.mak 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_amiga.mak 2009-09-11 16:29:54.000000000 +0200 +*************** +*** 26,32 **** + 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 \ +! test66.out + + .SUFFIXES: .in .out + +--- 26,32 ---- + 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 \ +! test66.out test67.out + + .SUFFIXES: .in .out + +*************** +*** 112,114 **** +--- 112,115 ---- + test64.out: test64.in + test65.out: test65.in + test66.out: test66.in ++ test67.out: test67.in +*** ../vim-7.2.259/src/testdir/Make_dos.mak 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_dos.mak 2009-09-11 16:30:17.000000000 +0200 +*************** +*** 26,32 **** + 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 test66.out + + SCRIPTS32 = test50.out + +--- 26,32 ---- + 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 test66.out test67.out + + SCRIPTS32 = test50.out + +*** ../vim-7.2.259/src/testdir/Make_ming.mak 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_ming.mak 2009-09-11 16:30:37.000000000 +0200 +*************** +*** 45,51 **** + 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 test66.out + + SCRIPTS32 = test50.out + +--- 45,51 ---- + 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 test66.out test67.out + + SCRIPTS32 = test50.out + +*** ../vim-7.2.259/src/testdir/Make_os2.mak 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_os2.mak 2009-09-11 16:30:52.000000000 +0200 +*************** +*** 26,32 **** + 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 \ +! test66.out + + .SUFFIXES: .in .out + +--- 26,32 ---- + 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 \ +! test66.out test67.out + + .SUFFIXES: .in .out + +*** ../vim-7.2.259/src/testdir/Make_vms.mms 2009-03-11 16:36:04.000000000 +0100 +--- src/testdir/Make_vms.mms 2009-09-11 16:31:06.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2009 Mar 05 + # + # 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. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2009 Sep 11 + # + # 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. +*************** +*** 69,75 **** + 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 \ +! test66.out + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +--- 69,75 ---- + 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 \ +! test66.out test67.out + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +*** ../vim-7.2.259/src/version.c 2009-09-11 17:24:01.000000000 +0200 +--- src/version.c 2009-09-18 14:57:05.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 260, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +251. You've never seen your closest friends who usually live WAY too far away. + + /// 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/gvim/vim-7.2/7.2.261 b/gvim/vim-7.2/7.2.261 new file mode 100644 index 0000000..4f8e72d --- /dev/null +++ b/gvim/vim-7.2/7.2.261 @@ -0,0 +1,83 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.261 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.261 +Problem: When deleting lines with a specific folding configuration E38 may + appear. (Shahaf) +Solution: When adjusting nested folds for deleted lines take into account + that they don't start at the top of the enclosing fold. +Files: src/fold.c + + +*** ../vim-7.2.260/src/fold.c 2009-01-06 15:01:58.000000000 +0100 +--- src/fold.c 2009-09-18 14:43:23.000000000 +0200 +*************** +*** 1607,1617 **** + } + else + { +- /* 2, 3, or 5: need to correct nested folds too */ +- foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top, +- line2 - fp->fd_top, amount, amount_after); + if (fp->fd_top < top) + { + if (last <= line2) + { + /* 2. fold contains line1, line2 is below fold */ +--- 1607,1617 ---- + } + else + { + if (fp->fd_top < top) + { ++ /* 2 or 3: need to correct nested folds too */ ++ foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top, ++ line2 - fp->fd_top, amount, amount_after); + if (last <= line2) + { + /* 2. fold contains line1, line2 is below fold */ +*************** +*** 1628,1634 **** + } + else + { +! /* 5. fold is below line1 and contains line2 */ + if (amount == MAXLNUM) + { + fp->fd_len -= line2 - fp->fd_top + 1; +--- 1628,1638 ---- + } + else + { +! /* 5. fold is below line1 and contains line2; need to +! * correct nested folds too */ +! foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top, +! line2 - fp->fd_top, amount, +! amount_after + (fp->fd_top - top)); + if (amount == MAXLNUM) + { + fp->fd_len -= line2 - fp->fd_top + 1; +*** ../vim-7.2.260/src/version.c 2009-09-18 14:58:26.000000000 +0200 +--- src/version.c 2009-09-18 15:14:40.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 261, + /**/ + +-- +Emacs is a nice OS - but it lacks a good text editor. +That's why I am using Vim. --Anonymous + + /// 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/gvim/vim-7.2/7.2.262 b/gvim/vim-7.2/7.2.262 new file mode 100644 index 0000000..dc73c07 --- /dev/null +++ b/gvim/vim-7.2/7.2.262 @@ -0,0 +1,189 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.262 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.262 +Problem: When using custom completion for a user command the pattern string + goes beyond the cursor position. (Hari Krishna Dara) +Solution: Truncate the string at the cursor position. +Files: src/ex_getln.c, src/structs.h + + +*** ../vim-7.2.261/src/ex_getln.c 2009-06-24 17:04:40.000000000 +0200 +--- src/ex_getln.c 2009-09-18 16:58:16.000000000 +0200 +*************** +*** 3266,3272 **** + int i, j; + char_u *p1; + char_u *p2; +- int oldlen; + int difflen; + int v; + +--- 3266,3271 ---- +*************** +*** 3291,3297 **** + out_flush(); + + i = (int)(xp->xp_pattern - ccline.cmdbuff); +! oldlen = ccline.cmdpos - i; + + if (type == WILD_NEXT || type == WILD_PREV) + { +--- 3290,3296 ---- + out_flush(); + + i = (int)(xp->xp_pattern - ccline.cmdbuff); +! xp->xp_pattern_len = ccline.cmdpos - i; + + if (type == WILD_NEXT || type == WILD_PREV) + { +*************** +*** 3305,3322 **** + /* + * Translate string into pattern and expand it. + */ +! if ((p1 = addstar(&ccline.cmdbuff[i], oldlen, xp->xp_context)) == NULL) + p2 = NULL; + else + { +! p2 = ExpandOne(xp, p1, vim_strnsave(&ccline.cmdbuff[i], oldlen), + WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE + |options, type); + vim_free(p1); + /* longest match: make sure it is not shorter (happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) + { +! for (j = 0; j < oldlen; ++j) + if (ccline.cmdbuff[i + j] == '*' + || ccline.cmdbuff[i + j] == '?') + break; +--- 3304,3323 ---- + /* + * Translate string into pattern and expand it. + */ +! if ((p1 = addstar(xp->xp_pattern, xp->xp_pattern_len, +! xp->xp_context)) == NULL) + p2 = NULL; + else + { +! p2 = ExpandOne(xp, p1, +! vim_strnsave(&ccline.cmdbuff[i], xp->xp_pattern_len), + WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE + |options, type); + vim_free(p1); + /* longest match: make sure it is not shorter (happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) + { +! for (j = 0; j < xp->xp_pattern_len; ++j) + if (ccline.cmdbuff[i + j] == '*' + || ccline.cmdbuff[i + j] == '?') + break; +*************** +*** 3331,3337 **** + + if (p2 != NULL && !got_int) + { +! difflen = (int)STRLEN(p2) - oldlen; + if (ccline.cmdlen + difflen > ccline.cmdbufflen - 4) + { + v = realloc_cmdbuff(ccline.cmdlen + difflen); +--- 3332,3338 ---- + + if (p2 != NULL && !got_int) + { +! difflen = (int)STRLEN(p2) - xp->xp_pattern_len; + if (ccline.cmdlen + difflen > ccline.cmdbufflen - 4) + { + v = realloc_cmdbuff(ccline.cmdlen + difflen); +*************** +*** 3620,3625 **** +--- 3621,3627 ---- + expand_T *xp; + { + xp->xp_pattern = NULL; ++ xp->xp_pattern_len = 0; + xp->xp_backslash = XP_BS_NONE; + #ifndef BACKSLASH_IN_FILENAME + xp->xp_shell = FALSE; +*************** +*** 4311,4318 **** + } + + /* add star to file name, or convert to regexp if not exp. files. */ +! file_str = addstar(xp->xp_pattern, +! (int)(str + col - xp->xp_pattern), xp->xp_context); + if (file_str == NULL) + return EXPAND_UNSUCCESSFUL; + +--- 4313,4320 ---- + } + + /* add star to file name, or convert to regexp if not exp. files. */ +! xp->xp_pattern_len = (int)(str + col - xp->xp_pattern); +! file_str = addstar(xp->xp_pattern, xp->xp_pattern_len, xp->xp_context); + if (file_str == NULL) + return EXPAND_UNSUCCESSFUL; + +*************** +*** 4781,4787 **** + sprintf((char *)num, "%d", ccline.cmdpos); + args[1] = ccline.cmdbuff; + } +! args[0] = xp->xp_pattern; + args[2] = num; + + /* Save the cmdline, we don't know what the function may do. */ +--- 4783,4789 ---- + sprintf((char *)num, "%d", ccline.cmdpos); + args[1] = ccline.cmdbuff; + } +! args[0] = vim_strnsave(xp->xp_pattern, xp->xp_pattern_len); + args[2] = num; + + /* Save the cmdline, we don't know what the function may do. */ +*************** +*** 4797,4802 **** +--- 4799,4805 ---- + if (ccline.cmdbuff != NULL) + ccline.cmdbuff[ccline.cmdlen] = keep; + ++ vim_free(args[0]); + return ret; + } + +*** ../vim-7.2.261/src/structs.h 2009-07-29 12:09:49.000000000 +0200 +--- src/structs.h 2009-09-18 15:33:15.000000000 +0200 +*************** +*** 432,437 **** +--- 432,438 ---- + { + int xp_context; /* type of expansion */ + char_u *xp_pattern; /* start of item to expand */ ++ int xp_pattern_len; /* bytes in xp_pattern before cursor */ + #if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL) + char_u *xp_arg; /* completion function */ + int xp_scriptID; /* SID for completion function */ +*** ../vim-7.2.261/src/version.c 2009-09-18 15:16:37.000000000 +0200 +--- src/version.c 2009-09-18 17:23:20.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 262, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +252. You vote for foreign officials. + + /// 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/gvim/vim-7.2/7.2.263 b/gvim/vim-7.2/7.2.263 new file mode 100644 index 0000000..fdbfa40 --- /dev/null +++ b/gvim/vim-7.2/7.2.263 @@ -0,0 +1,87 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.263 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.263 +Problem: GTK2: when using the -geom argument with an offset from the right + edge and the size is smaller than the default, the Vim window is + not positioned properly. +Solution: Use another function to set the size. (Vitaly Minko) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.2.262/src/gui_gtk_x11.c 2009-09-11 15:46:20.000000000 +0200 +--- src/gui_gtk_x11.c 2009-09-23 15:43:52.000000000 +0200 +*************** +*** 4066,4071 **** +--- 4066,4073 ---- + { + guicolor_T fg_pixel = INVALCOLOR; + guicolor_T bg_pixel = INVALCOLOR; ++ guint pixel_width; ++ guint pixel_height; + + #ifdef HAVE_GTK2 + /* +*************** +*** 4106,4113 **** + unsigned int w, h; + int x = 0; + int y = 0; +- guint pixel_width; +- guint pixel_height; + + mask = XParseGeometry((char *)gui.geom, &x, &y, &w, &h); + +--- 4108,4113 ---- +*************** +*** 4160,4168 **** + } + } + +! gtk_form_set_size(GTK_FORM(gui.formwin), +! (guint)(gui_get_base_width() + Columns * gui.char_width), +! (guint)(gui_get_base_height() + Rows * gui.char_height)); + update_window_manager_hints(0, 0); + + if (foreground_argument != NULL) +--- 4160,4175 ---- + } + } + +! pixel_width = (guint)(gui_get_base_width() + Columns * gui.char_width); +! pixel_height = (guint)(gui_get_base_height() + Rows * gui.char_height); +! #ifdef HAVE_GTK2 +! /* For GTK2 changing the size of the form widget doesn't cause window +! * resizing. */ +! if (gtk_socket_id == 0) +! gtk_window_resize(GTK_WINDOW(gui.mainwin), pixel_width, pixel_height); +! #else +! gtk_form_set_size(GTK_FORM(gui.formwin), pixel_width, pixel_height); +! #endif + update_window_manager_hints(0, 0); + + if (foreground_argument != NULL) +*** ../vim-7.2.262/src/version.c 2009-09-18 17:24:54.000000000 +0200 +--- src/version.c 2009-09-23 17:34:08.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 263, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +267. You get an extra phone line so you can get phone calls. + + /// 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/gvim/vim-7.2/7.2.264 b/gvim/vim-7.2/7.2.264 new file mode 100644 index 0000000..808f291 --- /dev/null +++ b/gvim/vim-7.2/7.2.264 @@ -0,0 +1,168 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.264 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.264 +Problem: GTK2: When the Vim window is maximized setting 'columns' or + 'lines' doesn't work. +Solution: Unmaximize the window before setting the size. (Vitaly Minko) +Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro + + +*** ../vim-7.2.263/src/gui.c 2009-07-29 11:10:31.000000000 +0200 +--- src/gui.c 2009-09-23 16:28:09.000000000 +0200 +*************** +*** 1386,1391 **** +--- 1386,1395 ---- + int min_height; + int screen_w; + int screen_h; ++ #ifdef HAVE_GTK2 ++ int un_maximize = mustset; ++ int did_adjust = 0; ++ #endif + + if (!gui.shell_created) + return; +*************** +*** 1425,1446 **** + if (Columns < MIN_COLUMNS) + Columns = MIN_COLUMNS; + width = Columns * gui.char_width + base_width; + } + if ((direction & RESIZE_VERT) && height > screen_h) + { + Rows = (screen_h - base_height) / gui.char_height; + check_shellsize(); + height = Rows * gui.char_height + base_height; + } + } + gui.num_cols = Columns; + gui.num_rows = Rows; + + min_width = base_width + MIN_COLUMNS * gui.char_width; + min_height = base_height + MIN_LINES * gui.char_height; +! # ifdef FEAT_WINDOWS + min_height += tabline_height() * gui.char_height; +! # endif + + gui_mch_set_shellsize(width, height, min_width, min_height, + base_width, base_height, direction); +--- 1429,1475 ---- + if (Columns < MIN_COLUMNS) + Columns = MIN_COLUMNS; + width = Columns * gui.char_width + base_width; ++ #ifdef HAVE_GTK2 ++ ++did_adjust; ++ #endif + } + if ((direction & RESIZE_VERT) && height > screen_h) + { + Rows = (screen_h - base_height) / gui.char_height; + check_shellsize(); + height = Rows * gui.char_height + base_height; ++ #ifdef HAVE_GTK2 ++ ++did_adjust; ++ #endif + } ++ #ifdef HAVE_GTK2 ++ if (did_adjust == 2 || (width + gui.char_width >= screen_w ++ && height + gui.char_height >= screen_h)) ++ /* don't unmaximize if at maximum size */ ++ un_maximize = FALSE; ++ #endif + } + gui.num_cols = Columns; + gui.num_rows = Rows; + + min_width = base_width + MIN_COLUMNS * gui.char_width; + min_height = base_height + MIN_LINES * gui.char_height; +! #ifdef FEAT_WINDOWS + min_height += tabline_height() * gui.char_height; +! #endif +! +! #ifdef HAVE_GTK2 +! if (un_maximize) +! { +! /* If the window size is smaller than the screen unmaximize the +! * window, otherwise resizing won't work. */ +! gui_mch_get_screen_dimensions(&screen_w, &screen_h); +! if ((width + gui.char_width < screen_w +! || height + gui.char_height * 2 < screen_h) +! && gui_mch_maximized()) +! gui_mch_unmaximize(); +! } +! #endif + + gui_mch_set_shellsize(width, height, min_width, min_height, + base_width, base_height, direction); +*** ../vim-7.2.263/src/gui_gtk_x11.c 2009-09-23 17:35:17.000000000 +0200 +--- src/gui_gtk_x11.c 2009-09-23 15:43:52.000000000 +0200 +*************** +*** 4376,4381 **** +--- 4376,4404 ---- + #endif + #endif /* HAVE_GTK2 */ + ++ #if defined(HAVE_GTK2) || defined(PROTO) ++ /* ++ * Return TRUE if the main window is maximized. ++ */ ++ int ++ gui_mch_maximized() ++ { ++ return (gui.mainwin != NULL && gui.mainwin->window != NULL ++ && (gdk_window_get_state(gui.mainwin->window) ++ & GDK_WINDOW_STATE_MAXIMIZED)); ++ } ++ ++ /* ++ * Unmaximize the main window ++ */ ++ void ++ gui_mch_unmaximize() ++ { ++ if (gui.mainwin != NULL) ++ gtk_window_unmaximize(GTK_WINDOW(gui.mainwin)); ++ } ++ #endif ++ + /* + * Set the windows size. + */ +*** ../vim-7.2.263/src/proto/gui_gtk_x11.pro 2007-05-05 19:18:54.000000000 +0200 +--- src/proto/gui_gtk_x11.pro 2009-09-23 15:43:45.000000000 +0200 +*************** +*** 16,21 **** +--- 16,23 ---- + void gui_mch_exit __ARGS((int rc)); + int gui_mch_get_winpos __ARGS((int *x, int *y)); + void gui_mch_set_winpos __ARGS((int x, int y)); ++ int gui_mch_maximized __ARGS((void)); ++ void gui_mch_unmaximize __ARGS((void)); + void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); + void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h)); + void gui_mch_settitle __ARGS((char_u *title, char_u *icon)); +*** ../vim-7.2.263/src/version.c 2009-09-23 17:35:17.000000000 +0200 +--- src/version.c 2009-09-23 18:12:21.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 264, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +268. You get up in the morning and go online before getting your 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/gvim/vim-7.2/7.2.265 b/gvim/vim-7.2/7.2.265 new file mode 100644 index 0000000..4685150 --- /dev/null +++ b/gvim/vim-7.2/7.2.265 @@ -0,0 +1,56 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.265 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.265 +Problem: When using ":silent broken" inside try/catch silency may persist. + (dr-dr xp) +Solution: Set msg_silent when there is an error and it's bigger than the + saved value. +Files: src/ex_docmd.c + + +*** ../vim-7.2.264/src/ex_docmd.c 2009-07-09 20:13:59.000000000 +0200 +--- src/ex_docmd.c 2009-09-30 11:40:53.000000000 +0200 +*************** +*** 2695,2701 **** + { + /* messages could be enabled for a serious error, need to check if the + * counters don't become negative */ +! if (!did_emsg) + msg_silent = save_msg_silent; + emsg_silent -= did_esilent; + if (emsg_silent < 0) +--- 2695,2701 ---- + { + /* messages could be enabled for a serious error, need to check if the + * counters don't become negative */ +! if (!did_emsg || msg_silent > save_msg_silent) + msg_silent = save_msg_silent; + emsg_silent -= did_esilent; + if (emsg_silent < 0) +*** ../vim-7.2.264/src/version.c 2009-09-23 18:14:13.000000000 +0200 +--- src/version.c 2009-09-30 13:22:47.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 265, + /**/ + +-- +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/gvim/vim-7.2/7.2.266 b/gvim/vim-7.2/7.2.266 new file mode 100644 index 0000000..3a5ba77 --- /dev/null +++ b/gvim/vim-7.2/7.2.266 @@ -0,0 +1,244 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.266 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.266 +Problem: When an expression abbreviation is triggered, the typed character + is unknown. +Solution: Make the typed character available in v:char. +Files: runtime/doc/map.txt, src/eval.c, src/getchar.c, src/ops.c, + src/proto/eval.pro + + +*** ../vim-7.2.265/runtime/doc/map.txt 2008-08-09 19:36:49.000000000 +0200 +--- runtime/doc/map.txt 2009-09-23 19:39:19.000000000 +0200 +*************** +*** 224,229 **** +--- 224,233 ---- + The result of the InsertDot() function will be inserted. It could check the + text before the cursor and start omni completion when some condition is met. + ++ For abbreviations |v:char| is set to the character that was typed to trigger ++ the abbreviation. You can use this to decide how to expand the {lhs}. You ++ can't change v:char and you should not insert it. ++ + Be very careful about side effects! The expression is evaluated while + obtaining characters, you may very well make the command dysfunctional. + For this reason the following is blocked: +*** ../vim-7.2.265/src/eval.c 2009-06-03 14:25:47.000000000 +0200 +--- src/eval.c 2009-09-23 19:36:32.000000000 +0200 +*************** +*** 18101,18106 **** +--- 18101,18131 ---- + } + + /* ++ * Set v:char to character "c". ++ */ ++ void ++ set_vim_var_char(c) ++ int c; ++ { ++ #ifdef FEAT_MBYTE ++ char_u buf[MB_MAXBYTES]; ++ #else ++ char_u buf[2]; ++ #endif ++ ++ #ifdef FEAT_MBYTE ++ if (has_mbyte) ++ buf[(*mb_char2bytes)(c, buf)] = NUL; ++ else ++ #endif ++ { ++ buf[0] = c; ++ buf[1] = NUL; ++ } ++ set_vim_var_string(VV_CHAR, buf, -1); ++ } ++ ++ /* + * Set v:count to "count" and v:count1 to "count1". + * When "set_prevcount" is TRUE first set v:prevcount from v:count. + */ +*** ../vim-7.2.265/src/getchar.c 2009-07-14 13:44:43.000000000 +0200 +--- src/getchar.c 2009-09-23 19:35:54.000000000 +0200 +*************** +*** 129,135 **** + static void validate_maphash __ARGS((void)); + static void showmap __ARGS((mapblock_T *mp, int local)); + #ifdef FEAT_EVAL +! static char_u *eval_map_expr __ARGS((char_u *str)); + #endif + + /* +--- 129,135 ---- + static void validate_maphash __ARGS((void)); + static void showmap __ARGS((mapblock_T *mp, int local)); + #ifdef FEAT_EVAL +! static char_u *eval_map_expr __ARGS((char_u *str, int c)); + #endif + + /* +*************** +*** 2446,2452 **** + if (tabuf.typebuf_valid) + { + vgetc_busy = 0; +! s = eval_map_expr(mp->m_str); + vgetc_busy = save_vgetc_busy; + } + else +--- 2446,2452 ---- + if (tabuf.typebuf_valid) + { + vgetc_busy = 0; +! s = eval_map_expr(mp->m_str, NUL); + vgetc_busy = save_vgetc_busy; + } + else +*************** +*** 4367,4375 **** + * abbreviation, but is not inserted into the input stream. + */ + j = 0; +- /* special key code, split up */ + if (c != Ctrl_RSB) + { + if (IS_SPECIAL(c) || c == K_SPECIAL) + { + tb[j++] = K_SPECIAL; +--- 4367,4375 ---- + * abbreviation, but is not inserted into the input stream. + */ + j = 0; + if (c != Ctrl_RSB) + { ++ /* special key code, split up */ + if (IS_SPECIAL(c) || c == K_SPECIAL) + { + tb[j++] = K_SPECIAL; +*************** +*** 4398,4404 **** + } + #ifdef FEAT_EVAL + if (mp->m_expr) +! s = eval_map_expr(mp->m_str); + else + #endif + s = mp->m_str; +--- 4398,4404 ---- + } + #ifdef FEAT_EVAL + if (mp->m_expr) +! s = eval_map_expr(mp->m_str, c); + else + #endif + s = mp->m_str; +*************** +*** 4434,4441 **** + * special characters. + */ + static char_u * +! eval_map_expr(str) + char_u *str; + { + char_u *res; + char_u *p; +--- 4434,4442 ---- + * special characters. + */ + static char_u * +! eval_map_expr(str, c) + char_u *str; ++ int c; /* NUL or typed character for abbreviation */ + { + char_u *res; + char_u *p; +*************** +*** 4452,4457 **** +--- 4453,4459 ---- + #ifdef FEAT_EX_EXTRA + ++ex_normal_lock; + #endif ++ set_vim_var_char(c); /* set v:char to the typed character */ + save_cursor = curwin->w_cursor; + p = eval_to_string(str, NULL, FALSE); + --textlock; +*** ../vim-7.2.265/src/ops.c 2009-07-01 18:04:30.000000000 +0200 +--- src/ops.c 2009-09-23 19:11:40.000000000 +0200 +*************** +*** 4473,4483 **** + int use_sandbox = was_set_insecurely((char_u *)"formatexpr", + OPT_LOCAL); + int r; +- #ifdef FEAT_MBYTE +- char_u buf[MB_MAXBYTES]; +- #else +- char_u buf[2]; +- #endif + + /* + * Set v:lnum to the first line number and v:count to the number of lines. +--- 4473,4478 ---- +*************** +*** 4485,4501 **** + */ + set_vim_var_nr(VV_LNUM, lnum); + set_vim_var_nr(VV_COUNT, count); +! +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! buf[(*mb_char2bytes)(c, buf)] = NUL; +! else +! #endif +! { +! buf[0] = c; +! buf[1] = NUL; +! } +! set_vim_var_string(VV_CHAR, buf, -1); + + /* + * Evaluate the function. +--- 4480,4486 ---- + */ + set_vim_var_nr(VV_LNUM, lnum); + set_vim_var_nr(VV_COUNT, count); +! set_vim_var_char(c); + + /* + * Evaluate the function. +*** ../vim-7.2.265/src/proto/eval.pro 2008-11-20 16:11:03.000000000 +0100 +--- src/proto/eval.pro 2009-09-23 19:36:30.000000000 +0200 +*************** +*** 61,66 **** +--- 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_vim_var_char __ARGS((int c)); + 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)); +*** ../vim-7.2.265/src/version.c 2009-09-30 13:23:57.000000000 +0200 +--- src/version.c 2009-09-30 15:11:29.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 266, + /**/ + +-- +Life would be so much easier if we could just look at the source code. + + /// 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/gvim/vim-7.2/7.2.267 b/gvim/vim-7.2/7.2.267 new file mode 100644 index 0000000..6df92c9 --- /dev/null +++ b/gvim/vim-7.2/7.2.267 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.267 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.267 +Problem: Crash for narrow window and double-width character. +Solution: Check for zero width. (Taro Muraoka) +Files: src/charset.c + + +*** ../vim-7.2.266/src/charset.c 2009-09-11 14:02:25.000000000 +0200 +--- src/charset.c 2009-10-07 16:17:27.000000000 +0200 +*************** +*** 1218,1223 **** +--- 1218,1225 ---- + if ((int)vcol == width1 - 1) + return TRUE; + width2 = width1 + win_col_off2(wp); ++ if (width2 <= 0) ++ return FALSE; + return ((vcol - width1) % width2 == width2 - 1); + } + #endif /* FEAT_MBYTE */ +*** ../vim-7.2.266/src/version.c 2009-09-30 15:15:33.000000000 +0200 +--- src/version.c 2009-10-07 16:19:05.000000000 +0200 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 267, + /**/ + +-- +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/gvim/vim-7.2/7.2.268 b/gvim/vim-7.2/7.2.268 new file mode 100644 index 0000000..89c50b0 --- /dev/null +++ b/gvim/vim-7.2/7.2.268 @@ -0,0 +1,80 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.268 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.268 +Problem: Crash when using Python to set cursor beyond end of line. + (winterTTr) +Solution: Check the column to be valid. +Files: src/if_python.c + + +*** ../vim-7.2.267/src/if_python.c 2009-07-09 20:06:30.000000000 +0200 +--- src/if_python.c 2009-10-10 14:49:10.000000000 +0200 +*************** +*** 2058,2063 **** +--- 2058,2064 ---- + { + long lnum; + long col; ++ long len; + + if (!PyArg_Parse(val, "(ll)", &lnum, &col)) + return -1; +*************** +*** 2072,2081 **** + if (VimErrorCheck()) + return -1; + +! /* NO CHECK ON COLUMN - SEEMS NOT TO MATTER */ + + this->win->w_cursor.lnum = lnum; + this->win->w_cursor.col = col; + update_screen(VALID); + + return 0; +--- 2073,2088 ---- + if (VimErrorCheck()) + return -1; + +! /* When column is out of range silently correct it. */ +! len = STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE)); +! if (col > len) +! col = len; + + this->win->w_cursor.lnum = lnum; + this->win->w_cursor.col = col; ++ #ifdef FEAT_VIRTUALEDIT ++ this->win->w_cursor.coladd = 0; ++ #endif + update_screen(VALID); + + return 0; +*** ../vim-7.2.267/src/version.c 2009-10-07 16:19:52.000000000 +0200 +--- src/version.c 2009-11-03 11:42:08.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 268, + /**/ + +-- +VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur + and his knights seemed hopeless, when, suddenly ... the animator + suffered a fatal heart attack. +ANIMATOR: Aaaaagh! +VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could + continue. + "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/gvim/vim-7.2/7.2.269 b/gvim/vim-7.2/7.2.269 new file mode 100644 index 0000000..ec15f45 --- /dev/null +++ b/gvim/vim-7.2/7.2.269 @@ -0,0 +1,261 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.269 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.269 +Problem: Many people struggle to find out why Vim startup is slow. +Solution: Add the --startuptime command line flag. +Files: runtime/doc/starting.txt, src/globals.h, src/feature.h, + src/main.c, src/macros.h + + +*** ../vim-7.2.268/runtime/doc/starting.txt 2008-11-09 13:43:25.000000000 +0100 +--- runtime/doc/starting.txt 2009-10-25 11:57:51.000000000 +0100 +*************** +*** 144,149 **** +--- 144,156 ---- + -u NORC no yes + --noplugin yes no + ++ --startuptime={fname} *--startuptime* ++ During startup write timing messages to the file {fname}. ++ This can be used to find out where time is spent while loading ++ your .vimrc and plugins. ++ When {fname} already exists new messages are appended. ++ {only when compiled with this feature} ++ + *--literal* + --literal Take file names literally, don't expand wildcards. Not needed + for Unix, because Vim always takes file names literally (the +*************** +*** 471,476 **** +--- 487,493 ---- + window title and copy/paste using the X clipboard. This + avoids a long startup time when running Vim in a terminal + emulator and the connection to the X server is slow. ++ See |--startuptime| to find out if affects you. + Only makes a difference on Unix or VMS, when compiled with the + |+X11| feature. Otherwise it's ignored. + To disable the connection only for specific terminals, see the +*** ../vim-7.2.268/src/globals.h 2009-07-29 12:09:49.000000000 +0200 +--- src/globals.h 2009-10-10 15:14:31.000000000 +0200 +*************** +*** 1567,1572 **** +--- 1567,1576 ---- + /* For undo we need to know the lowest time possible. */ + EXTERN time_t starttime; + ++ #ifdef STARTUPTIME ++ EXTERN FILE *time_fd INIT(= NULL); /* where to write startup timing */ ++ #endif ++ + /* + * 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 +*** ../vim-7.2.268/src/feature.h 2008-11-09 13:43:25.000000000 +0100 +--- src/feature.h 2009-10-10 16:16:19.000000000 +0200 +*************** +*** 844,853 **** + /* #define DEBUG */ + + /* +! * STARTUPTIME Time the startup process. Writes a "vimstartup" file +! * with timestamps. + */ +! /* #define STARTUPTIME "vimstartup" */ + + /* + * MEM_PROFILE Debugging of memory allocation and freeing. +--- 844,857 ---- + /* #define DEBUG */ + + /* +! * STARTUPTIME Time the startup process. Writes a file with +! * timestamps. + */ +! #if defined(FEAT_NORMAL) \ +! && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \ +! || defined(WIN3264)) +! # define STARTUPTIME 1 +! #endif + + /* + * MEM_PROFILE Debugging of memory allocation and freeing. +*** ../vim-7.2.268/src/main.c 2009-05-26 22:58:43.000000000 +0200 +--- src/main.c 2009-10-10 16:18:32.000000000 +0200 +*************** +*** 130,139 **** + #endif + + +- #ifdef STARTUPTIME +- static FILE *time_fd = NULL; +- #endif +- + /* + * Different types of error messages. + */ +--- 130,135 ---- +*************** +*** 173,178 **** +--- 169,177 ---- + char_u *fname = NULL; /* file name from command line */ + mparm_T params; /* various parameters passed between + * main() and other functions. */ ++ #ifdef STARTUPTIME ++ int i; ++ #endif + + /* + * Do any system-specific initialisations. These can NOT use IObuff or +*************** +*** 203,210 **** + #endif + + #ifdef STARTUPTIME +! time_fd = mch_fopen(STARTUPTIME, "a"); +! TIME_MSG("--- VIM STARTING ---"); + #endif + starttime = time(NULL); + +--- 202,216 ---- + #endif + + #ifdef STARTUPTIME +! for (i = 1; i < argc; ++i) +! { +! if (STRNICMP(argv[i], "--startuptime=", 14) == 0) +! { +! time_fd = mch_fopen(argv[i] + 14, "a"); +! TIME_MSG("--- VIM STARTING ---"); +! break; +! } +! } + #endif + starttime = time(NULL); + +*************** +*** 1150,1155 **** +--- 1156,1173 ---- + cursor_on(); + + do_redraw = FALSE; ++ ++ #ifdef STARTUPTIME ++ /* Now that we have drawn the first screen all the startup stuff ++ * has been done, close any file for startup messages. */ ++ if (time_fd != NULL) ++ { ++ TIME_MSG("first screen update"); ++ TIME_MSG("--- VIM STARTED ---"); ++ fclose(time_fd); ++ time_fd = NULL; ++ } ++ #endif + } + #ifdef FEAT_GUI + if (need_mouse_correct) +*************** +*** 1743,1748 **** +--- 1761,1770 ---- + /* already processed, skip */ + } + #endif ++ else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) ++ { ++ /* already processed, skip */ ++ } + else + { + if (argv[0][argv_idx]) +*************** +*** 3211,3216 **** +--- 3233,3252 ---- + + static struct timeval prev_timeval; + ++ # ifdef WIN3264 ++ /* ++ * Windows doesn't have gettimeofday(), although it does have struct timeval. ++ */ ++ static int ++ gettimeofday(struct timeval *tv, char *dummy) ++ { ++ long t = clock(); ++ tv->tv_sec = t / CLOCKS_PER_SEC; ++ tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC; ++ return 0; ++ } ++ # endif ++ + /* + * Save the previous time before doing something that could nest. + * set "*tv_rel" to the time elapsed so far. +*************** +*** 3299,3318 **** + } + } + +- # ifdef WIN3264 +- /* +- * Windows doesn't have gettimeofday(), although it does have struct timeval. +- */ +- int +- gettimeofday(struct timeval *tv, char *dummy) +- { +- long t = clock(); +- tv->tv_sec = t / CLOCKS_PER_SEC; +- tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC; +- return 0; +- } +- # endif +- + #endif + + #if defined(FEAT_CLIENTSERVER) || defined(PROTO) +--- 3335,3340 ---- +*** ../vim-7.2.268/src/macros.h 2009-05-17 13:30:58.000000000 +0200 +--- src/macros.h 2009-10-10 15:19:07.000000000 +0200 +*************** +*** 243,249 **** + #endif + + #ifdef STARTUPTIME +! # define TIME_MSG(s) time_msg(s, NULL) + #else + # define TIME_MSG(s) + #endif +--- 243,249 ---- + #endif + + #ifdef STARTUPTIME +! # define TIME_MSG(s) { if (time_fd != NULL) time_msg(s, NULL); } + #else + # define TIME_MSG(s) + #endif +*** ../vim-7.2.268/src/version.c 2009-11-03 11:43:05.000000000 +0100 +--- src/version.c 2009-11-03 12:06:31.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 269, + /**/ + +-- +BEDEVERE: Look! It's the old man from scene 24 - what's he Doing here? +ARTHUR: He is the keeper of the Bridge. He asks each traveler five + questions ... +GALAHAD: Three questions. + "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/gvim/vim-7.2/7.2.270 b/gvim/vim-7.2/7.2.270 new file mode 100644 index 0000000..7ad6458 --- /dev/null +++ b/gvim/vim-7.2/7.2.270 @@ -0,0 +1,72 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.270 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.270 +Problem: Using ":@c" when the c register contains a CR causes the rest to + be executed later. (Dexter Douglas) +Solution: Don't check for typeahead to start with ':', keep executing + commands until all added typeahead has been used. +Files: src/ex_docmd.c + + +*** ../vim-7.2.269/src/ex_docmd.c 2009-09-30 13:23:57.000000000 +0200 +--- src/ex_docmd.c 2009-10-28 12:06:54.000000000 +0100 +*************** +*** 8358,8363 **** +--- 8358,8364 ---- + exarg_T *eap; + { + int c; ++ int prev_len = typebuf.tb_len; + + curwin->w_cursor.lnum = eap->line2; + +*************** +*** 8383,8393 **** + + /* + * Execute from the typeahead buffer. +! * Originally this didn't check for the typeahead buffer to be empty, +! * thus could read more Ex commands from stdin. It's not clear why, +! * it is certainly unexpected. + */ +! while ((!stuff_empty() || typebuf.tb_len > 0) && vpeekc() == ':') + (void)do_cmdline(NULL, getexline, NULL, DOCMD_NOWAIT|DOCMD_VERBOSE); + + exec_from_reg = save_efr; +--- 8384,8393 ---- + + /* + * Execute from the typeahead buffer. +! * Continue until the stuff buffer is empty and all added characters +! * have been consumed. + */ +! while (!stuff_empty() || typebuf.tb_len > prev_len) + (void)do_cmdline(NULL, getexline, NULL, DOCMD_NOWAIT|DOCMD_VERBOSE); + + exec_from_reg = save_efr; +*** ../vim-7.2.269/src/version.c 2009-11-03 12:10:39.000000000 +0100 +--- src/version.c 2009-11-03 12:32:47.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 270, + /**/ + +-- +To the optimist, the glass is half full. +To the pessimist, the glass is half empty. +To the engineer, the glass is twice as big as it needs to be. + + /// 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/gvim/vim-7.2/7.2.271 b/gvim/vim-7.2/7.2.271 new file mode 100644 index 0000000..0742798 --- /dev/null +++ b/gvim/vim-7.2/7.2.271 @@ -0,0 +1,92 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.271 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.271 +Problem: Using freed memory in Motif GUI version when making a choice. +Solution: Free memory only after using it. (Dominique Pelle) +Files: src/gui_xmdlg.c + + +*** ../vim-7.2.270/src/gui_xmdlg.c 2009-05-21 23:25:38.000000000 +0200 +--- src/gui_xmdlg.c 2009-10-28 21:56:15.000000000 +0100 +*************** +*** 10,16 **** + /* + * (C) 2001,2005 by Marcin Dalecki + * +! * Implementation of dialogue functions for the Motif GUI variant. + * + * Note about Lesstif: Apparently lesstif doesn't get the widget layout right, + * when using a dynamic scrollbar policy. +--- 10,16 ---- + /* + * (C) 2001,2005 by Marcin Dalecki + * +! * Implementation of dialog functions for the Motif GUI variant. + * + * Note about Lesstif: Apparently lesstif doesn't get the widget layout right, + * when using a dynamic scrollbar policy. +*************** +*** 633,648 **** + data->sel[which] = XtNewString(sel); + else + { +- XtFree(data->sel[which]); + if (!strcmp(data->sel[which], sel)) + { + /* unselecting current selection */ + data->sel[which] = NULL; + if (w) + XmListDeselectItem(w, call_data->item); + } + else + data->sel[which] = XtNewString(sel); + } + XtFree(sel); + +--- 633,651 ---- + data->sel[which] = XtNewString(sel); + else + { + if (!strcmp(data->sel[which], sel)) + { + /* unselecting current selection */ ++ XtFree(data->sel[which]); + data->sel[which] = NULL; + if (w) + XmListDeselectItem(w, call_data->item); + } + else ++ { ++ XtFree(data->sel[which]); + data->sel[which] = XtNewString(sel); ++ } + } + XtFree(sel); + +*** ../vim-7.2.270/src/version.c 2009-11-03 12:38:50.000000000 +0100 +--- src/version.c 2009-11-03 12:48:26.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 271, + /**/ + +-- +ROBIN: (warily) And if you get a question wrong? +ARTHUR: You are cast into the Gorge of Eternal Peril. +ROBIN: Oh ... wacho! + "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/gvim/vim-7.2/7.2.272 b/gvim/vim-7.2/7.2.272 new file mode 100644 index 0000000..22bebbc --- /dev/null +++ b/gvim/vim-7.2/7.2.272 @@ -0,0 +1,82 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.272 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.272 +Problem: "_.svz" is not recognized as a swap file. (David M. Besonen) +Solution: Accept .s[uvw][a-z] as a swap file name extension. +Files: src/memline.c + + +*** ../vim-7.2.271/src/memline.c 2009-04-22 15:56:27.000000000 +0200 +--- src/memline.c 2009-10-29 20:55:08.000000000 +0100 +*************** +*** 864,884 **** + recoverymode = TRUE; + called_from_main = (curbuf->b_ml.ml_mfp == NULL); + attr = hl_attr(HLF_E); +! /* +! * If the file name ends in ".sw?" we use it directly. +! * Otherwise a search is done to find the swap file(s). +! */ + fname = curbuf->b_fname; + if (fname == NULL) /* When there is no file name */ + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && + #if defined(VMS) || defined(RISCOS) +! STRNICMP(fname + len - 4, "_sw" , 3) + #else +! STRNICMP(fname + len - 4, ".sw" , 3) + #endif +! == 0) + { + directly = TRUE; + fname = vim_strsave(fname); /* make a copy for mf_open() */ +--- 864,887 ---- + recoverymode = TRUE; + called_from_main = (curbuf->b_ml.ml_mfp == NULL); + attr = hl_attr(HLF_E); +! +! /* +! * If the file name ends in ".s[uvw][a-z]" we assume this is the swap file. +! * Otherwise a search is done to find the swap file(s). +! */ + fname = curbuf->b_fname; + if (fname == NULL) /* When there is no file name */ + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && + #if defined(VMS) || defined(RISCOS) +! STRNICMP(fname + len - 4, "_s" , 2) + #else +! STRNICMP(fname + len - 4, ".s" , 2) + #endif +! == 0 +! && vim_strchr((char_u *)"UVWuvw", fname[len - 2]) != NULL +! && ASCII_ISALPHA(fname[len - 1])) + { + directly = TRUE; + fname = vim_strsave(fname); /* make a copy for mf_open() */ +*** ../vim-7.2.271/src/version.c 2009-11-03 12:53:44.000000000 +0100 +--- src/version.c 2009-11-03 13:02:51.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 272, + /**/ + +-- +Sorry, no fortune 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/gvim/vim-7.2/7.2.273 b/gvim/vim-7.2/7.2.273 new file mode 100644 index 0000000..ac00afa --- /dev/null +++ b/gvim/vim-7.2/7.2.273 @@ -0,0 +1,130 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.273 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.273 +Problem: Crash with redir to unknown array. (Christian Brabandt) +Solution: Don't assign the redir result when there was an error. +Files: src/eval.c + + +*** ../vim-7.2.272/src/eval.c 2009-09-30 15:15:33.000000000 +0200 +--- src/eval.c 2009-11-03 12:05:07.000000000 +0100 +*************** +*** 988,1000 **** + int err; + typval_T tv; + +! /* Make sure a valid variable name is specified */ + if (!eval_isnamec1(*name)) + { + EMSG(_(e_invarg)); + return FAIL; + } + + redir_varname = vim_strsave(name); + if (redir_varname == NULL) + return FAIL; +--- 988,1001 ---- + int err; + typval_T tv; + +! /* Catch a bad name early. */ + if (!eval_isnamec1(*name)) + { + EMSG(_(e_invarg)); + return FAIL; + } + ++ /* Make a copy of the name, it is used in redir_lval until redir ends. */ + redir_varname = vim_strsave(name); + if (redir_varname == NULL) + return FAIL; +*************** +*** 1019,1024 **** +--- 1020,1026 ---- + EMSG(_(e_trailing)); + else + EMSG(_(e_invarg)); ++ redir_endp = NULL; /* don't store a value, only cleanup */ + var_redir_stop(); + return FAIL; + } +*************** +*** 1037,1042 **** +--- 1039,1045 ---- + did_emsg |= save_emsg; + if (err) + { ++ redir_endp = NULL; /* don't store a value, only cleanup */ + var_redir_stop(); + return FAIL; + } +*************** +*** 1085,1090 **** +--- 1088,1094 ---- + + /* + * Stop redirecting command output to a variable. ++ * Frees the allocated memory. + */ + void + var_redir_stop() +*************** +*** 1093,1106 **** + + if (redir_lval != NULL) + { +! /* Append the trailing NUL. */ +! ga_append(&redir_ga, NUL); + +! /* Assign the text to the variable. */ +! tv.v_type = VAR_STRING; +! tv.vval.v_string = redir_ga.ga_data; +! set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); +! vim_free(tv.vval.v_string); + + clear_lval(redir_lval); + vim_free(redir_lval); +--- 1097,1114 ---- + + if (redir_lval != NULL) + { +! /* If there was no error: assign the text to the variable. */ +! if (redir_endp != NULL) +! { +! ga_append(&redir_ga, NUL); /* Append the trailing NUL. */ +! tv.v_type = VAR_STRING; +! tv.vval.v_string = redir_ga.ga_data; +! set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); +! } + +! /* free the collected output */ +! vim_free(redir_ga.ga_data); +! redir_ga.ga_data = NULL; + + clear_lval(redir_lval); + vim_free(redir_lval); +*** ../vim-7.2.272/src/version.c 2009-11-03 13:06:03.000000000 +0100 +--- src/version.c 2009-11-03 14:24:06.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 273, + /**/ + +-- +Permission is granted to read this message out aloud on Kings Cross Road, +London, under the condition that the orator is properly dressed. + + /// 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/gvim/vim-7.2/7.2.274 b/gvim/vim-7.2/7.2.274 new file mode 100644 index 0000000..809cedc --- /dev/null +++ b/gvim/vim-7.2/7.2.274 @@ -0,0 +1,130 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.274 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.274 +Problem: Syntax folding doesn't work properly when adding a comment. +Solution: Fix it and add a test. (Lech Lorens) +Files: src/fold.c, src/testdir/test45.in, src/testdir/test45.ok + + +*** ../vim-7.2.273/src/fold.c 2009-09-18 15:16:37.000000000 +0200 +--- src/fold.c 2009-11-03 12:36:37.000000000 +0100 +*************** +*** 2256,2261 **** +--- 2256,2295 ---- + } + } + ++ /* ++ * If folding is defined by the syntax, it is possible that a change in ++ * one line will cause all sub-folds of the current fold to change (e.g., ++ * closing a C-style comment can cause folds in the subsequent lines to ++ * appear). To take that into account we should adjust the value of "bot" ++ * to point to the end of the current fold: ++ */ ++ if (foldlevelSyntax == getlevel) ++ { ++ garray_T *gap = &wp->w_folds; ++ fold_T *fp = NULL; ++ int current_fdl = 0; ++ linenr_T fold_start_lnum = 0; ++ linenr_T lnum_rel = fline.lnum; ++ ++ while (current_fdl < fline.lvl) ++ { ++ if (!foldFind(gap, lnum_rel, &fp)) ++ break; ++ ++current_fdl; ++ ++ fold_start_lnum += fp->fd_top; ++ gap = &fp->fd_nested; ++ lnum_rel -= fp->fd_top; ++ } ++ if (fp != NULL && current_fdl == fline.lvl) ++ { ++ linenr_T fold_end_lnum = fold_start_lnum + fp->fd_len; ++ ++ if (fold_end_lnum > bot) ++ bot = fold_end_lnum; ++ } ++ } ++ + start = fline.lnum; + end = bot; + /* Do at least one line. */ +*** ../vim-7.2.273/src/testdir/test45.in 2007-09-25 17:58:43.000000000 +0200 +--- src/testdir/test45.in 2009-11-03 12:22:38.000000000 +0100 +*************** +*** 28,36 **** + k:call append("$", foldlevel(".")) + :" test syntax folding + :set fdm=syntax fdl=0 +! :syn region Hup start="dd" end="hh" fold + Gzk:call append("$", "folding " . getline(".")) + k:call append("$", getline(".")) + :" test expression folding + :fun Flvl() + let l = getline(v:lnum) +--- 28,41 ---- + k:call append("$", foldlevel(".")) + :" test syntax folding + :set fdm=syntax fdl=0 +! :syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3 +! :syn region Fd1 start="ee" end="ff" fold contained +! :syn region Fd2 start="gg" end="hh" fold contained +! :syn region Fd3 start="commentstart" end="commentend" fold contained + Gzk:call append("$", "folding " . getline(".")) + k:call append("$", getline(".")) ++ jAcommentstart Acommentend:set fdl=1 ++ 3j:call append("$", getline(".")) + :" test expression folding + :fun Flvl() + let l = getline(v:lnum) +*** ../vim-7.2.273/src/testdir/test45.ok 2004-06-13 17:47:37.000000000 +0200 +--- src/testdir/test45.ok 2009-11-03 12:22:50.000000000 +0100 +*************** +*** 8,15 **** + 0 + indent 2 + 1 +! folding 8 hh + 3 cc + expr 2 + 1 + 2 +--- 8,16 ---- + 0 + indent 2 + 1 +! folding 9 ii + 3 cc ++ 7 gg + expr 2 + 1 + 2 +*** ../vim-7.2.273/src/version.c 2009-11-03 14:26:29.000000000 +0100 +--- src/version.c 2009-11-03 14:44:21.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 274, + /**/ + +-- +BRIDGEKEEPER: What is your favorite colour? +LAUNCELOT: Blue. +BRIDGEKEEPER: Right. Off you go. + "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/gvim/vim-7.2/7.2.275 b/gvim/vim-7.2/7.2.275 new file mode 100644 index 0000000..c6c6326 --- /dev/null +++ b/gvim/vim-7.2/7.2.275 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.275 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.275 +Problem: Warning for unused argument and comparing signed and unsigned. +Solution: Add type cast. +Files: src/memline.c + + +*** ../vim-7.2.274/src/memline.c 2009-11-03 13:06:03.000000000 +0100 +--- src/memline.c 2009-10-29 20:55:08.000000000 +0100 +*************** +*** 1285,1291 **** + for (i = 0; i < dp->db_line_count; ++i) + { + txt_start = (dp->db_index[i] & DB_INDEX_MASK); +! if (txt_start <= HEADER_SIZE + || txt_start >= (int)dp->db_txt_end) + { + p = (char_u *)"???"; +--- 1285,1291 ---- + for (i = 0; i < dp->db_line_count; ++i) + { + txt_start = (dp->db_index[i] & DB_INDEX_MASK); +! if (txt_start <= (int)HEADER_SIZE + || txt_start >= (int)dp->db_txt_end) + { + p = (char_u *)"???"; +*************** +*** 1296,1302 **** + ml_append(lnum++, p, (colnr_T)0, TRUE); + } + if (has_error) +! ml_append(lnum++, (char_u *)_("???END"), (colnr_T)0, TRUE); + } + } + } +--- 1296,1303 ---- + ml_append(lnum++, p, (colnr_T)0, TRUE); + } + if (has_error) +! ml_append(lnum++, (char_u *)_("???END"), +! (colnr_T)0, TRUE); + } + } + } +*************** +*** 3576,3586 **** + * Make swap file name out of the file name and a directory name. + * Returns pointer to allocated memory or NULL. + */ +- /*ARGSUSED*/ + char_u * + makeswapname(fname, ffname, buf, dir_name) + char_u *fname; +! char_u *ffname; + buf_T *buf; + char_u *dir_name; + { +--- 3577,3586 ---- + * Make swap file name out of the file name and a directory name. + * Returns pointer to allocated memory or NULL. + */ + char_u * + makeswapname(fname, ffname, buf, dir_name) + char_u *fname; +! char_u *ffname UNUSED; + buf_T *buf; + char_u *dir_name; + { +*** ../vim-7.2.274/src/version.c 2009-11-03 14:46:35.000000000 +0100 +--- src/version.c 2009-11-03 15:28:33.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 275, + /**/ + +-- +BRIDGEKEEPER: What is your favorite colour? +GAWAIN: Blue ... No yelloooooww! + "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/gvim/vim-7.2/7.2.276 b/gvim/vim-7.2/7.2.276 new file mode 100644 index 0000000..15dc68b --- /dev/null +++ b/gvim/vim-7.2/7.2.276 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.276 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.276 +Problem: Crash when setting 'isprint' to a small bullet. (Raul Coronado) +Solution: Check for the character to be < 256. Also make it possible to + specify a range of multi-byte characters. (Lech Lorens) +Files: src/charset.c + + +*** ../vim-7.2.275/src/charset.c 2009-10-07 16:19:52.000000000 +0200 +--- src/charset.c 2009-11-03 12:46:12.000000000 +0100 +*************** +*** 187,195 **** + if (VIM_ISDIGIT(*p)) + c2 = getdigits(&p); + else + c2 = *p++; + } +! if (c <= 0 || (c2 < c && c2 != -1) || c2 >= 256 + || !(*p == NUL || *p == ',')) + return FAIL; + +--- 187,200 ---- + if (VIM_ISDIGIT(*p)) + c2 = getdigits(&p); + else ++ #ifdef FEAT_MBYTE ++ if (has_mbyte) ++ c2 = mb_ptr2char_adv(&p); ++ else ++ #endif + c2 = *p++; + } +! if (c <= 0 || c >= 256 || (c2 < c && c2 != -1) || c2 >= 256 + || !(*p == NUL || *p == ',')) + return FAIL; + +*** ../vim-7.2.275/src/version.c 2009-11-03 15:32:58.000000000 +0100 +--- src/version.c 2009-11-03 16:03:18.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 276, + /**/ + +-- +BRIDGEKEEPER: What is your favorite editor? +GAWAIN: Emacs ... No, Viiiiiiiiiiimmmmmmm! + "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE 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/gvim/vim-7.2/7.2.277 b/gvim/vim-7.2/7.2.277 new file mode 100644 index 0000000..ed3caf4 --- /dev/null +++ b/gvim/vim-7.2/7.2.277 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.277 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.277 +Problem: CTRL-Y in a diff'ed window may move the cursor outside of the + window. (Lech Lorens) +Solution: Limit the number of filler lines to the height of the window. + Don't reset filler lines to zero for an empty buffer. +Files: src/move.c + + +*** ../vim-7.2.276/src/move.c 2009-05-15 21:31:11.000000000 +0200 +--- src/move.c 2009-11-03 14:39:55.000000000 +0100 +*************** +*** 183,191 **** + if (curwin->w_topline != 1) + redraw_later(NOT_VALID); + curwin->w_topline = 1; +- #ifdef FEAT_DIFF +- curwin->w_topfill = 0; +- #endif + curwin->w_botline = 2; + curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP; + #ifdef FEAT_SCROLLBIND +--- 183,188 ---- +*************** +*** 1257,1263 **** + while (line_count-- > 0) + { + #ifdef FEAT_DIFF +! if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)) + { + ++curwin->w_topfill; + ++done; +--- 1254,1261 ---- + while (line_count-- > 0) + { + #ifdef FEAT_DIFF +! if (curwin->w_topfill < diff_check(curwin, curwin->w_topline) +! && curwin->w_topfill < curwin->w_height - 1) + { + ++curwin->w_topfill; + ++done; +*** ../vim-7.2.276/src/version.c 2009-11-03 16:03:59.000000000 +0100 +--- src/version.c 2009-11-03 16:22:04.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 277, + /**/ + +-- +SIGFUN -- signature too funny (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/gvim/vim-7.2/7.2.278 b/gvim/vim-7.2/7.2.278 new file mode 100644 index 0000000..edf4e58 --- /dev/null +++ b/gvim/vim-7.2/7.2.278 @@ -0,0 +1,74 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.278 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.278 +Problem: Using magic number in the folding code. +Solution: Use the defined MAX_LEVEL. +Files: src/fold.c + + +*** ../vim-7.2.277/src/fold.c 2009-11-03 14:46:35.000000000 +0100 +--- src/fold.c 2009-11-03 12:36:37.000000000 +0100 +*************** +*** 1932,1938 **** + #ifdef FEAT_EVAL + if (*wp->w_p_fdt != NUL) + { +! char_u dashes[51]; + win_T *save_curwin; + int level; + char_u *p; +--- 1932,1938 ---- + #ifdef FEAT_EVAL + if (*wp->w_p_fdt != NUL) + { +! char_u dashes[MAX_LEVEL + 2]; + win_T *save_curwin; + int level; + char_u *p; +*************** +*** 1944,1951 **** + /* Set "v:folddashes" to a string of "level" dashes. */ + /* Set "v:foldlevel" to "level". */ + level = foldinfo->fi_level; +! if (level > 50) +! level = 50; + vim_memset(dashes, '-', (size_t)level); + dashes[level] = NUL; + set_vim_var_string(VV_FOLDDASHES, dashes, -1); +--- 1944,1951 ---- + /* Set "v:folddashes" to a string of "level" dashes. */ + /* Set "v:foldlevel" to "level". */ + level = foldinfo->fi_level; +! if (level > (int)sizeof(dashes) - 1) +! level = (int)sizeof(dashes) - 1; + vim_memset(dashes, '-', (size_t)level); + dashes[level] = NUL; + set_vim_var_string(VV_FOLDDASHES, dashes, -1); +*** ../vim-7.2.277/src/version.c 2009-11-03 16:22:59.000000000 +0100 +--- src/version.c 2009-11-03 16:29:08.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 278, + /**/ + +-- +BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow? +ARTHUR: What do you mean? An African or European swallow? +BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh! + BRIDGEKEEPER is cast into the gorge. + "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/gvim/vim-7.2/7.2.279 b/gvim/vim-7.2/7.2.279 new file mode 100644 index 0000000..bdf58fc --- /dev/null +++ b/gvim/vim-7.2/7.2.279 @@ -0,0 +1,120 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.279 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.279 +Problem: Invalid memory read with visual mode "r". (Dominique Pelle) +Solution: Make sure the cursor position is valid. Don't check the cursor + position but the position being used. And make sure we get the + right line. +Files: src/misc2.c, src/ops.c + + +*** ../vim-7.2.278/src/misc2.c 2009-05-16 21:06:36.000000000 +0200 +--- src/misc2.c 2009-11-03 16:43:10.000000000 +0100 +*************** +*** 156,162 **** + || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL) + #endif + ; +! line = ml_get_curline(); + + if (wcol >= MAXCOL) + { +--- 156,162 ---- + || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL) + #endif + ; +! line = ml_get_buf(curbuf, pos->lnum, FALSE); + + if (wcol >= MAXCOL) + { +*************** +*** 332,340 **** + #endif + + #ifdef FEAT_MBYTE +! /* prevent cursor from moving on the trail byte */ + if (has_mbyte) +! mb_adjust_cursor(); + #endif + + if (col < wcol) +--- 332,340 ---- + #endif + + #ifdef FEAT_MBYTE +! /* prevent from moving onto a trail byte */ + if (has_mbyte) +! mb_adjustpos(pos); + #endif + + if (col < wcol) +*** ../vim-7.2.278/src/ops.c 2009-09-30 15:15:33.000000000 +0200 +--- src/ops.c 2009-11-03 15:18:50.000000000 +0100 +*************** +*** 2020,2025 **** +--- 2020,2026 ---- + bd.is_MAX = (curwin->w_curswant == MAXCOL); + for ( ; curwin->w_cursor.lnum <= oap->end.lnum; ++curwin->w_cursor.lnum) + { ++ curwin->w_cursor.col = 0; /* make sure cursor position is valid */ + block_prep(oap, &bd, curwin->w_cursor.lnum, TRUE); + if (bd.textlen == 0 && (!virtual_op || bd.is_MAX)) + continue; /* nothing to replace */ +*************** +*** 2035,2040 **** +--- 2036,2042 ---- + { + pos_T vpos; + ++ vpos.lnum = curwin->w_cursor.lnum; + getvpos(&vpos, oap->start_vcol); + bd.startspaces += vpos.coladd; + n = bd.startspaces; +*************** +*** 2693,2703 **** + * initial coladd offset as part of "startspaces" */ + if (bd.is_short) + { +! linenr_T lnum = curwin->w_cursor.lnum; +! +! curwin->w_cursor.lnum = linenr; + (void)getvpos(&vpos, oap->start_vcol); +- curwin->w_cursor.lnum = lnum; + } + else + vpos.coladd = 0; +--- 2695,2702 ---- + * initial coladd offset as part of "startspaces" */ + if (bd.is_short) + { +! vpos.lnum = linenr; + (void)getvpos(&vpos, oap->start_vcol); + } + else + vpos.coladd = 0; +*** ../vim-7.2.278/src/version.c 2009-11-03 16:29:48.000000000 +0100 +--- src/version.c 2009-11-03 16:41:53.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 279, + /**/ + +-- +BEDEVERE: How do you know so much about swallows? +ARTHUR: Well you have to know these things when you're a king, you know. + "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/gvim/vim-7.2/7.2.280 b/gvim/vim-7.2/7.2.280 new file mode 100644 index 0000000..6223ac4 --- /dev/null +++ b/gvim/vim-7.2/7.2.280 @@ -0,0 +1,251 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.280 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.280 +Problem: A redraw in a custom statusline with %! may cause a crash. + (Yukihiro Nakadaira) +Solution: Make a copy of 'statusline'. Also fix typo in function name + redraw_custum_statusline. (party by Dominique Pelle) +Files: src/screen.c + + +*** ../vim-7.2.279/src/screen.c 2009-07-29 16:13:35.000000000 +0200 +--- src/screen.c 2009-11-03 17:13:16.000000000 +0100 +*************** +*** 132,138 **** + static void draw_vsep_win __ARGS((win_T *wp, int row)); + #endif + #ifdef FEAT_STL_OPT +! static void redraw_custum_statusline __ARGS((win_T *wp)); + #endif + #ifdef FEAT_SEARCH_EXTRA + #define SEARCH_HL_PRIORITY 0 +--- 132,138 ---- + static void draw_vsep_win __ARGS((win_T *wp, int row)); + #endif + #ifdef FEAT_STL_OPT +! static void redraw_custom_statusline __ARGS((win_T *wp)); + #endif + #ifdef FEAT_SEARCH_EXTRA + #define SEARCH_HL_PRIORITY 0 +*************** +*** 5772,5778 **** + else if (*p_stl != NUL || *wp->w_p_stl != NUL) + { + /* redraw custom status line */ +! redraw_custum_statusline(wp); + } + #endif + else +--- 5794,5800 ---- + else if (*p_stl != NUL || *wp->w_p_stl != NUL) + { + /* redraw custom status line */ +! redraw_custom_statusline(wp); + } + #endif + else +*************** +*** 5897,5914 **** + * errors encountered. + */ + static void +! redraw_custum_statusline(wp) + win_T *wp; + { +! int save_called_emsg = called_emsg; + + called_emsg = FALSE; + win_redr_custom(wp, FALSE); + if (called_emsg) + set_string_option_direct((char_u *)"statusline", -1, + (char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL + ? OPT_LOCAL : OPT_GLOBAL), SID_ERROR); + called_emsg |= save_called_emsg; + } + #endif + +--- 5919,5949 ---- + * errors encountered. + */ + static void +! redraw_custom_statusline(wp) + win_T *wp; + { +! static int entered = FALSE; +! int save_called_emsg = called_emsg; +! +! /* When called recursively return. This can happen when the statusline +! * contains an expression that triggers a redraw. */ +! if (entered) +! return; +! entered = TRUE; + + called_emsg = FALSE; + win_redr_custom(wp, FALSE); + if (called_emsg) ++ { ++ /* When there is an error disable the statusline, otherwise the ++ * display is messed up with errors and a redraw triggers the problem ++ * again and again. */ + set_string_option_direct((char_u *)"statusline", -1, + (char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL + ? OPT_LOCAL : OPT_GLOBAL), SID_ERROR); ++ } + called_emsg |= save_called_emsg; ++ entered = FALSE; + } + #endif + +*************** +*** 6016,6021 **** +--- 6051,6057 ---- + int len; + int fillchar; + char_u buf[MAXPATHL]; ++ char_u *stl; + char_u *p; + struct stl_hlrec hltab[STL_MAX_ITEM]; + struct stl_hlrec tabtab[STL_MAX_ITEM]; +*************** +*** 6025,6031 **** + if (wp == NULL) + { + /* Use 'tabline'. Always at the first line of the screen. */ +! p = p_tal; + row = 0; + fillchar = ' '; + attr = hl_attr(HLF_TPF); +--- 6061,6067 ---- + if (wp == NULL) + { + /* Use 'tabline'. Always at the first line of the screen. */ +! stl = p_tal; + row = 0; + fillchar = ' '; + attr = hl_attr(HLF_TPF); +*************** +*** 6042,6058 **** + + if (draw_ruler) + { +! p = p_ruf; + /* advance past any leading group spec - implicit in ru_col */ +! if (*p == '%') + { +! if (*++p == '-') +! p++; +! if (atoi((char *) p)) +! while (VIM_ISDIGIT(*p)) +! p++; +! if (*p++ != '(') +! p = p_ruf; + } + #ifdef FEAT_VERTSPLIT + col = ru_col - (Columns - W_WIDTH(wp)); +--- 6078,6094 ---- + + if (draw_ruler) + { +! stl = p_ruf; + /* advance past any leading group spec - implicit in ru_col */ +! if (*stl == '%') + { +! if (*++stl == '-') +! stl++; +! if (atoi((char *)stl)) +! while (VIM_ISDIGIT(*stl)) +! stl++; +! if (*stl++ != '(') +! stl = p_ruf; + } + #ifdef FEAT_VERTSPLIT + col = ru_col - (Columns - W_WIDTH(wp)); +*************** +*** 6081,6089 **** + else + { + if (*wp->w_p_stl != NUL) +! p = wp->w_p_stl; + else +! p = p_stl; + # ifdef FEAT_EVAL + use_sandbox = was_set_insecurely((char_u *)"statusline", + *wp->w_p_stl == NUL ? 0 : OPT_LOCAL); +--- 6117,6125 ---- + else + { + if (*wp->w_p_stl != NUL) +! stl = wp->w_p_stl; + else +! stl = p_stl; + # ifdef FEAT_EVAL + use_sandbox = was_set_insecurely((char_u *)"statusline", + *wp->w_p_stl == NUL ? 0 : OPT_LOCAL); +*************** +*** 6098,6107 **** + if (maxwidth <= 0) + return; + + width = build_stl_str_hl(wp == NULL ? curwin : wp, + buf, sizeof(buf), +! p, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + len = (int)STRLEN(buf); + + while (width < maxwidth && len < (int)sizeof(buf) - 1) +--- 6134,6147 ---- + if (maxwidth <= 0) + return; + ++ /* Make a copy, because the statusline may include a function call that ++ * might change the option value and free the memory. */ ++ stl = vim_strsave(stl); + width = build_stl_str_hl(wp == NULL ? curwin : wp, + buf, sizeof(buf), +! stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); ++ vim_free(stl); + len = (int)STRLEN(buf); + + while (width < maxwidth && len < (int)sizeof(buf) - 1) +*************** +*** 9465,9471 **** + #if defined(FEAT_STL_OPT) && defined(FEAT_WINDOWS) + if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height) + { +! redraw_custum_statusline(curwin); + } + else + #endif +--- 9505,9511 ---- + #if defined(FEAT_STL_OPT) && defined(FEAT_WINDOWS) + if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height) + { +! redraw_custom_statusline(curwin); + } + else + #endif +*** ../vim-7.2.279/src/version.c 2009-11-03 16:44:04.000000000 +0100 +--- src/version.c 2009-11-03 17:15:35.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 280, + /**/ + +-- +Every exit is an entrance into something else. + + /// 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/gvim/vim-7.2/7.2.281 b/gvim/vim-7.2/7.2.281 new file mode 100644 index 0000000..f73d7a5 --- /dev/null +++ b/gvim/vim-7.2/7.2.281 @@ -0,0 +1,81 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.281 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.281 +Problem: 'cursorcolumn' highlighting is wrong in diff mode. +Solution: Adjust the column computation. (Lech Lorens) +Files: src/screen.c + + +*** ../vim-7.2.280/src/screen.c 2009-11-03 17:20:18.000000000 +0100 +--- src/screen.c 2009-11-03 17:13:16.000000000 +0100 +*************** +*** 3008,3018 **** + mb_ptr_adv(ptr); + } + +! #ifdef FEAT_VIRTUALEDIT +! /* When 'virtualedit' is set the end of the line may be before the +! * start of the displayed part. */ +! if (vcol < v && *ptr == NUL && virtual_active()) + vcol = v; + #endif + + /* Handle a character that's not completely on the screen: Put ptr at +--- 3008,3040 ---- + mb_ptr_adv(ptr); + } + +! #if defined(FEAT_SYN_HL) || defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL) +! /* When: +! * - 'cuc' is set, or +! * - 'virtualedit' is set, or +! * - the visual mode is active, +! * the end of the line may be before the start of the displayed part. +! */ +! if (vcol < v && ( +! # ifdef FEAT_SYN_HL +! wp->w_p_cuc +! # if defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL) +! || +! # endif +! # endif +! # ifdef FEAT_VIRTUALEDIT +! virtual_active() +! # ifdef FEAT_VISUAL +! || +! # endif +! # endif +! # ifdef FEAT_VISUAL +! (VIsual_active && wp->w_buffer == curwin->w_buffer) +! # endif +! )) +! { + vcol = v; ++ } + #endif + + /* Handle a character that's not completely on the screen: Put ptr at +*** ../vim-7.2.280/src/version.c 2009-11-03 17:20:18.000000000 +0100 +--- src/version.c 2009-11-03 17:34:54.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 281, + /**/ + +-- +Every person is responsible for the choices he makes. + + /// 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/gvim/vim-7.2/7.2.282 b/gvim/vim-7.2/7.2.282 new file mode 100644 index 0000000..dd4dc64 --- /dev/null +++ b/gvim/vim-7.2/7.2.282 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.282 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.282 +Problem: A fold can't be closed. +Solution: Initialize fd_small to MAYBE. (Lech Lorens) +Files: src/fold.c + + +*** ../vim-7.2.281/src/fold.c 2009-11-03 16:29:48.000000000 +0100 +--- src/fold.c 2009-11-03 17:41:50.000000000 +0100 +*************** +*** 2851,2856 **** +--- 2851,2858 ---- + fp[1].fd_top = bot + 1; + fp[1].fd_len = fp->fd_len - (fp[1].fd_top - fp->fd_top); + fp[1].fd_flags = fp->fd_flags; ++ fp[1].fd_small = MAYBE; ++ fp->fd_small = MAYBE; + + /* Move nested folds below bot to new fold. There can't be + * any between top and bot, they have been removed by the caller. */ +*** ../vim-7.2.281/src/version.c 2009-11-03 17:36:09.000000000 +0100 +--- src/version.c 2009-11-03 17:59:12.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 282, + /**/ + +-- +You can be stopped by the police for biking over 65 miles per hour. +You are not allowed to walk across a street on your hands. + [real standing laws in Connecticut, 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/gvim/vim-7.2/7.2.283 b/gvim/vim-7.2/7.2.283 new file mode 100644 index 0000000..0d6f605 --- /dev/null +++ b/gvim/vim-7.2/7.2.283 @@ -0,0 +1,73 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.283 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.283 +Problem: Changing font while the window is maximized doesn't keep the + window maximized. +Solution: Recompute number of lines and columns after changing font. (James + Vega) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.2.282/src/gui_gtk_x11.c 2009-09-23 18:14:13.000000000 +0200 +--- src/gui_gtk_x11.c 2009-11-03 17:56:27.000000000 +0100 +*************** +*** 5267,5274 **** + # endif + #endif /* !HAVE_GTK2 */ + +! /* Preserve the logical dimensions of the screen. */ +! update_window_manager_hints(0, 0); + + return OK; + } +--- 5267,5290 ---- + # endif + #endif /* !HAVE_GTK2 */ + +! #ifdef HAVE_GTK2 +! if (gui_mch_maximized()) +! { +! int w, h; +! +! /* Update lines and columns in accordance with the new font, keep the +! * window maximized. */ +! gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h); +! w -= get_menu_tool_width(); +! h -= get_menu_tool_height(); +! gui_resize_shell(w, h); +! } +! else +! #endif +! { +! /* Preserve the logical dimensions of the screen. */ +! update_window_manager_hints(0, 0); +! } + + return OK; + } +*** ../vim-7.2.282/src/version.c 2009-11-03 18:04:26.000000000 +0100 +--- src/version.c 2009-11-03 18:11:53.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 283, + /**/ + +-- +If an elephant is left tied to a parking meter, the parking fee has to be paid +just as it would for a vehicle. + [real standing law in Florida, 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/gvim/vim-7.2/7.2.284 b/gvim/vim-7.2/7.2.284 new file mode 100644 index 0000000..5b4336b --- /dev/null +++ b/gvim/vim-7.2/7.2.284 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.284 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.284 +Problem: When editing the same buffer in two windows, one with folding, + display may be wrong after changes. +Solution: Call set_topline() to take care of side effects. (Lech Lorens) +Files: src/misc1.c + + +*** ../vim-7.2.283/src/misc1.c 2009-07-22 11:03:38.000000000 +0200 +--- src/misc1.c 2009-11-03 18:38:15.000000000 +0100 +*************** +*** 2886,2891 **** +--- 2886,2898 ---- + } + #endif + } ++ ++ #ifdef FEAT_FOLDING ++ /* Take care of side effects for setting w_topline when folds have ++ * changed. Esp. when the buffer was changed in another window. */ ++ if (hasAnyFolding(wp)) ++ set_topline(wp, wp->w_topline); ++ #endif + } + } + +*** ../vim-7.2.283/src/version.c 2009-11-03 18:13:36.000000000 +0100 +--- src/version.c 2009-11-03 18:44:12.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 284, + /**/ + +-- +Men may not be seen publicly in any kind of strapless gown. + [real standing law in Florida, 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/gvim/vim-7.2/7.2.285 b/gvim/vim-7.2/7.2.285 new file mode 100644 index 0000000..2a34e17 --- /dev/null +++ b/gvim/vim-7.2/7.2.285 @@ -0,0 +1,56 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.285 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.285 (after 7.2.169) +Problem: CTRL-U in Insert mode also deletes indent. (Andrey Voropaev) +Solution: Fix mistake made in patch 7.2.169. +Files: src/edit.c + + +*** ../vim-7.2.284/src/edit.c 2009-07-09 18:15:19.000000000 +0200 +--- src/edit.c 2009-11-05 20:25:15.000000000 +0100 +*************** +*** 8519,8525 **** + { + save_col = curwin->w_cursor.col; + beginline(BL_WHITE); +! if (curwin->w_cursor.col < (colnr_T)temp) + mincol = curwin->w_cursor.col; + curwin->w_cursor.col = save_col; + } +--- 8519,8525 ---- + { + save_col = curwin->w_cursor.col; + beginline(BL_WHITE); +! if (curwin->w_cursor.col < save_col) + mincol = curwin->w_cursor.col; + curwin->w_cursor.col = save_col; + } +*** ../vim-7.2.284/src/version.c 2009-11-03 18:46:53.000000000 +0100 +--- src/version.c 2009-11-11 13:21:25.000000000 +0100 +*************** +*** 678,679 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 285, + /**/ + +-- +(letter from Mark to Mike, about the film's probable certificate) + I would like to get back to the Censor and agree to lose the shits, take + the odd Jesus Christ out and lose Oh fuck off, but to retain 'fart in + your general direction', 'castanets of your testicles' and 'oral sex' + and ask him for an 'A' rating on that basis. + "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/gvim/vim-7.2/7.2.286 b/gvim/vim-7.2/7.2.286 new file mode 100644 index 0000000..7577502 --- /dev/null +++ b/gvim/vim-7.2/7.2.286 @@ -0,0 +1,227 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.286 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.286 (after 7.2.269) +Problem: The "--startuptime=" argument is not consistent with other + arguments. +Solution: Use "--startuptime ". Added the +startuptime feature. +Files: runtime/doc/eval.txt, runtime/doc/starting.txt, + runtime/doc/various.txt, src/eval.c, src/main.c, src/version.c + + +*** ../vim-7.2.285/runtime/doc/eval.txt 2009-04-22 12:53:31.000000000 +0200 +--- runtime/doc/eval.txt 2009-11-11 13:01:58.000000000 +0100 +*************** +*** 5869,5874 **** +--- 5881,5887 ---- + signs Compiled with |:sign| support. + smartindent Compiled with 'smartindent' support. + sniff Compiled with SNiFF interface support. ++ startuptime Compiled with |--startuptime| support. + statusline Compiled with support for 'statusline', 'rulerformat' + and special formats of 'titlestring' and 'iconstring'. + sun_workshop Compiled with support for Sun |workshop|. +*** ../vim-7.2.285/runtime/doc/starting.txt 2009-11-03 12:10:39.000000000 +0100 +--- runtime/doc/starting.txt 2009-11-11 13:20:56.000000000 +0100 +*************** +*** 144,155 **** + -u NORC no yes + --noplugin yes no + +! --startuptime={fname} *--startuptime* + During startup write timing messages to the file {fname}. + This can be used to find out where time is spent while loading +! your .vimrc and plugins. + When {fname} already exists new messages are appended. +! {only when compiled with this feature} + + *--literal* + --literal Take file names literally, don't expand wildcards. Not needed +--- 144,156 ---- + -u NORC no yes + --noplugin yes no + +! --startuptime {fname} *--startuptime* + During startup write timing messages to the file {fname}. + This can be used to find out where time is spent while loading +! your .vimrc, plugins and opening the first file. + When {fname} already exists new messages are appended. +! (Only available when compiled with the |+startuptime| +! feature). + + *--literal* + --literal Take file names literally, don't expand wildcards. Not needed +*** ../vim-7.2.285/runtime/doc/various.txt 2009-07-09 15:55:34.000000000 +0200 +--- runtime/doc/various.txt 2009-11-11 13:03:52.000000000 +0100 +*************** +*** 374,379 **** +--- 374,380 ---- + B *+signs* |:sign| + N *+smartindent* |'smartindent'| + m *+sniff* SniFF interface |sniff| ++ N *+startuptime* |--startuptime| argument + N *+statusline* Options 'statusline', 'rulerformat' and special + formats of 'titlestring' and 'iconstring' + m *+sun_workshop* |workshop| +*** ../vim-7.2.285/src/eval.c 2009-11-03 14:26:29.000000000 +0100 +--- src/eval.c 2009-11-11 12:59:53.000000000 +0100 +*************** +*** 11736,11741 **** +--- 11736,11744 ---- + #ifdef FEAT_SNIFF + "sniff", + #endif ++ #ifdef STARTUPTIME ++ "startuptime", ++ #endif + #ifdef FEAT_STL_OPT + "statusline", + #endif +*** ../vim-7.2.285/src/main.c 2009-11-03 12:10:39.000000000 +0100 +--- src/main.c 2009-11-08 12:57:46.000000000 +0100 +*************** +*** 204,212 **** + #ifdef STARTUPTIME + for (i = 1; i < argc; ++i) + { +! if (STRNICMP(argv[i], "--startuptime=", 14) == 0) + { +! time_fd = mch_fopen(argv[i] + 14, "a"); + TIME_MSG("--- VIM STARTING ---"); + break; + } +--- 204,212 ---- + #ifdef STARTUPTIME + for (i = 1; i < argc; ++i) + { +! if (STRICMP(argv[i], "--startuptime") == 0 && i + 1 < argc) + { +! time_fd = mch_fopen(argv[i + 1], "a"); + TIME_MSG("--- VIM STARTING ---"); + break; + } +*************** +*** 1726,1731 **** +--- 1726,1736 ---- + want_argument = TRUE; + argv_idx += 3; + } ++ else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) ++ { ++ want_argument = TRUE; ++ argv_idx += 11; ++ } + #ifdef FEAT_CLIENTSERVER + else if (STRNICMP(argv[0] + argv_idx, "serverlist", 10) == 0) + ; /* already processed -- no arg */ +*************** +*** 1761,1770 **** + /* already processed, skip */ + } + #endif +- else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) +- { +- /* already processed, skip */ +- } + else + { + if (argv[0][argv_idx]) +--- 1766,1771 ---- +*************** +*** 2061,2067 **** + mainerr(ME_GARBAGE, (char_u *)argv[0]); + + --argc; +! if (argc < 1 && c != 'S') + mainerr_arg_missing((char_u *)argv[0]); + ++argv; + argv_idx = -1; +--- 2062,2068 ---- + mainerr(ME_GARBAGE, (char_u *)argv[0]); + + --argc; +! if (argc < 1 && c != 'S') /* -S has an optional argument */ + mainerr_arg_missing((char_u *)argv[0]); + ++argv; + argv_idx = -1; +*************** +*** 2102,2112 **** + (char_u *)argv[0]; + break; + +! case '-': /* "--cmd {command}" execute command */ +! if (parmp->n_pre_commands >= MAX_ARG_CMDS) +! mainerr(ME_EXTRA_CMD, NULL); +! parmp->pre_commands[parmp->n_pre_commands++] = + (char_u *)argv[0]; + break; + + /* case 'd': -d {device} is handled in mch_check_win() for the +--- 2103,2118 ---- + (char_u *)argv[0]; + break; + +! case '-': +! if (argv[-1][2] == 'c') +! { +! /* "--cmd {command}" execute command */ +! if (parmp->n_pre_commands >= MAX_ARG_CMDS) +! mainerr(ME_EXTRA_CMD, NULL); +! parmp->pre_commands[parmp->n_pre_commands++] = + (char_u *)argv[0]; ++ } ++ /* "--startuptime " already handled */ + break; + + /* case 'd': -d {device} is handled in mch_check_win() for the +*************** +*** 3144,3149 **** +--- 3150,3158 ---- + main_msg(_("--serverlist\t\tList available Vim server names and exit")); + main_msg(_("--servername \tSend to/become the Vim server ")); + #endif ++ #ifdef STARTUPTIME ++ main_msg(_("--startuptime=\tWrite startup timing messages to ")); ++ #endif + #ifdef FEAT_VIMINFO + main_msg(_("-i \t\tUse instead of .viminfo")); + #endif +*** ../vim-7.2.285/src/version.c 2009-11-11 13:22:09.000000000 +0100 +--- src/version.c 2009-11-11 14:17:28.000000000 +0100 +*************** +*** 494,499 **** +--- 494,504 ---- + #else + "-sniff", + #endif ++ #ifdef STARTUPTIME ++ "+startuptime", ++ #else ++ "-startuptime", ++ #endif + #ifdef FEAT_STL_OPT + "+statusline", + #else +*** ../vim-7.2.285/src/version.c 2009-11-11 13:22:09.000000000 +0100 +--- src/version.c 2009-11-11 14:17:28.000000000 +0100 +*************** +*** 678,679 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 286, + /**/ + +-- +A fool must search for a greater fool to find admiration. + + /// 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/gvim/vim-7.2/7.2.287 b/gvim/vim-7.2/7.2.287 new file mode 100644 index 0000000..0f8e170 --- /dev/null +++ b/gvim/vim-7.2/7.2.287 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.287 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.287 +Problem: Warning from gcc 3.4 about uninitialized variable. +Solution: Move assignment outside of #ifdef. +Files: src/if_perl.xs + + +*** ../vim-7.2.286/src/if_perl.xs 2009-07-14 16:05:14.000000000 +0200 +--- src/if_perl.xs 2009-11-11 12:29:32.000000000 +0100 +*************** +*** 720,727 **** + #ifdef HAVE_SANDBOX + if (sandbox) + { + # ifndef MAKE_TEST /* avoid a warning for unreachable code */ +! if ((safe = perl_get_sv( "VIM::safe", FALSE )) == NULL || !SvTRUE(safe)) + EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); + else + # endif +--- 720,728 ---- + #ifdef HAVE_SANDBOX + if (sandbox) + { ++ safe = perl_get_sv( "VIM::safe", FALSE ); + # ifndef MAKE_TEST /* avoid a warning for unreachable code */ +! if (safe == NULL || !SvTRUE(safe)) + EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); + else + # endif +*** ../vim-7.2.286/src/version.c 2009-11-11 14:21:48.000000000 +0100 +--- src/version.c 2009-11-11 14:44:49.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 287, + /**/ + +-- +The most powerful force in the universe is gossip. + + /// 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/gvim/vim-7.2/7.2.288 b/gvim/vim-7.2/7.2.288 new file mode 100644 index 0000000..ab9ecda --- /dev/null +++ b/gvim/vim-7.2/7.2.288 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.288 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.288 +Problem: Python 2.6 pyconfig.h redefines macros. +Solution: Undefine the macros before including pyconfig.h. +Files: src/if_python.c + + +*** ../vim-7.2.287/src/if_python.c 2009-11-03 11:43:05.000000000 +0100 +--- src/if_python.c 2009-11-11 12:33:37.000000000 +0100 +*************** +*** 37,42 **** +--- 37,48 ---- + #ifdef HAVE_STDARG_H + # undef HAVE_STDARG_H /* Python's config.h defines it as well. */ + #endif ++ #ifdef _POSIX_C_SOURCE ++ # undef _POSIX_C_SOURCE /* pyconfig.h defines it as well. */ ++ #endif ++ #ifdef _XOPEN_SOURCE ++ # undef _XOPEN_SOURCE /* pyconfig.h defines it as well. */ ++ #endif + + #define PY_SSIZE_T_CLEAN + +*** ../vim-7.2.287/src/version.c 2009-11-11 14:45:36.000000000 +0100 +--- src/version.c 2009-11-11 15:05:51.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 288, + /**/ + +-- +I am always surprised in the Linux world how quickly solutions can be +obtained. (Imagine sending an email to Bill Gates, asking why Windows +crashed, and how to fix it... and then getting an answer that fixed the +problem... <0>_<0> !) -- Mark Langdon + + /// 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/gvim/vim-7.2/7.2.289 b/gvim/vim-7.2/7.2.289 new file mode 100644 index 0000000..4009bb9 --- /dev/null +++ b/gvim/vim-7.2/7.2.289 @@ -0,0 +1,120 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.289 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.289 +Problem: Checking wrong struct member. +Solution: Change tb_buf to tb_noremap. (Dominique Pelle) +Files: src/getchar.c + + +*** ../vim-7.2.288/src/getchar.c 2009-09-30 15:15:33.000000000 +0200 +--- src/getchar.c 2009-11-11 12:50:58.000000000 +0100 +*************** +*** 22,28 **** + * These buffers are used for storing: + * - stuffed characters: A command that is translated into another command. + * - redo characters: will redo the last change. +! * - recorded chracters: for the "q" command. + * + * The bytes are stored like in the typeahead buffer: + * - K_SPECIAL introduces a special key (two more bytes follow). A literal +--- 22,28 ---- + * These buffers are used for storing: + * - stuffed characters: A command that is translated into another command. + * - redo characters: will redo the last change. +! * - recorded characters: for the "q" command. + * + * The bytes are stored like in the typeahead buffer: + * - K_SPECIAL introduces a special key (two more bytes follow). A literal +*************** +*** 1283,1289 **** + EMSG2(_(e_intern2), "Free typebuf 1"); + else + vim_free(typebuf.tb_buf); +! if (typebuf.tb_buf == noremapbuf_init) + EMSG2(_(e_intern2), "Free typebuf 2"); + else + vim_free(typebuf.tb_noremap); +--- 1283,1289 ---- + EMSG2(_(e_intern2), "Free typebuf 1"); + else + vim_free(typebuf.tb_buf); +! if (typebuf.tb_noremap == noremapbuf_init) + EMSG2(_(e_intern2), "Free typebuf 2"); + else + vim_free(typebuf.tb_noremap); +*************** +*** 1516,1522 **** + * wanted. + * This translates escaped K_SPECIAL and CSI bytes to a K_SPECIAL or CSI byte. + * Collects the bytes of a multibyte character into the whole character. +! * Returns the modifers in the global "mod_mask". + */ + int + vgetc() +--- 1516,1522 ---- + * wanted. + * This translates escaped K_SPECIAL and CSI bytes to a K_SPECIAL or CSI byte. + * Collects the bytes of a multibyte character into the whole character. +! * Returns the modifiers in the global "mod_mask". + */ + int + vgetc() +*************** +*** 3320,3326 **** + retval = 1; + goto theend; + } +! /* An abbrevation cannot contain white space. */ + for (n = 0; n < len; ++n) + if (vim_iswhite(keys[n])) + { +--- 3320,3326 ---- + retval = 1; + goto theend; + } +! /* An abbreviation cannot contain white space. */ + for (n = 0; n < len; ++n) + if (vim_iswhite(keys[n])) + { +*************** +*** 4272,4278 **** + + /* + * Check for word before the cursor: If it ends in a keyword char all +! * chars before it must be al keyword chars or non-keyword chars, but not + * white space. If it ends in a non-keyword char we accept any characters + * before it except white space. + */ +--- 4272,4278 ---- + + /* + * Check for word before the cursor: If it ends in a keyword char all +! * chars before it must be keyword chars or non-keyword chars, but not + * white space. If it ends in a non-keyword char we accept any characters + * before it except white space. + */ +*** ../vim-7.2.288/src/version.c 2009-11-11 15:06:59.000000000 +0100 +--- src/version.c 2009-11-11 16:19:12.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 289, + /**/ + +-- +A M00se once bit my sister ... + "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/gvim/vim-7.2/7.2.290 b/gvim/vim-7.2/7.2.290 new file mode 100644 index 0000000..ba4fd62 --- /dev/null +++ b/gvim/vim-7.2/7.2.290 @@ -0,0 +1,157 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.290 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.290 +Problem: Not freeing memory from ":lmap", ":xmap" and ":menutranslate". +Solution: Free the memory when exiting. (Dominique Pelle) +Files: src/misc2.c + + +*** ../vim-7.2.289/src/misc2.c 2009-11-03 16:44:04.000000000 +0100 +--- src/misc2.c 2009-11-11 16:49:13.000000000 +0100 +*************** +*** 1005,1013 **** +--- 1005,1018 ---- + # ifdef FEAT_MENU + /* Clear menus. */ + do_cmdline_cmd((char_u *)"aunmenu *"); ++ # ifdef FEAT_MULTI_LANG ++ do_cmdline_cmd((char_u *)"menutranslate clear"); ++ # endif + # endif + + /* Clear mappings, abbreviations, breakpoints. */ ++ do_cmdline_cmd((char_u *)"lmapclear"); ++ do_cmdline_cmd((char_u *)"xmapclear"); + do_cmdline_cmd((char_u *)"mapclear"); + do_cmdline_cmd((char_u *)"mapclear!"); + do_cmdline_cmd((char_u *)"abclear"); +*************** +*** 1282,1288 **** + + /* + * Escape "string" for use as a shell argument with system(). +! * This uses single quotes, except when we know we need to use double qoutes + * (MS-DOS and MS-Windows without 'shellslash' set). + * Escape a newline, depending on the 'shell' option. + * When "do_special" is TRUE also replace "!", "%", "#" and things starting +--- 1287,1293 ---- + + /* + * Escape "string" for use as a shell argument with system(). +! * This uses single quotes, except when we know we need to use double quotes + * (MS-DOS and MS-Windows without 'shellslash' set). + * Escape a newline, depending on the 'shell' option. + * When "do_special" is TRUE also replace "!", "%", "#" and things starting +*************** +*** 1537,1543 **** + #if defined(FEAT_VISUALEXTRA) || defined(PROTO) + /* + * Copy a character a number of times. +! * Does not work for multi-byte charactes! + */ + void + copy_chars(ptr, count, c) +--- 1542,1548 ---- + #if defined(FEAT_VISUALEXTRA) || defined(PROTO) + /* + * Copy a character a number of times. +! * Does not work for multi-byte characters! + */ + void + copy_chars(ptr, count, c) +*************** +*** 4260,4266 **** + * or '**76' is transposed to '**N'( 'N' is ASCII value 76). + * For EBCDIC you get different character values. + * If no restrict is given after '**' the default is used. +! * Due to this technic the path looks awful if you print it as a + * string. + */ + len = 0; +--- 4265,4271 ---- + * or '**76' is transposed to '**N'( 'N' is ASCII value 76). + * For EBCDIC you get different character values. + * If no restrict is given after '**' the default is used. +! * Due to this technique the path looks awful if you print it as a + * string. + */ + len = 0; +*************** +*** 4649,4655 **** + && !mch_isdir(stackp->ffs_filearray[i])) + continue; /* not a directory */ + +! /* prepare the filename to be checked for existance + * below */ + STRCPY(file_path, stackp->ffs_filearray[i]); + add_pathsep(file_path); +--- 4654,4660 ---- + && !mch_isdir(stackp->ffs_filearray[i])) + continue; /* not a directory */ + +! /* prepare the filename to be checked for existence + * below */ + STRCPY(file_path, stackp->ffs_filearray[i]); + add_pathsep(file_path); +*************** +*** 5438,5444 **** + #if defined(MSWIN) || defined(MSDOS) || defined(OS2) + /* handle "\tmp" as absolute path */ + || vim_ispathsep(ff_file_to_find[0]) +! /* handle "c:name" as absulute path */ + || (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':') + #endif + #ifdef AMIGA +--- 5443,5449 ---- + #if defined(MSWIN) || defined(MSDOS) || defined(OS2) + /* handle "\tmp" as absolute path */ + || vim_ispathsep(ff_file_to_find[0]) +! /* handle "c:name" as absolute path */ + || (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':') + #endif + #ifdef AMIGA +*************** +*** 5681,5687 **** + p2 = (char_u *)base + (j + gap) * elm_size; + if ((*cmp)((void *)p1, (void *)p2) <= 0) + break; +! /* Exchange the elemets. */ + mch_memmove(buf, p1, elm_size); + mch_memmove(p1, p2, elm_size); + mch_memmove(p2, buf, elm_size); +--- 5686,5692 ---- + p2 = (char_u *)base + (j + gap) * elm_size; + if ((*cmp)((void *)p1, (void *)p2) <= 0) + break; +! /* Exchange the elements. */ + mch_memmove(buf, p1, elm_size); + mch_memmove(p1, p2, elm_size); + mch_memmove(p2, buf, elm_size); +*** ../vim-7.2.289/src/version.c 2009-11-11 16:23:37.000000000 +0100 +--- src/version.c 2009-11-11 16:54:53.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 290, + /**/ + +-- +ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot. + King of all Britons, defeator of the Saxons, sovereign of all England! + [Pause] +SOLDIER: Get away! + "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/gvim/vim-7.2/7.2.291 b/gvim/vim-7.2/7.2.291 new file mode 100644 index 0000000..bab6e3b --- /dev/null +++ b/gvim/vim-7.2/7.2.291 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.291 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.291 +Problem: Reading uninitialised memory in arabic mode. +Solution: Use utfc_ptr2char_len() rather than utfc_ptr2char(). (Dominique + Pelle) +Files: src/screen.c + + +*** ../vim-7.2.290/src/screen.c 2009-11-03 17:36:09.000000000 +0100 +--- src/screen.c 2009-11-11 17:04:53.000000000 +0100 +*************** +*** 6413,6419 **** + } + else + { +! nc = utfc_ptr2char(ptr + mbyte_blen, pcc); + nc1 = pcc[0]; + } + pc = prev_c; +--- 6413,6420 ---- + } + else + { +! nc = utfc_ptr2char_len(ptr + mbyte_blen, pcc, +! (int)((text + len) - ptr - mbyte_blen)); + nc1 = pcc[0]; + } + pc = prev_c; +*** ../vim-7.2.290/src/version.c 2009-11-11 16:56:13.000000000 +0100 +--- src/version.c 2009-11-11 17:06:48.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 291, + /**/ + +-- +The problem with political jokes is that they get elected. + + /// 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/gvim/vim-7.2/7.2.292 b/gvim/vim-7.2/7.2.292 new file mode 100644 index 0000000..c576190 --- /dev/null +++ b/gvim/vim-7.2/7.2.292 @@ -0,0 +1,55 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.292 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.292 +Problem: Block right-shift doesn't work properly with multi-byte encoding + and 'list' set. +Solution: Add the missing "else". (Lech Lorens) +Files: src/ops.c + + +*** ../vim-7.2.291/src/ops.c 2009-11-03 16:44:04.000000000 +0100 +--- src/ops.c 2009-11-11 17:15:04.000000000 +0100 +*************** +*** 422,429 **** + #ifdef FEAT_MBYTE + if (has_mbyte) + bd.textstart += (*mb_ptr2len)(bd.textstart); + #endif +! ++bd.textstart; + } + for ( ; vim_iswhite(*bd.textstart); ) + { +--- 422,430 ---- + #ifdef FEAT_MBYTE + if (has_mbyte) + bd.textstart += (*mb_ptr2len)(bd.textstart); ++ else + #endif +! ++bd.textstart; + } + for ( ; vim_iswhite(*bd.textstart); ) + { +*** ../vim-7.2.291/src/version.c 2009-11-11 17:07:25.000000000 +0100 +--- src/version.c 2009-11-11 17:21:31.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 292, + /**/ + +-- +Computers make very fast, very accurate, mistakes. + + /// 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/gvim/vim-7.2/7.2.293 b/gvim/vim-7.2/7.2.293 new file mode 100644 index 0000000..0f41435 --- /dev/null +++ b/gvim/vim-7.2/7.2.293 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.293 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.293 +Problem: When setting 'comments' option it may be used in a wrong way. +Solution: Don't increment after skipping over digets. (Yukihiro Nakadaira) +Files: src/misc1.c + + +*** ../vim-7.2.292/src/misc1.c 2009-11-03 18:46:53.000000000 +0100 +--- src/misc1.c 2009-11-11 17:27:38.000000000 +0100 +*************** +*** 1026,1037 **** + int c = 0; + int off = 0; + +! for (p = lead_flags; *p && *p != ':'; ++p) + { + if (*p == COM_RIGHT || *p == COM_LEFT) +! c = *p; + else if (VIM_ISDIGIT(*p) || *p == '-') + off = getdigits(&p); + } + if (c == COM_RIGHT) /* right adjusted leader */ + { +--- 1026,1039 ---- + int c = 0; + int off = 0; + +! for (p = lead_flags; *p != NUL && *p != ':'; ) + { + if (*p == COM_RIGHT || *p == COM_LEFT) +! c = *p++; + else if (VIM_ISDIGIT(*p) || *p == '-') + off = getdigits(&p); ++ else ++ ++p; + } + if (c == COM_RIGHT) /* right adjusted leader */ + { +*** ../vim-7.2.292/src/version.c 2009-11-11 17:22:30.000000000 +0100 +--- src/version.c 2009-11-11 17:29:24.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 293, + /**/ + +-- +SOLDIER: What? Ridden on a horse? +ARTHUR: Yes! +SOLDIER: You're using coconuts! + "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/gvim/vim-7.2/7.2.294 b/gvim/vim-7.2/7.2.294 new file mode 100644 index 0000000..fef1e6b --- /dev/null +++ b/gvim/vim-7.2/7.2.294 @@ -0,0 +1,285 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.294 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.294 +Problem: When using TEMPDIRS dir name could get too long. +Solution: Overwrite tail instead of appending each time. Use mkdtemp() when + available. (James Vega) +Files: src/auto/configure, src/config.h.in, src/configure.in, src/fileio.c + + +*** ../vim-7.2.293/src/auto/configure 2009-09-11 13:44:33.000000000 +0200 +--- src/auto/configure 2009-11-17 12:03:15.000000000 +0100 +*************** +*** 14019,14027 **** + + + + for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ +! memset nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ +--- 14019,14028 ---- + + + ++ + for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ +! memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ +*** ../vim-7.2.293/src/config.h.in 2009-05-21 23:25:38.000000000 +0200 +--- src/config.h.in 2009-11-11 17:40:21.000000000 +0100 +*************** +*** 157,162 **** +--- 157,163 ---- + #undef HAVE_LSTAT + #undef HAVE_MEMCMP + #undef HAVE_MEMSET ++ #undef HAVE_MKDTEMP + #undef HAVE_NANOSLEEP + #undef HAVE_OPENDIR + #undef HAVE_FLOAT_FUNCS +*** ../vim-7.2.293/src/configure.in 2009-09-11 13:44:33.000000000 +0200 +--- src/configure.in 2009-11-11 17:40:21.000000000 +0100 +*************** +*** 2635,2641 **** + dnl Check for functions in one big call, to reduce the size of configure + AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ +! memset nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ +--- 2635,2641 ---- + dnl Check for functions in one big call, to reduce the size of configure + AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ +! memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ +*** ../vim-7.2.293/src/fileio.c 2009-09-11 17:24:01.000000000 +0200 +--- src/fileio.c 2009-11-11 18:01:22.000000000 +0100 +*************** +*** 146,151 **** +--- 146,152 ---- + # endif + #endif + static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf)); ++ static void vim_settempdir __ARGS((char_u *tempdir)); + #ifdef FEAT_AUTOCMD + static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name"); + #endif +*************** +*** 6987,6992 **** +--- 6988,7020 ---- + #endif + + /* ++ * Directory "tempdir" was created. Expand this name to a full path and put ++ * it in "vim_tempdir". This avoids that using ":cd" would confuse us. ++ * "tempdir" must be no longer than MAXPATHL. ++ */ ++ static void ++ vim_settempdir(tempdir) ++ char_u *tempdir; ++ { ++ char_u *buf; ++ ++ buf = alloc((unsigned)MAXPATHL + 2); ++ if (buf != NULL) ++ { ++ if (vim_FullName(tempdir, buf, MAXPATHL, FALSE) == FAIL) ++ STRCPY(buf, tempdir); ++ # ifdef __EMX__ ++ if (vim_strchr(buf, '/') != NULL) ++ STRCAT(buf, "/"); ++ else ++ # endif ++ add_pathsep(buf); ++ vim_tempdir = vim_strsave(buf); ++ vim_free(buf); ++ } ++ } ++ ++ /* + * vim_tempname(): Return a unique name that can be used for a temp file. + * + * The temp file is NOT created. +*************** +*** 7007,7014 **** + #ifdef TEMPDIRNAMES + static char *(tempdirs[]) = {TEMPDIRNAMES}; + int i; +- long nr; +- long off; + # ifndef EEXIST + struct stat st; + # endif +--- 7035,7040 ---- +*************** +*** 7027,7032 **** +--- 7053,7064 ---- + */ + for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i) + { ++ size_t itmplen; ++ # ifndef HAVE_MKDTEMP ++ long nr; ++ long off; ++ # endif ++ + /* expand $TMP, leave room for "/v1100000/999999999" */ + expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20); + if (mch_isdir(itmp)) /* directory exists */ +*************** +*** 7040,7046 **** +--- 7072,7085 ---- + else + # endif + add_pathsep(itmp); ++ itmplen = STRLEN(itmp); + ++ # ifdef HAVE_MKDTEMP ++ /* Leave room for filename */ ++ STRCAT(itmp, "vXXXXXX"); ++ if (mkdtemp((char *)itmp) != NULL) ++ vim_settempdir(itmp); ++ # else + /* Get an arbitrary number of up to 6 digits. When it's + * unlikely that it already exists it will be faster, + * otherwise it doesn't matter. The use of mkdir() avoids any +*************** +*** 7052,7110 **** + for (off = 0; off < 10000L; ++off) + { + int r; +! #if defined(UNIX) || defined(VMS) + mode_t umask_save; +! #endif + +! sprintf((char *)itmp + STRLEN(itmp), "v%ld", nr + off); +! # ifndef EEXIST + /* If mkdir() does not set errno to EEXIST, check for + * existing file here. There is a race condition then, + * although it's fail-safe. */ + if (mch_stat((char *)itmp, &st) >= 0) + continue; +! # endif +! #if defined(UNIX) || defined(VMS) + /* Make sure the umask doesn't remove the executable bit. + * "repl" has been reported to use "177". */ + umask_save = umask(077); +! #endif + r = vim_mkdir(itmp, 0700); +! #if defined(UNIX) || defined(VMS) + (void)umask(umask_save); +! #endif + if (r == 0) + { +! char_u *buf; +! +! /* Directory was created, use this name. +! * Expand to full path; When using the current +! * directory a ":cd" would confuse us. */ +! buf = alloc((unsigned)MAXPATHL + 1); +! if (buf != NULL) +! { +! if (vim_FullName(itmp, buf, MAXPATHL, FALSE) +! == FAIL) +! STRCPY(buf, itmp); +! # ifdef __EMX__ +! if (vim_strchr(buf, '/') != NULL) +! STRCAT(buf, "/"); +! else +! # endif +! add_pathsep(buf); +! vim_tempdir = vim_strsave(buf); +! vim_free(buf); +! } + break; + } +! # ifdef EEXIST + /* If the mkdir() didn't fail because the file/dir exists, + * we probably can't create any dir here, try another + * place. */ + if (errno != EEXIST) +! # endif + break; + } + if (vim_tempdir != NULL) + break; + } +--- 7091,7131 ---- + for (off = 0; off < 10000L; ++off) + { + int r; +! # if defined(UNIX) || defined(VMS) + mode_t umask_save; +! # endif + +! sprintf((char *)itmp + itmplen, "v%ld", nr + off); +! # ifndef EEXIST + /* If mkdir() does not set errno to EEXIST, check for + * existing file here. There is a race condition then, + * although it's fail-safe. */ + if (mch_stat((char *)itmp, &st) >= 0) + continue; +! # endif +! # if defined(UNIX) || defined(VMS) + /* Make sure the umask doesn't remove the executable bit. + * "repl" has been reported to use "177". */ + umask_save = umask(077); +! # endif + r = vim_mkdir(itmp, 0700); +! # if defined(UNIX) || defined(VMS) + (void)umask(umask_save); +! # endif + if (r == 0) + { +! vim_settempdir(itmp); + break; + } +! # ifdef EEXIST + /* If the mkdir() didn't fail because the file/dir exists, + * we probably can't create any dir here, try another + * place. */ + if (errno != EEXIST) +! # endif + break; + } ++ # endif /* HAVE_MKDTEMP */ + if (vim_tempdir != NULL) + break; + } +*** ../vim-7.2.293/src/version.c 2009-11-11 17:30:05.000000000 +0100 +--- src/version.c 2009-11-17 11:54:49.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 294, + /**/ + +-- +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/gvim/vim-7.2/7.2.295 b/gvim/vim-7.2/7.2.295 new file mode 100644 index 0000000..331498f --- /dev/null +++ b/gvim/vim-7.2/7.2.295 @@ -0,0 +1,142 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.295 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.295 +Problem: When using map() on a List the index is not known. +Solution: Set v:key to the index. (Hari Krishna Dara) +Files: runtime/doc/eval.txt, src/eval.c + + +*** ../vim-7.2.294/runtime/doc/eval.txt 2009-11-11 14:21:48.000000000 +0100 +--- runtime/doc/eval.txt 2009-11-11 18:22:54.000000000 +0100 +*************** +*** 3802,3808 **** + Replace each item in {expr} with the result of evaluating + {string}. + Inside {string} |v:val| has the value of the current item. +! For a |Dictionary| |v:key| has the key of the current item. + Example: > + :call map(mylist, '"> " . v:val . " <"') + < This puts "> " before and " <" after each item in "mylist". +--- 3812,3819 ---- + Replace each item in {expr} with the result of evaluating + {string}. + Inside {string} |v:val| has the value of the current item. +! For a |Dictionary| |v:key| has the key of the current item +! and for a |List| |v:key| has the index of the current item. + Example: > + :call map(mylist, '"> " . v:val . " <"') + < This puts "> " before and " <" after each item in "mylist". +*** ../vim-7.2.294/src/eval.c 2009-11-11 14:21:48.000000000 +0100 +--- src/eval.c 2009-11-11 18:22:49.000000000 +0100 +*************** +*** 9928,9933 **** +--- 9928,9934 ---- + int todo; + char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()"; + int save_did_emsg; ++ int index = 0; + + if (argvars[0].v_type == VAR_LIST) + { +*************** +*** 9961,9969 **** + save_did_emsg = did_emsg; + did_emsg = FALSE; + + if (argvars[0].v_type == VAR_DICT) + { +- prepare_vimvar(VV_KEY, &save_key); + vimvars[VV_KEY].vv_type = VAR_STRING; + + ht = &d->dv_hashtab; +--- 9962,9970 ---- + save_did_emsg = did_emsg; + did_emsg = FALSE; + ++ prepare_vimvar(VV_KEY, &save_key); + if (argvars[0].v_type == VAR_DICT) + { + vimvars[VV_KEY].vv_type = VAR_STRING; + + ht = &d->dv_hashtab; +*************** +*** 9987,10010 **** + } + } + hash_unlock(ht); +- +- restore_vimvar(VV_KEY, &save_key); + } + else + { + for (li = l->lv_first; li != NULL; li = nli) + { + if (tv_check_lock(li->li_tv.v_lock, ermsg)) + break; + nli = li->li_next; + if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL + || did_emsg) + break; + if (!map && rem) + listitem_remove(l, li); + } + } + + restore_vimvar(VV_VAL, &save_val); + + did_emsg |= save_did_emsg; +--- 9988,10014 ---- + } + } + hash_unlock(ht); + } + else + { ++ vimvars[VV_KEY].vv_type = VAR_NUMBER; ++ + for (li = l->lv_first; li != NULL; li = nli) + { + if (tv_check_lock(li->li_tv.v_lock, ermsg)) + break; + nli = li->li_next; ++ vimvars[VV_KEY].vv_nr = index; + if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL + || did_emsg) + break; + if (!map && rem) + listitem_remove(l, li); ++ ++index; + } + } + ++ restore_vimvar(VV_KEY, &save_key); + restore_vimvar(VV_VAL, &save_val); + + did_emsg |= save_did_emsg; +*** ../vim-7.2.294/src/version.c 2009-11-17 12:08:48.000000000 +0100 +--- src/version.c 2009-11-17 12:18:08.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 295, + /**/ + +-- +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/gvim/vim-7.2/7.2.296 b/gvim/vim-7.2/7.2.296 new file mode 100644 index 0000000..5fc3cb3 --- /dev/null +++ b/gvim/vim-7.2/7.2.296 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.296 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.296 +Problem: Help message about startuptime is wrong. (Dominique Pelle) +Solution: Remove the equal sign. +Files: src/main.c + + +*** ../vim-7.2.295/src/main.c 2009-11-11 14:21:48.000000000 +0100 +--- src/main.c 2009-11-11 22:51:04.000000000 +0100 +*************** +*** 3151,3157 **** + main_msg(_("--servername \tSend to/become the Vim server ")); + #endif + #ifdef STARTUPTIME +! main_msg(_("--startuptime=\tWrite startup timing messages to ")); + #endif + #ifdef FEAT_VIMINFO + main_msg(_("-i \t\tUse instead of .viminfo")); +--- 3151,3157 ---- + main_msg(_("--servername \tSend to/become the Vim server ")); + #endif + #ifdef STARTUPTIME +! main_msg(_("--startuptime \tWrite startup timing messages to ")); + #endif + #ifdef FEAT_VIMINFO + main_msg(_("-i \t\tUse instead of .viminfo")); +*** ../vim-7.2.295/src/version.c 2009-11-17 12:20:30.000000000 +0100 +--- src/version.c 2009-11-17 12:30:29.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 296, + /**/ + +-- +BLACK KNIGHT: I'm invincible! +ARTHUR: You're a looney. + "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/gvim/vim-7.2/7.2.297 b/gvim/vim-7.2/7.2.297 new file mode 100644 index 0000000..cc8d789 --- /dev/null +++ b/gvim/vim-7.2/7.2.297 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.297 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.297 +Problem: Reading freed memory when writing ":reg" output to a register. + (Dominique Pelle) +Solution: Skip the register being written to. +Files: src/ops.c + + +*** ../vim-7.2.296/src/ops.c 2009-11-11 17:22:30.000000000 +0100 +--- src/ops.c 2009-11-11 19:30:47.000000000 +0100 +*************** +*** 3991,3996 **** +--- 3991,4004 ---- + } + else + yb = &(y_regs[i]); ++ ++ #ifdef FEAT_EVAL ++ if (name == MB_TOLOWER(redir_reg) ++ || (redir_reg == '"' && yb == y_previous)) ++ continue; /* do not list register being written to, the ++ * pointer can be freed */ ++ #endif ++ + if (yb->y_array != NULL) + { + msg_putchar('\n'); +*************** +*** 6090,6096 **** + long maxlen; + #endif + +! if (y_ptr->y_array == NULL) /* NULL means emtpy register */ + y_ptr->y_size = 0; + + /* +--- 6098,6104 ---- + long maxlen; + #endif + +! if (y_ptr->y_array == NULL) /* NULL means empty register */ + y_ptr->y_size = 0; + + /* +*** ../vim-7.2.296/src/version.c 2009-11-17 12:31:30.000000000 +0100 +--- src/version.c 2009-11-17 12:42:28.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 297, + /**/ + +-- +"Beware of bugs in the above code; I have only proved +it correct, not tried it." -- Donald Knuth + + /// 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/gvim/vim-7.2/7.2.298 b/gvim/vim-7.2/7.2.298 new file mode 100644 index 0000000..0aabd7a --- /dev/null +++ b/gvim/vim-7.2/7.2.298 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.298 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.298 +Problem: ":vimgrep" crashes when there is an autocommand that sets a + window-local variable. +Solution: Initialize the w: hashtab for re-use. (Yukihiro Nakadaira) +Files: src/fileio.c + + +*** ../vim-7.2.297/src/fileio.c 2009-11-17 12:08:48.000000000 +0100 +--- src/fileio.c 2009-11-17 13:22:06.000000000 +0100 +*************** +*** 8597,8602 **** +--- 8605,8611 ---- + curwin = firstwin; + # ifdef FEAT_EVAL + vars_clear(&aucmd_win->w_vars.dv_hashtab); /* free all w: variables */ ++ hash_init(&aucmd_win->w_vars.dv_hashtab); /* re-use the hashtab */ + # endif + #else + curwin = aco->save_curwin; +*** ../vim-7.2.297/src/version.c 2009-11-17 12:43:19.000000000 +0100 +--- src/version.c 2009-11-17 14:56:19.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 298, + /**/ + +-- +Eye have a spelling checker, it came with my PC; +It plainly marks four my revue mistakes I cannot sea. +I've run this poem threw it, I'm sure your please to no, +It's letter perfect in it's weigh, my checker tolled me sew! + + /// 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/gvim/vim-7.2/7.2.299 b/gvim/vim-7.2/7.2.299 new file mode 100644 index 0000000..88f9e70 --- /dev/null +++ b/gvim/vim-7.2/7.2.299 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.299 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.299 +Problem: Crash when comment middle is longer than start. +Solution: Fix size computation. (Lech Lorens) +Files: src/misc1.c + + +*** ../vim-7.2.298/src/misc1.c 2009-11-11 17:30:05.000000000 +0100 +--- src/misc1.c 2009-11-17 15:59:28.000000000 +0100 +*************** +*** 1121,1127 **** + if (i != lead_repl_len) + { + mch_memmove(p + lead_repl_len, p + i, +! (size_t)(lead_len - i - (leader - p))); + lead_len += lead_repl_len - i; + } + } +--- 1121,1127 ---- + if (i != lead_repl_len) + { + mch_memmove(p + lead_repl_len, p + i, +! (size_t)(lead_len - i - (p - leader))); + lead_len += lead_repl_len - i; + } + } +*** ../vim-7.2.298/src/version.c 2009-11-17 14:57:19.000000000 +0100 +--- src/version.c 2009-11-17 16:01:07.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 299, + /**/ + +-- +BLACK KNIGHT: The Black Knight always triumphs. Have at you! + ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright. +BLACK KNIGHT: All right, we'll call it a draw. + "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/gvim/vim-7.2/7.2.300 b/gvim/vim-7.2/7.2.300 new file mode 100644 index 0000000..f88035e --- /dev/null +++ b/gvim/vim-7.2/7.2.300 @@ -0,0 +1,201 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.300 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.300 +Problem: Vim doesn't close file descriptors when forking and executing + another command, e.g., ":shell". +Solution: Use FD_CLOEXEC when available. (James Vega) +Files: src/auto/configure, src/config.h.in, src/configure.in, + src/ex_cmdds2.c, src/fileio.c, src/memfile.c, src/memline.c + + +*** ../vim-7.2.299/src/auto/configure 2009-11-17 12:08:48.000000000 +0100 +--- src/auto/configure 2009-11-17 13:09:03.000000000 +0100 +*************** +*** 15174,15179 **** +--- 15174,15231 ---- + $as_echo "yes" >&6; } + fi + ++ { $as_echo "$as_me:$LINENO: checking for FD_CLOEXEC" >&5 ++ $as_echo_n "checking for FD_CLOEXEC... " >&6; } ++ cat >conftest.$ac_ext <<_ACEOF ++ /* confdefs.h. */ ++ _ACEOF ++ cat confdefs.h >>conftest.$ac_ext ++ cat >>conftest.$ac_ext <<_ACEOF ++ /* end confdefs.h. */ ++ #if HAVE_FCNTL_H ++ # include ++ #endif ++ int ++ main () ++ { ++ int flag = FD_CLOEXEC; ++ ; ++ 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 ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++ $as_echo "yes" >&6; }; cat >>confdefs.h <<\_ACEOF ++ #define HAVE_FD_CLOEXEC 1 ++ _ACEOF ++ ++ else ++ $as_echo "$as_me: failed program was:" >&5 ++ sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ { $as_echo "$as_me:$LINENO: result: not usable" >&5 ++ $as_echo "not usable" >&6; } ++ fi ++ ++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + { $as_echo "$as_me:$LINENO: checking for rename" >&5 + $as_echo_n "checking for rename... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +*** ../vim-7.2.299/src/config.h.in 2009-11-17 12:08:48.000000000 +0100 +--- src/config.h.in 2009-11-17 13:01:36.000000000 +0100 +*************** +*** 388,390 **** +--- 388,393 ---- + + /* Define if you want XSMP interaction as well as vanilla swapfile safety */ + #undef USE_XSMP_INTERACT ++ ++ /* Define if fcntl()'s F_SETFD command knows about FD_CLOEXEC */ ++ #undef HAVE_FD_CLOEXEC +*** ../vim-7.2.299/src/configure.in 2009-11-17 12:08:48.000000000 +0100 +--- src/configure.in 2009-11-17 13:01:36.000000000 +0100 +*************** +*** 2855,2860 **** +--- 2855,2870 ---- + AC_MSG_RESULT(yes) + fi + ++ dnl make sure the FD_CLOEXEC flag for fcntl()'s F_SETFD command is known ++ AC_MSG_CHECKING(for FD_CLOEXEC) ++ AC_TRY_COMPILE( ++ [#if HAVE_FCNTL_H ++ # include ++ #endif], ++ [ int flag = FD_CLOEXEC;], ++ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FD_CLOEXEC), ++ AC_MSG_RESULT(not usable)) ++ + dnl rename needs to be checked separately to work on Nextstep with cc + AC_MSG_CHECKING(for rename) + AC_TRY_LINK([#include ], [rename("this", "that")], +*** ../vim-7.2.299/src/fileio.c 2009-11-17 14:57:19.000000000 +0100 +--- src/fileio.c 2009-11-17 13:22:06.000000000 +0100 +*************** +*** 2254,2259 **** +--- 2254,2267 ---- + + if (!read_buffer && !read_stdin) + close(fd); /* errors are ignored */ ++ #ifdef HAVE_FD_CLOEXEC ++ else ++ { ++ int fdflags = fcntl(fd, F_GETFD); ++ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) ++ fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC); ++ } ++ #endif + vim_free(buffer); + + #ifdef HAVE_DUP +*** ../vim-7.2.299/src/memfile.c 2008-07-13 19:39:39.000000000 +0200 +--- src/memfile.c 2009-11-17 13:22:15.000000000 +0100 +*************** +*** 1343,1348 **** +--- 1343,1353 ---- + } + else + { ++ #ifdef HAVE_FD_CLOEXEC ++ int fdflags = fcntl(mfp->mf_fd, F_GETFD); ++ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) ++ fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC); ++ #endif + #ifdef HAVE_SELINUX + mch_copy_sec(fname, mfp->mf_fname); + #endif +*** ../vim-7.2.299/src/memline.c 2009-11-03 15:32:58.000000000 +0100 +--- src/memline.c 2009-11-17 13:21:40.000000000 +0100 +*************** +*** 382,388 **** + dp->db_index[0] = --dp->db_txt_start; /* at end of block */ + dp->db_free -= 1 + INDEX_SIZE; + dp->db_line_count = 1; +! *((char_u *)dp + dp->db_txt_start) = NUL; /* emtpy line */ + + return OK; + +--- 382,388 ---- + dp->db_index[0] = --dp->db_txt_start; /* at end of block */ + dp->db_free -= 1 + INDEX_SIZE; + dp->db_line_count = 1; +! *((char_u *)dp + dp->db_txt_start) = NUL; /* empty line */ + + return OK; + +*************** +*** 490,495 **** +--- 490,502 ---- + EMSG(_("E301: Oops, lost the swap file!!!")); + return; + } ++ #ifdef HAVE_FD_CLOEXEC ++ { ++ int fdflags = fcntl(mfp->mf_fd, F_GETFD); ++ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) ++ fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC); ++ } ++ #endif + } + if (!success) + EMSG(_("E302: Could not rename swap file")); +*** ../vim-7.2.299/src/version.c 2009-11-17 16:08:12.000000000 +0100 +--- src/version.c 2009-11-17 17:09:43.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 300, + /**/ + +-- + | + +Ceci n'est pas une pipe. + + /// 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/gvim/vim-7.2/7.2.301 b/gvim/vim-7.2/7.2.301 new file mode 100644 index 0000000..e63cc08 --- /dev/null +++ b/gvim/vim-7.2/7.2.301 @@ -0,0 +1,777 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.301 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +NOTE: some mail and patch programs may have a problem with the non-ASCII +characters in this patch. You can fetch the patch from +ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.301 and/or fetch the updated +files from CVS. http://www.vim.org/cvs.php + + +Patch 7.2.301 +Problem: Formatting is wrong when 'tw' is set to a small value. +Solution: Fix it and add tests. Also fix behavior of "1" in 'fo'. (Yukihiro + Nakadaira) +Files: src/edit.c, src/testdir/Makefile, src/testdir/test68.in, + src/testdir/test68.ok, src/testdir/test69.in, + src/testdir/test69.ok + + +*** ../vim-7.2.300/src/edit.c 2009-11-11 13:22:32.000000000 +0100 +--- src/edit.c 2009-11-17 15:34:47.000000000 +0100 +*************** +*** 181,187 **** + static void ins_ctrl_v __ARGS((void)); + static void undisplay_dollar __ARGS((void)); + static void insert_special __ARGS((int, int, int)); +! static void internal_format __ARGS((int textwidth, int second_indent, int flags, int format_only)); + static void check_auto_format __ARGS((int)); + static void redo_literal __ARGS((int c)); + static void start_arrow __ARGS((pos_T *end_insert_pos)); +--- 181,187 ---- + static void ins_ctrl_v __ARGS((void)); + static void undisplay_dollar __ARGS((void)); + static void insert_special __ARGS((int, int, int)); +! static void internal_format __ARGS((int textwidth, int second_indent, int flags, int format_only, int c)); + static void check_auto_format __ARGS((int)); + static void redo_literal __ARGS((int c)); + static void start_arrow __ARGS((pos_T *end_insert_pos)); +*************** +*** 2164,2170 **** + int i, c; + int actual_len; /* Take multi-byte characters */ + int actual_compl_length; /* into account. */ +! int *wca; /* Wide character array. */ + int has_lower = FALSE; + int was_letter = FALSE; + +--- 2164,2170 ---- + int i, c; + int actual_len; /* Take multi-byte characters */ + int actual_compl_length; /* into account. */ +! int *wca; /* Wide character array. */ + int has_lower = FALSE; + int was_letter = FALSE; + +*************** +*** 5558,5564 **** + } + if (do_internal) + #endif +! internal_format(textwidth, second_indent, flags, c == NUL); + } + + if (c == NUL) /* only formatting was wanted */ +--- 5558,5564 ---- + } + if (do_internal) + #endif +! internal_format(textwidth, second_indent, flags, c == NUL, c); + } + + if (c == NUL) /* only formatting was wanted */ +*************** +*** 5738,5748 **** + * Format text at the current insert position. + */ + static void +! internal_format(textwidth, second_indent, flags, format_only) + int textwidth; + int second_indent; + int flags; + int format_only; + { + int cc; + int save_char = NUL; +--- 5738,5749 ---- + * Format text at the current insert position. + */ + static void +! internal_format(textwidth, second_indent, flags, format_only, c) + int textwidth; + int second_indent; + int flags; + int format_only; ++ int c; /* character to be inserted (can be NUL) */ + { + int cc; + int save_char = NUL; +*************** +*** 5763,5769 **** + * When 'ai' is off we don't want a space under the cursor to be + * deleted. Replace it with an 'x' temporarily. + */ +! if (!curbuf->b_p_ai) + { + cc = gchar_cursor(); + if (vim_iswhite(cc)) +--- 5764,5774 ---- + * When 'ai' is off we don't want a space under the cursor to be + * deleted. Replace it with an 'x' temporarily. + */ +! if (!curbuf->b_p_ai +! #ifdef FEAT_VREPLACE +! && !(State & VREPLACE_FLAG) +! #endif +! ) + { + cc = gchar_cursor(); + if (vim_iswhite(cc)) +*************** +*** 5789,5797 **** + char_u *saved_text = NULL; + #endif + colnr_T col; + +! virtcol = get_nolist_virtcol(); +! if (virtcol < (colnr_T)textwidth) + break; + + #ifdef FEAT_COMMENTS +--- 5794,5804 ---- + char_u *saved_text = NULL; + #endif + colnr_T col; ++ colnr_T end_col; + +! virtcol = get_nolist_virtcol() +! + char2cells(c != NUL ? c : gchar_cursor()); +! if (virtcol <= (colnr_T)textwidth) + break; + + #ifdef FEAT_COMMENTS +*************** +*** 5831,5842 **** + coladvance((colnr_T)textwidth); + wantcol = curwin->w_cursor.col; + +! curwin->w_cursor.col = startcol - 1; +! #ifdef FEAT_MBYTE +! /* Correct cursor for multi-byte character. */ +! if (has_mbyte) +! mb_adjust_cursor(); +! #endif + foundcol = 0; + + /* +--- 5838,5844 ---- + coladvance((colnr_T)textwidth); + wantcol = curwin->w_cursor.col; + +! curwin->w_cursor.col = startcol; + foundcol = 0; + + /* +*************** +*** 5847,5857 **** + || curwin->w_cursor.lnum != Insstart.lnum + || curwin->w_cursor.col >= Insstart.col) + { +! cc = gchar_cursor(); + if (WHITECHAR(cc)) + { + /* remember position of blank just before text */ +! end_foundcol = curwin->w_cursor.col; + + /* find start of sequence of blanks */ + while (curwin->w_cursor.col > 0 && WHITECHAR(cc)) +--- 5849,5862 ---- + || curwin->w_cursor.lnum != Insstart.lnum + || curwin->w_cursor.col >= Insstart.col) + { +! if (curwin->w_cursor.col == startcol && c != NUL) +! cc = c; +! else +! cc = gchar_cursor(); + if (WHITECHAR(cc)) + { + /* remember position of blank just before text */ +! end_col = curwin->w_cursor.col; + + /* find start of sequence of blanks */ + while (curwin->w_cursor.col > 0 && WHITECHAR(cc)) +*************** +*** 5871,5877 **** + /* do not break after one-letter words */ + if (curwin->w_cursor.col == 0) + break; /* one-letter word at begin */ +! + col = curwin->w_cursor.col; + dec_cursor(); + cc = gchar_cursor(); +--- 5876,5886 ---- + /* do not break after one-letter words */ + if (curwin->w_cursor.col == 0) + break; /* one-letter word at begin */ +! #ifdef FEAT_COMMENTS +! /* do not break "#a b" when 'tw' is 2 */ +! if (curwin->w_cursor.col <= leader_len) +! break; +! #endif + col = curwin->w_cursor.col; + dec_cursor(); + cc = gchar_cursor(); +*************** +*** 5880,5905 **** + continue; /* one-letter, continue */ + curwin->w_cursor.col = col; + } +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! foundcol = curwin->w_cursor.col +! + (*mb_ptr2len)(ml_get_cursor()); +! else +! #endif +! foundcol = curwin->w_cursor.col + 1; +! if (curwin->w_cursor.col < (colnr_T)wantcol) + break; + } + #ifdef FEAT_MBYTE +! else if (cc >= 0x100 && fo_multibyte +! && curwin->w_cursor.col <= (colnr_T)wantcol) + { + /* Break after or before a multi-byte character. */ + foundcol = curwin->w_cursor.col; +- if (curwin->w_cursor.col < (colnr_T)wantcol) +- foundcol += (*mb_char2len)(cc); + end_foundcol = foundcol; +! break; + } + #endif + if (curwin->w_cursor.col == 0) +--- 5889,5948 ---- + continue; /* one-letter, continue */ + curwin->w_cursor.col = col; + } +! +! inc_cursor(); +! +! end_foundcol = end_col + 1; +! foundcol = curwin->w_cursor.col; +! if (curwin->w_cursor.col <= (colnr_T)wantcol) + break; + } + #ifdef FEAT_MBYTE +! else if (cc >= 0x100 && fo_multibyte) + { + /* Break after or before a multi-byte character. */ ++ if (curwin->w_cursor.col != startcol) ++ { ++ #ifdef FEAT_COMMENTS ++ /* Don't break until after the comment leader */ ++ if (curwin->w_cursor.col < leader_len) ++ break; ++ #endif ++ col = curwin->w_cursor.col; ++ inc_cursor(); ++ /* Don't change end_foundcol if already set. */ ++ if (foundcol != curwin->w_cursor.col) ++ { ++ foundcol = curwin->w_cursor.col; ++ end_foundcol = foundcol; ++ if (curwin->w_cursor.col <= (colnr_T)wantcol) ++ break; ++ } ++ curwin->w_cursor.col = col; ++ } ++ ++ if (curwin->w_cursor.col == 0) ++ break; ++ ++ col = curwin->w_cursor.col; ++ ++ dec_cursor(); ++ cc = gchar_cursor(); ++ ++ if (WHITECHAR(cc)) ++ continue; /* break with space */ ++ #ifdef FEAT_COMMENTS ++ /* Don't break until after the comment leader */ ++ if (curwin->w_cursor.col < leader_len) ++ break; ++ #endif ++ ++ curwin->w_cursor.col = col; ++ + foundcol = curwin->w_cursor.col; + end_foundcol = foundcol; +! if (curwin->w_cursor.col <= (colnr_T)wantcol) +! break; + } + #endif + if (curwin->w_cursor.col == 0) +*************** +*** 5926,5939 **** + orig_col = startcol; /* Will start backspacing from here */ + else + #endif +! replace_offset = startcol - end_foundcol - 1; + + /* + * adjust startcol for spaces that will be deleted and + * characters that will remain on top line + */ + curwin->w_cursor.col = foundcol; +! while (cc = gchar_cursor(), WHITECHAR(cc)) + inc_cursor(); + startcol -= curwin->w_cursor.col; + if (startcol < 0) +--- 5969,5983 ---- + orig_col = startcol; /* Will start backspacing from here */ + else + #endif +! replace_offset = startcol - end_foundcol; + + /* + * adjust startcol for spaces that will be deleted and + * characters that will remain on top line + */ + curwin->w_cursor.col = foundcol; +! while ((cc = gchar_cursor(), WHITECHAR(cc)) +! && (!fo_white_par || curwin->w_cursor.col < startcol)) + inc_cursor(); + startcol -= curwin->w_cursor.col; + if (startcol < 0) +*************** +*** 8509,8515 **** + if (mode == BACKSPACE_LINE + && (curbuf->b_p_ai + #ifdef FEAT_CINDENT +! || cindent_on() + #endif + ) + #ifdef FEAT_RIGHTLEFT +--- 8553,8559 ---- + if (mode == BACKSPACE_LINE + && (curbuf->b_p_ai + #ifdef FEAT_CINDENT +! || cindent_on() + #endif + ) + #ifdef FEAT_RIGHTLEFT +*** ../vim-7.2.300/src/testdir/Makefile 2009-11-17 17:36:13.000000000 +0100 +--- src/testdir/Makefile 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 22,28 **** + test48.out test49.out test51.out test52.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 test66.out test67.out + + SCRIPTS_GUI = test16.out + +--- 22,29 ---- + test48.out test49.out test51.out test52.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 test66.out test67.out test68.out \ +! test69.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.2.300/src/testdir/test68.in 2009-11-17 17:39:36.000000000 +0100 +--- src/testdir/test68.in 2009-11-17 15:39:09.000000000 +0100 +*************** +*** 0 **** +--- 1,56 ---- ++ Test for text formatting. ++ ++ Results of test68: ++ ++ STARTTEST ++ :so small.vim ++ /^{/+1 ++ :set noai tw=2 fo=t ++ gRa b ++ ENDTEST ++ ++ { ++ ++ ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set ai tw=2 fo=tw ++ gqgqjjllab ++ ENDTEST ++ ++ { ++ a b ++ ++ a ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=3 fo=t ++ gqgqo ++ a  ++ ENDTEST ++ ++ { ++ a  ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=tcq1 comments=:# ++ gqgqjgqgqo ++ a b ++ #a b ++ ENDTEST ++ ++ { ++ a b ++ #a b ++ } ++ ++ STARTTEST ++ :g/^STARTTEST/.,/^ENDTEST/d ++ :1;/^Results/,$wq! test.out ++ ENDTEST +*** ../vim-7.2.300/src/testdir/test68.ok 2009-11-17 17:39:36.000000000 +0100 +--- src/testdir/test68.ok 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 0 **** +--- 1,35 ---- ++ Results of test68: ++ ++ ++ { ++ a ++ b ++ } ++ ++ ++ { ++ a ++ b ++ ++ a ++ b ++ } ++ ++ ++ { ++ a ++  ++ ++ a ++  ++ } ++ ++ ++ { ++ a b ++ #a b ++ ++ a b ++ #a b ++ } ++ +*** ../vim-7.2.300/src/testdir/test69.in 2009-11-17 17:39:36.000000000 +0100 +--- src/testdir/test69.in 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 0 **** +--- 1,139 ---- ++ Test for multi-byte text formatting. ++ ++ STARTTEST ++ :so mbyte.vim ++ :set encoding=utf-8 ++ ENDTEST ++ ++ Results of test69: ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=t ++ gqgqjgqgqo ++ XYZ ++ abc XYZ ++ ENDTEST ++ ++ { ++ XYZ ++ abc XYZ ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=1 fo=tm ++ gqgqjgqgqjgqgqjgqgqjgqgqo ++ X ++ Xa ++ X a ++ XY ++ X ï¼¹ ++ ENDTEST ++ ++ { ++ X ++ Xa ++ X a ++ XY ++ X ï¼¹ ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=tm ++ gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo ++ X ++ Xa ++ X a ++ XY ++ X ï¼¹ ++ aX ++ abX ++ abcX ++ abX c ++ abXY ++ ENDTEST ++ ++ { ++ X ++ Xa ++ X a ++ XY ++ X ï¼¹ ++ aX ++ abX ++ abcX ++ abX c ++ abXY ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set ai tw=2 fo=tm ++ gqgqjgqgqo ++ X ++ Xa ++ ENDTEST ++ ++ { ++ X ++ Xa ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set noai tw=2 fo=tm ++ gqgqjgqgqo ++ X ++ Xa ++ ENDTEST ++ ++ { ++ X ++ Xa ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=cqm comments=n:X ++ gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo ++ X ++ Xa ++ Xaï¼¹ ++ XY ++ XYZ ++ X ï¼¹ ++ X YZ ++ XX ++ XXa ++ XXY ++ ENDTEST ++ ++ { ++ X ++ Xa ++ Xaï¼¹ ++ XY ++ XYZ ++ X ï¼¹ ++ X YZ ++ XX ++ XXa ++ XXY ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=tm ++ RXa ++ ENDTEST ++ ++ { ++ ++ } ++ ++ STARTTEST ++ :g/^STARTTEST/.,/^ENDTEST/d ++ :1;/^Results/,$wq! test.out ++ ENDTEST +*** ../vim-7.2.300/src/testdir/test69.ok 2009-11-17 17:39:36.000000000 +0100 +--- src/testdir/test69.ok 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 0 **** +--- 1,142 ---- ++ Results of test69: ++ ++ ++ { ++ XYZ ++ abc ++ XYZ ++ ++ XYZ ++ abc ++ XYZ ++ } ++ ++ ++ { ++ X ++ X ++ a ++ X ++ a ++ X ++ ï¼¹ ++ X ++ ï¼¹ ++ ++ X ++ X ++ a ++ X ++ a ++ X ++ ï¼¹ ++ X ++ ï¼¹ ++ } ++ ++ ++ { ++ X ++ X ++ a ++ X ++ a ++ X ++ ï¼¹ ++ X ++ ï¼¹ ++ a ++ X ++ ab ++ X ++ abc ++ X ++ ab ++ X ++ c ++ ab ++ X ++ ï¼¹ ++ ++ X ++ X ++ a ++ X ++ a ++ X ++ ï¼¹ ++ X ++ ï¼¹ ++ a ++ X ++ ab ++ X ++ abc ++ X ++ ab ++ X ++ c ++ ab ++ X ++ ï¼¹ ++ } ++ ++ ++ { ++ X ++ X ++ a ++ ++ X ++ X ++ a ++ } ++ ++ ++ { ++ X ++ X ++ a ++ ++ X ++ X ++ a ++ } ++ ++ ++ { ++ X ++ Xa ++ Xa ++ XY ++ XY ++ XY ++ XZ ++ X ï¼¹ ++ X ï¼¹ ++ X Z ++ XX ++ XXa ++ XXY ++ ++ X ++ Xa ++ Xa ++ XY ++ XY ++ XY ++ XZ ++ X ï¼¹ ++ X ï¼¹ ++ X Z ++ XX ++ XXa ++ XXY ++ } ++ ++ ++ { ++ X ++ a ++ } ++ +*** ../vim-7.2.300/src/version.c 2009-11-17 17:37:34.000000000 +0100 +--- src/version.c 2009-11-17 17:26:35.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 301, + /**/ diff --git a/gvim/vim-7.2/7.2.302 b/gvim/vim-7.2/7.2.302 new file mode 100644 index 0000000..c4d5a99 --- /dev/null +++ b/gvim/vim-7.2/7.2.302 @@ -0,0 +1,140 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.302 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.302 (extra part of 7.2.301) +Problem: Formatting wrong with small 'tw' value. +Solution: Add build rules for tests. +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms + + +*** ../vim-7.2.301/src/testdir/Make_amiga.mak 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_amiga.mak 2009-11-17 15:29:05.000000000 +0100 +*************** +*** 26,32 **** + 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 \ +! test66.out test67.out + + .SUFFIXES: .in .out + +--- 26,32 ---- + 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 \ +! test66.out test67.out test68.out test69.out + + .SUFFIXES: .in .out + +*************** +*** 113,115 **** +--- 113,117 ---- + test65.out: test65.in + test66.out: test66.in + test67.out: test67.in ++ test68.out: test68.in ++ test69.out: test69.in +*** ../vim-7.2.301/src/testdir/Make_dos.mak 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_dos.mak 2009-11-17 15:29:54.000000000 +0100 +*************** +*** 26,32 **** + 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 test66.out test67.out + + SCRIPTS32 = test50.out + +--- 26,33 ---- + 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 test66.out test67.out \ +! test68.out test69.out + + SCRIPTS32 = test50.out + +*** ../vim-7.2.301/src/testdir/Make_ming.mak 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_ming.mak 2009-11-17 15:30:07.000000000 +0100 +*************** +*** 45,51 **** + 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 test66.out test67.out + + SCRIPTS32 = test50.out + +--- 45,52 ---- + 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 test66.out test67.out \ +! test68.out test69.out + + SCRIPTS32 = test50.out + +*** ../vim-7.2.301/src/testdir/Make_os2.mak 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_os2.mak 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 26,32 **** + 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 \ +! test66.out test67.out + + .SUFFIXES: .in .out + +--- 26,32 ---- + 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 \ +! test66.out test67.out test68.out test69.out + + .SUFFIXES: .in .out + +*** ../vim-7.2.301/src/testdir/Make_vms.mms 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_vms.mms 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 69,75 **** + 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 \ +! test66.out test67.out + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +--- 69,75 ---- + 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 \ +! test66.out test67.out test68.out test69.out + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +*** ../vim-7.2.301/src/version.c 2009-11-17 17:40:34.000000000 +0100 +--- src/version.c 2009-11-17 17:43:26.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 302, + /**/ + +-- +Hacker: Someone skilled in computer programming (good guy). +Cracker: A hacker that uses his skills to crack software (bad guy). + + /// 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/gvim/vim-7.2/7.2.303 b/gvim/vim-7.2/7.2.303 new file mode 100644 index 0000000..b53d198 --- /dev/null +++ b/gvim/vim-7.2/7.2.303 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.303 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.303 (after 7.2.294) +Problem: Can't build on MS-Windows. +Solution: Add #ifdef around vim_settempdir(). (James Vega) +Files: src/fileio.c + + +*** ../vim-7.2.302/src/fileio.c 2009-11-17 17:13:03.000000000 +0100 +--- src/fileio.c 2009-11-18 20:06:55.000000000 +0100 +*************** +*** 146,152 **** +--- 146,154 ---- + # endif + #endif + static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf)); ++ #ifdef TEMPDIRNAMES + static void vim_settempdir __ARGS((char_u *tempdir)); ++ #endif + #ifdef FEAT_AUTOCMD + static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name"); + #endif +*************** +*** 6995,7000 **** +--- 6997,7003 ---- + } + #endif + ++ #ifdef TEMPDIRNAMES + /* + * Directory "tempdir" was created. Expand this name to a full path and put + * it in "vim_tempdir". This avoids that using ":cd" would confuse us. +*************** +*** 7021,7026 **** +--- 7024,7030 ---- + vim_free(buf); + } + } ++ #endif + + /* + * vim_tempname(): Return a unique name that can be used for a temp file. +*** ../vim-7.2.302/src/version.c 2009-11-17 17:57:10.000000000 +0100 +--- src/version.c 2009-11-18 20:07:58.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 303, + /**/ + +-- +BEDEVERE: Why do you think she is a witch? +SECOND VILLAGER: She turned me into a newt. +BEDEVERE: A newt? +SECOND VILLAGER: (After looking at himself for some time) I got better. + "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/gvim/vim-7.2/7.2.304 b/gvim/vim-7.2/7.2.304 new file mode 100644 index 0000000..8a138c0 --- /dev/null +++ b/gvim/vim-7.2/7.2.304 @@ -0,0 +1,58 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.304 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.304 +Problem: Compiler warning for bad pointer cast. +Solution: Use another variable for int pointer. +Files: src/ops.c + + +*** ../vim-7.2.303/src/ops.c 2009-11-17 12:43:19.000000000 +0100 +--- src/ops.c 2009-11-18 15:40:26.000000000 +0100 +*************** +*** 5597,5603 **** + vc.vc_type = CONV_NONE; + if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK) + { +! conv_str = string_convert(&vc, str, (int*)&len); + if (conv_str != NULL) + { + vim_free(str); +--- 5597,5606 ---- + vc.vc_type = CONV_NONE; + if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK) + { +! int intlen = len; +! +! conv_str = string_convert(&vc, str, &intlen); +! len = intlen; + if (conv_str != NULL) + { + vim_free(str); +*** ../vim-7.2.303/src/version.c 2009-11-18 20:12:15.000000000 +0100 +--- src/version.c 2009-11-25 12:37:36.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 304, + /**/ + +-- +I recommend ordering large cargo containers of paper towels to make up +whatever budget underruns you have. Paper products are always useful and they +have the advantage of being completely flushable if you need to make room in +the storage area later. + (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/gvim/vim-7.2/7.2.305 b/gvim/vim-7.2/7.2.305 new file mode 100644 index 0000000..c8ad708 --- /dev/null +++ b/gvim/vim-7.2/7.2.305 @@ -0,0 +1,105 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.305 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.305 +Problem: Recursively redrawing causes a memory leak. (Dominique Pelle) +Solution: Disallow recursive screen updating. +Files: src/screen.c + + +*** ../vim-7.2.304/src/screen.c 2009-11-11 17:07:25.000000000 +0100 +--- src/screen.c 2009-11-17 16:30:53.000000000 +0100 +*************** +*** 323,328 **** +--- 323,329 ---- + int did_one; + #endif + ++ /* Don't do anything if the screen structures are (not yet) valid. */ + if (!screen_valid(TRUE)) + return; + +*************** +*** 342,348 **** + if (curwin->w_lines_valid == 0 && type < NOT_VALID) + type = NOT_VALID; + +! if (!redrawing()) + { + redraw_later(type); /* remember type for next time */ + must_redraw = type; +--- 343,351 ---- + if (curwin->w_lines_valid == 0 && type < NOT_VALID) + type = NOT_VALID; + +! /* Postpone the redrawing when it's not needed and when being called +! * recursively. */ +! if (!redrawing() || updating_screen) + { + redraw_later(type); /* remember type for next time */ + must_redraw = type; +*************** +*** 582,587 **** +--- 585,591 ---- + + /* + * Prepare for updating one or more windows. ++ * Caller must check for "updating_screen" already set to avoid recursiveness. + */ + static void + update_prepare() +*************** +*** 663,669 **** + doit = TRUE; + } + +! if (!doit) + return; + + /* update all windows that need updating */ +--- 667,675 ---- + doit = TRUE; + } + +! /* Return when there is nothing to do or screen updating already +! * happening. */ +! if (!doit || updating_screen) + return; + + /* update all windows that need updating */ +*************** +*** 696,701 **** +--- 702,711 ---- + updateWindow(wp) + win_T *wp; + { ++ /* return if already busy updating */ ++ if (updating_screen) ++ return; ++ + update_prepare(); + + #ifdef FEAT_CLIPBOARD +*** ../vim-7.2.304/src/version.c 2009-11-25 12:38:49.000000000 +0100 +--- src/version.c 2009-11-25 13:01:48.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 305, + /**/ + +-- +If the Universe is constantly expanding, why can't I ever find a parking space? + + /// 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/gvim/vim-7.2/7.2.306 b/gvim/vim-7.2/7.2.306 new file mode 100644 index 0000000..d54e90d --- /dev/null +++ b/gvim/vim-7.2/7.2.306 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.306 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.306 +Problem: shellescape("10%%", 1) only escapes first %. (Christian Brabandt) +Solution: Don't copy the character after the escaped one. +Files: src/misc2.c + + +*** ../vim-7.2.305/src/misc2.c 2009-11-11 16:56:13.000000000 +0100 +--- src/misc2.c 2009-11-25 17:11:49.000000000 +0100 +*************** +*** 1390,1395 **** +--- 1390,1396 ---- + *d++ = '\\'; /* insert backslash */ + while (--l >= 0) /* copy the var */ + *d++ = *p++; ++ continue; + } + + MB_COPY_CHAR(p, d); +*** ../vim-7.2.305/src/version.c 2009-11-25 13:03:29.000000000 +0100 +--- src/version.c 2009-11-25 17:13:54.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 306, + /**/ + +-- +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/gvim/vim-7.2/7.2.307 b/gvim/vim-7.2/7.2.307 new file mode 100644 index 0000000..23504e2 --- /dev/null +++ b/gvim/vim-7.2/7.2.307 @@ -0,0 +1,181 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.307 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.307 +Problem: Crash with a very long syntax match statement. (Guy Gur Ari) +Solution: When the offset does not fit in the two bytes available give an + error instead of continuing with invalid pointers. +Files: src/regexp.c + + +*** ../vim-7.2.306/src/regexp.c 2009-05-15 21:31:11.000000000 +0200 +--- src/regexp.c 2009-11-25 18:13:03.000000000 +0100 +*************** +*** 583,588 **** +--- 583,589 ---- + #endif + static char_u *regcode; /* Code-emit pointer, or JUST_CALC_SIZE */ + static long regsize; /* Code size. */ ++ static int reg_toolong; /* TRUE when offset out of range */ + static char_u had_endbrace[NSUBEXP]; /* flags, TRUE if end of () found */ + static unsigned regflags; /* RF_ flags for prog */ + static long brace_min[10]; /* Minimums for complex brace repeats */ +*************** +*** 1028,1036 **** + regcomp_start(expr, re_flags); + regcode = r->program; + regc(REGMAGIC); +! if (reg(REG_NOPAREN, &flags) == NULL) + { + vim_free(r); + return NULL; + } + +--- 1029,1039 ---- + regcomp_start(expr, re_flags); + regcode = r->program; + regc(REGMAGIC); +! if (reg(REG_NOPAREN, &flags) == NULL || reg_toolong) + { + vim_free(r); ++ if (reg_toolong) ++ EMSG_RET_NULL(_("E339: Pattern too long")); + return NULL; + } + +*************** +*** 1141,1146 **** +--- 1144,1150 ---- + re_has_z = 0; + #endif + regsize = 0L; ++ reg_toolong = FALSE; + regflags = 0; + #if defined(FEAT_SYN_HL) || defined(PROTO) + had_eol = FALSE; +*************** +*** 1228,1234 **** + { + skipchr(); + br = regbranch(&flags); +! if (br == NULL) + return NULL; + regtail(ret, br); /* BRANCH -> BRANCH. */ + if (!(flags & HASWIDTH)) +--- 1232,1238 ---- + { + skipchr(); + br = regbranch(&flags); +! if (br == NULL || reg_toolong) + return NULL; + regtail(ret, br); /* BRANCH -> BRANCH. */ + if (!(flags & HASWIDTH)) +*************** +*** 1313,1318 **** +--- 1317,1324 ---- + break; + skipchr(); + regtail(latest, regnode(END)); /* operand ends */ ++ if (reg_toolong) ++ break; + reginsert(MATCH, latest); + chain = latest; + } +*************** +*** 1382,1388 **** + break; + default: + latest = regpiece(&flags); +! if (latest == NULL) + return NULL; + *flagp |= flags & (HASWIDTH | HASNL | HASLOOKBH); + if (chain == NULL) /* First piece. */ +--- 1388,1394 ---- + break; + default: + latest = regpiece(&flags); +! if (latest == NULL || reg_toolong) + return NULL; + *flagp |= flags & (HASWIDTH | HASNL | HASLOOKBH); + if (chain == NULL) /* First piece. */ +*************** +*** 2540,2547 **** + offset = (int)(scan - val); + else + offset = (int)(val - scan); +! *(scan + 1) = (char_u) (((unsigned)offset >> 8) & 0377); +! *(scan + 2) = (char_u) (offset & 0377); + } + + /* +--- 2546,2561 ---- + offset = (int)(scan - val); + else + offset = (int)(val - scan); +! /* When the offset uses more than 16 bits it can no longer fit in the two +! * bytes avaliable. Use a global flag to avoid having to check return +! * values in too many places. */ +! if (offset > 0xffff) +! reg_toolong = TRUE; +! else +! { +! *(scan + 1) = (char_u) (((unsigned)offset >> 8) & 0377); +! *(scan + 2) = (char_u) (offset & 0377); +! } + } + + /* +*************** +*** 5764,5769 **** +--- 5778,5785 ---- + + /* + * regnext - dig the "next" pointer out of a node ++ * Returns NULL when calculating size, when there is no next item and when ++ * there is an error. + */ + static char_u * + regnext(p) +*************** +*** 5771,5777 **** + { + int offset; + +! if (p == JUST_CALC_SIZE) + return NULL; + + offset = NEXT(p); +--- 5787,5793 ---- + { + int offset; + +! if (p == JUST_CALC_SIZE || reg_toolong) + return NULL; + + offset = NEXT(p); +*** ../vim-7.2.306/src/version.c 2009-11-25 17:15:16.000000000 +0100 +--- src/version.c 2009-11-25 18:14:32.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 307, + /**/ + +-- +The fastest way to get an engineer to solve a problem is to declare that the +problem is unsolvable. No engineer can walk away from an unsolvable problem +until it's solved. + (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/gvim/vim-7.2/7.2.308 b/gvim/vim-7.2/7.2.308 new file mode 100644 index 0000000..1e19b21 --- /dev/null +++ b/gvim/vim-7.2/7.2.308 @@ -0,0 +1,182 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.308 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.308 +Problem: When using a regexp in the "\=" expression of a substitute + command, submatch() returns empty strings for further lines. + (Clockwork Jam) +Solution: Save and restore the line number and line count when calling + reg_getline(). +Files: src/regexp.c + + +*** ../vim-7.2.307/src/regexp.c 2009-11-25 18:21:48.000000000 +0100 +--- src/regexp.c 2009-11-25 19:45:07.000000000 +0100 +*************** +*** 6828,6833 **** +--- 6828,6835 ---- + * that contains a call to substitute() and submatch(). */ + static regmatch_T *submatch_match; + static regmmatch_T *submatch_mmatch; ++ static linenr_T submatch_firstlnum; ++ static linenr_T submatch_maxline; + #endif + + #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO) +*************** +*** 6941,6947 **** + } + else + { +- linenr_T save_reg_maxline; + win_T *save_reg_win; + int save_ireg_ic; + +--- 6943,6948 ---- +*************** +*** 6953,6959 **** + * vim_regexec_multi() can't be called recursively. */ + submatch_match = reg_match; + submatch_mmatch = reg_mmatch; +! save_reg_maxline = reg_maxline; + save_reg_win = reg_win; + save_ireg_ic = ireg_ic; + can_f_submatch = TRUE; +--- 6954,6961 ---- + * vim_regexec_multi() can't be called recursively. */ + submatch_match = reg_match; + submatch_mmatch = reg_mmatch; +! submatch_firstlnum = reg_firstlnum; +! submatch_maxline = reg_maxline; + save_reg_win = reg_win; + save_ireg_ic = ireg_ic; + can_f_submatch = TRUE; +*************** +*** 6976,6982 **** + + reg_match = submatch_match; + reg_mmatch = submatch_mmatch; +! reg_maxline = save_reg_maxline; + reg_win = save_reg_win; + ireg_ic = save_ireg_ic; + can_f_submatch = FALSE; +--- 6978,6985 ---- + + reg_match = submatch_match; + reg_mmatch = submatch_mmatch; +! reg_firstlnum = submatch_firstlnum; +! reg_maxline = submatch_maxline; + reg_win = save_reg_win; + ireg_ic = save_ireg_ic; + can_f_submatch = FALSE; +*************** +*** 7212,7217 **** +--- 7215,7243 ---- + + #ifdef FEAT_EVAL + /* ++ * Call reg_getline() with the line numbers from the submatch. If a ++ * substitute() was used the reg_maxline and other values have been ++ * overwritten. ++ */ ++ static char_u * ++ reg_getline_submatch(lnum) ++ linenr_T lnum; ++ { ++ char_u *s; ++ linenr_T save_first = reg_firstlnum; ++ linenr_T save_max = reg_maxline; ++ ++ reg_firstlnum = submatch_firstlnum; ++ reg_maxline = submatch_maxline; ++ ++ s = reg_getline(lnum); ++ ++ reg_firstlnum = save_first; ++ reg_maxline = save_max; ++ return s; ++ } ++ ++ /* + * Used for the submatch() function: get the string from the n'th submatch in + * allocated memory. + * Returns NULL when not in a ":s" command and for a non-existing submatch. +*************** +*** 7241,7247 **** + if (lnum < 0 || submatch_mmatch->endpos[no].lnum < 0) + return NULL; + +! s = reg_getline(lnum) + submatch_mmatch->startpos[no].col; + if (s == NULL) /* anti-crash check, cannot happen? */ + break; + if (submatch_mmatch->endpos[no].lnum == lnum) +--- 7267,7273 ---- + if (lnum < 0 || submatch_mmatch->endpos[no].lnum < 0) + return NULL; + +! s = reg_getline_submatch(lnum) + submatch_mmatch->startpos[no].col; + if (s == NULL) /* anti-crash check, cannot happen? */ + break; + if (submatch_mmatch->endpos[no].lnum == lnum) +*************** +*** 7267,7273 **** + ++lnum; + while (lnum < submatch_mmatch->endpos[no].lnum) + { +! s = reg_getline(lnum++); + if (round == 2) + STRCPY(retval + len, s); + len += (int)STRLEN(s); +--- 7293,7299 ---- + ++lnum; + while (lnum < submatch_mmatch->endpos[no].lnum) + { +! s = reg_getline_submatch(lnum++); + if (round == 2) + STRCPY(retval + len, s); + len += (int)STRLEN(s); +*************** +*** 7276,7282 **** + ++len; + } + if (round == 2) +! STRNCPY(retval + len, reg_getline(lnum), + submatch_mmatch->endpos[no].col); + len += submatch_mmatch->endpos[no].col; + if (round == 2) +--- 7302,7308 ---- + ++len; + } + if (round == 2) +! STRNCPY(retval + len, reg_getline_submatch(lnum), + submatch_mmatch->endpos[no].col); + len += submatch_mmatch->endpos[no].col; + if (round == 2) +*** ../vim-7.2.307/src/version.c 2009-11-25 18:21:48.000000000 +0100 +--- src/version.c 2009-11-25 19:50:16.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 308, + /**/ + +-- +Engineers are always delighted to share wisdom, even in areas in which they +have no experience whatsoever. Their logic provides them with inherent +insight into any field of expertise. This can be a problem when dealing with +the illogical people who believe that knowledge can only be derived through +experience. + (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/gvim/vim-7.2/7.2.309 b/gvim/vim-7.2/7.2.309 new file mode 100644 index 0000000..a1713b7 --- /dev/null +++ b/gvim/vim-7.2/7.2.309 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.309 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.309 (after 7.2.308) +Problem: Warning for missing function prototype. (Patrick Texier) +Solution: Add the prototype. +Files: src/regexp.c + + +*** ../vim-7.2.308/src/regexp.c 2009-11-25 19:51:56.000000000 +0100 +--- src/regexp.c 2009-11-26 20:39:18.000000000 +0100 +*************** +*** 7214,7219 **** +--- 7214,7221 ---- + } + + #ifdef FEAT_EVAL ++ static char_u *reg_getline_submatch __ARGS((linenr_T lnum)); ++ + /* + * Call reg_getline() with the line numbers from the submatch. If a + * substitute() was used the reg_maxline and other values have been +*** ../vim-7.2.308/src/version.c 2009-11-25 19:51:56.000000000 +0100 +--- src/version.c 2009-11-26 20:40:11.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 309, + /**/ + +-- +Female engineers become irresistible at the age of consent and remain that +way until about thirty minutes after their clinical death. Longer if it's a +warm day. + (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/gvim/vim-7.2/7.2.310 b/gvim/vim-7.2/7.2.310 new file mode 100644 index 0000000..52734dd --- /dev/null +++ b/gvim/vim-7.2/7.2.310 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.310 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.310 +Problem: When a filetype plugin in ~/.vim/ftdetect uses ":setfiletype" and + the file starts with a "# comment" it gets "conf" filetype. +Solution: Check for "conf" filetype after using ftdetect plugins. +Files: runtime/filetype.vim + + +*** ../vim-7.2.309/runtime/filetype.vim 2008-08-06 18:56:36.000000000 +0200 +--- runtime/filetype.vim 2009-12-02 12:08:42.000000000 +0100 +*************** +*** 2400,2405 **** +--- 2435,2446 ---- + au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh') + + ++ ++ " Use the filetype detect plugins. They may overrule any of the previously ++ " detected filetypes. ++ runtime! ftdetect/*.vim ++ ++ + " Generic configuration file (check this last, it's just guessing!) + au BufNewFile,BufRead,StdinReadPost * + \ if !did_filetype() && expand("") !~ g:ft_ignore_pat +*************** +*** 2408,2417 **** + \ setf conf | + \ endif + +- " Use the plugin-filetype checks last, they may overrule any of the previously +- " detected filetypes. +- runtime! ftdetect/*.vim +- + augroup END + + +--- 2449,2454 ---- +*** ../vim-7.2.309/src/version.c 2009-11-26 20:41:19.000000000 +0100 +--- src/version.c 2009-12-02 12:05:27.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 310, + /**/ + +-- +A)bort, R)etry, P)lease don't bother me again + + /// 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/gvim/vim-7.2/7.2.311 b/gvim/vim-7.2/7.2.311 new file mode 100644 index 0000000..9e27a73 --- /dev/null +++ b/gvim/vim-7.2/7.2.311 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.311 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.311 +Problem: Can't compile with FreeMiNT. +Solution: Change #ifdef for limits.h. (Alan Hourihane) +Files: src/fileio.c + + +*** ../vim-7.2.310/src/fileio.c 2009-11-18 20:12:15.000000000 +0100 +--- src/fileio.c 2009-12-02 13:30:07.000000000 +0100 +*************** +*** 21,27 **** + + #include "vim.h" + +! #ifdef __TANDEM + # include /* for SSIZE_MAX */ + #endif + +--- 21,27 ---- + + #include "vim.h" + +! #if defined(__TANDEM) || defined(__MINT__) + # include /* for SSIZE_MAX */ + #endif + +*** ../vim-7.2.310/src/version.c 2009-12-02 12:08:57.000000000 +0100 +--- src/version.c 2009-12-02 13:31:46.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 311, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +3. Your bookmark takes 15 minutes to scroll from top to bottom. + + /// 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/gvim/vim-7.2/7.2.312 b/gvim/vim-7.2/7.2.312 new file mode 100644 index 0000000..8b95868 --- /dev/null +++ b/gvim/vim-7.2/7.2.312 @@ -0,0 +1,312 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.312 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.312 +Problem: iconv() returns an invalid character sequence when conversion + fails. It should return an empty string. (Yongwei Wu) +Solution: Be more strict about invalid characters in the input. +Files: src/mbyte.c + + +*** ../vim-7.2.311/src/mbyte.c 2009-06-16 15:23:07.000000000 +0200 +--- src/mbyte.c 2009-11-25 16:10:44.000000000 +0100 +*************** +*** 133,154 **** + static int dbcs_ptr2cells_len __ARGS((char_u *p, int size)); + static int dbcs_ptr2char __ARGS((char_u *p)); + +! /* Lookup table to quickly get the length in bytes of a UTF-8 character from +! * the first byte of a UTF-8 string. Bytes which are illegal when used as the +! * first byte have a one, because these will be used separately. */ + static char utf8len_tab[256] = + { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +! 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /*bogus*/ +! 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /*bogus*/ + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1, + }; + + /* + * XIM often causes trouble. Define XIM_DEBUG to get a log of XIM callbacks + * in the "xim.log" file. + */ +--- 133,172 ---- + static int dbcs_ptr2cells_len __ARGS((char_u *p, int size)); + static int dbcs_ptr2char __ARGS((char_u *p)); + +! /* +! * Lookup table to quickly get the length in bytes of a UTF-8 character from +! * the first byte of a UTF-8 string. +! * Bytes which are illegal when used as the first byte have a 1. +! * The NUL byte has length 1. +! */ + static char utf8len_tab[256] = + { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +! 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +! 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1, + }; + + /* ++ * Like utf8len_tab above, but using a zero for illegal lead bytes. ++ */ ++ static char utf8len_tab_zero[256] = ++ { ++ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ++ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ++ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ++ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,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,0,0,0,0,0,0,0,0, ++ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ++ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,0,0, ++ }; ++ ++ /* + * XIM often causes trouble. Define XIM_DEBUG to get a log of XIM callbacks + * in the "xim.log" file. + */ +*************** +*** 1352,1358 **** + if (size > 0 && *p >= 0x80) + { + if (utf_ptr2len_len(p, size) < utf8len_tab[*p]) +! return 1; + c = utf_ptr2char(p); + /* An illegal byte is displayed as . */ + if (utf_ptr2len(p) == 1 || c == NUL) +--- 1370,1376 ---- + if (size > 0 && *p >= 0x80) + { + if (utf_ptr2len_len(p, size) < utf8len_tab[*p]) +! return 1; /* truncated */ + c = utf_ptr2char(p); + /* An illegal byte is displayed as . */ + if (utf_ptr2len(p) == 1 || c == NUL) +*************** +*** 1473,1479 **** + if (p[0] < 0x80) /* be quick for ASCII */ + return p[0]; + +! len = utf8len_tab[p[0]]; + if (len > 1 && (p[1] & 0xc0) == 0x80) + { + if (len == 2) +--- 1491,1497 ---- + if (p[0] < 0x80) /* be quick for ASCII */ + return p[0]; + +! len = utf8len_tab_zero[p[0]]; + if (len > 1 && (p[1] & 0xc0) == 0x80) + { + if (len == 2) +*************** +*** 1723,1728 **** +--- 1741,1747 ---- + /* + * Return length of UTF-8 character, obtained from the first byte. + * "b" must be between 0 and 255! ++ * Returns 1 for an invalid first byte value. + */ + int + utf_byte2len(b) +*************** +*** 1737,1742 **** +--- 1756,1762 ---- + * Returns 1 for "". + * Returns 1 for an illegal byte sequence (also in incomplete byte seq.). + * Returns number > "size" for an incomplete byte sequence. ++ * Never returns zero. + */ + int + utf_ptr2len_len(p, size) +*************** +*** 1747,1757 **** + int i; + int m; + +! if (*p == NUL) +! return 1; +! m = len = utf8len_tab[*p]; + if (len > size) + m = size; /* incomplete byte sequence. */ + for (i = 1; i < m; ++i) + if ((p[i] & 0xc0) != 0x80) + return 1; +--- 1767,1779 ---- + int i; + int m; + +! len = utf8len_tab[*p]; +! if (len == 1) +! return 1; /* NUL, ascii or illegal lead byte */ + if (len > size) + m = size; /* incomplete byte sequence. */ ++ else ++ m = len; + for (i = 1; i < m; ++i) + if ((p[i] & 0xc0) != 0x80) + return 1; +*************** +*** 2505,2510 **** +--- 2527,2533 ---- + /* + * mb_head_off() function pointer. + * Return offset from "p" to the first byte of the character it points into. ++ * If "p" points to the NUL at the end of the string return 0. + * Returns 0 when already at the first byte of a character. + */ + int +*************** +*** 2524,2530 **** + + /* It can't be a trailing byte when not using DBCS, at the start of the + * string or the previous byte can't start a double-byte. */ +! if (p <= base || MB_BYTE2LEN(p[-1]) == 1) + return 0; + + /* This is slow: need to start at the base and go forward until the +--- 2547,2553 ---- + + /* It can't be a trailing byte when not using DBCS, at the start of the + * string or the previous byte can't start a double-byte. */ +! if (p <= base || MB_BYTE2LEN(p[-1]) == 1 || *p == NUL) + return 0; + + /* This is slow: need to start at the base and go forward until the +*************** +*** 2552,2558 **** + * lead byte in the current cell. */ + if (p <= base + || (enc_dbcs == DBCS_JPNU && p[-1] == 0x8e) +! || MB_BYTE2LEN(p[-1]) == 1) + return 0; + + /* This is slow: need to start at the base and go forward until the +--- 2575,2582 ---- + * lead byte in the current cell. */ + if (p <= base + || (enc_dbcs == DBCS_JPNU && p[-1] == 0x8e) +! || MB_BYTE2LEN(p[-1]) == 1 +! || *p == NUL) + return 0; + + /* This is slow: need to start at the base and go forward until the +*************** +*** 2578,2583 **** +--- 2602,2608 ---- + char_u *q; + char_u *s; + int c; ++ int len; + #ifdef FEAT_ARABIC + char_u *j; + #endif +*************** +*** 2597,2604 **** + --q; + /* Check for illegal sequence. Do allow an illegal byte after where we + * started. */ +! if (utf8len_tab[*q] != (int)(s - q + 1) +! && utf8len_tab[*q] != (int)(p - q + 1)) + return 0; + + if (q <= base) +--- 2622,2629 ---- + --q; + /* Check for illegal sequence. Do allow an illegal byte after where we + * started. */ +! len = utf8len_tab[*q]; +! if (len != (int)(s - q + 1) && len != (int)(p - q + 1)) + return 0; + + if (q <= base) +*************** +*** 2810,2818 **** + + while (end == NULL ? *p != NUL : p < end) + { +! if ((*p & 0xc0) == 0x80) + return FALSE; /* invalid lead byte */ +- l = utf8len_tab[*p]; + if (end != NULL && p + l > end) + return FALSE; /* incomplete byte sequence */ + ++p; +--- 2835,2843 ---- + + while (end == NULL ? *p != NUL : p < end) + { +! l = utf8len_tab_zero[*p]; +! if (l == 0) + return FALSE; /* invalid lead byte */ + if (end != NULL && p + l > end) + return FALSE; /* incomplete byte sequence */ + ++p; +*************** +*** 6117,6128 **** + d = retval; + for (i = 0; i < len; ++i) + { +! l = utf_ptr2len(ptr + i); + if (l == 0) + *d++ = NUL; + else if (l == 1) + { +! if (unconvlenp != NULL && utf8len_tab[ptr[i]] > len - i) + { + /* Incomplete sequence at the end. */ + *unconvlenp = len - i; +--- 6142,6161 ---- + d = retval; + for (i = 0; i < len; ++i) + { +! l = utf_ptr2len_len(ptr + i, len - i); + if (l == 0) + *d++ = NUL; + else if (l == 1) + { +! int l_w = utf8len_tab_zero[ptr[i]]; +! +! if (l_w == 0) +! { +! /* Illegal utf-8 byte cannot be converted */ +! vim_free(retval); +! return NULL; +! } +! if (unconvlenp != NULL && l_w > len - i) + { + /* Incomplete sequence at the end. */ + *unconvlenp = len - i; +*** ../vim-7.2.311/src/version.c 2009-12-02 13:32:10.000000000 +0100 +--- src/version.c 2009-12-02 15:00:23.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 312, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +6. You refuse to go to a vacation spot with no electricity and no phone lines. + + /// 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/gvim/vim-7.2/7.2.313 b/gvim/vim-7.2/7.2.313 new file mode 100644 index 0000000..77b9103 --- /dev/null +++ b/gvim/vim-7.2/7.2.313 @@ -0,0 +1,117 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.313 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.313 +Problem: Command line completion doesn't work after "%:h" and similar. +Solution: Expand these items before doing the completion. +Files: src/ex_getln.c, src/misc1.c, src/proto/misc1.pro + + +*** ../vim-7.2.312/src/ex_getln.c 2009-09-18 17:24:54.000000000 +0200 +--- src/ex_getln.c 2009-12-02 16:40:06.000000000 +0100 +*************** +*** 4422,4428 **** + flags |= EW_FILE; + else + flags = (flags | EW_DIR) & ~EW_FILE; +! ret = expand_wildcards(1, &pat, num_file, file, flags); + if (free_pat) + vim_free(pat); + return ret; +--- 4422,4429 ---- + flags |= EW_FILE; + else + flags = (flags | EW_DIR) & ~EW_FILE; +! /* Expand wildcards, supporting %:h and the like. */ +! ret = expand_wildcards_eval(&pat, num_file, file, flags); + if (free_pat) + vim_free(pat); + return ret; +*** ../vim-7.2.312/src/misc1.c 2009-11-17 16:08:12.000000000 +0100 +--- src/misc1.c 2009-12-02 17:06:49.000000000 +0100 +*************** +*** 8447,8452 **** +--- 8447,8492 ---- + } + + /* ++ * Invoke expand_wildcards() for one pattern. ++ * Expand items like "%:h" before the expansion. ++ * Returns OK or FAIL. ++ */ ++ int ++ expand_wildcards_eval(pat, num_file, file, flags) ++ char_u **pat; /* pointer to input pattern */ ++ int *num_file; /* resulting number of files */ ++ char_u ***file; /* array of resulting files */ ++ int flags; /* EW_DIR, etc. */ ++ { ++ int ret = FAIL; ++ char_u *eval_pat = NULL; ++ char_u *exp_pat = *pat; ++ char_u *ignored_msg; ++ int usedlen; ++ ++ if (*exp_pat == '%' || *exp_pat == '#' || *exp_pat == '<') ++ { ++ ++emsg_off; ++ eval_pat = eval_vars(exp_pat, exp_pat, &usedlen, ++ NULL, &ignored_msg, NULL); ++ --emsg_off; ++ if (eval_pat != NULL) ++ exp_pat = concat_str(eval_pat, exp_pat + usedlen); ++ } ++ ++ if (exp_pat != NULL) ++ ret = expand_wildcards(1, &exp_pat, num_file, file, flags); ++ ++ if (eval_pat != NULL) ++ { ++ vim_free(exp_pat); ++ vim_free(eval_pat); ++ } ++ ++ return ret; ++ } ++ ++ /* + * Expand wildcards. Calls gen_expand_wildcards() and removes files matching + * 'wildignore'. + * Returns OK or FAIL. +*** ../vim-7.2.312/src/proto/misc1.pro 2007-09-26 22:36:32.000000000 +0200 +--- src/proto/misc1.pro 2009-12-02 16:41:52.000000000 +0100 +*************** +*** 85,90 **** +--- 85,91 ---- + int vim_fexists __ARGS((char_u *fname)); + void line_breakcheck __ARGS((void)); + void fast_breakcheck __ARGS((void)); ++ int expand_wildcards_eval __ARGS((char_u **pat, int *num_file, char_u ***file, int flags)); + int expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); + int match_suffix __ARGS((char_u *fname)); + int unix_expandpath __ARGS((garray_T *gap, char_u *path, int wildoff, int flags, int didstar)); +*** ../vim-7.2.312/src/version.c 2009-12-02 15:03:24.000000000 +0100 +--- src/version.c 2009-12-02 17:14:02.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 313, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +8. You spend half of the plane trip with your laptop on your lap...and your + child in the overhead compartment. + + /// 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/gvim/vim-7.2/7.2.314 b/gvim/vim-7.2/7.2.314 new file mode 100644 index 0000000..490605d --- /dev/null +++ b/gvim/vim-7.2/7.2.314 @@ -0,0 +1,56 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.314 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.314 +Problem: Missing function in small build. +Solution: Always include concat_str. +Files: src/misc1.c + + +*** ../vim-7.2.313/src/misc1.c 2009-12-02 17:15:04.000000000 +0100 +--- src/misc1.c 2009-12-02 17:44:55.000000000 +0100 +*************** +*** 4666,4672 **** + return dest; + } + +- #if defined(FEAT_EVAL) || defined(FEAT_GETTEXT) || defined(PROTO) + /* + * Concatenate two strings and return the result in allocated memory. + * Returns NULL when out of memory. +--- 4666,4671 ---- +*************** +*** 4687,4693 **** + } + return dest; + } +- #endif + + /* + * Add a path separator to a file name, unless it already ends in a path +--- 4686,4691 ---- +*** ../vim-7.2.313/src/version.c 2009-12-02 17:15:04.000000000 +0100 +--- src/version.c 2009-12-02 17:47:18.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 314, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +9. All your daydreaming is preoccupied with getting a faster connection to the + net: 28.8...ISDN...cable modem...T1...T3. + + /// 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/gvim/vim-7.2/7.2.315 b/gvim/vim-7.2/7.2.315 new file mode 100644 index 0000000..6a5e7c7 --- /dev/null +++ b/gvim/vim-7.2/7.2.315 @@ -0,0 +1,134 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.315 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.315 +Problem: Python libs can't be found on 64 bit system. +Solution: Add lib64 to the list of directories. (Michael Henry) +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.2.314/src/auto/configure 2009-11-17 17:13:03.000000000 +0100 +--- src/auto/configure 2009-12-02 17:21:20.000000000 +0100 +*************** +*** 5126,5132 **** + + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +! for subdir in lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" +--- 5126,5132 ---- + + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +! for subdir in lib64 lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" +*************** +*** 13718,13725 **** + $as_echo "pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&6; } + else + vim_cv_tty_group=world +! { $as_echo "$as_me:$LINENO: result: ptys are world accessable" >&5 +! $as_echo "ptys are world accessable" >&6; } + fi + + else +--- 13718,13725 ---- + $as_echo "pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&6; } + else + vim_cv_tty_group=world +! { $as_echo "$as_me:$LINENO: result: ptys are world accessible" >&5 +! $as_echo "ptys are world accessible" >&6; } + fi + + else +*************** +*** 13730,13737 **** + ( exit $ac_status ) + + vim_cv_tty_group=world +! { $as_echo "$as_me:$LINENO: result: can't determine - assume ptys are world accessable" >&5 +! $as_echo "can't determine - assume ptys are world accessable" >&6; } + + fi + rm -rf conftest.dSYM +--- 13730,13737 ---- + ( exit $ac_status ) + + vim_cv_tty_group=world +! { $as_echo "$as_me:$LINENO: result: can't determine - assume ptys are world accessible" >&5 +! $as_echo "can't determine - assume ptys are world accessible" >&6; } + + fi + rm -rf conftest.dSYM +*** ../vim-7.2.314/src/configure.in 2009-11-17 17:13:03.000000000 +0100 +--- src/configure.in 2009-12-02 17:21:10.000000000 +0100 +*************** +*** 686,692 **** + [ + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +! for subdir in lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" +--- 686,692 ---- + [ + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +! for subdir in lib64 lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" +*************** +*** 2557,2567 **** + AC_MSG_RESULT([pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group]) + else + vim_cv_tty_group=world +! AC_MSG_RESULT([ptys are world accessable]) + fi + ],[ + vim_cv_tty_group=world +! AC_MSG_RESULT([can't determine - assume ptys are world accessable]) + ],[ + AC_MSG_ERROR(cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode') + ]) +--- 2557,2567 ---- + AC_MSG_RESULT([pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group]) + else + vim_cv_tty_group=world +! AC_MSG_RESULT([ptys are world accessible]) + fi + ],[ + vim_cv_tty_group=world +! AC_MSG_RESULT([can't determine - assume ptys are world accessible]) + ],[ + AC_MSG_ERROR(cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode') + ]) +*** ../vim-7.2.314/src/version.c 2009-12-02 17:47:46.000000000 +0100 +--- src/version.c 2009-12-02 17:57:39.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 315, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +10. And even your night dreams are in 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/gvim/vim-7.2/7.2.316 b/gvim/vim-7.2/7.2.316 new file mode 100644 index 0000000..34e629f --- /dev/null +++ b/gvim/vim-7.2/7.2.316 @@ -0,0 +1,83 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.316 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.316 +Problem: May get multiple _FORTIFY_SOURCE arguments. (Tony Mechelynck) +Solution: First remove all these arguments and then add the one we want. + (Dominique Pelle) +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.2.315/src/auto/configure 2009-12-02 17:59:08.000000000 +0100 +--- src/auto/configure 2009-12-16 17:05:59.000000000 +0100 +*************** +*** 17185,17194 **** + { $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=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'` + { $as_echo "$as_me:$LINENO: result: yes" >&5 + $as_echo "yes" >&6; } + else +--- 17185,17194 ---- + { $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=`echo "$CFLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/-D_FORTIFY_SOURCE=.//g' -e 's/$/ -D_FORTIFY_SOURCE=1/'` + { $as_echo "$as_me:$LINENO: result: yes" >&5 + $as_echo "yes" >&6; } + else +*** ../vim-7.2.315/src/configure.in 2009-12-02 17:59:08.000000000 +0100 +--- src/configure.in 2009-12-16 17:05:55.000000000 +0100 +*************** +*** 3241,3249 **** + 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=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'` + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) +--- 3241,3250 ---- + 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. ++ dnl Also remove duplicate _FORTIFY_SOURCE arguments. + AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1) + if test "$gccmajor" -gt "3"; then +! CFLAGS=`echo "$CFLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/-D_FORTIFY_SOURCE=.//g' -e 's/$/ -D_FORTIFY_SOURCE=1/'` + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) +*** ../vim-7.2.315/src/version.c 2009-12-02 17:59:08.000000000 +0100 +--- src/version.c 2009-12-16 17:12:25.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 316, + /**/ + +-- +Have you heard about the new Beowulf cluster? It's so fast, it executes +an infinite loop in 6 seconds. + + /// 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/gvim/vim-7.2/7.2.317 b/gvim/vim-7.2/7.2.317 new file mode 100644 index 0000000..bc0ceee --- /dev/null +++ b/gvim/vim-7.2/7.2.317 @@ -0,0 +1,148 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.317 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.317 +Problem: Memory leak when adding a highlight group with unprintable + characters, resulting in E669. +Solution: Free the memory. And fix a few typos. (Dominique Pelle) +Files: src/syntax.c + + +*** ../vim-7.2.316/src/syntax.c 2009-05-17 13:30:58.000000000 +0200 +--- src/syntax.c 2009-12-16 18:09:05.000000000 +0100 +*************** +*** 206,212 **** + static int current_attr = 0; /* attr of current syntax word */ + #ifdef FEAT_EVAL + static int current_id = 0; /* ID of current char for syn_get_id() */ +! static int current_trans_id = 0; /* idem, transparancy removed */ + #endif + + typedef struct syn_cluster_S +--- 206,212 ---- + static int current_attr = 0; /* attr of current syntax word */ + #ifdef FEAT_EVAL + static int current_id = 0; /* ID of current char for syn_get_id() */ +! static int current_trans_id = 0; /* idem, transparency removed */ + #endif + + typedef struct syn_cluster_S +*************** +*** 282,288 **** + int si_idx; /* index of syntax pattern or + KEYWORD_IDX */ + int si_id; /* highlight group ID for keywords */ +! int si_trans_id; /* idem, transparancy removed */ + int si_m_lnum; /* lnum of the match */ + int si_m_startcol; /* starting column of the match */ + lpos_T si_m_endpos; /* just after end posn of the match */ +--- 282,288 ---- + int si_idx; /* index of syntax pattern or + KEYWORD_IDX */ + int si_id; /* highlight group ID for keywords */ +! int si_trans_id; /* idem, transparency removed */ + int si_m_lnum; /* lnum of the match */ + int si_m_startcol; /* starting column of the match */ + lpos_T si_m_endpos; /* just after end posn of the match */ +*************** +*** 1274,1280 **** + dist = syn_buf->b_ml.ml_line_count / (syn_buf->b_sst_len - Rows) + 1; + + /* +! * Go throught the list to find the "tick" for the oldest entry that can + * be removed. Set "above" when the "tick" for the oldest entry is above + * "b_sst_lasttick" (the display tick wraps around). + */ +--- 1274,1280 ---- + dist = syn_buf->b_ml.ml_line_count / (syn_buf->b_sst_len - Rows) + 1; + + /* +! * Go through the list to find the "tick" for the oldest entry that can + * be removed. Set "above" when the "tick" for the oldest entry is above + * "b_sst_lasttick" (the display tick wraps around). + */ +*************** +*** 2319,2325 **** + ? (syn_buf->b_spell_cluster_id == 0) + : (syn_buf->b_syn_spell == SYNSPL_TOP); + +! /* nextgroup ends at end of line, unless "skipnl" or "skipemtpy" present */ + if (current_next_list != NULL + && syn_getcurline()[current_col + 1] == NUL + && !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY))) +--- 2319,2325 ---- + ? (syn_buf->b_spell_cluster_id == 0) + : (syn_buf->b_syn_spell == SYNSPL_TOP); + +! /* nextgroup ends at end of line, unless "skipnl" or "skipempty" present */ + if (current_next_list != NULL + && syn_getcurline()[current_col + 1] == NUL + && !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY))) +*************** +*** 6108,6114 **** + win_T *wp; + long lnum; + colnr_T col; +! int trans; /* remove transparancy */ + int *spellp; /* return: can do spell checking */ + int keep_state; /* keep state of char at "col" */ + { +--- 6108,6114 ---- + win_T *wp; + long lnum; + colnr_T col; +! int trans; /* remove transparency */ + int *spellp; /* return: can do spell checking */ + int keep_state; /* keep state of char at "col" */ + { +*************** +*** 7523,7529 **** + #if defined(FEAT_GUI) || defined(PROTO) + /* + * Set the normal foreground and background colors according to the "Normal" +! * highlighighting group. For X11 also set "Menu", "Scrollbar", and + * "Tooltip" colors. + */ + void +--- 7523,7529 ---- + #if defined(FEAT_GUI) || defined(PROTO) + /* + * Set the normal foreground and background colors according to the "Normal" +! * highlighting group. For X11 also set "Menu", "Scrollbar", and + * "Tooltip" colors. + */ + void +*************** +*** 8647,8652 **** +--- 8647,8653 ---- + if (!vim_isprintc(*p)) + { + EMSG(_("E669: Unprintable character in group name")); ++ vim_free(name); + return 0; + } + else if (!ASCII_ISALNUM(*p) && *p != '_') +*** ../vim-7.2.316/src/version.c 2009-12-16 17:14:08.000000000 +0100 +--- src/version.c 2009-12-16 18:09:14.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 317, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +35. Your husband tells you he's had the beard for 2 months. + + /// 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/gvim/vim-7.2/7.2.318 b/gvim/vim-7.2/7.2.318 new file mode 100644 index 0000000..4301836 --- /dev/null +++ b/gvim/vim-7.2/7.2.318 @@ -0,0 +1,91 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.318 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.318 +Problem: Wrong locale value breaks floating point numbers for gvim. +Solution: Set the locale again after doing GUI inits. (Dominique Pelle) +Files: src/main.c + + +*** ../vim-7.2.317/src/main.c 2009-11-17 12:31:30.000000000 +0100 +--- src/main.c 2009-12-16 18:23:46.000000000 +0100 +*************** +*** 366,379 **** + * Check if the GUI can be started. Reset gui.starting if not. + * Don't know about other systems, stay on the safe side and don't check. + */ +! if (gui.starting && gui_init_check() == FAIL) + { +! gui.starting = FALSE; + +! /* When running "evim" or "gvim -y" we need the menus, exit if we +! * don't have them. */ +! if (params.evim_mode) +! mch_exit(1); + } + # endif + #endif +--- 366,386 ---- + * Check if the GUI can be started. Reset gui.starting if not. + * Don't know about other systems, stay on the safe side and don't check. + */ +! if (gui.starting) + { +! if (gui_init_check() == FAIL) +! { +! gui.starting = FALSE; + +! /* When running "evim" or "gvim -y" we need the menus, exit if we +! * don't have them. */ +! if (params.evim_mode) +! mch_exit(1); +! } +! # if defined(HAVE_LOCALE_H) || defined(X_LOCALE) +! /* Re-initialize locale, it may have been altered by gui_init_check() */ +! init_locale(); +! # endif + } + # endif + #endif +*************** +*** 3685,3691 **** + } + else if (STRICMP(argv[i], "--servername") == 0) + { +! /* Alredy processed. Take it out of the command line */ + i++; + continue; + } +--- 3692,3698 ---- + } + else if (STRICMP(argv[i], "--servername") == 0) + { +! /* Already processed. Take it out of the command line */ + i++; + continue; + } +*** ../vim-7.2.317/src/version.c 2009-12-16 18:13:04.000000000 +0100 +--- src/version.c 2009-12-16 18:26:24.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 318, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +36. You miss more than five meals a week downloading the latest games from + Apogee. + + /// 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/gvim/vim-7.2/7.2.319 b/gvim/vim-7.2/7.2.319 new file mode 100644 index 0000000..3cbfd42 --- /dev/null +++ b/gvim/vim-7.2/7.2.319 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.319 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.319 +Problem: Motif: accessing freed memory when cancelling font dialog. +Solution: Destroy the widget only after accessing it. (Dominique Pelle) +Files: src/gui_xmdlg.c + + +*** ../vim-7.2.318/src/gui_xmdlg.c 2009-11-03 12:53:44.000000000 +0100 +--- src/gui_xmdlg.c 2009-12-16 18:39:21.000000000 +0100 +*************** +*** 1274,1286 **** + XtAppProcessEvent(XtWidgetToApplicationContext(data->dialog), + (XtInputMask)XtIMAll); + +- XtDestroyWidget(data->dialog); +- + if (data->old) + { + XFreeFont(XtDisplay(data->dialog), data->old); + XmFontListFree(data->old_list); + } + + gui_motif_synch_fonts(); + +--- 1274,1285 ---- + XtAppProcessEvent(XtWidgetToApplicationContext(data->dialog), + (XtInputMask)XtIMAll); + + if (data->old) + { + XFreeFont(XtDisplay(data->dialog), data->old); + XmFontListFree(data->old_list); + } ++ XtDestroyWidget(data->dialog); + + gui_motif_synch_fonts(); + +*** ../vim-7.2.318/src/version.c 2009-12-16 18:27:29.000000000 +0100 +--- src/version.c 2009-12-16 18:40:06.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 319, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +37. You start looking for hot HTML addresses in public restrooms. + + /// 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/gvim/vim-7.2/7.2.320 b/gvim/vim-7.2/7.2.320 new file mode 100644 index 0000000..73f6224 --- /dev/null +++ b/gvim/vim-7.2/7.2.320 @@ -0,0 +1,199 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.320 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.320 +Problem: Unused function in Mzscheme interface. +Solution: Remove the function and what depends on it. (Dominique Pelle) +Files: src/if_mzsch.c, src/proto/if_mzsch.pro + + +*** ../vim-7.2.319/src/if_mzsch.c 2009-09-11 12:20:47.000000000 +0200 +--- src/if_mzsch.c 2009-12-16 19:01:04.000000000 +0100 +*************** +*** 70,83 **** + Scheme_Object *port; + } Port_Info; + +- /* info for do_apply */ +- typedef struct +- { +- Scheme_Object *proc; +- int argc; +- Scheme_Object **argv; +- } Apply_Info; +- + /* + *======================================================================== + * Vim-Control Commands +--- 70,75 ---- +*************** +*** 160,166 **** + static Scheme_Object *extract_exn_message(Scheme_Object *v); + static Scheme_Object *do_eval(void *, int noargc, Scheme_Object **noargv); + static Scheme_Object *do_load(void *, int noargc, Scheme_Object **noargv); +- static Scheme_Object *do_apply(void *, int noargc, Scheme_Object **noargv); + static void register_vim_exn(void); + static vim_mz_buffer *get_buffer_arg(const char *fname, int argnum, + int argc, Scheme_Object **argv); +--- 152,157 ---- +*************** +*** 1056,1062 **** + MZ_GC_REG(); + config = scheme_config; + MZ_GC_CHECK(); +! /* recreate ports each call effectivelly clearing these ones */ + curout = scheme_make_string_output_port(); + MZ_GC_CHECK(); + curerr = scheme_make_string_output_port(); +--- 1047,1053 ---- + MZ_GC_REG(); + config = scheme_config; + MZ_GC_CHECK(); +! /* recreate ports each call effectively clearing these ones */ + curout = scheme_make_string_output_port(); + MZ_GC_CHECK(); + curerr = scheme_make_string_output_port(); +*************** +*** 1196,1231 **** + } + } + +- /* +- * apply MzScheme procedure with arguments, +- * handling errors +- */ +- Scheme_Object * +- mzvim_apply(Scheme_Object *proc, int argc, Scheme_Object **argv) +- { +- if (mzscheme_init()) +- return FAIL; +- else +- { +- Apply_Info data = {NULL, 0, NULL}; +- Scheme_Object *ret = NULL; +- +- MZ_GC_DECL_REG(5); +- MZ_GC_VAR_IN_REG(0, ret); +- MZ_GC_VAR_IN_REG(1, data.proc); +- MZ_GC_ARRAY_VAR_IN_REG(2, data.argv, argc); +- MZ_GC_REG(); +- +- data.proc = proc; +- data.argc = argc; +- data.argv = argv; +- +- eval_with_exn_handling(&data, do_apply, &ret); +- MZ_GC_UNREG(); +- return ret; +- } +- } +- + static Scheme_Object * + do_load(void *data, int noargc, Scheme_Object **noargv) + { +--- 1187,1192 ---- +*************** +*** 1257,1263 **** + MZ_GC_CHECK(); + } + +! /* errors will be caught in do_mzscheme_comamnd and ex_mzfile */ + scheme_close_input_port(pinfo->port); + MZ_GC_CHECK(); + pinfo->port = NULL; +--- 1218,1224 ---- + MZ_GC_CHECK(); + } + +! /* errors will be caught in do_mzscheme_command and ex_mzfile */ + scheme_close_input_port(pinfo->port); + MZ_GC_CHECK(); + pinfo->port = NULL; +*************** +*** 1348,1360 **** + return scheme_eval_string_all((char *)s, environment, TRUE); + } + +- static Scheme_Object * +- do_apply(void *a, int noargc, Scheme_Object **noargv) +- { +- Apply_Info *info = (Apply_Info *)a; +- return scheme_apply(info->proc, info->argc, info->argv); +- } +- + /* + *======================================================================== + * 3. MzScheme I/O Handlers +--- 1309,1314 ---- +*************** +*** 2128,2134 **** + static Scheme_Object * + set_buffer_line(void *data, int argc, Scheme_Object **argv) + { +! /* First of all, we check the the of the supplied MzScheme object. + * There are three cases: + * 1. #f - this is a deletion. + * 2. A string - this is a replacement. +--- 2082,2088 ---- + static Scheme_Object * + set_buffer_line(void *data, int argc, Scheme_Object **argv) + { +! /* First of all, we check the value of the supplied MzScheme object. + * There are three cases: + * 1. #f - this is a deletion. + * 2. A string - this is a replacement. +*************** +*** 2428,2434 **** + /* + * (insert-buff-line-list {linenr} {string/string-list} [buffer]) + * +! * Insert a number of lines into the specified buffer after the specifed line. + * The line number is in Vim format (1-based). The lines to be inserted are + * given as an MzScheme list of string objects or as a single string. The lines + * to be added are checked for validity and correct format. Errors are +--- 2382,2388 ---- + /* + * (insert-buff-line-list {linenr} {string/string-list} [buffer]) + * +! * Insert a number of lines into the specified buffer after the specified line. + * The line number is in Vim format (1-based). The lines to be inserted are + * given as an MzScheme list of string objects or as a single string. The lines + * to be added are checked for validity and correct format. Errors are +*** ../vim-7.2.319/src/proto/if_mzsch.pro 2009-05-26 22:58:43.000000000 +0200 +--- src/proto/if_mzsch.pro 2009-12-16 19:01:01.000000000 +0100 +*************** +*** 13,20 **** + void mzvim_check_threads __ARGS((void)); + void mzvim_reset_timer __ARGS((void)); + void *mzvim_eval_string __ARGS((char_u *str)); +- struct Scheme_Object *mzvim_apply __ARGS((struct Scheme_Object *, int argc, +- struct Scheme_Object **)); + int mzthreads_allowed __ARGS((void)); + void mzscheme_main __ARGS((void)); + /* vim: set ft=c : */ +--- 13,18 ---- +*** ../vim-7.2.319/src/version.c 2009-12-16 18:49:09.000000000 +0100 +--- src/version.c 2009-12-16 18:53:48.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 320, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail + on the way back to bed. + + /// 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/gvim/vim-7.2/7.2.321 b/gvim/vim-7.2/7.2.321 new file mode 100644 index 0000000..69c08f4 --- /dev/null +++ b/gvim/vim-7.2/7.2.321 @@ -0,0 +1,59 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.321 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.321 +Problem: histadd() and searching with "*" fails to add entry to history + when it is empty. +Solution: Initialize the history. (Lech Lorens) +Files: src/eval.c, src/normal.c + + +*** ../vim-7.2.320/src/eval.c 2009-11-17 12:20:30.000000000 +0100 +--- src/eval.c 2009-12-24 14:37:50.000000000 +0100 +*************** +*** 12014,12019 **** +--- 12014,12020 ---- + str = get_tv_string_buf(&argvars[1], buf); + if (*str != NUL) + { ++ init_history(); + add_to_history(histype, str, FALSE, NUL); + rettv->vval.v_number = TRUE; + return; +*** ../vim-7.2.320/src/normal.c 2009-05-17 13:30:58.000000000 +0200 +--- src/normal.c 2009-12-24 14:38:28.000000000 +0100 +*************** +*** 5602,5607 **** +--- 5602,5608 ---- + STRCAT(buf, "\\>"); + #ifdef FEAT_CMDHIST + /* put pattern in search history */ ++ init_history(); + add_to_history(HIST_SEARCH, buf, TRUE, NUL); + #endif + normal_search(cap, cmdchar == '*' ? '/' : '?', buf, 0); +*** ../vim-7.2.320/src/version.c 2009-12-16 19:02:05.000000000 +0100 +--- src/version.c 2009-12-24 14:39:46.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 321, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +43. You tell the kids they can't use the computer because "Daddy's got work to + do" and you don't even have a job. + + /// 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/gvim/vim-7.2/7.2.322 b/gvim/vim-7.2/7.2.322 new file mode 100644 index 0000000..57f27fc --- /dev/null +++ b/gvim/vim-7.2/7.2.322 @@ -0,0 +1,49 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.322 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.322 +Problem: Wrong indenting in virtual replace mode with CTRL-Y below a short + line. +Solution: Check for character to be NUL. (suggested by Lech Lorens) +Files: src/edit.c + + +*** ../vim-7.2.321/src/edit.c 2009-11-17 17:40:34.000000000 +0100 +--- src/edit.c 2009-12-24 15:18:23.000000000 +0100 +*************** +*** 7397,7402 **** +--- 7397,7406 ---- + int icase; + int i; + ++ if (keytyped == NUL) ++ /* Can happen with CTRL-Y and CTRL-E on a short line. */ ++ return FALSE; ++ + #ifdef FEAT_EVAL + if (*curbuf->b_p_inde != NUL) + look = curbuf->b_p_indk; /* 'indentexpr' set: use 'indentkeys' */ +*** ../vim-7.2.321/src/version.c 2009-12-24 15:00:31.000000000 +0100 +--- src/version.c 2009-12-24 15:44:46.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 322, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +45. You buy a Captain Kirk chair with a built-in keyboard and mouse. + + /// 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/gvim/vim-7.2/7.2.323 b/gvim/vim-7.2/7.2.323 new file mode 100644 index 0000000..fc43246 --- /dev/null +++ b/gvim/vim-7.2/7.2.323 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.323 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.323 (extra) +Problem: Balloon evaluation crashes on Win64. +Solution: Change pointer types. (Sergey Khorev) +Files: src/gui_w32.c + + +*** ../vim-7.2.322/src/gui_w32.c 2009-01-28 21:22:20.000000000 +0100 +--- src/gui_w32.c 2009-12-24 16:06:41.000000000 +0100 +*************** +*** 212,223 **** + DWORD dwPlatformID; + } DLLVERSIONINFO; + + typedef struct tagTOOLINFOA_NEW + { + UINT cbSize; + UINT uFlags; + HWND hwnd; +! UINT uId; + RECT rect; + HINSTANCE hinst; + LPSTR lpszText; +--- 212,225 ---- + DWORD dwPlatformID; + } DLLVERSIONINFO; + ++ #include ++ + typedef struct tagTOOLINFOA_NEW + { + UINT cbSize; + UINT uFlags; + HWND hwnd; +! UINT_PTR uId; + RECT rect; + HINSTANCE hinst; + LPSTR lpszText; +*************** +*** 227,241 **** + typedef struct tagNMTTDISPINFO_NEW + { + NMHDR hdr; +! LPTSTR lpszText; + char szText[80]; + HINSTANCE hinst; + UINT uFlags; + LPARAM lParam; + } NMTTDISPINFO_NEW; + +- #include +- + typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *); + #ifndef TTM_SETMAXTIPWIDTH + # define TTM_SETMAXTIPWIDTH (WM_USER+24) +--- 229,241 ---- + typedef struct tagNMTTDISPINFO_NEW + { + NMHDR hdr; +! LPSTR lpszText; + char szText[80]; + HINSTANCE hinst; + UINT uFlags; + LPARAM lParam; + } NMTTDISPINFO_NEW; + + typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *); + #ifndef TTM_SETMAXTIPWIDTH + # define TTM_SETMAXTIPWIDTH (WM_USER+24) +*** ../vim-7.2.322/src/version.c 2009-12-24 15:45:53.000000000 +0100 +--- src/version.c 2009-12-24 16:08:33.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 323, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +46. Your wife makes a new rule: "The computer cannot come to bed." + + /// 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/gvim/vim-7.2/7.2.324 b/gvim/vim-7.2/7.2.324 new file mode 100644 index 0000000..8f61b8a --- /dev/null +++ b/gvim/vim-7.2/7.2.324 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.324 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.324 +Problem: A negative column argument in setpos() may cause a crash. +Solution: Check for invalid column number. (James Vega) +Files: src/eval.c, src/misc2.c + + +*** ../vim-7.2.323/src/eval.c 2009-12-24 15:00:31.000000000 +0100 +--- src/eval.c 2009-12-31 13:09:19.000000000 +0100 +*************** +*** 15542,15548 **** + { + if (list2fpos(&argvars[1], &pos, &fnum) == OK) + { +! --pos.col; + if (name[0] == '.' && name[1] == NUL) + { + /* set cursor */ +--- 15542,15549 ---- + { + if (list2fpos(&argvars[1], &pos, &fnum) == OK) + { +! if (--pos.col < 0) +! pos.col = 0; + if (name[0] == '.' && name[1] == NUL) + { + /* set cursor */ +*** ../vim-7.2.323/src/misc2.c 2009-11-25 17:15:16.000000000 +0100 +--- src/misc2.c 2009-12-31 13:12:36.000000000 +0100 +*************** +*** 528,533 **** +--- 528,535 ---- + #endif + } + } ++ else if (curwin->w_cursor.col < 0) ++ curwin->w_cursor.col = 0; + + #ifdef FEAT_VIRTUALEDIT + /* If virtual editing is on, we can leave the cursor on the old position, +*** ../vim-7.2.323/src/version.c 2009-12-24 16:11:24.000000000 +0100 +--- src/version.c 2009-12-31 13:17:25.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 324, + /**/ + +-- +"Thou shalt not follow the Null Pointer, for at its end Chaos and +Madness lie." + + /// 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/gvim/vim-7.2/7.2.325 b/gvim/vim-7.2/7.2.325 new file mode 100644 index 0000000..77a6e08 --- /dev/null +++ b/gvim/vim-7.2/7.2.325 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.325 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.325 +Problem: A stray "w" in the startup vimrc file causes the edited file to be + replaced with an empty file. (Stone Kang). +Solution: Do not write a buffer when it has never been loaded. +Files: src/fileio.c + + +*** ../vim-7.2.324/src/fileio.c 2009-12-02 13:32:10.000000000 +0100 +--- src/fileio.c 2009-12-31 14:08:31.000000000 +0100 +*************** +*** 2981,2986 **** +--- 2981,2993 ---- + + if (fname == NULL || *fname == NUL) /* safety check */ + return FAIL; ++ if (buf->b_ml.ml_mfp == NULL) ++ { ++ /* This can happen during startup when there is a stray "w" in the ++ * vimrc file. */ ++ EMSG(_(e_emptybuf)); ++ return FAIL; ++ } + + /* + * Disallow writing from .exrc and .vimrc in current directory for +*** ../vim-7.2.324/src/version.c 2009-12-31 13:18:05.000000000 +0100 +--- src/version.c 2009-12-31 14:52:29.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 325, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +74. Your most erotic dreams are about cybersex + + /// 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/gvim/vim-7.2/7.2.326 b/gvim/vim-7.2/7.2.326 new file mode 100644 index 0000000..8e988a8 --- /dev/null +++ b/gvim/vim-7.2/7.2.326 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.326 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.326 +Problem: Win32: $HOME doesn't work when %HOMEPATH% is not defined. +Solution: Use "\" for %HOMEPATH% when it is not defined. +Files: src/misc1.c + + +*** ../vim-7.2.325/src/misc1.c 2009-12-02 17:47:46.000000000 +0100 +--- src/misc1.c 2010-01-05 19:53:23.000000000 +0100 +*************** +*** 3470,3476 **** + + homedrive = mch_getenv((char_u *)"HOMEDRIVE"); + homepath = mch_getenv((char_u *)"HOMEPATH"); +! if (homedrive != NULL && homepath != NULL + && STRLEN(homedrive) + STRLEN(homepath) < MAXPATHL) + { + sprintf((char *)NameBuff, "%s%s", homedrive, homepath); +--- 3470,3478 ---- + + homedrive = mch_getenv((char_u *)"HOMEDRIVE"); + homepath = mch_getenv((char_u *)"HOMEPATH"); +! if (homepath == NULL || *homepath == NUL) +! homepath = "\\"; +! if (homedrive != NULL + && STRLEN(homedrive) + STRLEN(homepath) < MAXPATHL) + { + sprintf((char *)NameBuff, "%s%s", homedrive, homepath); +*** ../vim-7.2.325/src/version.c 2009-12-31 14:52:48.000000000 +0100 +--- src/version.c 2010-01-06 17:39:23.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 326, + /**/ + +-- +From "know your smileys": + :q vi user saying, "How do I get out of this damn emacs editor?" + + /// 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/gvim/vim-7.2/7.2.327 b/gvim/vim-7.2/7.2.327 new file mode 100644 index 0000000..4bfb077 --- /dev/null +++ b/gvim/vim-7.2/7.2.327 @@ -0,0 +1,323 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.327 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.327 +Problem: Unused functions in Workshop. +Solution: Add "#if 0" and minor cleanup. (Dominique Pelle) +Files: src/workshop.c, src/integration.c, src/ingegration.h + + +*** ../vim-7.2.326/src/workshop.c 2009-05-21 23:25:38.000000000 +0200 +--- src/workshop.c 2010-01-06 18:10:10.000000000 +0100 +*************** +*** 56,67 **** + static void load_window(char *, int lnum); + static void warp_to_pc(int); + #ifdef FEAT_BEVAL +! void workshop_beval_cb(BalloonEval *, int); + #endif + static char *fixAccelText(char *); + static void addMenu(char *, char *, char *); + static char *lookupVerb(char *, int); +- static int computeIndex(int, char_u *, int); + static void coloncmd(char *, Boolean); + + extern Widget vimShell; +--- 56,67 ---- + static void load_window(char *, int lnum); + static void warp_to_pc(int); + #ifdef FEAT_BEVAL +! void workshop_beval_cb(BalloonEval *, int); +! static int computeIndex(int, char_u *, int); + #endif + static char *fixAccelText(char *); + static void addMenu(char *, char *, char *); + static char *lookupVerb(char *, int); + static void coloncmd(char *, Boolean); + + extern Widget vimShell; +*************** +*** 1624,1631 **** + } + } + } +- #endif +- + + static int + computeIndex( +--- 1624,1629 ---- +*************** +*** 1649,1654 **** +--- 1647,1653 ---- + + return -1; + } ++ #endif + + static void + addMenu( +*** ../vim-7.2.326/src/integration.c 2008-06-24 22:27:10.000000000 +0200 +--- src/integration.c 2010-01-06 18:18:11.000000000 +0100 +*************** +*** 78,84 **** + + /* Functions private to this file */ + static void workshop_connection_closed(void); +! static void messageFromEserve(XtPointer clientData, int *NOTUSED1, XtInputId *NOTUSED2); + static void workshop_disconnect(void); + static void workshop_sensitivity(int num, char *table); + static void adjust_sign_name(char *filename); +--- 78,84 ---- + + /* Functions private to this file */ + static void workshop_connection_closed(void); +! static void messageFromEserve(XtPointer clientData, int *dum1, XtInputId *dum2); + static void workshop_disconnect(void); + static void workshop_sensitivity(int num, char *table); + static void adjust_sign_name(char *filename); +*************** +*** 157,165 **** + + } + +- /*ARGSUSED*/ + void +! messageFromEserve(XtPointer clientData, int *NOTUSED1, XtInputId *NOTUSED2) + { + char *cmd; /* the 1st word of the command */ + +--- 157,166 ---- + + } + + void +! messageFromEserve(XtPointer clientData UNUSED, +! int *dum1 UNUSED, +! XtInputId *dum2 UNUSED) + { + char *cmd; /* the 1st word of the command */ + +*************** +*** 199,205 **** + if (sign) { + sign++; + } +! /* Change sign name to accomodate a different size? */ + adjust_sign_name(sign); + workshop_add_mark_type(idx, color, sign); + } +--- 200,206 ---- + if (sign) { + sign++; + } +! /* Change sign name to accommodate a different size? */ + adjust_sign_name(sign); + workshop_add_mark_type(idx, color, sign); + } +*************** +*** 580,586 **** + #endif + + +! /* Change sign name to accomodate a different size: + * Create the filename based on the height. The filename format + * of multisize icons are: + * x.xpm : largest icon +--- 581,587 ---- + #endif + + +! /* Change sign name to accommodate a different size: + * Create the filename based on the height. The filename format + * of multisize icons are: + * x.xpm : largest icon +*************** +*** 614,619 **** +--- 615,621 ---- + strcpy(s, ".xpm"); + } + ++ #if 0 + /* Were we invoked by WorkShop? This function can be used early during startup + if you want to do things differently if the editor is started standalone + or in WorkShop mode. For example, in standalone mode you may not want to +*************** +*** 627,632 **** +--- 629,635 ---- + } + return result; + } ++ #endif + + /* Connect back to eserve */ + void workshop_connect(XtAppContext context) +*************** +*** 750,755 **** +--- 753,759 ---- + * Utility functions + */ + ++ #if 0 + /* Set icon for the window */ + void + workshop_set_icon(Display *display, Widget shell, char **xpmdata, +*************** +*** 793,798 **** +--- 797,803 ---- + } + XtFree((char *)xpmAttributes.colorsymbols); + } ++ #endif + + /* Minimize and maximize shells. From libutil's shell.cc. */ + +*************** +*** 927,933 **** + return success; + } + +! + Boolean workshop_get_rows_cols(int *rows, int *cols) + { + static int r = 0; +--- 932,938 ---- + return success; + } + +! #if 0 + Boolean workshop_get_rows_cols(int *rows, int *cols) + { + static int r = 0; +*************** +*** 958,963 **** +--- 963,969 ---- + } + return success; + } ++ #endif + + /* + * Toolbar code +*************** +*** 1043,1054 **** + } + + +! + /* + * Send information to eserve on certain editor events + * You must make sure these are called when necessary + */ +- + void workshop_file_closed(char *filename) + { + char buffer[2*MAXPATHLEN]; +--- 1049,1059 ---- + } + + +! #if 0 + /* + * Send information to eserve on certain editor events + * You must make sure these are called when necessary + */ + void workshop_file_closed(char *filename) + { + char buffer[2*MAXPATHLEN]; +*************** +*** 1056,1061 **** +--- 1061,1067 ---- + NOCATGETS("deletedFile %s\n"), filename); + write(sd, buffer, strlen(buffer)); + } ++ #endif + + void workshop_file_closed_lineno(char *filename, int lineno) + { +*************** +*** 1086,1106 **** + workshop_moved_marks(filename); + } + +! void workshop_move_mark(char *filename, int markId, int newLineno) + { + char buffer[2*MAXPATHLEN]; + vim_snprintf(buffer, sizeof(buffer), +! NOCATGETS("moveMark %s %d %d\n"), filename, markId, newLineno); + write(sd, buffer, strlen(buffer)); + } + +! void workshop_file_modified(char *filename) + { + char buffer[2*MAXPATHLEN]; + vim_snprintf(buffer, sizeof(buffer), +! NOCATGETS("modifiedFile %s\n"), filename); + write(sd, buffer, strlen(buffer)); + } + + void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h) + { +--- 1092,1114 ---- + workshop_moved_marks(filename); + } + +! #if 0 +! void workshop_file_modified(char *filename) + { + char buffer[2*MAXPATHLEN]; + vim_snprintf(buffer, sizeof(buffer), +! NOCATGETS("modifiedFile %s\n"), filename); + write(sd, buffer, strlen(buffer)); + } + +! void workshop_move_mark(char *filename, int markId, int newLineno) + { + char buffer[2*MAXPATHLEN]; + vim_snprintf(buffer, sizeof(buffer), +! NOCATGETS("moveMark %s %d %d\n"), filename, markId, newLineno); + write(sd, buffer, strlen(buffer)); + } ++ #endif + + void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h) + { +*************** +*** 1179,1188 **** +--- 1187,1198 ---- + } + + /* Send a message to eserve */ ++ #if defined(NOHANDS_SUPPORT_FUNCTIONS) || defined(FEAT_BEVAL) + void workshop_send_message(char *buf) + { + write(sd, buf, strlen(buf)); + } ++ #endif + + /* Some methods, like currentFile, cursorPos, etc. are missing here. + * But it looks like these are used for NoHands testing only so we +*** ../vim-7.2.326/src/version.c 2010-01-06 17:46:03.000000000 +0100 +--- src/version.c 2010-01-06 18:20:41.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 327, + /**/ + +-- +From "know your smileys": + (:-# Said something he shouldn't have + + /// 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/gvim/vim-7.2/7.2.328 b/gvim/vim-7.2/7.2.328 new file mode 100644 index 0000000..f547fb9 --- /dev/null +++ b/gvim/vim-7.2/7.2.328 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.328 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.328 +Problem: has("win64") does not return 1 on 64 bit MS-Windows version. +Solution: Also check for _WIN64 besides WIN64. +Files: src/eval.c + + +*** ../vim-7.2.327/src/eval.c 2009-12-31 13:18:05.000000000 +0100 +--- src/eval.c 2010-01-06 16:28:23.000000000 +0100 +*************** +*** 11453,11459 **** + #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__)) + "win32unix", + #endif +! #ifdef WIN64 + "win64", + #endif + #ifdef EBCDIC +--- 11453,11459 ---- + #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__)) + "win32unix", + #endif +! #if defined(WIN64) || defined(_WIN64) + "win64", + #endif + #ifdef EBCDIC +*** ../vim-7.2.327/src/version.c 2010-01-06 18:24:53.000000000 +0100 +--- src/version.c 2010-01-12 12:10:06.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 328, + /**/ + +-- +From "know your smileys": + :.-( Crying + + /// 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/gvim/vim-7.2/7.2.329 b/gvim/vim-7.2/7.2.329 new file mode 100644 index 0000000..f92bc65 --- /dev/null +++ b/gvim/vim-7.2/7.2.329 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.329 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.329 +Problem: "g_" doesn't position cursor correctly when in Visual mode and + 'selection' is "exclusive". (Ben Fritz) +Solution: Call adjust_for_sel(). +Files: src/normal.c + + +*** ../vim-7.2.328/src/normal.c 2009-12-24 15:00:31.000000000 +0100 +--- src/normal.c 2010-01-09 15:19:47.000000000 +0100 +*************** +*** 7873,7878 **** +--- 7873,7881 ---- + && vim_iswhite(ptr[curwin->w_cursor.col])) + --curwin->w_cursor.col; + curwin->w_set_curswant = TRUE; ++ #ifdef FEAT_VISUAL ++ adjust_for_sel(cap); ++ #endif + } + break; + +*** ../vim-7.2.328/src/version.c 2010-01-12 12:48:40.000000000 +0100 +--- src/version.c 2010-01-12 15:41:13.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 329, + /**/ + +-- +From "know your smileys": + |-( Contact lenses, but has lost them + + /// 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/gvim/vim-7.2/7.2.330 b/gvim/vim-7.2/7.2.330 new file mode 100644 index 0000000..0d9c3f1 --- /dev/null +++ b/gvim/vim-7.2/7.2.330 @@ -0,0 +1,1531 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.330 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.330 +Problem: Tables for Unicode case operators are outdated. +Solution: Add a Vim script for generating the tables. Include tables for + Unicode 5.2. +Files: runtime/tools/README.txt, runtime/tools/unicode.vim, src/mbyte.c + + +*** ../vim-7.2.329/runtime/tools/README.txt 2005-12-02 01:47:43.000000000 +0100 +--- runtime/tools/README.txt 2010-01-12 19:43:13.000000000 +0100 +*************** +*** 32,35 **** +--- 32,37 ---- + xcmdsrv_client.c: Example for a client program that communicates with a Vim + server through the X-Windows interface. + ++ unicode.vim Vim script to generate tables for src/mbyte.c. ++ + [xxd (and tee for OS/2) can be found in the src directory] +*** ../vim-7.2.329/runtime/tools/unicode.vim 2010-01-12 19:47:33.000000000 +0100 +--- runtime/tools/unicode.vim 2010-01-12 19:42:14.000000000 +0100 +*************** +*** 0 **** +--- 1,280 ---- ++ " Script to extract tables from Unicode .txt files, to be used in src/mbyte.c. ++ " The format of the UnicodeData.txt file is explained here: ++ " http://www.unicode.org/Public/5.1.0/ucd/UCD.html ++ " For the other files see the header. ++ " ++ " Usage: Vim -S ++ " ++ " Author: Bram Moolenaar ++ " Last Update: 2010 Jan 12 ++ ++ " Parse lines of UnicodeData.txt. Creates a list of lists in s:dataprops. ++ func! ParseDataToProps() ++ let s:dataprops = [] ++ let lnum = 1 ++ while lnum <= line('$') ++ let l = split(getline(lnum), '\s*;\s*', 1) ++ if len(l) != 15 ++ echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 15' ++ return ++ endif ++ call add(s:dataprops, l) ++ let lnum += 1 ++ endwhile ++ endfunc ++ ++ " Parse lines of CaseFolding.txt. Creates a list of lists in s:foldprops. ++ func! ParseFoldProps() ++ let s:foldprops = [] ++ let lnum = 1 ++ while lnum <= line('$') ++ let line = getline(lnum) ++ if line !~ '^#' && line !~ '^\s*$' ++ let l = split(line, '\s*;\s*', 1) ++ if len(l) != 4 ++ echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 4' ++ return ++ endif ++ call add(s:foldprops, l) ++ endif ++ let lnum += 1 ++ endwhile ++ endfunc ++ ++ " Parse lines of EastAsianWidth.txt. Creates a list of lists in s:widthprops. ++ func! ParseWidthProps() ++ let s:widthprops = [] ++ let lnum = 1 ++ while lnum <= line('$') ++ let line = getline(lnum) ++ if line !~ '^#' && line !~ '^\s*$' ++ let l = split(line, '\s*;\s*', 1) ++ if len(l) != 2 ++ echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 2' ++ return ++ endif ++ call add(s:widthprops, l) ++ endif ++ let lnum += 1 ++ endwhile ++ endfunc ++ ++ " Build the toLower or toUpper table in a new buffer. ++ " Uses s:dataprops. ++ func! BuildCaseTable(name, index) ++ let start = -1 ++ let end = -1 ++ let step = 0 ++ let add = -1 ++ let ranges = [] ++ for p in s:dataprops ++ if p[a:index] != '' ++ let n = ('0x' . p[0]) + 0 ++ let nl = ('0x' . p[a:index]) + 0 ++ if start >= 0 && add == nl - n && (step == 0 || n - end == step) ++ " continue with same range. ++ let step = n - end ++ let end = n ++ else ++ if start >= 0 ++ " produce previous range ++ call Range(ranges, start, end, step, add) ++ endif ++ let start = n ++ let end = n ++ let step = 0 ++ let add = nl - n ++ endif ++ endif ++ endfor ++ if start >= 0 ++ call Range(ranges, start, end, step, add) ++ endif ++ ++ " New buffer to put the result in. ++ new ++ exe "file to" . a:name ++ call setline(1, "static convertStruct to" . a:name . "[] =") ++ call setline(2, "{") ++ call append('$', ranges) ++ call setline('$', getline('$')[:-2]) " remove last comma ++ call setline(line('$') + 1, "};") ++ wincmd p ++ endfunc ++ ++ " Build the foldCase table in a new buffer. ++ " Uses s:foldprops. ++ func! BuildFoldTable() ++ let start = -1 ++ let end = -1 ++ let step = 0 ++ let add = -1 ++ let ranges = [] ++ for p in s:foldprops ++ if p[1] == 'C' || p[1] == 'S' ++ let n = ('0x' . p[0]) + 0 ++ let nl = ('0x' . p[2]) + 0 ++ if start >= 0 && add == nl - n && (step == 0 || n - end == step) ++ " continue with same range. ++ let step = n - end ++ let end = n ++ else ++ if start >= 0 ++ " produce previous range ++ call Range(ranges, start, end, step, add) ++ endif ++ let start = n ++ let end = n ++ let step = 0 ++ let add = nl - n ++ endif ++ endif ++ endfor ++ if start >= 0 ++ call Range(ranges, start, end, step, add) ++ endif ++ ++ " New buffer to put the result in. ++ new ++ file foldCase ++ call setline(1, "static convertStruct foldCase[] =") ++ call setline(2, "{") ++ call append('$', ranges) ++ call setline('$', getline('$')[:-2]) " remove last comma ++ call setline(line('$') + 1, "};") ++ wincmd p ++ endfunc ++ ++ func! Range(ranges, start, end, step, add) ++ let s = printf("\t{0x%x,0x%x,%d,%d},", a:start, a:end, a:step == 0 ? -1 : a:step, a:add) ++ call add(a:ranges, s) ++ endfunc ++ ++ " Build the combining table. ++ " Uses s:dataprops. ++ func! BuildCombiningTable() ++ let start = -1 ++ let end = -1 ++ let ranges = [] ++ for p in s:dataprops ++ if p[2] == 'Mn' || p[2] == 'Mc' || p[2] == 'Me' ++ let n = ('0x' . p[0]) + 0 ++ if start >= 0 && end + 1 == n ++ " continue with same range. ++ let end = n ++ else ++ if start >= 0 ++ " produce previous range ++ call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) ++ endif ++ let start = n ++ let end = n ++ endif ++ endif ++ endfor ++ if start >= 0 ++ call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) ++ endif ++ ++ " New buffer to put the result in. ++ new ++ file combining ++ call setline(1, " static struct interval combining[] =") ++ call setline(2, " {") ++ call append('$', ranges) ++ call setline('$', getline('$')[:-2]) " remove last comma ++ call setline(line('$') + 1, " };") ++ wincmd p ++ endfunc ++ ++ " Build the ambiguous table in a new buffer. ++ " Uses s:widthprops and s:dataprops. ++ func! BuildAmbiguousTable() ++ let start = -1 ++ let end = -1 ++ let ranges = [] ++ let dataidx = 0 ++ for p in s:widthprops ++ if p[1][0] == 'A' ++ let n = ('0x' . p[0]) + 0 ++ " Find this char in the data table. ++ while 1 ++ let dn = ('0x' . s:dataprops[dataidx][0]) + 0 ++ if dn >= n ++ break ++ endif ++ let dataidx += 1 ++ endwhile ++ if dn != n ++ echoerr "Cannot find character " . n . " in data table" ++ endif ++ " Only use the char when it's not a composing char. ++ let dp = s:dataprops[dataidx] ++ if dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me' ++ if start >= 0 && end + 1 == n ++ " continue with same range. ++ let end = n ++ else ++ if start >= 0 ++ " produce previous range ++ call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) ++ endif ++ let start = n ++ if p[0] =~ '\.\.' ++ let end = ('0x' . substitute(p[0], '.*\.\.', '', '')) + 0 ++ else ++ let end = n ++ endif ++ endif ++ endif ++ endif ++ endfor ++ if start >= 0 ++ call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) ++ endif ++ ++ " New buffer to put the result in. ++ new ++ file ambiguous ++ call setline(1, " static struct interval ambiguous[] =") ++ call setline(2, " {") ++ call append('$', ranges) ++ call setline('$', getline('$')[:-2]) " remove last comma ++ call setline(line('$') + 1, " };") ++ wincmd p ++ endfunc ++ ++ ++ ++ " Edit the Unicode text file. Requires the netrw plugin. ++ edit http://unicode.org/Public/UNIDATA/UnicodeData.txt ++ ++ " Parse each line, create a list of lists. ++ call ParseDataToProps() ++ ++ " Build the toLower table. ++ call BuildCaseTable("Lower", 13) ++ ++ " Build the toUpper table. ++ call BuildCaseTable("Upper", 12) ++ ++ " Build the ranges of composing chars. ++ call BuildCombiningTable() ++ ++ " Edit the case folding text file. Requires the netrw plugin. ++ edit http://www.unicode.org/Public/UNIDATA/CaseFolding.txt ++ ++ " Parse each line, create a list of lists. ++ call ParseFoldProps() ++ ++ " Build the foldCase table. ++ call BuildFoldTable() ++ ++ " Edit the width text file. Requires the netrw plugin. ++ edit http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt ++ ++ " Parse each line, create a list of lists. ++ call ParseWidthProps() ++ ++ " Build the ambiguous table. ++ call BuildAmbiguousTable() +*** ../vim-7.2.329/src/mbyte.c 2009-12-02 15:03:24.000000000 +0100 +--- src/mbyte.c 2010-01-12 19:35:49.000000000 +0100 +*************** +*** 26,32 **** + * Recognizing bytes is easy: 0xxx.xxxx is a single-byte + * char, 10xx.xxxx is a trailing byte, 11xx.xxxx is a leading + * byte of a multi-byte character. +! * To make things complicated, up to two composing characters + * are allowed. These are drawn on top of the first char. + * For most editing the sequence of bytes with composing + * characters included is considered to be one character. +--- 26,32 ---- + * Recognizing bytes is easy: 0xxx.xxxx is a single-byte + * char, 10xx.xxxx is a trailing byte, 11xx.xxxx is a leading + * byte of a multi-byte character. +! * To make things complicated, up to six composing characters + * are allowed. These are drawn on top of the first char. + * For most editing the sequence of bytes with composing + * characters included is considered to be one character. +*************** +*** 1153,1160 **** + + struct interval + { +! unsigned short first; +! unsigned short last; + }; + static int intable __ARGS((struct interval *table, size_t size, int c)); + +--- 1153,1160 ---- + + struct interval + { +! long first; +! long last; + }; + static int intable __ARGS((struct interval *table, size_t size, int c)); + +*************** +*** 1200,1261 **** + utf_char2cells(c) + int c; + { +! /* sorted list of non-overlapping intervals of East Asian Ambiguous +! * characters, generated with: +! * "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */ +! static struct interval ambiguous[] = { +! {0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8}, +! {0x00AA, 0x00AA}, {0x00AE, 0x00AE}, {0x00B0, 0x00B4}, +! {0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6}, +! {0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1}, +! {0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED}, +! {0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA}, +! {0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101}, +! {0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B}, +! {0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133}, +! {0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144}, +! {0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153}, +! {0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE}, +! {0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4}, +! {0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA}, +! {0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261}, +! {0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB}, +! {0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB}, +! {0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0391, 0x03A1}, +! {0x03A3, 0x03A9}, {0x03B1, 0x03C1}, {0x03C3, 0x03C9}, +! {0x0401, 0x0401}, {0x0410, 0x044F}, {0x0451, 0x0451}, +! {0x2010, 0x2010}, {0x2013, 0x2016}, {0x2018, 0x2019}, +! {0x201C, 0x201D}, {0x2020, 0x2022}, {0x2024, 0x2027}, +! {0x2030, 0x2030}, {0x2032, 0x2033}, {0x2035, 0x2035}, +! {0x203B, 0x203B}, {0x203E, 0x203E}, {0x2074, 0x2074}, +! {0x207F, 0x207F}, {0x2081, 0x2084}, {0x20AC, 0x20AC}, +! {0x2103, 0x2103}, {0x2105, 0x2105}, {0x2109, 0x2109}, +! {0x2113, 0x2113}, {0x2116, 0x2116}, {0x2121, 0x2122}, +! {0x2126, 0x2126}, {0x212B, 0x212B}, {0x2153, 0x2154}, +! {0x215B, 0x215E}, {0x2160, 0x216B}, {0x2170, 0x2179}, +! {0x2190, 0x2199}, {0x21B8, 0x21B9}, {0x21D2, 0x21D2}, +! {0x21D4, 0x21D4}, {0x21E7, 0x21E7}, {0x2200, 0x2200}, +! {0x2202, 0x2203}, {0x2207, 0x2208}, {0x220B, 0x220B}, +! {0x220F, 0x220F}, {0x2211, 0x2211}, {0x2215, 0x2215}, +! {0x221A, 0x221A}, {0x221D, 0x2220}, {0x2223, 0x2223}, +! {0x2225, 0x2225}, {0x2227, 0x222C}, {0x222E, 0x222E}, +! {0x2234, 0x2237}, {0x223C, 0x223D}, {0x2248, 0x2248}, +! {0x224C, 0x224C}, {0x2252, 0x2252}, {0x2260, 0x2261}, +! {0x2264, 0x2267}, {0x226A, 0x226B}, {0x226E, 0x226F}, +! {0x2282, 0x2283}, {0x2286, 0x2287}, {0x2295, 0x2295}, +! {0x2299, 0x2299}, {0x22A5, 0x22A5}, {0x22BF, 0x22BF}, +! {0x2312, 0x2312}, {0x2460, 0x24E9}, {0x24EB, 0x254B}, +! {0x2550, 0x2573}, {0x2580, 0x258F}, {0x2592, 0x2595}, +! {0x25A0, 0x25A1}, {0x25A3, 0x25A9}, {0x25B2, 0x25B3}, +! {0x25B6, 0x25B7}, {0x25BC, 0x25BD}, {0x25C0, 0x25C1}, +! {0x25C6, 0x25C8}, {0x25CB, 0x25CB}, {0x25CE, 0x25D1}, +! {0x25E2, 0x25E5}, {0x25EF, 0x25EF}, {0x2605, 0x2606}, +! {0x2609, 0x2609}, {0x260E, 0x260F}, {0x2614, 0x2615}, +! {0x261C, 0x261C}, {0x261E, 0x261E}, {0x2640, 0x2640}, +! {0x2642, 0x2642}, {0x2660, 0x2661}, {0x2663, 0x2665}, +! {0x2667, 0x266A}, {0x266C, 0x266D}, {0x266F, 0x266F}, +! {0x273D, 0x273D}, {0x2776, 0x277F}, {0xE000, 0xF8FF}, +! {0xFFFD, 0xFFFD}, /* {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD} */ + }; + + if (c >= 0x100) +--- 1200,1390 ---- + utf_char2cells(c) + int c; + { +! /* Sorted list of non-overlapping intervals of East Asian Ambiguous +! * characters, generated with ../runtime/tools/unicode.vim. */ +! static struct interval ambiguous[] = +! { +! {0x00a1, 0x00a1}, +! {0x00a4, 0x00a4}, +! {0x00a7, 0x00a8}, +! {0x00aa, 0x00aa}, +! {0x00ad, 0x00ae}, +! {0x00b0, 0x00b4}, +! {0x00b6, 0x00ba}, +! {0x00bc, 0x00bf}, +! {0x00c6, 0x00c6}, +! {0x00d0, 0x00d0}, +! {0x00d7, 0x00d8}, +! {0x00de, 0x00e1}, +! {0x00e6, 0x00e6}, +! {0x00e8, 0x00ea}, +! {0x00ec, 0x00ed}, +! {0x00f0, 0x00f0}, +! {0x00f2, 0x00f3}, +! {0x00f7, 0x00fa}, +! {0x00fc, 0x00fc}, +! {0x00fe, 0x00fe}, +! {0x0101, 0x0101}, +! {0x0111, 0x0111}, +! {0x0113, 0x0113}, +! {0x011b, 0x011b}, +! {0x0126, 0x0127}, +! {0x012b, 0x012b}, +! {0x0131, 0x0133}, +! {0x0138, 0x0138}, +! {0x013f, 0x0142}, +! {0x0144, 0x0144}, +! {0x0148, 0x014b}, +! {0x014d, 0x014d}, +! {0x0152, 0x0153}, +! {0x0166, 0x0167}, +! {0x016b, 0x016b}, +! {0x01ce, 0x01ce}, +! {0x01d0, 0x01d0}, +! {0x01d2, 0x01d2}, +! {0x01d4, 0x01d4}, +! {0x01d6, 0x01d6}, +! {0x01d8, 0x01d8}, +! {0x01da, 0x01da}, +! {0x01dc, 0x01dc}, +! {0x0251, 0x0251}, +! {0x0261, 0x0261}, +! {0x02c4, 0x02c4}, +! {0x02c7, 0x02c7}, +! {0x02c9, 0x02cb}, +! {0x02cd, 0x02cd}, +! {0x02d0, 0x02d0}, +! {0x02d8, 0x02db}, +! {0x02dd, 0x02dd}, +! {0x02df, 0x02df}, +! {0x0391, 0x03a1}, +! {0x03a3, 0x03a9}, +! {0x03b1, 0x03c1}, +! {0x03c3, 0x03c9}, +! {0x0401, 0x0401}, +! {0x0410, 0x044f}, +! {0x0451, 0x0451}, +! {0x2010, 0x2010}, +! {0x2013, 0x2016}, +! {0x2018, 0x2019}, +! {0x201c, 0x201d}, +! {0x2020, 0x2022}, +! {0x2024, 0x2027}, +! {0x2030, 0x2030}, +! {0x2032, 0x2033}, +! {0x2035, 0x2035}, +! {0x203b, 0x203b}, +! {0x203e, 0x203e}, +! {0x2074, 0x2074}, +! {0x207f, 0x207f}, +! {0x2081, 0x2084}, +! {0x20ac, 0x20ac}, +! {0x2103, 0x2103}, +! {0x2105, 0x2105}, +! {0x2109, 0x2109}, +! {0x2113, 0x2113}, +! {0x2116, 0x2116}, +! {0x2121, 0x2122}, +! {0x2126, 0x2126}, +! {0x212b, 0x212b}, +! {0x2153, 0x2154}, +! {0x215b, 0x215e}, +! {0x2160, 0x216b}, +! {0x2170, 0x2179}, +! {0x2189, 0x2189}, +! {0x2190, 0x2199}, +! {0x21b8, 0x21b9}, +! {0x21d2, 0x21d2}, +! {0x21d4, 0x21d4}, +! {0x21e7, 0x21e7}, +! {0x2200, 0x2200}, +! {0x2202, 0x2203}, +! {0x2207, 0x2208}, +! {0x220b, 0x220b}, +! {0x220f, 0x220f}, +! {0x2211, 0x2211}, +! {0x2215, 0x2215}, +! {0x221a, 0x221a}, +! {0x221d, 0x2220}, +! {0x2223, 0x2223}, +! {0x2225, 0x2225}, +! {0x2227, 0x222c}, +! {0x222e, 0x222e}, +! {0x2234, 0x2237}, +! {0x223c, 0x223d}, +! {0x2248, 0x2248}, +! {0x224c, 0x224c}, +! {0x2252, 0x2252}, +! {0x2260, 0x2261}, +! {0x2264, 0x2267}, +! {0x226a, 0x226b}, +! {0x226e, 0x226f}, +! {0x2282, 0x2283}, +! {0x2286, 0x2287}, +! {0x2295, 0x2295}, +! {0x2299, 0x2299}, +! {0x22a5, 0x22a5}, +! {0x22bf, 0x22bf}, +! {0x2312, 0x2312}, +! {0x2460, 0x24e9}, +! {0x24eb, 0x254b}, +! {0x2550, 0x2573}, +! {0x2580, 0x258f}, +! {0x2592, 0x2595}, +! {0x25a0, 0x25a1}, +! {0x25a3, 0x25a9}, +! {0x25b2, 0x25b3}, +! {0x25b6, 0x25b7}, +! {0x25bc, 0x25bd}, +! {0x25c0, 0x25c1}, +! {0x25c6, 0x25c8}, +! {0x25cb, 0x25cb}, +! {0x25ce, 0x25d1}, +! {0x25e2, 0x25e5}, +! {0x25ef, 0x25ef}, +! {0x2605, 0x2606}, +! {0x2609, 0x2609}, +! {0x260e, 0x260f}, +! {0x2614, 0x2615}, +! {0x261c, 0x261c}, +! {0x261e, 0x261e}, +! {0x2640, 0x2640}, +! {0x2642, 0x2642}, +! {0x2660, 0x2661}, +! {0x2663, 0x2665}, +! {0x2667, 0x266a}, +! {0x266c, 0x266d}, +! {0x266f, 0x266f}, +! {0x269e, 0x269f}, +! {0x26be, 0x26bf}, +! {0x26c4, 0x26cd}, +! {0x26cf, 0x26e1}, +! {0x26e3, 0x26e3}, +! {0x26e8, 0x26ff}, +! {0x273d, 0x273d}, +! {0x2757, 0x2757}, +! {0x2776, 0x277f}, +! {0x2b55, 0x2b59}, +! {0x3248, 0x324f}, +! {0xe000, 0xf8ff}, +! {0xfffd, 0xfffd}, +! {0x1f100, 0x1f10a}, +! {0x1f110, 0x1f12d}, +! {0x1f131, 0x1f131}, +! {0x1f13d, 0x1f13d}, +! {0x1f13f, 0x1f13f}, +! {0x1f142, 0x1f142}, +! {0x1f146, 0x1f146}, +! {0x1f14a, 0x1f14e}, +! {0x1f157, 0x1f157}, +! {0x1f15f, 0x1f15f}, +! {0x1f179, 0x1f179}, +! {0x1f17b, 0x1f17c}, +! {0x1f17f, 0x1f17f}, +! {0x1f18a, 0x1f18d}, +! {0x1f190, 0x1f190}, +! {0xf0000, 0xffffd}, +! {0x100000, 0x10fffd} + }; + + if (c >= 0x100) +*************** +*** 1807,1813 **** + return 1; + + /* +! * Check for composing characters. We can handle only the first two, but + * skip all of them (otherwise the cursor would get stuck). + */ + #ifdef FEAT_ARABIC +--- 1936,1942 ---- + return 1; + + /* +! * Check for composing characters. We can handle only the first six, but + * skip all of them (otherwise the cursor would get stuck). + */ + #ifdef FEAT_ARABIC +*************** +*** 1855,1861 **** + return 1; + + /* +! * Check for composing characters. We can handle only the first two, but + * skip all of them (otherwise the cursor would get stuck). + */ + #ifdef FEAT_ARABIC +--- 1984,1990 ---- + return 1; + + /* +! * Check for composing characters. We can handle only the first six, but + * skip all of them (otherwise the cursor would get stuck). + */ + #ifdef FEAT_ARABIC +*************** +*** 1973,2010 **** + utf_iscomposing(c) + int c; + { +! /* sorted list of non-overlapping intervals */ + static struct interval combining[] = + { +! {0x0300, 0x034f}, {0x0360, 0x036f}, {0x0483, 0x0486}, {0x0488, 0x0489}, +! {0x0591, 0x05a1}, {0x05a3, 0x05b9}, {0x05bb, 0x05bd}, {0x05bf, 0x05bf}, +! {0x05c1, 0x05c2}, {0x05c4, 0x05c4}, {0x0610, 0x0615}, {0x064b, 0x0658}, +! {0x0670, 0x0670}, {0x06d6, 0x06dc}, {0x06de, 0x06e4}, {0x06e7, 0x06e8}, +! {0x06ea, 0x06ed}, {0x0711, 0x0711}, {0x0730, 0x074a}, {0x07a6, 0x07b0}, +! {0x0901, 0x0903}, {0x093c, 0x093c}, {0x093e, 0x094d}, {0x0951, 0x0954}, +! {0x0962, 0x0963}, {0x0981, 0x0983}, {0x09bc, 0x09bc}, {0x09be, 0x09c4}, +! {0x09c7, 0x09c8}, {0x09cb, 0x09cd}, {0x09d7, 0x09d7}, {0x09e2, 0x09e3}, +! {0x0a01, 0x0a03}, {0x0a3c, 0x0a3c}, {0x0a3e, 0x0a42}, {0x0a47, 0x0a48}, +! {0x0a4b, 0x0a4d}, {0x0a70, 0x0a71}, {0x0a81, 0x0a83}, {0x0abc, 0x0abc}, +! {0x0abe, 0x0ac5}, {0x0ac7, 0x0ac9}, {0x0acb, 0x0acd}, {0x0ae2, 0x0ae3}, +! {0x0b01, 0x0b03}, {0x0b3c, 0x0b3c}, {0x0b3e, 0x0b43}, {0x0b47, 0x0b48}, +! {0x0b4b, 0x0b4d}, {0x0b56, 0x0b57}, {0x0b82, 0x0b82}, {0x0bbe, 0x0bc2}, +! {0x0bc6, 0x0bc8}, {0x0bca, 0x0bcd}, {0x0bd7, 0x0bd7}, {0x0c01, 0x0c03}, +! {0x0c3e, 0x0c44}, {0x0c46, 0x0c48}, {0x0c4a, 0x0c4d}, {0x0c55, 0x0c56}, +! {0x0c82, 0x0c83}, {0x0cbc, 0x0cbc}, {0x0cbe, 0x0cc4}, {0x0cc6, 0x0cc8}, +! {0x0cca, 0x0ccd}, {0x0cd5, 0x0cd6}, {0x0d02, 0x0d03}, {0x0d3e, 0x0d43}, +! {0x0d46, 0x0d48}, {0x0d4a, 0x0d4d}, {0x0d57, 0x0d57}, {0x0d82, 0x0d83}, +! {0x0dca, 0x0dca}, {0x0dcf, 0x0dd4}, {0x0dd6, 0x0dd6}, {0x0dd8, 0x0ddf}, +! {0x0df2, 0x0df3}, {0x0e31, 0x0e31}, {0x0e34, 0x0e3a}, {0x0e47, 0x0e4e}, +! {0x0eb1, 0x0eb1}, {0x0eb4, 0x0eb9}, {0x0ebb, 0x0ebc}, {0x0ec8, 0x0ecd}, +! {0x0f18, 0x0f19}, {0x0f35, 0x0f35}, {0x0f37, 0x0f37}, {0x0f39, 0x0f39}, +! {0x0f3e, 0x0f3f}, {0x0f71, 0x0f84}, {0x0f86, 0x0f87}, {0x0f90, 0x0f97}, +! {0x0f99, 0x0fbc}, {0x0fc6, 0x0fc6}, {0x102c, 0x1032}, {0x1036, 0x1039}, +! {0x1056, 0x1059}, {0x1712, 0x1714}, {0x1732, 0x1734}, {0x1752, 0x1753}, +! {0x1772, 0x1773}, {0x17b6, 0x17d3}, {0x17dd, 0x17dd}, {0x180b, 0x180d}, +! {0x18a9, 0x18a9}, {0x1920, 0x192b}, {0x1930, 0x193b}, {0x20d0, 0x20ea}, +! {0x302a, 0x302f}, {0x3099, 0x309a}, {0xfb1e, 0xfb1e}, {0xfe00, 0xfe0f}, +! {0xfe20, 0xfe23}, + }; + + return intable(combining, sizeof(combining), c); +--- 2102,2299 ---- + utf_iscomposing(c) + int c; + { +! /* Sorted list of non-overlapping intervals. +! * Generated by ../runtime/tools/unicode.vim. */ + static struct interval combining[] = + { +! {0x0300, 0x036f}, +! {0x0483, 0x0489}, +! {0x0591, 0x05bd}, +! {0x05bf, 0x05bf}, +! {0x05c1, 0x05c2}, +! {0x05c4, 0x05c5}, +! {0x05c7, 0x05c7}, +! {0x0610, 0x061a}, +! {0x064b, 0x065e}, +! {0x0670, 0x0670}, +! {0x06d6, 0x06dc}, +! {0x06de, 0x06e4}, +! {0x06e7, 0x06e8}, +! {0x06ea, 0x06ed}, +! {0x0711, 0x0711}, +! {0x0730, 0x074a}, +! {0x07a6, 0x07b0}, +! {0x07eb, 0x07f3}, +! {0x0816, 0x0819}, +! {0x081b, 0x0823}, +! {0x0825, 0x0827}, +! {0x0829, 0x082d}, +! {0x0900, 0x0903}, +! {0x093c, 0x093c}, +! {0x093e, 0x094e}, +! {0x0951, 0x0955}, +! {0x0962, 0x0963}, +! {0x0981, 0x0983}, +! {0x09bc, 0x09bc}, +! {0x09be, 0x09c4}, +! {0x09c7, 0x09c8}, +! {0x09cb, 0x09cd}, +! {0x09d7, 0x09d7}, +! {0x09e2, 0x09e3}, +! {0x0a01, 0x0a03}, +! {0x0a3c, 0x0a3c}, +! {0x0a3e, 0x0a42}, +! {0x0a47, 0x0a48}, +! {0x0a4b, 0x0a4d}, +! {0x0a51, 0x0a51}, +! {0x0a70, 0x0a71}, +! {0x0a75, 0x0a75}, +! {0x0a81, 0x0a83}, +! {0x0abc, 0x0abc}, +! {0x0abe, 0x0ac5}, +! {0x0ac7, 0x0ac9}, +! {0x0acb, 0x0acd}, +! {0x0ae2, 0x0ae3}, +! {0x0b01, 0x0b03}, +! {0x0b3c, 0x0b3c}, +! {0x0b3e, 0x0b44}, +! {0x0b47, 0x0b48}, +! {0x0b4b, 0x0b4d}, +! {0x0b56, 0x0b57}, +! {0x0b62, 0x0b63}, +! {0x0b82, 0x0b82}, +! {0x0bbe, 0x0bc2}, +! {0x0bc6, 0x0bc8}, +! {0x0bca, 0x0bcd}, +! {0x0bd7, 0x0bd7}, +! {0x0c01, 0x0c03}, +! {0x0c3e, 0x0c44}, +! {0x0c46, 0x0c48}, +! {0x0c4a, 0x0c4d}, +! {0x0c55, 0x0c56}, +! {0x0c62, 0x0c63}, +! {0x0c82, 0x0c83}, +! {0x0cbc, 0x0cbc}, +! {0x0cbe, 0x0cc4}, +! {0x0cc6, 0x0cc8}, +! {0x0cca, 0x0ccd}, +! {0x0cd5, 0x0cd6}, +! {0x0ce2, 0x0ce3}, +! {0x0d02, 0x0d03}, +! {0x0d3e, 0x0d44}, +! {0x0d46, 0x0d48}, +! {0x0d4a, 0x0d4d}, +! {0x0d57, 0x0d57}, +! {0x0d62, 0x0d63}, +! {0x0d82, 0x0d83}, +! {0x0dca, 0x0dca}, +! {0x0dcf, 0x0dd4}, +! {0x0dd6, 0x0dd6}, +! {0x0dd8, 0x0ddf}, +! {0x0df2, 0x0df3}, +! {0x0e31, 0x0e31}, +! {0x0e34, 0x0e3a}, +! {0x0e47, 0x0e4e}, +! {0x0eb1, 0x0eb1}, +! {0x0eb4, 0x0eb9}, +! {0x0ebb, 0x0ebc}, +! {0x0ec8, 0x0ecd}, +! {0x0f18, 0x0f19}, +! {0x0f35, 0x0f35}, +! {0x0f37, 0x0f37}, +! {0x0f39, 0x0f39}, +! {0x0f3e, 0x0f3f}, +! {0x0f71, 0x0f84}, +! {0x0f86, 0x0f87}, +! {0x0f90, 0x0f97}, +! {0x0f99, 0x0fbc}, +! {0x0fc6, 0x0fc6}, +! {0x102b, 0x103e}, +! {0x1056, 0x1059}, +! {0x105e, 0x1060}, +! {0x1062, 0x1064}, +! {0x1067, 0x106d}, +! {0x1071, 0x1074}, +! {0x1082, 0x108d}, +! {0x108f, 0x108f}, +! {0x109a, 0x109d}, +! {0x135f, 0x135f}, +! {0x1712, 0x1714}, +! {0x1732, 0x1734}, +! {0x1752, 0x1753}, +! {0x1772, 0x1773}, +! {0x17b6, 0x17d3}, +! {0x17dd, 0x17dd}, +! {0x180b, 0x180d}, +! {0x18a9, 0x18a9}, +! {0x1920, 0x192b}, +! {0x1930, 0x193b}, +! {0x19b0, 0x19c0}, +! {0x19c8, 0x19c9}, +! {0x1a17, 0x1a1b}, +! {0x1a55, 0x1a5e}, +! {0x1a60, 0x1a7c}, +! {0x1a7f, 0x1a7f}, +! {0x1b00, 0x1b04}, +! {0x1b34, 0x1b44}, +! {0x1b6b, 0x1b73}, +! {0x1b80, 0x1b82}, +! {0x1ba1, 0x1baa}, +! {0x1c24, 0x1c37}, +! {0x1cd0, 0x1cd2}, +! {0x1cd4, 0x1ce8}, +! {0x1ced, 0x1ced}, +! {0x1cf2, 0x1cf2}, +! {0x1dc0, 0x1de6}, +! {0x1dfd, 0x1dff}, +! {0x20d0, 0x20f0}, +! {0x2cef, 0x2cf1}, +! {0x2de0, 0x2dff}, +! {0x302a, 0x302f}, +! {0x3099, 0x309a}, +! {0xa66f, 0xa672}, +! {0xa67c, 0xa67d}, +! {0xa6f0, 0xa6f1}, +! {0xa802, 0xa802}, +! {0xa806, 0xa806}, +! {0xa80b, 0xa80b}, +! {0xa823, 0xa827}, +! {0xa880, 0xa881}, +! {0xa8b4, 0xa8c4}, +! {0xa8e0, 0xa8f1}, +! {0xa926, 0xa92d}, +! {0xa947, 0xa953}, +! {0xa980, 0xa983}, +! {0xa9b3, 0xa9c0}, +! {0xaa29, 0xaa36}, +! {0xaa43, 0xaa43}, +! {0xaa4c, 0xaa4d}, +! {0xaa7b, 0xaa7b}, +! {0xaab0, 0xaab0}, +! {0xaab2, 0xaab4}, +! {0xaab7, 0xaab8}, +! {0xaabe, 0xaabf}, +! {0xaac1, 0xaac1}, +! {0xabe3, 0xabea}, +! {0xabec, 0xabed}, +! {0xfb1e, 0xfb1e}, +! {0xfe00, 0xfe0f}, +! {0xfe20, 0xfe26}, +! {0x101fd, 0x101fd}, +! {0x10a01, 0x10a03}, +! {0x10a05, 0x10a06}, +! {0x10a0c, 0x10a0f}, +! {0x10a38, 0x10a3a}, +! {0x10a3f, 0x10a3f}, +! {0x11080, 0x11082}, +! {0x110b0, 0x110ba}, +! {0x1d165, 0x1d169}, +! {0x1d16d, 0x1d172}, +! {0x1d17b, 0x1d182}, +! {0x1d185, 0x1d18b}, +! {0x1d1aa, 0x1d1ad}, +! {0x1d242, 0x1d244}, +! {0xe0100, 0xe01ef} + }; + + return intable(combining, sizeof(combining), c); +*************** +*** 2152,2166 **** + * Code for Unicode case-dependent operations. Based on notes in + * http://www.unicode.org/Public/UNIDATA/CaseFolding.txt + * This code uses simple case folding, not full case folding. + */ + + /* +! * The following table is built by foldExtract.pl < CaseFolding.txt . +! * It must be in numeric order, because we use binary search on it. +! * An entry such as {0x41,0x5a,1,32} means that UCS-4 characters in the range +! * from 0x41 to 0x5a inclusive, stepping by 1, are folded by adding 32. + */ +- + typedef struct + { + int rangeStart; +--- 2441,2456 ---- + * Code for Unicode case-dependent operations. Based on notes in + * http://www.unicode.org/Public/UNIDATA/CaseFolding.txt + * This code uses simple case folding, not full case folding. ++ * Last updated for Unicode 5.2. + */ + + /* +! * The following tables are built by ../runtime/tools/unicode.vim. +! * They must be in numeric order, because we use binary search. +! * An entry such as {0x41,0x5a,1,32} means that Unicode characters in the +! * range from 0x41 to 0x5a inclusive, stepping by 1, are changed to +! * folded/upper/lower by adding 32. + */ + typedef struct + { + int rangeStart; +*************** +*** 2171,2211 **** + + static convertStruct foldCase[] = + { +! {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32}, +! {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1}, +! {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121}, +! {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1}, +! {0x186,0x186,-1,206}, {0x187,0x187,-1,1}, {0x189,0x18a,1,205}, +! {0x18b,0x18b,-1,1}, {0x18e,0x18e,-1,79}, {0x18f,0x18f,-1,202}, +! {0x190,0x190,-1,203}, {0x191,0x191,-1,1}, {0x193,0x193,-1,205}, +! {0x194,0x194,-1,207}, {0x196,0x196,-1,211}, {0x197,0x197,-1,209}, +! {0x198,0x198,-1,1}, {0x19c,0x19c,-1,211}, {0x19d,0x19d,-1,213}, +! {0x19f,0x19f,-1,214}, {0x1a0,0x1a4,2,1}, {0x1a6,0x1a6,-1,218}, +! {0x1a7,0x1a7,-1,1}, {0x1a9,0x1a9,-1,218}, {0x1ac,0x1ac,-1,1}, +! {0x1ae,0x1ae,-1,218}, {0x1af,0x1af,-1,1}, {0x1b1,0x1b2,1,217}, +! {0x1b3,0x1b5,2,1}, {0x1b7,0x1b7,-1,219}, {0x1b8,0x1bc,4,1}, +! {0x1c4,0x1c4,-1,2}, {0x1c5,0x1c5,-1,1}, {0x1c7,0x1c7,-1,2}, +! {0x1c8,0x1c8,-1,1}, {0x1ca,0x1ca,-1,2}, {0x1cb,0x1db,2,1}, +! {0x1de,0x1ee,2,1}, {0x1f1,0x1f1,-1,2}, {0x1f2,0x1f4,2,1}, +! {0x1f6,0x1f6,-1,-97}, {0x1f7,0x1f7,-1,-56}, {0x1f8,0x21e,2,1}, +! {0x220,0x220,-1,-130}, {0x222,0x232,2,1}, {0x386,0x386,-1,38}, +! {0x388,0x38a,1,37}, {0x38c,0x38c,-1,64}, {0x38e,0x38f,1,63}, +! {0x391,0x3a1,1,32}, {0x3a3,0x3ab,1,32}, {0x3d8,0x3ee,2,1}, +! {0x3f4,0x3f4,-1,-60}, {0x3f7,0x3f7,-1,1}, {0x3f9,0x3f9,-1,-7}, +! {0x3fa,0x3fa,-1,1}, {0x400,0x40f,1,80}, {0x410,0x42f,1,32}, +! {0x460,0x480,2,1}, {0x48a,0x4be,2,1}, {0x4c1,0x4cd,2,1}, +! {0x4d0,0x4f4,2,1}, {0x4f8,0x500,8,1}, {0x502,0x50e,2,1}, +! {0x531,0x556,1,48}, {0x1e00,0x1e94,2,1}, {0x1ea0,0x1ef8,2,1}, +! {0x1f08,0x1f0f,1,-8}, {0x1f18,0x1f1d,1,-8}, {0x1f28,0x1f2f,1,-8}, +! {0x1f38,0x1f3f,1,-8}, {0x1f48,0x1f4d,1,-8}, {0x1f59,0x1f5f,2,-8}, +! {0x1f68,0x1f6f,1,-8}, {0x1f88,0x1f8f,1,-8}, {0x1f98,0x1f9f,1,-8}, +! {0x1fa8,0x1faf,1,-8}, {0x1fb8,0x1fb9,1,-8}, {0x1fba,0x1fbb,1,-74}, +! {0x1fbc,0x1fbc,-1,-9}, {0x1fc8,0x1fcb,1,-86}, {0x1fcc,0x1fcc,-1,-9}, +! {0x1fd8,0x1fd9,1,-8}, {0x1fda,0x1fdb,1,-100}, {0x1fe8,0x1fe9,1,-8}, +! {0x1fea,0x1feb,1,-112}, {0x1fec,0x1fec,-1,-7}, {0x1ff8,0x1ff9,1,-128}, +! {0x1ffa,0x1ffb,1,-126}, {0x1ffc,0x1ffc,-1,-9}, {0x2126,0x2126,-1,-7517}, +! {0x212a,0x212a,-1,-8383}, {0x212b,0x212b,-1,-8262}, +! {0x2160,0x216f,1,16}, {0x24b6,0x24cf,1,26}, {0xff21,0xff3a,1,32}, + {0x10400,0x10427,1,40} + }; + +--- 2461,2621 ---- + + static convertStruct foldCase[] = + { +! {0x41,0x5a,1,32}, +! {0xb5,0xb5,-1,775}, +! {0xc0,0xd6,1,32}, +! {0xd8,0xde,1,32}, +! {0x100,0x12e,2,1}, +! {0x132,0x136,2,1}, +! {0x139,0x147,2,1}, +! {0x14a,0x176,2,1}, +! {0x178,0x178,-1,-121}, +! {0x179,0x17d,2,1}, +! {0x17f,0x17f,-1,-268}, +! {0x181,0x181,-1,210}, +! {0x182,0x184,2,1}, +! {0x186,0x186,-1,206}, +! {0x187,0x187,-1,1}, +! {0x189,0x18a,1,205}, +! {0x18b,0x18b,-1,1}, +! {0x18e,0x18e,-1,79}, +! {0x18f,0x18f,-1,202}, +! {0x190,0x190,-1,203}, +! {0x191,0x191,-1,1}, +! {0x193,0x193,-1,205}, +! {0x194,0x194,-1,207}, +! {0x196,0x196,-1,211}, +! {0x197,0x197,-1,209}, +! {0x198,0x198,-1,1}, +! {0x19c,0x19c,-1,211}, +! {0x19d,0x19d,-1,213}, +! {0x19f,0x19f,-1,214}, +! {0x1a0,0x1a4,2,1}, +! {0x1a6,0x1a6,-1,218}, +! {0x1a7,0x1a7,-1,1}, +! {0x1a9,0x1a9,-1,218}, +! {0x1ac,0x1ac,-1,1}, +! {0x1ae,0x1ae,-1,218}, +! {0x1af,0x1af,-1,1}, +! {0x1b1,0x1b2,1,217}, +! {0x1b3,0x1b5,2,1}, +! {0x1b7,0x1b7,-1,219}, +! {0x1b8,0x1bc,4,1}, +! {0x1c4,0x1c4,-1,2}, +! {0x1c5,0x1c5,-1,1}, +! {0x1c7,0x1c7,-1,2}, +! {0x1c8,0x1c8,-1,1}, +! {0x1ca,0x1ca,-1,2}, +! {0x1cb,0x1db,2,1}, +! {0x1de,0x1ee,2,1}, +! {0x1f1,0x1f1,-1,2}, +! {0x1f2,0x1f4,2,1}, +! {0x1f6,0x1f6,-1,-97}, +! {0x1f7,0x1f7,-1,-56}, +! {0x1f8,0x21e,2,1}, +! {0x220,0x220,-1,-130}, +! {0x222,0x232,2,1}, +! {0x23a,0x23a,-1,10795}, +! {0x23b,0x23b,-1,1}, +! {0x23d,0x23d,-1,-163}, +! {0x23e,0x23e,-1,10792}, +! {0x241,0x241,-1,1}, +! {0x243,0x243,-1,-195}, +! {0x244,0x244,-1,69}, +! {0x245,0x245,-1,71}, +! {0x246,0x24e,2,1}, +! {0x345,0x345,-1,116}, +! {0x370,0x372,2,1}, +! {0x376,0x376,-1,1}, +! {0x386,0x386,-1,38}, +! {0x388,0x38a,1,37}, +! {0x38c,0x38c,-1,64}, +! {0x38e,0x38f,1,63}, +! {0x391,0x3a1,1,32}, +! {0x3a3,0x3ab,1,32}, +! {0x3c2,0x3c2,-1,1}, +! {0x3cf,0x3cf,-1,8}, +! {0x3d0,0x3d0,-1,-30}, +! {0x3d1,0x3d1,-1,-25}, +! {0x3d5,0x3d5,-1,-15}, +! {0x3d6,0x3d6,-1,-22}, +! {0x3d8,0x3ee,2,1}, +! {0x3f0,0x3f0,-1,-54}, +! {0x3f1,0x3f1,-1,-48}, +! {0x3f4,0x3f4,-1,-60}, +! {0x3f5,0x3f5,-1,-64}, +! {0x3f7,0x3f7,-1,1}, +! {0x3f9,0x3f9,-1,-7}, +! {0x3fa,0x3fa,-1,1}, +! {0x3fd,0x3ff,1,-130}, +! {0x400,0x40f,1,80}, +! {0x410,0x42f,1,32}, +! {0x460,0x480,2,1}, +! {0x48a,0x4be,2,1}, +! {0x4c0,0x4c0,-1,15}, +! {0x4c1,0x4cd,2,1}, +! {0x4d0,0x524,2,1}, +! {0x531,0x556,1,48}, +! {0x10a0,0x10c5,1,7264}, +! {0x1e00,0x1e94,2,1}, +! {0x1e9b,0x1e9b,-1,-58}, +! {0x1e9e,0x1e9e,-1,-7615}, +! {0x1ea0,0x1efe,2,1}, +! {0x1f08,0x1f0f,1,-8}, +! {0x1f18,0x1f1d,1,-8}, +! {0x1f28,0x1f2f,1,-8}, +! {0x1f38,0x1f3f,1,-8}, +! {0x1f48,0x1f4d,1,-8}, +! {0x1f59,0x1f5f,2,-8}, +! {0x1f68,0x1f6f,1,-8}, +! {0x1f88,0x1f8f,1,-8}, +! {0x1f98,0x1f9f,1,-8}, +! {0x1fa8,0x1faf,1,-8}, +! {0x1fb8,0x1fb9,1,-8}, +! {0x1fba,0x1fbb,1,-74}, +! {0x1fbc,0x1fbc,-1,-9}, +! {0x1fbe,0x1fbe,-1,-7173}, +! {0x1fc8,0x1fcb,1,-86}, +! {0x1fcc,0x1fcc,-1,-9}, +! {0x1fd8,0x1fd9,1,-8}, +! {0x1fda,0x1fdb,1,-100}, +! {0x1fe8,0x1fe9,1,-8}, +! {0x1fea,0x1feb,1,-112}, +! {0x1fec,0x1fec,-1,-7}, +! {0x1ff8,0x1ff9,1,-128}, +! {0x1ffa,0x1ffb,1,-126}, +! {0x1ffc,0x1ffc,-1,-9}, +! {0x2126,0x2126,-1,-7517}, +! {0x212a,0x212a,-1,-8383}, +! {0x212b,0x212b,-1,-8262}, +! {0x2132,0x2132,-1,28}, +! {0x2160,0x216f,1,16}, +! {0x2183,0x2183,-1,1}, +! {0x24b6,0x24cf,1,26}, +! {0x2c00,0x2c2e,1,48}, +! {0x2c60,0x2c60,-1,1}, +! {0x2c62,0x2c62,-1,-10743}, +! {0x2c63,0x2c63,-1,-3814}, +! {0x2c64,0x2c64,-1,-10727}, +! {0x2c67,0x2c6b,2,1}, +! {0x2c6d,0x2c6d,-1,-10780}, +! {0x2c6e,0x2c6e,-1,-10749}, +! {0x2c6f,0x2c6f,-1,-10783}, +! {0x2c70,0x2c70,-1,-10782}, +! {0x2c72,0x2c75,3,1}, +! {0x2c7e,0x2c7f,1,-10815}, +! {0x2c80,0x2ce2,2,1}, +! {0x2ceb,0x2ced,2,1}, +! {0xa640,0xa65e,2,1}, +! {0xa662,0xa66c,2,1}, +! {0xa680,0xa696,2,1}, +! {0xa722,0xa72e,2,1}, +! {0xa732,0xa76e,2,1}, +! {0xa779,0xa77b,2,1}, +! {0xa77d,0xa77d,-1,-35332}, +! {0xa77e,0xa786,2,1}, +! {0xa78b,0xa78b,-1,1}, +! {0xff21,0xff3a,1,32}, + {0x10400,0x10427,1,40} + }; + +*************** +*** 2253,2337 **** + return utf_convert(a, foldCase, sizeof(foldCase)); + } + +- /* +- * The following tables are built by upperLowerExtract.pl < UnicodeData.txt . +- * They must be in numeric order, because we use binary search on them. +- * An entry such as {0x41,0x5a,1,32} means that UCS-4 characters in the range +- * from 0x41 to 0x5a inclusive, stepping by 1, are switched to lower (for +- * example) by adding 32. +- */ + static convertStruct toLower[] = + { +! {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32}, +! {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1}, +! {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121}, +! {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1}, +! {0x186,0x186,-1,206}, {0x187,0x187,-1,1}, {0x189,0x18a,1,205}, +! {0x18b,0x18b,-1,1}, {0x18e,0x18e,-1,79}, {0x18f,0x18f,-1,202}, +! {0x190,0x190,-1,203}, {0x191,0x191,-1,1}, {0x193,0x193,-1,205}, +! {0x194,0x194,-1,207}, {0x196,0x196,-1,211}, {0x197,0x197,-1,209}, +! {0x198,0x198,-1,1}, {0x19c,0x19c,-1,211}, {0x19d,0x19d,-1,213}, +! {0x19f,0x19f,-1,214}, {0x1a0,0x1a4,2,1}, {0x1a6,0x1a6,-1,218}, +! {0x1a7,0x1a7,-1,1}, {0x1a9,0x1a9,-1,218}, {0x1ac,0x1ac,-1,1}, +! {0x1ae,0x1ae,-1,218}, {0x1af,0x1af,-1,1}, {0x1b1,0x1b2,1,217}, +! {0x1b3,0x1b5,2,1}, {0x1b7,0x1b7,-1,219}, {0x1b8,0x1bc,4,1}, +! {0x1c4,0x1ca,3,2}, {0x1cd,0x1db,2,1}, {0x1de,0x1ee,2,1}, +! {0x1f1,0x1f1,-1,2}, {0x1f4,0x1f4,-1,1}, {0x1f6,0x1f6,-1,-97}, +! {0x1f7,0x1f7,-1,-56}, {0x1f8,0x21e,2,1}, {0x220,0x220,-1,-130}, +! {0x222,0x232,2,1}, {0x386,0x386,-1,38}, {0x388,0x38a,1,37}, +! {0x38c,0x38c,-1,64}, {0x38e,0x38f,1,63}, {0x391,0x3a1,1,32}, +! {0x3a3,0x3ab,1,32}, {0x3d8,0x3ee,2,1}, {0x3f4,0x3f4,-1,-60}, +! {0x3f7,0x3f7,-1,1}, {0x3f9,0x3f9,-1,-7}, {0x3fa,0x3fa,-1,1}, +! {0x400,0x40f,1,80}, {0x410,0x42f,1,32}, {0x460,0x480,2,1}, +! {0x48a,0x4be,2,1}, {0x4c1,0x4cd,2,1}, {0x4d0,0x4f4,2,1}, +! {0x4f8,0x500,8,1}, {0x502,0x50e,2,1}, {0x531,0x556,1,48}, +! {0x1e00,0x1e94,2,1}, {0x1ea0,0x1ef8,2,1}, {0x1f08,0x1f0f,1,-8}, +! {0x1f18,0x1f1d,1,-8}, {0x1f28,0x1f2f,1,-8}, {0x1f38,0x1f3f,1,-8}, +! {0x1f48,0x1f4d,1,-8}, {0x1f59,0x1f5f,2,-8}, {0x1f68,0x1f6f,1,-8}, +! {0x1fb8,0x1fb9,1,-8}, {0x1fba,0x1fbb,1,-74}, {0x1fc8,0x1fcb,1,-86}, +! {0x1fd8,0x1fd9,1,-8}, {0x1fda,0x1fdb,1,-100}, {0x1fe8,0x1fe9,1,-8}, +! {0x1fea,0x1feb,1,-112}, {0x1fec,0x1fec,-1,-7}, {0x1ff8,0x1ff9,1,-128}, +! {0x1ffa,0x1ffb,1,-126}, {0x2126,0x2126,-1,-7517}, {0x212a,0x212a,-1,-8383}, +! {0x212b,0x212b,-1,-8262}, {0xff21,0xff3a,1,32}, {0x10400,0x10427,1,40} + }; + + static convertStruct toUpper[] = + { +! {0x61,0x7a,1,-32}, {0xb5,0xb5,-1,743}, {0xe0,0xf6,1,-32}, +! {0xf8,0xfe,1,-32}, {0xff,0xff,-1,121}, {0x101,0x12f,2,-1}, +! {0x131,0x131,-1,-232}, {0x133,0x137,2,-1}, {0x13a,0x148,2,-1}, +! {0x14b,0x177,2,-1}, {0x17a,0x17e,2,-1}, {0x17f,0x17f,-1,-300}, +! {0x183,0x185,2,-1}, {0x188,0x18c,4,-1}, {0x192,0x192,-1,-1}, +! {0x195,0x195,-1,97}, {0x199,0x199,-1,-1}, {0x19e,0x19e,-1,130}, +! {0x1a1,0x1a5,2,-1}, {0x1a8,0x1ad,5,-1}, {0x1b0,0x1b4,4,-1}, +! {0x1b6,0x1b9,3,-1}, {0x1bd,0x1bd,-1,-1}, {0x1bf,0x1bf,-1,56}, +! {0x1c5,0x1c6,1,-1}, {0x1c8,0x1c9,1,-1}, {0x1cb,0x1cc,1,-1}, +! {0x1ce,0x1dc,2,-1}, {0x1dd,0x1dd,-1,-79}, {0x1df,0x1ef,2,-1}, +! {0x1f2,0x1f3,1,-1}, {0x1f5,0x1f9,4,-1}, {0x1fb,0x21f,2,-1}, +! {0x223,0x233,2,-1}, {0x253,0x253,-1,-210}, {0x254,0x254,-1,-206}, +! {0x256,0x257,1,-205}, {0x259,0x259,-1,-202}, {0x25b,0x25b,-1,-203}, +! {0x260,0x260,-1,-205}, {0x263,0x263,-1,-207}, {0x268,0x268,-1,-209}, +! {0x269,0x26f,6,-211}, {0x272,0x272,-1,-213}, {0x275,0x275,-1,-214}, +! {0x280,0x283,3,-218}, {0x288,0x288,-1,-218}, {0x28a,0x28b,1,-217}, +! {0x292,0x292,-1,-219}, {0x3ac,0x3ac,-1,-38}, {0x3ad,0x3af,1,-37}, +! {0x3b1,0x3c1,1,-32}, {0x3c2,0x3c2,-1,-31}, {0x3c3,0x3cb,1,-32}, +! {0x3cc,0x3cc,-1,-64}, {0x3cd,0x3ce,1,-63}, {0x3d0,0x3d0,-1,-62}, +! {0x3d1,0x3d1,-1,-57}, {0x3d5,0x3d5,-1,-47}, {0x3d6,0x3d6,-1,-54}, +! {0x3d9,0x3ef,2,-1}, {0x3f0,0x3f0,-1,-86}, {0x3f1,0x3f1,-1,-80}, +! {0x3f2,0x3f2,-1,7}, {0x3f5,0x3f5,-1,-96}, {0x3f8,0x3fb,3,-1}, +! {0x430,0x44f,1,-32}, {0x450,0x45f,1,-80}, {0x461,0x481,2,-1}, +! {0x48b,0x4bf,2,-1}, {0x4c2,0x4ce,2,-1}, {0x4d1,0x4f5,2,-1}, +! {0x4f9,0x501,8,-1}, {0x503,0x50f,2,-1}, {0x561,0x586,1,-48}, +! {0x1e01,0x1e95,2,-1}, {0x1e9b,0x1e9b,-1,-59}, {0x1ea1,0x1ef9,2,-1}, +! {0x1f00,0x1f07,1,8}, {0x1f10,0x1f15,1,8}, {0x1f20,0x1f27,1,8}, +! {0x1f30,0x1f37,1,8}, {0x1f40,0x1f45,1,8}, {0x1f51,0x1f57,2,8}, +! {0x1f60,0x1f67,1,8}, {0x1f70,0x1f71,1,74}, {0x1f72,0x1f75,1,86}, +! {0x1f76,0x1f77,1,100}, {0x1f78,0x1f79,1,128}, {0x1f7a,0x1f7b,1,112}, +! {0x1f7c,0x1f7d,1,126}, {0x1f80,0x1f87,1,8}, {0x1f90,0x1f97,1,8}, +! {0x1fa0,0x1fa7,1,8}, {0x1fb0,0x1fb1,1,8}, {0x1fb3,0x1fb3,-1,9}, +! {0x1fbe,0x1fbe,-1,-7205}, {0x1fc3,0x1fc3,-1,9}, {0x1fd0,0x1fd1,1,8}, +! {0x1fe0,0x1fe1,1,8}, {0x1fe5,0x1fe5,-1,7}, {0x1ff3,0x1ff3,-1,9}, +! {0xff41,0xff5a,1,-32}, {0x10428,0x1044f,1,-40} + }; + + /* +--- 2663,2968 ---- + return utf_convert(a, foldCase, sizeof(foldCase)); + } + + static convertStruct toLower[] = + { +! {0x41,0x5a,1,32}, +! {0xc0,0xd6,1,32}, +! {0xd8,0xde,1,32}, +! {0x100,0x12e,2,1}, +! {0x130,0x130,-1,-199}, +! {0x132,0x136,2,1}, +! {0x139,0x147,2,1}, +! {0x14a,0x176,2,1}, +! {0x178,0x178,-1,-121}, +! {0x179,0x17d,2,1}, +! {0x181,0x181,-1,210}, +! {0x182,0x184,2,1}, +! {0x186,0x186,-1,206}, +! {0x187,0x187,-1,1}, +! {0x189,0x18a,1,205}, +! {0x18b,0x18b,-1,1}, +! {0x18e,0x18e,-1,79}, +! {0x18f,0x18f,-1,202}, +! {0x190,0x190,-1,203}, +! {0x191,0x191,-1,1}, +! {0x193,0x193,-1,205}, +! {0x194,0x194,-1,207}, +! {0x196,0x196,-1,211}, +! {0x197,0x197,-1,209}, +! {0x198,0x198,-1,1}, +! {0x19c,0x19c,-1,211}, +! {0x19d,0x19d,-1,213}, +! {0x19f,0x19f,-1,214}, +! {0x1a0,0x1a4,2,1}, +! {0x1a6,0x1a6,-1,218}, +! {0x1a7,0x1a7,-1,1}, +! {0x1a9,0x1a9,-1,218}, +! {0x1ac,0x1ac,-1,1}, +! {0x1ae,0x1ae,-1,218}, +! {0x1af,0x1af,-1,1}, +! {0x1b1,0x1b2,1,217}, +! {0x1b3,0x1b5,2,1}, +! {0x1b7,0x1b7,-1,219}, +! {0x1b8,0x1bc,4,1}, +! {0x1c4,0x1c4,-1,2}, +! {0x1c5,0x1c5,-1,1}, +! {0x1c7,0x1c7,-1,2}, +! {0x1c8,0x1c8,-1,1}, +! {0x1ca,0x1ca,-1,2}, +! {0x1cb,0x1db,2,1}, +! {0x1de,0x1ee,2,1}, +! {0x1f1,0x1f1,-1,2}, +! {0x1f2,0x1f4,2,1}, +! {0x1f6,0x1f6,-1,-97}, +! {0x1f7,0x1f7,-1,-56}, +! {0x1f8,0x21e,2,1}, +! {0x220,0x220,-1,-130}, +! {0x222,0x232,2,1}, +! {0x23a,0x23a,-1,10795}, +! {0x23b,0x23b,-1,1}, +! {0x23d,0x23d,-1,-163}, +! {0x23e,0x23e,-1,10792}, +! {0x241,0x241,-1,1}, +! {0x243,0x243,-1,-195}, +! {0x244,0x244,-1,69}, +! {0x245,0x245,-1,71}, +! {0x246,0x24e,2,1}, +! {0x370,0x372,2,1}, +! {0x376,0x376,-1,1}, +! {0x386,0x386,-1,38}, +! {0x388,0x38a,1,37}, +! {0x38c,0x38c,-1,64}, +! {0x38e,0x38f,1,63}, +! {0x391,0x3a1,1,32}, +! {0x3a3,0x3ab,1,32}, +! {0x3cf,0x3cf,-1,8}, +! {0x3d8,0x3ee,2,1}, +! {0x3f4,0x3f4,-1,-60}, +! {0x3f7,0x3f7,-1,1}, +! {0x3f9,0x3f9,-1,-7}, +! {0x3fa,0x3fa,-1,1}, +! {0x3fd,0x3ff,1,-130}, +! {0x400,0x40f,1,80}, +! {0x410,0x42f,1,32}, +! {0x460,0x480,2,1}, +! {0x48a,0x4be,2,1}, +! {0x4c0,0x4c0,-1,15}, +! {0x4c1,0x4cd,2,1}, +! {0x4d0,0x524,2,1}, +! {0x531,0x556,1,48}, +! {0x10a0,0x10c5,1,7264}, +! {0x1e00,0x1e94,2,1}, +! {0x1e9e,0x1e9e,-1,-7615}, +! {0x1ea0,0x1efe,2,1}, +! {0x1f08,0x1f0f,1,-8}, +! {0x1f18,0x1f1d,1,-8}, +! {0x1f28,0x1f2f,1,-8}, +! {0x1f38,0x1f3f,1,-8}, +! {0x1f48,0x1f4d,1,-8}, +! {0x1f59,0x1f5f,2,-8}, +! {0x1f68,0x1f6f,1,-8}, +! {0x1f88,0x1f8f,1,-8}, +! {0x1f98,0x1f9f,1,-8}, +! {0x1fa8,0x1faf,1,-8}, +! {0x1fb8,0x1fb9,1,-8}, +! {0x1fba,0x1fbb,1,-74}, +! {0x1fbc,0x1fbc,-1,-9}, +! {0x1fc8,0x1fcb,1,-86}, +! {0x1fcc,0x1fcc,-1,-9}, +! {0x1fd8,0x1fd9,1,-8}, +! {0x1fda,0x1fdb,1,-100}, +! {0x1fe8,0x1fe9,1,-8}, +! {0x1fea,0x1feb,1,-112}, +! {0x1fec,0x1fec,-1,-7}, +! {0x1ff8,0x1ff9,1,-128}, +! {0x1ffa,0x1ffb,1,-126}, +! {0x1ffc,0x1ffc,-1,-9}, +! {0x2126,0x2126,-1,-7517}, +! {0x212a,0x212a,-1,-8383}, +! {0x212b,0x212b,-1,-8262}, +! {0x2132,0x2132,-1,28}, +! {0x2160,0x216f,1,16}, +! {0x2183,0x2183,-1,1}, +! {0x24b6,0x24cf,1,26}, +! {0x2c00,0x2c2e,1,48}, +! {0x2c60,0x2c60,-1,1}, +! {0x2c62,0x2c62,-1,-10743}, +! {0x2c63,0x2c63,-1,-3814}, +! {0x2c64,0x2c64,-1,-10727}, +! {0x2c67,0x2c6b,2,1}, +! {0x2c6d,0x2c6d,-1,-10780}, +! {0x2c6e,0x2c6e,-1,-10749}, +! {0x2c6f,0x2c6f,-1,-10783}, +! {0x2c70,0x2c70,-1,-10782}, +! {0x2c72,0x2c75,3,1}, +! {0x2c7e,0x2c7f,1,-10815}, +! {0x2c80,0x2ce2,2,1}, +! {0x2ceb,0x2ced,2,1}, +! {0xa640,0xa65e,2,1}, +! {0xa662,0xa66c,2,1}, +! {0xa680,0xa696,2,1}, +! {0xa722,0xa72e,2,1}, +! {0xa732,0xa76e,2,1}, +! {0xa779,0xa77b,2,1}, +! {0xa77d,0xa77d,-1,-35332}, +! {0xa77e,0xa786,2,1}, +! {0xa78b,0xa78b,-1,1}, +! {0xff21,0xff3a,1,32}, +! {0x10400,0x10427,1,40} + }; + + static convertStruct toUpper[] = + { +! {0x61,0x7a,1,-32}, +! {0xb5,0xb5,-1,743}, +! {0xe0,0xf6,1,-32}, +! {0xf8,0xfe,1,-32}, +! {0xff,0xff,-1,121}, +! {0x101,0x12f,2,-1}, +! {0x131,0x131,-1,-232}, +! {0x133,0x137,2,-1}, +! {0x13a,0x148,2,-1}, +! {0x14b,0x177,2,-1}, +! {0x17a,0x17e,2,-1}, +! {0x17f,0x17f,-1,-300}, +! {0x180,0x180,-1,195}, +! {0x183,0x185,2,-1}, +! {0x188,0x18c,4,-1}, +! {0x192,0x192,-1,-1}, +! {0x195,0x195,-1,97}, +! {0x199,0x199,-1,-1}, +! {0x19a,0x19a,-1,163}, +! {0x19e,0x19e,-1,130}, +! {0x1a1,0x1a5,2,-1}, +! {0x1a8,0x1ad,5,-1}, +! {0x1b0,0x1b4,4,-1}, +! {0x1b6,0x1b9,3,-1}, +! {0x1bd,0x1bd,-1,-1}, +! {0x1bf,0x1bf,-1,56}, +! {0x1c5,0x1c5,-1,-1}, +! {0x1c6,0x1c6,-1,-2}, +! {0x1c8,0x1c8,-1,-1}, +! {0x1c9,0x1c9,-1,-2}, +! {0x1cb,0x1cb,-1,-1}, +! {0x1cc,0x1cc,-1,-2}, +! {0x1ce,0x1dc,2,-1}, +! {0x1dd,0x1dd,-1,-79}, +! {0x1df,0x1ef,2,-1}, +! {0x1f2,0x1f2,-1,-1}, +! {0x1f3,0x1f3,-1,-2}, +! {0x1f5,0x1f9,4,-1}, +! {0x1fb,0x21f,2,-1}, +! {0x223,0x233,2,-1}, +! {0x23c,0x23c,-1,-1}, +! {0x23f,0x240,1,10815}, +! {0x242,0x247,5,-1}, +! {0x249,0x24f,2,-1}, +! {0x250,0x250,-1,10783}, +! {0x251,0x251,-1,10780}, +! {0x252,0x252,-1,10782}, +! {0x253,0x253,-1,-210}, +! {0x254,0x254,-1,-206}, +! {0x256,0x257,1,-205}, +! {0x259,0x259,-1,-202}, +! {0x25b,0x25b,-1,-203}, +! {0x260,0x260,-1,-205}, +! {0x263,0x263,-1,-207}, +! {0x268,0x268,-1,-209}, +! {0x269,0x269,-1,-211}, +! {0x26b,0x26b,-1,10743}, +! {0x26f,0x26f,-1,-211}, +! {0x271,0x271,-1,10749}, +! {0x272,0x272,-1,-213}, +! {0x275,0x275,-1,-214}, +! {0x27d,0x27d,-1,10727}, +! {0x280,0x283,3,-218}, +! {0x288,0x288,-1,-218}, +! {0x289,0x289,-1,-69}, +! {0x28a,0x28b,1,-217}, +! {0x28c,0x28c,-1,-71}, +! {0x292,0x292,-1,-219}, +! {0x345,0x345,-1,84}, +! {0x371,0x373,2,-1}, +! {0x377,0x377,-1,-1}, +! {0x37b,0x37d,1,130}, +! {0x3ac,0x3ac,-1,-38}, +! {0x3ad,0x3af,1,-37}, +! {0x3b1,0x3c1,1,-32}, +! {0x3c2,0x3c2,-1,-31}, +! {0x3c3,0x3cb,1,-32}, +! {0x3cc,0x3cc,-1,-64}, +! {0x3cd,0x3ce,1,-63}, +! {0x3d0,0x3d0,-1,-62}, +! {0x3d1,0x3d1,-1,-57}, +! {0x3d5,0x3d5,-1,-47}, +! {0x3d6,0x3d6,-1,-54}, +! {0x3d7,0x3d7,-1,-8}, +! {0x3d9,0x3ef,2,-1}, +! {0x3f0,0x3f0,-1,-86}, +! {0x3f1,0x3f1,-1,-80}, +! {0x3f2,0x3f2,-1,7}, +! {0x3f5,0x3f5,-1,-96}, +! {0x3f8,0x3fb,3,-1}, +! {0x430,0x44f,1,-32}, +! {0x450,0x45f,1,-80}, +! {0x461,0x481,2,-1}, +! {0x48b,0x4bf,2,-1}, +! {0x4c2,0x4ce,2,-1}, +! {0x4cf,0x4cf,-1,-15}, +! {0x4d1,0x525,2,-1}, +! {0x561,0x586,1,-48}, +! {0x1d79,0x1d79,-1,35332}, +! {0x1d7d,0x1d7d,-1,3814}, +! {0x1e01,0x1e95,2,-1}, +! {0x1e9b,0x1e9b,-1,-59}, +! {0x1ea1,0x1eff,2,-1}, +! {0x1f00,0x1f07,1,8}, +! {0x1f10,0x1f15,1,8}, +! {0x1f20,0x1f27,1,8}, +! {0x1f30,0x1f37,1,8}, +! {0x1f40,0x1f45,1,8}, +! {0x1f51,0x1f57,2,8}, +! {0x1f60,0x1f67,1,8}, +! {0x1f70,0x1f71,1,74}, +! {0x1f72,0x1f75,1,86}, +! {0x1f76,0x1f77,1,100}, +! {0x1f78,0x1f79,1,128}, +! {0x1f7a,0x1f7b,1,112}, +! {0x1f7c,0x1f7d,1,126}, +! {0x1f80,0x1f87,1,8}, +! {0x1f90,0x1f97,1,8}, +! {0x1fa0,0x1fa7,1,8}, +! {0x1fb0,0x1fb1,1,8}, +! {0x1fb3,0x1fb3,-1,9}, +! {0x1fbe,0x1fbe,-1,-7205}, +! {0x1fc3,0x1fc3,-1,9}, +! {0x1fd0,0x1fd1,1,8}, +! {0x1fe0,0x1fe1,1,8}, +! {0x1fe5,0x1fe5,-1,7}, +! {0x1ff3,0x1ff3,-1,9}, +! {0x214e,0x214e,-1,-28}, +! {0x2170,0x217f,1,-16}, +! {0x2184,0x2184,-1,-1}, +! {0x24d0,0x24e9,1,-26}, +! {0x2c30,0x2c5e,1,-48}, +! {0x2c61,0x2c61,-1,-1}, +! {0x2c65,0x2c65,-1,-10795}, +! {0x2c66,0x2c66,-1,-10792}, +! {0x2c68,0x2c6c,2,-1}, +! {0x2c73,0x2c76,3,-1}, +! {0x2c81,0x2ce3,2,-1}, +! {0x2cec,0x2cee,2,-1}, +! {0x2d00,0x2d25,1,-7264}, +! {0xa641,0xa65f,2,-1}, +! {0xa663,0xa66d,2,-1}, +! {0xa681,0xa697,2,-1}, +! {0xa723,0xa72f,2,-1}, +! {0xa733,0xa76f,2,-1}, +! {0xa77a,0xa77c,2,-1}, +! {0xa77f,0xa787,2,-1}, +! {0xa78c,0xa78c,-1,-1}, +! {0xff41,0xff5a,1,-32}, +! {0x10428,0x1044f,1,-40} + }; + + /* +*** ../vim-7.2.329/src/version.c 2010-01-12 15:42:03.000000000 +0100 +--- src/version.c 2010-01-12 18:16:55.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 330, + /**/ + +-- +From "know your smileys": + <|-) Chinese + <|-( Chinese and doesn't like these kind of jokes + + /// 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/gvim/vim-7.2/7.2.331 b/gvim/vim-7.2/7.2.331 new file mode 100644 index 0000000..82f40a2 --- /dev/null +++ b/gvim/vim-7.2/7.2.331 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.331 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.331 +Problem: Can't interrupt "echo list" for a very long list. +Solution: Call line_breakcheck() in list_join(). +Files: src/eval.c + + +*** ../vim-7.2.330/src/eval.c 2010-01-12 12:48:40.000000000 +0100 +--- src/eval.c 2010-01-12 15:59:28.000000000 +0100 +*************** +*** 6475,6480 **** +--- 6475,6481 ---- + vim_free(tofree); + if (s == NULL) + return FAIL; ++ line_breakcheck(); + } + return OK; + } +*** ../vim-7.2.330/src/version.c 2010-01-12 19:48:57.000000000 +0100 +--- src/version.c 2010-01-19 12:44:02.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 331, + /**/ + + +-- +hundred-and-one symptoms of being an internet addict: +116. You are living with your boyfriend who networks your respective + computers so you can sit in separate rooms and email each other + + /// 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/gvim/vim-7.2/7.2.332 b/gvim/vim-7.2/7.2.332 new file mode 100644 index 0000000..7956d1e --- /dev/null +++ b/gvim/vim-7.2/7.2.332 @@ -0,0 +1,101 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.332 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.332 +Problem: Crash when spell correcting triggers an autocommand that reloads + the buffer. +Solution: Make a copy of the line to be modified. (Dominique Pelle) +Files: src/spell.c + + +*** ../vim-7.2.331/src/spell.c 2009-07-22 11:03:38.000000000 +0200 +--- src/spell.c 2010-01-19 12:44:42.000000000 +0100 +*************** +*** 10306,10312 **** + /* Figure out if the word should be capitalised. */ + need_cap = check_need_cap(curwin->w_cursor.lnum, curwin->w_cursor.col); + +! line = ml_get_curline(); + + /* Get the list of suggestions. Limit to 'lines' - 2 or the number in + * 'spellsuggest', whatever is smaller. */ +--- 10306,10315 ---- + /* Figure out if the word should be capitalised. */ + need_cap = check_need_cap(curwin->w_cursor.lnum, curwin->w_cursor.col); + +! /* Make a copy of current line since autocommands may free the line. */ +! line = vim_strsave(ml_get_curline()); +! if (line == NULL) +! goto skip; + + /* Get the list of suggestions. Limit to 'lines' - 2 or the number in + * 'spellsuggest', whatever is smaller. */ +*************** +*** 10470,10475 **** +--- 10473,10480 ---- + curwin->w_cursor = prev_cursor; + + spell_find_cleanup(&sug); ++ skip: ++ vim_free(line); + } + + /* +*************** +*** 10931,10937 **** + rescore_suggestions(su); + + /* +! * While going throught the soundfold tree "su_maxscore" is the score + * for the soundfold word, limits the changes that are being tried, + * and "su_sfmaxscore" the rescored score, which is set by + * cleanup_suggestions(). +--- 10936,10942 ---- + rescore_suggestions(su); + + /* +! * While going through the soundfold tree "su_maxscore" is the score + * for the soundfold word, limits the changes that are being tried, + * and "su_sfmaxscore" the rescored score, which is set by + * cleanup_suggestions(). +*************** +*** 11415,11421 **** + char_u tword[MAXWLEN]; /* good word collected so far */ + trystate_T stack[MAXWLEN]; + char_u preword[MAXWLEN * 3]; /* word found with proper case; +! * concatanation of prefix compound + * words and split word. NUL terminated + * when going deeper but not when coming + * back. */ +--- 11420,11426 ---- + char_u tword[MAXWLEN]; /* good word collected so far */ + trystate_T stack[MAXWLEN]; + char_u preword[MAXWLEN * 3]; /* word found with proper case; +! * concatenation of prefix compound + * words and split word. NUL terminated + * when going deeper but not when coming + * back. */ +*** ../vim-7.2.331/src/version.c 2010-01-19 12:46:51.000000000 +0100 +--- src/version.c 2010-01-19 13:05:32.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 332, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +117. You are more comfortable typing in 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/gvim/vim-7.2/7.2.333 b/gvim/vim-7.2/7.2.333 new file mode 100644 index 0000000..02273b6 --- /dev/null +++ b/gvim/vim-7.2/7.2.333 @@ -0,0 +1,371 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.333 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.333 +Problem: Warnings from static code analysis. +Solution: Small changes to various lines. (Dominique Pelle) +Files: src/buffer.c, src/edit.c, src/ex_getln.c, src/fileio.c, + src/if_cscope.c, src/netbeans.c, src/ops.c, src/quickfix.c, + src/syntax.c, src/ui.c + + +*** ../vim-7.2.332/src/buffer.c 2009-05-17 13:30:58.000000000 +0200 +--- src/buffer.c 2010-01-19 12:50:24.000000000 +0100 +*************** +*** 315,321 **** + { + #ifdef FEAT_AUTOCMD + int is_curbuf; +! int nwindows = buf->b_nwindows; + #endif + int unload_buf = (action != 0); + int del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE); +--- 315,321 ---- + { + #ifdef FEAT_AUTOCMD + int is_curbuf; +! int nwindows; + #endif + int unload_buf = (action != 0); + int del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE); +*** ../vim-7.2.332/src/edit.c 2009-12-24 15:45:53.000000000 +0100 +--- src/edit.c 2010-01-19 12:53:18.000000000 +0100 +*************** +*** 4048,4054 **** + save_p_ic = p_ic; + p_ic = ignorecase(compl_pattern); + +! /* Find up to TAG_MANY matches. Avoids that an enourmous number + * of matches is found when compl_pattern is empty */ + if (find_tags(compl_pattern, &num_matches, &matches, + TAG_REGEXP | TAG_NAMES | TAG_NOIC | +--- 4048,4054 ---- + save_p_ic = p_ic; + p_ic = ignorecase(compl_pattern); + +! /* Find up to TAG_MANY matches. Avoids that an enormous number + * of matches is found when compl_pattern is empty */ + if (find_tags(compl_pattern, &num_matches, &matches, + TAG_REGEXP | TAG_NAMES | TAG_NOIC | +*************** +*** 4219,4225 **** + || IObuff[len - 2] == '!')))) + IObuff[len++] = ' '; + } +! /* copy as much as posible of the new word */ + if (tmp_ptr - ptr >= IOSIZE - len) + tmp_ptr = ptr + IOSIZE - len - 1; + STRNCPY(IObuff + len, ptr, tmp_ptr - ptr); +--- 4219,4225 ---- + || IObuff[len - 2] == '!')))) + IObuff[len++] = ' '; + } +! /* copy as much as possible of the new word */ + if (tmp_ptr - ptr >= IOSIZE - len) + tmp_ptr = ptr + IOSIZE - len - 1; + STRNCPY(IObuff + len, ptr, tmp_ptr - ptr); +*************** +*** 5827,5836 **** + #endif + && !has_format_option(FO_WRAP)) + +- { +- textwidth = 0; + break; +- } + if ((startcol = curwin->w_cursor.col) == 0) + break; + +--- 5827,5833 ---- +*** ../vim-7.2.332/src/ex_getln.c 2009-12-02 17:15:04.000000000 +0100 +--- src/ex_getln.c 2010-01-19 12:54:47.000000000 +0100 +*************** +*** 2193,2199 **** + { + if (ga_grow(&line_ga, 40) == FAIL) + break; +- pend = (char_u *)line_ga.ga_data + line_ga.ga_len; + + /* Get one character at a time. Don't use inchar(), it can't handle + * special characters. */ +--- 2193,2198 ---- +*************** +*** 3314,3320 **** + WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE + |options, type); + vim_free(p1); +! /* longest match: make sure it is not shorter (happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) + { + for (j = 0; j < xp->xp_pattern_len; ++j) +--- 3313,3319 ---- + WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE + |options, type); + vim_free(p1); +! /* longest match: make sure it is not shorter, happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) + { + for (j = 0; j < xp->xp_pattern_len; ++j) +*** ../vim-7.2.332/src/fileio.c 2009-12-31 14:52:48.000000000 +0100 +--- src/fileio.c 2010-01-19 12:56:59.000000000 +0100 +*************** +*** 7072,7079 **** + */ + for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i) + { +- size_t itmplen; + # ifndef HAVE_MKDTEMP + long nr; + long off; + # endif +--- 7072,7079 ---- + */ + for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i) + { + # ifndef HAVE_MKDTEMP ++ size_t itmplen; + long nr; + long off; + # endif +*************** +*** 7091,7097 **** + else + # endif + add_pathsep(itmp); +- itmplen = STRLEN(itmp); + + # ifdef HAVE_MKDTEMP + /* Leave room for filename */ +--- 7091,7096 ---- +*************** +*** 7104,7109 **** +--- 7103,7109 ---- + * otherwise it doesn't matter. The use of mkdir() avoids any + * security problems because of the predictable number. */ + nr = (mch_get_pid() + (long)time(NULL)) % 1000000L; ++ itmplen = STRLEN(itmp); + + /* Try up to 10000 different values until we find a name that + * doesn't exist. */ +*** ../vim-7.2.332/src/if_cscope.c 2009-07-09 21:22:36.000000000 +0200 +--- src/if_cscope.c 2010-01-19 12:57:58.000000000 +0100 +*************** +*** 2069,2075 **** + continue; + (void)strcpy(tbuf, matches[idx]); + +! if ((fname = strtok(tbuf, (const char *)"\t")) == NULL) + continue; + if ((fname = strtok(NULL, (const char *)"\t")) == NULL) + continue; +--- 2069,2075 ---- + continue; + (void)strcpy(tbuf, matches[idx]); + +! if (strtok(tbuf, (const char *)"\t") == NULL) + continue; + if ((fname = strtok(NULL, (const char *)"\t")) == NULL) + continue; +*** ../vim-7.2.332/src/netbeans.c 2009-09-11 14:19:41.000000000 +0200 +--- src/netbeans.c 2010-01-19 13:57:11.000000000 +0100 +*************** +*** 873,879 **** + { + #ifdef NBDEBUG + /* +! * This happens because the ExtEd can send a cammand or 2 after + * doing a stopDocumentListen command. It doesn't harm anything + * so I'm disabling it except for debugging. + */ +--- 883,889 ---- + { + #ifdef NBDEBUG + /* +! * This happens because the ExtEd can send a command or 2 after + * doing a stopDocumentListen command. It doesn't harm anything + * so I'm disabling it except for debugging. + */ +*************** +*** 1174,1180 **** + break; + } + } +! *q++ = '\0'; + + return buf; + } +--- 1184,1190 ---- + break; + } + } +! *q = '\0'; + + return buf; + } +*************** +*** 3070,3076 **** + } + + /* +! * Send netbeans an unmodufied command. + */ + void + netbeans_unmodified(buf_T *bufp UNUSED) +--- 3080,3086 ---- + } + + /* +! * Send netbeans an unmodified command. + */ + void + netbeans_unmodified(buf_T *bufp UNUSED) +*************** +*** 3366,3372 **** + + + /* +! * Add a sign of the reqested type at the requested location. + * + * Reverse engineering: + * Apparently an annotation is defined the first time it is used in a buffer. +--- 3380,3386 ---- + + + /* +! * Add a sign of the requested type at the requested location. + * + * Reverse engineering: + * Apparently an annotation is defined the first time it is used in a buffer. +*** ../vim-7.2.332/src/ops.c 2009-11-25 12:38:49.000000000 +0100 +--- src/ops.c 2010-01-19 13:04:46.000000000 +0100 +*************** +*** 5591,5603 **** + */ + if (has_mbyte) + { +- char_u *conv_str = str; + vimconv_T vc; + + vc.vc_type = CONV_NONE; + if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK) + { +! int intlen = len; + + conv_str = string_convert(&vc, str, &intlen); + len = intlen; +--- 5598,5610 ---- + */ + if (has_mbyte) + { + vimconv_T vc; + + vc.vc_type = CONV_NONE; + if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK) + { +! int intlen = len; +! char_u *conv_str; + + conv_str = string_convert(&vc, str, &intlen); + len = intlen; +*** ../vim-7.2.332/src/quickfix.c 2009-06-24 17:31:27.000000000 +0200 +--- src/quickfix.c 2010-01-19 13:12:29.000000000 +0100 +*************** +*** 1899,1905 **** + int i; + int idx1 = 1; + int idx2 = -1; +- int need_return = TRUE; + char_u *arg = eap->arg; + int all = eap->forceit; /* if not :cl!, only show + recognised errors */ +--- 1899,1904 ---- +*************** +*** 1939,1951 **** + { + if ((qfp->qf_valid || all) && idx1 <= i && i <= idx2) + { +! if (need_return) +! { +! msg_putchar('\n'); +! if (got_int) +! break; +! need_return = FALSE; +! } + + fname = NULL; + if (qfp->qf_fnum != 0 +--- 1938,1946 ---- + { + if ((qfp->qf_valid || all) && idx1 <= i && i <= idx2) + { +! msg_putchar('\n'); +! if (got_int) +! break; + + fname = NULL; + if (qfp->qf_fnum != 0 +*************** +*** 1988,1994 **** + IObuff, IOSIZE); + msg_prt_line(IObuff, FALSE); + out_flush(); /* show one line at a time */ +- need_return = TRUE; + } + + qfp = qfp->qf_next; +--- 1983,1988 ---- +*** ../vim-7.2.332/src/syntax.c 2009-12-16 18:13:04.000000000 +0100 +--- src/syntax.c 2010-01-19 13:12:56.000000000 +0100 +*************** +*** 4167,4173 **** + if (!HASHITEM_EMPTY(hi)) + { + --todo; +- kp = HI2KE(hi); + for (kp = HI2KE(hi); kp != NULL; kp = kp_next) + { + kp_next = kp->ke_next; +--- 4167,4172 ---- +*** ../vim-7.2.332/src/ui.c 2009-09-11 16:48:06.000000000 +0200 +--- src/ui.c 2010-01-19 13:14:04.000000000 +0100 +*************** +*** 2383,2389 **** + * 'enc' anyway. */ + if (has_mbyte) + { +! char_u *conv_buf = buffer; + vimconv_T vc; + + vc.vc_type = CONV_NONE; +--- 2383,2389 ---- + * 'enc' anyway. */ + if (has_mbyte) + { +! char_u *conv_buf; + vimconv_T vc; + + vc.vc_type = CONV_NONE; +*** ../vim-7.2.332/src/version.c 2010-01-19 13:06:42.000000000 +0100 +--- src/version.c 2010-01-19 14:55:50.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 333, + /**/ + +-- +An actual excerpt from a classified section of a city newspaper: +"Illiterate? Write today for free help!" + + /// 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/gvim/vim-7.2/7.2.334 b/gvim/vim-7.2/7.2.334 new file mode 100644 index 0000000..1b88bbd --- /dev/null +++ b/gvim/vim-7.2/7.2.334 @@ -0,0 +1,347 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.334 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.334 +Problem: Postponing keys in Netbeans interface does not work properly. +Solution: Store the key string instead of the number. Avoid an infinite + loop. (Mostly by Xavier de Gaye) +Files: src/netbeans.c, src/proto/netbeans.pro + + +*** ../vim-7.2.333/src/netbeans.c 2010-01-19 14:59:14.000000000 +0100 +--- src/netbeans.c 2010-01-19 15:12:17.000000000 +0100 +*************** +*** 70,76 **** + static pos_T *off2pos __ARGS((buf_T *, long)); + static pos_T *get_off_or_lnum __ARGS((buf_T *buf, char_u **argp)); + static long get_buf_size __ARGS((buf_T *)); +! static void netbeans_keystring __ARGS((int key, char *keystr)); + static void special_keys __ARGS((char_u *args)); + + static void netbeans_connect __ARGS((void)); +--- 70,77 ---- + static pos_T *off2pos __ARGS((buf_T *, long)); + static pos_T *get_off_or_lnum __ARGS((buf_T *buf, char_u **argp)); + static long get_buf_size __ARGS((buf_T *)); +! static int netbeans_keystring __ARGS((char_u *keystr)); +! static void postpone_keycommand __ARGS((char_u *keystr)); + static void special_keys __ARGS((char_u *args)); + + static void netbeans_connect __ARGS((void)); +*************** +*** 502,508 **** + + struct keyqueue + { +! int key; + struct keyqueue *next; + struct keyqueue *prev; + }; +--- 503,509 ---- + + struct keyqueue + { +! char_u *keystr; + struct keyqueue *next; + struct keyqueue *prev; + }; +*************** +*** 514,526 **** + + /* + * Queue up key commands sent from netbeans. + */ + static void +! postpone_keycommand(int key) + { + keyQ_T *node; + + node = (keyQ_T *)alloc(sizeof(keyQ_T)); + + if (keyHead.next == NULL) /* initialize circular queue */ + { +--- 515,531 ---- + + /* + * Queue up key commands sent from netbeans. ++ * We store the string, because it may depend on the global mod_mask and ++ * :nbkey doesn't have a key number. + */ + static void +! postpone_keycommand(char_u *keystr) + { + keyQ_T *node; + + node = (keyQ_T *)alloc(sizeof(keyQ_T)); ++ if (node == NULL) ++ return; /* out of memory, drop the key */ + + if (keyHead.next == NULL) /* initialize circular queue */ + { +*************** +*** 534,540 **** + keyHead.prev->next = node; + keyHead.prev = node; + +! node->key = key; + } + + /* +--- 539,545 ---- + keyHead.prev->next = node; + keyHead.prev = node; + +! node->keystr = vim_strsave(keystr); + } + + /* +*************** +*** 543,557 **** + static void + handle_key_queue(void) + { +! while (keyHead.next && keyHead.next != &keyHead) + { + /* first, unlink the node */ + keyQ_T *node = keyHead.next; + keyHead.next = node->next; + node->next->prev = node->prev; + +! /* now, send the keycommand */ +! netbeans_keycommand(node->key); + + /* Finally, dispose of the node */ + vim_free(node); +--- 548,567 ---- + static void + handle_key_queue(void) + { +! int postponed = FALSE; +! +! while (!postponed && keyHead.next && keyHead.next != &keyHead) + { + /* first, unlink the node */ + keyQ_T *node = keyHead.next; + keyHead.next = node->next; + node->next->prev = node->prev; + +! /* Now, send the keycommand. This may cause it to be postponed again +! * and change keyHead. */ +! if (node->keystr != NULL) +! postponed = !netbeans_keystring(node->keystr); +! vim_free(node->keystr); + + /* Finally, dispose of the node */ + vim_free(node); +*************** +*** 2495,2501 **** + } + else + { +! nbdebug((" Buffer has no changes!\n")); + } + /* =====================================================================*/ + } +--- 2505,2511 ---- + } + else + { +! nbdebug((" Buffer has no changes!\n")); + } + /* =====================================================================*/ + } +*************** +*** 2658,2664 **** + ex_nbkey(eap) + exarg_T *eap; + { +! netbeans_keystring(0, (char *)eap->arg); + } + + +--- 2668,2674 ---- + ex_nbkey(eap) + exarg_T *eap; + { +! (void)netbeans_keystring(eap->arg); + } + + +*************** +*** 2680,2686 **** + } + + /* +! * Convert key to netbeans name. + */ + static void + netbeans_keyname(int key, char *buf) +--- 2690,2696 ---- + } + + /* +! * Convert key to netbeans name. This uses the global "mod_mask". + */ + static void + netbeans_keyname(int key, char *buf) +*************** +*** 3127,3149 **** + /* + * Send a keypress event back to netbeans. This usually simulates some + * kind of function key press. This function operates on a key code. + */ +! void + netbeans_keycommand(int key) + { + char keyName[60]; + + netbeans_keyname(key, keyName); +! netbeans_keystring(key, keyName); + } + + + /* + * Send a keypress event back to netbeans. This usually simulates some + * kind of function key press. This function operates on a key string. + */ +! static void +! netbeans_keystring(int key, char *keyName) + { + char buf[2*MAXPATHL]; + int bufno = nb_getbufno(curbuf); +--- 3137,3163 ---- + /* + * Send a keypress event back to netbeans. This usually simulates some + * kind of function key press. This function operates on a key code. ++ * Return TRUE when the key was sent, FALSE when the command has been ++ * postponed. + */ +! int + netbeans_keycommand(int key) + { + char keyName[60]; + + netbeans_keyname(key, keyName); +! return netbeans_keystring((char_u *)keyName); + } + + + /* + * Send a keypress event back to netbeans. This usually simulates some + * kind of function key press. This function operates on a key string. ++ * Return TRUE when the key was sent, FALSE when the command has been ++ * postponed. + */ +! static int +! netbeans_keystring(char_u *keyName) + { + char buf[2*MAXPATHL]; + int bufno = nb_getbufno(curbuf); +*************** +*** 3151,3157 **** + char_u *q; + + if (!haveConnection) +! return; + + + if (bufno == -1) +--- 3165,3171 ---- + char_u *q; + + if (!haveConnection) +! return TRUE; + + + if (bufno == -1) +*************** +*** 3160,3166 **** + q = curbuf->b_ffname == NULL ? (char_u *)"" + : nb_quote(curbuf->b_ffname); + if (q == NULL) +! return; + vim_snprintf(buf, sizeof(buf), "0:fileOpened=%d \"%s\" %s %s\n", 0, + q, + "T", /* open in NetBeans */ +--- 3174,3180 ---- + q = curbuf->b_ffname == NULL ? (char_u *)"" + : nb_quote(curbuf->b_ffname); + if (q == NULL) +! return TRUE; + vim_snprintf(buf, sizeof(buf), "0:fileOpened=%d \"%s\" %s %s\n", 0, + q, + "T", /* open in NetBeans */ +*************** +*** 3170,3178 **** + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); + +! if (key > 0) +! postpone_keycommand(key); +! return; + } + + /* sync the cursor position */ +--- 3184,3191 ---- + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); + +! postpone_keycommand(keyName); +! return FALSE; + } + + /* sync the cursor position */ +*************** +*** 3198,3203 **** +--- 3211,3217 ---- + off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); ++ return TRUE; + } + + +*** ../vim-7.2.333/src/proto/netbeans.pro 2009-01-06 16:13:42.000000000 +0100 +--- src/proto/netbeans.pro 2010-01-19 13:31:01.000000000 +0100 +*************** +*** 16,22 **** + void netbeans_removed __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, long len)); + void netbeans_unmodified __ARGS((buf_T *bufp)); + void netbeans_button_release __ARGS((int button)); +! void netbeans_keycommand __ARGS((int key)); + void netbeans_save_buffer __ARGS((buf_T *bufp)); + void netbeans_deleted_all_lines __ARGS((buf_T *bufp)); + int netbeans_is_guarded __ARGS((linenr_T top, linenr_T bot)); +--- 16,22 ---- + void netbeans_removed __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, long len)); + void netbeans_unmodified __ARGS((buf_T *bufp)); + void netbeans_button_release __ARGS((int button)); +! int netbeans_keycommand __ARGS((int key)); + void netbeans_save_buffer __ARGS((buf_T *bufp)); + void netbeans_deleted_all_lines __ARGS((buf_T *bufp)); + int netbeans_is_guarded __ARGS((linenr_T top, linenr_T bot)); +*** ../vim-7.2.333/src/version.c 2010-01-19 14:59:14.000000000 +0100 +--- src/version.c 2010-01-19 15:08:44.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 334, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +119. You are reading a book and look for the scroll bar to get to + the next 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/gvim/vim-7.2/7.2.335 b/gvim/vim-7.2/7.2.335 new file mode 100644 index 0000000..df7f641 --- /dev/null +++ b/gvim/vim-7.2/7.2.335 @@ -0,0 +1,103 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.335 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.335 +Problem: The CTRL-] command escapes too many characters. +Solution: Use a different list of characters to be escaped. (Sergey Khorev) +Files: src/normal.c + + +*** ../vim-7.2.334/src/normal.c 2010-01-12 15:42:03.000000000 +0100 +--- src/normal.c 2010-01-19 15:20:11.000000000 +0100 +*************** +*** 5406,5411 **** +--- 5406,5412 ---- + int n = 0; /* init for GCC */ + int cmdchar; + int g_cmd; /* "g" command */ ++ int tag_cmd = FALSE; + char_u *aux_ptr; + int isman; + int isman_s; +*************** +*** 5515,5520 **** +--- 5516,5522 ---- + break; + + case ']': ++ tag_cmd = TRUE; + #ifdef FEAT_CSCOPE + if (p_cst) + STRCPY(buf, "cstag "); +*************** +*** 5526,5535 **** + default: + if (curbuf->b_help) + STRCPY(buf, "he! "); +- else if (g_cmd) +- STRCPY(buf, "tj "); + else +! sprintf((char *)buf, "%ldta ", cap->count0); + } + + /* +--- 5528,5541 ---- + default: + if (curbuf->b_help) + STRCPY(buf, "he! "); + else +! { +! tag_cmd = TRUE; +! if (g_cmd) +! STRCPY(buf, "tj "); +! else +! sprintf((char *)buf, "%ldta ", cap->count0); +! } + } + + /* +*************** +*** 5562,5569 **** + 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); +--- 5568,5577 ---- + aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\"); + else if (cmdchar == '#') + aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\"); +! else if (tag_cmd) + /* Don't escape spaces and Tabs in a tag with a backslash */ ++ aux_ptr = (char_u *)"\\|\"\n["; ++ else + aux_ptr = (char_u *)"\\|\"\n*?["; + + p = buf + STRLEN(buf); +*** ../vim-7.2.334/src/version.c 2010-01-19 15:12:33.000000000 +0100 +--- src/version.c 2010-01-19 15:22:44.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 335, + /**/ + +-- +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/gvim/vim-7.2/7.2.336 b/gvim/vim-7.2/7.2.336 new file mode 100644 index 0000000..a676592 --- /dev/null +++ b/gvim/vim-7.2/7.2.336 @@ -0,0 +1,841 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.336 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.336 +Problem: MzScheme interface can't evaluate an expression. +Solution: Add mzeval(). (Sergey Khorev) +Files: runtime/doc/eval.txt, runtime/doc/if_mzsch.txt, + runtime/doc/usr_41.txt, src/eval.c, src/if_mzsch.c, + src/proto/eval.pro, src/proto/if_mzsch.pro, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Makefile, src/testdir/main.aap, src/testdir/test1.in, + src/testdir/test70.in, src/testdir/test70.ok + + +*** ../vim-7.2.335/runtime/doc/eval.txt 2009-11-17 12:20:30.000000000 +0100 +--- runtime/doc/eval.txt 2010-01-19 15:30:50.000000000 +0100 +*************** +*** 1815,1825 **** + List match and submatches of {pat} in {expr} + matchstr( {expr}, {pat}[, {start}[, {count}]]) + String {count}'th match of {pat} in {expr} +! max({list}) Number maximum value of items in {list} +! min({list}) Number minimum value of items in {list} +! mkdir({name} [, {path} [, {prot}]]) + Number create directory {name} + mode( [expr]) String current editing mode + nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum} + nr2char( {expr}) String single char with ASCII value {expr} + pathshorten( {expr}) String shorten directory names in a path +--- 1821,1832 ---- + List match and submatches of {pat} in {expr} + matchstr( {expr}, {pat}[, {start}[, {count}]]) + String {count}'th match of {pat} in {expr} +! max( {list}) Number maximum value of items in {list} +! min( {list}) Number minimum value of items in {list} +! mkdir( {name} [, {path} [, {prot}]]) + Number create directory {name} + mode( [expr]) String current editing mode ++ mzeval( {expr}) any evaluate |MzScheme| expression + nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum} + nr2char( {expr}) String single char with ASCII value {expr} + pathshorten( {expr}) String shorten directory names in a path +*************** +*** 4090,4095 **** +--- 4103,4125 ---- + "c" or "n". + Also see |visualmode()|. + ++ mzeval({expr}) *mzeval()* ++ Evaluate MzScheme expression {expr} and return its result ++ convert to Vim data structures. ++ Numbers and strings are returned as they are. ++ Pairs (including lists and improper lists) and vectors are ++ returned as Vim |Lists|. ++ Hash tables are represented as Vim |Dictionary| type with keys ++ converted to strings. ++ All other types are converted to string with display function. ++ Examples: > ++ :mz (define l (list 1 2 3)) ++ :mz (define h (make-hash)) (hash-set! h "list" l) ++ :echo mzeval("l") ++ :echo mzeval("h") ++ < ++ {only available when compiled with the |+mzscheme| feature} ++ + nextnonblank({lnum}) *nextnonblank()* + Return the line number of the first line at or below {lnum} + that is not blank. Example: > +*** ../vim-7.2.335/runtime/doc/if_mzsch.txt 2009-06-24 17:51:01.000000000 +0200 +--- runtime/doc/if_mzsch.txt 2010-01-19 15:33:00.000000000 +0100 +*************** +*** 1,4 **** +! *if_mzsch.txt* For Vim version 7.2. Last change: 2009 Jun 24 + + + VIM REFERENCE MANUAL by Sergey Khorev +--- 1,4 ---- +! *if_mzsch.txt* For Vim version 7.2. Last change: 2010 Jan 19 + + + VIM REFERENCE MANUAL by Sergey Khorev +*************** +*** 9,16 **** + 1. Commands |mzscheme-commands| + 2. Examples |mzscheme-examples| + 3. Threads |mzscheme-threads| +! 4. The Vim access procedures |mzscheme-vim| +! 5. Dynamic loading |mzscheme-dynamic| + + {Vi does not have any of these commands} + +--- 9,17 ---- + 1. Commands |mzscheme-commands| + 2. Examples |mzscheme-examples| + 3. Threads |mzscheme-threads| +! 4. Vim access from MzScheme |mzscheme-vim| +! 5. mzeval() Vim function |mzscheme-mzeval| +! 6. Dynamic loading |mzscheme-dynamic| + + {Vi does not have any of these commands} + +*************** +*** 142,148 **** + GUI version. + + ============================================================================== +! 5. VIM Functions *mzscheme-vim* + + *mzscheme-vimext* + The 'vimext' module provides access to procedures defined in the MzScheme +--- 143,149 ---- + GUI version. + + ============================================================================== +! 4. Vim access from MzScheme *mzscheme-vim* + + *mzscheme-vimext* + The 'vimext' module provides access to procedures defined in the MzScheme +*************** +*** 231,237 **** + (set-cursor (line . col) [window]) Set cursor position. + + ============================================================================== +! 5. Dynamic loading *mzscheme-dynamic* *E815* + + On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version| + output then includes |+mzscheme/dyn|. +--- 232,244 ---- + (set-cursor (line . col) [window]) Set cursor position. + + ============================================================================== +! 5. mzeval() Vim function *mzscheme-mzeval* +! +! To facilitate bi-directional interface, you can use |mzeval| function to +! evaluate MzScheme expressions and pass their values to VimL. +! +! ============================================================================== +! 6. Dynamic loading *mzscheme-dynamic* *E815* + + On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version| + output then includes |+mzscheme/dyn|. +*** ../vim-7.2.335/runtime/doc/usr_41.txt 2008-08-09 19:36:54.000000000 +0200 +--- runtime/doc/usr_41.txt 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 868,873 **** +--- 868,875 ---- + taglist() get list of matching tags + tagfiles() get a list of tags files + ++ mzeval() evaluate |MzScheme| expression ++ + ============================================================================== + *41.7* Defining a function + +*** ../vim-7.2.335/src/eval.c 2010-01-19 12:46:51.000000000 +0100 +--- src/eval.c 2010-01-19 15:48:12.000000000 +0100 +*************** +*** 433,439 **** + static long list_find_nr __ARGS((list_T *l, long idx, int *errorp)); + 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_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)); +--- 433,438 ---- +*************** +*** 448,459 **** + static void set_ref_in_item __ARGS((typval_T *tv, int copyID)); + static void dict_unref __ARGS((dict_T *d)); + static void dict_free __ARGS((dict_T *d, int recurse)); +- static dictitem_T *dictitem_alloc __ARGS((char_u *key)); + static dictitem_T *dictitem_copy __ARGS((dictitem_T *org)); + static void dictitem_remove __ARGS((dict_T *dict, dictitem_T *item)); +- static void dictitem_free __ARGS((dictitem_T *item)); + static dict_T *dict_copy __ARGS((dict_T *orig, int deep, int copyID)); +- static int dict_add __ARGS((dict_T *d, dictitem_T *item)); + static long dict_len __ARGS((dict_T *d)); + static dictitem_T *dict_find __ARGS((dict_T *d, char_u *key, int len)); + static char_u *dict2string __ARGS((typval_T *tv, int copyID)); +--- 447,455 ---- +*************** +*** 628,633 **** +--- 624,632 ---- + static void f_mkdir __ARGS((typval_T *argvars, typval_T *rettv)); + #endif + static void f_mode __ARGS((typval_T *argvars, typval_T *rettv)); ++ #ifdef FEAT_MZSCHEME ++ static void f_mzeval __ARGS((typval_T *argvars, typval_T *rettv)); ++ #endif + static void f_nextnonblank __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_nr2char __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_pathshorten __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 764,770 **** + static int var_check_ro __ARGS((int flags, char_u *name)); + static int var_check_fixed __ARGS((int flags, char_u *name)); + static int tv_check_lock __ARGS((int lock, char_u *name)); +- static void copy_tv __ARGS((typval_T *from, typval_T *to)); + static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID)); + static char_u *find_option_end __ARGS((char_u **arg, int *opt_flags)); + static char_u *trans_function_name __ARGS((char_u **pp, int skip, int flags, funcdict_T *fd)); +--- 763,768 ---- +*************** +*** 6155,6161 **** + * Append typval_T "tv" to the end of list "l". + * Return FAIL when out of memory. + */ +! static int + list_append_tv(l, tv) + list_T *l; + typval_T *tv; +--- 6153,6159 ---- + * Append typval_T "tv" to the end of list "l". + * Return FAIL when out of memory. + */ +! int + list_append_tv(l, tv) + list_T *l; + typval_T *tv; +*************** +*** 6812,6818 **** + * Note that the value of the item "di_tv" still needs to be initialized! + * Returns NULL when out of memory. + */ +! static dictitem_T * + dictitem_alloc(key) + char_u *key; + { +--- 6810,6816 ---- + * Note that the value of the item "di_tv" still needs to be initialized! + * Returns NULL when out of memory. + */ +! dictitem_T * + dictitem_alloc(key) + char_u *key; + { +*************** +*** 6868,6874 **** + /* + * Free a dict item. Also clears the value. + */ +! static void + dictitem_free(item) + dictitem_T *item; + { +--- 6866,6872 ---- + /* + * Free a dict item. Also clears the value. + */ +! void + dictitem_free(item) + dictitem_T *item; + { +*************** +*** 6948,6954 **** + * Add item "item" to Dictionary "d". + * Returns FAIL when out of memory and when key already existed. + */ +! static int + dict_add(d, item) + dict_T *d; + dictitem_T *item; +--- 6946,6952 ---- + * Add item "item" to Dictionary "d". + * Returns FAIL when out of memory and when key already existed. + */ +! int + dict_add(d, item) + dict_T *d; + dictitem_T *item; +*************** +*** 7699,7704 **** +--- 7697,7705 ---- + {"mkdir", 1, 3, f_mkdir}, + #endif + {"mode", 0, 1, f_mode}, ++ #ifdef FEAT_MZSCHEME ++ {"mzeval", 1, 1, f_mzeval}, ++ #endif + {"nextnonblank", 1, 1, f_nextnonblank}, + {"nr2char", 1, 1, f_nr2char}, + {"pathshorten", 1, 1, f_pathshorten}, +*************** +*** 13591,13596 **** +--- 13592,13614 ---- + rettv->v_type = VAR_STRING; + } + ++ #ifdef FEAT_MZSCHEME ++ /* ++ * "mzeval()" function ++ */ ++ static void ++ f_mzeval(argvars, rettv) ++ typval_T *argvars; ++ typval_T *rettv; ++ { ++ char_u *str; ++ char_u buf[NUMBUFLEN]; ++ ++ str = get_tv_string_buf(&argvars[0], buf); ++ do_mzeval(str, rettv); ++ } ++ #endif ++ + /* + * "nextnonblank()" function + */ +*************** +*** 19274,19280 **** + * 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) + typval_T *from; + typval_T *to; +--- 19292,19298 ---- + * It is OK for "from" and "to" to point to the same item. This is used to + * make a copy later. + */ +! void + copy_tv(from, to) + typval_T *from; + typval_T *to; +*** ../vim-7.2.335/src/if_mzsch.c 2009-12-16 19:02:05.000000000 +0100 +--- src/if_mzsch.c 2010-01-19 15:43:05.000000000 +0100 +*************** +*** 170,175 **** +--- 170,177 ---- + #ifdef FEAT_EVAL + static Scheme_Object *vim_to_mzscheme(typval_T *vim_value, int depth, + Scheme_Hash_Table *visited); ++ static int mzscheme_to_vim(Scheme_Object *obj, typval_T *tv, int depth, ++ Scheme_Hash_Table *visited); + #endif + + #ifdef MZ_PRECISE_GC +*************** +*** 2733,2738 **** +--- 2735,2959 ---- + MZ_GC_UNREG(); + return result; + } ++ ++ static int ++ mzscheme_to_vim(Scheme_Object *obj, typval_T *tv, int depth, ++ Scheme_Hash_Table *visited) ++ { ++ int status = OK; ++ typval_T *found; ++ MZ_GC_CHECK(); ++ if (depth > 100) /* limit the deepest recursion level */ ++ { ++ tv->v_type = VAR_NUMBER; ++ tv->vval.v_number = 0; ++ return FAIL; ++ } ++ ++ found = (typval_T *)scheme_hash_get(visited, obj); ++ if (found != NULL) ++ copy_tv(found, tv); ++ else if (SCHEME_VOIDP(obj)) ++ { ++ tv->v_type = VAR_NUMBER; ++ tv->vval.v_number = 0; ++ } ++ else if (SCHEME_INTP(obj)) ++ { ++ tv->v_type = VAR_NUMBER; ++ tv->vval.v_number = SCHEME_INT_VAL(obj); ++ } ++ else if (SCHEME_BOOLP(obj)) ++ { ++ tv->v_type = VAR_NUMBER; ++ tv->vval.v_number = SCHEME_TRUEP(obj); ++ } ++ # ifdef FEAT_FLOAT ++ else if (SCHEME_DBLP(obj)) ++ { ++ tv->v_type = VAR_FLOAT; ++ tv->vval.v_float = SCHEME_DBL_VAL(obj); ++ } ++ # endif ++ else if (SCHEME_STRINGP(obj)) ++ { ++ tv->v_type = VAR_STRING; ++ tv->vval.v_string = vim_strsave((char_u *)SCHEME_STR_VAL(obj)); ++ } ++ else if (SCHEME_VECTORP(obj) || SCHEME_NULLP(obj) ++ || SCHEME_PAIRP(obj) || SCHEME_MUTABLE_PAIRP(obj)) ++ { ++ list_T *list = list_alloc(); ++ if (list == NULL) ++ status = FAIL; ++ else ++ { ++ int i; ++ Scheme_Object *curr = NULL; ++ Scheme_Object *cval = NULL; ++ /* temporary var to hold current element of vectors and pairs */ ++ typval_T *v; ++ ++ MZ_GC_DECL_REG(2); ++ MZ_GC_VAR_IN_REG(0, curr); ++ MZ_GC_VAR_IN_REG(1, cval); ++ MZ_GC_REG(); ++ ++ tv->v_type = VAR_LIST; ++ tv->vval.v_list = list; ++ ++list->lv_refcount; ++ ++ v = (typval_T *)alloc(sizeof(typval_T)); ++ if (v == NULL) ++ status = FAIL; ++ else ++ { ++ /* add the value in advance to allow handling of self-referencial ++ * data structures */ ++ typval_T *visited_tv = (typval_T *)alloc(sizeof(typval_T)); ++ copy_tv(tv, visited_tv); ++ scheme_hash_set(visited, obj, (Scheme_Object *)visited_tv); ++ ++ if (SCHEME_VECTORP(obj)) ++ { ++ for (i = 0; i < SCHEME_VEC_SIZE(obj); ++i) ++ { ++ cval = SCHEME_VEC_ELS(obj)[i]; ++ status = mzscheme_to_vim(cval, v, depth + 1, visited); ++ if (status == FAIL) ++ break; ++ status = list_append_tv(list, v); ++ clear_tv(v); ++ if (status == FAIL) ++ break; ++ } ++ } ++ else if (SCHEME_PAIRP(obj) || SCHEME_MUTABLE_PAIRP(obj)) ++ { ++ for (curr = obj; ++ SCHEME_PAIRP(curr) || SCHEME_MUTABLE_PAIRP(curr); ++ curr = SCHEME_CDR(curr)) ++ { ++ cval = SCHEME_CAR(curr); ++ status = mzscheme_to_vim(cval, v, depth + 1, visited); ++ if (status == FAIL) ++ break; ++ status = list_append_tv(list, v); ++ clear_tv(v); ++ if (status == FAIL) ++ break; ++ } ++ /* impoper list not terminated with null ++ * need to handle the last element */ ++ if (status == OK && !SCHEME_NULLP(curr)) ++ { ++ status = mzscheme_to_vim(cval, v, depth + 1, visited); ++ if (status == OK) ++ { ++ status = list_append_tv(list, v); ++ clear_tv(v); ++ } ++ } ++ } ++ /* nothing to do for scheme_null */ ++ vim_free(v); ++ } ++ MZ_GC_UNREG(); ++ } ++ } ++ else if (SCHEME_HASHTP(obj)) ++ { ++ int i; ++ dict_T *dict; ++ Scheme_Object *key = NULL; ++ Scheme_Object *val = NULL; ++ ++ MZ_GC_DECL_REG(2); ++ MZ_GC_VAR_IN_REG(0, key); ++ MZ_GC_VAR_IN_REG(1, val); ++ MZ_GC_REG(); ++ ++ dict = dict_alloc(); ++ if (dict == NULL) ++ status = FAIL; ++ else ++ { ++ typval_T *visited_tv = (typval_T *)alloc(sizeof(typval_T)); ++ ++ tv->v_type = VAR_DICT; ++ tv->vval.v_dict = dict; ++ ++dict->dv_refcount; ++ ++ copy_tv(tv, visited_tv); ++ scheme_hash_set(visited, obj, (Scheme_Object *)visited_tv); ++ ++ for (i = 0; i < ((Scheme_Hash_Table *)obj)->size; ++i) ++ { ++ if (((Scheme_Hash_Table *) obj)->vals[i] != NULL) ++ { ++ /* generate item for `diplay'ed Scheme key */ ++ dictitem_T *item = dictitem_alloc((char_u *)string_to_line( ++ ((Scheme_Hash_Table *) obj)->keys[i])); ++ /* convert Scheme val to Vim and add it to the dict */ ++ if (mzscheme_to_vim(((Scheme_Hash_Table *) obj)->vals[i], ++ &item->di_tv, depth + 1, visited) == FAIL ++ || dict_add(dict, item) == FAIL) ++ { ++ dictitem_free(item); ++ status = FAIL; ++ break; ++ } ++ } ++ ++ } ++ } ++ MZ_GC_UNREG(); ++ } ++ else ++ { ++ /* `display' any other value to string */ ++ tv->v_type = VAR_STRING; ++ tv->vval.v_string = (char_u *)string_to_line(obj); ++ } ++ return status; ++ } ++ ++ void ++ do_mzeval(char_u *str, typval_T *rettv) ++ { ++ int i; ++ Scheme_Object *ret = NULL; ++ Scheme_Hash_Table *visited = NULL; ++ ++ MZ_GC_DECL_REG(2); ++ MZ_GC_VAR_IN_REG(0, ret); ++ MZ_GC_VAR_IN_REG(0, visited); ++ MZ_GC_REG(); ++ ++ if (mzscheme_init()) ++ { ++ MZ_GC_UNREG(); ++ return; ++ } ++ ++ MZ_GC_CHECK(); ++ visited = scheme_make_hash_table(SCHEME_hash_ptr); ++ MZ_GC_CHECK(); ++ ++ if (eval_with_exn_handling(str, do_eval, &ret) == OK) ++ mzscheme_to_vim(ret, rettv, 1, visited); ++ ++ for (i = 0; i < visited->size; ++i) ++ { ++ /* free up remembered objects */ ++ if (visited->vals[i] != NULL) ++ { ++ free_tv((typval_T *)visited->vals[i]); ++ } ++ } ++ ++ MZ_GC_UNREG(); ++ } + #endif + + /* +*** ../vim-7.2.335/src/proto/eval.pro 2009-09-30 15:15:33.000000000 +0200 +--- src/proto/eval.pro 2010-01-19 15:45:39.000000000 +0100 +*************** +*** 47,56 **** +--- 47,60 ---- + 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_tv __ARGS((list_T *l, typval_T *tv)); + 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)); ++ dictitem_T *dictitem_alloc __ARGS((char_u *key)); ++ void dictitem_free __ARGS((dictitem_T *item)); ++ int dict_add __ARGS((dict_T *d, dictitem_T *item)); + int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str)); + char_u *get_dict_string __ARGS((dict_T *d, char_u *key, int save)); + long get_dict_number __ARGS((dict_T *d, char_u *key)); +*************** +*** 77,82 **** +--- 81,87 ---- + void new_script_vars __ARGS((scid_T id)); + void init_var_dict __ARGS((dict_T *dict, dictitem_T *dict_var)); + void vars_clear __ARGS((hashtab_T *ht)); ++ void copy_tv __ARGS((typval_T *from, typval_T *to)); + void ex_echo __ARGS((exarg_T *eap)); + void ex_echohl __ARGS((exarg_T *eap)); + void ex_execute __ARGS((exarg_T *eap)); +*** ../vim-7.2.335/src/proto/if_mzsch.pro 2009-12-16 19:02:05.000000000 +0100 +--- src/proto/if_mzsch.pro 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 15,18 **** +--- 15,19 ---- + void *mzvim_eval_string __ARGS((char_u *str)); + int mzthreads_allowed __ARGS((void)); + void mzscheme_main __ARGS((void)); ++ void do_mzeval __ARGS((char_u *str, typval_T *rettv)); + /* vim: set ft=c : */ +*** ../vim-7.2.335/src/testdir/Make_dos.mak 2009-11-17 17:57:10.000000000 +0100 +--- src/testdir/Make_dos.mak 2010-01-19 15:43:48.000000000 +0100 +*************** +*** 29,35 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out + +! SCRIPTS32 = test50.out + + SCRIPTS_GUI = test16.out + +--- 29,35 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out + +! SCRIPTS32 = test50.out test70.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.2.335/src/testdir/Make_ming.mak 2009-11-17 17:57:10.000000000 +0100 +--- src/testdir/Make_ming.mak 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 48,54 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out + +! SCRIPTS32 = test50.out + + SCRIPTS_GUI = test16.out + +--- 48,54 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out + +! SCRIPTS32 = test50.out test70.out + + SCRIPTS_GUI = test16.out + +*************** +*** 78,83 **** +--- 78,84 ---- + -$(DEL) small.vim + -$(DEL) tiny.vim + -$(DEL) mbyte.vim ++ -$(DEL) mzscheme.vim + -$(DEL) X* + -$(DEL) viminfo + +*** ../vim-7.2.335/src/testdir/Makefile 2009-11-17 17:40:34.000000000 +0100 +--- src/testdir/Makefile 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 23,29 **** + test54.out test55.out test56.out test57.out test58.out \ + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ +! test69.out + + SCRIPTS_GUI = test16.out + +--- 23,29 ---- + test54.out test55.out test56.out test57.out test58.out \ + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ +! test69.out test70.out + + SCRIPTS_GUI = test16.out + +*************** +*** 44,53 **** + $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) + + clean: +! -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* valgrind.pid* viminfo + + test1.out: test1.in +! -rm -f $*.failed tiny.vim small.vim mbyte.vim test.ok X* viminfo + $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in + @/bin/sh -c "if diff test.out $*.ok; \ + then mv -f test.out $*.out; \ +--- 44,53 ---- + $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) + + clean: +! -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* valgrind.pid* viminfo + + test1.out: test1.in +! -rm -f $*.failed tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* viminfo + $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in + @/bin/sh -c "if diff test.out $*.ok; \ + then mv -f test.out $*.out; \ +*** ../vim-7.2.335/src/testdir/main.aap 2004-06-13 21:05:31.000000000 +0200 +--- src/testdir/main.aap 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 32,42 **** + $Scripts $ScriptsGUI: $VimProg + + clean: +! :del {r}{force} *.out test.log tiny.vim small.vim mbyte.vim test.ok X* + + # test1 is special, it checks for features + test1.out: test1.in +! :del {force} test1.failed tiny.vim small.vim mbyte.vim + :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in test1.in + @if os.system("diff test.out test1.ok") != 0: + :error test1 FAILED - Something basic is wrong +--- 32,42 ---- + $Scripts $ScriptsGUI: $VimProg + + clean: +! :del {r}{force} *.out test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* + + # test1 is special, it checks for features + test1.out: test1.in +! :del {force} test1.failed tiny.vim small.vim mbyte.vim mzscheme.vim + :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in test1.in + @if os.system("diff test.out test1.ok") != 0: + :error test1 FAILED - Something basic is wrong +*** ../vim-7.2.335/src/testdir/test1.in 2004-06-13 20:19:23.000000000 +0200 +--- src/testdir/test1.in 2010-01-19 15:38:44.000000000 +0100 +*************** +*** 13,18 **** +--- 13,19 ---- + + If Vim was not compiled with the +multi_byte feature, the mbyte.vim script will be set like small.vim above. mbyte.vim is sourced by tests that require the + +multi_byte feature. ++ Similar logic is applied to the +mzscheme feature, using mzscheme.vim. + + STARTTEST + :" Write a single line to test.out to check if testing works at all. +*************** +*** 25,32 **** +--- 26,36 ---- + w! test.out + qa! + :w! mbyte.vim ++ :w! mzscheme.vim + :" If +multi_byte feature supported, make mbyte.vim empty. + :if has("multi_byte") | sp another | w! mbyte.vim | q | endif ++ :" If +mzscheme feature supported, make mzscheme.vim empty. ++ :if has("mzscheme") | sp another | w! mzscheme.vim | q | endif + :" If +eval feature supported quit here, leaving tiny.vim and small.vim empty. + :" Otherwise write small.vim to skip the test. + :if 1 | q! | endif +*** ../vim-7.2.335/src/testdir/test70.in 2010-01-19 15:47:24.000000000 +0100 +--- src/testdir/test70.in 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 0 **** +--- 1,53 ---- ++ Smoke test for MzScheme interface and mzeval() function ++ ++ STARTTEST ++ :so mzscheme.vim ++ :set nocompatible viminfo+=nviminfo ++ :function! MzRequire() ++ :redir => l:mzversion ++ :mz (version) ++ :redir END ++ :if strpart(l:mzversion, 1, 1) < "4" ++ :" MzScheme versions < 4.x: ++ :mz (require (prefix vim- vimext)) ++ :else ++ :" newer versions: ++ :mz (require (prefix-in vim- 'vimext)) ++ :mz (require r5rs) ++ :endif ++ :endfunction ++ :silent call MzRequire() ++ :mz (define l '("item0" "dictionary with list OK" "item2")) ++ :mz (define h (make-hash)) ++ :mz (hash-set! h "list" l) ++ /^1 ++ :" change buffer contents ++ :mz (vim-set-buff-line (vim-eval "line('.')") "1 changed line 1") ++ :" scalar test ++ :let tmp_string = mzeval('"string"') ++ :let tmp_1000 = mzeval('1000') ++ :if tmp_string . tmp_1000 == "string1000" ++ :let scalar_res = "OK" ++ :else ++ :let scalar_res = "FAILED" ++ :endif ++ :call append(search("^1"), "scalar test " . scalar_res) ++ :" dictionary containing a list ++ :let tmp = mzeval("h")["list"][1] ++ :/^2/put =tmp ++ :" circular list (at the same time test lists containing lists) ++ :mz (set-car! (cddr l) l) ++ :let l2 = mzeval("h")["list"] ++ :if l2[2] == l2 ++ :let res = "OK" ++ :else ++ :let res = "FAILED" ++ :endif ++ :call setline(search("^3"), "circular test " . res) ++ :?^1?,$w! test.out ++ :qa! ++ ENDTEST ++ ++ 1 line 1 ++ 2 line 2 ++ 3 line 3 +*** ../vim-7.2.335/src/testdir/test70.ok 2010-01-19 15:47:24.000000000 +0100 +--- src/testdir/test70.ok 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 0 **** +--- 1,5 ---- ++ 1 changed line 1 ++ scalar test OK ++ 2 line 2 ++ dictionary with list OK ++ circular test OK +*** ../vim-7.2.335/src/version.c 2010-01-19 15:23:38.000000000 +0100 +--- src/version.c 2010-01-19 15:46:44.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 336, + /**/ + +-- +"Computers in the future may weigh no more than 1.5 tons." + Popular Mechanics, 1949 + + /// 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/gvim/vim-7.2/7.2.337 b/gvim/vim-7.2/7.2.337 new file mode 100644 index 0000000..e745285 --- /dev/null +++ b/gvim/vim-7.2/7.2.337 @@ -0,0 +1,112 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.337 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.337 +Problem: The :compiler command doesn't function properly when invoked in a + function. +Solution: Add "g:" before "current_compiler". (Yukihiro Nakadaira) +Files: src/ex_cmds2.c + + +*** ../vim-7.2.336/src/ex_cmds2.c 2009-05-16 21:16:12.000000000 +0200 +--- src/ex_cmds2.c 2010-01-19 16:02:53.000000000 +0100 +*************** +*** 2496,2509 **** + * To remain backwards compatible "current_compiler" is always + * used. A user's compiler plugin may set it, the distributed + * plugin will then skip the settings. Afterwards set +! * "b:current_compiler" and restore "current_compiler". */ +! old_cur_comp = get_var_value((char_u *)"current_compiler"); + if (old_cur_comp != NULL) + old_cur_comp = vim_strsave(old_cur_comp); + do_cmdline_cmd((char_u *) + "command -nargs=* CompilerSet setlocal "); + } +! do_unlet((char_u *)"current_compiler", TRUE); + do_unlet((char_u *)"b:current_compiler", TRUE); + + sprintf((char *)buf, "compiler/%s.vim", eap->arg); +--- 2496,2510 ---- + * To remain backwards compatible "current_compiler" is always + * used. A user's compiler plugin may set it, the distributed + * plugin will then skip the settings. Afterwards set +! * "b:current_compiler" and restore "current_compiler". +! * Explicitly prepend "g:" to make it work in a function. */ +! old_cur_comp = get_var_value((char_u *)"g:current_compiler"); + if (old_cur_comp != NULL) + old_cur_comp = vim_strsave(old_cur_comp); + do_cmdline_cmd((char_u *) + "command -nargs=* CompilerSet setlocal "); + } +! do_unlet((char_u *)"g:current_compiler", TRUE); + do_unlet((char_u *)"b:current_compiler", TRUE); + + sprintf((char *)buf, "compiler/%s.vim", eap->arg); +*************** +*** 2514,2520 **** + do_cmdline_cmd((char_u *)":delcommand CompilerSet"); + + /* Set "b:current_compiler" from "current_compiler". */ +! p = get_var_value((char_u *)"current_compiler"); + if (p != NULL) + set_internal_string_var((char_u *)"b:current_compiler", p); + +--- 2515,2521 ---- + do_cmdline_cmd((char_u *)":delcommand CompilerSet"); + + /* Set "b:current_compiler" from "current_compiler". */ +! p = get_var_value((char_u *)"g:current_compiler"); + if (p != NULL) + set_internal_string_var((char_u *)"b:current_compiler", p); + +*************** +*** 2523,2534 **** + { + if (old_cur_comp != NULL) + { +! set_internal_string_var((char_u *)"current_compiler", + old_cur_comp); + vim_free(old_cur_comp); + } + else +! do_unlet((char_u *)"current_compiler", TRUE); + } + } + } +--- 2524,2535 ---- + { + if (old_cur_comp != NULL) + { +! set_internal_string_var((char_u *)"g:current_compiler", + old_cur_comp); + vim_free(old_cur_comp); + } + else +! do_unlet((char_u *)"g:current_compiler", TRUE); + } + } + } +*** ../vim-7.2.336/src/version.c 2010-01-19 15:51:29.000000000 +0100 +--- src/version.c 2010-01-19 16:11:20.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 337, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +121. You ask for e-mail adresses instead of telephone numbers. + + /// 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/gvim/vim-7.2/7.2.338 b/gvim/vim-7.2/7.2.338 new file mode 100644 index 0000000..ac0223f --- /dev/null +++ b/gvim/vim-7.2/7.2.338 @@ -0,0 +1,129 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.338 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.338 (after 7.2.300) +Problem: Part of FD_CLOEXEC change is missing. +Solution: Include source file skipped because of typo. +Files: src/ex_cmds2.c + + +*** ../vim-7.2.337/src/ex_cmds2.c 2010-01-19 16:12:53.000000000 +0100 +--- src/ex_cmds2.c 2010-01-19 16:02:53.000000000 +0100 +*************** +*** 2802,2821 **** + + static char_u *get_one_sourceline __ARGS((struct source_cookie *sp)); + +! #if defined(WIN32) && defined(FEAT_CSCOPE) + static FILE *fopen_noinh_readbin __ARGS((char *filename)); + + /* + * Special function to open a file without handle inheritance. + */ + static FILE * + fopen_noinh_readbin(filename) + char *filename; + { +! int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0); + + if (fd_tmp == -1) + return NULL; + return fdopen(fd_tmp, READBIN); + } + #endif +--- 2802,2836 ---- + + static char_u *get_one_sourceline __ARGS((struct source_cookie *sp)); + +! #if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC) +! # define USE_FOPEN_NOINH + static FILE *fopen_noinh_readbin __ARGS((char *filename)); + + /* + * Special function to open a file without handle inheritance. ++ * When possible the handle is closed on exec(). + */ + static FILE * + fopen_noinh_readbin(filename) + char *filename; + { +! int fd_tmp = mch_open(filename, O_RDONLY +! # ifdef WIN32 +! O_BINARY | O_NOINHERIT +! # endif +! , 0); + + if (fd_tmp == -1) + return NULL; ++ ++ # ifdef HAVE_FD_CLOEXEC ++ { ++ int fdflags = fcntl(fd_tmp, F_GETFD); ++ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) ++ fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC); ++ } ++ # endif ++ + return fdopen(fd_tmp, READBIN); + } + #endif +*************** +*** 2895,2901 **** + apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf); + #endif + +! #if defined(WIN32) && defined(FEAT_CSCOPE) + cookie.fp = fopen_noinh_readbin((char *)fname_exp); + #else + cookie.fp = mch_fopen((char *)fname_exp, READBIN); +--- 2910,2916 ---- + apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf); + #endif + +! #ifdef USE_FOPEN_NOINH + cookie.fp = fopen_noinh_readbin((char *)fname_exp); + #else + cookie.fp = mch_fopen((char *)fname_exp, READBIN); +*************** +*** 2916,2922 **** + *p = '.'; + else + *p = '_'; +! #if defined(WIN32) && defined(FEAT_CSCOPE) + cookie.fp = fopen_noinh_readbin((char *)fname_exp); + #else + cookie.fp = mch_fopen((char *)fname_exp, READBIN); +--- 2931,2937 ---- + *p = '.'; + else + *p = '_'; +! #ifdef USE_FOPEN_NOINH + cookie.fp = fopen_noinh_readbin((char *)fname_exp); + #else + cookie.fp = mch_fopen((char *)fname_exp, READBIN); +*** ../vim-7.2.337/src/version.c 2010-01-19 16:12:53.000000000 +0100 +--- src/version.c 2010-01-19 16:20:08.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 338, + /**/ + +-- +~ +~ +~ +".signature" 4 lines, 50 characters written + + /// 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/gvim/vim-7.2/7.2.339 b/gvim/vim-7.2/7.2.339 new file mode 100644 index 0000000..77aa94d --- /dev/null +++ b/gvim/vim-7.2/7.2.339 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.339 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.339 (after 7.2.269) +Problem: Part of --startuptime patch is missing. +Solution: Add check for time_fd. +Files: src/ex_cmds2.c + + +*** ../vim-7.2.338/src/ex_cmds2.c 2010-01-19 16:21:55.000000000 +0100 +--- src/ex_cmds2.c 2010-01-19 16:02:53.000000000 +0100 +*************** +*** 3036,3042 **** + #endif + + #ifdef STARTUPTIME +! time_push(&tv_rel, &tv_start); + #endif + + #ifdef FEAT_EVAL +--- 3036,3043 ---- + #endif + + #ifdef STARTUPTIME +! if (time_fd != NULL) +! time_push(&tv_rel, &tv_start); + #endif + + #ifdef FEAT_EVAL +*************** +*** 3162,3170 **** + verbose_leave(); + } + #ifdef STARTUPTIME +! vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname); +! time_msg((char *)IObuff, &tv_start); +! time_pop(&tv_rel); + #endif + + #ifdef FEAT_EVAL +--- 3163,3174 ---- + verbose_leave(); + } + #ifdef STARTUPTIME +! if (time_fd != NULL) +! { +! vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname); +! time_msg((char *)IObuff, &tv_start); +! time_pop(&tv_rel); +! } + #endif + + #ifdef FEAT_EVAL +*** ../vim-7.2.338/src/version.c 2010-01-19 16:21:55.000000000 +0100 +--- src/version.c 2010-01-19 16:25:39.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 339, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +122. You ask if the Netaholics Anonymous t-shirt you ordered can be + sent to you via 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/gvim/vim-7.2/7.2.340 b/gvim/vim-7.2/7.2.340 new file mode 100644 index 0000000..b0f4bab --- /dev/null +++ b/gvim/vim-7.2/7.2.340 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.340 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.340 +Problem: Gcc warning for condition that can never be true. (James Vega) +Solution: Use start_lvl instead flp->lvl. +Files: src/fold.c + + +*** ../vim-7.2.339/src/fold.c 2009-11-03 18:04:26.000000000 +0100 +--- src/fold.c 2010-01-19 16:45:13.000000000 +0100 +*************** +*** 3239,3246 **** + flp->lvl = n; + flp->lvl_next = n - 1; + /* never start a fold with an end marker */ +! if (flp->lvl_next > flp->lvl) +! flp->lvl_next = flp->lvl; + } + } + else +--- 3239,3246 ---- + flp->lvl = n; + flp->lvl_next = n - 1; + /* never start a fold with an end marker */ +! if (flp->lvl_next > start_lvl) +! flp->lvl_next = start_lvl; + } + } + else +*** ../vim-7.2.339/src/version.c 2010-01-19 16:31:10.000000000 +0100 +--- src/version.c 2010-01-19 17:23:40.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 340, + /**/ + +-- +Would you care for a drink? I mean, if it were, like, +disabled and you had to look after it? + + /// 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/gvim/vim-7.2/7.2.341 b/gvim/vim-7.2/7.2.341 new file mode 100644 index 0000000..67d5e81 --- /dev/null +++ b/gvim/vim-7.2/7.2.341 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.341 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.341 +Problem: Popup menu wraps to next line when double-wide character doesn't + fit. (Jiang Ma) +Solution: Display a ">" instead. (Dominique Pelle) +Files: src/screen.c + + +*** ../vim-7.2.340/src/screen.c 2009-11-25 13:03:29.000000000 +0100 +--- src/screen.c 2010-01-19 17:34:21.000000000 +0100 +*************** +*** 6434,6439 **** +--- 6434,6446 ---- + else + prev_c = u8c; + # endif ++ if (col + mbyte_cells > screen_Columns) ++ { ++ /* Only 1 cell left, but character requires 2 cells: ++ * display a '>' in the last column to avoid wrapping. */ ++ c = '>'; ++ mbyte_cells = 1; ++ } + } + } + #endif +*************** +*** 9210,9216 **** + int force; + { + /* +! * Don't delete it right now, when not redrawing or insided a mapping. + */ + if (!redrawing() || (!force && char_avail() && !KeyTyped)) + redraw_cmdline = TRUE; /* delete mode later */ +--- 9217,9223 ---- + int force; + { + /* +! * Don't delete it right now, when not redrawing or inside a mapping. + */ + if (!redrawing() || (!force && char_avail() && !KeyTyped)) + redraw_cmdline = TRUE; /* delete mode later */ +*** ../vim-7.2.340/src/version.c 2010-01-19 17:24:20.000000000 +0100 +--- src/version.c 2010-01-19 17:39:56.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 341, + /**/ + +-- +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/gvim/vim-7.2/7.2.342 b/gvim/vim-7.2/7.2.342 new file mode 100644 index 0000000..72bf253 --- /dev/null +++ b/gvim/vim-7.2/7.2.342 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.342 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.342 +Problem: Popup menu displayed wrong in 'rightleft' mode when there are + multi-byte characters. +Solution: Adjust the column computations. (Dominique Pelle) +Files: src/popupmnu.c + + +*** ../vim-7.2.341/src/popupmnu.c 2008-11-15 14:10:23.000000000 +0100 +--- src/popupmnu.c 2010-01-19 17:57:05.000000000 +0100 +*************** +*** 345,365 **** + if (st != NULL) + { + char_u *rt = reverse_text(st); +- char_u *rt_saved = rt; +- int len, j; + + if (rt != NULL) + { +! len = (int)STRLEN(rt); +! if (len > pum_width) + { +! for (j = pum_width; j < len; ++j) + mb_ptr_adv(rt); +! len = pum_width; + } +! screen_puts_len(rt, len, row, +! col - len + 1, attr); +! vim_free(rt_saved); + } + vim_free(st); + } +--- 345,380 ---- + if (st != NULL) + { + char_u *rt = reverse_text(st); + + if (rt != NULL) + { +! char_u *rt_start = rt; +! int size; +! +! size = vim_strsize(rt); +! if (size > pum_width) + { +! do +! { +! size -= has_mbyte +! ? (*mb_ptr2cells)(rt) : 1; + mb_ptr_adv(rt); +! } while (size > pum_width); +! +! if (size < pum_width) +! { +! /* Most left character requires +! * 2-cells but only 1 cell is +! * available on screen. Put a +! * '<' on the left of the pum +! * item */ +! *(--rt) = '<'; +! size++; +! } + } +! screen_puts_len(rt, (int)STRLEN(rt), +! row, col - size + 1, attr); +! vim_free(rt_start); + } + vim_free(st); + } +*** ../vim-7.2.341/src/version.c 2010-01-19 17:40:39.000000000 +0100 +--- src/version.c 2010-01-19 18:03:22.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 342, + /**/ + +-- +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/gvim/vim-7.2/7.2.343 b/gvim/vim-7.2/7.2.343 new file mode 100644 index 0000000..2203151 --- /dev/null +++ b/gvim/vim-7.2/7.2.343 @@ -0,0 +1,51 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.343 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.343 (after 7.2.338) +Problem: Can't compile on Win32. +Solution: Insert the missing '|'. +Files: src/ex_cmds2.c + + +*** ../vim-7.2.342/src/ex_cmds2.c 2010-01-19 16:31:10.000000000 +0100 +--- src/ex_cmds2.c 2010-01-19 23:22:40.000000000 +0100 +*************** +*** 2816,2822 **** + { + int fd_tmp = mch_open(filename, O_RDONLY + # ifdef WIN32 +! O_BINARY | O_NOINHERIT + # endif + , 0); + +--- 2816,2822 ---- + { + int fd_tmp = mch_open(filename, O_RDONLY + # ifdef WIN32 +! | O_BINARY | O_NOINHERIT + # endif + , 0); + +*** ../vim-7.2.342/src/version.c 2010-01-19 18:05:05.000000000 +0100 +--- src/version.c 2010-01-19 23:24:05.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 343, + /**/ + +-- +I'm writing a book. I've got the page numbers done. + + /// 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/gvim/vim-7.2/7.2.344 b/gvim/vim-7.2/7.2.344 new file mode 100644 index 0000000..788bbc4 --- /dev/null +++ b/gvim/vim-7.2/7.2.344 @@ -0,0 +1,60 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.344 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.344 (after 7.2.343) +Problem: Can't compile on some systems +Solution: Move the #ifdef outside of the mch_open macro. (Patrick Texier) +Files: src/ex_cmds2.c + + +*** ../vim-7.2.343/src/ex_cmds2.c 2010-01-19 23:25:18.000000000 +0100 +--- src/ex_cmds2.c 2010-01-20 21:38:19.000000000 +0100 +*************** +*** 2814,2824 **** + fopen_noinh_readbin(filename) + char *filename; + { +- int fd_tmp = mch_open(filename, O_RDONLY + # ifdef WIN32 +! | O_BINARY | O_NOINHERIT + # endif +- , 0); + + if (fd_tmp == -1) + return NULL; +--- 2814,2824 ---- + fopen_noinh_readbin(filename) + char *filename; + { + # ifdef WIN32 +! int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0); +! # else +! int fd_tmp = mch_open(filename, O_RDONLY, 0); + # endif + + if (fd_tmp == -1) + return NULL; +*** ../vim-7.2.343/src/version.c 2010-01-19 23:25:18.000000000 +0100 +--- src/version.c 2010-01-20 21:38:23.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 344, + /**/ + +-- +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/gvim/vim-7.2/7.2.345 b/gvim/vim-7.2/7.2.345 new file mode 100644 index 0000000..a3b7acf --- /dev/null +++ b/gvim/vim-7.2/7.2.345 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.345 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.345 +Problem: Tab line is not updated when the value of 'bt' is changed. +Solution: Call redraw_titles(). (Lech Lorens) +Files: src/option.c + + +*** ../vim-7.2.344/src/option.c 2009-09-11 15:20:22.000000000 +0200 +--- src/option.c 2010-01-27 15:52:45.000000000 +0100 +*************** +*** 6410,6415 **** +--- 6410,6418 ---- + } + # endif + curbuf->b_help = (curbuf->b_p_bt[0] == 'h'); ++ # ifdef FEAT_TITLE ++ redraw_titles(); ++ # endif + } + } + #endif +*** ../vim-7.2.344/src/version.c 2010-01-20 21:41:40.000000000 +0100 +--- src/version.c 2010-01-27 15:57:06.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 345, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +154. You fondle your mouse. + + /// 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/gvim/vim-7.2/7.2.346 b/gvim/vim-7.2/7.2.346 new file mode 100644 index 0000000..479aac6 --- /dev/null +++ b/gvim/vim-7.2/7.2.346 @@ -0,0 +1,110 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.346 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.346 +Problem: Repeating a command with @: causes a mapping to be applied twice. +Solution: Do not remap characters inserted in the typeahead buffer. (Kana + Natsuno) +Files: src/ops.c + + +*** ../vim-7.2.345/src/ops.c 2010-01-19 14:59:14.000000000 +0100 +--- src/ops.c 2010-01-19 13:04:46.000000000 +0100 +*************** +*** 1301,1310 **** + } + } + + static int + put_in_typebuf(s, esc, colon, silent) + char_u *s; +! int esc; /* Escape CSI characters */ + int colon; /* add ':' before the line */ + int silent; + { +--- 1301,1316 ---- + } + } + ++ /* ++ * Insert register contents "s" into the typeahead buffer, so that it will be ++ * executed again. ++ * When "esc" is TRUE it is to be taken literally: Escape CSI characters and ++ * no remapping. ++ */ + static int + put_in_typebuf(s, esc, colon, silent) + char_u *s; +! int esc; + int colon; /* add ':' before the line */ + int silent; + { +*************** +*** 1312,1318 **** + + put_reedit_in_typebuf(silent); + if (colon) +! retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent); + if (retval == OK) + { + char_u *p; +--- 1318,1324 ---- + + put_reedit_in_typebuf(silent); + if (colon) +! retval = ins_typebuf((char_u *)"\n", REMAP_NONE, 0, TRUE, silent); + if (retval == OK) + { + char_u *p; +*************** +*** 1324,1335 **** + if (p == NULL) + retval = FAIL; + else +! retval = ins_typebuf(p, REMAP_YES, 0, TRUE, silent); + if (esc) + vim_free(p); + } + if (colon && retval == OK) +! retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent); + return retval; + } + +--- 1330,1342 ---- + if (p == NULL) + retval = FAIL; + else +! retval = ins_typebuf(p, esc ? REMAP_NONE : REMAP_YES, +! 0, TRUE, silent); + if (esc) + vim_free(p); + } + if (colon && retval == OK) +! retval = ins_typebuf((char_u *)":", REMAP_NONE, 0, TRUE, silent); + return retval; + } + +*** ../vim-7.2.345/src/version.c 2010-01-27 15:57:17.000000000 +0100 +--- src/version.c 2010-01-27 16:25:55.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 346, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +155. You forget to eat because you're too busy surfing 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/gvim/vim-7.2/7.2.347 b/gvim/vim-7.2/7.2.347 new file mode 100644 index 0000000..e5fa17d --- /dev/null +++ b/gvim/vim-7.2/7.2.347 @@ -0,0 +1,138 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.347 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.347 +Problem: Crash when executing mapping redefines that same mapping. +Solution: Save the values used before evaluating the expression. +Files: src/getchar.c + + +*** ../vim-7.2.346/src/getchar.c 2009-11-11 16:23:37.000000000 +0100 +--- src/getchar.c 2010-01-27 17:30:42.000000000 +0100 +*************** +*** 2389,2394 **** +--- 2389,2405 ---- + /* complete match */ + if (keylen >= 0 && keylen <= typebuf.tb_len) + { ++ #ifdef FEAT_EVAL ++ int save_m_expr; ++ int save_m_noremap; ++ int save_m_silent; ++ char_u *save_m_keys; ++ char_u *save_m_str; ++ #else ++ # define save_m_noremap mp->m_noremap ++ # define save_m_silent mp->m_silent ++ #endif ++ + /* write chars to script file(s) */ + if (keylen > typebuf.tb_maplen) + gotchars(typebuf.tb_buf + typebuf.tb_off +*************** +*** 2431,2436 **** +--- 2442,2457 ---- + #endif + + #ifdef FEAT_EVAL ++ /* Copy the values from *mp that are used, because ++ * evaluating the expression may invoke a function ++ * that redefines the mapping, thereby making *mp ++ * invalid. */ ++ save_m_expr = mp->m_expr; ++ save_m_noremap = mp->m_noremap; ++ save_m_silent = mp->m_silent; ++ save_m_keys = NULL; /* only saved when needed */ ++ save_m_str = NULL; /* only saved when needed */ ++ + /* + * Handle ":map ": evaluate the {rhs} as an + * expression. Save and restore the typeahead so that +*************** +*** 2446,2452 **** + if (tabuf.typebuf_valid) + { + vgetc_busy = 0; +! s = eval_map_expr(mp->m_str, NUL); + vgetc_busy = save_vgetc_busy; + } + else +--- 2467,2475 ---- + if (tabuf.typebuf_valid) + { + vgetc_busy = 0; +! save_m_keys = vim_strsave(mp->m_keys); +! save_m_str = vim_strsave(mp->m_str); +! s = eval_map_expr(save_m_str, NUL); + vgetc_busy = save_vgetc_busy; + } + else +*************** +*** 2470,2486 **** + else + { + i = ins_typebuf(s, +! mp->m_noremap != REMAP_YES +! ? mp->m_noremap +! : STRNCMP(s, mp->m_keys, + (size_t)keylen) != 0 + ? REMAP_YES : REMAP_SKIP, +! 0, TRUE, cmd_silent || mp->m_silent); + #ifdef FEAT_EVAL +! if (mp->m_expr) + vim_free(s); + #endif + } + if (i == FAIL) + { + c = -1; +--- 2493,2517 ---- + else + { + i = ins_typebuf(s, +! save_m_noremap != REMAP_YES +! ? save_m_noremap +! : STRNCMP(s, +! #ifdef FEAT_EVAL +! save_m_keys != NULL ? save_m_keys : +! #endif +! mp->m_keys, + (size_t)keylen) != 0 + ? REMAP_YES : REMAP_SKIP, +! 0, TRUE, cmd_silent || save_m_silent); + #ifdef FEAT_EVAL +! if (save_m_expr) + vim_free(s); + #endif + } ++ #ifdef FEAT_EVAL ++ vim_free(save_m_keys); ++ vim_free(save_m_str); ++ #endif + if (i == FAIL) + { + c = -1; +*** ../vim-7.2.346/src/version.c 2010-01-27 16:31:00.000000000 +0100 +--- src/version.c 2010-01-27 17:27:32.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 347, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +156. You forget your friend's name but not her e-mail 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/gvim/vim-7.2/7.2.348 b/gvim/vim-7.2/7.2.348 new file mode 100644 index 0000000..5f4ffbd --- /dev/null +++ b/gvim/vim-7.2/7.2.348 @@ -0,0 +1,254 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.348 (after 7.2.330) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.348 (after 7.2.330) +Problem: Unicode double-width characters are not up-to date. +Solution: Produce the double-width table like the others. +Files: runtime/tools/unicode.vim, src/mbyte.c + + +*** ../vim-7.2.347/runtime/tools/unicode.vim 2010-01-12 19:48:57.000000000 +0100 +--- runtime/tools/unicode.vim 2010-01-27 17:57:17.000000000 +0100 +*************** +*** 187,202 **** + wincmd p + endfunc + +! " Build the ambiguous table in a new buffer. + " Uses s:widthprops and s:dataprops. +! func! BuildAmbiguousTable() + let start = -1 + let end = -1 + let ranges = [] + let dataidx = 0 + for p in s:widthprops +! if p[1][0] == 'A' +! let n = ('0x' . p[0]) + 0 + " Find this char in the data table. + while 1 + let dn = ('0x' . s:dataprops[dataidx][0]) + 0 +--- 187,213 ---- + wincmd p + endfunc + +! " Build the double width or ambiguous width table in a new buffer. + " Uses s:widthprops and s:dataprops. +! func! BuildWidthTable(pattern, tableName) + let start = -1 + let end = -1 + let ranges = [] + let dataidx = 0 + for p in s:widthprops +! if p[1][0] =~ a:pattern +! if p[0] =~ '\.\.' +! " It is a range. we don't check for composing char then. +! let rng = split(p[0], '\.\.') +! if len(rng) != 2 +! echoerr "Cannot parse range: '" . p[0] . "' in width table" +! endif +! let n = ('0x' . rng[0]) + 0 +! let n_last = ('0x' . rng[1]) + 0 +! else +! let n = ('0x' . p[0]) + 0 +! let n_last = n +! endif + " Find this char in the data table. + while 1 + let dn = ('0x' . s:dataprops[dataidx][0]) + 0 +*************** +*** 205,231 **** + endif + let dataidx += 1 + endwhile +! if dn != n + echoerr "Cannot find character " . n . " in data table" + endif + " Only use the char when it's not a composing char. + let dp = s:dataprops[dataidx] +! if dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me' + if start >= 0 && end + 1 == n + " continue with same range. +- let end = n + else + if start >= 0 + " produce previous range + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) + endif + let start = n +- if p[0] =~ '\.\.' +- let end = ('0x' . substitute(p[0], '.*\.\.', '', '')) + 0 +- else +- let end = n +- endif + endif + endif + endif + endfor +--- 216,238 ---- + endif + let dataidx += 1 + endwhile +! if dn != n && n_last == n + echoerr "Cannot find character " . n . " in data table" + endif + " Only use the char when it's not a composing char. ++ " But use all chars from a range. + let dp = s:dataprops[dataidx] +! if n_last > n || (dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me') + if start >= 0 && end + 1 == n + " continue with same range. + else + if start >= 0 + " produce previous range + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) + endif + let start = n + endif ++ let end = n_last + endif + endif + endfor +*************** +*** 235,242 **** + + " New buffer to put the result in. + new +! file ambiguous +! call setline(1, " static struct interval ambiguous[] =") + call setline(2, " {") + call append('$', ranges) + call setline('$', getline('$')[:-2]) " remove last comma +--- 242,249 ---- + + " New buffer to put the result in. + new +! exe "file " . a:tableName +! call setline(1, " static struct interval " . a:tableName . "[] =") + call setline(2, " {") + call append('$', ranges) + call setline('$', getline('$')[:-2]) " remove last comma +*************** +*** 276,280 **** + " Parse each line, create a list of lists. + call ParseWidthProps() + +! " Build the ambiguous table. +! call BuildAmbiguousTable() +--- 283,290 ---- + " Parse each line, create a list of lists. + call ParseWidthProps() + +! " Build the double width table. +! call BuildWidthTable('[WF]', 'doublewidth') +! +! " Build the ambiguous width table. +! call BuildWidthTable('A', 'ambiguous') +*** ../vim-7.2.347/src/mbyte.c 2010-01-12 19:48:57.000000000 +0100 +--- src/mbyte.c 2010-01-27 18:06:35.000000000 +0100 +*************** +*** 1200,1205 **** +--- 1200,1248 ---- + utf_char2cells(c) + int c; + { ++ /* Sorted list of non-overlapping intervals of East Asian double width ++ * characters, generated with ../runtime/tools/unicode.vim. */ ++ static struct interval doublewidth[] = ++ { ++ {0x1100, 0x115f}, ++ {0x11a3, 0x11a7}, ++ {0x11fa, 0x11ff}, ++ {0x2329, 0x232a}, ++ {0x2e80, 0x2e99}, ++ {0x2e9b, 0x2ef3}, ++ {0x2f00, 0x2fd5}, ++ {0x2ff0, 0x2ffb}, ++ {0x3000, 0x3029}, ++ {0x3030, 0x303e}, ++ {0x3041, 0x3096}, ++ {0x309b, 0x30ff}, ++ {0x3105, 0x312d}, ++ {0x3131, 0x318e}, ++ {0x3190, 0x31b7}, ++ {0x31c0, 0x31e3}, ++ {0x31f0, 0x321e}, ++ {0x3220, 0x3247}, ++ {0x3250, 0x32fe}, ++ {0x3300, 0x4dbf}, ++ {0x4e00, 0xa48c}, ++ {0xa490, 0xa4c6}, ++ {0xa960, 0xa97c}, ++ {0xac00, 0xd7a3}, ++ {0xd7b0, 0xd7c6}, ++ {0xd7cb, 0xd7fb}, ++ {0xf900, 0xfaff}, ++ {0xfe10, 0xfe19}, ++ {0xfe30, 0xfe52}, ++ {0xfe54, 0xfe66}, ++ {0xfe68, 0xfe6b}, ++ {0xff01, 0xff60}, ++ {0xffe0, 0xffe6}, ++ {0x1f200, 0x1f200}, ++ {0x1f210, 0x1f231}, ++ {0x1f240, 0x1f248}, ++ {0x20000, 0x2fffd}, ++ {0x30000, 0x3fffd} ++ }; + /* Sorted list of non-overlapping intervals of East Asian Ambiguous + * characters, generated with ../runtime/tools/unicode.vim. */ + static struct interval ambiguous[] = +*************** +*** 1403,1422 **** + #else + if (!utf_printable(c)) + return 6; /* unprintable, displays */ +! if (c >= 0x1100 +! && (c <= 0x115f /* Hangul Jamo */ +! || c == 0x2329 +! || c == 0x232a +! || (c >= 0x2e80 && c <= 0xa4cf +! && c != 0x303f) /* CJK ... Yi */ +! || (c >= 0xac00 && c <= 0xd7a3) /* Hangul Syllables */ +! || (c >= 0xf900 && c <= 0xfaff) /* CJK Compatibility +! Ideographs */ +! || (c >= 0xfe30 && c <= 0xfe6f) /* CJK Compatibility Forms */ +! || (c >= 0xff00 && c <= 0xff60) /* Fullwidth Forms */ +! || (c >= 0xffe0 && c <= 0xffe6) +! || (c >= 0x20000 && c <= 0x2fffd) +! || (c >= 0x30000 && c <= 0x3fffd))) + return 2; + #endif + } +--- 1446,1452 ---- + #else + if (!utf_printable(c)) + return 6; /* unprintable, displays */ +! if (intable(doublewidth, sizeof(doublewidth), c)) + return 2; + #endif + } +*** ../vim-7.2.347/src/version.c 2010-01-27 17:31:38.000000000 +0100 +--- src/version.c 2010-01-27 18:25:50.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 348, + /**/ + +-- +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/gvim/vim-7.2/7.2.349 b/gvim/vim-7.2/7.2.349 new file mode 100644 index 0000000..7d0be02 --- /dev/null +++ b/gvim/vim-7.2/7.2.349 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.349 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.349 +Problem: CTRL-W gf doesn't put the new tab in the same place as "tab split" + and "gf". (Tony Mechelynck) +Solution: Store the tab number in cmdmod.tab. +Files: src/window.c + + +*** ../vim-7.2.348/src/window.c 2009-06-24 17:31:27.000000000 +0200 +--- src/window.c 2010-01-27 20:23:22.000000000 +0100 +*************** +*** 626,632 **** + #ifdef FEAT_SEARCHPATH + case 'f': /* CTRL-W gf: "gf" in a new tab page */ + case 'F': /* CTRL-W gF: "gF" in a new tab page */ +! cmdmod.tab = TRUE; + nchar = xchar; + goto wingotofile; + #endif +--- 626,632 ---- + #ifdef FEAT_SEARCHPATH + case 'f': /* CTRL-W gf: "gf" in a new tab page */ + case 'F': /* CTRL-W gF: "gF" in a new tab page */ +! cmdmod.tab = tabpage_index(curtab) + 1; + nchar = xchar; + goto wingotofile; + #endif +*** ../vim-7.2.348/src/version.c 2010-01-27 18:29:21.000000000 +0100 +--- src/version.c 2010-01-27 20:25:43.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 349, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +159. You get excited whenever discussing your hard drive. + + /// 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/gvim/vim-7.2/7.2.350 b/gvim/vim-7.2/7.2.350 new file mode 100644 index 0000000..7715eb3 --- /dev/null +++ b/gvim/vim-7.2/7.2.350 @@ -0,0 +1,86 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.350 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.350 +Problem: Win32: When changing font the window may jump from the secondary + to the primary screen. (Michael Wookey) +Solution: When the screen position was negative don't correct it to zero. +Files: src/gui.c + + +*** ../vim-7.2.349/src/gui.c 2009-09-23 18:14:13.000000000 +0200 +--- src/gui.c 2010-01-27 21:02:32.000000000 +0100 +*************** +*** 1390,1395 **** +--- 1390,1396 ---- + int un_maximize = mustset; + int did_adjust = 0; + #endif ++ int x = -1, y = -1; + + if (!gui.shell_created) + return; +*************** +*** 1406,1411 **** +--- 1407,1416 ---- + + base_width = gui_get_base_width(); + base_height = gui_get_base_height(); ++ if (fit_to_display) ++ /* Remember the original window position. */ ++ gui_mch_get_winpos(&x, &y); ++ + #ifdef USE_SUN_WORKSHOP + if (!mustset && usingSunWorkShop + && workshop_get_width_height(&width, &height)) +*************** +*** 1473,1483 **** + + gui_mch_set_shellsize(width, height, min_width, min_height, + base_width, base_height, direction); +- if (fit_to_display) +- { +- int x, y; + +! /* Some window managers put the Vim window left of/above the screen. */ + gui_mch_update(); + if (gui_mch_get_winpos(&x, &y) == OK && (x < 0 || y < 0)) + gui_mch_set_winpos(x < 0 ? 0 : x, y < 0 ? 0 : y); +--- 1478,1489 ---- + + gui_mch_set_shellsize(width, height, min_width, min_height, + base_width, base_height, direction); + +! if (fit_to_display && x >= 0 && y >= 0) +! { +! /* Some window managers put the Vim window left of/above the screen. +! * Only change the position if it wasn't already negative before +! * (happens on MS-Windows with a secondary monitor). */ + gui_mch_update(); + if (gui_mch_get_winpos(&x, &y) == OK && (x < 0 || y < 0)) + gui_mch_set_winpos(x < 0 ? 0 : x, y < 0 ? 0 : y); +*** ../vim-7.2.349/src/version.c 2010-01-27 20:26:41.000000000 +0100 +--- src/version.c 2010-01-27 21:03:41.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 350, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +160. You get in the elevator and double-click the button for the floor + you want. + + /// 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/gvim/vim-7.2/7.2.351 b/gvim/vim-7.2/7.2.351 new file mode 100644 index 0000000..55b28f6 --- /dev/null +++ b/gvim/vim-7.2/7.2.351 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.351 (after 7.2.347) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.351 (after 7.2.347) +Problem: Can't build with some compilers. +Solution: Move the #ifdef outside of a macro. Cleanup the code. +Files: src/getchar.c + + +*** ../vim-7.2.350/src/getchar.c 2010-01-27 17:31:38.000000000 +0100 +--- src/getchar.c 2010-01-28 22:42:22.000000000 +0100 +*************** +*** 2492,2508 **** + i = FAIL; + else + { +! i = ins_typebuf(s, +! save_m_noremap != REMAP_YES +! ? save_m_noremap +! : STRNCMP(s, + #ifdef FEAT_EVAL +! save_m_keys != NULL ? save_m_keys : + #endif +! mp->m_keys, +! (size_t)keylen) != 0 +! ? REMAP_YES : REMAP_SKIP, +! 0, TRUE, cmd_silent || save_m_silent); + #ifdef FEAT_EVAL + if (save_m_expr) + vim_free(s); +--- 2492,2515 ---- + i = FAIL; + else + { +! int noremap; +! +! if (save_m_noremap != REMAP_YES) +! noremap = save_m_noremap; +! else if ( + #ifdef FEAT_EVAL +! STRNCMP(s, save_m_keys != NULL +! ? save_m_keys : mp->m_keys, +! (size_t)keylen) +! #else +! STRNCMP(s, mp->m_keys, (size_t)keylen) + #endif +! != 0) +! noremap = REMAP_YES; +! else +! noremap = REMAP_SKIP; +! i = ins_typebuf(s, noremap, +! 0, TRUE, cmd_silent || save_m_silent); + #ifdef FEAT_EVAL + if (save_m_expr) + vim_free(s); +*** ../vim-7.2.350/src/version.c 2010-01-27 21:04:58.000000000 +0100 +--- src/version.c 2010-01-28 22:50:53.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 351, + /**/ + +-- +"Hit any key to continue" it said, but nothing happened after F sharp. + + /// 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/gvim/vim-7.2/7.2.352 b/gvim/vim-7.2/7.2.352 new file mode 100644 index 0000000..d2e22f2 --- /dev/null +++ b/gvim/vim-7.2/7.2.352 @@ -0,0 +1,62 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.352 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.352 +Problem: Win64: Vim doesn't work when cross-compiled with MingW libraries. +Solution: Always return TRUE for the WM_NCCREATE message. (Andy Kittner) +Files: src/gui_w48.c + + +*** ../vim-7.2.351/src/gui_w48.c 2009-01-28 21:22:20.000000000 +0100 +--- src/gui_w48.c 2010-02-03 12:07:11.000000000 +0100 +*************** +*** 1084,1092 **** + case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam); + return TRUE; + #endif + +! default: +! return MyWindowProc(hwnd, uMsg, wParam, lParam); + } + } + +--- 1084,1098 ---- + case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam); + return TRUE; + #endif ++ /* Workaround for the problem that MyWindowProc() returns FALSE on 64 ++ * bit windows when cross-compiled using Mingw libraries. (Andy ++ * Kittner) */ ++ case WM_NCCREATE: ++ MyWindowProc(hwnd, uMsg, wParam, lParam); ++ return TRUE; + +! default: +! return MyWindowProc(hwnd, uMsg, wParam, lParam); + } + } + +*** ../vim-7.2.351/src/version.c 2010-01-28 22:58:10.000000000 +0100 +--- src/version.c 2010-02-03 12:16:30.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 352, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +185. You order fast food over the Internet + + /// 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/gvim/vim-7.2/7.2.353 b/gvim/vim-7.2/7.2.353 new file mode 100644 index 0000000..06f9f17 --- /dev/null +++ b/gvim/vim-7.2/7.2.353 @@ -0,0 +1,173 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.353 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.353 +Problem: No command line completion for ":profile". +Solution: Complete the subcommand and file name. +Files: src/ex_docmd.c, src/ex_cmds2.c, src/ex_getln.c, + src/proto/ex_cmds2.pro, src/vim.h + + +*** ../vim-7.2.352/src/ex_docmd.c 2009-11-03 12:38:50.000000000 +0100 +--- src/ex_docmd.c 2010-02-03 14:40:14.000000000 +0100 +*************** +*** 3804,3809 **** +--- 3804,3814 ---- + xp->xp_context = EXPAND_NOTHING; + break; + #endif ++ #if defined(FEAT_PROFILE) ++ case CMD_profile: ++ set_context_in_profile_cmd(xp, arg); ++ break; ++ #endif + + #endif /* FEAT_CMDL_COMPL */ + +*** ../vim-7.2.352/src/ex_cmds2.c 2010-01-20 21:41:40.000000000 +0100 +--- src/ex_cmds2.c 2010-02-03 14:50:08.000000000 +0100 +*************** +*** 1115,1120 **** +--- 1115,1193 ---- + } + } + ++ /* Command line expansion for :profile. */ ++ static enum ++ { ++ PEXP_SUBCMD, /* expand :profile sub-commands */ ++ PEXP_FUNC, /* expand :profile func {funcname} */ ++ } pexpand_what; ++ ++ static char *pexpand_cmds[] = { ++ "start", ++ #define PROFCMD_START 0 ++ "pause", ++ #define PROFCMD_PAUSE 1 ++ "continue", ++ #define PROFCMD_CONTINUE 2 ++ "func", ++ #define PROFCMD_FUNC 3 ++ "file", ++ #define PROFCMD_FILE 4 ++ NULL ++ #define PROFCMD_LAST 5 ++ }; ++ ++ /* ++ * Function given to ExpandGeneric() to obtain the profile command ++ * specific expansion. ++ */ ++ char_u * ++ get_profile_name(xp, idx) ++ expand_T *xp UNUSED; ++ int idx; ++ { ++ switch (pexpand_what) ++ { ++ case PEXP_SUBCMD: ++ return (char_u *)pexpand_cmds[idx]; ++ /* case PEXP_FUNC: TODO */ ++ default: ++ return NULL; ++ } ++ } ++ ++ /* ++ * Handle command line completion for :profile command. ++ */ ++ void ++ set_context_in_profile_cmd(xp, arg) ++ expand_T *xp; ++ char_u *arg; ++ { ++ char_u *end_subcmd; ++ int len; ++ ++ /* Default: expand subcommands. */ ++ xp->xp_context = EXPAND_PROFILE; ++ pexpand_what = PEXP_SUBCMD; ++ xp->xp_pattern = arg; ++ ++ end_subcmd = skiptowhite(arg); ++ if (*end_subcmd == NUL) ++ return; ++ ++ len = end_subcmd - arg; ++ if (len == 5 && STRNCMP(arg, "start", 5) == 0) ++ { ++ xp->xp_context = EXPAND_FILES; ++ xp->xp_pattern = skipwhite(end_subcmd); ++ return; ++ } ++ ++ /* TODO: expand function names after "func" */ ++ xp->xp_context = EXPAND_NOTHING; ++ } ++ + /* + * Dump the profiling info. + */ +*** ../vim-7.2.352/src/ex_getln.c 2010-01-19 14:59:14.000000000 +0100 +--- src/ex_getln.c 2010-02-03 14:38:43.000000000 +0100 +*************** +*** 4522,4527 **** +--- 4522,4530 ---- + #ifdef FEAT_SIGNS + {EXPAND_SIGN, get_sign_name, TRUE}, + #endif ++ #ifdef FEAT_PROFILE ++ {EXPAND_PROFILE, get_profile_name, TRUE}, ++ #endif + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) + {EXPAND_LANGUAGE, get_lang_arg, TRUE}, +*** ../vim-7.2.352/src/proto/ex_cmds2.pro 2008-01-06 20:07:25.000000000 +0100 +--- src/proto/ex_cmds2.pro 2010-02-03 14:43:12.000000000 +0100 +*************** +*** 24,29 **** +--- 24,31 ---- + int profile_equal __ARGS((proftime_T *tm1, proftime_T *tm2)); + int profile_cmp __ARGS((proftime_T *tm1, proftime_T *tm2)); + void ex_profile __ARGS((exarg_T *eap)); ++ char_u *get_profile_name __ARGS((expand_T *xp, int idx)); ++ void set_context_in_profile_cmd __ARGS((expand_T *xp, char_u *arg)); + void profile_dump __ARGS((void)); + void script_prof_save __ARGS((proftime_T *tm)); + void script_prof_restore __ARGS((proftime_T *tm)); +*** ../vim-7.2.352/src/vim.h 2009-06-16 11:08:13.000000000 +0200 +--- src/vim.h 2010-02-03 14:40:42.000000000 +0100 +*************** +*** 718,723 **** +--- 718,724 ---- + #define EXPAND_SHELLCMD 32 + #define EXPAND_CSCOPE 33 + #define EXPAND_SIGN 34 ++ #define EXPAND_PROFILE 35 + + /* Values for exmode_active (0 is no exmode) */ + #define EXMODE_NORMAL 1 +*** ../vim-7.2.352/src/version.c 2010-02-03 12:23:16.000000000 +0100 +--- src/version.c 2010-02-03 15:07:26.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 353, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +188. You purchase a laptop so you can surf while sitting on the can. + + /// 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/gvim/vim-7.2/7.2.354 b/gvim/vim-7.2/7.2.354 new file mode 100644 index 0000000..b4f5066 --- /dev/null +++ b/gvim/vim-7.2/7.2.354 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.354 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.354 +Problem: Japanese single-width double-byte characters not handled correctly. +Solution: Put 0x8e in ScreenLines[] and the second byte in ScreenLines2[]. + (partly by Kikuchan) +Files: src/screen.c + + +*** ../vim-7.2.353/src/screen.c 2010-01-19 17:40:39.000000000 +0100 +--- src/screen.c 2010-02-03 15:47:19.000000000 +0100 +*************** +*** 2335,2347 **** + if (cells > 1) + ScreenLines[idx + 1] = 0; + } +! else if (cells > 1) /* double-byte character */ +! { +! if (enc_dbcs == DBCS_JPNU && *p == 0x8e) +! ScreenLines2[idx] = p[1]; +! else +! ScreenLines[idx + 1] = p[1]; +! } + col += cells; + idx += cells; + p += c_len; +--- 2335,2346 ---- + if (cells > 1) + ScreenLines[idx + 1] = 0; + } +! else if (enc_dbcs == DBCS_JPNU && *p == 0x8e) +! /* double-byte single width character */ +! ScreenLines2[idx] = p[1]; +! else if (cells > 1) +! /* double-width character */ +! ScreenLines[idx + 1] = p[1]; + col += cells; + idx += cells; + p += c_len; +*************** +*** 4631,4637 **** +--- 4630,4640 ---- + ScreenLines[off] = c; + #ifdef FEAT_MBYTE + if (enc_dbcs == DBCS_JPNU) ++ { ++ if ((mb_c & 0xff00) == 0x8e00) ++ ScreenLines[off] = 0x8e; + ScreenLines2[off] = mb_c & 0xff; ++ } + else if (enc_utf8) + { + if (mb_utf8) +*** ../vim-7.2.353/src/version.c 2010-02-03 15:14:15.000000000 +0100 +--- src/version.c 2010-02-03 15:43:43.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 354, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +189. You put your e-mail address in the upper left-hand corner of envelopes. + + /// 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/gvim/vim-7.2/7.2.355 b/gvim/vim-7.2/7.2.355 new file mode 100644 index 0000000..b23d44a --- /dev/null +++ b/gvim/vim-7.2/7.2.355 @@ -0,0 +1,88 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.355 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.355 +Problem: Computing the cursor column in validate_cursor_col() is wrong when + line numbers are used and 'n' is not in 'cpoptions', causing the + popup menu to be positioned wrong. +Solution: Correctly use the offset. (partly by Dominique Pelle) +Files: src/move.c + + +*** ../vim-7.2.354/src/move.c 2009-11-03 16:22:59.000000000 +0100 +--- src/move.c 2010-02-03 17:15:16.000000000 +0100 +*************** +*** 889,894 **** +--- 889,895 ---- + { + colnr_T off; + colnr_T col; ++ int width; + + validate_virtcol(); + if (!(curwin->w_valid & VALID_WCOL)) +*************** +*** 896,910 **** + col = curwin->w_virtcol; + off = curwin_col_off(); + col += off; + + /* long line wrapping, adjust curwin->w_wrow */ + if (curwin->w_p_wrap + && col >= (colnr_T)W_WIDTH(curwin) +! && W_WIDTH(curwin) - off + curwin_col_off2() > 0) +! { +! col -= W_WIDTH(curwin); +! col = col % (W_WIDTH(curwin) - off + curwin_col_off2()); +! } + if (col > (int)curwin->w_leftcol) + col -= curwin->w_leftcol; + else +--- 897,910 ---- + col = curwin->w_virtcol; + off = curwin_col_off(); + col += off; ++ width = W_WIDTH(curwin) - off + curwin_col_off2(); + + /* long line wrapping, adjust curwin->w_wrow */ + if (curwin->w_p_wrap + && col >= (colnr_T)W_WIDTH(curwin) +! && width > 0) +! /* use same formula as what is used in curs_columns() */ +! col -= ((col - W_WIDTH(curwin)) / width + 1) * width; + if (col > (int)curwin->w_leftcol) + col -= curwin->w_leftcol; + else +*************** +*** 1041,1046 **** +--- 1041,1047 ---- + /* long line wrapping, adjust curwin->w_wrow */ + if (curwin->w_wcol >= W_WIDTH(curwin)) + { ++ /* this same formula is used in validate_cursor_col() */ + n = (curwin->w_wcol - W_WIDTH(curwin)) / width + 1; + curwin->w_wcol -= n * width; + curwin->w_wrow += n; +*** ../vim-7.2.354/src/version.c 2010-02-03 15:47:59.000000000 +0100 +--- src/version.c 2010-02-03 17:40:39.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 355, + /**/ + +-- +I'm in shape. Round IS a shape. + + /// 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/gvim/vim-7.2/7.2.356 b/gvim/vim-7.2/7.2.356 new file mode 100644 index 0000000..51b646c --- /dev/null +++ b/gvim/vim-7.2/7.2.356 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.356 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.356 +Problem: When 'foldmethod' is changed not all folds are closed as expected. +Solution: In foldUpdate() correct the start position and reset fd_flags when + w_foldinvalid is set. (Lech Lorens) +Files: src/fold.c + + +*** ../vim-7.2.355/src/fold.c 2010-01-19 17:24:20.000000000 +0100 +--- src/fold.c 2010-02-03 18:08:11.000000000 +0100 +*************** +*** 849,859 **** + fold_T *fp; + + /* Mark all folds from top to bot as maybe-small. */ +! (void)foldFind(&curwin->w_folds, curwin->w_cursor.lnum, &fp); + while (fp < (fold_T *)curwin->w_folds.ga_data + curwin->w_folds.ga_len + && fp->fd_top < bot) + { + fp->fd_small = MAYBE; + ++fp; + } + +--- 849,865 ---- + fold_T *fp; + + /* Mark all folds from top to bot as maybe-small. */ +! (void)foldFind(&curwin->w_folds, top, &fp); + while (fp < (fold_T *)curwin->w_folds.ga_data + curwin->w_folds.ga_len + && fp->fd_top < bot) + { + fp->fd_small = MAYBE; ++ ++ /* Not sure if this is the right place to reset fd_flags (suggested by ++ * Lech Lorens). */ ++ if (wp->w_foldinvalid) ++ fp->fd_flags = FD_LEVEL; ++ + ++fp; + } + +*** ../vim-7.2.355/src/version.c 2010-02-03 17:42:59.000000000 +0100 +--- src/version.c 2010-02-03 18:12:34.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 356, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +190. You quickly hand over your wallet, leather jacket, and car keys + during a mugging, then proceed to beat the crap out of your + assailant when he asks for your laptop. + + /// 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/gvim/vim-7.2/7.2.357 b/gvim/vim-7.2/7.2.357 new file mode 100644 index 0000000..e1998a8 --- /dev/null +++ b/gvim/vim-7.2/7.2.357 @@ -0,0 +1,49 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.357 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.357 +Problem: When changing 'fileformat' from/to "mac" and there is a CR in the + text the display is wrong. +Solution: Redraw the text when 'fileformat' is changed. (Ben Schmidt) +Files: src/option.c + + +*** ../vim-7.2.356/src/option.c 2010-01-27 15:57:17.000000000 +0100 +--- src/option.c 2010-02-11 16:57:19.000000000 +0100 +*************** +*** 5867,5872 **** +--- 5867,5876 ---- + #endif + /* update flag in swap file */ + ml_setflags(curbuf); ++ /* Redraw needed when switching to/from "mac": a CR in the text ++ * will be displayed differently. */ ++ if (get_fileformat(curbuf) == EOL_MAC || *oldval == 'm') ++ redraw_curbuf_later(NOT_VALID); + } + } + +*** ../vim-7.2.356/src/version.c 2010-02-03 18:14:41.000000000 +0100 +--- src/version.c 2010-02-11 17:01:36.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 357, + /**/ + +-- +From the classified section of a city newspaper: +Dog for sale: eats anything and is fond of children. + + /// 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/gvim/vim-7.2/7.2.358 b/gvim/vim-7.2/7.2.358 new file mode 100644 index 0000000..524049d --- /dev/null +++ b/gvim/vim-7.2/7.2.358 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.358 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.358 +Problem: Compiler warnings on VMS. (Zoltan Arpadffy) +Solution: Pass array itself instead its address. Return a value. +Files: src/gui_gtk_x11.c, src/os_unix.c + + +*** ../vim-7.2.357/src/gui_gtk_x11.c 2009-11-03 18:13:36.000000000 +0100 +--- src/gui_gtk_x11.c 2010-02-11 18:00:28.000000000 +0100 +*************** +*** 6190,6196 **** + int pcc[MAX_MCO]; + + /* TODO: use the composing characters */ +! c = utfc_ptr2char_len(p, &pcc, len - (p - s)); + if (c >= 0x10000) /* show chars > 0xffff as ? */ + c = 0xbf; + buf[textlen].byte1 = c >> 8; +--- 6190,6196 ---- + int pcc[MAX_MCO]; + + /* TODO: use the composing characters */ +! c = utfc_ptr2char_len(p, pcc, len - (p - s)); + if (c >= 0x10000) /* show chars > 0xffff as ? */ + c = 0xbf; + buf[textlen].byte1 = c >> 8; +*** ../vim-7.2.357/src/os_unix.c 2009-07-22 13:27:50.000000000 +0200 +--- src/os_unix.c 2010-02-11 18:10:20.000000000 +0100 +*************** +*** 1471,1476 **** +--- 1471,1479 ---- + { + /* This function should not return, it causes exit(). Longjump instead. */ + LONGJMP(lc_jump_env, 1); ++ # ifdef VMS ++ return 0; /* avoid the compiler complains about missing return value */ ++ # endif + } + # endif + +*************** +*** 1490,1495 **** +--- 1493,1501 ---- + + /* This function should not return, it causes exit(). Longjump instead. */ + LONGJMP(x_jump_env, 1); ++ # ifdef VMS ++ return 0; /* avoid the compiler complains about missing return value */ ++ # endif + } + #endif + +*** ../vim-7.2.357/src/version.c 2010-02-11 17:02:04.000000000 +0100 +--- src/version.c 2010-02-11 18:10:45.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 358, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +221. Your wife melts your keyboard in the oven. + + /// 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/gvim/vim-7.2/7.2.359 b/gvim/vim-7.2/7.2.359 new file mode 100644 index 0000000..eb7ade2 --- /dev/null +++ b/gvim/vim-7.2/7.2.359 @@ -0,0 +1,68 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.359 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.359 +Problem: Crash when using the Netbeans join command. +Solution: Make sure the ml_flush_line() function is not used recursively. + (Xavier de Gaye) +Files: src/memline.c + + +*** ../vim-7.2.358/src/memline.c 2009-11-17 17:13:03.000000000 +0100 +--- src/memline.c 2010-02-11 18:47:48.000000000 +0100 +*************** +*** 3087,3098 **** +--- 3087,3105 ---- + int start; + int count; + int i; ++ static int entered = FALSE; + + if (buf->b_ml.ml_line_lnum == 0 || buf->b_ml.ml_mfp == NULL) + return; /* nothing to do */ + + if (buf->b_ml.ml_flags & ML_LINE_DIRTY) + { ++ /* This code doesn't work recursively, but Netbeans may call back here ++ * when obtaining the cursor position. */ ++ if (entered) ++ return; ++ entered = TRUE; ++ + lnum = buf->b_ml.ml_line_lnum; + new_line = buf->b_ml.ml_line_ptr; + +*************** +*** 3160,3165 **** +--- 3167,3174 ---- + } + } + vim_free(new_line); ++ ++ entered = FALSE; + } + + buf->b_ml.ml_line_lnum = 0; +*** ../vim-7.2.358/src/version.c 2010-02-11 18:19:32.000000000 +0100 +--- src/version.c 2010-02-11 18:53:55.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 359, + /**/ + +-- +Your fault: 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/iron/LICENSE b/iron/LICENSE new file mode 100644 index 0000000..9314092 --- /dev/null +++ b/iron/LICENSE @@ -0,0 +1,27 @@ +// 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 new file mode 100644 index 0000000..9109707 --- /dev/null +++ b/iron/PKGBUILD @@ -0,0 +1,48 @@ +# 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 new file mode 100644 index 0000000..4454877 --- /dev/null +++ b/iron/iron.desktop @@ -0,0 +1,10 @@ +[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 new file mode 100644 index 0000000..9f27e05 --- /dev/null +++ b/iron/iron.install @@ -0,0 +1,14 @@ +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 new file mode 100644 index 0000000..73e5d7a Binary files /dev/null and b/iron/iron.png differ diff --git a/iron/iron.sh b/iron/iron.sh new file mode 100644 index 0000000..f4da2c1 --- /dev/null +++ b/iron/iron.sh @@ -0,0 +1,2 @@ +#!/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 new file mode 100644 index 0000000..b836fd1 Binary files /dev/null and b/iron/libjpeg.so.62-i686.xz differ diff --git a/iron/libjpeg.so.62-x86_64.xz b/iron/libjpeg.so.62-x86_64.xz new file mode 100644 index 0000000..b7bfb30 Binary files /dev/null and b/iron/libjpeg.so.62-x86_64.xz differ diff --git a/libjpeg6/locale-fixes.patch b/libjpeg6/locale-fixes.patch new file mode 100644 index 0000000..3bc3364 --- /dev/null +++ b/libjpeg6/locale-fixes.patch @@ -0,0 +1,41 @@ +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/nikto/PKGBUILD b/nikto/PKGBUILD new file mode 100644 index 0000000..6b4c282 --- /dev/null +++ b/nikto/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: Arkham +# Contributor: Arkham + +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 new file mode 100644 index 0000000..aefdd93 --- /dev/null +++ b/nikto/nikto.install @@ -0,0 +1,13 @@ +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 new file mode 100644 index 0000000..8d36d2a --- /dev/null +++ b/nikto/nikto.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cd /usr/share/nikto +perl nikto.pl $@ diff --git a/vim/vim-7.2/7.2.268 b/vim/vim-7.2/7.2.268 new file mode 100644 index 0000000..89c50b0 --- /dev/null +++ b/vim/vim-7.2/7.2.268 @@ -0,0 +1,80 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.268 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.268 +Problem: Crash when using Python to set cursor beyond end of line. + (winterTTr) +Solution: Check the column to be valid. +Files: src/if_python.c + + +*** ../vim-7.2.267/src/if_python.c 2009-07-09 20:06:30.000000000 +0200 +--- src/if_python.c 2009-10-10 14:49:10.000000000 +0200 +*************** +*** 2058,2063 **** +--- 2058,2064 ---- + { + long lnum; + long col; ++ long len; + + if (!PyArg_Parse(val, "(ll)", &lnum, &col)) + return -1; +*************** +*** 2072,2081 **** + if (VimErrorCheck()) + return -1; + +! /* NO CHECK ON COLUMN - SEEMS NOT TO MATTER */ + + this->win->w_cursor.lnum = lnum; + this->win->w_cursor.col = col; + update_screen(VALID); + + return 0; +--- 2073,2088 ---- + if (VimErrorCheck()) + return -1; + +! /* When column is out of range silently correct it. */ +! len = STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE)); +! if (col > len) +! col = len; + + this->win->w_cursor.lnum = lnum; + this->win->w_cursor.col = col; ++ #ifdef FEAT_VIRTUALEDIT ++ this->win->w_cursor.coladd = 0; ++ #endif + update_screen(VALID); + + return 0; +*** ../vim-7.2.267/src/version.c 2009-10-07 16:19:52.000000000 +0200 +--- src/version.c 2009-11-03 11:42:08.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 268, + /**/ + +-- +VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur + and his knights seemed hopeless, when, suddenly ... the animator + suffered a fatal heart attack. +ANIMATOR: Aaaaagh! +VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could + continue. + "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/vim/vim-7.2/7.2.269 b/vim/vim-7.2/7.2.269 new file mode 100644 index 0000000..ec15f45 --- /dev/null +++ b/vim/vim-7.2/7.2.269 @@ -0,0 +1,261 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.269 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.269 +Problem: Many people struggle to find out why Vim startup is slow. +Solution: Add the --startuptime command line flag. +Files: runtime/doc/starting.txt, src/globals.h, src/feature.h, + src/main.c, src/macros.h + + +*** ../vim-7.2.268/runtime/doc/starting.txt 2008-11-09 13:43:25.000000000 +0100 +--- runtime/doc/starting.txt 2009-10-25 11:57:51.000000000 +0100 +*************** +*** 144,149 **** +--- 144,156 ---- + -u NORC no yes + --noplugin yes no + ++ --startuptime={fname} *--startuptime* ++ During startup write timing messages to the file {fname}. ++ This can be used to find out where time is spent while loading ++ your .vimrc and plugins. ++ When {fname} already exists new messages are appended. ++ {only when compiled with this feature} ++ + *--literal* + --literal Take file names literally, don't expand wildcards. Not needed + for Unix, because Vim always takes file names literally (the +*************** +*** 471,476 **** +--- 487,493 ---- + window title and copy/paste using the X clipboard. This + avoids a long startup time when running Vim in a terminal + emulator and the connection to the X server is slow. ++ See |--startuptime| to find out if affects you. + Only makes a difference on Unix or VMS, when compiled with the + |+X11| feature. Otherwise it's ignored. + To disable the connection only for specific terminals, see the +*** ../vim-7.2.268/src/globals.h 2009-07-29 12:09:49.000000000 +0200 +--- src/globals.h 2009-10-10 15:14:31.000000000 +0200 +*************** +*** 1567,1572 **** +--- 1567,1576 ---- + /* For undo we need to know the lowest time possible. */ + EXTERN time_t starttime; + ++ #ifdef STARTUPTIME ++ EXTERN FILE *time_fd INIT(= NULL); /* where to write startup timing */ ++ #endif ++ + /* + * 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 +*** ../vim-7.2.268/src/feature.h 2008-11-09 13:43:25.000000000 +0100 +--- src/feature.h 2009-10-10 16:16:19.000000000 +0200 +*************** +*** 844,853 **** + /* #define DEBUG */ + + /* +! * STARTUPTIME Time the startup process. Writes a "vimstartup" file +! * with timestamps. + */ +! /* #define STARTUPTIME "vimstartup" */ + + /* + * MEM_PROFILE Debugging of memory allocation and freeing. +--- 844,857 ---- + /* #define DEBUG */ + + /* +! * STARTUPTIME Time the startup process. Writes a file with +! * timestamps. + */ +! #if defined(FEAT_NORMAL) \ +! && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \ +! || defined(WIN3264)) +! # define STARTUPTIME 1 +! #endif + + /* + * MEM_PROFILE Debugging of memory allocation and freeing. +*** ../vim-7.2.268/src/main.c 2009-05-26 22:58:43.000000000 +0200 +--- src/main.c 2009-10-10 16:18:32.000000000 +0200 +*************** +*** 130,139 **** + #endif + + +- #ifdef STARTUPTIME +- static FILE *time_fd = NULL; +- #endif +- + /* + * Different types of error messages. + */ +--- 130,135 ---- +*************** +*** 173,178 **** +--- 169,177 ---- + char_u *fname = NULL; /* file name from command line */ + mparm_T params; /* various parameters passed between + * main() and other functions. */ ++ #ifdef STARTUPTIME ++ int i; ++ #endif + + /* + * Do any system-specific initialisations. These can NOT use IObuff or +*************** +*** 203,210 **** + #endif + + #ifdef STARTUPTIME +! time_fd = mch_fopen(STARTUPTIME, "a"); +! TIME_MSG("--- VIM STARTING ---"); + #endif + starttime = time(NULL); + +--- 202,216 ---- + #endif + + #ifdef STARTUPTIME +! for (i = 1; i < argc; ++i) +! { +! if (STRNICMP(argv[i], "--startuptime=", 14) == 0) +! { +! time_fd = mch_fopen(argv[i] + 14, "a"); +! TIME_MSG("--- VIM STARTING ---"); +! break; +! } +! } + #endif + starttime = time(NULL); + +*************** +*** 1150,1155 **** +--- 1156,1173 ---- + cursor_on(); + + do_redraw = FALSE; ++ ++ #ifdef STARTUPTIME ++ /* Now that we have drawn the first screen all the startup stuff ++ * has been done, close any file for startup messages. */ ++ if (time_fd != NULL) ++ { ++ TIME_MSG("first screen update"); ++ TIME_MSG("--- VIM STARTED ---"); ++ fclose(time_fd); ++ time_fd = NULL; ++ } ++ #endif + } + #ifdef FEAT_GUI + if (need_mouse_correct) +*************** +*** 1743,1748 **** +--- 1761,1770 ---- + /* already processed, skip */ + } + #endif ++ else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) ++ { ++ /* already processed, skip */ ++ } + else + { + if (argv[0][argv_idx]) +*************** +*** 3211,3216 **** +--- 3233,3252 ---- + + static struct timeval prev_timeval; + ++ # ifdef WIN3264 ++ /* ++ * Windows doesn't have gettimeofday(), although it does have struct timeval. ++ */ ++ static int ++ gettimeofday(struct timeval *tv, char *dummy) ++ { ++ long t = clock(); ++ tv->tv_sec = t / CLOCKS_PER_SEC; ++ tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC; ++ return 0; ++ } ++ # endif ++ + /* + * Save the previous time before doing something that could nest. + * set "*tv_rel" to the time elapsed so far. +*************** +*** 3299,3318 **** + } + } + +- # ifdef WIN3264 +- /* +- * Windows doesn't have gettimeofday(), although it does have struct timeval. +- */ +- int +- gettimeofday(struct timeval *tv, char *dummy) +- { +- long t = clock(); +- tv->tv_sec = t / CLOCKS_PER_SEC; +- tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC; +- return 0; +- } +- # endif +- + #endif + + #if defined(FEAT_CLIENTSERVER) || defined(PROTO) +--- 3335,3340 ---- +*** ../vim-7.2.268/src/macros.h 2009-05-17 13:30:58.000000000 +0200 +--- src/macros.h 2009-10-10 15:19:07.000000000 +0200 +*************** +*** 243,249 **** + #endif + + #ifdef STARTUPTIME +! # define TIME_MSG(s) time_msg(s, NULL) + #else + # define TIME_MSG(s) + #endif +--- 243,249 ---- + #endif + + #ifdef STARTUPTIME +! # define TIME_MSG(s) { if (time_fd != NULL) time_msg(s, NULL); } + #else + # define TIME_MSG(s) + #endif +*** ../vim-7.2.268/src/version.c 2009-11-03 11:43:05.000000000 +0100 +--- src/version.c 2009-11-03 12:06:31.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 269, + /**/ + +-- +BEDEVERE: Look! It's the old man from scene 24 - what's he Doing here? +ARTHUR: He is the keeper of the Bridge. He asks each traveler five + questions ... +GALAHAD: Three questions. + "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/vim/vim-7.2/7.2.270 b/vim/vim-7.2/7.2.270 new file mode 100644 index 0000000..7ad6458 --- /dev/null +++ b/vim/vim-7.2/7.2.270 @@ -0,0 +1,72 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.270 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.270 +Problem: Using ":@c" when the c register contains a CR causes the rest to + be executed later. (Dexter Douglas) +Solution: Don't check for typeahead to start with ':', keep executing + commands until all added typeahead has been used. +Files: src/ex_docmd.c + + +*** ../vim-7.2.269/src/ex_docmd.c 2009-09-30 13:23:57.000000000 +0200 +--- src/ex_docmd.c 2009-10-28 12:06:54.000000000 +0100 +*************** +*** 8358,8363 **** +--- 8358,8364 ---- + exarg_T *eap; + { + int c; ++ int prev_len = typebuf.tb_len; + + curwin->w_cursor.lnum = eap->line2; + +*************** +*** 8383,8393 **** + + /* + * Execute from the typeahead buffer. +! * Originally this didn't check for the typeahead buffer to be empty, +! * thus could read more Ex commands from stdin. It's not clear why, +! * it is certainly unexpected. + */ +! while ((!stuff_empty() || typebuf.tb_len > 0) && vpeekc() == ':') + (void)do_cmdline(NULL, getexline, NULL, DOCMD_NOWAIT|DOCMD_VERBOSE); + + exec_from_reg = save_efr; +--- 8384,8393 ---- + + /* + * Execute from the typeahead buffer. +! * Continue until the stuff buffer is empty and all added characters +! * have been consumed. + */ +! while (!stuff_empty() || typebuf.tb_len > prev_len) + (void)do_cmdline(NULL, getexline, NULL, DOCMD_NOWAIT|DOCMD_VERBOSE); + + exec_from_reg = save_efr; +*** ../vim-7.2.269/src/version.c 2009-11-03 12:10:39.000000000 +0100 +--- src/version.c 2009-11-03 12:32:47.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 270, + /**/ + +-- +To the optimist, the glass is half full. +To the pessimist, the glass is half empty. +To the engineer, the glass is twice as big as it needs to be. + + /// 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/vim/vim-7.2/7.2.271 b/vim/vim-7.2/7.2.271 new file mode 100644 index 0000000..0742798 --- /dev/null +++ b/vim/vim-7.2/7.2.271 @@ -0,0 +1,92 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.271 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.271 +Problem: Using freed memory in Motif GUI version when making a choice. +Solution: Free memory only after using it. (Dominique Pelle) +Files: src/gui_xmdlg.c + + +*** ../vim-7.2.270/src/gui_xmdlg.c 2009-05-21 23:25:38.000000000 +0200 +--- src/gui_xmdlg.c 2009-10-28 21:56:15.000000000 +0100 +*************** +*** 10,16 **** + /* + * (C) 2001,2005 by Marcin Dalecki + * +! * Implementation of dialogue functions for the Motif GUI variant. + * + * Note about Lesstif: Apparently lesstif doesn't get the widget layout right, + * when using a dynamic scrollbar policy. +--- 10,16 ---- + /* + * (C) 2001,2005 by Marcin Dalecki + * +! * Implementation of dialog functions for the Motif GUI variant. + * + * Note about Lesstif: Apparently lesstif doesn't get the widget layout right, + * when using a dynamic scrollbar policy. +*************** +*** 633,648 **** + data->sel[which] = XtNewString(sel); + else + { +- XtFree(data->sel[which]); + if (!strcmp(data->sel[which], sel)) + { + /* unselecting current selection */ + data->sel[which] = NULL; + if (w) + XmListDeselectItem(w, call_data->item); + } + else + data->sel[which] = XtNewString(sel); + } + XtFree(sel); + +--- 633,651 ---- + data->sel[which] = XtNewString(sel); + else + { + if (!strcmp(data->sel[which], sel)) + { + /* unselecting current selection */ ++ XtFree(data->sel[which]); + data->sel[which] = NULL; + if (w) + XmListDeselectItem(w, call_data->item); + } + else ++ { ++ XtFree(data->sel[which]); + data->sel[which] = XtNewString(sel); ++ } + } + XtFree(sel); + +*** ../vim-7.2.270/src/version.c 2009-11-03 12:38:50.000000000 +0100 +--- src/version.c 2009-11-03 12:48:26.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 271, + /**/ + +-- +ROBIN: (warily) And if you get a question wrong? +ARTHUR: You are cast into the Gorge of Eternal Peril. +ROBIN: Oh ... wacho! + "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/vim/vim-7.2/7.2.272 b/vim/vim-7.2/7.2.272 new file mode 100644 index 0000000..22bebbc --- /dev/null +++ b/vim/vim-7.2/7.2.272 @@ -0,0 +1,82 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.272 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.272 +Problem: "_.svz" is not recognized as a swap file. (David M. Besonen) +Solution: Accept .s[uvw][a-z] as a swap file name extension. +Files: src/memline.c + + +*** ../vim-7.2.271/src/memline.c 2009-04-22 15:56:27.000000000 +0200 +--- src/memline.c 2009-10-29 20:55:08.000000000 +0100 +*************** +*** 864,884 **** + recoverymode = TRUE; + called_from_main = (curbuf->b_ml.ml_mfp == NULL); + attr = hl_attr(HLF_E); +! /* +! * If the file name ends in ".sw?" we use it directly. +! * Otherwise a search is done to find the swap file(s). +! */ + fname = curbuf->b_fname; + if (fname == NULL) /* When there is no file name */ + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && + #if defined(VMS) || defined(RISCOS) +! STRNICMP(fname + len - 4, "_sw" , 3) + #else +! STRNICMP(fname + len - 4, ".sw" , 3) + #endif +! == 0) + { + directly = TRUE; + fname = vim_strsave(fname); /* make a copy for mf_open() */ +--- 864,887 ---- + recoverymode = TRUE; + called_from_main = (curbuf->b_ml.ml_mfp == NULL); + attr = hl_attr(HLF_E); +! +! /* +! * If the file name ends in ".s[uvw][a-z]" we assume this is the swap file. +! * Otherwise a search is done to find the swap file(s). +! */ + fname = curbuf->b_fname; + if (fname == NULL) /* When there is no file name */ + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && + #if defined(VMS) || defined(RISCOS) +! STRNICMP(fname + len - 4, "_s" , 2) + #else +! STRNICMP(fname + len - 4, ".s" , 2) + #endif +! == 0 +! && vim_strchr((char_u *)"UVWuvw", fname[len - 2]) != NULL +! && ASCII_ISALPHA(fname[len - 1])) + { + directly = TRUE; + fname = vim_strsave(fname); /* make a copy for mf_open() */ +*** ../vim-7.2.271/src/version.c 2009-11-03 12:53:44.000000000 +0100 +--- src/version.c 2009-11-03 13:02:51.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 272, + /**/ + +-- +Sorry, no fortune 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/vim/vim-7.2/7.2.273 b/vim/vim-7.2/7.2.273 new file mode 100644 index 0000000..ac00afa --- /dev/null +++ b/vim/vim-7.2/7.2.273 @@ -0,0 +1,130 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.273 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.273 +Problem: Crash with redir to unknown array. (Christian Brabandt) +Solution: Don't assign the redir result when there was an error. +Files: src/eval.c + + +*** ../vim-7.2.272/src/eval.c 2009-09-30 15:15:33.000000000 +0200 +--- src/eval.c 2009-11-03 12:05:07.000000000 +0100 +*************** +*** 988,1000 **** + int err; + typval_T tv; + +! /* Make sure a valid variable name is specified */ + if (!eval_isnamec1(*name)) + { + EMSG(_(e_invarg)); + return FAIL; + } + + redir_varname = vim_strsave(name); + if (redir_varname == NULL) + return FAIL; +--- 988,1001 ---- + int err; + typval_T tv; + +! /* Catch a bad name early. */ + if (!eval_isnamec1(*name)) + { + EMSG(_(e_invarg)); + return FAIL; + } + ++ /* Make a copy of the name, it is used in redir_lval until redir ends. */ + redir_varname = vim_strsave(name); + if (redir_varname == NULL) + return FAIL; +*************** +*** 1019,1024 **** +--- 1020,1026 ---- + EMSG(_(e_trailing)); + else + EMSG(_(e_invarg)); ++ redir_endp = NULL; /* don't store a value, only cleanup */ + var_redir_stop(); + return FAIL; + } +*************** +*** 1037,1042 **** +--- 1039,1045 ---- + did_emsg |= save_emsg; + if (err) + { ++ redir_endp = NULL; /* don't store a value, only cleanup */ + var_redir_stop(); + return FAIL; + } +*************** +*** 1085,1090 **** +--- 1088,1094 ---- + + /* + * Stop redirecting command output to a variable. ++ * Frees the allocated memory. + */ + void + var_redir_stop() +*************** +*** 1093,1106 **** + + if (redir_lval != NULL) + { +! /* Append the trailing NUL. */ +! ga_append(&redir_ga, NUL); + +! /* Assign the text to the variable. */ +! tv.v_type = VAR_STRING; +! tv.vval.v_string = redir_ga.ga_data; +! set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); +! vim_free(tv.vval.v_string); + + clear_lval(redir_lval); + vim_free(redir_lval); +--- 1097,1114 ---- + + if (redir_lval != NULL) + { +! /* If there was no error: assign the text to the variable. */ +! if (redir_endp != NULL) +! { +! ga_append(&redir_ga, NUL); /* Append the trailing NUL. */ +! tv.v_type = VAR_STRING; +! tv.vval.v_string = redir_ga.ga_data; +! set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); +! } + +! /* free the collected output */ +! vim_free(redir_ga.ga_data); +! redir_ga.ga_data = NULL; + + clear_lval(redir_lval); + vim_free(redir_lval); +*** ../vim-7.2.272/src/version.c 2009-11-03 13:06:03.000000000 +0100 +--- src/version.c 2009-11-03 14:24:06.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 273, + /**/ + +-- +Permission is granted to read this message out aloud on Kings Cross Road, +London, under the condition that the orator is properly dressed. + + /// 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/vim/vim-7.2/7.2.274 b/vim/vim-7.2/7.2.274 new file mode 100644 index 0000000..809cedc --- /dev/null +++ b/vim/vim-7.2/7.2.274 @@ -0,0 +1,130 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.274 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.274 +Problem: Syntax folding doesn't work properly when adding a comment. +Solution: Fix it and add a test. (Lech Lorens) +Files: src/fold.c, src/testdir/test45.in, src/testdir/test45.ok + + +*** ../vim-7.2.273/src/fold.c 2009-09-18 15:16:37.000000000 +0200 +--- src/fold.c 2009-11-03 12:36:37.000000000 +0100 +*************** +*** 2256,2261 **** +--- 2256,2295 ---- + } + } + ++ /* ++ * If folding is defined by the syntax, it is possible that a change in ++ * one line will cause all sub-folds of the current fold to change (e.g., ++ * closing a C-style comment can cause folds in the subsequent lines to ++ * appear). To take that into account we should adjust the value of "bot" ++ * to point to the end of the current fold: ++ */ ++ if (foldlevelSyntax == getlevel) ++ { ++ garray_T *gap = &wp->w_folds; ++ fold_T *fp = NULL; ++ int current_fdl = 0; ++ linenr_T fold_start_lnum = 0; ++ linenr_T lnum_rel = fline.lnum; ++ ++ while (current_fdl < fline.lvl) ++ { ++ if (!foldFind(gap, lnum_rel, &fp)) ++ break; ++ ++current_fdl; ++ ++ fold_start_lnum += fp->fd_top; ++ gap = &fp->fd_nested; ++ lnum_rel -= fp->fd_top; ++ } ++ if (fp != NULL && current_fdl == fline.lvl) ++ { ++ linenr_T fold_end_lnum = fold_start_lnum + fp->fd_len; ++ ++ if (fold_end_lnum > bot) ++ bot = fold_end_lnum; ++ } ++ } ++ + start = fline.lnum; + end = bot; + /* Do at least one line. */ +*** ../vim-7.2.273/src/testdir/test45.in 2007-09-25 17:58:43.000000000 +0200 +--- src/testdir/test45.in 2009-11-03 12:22:38.000000000 +0100 +*************** +*** 28,36 **** + k:call append("$", foldlevel(".")) + :" test syntax folding + :set fdm=syntax fdl=0 +! :syn region Hup start="dd" end="hh" fold + Gzk:call append("$", "folding " . getline(".")) + k:call append("$", getline(".")) + :" test expression folding + :fun Flvl() + let l = getline(v:lnum) +--- 28,41 ---- + k:call append("$", foldlevel(".")) + :" test syntax folding + :set fdm=syntax fdl=0 +! :syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3 +! :syn region Fd1 start="ee" end="ff" fold contained +! :syn region Fd2 start="gg" end="hh" fold contained +! :syn region Fd3 start="commentstart" end="commentend" fold contained + Gzk:call append("$", "folding " . getline(".")) + k:call append("$", getline(".")) ++ jAcommentstart Acommentend:set fdl=1 ++ 3j:call append("$", getline(".")) + :" test expression folding + :fun Flvl() + let l = getline(v:lnum) +*** ../vim-7.2.273/src/testdir/test45.ok 2004-06-13 17:47:37.000000000 +0200 +--- src/testdir/test45.ok 2009-11-03 12:22:50.000000000 +0100 +*************** +*** 8,15 **** + 0 + indent 2 + 1 +! folding 8 hh + 3 cc + expr 2 + 1 + 2 +--- 8,16 ---- + 0 + indent 2 + 1 +! folding 9 ii + 3 cc ++ 7 gg + expr 2 + 1 + 2 +*** ../vim-7.2.273/src/version.c 2009-11-03 14:26:29.000000000 +0100 +--- src/version.c 2009-11-03 14:44:21.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 274, + /**/ + +-- +BRIDGEKEEPER: What is your favorite colour? +LAUNCELOT: Blue. +BRIDGEKEEPER: Right. Off you go. + "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/vim/vim-7.2/7.2.275 b/vim/vim-7.2/7.2.275 new file mode 100644 index 0000000..c6c6326 --- /dev/null +++ b/vim/vim-7.2/7.2.275 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.275 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.275 +Problem: Warning for unused argument and comparing signed and unsigned. +Solution: Add type cast. +Files: src/memline.c + + +*** ../vim-7.2.274/src/memline.c 2009-11-03 13:06:03.000000000 +0100 +--- src/memline.c 2009-10-29 20:55:08.000000000 +0100 +*************** +*** 1285,1291 **** + for (i = 0; i < dp->db_line_count; ++i) + { + txt_start = (dp->db_index[i] & DB_INDEX_MASK); +! if (txt_start <= HEADER_SIZE + || txt_start >= (int)dp->db_txt_end) + { + p = (char_u *)"???"; +--- 1285,1291 ---- + for (i = 0; i < dp->db_line_count; ++i) + { + txt_start = (dp->db_index[i] & DB_INDEX_MASK); +! if (txt_start <= (int)HEADER_SIZE + || txt_start >= (int)dp->db_txt_end) + { + p = (char_u *)"???"; +*************** +*** 1296,1302 **** + ml_append(lnum++, p, (colnr_T)0, TRUE); + } + if (has_error) +! ml_append(lnum++, (char_u *)_("???END"), (colnr_T)0, TRUE); + } + } + } +--- 1296,1303 ---- + ml_append(lnum++, p, (colnr_T)0, TRUE); + } + if (has_error) +! ml_append(lnum++, (char_u *)_("???END"), +! (colnr_T)0, TRUE); + } + } + } +*************** +*** 3576,3586 **** + * Make swap file name out of the file name and a directory name. + * Returns pointer to allocated memory or NULL. + */ +- /*ARGSUSED*/ + char_u * + makeswapname(fname, ffname, buf, dir_name) + char_u *fname; +! char_u *ffname; + buf_T *buf; + char_u *dir_name; + { +--- 3577,3586 ---- + * Make swap file name out of the file name and a directory name. + * Returns pointer to allocated memory or NULL. + */ + char_u * + makeswapname(fname, ffname, buf, dir_name) + char_u *fname; +! char_u *ffname UNUSED; + buf_T *buf; + char_u *dir_name; + { +*** ../vim-7.2.274/src/version.c 2009-11-03 14:46:35.000000000 +0100 +--- src/version.c 2009-11-03 15:28:33.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 275, + /**/ + +-- +BRIDGEKEEPER: What is your favorite colour? +GAWAIN: Blue ... No yelloooooww! + "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/vim/vim-7.2/7.2.276 b/vim/vim-7.2/7.2.276 new file mode 100644 index 0000000..15dc68b --- /dev/null +++ b/vim/vim-7.2/7.2.276 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.276 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.276 +Problem: Crash when setting 'isprint' to a small bullet. (Raul Coronado) +Solution: Check for the character to be < 256. Also make it possible to + specify a range of multi-byte characters. (Lech Lorens) +Files: src/charset.c + + +*** ../vim-7.2.275/src/charset.c 2009-10-07 16:19:52.000000000 +0200 +--- src/charset.c 2009-11-03 12:46:12.000000000 +0100 +*************** +*** 187,195 **** + if (VIM_ISDIGIT(*p)) + c2 = getdigits(&p); + else + c2 = *p++; + } +! if (c <= 0 || (c2 < c && c2 != -1) || c2 >= 256 + || !(*p == NUL || *p == ',')) + return FAIL; + +--- 187,200 ---- + if (VIM_ISDIGIT(*p)) + c2 = getdigits(&p); + else ++ #ifdef FEAT_MBYTE ++ if (has_mbyte) ++ c2 = mb_ptr2char_adv(&p); ++ else ++ #endif + c2 = *p++; + } +! if (c <= 0 || c >= 256 || (c2 < c && c2 != -1) || c2 >= 256 + || !(*p == NUL || *p == ',')) + return FAIL; + +*** ../vim-7.2.275/src/version.c 2009-11-03 15:32:58.000000000 +0100 +--- src/version.c 2009-11-03 16:03:18.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 276, + /**/ + +-- +BRIDGEKEEPER: What is your favorite editor? +GAWAIN: Emacs ... No, Viiiiiiiiiiimmmmmmm! + "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE 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/vim/vim-7.2/7.2.277 b/vim/vim-7.2/7.2.277 new file mode 100644 index 0000000..ed3caf4 --- /dev/null +++ b/vim/vim-7.2/7.2.277 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.277 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.277 +Problem: CTRL-Y in a diff'ed window may move the cursor outside of the + window. (Lech Lorens) +Solution: Limit the number of filler lines to the height of the window. + Don't reset filler lines to zero for an empty buffer. +Files: src/move.c + + +*** ../vim-7.2.276/src/move.c 2009-05-15 21:31:11.000000000 +0200 +--- src/move.c 2009-11-03 14:39:55.000000000 +0100 +*************** +*** 183,191 **** + if (curwin->w_topline != 1) + redraw_later(NOT_VALID); + curwin->w_topline = 1; +- #ifdef FEAT_DIFF +- curwin->w_topfill = 0; +- #endif + curwin->w_botline = 2; + curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP; + #ifdef FEAT_SCROLLBIND +--- 183,188 ---- +*************** +*** 1257,1263 **** + while (line_count-- > 0) + { + #ifdef FEAT_DIFF +! if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)) + { + ++curwin->w_topfill; + ++done; +--- 1254,1261 ---- + while (line_count-- > 0) + { + #ifdef FEAT_DIFF +! if (curwin->w_topfill < diff_check(curwin, curwin->w_topline) +! && curwin->w_topfill < curwin->w_height - 1) + { + ++curwin->w_topfill; + ++done; +*** ../vim-7.2.276/src/version.c 2009-11-03 16:03:59.000000000 +0100 +--- src/version.c 2009-11-03 16:22:04.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 277, + /**/ + +-- +SIGFUN -- signature too funny (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/vim/vim-7.2/7.2.278 b/vim/vim-7.2/7.2.278 new file mode 100644 index 0000000..edf4e58 --- /dev/null +++ b/vim/vim-7.2/7.2.278 @@ -0,0 +1,74 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.278 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.278 +Problem: Using magic number in the folding code. +Solution: Use the defined MAX_LEVEL. +Files: src/fold.c + + +*** ../vim-7.2.277/src/fold.c 2009-11-03 14:46:35.000000000 +0100 +--- src/fold.c 2009-11-03 12:36:37.000000000 +0100 +*************** +*** 1932,1938 **** + #ifdef FEAT_EVAL + if (*wp->w_p_fdt != NUL) + { +! char_u dashes[51]; + win_T *save_curwin; + int level; + char_u *p; +--- 1932,1938 ---- + #ifdef FEAT_EVAL + if (*wp->w_p_fdt != NUL) + { +! char_u dashes[MAX_LEVEL + 2]; + win_T *save_curwin; + int level; + char_u *p; +*************** +*** 1944,1951 **** + /* Set "v:folddashes" to a string of "level" dashes. */ + /* Set "v:foldlevel" to "level". */ + level = foldinfo->fi_level; +! if (level > 50) +! level = 50; + vim_memset(dashes, '-', (size_t)level); + dashes[level] = NUL; + set_vim_var_string(VV_FOLDDASHES, dashes, -1); +--- 1944,1951 ---- + /* Set "v:folddashes" to a string of "level" dashes. */ + /* Set "v:foldlevel" to "level". */ + level = foldinfo->fi_level; +! if (level > (int)sizeof(dashes) - 1) +! level = (int)sizeof(dashes) - 1; + vim_memset(dashes, '-', (size_t)level); + dashes[level] = NUL; + set_vim_var_string(VV_FOLDDASHES, dashes, -1); +*** ../vim-7.2.277/src/version.c 2009-11-03 16:22:59.000000000 +0100 +--- src/version.c 2009-11-03 16:29:08.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 278, + /**/ + +-- +BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow? +ARTHUR: What do you mean? An African or European swallow? +BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh! + BRIDGEKEEPER is cast into the gorge. + "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/vim/vim-7.2/7.2.279 b/vim/vim-7.2/7.2.279 new file mode 100644 index 0000000..bdf58fc --- /dev/null +++ b/vim/vim-7.2/7.2.279 @@ -0,0 +1,120 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.279 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.279 +Problem: Invalid memory read with visual mode "r". (Dominique Pelle) +Solution: Make sure the cursor position is valid. Don't check the cursor + position but the position being used. And make sure we get the + right line. +Files: src/misc2.c, src/ops.c + + +*** ../vim-7.2.278/src/misc2.c 2009-05-16 21:06:36.000000000 +0200 +--- src/misc2.c 2009-11-03 16:43:10.000000000 +0100 +*************** +*** 156,162 **** + || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL) + #endif + ; +! line = ml_get_curline(); + + if (wcol >= MAXCOL) + { +--- 156,162 ---- + || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL) + #endif + ; +! line = ml_get_buf(curbuf, pos->lnum, FALSE); + + if (wcol >= MAXCOL) + { +*************** +*** 332,340 **** + #endif + + #ifdef FEAT_MBYTE +! /* prevent cursor from moving on the trail byte */ + if (has_mbyte) +! mb_adjust_cursor(); + #endif + + if (col < wcol) +--- 332,340 ---- + #endif + + #ifdef FEAT_MBYTE +! /* prevent from moving onto a trail byte */ + if (has_mbyte) +! mb_adjustpos(pos); + #endif + + if (col < wcol) +*** ../vim-7.2.278/src/ops.c 2009-09-30 15:15:33.000000000 +0200 +--- src/ops.c 2009-11-03 15:18:50.000000000 +0100 +*************** +*** 2020,2025 **** +--- 2020,2026 ---- + bd.is_MAX = (curwin->w_curswant == MAXCOL); + for ( ; curwin->w_cursor.lnum <= oap->end.lnum; ++curwin->w_cursor.lnum) + { ++ curwin->w_cursor.col = 0; /* make sure cursor position is valid */ + block_prep(oap, &bd, curwin->w_cursor.lnum, TRUE); + if (bd.textlen == 0 && (!virtual_op || bd.is_MAX)) + continue; /* nothing to replace */ +*************** +*** 2035,2040 **** +--- 2036,2042 ---- + { + pos_T vpos; + ++ vpos.lnum = curwin->w_cursor.lnum; + getvpos(&vpos, oap->start_vcol); + bd.startspaces += vpos.coladd; + n = bd.startspaces; +*************** +*** 2693,2703 **** + * initial coladd offset as part of "startspaces" */ + if (bd.is_short) + { +! linenr_T lnum = curwin->w_cursor.lnum; +! +! curwin->w_cursor.lnum = linenr; + (void)getvpos(&vpos, oap->start_vcol); +- curwin->w_cursor.lnum = lnum; + } + else + vpos.coladd = 0; +--- 2695,2702 ---- + * initial coladd offset as part of "startspaces" */ + if (bd.is_short) + { +! vpos.lnum = linenr; + (void)getvpos(&vpos, oap->start_vcol); + } + else + vpos.coladd = 0; +*** ../vim-7.2.278/src/version.c 2009-11-03 16:29:48.000000000 +0100 +--- src/version.c 2009-11-03 16:41:53.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 279, + /**/ + +-- +BEDEVERE: How do you know so much about swallows? +ARTHUR: Well you have to know these things when you're a king, you know. + "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/vim/vim-7.2/7.2.280 b/vim/vim-7.2/7.2.280 new file mode 100644 index 0000000..6223ac4 --- /dev/null +++ b/vim/vim-7.2/7.2.280 @@ -0,0 +1,251 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.280 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.280 +Problem: A redraw in a custom statusline with %! may cause a crash. + (Yukihiro Nakadaira) +Solution: Make a copy of 'statusline'. Also fix typo in function name + redraw_custum_statusline. (party by Dominique Pelle) +Files: src/screen.c + + +*** ../vim-7.2.279/src/screen.c 2009-07-29 16:13:35.000000000 +0200 +--- src/screen.c 2009-11-03 17:13:16.000000000 +0100 +*************** +*** 132,138 **** + static void draw_vsep_win __ARGS((win_T *wp, int row)); + #endif + #ifdef FEAT_STL_OPT +! static void redraw_custum_statusline __ARGS((win_T *wp)); + #endif + #ifdef FEAT_SEARCH_EXTRA + #define SEARCH_HL_PRIORITY 0 +--- 132,138 ---- + static void draw_vsep_win __ARGS((win_T *wp, int row)); + #endif + #ifdef FEAT_STL_OPT +! static void redraw_custom_statusline __ARGS((win_T *wp)); + #endif + #ifdef FEAT_SEARCH_EXTRA + #define SEARCH_HL_PRIORITY 0 +*************** +*** 5772,5778 **** + else if (*p_stl != NUL || *wp->w_p_stl != NUL) + { + /* redraw custom status line */ +! redraw_custum_statusline(wp); + } + #endif + else +--- 5794,5800 ---- + else if (*p_stl != NUL || *wp->w_p_stl != NUL) + { + /* redraw custom status line */ +! redraw_custom_statusline(wp); + } + #endif + else +*************** +*** 5897,5914 **** + * errors encountered. + */ + static void +! redraw_custum_statusline(wp) + win_T *wp; + { +! int save_called_emsg = called_emsg; + + called_emsg = FALSE; + win_redr_custom(wp, FALSE); + if (called_emsg) + set_string_option_direct((char_u *)"statusline", -1, + (char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL + ? OPT_LOCAL : OPT_GLOBAL), SID_ERROR); + called_emsg |= save_called_emsg; + } + #endif + +--- 5919,5949 ---- + * errors encountered. + */ + static void +! redraw_custom_statusline(wp) + win_T *wp; + { +! static int entered = FALSE; +! int save_called_emsg = called_emsg; +! +! /* When called recursively return. This can happen when the statusline +! * contains an expression that triggers a redraw. */ +! if (entered) +! return; +! entered = TRUE; + + called_emsg = FALSE; + win_redr_custom(wp, FALSE); + if (called_emsg) ++ { ++ /* When there is an error disable the statusline, otherwise the ++ * display is messed up with errors and a redraw triggers the problem ++ * again and again. */ + set_string_option_direct((char_u *)"statusline", -1, + (char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL + ? OPT_LOCAL : OPT_GLOBAL), SID_ERROR); ++ } + called_emsg |= save_called_emsg; ++ entered = FALSE; + } + #endif + +*************** +*** 6016,6021 **** +--- 6051,6057 ---- + int len; + int fillchar; + char_u buf[MAXPATHL]; ++ char_u *stl; + char_u *p; + struct stl_hlrec hltab[STL_MAX_ITEM]; + struct stl_hlrec tabtab[STL_MAX_ITEM]; +*************** +*** 6025,6031 **** + if (wp == NULL) + { + /* Use 'tabline'. Always at the first line of the screen. */ +! p = p_tal; + row = 0; + fillchar = ' '; + attr = hl_attr(HLF_TPF); +--- 6061,6067 ---- + if (wp == NULL) + { + /* Use 'tabline'. Always at the first line of the screen. */ +! stl = p_tal; + row = 0; + fillchar = ' '; + attr = hl_attr(HLF_TPF); +*************** +*** 6042,6058 **** + + if (draw_ruler) + { +! p = p_ruf; + /* advance past any leading group spec - implicit in ru_col */ +! if (*p == '%') + { +! if (*++p == '-') +! p++; +! if (atoi((char *) p)) +! while (VIM_ISDIGIT(*p)) +! p++; +! if (*p++ != '(') +! p = p_ruf; + } + #ifdef FEAT_VERTSPLIT + col = ru_col - (Columns - W_WIDTH(wp)); +--- 6078,6094 ---- + + if (draw_ruler) + { +! stl = p_ruf; + /* advance past any leading group spec - implicit in ru_col */ +! if (*stl == '%') + { +! if (*++stl == '-') +! stl++; +! if (atoi((char *)stl)) +! while (VIM_ISDIGIT(*stl)) +! stl++; +! if (*stl++ != '(') +! stl = p_ruf; + } + #ifdef FEAT_VERTSPLIT + col = ru_col - (Columns - W_WIDTH(wp)); +*************** +*** 6081,6089 **** + else + { + if (*wp->w_p_stl != NUL) +! p = wp->w_p_stl; + else +! p = p_stl; + # ifdef FEAT_EVAL + use_sandbox = was_set_insecurely((char_u *)"statusline", + *wp->w_p_stl == NUL ? 0 : OPT_LOCAL); +--- 6117,6125 ---- + else + { + if (*wp->w_p_stl != NUL) +! stl = wp->w_p_stl; + else +! stl = p_stl; + # ifdef FEAT_EVAL + use_sandbox = was_set_insecurely((char_u *)"statusline", + *wp->w_p_stl == NUL ? 0 : OPT_LOCAL); +*************** +*** 6098,6107 **** + if (maxwidth <= 0) + return; + + width = build_stl_str_hl(wp == NULL ? curwin : wp, + buf, sizeof(buf), +! p, use_sandbox, + fillchar, maxwidth, hltab, tabtab); + len = (int)STRLEN(buf); + + while (width < maxwidth && len < (int)sizeof(buf) - 1) +--- 6134,6147 ---- + if (maxwidth <= 0) + return; + ++ /* Make a copy, because the statusline may include a function call that ++ * might change the option value and free the memory. */ ++ stl = vim_strsave(stl); + width = build_stl_str_hl(wp == NULL ? curwin : wp, + buf, sizeof(buf), +! stl, use_sandbox, + fillchar, maxwidth, hltab, tabtab); ++ vim_free(stl); + len = (int)STRLEN(buf); + + while (width < maxwidth && len < (int)sizeof(buf) - 1) +*************** +*** 9465,9471 **** + #if defined(FEAT_STL_OPT) && defined(FEAT_WINDOWS) + if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height) + { +! redraw_custum_statusline(curwin); + } + else + #endif +--- 9505,9511 ---- + #if defined(FEAT_STL_OPT) && defined(FEAT_WINDOWS) + if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height) + { +! redraw_custom_statusline(curwin); + } + else + #endif +*** ../vim-7.2.279/src/version.c 2009-11-03 16:44:04.000000000 +0100 +--- src/version.c 2009-11-03 17:15:35.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 280, + /**/ + +-- +Every exit is an entrance into something else. + + /// 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/vim/vim-7.2/7.2.281 b/vim/vim-7.2/7.2.281 new file mode 100644 index 0000000..f73d7a5 --- /dev/null +++ b/vim/vim-7.2/7.2.281 @@ -0,0 +1,81 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.281 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.281 +Problem: 'cursorcolumn' highlighting is wrong in diff mode. +Solution: Adjust the column computation. (Lech Lorens) +Files: src/screen.c + + +*** ../vim-7.2.280/src/screen.c 2009-11-03 17:20:18.000000000 +0100 +--- src/screen.c 2009-11-03 17:13:16.000000000 +0100 +*************** +*** 3008,3018 **** + mb_ptr_adv(ptr); + } + +! #ifdef FEAT_VIRTUALEDIT +! /* When 'virtualedit' is set the end of the line may be before the +! * start of the displayed part. */ +! if (vcol < v && *ptr == NUL && virtual_active()) + vcol = v; + #endif + + /* Handle a character that's not completely on the screen: Put ptr at +--- 3008,3040 ---- + mb_ptr_adv(ptr); + } + +! #if defined(FEAT_SYN_HL) || defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL) +! /* When: +! * - 'cuc' is set, or +! * - 'virtualedit' is set, or +! * - the visual mode is active, +! * the end of the line may be before the start of the displayed part. +! */ +! if (vcol < v && ( +! # ifdef FEAT_SYN_HL +! wp->w_p_cuc +! # if defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL) +! || +! # endif +! # endif +! # ifdef FEAT_VIRTUALEDIT +! virtual_active() +! # ifdef FEAT_VISUAL +! || +! # endif +! # endif +! # ifdef FEAT_VISUAL +! (VIsual_active && wp->w_buffer == curwin->w_buffer) +! # endif +! )) +! { + vcol = v; ++ } + #endif + + /* Handle a character that's not completely on the screen: Put ptr at +*** ../vim-7.2.280/src/version.c 2009-11-03 17:20:18.000000000 +0100 +--- src/version.c 2009-11-03 17:34:54.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 281, + /**/ + +-- +Every person is responsible for the choices he makes. + + /// 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/vim/vim-7.2/7.2.282 b/vim/vim-7.2/7.2.282 new file mode 100644 index 0000000..dd4dc64 --- /dev/null +++ b/vim/vim-7.2/7.2.282 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.282 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.282 +Problem: A fold can't be closed. +Solution: Initialize fd_small to MAYBE. (Lech Lorens) +Files: src/fold.c + + +*** ../vim-7.2.281/src/fold.c 2009-11-03 16:29:48.000000000 +0100 +--- src/fold.c 2009-11-03 17:41:50.000000000 +0100 +*************** +*** 2851,2856 **** +--- 2851,2858 ---- + fp[1].fd_top = bot + 1; + fp[1].fd_len = fp->fd_len - (fp[1].fd_top - fp->fd_top); + fp[1].fd_flags = fp->fd_flags; ++ fp[1].fd_small = MAYBE; ++ fp->fd_small = MAYBE; + + /* Move nested folds below bot to new fold. There can't be + * any between top and bot, they have been removed by the caller. */ +*** ../vim-7.2.281/src/version.c 2009-11-03 17:36:09.000000000 +0100 +--- src/version.c 2009-11-03 17:59:12.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 282, + /**/ + +-- +You can be stopped by the police for biking over 65 miles per hour. +You are not allowed to walk across a street on your hands. + [real standing laws in Connecticut, 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/vim/vim-7.2/7.2.283 b/vim/vim-7.2/7.2.283 new file mode 100644 index 0000000..0d6f605 --- /dev/null +++ b/vim/vim-7.2/7.2.283 @@ -0,0 +1,73 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.283 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.283 +Problem: Changing font while the window is maximized doesn't keep the + window maximized. +Solution: Recompute number of lines and columns after changing font. (James + Vega) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.2.282/src/gui_gtk_x11.c 2009-09-23 18:14:13.000000000 +0200 +--- src/gui_gtk_x11.c 2009-11-03 17:56:27.000000000 +0100 +*************** +*** 5267,5274 **** + # endif + #endif /* !HAVE_GTK2 */ + +! /* Preserve the logical dimensions of the screen. */ +! update_window_manager_hints(0, 0); + + return OK; + } +--- 5267,5290 ---- + # endif + #endif /* !HAVE_GTK2 */ + +! #ifdef HAVE_GTK2 +! if (gui_mch_maximized()) +! { +! int w, h; +! +! /* Update lines and columns in accordance with the new font, keep the +! * window maximized. */ +! gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h); +! w -= get_menu_tool_width(); +! h -= get_menu_tool_height(); +! gui_resize_shell(w, h); +! } +! else +! #endif +! { +! /* Preserve the logical dimensions of the screen. */ +! update_window_manager_hints(0, 0); +! } + + return OK; + } +*** ../vim-7.2.282/src/version.c 2009-11-03 18:04:26.000000000 +0100 +--- src/version.c 2009-11-03 18:11:53.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 283, + /**/ + +-- +If an elephant is left tied to a parking meter, the parking fee has to be paid +just as it would for a vehicle. + [real standing law in Florida, 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/vim/vim-7.2/7.2.284 b/vim/vim-7.2/7.2.284 new file mode 100644 index 0000000..5b4336b --- /dev/null +++ b/vim/vim-7.2/7.2.284 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.284 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.284 +Problem: When editing the same buffer in two windows, one with folding, + display may be wrong after changes. +Solution: Call set_topline() to take care of side effects. (Lech Lorens) +Files: src/misc1.c + + +*** ../vim-7.2.283/src/misc1.c 2009-07-22 11:03:38.000000000 +0200 +--- src/misc1.c 2009-11-03 18:38:15.000000000 +0100 +*************** +*** 2886,2891 **** +--- 2886,2898 ---- + } + #endif + } ++ ++ #ifdef FEAT_FOLDING ++ /* Take care of side effects for setting w_topline when folds have ++ * changed. Esp. when the buffer was changed in another window. */ ++ if (hasAnyFolding(wp)) ++ set_topline(wp, wp->w_topline); ++ #endif + } + } + +*** ../vim-7.2.283/src/version.c 2009-11-03 18:13:36.000000000 +0100 +--- src/version.c 2009-11-03 18:44:12.000000000 +0100 +*************** +*** 678,679 **** +--- 678,681 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 284, + /**/ + +-- +Men may not be seen publicly in any kind of strapless gown. + [real standing law in Florida, 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/vim/vim-7.2/7.2.285 b/vim/vim-7.2/7.2.285 new file mode 100644 index 0000000..2a34e17 --- /dev/null +++ b/vim/vim-7.2/7.2.285 @@ -0,0 +1,56 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.285 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.285 (after 7.2.169) +Problem: CTRL-U in Insert mode also deletes indent. (Andrey Voropaev) +Solution: Fix mistake made in patch 7.2.169. +Files: src/edit.c + + +*** ../vim-7.2.284/src/edit.c 2009-07-09 18:15:19.000000000 +0200 +--- src/edit.c 2009-11-05 20:25:15.000000000 +0100 +*************** +*** 8519,8525 **** + { + save_col = curwin->w_cursor.col; + beginline(BL_WHITE); +! if (curwin->w_cursor.col < (colnr_T)temp) + mincol = curwin->w_cursor.col; + curwin->w_cursor.col = save_col; + } +--- 8519,8525 ---- + { + save_col = curwin->w_cursor.col; + beginline(BL_WHITE); +! if (curwin->w_cursor.col < save_col) + mincol = curwin->w_cursor.col; + curwin->w_cursor.col = save_col; + } +*** ../vim-7.2.284/src/version.c 2009-11-03 18:46:53.000000000 +0100 +--- src/version.c 2009-11-11 13:21:25.000000000 +0100 +*************** +*** 678,679 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 285, + /**/ + +-- +(letter from Mark to Mike, about the film's probable certificate) + I would like to get back to the Censor and agree to lose the shits, take + the odd Jesus Christ out and lose Oh fuck off, but to retain 'fart in + your general direction', 'castanets of your testicles' and 'oral sex' + and ask him for an 'A' rating on that basis. + "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/vim/vim-7.2/7.2.286 b/vim/vim-7.2/7.2.286 new file mode 100644 index 0000000..7577502 --- /dev/null +++ b/vim/vim-7.2/7.2.286 @@ -0,0 +1,227 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.286 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.286 (after 7.2.269) +Problem: The "--startuptime=" argument is not consistent with other + arguments. +Solution: Use "--startuptime ". Added the +startuptime feature. +Files: runtime/doc/eval.txt, runtime/doc/starting.txt, + runtime/doc/various.txt, src/eval.c, src/main.c, src/version.c + + +*** ../vim-7.2.285/runtime/doc/eval.txt 2009-04-22 12:53:31.000000000 +0200 +--- runtime/doc/eval.txt 2009-11-11 13:01:58.000000000 +0100 +*************** +*** 5869,5874 **** +--- 5881,5887 ---- + signs Compiled with |:sign| support. + smartindent Compiled with 'smartindent' support. + sniff Compiled with SNiFF interface support. ++ startuptime Compiled with |--startuptime| support. + statusline Compiled with support for 'statusline', 'rulerformat' + and special formats of 'titlestring' and 'iconstring'. + sun_workshop Compiled with support for Sun |workshop|. +*** ../vim-7.2.285/runtime/doc/starting.txt 2009-11-03 12:10:39.000000000 +0100 +--- runtime/doc/starting.txt 2009-11-11 13:20:56.000000000 +0100 +*************** +*** 144,155 **** + -u NORC no yes + --noplugin yes no + +! --startuptime={fname} *--startuptime* + During startup write timing messages to the file {fname}. + This can be used to find out where time is spent while loading +! your .vimrc and plugins. + When {fname} already exists new messages are appended. +! {only when compiled with this feature} + + *--literal* + --literal Take file names literally, don't expand wildcards. Not needed +--- 144,156 ---- + -u NORC no yes + --noplugin yes no + +! --startuptime {fname} *--startuptime* + During startup write timing messages to the file {fname}. + This can be used to find out where time is spent while loading +! your .vimrc, plugins and opening the first file. + When {fname} already exists new messages are appended. +! (Only available when compiled with the |+startuptime| +! feature). + + *--literal* + --literal Take file names literally, don't expand wildcards. Not needed +*** ../vim-7.2.285/runtime/doc/various.txt 2009-07-09 15:55:34.000000000 +0200 +--- runtime/doc/various.txt 2009-11-11 13:03:52.000000000 +0100 +*************** +*** 374,379 **** +--- 374,380 ---- + B *+signs* |:sign| + N *+smartindent* |'smartindent'| + m *+sniff* SniFF interface |sniff| ++ N *+startuptime* |--startuptime| argument + N *+statusline* Options 'statusline', 'rulerformat' and special + formats of 'titlestring' and 'iconstring' + m *+sun_workshop* |workshop| +*** ../vim-7.2.285/src/eval.c 2009-11-03 14:26:29.000000000 +0100 +--- src/eval.c 2009-11-11 12:59:53.000000000 +0100 +*************** +*** 11736,11741 **** +--- 11736,11744 ---- + #ifdef FEAT_SNIFF + "sniff", + #endif ++ #ifdef STARTUPTIME ++ "startuptime", ++ #endif + #ifdef FEAT_STL_OPT + "statusline", + #endif +*** ../vim-7.2.285/src/main.c 2009-11-03 12:10:39.000000000 +0100 +--- src/main.c 2009-11-08 12:57:46.000000000 +0100 +*************** +*** 204,212 **** + #ifdef STARTUPTIME + for (i = 1; i < argc; ++i) + { +! if (STRNICMP(argv[i], "--startuptime=", 14) == 0) + { +! time_fd = mch_fopen(argv[i] + 14, "a"); + TIME_MSG("--- VIM STARTING ---"); + break; + } +--- 204,212 ---- + #ifdef STARTUPTIME + for (i = 1; i < argc; ++i) + { +! if (STRICMP(argv[i], "--startuptime") == 0 && i + 1 < argc) + { +! time_fd = mch_fopen(argv[i + 1], "a"); + TIME_MSG("--- VIM STARTING ---"); + break; + } +*************** +*** 1726,1731 **** +--- 1726,1736 ---- + want_argument = TRUE; + argv_idx += 3; + } ++ else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) ++ { ++ want_argument = TRUE; ++ argv_idx += 11; ++ } + #ifdef FEAT_CLIENTSERVER + else if (STRNICMP(argv[0] + argv_idx, "serverlist", 10) == 0) + ; /* already processed -- no arg */ +*************** +*** 1761,1770 **** + /* already processed, skip */ + } + #endif +- else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) +- { +- /* already processed, skip */ +- } + else + { + if (argv[0][argv_idx]) +--- 1766,1771 ---- +*************** +*** 2061,2067 **** + mainerr(ME_GARBAGE, (char_u *)argv[0]); + + --argc; +! if (argc < 1 && c != 'S') + mainerr_arg_missing((char_u *)argv[0]); + ++argv; + argv_idx = -1; +--- 2062,2068 ---- + mainerr(ME_GARBAGE, (char_u *)argv[0]); + + --argc; +! if (argc < 1 && c != 'S') /* -S has an optional argument */ + mainerr_arg_missing((char_u *)argv[0]); + ++argv; + argv_idx = -1; +*************** +*** 2102,2112 **** + (char_u *)argv[0]; + break; + +! case '-': /* "--cmd {command}" execute command */ +! if (parmp->n_pre_commands >= MAX_ARG_CMDS) +! mainerr(ME_EXTRA_CMD, NULL); +! parmp->pre_commands[parmp->n_pre_commands++] = + (char_u *)argv[0]; + break; + + /* case 'd': -d {device} is handled in mch_check_win() for the +--- 2103,2118 ---- + (char_u *)argv[0]; + break; + +! case '-': +! if (argv[-1][2] == 'c') +! { +! /* "--cmd {command}" execute command */ +! if (parmp->n_pre_commands >= MAX_ARG_CMDS) +! mainerr(ME_EXTRA_CMD, NULL); +! parmp->pre_commands[parmp->n_pre_commands++] = + (char_u *)argv[0]; ++ } ++ /* "--startuptime " already handled */ + break; + + /* case 'd': -d {device} is handled in mch_check_win() for the +*************** +*** 3144,3149 **** +--- 3150,3158 ---- + main_msg(_("--serverlist\t\tList available Vim server names and exit")); + main_msg(_("--servername \tSend to/become the Vim server ")); + #endif ++ #ifdef STARTUPTIME ++ main_msg(_("--startuptime=\tWrite startup timing messages to ")); ++ #endif + #ifdef FEAT_VIMINFO + main_msg(_("-i \t\tUse instead of .viminfo")); + #endif +*** ../vim-7.2.285/src/version.c 2009-11-11 13:22:09.000000000 +0100 +--- src/version.c 2009-11-11 14:17:28.000000000 +0100 +*************** +*** 494,499 **** +--- 494,504 ---- + #else + "-sniff", + #endif ++ #ifdef STARTUPTIME ++ "+startuptime", ++ #else ++ "-startuptime", ++ #endif + #ifdef FEAT_STL_OPT + "+statusline", + #else +*** ../vim-7.2.285/src/version.c 2009-11-11 13:22:09.000000000 +0100 +--- src/version.c 2009-11-11 14:17:28.000000000 +0100 +*************** +*** 678,679 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 286, + /**/ + +-- +A fool must search for a greater fool to find admiration. + + /// 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/vim/vim-7.2/7.2.287 b/vim/vim-7.2/7.2.287 new file mode 100644 index 0000000..0f8e170 --- /dev/null +++ b/vim/vim-7.2/7.2.287 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.287 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.287 +Problem: Warning from gcc 3.4 about uninitialized variable. +Solution: Move assignment outside of #ifdef. +Files: src/if_perl.xs + + +*** ../vim-7.2.286/src/if_perl.xs 2009-07-14 16:05:14.000000000 +0200 +--- src/if_perl.xs 2009-11-11 12:29:32.000000000 +0100 +*************** +*** 720,727 **** + #ifdef HAVE_SANDBOX + if (sandbox) + { + # ifndef MAKE_TEST /* avoid a warning for unreachable code */ +! if ((safe = perl_get_sv( "VIM::safe", FALSE )) == NULL || !SvTRUE(safe)) + EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); + else + # endif +--- 720,728 ---- + #ifdef HAVE_SANDBOX + if (sandbox) + { ++ safe = perl_get_sv( "VIM::safe", FALSE ); + # ifndef MAKE_TEST /* avoid a warning for unreachable code */ +! if (safe == NULL || !SvTRUE(safe)) + EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); + else + # endif +*** ../vim-7.2.286/src/version.c 2009-11-11 14:21:48.000000000 +0100 +--- src/version.c 2009-11-11 14:44:49.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 287, + /**/ + +-- +The most powerful force in the universe is gossip. + + /// 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/vim/vim-7.2/7.2.288 b/vim/vim-7.2/7.2.288 new file mode 100644 index 0000000..ab9ecda --- /dev/null +++ b/vim/vim-7.2/7.2.288 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.288 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.288 +Problem: Python 2.6 pyconfig.h redefines macros. +Solution: Undefine the macros before including pyconfig.h. +Files: src/if_python.c + + +*** ../vim-7.2.287/src/if_python.c 2009-11-03 11:43:05.000000000 +0100 +--- src/if_python.c 2009-11-11 12:33:37.000000000 +0100 +*************** +*** 37,42 **** +--- 37,48 ---- + #ifdef HAVE_STDARG_H + # undef HAVE_STDARG_H /* Python's config.h defines it as well. */ + #endif ++ #ifdef _POSIX_C_SOURCE ++ # undef _POSIX_C_SOURCE /* pyconfig.h defines it as well. */ ++ #endif ++ #ifdef _XOPEN_SOURCE ++ # undef _XOPEN_SOURCE /* pyconfig.h defines it as well. */ ++ #endif + + #define PY_SSIZE_T_CLEAN + +*** ../vim-7.2.287/src/version.c 2009-11-11 14:45:36.000000000 +0100 +--- src/version.c 2009-11-11 15:05:51.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 288, + /**/ + +-- +I am always surprised in the Linux world how quickly solutions can be +obtained. (Imagine sending an email to Bill Gates, asking why Windows +crashed, and how to fix it... and then getting an answer that fixed the +problem... <0>_<0> !) -- Mark Langdon + + /// 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/vim/vim-7.2/7.2.289 b/vim/vim-7.2/7.2.289 new file mode 100644 index 0000000..4009bb9 --- /dev/null +++ b/vim/vim-7.2/7.2.289 @@ -0,0 +1,120 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.289 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.289 +Problem: Checking wrong struct member. +Solution: Change tb_buf to tb_noremap. (Dominique Pelle) +Files: src/getchar.c + + +*** ../vim-7.2.288/src/getchar.c 2009-09-30 15:15:33.000000000 +0200 +--- src/getchar.c 2009-11-11 12:50:58.000000000 +0100 +*************** +*** 22,28 **** + * These buffers are used for storing: + * - stuffed characters: A command that is translated into another command. + * - redo characters: will redo the last change. +! * - recorded chracters: for the "q" command. + * + * The bytes are stored like in the typeahead buffer: + * - K_SPECIAL introduces a special key (two more bytes follow). A literal +--- 22,28 ---- + * These buffers are used for storing: + * - stuffed characters: A command that is translated into another command. + * - redo characters: will redo the last change. +! * - recorded characters: for the "q" command. + * + * The bytes are stored like in the typeahead buffer: + * - K_SPECIAL introduces a special key (two more bytes follow). A literal +*************** +*** 1283,1289 **** + EMSG2(_(e_intern2), "Free typebuf 1"); + else + vim_free(typebuf.tb_buf); +! if (typebuf.tb_buf == noremapbuf_init) + EMSG2(_(e_intern2), "Free typebuf 2"); + else + vim_free(typebuf.tb_noremap); +--- 1283,1289 ---- + EMSG2(_(e_intern2), "Free typebuf 1"); + else + vim_free(typebuf.tb_buf); +! if (typebuf.tb_noremap == noremapbuf_init) + EMSG2(_(e_intern2), "Free typebuf 2"); + else + vim_free(typebuf.tb_noremap); +*************** +*** 1516,1522 **** + * wanted. + * This translates escaped K_SPECIAL and CSI bytes to a K_SPECIAL or CSI byte. + * Collects the bytes of a multibyte character into the whole character. +! * Returns the modifers in the global "mod_mask". + */ + int + vgetc() +--- 1516,1522 ---- + * wanted. + * This translates escaped K_SPECIAL and CSI bytes to a K_SPECIAL or CSI byte. + * Collects the bytes of a multibyte character into the whole character. +! * Returns the modifiers in the global "mod_mask". + */ + int + vgetc() +*************** +*** 3320,3326 **** + retval = 1; + goto theend; + } +! /* An abbrevation cannot contain white space. */ + for (n = 0; n < len; ++n) + if (vim_iswhite(keys[n])) + { +--- 3320,3326 ---- + retval = 1; + goto theend; + } +! /* An abbreviation cannot contain white space. */ + for (n = 0; n < len; ++n) + if (vim_iswhite(keys[n])) + { +*************** +*** 4272,4278 **** + + /* + * Check for word before the cursor: If it ends in a keyword char all +! * chars before it must be al keyword chars or non-keyword chars, but not + * white space. If it ends in a non-keyword char we accept any characters + * before it except white space. + */ +--- 4272,4278 ---- + + /* + * Check for word before the cursor: If it ends in a keyword char all +! * chars before it must be keyword chars or non-keyword chars, but not + * white space. If it ends in a non-keyword char we accept any characters + * before it except white space. + */ +*** ../vim-7.2.288/src/version.c 2009-11-11 15:06:59.000000000 +0100 +--- src/version.c 2009-11-11 16:19:12.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 289, + /**/ + +-- +A M00se once bit my sister ... + "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/vim/vim-7.2/7.2.290 b/vim/vim-7.2/7.2.290 new file mode 100644 index 0000000..ba4fd62 --- /dev/null +++ b/vim/vim-7.2/7.2.290 @@ -0,0 +1,157 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.290 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.290 +Problem: Not freeing memory from ":lmap", ":xmap" and ":menutranslate". +Solution: Free the memory when exiting. (Dominique Pelle) +Files: src/misc2.c + + +*** ../vim-7.2.289/src/misc2.c 2009-11-03 16:44:04.000000000 +0100 +--- src/misc2.c 2009-11-11 16:49:13.000000000 +0100 +*************** +*** 1005,1013 **** +--- 1005,1018 ---- + # ifdef FEAT_MENU + /* Clear menus. */ + do_cmdline_cmd((char_u *)"aunmenu *"); ++ # ifdef FEAT_MULTI_LANG ++ do_cmdline_cmd((char_u *)"menutranslate clear"); ++ # endif + # endif + + /* Clear mappings, abbreviations, breakpoints. */ ++ do_cmdline_cmd((char_u *)"lmapclear"); ++ do_cmdline_cmd((char_u *)"xmapclear"); + do_cmdline_cmd((char_u *)"mapclear"); + do_cmdline_cmd((char_u *)"mapclear!"); + do_cmdline_cmd((char_u *)"abclear"); +*************** +*** 1282,1288 **** + + /* + * Escape "string" for use as a shell argument with system(). +! * This uses single quotes, except when we know we need to use double qoutes + * (MS-DOS and MS-Windows without 'shellslash' set). + * Escape a newline, depending on the 'shell' option. + * When "do_special" is TRUE also replace "!", "%", "#" and things starting +--- 1287,1293 ---- + + /* + * Escape "string" for use as a shell argument with system(). +! * This uses single quotes, except when we know we need to use double quotes + * (MS-DOS and MS-Windows without 'shellslash' set). + * Escape a newline, depending on the 'shell' option. + * When "do_special" is TRUE also replace "!", "%", "#" and things starting +*************** +*** 1537,1543 **** + #if defined(FEAT_VISUALEXTRA) || defined(PROTO) + /* + * Copy a character a number of times. +! * Does not work for multi-byte charactes! + */ + void + copy_chars(ptr, count, c) +--- 1542,1548 ---- + #if defined(FEAT_VISUALEXTRA) || defined(PROTO) + /* + * Copy a character a number of times. +! * Does not work for multi-byte characters! + */ + void + copy_chars(ptr, count, c) +*************** +*** 4260,4266 **** + * or '**76' is transposed to '**N'( 'N' is ASCII value 76). + * For EBCDIC you get different character values. + * If no restrict is given after '**' the default is used. +! * Due to this technic the path looks awful if you print it as a + * string. + */ + len = 0; +--- 4265,4271 ---- + * or '**76' is transposed to '**N'( 'N' is ASCII value 76). + * For EBCDIC you get different character values. + * If no restrict is given after '**' the default is used. +! * Due to this technique the path looks awful if you print it as a + * string. + */ + len = 0; +*************** +*** 4649,4655 **** + && !mch_isdir(stackp->ffs_filearray[i])) + continue; /* not a directory */ + +! /* prepare the filename to be checked for existance + * below */ + STRCPY(file_path, stackp->ffs_filearray[i]); + add_pathsep(file_path); +--- 4654,4660 ---- + && !mch_isdir(stackp->ffs_filearray[i])) + continue; /* not a directory */ + +! /* prepare the filename to be checked for existence + * below */ + STRCPY(file_path, stackp->ffs_filearray[i]); + add_pathsep(file_path); +*************** +*** 5438,5444 **** + #if defined(MSWIN) || defined(MSDOS) || defined(OS2) + /* handle "\tmp" as absolute path */ + || vim_ispathsep(ff_file_to_find[0]) +! /* handle "c:name" as absulute path */ + || (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':') + #endif + #ifdef AMIGA +--- 5443,5449 ---- + #if defined(MSWIN) || defined(MSDOS) || defined(OS2) + /* handle "\tmp" as absolute path */ + || vim_ispathsep(ff_file_to_find[0]) +! /* handle "c:name" as absolute path */ + || (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':') + #endif + #ifdef AMIGA +*************** +*** 5681,5687 **** + p2 = (char_u *)base + (j + gap) * elm_size; + if ((*cmp)((void *)p1, (void *)p2) <= 0) + break; +! /* Exchange the elemets. */ + mch_memmove(buf, p1, elm_size); + mch_memmove(p1, p2, elm_size); + mch_memmove(p2, buf, elm_size); +--- 5686,5692 ---- + p2 = (char_u *)base + (j + gap) * elm_size; + if ((*cmp)((void *)p1, (void *)p2) <= 0) + break; +! /* Exchange the elements. */ + mch_memmove(buf, p1, elm_size); + mch_memmove(p1, p2, elm_size); + mch_memmove(p2, buf, elm_size); +*** ../vim-7.2.289/src/version.c 2009-11-11 16:23:37.000000000 +0100 +--- src/version.c 2009-11-11 16:54:53.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 290, + /**/ + +-- +ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot. + King of all Britons, defeator of the Saxons, sovereign of all England! + [Pause] +SOLDIER: Get away! + "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/vim/vim-7.2/7.2.291 b/vim/vim-7.2/7.2.291 new file mode 100644 index 0000000..bab6e3b --- /dev/null +++ b/vim/vim-7.2/7.2.291 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.291 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.291 +Problem: Reading uninitialised memory in arabic mode. +Solution: Use utfc_ptr2char_len() rather than utfc_ptr2char(). (Dominique + Pelle) +Files: src/screen.c + + +*** ../vim-7.2.290/src/screen.c 2009-11-03 17:36:09.000000000 +0100 +--- src/screen.c 2009-11-11 17:04:53.000000000 +0100 +*************** +*** 6413,6419 **** + } + else + { +! nc = utfc_ptr2char(ptr + mbyte_blen, pcc); + nc1 = pcc[0]; + } + pc = prev_c; +--- 6413,6420 ---- + } + else + { +! nc = utfc_ptr2char_len(ptr + mbyte_blen, pcc, +! (int)((text + len) - ptr - mbyte_blen)); + nc1 = pcc[0]; + } + pc = prev_c; +*** ../vim-7.2.290/src/version.c 2009-11-11 16:56:13.000000000 +0100 +--- src/version.c 2009-11-11 17:06:48.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 291, + /**/ + +-- +The problem with political jokes is that they get elected. + + /// 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/vim/vim-7.2/7.2.292 b/vim/vim-7.2/7.2.292 new file mode 100644 index 0000000..c576190 --- /dev/null +++ b/vim/vim-7.2/7.2.292 @@ -0,0 +1,55 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.292 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.292 +Problem: Block right-shift doesn't work properly with multi-byte encoding + and 'list' set. +Solution: Add the missing "else". (Lech Lorens) +Files: src/ops.c + + +*** ../vim-7.2.291/src/ops.c 2009-11-03 16:44:04.000000000 +0100 +--- src/ops.c 2009-11-11 17:15:04.000000000 +0100 +*************** +*** 422,429 **** + #ifdef FEAT_MBYTE + if (has_mbyte) + bd.textstart += (*mb_ptr2len)(bd.textstart); + #endif +! ++bd.textstart; + } + for ( ; vim_iswhite(*bd.textstart); ) + { +--- 422,430 ---- + #ifdef FEAT_MBYTE + if (has_mbyte) + bd.textstart += (*mb_ptr2len)(bd.textstart); ++ else + #endif +! ++bd.textstart; + } + for ( ; vim_iswhite(*bd.textstart); ) + { +*** ../vim-7.2.291/src/version.c 2009-11-11 17:07:25.000000000 +0100 +--- src/version.c 2009-11-11 17:21:31.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 292, + /**/ + +-- +Computers make very fast, very accurate, mistakes. + + /// 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/vim/vim-7.2/7.2.293 b/vim/vim-7.2/7.2.293 new file mode 100644 index 0000000..0f41435 --- /dev/null +++ b/vim/vim-7.2/7.2.293 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.293 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.293 +Problem: When setting 'comments' option it may be used in a wrong way. +Solution: Don't increment after skipping over digets. (Yukihiro Nakadaira) +Files: src/misc1.c + + +*** ../vim-7.2.292/src/misc1.c 2009-11-03 18:46:53.000000000 +0100 +--- src/misc1.c 2009-11-11 17:27:38.000000000 +0100 +*************** +*** 1026,1037 **** + int c = 0; + int off = 0; + +! for (p = lead_flags; *p && *p != ':'; ++p) + { + if (*p == COM_RIGHT || *p == COM_LEFT) +! c = *p; + else if (VIM_ISDIGIT(*p) || *p == '-') + off = getdigits(&p); + } + if (c == COM_RIGHT) /* right adjusted leader */ + { +--- 1026,1039 ---- + int c = 0; + int off = 0; + +! for (p = lead_flags; *p != NUL && *p != ':'; ) + { + if (*p == COM_RIGHT || *p == COM_LEFT) +! c = *p++; + else if (VIM_ISDIGIT(*p) || *p == '-') + off = getdigits(&p); ++ else ++ ++p; + } + if (c == COM_RIGHT) /* right adjusted leader */ + { +*** ../vim-7.2.292/src/version.c 2009-11-11 17:22:30.000000000 +0100 +--- src/version.c 2009-11-11 17:29:24.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 293, + /**/ + +-- +SOLDIER: What? Ridden on a horse? +ARTHUR: Yes! +SOLDIER: You're using coconuts! + "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/vim/vim-7.2/7.2.294 b/vim/vim-7.2/7.2.294 new file mode 100644 index 0000000..fef1e6b --- /dev/null +++ b/vim/vim-7.2/7.2.294 @@ -0,0 +1,285 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.294 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.294 +Problem: When using TEMPDIRS dir name could get too long. +Solution: Overwrite tail instead of appending each time. Use mkdtemp() when + available. (James Vega) +Files: src/auto/configure, src/config.h.in, src/configure.in, src/fileio.c + + +*** ../vim-7.2.293/src/auto/configure 2009-09-11 13:44:33.000000000 +0200 +--- src/auto/configure 2009-11-17 12:03:15.000000000 +0100 +*************** +*** 14019,14027 **** + + + + for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ +! memset nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ +--- 14019,14028 ---- + + + ++ + for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ +! memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ +*** ../vim-7.2.293/src/config.h.in 2009-05-21 23:25:38.000000000 +0200 +--- src/config.h.in 2009-11-11 17:40:21.000000000 +0100 +*************** +*** 157,162 **** +--- 157,163 ---- + #undef HAVE_LSTAT + #undef HAVE_MEMCMP + #undef HAVE_MEMSET ++ #undef HAVE_MKDTEMP + #undef HAVE_NANOSLEEP + #undef HAVE_OPENDIR + #undef HAVE_FLOAT_FUNCS +*** ../vim-7.2.293/src/configure.in 2009-09-11 13:44:33.000000000 +0200 +--- src/configure.in 2009-11-11 17:40:21.000000000 +0100 +*************** +*** 2635,2641 **** + dnl Check for functions in one big call, to reduce the size of configure + AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ +! memset nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ +--- 2635,2641 ---- + dnl Check for functions in one big call, to reduce the size of configure + AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \ + getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ +! memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ + setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ + sigvec strcasecmp strerror strftime stricmp strncasecmp \ + strnicmp strpbrk strtol tgetent towlower towupper iswupper \ +*** ../vim-7.2.293/src/fileio.c 2009-09-11 17:24:01.000000000 +0200 +--- src/fileio.c 2009-11-11 18:01:22.000000000 +0100 +*************** +*** 146,151 **** +--- 146,152 ---- + # endif + #endif + static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf)); ++ static void vim_settempdir __ARGS((char_u *tempdir)); + #ifdef FEAT_AUTOCMD + static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name"); + #endif +*************** +*** 6987,6992 **** +--- 6988,7020 ---- + #endif + + /* ++ * Directory "tempdir" was created. Expand this name to a full path and put ++ * it in "vim_tempdir". This avoids that using ":cd" would confuse us. ++ * "tempdir" must be no longer than MAXPATHL. ++ */ ++ static void ++ vim_settempdir(tempdir) ++ char_u *tempdir; ++ { ++ char_u *buf; ++ ++ buf = alloc((unsigned)MAXPATHL + 2); ++ if (buf != NULL) ++ { ++ if (vim_FullName(tempdir, buf, MAXPATHL, FALSE) == FAIL) ++ STRCPY(buf, tempdir); ++ # ifdef __EMX__ ++ if (vim_strchr(buf, '/') != NULL) ++ STRCAT(buf, "/"); ++ else ++ # endif ++ add_pathsep(buf); ++ vim_tempdir = vim_strsave(buf); ++ vim_free(buf); ++ } ++ } ++ ++ /* + * vim_tempname(): Return a unique name that can be used for a temp file. + * + * The temp file is NOT created. +*************** +*** 7007,7014 **** + #ifdef TEMPDIRNAMES + static char *(tempdirs[]) = {TEMPDIRNAMES}; + int i; +- long nr; +- long off; + # ifndef EEXIST + struct stat st; + # endif +--- 7035,7040 ---- +*************** +*** 7027,7032 **** +--- 7053,7064 ---- + */ + for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i) + { ++ size_t itmplen; ++ # ifndef HAVE_MKDTEMP ++ long nr; ++ long off; ++ # endif ++ + /* expand $TMP, leave room for "/v1100000/999999999" */ + expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20); + if (mch_isdir(itmp)) /* directory exists */ +*************** +*** 7040,7046 **** +--- 7072,7085 ---- + else + # endif + add_pathsep(itmp); ++ itmplen = STRLEN(itmp); + ++ # ifdef HAVE_MKDTEMP ++ /* Leave room for filename */ ++ STRCAT(itmp, "vXXXXXX"); ++ if (mkdtemp((char *)itmp) != NULL) ++ vim_settempdir(itmp); ++ # else + /* Get an arbitrary number of up to 6 digits. When it's + * unlikely that it already exists it will be faster, + * otherwise it doesn't matter. The use of mkdir() avoids any +*************** +*** 7052,7110 **** + for (off = 0; off < 10000L; ++off) + { + int r; +! #if defined(UNIX) || defined(VMS) + mode_t umask_save; +! #endif + +! sprintf((char *)itmp + STRLEN(itmp), "v%ld", nr + off); +! # ifndef EEXIST + /* If mkdir() does not set errno to EEXIST, check for + * existing file here. There is a race condition then, + * although it's fail-safe. */ + if (mch_stat((char *)itmp, &st) >= 0) + continue; +! # endif +! #if defined(UNIX) || defined(VMS) + /* Make sure the umask doesn't remove the executable bit. + * "repl" has been reported to use "177". */ + umask_save = umask(077); +! #endif + r = vim_mkdir(itmp, 0700); +! #if defined(UNIX) || defined(VMS) + (void)umask(umask_save); +! #endif + if (r == 0) + { +! char_u *buf; +! +! /* Directory was created, use this name. +! * Expand to full path; When using the current +! * directory a ":cd" would confuse us. */ +! buf = alloc((unsigned)MAXPATHL + 1); +! if (buf != NULL) +! { +! if (vim_FullName(itmp, buf, MAXPATHL, FALSE) +! == FAIL) +! STRCPY(buf, itmp); +! # ifdef __EMX__ +! if (vim_strchr(buf, '/') != NULL) +! STRCAT(buf, "/"); +! else +! # endif +! add_pathsep(buf); +! vim_tempdir = vim_strsave(buf); +! vim_free(buf); +! } + break; + } +! # ifdef EEXIST + /* If the mkdir() didn't fail because the file/dir exists, + * we probably can't create any dir here, try another + * place. */ + if (errno != EEXIST) +! # endif + break; + } + if (vim_tempdir != NULL) + break; + } +--- 7091,7131 ---- + for (off = 0; off < 10000L; ++off) + { + int r; +! # if defined(UNIX) || defined(VMS) + mode_t umask_save; +! # endif + +! sprintf((char *)itmp + itmplen, "v%ld", nr + off); +! # ifndef EEXIST + /* If mkdir() does not set errno to EEXIST, check for + * existing file here. There is a race condition then, + * although it's fail-safe. */ + if (mch_stat((char *)itmp, &st) >= 0) + continue; +! # endif +! # if defined(UNIX) || defined(VMS) + /* Make sure the umask doesn't remove the executable bit. + * "repl" has been reported to use "177". */ + umask_save = umask(077); +! # endif + r = vim_mkdir(itmp, 0700); +! # if defined(UNIX) || defined(VMS) + (void)umask(umask_save); +! # endif + if (r == 0) + { +! vim_settempdir(itmp); + break; + } +! # ifdef EEXIST + /* If the mkdir() didn't fail because the file/dir exists, + * we probably can't create any dir here, try another + * place. */ + if (errno != EEXIST) +! # endif + break; + } ++ # endif /* HAVE_MKDTEMP */ + if (vim_tempdir != NULL) + break; + } +*** ../vim-7.2.293/src/version.c 2009-11-11 17:30:05.000000000 +0100 +--- src/version.c 2009-11-17 11:54:49.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 294, + /**/ + +-- +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/vim/vim-7.2/7.2.295 b/vim/vim-7.2/7.2.295 new file mode 100644 index 0000000..331498f --- /dev/null +++ b/vim/vim-7.2/7.2.295 @@ -0,0 +1,142 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.295 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.295 +Problem: When using map() on a List the index is not known. +Solution: Set v:key to the index. (Hari Krishna Dara) +Files: runtime/doc/eval.txt, src/eval.c + + +*** ../vim-7.2.294/runtime/doc/eval.txt 2009-11-11 14:21:48.000000000 +0100 +--- runtime/doc/eval.txt 2009-11-11 18:22:54.000000000 +0100 +*************** +*** 3802,3808 **** + Replace each item in {expr} with the result of evaluating + {string}. + Inside {string} |v:val| has the value of the current item. +! For a |Dictionary| |v:key| has the key of the current item. + Example: > + :call map(mylist, '"> " . v:val . " <"') + < This puts "> " before and " <" after each item in "mylist". +--- 3812,3819 ---- + Replace each item in {expr} with the result of evaluating + {string}. + Inside {string} |v:val| has the value of the current item. +! For a |Dictionary| |v:key| has the key of the current item +! and for a |List| |v:key| has the index of the current item. + Example: > + :call map(mylist, '"> " . v:val . " <"') + < This puts "> " before and " <" after each item in "mylist". +*** ../vim-7.2.294/src/eval.c 2009-11-11 14:21:48.000000000 +0100 +--- src/eval.c 2009-11-11 18:22:49.000000000 +0100 +*************** +*** 9928,9933 **** +--- 9928,9934 ---- + int todo; + char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()"; + int save_did_emsg; ++ int index = 0; + + if (argvars[0].v_type == VAR_LIST) + { +*************** +*** 9961,9969 **** + save_did_emsg = did_emsg; + did_emsg = FALSE; + + if (argvars[0].v_type == VAR_DICT) + { +- prepare_vimvar(VV_KEY, &save_key); + vimvars[VV_KEY].vv_type = VAR_STRING; + + ht = &d->dv_hashtab; +--- 9962,9970 ---- + save_did_emsg = did_emsg; + did_emsg = FALSE; + ++ prepare_vimvar(VV_KEY, &save_key); + if (argvars[0].v_type == VAR_DICT) + { + vimvars[VV_KEY].vv_type = VAR_STRING; + + ht = &d->dv_hashtab; +*************** +*** 9987,10010 **** + } + } + hash_unlock(ht); +- +- restore_vimvar(VV_KEY, &save_key); + } + else + { + for (li = l->lv_first; li != NULL; li = nli) + { + if (tv_check_lock(li->li_tv.v_lock, ermsg)) + break; + nli = li->li_next; + if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL + || did_emsg) + break; + if (!map && rem) + listitem_remove(l, li); + } + } + + restore_vimvar(VV_VAL, &save_val); + + did_emsg |= save_did_emsg; +--- 9988,10014 ---- + } + } + hash_unlock(ht); + } + else + { ++ vimvars[VV_KEY].vv_type = VAR_NUMBER; ++ + for (li = l->lv_first; li != NULL; li = nli) + { + if (tv_check_lock(li->li_tv.v_lock, ermsg)) + break; + nli = li->li_next; ++ vimvars[VV_KEY].vv_nr = index; + if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL + || did_emsg) + break; + if (!map && rem) + listitem_remove(l, li); ++ ++index; + } + } + ++ restore_vimvar(VV_KEY, &save_key); + restore_vimvar(VV_VAL, &save_val); + + did_emsg |= save_did_emsg; +*** ../vim-7.2.294/src/version.c 2009-11-17 12:08:48.000000000 +0100 +--- src/version.c 2009-11-17 12:18:08.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 295, + /**/ + +-- +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/vim/vim-7.2/7.2.296 b/vim/vim-7.2/7.2.296 new file mode 100644 index 0000000..5fc3cb3 --- /dev/null +++ b/vim/vim-7.2/7.2.296 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.296 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.296 +Problem: Help message about startuptime is wrong. (Dominique Pelle) +Solution: Remove the equal sign. +Files: src/main.c + + +*** ../vim-7.2.295/src/main.c 2009-11-11 14:21:48.000000000 +0100 +--- src/main.c 2009-11-11 22:51:04.000000000 +0100 +*************** +*** 3151,3157 **** + main_msg(_("--servername \tSend to/become the Vim server ")); + #endif + #ifdef STARTUPTIME +! main_msg(_("--startuptime=\tWrite startup timing messages to ")); + #endif + #ifdef FEAT_VIMINFO + main_msg(_("-i \t\tUse instead of .viminfo")); +--- 3151,3157 ---- + main_msg(_("--servername \tSend to/become the Vim server ")); + #endif + #ifdef STARTUPTIME +! main_msg(_("--startuptime \tWrite startup timing messages to ")); + #endif + #ifdef FEAT_VIMINFO + main_msg(_("-i \t\tUse instead of .viminfo")); +*** ../vim-7.2.295/src/version.c 2009-11-17 12:20:30.000000000 +0100 +--- src/version.c 2009-11-17 12:30:29.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 296, + /**/ + +-- +BLACK KNIGHT: I'm invincible! +ARTHUR: You're a looney. + "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/vim/vim-7.2/7.2.297 b/vim/vim-7.2/7.2.297 new file mode 100644 index 0000000..cc8d789 --- /dev/null +++ b/vim/vim-7.2/7.2.297 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.297 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.297 +Problem: Reading freed memory when writing ":reg" output to a register. + (Dominique Pelle) +Solution: Skip the register being written to. +Files: src/ops.c + + +*** ../vim-7.2.296/src/ops.c 2009-11-11 17:22:30.000000000 +0100 +--- src/ops.c 2009-11-11 19:30:47.000000000 +0100 +*************** +*** 3991,3996 **** +--- 3991,4004 ---- + } + else + yb = &(y_regs[i]); ++ ++ #ifdef FEAT_EVAL ++ if (name == MB_TOLOWER(redir_reg) ++ || (redir_reg == '"' && yb == y_previous)) ++ continue; /* do not list register being written to, the ++ * pointer can be freed */ ++ #endif ++ + if (yb->y_array != NULL) + { + msg_putchar('\n'); +*************** +*** 6090,6096 **** + long maxlen; + #endif + +! if (y_ptr->y_array == NULL) /* NULL means emtpy register */ + y_ptr->y_size = 0; + + /* +--- 6098,6104 ---- + long maxlen; + #endif + +! if (y_ptr->y_array == NULL) /* NULL means empty register */ + y_ptr->y_size = 0; + + /* +*** ../vim-7.2.296/src/version.c 2009-11-17 12:31:30.000000000 +0100 +--- src/version.c 2009-11-17 12:42:28.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 297, + /**/ + +-- +"Beware of bugs in the above code; I have only proved +it correct, not tried it." -- Donald Knuth + + /// 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/vim/vim-7.2/7.2.298 b/vim/vim-7.2/7.2.298 new file mode 100644 index 0000000..0aabd7a --- /dev/null +++ b/vim/vim-7.2/7.2.298 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.298 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.298 +Problem: ":vimgrep" crashes when there is an autocommand that sets a + window-local variable. +Solution: Initialize the w: hashtab for re-use. (Yukihiro Nakadaira) +Files: src/fileio.c + + +*** ../vim-7.2.297/src/fileio.c 2009-11-17 12:08:48.000000000 +0100 +--- src/fileio.c 2009-11-17 13:22:06.000000000 +0100 +*************** +*** 8597,8602 **** +--- 8605,8611 ---- + curwin = firstwin; + # ifdef FEAT_EVAL + vars_clear(&aucmd_win->w_vars.dv_hashtab); /* free all w: variables */ ++ hash_init(&aucmd_win->w_vars.dv_hashtab); /* re-use the hashtab */ + # endif + #else + curwin = aco->save_curwin; +*** ../vim-7.2.297/src/version.c 2009-11-17 12:43:19.000000000 +0100 +--- src/version.c 2009-11-17 14:56:19.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 298, + /**/ + +-- +Eye have a spelling checker, it came with my PC; +It plainly marks four my revue mistakes I cannot sea. +I've run this poem threw it, I'm sure your please to no, +It's letter perfect in it's weigh, my checker tolled me sew! + + /// 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/vim/vim-7.2/7.2.299 b/vim/vim-7.2/7.2.299 new file mode 100644 index 0000000..88f9e70 --- /dev/null +++ b/vim/vim-7.2/7.2.299 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.299 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.299 +Problem: Crash when comment middle is longer than start. +Solution: Fix size computation. (Lech Lorens) +Files: src/misc1.c + + +*** ../vim-7.2.298/src/misc1.c 2009-11-11 17:30:05.000000000 +0100 +--- src/misc1.c 2009-11-17 15:59:28.000000000 +0100 +*************** +*** 1121,1127 **** + if (i != lead_repl_len) + { + mch_memmove(p + lead_repl_len, p + i, +! (size_t)(lead_len - i - (leader - p))); + lead_len += lead_repl_len - i; + } + } +--- 1121,1127 ---- + if (i != lead_repl_len) + { + mch_memmove(p + lead_repl_len, p + i, +! (size_t)(lead_len - i - (p - leader))); + lead_len += lead_repl_len - i; + } + } +*** ../vim-7.2.298/src/version.c 2009-11-17 14:57:19.000000000 +0100 +--- src/version.c 2009-11-17 16:01:07.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 299, + /**/ + +-- +BLACK KNIGHT: The Black Knight always triumphs. Have at you! + ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright. +BLACK KNIGHT: All right, we'll call it a draw. + "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/vim/vim-7.2/7.2.300 b/vim/vim-7.2/7.2.300 new file mode 100644 index 0000000..f88035e --- /dev/null +++ b/vim/vim-7.2/7.2.300 @@ -0,0 +1,201 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.300 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.300 +Problem: Vim doesn't close file descriptors when forking and executing + another command, e.g., ":shell". +Solution: Use FD_CLOEXEC when available. (James Vega) +Files: src/auto/configure, src/config.h.in, src/configure.in, + src/ex_cmdds2.c, src/fileio.c, src/memfile.c, src/memline.c + + +*** ../vim-7.2.299/src/auto/configure 2009-11-17 12:08:48.000000000 +0100 +--- src/auto/configure 2009-11-17 13:09:03.000000000 +0100 +*************** +*** 15174,15179 **** +--- 15174,15231 ---- + $as_echo "yes" >&6; } + fi + ++ { $as_echo "$as_me:$LINENO: checking for FD_CLOEXEC" >&5 ++ $as_echo_n "checking for FD_CLOEXEC... " >&6; } ++ cat >conftest.$ac_ext <<_ACEOF ++ /* confdefs.h. */ ++ _ACEOF ++ cat confdefs.h >>conftest.$ac_ext ++ cat >>conftest.$ac_ext <<_ACEOF ++ /* end confdefs.h. */ ++ #if HAVE_FCNTL_H ++ # include ++ #endif ++ int ++ main () ++ { ++ int flag = FD_CLOEXEC; ++ ; ++ 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 ++ { $as_echo "$as_me:$LINENO: result: yes" >&5 ++ $as_echo "yes" >&6; }; cat >>confdefs.h <<\_ACEOF ++ #define HAVE_FD_CLOEXEC 1 ++ _ACEOF ++ ++ else ++ $as_echo "$as_me: failed program was:" >&5 ++ sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ { $as_echo "$as_me:$LINENO: result: not usable" >&5 ++ $as_echo "not usable" >&6; } ++ fi ++ ++ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + { $as_echo "$as_me:$LINENO: checking for rename" >&5 + $as_echo_n "checking for rename... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +*** ../vim-7.2.299/src/config.h.in 2009-11-17 12:08:48.000000000 +0100 +--- src/config.h.in 2009-11-17 13:01:36.000000000 +0100 +*************** +*** 388,390 **** +--- 388,393 ---- + + /* Define if you want XSMP interaction as well as vanilla swapfile safety */ + #undef USE_XSMP_INTERACT ++ ++ /* Define if fcntl()'s F_SETFD command knows about FD_CLOEXEC */ ++ #undef HAVE_FD_CLOEXEC +*** ../vim-7.2.299/src/configure.in 2009-11-17 12:08:48.000000000 +0100 +--- src/configure.in 2009-11-17 13:01:36.000000000 +0100 +*************** +*** 2855,2860 **** +--- 2855,2870 ---- + AC_MSG_RESULT(yes) + fi + ++ dnl make sure the FD_CLOEXEC flag for fcntl()'s F_SETFD command is known ++ AC_MSG_CHECKING(for FD_CLOEXEC) ++ AC_TRY_COMPILE( ++ [#if HAVE_FCNTL_H ++ # include ++ #endif], ++ [ int flag = FD_CLOEXEC;], ++ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FD_CLOEXEC), ++ AC_MSG_RESULT(not usable)) ++ + dnl rename needs to be checked separately to work on Nextstep with cc + AC_MSG_CHECKING(for rename) + AC_TRY_LINK([#include ], [rename("this", "that")], +*** ../vim-7.2.299/src/fileio.c 2009-11-17 14:57:19.000000000 +0100 +--- src/fileio.c 2009-11-17 13:22:06.000000000 +0100 +*************** +*** 2254,2259 **** +--- 2254,2267 ---- + + if (!read_buffer && !read_stdin) + close(fd); /* errors are ignored */ ++ #ifdef HAVE_FD_CLOEXEC ++ else ++ { ++ int fdflags = fcntl(fd, F_GETFD); ++ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) ++ fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC); ++ } ++ #endif + vim_free(buffer); + + #ifdef HAVE_DUP +*** ../vim-7.2.299/src/memfile.c 2008-07-13 19:39:39.000000000 +0200 +--- src/memfile.c 2009-11-17 13:22:15.000000000 +0100 +*************** +*** 1343,1348 **** +--- 1343,1353 ---- + } + else + { ++ #ifdef HAVE_FD_CLOEXEC ++ int fdflags = fcntl(mfp->mf_fd, F_GETFD); ++ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) ++ fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC); ++ #endif + #ifdef HAVE_SELINUX + mch_copy_sec(fname, mfp->mf_fname); + #endif +*** ../vim-7.2.299/src/memline.c 2009-11-03 15:32:58.000000000 +0100 +--- src/memline.c 2009-11-17 13:21:40.000000000 +0100 +*************** +*** 382,388 **** + dp->db_index[0] = --dp->db_txt_start; /* at end of block */ + dp->db_free -= 1 + INDEX_SIZE; + dp->db_line_count = 1; +! *((char_u *)dp + dp->db_txt_start) = NUL; /* emtpy line */ + + return OK; + +--- 382,388 ---- + dp->db_index[0] = --dp->db_txt_start; /* at end of block */ + dp->db_free -= 1 + INDEX_SIZE; + dp->db_line_count = 1; +! *((char_u *)dp + dp->db_txt_start) = NUL; /* empty line */ + + return OK; + +*************** +*** 490,495 **** +--- 490,502 ---- + EMSG(_("E301: Oops, lost the swap file!!!")); + return; + } ++ #ifdef HAVE_FD_CLOEXEC ++ { ++ int fdflags = fcntl(mfp->mf_fd, F_GETFD); ++ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) ++ fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC); ++ } ++ #endif + } + if (!success) + EMSG(_("E302: Could not rename swap file")); +*** ../vim-7.2.299/src/version.c 2009-11-17 16:08:12.000000000 +0100 +--- src/version.c 2009-11-17 17:09:43.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 300, + /**/ + +-- + | + +Ceci n'est pas une pipe. + + /// 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/vim/vim-7.2/7.2.301 b/vim/vim-7.2/7.2.301 new file mode 100644 index 0000000..e63cc08 --- /dev/null +++ b/vim/vim-7.2/7.2.301 @@ -0,0 +1,777 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.301 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +NOTE: some mail and patch programs may have a problem with the non-ASCII +characters in this patch. You can fetch the patch from +ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.301 and/or fetch the updated +files from CVS. http://www.vim.org/cvs.php + + +Patch 7.2.301 +Problem: Formatting is wrong when 'tw' is set to a small value. +Solution: Fix it and add tests. Also fix behavior of "1" in 'fo'. (Yukihiro + Nakadaira) +Files: src/edit.c, src/testdir/Makefile, src/testdir/test68.in, + src/testdir/test68.ok, src/testdir/test69.in, + src/testdir/test69.ok + + +*** ../vim-7.2.300/src/edit.c 2009-11-11 13:22:32.000000000 +0100 +--- src/edit.c 2009-11-17 15:34:47.000000000 +0100 +*************** +*** 181,187 **** + static void ins_ctrl_v __ARGS((void)); + static void undisplay_dollar __ARGS((void)); + static void insert_special __ARGS((int, int, int)); +! static void internal_format __ARGS((int textwidth, int second_indent, int flags, int format_only)); + static void check_auto_format __ARGS((int)); + static void redo_literal __ARGS((int c)); + static void start_arrow __ARGS((pos_T *end_insert_pos)); +--- 181,187 ---- + static void ins_ctrl_v __ARGS((void)); + static void undisplay_dollar __ARGS((void)); + static void insert_special __ARGS((int, int, int)); +! static void internal_format __ARGS((int textwidth, int second_indent, int flags, int format_only, int c)); + static void check_auto_format __ARGS((int)); + static void redo_literal __ARGS((int c)); + static void start_arrow __ARGS((pos_T *end_insert_pos)); +*************** +*** 2164,2170 **** + int i, c; + int actual_len; /* Take multi-byte characters */ + int actual_compl_length; /* into account. */ +! int *wca; /* Wide character array. */ + int has_lower = FALSE; + int was_letter = FALSE; + +--- 2164,2170 ---- + int i, c; + int actual_len; /* Take multi-byte characters */ + int actual_compl_length; /* into account. */ +! int *wca; /* Wide character array. */ + int has_lower = FALSE; + int was_letter = FALSE; + +*************** +*** 5558,5564 **** + } + if (do_internal) + #endif +! internal_format(textwidth, second_indent, flags, c == NUL); + } + + if (c == NUL) /* only formatting was wanted */ +--- 5558,5564 ---- + } + if (do_internal) + #endif +! internal_format(textwidth, second_indent, flags, c == NUL, c); + } + + if (c == NUL) /* only formatting was wanted */ +*************** +*** 5738,5748 **** + * Format text at the current insert position. + */ + static void +! internal_format(textwidth, second_indent, flags, format_only) + int textwidth; + int second_indent; + int flags; + int format_only; + { + int cc; + int save_char = NUL; +--- 5738,5749 ---- + * Format text at the current insert position. + */ + static void +! internal_format(textwidth, second_indent, flags, format_only, c) + int textwidth; + int second_indent; + int flags; + int format_only; ++ int c; /* character to be inserted (can be NUL) */ + { + int cc; + int save_char = NUL; +*************** +*** 5763,5769 **** + * When 'ai' is off we don't want a space under the cursor to be + * deleted. Replace it with an 'x' temporarily. + */ +! if (!curbuf->b_p_ai) + { + cc = gchar_cursor(); + if (vim_iswhite(cc)) +--- 5764,5774 ---- + * When 'ai' is off we don't want a space under the cursor to be + * deleted. Replace it with an 'x' temporarily. + */ +! if (!curbuf->b_p_ai +! #ifdef FEAT_VREPLACE +! && !(State & VREPLACE_FLAG) +! #endif +! ) + { + cc = gchar_cursor(); + if (vim_iswhite(cc)) +*************** +*** 5789,5797 **** + char_u *saved_text = NULL; + #endif + colnr_T col; + +! virtcol = get_nolist_virtcol(); +! if (virtcol < (colnr_T)textwidth) + break; + + #ifdef FEAT_COMMENTS +--- 5794,5804 ---- + char_u *saved_text = NULL; + #endif + colnr_T col; ++ colnr_T end_col; + +! virtcol = get_nolist_virtcol() +! + char2cells(c != NUL ? c : gchar_cursor()); +! if (virtcol <= (colnr_T)textwidth) + break; + + #ifdef FEAT_COMMENTS +*************** +*** 5831,5842 **** + coladvance((colnr_T)textwidth); + wantcol = curwin->w_cursor.col; + +! curwin->w_cursor.col = startcol - 1; +! #ifdef FEAT_MBYTE +! /* Correct cursor for multi-byte character. */ +! if (has_mbyte) +! mb_adjust_cursor(); +! #endif + foundcol = 0; + + /* +--- 5838,5844 ---- + coladvance((colnr_T)textwidth); + wantcol = curwin->w_cursor.col; + +! curwin->w_cursor.col = startcol; + foundcol = 0; + + /* +*************** +*** 5847,5857 **** + || curwin->w_cursor.lnum != Insstart.lnum + || curwin->w_cursor.col >= Insstart.col) + { +! cc = gchar_cursor(); + if (WHITECHAR(cc)) + { + /* remember position of blank just before text */ +! end_foundcol = curwin->w_cursor.col; + + /* find start of sequence of blanks */ + while (curwin->w_cursor.col > 0 && WHITECHAR(cc)) +--- 5849,5862 ---- + || curwin->w_cursor.lnum != Insstart.lnum + || curwin->w_cursor.col >= Insstart.col) + { +! if (curwin->w_cursor.col == startcol && c != NUL) +! cc = c; +! else +! cc = gchar_cursor(); + if (WHITECHAR(cc)) + { + /* remember position of blank just before text */ +! end_col = curwin->w_cursor.col; + + /* find start of sequence of blanks */ + while (curwin->w_cursor.col > 0 && WHITECHAR(cc)) +*************** +*** 5871,5877 **** + /* do not break after one-letter words */ + if (curwin->w_cursor.col == 0) + break; /* one-letter word at begin */ +! + col = curwin->w_cursor.col; + dec_cursor(); + cc = gchar_cursor(); +--- 5876,5886 ---- + /* do not break after one-letter words */ + if (curwin->w_cursor.col == 0) + break; /* one-letter word at begin */ +! #ifdef FEAT_COMMENTS +! /* do not break "#a b" when 'tw' is 2 */ +! if (curwin->w_cursor.col <= leader_len) +! break; +! #endif + col = curwin->w_cursor.col; + dec_cursor(); + cc = gchar_cursor(); +*************** +*** 5880,5905 **** + continue; /* one-letter, continue */ + curwin->w_cursor.col = col; + } +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! foundcol = curwin->w_cursor.col +! + (*mb_ptr2len)(ml_get_cursor()); +! else +! #endif +! foundcol = curwin->w_cursor.col + 1; +! if (curwin->w_cursor.col < (colnr_T)wantcol) + break; + } + #ifdef FEAT_MBYTE +! else if (cc >= 0x100 && fo_multibyte +! && curwin->w_cursor.col <= (colnr_T)wantcol) + { + /* Break after or before a multi-byte character. */ + foundcol = curwin->w_cursor.col; +- if (curwin->w_cursor.col < (colnr_T)wantcol) +- foundcol += (*mb_char2len)(cc); + end_foundcol = foundcol; +! break; + } + #endif + if (curwin->w_cursor.col == 0) +--- 5889,5948 ---- + continue; /* one-letter, continue */ + curwin->w_cursor.col = col; + } +! +! inc_cursor(); +! +! end_foundcol = end_col + 1; +! foundcol = curwin->w_cursor.col; +! if (curwin->w_cursor.col <= (colnr_T)wantcol) + break; + } + #ifdef FEAT_MBYTE +! else if (cc >= 0x100 && fo_multibyte) + { + /* Break after or before a multi-byte character. */ ++ if (curwin->w_cursor.col != startcol) ++ { ++ #ifdef FEAT_COMMENTS ++ /* Don't break until after the comment leader */ ++ if (curwin->w_cursor.col < leader_len) ++ break; ++ #endif ++ col = curwin->w_cursor.col; ++ inc_cursor(); ++ /* Don't change end_foundcol if already set. */ ++ if (foundcol != curwin->w_cursor.col) ++ { ++ foundcol = curwin->w_cursor.col; ++ end_foundcol = foundcol; ++ if (curwin->w_cursor.col <= (colnr_T)wantcol) ++ break; ++ } ++ curwin->w_cursor.col = col; ++ } ++ ++ if (curwin->w_cursor.col == 0) ++ break; ++ ++ col = curwin->w_cursor.col; ++ ++ dec_cursor(); ++ cc = gchar_cursor(); ++ ++ if (WHITECHAR(cc)) ++ continue; /* break with space */ ++ #ifdef FEAT_COMMENTS ++ /* Don't break until after the comment leader */ ++ if (curwin->w_cursor.col < leader_len) ++ break; ++ #endif ++ ++ curwin->w_cursor.col = col; ++ + foundcol = curwin->w_cursor.col; + end_foundcol = foundcol; +! if (curwin->w_cursor.col <= (colnr_T)wantcol) +! break; + } + #endif + if (curwin->w_cursor.col == 0) +*************** +*** 5926,5939 **** + orig_col = startcol; /* Will start backspacing from here */ + else + #endif +! replace_offset = startcol - end_foundcol - 1; + + /* + * adjust startcol for spaces that will be deleted and + * characters that will remain on top line + */ + curwin->w_cursor.col = foundcol; +! while (cc = gchar_cursor(), WHITECHAR(cc)) + inc_cursor(); + startcol -= curwin->w_cursor.col; + if (startcol < 0) +--- 5969,5983 ---- + orig_col = startcol; /* Will start backspacing from here */ + else + #endif +! replace_offset = startcol - end_foundcol; + + /* + * adjust startcol for spaces that will be deleted and + * characters that will remain on top line + */ + curwin->w_cursor.col = foundcol; +! while ((cc = gchar_cursor(), WHITECHAR(cc)) +! && (!fo_white_par || curwin->w_cursor.col < startcol)) + inc_cursor(); + startcol -= curwin->w_cursor.col; + if (startcol < 0) +*************** +*** 8509,8515 **** + if (mode == BACKSPACE_LINE + && (curbuf->b_p_ai + #ifdef FEAT_CINDENT +! || cindent_on() + #endif + ) + #ifdef FEAT_RIGHTLEFT +--- 8553,8559 ---- + if (mode == BACKSPACE_LINE + && (curbuf->b_p_ai + #ifdef FEAT_CINDENT +! || cindent_on() + #endif + ) + #ifdef FEAT_RIGHTLEFT +*** ../vim-7.2.300/src/testdir/Makefile 2009-11-17 17:36:13.000000000 +0100 +--- src/testdir/Makefile 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 22,28 **** + test48.out test49.out test51.out test52.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 test66.out test67.out + + SCRIPTS_GUI = test16.out + +--- 22,29 ---- + test48.out test49.out test51.out test52.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 test66.out test67.out test68.out \ +! test69.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.2.300/src/testdir/test68.in 2009-11-17 17:39:36.000000000 +0100 +--- src/testdir/test68.in 2009-11-17 15:39:09.000000000 +0100 +*************** +*** 0 **** +--- 1,56 ---- ++ Test for text formatting. ++ ++ Results of test68: ++ ++ STARTTEST ++ :so small.vim ++ /^{/+1 ++ :set noai tw=2 fo=t ++ gRa b ++ ENDTEST ++ ++ { ++ ++ ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set ai tw=2 fo=tw ++ gqgqjjllab ++ ENDTEST ++ ++ { ++ a b ++ ++ a ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=3 fo=t ++ gqgqo ++ a  ++ ENDTEST ++ ++ { ++ a  ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=tcq1 comments=:# ++ gqgqjgqgqo ++ a b ++ #a b ++ ENDTEST ++ ++ { ++ a b ++ #a b ++ } ++ ++ STARTTEST ++ :g/^STARTTEST/.,/^ENDTEST/d ++ :1;/^Results/,$wq! test.out ++ ENDTEST +*** ../vim-7.2.300/src/testdir/test68.ok 2009-11-17 17:39:36.000000000 +0100 +--- src/testdir/test68.ok 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 0 **** +--- 1,35 ---- ++ Results of test68: ++ ++ ++ { ++ a ++ b ++ } ++ ++ ++ { ++ a ++ b ++ ++ a ++ b ++ } ++ ++ ++ { ++ a ++  ++ ++ a ++  ++ } ++ ++ ++ { ++ a b ++ #a b ++ ++ a b ++ #a b ++ } ++ +*** ../vim-7.2.300/src/testdir/test69.in 2009-11-17 17:39:36.000000000 +0100 +--- src/testdir/test69.in 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 0 **** +--- 1,139 ---- ++ Test for multi-byte text formatting. ++ ++ STARTTEST ++ :so mbyte.vim ++ :set encoding=utf-8 ++ ENDTEST ++ ++ Results of test69: ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=t ++ gqgqjgqgqo ++ XYZ ++ abc XYZ ++ ENDTEST ++ ++ { ++ XYZ ++ abc XYZ ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=1 fo=tm ++ gqgqjgqgqjgqgqjgqgqjgqgqo ++ X ++ Xa ++ X a ++ XY ++ X ï¼¹ ++ ENDTEST ++ ++ { ++ X ++ Xa ++ X a ++ XY ++ X ï¼¹ ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=tm ++ gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo ++ X ++ Xa ++ X a ++ XY ++ X ï¼¹ ++ aX ++ abX ++ abcX ++ abX c ++ abXY ++ ENDTEST ++ ++ { ++ X ++ Xa ++ X a ++ XY ++ X ï¼¹ ++ aX ++ abX ++ abcX ++ abX c ++ abXY ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set ai tw=2 fo=tm ++ gqgqjgqgqo ++ X ++ Xa ++ ENDTEST ++ ++ { ++ X ++ Xa ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set noai tw=2 fo=tm ++ gqgqjgqgqo ++ X ++ Xa ++ ENDTEST ++ ++ { ++ X ++ Xa ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=cqm comments=n:X ++ gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo ++ X ++ Xa ++ Xaï¼¹ ++ XY ++ XYZ ++ X ï¼¹ ++ X YZ ++ XX ++ XXa ++ XXY ++ ENDTEST ++ ++ { ++ X ++ Xa ++ Xaï¼¹ ++ XY ++ XYZ ++ X ï¼¹ ++ X YZ ++ XX ++ XXa ++ XXY ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=2 fo=tm ++ RXa ++ ENDTEST ++ ++ { ++ ++ } ++ ++ STARTTEST ++ :g/^STARTTEST/.,/^ENDTEST/d ++ :1;/^Results/,$wq! test.out ++ ENDTEST +*** ../vim-7.2.300/src/testdir/test69.ok 2009-11-17 17:39:36.000000000 +0100 +--- src/testdir/test69.ok 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 0 **** +--- 1,142 ---- ++ Results of test69: ++ ++ ++ { ++ XYZ ++ abc ++ XYZ ++ ++ XYZ ++ abc ++ XYZ ++ } ++ ++ ++ { ++ X ++ X ++ a ++ X ++ a ++ X ++ ï¼¹ ++ X ++ ï¼¹ ++ ++ X ++ X ++ a ++ X ++ a ++ X ++ ï¼¹ ++ X ++ ï¼¹ ++ } ++ ++ ++ { ++ X ++ X ++ a ++ X ++ a ++ X ++ ï¼¹ ++ X ++ ï¼¹ ++ a ++ X ++ ab ++ X ++ abc ++ X ++ ab ++ X ++ c ++ ab ++ X ++ ï¼¹ ++ ++ X ++ X ++ a ++ X ++ a ++ X ++ ï¼¹ ++ X ++ ï¼¹ ++ a ++ X ++ ab ++ X ++ abc ++ X ++ ab ++ X ++ c ++ ab ++ X ++ ï¼¹ ++ } ++ ++ ++ { ++ X ++ X ++ a ++ ++ X ++ X ++ a ++ } ++ ++ ++ { ++ X ++ X ++ a ++ ++ X ++ X ++ a ++ } ++ ++ ++ { ++ X ++ Xa ++ Xa ++ XY ++ XY ++ XY ++ XZ ++ X ï¼¹ ++ X ï¼¹ ++ X Z ++ XX ++ XXa ++ XXY ++ ++ X ++ Xa ++ Xa ++ XY ++ XY ++ XY ++ XZ ++ X ï¼¹ ++ X ï¼¹ ++ X Z ++ XX ++ XXa ++ XXY ++ } ++ ++ ++ { ++ X ++ a ++ } ++ +*** ../vim-7.2.300/src/version.c 2009-11-17 17:37:34.000000000 +0100 +--- src/version.c 2009-11-17 17:26:35.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 301, + /**/ diff --git a/vim/vim-7.2/7.2.302 b/vim/vim-7.2/7.2.302 new file mode 100644 index 0000000..c4d5a99 --- /dev/null +++ b/vim/vim-7.2/7.2.302 @@ -0,0 +1,140 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.302 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.302 (extra part of 7.2.301) +Problem: Formatting wrong with small 'tw' value. +Solution: Add build rules for tests. +Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms + + +*** ../vim-7.2.301/src/testdir/Make_amiga.mak 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_amiga.mak 2009-11-17 15:29:05.000000000 +0100 +*************** +*** 26,32 **** + 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 \ +! test66.out test67.out + + .SUFFIXES: .in .out + +--- 26,32 ---- + 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 \ +! test66.out test67.out test68.out test69.out + + .SUFFIXES: .in .out + +*************** +*** 113,115 **** +--- 113,117 ---- + test65.out: test65.in + test66.out: test66.in + test67.out: test67.in ++ test68.out: test68.in ++ test69.out: test69.in +*** ../vim-7.2.301/src/testdir/Make_dos.mak 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_dos.mak 2009-11-17 15:29:54.000000000 +0100 +*************** +*** 26,32 **** + 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 test66.out test67.out + + SCRIPTS32 = test50.out + +--- 26,33 ---- + 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 test66.out test67.out \ +! test68.out test69.out + + SCRIPTS32 = test50.out + +*** ../vim-7.2.301/src/testdir/Make_ming.mak 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_ming.mak 2009-11-17 15:30:07.000000000 +0100 +*************** +*** 45,51 **** + 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 test66.out test67.out + + SCRIPTS32 = test50.out + +--- 45,52 ---- + 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 test66.out test67.out \ +! test68.out test69.out + + SCRIPTS32 = test50.out + +*** ../vim-7.2.301/src/testdir/Make_os2.mak 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_os2.mak 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 26,32 **** + 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 \ +! test66.out test67.out + + .SUFFIXES: .in .out + +--- 26,32 ---- + 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 \ +! test66.out test67.out test68.out test69.out + + .SUFFIXES: .in .out + +*** ../vim-7.2.301/src/testdir/Make_vms.mms 2009-09-18 14:58:26.000000000 +0200 +--- src/testdir/Make_vms.mms 2009-11-17 15:11:26.000000000 +0100 +*************** +*** 69,75 **** + 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 \ +! test66.out test67.out + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +--- 69,75 ---- + 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 \ +! test66.out test67.out test68.out test69.out + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +*** ../vim-7.2.301/src/version.c 2009-11-17 17:40:34.000000000 +0100 +--- src/version.c 2009-11-17 17:43:26.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 302, + /**/ + +-- +Hacker: Someone skilled in computer programming (good guy). +Cracker: A hacker that uses his skills to crack software (bad guy). + + /// 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/vim/vim-7.2/7.2.303 b/vim/vim-7.2/7.2.303 new file mode 100644 index 0000000..b53d198 --- /dev/null +++ b/vim/vim-7.2/7.2.303 @@ -0,0 +1,70 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.303 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.303 (after 7.2.294) +Problem: Can't build on MS-Windows. +Solution: Add #ifdef around vim_settempdir(). (James Vega) +Files: src/fileio.c + + +*** ../vim-7.2.302/src/fileio.c 2009-11-17 17:13:03.000000000 +0100 +--- src/fileio.c 2009-11-18 20:06:55.000000000 +0100 +*************** +*** 146,152 **** +--- 146,154 ---- + # endif + #endif + static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf)); ++ #ifdef TEMPDIRNAMES + static void vim_settempdir __ARGS((char_u *tempdir)); ++ #endif + #ifdef FEAT_AUTOCMD + static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name"); + #endif +*************** +*** 6995,7000 **** +--- 6997,7003 ---- + } + #endif + ++ #ifdef TEMPDIRNAMES + /* + * Directory "tempdir" was created. Expand this name to a full path and put + * it in "vim_tempdir". This avoids that using ":cd" would confuse us. +*************** +*** 7021,7026 **** +--- 7024,7030 ---- + vim_free(buf); + } + } ++ #endif + + /* + * vim_tempname(): Return a unique name that can be used for a temp file. +*** ../vim-7.2.302/src/version.c 2009-11-17 17:57:10.000000000 +0100 +--- src/version.c 2009-11-18 20:07:58.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 303, + /**/ + +-- +BEDEVERE: Why do you think she is a witch? +SECOND VILLAGER: She turned me into a newt. +BEDEVERE: A newt? +SECOND VILLAGER: (After looking at himself for some time) I got better. + "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/vim/vim-7.2/7.2.304 b/vim/vim-7.2/7.2.304 new file mode 100644 index 0000000..8a138c0 --- /dev/null +++ b/vim/vim-7.2/7.2.304 @@ -0,0 +1,58 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.304 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.304 +Problem: Compiler warning for bad pointer cast. +Solution: Use another variable for int pointer. +Files: src/ops.c + + +*** ../vim-7.2.303/src/ops.c 2009-11-17 12:43:19.000000000 +0100 +--- src/ops.c 2009-11-18 15:40:26.000000000 +0100 +*************** +*** 5597,5603 **** + vc.vc_type = CONV_NONE; + if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK) + { +! conv_str = string_convert(&vc, str, (int*)&len); + if (conv_str != NULL) + { + vim_free(str); +--- 5597,5606 ---- + vc.vc_type = CONV_NONE; + if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK) + { +! int intlen = len; +! +! conv_str = string_convert(&vc, str, &intlen); +! len = intlen; + if (conv_str != NULL) + { + vim_free(str); +*** ../vim-7.2.303/src/version.c 2009-11-18 20:12:15.000000000 +0100 +--- src/version.c 2009-11-25 12:37:36.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 304, + /**/ + +-- +I recommend ordering large cargo containers of paper towels to make up +whatever budget underruns you have. Paper products are always useful and they +have the advantage of being completely flushable if you need to make room in +the storage area later. + (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/vim/vim-7.2/7.2.305 b/vim/vim-7.2/7.2.305 new file mode 100644 index 0000000..c8ad708 --- /dev/null +++ b/vim/vim-7.2/7.2.305 @@ -0,0 +1,105 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.305 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.305 +Problem: Recursively redrawing causes a memory leak. (Dominique Pelle) +Solution: Disallow recursive screen updating. +Files: src/screen.c + + +*** ../vim-7.2.304/src/screen.c 2009-11-11 17:07:25.000000000 +0100 +--- src/screen.c 2009-11-17 16:30:53.000000000 +0100 +*************** +*** 323,328 **** +--- 323,329 ---- + int did_one; + #endif + ++ /* Don't do anything if the screen structures are (not yet) valid. */ + if (!screen_valid(TRUE)) + return; + +*************** +*** 342,348 **** + if (curwin->w_lines_valid == 0 && type < NOT_VALID) + type = NOT_VALID; + +! if (!redrawing()) + { + redraw_later(type); /* remember type for next time */ + must_redraw = type; +--- 343,351 ---- + if (curwin->w_lines_valid == 0 && type < NOT_VALID) + type = NOT_VALID; + +! /* Postpone the redrawing when it's not needed and when being called +! * recursively. */ +! if (!redrawing() || updating_screen) + { + redraw_later(type); /* remember type for next time */ + must_redraw = type; +*************** +*** 582,587 **** +--- 585,591 ---- + + /* + * Prepare for updating one or more windows. ++ * Caller must check for "updating_screen" already set to avoid recursiveness. + */ + static void + update_prepare() +*************** +*** 663,669 **** + doit = TRUE; + } + +! if (!doit) + return; + + /* update all windows that need updating */ +--- 667,675 ---- + doit = TRUE; + } + +! /* Return when there is nothing to do or screen updating already +! * happening. */ +! if (!doit || updating_screen) + return; + + /* update all windows that need updating */ +*************** +*** 696,701 **** +--- 702,711 ---- + updateWindow(wp) + win_T *wp; + { ++ /* return if already busy updating */ ++ if (updating_screen) ++ return; ++ + update_prepare(); + + #ifdef FEAT_CLIPBOARD +*** ../vim-7.2.304/src/version.c 2009-11-25 12:38:49.000000000 +0100 +--- src/version.c 2009-11-25 13:01:48.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 305, + /**/ + +-- +If the Universe is constantly expanding, why can't I ever find a parking space? + + /// 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/vim/vim-7.2/7.2.306 b/vim/vim-7.2/7.2.306 new file mode 100644 index 0000000..d54e90d --- /dev/null +++ b/vim/vim-7.2/7.2.306 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.306 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.306 +Problem: shellescape("10%%", 1) only escapes first %. (Christian Brabandt) +Solution: Don't copy the character after the escaped one. +Files: src/misc2.c + + +*** ../vim-7.2.305/src/misc2.c 2009-11-11 16:56:13.000000000 +0100 +--- src/misc2.c 2009-11-25 17:11:49.000000000 +0100 +*************** +*** 1390,1395 **** +--- 1390,1396 ---- + *d++ = '\\'; /* insert backslash */ + while (--l >= 0) /* copy the var */ + *d++ = *p++; ++ continue; + } + + MB_COPY_CHAR(p, d); +*** ../vim-7.2.305/src/version.c 2009-11-25 13:03:29.000000000 +0100 +--- src/version.c 2009-11-25 17:13:54.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 306, + /**/ + +-- +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/vim/vim-7.2/7.2.307 b/vim/vim-7.2/7.2.307 new file mode 100644 index 0000000..23504e2 --- /dev/null +++ b/vim/vim-7.2/7.2.307 @@ -0,0 +1,181 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.307 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.307 +Problem: Crash with a very long syntax match statement. (Guy Gur Ari) +Solution: When the offset does not fit in the two bytes available give an + error instead of continuing with invalid pointers. +Files: src/regexp.c + + +*** ../vim-7.2.306/src/regexp.c 2009-05-15 21:31:11.000000000 +0200 +--- src/regexp.c 2009-11-25 18:13:03.000000000 +0100 +*************** +*** 583,588 **** +--- 583,589 ---- + #endif + static char_u *regcode; /* Code-emit pointer, or JUST_CALC_SIZE */ + static long regsize; /* Code size. */ ++ static int reg_toolong; /* TRUE when offset out of range */ + static char_u had_endbrace[NSUBEXP]; /* flags, TRUE if end of () found */ + static unsigned regflags; /* RF_ flags for prog */ + static long brace_min[10]; /* Minimums for complex brace repeats */ +*************** +*** 1028,1036 **** + regcomp_start(expr, re_flags); + regcode = r->program; + regc(REGMAGIC); +! if (reg(REG_NOPAREN, &flags) == NULL) + { + vim_free(r); + return NULL; + } + +--- 1029,1039 ---- + regcomp_start(expr, re_flags); + regcode = r->program; + regc(REGMAGIC); +! if (reg(REG_NOPAREN, &flags) == NULL || reg_toolong) + { + vim_free(r); ++ if (reg_toolong) ++ EMSG_RET_NULL(_("E339: Pattern too long")); + return NULL; + } + +*************** +*** 1141,1146 **** +--- 1144,1150 ---- + re_has_z = 0; + #endif + regsize = 0L; ++ reg_toolong = FALSE; + regflags = 0; + #if defined(FEAT_SYN_HL) || defined(PROTO) + had_eol = FALSE; +*************** +*** 1228,1234 **** + { + skipchr(); + br = regbranch(&flags); +! if (br == NULL) + return NULL; + regtail(ret, br); /* BRANCH -> BRANCH. */ + if (!(flags & HASWIDTH)) +--- 1232,1238 ---- + { + skipchr(); + br = regbranch(&flags); +! if (br == NULL || reg_toolong) + return NULL; + regtail(ret, br); /* BRANCH -> BRANCH. */ + if (!(flags & HASWIDTH)) +*************** +*** 1313,1318 **** +--- 1317,1324 ---- + break; + skipchr(); + regtail(latest, regnode(END)); /* operand ends */ ++ if (reg_toolong) ++ break; + reginsert(MATCH, latest); + chain = latest; + } +*************** +*** 1382,1388 **** + break; + default: + latest = regpiece(&flags); +! if (latest == NULL) + return NULL; + *flagp |= flags & (HASWIDTH | HASNL | HASLOOKBH); + if (chain == NULL) /* First piece. */ +--- 1388,1394 ---- + break; + default: + latest = regpiece(&flags); +! if (latest == NULL || reg_toolong) + return NULL; + *flagp |= flags & (HASWIDTH | HASNL | HASLOOKBH); + if (chain == NULL) /* First piece. */ +*************** +*** 2540,2547 **** + offset = (int)(scan - val); + else + offset = (int)(val - scan); +! *(scan + 1) = (char_u) (((unsigned)offset >> 8) & 0377); +! *(scan + 2) = (char_u) (offset & 0377); + } + + /* +--- 2546,2561 ---- + offset = (int)(scan - val); + else + offset = (int)(val - scan); +! /* When the offset uses more than 16 bits it can no longer fit in the two +! * bytes avaliable. Use a global flag to avoid having to check return +! * values in too many places. */ +! if (offset > 0xffff) +! reg_toolong = TRUE; +! else +! { +! *(scan + 1) = (char_u) (((unsigned)offset >> 8) & 0377); +! *(scan + 2) = (char_u) (offset & 0377); +! } + } + + /* +*************** +*** 5764,5769 **** +--- 5778,5785 ---- + + /* + * regnext - dig the "next" pointer out of a node ++ * Returns NULL when calculating size, when there is no next item and when ++ * there is an error. + */ + static char_u * + regnext(p) +*************** +*** 5771,5777 **** + { + int offset; + +! if (p == JUST_CALC_SIZE) + return NULL; + + offset = NEXT(p); +--- 5787,5793 ---- + { + int offset; + +! if (p == JUST_CALC_SIZE || reg_toolong) + return NULL; + + offset = NEXT(p); +*** ../vim-7.2.306/src/version.c 2009-11-25 17:15:16.000000000 +0100 +--- src/version.c 2009-11-25 18:14:32.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 307, + /**/ + +-- +The fastest way to get an engineer to solve a problem is to declare that the +problem is unsolvable. No engineer can walk away from an unsolvable problem +until it's solved. + (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/vim/vim-7.2/7.2.308 b/vim/vim-7.2/7.2.308 new file mode 100644 index 0000000..1e19b21 --- /dev/null +++ b/vim/vim-7.2/7.2.308 @@ -0,0 +1,182 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.308 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.308 +Problem: When using a regexp in the "\=" expression of a substitute + command, submatch() returns empty strings for further lines. + (Clockwork Jam) +Solution: Save and restore the line number and line count when calling + reg_getline(). +Files: src/regexp.c + + +*** ../vim-7.2.307/src/regexp.c 2009-11-25 18:21:48.000000000 +0100 +--- src/regexp.c 2009-11-25 19:45:07.000000000 +0100 +*************** +*** 6828,6833 **** +--- 6828,6835 ---- + * that contains a call to substitute() and submatch(). */ + static regmatch_T *submatch_match; + static regmmatch_T *submatch_mmatch; ++ static linenr_T submatch_firstlnum; ++ static linenr_T submatch_maxline; + #endif + + #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO) +*************** +*** 6941,6947 **** + } + else + { +- linenr_T save_reg_maxline; + win_T *save_reg_win; + int save_ireg_ic; + +--- 6943,6948 ---- +*************** +*** 6953,6959 **** + * vim_regexec_multi() can't be called recursively. */ + submatch_match = reg_match; + submatch_mmatch = reg_mmatch; +! save_reg_maxline = reg_maxline; + save_reg_win = reg_win; + save_ireg_ic = ireg_ic; + can_f_submatch = TRUE; +--- 6954,6961 ---- + * vim_regexec_multi() can't be called recursively. */ + submatch_match = reg_match; + submatch_mmatch = reg_mmatch; +! submatch_firstlnum = reg_firstlnum; +! submatch_maxline = reg_maxline; + save_reg_win = reg_win; + save_ireg_ic = ireg_ic; + can_f_submatch = TRUE; +*************** +*** 6976,6982 **** + + reg_match = submatch_match; + reg_mmatch = submatch_mmatch; +! reg_maxline = save_reg_maxline; + reg_win = save_reg_win; + ireg_ic = save_ireg_ic; + can_f_submatch = FALSE; +--- 6978,6985 ---- + + reg_match = submatch_match; + reg_mmatch = submatch_mmatch; +! reg_firstlnum = submatch_firstlnum; +! reg_maxline = submatch_maxline; + reg_win = save_reg_win; + ireg_ic = save_ireg_ic; + can_f_submatch = FALSE; +*************** +*** 7212,7217 **** +--- 7215,7243 ---- + + #ifdef FEAT_EVAL + /* ++ * Call reg_getline() with the line numbers from the submatch. If a ++ * substitute() was used the reg_maxline and other values have been ++ * overwritten. ++ */ ++ static char_u * ++ reg_getline_submatch(lnum) ++ linenr_T lnum; ++ { ++ char_u *s; ++ linenr_T save_first = reg_firstlnum; ++ linenr_T save_max = reg_maxline; ++ ++ reg_firstlnum = submatch_firstlnum; ++ reg_maxline = submatch_maxline; ++ ++ s = reg_getline(lnum); ++ ++ reg_firstlnum = save_first; ++ reg_maxline = save_max; ++ return s; ++ } ++ ++ /* + * Used for the submatch() function: get the string from the n'th submatch in + * allocated memory. + * Returns NULL when not in a ":s" command and for a non-existing submatch. +*************** +*** 7241,7247 **** + if (lnum < 0 || submatch_mmatch->endpos[no].lnum < 0) + return NULL; + +! s = reg_getline(lnum) + submatch_mmatch->startpos[no].col; + if (s == NULL) /* anti-crash check, cannot happen? */ + break; + if (submatch_mmatch->endpos[no].lnum == lnum) +--- 7267,7273 ---- + if (lnum < 0 || submatch_mmatch->endpos[no].lnum < 0) + return NULL; + +! s = reg_getline_submatch(lnum) + submatch_mmatch->startpos[no].col; + if (s == NULL) /* anti-crash check, cannot happen? */ + break; + if (submatch_mmatch->endpos[no].lnum == lnum) +*************** +*** 7267,7273 **** + ++lnum; + while (lnum < submatch_mmatch->endpos[no].lnum) + { +! s = reg_getline(lnum++); + if (round == 2) + STRCPY(retval + len, s); + len += (int)STRLEN(s); +--- 7293,7299 ---- + ++lnum; + while (lnum < submatch_mmatch->endpos[no].lnum) + { +! s = reg_getline_submatch(lnum++); + if (round == 2) + STRCPY(retval + len, s); + len += (int)STRLEN(s); +*************** +*** 7276,7282 **** + ++len; + } + if (round == 2) +! STRNCPY(retval + len, reg_getline(lnum), + submatch_mmatch->endpos[no].col); + len += submatch_mmatch->endpos[no].col; + if (round == 2) +--- 7302,7308 ---- + ++len; + } + if (round == 2) +! STRNCPY(retval + len, reg_getline_submatch(lnum), + submatch_mmatch->endpos[no].col); + len += submatch_mmatch->endpos[no].col; + if (round == 2) +*** ../vim-7.2.307/src/version.c 2009-11-25 18:21:48.000000000 +0100 +--- src/version.c 2009-11-25 19:50:16.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 308, + /**/ + +-- +Engineers are always delighted to share wisdom, even in areas in which they +have no experience whatsoever. Their logic provides them with inherent +insight into any field of expertise. This can be a problem when dealing with +the illogical people who believe that knowledge can only be derived through +experience. + (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/vim/vim-7.2/7.2.309 b/vim/vim-7.2/7.2.309 new file mode 100644 index 0000000..a1713b7 --- /dev/null +++ b/vim/vim-7.2/7.2.309 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.309 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.309 (after 7.2.308) +Problem: Warning for missing function prototype. (Patrick Texier) +Solution: Add the prototype. +Files: src/regexp.c + + +*** ../vim-7.2.308/src/regexp.c 2009-11-25 19:51:56.000000000 +0100 +--- src/regexp.c 2009-11-26 20:39:18.000000000 +0100 +*************** +*** 7214,7219 **** +--- 7214,7221 ---- + } + + #ifdef FEAT_EVAL ++ static char_u *reg_getline_submatch __ARGS((linenr_T lnum)); ++ + /* + * Call reg_getline() with the line numbers from the submatch. If a + * substitute() was used the reg_maxline and other values have been +*** ../vim-7.2.308/src/version.c 2009-11-25 19:51:56.000000000 +0100 +--- src/version.c 2009-11-26 20:40:11.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 309, + /**/ + +-- +Female engineers become irresistible at the age of consent and remain that +way until about thirty minutes after their clinical death. Longer if it's a +warm day. + (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/vim/vim-7.2/7.2.310 b/vim/vim-7.2/7.2.310 new file mode 100644 index 0000000..52734dd --- /dev/null +++ b/vim/vim-7.2/7.2.310 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.310 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.310 +Problem: When a filetype plugin in ~/.vim/ftdetect uses ":setfiletype" and + the file starts with a "# comment" it gets "conf" filetype. +Solution: Check for "conf" filetype after using ftdetect plugins. +Files: runtime/filetype.vim + + +*** ../vim-7.2.309/runtime/filetype.vim 2008-08-06 18:56:36.000000000 +0200 +--- runtime/filetype.vim 2009-12-02 12:08:42.000000000 +0100 +*************** +*** 2400,2405 **** +--- 2435,2446 ---- + au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh') + + ++ ++ " Use the filetype detect plugins. They may overrule any of the previously ++ " detected filetypes. ++ runtime! ftdetect/*.vim ++ ++ + " Generic configuration file (check this last, it's just guessing!) + au BufNewFile,BufRead,StdinReadPost * + \ if !did_filetype() && expand("") !~ g:ft_ignore_pat +*************** +*** 2408,2417 **** + \ setf conf | + \ endif + +- " Use the plugin-filetype checks last, they may overrule any of the previously +- " detected filetypes. +- runtime! ftdetect/*.vim +- + augroup END + + +--- 2449,2454 ---- +*** ../vim-7.2.309/src/version.c 2009-11-26 20:41:19.000000000 +0100 +--- src/version.c 2009-12-02 12:05:27.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 310, + /**/ + +-- +A)bort, R)etry, P)lease don't bother me again + + /// 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/vim/vim-7.2/7.2.311 b/vim/vim-7.2/7.2.311 new file mode 100644 index 0000000..9e27a73 --- /dev/null +++ b/vim/vim-7.2/7.2.311 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.311 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.311 +Problem: Can't compile with FreeMiNT. +Solution: Change #ifdef for limits.h. (Alan Hourihane) +Files: src/fileio.c + + +*** ../vim-7.2.310/src/fileio.c 2009-11-18 20:12:15.000000000 +0100 +--- src/fileio.c 2009-12-02 13:30:07.000000000 +0100 +*************** +*** 21,27 **** + + #include "vim.h" + +! #ifdef __TANDEM + # include /* for SSIZE_MAX */ + #endif + +--- 21,27 ---- + + #include "vim.h" + +! #if defined(__TANDEM) || defined(__MINT__) + # include /* for SSIZE_MAX */ + #endif + +*** ../vim-7.2.310/src/version.c 2009-12-02 12:08:57.000000000 +0100 +--- src/version.c 2009-12-02 13:31:46.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 311, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +3. Your bookmark takes 15 minutes to scroll from top to bottom. + + /// 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/vim/vim-7.2/7.2.312 b/vim/vim-7.2/7.2.312 new file mode 100644 index 0000000..8b95868 --- /dev/null +++ b/vim/vim-7.2/7.2.312 @@ -0,0 +1,312 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.312 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.312 +Problem: iconv() returns an invalid character sequence when conversion + fails. It should return an empty string. (Yongwei Wu) +Solution: Be more strict about invalid characters in the input. +Files: src/mbyte.c + + +*** ../vim-7.2.311/src/mbyte.c 2009-06-16 15:23:07.000000000 +0200 +--- src/mbyte.c 2009-11-25 16:10:44.000000000 +0100 +*************** +*** 133,154 **** + static int dbcs_ptr2cells_len __ARGS((char_u *p, int size)); + static int dbcs_ptr2char __ARGS((char_u *p)); + +! /* Lookup table to quickly get the length in bytes of a UTF-8 character from +! * the first byte of a UTF-8 string. Bytes which are illegal when used as the +! * first byte have a one, because these will be used separately. */ + static char utf8len_tab[256] = + { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +! 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /*bogus*/ +! 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /*bogus*/ + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1, + }; + + /* + * XIM often causes trouble. Define XIM_DEBUG to get a log of XIM callbacks + * in the "xim.log" file. + */ +--- 133,172 ---- + static int dbcs_ptr2cells_len __ARGS((char_u *p, int size)); + static int dbcs_ptr2char __ARGS((char_u *p)); + +! /* +! * Lookup table to quickly get the length in bytes of a UTF-8 character from +! * the first byte of a UTF-8 string. +! * Bytes which are illegal when used as the first byte have a 1. +! * The NUL byte has length 1. +! */ + static char utf8len_tab[256] = + { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +! 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +! 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1, + }; + + /* ++ * Like utf8len_tab above, but using a zero for illegal lead bytes. ++ */ ++ static char utf8len_tab_zero[256] = ++ { ++ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ++ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ++ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ++ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,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,0,0,0,0,0,0,0,0, ++ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ++ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,0,0, ++ }; ++ ++ /* + * XIM often causes trouble. Define XIM_DEBUG to get a log of XIM callbacks + * in the "xim.log" file. + */ +*************** +*** 1352,1358 **** + if (size > 0 && *p >= 0x80) + { + if (utf_ptr2len_len(p, size) < utf8len_tab[*p]) +! return 1; + c = utf_ptr2char(p); + /* An illegal byte is displayed as . */ + if (utf_ptr2len(p) == 1 || c == NUL) +--- 1370,1376 ---- + if (size > 0 && *p >= 0x80) + { + if (utf_ptr2len_len(p, size) < utf8len_tab[*p]) +! return 1; /* truncated */ + c = utf_ptr2char(p); + /* An illegal byte is displayed as . */ + if (utf_ptr2len(p) == 1 || c == NUL) +*************** +*** 1473,1479 **** + if (p[0] < 0x80) /* be quick for ASCII */ + return p[0]; + +! len = utf8len_tab[p[0]]; + if (len > 1 && (p[1] & 0xc0) == 0x80) + { + if (len == 2) +--- 1491,1497 ---- + if (p[0] < 0x80) /* be quick for ASCII */ + return p[0]; + +! len = utf8len_tab_zero[p[0]]; + if (len > 1 && (p[1] & 0xc0) == 0x80) + { + if (len == 2) +*************** +*** 1723,1728 **** +--- 1741,1747 ---- + /* + * Return length of UTF-8 character, obtained from the first byte. + * "b" must be between 0 and 255! ++ * Returns 1 for an invalid first byte value. + */ + int + utf_byte2len(b) +*************** +*** 1737,1742 **** +--- 1756,1762 ---- + * Returns 1 for "". + * Returns 1 for an illegal byte sequence (also in incomplete byte seq.). + * Returns number > "size" for an incomplete byte sequence. ++ * Never returns zero. + */ + int + utf_ptr2len_len(p, size) +*************** +*** 1747,1757 **** + int i; + int m; + +! if (*p == NUL) +! return 1; +! m = len = utf8len_tab[*p]; + if (len > size) + m = size; /* incomplete byte sequence. */ + for (i = 1; i < m; ++i) + if ((p[i] & 0xc0) != 0x80) + return 1; +--- 1767,1779 ---- + int i; + int m; + +! len = utf8len_tab[*p]; +! if (len == 1) +! return 1; /* NUL, ascii or illegal lead byte */ + if (len > size) + m = size; /* incomplete byte sequence. */ ++ else ++ m = len; + for (i = 1; i < m; ++i) + if ((p[i] & 0xc0) != 0x80) + return 1; +*************** +*** 2505,2510 **** +--- 2527,2533 ---- + /* + * mb_head_off() function pointer. + * Return offset from "p" to the first byte of the character it points into. ++ * If "p" points to the NUL at the end of the string return 0. + * Returns 0 when already at the first byte of a character. + */ + int +*************** +*** 2524,2530 **** + + /* It can't be a trailing byte when not using DBCS, at the start of the + * string or the previous byte can't start a double-byte. */ +! if (p <= base || MB_BYTE2LEN(p[-1]) == 1) + return 0; + + /* This is slow: need to start at the base and go forward until the +--- 2547,2553 ---- + + /* It can't be a trailing byte when not using DBCS, at the start of the + * string or the previous byte can't start a double-byte. */ +! if (p <= base || MB_BYTE2LEN(p[-1]) == 1 || *p == NUL) + return 0; + + /* This is slow: need to start at the base and go forward until the +*************** +*** 2552,2558 **** + * lead byte in the current cell. */ + if (p <= base + || (enc_dbcs == DBCS_JPNU && p[-1] == 0x8e) +! || MB_BYTE2LEN(p[-1]) == 1) + return 0; + + /* This is slow: need to start at the base and go forward until the +--- 2575,2582 ---- + * lead byte in the current cell. */ + if (p <= base + || (enc_dbcs == DBCS_JPNU && p[-1] == 0x8e) +! || MB_BYTE2LEN(p[-1]) == 1 +! || *p == NUL) + return 0; + + /* This is slow: need to start at the base and go forward until the +*************** +*** 2578,2583 **** +--- 2602,2608 ---- + char_u *q; + char_u *s; + int c; ++ int len; + #ifdef FEAT_ARABIC + char_u *j; + #endif +*************** +*** 2597,2604 **** + --q; + /* Check for illegal sequence. Do allow an illegal byte after where we + * started. */ +! if (utf8len_tab[*q] != (int)(s - q + 1) +! && utf8len_tab[*q] != (int)(p - q + 1)) + return 0; + + if (q <= base) +--- 2622,2629 ---- + --q; + /* Check for illegal sequence. Do allow an illegal byte after where we + * started. */ +! len = utf8len_tab[*q]; +! if (len != (int)(s - q + 1) && len != (int)(p - q + 1)) + return 0; + + if (q <= base) +*************** +*** 2810,2818 **** + + while (end == NULL ? *p != NUL : p < end) + { +! if ((*p & 0xc0) == 0x80) + return FALSE; /* invalid lead byte */ +- l = utf8len_tab[*p]; + if (end != NULL && p + l > end) + return FALSE; /* incomplete byte sequence */ + ++p; +--- 2835,2843 ---- + + while (end == NULL ? *p != NUL : p < end) + { +! l = utf8len_tab_zero[*p]; +! if (l == 0) + return FALSE; /* invalid lead byte */ + if (end != NULL && p + l > end) + return FALSE; /* incomplete byte sequence */ + ++p; +*************** +*** 6117,6128 **** + d = retval; + for (i = 0; i < len; ++i) + { +! l = utf_ptr2len(ptr + i); + if (l == 0) + *d++ = NUL; + else if (l == 1) + { +! if (unconvlenp != NULL && utf8len_tab[ptr[i]] > len - i) + { + /* Incomplete sequence at the end. */ + *unconvlenp = len - i; +--- 6142,6161 ---- + d = retval; + for (i = 0; i < len; ++i) + { +! l = utf_ptr2len_len(ptr + i, len - i); + if (l == 0) + *d++ = NUL; + else if (l == 1) + { +! int l_w = utf8len_tab_zero[ptr[i]]; +! +! if (l_w == 0) +! { +! /* Illegal utf-8 byte cannot be converted */ +! vim_free(retval); +! return NULL; +! } +! if (unconvlenp != NULL && l_w > len - i) + { + /* Incomplete sequence at the end. */ + *unconvlenp = len - i; +*** ../vim-7.2.311/src/version.c 2009-12-02 13:32:10.000000000 +0100 +--- src/version.c 2009-12-02 15:00:23.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 312, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +6. You refuse to go to a vacation spot with no electricity and no phone lines. + + /// 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/vim/vim-7.2/7.2.313 b/vim/vim-7.2/7.2.313 new file mode 100644 index 0000000..77b9103 --- /dev/null +++ b/vim/vim-7.2/7.2.313 @@ -0,0 +1,117 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.313 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.313 +Problem: Command line completion doesn't work after "%:h" and similar. +Solution: Expand these items before doing the completion. +Files: src/ex_getln.c, src/misc1.c, src/proto/misc1.pro + + +*** ../vim-7.2.312/src/ex_getln.c 2009-09-18 17:24:54.000000000 +0200 +--- src/ex_getln.c 2009-12-02 16:40:06.000000000 +0100 +*************** +*** 4422,4428 **** + flags |= EW_FILE; + else + flags = (flags | EW_DIR) & ~EW_FILE; +! ret = expand_wildcards(1, &pat, num_file, file, flags); + if (free_pat) + vim_free(pat); + return ret; +--- 4422,4429 ---- + flags |= EW_FILE; + else + flags = (flags | EW_DIR) & ~EW_FILE; +! /* Expand wildcards, supporting %:h and the like. */ +! ret = expand_wildcards_eval(&pat, num_file, file, flags); + if (free_pat) + vim_free(pat); + return ret; +*** ../vim-7.2.312/src/misc1.c 2009-11-17 16:08:12.000000000 +0100 +--- src/misc1.c 2009-12-02 17:06:49.000000000 +0100 +*************** +*** 8447,8452 **** +--- 8447,8492 ---- + } + + /* ++ * Invoke expand_wildcards() for one pattern. ++ * Expand items like "%:h" before the expansion. ++ * Returns OK or FAIL. ++ */ ++ int ++ expand_wildcards_eval(pat, num_file, file, flags) ++ char_u **pat; /* pointer to input pattern */ ++ int *num_file; /* resulting number of files */ ++ char_u ***file; /* array of resulting files */ ++ int flags; /* EW_DIR, etc. */ ++ { ++ int ret = FAIL; ++ char_u *eval_pat = NULL; ++ char_u *exp_pat = *pat; ++ char_u *ignored_msg; ++ int usedlen; ++ ++ if (*exp_pat == '%' || *exp_pat == '#' || *exp_pat == '<') ++ { ++ ++emsg_off; ++ eval_pat = eval_vars(exp_pat, exp_pat, &usedlen, ++ NULL, &ignored_msg, NULL); ++ --emsg_off; ++ if (eval_pat != NULL) ++ exp_pat = concat_str(eval_pat, exp_pat + usedlen); ++ } ++ ++ if (exp_pat != NULL) ++ ret = expand_wildcards(1, &exp_pat, num_file, file, flags); ++ ++ if (eval_pat != NULL) ++ { ++ vim_free(exp_pat); ++ vim_free(eval_pat); ++ } ++ ++ return ret; ++ } ++ ++ /* + * Expand wildcards. Calls gen_expand_wildcards() and removes files matching + * 'wildignore'. + * Returns OK or FAIL. +*** ../vim-7.2.312/src/proto/misc1.pro 2007-09-26 22:36:32.000000000 +0200 +--- src/proto/misc1.pro 2009-12-02 16:41:52.000000000 +0100 +*************** +*** 85,90 **** +--- 85,91 ---- + int vim_fexists __ARGS((char_u *fname)); + void line_breakcheck __ARGS((void)); + void fast_breakcheck __ARGS((void)); ++ int expand_wildcards_eval __ARGS((char_u **pat, int *num_file, char_u ***file, int flags)); + int expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); + int match_suffix __ARGS((char_u *fname)); + int unix_expandpath __ARGS((garray_T *gap, char_u *path, int wildoff, int flags, int didstar)); +*** ../vim-7.2.312/src/version.c 2009-12-02 15:03:24.000000000 +0100 +--- src/version.c 2009-12-02 17:14:02.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 313, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +8. You spend half of the plane trip with your laptop on your lap...and your + child in the overhead compartment. + + /// 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/vim/vim-7.2/7.2.314 b/vim/vim-7.2/7.2.314 new file mode 100644 index 0000000..490605d --- /dev/null +++ b/vim/vim-7.2/7.2.314 @@ -0,0 +1,56 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.314 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.314 +Problem: Missing function in small build. +Solution: Always include concat_str. +Files: src/misc1.c + + +*** ../vim-7.2.313/src/misc1.c 2009-12-02 17:15:04.000000000 +0100 +--- src/misc1.c 2009-12-02 17:44:55.000000000 +0100 +*************** +*** 4666,4672 **** + return dest; + } + +- #if defined(FEAT_EVAL) || defined(FEAT_GETTEXT) || defined(PROTO) + /* + * Concatenate two strings and return the result in allocated memory. + * Returns NULL when out of memory. +--- 4666,4671 ---- +*************** +*** 4687,4693 **** + } + return dest; + } +- #endif + + /* + * Add a path separator to a file name, unless it already ends in a path +--- 4686,4691 ---- +*** ../vim-7.2.313/src/version.c 2009-12-02 17:15:04.000000000 +0100 +--- src/version.c 2009-12-02 17:47:18.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 314, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +9. All your daydreaming is preoccupied with getting a faster connection to the + net: 28.8...ISDN...cable modem...T1...T3. + + /// 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/vim/vim-7.2/7.2.315 b/vim/vim-7.2/7.2.315 new file mode 100644 index 0000000..6a5e7c7 --- /dev/null +++ b/vim/vim-7.2/7.2.315 @@ -0,0 +1,134 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.315 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.315 +Problem: Python libs can't be found on 64 bit system. +Solution: Add lib64 to the list of directories. (Michael Henry) +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.2.314/src/auto/configure 2009-11-17 17:13:03.000000000 +0100 +--- src/auto/configure 2009-12-02 17:21:20.000000000 +0100 +*************** +*** 5126,5132 **** + + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +! for subdir in lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" +--- 5126,5132 ---- + + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +! for subdir in lib64 lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" +*************** +*** 13718,13725 **** + $as_echo "pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&6; } + else + vim_cv_tty_group=world +! { $as_echo "$as_me:$LINENO: result: ptys are world accessable" >&5 +! $as_echo "ptys are world accessable" >&6; } + fi + + else +--- 13718,13725 ---- + $as_echo "pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&6; } + else + vim_cv_tty_group=world +! { $as_echo "$as_me:$LINENO: result: ptys are world accessible" >&5 +! $as_echo "ptys are world accessible" >&6; } + fi + + else +*************** +*** 13730,13737 **** + ( exit $ac_status ) + + vim_cv_tty_group=world +! { $as_echo "$as_me:$LINENO: result: can't determine - assume ptys are world accessable" >&5 +! $as_echo "can't determine - assume ptys are world accessable" >&6; } + + fi + rm -rf conftest.dSYM +--- 13730,13737 ---- + ( exit $ac_status ) + + vim_cv_tty_group=world +! { $as_echo "$as_me:$LINENO: result: can't determine - assume ptys are world accessible" >&5 +! $as_echo "can't determine - assume ptys are world accessible" >&6; } + + fi + rm -rf conftest.dSYM +*** ../vim-7.2.314/src/configure.in 2009-11-17 17:13:03.000000000 +0100 +--- src/configure.in 2009-12-02 17:21:10.000000000 +0100 +*************** +*** 686,692 **** + [ + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +! for subdir in lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" +--- 686,692 ---- + [ + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +! for subdir in lib64 lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" +*************** +*** 2557,2567 **** + AC_MSG_RESULT([pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group]) + else + vim_cv_tty_group=world +! AC_MSG_RESULT([ptys are world accessable]) + fi + ],[ + vim_cv_tty_group=world +! AC_MSG_RESULT([can't determine - assume ptys are world accessable]) + ],[ + AC_MSG_ERROR(cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode') + ]) +--- 2557,2567 ---- + AC_MSG_RESULT([pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group]) + else + vim_cv_tty_group=world +! AC_MSG_RESULT([ptys are world accessible]) + fi + ],[ + vim_cv_tty_group=world +! AC_MSG_RESULT([can't determine - assume ptys are world accessible]) + ],[ + AC_MSG_ERROR(cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode') + ]) +*** ../vim-7.2.314/src/version.c 2009-12-02 17:47:46.000000000 +0100 +--- src/version.c 2009-12-02 17:57:39.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 315, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +10. And even your night dreams are in 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/vim/vim-7.2/7.2.316 b/vim/vim-7.2/7.2.316 new file mode 100644 index 0000000..34e629f --- /dev/null +++ b/vim/vim-7.2/7.2.316 @@ -0,0 +1,83 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.316 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.316 +Problem: May get multiple _FORTIFY_SOURCE arguments. (Tony Mechelynck) +Solution: First remove all these arguments and then add the one we want. + (Dominique Pelle) +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.2.315/src/auto/configure 2009-12-02 17:59:08.000000000 +0100 +--- src/auto/configure 2009-12-16 17:05:59.000000000 +0100 +*************** +*** 17185,17194 **** + { $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=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'` + { $as_echo "$as_me:$LINENO: result: yes" >&5 + $as_echo "yes" >&6; } + else +--- 17185,17194 ---- + { $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=`echo "$CFLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/-D_FORTIFY_SOURCE=.//g' -e 's/$/ -D_FORTIFY_SOURCE=1/'` + { $as_echo "$as_me:$LINENO: result: yes" >&5 + $as_echo "yes" >&6; } + else +*** ../vim-7.2.315/src/configure.in 2009-12-02 17:59:08.000000000 +0100 +--- src/configure.in 2009-12-16 17:05:55.000000000 +0100 +*************** +*** 3241,3249 **** + 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=`echo "$CFLAGS -D_FORTIFY_SOURCE=1" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' -e 's/-D_FORTIFY_SOURCE=2//g'` + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) +--- 3241,3250 ---- + 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. ++ dnl Also remove duplicate _FORTIFY_SOURCE arguments. + AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1) + if test "$gccmajor" -gt "3"; then +! CFLAGS=`echo "$CFLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/-D_FORTIFY_SOURCE=.//g' -e 's/$/ -D_FORTIFY_SOURCE=1/'` + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) +*** ../vim-7.2.315/src/version.c 2009-12-02 17:59:08.000000000 +0100 +--- src/version.c 2009-12-16 17:12:25.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 316, + /**/ + +-- +Have you heard about the new Beowulf cluster? It's so fast, it executes +an infinite loop in 6 seconds. + + /// 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/vim/vim-7.2/7.2.317 b/vim/vim-7.2/7.2.317 new file mode 100644 index 0000000..bc0ceee --- /dev/null +++ b/vim/vim-7.2/7.2.317 @@ -0,0 +1,148 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.317 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.317 +Problem: Memory leak when adding a highlight group with unprintable + characters, resulting in E669. +Solution: Free the memory. And fix a few typos. (Dominique Pelle) +Files: src/syntax.c + + +*** ../vim-7.2.316/src/syntax.c 2009-05-17 13:30:58.000000000 +0200 +--- src/syntax.c 2009-12-16 18:09:05.000000000 +0100 +*************** +*** 206,212 **** + static int current_attr = 0; /* attr of current syntax word */ + #ifdef FEAT_EVAL + static int current_id = 0; /* ID of current char for syn_get_id() */ +! static int current_trans_id = 0; /* idem, transparancy removed */ + #endif + + typedef struct syn_cluster_S +--- 206,212 ---- + static int current_attr = 0; /* attr of current syntax word */ + #ifdef FEAT_EVAL + static int current_id = 0; /* ID of current char for syn_get_id() */ +! static int current_trans_id = 0; /* idem, transparency removed */ + #endif + + typedef struct syn_cluster_S +*************** +*** 282,288 **** + int si_idx; /* index of syntax pattern or + KEYWORD_IDX */ + int si_id; /* highlight group ID for keywords */ +! int si_trans_id; /* idem, transparancy removed */ + int si_m_lnum; /* lnum of the match */ + int si_m_startcol; /* starting column of the match */ + lpos_T si_m_endpos; /* just after end posn of the match */ +--- 282,288 ---- + int si_idx; /* index of syntax pattern or + KEYWORD_IDX */ + int si_id; /* highlight group ID for keywords */ +! int si_trans_id; /* idem, transparency removed */ + int si_m_lnum; /* lnum of the match */ + int si_m_startcol; /* starting column of the match */ + lpos_T si_m_endpos; /* just after end posn of the match */ +*************** +*** 1274,1280 **** + dist = syn_buf->b_ml.ml_line_count / (syn_buf->b_sst_len - Rows) + 1; + + /* +! * Go throught the list to find the "tick" for the oldest entry that can + * be removed. Set "above" when the "tick" for the oldest entry is above + * "b_sst_lasttick" (the display tick wraps around). + */ +--- 1274,1280 ---- + dist = syn_buf->b_ml.ml_line_count / (syn_buf->b_sst_len - Rows) + 1; + + /* +! * Go through the list to find the "tick" for the oldest entry that can + * be removed. Set "above" when the "tick" for the oldest entry is above + * "b_sst_lasttick" (the display tick wraps around). + */ +*************** +*** 2319,2325 **** + ? (syn_buf->b_spell_cluster_id == 0) + : (syn_buf->b_syn_spell == SYNSPL_TOP); + +! /* nextgroup ends at end of line, unless "skipnl" or "skipemtpy" present */ + if (current_next_list != NULL + && syn_getcurline()[current_col + 1] == NUL + && !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY))) +--- 2319,2325 ---- + ? (syn_buf->b_spell_cluster_id == 0) + : (syn_buf->b_syn_spell == SYNSPL_TOP); + +! /* nextgroup ends at end of line, unless "skipnl" or "skipempty" present */ + if (current_next_list != NULL + && syn_getcurline()[current_col + 1] == NUL + && !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY))) +*************** +*** 6108,6114 **** + win_T *wp; + long lnum; + colnr_T col; +! int trans; /* remove transparancy */ + int *spellp; /* return: can do spell checking */ + int keep_state; /* keep state of char at "col" */ + { +--- 6108,6114 ---- + win_T *wp; + long lnum; + colnr_T col; +! int trans; /* remove transparency */ + int *spellp; /* return: can do spell checking */ + int keep_state; /* keep state of char at "col" */ + { +*************** +*** 7523,7529 **** + #if defined(FEAT_GUI) || defined(PROTO) + /* + * Set the normal foreground and background colors according to the "Normal" +! * highlighighting group. For X11 also set "Menu", "Scrollbar", and + * "Tooltip" colors. + */ + void +--- 7523,7529 ---- + #if defined(FEAT_GUI) || defined(PROTO) + /* + * Set the normal foreground and background colors according to the "Normal" +! * highlighting group. For X11 also set "Menu", "Scrollbar", and + * "Tooltip" colors. + */ + void +*************** +*** 8647,8652 **** +--- 8647,8653 ---- + if (!vim_isprintc(*p)) + { + EMSG(_("E669: Unprintable character in group name")); ++ vim_free(name); + return 0; + } + else if (!ASCII_ISALNUM(*p) && *p != '_') +*** ../vim-7.2.316/src/version.c 2009-12-16 17:14:08.000000000 +0100 +--- src/version.c 2009-12-16 18:09:14.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 317, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +35. Your husband tells you he's had the beard for 2 months. + + /// 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/vim/vim-7.2/7.2.318 b/vim/vim-7.2/7.2.318 new file mode 100644 index 0000000..4301836 --- /dev/null +++ b/vim/vim-7.2/7.2.318 @@ -0,0 +1,91 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.318 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.318 +Problem: Wrong locale value breaks floating point numbers for gvim. +Solution: Set the locale again after doing GUI inits. (Dominique Pelle) +Files: src/main.c + + +*** ../vim-7.2.317/src/main.c 2009-11-17 12:31:30.000000000 +0100 +--- src/main.c 2009-12-16 18:23:46.000000000 +0100 +*************** +*** 366,379 **** + * Check if the GUI can be started. Reset gui.starting if not. + * Don't know about other systems, stay on the safe side and don't check. + */ +! if (gui.starting && gui_init_check() == FAIL) + { +! gui.starting = FALSE; + +! /* When running "evim" or "gvim -y" we need the menus, exit if we +! * don't have them. */ +! if (params.evim_mode) +! mch_exit(1); + } + # endif + #endif +--- 366,386 ---- + * Check if the GUI can be started. Reset gui.starting if not. + * Don't know about other systems, stay on the safe side and don't check. + */ +! if (gui.starting) + { +! if (gui_init_check() == FAIL) +! { +! gui.starting = FALSE; + +! /* When running "evim" or "gvim -y" we need the menus, exit if we +! * don't have them. */ +! if (params.evim_mode) +! mch_exit(1); +! } +! # if defined(HAVE_LOCALE_H) || defined(X_LOCALE) +! /* Re-initialize locale, it may have been altered by gui_init_check() */ +! init_locale(); +! # endif + } + # endif + #endif +*************** +*** 3685,3691 **** + } + else if (STRICMP(argv[i], "--servername") == 0) + { +! /* Alredy processed. Take it out of the command line */ + i++; + continue; + } +--- 3692,3698 ---- + } + else if (STRICMP(argv[i], "--servername") == 0) + { +! /* Already processed. Take it out of the command line */ + i++; + continue; + } +*** ../vim-7.2.317/src/version.c 2009-12-16 18:13:04.000000000 +0100 +--- src/version.c 2009-12-16 18:26:24.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 318, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +36. You miss more than five meals a week downloading the latest games from + Apogee. + + /// 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/vim/vim-7.2/7.2.319 b/vim/vim-7.2/7.2.319 new file mode 100644 index 0000000..3cbfd42 --- /dev/null +++ b/vim/vim-7.2/7.2.319 @@ -0,0 +1,63 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.319 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.319 +Problem: Motif: accessing freed memory when cancelling font dialog. +Solution: Destroy the widget only after accessing it. (Dominique Pelle) +Files: src/gui_xmdlg.c + + +*** ../vim-7.2.318/src/gui_xmdlg.c 2009-11-03 12:53:44.000000000 +0100 +--- src/gui_xmdlg.c 2009-12-16 18:39:21.000000000 +0100 +*************** +*** 1274,1286 **** + XtAppProcessEvent(XtWidgetToApplicationContext(data->dialog), + (XtInputMask)XtIMAll); + +- XtDestroyWidget(data->dialog); +- + if (data->old) + { + XFreeFont(XtDisplay(data->dialog), data->old); + XmFontListFree(data->old_list); + } + + gui_motif_synch_fonts(); + +--- 1274,1285 ---- + XtAppProcessEvent(XtWidgetToApplicationContext(data->dialog), + (XtInputMask)XtIMAll); + + if (data->old) + { + XFreeFont(XtDisplay(data->dialog), data->old); + XmFontListFree(data->old_list); + } ++ XtDestroyWidget(data->dialog); + + gui_motif_synch_fonts(); + +*** ../vim-7.2.318/src/version.c 2009-12-16 18:27:29.000000000 +0100 +--- src/version.c 2009-12-16 18:40:06.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 319, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +37. You start looking for hot HTML addresses in public restrooms. + + /// 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/vim/vim-7.2/7.2.320 b/vim/vim-7.2/7.2.320 new file mode 100644 index 0000000..73f6224 --- /dev/null +++ b/vim/vim-7.2/7.2.320 @@ -0,0 +1,199 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.320 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.320 +Problem: Unused function in Mzscheme interface. +Solution: Remove the function and what depends on it. (Dominique Pelle) +Files: src/if_mzsch.c, src/proto/if_mzsch.pro + + +*** ../vim-7.2.319/src/if_mzsch.c 2009-09-11 12:20:47.000000000 +0200 +--- src/if_mzsch.c 2009-12-16 19:01:04.000000000 +0100 +*************** +*** 70,83 **** + Scheme_Object *port; + } Port_Info; + +- /* info for do_apply */ +- typedef struct +- { +- Scheme_Object *proc; +- int argc; +- Scheme_Object **argv; +- } Apply_Info; +- + /* + *======================================================================== + * Vim-Control Commands +--- 70,75 ---- +*************** +*** 160,166 **** + static Scheme_Object *extract_exn_message(Scheme_Object *v); + static Scheme_Object *do_eval(void *, int noargc, Scheme_Object **noargv); + static Scheme_Object *do_load(void *, int noargc, Scheme_Object **noargv); +- static Scheme_Object *do_apply(void *, int noargc, Scheme_Object **noargv); + static void register_vim_exn(void); + static vim_mz_buffer *get_buffer_arg(const char *fname, int argnum, + int argc, Scheme_Object **argv); +--- 152,157 ---- +*************** +*** 1056,1062 **** + MZ_GC_REG(); + config = scheme_config; + MZ_GC_CHECK(); +! /* recreate ports each call effectivelly clearing these ones */ + curout = scheme_make_string_output_port(); + MZ_GC_CHECK(); + curerr = scheme_make_string_output_port(); +--- 1047,1053 ---- + MZ_GC_REG(); + config = scheme_config; + MZ_GC_CHECK(); +! /* recreate ports each call effectively clearing these ones */ + curout = scheme_make_string_output_port(); + MZ_GC_CHECK(); + curerr = scheme_make_string_output_port(); +*************** +*** 1196,1231 **** + } + } + +- /* +- * apply MzScheme procedure with arguments, +- * handling errors +- */ +- Scheme_Object * +- mzvim_apply(Scheme_Object *proc, int argc, Scheme_Object **argv) +- { +- if (mzscheme_init()) +- return FAIL; +- else +- { +- Apply_Info data = {NULL, 0, NULL}; +- Scheme_Object *ret = NULL; +- +- MZ_GC_DECL_REG(5); +- MZ_GC_VAR_IN_REG(0, ret); +- MZ_GC_VAR_IN_REG(1, data.proc); +- MZ_GC_ARRAY_VAR_IN_REG(2, data.argv, argc); +- MZ_GC_REG(); +- +- data.proc = proc; +- data.argc = argc; +- data.argv = argv; +- +- eval_with_exn_handling(&data, do_apply, &ret); +- MZ_GC_UNREG(); +- return ret; +- } +- } +- + static Scheme_Object * + do_load(void *data, int noargc, Scheme_Object **noargv) + { +--- 1187,1192 ---- +*************** +*** 1257,1263 **** + MZ_GC_CHECK(); + } + +! /* errors will be caught in do_mzscheme_comamnd and ex_mzfile */ + scheme_close_input_port(pinfo->port); + MZ_GC_CHECK(); + pinfo->port = NULL; +--- 1218,1224 ---- + MZ_GC_CHECK(); + } + +! /* errors will be caught in do_mzscheme_command and ex_mzfile */ + scheme_close_input_port(pinfo->port); + MZ_GC_CHECK(); + pinfo->port = NULL; +*************** +*** 1348,1360 **** + return scheme_eval_string_all((char *)s, environment, TRUE); + } + +- static Scheme_Object * +- do_apply(void *a, int noargc, Scheme_Object **noargv) +- { +- Apply_Info *info = (Apply_Info *)a; +- return scheme_apply(info->proc, info->argc, info->argv); +- } +- + /* + *======================================================================== + * 3. MzScheme I/O Handlers +--- 1309,1314 ---- +*************** +*** 2128,2134 **** + static Scheme_Object * + set_buffer_line(void *data, int argc, Scheme_Object **argv) + { +! /* First of all, we check the the of the supplied MzScheme object. + * There are three cases: + * 1. #f - this is a deletion. + * 2. A string - this is a replacement. +--- 2082,2088 ---- + static Scheme_Object * + set_buffer_line(void *data, int argc, Scheme_Object **argv) + { +! /* First of all, we check the value of the supplied MzScheme object. + * There are three cases: + * 1. #f - this is a deletion. + * 2. A string - this is a replacement. +*************** +*** 2428,2434 **** + /* + * (insert-buff-line-list {linenr} {string/string-list} [buffer]) + * +! * Insert a number of lines into the specified buffer after the specifed line. + * The line number is in Vim format (1-based). The lines to be inserted are + * given as an MzScheme list of string objects or as a single string. The lines + * to be added are checked for validity and correct format. Errors are +--- 2382,2388 ---- + /* + * (insert-buff-line-list {linenr} {string/string-list} [buffer]) + * +! * Insert a number of lines into the specified buffer after the specified line. + * The line number is in Vim format (1-based). The lines to be inserted are + * given as an MzScheme list of string objects or as a single string. The lines + * to be added are checked for validity and correct format. Errors are +*** ../vim-7.2.319/src/proto/if_mzsch.pro 2009-05-26 22:58:43.000000000 +0200 +--- src/proto/if_mzsch.pro 2009-12-16 19:01:01.000000000 +0100 +*************** +*** 13,20 **** + void mzvim_check_threads __ARGS((void)); + void mzvim_reset_timer __ARGS((void)); + void *mzvim_eval_string __ARGS((char_u *str)); +- struct Scheme_Object *mzvim_apply __ARGS((struct Scheme_Object *, int argc, +- struct Scheme_Object **)); + int mzthreads_allowed __ARGS((void)); + void mzscheme_main __ARGS((void)); + /* vim: set ft=c : */ +--- 13,18 ---- +*** ../vim-7.2.319/src/version.c 2009-12-16 18:49:09.000000000 +0100 +--- src/version.c 2009-12-16 18:53:48.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 320, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail + on the way back to bed. + + /// 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/vim/vim-7.2/7.2.321 b/vim/vim-7.2/7.2.321 new file mode 100644 index 0000000..69c08f4 --- /dev/null +++ b/vim/vim-7.2/7.2.321 @@ -0,0 +1,59 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.321 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.321 +Problem: histadd() and searching with "*" fails to add entry to history + when it is empty. +Solution: Initialize the history. (Lech Lorens) +Files: src/eval.c, src/normal.c + + +*** ../vim-7.2.320/src/eval.c 2009-11-17 12:20:30.000000000 +0100 +--- src/eval.c 2009-12-24 14:37:50.000000000 +0100 +*************** +*** 12014,12019 **** +--- 12014,12020 ---- + str = get_tv_string_buf(&argvars[1], buf); + if (*str != NUL) + { ++ init_history(); + add_to_history(histype, str, FALSE, NUL); + rettv->vval.v_number = TRUE; + return; +*** ../vim-7.2.320/src/normal.c 2009-05-17 13:30:58.000000000 +0200 +--- src/normal.c 2009-12-24 14:38:28.000000000 +0100 +*************** +*** 5602,5607 **** +--- 5602,5608 ---- + STRCAT(buf, "\\>"); + #ifdef FEAT_CMDHIST + /* put pattern in search history */ ++ init_history(); + add_to_history(HIST_SEARCH, buf, TRUE, NUL); + #endif + normal_search(cap, cmdchar == '*' ? '/' : '?', buf, 0); +*** ../vim-7.2.320/src/version.c 2009-12-16 19:02:05.000000000 +0100 +--- src/version.c 2009-12-24 14:39:46.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 321, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +43. You tell the kids they can't use the computer because "Daddy's got work to + do" and you don't even have a job. + + /// 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/vim/vim-7.2/7.2.322 b/vim/vim-7.2/7.2.322 new file mode 100644 index 0000000..57f27fc --- /dev/null +++ b/vim/vim-7.2/7.2.322 @@ -0,0 +1,49 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.322 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.322 +Problem: Wrong indenting in virtual replace mode with CTRL-Y below a short + line. +Solution: Check for character to be NUL. (suggested by Lech Lorens) +Files: src/edit.c + + +*** ../vim-7.2.321/src/edit.c 2009-11-17 17:40:34.000000000 +0100 +--- src/edit.c 2009-12-24 15:18:23.000000000 +0100 +*************** +*** 7397,7402 **** +--- 7397,7406 ---- + int icase; + int i; + ++ if (keytyped == NUL) ++ /* Can happen with CTRL-Y and CTRL-E on a short line. */ ++ return FALSE; ++ + #ifdef FEAT_EVAL + if (*curbuf->b_p_inde != NUL) + look = curbuf->b_p_indk; /* 'indentexpr' set: use 'indentkeys' */ +*** ../vim-7.2.321/src/version.c 2009-12-24 15:00:31.000000000 +0100 +--- src/version.c 2009-12-24 15:44:46.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 322, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +45. You buy a Captain Kirk chair with a built-in keyboard and mouse. + + /// 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/vim/vim-7.2/7.2.323 b/vim/vim-7.2/7.2.323 new file mode 100644 index 0000000..fc43246 --- /dev/null +++ b/vim/vim-7.2/7.2.323 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.323 (extra) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.323 (extra) +Problem: Balloon evaluation crashes on Win64. +Solution: Change pointer types. (Sergey Khorev) +Files: src/gui_w32.c + + +*** ../vim-7.2.322/src/gui_w32.c 2009-01-28 21:22:20.000000000 +0100 +--- src/gui_w32.c 2009-12-24 16:06:41.000000000 +0100 +*************** +*** 212,223 **** + DWORD dwPlatformID; + } DLLVERSIONINFO; + + typedef struct tagTOOLINFOA_NEW + { + UINT cbSize; + UINT uFlags; + HWND hwnd; +! UINT uId; + RECT rect; + HINSTANCE hinst; + LPSTR lpszText; +--- 212,225 ---- + DWORD dwPlatformID; + } DLLVERSIONINFO; + ++ #include ++ + typedef struct tagTOOLINFOA_NEW + { + UINT cbSize; + UINT uFlags; + HWND hwnd; +! UINT_PTR uId; + RECT rect; + HINSTANCE hinst; + LPSTR lpszText; +*************** +*** 227,241 **** + typedef struct tagNMTTDISPINFO_NEW + { + NMHDR hdr; +! LPTSTR lpszText; + char szText[80]; + HINSTANCE hinst; + UINT uFlags; + LPARAM lParam; + } NMTTDISPINFO_NEW; + +- #include +- + typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *); + #ifndef TTM_SETMAXTIPWIDTH + # define TTM_SETMAXTIPWIDTH (WM_USER+24) +--- 229,241 ---- + typedef struct tagNMTTDISPINFO_NEW + { + NMHDR hdr; +! LPSTR lpszText; + char szText[80]; + HINSTANCE hinst; + UINT uFlags; + LPARAM lParam; + } NMTTDISPINFO_NEW; + + typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *); + #ifndef TTM_SETMAXTIPWIDTH + # define TTM_SETMAXTIPWIDTH (WM_USER+24) +*** ../vim-7.2.322/src/version.c 2009-12-24 15:45:53.000000000 +0100 +--- src/version.c 2009-12-24 16:08:33.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 323, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +46. Your wife makes a new rule: "The computer cannot come to bed." + + /// 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/vim/vim-7.2/7.2.324 b/vim/vim-7.2/7.2.324 new file mode 100644 index 0000000..8f61b8a --- /dev/null +++ b/vim/vim-7.2/7.2.324 @@ -0,0 +1,66 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.324 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.324 +Problem: A negative column argument in setpos() may cause a crash. +Solution: Check for invalid column number. (James Vega) +Files: src/eval.c, src/misc2.c + + +*** ../vim-7.2.323/src/eval.c 2009-12-24 15:00:31.000000000 +0100 +--- src/eval.c 2009-12-31 13:09:19.000000000 +0100 +*************** +*** 15542,15548 **** + { + if (list2fpos(&argvars[1], &pos, &fnum) == OK) + { +! --pos.col; + if (name[0] == '.' && name[1] == NUL) + { + /* set cursor */ +--- 15542,15549 ---- + { + if (list2fpos(&argvars[1], &pos, &fnum) == OK) + { +! if (--pos.col < 0) +! pos.col = 0; + if (name[0] == '.' && name[1] == NUL) + { + /* set cursor */ +*** ../vim-7.2.323/src/misc2.c 2009-11-25 17:15:16.000000000 +0100 +--- src/misc2.c 2009-12-31 13:12:36.000000000 +0100 +*************** +*** 528,533 **** +--- 528,535 ---- + #endif + } + } ++ else if (curwin->w_cursor.col < 0) ++ curwin->w_cursor.col = 0; + + #ifdef FEAT_VIRTUALEDIT + /* If virtual editing is on, we can leave the cursor on the old position, +*** ../vim-7.2.323/src/version.c 2009-12-24 16:11:24.000000000 +0100 +--- src/version.c 2009-12-31 13:17:25.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 324, + /**/ + +-- +"Thou shalt not follow the Null Pointer, for at its end Chaos and +Madness lie." + + /// 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/vim/vim-7.2/7.2.325 b/vim/vim-7.2/7.2.325 new file mode 100644 index 0000000..77a6e08 --- /dev/null +++ b/vim/vim-7.2/7.2.325 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.325 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.325 +Problem: A stray "w" in the startup vimrc file causes the edited file to be + replaced with an empty file. (Stone Kang). +Solution: Do not write a buffer when it has never been loaded. +Files: src/fileio.c + + +*** ../vim-7.2.324/src/fileio.c 2009-12-02 13:32:10.000000000 +0100 +--- src/fileio.c 2009-12-31 14:08:31.000000000 +0100 +*************** +*** 2981,2986 **** +--- 2981,2993 ---- + + if (fname == NULL || *fname == NUL) /* safety check */ + return FAIL; ++ if (buf->b_ml.ml_mfp == NULL) ++ { ++ /* This can happen during startup when there is a stray "w" in the ++ * vimrc file. */ ++ EMSG(_(e_emptybuf)); ++ return FAIL; ++ } + + /* + * Disallow writing from .exrc and .vimrc in current directory for +*** ../vim-7.2.324/src/version.c 2009-12-31 13:18:05.000000000 +0100 +--- src/version.c 2009-12-31 14:52:29.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 325, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +74. Your most erotic dreams are about cybersex + + /// 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/vim/vim-7.2/7.2.326 b/vim/vim-7.2/7.2.326 new file mode 100644 index 0000000..8e988a8 --- /dev/null +++ b/vim/vim-7.2/7.2.326 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.326 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.326 +Problem: Win32: $HOME doesn't work when %HOMEPATH% is not defined. +Solution: Use "\" for %HOMEPATH% when it is not defined. +Files: src/misc1.c + + +*** ../vim-7.2.325/src/misc1.c 2009-12-02 17:47:46.000000000 +0100 +--- src/misc1.c 2010-01-05 19:53:23.000000000 +0100 +*************** +*** 3470,3476 **** + + homedrive = mch_getenv((char_u *)"HOMEDRIVE"); + homepath = mch_getenv((char_u *)"HOMEPATH"); +! if (homedrive != NULL && homepath != NULL + && STRLEN(homedrive) + STRLEN(homepath) < MAXPATHL) + { + sprintf((char *)NameBuff, "%s%s", homedrive, homepath); +--- 3470,3478 ---- + + homedrive = mch_getenv((char_u *)"HOMEDRIVE"); + homepath = mch_getenv((char_u *)"HOMEPATH"); +! if (homepath == NULL || *homepath == NUL) +! homepath = "\\"; +! if (homedrive != NULL + && STRLEN(homedrive) + STRLEN(homepath) < MAXPATHL) + { + sprintf((char *)NameBuff, "%s%s", homedrive, homepath); +*** ../vim-7.2.325/src/version.c 2009-12-31 14:52:48.000000000 +0100 +--- src/version.c 2010-01-06 17:39:23.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 326, + /**/ + +-- +From "know your smileys": + :q vi user saying, "How do I get out of this damn emacs editor?" + + /// 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/vim/vim-7.2/7.2.327 b/vim/vim-7.2/7.2.327 new file mode 100644 index 0000000..4bfb077 --- /dev/null +++ b/vim/vim-7.2/7.2.327 @@ -0,0 +1,323 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.327 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.327 +Problem: Unused functions in Workshop. +Solution: Add "#if 0" and minor cleanup. (Dominique Pelle) +Files: src/workshop.c, src/integration.c, src/ingegration.h + + +*** ../vim-7.2.326/src/workshop.c 2009-05-21 23:25:38.000000000 +0200 +--- src/workshop.c 2010-01-06 18:10:10.000000000 +0100 +*************** +*** 56,67 **** + static void load_window(char *, int lnum); + static void warp_to_pc(int); + #ifdef FEAT_BEVAL +! void workshop_beval_cb(BalloonEval *, int); + #endif + static char *fixAccelText(char *); + static void addMenu(char *, char *, char *); + static char *lookupVerb(char *, int); +- static int computeIndex(int, char_u *, int); + static void coloncmd(char *, Boolean); + + extern Widget vimShell; +--- 56,67 ---- + static void load_window(char *, int lnum); + static void warp_to_pc(int); + #ifdef FEAT_BEVAL +! void workshop_beval_cb(BalloonEval *, int); +! static int computeIndex(int, char_u *, int); + #endif + static char *fixAccelText(char *); + static void addMenu(char *, char *, char *); + static char *lookupVerb(char *, int); + static void coloncmd(char *, Boolean); + + extern Widget vimShell; +*************** +*** 1624,1631 **** + } + } + } +- #endif +- + + static int + computeIndex( +--- 1624,1629 ---- +*************** +*** 1649,1654 **** +--- 1647,1653 ---- + + return -1; + } ++ #endif + + static void + addMenu( +*** ../vim-7.2.326/src/integration.c 2008-06-24 22:27:10.000000000 +0200 +--- src/integration.c 2010-01-06 18:18:11.000000000 +0100 +*************** +*** 78,84 **** + + /* Functions private to this file */ + static void workshop_connection_closed(void); +! static void messageFromEserve(XtPointer clientData, int *NOTUSED1, XtInputId *NOTUSED2); + static void workshop_disconnect(void); + static void workshop_sensitivity(int num, char *table); + static void adjust_sign_name(char *filename); +--- 78,84 ---- + + /* Functions private to this file */ + static void workshop_connection_closed(void); +! static void messageFromEserve(XtPointer clientData, int *dum1, XtInputId *dum2); + static void workshop_disconnect(void); + static void workshop_sensitivity(int num, char *table); + static void adjust_sign_name(char *filename); +*************** +*** 157,165 **** + + } + +- /*ARGSUSED*/ + void +! messageFromEserve(XtPointer clientData, int *NOTUSED1, XtInputId *NOTUSED2) + { + char *cmd; /* the 1st word of the command */ + +--- 157,166 ---- + + } + + void +! messageFromEserve(XtPointer clientData UNUSED, +! int *dum1 UNUSED, +! XtInputId *dum2 UNUSED) + { + char *cmd; /* the 1st word of the command */ + +*************** +*** 199,205 **** + if (sign) { + sign++; + } +! /* Change sign name to accomodate a different size? */ + adjust_sign_name(sign); + workshop_add_mark_type(idx, color, sign); + } +--- 200,206 ---- + if (sign) { + sign++; + } +! /* Change sign name to accommodate a different size? */ + adjust_sign_name(sign); + workshop_add_mark_type(idx, color, sign); + } +*************** +*** 580,586 **** + #endif + + +! /* Change sign name to accomodate a different size: + * Create the filename based on the height. The filename format + * of multisize icons are: + * x.xpm : largest icon +--- 581,587 ---- + #endif + + +! /* Change sign name to accommodate a different size: + * Create the filename based on the height. The filename format + * of multisize icons are: + * x.xpm : largest icon +*************** +*** 614,619 **** +--- 615,621 ---- + strcpy(s, ".xpm"); + } + ++ #if 0 + /* Were we invoked by WorkShop? This function can be used early during startup + if you want to do things differently if the editor is started standalone + or in WorkShop mode. For example, in standalone mode you may not want to +*************** +*** 627,632 **** +--- 629,635 ---- + } + return result; + } ++ #endif + + /* Connect back to eserve */ + void workshop_connect(XtAppContext context) +*************** +*** 750,755 **** +--- 753,759 ---- + * Utility functions + */ + ++ #if 0 + /* Set icon for the window */ + void + workshop_set_icon(Display *display, Widget shell, char **xpmdata, +*************** +*** 793,798 **** +--- 797,803 ---- + } + XtFree((char *)xpmAttributes.colorsymbols); + } ++ #endif + + /* Minimize and maximize shells. From libutil's shell.cc. */ + +*************** +*** 927,933 **** + return success; + } + +! + Boolean workshop_get_rows_cols(int *rows, int *cols) + { + static int r = 0; +--- 932,938 ---- + return success; + } + +! #if 0 + Boolean workshop_get_rows_cols(int *rows, int *cols) + { + static int r = 0; +*************** +*** 958,963 **** +--- 963,969 ---- + } + return success; + } ++ #endif + + /* + * Toolbar code +*************** +*** 1043,1054 **** + } + + +! + /* + * Send information to eserve on certain editor events + * You must make sure these are called when necessary + */ +- + void workshop_file_closed(char *filename) + { + char buffer[2*MAXPATHLEN]; +--- 1049,1059 ---- + } + + +! #if 0 + /* + * Send information to eserve on certain editor events + * You must make sure these are called when necessary + */ + void workshop_file_closed(char *filename) + { + char buffer[2*MAXPATHLEN]; +*************** +*** 1056,1061 **** +--- 1061,1067 ---- + NOCATGETS("deletedFile %s\n"), filename); + write(sd, buffer, strlen(buffer)); + } ++ #endif + + void workshop_file_closed_lineno(char *filename, int lineno) + { +*************** +*** 1086,1106 **** + workshop_moved_marks(filename); + } + +! void workshop_move_mark(char *filename, int markId, int newLineno) + { + char buffer[2*MAXPATHLEN]; + vim_snprintf(buffer, sizeof(buffer), +! NOCATGETS("moveMark %s %d %d\n"), filename, markId, newLineno); + write(sd, buffer, strlen(buffer)); + } + +! void workshop_file_modified(char *filename) + { + char buffer[2*MAXPATHLEN]; + vim_snprintf(buffer, sizeof(buffer), +! NOCATGETS("modifiedFile %s\n"), filename); + write(sd, buffer, strlen(buffer)); + } + + void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h) + { +--- 1092,1114 ---- + workshop_moved_marks(filename); + } + +! #if 0 +! void workshop_file_modified(char *filename) + { + char buffer[2*MAXPATHLEN]; + vim_snprintf(buffer, sizeof(buffer), +! NOCATGETS("modifiedFile %s\n"), filename); + write(sd, buffer, strlen(buffer)); + } + +! void workshop_move_mark(char *filename, int markId, int newLineno) + { + char buffer[2*MAXPATHLEN]; + vim_snprintf(buffer, sizeof(buffer), +! NOCATGETS("moveMark %s %d %d\n"), filename, markId, newLineno); + write(sd, buffer, strlen(buffer)); + } ++ #endif + + void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h) + { +*************** +*** 1179,1188 **** +--- 1187,1198 ---- + } + + /* Send a message to eserve */ ++ #if defined(NOHANDS_SUPPORT_FUNCTIONS) || defined(FEAT_BEVAL) + void workshop_send_message(char *buf) + { + write(sd, buf, strlen(buf)); + } ++ #endif + + /* Some methods, like currentFile, cursorPos, etc. are missing here. + * But it looks like these are used for NoHands testing only so we +*** ../vim-7.2.326/src/version.c 2010-01-06 17:46:03.000000000 +0100 +--- src/version.c 2010-01-06 18:20:41.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 327, + /**/ + +-- +From "know your smileys": + (:-# Said something he shouldn't have + + /// 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/vim/vim-7.2/7.2.328 b/vim/vim-7.2/7.2.328 new file mode 100644 index 0000000..f547fb9 --- /dev/null +++ b/vim/vim-7.2/7.2.328 @@ -0,0 +1,52 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.328 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.328 +Problem: has("win64") does not return 1 on 64 bit MS-Windows version. +Solution: Also check for _WIN64 besides WIN64. +Files: src/eval.c + + +*** ../vim-7.2.327/src/eval.c 2009-12-31 13:18:05.000000000 +0100 +--- src/eval.c 2010-01-06 16:28:23.000000000 +0100 +*************** +*** 11453,11459 **** + #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__)) + "win32unix", + #endif +! #ifdef WIN64 + "win64", + #endif + #ifdef EBCDIC +--- 11453,11459 ---- + #if defined(UNIX) && (defined(__CYGWIN32__) || defined(__CYGWIN__)) + "win32unix", + #endif +! #if defined(WIN64) || defined(_WIN64) + "win64", + #endif + #ifdef EBCDIC +*** ../vim-7.2.327/src/version.c 2010-01-06 18:24:53.000000000 +0100 +--- src/version.c 2010-01-12 12:10:06.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 328, + /**/ + +-- +From "know your smileys": + :.-( Crying + + /// 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/vim/vim-7.2/7.2.329 b/vim/vim-7.2/7.2.329 new file mode 100644 index 0000000..f92bc65 --- /dev/null +++ b/vim/vim-7.2/7.2.329 @@ -0,0 +1,48 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.329 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.329 +Problem: "g_" doesn't position cursor correctly when in Visual mode and + 'selection' is "exclusive". (Ben Fritz) +Solution: Call adjust_for_sel(). +Files: src/normal.c + + +*** ../vim-7.2.328/src/normal.c 2009-12-24 15:00:31.000000000 +0100 +--- src/normal.c 2010-01-09 15:19:47.000000000 +0100 +*************** +*** 7873,7878 **** +--- 7873,7881 ---- + && vim_iswhite(ptr[curwin->w_cursor.col])) + --curwin->w_cursor.col; + curwin->w_set_curswant = TRUE; ++ #ifdef FEAT_VISUAL ++ adjust_for_sel(cap); ++ #endif + } + break; + +*** ../vim-7.2.328/src/version.c 2010-01-12 12:48:40.000000000 +0100 +--- src/version.c 2010-01-12 15:41:13.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 329, + /**/ + +-- +From "know your smileys": + |-( Contact lenses, but has lost them + + /// 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/vim/vim-7.2/7.2.330 b/vim/vim-7.2/7.2.330 new file mode 100644 index 0000000..0d9c3f1 --- /dev/null +++ b/vim/vim-7.2/7.2.330 @@ -0,0 +1,1531 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.330 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.330 +Problem: Tables for Unicode case operators are outdated. +Solution: Add a Vim script for generating the tables. Include tables for + Unicode 5.2. +Files: runtime/tools/README.txt, runtime/tools/unicode.vim, src/mbyte.c + + +*** ../vim-7.2.329/runtime/tools/README.txt 2005-12-02 01:47:43.000000000 +0100 +--- runtime/tools/README.txt 2010-01-12 19:43:13.000000000 +0100 +*************** +*** 32,35 **** +--- 32,37 ---- + xcmdsrv_client.c: Example for a client program that communicates with a Vim + server through the X-Windows interface. + ++ unicode.vim Vim script to generate tables for src/mbyte.c. ++ + [xxd (and tee for OS/2) can be found in the src directory] +*** ../vim-7.2.329/runtime/tools/unicode.vim 2010-01-12 19:47:33.000000000 +0100 +--- runtime/tools/unicode.vim 2010-01-12 19:42:14.000000000 +0100 +*************** +*** 0 **** +--- 1,280 ---- ++ " Script to extract tables from Unicode .txt files, to be used in src/mbyte.c. ++ " The format of the UnicodeData.txt file is explained here: ++ " http://www.unicode.org/Public/5.1.0/ucd/UCD.html ++ " For the other files see the header. ++ " ++ " Usage: Vim -S ++ " ++ " Author: Bram Moolenaar ++ " Last Update: 2010 Jan 12 ++ ++ " Parse lines of UnicodeData.txt. Creates a list of lists in s:dataprops. ++ func! ParseDataToProps() ++ let s:dataprops = [] ++ let lnum = 1 ++ while lnum <= line('$') ++ let l = split(getline(lnum), '\s*;\s*', 1) ++ if len(l) != 15 ++ echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 15' ++ return ++ endif ++ call add(s:dataprops, l) ++ let lnum += 1 ++ endwhile ++ endfunc ++ ++ " Parse lines of CaseFolding.txt. Creates a list of lists in s:foldprops. ++ func! ParseFoldProps() ++ let s:foldprops = [] ++ let lnum = 1 ++ while lnum <= line('$') ++ let line = getline(lnum) ++ if line !~ '^#' && line !~ '^\s*$' ++ let l = split(line, '\s*;\s*', 1) ++ if len(l) != 4 ++ echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 4' ++ return ++ endif ++ call add(s:foldprops, l) ++ endif ++ let lnum += 1 ++ endwhile ++ endfunc ++ ++ " Parse lines of EastAsianWidth.txt. Creates a list of lists in s:widthprops. ++ func! ParseWidthProps() ++ let s:widthprops = [] ++ let lnum = 1 ++ while lnum <= line('$') ++ let line = getline(lnum) ++ if line !~ '^#' && line !~ '^\s*$' ++ let l = split(line, '\s*;\s*', 1) ++ if len(l) != 2 ++ echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 2' ++ return ++ endif ++ call add(s:widthprops, l) ++ endif ++ let lnum += 1 ++ endwhile ++ endfunc ++ ++ " Build the toLower or toUpper table in a new buffer. ++ " Uses s:dataprops. ++ func! BuildCaseTable(name, index) ++ let start = -1 ++ let end = -1 ++ let step = 0 ++ let add = -1 ++ let ranges = [] ++ for p in s:dataprops ++ if p[a:index] != '' ++ let n = ('0x' . p[0]) + 0 ++ let nl = ('0x' . p[a:index]) + 0 ++ if start >= 0 && add == nl - n && (step == 0 || n - end == step) ++ " continue with same range. ++ let step = n - end ++ let end = n ++ else ++ if start >= 0 ++ " produce previous range ++ call Range(ranges, start, end, step, add) ++ endif ++ let start = n ++ let end = n ++ let step = 0 ++ let add = nl - n ++ endif ++ endif ++ endfor ++ if start >= 0 ++ call Range(ranges, start, end, step, add) ++ endif ++ ++ " New buffer to put the result in. ++ new ++ exe "file to" . a:name ++ call setline(1, "static convertStruct to" . a:name . "[] =") ++ call setline(2, "{") ++ call append('$', ranges) ++ call setline('$', getline('$')[:-2]) " remove last comma ++ call setline(line('$') + 1, "};") ++ wincmd p ++ endfunc ++ ++ " Build the foldCase table in a new buffer. ++ " Uses s:foldprops. ++ func! BuildFoldTable() ++ let start = -1 ++ let end = -1 ++ let step = 0 ++ let add = -1 ++ let ranges = [] ++ for p in s:foldprops ++ if p[1] == 'C' || p[1] == 'S' ++ let n = ('0x' . p[0]) + 0 ++ let nl = ('0x' . p[2]) + 0 ++ if start >= 0 && add == nl - n && (step == 0 || n - end == step) ++ " continue with same range. ++ let step = n - end ++ let end = n ++ else ++ if start >= 0 ++ " produce previous range ++ call Range(ranges, start, end, step, add) ++ endif ++ let start = n ++ let end = n ++ let step = 0 ++ let add = nl - n ++ endif ++ endif ++ endfor ++ if start >= 0 ++ call Range(ranges, start, end, step, add) ++ endif ++ ++ " New buffer to put the result in. ++ new ++ file foldCase ++ call setline(1, "static convertStruct foldCase[] =") ++ call setline(2, "{") ++ call append('$', ranges) ++ call setline('$', getline('$')[:-2]) " remove last comma ++ call setline(line('$') + 1, "};") ++ wincmd p ++ endfunc ++ ++ func! Range(ranges, start, end, step, add) ++ let s = printf("\t{0x%x,0x%x,%d,%d},", a:start, a:end, a:step == 0 ? -1 : a:step, a:add) ++ call add(a:ranges, s) ++ endfunc ++ ++ " Build the combining table. ++ " Uses s:dataprops. ++ func! BuildCombiningTable() ++ let start = -1 ++ let end = -1 ++ let ranges = [] ++ for p in s:dataprops ++ if p[2] == 'Mn' || p[2] == 'Mc' || p[2] == 'Me' ++ let n = ('0x' . p[0]) + 0 ++ if start >= 0 && end + 1 == n ++ " continue with same range. ++ let end = n ++ else ++ if start >= 0 ++ " produce previous range ++ call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) ++ endif ++ let start = n ++ let end = n ++ endif ++ endif ++ endfor ++ if start >= 0 ++ call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) ++ endif ++ ++ " New buffer to put the result in. ++ new ++ file combining ++ call setline(1, " static struct interval combining[] =") ++ call setline(2, " {") ++ call append('$', ranges) ++ call setline('$', getline('$')[:-2]) " remove last comma ++ call setline(line('$') + 1, " };") ++ wincmd p ++ endfunc ++ ++ " Build the ambiguous table in a new buffer. ++ " Uses s:widthprops and s:dataprops. ++ func! BuildAmbiguousTable() ++ let start = -1 ++ let end = -1 ++ let ranges = [] ++ let dataidx = 0 ++ for p in s:widthprops ++ if p[1][0] == 'A' ++ let n = ('0x' . p[0]) + 0 ++ " Find this char in the data table. ++ while 1 ++ let dn = ('0x' . s:dataprops[dataidx][0]) + 0 ++ if dn >= n ++ break ++ endif ++ let dataidx += 1 ++ endwhile ++ if dn != n ++ echoerr "Cannot find character " . n . " in data table" ++ endif ++ " Only use the char when it's not a composing char. ++ let dp = s:dataprops[dataidx] ++ if dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me' ++ if start >= 0 && end + 1 == n ++ " continue with same range. ++ let end = n ++ else ++ if start >= 0 ++ " produce previous range ++ call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) ++ endif ++ let start = n ++ if p[0] =~ '\.\.' ++ let end = ('0x' . substitute(p[0], '.*\.\.', '', '')) + 0 ++ else ++ let end = n ++ endif ++ endif ++ endif ++ endif ++ endfor ++ if start >= 0 ++ call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) ++ endif ++ ++ " New buffer to put the result in. ++ new ++ file ambiguous ++ call setline(1, " static struct interval ambiguous[] =") ++ call setline(2, " {") ++ call append('$', ranges) ++ call setline('$', getline('$')[:-2]) " remove last comma ++ call setline(line('$') + 1, " };") ++ wincmd p ++ endfunc ++ ++ ++ ++ " Edit the Unicode text file. Requires the netrw plugin. ++ edit http://unicode.org/Public/UNIDATA/UnicodeData.txt ++ ++ " Parse each line, create a list of lists. ++ call ParseDataToProps() ++ ++ " Build the toLower table. ++ call BuildCaseTable("Lower", 13) ++ ++ " Build the toUpper table. ++ call BuildCaseTable("Upper", 12) ++ ++ " Build the ranges of composing chars. ++ call BuildCombiningTable() ++ ++ " Edit the case folding text file. Requires the netrw plugin. ++ edit http://www.unicode.org/Public/UNIDATA/CaseFolding.txt ++ ++ " Parse each line, create a list of lists. ++ call ParseFoldProps() ++ ++ " Build the foldCase table. ++ call BuildFoldTable() ++ ++ " Edit the width text file. Requires the netrw plugin. ++ edit http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt ++ ++ " Parse each line, create a list of lists. ++ call ParseWidthProps() ++ ++ " Build the ambiguous table. ++ call BuildAmbiguousTable() +*** ../vim-7.2.329/src/mbyte.c 2009-12-02 15:03:24.000000000 +0100 +--- src/mbyte.c 2010-01-12 19:35:49.000000000 +0100 +*************** +*** 26,32 **** + * Recognizing bytes is easy: 0xxx.xxxx is a single-byte + * char, 10xx.xxxx is a trailing byte, 11xx.xxxx is a leading + * byte of a multi-byte character. +! * To make things complicated, up to two composing characters + * are allowed. These are drawn on top of the first char. + * For most editing the sequence of bytes with composing + * characters included is considered to be one character. +--- 26,32 ---- + * Recognizing bytes is easy: 0xxx.xxxx is a single-byte + * char, 10xx.xxxx is a trailing byte, 11xx.xxxx is a leading + * byte of a multi-byte character. +! * To make things complicated, up to six composing characters + * are allowed. These are drawn on top of the first char. + * For most editing the sequence of bytes with composing + * characters included is considered to be one character. +*************** +*** 1153,1160 **** + + struct interval + { +! unsigned short first; +! unsigned short last; + }; + static int intable __ARGS((struct interval *table, size_t size, int c)); + +--- 1153,1160 ---- + + struct interval + { +! long first; +! long last; + }; + static int intable __ARGS((struct interval *table, size_t size, int c)); + +*************** +*** 1200,1261 **** + utf_char2cells(c) + int c; + { +! /* sorted list of non-overlapping intervals of East Asian Ambiguous +! * characters, generated with: +! * "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */ +! static struct interval ambiguous[] = { +! {0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8}, +! {0x00AA, 0x00AA}, {0x00AE, 0x00AE}, {0x00B0, 0x00B4}, +! {0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6}, +! {0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1}, +! {0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED}, +! {0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA}, +! {0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101}, +! {0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B}, +! {0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133}, +! {0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144}, +! {0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153}, +! {0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE}, +! {0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4}, +! {0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA}, +! {0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261}, +! {0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB}, +! {0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB}, +! {0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0391, 0x03A1}, +! {0x03A3, 0x03A9}, {0x03B1, 0x03C1}, {0x03C3, 0x03C9}, +! {0x0401, 0x0401}, {0x0410, 0x044F}, {0x0451, 0x0451}, +! {0x2010, 0x2010}, {0x2013, 0x2016}, {0x2018, 0x2019}, +! {0x201C, 0x201D}, {0x2020, 0x2022}, {0x2024, 0x2027}, +! {0x2030, 0x2030}, {0x2032, 0x2033}, {0x2035, 0x2035}, +! {0x203B, 0x203B}, {0x203E, 0x203E}, {0x2074, 0x2074}, +! {0x207F, 0x207F}, {0x2081, 0x2084}, {0x20AC, 0x20AC}, +! {0x2103, 0x2103}, {0x2105, 0x2105}, {0x2109, 0x2109}, +! {0x2113, 0x2113}, {0x2116, 0x2116}, {0x2121, 0x2122}, +! {0x2126, 0x2126}, {0x212B, 0x212B}, {0x2153, 0x2154}, +! {0x215B, 0x215E}, {0x2160, 0x216B}, {0x2170, 0x2179}, +! {0x2190, 0x2199}, {0x21B8, 0x21B9}, {0x21D2, 0x21D2}, +! {0x21D4, 0x21D4}, {0x21E7, 0x21E7}, {0x2200, 0x2200}, +! {0x2202, 0x2203}, {0x2207, 0x2208}, {0x220B, 0x220B}, +! {0x220F, 0x220F}, {0x2211, 0x2211}, {0x2215, 0x2215}, +! {0x221A, 0x221A}, {0x221D, 0x2220}, {0x2223, 0x2223}, +! {0x2225, 0x2225}, {0x2227, 0x222C}, {0x222E, 0x222E}, +! {0x2234, 0x2237}, {0x223C, 0x223D}, {0x2248, 0x2248}, +! {0x224C, 0x224C}, {0x2252, 0x2252}, {0x2260, 0x2261}, +! {0x2264, 0x2267}, {0x226A, 0x226B}, {0x226E, 0x226F}, +! {0x2282, 0x2283}, {0x2286, 0x2287}, {0x2295, 0x2295}, +! {0x2299, 0x2299}, {0x22A5, 0x22A5}, {0x22BF, 0x22BF}, +! {0x2312, 0x2312}, {0x2460, 0x24E9}, {0x24EB, 0x254B}, +! {0x2550, 0x2573}, {0x2580, 0x258F}, {0x2592, 0x2595}, +! {0x25A0, 0x25A1}, {0x25A3, 0x25A9}, {0x25B2, 0x25B3}, +! {0x25B6, 0x25B7}, {0x25BC, 0x25BD}, {0x25C0, 0x25C1}, +! {0x25C6, 0x25C8}, {0x25CB, 0x25CB}, {0x25CE, 0x25D1}, +! {0x25E2, 0x25E5}, {0x25EF, 0x25EF}, {0x2605, 0x2606}, +! {0x2609, 0x2609}, {0x260E, 0x260F}, {0x2614, 0x2615}, +! {0x261C, 0x261C}, {0x261E, 0x261E}, {0x2640, 0x2640}, +! {0x2642, 0x2642}, {0x2660, 0x2661}, {0x2663, 0x2665}, +! {0x2667, 0x266A}, {0x266C, 0x266D}, {0x266F, 0x266F}, +! {0x273D, 0x273D}, {0x2776, 0x277F}, {0xE000, 0xF8FF}, +! {0xFFFD, 0xFFFD}, /* {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD} */ + }; + + if (c >= 0x100) +--- 1200,1390 ---- + utf_char2cells(c) + int c; + { +! /* Sorted list of non-overlapping intervals of East Asian Ambiguous +! * characters, generated with ../runtime/tools/unicode.vim. */ +! static struct interval ambiguous[] = +! { +! {0x00a1, 0x00a1}, +! {0x00a4, 0x00a4}, +! {0x00a7, 0x00a8}, +! {0x00aa, 0x00aa}, +! {0x00ad, 0x00ae}, +! {0x00b0, 0x00b4}, +! {0x00b6, 0x00ba}, +! {0x00bc, 0x00bf}, +! {0x00c6, 0x00c6}, +! {0x00d0, 0x00d0}, +! {0x00d7, 0x00d8}, +! {0x00de, 0x00e1}, +! {0x00e6, 0x00e6}, +! {0x00e8, 0x00ea}, +! {0x00ec, 0x00ed}, +! {0x00f0, 0x00f0}, +! {0x00f2, 0x00f3}, +! {0x00f7, 0x00fa}, +! {0x00fc, 0x00fc}, +! {0x00fe, 0x00fe}, +! {0x0101, 0x0101}, +! {0x0111, 0x0111}, +! {0x0113, 0x0113}, +! {0x011b, 0x011b}, +! {0x0126, 0x0127}, +! {0x012b, 0x012b}, +! {0x0131, 0x0133}, +! {0x0138, 0x0138}, +! {0x013f, 0x0142}, +! {0x0144, 0x0144}, +! {0x0148, 0x014b}, +! {0x014d, 0x014d}, +! {0x0152, 0x0153}, +! {0x0166, 0x0167}, +! {0x016b, 0x016b}, +! {0x01ce, 0x01ce}, +! {0x01d0, 0x01d0}, +! {0x01d2, 0x01d2}, +! {0x01d4, 0x01d4}, +! {0x01d6, 0x01d6}, +! {0x01d8, 0x01d8}, +! {0x01da, 0x01da}, +! {0x01dc, 0x01dc}, +! {0x0251, 0x0251}, +! {0x0261, 0x0261}, +! {0x02c4, 0x02c4}, +! {0x02c7, 0x02c7}, +! {0x02c9, 0x02cb}, +! {0x02cd, 0x02cd}, +! {0x02d0, 0x02d0}, +! {0x02d8, 0x02db}, +! {0x02dd, 0x02dd}, +! {0x02df, 0x02df}, +! {0x0391, 0x03a1}, +! {0x03a3, 0x03a9}, +! {0x03b1, 0x03c1}, +! {0x03c3, 0x03c9}, +! {0x0401, 0x0401}, +! {0x0410, 0x044f}, +! {0x0451, 0x0451}, +! {0x2010, 0x2010}, +! {0x2013, 0x2016}, +! {0x2018, 0x2019}, +! {0x201c, 0x201d}, +! {0x2020, 0x2022}, +! {0x2024, 0x2027}, +! {0x2030, 0x2030}, +! {0x2032, 0x2033}, +! {0x2035, 0x2035}, +! {0x203b, 0x203b}, +! {0x203e, 0x203e}, +! {0x2074, 0x2074}, +! {0x207f, 0x207f}, +! {0x2081, 0x2084}, +! {0x20ac, 0x20ac}, +! {0x2103, 0x2103}, +! {0x2105, 0x2105}, +! {0x2109, 0x2109}, +! {0x2113, 0x2113}, +! {0x2116, 0x2116}, +! {0x2121, 0x2122}, +! {0x2126, 0x2126}, +! {0x212b, 0x212b}, +! {0x2153, 0x2154}, +! {0x215b, 0x215e}, +! {0x2160, 0x216b}, +! {0x2170, 0x2179}, +! {0x2189, 0x2189}, +! {0x2190, 0x2199}, +! {0x21b8, 0x21b9}, +! {0x21d2, 0x21d2}, +! {0x21d4, 0x21d4}, +! {0x21e7, 0x21e7}, +! {0x2200, 0x2200}, +! {0x2202, 0x2203}, +! {0x2207, 0x2208}, +! {0x220b, 0x220b}, +! {0x220f, 0x220f}, +! {0x2211, 0x2211}, +! {0x2215, 0x2215}, +! {0x221a, 0x221a}, +! {0x221d, 0x2220}, +! {0x2223, 0x2223}, +! {0x2225, 0x2225}, +! {0x2227, 0x222c}, +! {0x222e, 0x222e}, +! {0x2234, 0x2237}, +! {0x223c, 0x223d}, +! {0x2248, 0x2248}, +! {0x224c, 0x224c}, +! {0x2252, 0x2252}, +! {0x2260, 0x2261}, +! {0x2264, 0x2267}, +! {0x226a, 0x226b}, +! {0x226e, 0x226f}, +! {0x2282, 0x2283}, +! {0x2286, 0x2287}, +! {0x2295, 0x2295}, +! {0x2299, 0x2299}, +! {0x22a5, 0x22a5}, +! {0x22bf, 0x22bf}, +! {0x2312, 0x2312}, +! {0x2460, 0x24e9}, +! {0x24eb, 0x254b}, +! {0x2550, 0x2573}, +! {0x2580, 0x258f}, +! {0x2592, 0x2595}, +! {0x25a0, 0x25a1}, +! {0x25a3, 0x25a9}, +! {0x25b2, 0x25b3}, +! {0x25b6, 0x25b7}, +! {0x25bc, 0x25bd}, +! {0x25c0, 0x25c1}, +! {0x25c6, 0x25c8}, +! {0x25cb, 0x25cb}, +! {0x25ce, 0x25d1}, +! {0x25e2, 0x25e5}, +! {0x25ef, 0x25ef}, +! {0x2605, 0x2606}, +! {0x2609, 0x2609}, +! {0x260e, 0x260f}, +! {0x2614, 0x2615}, +! {0x261c, 0x261c}, +! {0x261e, 0x261e}, +! {0x2640, 0x2640}, +! {0x2642, 0x2642}, +! {0x2660, 0x2661}, +! {0x2663, 0x2665}, +! {0x2667, 0x266a}, +! {0x266c, 0x266d}, +! {0x266f, 0x266f}, +! {0x269e, 0x269f}, +! {0x26be, 0x26bf}, +! {0x26c4, 0x26cd}, +! {0x26cf, 0x26e1}, +! {0x26e3, 0x26e3}, +! {0x26e8, 0x26ff}, +! {0x273d, 0x273d}, +! {0x2757, 0x2757}, +! {0x2776, 0x277f}, +! {0x2b55, 0x2b59}, +! {0x3248, 0x324f}, +! {0xe000, 0xf8ff}, +! {0xfffd, 0xfffd}, +! {0x1f100, 0x1f10a}, +! {0x1f110, 0x1f12d}, +! {0x1f131, 0x1f131}, +! {0x1f13d, 0x1f13d}, +! {0x1f13f, 0x1f13f}, +! {0x1f142, 0x1f142}, +! {0x1f146, 0x1f146}, +! {0x1f14a, 0x1f14e}, +! {0x1f157, 0x1f157}, +! {0x1f15f, 0x1f15f}, +! {0x1f179, 0x1f179}, +! {0x1f17b, 0x1f17c}, +! {0x1f17f, 0x1f17f}, +! {0x1f18a, 0x1f18d}, +! {0x1f190, 0x1f190}, +! {0xf0000, 0xffffd}, +! {0x100000, 0x10fffd} + }; + + if (c >= 0x100) +*************** +*** 1807,1813 **** + return 1; + + /* +! * Check for composing characters. We can handle only the first two, but + * skip all of them (otherwise the cursor would get stuck). + */ + #ifdef FEAT_ARABIC +--- 1936,1942 ---- + return 1; + + /* +! * Check for composing characters. We can handle only the first six, but + * skip all of them (otherwise the cursor would get stuck). + */ + #ifdef FEAT_ARABIC +*************** +*** 1855,1861 **** + return 1; + + /* +! * Check for composing characters. We can handle only the first two, but + * skip all of them (otherwise the cursor would get stuck). + */ + #ifdef FEAT_ARABIC +--- 1984,1990 ---- + return 1; + + /* +! * Check for composing characters. We can handle only the first six, but + * skip all of them (otherwise the cursor would get stuck). + */ + #ifdef FEAT_ARABIC +*************** +*** 1973,2010 **** + utf_iscomposing(c) + int c; + { +! /* sorted list of non-overlapping intervals */ + static struct interval combining[] = + { +! {0x0300, 0x034f}, {0x0360, 0x036f}, {0x0483, 0x0486}, {0x0488, 0x0489}, +! {0x0591, 0x05a1}, {0x05a3, 0x05b9}, {0x05bb, 0x05bd}, {0x05bf, 0x05bf}, +! {0x05c1, 0x05c2}, {0x05c4, 0x05c4}, {0x0610, 0x0615}, {0x064b, 0x0658}, +! {0x0670, 0x0670}, {0x06d6, 0x06dc}, {0x06de, 0x06e4}, {0x06e7, 0x06e8}, +! {0x06ea, 0x06ed}, {0x0711, 0x0711}, {0x0730, 0x074a}, {0x07a6, 0x07b0}, +! {0x0901, 0x0903}, {0x093c, 0x093c}, {0x093e, 0x094d}, {0x0951, 0x0954}, +! {0x0962, 0x0963}, {0x0981, 0x0983}, {0x09bc, 0x09bc}, {0x09be, 0x09c4}, +! {0x09c7, 0x09c8}, {0x09cb, 0x09cd}, {0x09d7, 0x09d7}, {0x09e2, 0x09e3}, +! {0x0a01, 0x0a03}, {0x0a3c, 0x0a3c}, {0x0a3e, 0x0a42}, {0x0a47, 0x0a48}, +! {0x0a4b, 0x0a4d}, {0x0a70, 0x0a71}, {0x0a81, 0x0a83}, {0x0abc, 0x0abc}, +! {0x0abe, 0x0ac5}, {0x0ac7, 0x0ac9}, {0x0acb, 0x0acd}, {0x0ae2, 0x0ae3}, +! {0x0b01, 0x0b03}, {0x0b3c, 0x0b3c}, {0x0b3e, 0x0b43}, {0x0b47, 0x0b48}, +! {0x0b4b, 0x0b4d}, {0x0b56, 0x0b57}, {0x0b82, 0x0b82}, {0x0bbe, 0x0bc2}, +! {0x0bc6, 0x0bc8}, {0x0bca, 0x0bcd}, {0x0bd7, 0x0bd7}, {0x0c01, 0x0c03}, +! {0x0c3e, 0x0c44}, {0x0c46, 0x0c48}, {0x0c4a, 0x0c4d}, {0x0c55, 0x0c56}, +! {0x0c82, 0x0c83}, {0x0cbc, 0x0cbc}, {0x0cbe, 0x0cc4}, {0x0cc6, 0x0cc8}, +! {0x0cca, 0x0ccd}, {0x0cd5, 0x0cd6}, {0x0d02, 0x0d03}, {0x0d3e, 0x0d43}, +! {0x0d46, 0x0d48}, {0x0d4a, 0x0d4d}, {0x0d57, 0x0d57}, {0x0d82, 0x0d83}, +! {0x0dca, 0x0dca}, {0x0dcf, 0x0dd4}, {0x0dd6, 0x0dd6}, {0x0dd8, 0x0ddf}, +! {0x0df2, 0x0df3}, {0x0e31, 0x0e31}, {0x0e34, 0x0e3a}, {0x0e47, 0x0e4e}, +! {0x0eb1, 0x0eb1}, {0x0eb4, 0x0eb9}, {0x0ebb, 0x0ebc}, {0x0ec8, 0x0ecd}, +! {0x0f18, 0x0f19}, {0x0f35, 0x0f35}, {0x0f37, 0x0f37}, {0x0f39, 0x0f39}, +! {0x0f3e, 0x0f3f}, {0x0f71, 0x0f84}, {0x0f86, 0x0f87}, {0x0f90, 0x0f97}, +! {0x0f99, 0x0fbc}, {0x0fc6, 0x0fc6}, {0x102c, 0x1032}, {0x1036, 0x1039}, +! {0x1056, 0x1059}, {0x1712, 0x1714}, {0x1732, 0x1734}, {0x1752, 0x1753}, +! {0x1772, 0x1773}, {0x17b6, 0x17d3}, {0x17dd, 0x17dd}, {0x180b, 0x180d}, +! {0x18a9, 0x18a9}, {0x1920, 0x192b}, {0x1930, 0x193b}, {0x20d0, 0x20ea}, +! {0x302a, 0x302f}, {0x3099, 0x309a}, {0xfb1e, 0xfb1e}, {0xfe00, 0xfe0f}, +! {0xfe20, 0xfe23}, + }; + + return intable(combining, sizeof(combining), c); +--- 2102,2299 ---- + utf_iscomposing(c) + int c; + { +! /* Sorted list of non-overlapping intervals. +! * Generated by ../runtime/tools/unicode.vim. */ + static struct interval combining[] = + { +! {0x0300, 0x036f}, +! {0x0483, 0x0489}, +! {0x0591, 0x05bd}, +! {0x05bf, 0x05bf}, +! {0x05c1, 0x05c2}, +! {0x05c4, 0x05c5}, +! {0x05c7, 0x05c7}, +! {0x0610, 0x061a}, +! {0x064b, 0x065e}, +! {0x0670, 0x0670}, +! {0x06d6, 0x06dc}, +! {0x06de, 0x06e4}, +! {0x06e7, 0x06e8}, +! {0x06ea, 0x06ed}, +! {0x0711, 0x0711}, +! {0x0730, 0x074a}, +! {0x07a6, 0x07b0}, +! {0x07eb, 0x07f3}, +! {0x0816, 0x0819}, +! {0x081b, 0x0823}, +! {0x0825, 0x0827}, +! {0x0829, 0x082d}, +! {0x0900, 0x0903}, +! {0x093c, 0x093c}, +! {0x093e, 0x094e}, +! {0x0951, 0x0955}, +! {0x0962, 0x0963}, +! {0x0981, 0x0983}, +! {0x09bc, 0x09bc}, +! {0x09be, 0x09c4}, +! {0x09c7, 0x09c8}, +! {0x09cb, 0x09cd}, +! {0x09d7, 0x09d7}, +! {0x09e2, 0x09e3}, +! {0x0a01, 0x0a03}, +! {0x0a3c, 0x0a3c}, +! {0x0a3e, 0x0a42}, +! {0x0a47, 0x0a48}, +! {0x0a4b, 0x0a4d}, +! {0x0a51, 0x0a51}, +! {0x0a70, 0x0a71}, +! {0x0a75, 0x0a75}, +! {0x0a81, 0x0a83}, +! {0x0abc, 0x0abc}, +! {0x0abe, 0x0ac5}, +! {0x0ac7, 0x0ac9}, +! {0x0acb, 0x0acd}, +! {0x0ae2, 0x0ae3}, +! {0x0b01, 0x0b03}, +! {0x0b3c, 0x0b3c}, +! {0x0b3e, 0x0b44}, +! {0x0b47, 0x0b48}, +! {0x0b4b, 0x0b4d}, +! {0x0b56, 0x0b57}, +! {0x0b62, 0x0b63}, +! {0x0b82, 0x0b82}, +! {0x0bbe, 0x0bc2}, +! {0x0bc6, 0x0bc8}, +! {0x0bca, 0x0bcd}, +! {0x0bd7, 0x0bd7}, +! {0x0c01, 0x0c03}, +! {0x0c3e, 0x0c44}, +! {0x0c46, 0x0c48}, +! {0x0c4a, 0x0c4d}, +! {0x0c55, 0x0c56}, +! {0x0c62, 0x0c63}, +! {0x0c82, 0x0c83}, +! {0x0cbc, 0x0cbc}, +! {0x0cbe, 0x0cc4}, +! {0x0cc6, 0x0cc8}, +! {0x0cca, 0x0ccd}, +! {0x0cd5, 0x0cd6}, +! {0x0ce2, 0x0ce3}, +! {0x0d02, 0x0d03}, +! {0x0d3e, 0x0d44}, +! {0x0d46, 0x0d48}, +! {0x0d4a, 0x0d4d}, +! {0x0d57, 0x0d57}, +! {0x0d62, 0x0d63}, +! {0x0d82, 0x0d83}, +! {0x0dca, 0x0dca}, +! {0x0dcf, 0x0dd4}, +! {0x0dd6, 0x0dd6}, +! {0x0dd8, 0x0ddf}, +! {0x0df2, 0x0df3}, +! {0x0e31, 0x0e31}, +! {0x0e34, 0x0e3a}, +! {0x0e47, 0x0e4e}, +! {0x0eb1, 0x0eb1}, +! {0x0eb4, 0x0eb9}, +! {0x0ebb, 0x0ebc}, +! {0x0ec8, 0x0ecd}, +! {0x0f18, 0x0f19}, +! {0x0f35, 0x0f35}, +! {0x0f37, 0x0f37}, +! {0x0f39, 0x0f39}, +! {0x0f3e, 0x0f3f}, +! {0x0f71, 0x0f84}, +! {0x0f86, 0x0f87}, +! {0x0f90, 0x0f97}, +! {0x0f99, 0x0fbc}, +! {0x0fc6, 0x0fc6}, +! {0x102b, 0x103e}, +! {0x1056, 0x1059}, +! {0x105e, 0x1060}, +! {0x1062, 0x1064}, +! {0x1067, 0x106d}, +! {0x1071, 0x1074}, +! {0x1082, 0x108d}, +! {0x108f, 0x108f}, +! {0x109a, 0x109d}, +! {0x135f, 0x135f}, +! {0x1712, 0x1714}, +! {0x1732, 0x1734}, +! {0x1752, 0x1753}, +! {0x1772, 0x1773}, +! {0x17b6, 0x17d3}, +! {0x17dd, 0x17dd}, +! {0x180b, 0x180d}, +! {0x18a9, 0x18a9}, +! {0x1920, 0x192b}, +! {0x1930, 0x193b}, +! {0x19b0, 0x19c0}, +! {0x19c8, 0x19c9}, +! {0x1a17, 0x1a1b}, +! {0x1a55, 0x1a5e}, +! {0x1a60, 0x1a7c}, +! {0x1a7f, 0x1a7f}, +! {0x1b00, 0x1b04}, +! {0x1b34, 0x1b44}, +! {0x1b6b, 0x1b73}, +! {0x1b80, 0x1b82}, +! {0x1ba1, 0x1baa}, +! {0x1c24, 0x1c37}, +! {0x1cd0, 0x1cd2}, +! {0x1cd4, 0x1ce8}, +! {0x1ced, 0x1ced}, +! {0x1cf2, 0x1cf2}, +! {0x1dc0, 0x1de6}, +! {0x1dfd, 0x1dff}, +! {0x20d0, 0x20f0}, +! {0x2cef, 0x2cf1}, +! {0x2de0, 0x2dff}, +! {0x302a, 0x302f}, +! {0x3099, 0x309a}, +! {0xa66f, 0xa672}, +! {0xa67c, 0xa67d}, +! {0xa6f0, 0xa6f1}, +! {0xa802, 0xa802}, +! {0xa806, 0xa806}, +! {0xa80b, 0xa80b}, +! {0xa823, 0xa827}, +! {0xa880, 0xa881}, +! {0xa8b4, 0xa8c4}, +! {0xa8e0, 0xa8f1}, +! {0xa926, 0xa92d}, +! {0xa947, 0xa953}, +! {0xa980, 0xa983}, +! {0xa9b3, 0xa9c0}, +! {0xaa29, 0xaa36}, +! {0xaa43, 0xaa43}, +! {0xaa4c, 0xaa4d}, +! {0xaa7b, 0xaa7b}, +! {0xaab0, 0xaab0}, +! {0xaab2, 0xaab4}, +! {0xaab7, 0xaab8}, +! {0xaabe, 0xaabf}, +! {0xaac1, 0xaac1}, +! {0xabe3, 0xabea}, +! {0xabec, 0xabed}, +! {0xfb1e, 0xfb1e}, +! {0xfe00, 0xfe0f}, +! {0xfe20, 0xfe26}, +! {0x101fd, 0x101fd}, +! {0x10a01, 0x10a03}, +! {0x10a05, 0x10a06}, +! {0x10a0c, 0x10a0f}, +! {0x10a38, 0x10a3a}, +! {0x10a3f, 0x10a3f}, +! {0x11080, 0x11082}, +! {0x110b0, 0x110ba}, +! {0x1d165, 0x1d169}, +! {0x1d16d, 0x1d172}, +! {0x1d17b, 0x1d182}, +! {0x1d185, 0x1d18b}, +! {0x1d1aa, 0x1d1ad}, +! {0x1d242, 0x1d244}, +! {0xe0100, 0xe01ef} + }; + + return intable(combining, sizeof(combining), c); +*************** +*** 2152,2166 **** + * Code for Unicode case-dependent operations. Based on notes in + * http://www.unicode.org/Public/UNIDATA/CaseFolding.txt + * This code uses simple case folding, not full case folding. + */ + + /* +! * The following table is built by foldExtract.pl < CaseFolding.txt . +! * It must be in numeric order, because we use binary search on it. +! * An entry such as {0x41,0x5a,1,32} means that UCS-4 characters in the range +! * from 0x41 to 0x5a inclusive, stepping by 1, are folded by adding 32. + */ +- + typedef struct + { + int rangeStart; +--- 2441,2456 ---- + * Code for Unicode case-dependent operations. Based on notes in + * http://www.unicode.org/Public/UNIDATA/CaseFolding.txt + * This code uses simple case folding, not full case folding. ++ * Last updated for Unicode 5.2. + */ + + /* +! * The following tables are built by ../runtime/tools/unicode.vim. +! * They must be in numeric order, because we use binary search. +! * An entry such as {0x41,0x5a,1,32} means that Unicode characters in the +! * range from 0x41 to 0x5a inclusive, stepping by 1, are changed to +! * folded/upper/lower by adding 32. + */ + typedef struct + { + int rangeStart; +*************** +*** 2171,2211 **** + + static convertStruct foldCase[] = + { +! {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32}, +! {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1}, +! {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121}, +! {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1}, +! {0x186,0x186,-1,206}, {0x187,0x187,-1,1}, {0x189,0x18a,1,205}, +! {0x18b,0x18b,-1,1}, {0x18e,0x18e,-1,79}, {0x18f,0x18f,-1,202}, +! {0x190,0x190,-1,203}, {0x191,0x191,-1,1}, {0x193,0x193,-1,205}, +! {0x194,0x194,-1,207}, {0x196,0x196,-1,211}, {0x197,0x197,-1,209}, +! {0x198,0x198,-1,1}, {0x19c,0x19c,-1,211}, {0x19d,0x19d,-1,213}, +! {0x19f,0x19f,-1,214}, {0x1a0,0x1a4,2,1}, {0x1a6,0x1a6,-1,218}, +! {0x1a7,0x1a7,-1,1}, {0x1a9,0x1a9,-1,218}, {0x1ac,0x1ac,-1,1}, +! {0x1ae,0x1ae,-1,218}, {0x1af,0x1af,-1,1}, {0x1b1,0x1b2,1,217}, +! {0x1b3,0x1b5,2,1}, {0x1b7,0x1b7,-1,219}, {0x1b8,0x1bc,4,1}, +! {0x1c4,0x1c4,-1,2}, {0x1c5,0x1c5,-1,1}, {0x1c7,0x1c7,-1,2}, +! {0x1c8,0x1c8,-1,1}, {0x1ca,0x1ca,-1,2}, {0x1cb,0x1db,2,1}, +! {0x1de,0x1ee,2,1}, {0x1f1,0x1f1,-1,2}, {0x1f2,0x1f4,2,1}, +! {0x1f6,0x1f6,-1,-97}, {0x1f7,0x1f7,-1,-56}, {0x1f8,0x21e,2,1}, +! {0x220,0x220,-1,-130}, {0x222,0x232,2,1}, {0x386,0x386,-1,38}, +! {0x388,0x38a,1,37}, {0x38c,0x38c,-1,64}, {0x38e,0x38f,1,63}, +! {0x391,0x3a1,1,32}, {0x3a3,0x3ab,1,32}, {0x3d8,0x3ee,2,1}, +! {0x3f4,0x3f4,-1,-60}, {0x3f7,0x3f7,-1,1}, {0x3f9,0x3f9,-1,-7}, +! {0x3fa,0x3fa,-1,1}, {0x400,0x40f,1,80}, {0x410,0x42f,1,32}, +! {0x460,0x480,2,1}, {0x48a,0x4be,2,1}, {0x4c1,0x4cd,2,1}, +! {0x4d0,0x4f4,2,1}, {0x4f8,0x500,8,1}, {0x502,0x50e,2,1}, +! {0x531,0x556,1,48}, {0x1e00,0x1e94,2,1}, {0x1ea0,0x1ef8,2,1}, +! {0x1f08,0x1f0f,1,-8}, {0x1f18,0x1f1d,1,-8}, {0x1f28,0x1f2f,1,-8}, +! {0x1f38,0x1f3f,1,-8}, {0x1f48,0x1f4d,1,-8}, {0x1f59,0x1f5f,2,-8}, +! {0x1f68,0x1f6f,1,-8}, {0x1f88,0x1f8f,1,-8}, {0x1f98,0x1f9f,1,-8}, +! {0x1fa8,0x1faf,1,-8}, {0x1fb8,0x1fb9,1,-8}, {0x1fba,0x1fbb,1,-74}, +! {0x1fbc,0x1fbc,-1,-9}, {0x1fc8,0x1fcb,1,-86}, {0x1fcc,0x1fcc,-1,-9}, +! {0x1fd8,0x1fd9,1,-8}, {0x1fda,0x1fdb,1,-100}, {0x1fe8,0x1fe9,1,-8}, +! {0x1fea,0x1feb,1,-112}, {0x1fec,0x1fec,-1,-7}, {0x1ff8,0x1ff9,1,-128}, +! {0x1ffa,0x1ffb,1,-126}, {0x1ffc,0x1ffc,-1,-9}, {0x2126,0x2126,-1,-7517}, +! {0x212a,0x212a,-1,-8383}, {0x212b,0x212b,-1,-8262}, +! {0x2160,0x216f,1,16}, {0x24b6,0x24cf,1,26}, {0xff21,0xff3a,1,32}, + {0x10400,0x10427,1,40} + }; + +--- 2461,2621 ---- + + static convertStruct foldCase[] = + { +! {0x41,0x5a,1,32}, +! {0xb5,0xb5,-1,775}, +! {0xc0,0xd6,1,32}, +! {0xd8,0xde,1,32}, +! {0x100,0x12e,2,1}, +! {0x132,0x136,2,1}, +! {0x139,0x147,2,1}, +! {0x14a,0x176,2,1}, +! {0x178,0x178,-1,-121}, +! {0x179,0x17d,2,1}, +! {0x17f,0x17f,-1,-268}, +! {0x181,0x181,-1,210}, +! {0x182,0x184,2,1}, +! {0x186,0x186,-1,206}, +! {0x187,0x187,-1,1}, +! {0x189,0x18a,1,205}, +! {0x18b,0x18b,-1,1}, +! {0x18e,0x18e,-1,79}, +! {0x18f,0x18f,-1,202}, +! {0x190,0x190,-1,203}, +! {0x191,0x191,-1,1}, +! {0x193,0x193,-1,205}, +! {0x194,0x194,-1,207}, +! {0x196,0x196,-1,211}, +! {0x197,0x197,-1,209}, +! {0x198,0x198,-1,1}, +! {0x19c,0x19c,-1,211}, +! {0x19d,0x19d,-1,213}, +! {0x19f,0x19f,-1,214}, +! {0x1a0,0x1a4,2,1}, +! {0x1a6,0x1a6,-1,218}, +! {0x1a7,0x1a7,-1,1}, +! {0x1a9,0x1a9,-1,218}, +! {0x1ac,0x1ac,-1,1}, +! {0x1ae,0x1ae,-1,218}, +! {0x1af,0x1af,-1,1}, +! {0x1b1,0x1b2,1,217}, +! {0x1b3,0x1b5,2,1}, +! {0x1b7,0x1b7,-1,219}, +! {0x1b8,0x1bc,4,1}, +! {0x1c4,0x1c4,-1,2}, +! {0x1c5,0x1c5,-1,1}, +! {0x1c7,0x1c7,-1,2}, +! {0x1c8,0x1c8,-1,1}, +! {0x1ca,0x1ca,-1,2}, +! {0x1cb,0x1db,2,1}, +! {0x1de,0x1ee,2,1}, +! {0x1f1,0x1f1,-1,2}, +! {0x1f2,0x1f4,2,1}, +! {0x1f6,0x1f6,-1,-97}, +! {0x1f7,0x1f7,-1,-56}, +! {0x1f8,0x21e,2,1}, +! {0x220,0x220,-1,-130}, +! {0x222,0x232,2,1}, +! {0x23a,0x23a,-1,10795}, +! {0x23b,0x23b,-1,1}, +! {0x23d,0x23d,-1,-163}, +! {0x23e,0x23e,-1,10792}, +! {0x241,0x241,-1,1}, +! {0x243,0x243,-1,-195}, +! {0x244,0x244,-1,69}, +! {0x245,0x245,-1,71}, +! {0x246,0x24e,2,1}, +! {0x345,0x345,-1,116}, +! {0x370,0x372,2,1}, +! {0x376,0x376,-1,1}, +! {0x386,0x386,-1,38}, +! {0x388,0x38a,1,37}, +! {0x38c,0x38c,-1,64}, +! {0x38e,0x38f,1,63}, +! {0x391,0x3a1,1,32}, +! {0x3a3,0x3ab,1,32}, +! {0x3c2,0x3c2,-1,1}, +! {0x3cf,0x3cf,-1,8}, +! {0x3d0,0x3d0,-1,-30}, +! {0x3d1,0x3d1,-1,-25}, +! {0x3d5,0x3d5,-1,-15}, +! {0x3d6,0x3d6,-1,-22}, +! {0x3d8,0x3ee,2,1}, +! {0x3f0,0x3f0,-1,-54}, +! {0x3f1,0x3f1,-1,-48}, +! {0x3f4,0x3f4,-1,-60}, +! {0x3f5,0x3f5,-1,-64}, +! {0x3f7,0x3f7,-1,1}, +! {0x3f9,0x3f9,-1,-7}, +! {0x3fa,0x3fa,-1,1}, +! {0x3fd,0x3ff,1,-130}, +! {0x400,0x40f,1,80}, +! {0x410,0x42f,1,32}, +! {0x460,0x480,2,1}, +! {0x48a,0x4be,2,1}, +! {0x4c0,0x4c0,-1,15}, +! {0x4c1,0x4cd,2,1}, +! {0x4d0,0x524,2,1}, +! {0x531,0x556,1,48}, +! {0x10a0,0x10c5,1,7264}, +! {0x1e00,0x1e94,2,1}, +! {0x1e9b,0x1e9b,-1,-58}, +! {0x1e9e,0x1e9e,-1,-7615}, +! {0x1ea0,0x1efe,2,1}, +! {0x1f08,0x1f0f,1,-8}, +! {0x1f18,0x1f1d,1,-8}, +! {0x1f28,0x1f2f,1,-8}, +! {0x1f38,0x1f3f,1,-8}, +! {0x1f48,0x1f4d,1,-8}, +! {0x1f59,0x1f5f,2,-8}, +! {0x1f68,0x1f6f,1,-8}, +! {0x1f88,0x1f8f,1,-8}, +! {0x1f98,0x1f9f,1,-8}, +! {0x1fa8,0x1faf,1,-8}, +! {0x1fb8,0x1fb9,1,-8}, +! {0x1fba,0x1fbb,1,-74}, +! {0x1fbc,0x1fbc,-1,-9}, +! {0x1fbe,0x1fbe,-1,-7173}, +! {0x1fc8,0x1fcb,1,-86}, +! {0x1fcc,0x1fcc,-1,-9}, +! {0x1fd8,0x1fd9,1,-8}, +! {0x1fda,0x1fdb,1,-100}, +! {0x1fe8,0x1fe9,1,-8}, +! {0x1fea,0x1feb,1,-112}, +! {0x1fec,0x1fec,-1,-7}, +! {0x1ff8,0x1ff9,1,-128}, +! {0x1ffa,0x1ffb,1,-126}, +! {0x1ffc,0x1ffc,-1,-9}, +! {0x2126,0x2126,-1,-7517}, +! {0x212a,0x212a,-1,-8383}, +! {0x212b,0x212b,-1,-8262}, +! {0x2132,0x2132,-1,28}, +! {0x2160,0x216f,1,16}, +! {0x2183,0x2183,-1,1}, +! {0x24b6,0x24cf,1,26}, +! {0x2c00,0x2c2e,1,48}, +! {0x2c60,0x2c60,-1,1}, +! {0x2c62,0x2c62,-1,-10743}, +! {0x2c63,0x2c63,-1,-3814}, +! {0x2c64,0x2c64,-1,-10727}, +! {0x2c67,0x2c6b,2,1}, +! {0x2c6d,0x2c6d,-1,-10780}, +! {0x2c6e,0x2c6e,-1,-10749}, +! {0x2c6f,0x2c6f,-1,-10783}, +! {0x2c70,0x2c70,-1,-10782}, +! {0x2c72,0x2c75,3,1}, +! {0x2c7e,0x2c7f,1,-10815}, +! {0x2c80,0x2ce2,2,1}, +! {0x2ceb,0x2ced,2,1}, +! {0xa640,0xa65e,2,1}, +! {0xa662,0xa66c,2,1}, +! {0xa680,0xa696,2,1}, +! {0xa722,0xa72e,2,1}, +! {0xa732,0xa76e,2,1}, +! {0xa779,0xa77b,2,1}, +! {0xa77d,0xa77d,-1,-35332}, +! {0xa77e,0xa786,2,1}, +! {0xa78b,0xa78b,-1,1}, +! {0xff21,0xff3a,1,32}, + {0x10400,0x10427,1,40} + }; + +*************** +*** 2253,2337 **** + return utf_convert(a, foldCase, sizeof(foldCase)); + } + +- /* +- * The following tables are built by upperLowerExtract.pl < UnicodeData.txt . +- * They must be in numeric order, because we use binary search on them. +- * An entry such as {0x41,0x5a,1,32} means that UCS-4 characters in the range +- * from 0x41 to 0x5a inclusive, stepping by 1, are switched to lower (for +- * example) by adding 32. +- */ + static convertStruct toLower[] = + { +! {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32}, +! {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1}, +! {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121}, +! {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1}, +! {0x186,0x186,-1,206}, {0x187,0x187,-1,1}, {0x189,0x18a,1,205}, +! {0x18b,0x18b,-1,1}, {0x18e,0x18e,-1,79}, {0x18f,0x18f,-1,202}, +! {0x190,0x190,-1,203}, {0x191,0x191,-1,1}, {0x193,0x193,-1,205}, +! {0x194,0x194,-1,207}, {0x196,0x196,-1,211}, {0x197,0x197,-1,209}, +! {0x198,0x198,-1,1}, {0x19c,0x19c,-1,211}, {0x19d,0x19d,-1,213}, +! {0x19f,0x19f,-1,214}, {0x1a0,0x1a4,2,1}, {0x1a6,0x1a6,-1,218}, +! {0x1a7,0x1a7,-1,1}, {0x1a9,0x1a9,-1,218}, {0x1ac,0x1ac,-1,1}, +! {0x1ae,0x1ae,-1,218}, {0x1af,0x1af,-1,1}, {0x1b1,0x1b2,1,217}, +! {0x1b3,0x1b5,2,1}, {0x1b7,0x1b7,-1,219}, {0x1b8,0x1bc,4,1}, +! {0x1c4,0x1ca,3,2}, {0x1cd,0x1db,2,1}, {0x1de,0x1ee,2,1}, +! {0x1f1,0x1f1,-1,2}, {0x1f4,0x1f4,-1,1}, {0x1f6,0x1f6,-1,-97}, +! {0x1f7,0x1f7,-1,-56}, {0x1f8,0x21e,2,1}, {0x220,0x220,-1,-130}, +! {0x222,0x232,2,1}, {0x386,0x386,-1,38}, {0x388,0x38a,1,37}, +! {0x38c,0x38c,-1,64}, {0x38e,0x38f,1,63}, {0x391,0x3a1,1,32}, +! {0x3a3,0x3ab,1,32}, {0x3d8,0x3ee,2,1}, {0x3f4,0x3f4,-1,-60}, +! {0x3f7,0x3f7,-1,1}, {0x3f9,0x3f9,-1,-7}, {0x3fa,0x3fa,-1,1}, +! {0x400,0x40f,1,80}, {0x410,0x42f,1,32}, {0x460,0x480,2,1}, +! {0x48a,0x4be,2,1}, {0x4c1,0x4cd,2,1}, {0x4d0,0x4f4,2,1}, +! {0x4f8,0x500,8,1}, {0x502,0x50e,2,1}, {0x531,0x556,1,48}, +! {0x1e00,0x1e94,2,1}, {0x1ea0,0x1ef8,2,1}, {0x1f08,0x1f0f,1,-8}, +! {0x1f18,0x1f1d,1,-8}, {0x1f28,0x1f2f,1,-8}, {0x1f38,0x1f3f,1,-8}, +! {0x1f48,0x1f4d,1,-8}, {0x1f59,0x1f5f,2,-8}, {0x1f68,0x1f6f,1,-8}, +! {0x1fb8,0x1fb9,1,-8}, {0x1fba,0x1fbb,1,-74}, {0x1fc8,0x1fcb,1,-86}, +! {0x1fd8,0x1fd9,1,-8}, {0x1fda,0x1fdb,1,-100}, {0x1fe8,0x1fe9,1,-8}, +! {0x1fea,0x1feb,1,-112}, {0x1fec,0x1fec,-1,-7}, {0x1ff8,0x1ff9,1,-128}, +! {0x1ffa,0x1ffb,1,-126}, {0x2126,0x2126,-1,-7517}, {0x212a,0x212a,-1,-8383}, +! {0x212b,0x212b,-1,-8262}, {0xff21,0xff3a,1,32}, {0x10400,0x10427,1,40} + }; + + static convertStruct toUpper[] = + { +! {0x61,0x7a,1,-32}, {0xb5,0xb5,-1,743}, {0xe0,0xf6,1,-32}, +! {0xf8,0xfe,1,-32}, {0xff,0xff,-1,121}, {0x101,0x12f,2,-1}, +! {0x131,0x131,-1,-232}, {0x133,0x137,2,-1}, {0x13a,0x148,2,-1}, +! {0x14b,0x177,2,-1}, {0x17a,0x17e,2,-1}, {0x17f,0x17f,-1,-300}, +! {0x183,0x185,2,-1}, {0x188,0x18c,4,-1}, {0x192,0x192,-1,-1}, +! {0x195,0x195,-1,97}, {0x199,0x199,-1,-1}, {0x19e,0x19e,-1,130}, +! {0x1a1,0x1a5,2,-1}, {0x1a8,0x1ad,5,-1}, {0x1b0,0x1b4,4,-1}, +! {0x1b6,0x1b9,3,-1}, {0x1bd,0x1bd,-1,-1}, {0x1bf,0x1bf,-1,56}, +! {0x1c5,0x1c6,1,-1}, {0x1c8,0x1c9,1,-1}, {0x1cb,0x1cc,1,-1}, +! {0x1ce,0x1dc,2,-1}, {0x1dd,0x1dd,-1,-79}, {0x1df,0x1ef,2,-1}, +! {0x1f2,0x1f3,1,-1}, {0x1f5,0x1f9,4,-1}, {0x1fb,0x21f,2,-1}, +! {0x223,0x233,2,-1}, {0x253,0x253,-1,-210}, {0x254,0x254,-1,-206}, +! {0x256,0x257,1,-205}, {0x259,0x259,-1,-202}, {0x25b,0x25b,-1,-203}, +! {0x260,0x260,-1,-205}, {0x263,0x263,-1,-207}, {0x268,0x268,-1,-209}, +! {0x269,0x26f,6,-211}, {0x272,0x272,-1,-213}, {0x275,0x275,-1,-214}, +! {0x280,0x283,3,-218}, {0x288,0x288,-1,-218}, {0x28a,0x28b,1,-217}, +! {0x292,0x292,-1,-219}, {0x3ac,0x3ac,-1,-38}, {0x3ad,0x3af,1,-37}, +! {0x3b1,0x3c1,1,-32}, {0x3c2,0x3c2,-1,-31}, {0x3c3,0x3cb,1,-32}, +! {0x3cc,0x3cc,-1,-64}, {0x3cd,0x3ce,1,-63}, {0x3d0,0x3d0,-1,-62}, +! {0x3d1,0x3d1,-1,-57}, {0x3d5,0x3d5,-1,-47}, {0x3d6,0x3d6,-1,-54}, +! {0x3d9,0x3ef,2,-1}, {0x3f0,0x3f0,-1,-86}, {0x3f1,0x3f1,-1,-80}, +! {0x3f2,0x3f2,-1,7}, {0x3f5,0x3f5,-1,-96}, {0x3f8,0x3fb,3,-1}, +! {0x430,0x44f,1,-32}, {0x450,0x45f,1,-80}, {0x461,0x481,2,-1}, +! {0x48b,0x4bf,2,-1}, {0x4c2,0x4ce,2,-1}, {0x4d1,0x4f5,2,-1}, +! {0x4f9,0x501,8,-1}, {0x503,0x50f,2,-1}, {0x561,0x586,1,-48}, +! {0x1e01,0x1e95,2,-1}, {0x1e9b,0x1e9b,-1,-59}, {0x1ea1,0x1ef9,2,-1}, +! {0x1f00,0x1f07,1,8}, {0x1f10,0x1f15,1,8}, {0x1f20,0x1f27,1,8}, +! {0x1f30,0x1f37,1,8}, {0x1f40,0x1f45,1,8}, {0x1f51,0x1f57,2,8}, +! {0x1f60,0x1f67,1,8}, {0x1f70,0x1f71,1,74}, {0x1f72,0x1f75,1,86}, +! {0x1f76,0x1f77,1,100}, {0x1f78,0x1f79,1,128}, {0x1f7a,0x1f7b,1,112}, +! {0x1f7c,0x1f7d,1,126}, {0x1f80,0x1f87,1,8}, {0x1f90,0x1f97,1,8}, +! {0x1fa0,0x1fa7,1,8}, {0x1fb0,0x1fb1,1,8}, {0x1fb3,0x1fb3,-1,9}, +! {0x1fbe,0x1fbe,-1,-7205}, {0x1fc3,0x1fc3,-1,9}, {0x1fd0,0x1fd1,1,8}, +! {0x1fe0,0x1fe1,1,8}, {0x1fe5,0x1fe5,-1,7}, {0x1ff3,0x1ff3,-1,9}, +! {0xff41,0xff5a,1,-32}, {0x10428,0x1044f,1,-40} + }; + + /* +--- 2663,2968 ---- + return utf_convert(a, foldCase, sizeof(foldCase)); + } + + static convertStruct toLower[] = + { +! {0x41,0x5a,1,32}, +! {0xc0,0xd6,1,32}, +! {0xd8,0xde,1,32}, +! {0x100,0x12e,2,1}, +! {0x130,0x130,-1,-199}, +! {0x132,0x136,2,1}, +! {0x139,0x147,2,1}, +! {0x14a,0x176,2,1}, +! {0x178,0x178,-1,-121}, +! {0x179,0x17d,2,1}, +! {0x181,0x181,-1,210}, +! {0x182,0x184,2,1}, +! {0x186,0x186,-1,206}, +! {0x187,0x187,-1,1}, +! {0x189,0x18a,1,205}, +! {0x18b,0x18b,-1,1}, +! {0x18e,0x18e,-1,79}, +! {0x18f,0x18f,-1,202}, +! {0x190,0x190,-1,203}, +! {0x191,0x191,-1,1}, +! {0x193,0x193,-1,205}, +! {0x194,0x194,-1,207}, +! {0x196,0x196,-1,211}, +! {0x197,0x197,-1,209}, +! {0x198,0x198,-1,1}, +! {0x19c,0x19c,-1,211}, +! {0x19d,0x19d,-1,213}, +! {0x19f,0x19f,-1,214}, +! {0x1a0,0x1a4,2,1}, +! {0x1a6,0x1a6,-1,218}, +! {0x1a7,0x1a7,-1,1}, +! {0x1a9,0x1a9,-1,218}, +! {0x1ac,0x1ac,-1,1}, +! {0x1ae,0x1ae,-1,218}, +! {0x1af,0x1af,-1,1}, +! {0x1b1,0x1b2,1,217}, +! {0x1b3,0x1b5,2,1}, +! {0x1b7,0x1b7,-1,219}, +! {0x1b8,0x1bc,4,1}, +! {0x1c4,0x1c4,-1,2}, +! {0x1c5,0x1c5,-1,1}, +! {0x1c7,0x1c7,-1,2}, +! {0x1c8,0x1c8,-1,1}, +! {0x1ca,0x1ca,-1,2}, +! {0x1cb,0x1db,2,1}, +! {0x1de,0x1ee,2,1}, +! {0x1f1,0x1f1,-1,2}, +! {0x1f2,0x1f4,2,1}, +! {0x1f6,0x1f6,-1,-97}, +! {0x1f7,0x1f7,-1,-56}, +! {0x1f8,0x21e,2,1}, +! {0x220,0x220,-1,-130}, +! {0x222,0x232,2,1}, +! {0x23a,0x23a,-1,10795}, +! {0x23b,0x23b,-1,1}, +! {0x23d,0x23d,-1,-163}, +! {0x23e,0x23e,-1,10792}, +! {0x241,0x241,-1,1}, +! {0x243,0x243,-1,-195}, +! {0x244,0x244,-1,69}, +! {0x245,0x245,-1,71}, +! {0x246,0x24e,2,1}, +! {0x370,0x372,2,1}, +! {0x376,0x376,-1,1}, +! {0x386,0x386,-1,38}, +! {0x388,0x38a,1,37}, +! {0x38c,0x38c,-1,64}, +! {0x38e,0x38f,1,63}, +! {0x391,0x3a1,1,32}, +! {0x3a3,0x3ab,1,32}, +! {0x3cf,0x3cf,-1,8}, +! {0x3d8,0x3ee,2,1}, +! {0x3f4,0x3f4,-1,-60}, +! {0x3f7,0x3f7,-1,1}, +! {0x3f9,0x3f9,-1,-7}, +! {0x3fa,0x3fa,-1,1}, +! {0x3fd,0x3ff,1,-130}, +! {0x400,0x40f,1,80}, +! {0x410,0x42f,1,32}, +! {0x460,0x480,2,1}, +! {0x48a,0x4be,2,1}, +! {0x4c0,0x4c0,-1,15}, +! {0x4c1,0x4cd,2,1}, +! {0x4d0,0x524,2,1}, +! {0x531,0x556,1,48}, +! {0x10a0,0x10c5,1,7264}, +! {0x1e00,0x1e94,2,1}, +! {0x1e9e,0x1e9e,-1,-7615}, +! {0x1ea0,0x1efe,2,1}, +! {0x1f08,0x1f0f,1,-8}, +! {0x1f18,0x1f1d,1,-8}, +! {0x1f28,0x1f2f,1,-8}, +! {0x1f38,0x1f3f,1,-8}, +! {0x1f48,0x1f4d,1,-8}, +! {0x1f59,0x1f5f,2,-8}, +! {0x1f68,0x1f6f,1,-8}, +! {0x1f88,0x1f8f,1,-8}, +! {0x1f98,0x1f9f,1,-8}, +! {0x1fa8,0x1faf,1,-8}, +! {0x1fb8,0x1fb9,1,-8}, +! {0x1fba,0x1fbb,1,-74}, +! {0x1fbc,0x1fbc,-1,-9}, +! {0x1fc8,0x1fcb,1,-86}, +! {0x1fcc,0x1fcc,-1,-9}, +! {0x1fd8,0x1fd9,1,-8}, +! {0x1fda,0x1fdb,1,-100}, +! {0x1fe8,0x1fe9,1,-8}, +! {0x1fea,0x1feb,1,-112}, +! {0x1fec,0x1fec,-1,-7}, +! {0x1ff8,0x1ff9,1,-128}, +! {0x1ffa,0x1ffb,1,-126}, +! {0x1ffc,0x1ffc,-1,-9}, +! {0x2126,0x2126,-1,-7517}, +! {0x212a,0x212a,-1,-8383}, +! {0x212b,0x212b,-1,-8262}, +! {0x2132,0x2132,-1,28}, +! {0x2160,0x216f,1,16}, +! {0x2183,0x2183,-1,1}, +! {0x24b6,0x24cf,1,26}, +! {0x2c00,0x2c2e,1,48}, +! {0x2c60,0x2c60,-1,1}, +! {0x2c62,0x2c62,-1,-10743}, +! {0x2c63,0x2c63,-1,-3814}, +! {0x2c64,0x2c64,-1,-10727}, +! {0x2c67,0x2c6b,2,1}, +! {0x2c6d,0x2c6d,-1,-10780}, +! {0x2c6e,0x2c6e,-1,-10749}, +! {0x2c6f,0x2c6f,-1,-10783}, +! {0x2c70,0x2c70,-1,-10782}, +! {0x2c72,0x2c75,3,1}, +! {0x2c7e,0x2c7f,1,-10815}, +! {0x2c80,0x2ce2,2,1}, +! {0x2ceb,0x2ced,2,1}, +! {0xa640,0xa65e,2,1}, +! {0xa662,0xa66c,2,1}, +! {0xa680,0xa696,2,1}, +! {0xa722,0xa72e,2,1}, +! {0xa732,0xa76e,2,1}, +! {0xa779,0xa77b,2,1}, +! {0xa77d,0xa77d,-1,-35332}, +! {0xa77e,0xa786,2,1}, +! {0xa78b,0xa78b,-1,1}, +! {0xff21,0xff3a,1,32}, +! {0x10400,0x10427,1,40} + }; + + static convertStruct toUpper[] = + { +! {0x61,0x7a,1,-32}, +! {0xb5,0xb5,-1,743}, +! {0xe0,0xf6,1,-32}, +! {0xf8,0xfe,1,-32}, +! {0xff,0xff,-1,121}, +! {0x101,0x12f,2,-1}, +! {0x131,0x131,-1,-232}, +! {0x133,0x137,2,-1}, +! {0x13a,0x148,2,-1}, +! {0x14b,0x177,2,-1}, +! {0x17a,0x17e,2,-1}, +! {0x17f,0x17f,-1,-300}, +! {0x180,0x180,-1,195}, +! {0x183,0x185,2,-1}, +! {0x188,0x18c,4,-1}, +! {0x192,0x192,-1,-1}, +! {0x195,0x195,-1,97}, +! {0x199,0x199,-1,-1}, +! {0x19a,0x19a,-1,163}, +! {0x19e,0x19e,-1,130}, +! {0x1a1,0x1a5,2,-1}, +! {0x1a8,0x1ad,5,-1}, +! {0x1b0,0x1b4,4,-1}, +! {0x1b6,0x1b9,3,-1}, +! {0x1bd,0x1bd,-1,-1}, +! {0x1bf,0x1bf,-1,56}, +! {0x1c5,0x1c5,-1,-1}, +! {0x1c6,0x1c6,-1,-2}, +! {0x1c8,0x1c8,-1,-1}, +! {0x1c9,0x1c9,-1,-2}, +! {0x1cb,0x1cb,-1,-1}, +! {0x1cc,0x1cc,-1,-2}, +! {0x1ce,0x1dc,2,-1}, +! {0x1dd,0x1dd,-1,-79}, +! {0x1df,0x1ef,2,-1}, +! {0x1f2,0x1f2,-1,-1}, +! {0x1f3,0x1f3,-1,-2}, +! {0x1f5,0x1f9,4,-1}, +! {0x1fb,0x21f,2,-1}, +! {0x223,0x233,2,-1}, +! {0x23c,0x23c,-1,-1}, +! {0x23f,0x240,1,10815}, +! {0x242,0x247,5,-1}, +! {0x249,0x24f,2,-1}, +! {0x250,0x250,-1,10783}, +! {0x251,0x251,-1,10780}, +! {0x252,0x252,-1,10782}, +! {0x253,0x253,-1,-210}, +! {0x254,0x254,-1,-206}, +! {0x256,0x257,1,-205}, +! {0x259,0x259,-1,-202}, +! {0x25b,0x25b,-1,-203}, +! {0x260,0x260,-1,-205}, +! {0x263,0x263,-1,-207}, +! {0x268,0x268,-1,-209}, +! {0x269,0x269,-1,-211}, +! {0x26b,0x26b,-1,10743}, +! {0x26f,0x26f,-1,-211}, +! {0x271,0x271,-1,10749}, +! {0x272,0x272,-1,-213}, +! {0x275,0x275,-1,-214}, +! {0x27d,0x27d,-1,10727}, +! {0x280,0x283,3,-218}, +! {0x288,0x288,-1,-218}, +! {0x289,0x289,-1,-69}, +! {0x28a,0x28b,1,-217}, +! {0x28c,0x28c,-1,-71}, +! {0x292,0x292,-1,-219}, +! {0x345,0x345,-1,84}, +! {0x371,0x373,2,-1}, +! {0x377,0x377,-1,-1}, +! {0x37b,0x37d,1,130}, +! {0x3ac,0x3ac,-1,-38}, +! {0x3ad,0x3af,1,-37}, +! {0x3b1,0x3c1,1,-32}, +! {0x3c2,0x3c2,-1,-31}, +! {0x3c3,0x3cb,1,-32}, +! {0x3cc,0x3cc,-1,-64}, +! {0x3cd,0x3ce,1,-63}, +! {0x3d0,0x3d0,-1,-62}, +! {0x3d1,0x3d1,-1,-57}, +! {0x3d5,0x3d5,-1,-47}, +! {0x3d6,0x3d6,-1,-54}, +! {0x3d7,0x3d7,-1,-8}, +! {0x3d9,0x3ef,2,-1}, +! {0x3f0,0x3f0,-1,-86}, +! {0x3f1,0x3f1,-1,-80}, +! {0x3f2,0x3f2,-1,7}, +! {0x3f5,0x3f5,-1,-96}, +! {0x3f8,0x3fb,3,-1}, +! {0x430,0x44f,1,-32}, +! {0x450,0x45f,1,-80}, +! {0x461,0x481,2,-1}, +! {0x48b,0x4bf,2,-1}, +! {0x4c2,0x4ce,2,-1}, +! {0x4cf,0x4cf,-1,-15}, +! {0x4d1,0x525,2,-1}, +! {0x561,0x586,1,-48}, +! {0x1d79,0x1d79,-1,35332}, +! {0x1d7d,0x1d7d,-1,3814}, +! {0x1e01,0x1e95,2,-1}, +! {0x1e9b,0x1e9b,-1,-59}, +! {0x1ea1,0x1eff,2,-1}, +! {0x1f00,0x1f07,1,8}, +! {0x1f10,0x1f15,1,8}, +! {0x1f20,0x1f27,1,8}, +! {0x1f30,0x1f37,1,8}, +! {0x1f40,0x1f45,1,8}, +! {0x1f51,0x1f57,2,8}, +! {0x1f60,0x1f67,1,8}, +! {0x1f70,0x1f71,1,74}, +! {0x1f72,0x1f75,1,86}, +! {0x1f76,0x1f77,1,100}, +! {0x1f78,0x1f79,1,128}, +! {0x1f7a,0x1f7b,1,112}, +! {0x1f7c,0x1f7d,1,126}, +! {0x1f80,0x1f87,1,8}, +! {0x1f90,0x1f97,1,8}, +! {0x1fa0,0x1fa7,1,8}, +! {0x1fb0,0x1fb1,1,8}, +! {0x1fb3,0x1fb3,-1,9}, +! {0x1fbe,0x1fbe,-1,-7205}, +! {0x1fc3,0x1fc3,-1,9}, +! {0x1fd0,0x1fd1,1,8}, +! {0x1fe0,0x1fe1,1,8}, +! {0x1fe5,0x1fe5,-1,7}, +! {0x1ff3,0x1ff3,-1,9}, +! {0x214e,0x214e,-1,-28}, +! {0x2170,0x217f,1,-16}, +! {0x2184,0x2184,-1,-1}, +! {0x24d0,0x24e9,1,-26}, +! {0x2c30,0x2c5e,1,-48}, +! {0x2c61,0x2c61,-1,-1}, +! {0x2c65,0x2c65,-1,-10795}, +! {0x2c66,0x2c66,-1,-10792}, +! {0x2c68,0x2c6c,2,-1}, +! {0x2c73,0x2c76,3,-1}, +! {0x2c81,0x2ce3,2,-1}, +! {0x2cec,0x2cee,2,-1}, +! {0x2d00,0x2d25,1,-7264}, +! {0xa641,0xa65f,2,-1}, +! {0xa663,0xa66d,2,-1}, +! {0xa681,0xa697,2,-1}, +! {0xa723,0xa72f,2,-1}, +! {0xa733,0xa76f,2,-1}, +! {0xa77a,0xa77c,2,-1}, +! {0xa77f,0xa787,2,-1}, +! {0xa78c,0xa78c,-1,-1}, +! {0xff41,0xff5a,1,-32}, +! {0x10428,0x1044f,1,-40} + }; + + /* +*** ../vim-7.2.329/src/version.c 2010-01-12 15:42:03.000000000 +0100 +--- src/version.c 2010-01-12 18:16:55.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 330, + /**/ + +-- +From "know your smileys": + <|-) Chinese + <|-( Chinese and doesn't like these kind of jokes + + /// 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/vim/vim-7.2/7.2.331 b/vim/vim-7.2/7.2.331 new file mode 100644 index 0000000..82f40a2 --- /dev/null +++ b/vim/vim-7.2/7.2.331 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.331 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.331 +Problem: Can't interrupt "echo list" for a very long list. +Solution: Call line_breakcheck() in list_join(). +Files: src/eval.c + + +*** ../vim-7.2.330/src/eval.c 2010-01-12 12:48:40.000000000 +0100 +--- src/eval.c 2010-01-12 15:59:28.000000000 +0100 +*************** +*** 6475,6480 **** +--- 6475,6481 ---- + vim_free(tofree); + if (s == NULL) + return FAIL; ++ line_breakcheck(); + } + return OK; + } +*** ../vim-7.2.330/src/version.c 2010-01-12 19:48:57.000000000 +0100 +--- src/version.c 2010-01-19 12:44:02.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 331, + /**/ + + +-- +hundred-and-one symptoms of being an internet addict: +116. You are living with your boyfriend who networks your respective + computers so you can sit in separate rooms and email each other + + /// 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/vim/vim-7.2/7.2.332 b/vim/vim-7.2/7.2.332 new file mode 100644 index 0000000..7956d1e --- /dev/null +++ b/vim/vim-7.2/7.2.332 @@ -0,0 +1,101 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.332 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.332 +Problem: Crash when spell correcting triggers an autocommand that reloads + the buffer. +Solution: Make a copy of the line to be modified. (Dominique Pelle) +Files: src/spell.c + + +*** ../vim-7.2.331/src/spell.c 2009-07-22 11:03:38.000000000 +0200 +--- src/spell.c 2010-01-19 12:44:42.000000000 +0100 +*************** +*** 10306,10312 **** + /* Figure out if the word should be capitalised. */ + need_cap = check_need_cap(curwin->w_cursor.lnum, curwin->w_cursor.col); + +! line = ml_get_curline(); + + /* Get the list of suggestions. Limit to 'lines' - 2 or the number in + * 'spellsuggest', whatever is smaller. */ +--- 10306,10315 ---- + /* Figure out if the word should be capitalised. */ + need_cap = check_need_cap(curwin->w_cursor.lnum, curwin->w_cursor.col); + +! /* Make a copy of current line since autocommands may free the line. */ +! line = vim_strsave(ml_get_curline()); +! if (line == NULL) +! goto skip; + + /* Get the list of suggestions. Limit to 'lines' - 2 or the number in + * 'spellsuggest', whatever is smaller. */ +*************** +*** 10470,10475 **** +--- 10473,10480 ---- + curwin->w_cursor = prev_cursor; + + spell_find_cleanup(&sug); ++ skip: ++ vim_free(line); + } + + /* +*************** +*** 10931,10937 **** + rescore_suggestions(su); + + /* +! * While going throught the soundfold tree "su_maxscore" is the score + * for the soundfold word, limits the changes that are being tried, + * and "su_sfmaxscore" the rescored score, which is set by + * cleanup_suggestions(). +--- 10936,10942 ---- + rescore_suggestions(su); + + /* +! * While going through the soundfold tree "su_maxscore" is the score + * for the soundfold word, limits the changes that are being tried, + * and "su_sfmaxscore" the rescored score, which is set by + * cleanup_suggestions(). +*************** +*** 11415,11421 **** + char_u tword[MAXWLEN]; /* good word collected so far */ + trystate_T stack[MAXWLEN]; + char_u preword[MAXWLEN * 3]; /* word found with proper case; +! * concatanation of prefix compound + * words and split word. NUL terminated + * when going deeper but not when coming + * back. */ +--- 11420,11426 ---- + char_u tword[MAXWLEN]; /* good word collected so far */ + trystate_T stack[MAXWLEN]; + char_u preword[MAXWLEN * 3]; /* word found with proper case; +! * concatenation of prefix compound + * words and split word. NUL terminated + * when going deeper but not when coming + * back. */ +*** ../vim-7.2.331/src/version.c 2010-01-19 12:46:51.000000000 +0100 +--- src/version.c 2010-01-19 13:05:32.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 332, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +117. You are more comfortable typing in 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/vim/vim-7.2/7.2.333 b/vim/vim-7.2/7.2.333 new file mode 100644 index 0000000..02273b6 --- /dev/null +++ b/vim/vim-7.2/7.2.333 @@ -0,0 +1,371 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.333 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.333 +Problem: Warnings from static code analysis. +Solution: Small changes to various lines. (Dominique Pelle) +Files: src/buffer.c, src/edit.c, src/ex_getln.c, src/fileio.c, + src/if_cscope.c, src/netbeans.c, src/ops.c, src/quickfix.c, + src/syntax.c, src/ui.c + + +*** ../vim-7.2.332/src/buffer.c 2009-05-17 13:30:58.000000000 +0200 +--- src/buffer.c 2010-01-19 12:50:24.000000000 +0100 +*************** +*** 315,321 **** + { + #ifdef FEAT_AUTOCMD + int is_curbuf; +! int nwindows = buf->b_nwindows; + #endif + int unload_buf = (action != 0); + int del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE); +--- 315,321 ---- + { + #ifdef FEAT_AUTOCMD + int is_curbuf; +! int nwindows; + #endif + int unload_buf = (action != 0); + int del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE); +*** ../vim-7.2.332/src/edit.c 2009-12-24 15:45:53.000000000 +0100 +--- src/edit.c 2010-01-19 12:53:18.000000000 +0100 +*************** +*** 4048,4054 **** + save_p_ic = p_ic; + p_ic = ignorecase(compl_pattern); + +! /* Find up to TAG_MANY matches. Avoids that an enourmous number + * of matches is found when compl_pattern is empty */ + if (find_tags(compl_pattern, &num_matches, &matches, + TAG_REGEXP | TAG_NAMES | TAG_NOIC | +--- 4048,4054 ---- + save_p_ic = p_ic; + p_ic = ignorecase(compl_pattern); + +! /* Find up to TAG_MANY matches. Avoids that an enormous number + * of matches is found when compl_pattern is empty */ + if (find_tags(compl_pattern, &num_matches, &matches, + TAG_REGEXP | TAG_NAMES | TAG_NOIC | +*************** +*** 4219,4225 **** + || IObuff[len - 2] == '!')))) + IObuff[len++] = ' '; + } +! /* copy as much as posible of the new word */ + if (tmp_ptr - ptr >= IOSIZE - len) + tmp_ptr = ptr + IOSIZE - len - 1; + STRNCPY(IObuff + len, ptr, tmp_ptr - ptr); +--- 4219,4225 ---- + || IObuff[len - 2] == '!')))) + IObuff[len++] = ' '; + } +! /* copy as much as possible of the new word */ + if (tmp_ptr - ptr >= IOSIZE - len) + tmp_ptr = ptr + IOSIZE - len - 1; + STRNCPY(IObuff + len, ptr, tmp_ptr - ptr); +*************** +*** 5827,5836 **** + #endif + && !has_format_option(FO_WRAP)) + +- { +- textwidth = 0; + break; +- } + if ((startcol = curwin->w_cursor.col) == 0) + break; + +--- 5827,5833 ---- +*** ../vim-7.2.332/src/ex_getln.c 2009-12-02 17:15:04.000000000 +0100 +--- src/ex_getln.c 2010-01-19 12:54:47.000000000 +0100 +*************** +*** 2193,2199 **** + { + if (ga_grow(&line_ga, 40) == FAIL) + break; +- pend = (char_u *)line_ga.ga_data + line_ga.ga_len; + + /* Get one character at a time. Don't use inchar(), it can't handle + * special characters. */ +--- 2193,2198 ---- +*************** +*** 3314,3320 **** + WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE + |options, type); + vim_free(p1); +! /* longest match: make sure it is not shorter (happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) + { + for (j = 0; j < xp->xp_pattern_len; ++j) +--- 3313,3319 ---- + WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE + |options, type); + vim_free(p1); +! /* longest match: make sure it is not shorter, happens with :help */ + if (p2 != NULL && type == WILD_LONGEST) + { + for (j = 0; j < xp->xp_pattern_len; ++j) +*** ../vim-7.2.332/src/fileio.c 2009-12-31 14:52:48.000000000 +0100 +--- src/fileio.c 2010-01-19 12:56:59.000000000 +0100 +*************** +*** 7072,7079 **** + */ + for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i) + { +- size_t itmplen; + # ifndef HAVE_MKDTEMP + long nr; + long off; + # endif +--- 7072,7079 ---- + */ + for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i) + { + # ifndef HAVE_MKDTEMP ++ size_t itmplen; + long nr; + long off; + # endif +*************** +*** 7091,7097 **** + else + # endif + add_pathsep(itmp); +- itmplen = STRLEN(itmp); + + # ifdef HAVE_MKDTEMP + /* Leave room for filename */ +--- 7091,7096 ---- +*************** +*** 7104,7109 **** +--- 7103,7109 ---- + * otherwise it doesn't matter. The use of mkdir() avoids any + * security problems because of the predictable number. */ + nr = (mch_get_pid() + (long)time(NULL)) % 1000000L; ++ itmplen = STRLEN(itmp); + + /* Try up to 10000 different values until we find a name that + * doesn't exist. */ +*** ../vim-7.2.332/src/if_cscope.c 2009-07-09 21:22:36.000000000 +0200 +--- src/if_cscope.c 2010-01-19 12:57:58.000000000 +0100 +*************** +*** 2069,2075 **** + continue; + (void)strcpy(tbuf, matches[idx]); + +! if ((fname = strtok(tbuf, (const char *)"\t")) == NULL) + continue; + if ((fname = strtok(NULL, (const char *)"\t")) == NULL) + continue; +--- 2069,2075 ---- + continue; + (void)strcpy(tbuf, matches[idx]); + +! if (strtok(tbuf, (const char *)"\t") == NULL) + continue; + if ((fname = strtok(NULL, (const char *)"\t")) == NULL) + continue; +*** ../vim-7.2.332/src/netbeans.c 2009-09-11 14:19:41.000000000 +0200 +--- src/netbeans.c 2010-01-19 13:57:11.000000000 +0100 +*************** +*** 873,879 **** + { + #ifdef NBDEBUG + /* +! * This happens because the ExtEd can send a cammand or 2 after + * doing a stopDocumentListen command. It doesn't harm anything + * so I'm disabling it except for debugging. + */ +--- 883,889 ---- + { + #ifdef NBDEBUG + /* +! * This happens because the ExtEd can send a command or 2 after + * doing a stopDocumentListen command. It doesn't harm anything + * so I'm disabling it except for debugging. + */ +*************** +*** 1174,1180 **** + break; + } + } +! *q++ = '\0'; + + return buf; + } +--- 1184,1190 ---- + break; + } + } +! *q = '\0'; + + return buf; + } +*************** +*** 3070,3076 **** + } + + /* +! * Send netbeans an unmodufied command. + */ + void + netbeans_unmodified(buf_T *bufp UNUSED) +--- 3080,3086 ---- + } + + /* +! * Send netbeans an unmodified command. + */ + void + netbeans_unmodified(buf_T *bufp UNUSED) +*************** +*** 3366,3372 **** + + + /* +! * Add a sign of the reqested type at the requested location. + * + * Reverse engineering: + * Apparently an annotation is defined the first time it is used in a buffer. +--- 3380,3386 ---- + + + /* +! * Add a sign of the requested type at the requested location. + * + * Reverse engineering: + * Apparently an annotation is defined the first time it is used in a buffer. +*** ../vim-7.2.332/src/ops.c 2009-11-25 12:38:49.000000000 +0100 +--- src/ops.c 2010-01-19 13:04:46.000000000 +0100 +*************** +*** 5591,5603 **** + */ + if (has_mbyte) + { +- char_u *conv_str = str; + vimconv_T vc; + + vc.vc_type = CONV_NONE; + if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK) + { +! int intlen = len; + + conv_str = string_convert(&vc, str, &intlen); + len = intlen; +--- 5598,5610 ---- + */ + if (has_mbyte) + { + vimconv_T vc; + + vc.vc_type = CONV_NONE; + if (convert_setup(&vc, p_enc, (char_u *)"latin1") == OK) + { +! int intlen = len; +! char_u *conv_str; + + conv_str = string_convert(&vc, str, &intlen); + len = intlen; +*** ../vim-7.2.332/src/quickfix.c 2009-06-24 17:31:27.000000000 +0200 +--- src/quickfix.c 2010-01-19 13:12:29.000000000 +0100 +*************** +*** 1899,1905 **** + int i; + int idx1 = 1; + int idx2 = -1; +- int need_return = TRUE; + char_u *arg = eap->arg; + int all = eap->forceit; /* if not :cl!, only show + recognised errors */ +--- 1899,1904 ---- +*************** +*** 1939,1951 **** + { + if ((qfp->qf_valid || all) && idx1 <= i && i <= idx2) + { +! if (need_return) +! { +! msg_putchar('\n'); +! if (got_int) +! break; +! need_return = FALSE; +! } + + fname = NULL; + if (qfp->qf_fnum != 0 +--- 1938,1946 ---- + { + if ((qfp->qf_valid || all) && idx1 <= i && i <= idx2) + { +! msg_putchar('\n'); +! if (got_int) +! break; + + fname = NULL; + if (qfp->qf_fnum != 0 +*************** +*** 1988,1994 **** + IObuff, IOSIZE); + msg_prt_line(IObuff, FALSE); + out_flush(); /* show one line at a time */ +- need_return = TRUE; + } + + qfp = qfp->qf_next; +--- 1983,1988 ---- +*** ../vim-7.2.332/src/syntax.c 2009-12-16 18:13:04.000000000 +0100 +--- src/syntax.c 2010-01-19 13:12:56.000000000 +0100 +*************** +*** 4167,4173 **** + if (!HASHITEM_EMPTY(hi)) + { + --todo; +- kp = HI2KE(hi); + for (kp = HI2KE(hi); kp != NULL; kp = kp_next) + { + kp_next = kp->ke_next; +--- 4167,4172 ---- +*** ../vim-7.2.332/src/ui.c 2009-09-11 16:48:06.000000000 +0200 +--- src/ui.c 2010-01-19 13:14:04.000000000 +0100 +*************** +*** 2383,2389 **** + * 'enc' anyway. */ + if (has_mbyte) + { +! char_u *conv_buf = buffer; + vimconv_T vc; + + vc.vc_type = CONV_NONE; +--- 2383,2389 ---- + * 'enc' anyway. */ + if (has_mbyte) + { +! char_u *conv_buf; + vimconv_T vc; + + vc.vc_type = CONV_NONE; +*** ../vim-7.2.332/src/version.c 2010-01-19 13:06:42.000000000 +0100 +--- src/version.c 2010-01-19 14:55:50.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 333, + /**/ + +-- +An actual excerpt from a classified section of a city newspaper: +"Illiterate? Write today for free help!" + + /// 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/vim/vim-7.2/7.2.334 b/vim/vim-7.2/7.2.334 new file mode 100644 index 0000000..1b88bbd --- /dev/null +++ b/vim/vim-7.2/7.2.334 @@ -0,0 +1,347 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.334 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.334 +Problem: Postponing keys in Netbeans interface does not work properly. +Solution: Store the key string instead of the number. Avoid an infinite + loop. (Mostly by Xavier de Gaye) +Files: src/netbeans.c, src/proto/netbeans.pro + + +*** ../vim-7.2.333/src/netbeans.c 2010-01-19 14:59:14.000000000 +0100 +--- src/netbeans.c 2010-01-19 15:12:17.000000000 +0100 +*************** +*** 70,76 **** + static pos_T *off2pos __ARGS((buf_T *, long)); + static pos_T *get_off_or_lnum __ARGS((buf_T *buf, char_u **argp)); + static long get_buf_size __ARGS((buf_T *)); +! static void netbeans_keystring __ARGS((int key, char *keystr)); + static void special_keys __ARGS((char_u *args)); + + static void netbeans_connect __ARGS((void)); +--- 70,77 ---- + static pos_T *off2pos __ARGS((buf_T *, long)); + static pos_T *get_off_or_lnum __ARGS((buf_T *buf, char_u **argp)); + static long get_buf_size __ARGS((buf_T *)); +! static int netbeans_keystring __ARGS((char_u *keystr)); +! static void postpone_keycommand __ARGS((char_u *keystr)); + static void special_keys __ARGS((char_u *args)); + + static void netbeans_connect __ARGS((void)); +*************** +*** 502,508 **** + + struct keyqueue + { +! int key; + struct keyqueue *next; + struct keyqueue *prev; + }; +--- 503,509 ---- + + struct keyqueue + { +! char_u *keystr; + struct keyqueue *next; + struct keyqueue *prev; + }; +*************** +*** 514,526 **** + + /* + * Queue up key commands sent from netbeans. + */ + static void +! postpone_keycommand(int key) + { + keyQ_T *node; + + node = (keyQ_T *)alloc(sizeof(keyQ_T)); + + if (keyHead.next == NULL) /* initialize circular queue */ + { +--- 515,531 ---- + + /* + * Queue up key commands sent from netbeans. ++ * We store the string, because it may depend on the global mod_mask and ++ * :nbkey doesn't have a key number. + */ + static void +! postpone_keycommand(char_u *keystr) + { + keyQ_T *node; + + node = (keyQ_T *)alloc(sizeof(keyQ_T)); ++ if (node == NULL) ++ return; /* out of memory, drop the key */ + + if (keyHead.next == NULL) /* initialize circular queue */ + { +*************** +*** 534,540 **** + keyHead.prev->next = node; + keyHead.prev = node; + +! node->key = key; + } + + /* +--- 539,545 ---- + keyHead.prev->next = node; + keyHead.prev = node; + +! node->keystr = vim_strsave(keystr); + } + + /* +*************** +*** 543,557 **** + static void + handle_key_queue(void) + { +! while (keyHead.next && keyHead.next != &keyHead) + { + /* first, unlink the node */ + keyQ_T *node = keyHead.next; + keyHead.next = node->next; + node->next->prev = node->prev; + +! /* now, send the keycommand */ +! netbeans_keycommand(node->key); + + /* Finally, dispose of the node */ + vim_free(node); +--- 548,567 ---- + static void + handle_key_queue(void) + { +! int postponed = FALSE; +! +! while (!postponed && keyHead.next && keyHead.next != &keyHead) + { + /* first, unlink the node */ + keyQ_T *node = keyHead.next; + keyHead.next = node->next; + node->next->prev = node->prev; + +! /* Now, send the keycommand. This may cause it to be postponed again +! * and change keyHead. */ +! if (node->keystr != NULL) +! postponed = !netbeans_keystring(node->keystr); +! vim_free(node->keystr); + + /* Finally, dispose of the node */ + vim_free(node); +*************** +*** 2495,2501 **** + } + else + { +! nbdebug((" Buffer has no changes!\n")); + } + /* =====================================================================*/ + } +--- 2505,2511 ---- + } + else + { +! nbdebug((" Buffer has no changes!\n")); + } + /* =====================================================================*/ + } +*************** +*** 2658,2664 **** + ex_nbkey(eap) + exarg_T *eap; + { +! netbeans_keystring(0, (char *)eap->arg); + } + + +--- 2668,2674 ---- + ex_nbkey(eap) + exarg_T *eap; + { +! (void)netbeans_keystring(eap->arg); + } + + +*************** +*** 2680,2686 **** + } + + /* +! * Convert key to netbeans name. + */ + static void + netbeans_keyname(int key, char *buf) +--- 2690,2696 ---- + } + + /* +! * Convert key to netbeans name. This uses the global "mod_mask". + */ + static void + netbeans_keyname(int key, char *buf) +*************** +*** 3127,3149 **** + /* + * Send a keypress event back to netbeans. This usually simulates some + * kind of function key press. This function operates on a key code. + */ +! void + netbeans_keycommand(int key) + { + char keyName[60]; + + netbeans_keyname(key, keyName); +! netbeans_keystring(key, keyName); + } + + + /* + * Send a keypress event back to netbeans. This usually simulates some + * kind of function key press. This function operates on a key string. + */ +! static void +! netbeans_keystring(int key, char *keyName) + { + char buf[2*MAXPATHL]; + int bufno = nb_getbufno(curbuf); +--- 3137,3163 ---- + /* + * Send a keypress event back to netbeans. This usually simulates some + * kind of function key press. This function operates on a key code. ++ * Return TRUE when the key was sent, FALSE when the command has been ++ * postponed. + */ +! int + netbeans_keycommand(int key) + { + char keyName[60]; + + netbeans_keyname(key, keyName); +! return netbeans_keystring((char_u *)keyName); + } + + + /* + * Send a keypress event back to netbeans. This usually simulates some + * kind of function key press. This function operates on a key string. ++ * Return TRUE when the key was sent, FALSE when the command has been ++ * postponed. + */ +! static int +! netbeans_keystring(char_u *keyName) + { + char buf[2*MAXPATHL]; + int bufno = nb_getbufno(curbuf); +*************** +*** 3151,3157 **** + char_u *q; + + if (!haveConnection) +! return; + + + if (bufno == -1) +--- 3165,3171 ---- + char_u *q; + + if (!haveConnection) +! return TRUE; + + + if (bufno == -1) +*************** +*** 3160,3166 **** + q = curbuf->b_ffname == NULL ? (char_u *)"" + : nb_quote(curbuf->b_ffname); + if (q == NULL) +! return; + vim_snprintf(buf, sizeof(buf), "0:fileOpened=%d \"%s\" %s %s\n", 0, + q, + "T", /* open in NetBeans */ +--- 3174,3180 ---- + q = curbuf->b_ffname == NULL ? (char_u *)"" + : nb_quote(curbuf->b_ffname); + if (q == NULL) +! return TRUE; + vim_snprintf(buf, sizeof(buf), "0:fileOpened=%d \"%s\" %s %s\n", 0, + q, + "T", /* open in NetBeans */ +*************** +*** 3170,3178 **** + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); + +! if (key > 0) +! postpone_keycommand(key); +! return; + } + + /* sync the cursor position */ +--- 3184,3191 ---- + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); + +! postpone_keycommand(keyName); +! return FALSE; + } + + /* sync the cursor position */ +*************** +*** 3198,3203 **** +--- 3211,3217 ---- + off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col); + nbdebug(("EVT: %s", buf)); + nb_send(buf, "netbeans_keycommand"); ++ return TRUE; + } + + +*** ../vim-7.2.333/src/proto/netbeans.pro 2009-01-06 16:13:42.000000000 +0100 +--- src/proto/netbeans.pro 2010-01-19 13:31:01.000000000 +0100 +*************** +*** 16,22 **** + void netbeans_removed __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, long len)); + void netbeans_unmodified __ARGS((buf_T *bufp)); + void netbeans_button_release __ARGS((int button)); +! void netbeans_keycommand __ARGS((int key)); + void netbeans_save_buffer __ARGS((buf_T *bufp)); + void netbeans_deleted_all_lines __ARGS((buf_T *bufp)); + int netbeans_is_guarded __ARGS((linenr_T top, linenr_T bot)); +--- 16,22 ---- + void netbeans_removed __ARGS((buf_T *bufp, linenr_T linenr, colnr_T col, long len)); + void netbeans_unmodified __ARGS((buf_T *bufp)); + void netbeans_button_release __ARGS((int button)); +! int netbeans_keycommand __ARGS((int key)); + void netbeans_save_buffer __ARGS((buf_T *bufp)); + void netbeans_deleted_all_lines __ARGS((buf_T *bufp)); + int netbeans_is_guarded __ARGS((linenr_T top, linenr_T bot)); +*** ../vim-7.2.333/src/version.c 2010-01-19 14:59:14.000000000 +0100 +--- src/version.c 2010-01-19 15:08:44.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 334, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +119. You are reading a book and look for the scroll bar to get to + the next 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/vim/vim-7.2/7.2.335 b/vim/vim-7.2/7.2.335 new file mode 100644 index 0000000..df7f641 --- /dev/null +++ b/vim/vim-7.2/7.2.335 @@ -0,0 +1,103 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.335 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.335 +Problem: The CTRL-] command escapes too many characters. +Solution: Use a different list of characters to be escaped. (Sergey Khorev) +Files: src/normal.c + + +*** ../vim-7.2.334/src/normal.c 2010-01-12 15:42:03.000000000 +0100 +--- src/normal.c 2010-01-19 15:20:11.000000000 +0100 +*************** +*** 5406,5411 **** +--- 5406,5412 ---- + int n = 0; /* init for GCC */ + int cmdchar; + int g_cmd; /* "g" command */ ++ int tag_cmd = FALSE; + char_u *aux_ptr; + int isman; + int isman_s; +*************** +*** 5515,5520 **** +--- 5516,5522 ---- + break; + + case ']': ++ tag_cmd = TRUE; + #ifdef FEAT_CSCOPE + if (p_cst) + STRCPY(buf, "cstag "); +*************** +*** 5526,5535 **** + default: + if (curbuf->b_help) + STRCPY(buf, "he! "); +- else if (g_cmd) +- STRCPY(buf, "tj "); + else +! sprintf((char *)buf, "%ldta ", cap->count0); + } + + /* +--- 5528,5541 ---- + default: + if (curbuf->b_help) + STRCPY(buf, "he! "); + else +! { +! tag_cmd = TRUE; +! if (g_cmd) +! STRCPY(buf, "tj "); +! else +! sprintf((char *)buf, "%ldta ", cap->count0); +! } + } + + /* +*************** +*** 5562,5569 **** + 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); +--- 5568,5577 ---- + aux_ptr = (char_u *)(p_magic ? "/.*~[^$\\" : "/^$\\"); + else if (cmdchar == '#') + aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\"); +! else if (tag_cmd) + /* Don't escape spaces and Tabs in a tag with a backslash */ ++ aux_ptr = (char_u *)"\\|\"\n["; ++ else + aux_ptr = (char_u *)"\\|\"\n*?["; + + p = buf + STRLEN(buf); +*** ../vim-7.2.334/src/version.c 2010-01-19 15:12:33.000000000 +0100 +--- src/version.c 2010-01-19 15:22:44.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 335, + /**/ + +-- +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/vim/vim-7.2/7.2.336 b/vim/vim-7.2/7.2.336 new file mode 100644 index 0000000..a676592 --- /dev/null +++ b/vim/vim-7.2/7.2.336 @@ -0,0 +1,841 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.336 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.336 +Problem: MzScheme interface can't evaluate an expression. +Solution: Add mzeval(). (Sergey Khorev) +Files: runtime/doc/eval.txt, runtime/doc/if_mzsch.txt, + runtime/doc/usr_41.txt, src/eval.c, src/if_mzsch.c, + src/proto/eval.pro, src/proto/if_mzsch.pro, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Makefile, src/testdir/main.aap, src/testdir/test1.in, + src/testdir/test70.in, src/testdir/test70.ok + + +*** ../vim-7.2.335/runtime/doc/eval.txt 2009-11-17 12:20:30.000000000 +0100 +--- runtime/doc/eval.txt 2010-01-19 15:30:50.000000000 +0100 +*************** +*** 1815,1825 **** + List match and submatches of {pat} in {expr} + matchstr( {expr}, {pat}[, {start}[, {count}]]) + String {count}'th match of {pat} in {expr} +! max({list}) Number maximum value of items in {list} +! min({list}) Number minimum value of items in {list} +! mkdir({name} [, {path} [, {prot}]]) + Number create directory {name} + mode( [expr]) String current editing mode + nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum} + nr2char( {expr}) String single char with ASCII value {expr} + pathshorten( {expr}) String shorten directory names in a path +--- 1821,1832 ---- + List match and submatches of {pat} in {expr} + matchstr( {expr}, {pat}[, {start}[, {count}]]) + String {count}'th match of {pat} in {expr} +! max( {list}) Number maximum value of items in {list} +! min( {list}) Number minimum value of items in {list} +! mkdir( {name} [, {path} [, {prot}]]) + Number create directory {name} + mode( [expr]) String current editing mode ++ mzeval( {expr}) any evaluate |MzScheme| expression + nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum} + nr2char( {expr}) String single char with ASCII value {expr} + pathshorten( {expr}) String shorten directory names in a path +*************** +*** 4090,4095 **** +--- 4103,4125 ---- + "c" or "n". + Also see |visualmode()|. + ++ mzeval({expr}) *mzeval()* ++ Evaluate MzScheme expression {expr} and return its result ++ convert to Vim data structures. ++ Numbers and strings are returned as they are. ++ Pairs (including lists and improper lists) and vectors are ++ returned as Vim |Lists|. ++ Hash tables are represented as Vim |Dictionary| type with keys ++ converted to strings. ++ All other types are converted to string with display function. ++ Examples: > ++ :mz (define l (list 1 2 3)) ++ :mz (define h (make-hash)) (hash-set! h "list" l) ++ :echo mzeval("l") ++ :echo mzeval("h") ++ < ++ {only available when compiled with the |+mzscheme| feature} ++ + nextnonblank({lnum}) *nextnonblank()* + Return the line number of the first line at or below {lnum} + that is not blank. Example: > +*** ../vim-7.2.335/runtime/doc/if_mzsch.txt 2009-06-24 17:51:01.000000000 +0200 +--- runtime/doc/if_mzsch.txt 2010-01-19 15:33:00.000000000 +0100 +*************** +*** 1,4 **** +! *if_mzsch.txt* For Vim version 7.2. Last change: 2009 Jun 24 + + + VIM REFERENCE MANUAL by Sergey Khorev +--- 1,4 ---- +! *if_mzsch.txt* For Vim version 7.2. Last change: 2010 Jan 19 + + + VIM REFERENCE MANUAL by Sergey Khorev +*************** +*** 9,16 **** + 1. Commands |mzscheme-commands| + 2. Examples |mzscheme-examples| + 3. Threads |mzscheme-threads| +! 4. The Vim access procedures |mzscheme-vim| +! 5. Dynamic loading |mzscheme-dynamic| + + {Vi does not have any of these commands} + +--- 9,17 ---- + 1. Commands |mzscheme-commands| + 2. Examples |mzscheme-examples| + 3. Threads |mzscheme-threads| +! 4. Vim access from MzScheme |mzscheme-vim| +! 5. mzeval() Vim function |mzscheme-mzeval| +! 6. Dynamic loading |mzscheme-dynamic| + + {Vi does not have any of these commands} + +*************** +*** 142,148 **** + GUI version. + + ============================================================================== +! 5. VIM Functions *mzscheme-vim* + + *mzscheme-vimext* + The 'vimext' module provides access to procedures defined in the MzScheme +--- 143,149 ---- + GUI version. + + ============================================================================== +! 4. Vim access from MzScheme *mzscheme-vim* + + *mzscheme-vimext* + The 'vimext' module provides access to procedures defined in the MzScheme +*************** +*** 231,237 **** + (set-cursor (line . col) [window]) Set cursor position. + + ============================================================================== +! 5. Dynamic loading *mzscheme-dynamic* *E815* + + On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version| + output then includes |+mzscheme/dyn|. +--- 232,244 ---- + (set-cursor (line . col) [window]) Set cursor position. + + ============================================================================== +! 5. mzeval() Vim function *mzscheme-mzeval* +! +! To facilitate bi-directional interface, you can use |mzeval| function to +! evaluate MzScheme expressions and pass their values to VimL. +! +! ============================================================================== +! 6. Dynamic loading *mzscheme-dynamic* *E815* + + On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version| + output then includes |+mzscheme/dyn|. +*** ../vim-7.2.335/runtime/doc/usr_41.txt 2008-08-09 19:36:54.000000000 +0200 +--- runtime/doc/usr_41.txt 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 868,873 **** +--- 868,875 ---- + taglist() get list of matching tags + tagfiles() get a list of tags files + ++ mzeval() evaluate |MzScheme| expression ++ + ============================================================================== + *41.7* Defining a function + +*** ../vim-7.2.335/src/eval.c 2010-01-19 12:46:51.000000000 +0100 +--- src/eval.c 2010-01-19 15:48:12.000000000 +0100 +*************** +*** 433,439 **** + static long list_find_nr __ARGS((list_T *l, long idx, int *errorp)); + 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_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)); +--- 433,438 ---- +*************** +*** 448,459 **** + static void set_ref_in_item __ARGS((typval_T *tv, int copyID)); + static void dict_unref __ARGS((dict_T *d)); + static void dict_free __ARGS((dict_T *d, int recurse)); +- static dictitem_T *dictitem_alloc __ARGS((char_u *key)); + static dictitem_T *dictitem_copy __ARGS((dictitem_T *org)); + static void dictitem_remove __ARGS((dict_T *dict, dictitem_T *item)); +- static void dictitem_free __ARGS((dictitem_T *item)); + static dict_T *dict_copy __ARGS((dict_T *orig, int deep, int copyID)); +- static int dict_add __ARGS((dict_T *d, dictitem_T *item)); + static long dict_len __ARGS((dict_T *d)); + static dictitem_T *dict_find __ARGS((dict_T *d, char_u *key, int len)); + static char_u *dict2string __ARGS((typval_T *tv, int copyID)); +--- 447,455 ---- +*************** +*** 628,633 **** +--- 624,632 ---- + static void f_mkdir __ARGS((typval_T *argvars, typval_T *rettv)); + #endif + static void f_mode __ARGS((typval_T *argvars, typval_T *rettv)); ++ #ifdef FEAT_MZSCHEME ++ static void f_mzeval __ARGS((typval_T *argvars, typval_T *rettv)); ++ #endif + static void f_nextnonblank __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_nr2char __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_pathshorten __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 764,770 **** + static int var_check_ro __ARGS((int flags, char_u *name)); + static int var_check_fixed __ARGS((int flags, char_u *name)); + static int tv_check_lock __ARGS((int lock, char_u *name)); +- static void copy_tv __ARGS((typval_T *from, typval_T *to)); + static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID)); + static char_u *find_option_end __ARGS((char_u **arg, int *opt_flags)); + static char_u *trans_function_name __ARGS((char_u **pp, int skip, int flags, funcdict_T *fd)); +--- 763,768 ---- +*************** +*** 6155,6161 **** + * Append typval_T "tv" to the end of list "l". + * Return FAIL when out of memory. + */ +! static int + list_append_tv(l, tv) + list_T *l; + typval_T *tv; +--- 6153,6159 ---- + * Append typval_T "tv" to the end of list "l". + * Return FAIL when out of memory. + */ +! int + list_append_tv(l, tv) + list_T *l; + typval_T *tv; +*************** +*** 6812,6818 **** + * Note that the value of the item "di_tv" still needs to be initialized! + * Returns NULL when out of memory. + */ +! static dictitem_T * + dictitem_alloc(key) + char_u *key; + { +--- 6810,6816 ---- + * Note that the value of the item "di_tv" still needs to be initialized! + * Returns NULL when out of memory. + */ +! dictitem_T * + dictitem_alloc(key) + char_u *key; + { +*************** +*** 6868,6874 **** + /* + * Free a dict item. Also clears the value. + */ +! static void + dictitem_free(item) + dictitem_T *item; + { +--- 6866,6872 ---- + /* + * Free a dict item. Also clears the value. + */ +! void + dictitem_free(item) + dictitem_T *item; + { +*************** +*** 6948,6954 **** + * Add item "item" to Dictionary "d". + * Returns FAIL when out of memory and when key already existed. + */ +! static int + dict_add(d, item) + dict_T *d; + dictitem_T *item; +--- 6946,6952 ---- + * Add item "item" to Dictionary "d". + * Returns FAIL when out of memory and when key already existed. + */ +! int + dict_add(d, item) + dict_T *d; + dictitem_T *item; +*************** +*** 7699,7704 **** +--- 7697,7705 ---- + {"mkdir", 1, 3, f_mkdir}, + #endif + {"mode", 0, 1, f_mode}, ++ #ifdef FEAT_MZSCHEME ++ {"mzeval", 1, 1, f_mzeval}, ++ #endif + {"nextnonblank", 1, 1, f_nextnonblank}, + {"nr2char", 1, 1, f_nr2char}, + {"pathshorten", 1, 1, f_pathshorten}, +*************** +*** 13591,13596 **** +--- 13592,13614 ---- + rettv->v_type = VAR_STRING; + } + ++ #ifdef FEAT_MZSCHEME ++ /* ++ * "mzeval()" function ++ */ ++ static void ++ f_mzeval(argvars, rettv) ++ typval_T *argvars; ++ typval_T *rettv; ++ { ++ char_u *str; ++ char_u buf[NUMBUFLEN]; ++ ++ str = get_tv_string_buf(&argvars[0], buf); ++ do_mzeval(str, rettv); ++ } ++ #endif ++ + /* + * "nextnonblank()" function + */ +*************** +*** 19274,19280 **** + * 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) + typval_T *from; + typval_T *to; +--- 19292,19298 ---- + * It is OK for "from" and "to" to point to the same item. This is used to + * make a copy later. + */ +! void + copy_tv(from, to) + typval_T *from; + typval_T *to; +*** ../vim-7.2.335/src/if_mzsch.c 2009-12-16 19:02:05.000000000 +0100 +--- src/if_mzsch.c 2010-01-19 15:43:05.000000000 +0100 +*************** +*** 170,175 **** +--- 170,177 ---- + #ifdef FEAT_EVAL + static Scheme_Object *vim_to_mzscheme(typval_T *vim_value, int depth, + Scheme_Hash_Table *visited); ++ static int mzscheme_to_vim(Scheme_Object *obj, typval_T *tv, int depth, ++ Scheme_Hash_Table *visited); + #endif + + #ifdef MZ_PRECISE_GC +*************** +*** 2733,2738 **** +--- 2735,2959 ---- + MZ_GC_UNREG(); + return result; + } ++ ++ static int ++ mzscheme_to_vim(Scheme_Object *obj, typval_T *tv, int depth, ++ Scheme_Hash_Table *visited) ++ { ++ int status = OK; ++ typval_T *found; ++ MZ_GC_CHECK(); ++ if (depth > 100) /* limit the deepest recursion level */ ++ { ++ tv->v_type = VAR_NUMBER; ++ tv->vval.v_number = 0; ++ return FAIL; ++ } ++ ++ found = (typval_T *)scheme_hash_get(visited, obj); ++ if (found != NULL) ++ copy_tv(found, tv); ++ else if (SCHEME_VOIDP(obj)) ++ { ++ tv->v_type = VAR_NUMBER; ++ tv->vval.v_number = 0; ++ } ++ else if (SCHEME_INTP(obj)) ++ { ++ tv->v_type = VAR_NUMBER; ++ tv->vval.v_number = SCHEME_INT_VAL(obj); ++ } ++ else if (SCHEME_BOOLP(obj)) ++ { ++ tv->v_type = VAR_NUMBER; ++ tv->vval.v_number = SCHEME_TRUEP(obj); ++ } ++ # ifdef FEAT_FLOAT ++ else if (SCHEME_DBLP(obj)) ++ { ++ tv->v_type = VAR_FLOAT; ++ tv->vval.v_float = SCHEME_DBL_VAL(obj); ++ } ++ # endif ++ else if (SCHEME_STRINGP(obj)) ++ { ++ tv->v_type = VAR_STRING; ++ tv->vval.v_string = vim_strsave((char_u *)SCHEME_STR_VAL(obj)); ++ } ++ else if (SCHEME_VECTORP(obj) || SCHEME_NULLP(obj) ++ || SCHEME_PAIRP(obj) || SCHEME_MUTABLE_PAIRP(obj)) ++ { ++ list_T *list = list_alloc(); ++ if (list == NULL) ++ status = FAIL; ++ else ++ { ++ int i; ++ Scheme_Object *curr = NULL; ++ Scheme_Object *cval = NULL; ++ /* temporary var to hold current element of vectors and pairs */ ++ typval_T *v; ++ ++ MZ_GC_DECL_REG(2); ++ MZ_GC_VAR_IN_REG(0, curr); ++ MZ_GC_VAR_IN_REG(1, cval); ++ MZ_GC_REG(); ++ ++ tv->v_type = VAR_LIST; ++ tv->vval.v_list = list; ++ ++list->lv_refcount; ++ ++ v = (typval_T *)alloc(sizeof(typval_T)); ++ if (v == NULL) ++ status = FAIL; ++ else ++ { ++ /* add the value in advance to allow handling of self-referencial ++ * data structures */ ++ typval_T *visited_tv = (typval_T *)alloc(sizeof(typval_T)); ++ copy_tv(tv, visited_tv); ++ scheme_hash_set(visited, obj, (Scheme_Object *)visited_tv); ++ ++ if (SCHEME_VECTORP(obj)) ++ { ++ for (i = 0; i < SCHEME_VEC_SIZE(obj); ++i) ++ { ++ cval = SCHEME_VEC_ELS(obj)[i]; ++ status = mzscheme_to_vim(cval, v, depth + 1, visited); ++ if (status == FAIL) ++ break; ++ status = list_append_tv(list, v); ++ clear_tv(v); ++ if (status == FAIL) ++ break; ++ } ++ } ++ else if (SCHEME_PAIRP(obj) || SCHEME_MUTABLE_PAIRP(obj)) ++ { ++ for (curr = obj; ++ SCHEME_PAIRP(curr) || SCHEME_MUTABLE_PAIRP(curr); ++ curr = SCHEME_CDR(curr)) ++ { ++ cval = SCHEME_CAR(curr); ++ status = mzscheme_to_vim(cval, v, depth + 1, visited); ++ if (status == FAIL) ++ break; ++ status = list_append_tv(list, v); ++ clear_tv(v); ++ if (status == FAIL) ++ break; ++ } ++ /* impoper list not terminated with null ++ * need to handle the last element */ ++ if (status == OK && !SCHEME_NULLP(curr)) ++ { ++ status = mzscheme_to_vim(cval, v, depth + 1, visited); ++ if (status == OK) ++ { ++ status = list_append_tv(list, v); ++ clear_tv(v); ++ } ++ } ++ } ++ /* nothing to do for scheme_null */ ++ vim_free(v); ++ } ++ MZ_GC_UNREG(); ++ } ++ } ++ else if (SCHEME_HASHTP(obj)) ++ { ++ int i; ++ dict_T *dict; ++ Scheme_Object *key = NULL; ++ Scheme_Object *val = NULL; ++ ++ MZ_GC_DECL_REG(2); ++ MZ_GC_VAR_IN_REG(0, key); ++ MZ_GC_VAR_IN_REG(1, val); ++ MZ_GC_REG(); ++ ++ dict = dict_alloc(); ++ if (dict == NULL) ++ status = FAIL; ++ else ++ { ++ typval_T *visited_tv = (typval_T *)alloc(sizeof(typval_T)); ++ ++ tv->v_type = VAR_DICT; ++ tv->vval.v_dict = dict; ++ ++dict->dv_refcount; ++ ++ copy_tv(tv, visited_tv); ++ scheme_hash_set(visited, obj, (Scheme_Object *)visited_tv); ++ ++ for (i = 0; i < ((Scheme_Hash_Table *)obj)->size; ++i) ++ { ++ if (((Scheme_Hash_Table *) obj)->vals[i] != NULL) ++ { ++ /* generate item for `diplay'ed Scheme key */ ++ dictitem_T *item = dictitem_alloc((char_u *)string_to_line( ++ ((Scheme_Hash_Table *) obj)->keys[i])); ++ /* convert Scheme val to Vim and add it to the dict */ ++ if (mzscheme_to_vim(((Scheme_Hash_Table *) obj)->vals[i], ++ &item->di_tv, depth + 1, visited) == FAIL ++ || dict_add(dict, item) == FAIL) ++ { ++ dictitem_free(item); ++ status = FAIL; ++ break; ++ } ++ } ++ ++ } ++ } ++ MZ_GC_UNREG(); ++ } ++ else ++ { ++ /* `display' any other value to string */ ++ tv->v_type = VAR_STRING; ++ tv->vval.v_string = (char_u *)string_to_line(obj); ++ } ++ return status; ++ } ++ ++ void ++ do_mzeval(char_u *str, typval_T *rettv) ++ { ++ int i; ++ Scheme_Object *ret = NULL; ++ Scheme_Hash_Table *visited = NULL; ++ ++ MZ_GC_DECL_REG(2); ++ MZ_GC_VAR_IN_REG(0, ret); ++ MZ_GC_VAR_IN_REG(0, visited); ++ MZ_GC_REG(); ++ ++ if (mzscheme_init()) ++ { ++ MZ_GC_UNREG(); ++ return; ++ } ++ ++ MZ_GC_CHECK(); ++ visited = scheme_make_hash_table(SCHEME_hash_ptr); ++ MZ_GC_CHECK(); ++ ++ if (eval_with_exn_handling(str, do_eval, &ret) == OK) ++ mzscheme_to_vim(ret, rettv, 1, visited); ++ ++ for (i = 0; i < visited->size; ++i) ++ { ++ /* free up remembered objects */ ++ if (visited->vals[i] != NULL) ++ { ++ free_tv((typval_T *)visited->vals[i]); ++ } ++ } ++ ++ MZ_GC_UNREG(); ++ } + #endif + + /* +*** ../vim-7.2.335/src/proto/eval.pro 2009-09-30 15:15:33.000000000 +0200 +--- src/proto/eval.pro 2010-01-19 15:45:39.000000000 +0100 +*************** +*** 47,56 **** +--- 47,60 ---- + 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_tv __ARGS((list_T *l, typval_T *tv)); + 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)); ++ dictitem_T *dictitem_alloc __ARGS((char_u *key)); ++ void dictitem_free __ARGS((dictitem_T *item)); ++ int dict_add __ARGS((dict_T *d, dictitem_T *item)); + int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str)); + char_u *get_dict_string __ARGS((dict_T *d, char_u *key, int save)); + long get_dict_number __ARGS((dict_T *d, char_u *key)); +*************** +*** 77,82 **** +--- 81,87 ---- + void new_script_vars __ARGS((scid_T id)); + void init_var_dict __ARGS((dict_T *dict, dictitem_T *dict_var)); + void vars_clear __ARGS((hashtab_T *ht)); ++ void copy_tv __ARGS((typval_T *from, typval_T *to)); + void ex_echo __ARGS((exarg_T *eap)); + void ex_echohl __ARGS((exarg_T *eap)); + void ex_execute __ARGS((exarg_T *eap)); +*** ../vim-7.2.335/src/proto/if_mzsch.pro 2009-12-16 19:02:05.000000000 +0100 +--- src/proto/if_mzsch.pro 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 15,18 **** +--- 15,19 ---- + void *mzvim_eval_string __ARGS((char_u *str)); + int mzthreads_allowed __ARGS((void)); + void mzscheme_main __ARGS((void)); ++ void do_mzeval __ARGS((char_u *str, typval_T *rettv)); + /* vim: set ft=c : */ +*** ../vim-7.2.335/src/testdir/Make_dos.mak 2009-11-17 17:57:10.000000000 +0100 +--- src/testdir/Make_dos.mak 2010-01-19 15:43:48.000000000 +0100 +*************** +*** 29,35 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out + +! SCRIPTS32 = test50.out + + SCRIPTS_GUI = test16.out + +--- 29,35 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out + +! SCRIPTS32 = test50.out test70.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.2.335/src/testdir/Make_ming.mak 2009-11-17 17:57:10.000000000 +0100 +--- src/testdir/Make_ming.mak 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 48,54 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out + +! SCRIPTS32 = test50.out + + SCRIPTS_GUI = test16.out + +--- 48,54 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out + +! SCRIPTS32 = test50.out test70.out + + SCRIPTS_GUI = test16.out + +*************** +*** 78,83 **** +--- 78,84 ---- + -$(DEL) small.vim + -$(DEL) tiny.vim + -$(DEL) mbyte.vim ++ -$(DEL) mzscheme.vim + -$(DEL) X* + -$(DEL) viminfo + +*** ../vim-7.2.335/src/testdir/Makefile 2009-11-17 17:40:34.000000000 +0100 +--- src/testdir/Makefile 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 23,29 **** + test54.out test55.out test56.out test57.out test58.out \ + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ +! test69.out + + SCRIPTS_GUI = test16.out + +--- 23,29 ---- + test54.out test55.out test56.out test57.out test58.out \ + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ +! test69.out test70.out + + SCRIPTS_GUI = test16.out + +*************** +*** 44,53 **** + $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) + + clean: +! -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* valgrind.pid* viminfo + + test1.out: test1.in +! -rm -f $*.failed tiny.vim small.vim mbyte.vim test.ok X* viminfo + $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in + @/bin/sh -c "if diff test.out $*.ok; \ + then mv -f test.out $*.out; \ +--- 44,53 ---- + $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) + + clean: +! -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* valgrind.pid* viminfo + + test1.out: test1.in +! -rm -f $*.failed tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* viminfo + $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in + @/bin/sh -c "if diff test.out $*.ok; \ + then mv -f test.out $*.out; \ +*** ../vim-7.2.335/src/testdir/main.aap 2004-06-13 21:05:31.000000000 +0200 +--- src/testdir/main.aap 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 32,42 **** + $Scripts $ScriptsGUI: $VimProg + + clean: +! :del {r}{force} *.out test.log tiny.vim small.vim mbyte.vim test.ok X* + + # test1 is special, it checks for features + test1.out: test1.in +! :del {force} test1.failed tiny.vim small.vim mbyte.vim + :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in test1.in + @if os.system("diff test.out test1.ok") != 0: + :error test1 FAILED - Something basic is wrong +--- 32,42 ---- + $Scripts $ScriptsGUI: $VimProg + + clean: +! :del {r}{force} *.out test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* + + # test1 is special, it checks for features + test1.out: test1.in +! :del {force} test1.failed tiny.vim small.vim mbyte.vim mzscheme.vim + :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in test1.in + @if os.system("diff test.out test1.ok") != 0: + :error test1 FAILED - Something basic is wrong +*** ../vim-7.2.335/src/testdir/test1.in 2004-06-13 20:19:23.000000000 +0200 +--- src/testdir/test1.in 2010-01-19 15:38:44.000000000 +0100 +*************** +*** 13,18 **** +--- 13,19 ---- + + If Vim was not compiled with the +multi_byte feature, the mbyte.vim script will be set like small.vim above. mbyte.vim is sourced by tests that require the + +multi_byte feature. ++ Similar logic is applied to the +mzscheme feature, using mzscheme.vim. + + STARTTEST + :" Write a single line to test.out to check if testing works at all. +*************** +*** 25,32 **** +--- 26,36 ---- + w! test.out + qa! + :w! mbyte.vim ++ :w! mzscheme.vim + :" If +multi_byte feature supported, make mbyte.vim empty. + :if has("multi_byte") | sp another | w! mbyte.vim | q | endif ++ :" If +mzscheme feature supported, make mzscheme.vim empty. ++ :if has("mzscheme") | sp another | w! mzscheme.vim | q | endif + :" If +eval feature supported quit here, leaving tiny.vim and small.vim empty. + :" Otherwise write small.vim to skip the test. + :if 1 | q! | endif +*** ../vim-7.2.335/src/testdir/test70.in 2010-01-19 15:47:24.000000000 +0100 +--- src/testdir/test70.in 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 0 **** +--- 1,53 ---- ++ Smoke test for MzScheme interface and mzeval() function ++ ++ STARTTEST ++ :so mzscheme.vim ++ :set nocompatible viminfo+=nviminfo ++ :function! MzRequire() ++ :redir => l:mzversion ++ :mz (version) ++ :redir END ++ :if strpart(l:mzversion, 1, 1) < "4" ++ :" MzScheme versions < 4.x: ++ :mz (require (prefix vim- vimext)) ++ :else ++ :" newer versions: ++ :mz (require (prefix-in vim- 'vimext)) ++ :mz (require r5rs) ++ :endif ++ :endfunction ++ :silent call MzRequire() ++ :mz (define l '("item0" "dictionary with list OK" "item2")) ++ :mz (define h (make-hash)) ++ :mz (hash-set! h "list" l) ++ /^1 ++ :" change buffer contents ++ :mz (vim-set-buff-line (vim-eval "line('.')") "1 changed line 1") ++ :" scalar test ++ :let tmp_string = mzeval('"string"') ++ :let tmp_1000 = mzeval('1000') ++ :if tmp_string . tmp_1000 == "string1000" ++ :let scalar_res = "OK" ++ :else ++ :let scalar_res = "FAILED" ++ :endif ++ :call append(search("^1"), "scalar test " . scalar_res) ++ :" dictionary containing a list ++ :let tmp = mzeval("h")["list"][1] ++ :/^2/put =tmp ++ :" circular list (at the same time test lists containing lists) ++ :mz (set-car! (cddr l) l) ++ :let l2 = mzeval("h")["list"] ++ :if l2[2] == l2 ++ :let res = "OK" ++ :else ++ :let res = "FAILED" ++ :endif ++ :call setline(search("^3"), "circular test " . res) ++ :?^1?,$w! test.out ++ :qa! ++ ENDTEST ++ ++ 1 line 1 ++ 2 line 2 ++ 3 line 3 +*** ../vim-7.2.335/src/testdir/test70.ok 2010-01-19 15:47:24.000000000 +0100 +--- src/testdir/test70.ok 2010-01-19 15:29:01.000000000 +0100 +*************** +*** 0 **** +--- 1,5 ---- ++ 1 changed line 1 ++ scalar test OK ++ 2 line 2 ++ dictionary with list OK ++ circular test OK +*** ../vim-7.2.335/src/version.c 2010-01-19 15:23:38.000000000 +0100 +--- src/version.c 2010-01-19 15:46:44.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 336, + /**/ + +-- +"Computers in the future may weigh no more than 1.5 tons." + Popular Mechanics, 1949 + + /// 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/vim/vim-7.2/7.2.337 b/vim/vim-7.2/7.2.337 new file mode 100644 index 0000000..e745285 --- /dev/null +++ b/vim/vim-7.2/7.2.337 @@ -0,0 +1,112 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.337 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.337 +Problem: The :compiler command doesn't function properly when invoked in a + function. +Solution: Add "g:" before "current_compiler". (Yukihiro Nakadaira) +Files: src/ex_cmds2.c + + +*** ../vim-7.2.336/src/ex_cmds2.c 2009-05-16 21:16:12.000000000 +0200 +--- src/ex_cmds2.c 2010-01-19 16:02:53.000000000 +0100 +*************** +*** 2496,2509 **** + * To remain backwards compatible "current_compiler" is always + * used. A user's compiler plugin may set it, the distributed + * plugin will then skip the settings. Afterwards set +! * "b:current_compiler" and restore "current_compiler". */ +! old_cur_comp = get_var_value((char_u *)"current_compiler"); + if (old_cur_comp != NULL) + old_cur_comp = vim_strsave(old_cur_comp); + do_cmdline_cmd((char_u *) + "command -nargs=* CompilerSet setlocal "); + } +! do_unlet((char_u *)"current_compiler", TRUE); + do_unlet((char_u *)"b:current_compiler", TRUE); + + sprintf((char *)buf, "compiler/%s.vim", eap->arg); +--- 2496,2510 ---- + * To remain backwards compatible "current_compiler" is always + * used. A user's compiler plugin may set it, the distributed + * plugin will then skip the settings. Afterwards set +! * "b:current_compiler" and restore "current_compiler". +! * Explicitly prepend "g:" to make it work in a function. */ +! old_cur_comp = get_var_value((char_u *)"g:current_compiler"); + if (old_cur_comp != NULL) + old_cur_comp = vim_strsave(old_cur_comp); + do_cmdline_cmd((char_u *) + "command -nargs=* CompilerSet setlocal "); + } +! do_unlet((char_u *)"g:current_compiler", TRUE); + do_unlet((char_u *)"b:current_compiler", TRUE); + + sprintf((char *)buf, "compiler/%s.vim", eap->arg); +*************** +*** 2514,2520 **** + do_cmdline_cmd((char_u *)":delcommand CompilerSet"); + + /* Set "b:current_compiler" from "current_compiler". */ +! p = get_var_value((char_u *)"current_compiler"); + if (p != NULL) + set_internal_string_var((char_u *)"b:current_compiler", p); + +--- 2515,2521 ---- + do_cmdline_cmd((char_u *)":delcommand CompilerSet"); + + /* Set "b:current_compiler" from "current_compiler". */ +! p = get_var_value((char_u *)"g:current_compiler"); + if (p != NULL) + set_internal_string_var((char_u *)"b:current_compiler", p); + +*************** +*** 2523,2534 **** + { + if (old_cur_comp != NULL) + { +! set_internal_string_var((char_u *)"current_compiler", + old_cur_comp); + vim_free(old_cur_comp); + } + else +! do_unlet((char_u *)"current_compiler", TRUE); + } + } + } +--- 2524,2535 ---- + { + if (old_cur_comp != NULL) + { +! set_internal_string_var((char_u *)"g:current_compiler", + old_cur_comp); + vim_free(old_cur_comp); + } + else +! do_unlet((char_u *)"g:current_compiler", TRUE); + } + } + } +*** ../vim-7.2.336/src/version.c 2010-01-19 15:51:29.000000000 +0100 +--- src/version.c 2010-01-19 16:11:20.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 337, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +121. You ask for e-mail adresses instead of telephone numbers. + + /// 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/vim/vim-7.2/7.2.338 b/vim/vim-7.2/7.2.338 new file mode 100644 index 0000000..ac0223f --- /dev/null +++ b/vim/vim-7.2/7.2.338 @@ -0,0 +1,129 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.338 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.338 (after 7.2.300) +Problem: Part of FD_CLOEXEC change is missing. +Solution: Include source file skipped because of typo. +Files: src/ex_cmds2.c + + +*** ../vim-7.2.337/src/ex_cmds2.c 2010-01-19 16:12:53.000000000 +0100 +--- src/ex_cmds2.c 2010-01-19 16:02:53.000000000 +0100 +*************** +*** 2802,2821 **** + + static char_u *get_one_sourceline __ARGS((struct source_cookie *sp)); + +! #if defined(WIN32) && defined(FEAT_CSCOPE) + static FILE *fopen_noinh_readbin __ARGS((char *filename)); + + /* + * Special function to open a file without handle inheritance. + */ + static FILE * + fopen_noinh_readbin(filename) + char *filename; + { +! int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0); + + if (fd_tmp == -1) + return NULL; + return fdopen(fd_tmp, READBIN); + } + #endif +--- 2802,2836 ---- + + static char_u *get_one_sourceline __ARGS((struct source_cookie *sp)); + +! #if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC) +! # define USE_FOPEN_NOINH + static FILE *fopen_noinh_readbin __ARGS((char *filename)); + + /* + * Special function to open a file without handle inheritance. ++ * When possible the handle is closed on exec(). + */ + static FILE * + fopen_noinh_readbin(filename) + char *filename; + { +! int fd_tmp = mch_open(filename, O_RDONLY +! # ifdef WIN32 +! O_BINARY | O_NOINHERIT +! # endif +! , 0); + + if (fd_tmp == -1) + return NULL; ++ ++ # ifdef HAVE_FD_CLOEXEC ++ { ++ int fdflags = fcntl(fd_tmp, F_GETFD); ++ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) ++ fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC); ++ } ++ # endif ++ + return fdopen(fd_tmp, READBIN); + } + #endif +*************** +*** 2895,2901 **** + apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf); + #endif + +! #if defined(WIN32) && defined(FEAT_CSCOPE) + cookie.fp = fopen_noinh_readbin((char *)fname_exp); + #else + cookie.fp = mch_fopen((char *)fname_exp, READBIN); +--- 2910,2916 ---- + apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf); + #endif + +! #ifdef USE_FOPEN_NOINH + cookie.fp = fopen_noinh_readbin((char *)fname_exp); + #else + cookie.fp = mch_fopen((char *)fname_exp, READBIN); +*************** +*** 2916,2922 **** + *p = '.'; + else + *p = '_'; +! #if defined(WIN32) && defined(FEAT_CSCOPE) + cookie.fp = fopen_noinh_readbin((char *)fname_exp); + #else + cookie.fp = mch_fopen((char *)fname_exp, READBIN); +--- 2931,2937 ---- + *p = '.'; + else + *p = '_'; +! #ifdef USE_FOPEN_NOINH + cookie.fp = fopen_noinh_readbin((char *)fname_exp); + #else + cookie.fp = mch_fopen((char *)fname_exp, READBIN); +*** ../vim-7.2.337/src/version.c 2010-01-19 16:12:53.000000000 +0100 +--- src/version.c 2010-01-19 16:20:08.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 338, + /**/ + +-- +~ +~ +~ +".signature" 4 lines, 50 characters written + + /// 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/vim/vim-7.2/7.2.339 b/vim/vim-7.2/7.2.339 new file mode 100644 index 0000000..77aa94d --- /dev/null +++ b/vim/vim-7.2/7.2.339 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.339 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.339 (after 7.2.269) +Problem: Part of --startuptime patch is missing. +Solution: Add check for time_fd. +Files: src/ex_cmds2.c + + +*** ../vim-7.2.338/src/ex_cmds2.c 2010-01-19 16:21:55.000000000 +0100 +--- src/ex_cmds2.c 2010-01-19 16:02:53.000000000 +0100 +*************** +*** 3036,3042 **** + #endif + + #ifdef STARTUPTIME +! time_push(&tv_rel, &tv_start); + #endif + + #ifdef FEAT_EVAL +--- 3036,3043 ---- + #endif + + #ifdef STARTUPTIME +! if (time_fd != NULL) +! time_push(&tv_rel, &tv_start); + #endif + + #ifdef FEAT_EVAL +*************** +*** 3162,3170 **** + verbose_leave(); + } + #ifdef STARTUPTIME +! vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname); +! time_msg((char *)IObuff, &tv_start); +! time_pop(&tv_rel); + #endif + + #ifdef FEAT_EVAL +--- 3163,3174 ---- + verbose_leave(); + } + #ifdef STARTUPTIME +! if (time_fd != NULL) +! { +! vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname); +! time_msg((char *)IObuff, &tv_start); +! time_pop(&tv_rel); +! } + #endif + + #ifdef FEAT_EVAL +*** ../vim-7.2.338/src/version.c 2010-01-19 16:21:55.000000000 +0100 +--- src/version.c 2010-01-19 16:25:39.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 339, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +122. You ask if the Netaholics Anonymous t-shirt you ordered can be + sent to you via 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/vim/vim-7.2/7.2.340 b/vim/vim-7.2/7.2.340 new file mode 100644 index 0000000..b0f4bab --- /dev/null +++ b/vim/vim-7.2/7.2.340 @@ -0,0 +1,54 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.340 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.340 +Problem: Gcc warning for condition that can never be true. (James Vega) +Solution: Use start_lvl instead flp->lvl. +Files: src/fold.c + + +*** ../vim-7.2.339/src/fold.c 2009-11-03 18:04:26.000000000 +0100 +--- src/fold.c 2010-01-19 16:45:13.000000000 +0100 +*************** +*** 3239,3246 **** + flp->lvl = n; + flp->lvl_next = n - 1; + /* never start a fold with an end marker */ +! if (flp->lvl_next > flp->lvl) +! flp->lvl_next = flp->lvl; + } + } + else +--- 3239,3246 ---- + flp->lvl = n; + flp->lvl_next = n - 1; + /* never start a fold with an end marker */ +! if (flp->lvl_next > start_lvl) +! flp->lvl_next = start_lvl; + } + } + else +*** ../vim-7.2.339/src/version.c 2010-01-19 16:31:10.000000000 +0100 +--- src/version.c 2010-01-19 17:23:40.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 340, + /**/ + +-- +Would you care for a drink? I mean, if it were, like, +disabled and you had to look after it? + + /// 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/vim/vim-7.2/7.2.341 b/vim/vim-7.2/7.2.341 new file mode 100644 index 0000000..67d5e81 --- /dev/null +++ b/vim/vim-7.2/7.2.341 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.341 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.341 +Problem: Popup menu wraps to next line when double-wide character doesn't + fit. (Jiang Ma) +Solution: Display a ">" instead. (Dominique Pelle) +Files: src/screen.c + + +*** ../vim-7.2.340/src/screen.c 2009-11-25 13:03:29.000000000 +0100 +--- src/screen.c 2010-01-19 17:34:21.000000000 +0100 +*************** +*** 6434,6439 **** +--- 6434,6446 ---- + else + prev_c = u8c; + # endif ++ if (col + mbyte_cells > screen_Columns) ++ { ++ /* Only 1 cell left, but character requires 2 cells: ++ * display a '>' in the last column to avoid wrapping. */ ++ c = '>'; ++ mbyte_cells = 1; ++ } + } + } + #endif +*************** +*** 9210,9216 **** + int force; + { + /* +! * Don't delete it right now, when not redrawing or insided a mapping. + */ + if (!redrawing() || (!force && char_avail() && !KeyTyped)) + redraw_cmdline = TRUE; /* delete mode later */ +--- 9217,9223 ---- + int force; + { + /* +! * Don't delete it right now, when not redrawing or inside a mapping. + */ + if (!redrawing() || (!force && char_avail() && !KeyTyped)) + redraw_cmdline = TRUE; /* delete mode later */ +*** ../vim-7.2.340/src/version.c 2010-01-19 17:24:20.000000000 +0100 +--- src/version.c 2010-01-19 17:39:56.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 341, + /**/ + +-- +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/vim/vim-7.2/7.2.342 b/vim/vim-7.2/7.2.342 new file mode 100644 index 0000000..72bf253 --- /dev/null +++ b/vim/vim-7.2/7.2.342 @@ -0,0 +1,95 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.342 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.342 +Problem: Popup menu displayed wrong in 'rightleft' mode when there are + multi-byte characters. +Solution: Adjust the column computations. (Dominique Pelle) +Files: src/popupmnu.c + + +*** ../vim-7.2.341/src/popupmnu.c 2008-11-15 14:10:23.000000000 +0100 +--- src/popupmnu.c 2010-01-19 17:57:05.000000000 +0100 +*************** +*** 345,365 **** + if (st != NULL) + { + char_u *rt = reverse_text(st); +- char_u *rt_saved = rt; +- int len, j; + + if (rt != NULL) + { +! len = (int)STRLEN(rt); +! if (len > pum_width) + { +! for (j = pum_width; j < len; ++j) + mb_ptr_adv(rt); +! len = pum_width; + } +! screen_puts_len(rt, len, row, +! col - len + 1, attr); +! vim_free(rt_saved); + } + vim_free(st); + } +--- 345,380 ---- + if (st != NULL) + { + char_u *rt = reverse_text(st); + + if (rt != NULL) + { +! char_u *rt_start = rt; +! int size; +! +! size = vim_strsize(rt); +! if (size > pum_width) + { +! do +! { +! size -= has_mbyte +! ? (*mb_ptr2cells)(rt) : 1; + mb_ptr_adv(rt); +! } while (size > pum_width); +! +! if (size < pum_width) +! { +! /* Most left character requires +! * 2-cells but only 1 cell is +! * available on screen. Put a +! * '<' on the left of the pum +! * item */ +! *(--rt) = '<'; +! size++; +! } + } +! screen_puts_len(rt, (int)STRLEN(rt), +! row, col - size + 1, attr); +! vim_free(rt_start); + } + vim_free(st); + } +*** ../vim-7.2.341/src/version.c 2010-01-19 17:40:39.000000000 +0100 +--- src/version.c 2010-01-19 18:03:22.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 342, + /**/ + +-- +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/vim/vim-7.2/7.2.343 b/vim/vim-7.2/7.2.343 new file mode 100644 index 0000000..2203151 --- /dev/null +++ b/vim/vim-7.2/7.2.343 @@ -0,0 +1,51 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.343 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.343 (after 7.2.338) +Problem: Can't compile on Win32. +Solution: Insert the missing '|'. +Files: src/ex_cmds2.c + + +*** ../vim-7.2.342/src/ex_cmds2.c 2010-01-19 16:31:10.000000000 +0100 +--- src/ex_cmds2.c 2010-01-19 23:22:40.000000000 +0100 +*************** +*** 2816,2822 **** + { + int fd_tmp = mch_open(filename, O_RDONLY + # ifdef WIN32 +! O_BINARY | O_NOINHERIT + # endif + , 0); + +--- 2816,2822 ---- + { + int fd_tmp = mch_open(filename, O_RDONLY + # ifdef WIN32 +! | O_BINARY | O_NOINHERIT + # endif + , 0); + +*** ../vim-7.2.342/src/version.c 2010-01-19 18:05:05.000000000 +0100 +--- src/version.c 2010-01-19 23:24:05.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 343, + /**/ + +-- +I'm writing a book. I've got the page numbers done. + + /// 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/vim/vim-7.2/7.2.344 b/vim/vim-7.2/7.2.344 new file mode 100644 index 0000000..788bbc4 --- /dev/null +++ b/vim/vim-7.2/7.2.344 @@ -0,0 +1,60 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.344 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.344 (after 7.2.343) +Problem: Can't compile on some systems +Solution: Move the #ifdef outside of the mch_open macro. (Patrick Texier) +Files: src/ex_cmds2.c + + +*** ../vim-7.2.343/src/ex_cmds2.c 2010-01-19 23:25:18.000000000 +0100 +--- src/ex_cmds2.c 2010-01-20 21:38:19.000000000 +0100 +*************** +*** 2814,2824 **** + fopen_noinh_readbin(filename) + char *filename; + { +- int fd_tmp = mch_open(filename, O_RDONLY + # ifdef WIN32 +! | O_BINARY | O_NOINHERIT + # endif +- , 0); + + if (fd_tmp == -1) + return NULL; +--- 2814,2824 ---- + fopen_noinh_readbin(filename) + char *filename; + { + # ifdef WIN32 +! int fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0); +! # else +! int fd_tmp = mch_open(filename, O_RDONLY, 0); + # endif + + if (fd_tmp == -1) + return NULL; +*** ../vim-7.2.343/src/version.c 2010-01-19 23:25:18.000000000 +0100 +--- src/version.c 2010-01-20 21:38:23.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 344, + /**/ + +-- +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/vim/vim-7.2/7.2.345 b/vim/vim-7.2/7.2.345 new file mode 100644 index 0000000..a3b7acf --- /dev/null +++ b/vim/vim-7.2/7.2.345 @@ -0,0 +1,47 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.345 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.345 +Problem: Tab line is not updated when the value of 'bt' is changed. +Solution: Call redraw_titles(). (Lech Lorens) +Files: src/option.c + + +*** ../vim-7.2.344/src/option.c 2009-09-11 15:20:22.000000000 +0200 +--- src/option.c 2010-01-27 15:52:45.000000000 +0100 +*************** +*** 6410,6415 **** +--- 6410,6418 ---- + } + # endif + curbuf->b_help = (curbuf->b_p_bt[0] == 'h'); ++ # ifdef FEAT_TITLE ++ redraw_titles(); ++ # endif + } + } + #endif +*** ../vim-7.2.344/src/version.c 2010-01-20 21:41:40.000000000 +0100 +--- src/version.c 2010-01-27 15:57:06.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 345, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +154. You fondle your mouse. + + /// 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/vim/vim-7.2/7.2.346 b/vim/vim-7.2/7.2.346 new file mode 100644 index 0000000..479aac6 --- /dev/null +++ b/vim/vim-7.2/7.2.346 @@ -0,0 +1,110 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.346 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.346 +Problem: Repeating a command with @: causes a mapping to be applied twice. +Solution: Do not remap characters inserted in the typeahead buffer. (Kana + Natsuno) +Files: src/ops.c + + +*** ../vim-7.2.345/src/ops.c 2010-01-19 14:59:14.000000000 +0100 +--- src/ops.c 2010-01-19 13:04:46.000000000 +0100 +*************** +*** 1301,1310 **** + } + } + + static int + put_in_typebuf(s, esc, colon, silent) + char_u *s; +! int esc; /* Escape CSI characters */ + int colon; /* add ':' before the line */ + int silent; + { +--- 1301,1316 ---- + } + } + ++ /* ++ * Insert register contents "s" into the typeahead buffer, so that it will be ++ * executed again. ++ * When "esc" is TRUE it is to be taken literally: Escape CSI characters and ++ * no remapping. ++ */ + static int + put_in_typebuf(s, esc, colon, silent) + char_u *s; +! int esc; + int colon; /* add ':' before the line */ + int silent; + { +*************** +*** 1312,1318 **** + + put_reedit_in_typebuf(silent); + if (colon) +! retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent); + if (retval == OK) + { + char_u *p; +--- 1318,1324 ---- + + put_reedit_in_typebuf(silent); + if (colon) +! retval = ins_typebuf((char_u *)"\n", REMAP_NONE, 0, TRUE, silent); + if (retval == OK) + { + char_u *p; +*************** +*** 1324,1335 **** + if (p == NULL) + retval = FAIL; + else +! retval = ins_typebuf(p, REMAP_YES, 0, TRUE, silent); + if (esc) + vim_free(p); + } + if (colon && retval == OK) +! retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent); + return retval; + } + +--- 1330,1342 ---- + if (p == NULL) + retval = FAIL; + else +! retval = ins_typebuf(p, esc ? REMAP_NONE : REMAP_YES, +! 0, TRUE, silent); + if (esc) + vim_free(p); + } + if (colon && retval == OK) +! retval = ins_typebuf((char_u *)":", REMAP_NONE, 0, TRUE, silent); + return retval; + } + +*** ../vim-7.2.345/src/version.c 2010-01-27 15:57:17.000000000 +0100 +--- src/version.c 2010-01-27 16:25:55.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 346, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +155. You forget to eat because you're too busy surfing 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/vim/vim-7.2/7.2.347 b/vim/vim-7.2/7.2.347 new file mode 100644 index 0000000..e5fa17d --- /dev/null +++ b/vim/vim-7.2/7.2.347 @@ -0,0 +1,138 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.347 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.347 +Problem: Crash when executing mapping redefines that same mapping. +Solution: Save the values used before evaluating the expression. +Files: src/getchar.c + + +*** ../vim-7.2.346/src/getchar.c 2009-11-11 16:23:37.000000000 +0100 +--- src/getchar.c 2010-01-27 17:30:42.000000000 +0100 +*************** +*** 2389,2394 **** +--- 2389,2405 ---- + /* complete match */ + if (keylen >= 0 && keylen <= typebuf.tb_len) + { ++ #ifdef FEAT_EVAL ++ int save_m_expr; ++ int save_m_noremap; ++ int save_m_silent; ++ char_u *save_m_keys; ++ char_u *save_m_str; ++ #else ++ # define save_m_noremap mp->m_noremap ++ # define save_m_silent mp->m_silent ++ #endif ++ + /* write chars to script file(s) */ + if (keylen > typebuf.tb_maplen) + gotchars(typebuf.tb_buf + typebuf.tb_off +*************** +*** 2431,2436 **** +--- 2442,2457 ---- + #endif + + #ifdef FEAT_EVAL ++ /* Copy the values from *mp that are used, because ++ * evaluating the expression may invoke a function ++ * that redefines the mapping, thereby making *mp ++ * invalid. */ ++ save_m_expr = mp->m_expr; ++ save_m_noremap = mp->m_noremap; ++ save_m_silent = mp->m_silent; ++ save_m_keys = NULL; /* only saved when needed */ ++ save_m_str = NULL; /* only saved when needed */ ++ + /* + * Handle ":map ": evaluate the {rhs} as an + * expression. Save and restore the typeahead so that +*************** +*** 2446,2452 **** + if (tabuf.typebuf_valid) + { + vgetc_busy = 0; +! s = eval_map_expr(mp->m_str, NUL); + vgetc_busy = save_vgetc_busy; + } + else +--- 2467,2475 ---- + if (tabuf.typebuf_valid) + { + vgetc_busy = 0; +! save_m_keys = vim_strsave(mp->m_keys); +! save_m_str = vim_strsave(mp->m_str); +! s = eval_map_expr(save_m_str, NUL); + vgetc_busy = save_vgetc_busy; + } + else +*************** +*** 2470,2486 **** + else + { + i = ins_typebuf(s, +! mp->m_noremap != REMAP_YES +! ? mp->m_noremap +! : STRNCMP(s, mp->m_keys, + (size_t)keylen) != 0 + ? REMAP_YES : REMAP_SKIP, +! 0, TRUE, cmd_silent || mp->m_silent); + #ifdef FEAT_EVAL +! if (mp->m_expr) + vim_free(s); + #endif + } + if (i == FAIL) + { + c = -1; +--- 2493,2517 ---- + else + { + i = ins_typebuf(s, +! save_m_noremap != REMAP_YES +! ? save_m_noremap +! : STRNCMP(s, +! #ifdef FEAT_EVAL +! save_m_keys != NULL ? save_m_keys : +! #endif +! mp->m_keys, + (size_t)keylen) != 0 + ? REMAP_YES : REMAP_SKIP, +! 0, TRUE, cmd_silent || save_m_silent); + #ifdef FEAT_EVAL +! if (save_m_expr) + vim_free(s); + #endif + } ++ #ifdef FEAT_EVAL ++ vim_free(save_m_keys); ++ vim_free(save_m_str); ++ #endif + if (i == FAIL) + { + c = -1; +*** ../vim-7.2.346/src/version.c 2010-01-27 16:31:00.000000000 +0100 +--- src/version.c 2010-01-27 17:27:32.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 347, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +156. You forget your friend's name but not her e-mail 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/vim/vim-7.2/7.2.348 b/vim/vim-7.2/7.2.348 new file mode 100644 index 0000000..5f4ffbd --- /dev/null +++ b/vim/vim-7.2/7.2.348 @@ -0,0 +1,254 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.348 (after 7.2.330) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.348 (after 7.2.330) +Problem: Unicode double-width characters are not up-to date. +Solution: Produce the double-width table like the others. +Files: runtime/tools/unicode.vim, src/mbyte.c + + +*** ../vim-7.2.347/runtime/tools/unicode.vim 2010-01-12 19:48:57.000000000 +0100 +--- runtime/tools/unicode.vim 2010-01-27 17:57:17.000000000 +0100 +*************** +*** 187,202 **** + wincmd p + endfunc + +! " Build the ambiguous table in a new buffer. + " Uses s:widthprops and s:dataprops. +! func! BuildAmbiguousTable() + let start = -1 + let end = -1 + let ranges = [] + let dataidx = 0 + for p in s:widthprops +! if p[1][0] == 'A' +! let n = ('0x' . p[0]) + 0 + " Find this char in the data table. + while 1 + let dn = ('0x' . s:dataprops[dataidx][0]) + 0 +--- 187,213 ---- + wincmd p + endfunc + +! " Build the double width or ambiguous width table in a new buffer. + " Uses s:widthprops and s:dataprops. +! func! BuildWidthTable(pattern, tableName) + let start = -1 + let end = -1 + let ranges = [] + let dataidx = 0 + for p in s:widthprops +! if p[1][0] =~ a:pattern +! if p[0] =~ '\.\.' +! " It is a range. we don't check for composing char then. +! let rng = split(p[0], '\.\.') +! if len(rng) != 2 +! echoerr "Cannot parse range: '" . p[0] . "' in width table" +! endif +! let n = ('0x' . rng[0]) + 0 +! let n_last = ('0x' . rng[1]) + 0 +! else +! let n = ('0x' . p[0]) + 0 +! let n_last = n +! endif + " Find this char in the data table. + while 1 + let dn = ('0x' . s:dataprops[dataidx][0]) + 0 +*************** +*** 205,231 **** + endif + let dataidx += 1 + endwhile +! if dn != n + echoerr "Cannot find character " . n . " in data table" + endif + " Only use the char when it's not a composing char. + let dp = s:dataprops[dataidx] +! if dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me' + if start >= 0 && end + 1 == n + " continue with same range. +- let end = n + else + if start >= 0 + " produce previous range + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) + endif + let start = n +- if p[0] =~ '\.\.' +- let end = ('0x' . substitute(p[0], '.*\.\.', '', '')) + 0 +- else +- let end = n +- endif + endif + endif + endif + endfor +--- 216,238 ---- + endif + let dataidx += 1 + endwhile +! if dn != n && n_last == n + echoerr "Cannot find character " . n . " in data table" + endif + " Only use the char when it's not a composing char. ++ " But use all chars from a range. + let dp = s:dataprops[dataidx] +! if n_last > n || (dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me') + if start >= 0 && end + 1 == n + " continue with same range. + else + if start >= 0 + " produce previous range + call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end)) + endif + let start = n + endif ++ let end = n_last + endif + endif + endfor +*************** +*** 235,242 **** + + " New buffer to put the result in. + new +! file ambiguous +! call setline(1, " static struct interval ambiguous[] =") + call setline(2, " {") + call append('$', ranges) + call setline('$', getline('$')[:-2]) " remove last comma +--- 242,249 ---- + + " New buffer to put the result in. + new +! exe "file " . a:tableName +! call setline(1, " static struct interval " . a:tableName . "[] =") + call setline(2, " {") + call append('$', ranges) + call setline('$', getline('$')[:-2]) " remove last comma +*************** +*** 276,280 **** + " Parse each line, create a list of lists. + call ParseWidthProps() + +! " Build the ambiguous table. +! call BuildAmbiguousTable() +--- 283,290 ---- + " Parse each line, create a list of lists. + call ParseWidthProps() + +! " Build the double width table. +! call BuildWidthTable('[WF]', 'doublewidth') +! +! " Build the ambiguous width table. +! call BuildWidthTable('A', 'ambiguous') +*** ../vim-7.2.347/src/mbyte.c 2010-01-12 19:48:57.000000000 +0100 +--- src/mbyte.c 2010-01-27 18:06:35.000000000 +0100 +*************** +*** 1200,1205 **** +--- 1200,1248 ---- + utf_char2cells(c) + int c; + { ++ /* Sorted list of non-overlapping intervals of East Asian double width ++ * characters, generated with ../runtime/tools/unicode.vim. */ ++ static struct interval doublewidth[] = ++ { ++ {0x1100, 0x115f}, ++ {0x11a3, 0x11a7}, ++ {0x11fa, 0x11ff}, ++ {0x2329, 0x232a}, ++ {0x2e80, 0x2e99}, ++ {0x2e9b, 0x2ef3}, ++ {0x2f00, 0x2fd5}, ++ {0x2ff0, 0x2ffb}, ++ {0x3000, 0x3029}, ++ {0x3030, 0x303e}, ++ {0x3041, 0x3096}, ++ {0x309b, 0x30ff}, ++ {0x3105, 0x312d}, ++ {0x3131, 0x318e}, ++ {0x3190, 0x31b7}, ++ {0x31c0, 0x31e3}, ++ {0x31f0, 0x321e}, ++ {0x3220, 0x3247}, ++ {0x3250, 0x32fe}, ++ {0x3300, 0x4dbf}, ++ {0x4e00, 0xa48c}, ++ {0xa490, 0xa4c6}, ++ {0xa960, 0xa97c}, ++ {0xac00, 0xd7a3}, ++ {0xd7b0, 0xd7c6}, ++ {0xd7cb, 0xd7fb}, ++ {0xf900, 0xfaff}, ++ {0xfe10, 0xfe19}, ++ {0xfe30, 0xfe52}, ++ {0xfe54, 0xfe66}, ++ {0xfe68, 0xfe6b}, ++ {0xff01, 0xff60}, ++ {0xffe0, 0xffe6}, ++ {0x1f200, 0x1f200}, ++ {0x1f210, 0x1f231}, ++ {0x1f240, 0x1f248}, ++ {0x20000, 0x2fffd}, ++ {0x30000, 0x3fffd} ++ }; + /* Sorted list of non-overlapping intervals of East Asian Ambiguous + * characters, generated with ../runtime/tools/unicode.vim. */ + static struct interval ambiguous[] = +*************** +*** 1403,1422 **** + #else + if (!utf_printable(c)) + return 6; /* unprintable, displays */ +! if (c >= 0x1100 +! && (c <= 0x115f /* Hangul Jamo */ +! || c == 0x2329 +! || c == 0x232a +! || (c >= 0x2e80 && c <= 0xa4cf +! && c != 0x303f) /* CJK ... Yi */ +! || (c >= 0xac00 && c <= 0xd7a3) /* Hangul Syllables */ +! || (c >= 0xf900 && c <= 0xfaff) /* CJK Compatibility +! Ideographs */ +! || (c >= 0xfe30 && c <= 0xfe6f) /* CJK Compatibility Forms */ +! || (c >= 0xff00 && c <= 0xff60) /* Fullwidth Forms */ +! || (c >= 0xffe0 && c <= 0xffe6) +! || (c >= 0x20000 && c <= 0x2fffd) +! || (c >= 0x30000 && c <= 0x3fffd))) + return 2; + #endif + } +--- 1446,1452 ---- + #else + if (!utf_printable(c)) + return 6; /* unprintable, displays */ +! if (intable(doublewidth, sizeof(doublewidth), c)) + return 2; + #endif + } +*** ../vim-7.2.347/src/version.c 2010-01-27 17:31:38.000000000 +0100 +--- src/version.c 2010-01-27 18:25:50.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 348, + /**/ + +-- +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/vim/vim-7.2/7.2.349 b/vim/vim-7.2/7.2.349 new file mode 100644 index 0000000..7d0be02 --- /dev/null +++ b/vim/vim-7.2/7.2.349 @@ -0,0 +1,53 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.349 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.349 +Problem: CTRL-W gf doesn't put the new tab in the same place as "tab split" + and "gf". (Tony Mechelynck) +Solution: Store the tab number in cmdmod.tab. +Files: src/window.c + + +*** ../vim-7.2.348/src/window.c 2009-06-24 17:31:27.000000000 +0200 +--- src/window.c 2010-01-27 20:23:22.000000000 +0100 +*************** +*** 626,632 **** + #ifdef FEAT_SEARCHPATH + case 'f': /* CTRL-W gf: "gf" in a new tab page */ + case 'F': /* CTRL-W gF: "gF" in a new tab page */ +! cmdmod.tab = TRUE; + nchar = xchar; + goto wingotofile; + #endif +--- 626,632 ---- + #ifdef FEAT_SEARCHPATH + case 'f': /* CTRL-W gf: "gf" in a new tab page */ + case 'F': /* CTRL-W gF: "gF" in a new tab page */ +! cmdmod.tab = tabpage_index(curtab) + 1; + nchar = xchar; + goto wingotofile; + #endif +*** ../vim-7.2.348/src/version.c 2010-01-27 18:29:21.000000000 +0100 +--- src/version.c 2010-01-27 20:25:43.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 349, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +159. You get excited whenever discussing your hard drive. + + /// 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/vim/vim-7.2/7.2.350 b/vim/vim-7.2/7.2.350 new file mode 100644 index 0000000..7715eb3 --- /dev/null +++ b/vim/vim-7.2/7.2.350 @@ -0,0 +1,86 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.350 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.350 +Problem: Win32: When changing font the window may jump from the secondary + to the primary screen. (Michael Wookey) +Solution: When the screen position was negative don't correct it to zero. +Files: src/gui.c + + +*** ../vim-7.2.349/src/gui.c 2009-09-23 18:14:13.000000000 +0200 +--- src/gui.c 2010-01-27 21:02:32.000000000 +0100 +*************** +*** 1390,1395 **** +--- 1390,1396 ---- + int un_maximize = mustset; + int did_adjust = 0; + #endif ++ int x = -1, y = -1; + + if (!gui.shell_created) + return; +*************** +*** 1406,1411 **** +--- 1407,1416 ---- + + base_width = gui_get_base_width(); + base_height = gui_get_base_height(); ++ if (fit_to_display) ++ /* Remember the original window position. */ ++ gui_mch_get_winpos(&x, &y); ++ + #ifdef USE_SUN_WORKSHOP + if (!mustset && usingSunWorkShop + && workshop_get_width_height(&width, &height)) +*************** +*** 1473,1483 **** + + gui_mch_set_shellsize(width, height, min_width, min_height, + base_width, base_height, direction); +- if (fit_to_display) +- { +- int x, y; + +! /* Some window managers put the Vim window left of/above the screen. */ + gui_mch_update(); + if (gui_mch_get_winpos(&x, &y) == OK && (x < 0 || y < 0)) + gui_mch_set_winpos(x < 0 ? 0 : x, y < 0 ? 0 : y); +--- 1478,1489 ---- + + gui_mch_set_shellsize(width, height, min_width, min_height, + base_width, base_height, direction); + +! if (fit_to_display && x >= 0 && y >= 0) +! { +! /* Some window managers put the Vim window left of/above the screen. +! * Only change the position if it wasn't already negative before +! * (happens on MS-Windows with a secondary monitor). */ + gui_mch_update(); + if (gui_mch_get_winpos(&x, &y) == OK && (x < 0 || y < 0)) + gui_mch_set_winpos(x < 0 ? 0 : x, y < 0 ? 0 : y); +*** ../vim-7.2.349/src/version.c 2010-01-27 20:26:41.000000000 +0100 +--- src/version.c 2010-01-27 21:03:41.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 350, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +160. You get in the elevator and double-click the button for the floor + you want. + + /// 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/vim/vim-7.2/7.2.351 b/vim/vim-7.2/7.2.351 new file mode 100644 index 0000000..55b28f6 --- /dev/null +++ b/vim/vim-7.2/7.2.351 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.351 (after 7.2.347) +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.351 (after 7.2.347) +Problem: Can't build with some compilers. +Solution: Move the #ifdef outside of a macro. Cleanup the code. +Files: src/getchar.c + + +*** ../vim-7.2.350/src/getchar.c 2010-01-27 17:31:38.000000000 +0100 +--- src/getchar.c 2010-01-28 22:42:22.000000000 +0100 +*************** +*** 2492,2508 **** + i = FAIL; + else + { +! i = ins_typebuf(s, +! save_m_noremap != REMAP_YES +! ? save_m_noremap +! : STRNCMP(s, + #ifdef FEAT_EVAL +! save_m_keys != NULL ? save_m_keys : + #endif +! mp->m_keys, +! (size_t)keylen) != 0 +! ? REMAP_YES : REMAP_SKIP, +! 0, TRUE, cmd_silent || save_m_silent); + #ifdef FEAT_EVAL + if (save_m_expr) + vim_free(s); +--- 2492,2515 ---- + i = FAIL; + else + { +! int noremap; +! +! if (save_m_noremap != REMAP_YES) +! noremap = save_m_noremap; +! else if ( + #ifdef FEAT_EVAL +! STRNCMP(s, save_m_keys != NULL +! ? save_m_keys : mp->m_keys, +! (size_t)keylen) +! #else +! STRNCMP(s, mp->m_keys, (size_t)keylen) + #endif +! != 0) +! noremap = REMAP_YES; +! else +! noremap = REMAP_SKIP; +! i = ins_typebuf(s, noremap, +! 0, TRUE, cmd_silent || save_m_silent); + #ifdef FEAT_EVAL + if (save_m_expr) + vim_free(s); +*** ../vim-7.2.350/src/version.c 2010-01-27 21:04:58.000000000 +0100 +--- src/version.c 2010-01-28 22:50:53.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 351, + /**/ + +-- +"Hit any key to continue" it said, but nothing happened after F sharp. + + /// 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/vim/vim-7.2/7.2.352 b/vim/vim-7.2/7.2.352 new file mode 100644 index 0000000..d2e22f2 --- /dev/null +++ b/vim/vim-7.2/7.2.352 @@ -0,0 +1,62 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.352 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.352 +Problem: Win64: Vim doesn't work when cross-compiled with MingW libraries. +Solution: Always return TRUE for the WM_NCCREATE message. (Andy Kittner) +Files: src/gui_w48.c + + +*** ../vim-7.2.351/src/gui_w48.c 2009-01-28 21:22:20.000000000 +0100 +--- src/gui_w48.c 2010-02-03 12:07:11.000000000 +0100 +*************** +*** 1084,1092 **** + case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam); + return TRUE; + #endif + +! default: +! return MyWindowProc(hwnd, uMsg, wParam, lParam); + } + } + +--- 1084,1098 ---- + case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam); + return TRUE; + #endif ++ /* Workaround for the problem that MyWindowProc() returns FALSE on 64 ++ * bit windows when cross-compiled using Mingw libraries. (Andy ++ * Kittner) */ ++ case WM_NCCREATE: ++ MyWindowProc(hwnd, uMsg, wParam, lParam); ++ return TRUE; + +! default: +! return MyWindowProc(hwnd, uMsg, wParam, lParam); + } + } + +*** ../vim-7.2.351/src/version.c 2010-01-28 22:58:10.000000000 +0100 +--- src/version.c 2010-02-03 12:16:30.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 352, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +185. You order fast food over the Internet + + /// 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/vim/vim-7.2/7.2.353 b/vim/vim-7.2/7.2.353 new file mode 100644 index 0000000..06f9f17 --- /dev/null +++ b/vim/vim-7.2/7.2.353 @@ -0,0 +1,173 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.353 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.353 +Problem: No command line completion for ":profile". +Solution: Complete the subcommand and file name. +Files: src/ex_docmd.c, src/ex_cmds2.c, src/ex_getln.c, + src/proto/ex_cmds2.pro, src/vim.h + + +*** ../vim-7.2.352/src/ex_docmd.c 2009-11-03 12:38:50.000000000 +0100 +--- src/ex_docmd.c 2010-02-03 14:40:14.000000000 +0100 +*************** +*** 3804,3809 **** +--- 3804,3814 ---- + xp->xp_context = EXPAND_NOTHING; + break; + #endif ++ #if defined(FEAT_PROFILE) ++ case CMD_profile: ++ set_context_in_profile_cmd(xp, arg); ++ break; ++ #endif + + #endif /* FEAT_CMDL_COMPL */ + +*** ../vim-7.2.352/src/ex_cmds2.c 2010-01-20 21:41:40.000000000 +0100 +--- src/ex_cmds2.c 2010-02-03 14:50:08.000000000 +0100 +*************** +*** 1115,1120 **** +--- 1115,1193 ---- + } + } + ++ /* Command line expansion for :profile. */ ++ static enum ++ { ++ PEXP_SUBCMD, /* expand :profile sub-commands */ ++ PEXP_FUNC, /* expand :profile func {funcname} */ ++ } pexpand_what; ++ ++ static char *pexpand_cmds[] = { ++ "start", ++ #define PROFCMD_START 0 ++ "pause", ++ #define PROFCMD_PAUSE 1 ++ "continue", ++ #define PROFCMD_CONTINUE 2 ++ "func", ++ #define PROFCMD_FUNC 3 ++ "file", ++ #define PROFCMD_FILE 4 ++ NULL ++ #define PROFCMD_LAST 5 ++ }; ++ ++ /* ++ * Function given to ExpandGeneric() to obtain the profile command ++ * specific expansion. ++ */ ++ char_u * ++ get_profile_name(xp, idx) ++ expand_T *xp UNUSED; ++ int idx; ++ { ++ switch (pexpand_what) ++ { ++ case PEXP_SUBCMD: ++ return (char_u *)pexpand_cmds[idx]; ++ /* case PEXP_FUNC: TODO */ ++ default: ++ return NULL; ++ } ++ } ++ ++ /* ++ * Handle command line completion for :profile command. ++ */ ++ void ++ set_context_in_profile_cmd(xp, arg) ++ expand_T *xp; ++ char_u *arg; ++ { ++ char_u *end_subcmd; ++ int len; ++ ++ /* Default: expand subcommands. */ ++ xp->xp_context = EXPAND_PROFILE; ++ pexpand_what = PEXP_SUBCMD; ++ xp->xp_pattern = arg; ++ ++ end_subcmd = skiptowhite(arg); ++ if (*end_subcmd == NUL) ++ return; ++ ++ len = end_subcmd - arg; ++ if (len == 5 && STRNCMP(arg, "start", 5) == 0) ++ { ++ xp->xp_context = EXPAND_FILES; ++ xp->xp_pattern = skipwhite(end_subcmd); ++ return; ++ } ++ ++ /* TODO: expand function names after "func" */ ++ xp->xp_context = EXPAND_NOTHING; ++ } ++ + /* + * Dump the profiling info. + */ +*** ../vim-7.2.352/src/ex_getln.c 2010-01-19 14:59:14.000000000 +0100 +--- src/ex_getln.c 2010-02-03 14:38:43.000000000 +0100 +*************** +*** 4522,4527 **** +--- 4522,4530 ---- + #ifdef FEAT_SIGNS + {EXPAND_SIGN, get_sign_name, TRUE}, + #endif ++ #ifdef FEAT_PROFILE ++ {EXPAND_PROFILE, get_profile_name, TRUE}, ++ #endif + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) + {EXPAND_LANGUAGE, get_lang_arg, TRUE}, +*** ../vim-7.2.352/src/proto/ex_cmds2.pro 2008-01-06 20:07:25.000000000 +0100 +--- src/proto/ex_cmds2.pro 2010-02-03 14:43:12.000000000 +0100 +*************** +*** 24,29 **** +--- 24,31 ---- + int profile_equal __ARGS((proftime_T *tm1, proftime_T *tm2)); + int profile_cmp __ARGS((proftime_T *tm1, proftime_T *tm2)); + void ex_profile __ARGS((exarg_T *eap)); ++ char_u *get_profile_name __ARGS((expand_T *xp, int idx)); ++ void set_context_in_profile_cmd __ARGS((expand_T *xp, char_u *arg)); + void profile_dump __ARGS((void)); + void script_prof_save __ARGS((proftime_T *tm)); + void script_prof_restore __ARGS((proftime_T *tm)); +*** ../vim-7.2.352/src/vim.h 2009-06-16 11:08:13.000000000 +0200 +--- src/vim.h 2010-02-03 14:40:42.000000000 +0100 +*************** +*** 718,723 **** +--- 718,724 ---- + #define EXPAND_SHELLCMD 32 + #define EXPAND_CSCOPE 33 + #define EXPAND_SIGN 34 ++ #define EXPAND_PROFILE 35 + + /* Values for exmode_active (0 is no exmode) */ + #define EXMODE_NORMAL 1 +*** ../vim-7.2.352/src/version.c 2010-02-03 12:23:16.000000000 +0100 +--- src/version.c 2010-02-03 15:07:26.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 353, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +188. You purchase a laptop so you can surf while sitting on the can. + + /// 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/vim/vim-7.2/7.2.354 b/vim/vim-7.2/7.2.354 new file mode 100644 index 0000000..b4f5066 --- /dev/null +++ b/vim/vim-7.2/7.2.354 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.354 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.354 +Problem: Japanese single-width double-byte characters not handled correctly. +Solution: Put 0x8e in ScreenLines[] and the second byte in ScreenLines2[]. + (partly by Kikuchan) +Files: src/screen.c + + +*** ../vim-7.2.353/src/screen.c 2010-01-19 17:40:39.000000000 +0100 +--- src/screen.c 2010-02-03 15:47:19.000000000 +0100 +*************** +*** 2335,2347 **** + if (cells > 1) + ScreenLines[idx + 1] = 0; + } +! else if (cells > 1) /* double-byte character */ +! { +! if (enc_dbcs == DBCS_JPNU && *p == 0x8e) +! ScreenLines2[idx] = p[1]; +! else +! ScreenLines[idx + 1] = p[1]; +! } + col += cells; + idx += cells; + p += c_len; +--- 2335,2346 ---- + if (cells > 1) + ScreenLines[idx + 1] = 0; + } +! else if (enc_dbcs == DBCS_JPNU && *p == 0x8e) +! /* double-byte single width character */ +! ScreenLines2[idx] = p[1]; +! else if (cells > 1) +! /* double-width character */ +! ScreenLines[idx + 1] = p[1]; + col += cells; + idx += cells; + p += c_len; +*************** +*** 4631,4637 **** +--- 4630,4640 ---- + ScreenLines[off] = c; + #ifdef FEAT_MBYTE + if (enc_dbcs == DBCS_JPNU) ++ { ++ if ((mb_c & 0xff00) == 0x8e00) ++ ScreenLines[off] = 0x8e; + ScreenLines2[off] = mb_c & 0xff; ++ } + else if (enc_utf8) + { + if (mb_utf8) +*** ../vim-7.2.353/src/version.c 2010-02-03 15:14:15.000000000 +0100 +--- src/version.c 2010-02-03 15:43:43.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 354, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +189. You put your e-mail address in the upper left-hand corner of envelopes. + + /// 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/vim/vim-7.2/7.2.355 b/vim/vim-7.2/7.2.355 new file mode 100644 index 0000000..b23d44a --- /dev/null +++ b/vim/vim-7.2/7.2.355 @@ -0,0 +1,88 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.355 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.355 +Problem: Computing the cursor column in validate_cursor_col() is wrong when + line numbers are used and 'n' is not in 'cpoptions', causing the + popup menu to be positioned wrong. +Solution: Correctly use the offset. (partly by Dominique Pelle) +Files: src/move.c + + +*** ../vim-7.2.354/src/move.c 2009-11-03 16:22:59.000000000 +0100 +--- src/move.c 2010-02-03 17:15:16.000000000 +0100 +*************** +*** 889,894 **** +--- 889,895 ---- + { + colnr_T off; + colnr_T col; ++ int width; + + validate_virtcol(); + if (!(curwin->w_valid & VALID_WCOL)) +*************** +*** 896,910 **** + col = curwin->w_virtcol; + off = curwin_col_off(); + col += off; + + /* long line wrapping, adjust curwin->w_wrow */ + if (curwin->w_p_wrap + && col >= (colnr_T)W_WIDTH(curwin) +! && W_WIDTH(curwin) - off + curwin_col_off2() > 0) +! { +! col -= W_WIDTH(curwin); +! col = col % (W_WIDTH(curwin) - off + curwin_col_off2()); +! } + if (col > (int)curwin->w_leftcol) + col -= curwin->w_leftcol; + else +--- 897,910 ---- + col = curwin->w_virtcol; + off = curwin_col_off(); + col += off; ++ width = W_WIDTH(curwin) - off + curwin_col_off2(); + + /* long line wrapping, adjust curwin->w_wrow */ + if (curwin->w_p_wrap + && col >= (colnr_T)W_WIDTH(curwin) +! && width > 0) +! /* use same formula as what is used in curs_columns() */ +! col -= ((col - W_WIDTH(curwin)) / width + 1) * width; + if (col > (int)curwin->w_leftcol) + col -= curwin->w_leftcol; + else +*************** +*** 1041,1046 **** +--- 1041,1047 ---- + /* long line wrapping, adjust curwin->w_wrow */ + if (curwin->w_wcol >= W_WIDTH(curwin)) + { ++ /* this same formula is used in validate_cursor_col() */ + n = (curwin->w_wcol - W_WIDTH(curwin)) / width + 1; + curwin->w_wcol -= n * width; + curwin->w_wrow += n; +*** ../vim-7.2.354/src/version.c 2010-02-03 15:47:59.000000000 +0100 +--- src/version.c 2010-02-03 17:40:39.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 355, + /**/ + +-- +I'm in shape. Round IS a shape. + + /// 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/vim/vim-7.2/7.2.356 b/vim/vim-7.2/7.2.356 new file mode 100644 index 0000000..51b646c --- /dev/null +++ b/vim/vim-7.2/7.2.356 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.356 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.356 +Problem: When 'foldmethod' is changed not all folds are closed as expected. +Solution: In foldUpdate() correct the start position and reset fd_flags when + w_foldinvalid is set. (Lech Lorens) +Files: src/fold.c + + +*** ../vim-7.2.355/src/fold.c 2010-01-19 17:24:20.000000000 +0100 +--- src/fold.c 2010-02-03 18:08:11.000000000 +0100 +*************** +*** 849,859 **** + fold_T *fp; + + /* Mark all folds from top to bot as maybe-small. */ +! (void)foldFind(&curwin->w_folds, curwin->w_cursor.lnum, &fp); + while (fp < (fold_T *)curwin->w_folds.ga_data + curwin->w_folds.ga_len + && fp->fd_top < bot) + { + fp->fd_small = MAYBE; + ++fp; + } + +--- 849,865 ---- + fold_T *fp; + + /* Mark all folds from top to bot as maybe-small. */ +! (void)foldFind(&curwin->w_folds, top, &fp); + while (fp < (fold_T *)curwin->w_folds.ga_data + curwin->w_folds.ga_len + && fp->fd_top < bot) + { + fp->fd_small = MAYBE; ++ ++ /* Not sure if this is the right place to reset fd_flags (suggested by ++ * Lech Lorens). */ ++ if (wp->w_foldinvalid) ++ fp->fd_flags = FD_LEVEL; ++ + ++fp; + } + +*** ../vim-7.2.355/src/version.c 2010-02-03 17:42:59.000000000 +0100 +--- src/version.c 2010-02-03 18:12:34.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 356, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +190. You quickly hand over your wallet, leather jacket, and car keys + during a mugging, then proceed to beat the crap out of your + assailant when he asks for your laptop. + + /// 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/vim/vim-7.2/7.2.357 b/vim/vim-7.2/7.2.357 new file mode 100644 index 0000000..e1998a8 --- /dev/null +++ b/vim/vim-7.2/7.2.357 @@ -0,0 +1,49 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.357 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.357 +Problem: When changing 'fileformat' from/to "mac" and there is a CR in the + text the display is wrong. +Solution: Redraw the text when 'fileformat' is changed. (Ben Schmidt) +Files: src/option.c + + +*** ../vim-7.2.356/src/option.c 2010-01-27 15:57:17.000000000 +0100 +--- src/option.c 2010-02-11 16:57:19.000000000 +0100 +*************** +*** 5867,5872 **** +--- 5867,5876 ---- + #endif + /* update flag in swap file */ + ml_setflags(curbuf); ++ /* Redraw needed when switching to/from "mac": a CR in the text ++ * will be displayed differently. */ ++ if (get_fileformat(curbuf) == EOL_MAC || *oldval == 'm') ++ redraw_curbuf_later(NOT_VALID); + } + } + +*** ../vim-7.2.356/src/version.c 2010-02-03 18:14:41.000000000 +0100 +--- src/version.c 2010-02-11 17:01:36.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 357, + /**/ + +-- +From the classified section of a city newspaper: +Dog for sale: eats anything and is fond of children. + + /// 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/vim/vim-7.2/7.2.358 b/vim/vim-7.2/7.2.358 new file mode 100644 index 0000000..524049d --- /dev/null +++ b/vim/vim-7.2/7.2.358 @@ -0,0 +1,78 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.358 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.358 +Problem: Compiler warnings on VMS. (Zoltan Arpadffy) +Solution: Pass array itself instead its address. Return a value. +Files: src/gui_gtk_x11.c, src/os_unix.c + + +*** ../vim-7.2.357/src/gui_gtk_x11.c 2009-11-03 18:13:36.000000000 +0100 +--- src/gui_gtk_x11.c 2010-02-11 18:00:28.000000000 +0100 +*************** +*** 6190,6196 **** + int pcc[MAX_MCO]; + + /* TODO: use the composing characters */ +! c = utfc_ptr2char_len(p, &pcc, len - (p - s)); + if (c >= 0x10000) /* show chars > 0xffff as ? */ + c = 0xbf; + buf[textlen].byte1 = c >> 8; +--- 6190,6196 ---- + int pcc[MAX_MCO]; + + /* TODO: use the composing characters */ +! c = utfc_ptr2char_len(p, pcc, len - (p - s)); + if (c >= 0x10000) /* show chars > 0xffff as ? */ + c = 0xbf; + buf[textlen].byte1 = c >> 8; +*** ../vim-7.2.357/src/os_unix.c 2009-07-22 13:27:50.000000000 +0200 +--- src/os_unix.c 2010-02-11 18:10:20.000000000 +0100 +*************** +*** 1471,1476 **** +--- 1471,1479 ---- + { + /* This function should not return, it causes exit(). Longjump instead. */ + LONGJMP(lc_jump_env, 1); ++ # ifdef VMS ++ return 0; /* avoid the compiler complains about missing return value */ ++ # endif + } + # endif + +*************** +*** 1490,1495 **** +--- 1493,1501 ---- + + /* This function should not return, it causes exit(). Longjump instead. */ + LONGJMP(x_jump_env, 1); ++ # ifdef VMS ++ return 0; /* avoid the compiler complains about missing return value */ ++ # endif + } + #endif + +*** ../vim-7.2.357/src/version.c 2010-02-11 17:02:04.000000000 +0100 +--- src/version.c 2010-02-11 18:10:45.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 358, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +221. Your wife melts your keyboard in the oven. + + /// 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/vim/vim-7.2/7.2.359 b/vim/vim-7.2/7.2.359 new file mode 100644 index 0000000..eb7ade2 --- /dev/null +++ b/vim/vim-7.2/7.2.359 @@ -0,0 +1,68 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.359 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.359 +Problem: Crash when using the Netbeans join command. +Solution: Make sure the ml_flush_line() function is not used recursively. + (Xavier de Gaye) +Files: src/memline.c + + +*** ../vim-7.2.358/src/memline.c 2009-11-17 17:13:03.000000000 +0100 +--- src/memline.c 2010-02-11 18:47:48.000000000 +0100 +*************** +*** 3087,3098 **** +--- 3087,3105 ---- + int start; + int count; + int i; ++ static int entered = FALSE; + + if (buf->b_ml.ml_line_lnum == 0 || buf->b_ml.ml_mfp == NULL) + return; /* nothing to do */ + + if (buf->b_ml.ml_flags & ML_LINE_DIRTY) + { ++ /* This code doesn't work recursively, but Netbeans may call back here ++ * when obtaining the cursor position. */ ++ if (entered) ++ return; ++ entered = TRUE; ++ + lnum = buf->b_ml.ml_line_lnum; + new_line = buf->b_ml.ml_line_ptr; + +*************** +*** 3160,3165 **** +--- 3167,3174 ---- + } + } + vim_free(new_line); ++ ++ entered = FALSE; + } + + buf->b_ml.ml_line_lnum = 0; +*** ../vim-7.2.358/src/version.c 2010-02-11 18:19:32.000000000 +0100 +--- src/version.c 2010-02-11 18:53:55.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 359, + /**/ + +-- +Your fault: 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/vim/vim-7.2/spell/check/check_aa.aff b/vim/vim-7.2/spell/check/check_aa.aff new file mode 100644 index 0000000..20e1633 --- /dev/null +++ b/vim/vim-7.2/spell/check/check_aa.aff @@ -0,0 +1,50 @@ +SET ISO8859-1 +TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ + +FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ + +SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿ +SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? + +MIDWORD '- + +PFXPOSTPONE + +COMPOUNDFLAG x +COMPOUNDMIN 5 + +KEEPCASE = +RARE ? +BAD ! + +MAP 9 +MAP aàáâãäå +MAP eèéêë +MAP iìíîï +MAP oòóôõö +MAP uùúûü +MAP nñ +MAP cç +MAP yÿý +MAP sß + +PFX A Y 1 +PFX A 0 aan . + +PFX B N 1 +PFX B 0 be . + +PFX C Y 1 +PFX C a in aa + +SFX J N 1 +SFX J 0 tje [aeiou][aeiou] + +SFX Z N 1 +SFX Z af ven aaf + +REP 2 +REP g ch +REP cht gd diff --git a/vim/vim-7.2/spell/check/check_aa.dic b/vim/vim-7.2/spell/check/check_aa.dic new file mode 100644 index 0000000..697a9c9 --- /dev/null +++ b/vim/vim-7.2/spell/check/check_aa.dic @@ -0,0 +1,12 @@ +1234 +#Some Comment that isn't supposed to matter +/Another Comment that isn't supposed to matter +'s-Graveland +A4 +AagJe +Aalburg/xZBCJZ +Aals'meer/x +Aal-ten/x +Aalburgers/x +Aalsmeer/x +Aalten/x diff --git a/vim/vim-7.2/spell/check/check_bb.aff b/vim/vim-7.2/spell/check/check_bb.aff new file mode 100644 index 0000000..20e1633 --- /dev/null +++ b/vim/vim-7.2/spell/check/check_bb.aff @@ -0,0 +1,50 @@ +SET ISO8859-1 +TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ + +FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ + +SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿ +SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? + +MIDWORD '- + +PFXPOSTPONE + +COMPOUNDFLAG x +COMPOUNDMIN 5 + +KEEPCASE = +RARE ? +BAD ! + +MAP 9 +MAP aàáâãäå +MAP eèéêë +MAP iìíîï +MAP oòóôõö +MAP uùúûü +MAP nñ +MAP cç +MAP yÿý +MAP sß + +PFX A Y 1 +PFX A 0 aan . + +PFX B N 1 +PFX B 0 be . + +PFX C Y 1 +PFX C a in aa + +SFX J N 1 +SFX J 0 tje [aeiou][aeiou] + +SFX Z N 1 +SFX Z af ven aaf + +REP 2 +REP g ch +REP cht gd diff --git a/vim/vim-7.2/spell/check/check_bb.dic b/vim/vim-7.2/spell/check/check_bb.dic new file mode 100644 index 0000000..c01e716 --- /dev/null +++ b/vim/vim-7.2/spell/check/check_bb.dic @@ -0,0 +1,12 @@ +1234 +#Some Comment that isn't supposed to matter +/Another Comment that isn't supposed to matter +'s-Graveland +A4 +AagJe +Aalburg/xZBCJZ +Aals'meer/x +Aal-ten/x +foobar/= +rare/? +Emacs/! diff --git a/vim/vim-7.2/spell/check/main.aap b/vim/vim-7.2/spell/check/main.aap new file mode 100644 index 0000000..a47351f --- /dev/null +++ b/vim/vim-7.2/spell/check/main.aap @@ -0,0 +1,15 @@ +# Aap recipe for a dummy spell file. +# This is used to check if the .spl file format changes. + +# Use a freshly compiled Vim if it exists. +@if os.path.exists('../../../src/vim'): + VIM = ../../../src/vim +@else: + :progsearch VIM vim + +all: check.latin1.spl + +check.latin1.spl : $VIM check_aa.aff check_aa.dic check_bb.aff check_bb.dic + :sys $VIM -u NONE -e -c "mkspell! check check_aa check_bb" -c q + +# vim: set sts=4 sw=4 : diff --git a/vim/vim-7.2/spell/tet/main.aap b/vim/vim-7.2/spell/tet/main.aap new file mode 100644 index 0000000..617c8a2 --- /dev/null +++ b/vim/vim-7.2/spell/tet/main.aap @@ -0,0 +1,79 @@ +# Aap recipe for Tetum Vim spell files. + +# Use a freshly compiled Vim if it exists. +@if os.path.exists('../../../src/vim'): + VIM = ../../../src/vim +@else: + :progsearch VIM vim + +SPELLDIR = .. +FILES = tet_ID.aff tet_ID.dic + +# I don't hava a Tetum locale, use the Dutch one instead. +all: $SPELLDIR/tet.latin1.spl $SPELLDIR/tet.utf-8.spl ../README_tet.txt + +$SPELLDIR/tet.latin1.spl : $FILES + :sys env LANG=nl_NL.ISO8859-1 + $VIM -u NONE -e -c "mkspell! $SPELLDIR/tet tet_ID" -c q + +$SPELLDIR/tet.utf-8.spl : $FILES + :sys env LANG=nl_NL.UTF-8 + $VIM -u NONE -e -c "mkspell! $SPELLDIR/tet tet_ID" -c q + +../README_tet.txt : README_tet_ID.txt + :copy $source $target + +# +# Fetching the files from OpenOffice.org. +# +OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries +:attr {fetch = $OODIR/%file%} tet_ID.zip + +# The files don't depend on the .zip file so that we can delete it. +# Only download the zip file if the targets don't exist. +tet_ID.aff tet_ID.dic: {buildcheck=} + :assertpkg unzip patch + :fetch tet_ID.zip + :sys $UNZIP tet_ID.zip + :delete tet_ID.zip + @if not os.path.exists('tet_ID.orig.aff'): + :copy tet_ID.aff tet_ID.orig.aff + @if not os.path.exists('tet_ID.orig.dic'): + :copy tet_ID.dic tet_ID.orig.dic + @if os.path.exists('tet_ID.diff'): + :sys patch tet_ID.diff + :sys {force} diff -a -C 1 tet_ID.orig.dic tet_ID.dic >>tet_ID.diff + + +# Check for updated OpenOffice spell files. When there are changes the +# ".new.aff" and ".new.dic" files are left behind for manual inspection. + +check: + :assertpkg unzip diff + :fetch tet_ID.zip + :mkdir tmp + :cd tmp + @try: + @import stat + :sys $UNZIP ../tet_ID.zip + :sys {force} diff ../tet_ID.orig.aff tet_ID.aff >d + @if os.stat('d')[stat.ST_SIZE] > 0: + :copy tet_ID.aff ../tet_ID.new.aff + :sys {force} diff ../tet_ID.orig.dic tet_ID.dic >d + @if os.stat('d')[stat.ST_SIZE] > 0: + :copy tet_ID.dic ../tet_ID.new.dic + @finally: + :cd .. + :delete {r}{f}{q} tmp + :delete tet_ID.zip + + +# vim: set sts=4 sw=4 : diff --git a/vim/vim-7.2/spell/tet/tet_ID.diff b/vim/vim-7.2/spell/tet/tet_ID.diff new file mode 100644 index 0000000..941121c --- /dev/null +++ b/vim/vim-7.2/spell/tet/tet_ID.diff @@ -0,0 +1,26 @@ +*** tet_ID.orig.aff Wed Aug 31 21:14:37 2005 +--- tet_ID.aff Wed Aug 31 21:15:15 2005 +*************** +*** 19 **** +--- 19,39 ---- + TRY aineousrthlkmdbp'fTvgzLAINjSPEMéD-KHáóFRUBGJúOcíwxCWXVñãÁqêçZÓQyâÍ ++ ++ FOL ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ ++ LOW ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ ++ UPP ßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞÿ ++ ++ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿ ++ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? ++ ++ MIDWORD '- ++ ++ MAP 9 ++ MAP aàáâãäå ++ MAP eèéêë ++ MAP iìíîï ++ MAP oòóôõö ++ MAP uùúûü ++ MAP nñ ++ MAP cç ++ MAP yÿý ++ MAP sß diff --git a/vim/vim-7.2/tutor/tutor.bj b/vim/vim-7.2/tutor/tutor.bj new file mode 100644 index 0000000..642a8f3 --- /dev/null +++ b/vim/vim-7.2/tutor/tutor.bj @@ -0,0 +1,987 @@ +=============================================================================== += G o t i k a m i n n W I M M - S c h a i n e r - Fassung 1.7D = +=============================================================================== + + Dyr Wimm ist ayn gro mächtigs Blat, dös was mit aynn Wösn Befelh aufwartt; z + vil, däß myn s allsand in aynn Schainer wie dönn daader unterbräng. Der + Schainer ist yso aufbaut, däß yr halt netty die Befelh allsand bringt, wost + brauchst, däßst mit iem für s Eerste wirklich öbbs anfangen kanst. + Durchhinarechtn kanst di, wennst willst, in ayner halbetn Stund; dös haisst, + wennst di nit grooß mit n Pröbln und Tüftln aufhaltst. + + OBACHT: + Die Faudungen, wost daader finddst, gaand istig s Gwort öndern. Dösswögn + machst eyn n Böstn glei ayn Aamum von derer Dautticht daader. Haast alsnan + dös Gwort daader mit n Befelh "vimtutor bj" ausherlaassn, ist s ee schoon + ayn Aamum. + Mir kan s nit oft gnueg sagn, däß der Schainer daader istig gan n Üebn + ghoert. Also muesst schoon aau die Befelh ausfüern, wennst ys gscheid ler- + nen willst. Mit n Lösn yllain ist s +nit taan! + + Ietz schaust grad non, däß dein Föststölltastn nit druckt ist; und aft geest + glei aynmaal mit dyr j-Tastn abwärts (yso laaufft dös nömlich), hinst däßst + de gantze Letzn 1.1 auf n Bildschirm haast. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.1: MIT N MÖRKL UMAYNANDFARN + +** Dyrmitst mit n Mörkl umaynandkimmst, druck h, j, k und l wie unt zaigt. ** + ^ Ayn Öslsbrugg: + k De Tastn h ist winster und +geet aau gan winster. + < h l > S l leit zesm und richtt si gan zesm. + j S j kan myn wie aynn Pfeil gan unt seghn. + v Mit n k kimmst gan n KOPF. + 1. Ietz ruedertst ainfach mit n Mörkl auf n Bildschirm umaynand, hinst däßst + di sicher füelst. + 2. Halt d Abhin-Tastn (j) druckt; aft rumplt s ainfach weiter. Netty yso + kimmst gan dyr naehstn Letzn. + + 3. Wie gsait, ietz bewögst di also mit derer Tastn gan dyr Letzn 1.2. + +Non öbbs: Allweil, wenn dyr niemer ganz wol ist, wasst öbbenn druckt haast, aft + zipfst ; naacherd bist wider ganz gwon in dyr Befelhs-Artweis. + + + Nöbnbei gsait kimmst gwonerweil aau mit de Pfeiltastnen weiter. Aber + hjkl seind z haissn s Wimm-Urgstain; und de "Hörtn" seind ganz dyr- + für, däß myn bei +dene bleibt. Pröblt s ainfach aus! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.2: ÖNN WIMM AUSSCHALTTN + + + ALSO, EE WENNST ÖBBS VON DAA UNT AUSFÜERST, LIS LIEBER ZEERST DE GANTZE LET- + ZN! + + 1. Druck d -Tastn, dyrmitst aau gwiß in dyr Befelhs-Artweis bist. + + 2. Demmlt :q! . + Daa dyrmit benddst ys Blat und verwirffst allss, wasst öbbenn göndert + haast. + + 3. Balst önn Eingib seghst, gib dö Faudung ein, wo di zo dönn Schainer brun- + gen haat, also vimtutor bj . + + 4. Also, wenn ietz allsse sitzt, naacherd füerst d Schritt 1 hinst 3 aus, mit + wasst ys Blat verlaasst und aft wider einhinkimmst. + +Anmörkung: Mit :q! verwirffst allss, wasst göndert older enther gschribn + haast. In aynn Öttlych Letznen lernst acht, wiest dös allss in ayner + Dautticht speichertst. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.3: GWORT BARECHTN - LÖSCHN + + + ** Druck x , dyrmitst dös Zaichen unter n Mörkl löschst. ** + + 1. Bewög di mit n Mörkl auf de mit ---> angmörkte Zeil unt. + + 2. Zo n Faeler Verbössern farst mit n Mörkl netty auf dös Zaichen, dös wo + glöscht ghoert. + + 3. Druck de Tastn x , däßst dös überflüssige Zaichen löschst. + + 4. Ietz tuest so lang weiter mit 2 hinst 4, hinst däß dyr Saz stimmt. + +---> De Kkuue sprangg übber nn Maanad. + + 5. Wenn ietz de Zeil verbössert ist, geest gan dyr Letzn 1.4. weiter. + +Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn, + allss auswendig z lernen; nän, lern ainfach mit n Anwenddn! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.4: GWORT BARECHTN - EINFÜEGN + + + ** Druck i , dyrmitst öbbs einfüegst. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen Zeil, wo mit ---> angeet. + + 2. Dyrmitst de eerste Zeil wie de zwaitte machst, bewög önn Mörkl auf dös + eerste Zaichen NAACH derer Stöll, daa wo s Gwort eingfüegt werdn sollt. + + 3. Druck i und gib dös ein, was abgeet. + + 4. Wenn ieweils ayn Faeler verweitert ist, aft druck ; und dyrmit kimmst + gan dyr Befelhsartweis zrugg. + So, und ietz tuest ainfach yso weiter, hinst däß dyr Saz stimmt. + +---> Daader gt dd öbbs b. +---> Daader geet diend öbbs ab. + + 5. Balst mainst, däßst ys Gwort-Einfüegn kanst, aft geest gan dyr Letzn 1.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.5: GWORT BARECHTN - ANFÜEGN + + + ** Druck A gan n Gwort Anfüegn. ** + + 1. Gee mit n Mörkl gan dyr eerstn untignen Zeil, wo ayn ---> dyrvor haat. + Daa ist s gleich, wo gnaun dyr Mörkl in derer Zeil steet. + + 2. Demmlt A und gib de entspröchetn Ergöntzungen ein. + + 3. Wennst mit n Anfüegn förtig bist, aft druckst , däßst wider eyn de + Befelhsartweis zruggkimmst. + + 4. So, und ietz geest aft non gan dyr zwaittn mit ---> angmörktn Zeil; und + daadl machst ys netty yso. + +---> In derer Zeil gee + In derer Zeil geet ayn Weeng ayn Gwort ab. +---> Aau daader stee + Aau daader steet öbbs Unvollstöndigs. + + 5. Wennst s Anfüegn von Gwort drauf haast, naacherd gee gan dyr Letzn 1.6. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.6: AYN DAUTTICHT BARECHTN + + + ** Mit :wq speichertst ayn Dautticht und verlaasst önn Wimm ganz. ** + + !! OBACHT: Ee wennst mit dönn alln daa unt weitertuest, lis zeerst de gantze + Letzn durch!! + + 1. Verlaaß also s Blat, wie s in dyr Letzn 1.2. haisst, mit :q! ! + + 2. Gib dö Faudung eyn n Eingib ein: vim Schainer . 'vim' ruefft s Blat + auf, und 'Schainer' haisst de Dautticht, wost barechtn willst. Dyrmit + haast also ayn Dautticht, dö wost barechtn kanst. + + 3. Ietz füegst öbbs ein older löschst öbbs, wiest ys in de vorignen Letznen + glernt haast. + + 4. Speichert de gönderte Dautticht und verlaaß önn Wimm mit :wq . + + 5. Schmeiß önn Wimmschainer neu an und gee gan dyr folgetn Zammenfassung. + + 6. Aft däßst de obignen Schritt glösn und käppt haast, kanst ys durchfüern. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 1 + + + 1. Dyr Mörkl werd mit de Tastnen hjkl older aau mit de Pfeiltastnen gsteuert. + h (winst) j (ab) k (auf) l (zes) + + 2. Um önn Wimm umbb n Eingib aus z ginnen, demmlt: vim DAUTTICHT . + + 3. Willst önn Wimm verlaassn und aau allss verwerffen, aft gibst ein: + :q! . + Gan n Verlaassn und Speichern aber zipfst :wq . + + 4. Willst dös Zaichen löschn, daa wo dyr Mörkl drauf ist, demmltst x . + + 5. Willst öbbs vor n Mörkl eingöbn, zipfst i und drafter . + Mechst ys aber eyn s Zeilnend anhinhöngen, benutzt ys A . + Und ainfach naach n Mörkl füegst ys mit a ein . + +Anmörkung: Druckst , kimmst eyn de Befelhsartweis zrugg older brichst ayn + Faudung ab, dö wo dyr schiefgangen ist. + + Ietz tue mit dyr Letzn 2 weiter. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.1.: LÖSHFAUDUNGEN + + + ** Demmlt dw , dyrmitst ayn Wort löschst ** + + 1. Druck , dyrmit s aau gwiß ist, däßst in dyr Befelhsartweis bist. + + 2. Bewög önn Mörkl zo dyr mit ---> angmörktn Zeil unt. + + 3. Und daa geest ietz auf n Anfang von aynn Wort, dös wo glöscht ghoert. + + 4. Zipf dw , däßst dös gantze Wort löschst. + + Nöbnbei: Dyr Buechstabn d erscheint auf dyr lösstn Zeil von n Bildschirm, + sobaldst n eingibst. Dyr Wimm wartt ietz drauf, däß öbbs kimmt, al- + so daader ayn w . Seghst freilich öbbs Anderts wie ayn d , + naacherd haast öbbs Falschs demmlt. Druck aft und pröblt + s non aynmaal. +---> Ayn Öttlych Wörter lustig ghoernd nit Fisper eyn dönn Saz einhin. + + 5. Äfert d Schritt 3 und 4, hinst däß dyr Saz pässt, und gee aft gan dyr + Letzn 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.2.: NON MEERER LÖSHFAUDUNGEN + + + ** Gib d$ ein, däßst hinst eyn s Zeilnend löschst. ** + + 1. Druck , dyrmitst aau gwiß in dyr Befelhsartweis bist. + + 2. Bewög önn Mörkl hinst eyn de mit ---> angmörkte Zeil untn. + + 3. Gee mit n Mörkl auf s End von dyr faelerfreien Zeil, NAACH n eerstn . . + + 4. Zipf d$ , däßst hinst eyn s End von dyr Zeil löschst. + +---> Öbber haat s End von dyr Zeil doplt eingöbn. doplt eingöbn. + + + 5. Gee weiter gan dyr Letzn 2.3, dyrmitst versteest, was daader ablaaufft. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.3: PFEMERER UND WOLENDER + + + Vil Faudungen, wo s Gwort öndernd, sötznd si aus aynn Pfemerer und aynn Wo- + lend zamm. Bal i also öbbs löschn will, schreib i ainsting d und aft s "Wo- + lend", dös haisst also, "wolend", "wohin" däß i will - older was i halt gnaun + löschn will. + + + + + + + Daader also, was i wie löschn kan: + w - hinst eyn n Anfang von n naehstn Wort AANE dönn sein eersts Zaichen. + e - gan n End von n ietzundn Wort MIT dönn seinn lösstn Zaichen. + $ - zo n End von dyr Zeil MIT derer irn lösstn Zaichen. + + Also löscht de Tastnfolg de umbb n Mörkl hinst eyn s Wortend. +Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mörkl + entspröchet weiter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.4: MIT AYNN ZÖLER D WOLENDER ÄFERN + + + ** Gib i ayn Zal vor aynn Wolend ein, werd dös Sel halt widerholt. ** + + 1. Bewög önn Mörkl gan n Anfang von dyr Zeil mit ---> dyrvor unt. + + 2. Zipf 2w , däßst mit n Mörkl zwai Wörter weitergeest. + + 3. Zipf 3e , däßst mit n Mörkl auf s End von n drittn Wort kimmst. + + 4. Zipf 0 (aynn Nuller), däßst eyn n Anfang von dyr Zeil hinkimmst. + + 5. Widerhol d Schritt 2 und 3 mit verschaidne Zöler. + + ---> Dös ist ietz grad ayn Zeil zo n drinn Umaynanderruedern. + + 6. Gee weiter gan dyr Letzn 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.5: DURCH AYNN ZÖLER GLEI MEERER LÖSCHN + + + ** Ayn Zal vor aynn Pfemerer äfert dönn um seln Werd. ** + + Also, i mecht löschn, und zwaar öbbs Bestimmts, und dös so und so oft: Daa + dyrzue benutz i aynn Zöler: + d Zöler Wolend (also önn Bewögungsschrit) + + 1. Bewög önn Mörkl gan n eerstn Wort in GROOSSBUECHSTABN in dyr mit ---> an- + gmörktn Zeil. + + 2. Demmlt d2w , dyrmitst de ganz grooßgschribnen Wörter löschst. + + 3. Äfert d Schritt 1 und 2 mit dönn entspröchetn Zöler, dyrmitst de drauf- + folgetn ganz großgschribnen Wörter mit ayner ainzignen Faudung löschst: + + +---> Dö ABC DE Zeil FGHI JK LMN OP mit Wörter ist Q RS TUV ietz berichtigt. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.6: ARECHTN AUF ZEILN + + + ** Zipf dd , um ayn gantze Zeil z löschn. ** + + Weil s gro oft vürkimmt, däß myn gantze Zeiln löscht, kaamend schoon d Ent- + wickler von n Urwimm daa drauf, däß myn ainfach dd gan dönn Zwök schreibt. + + + 1. Bewög önn Mörkl gan dyr zwaittn Zeil in n untignen "Gedicht". + 2. Zipf dd , um dö Zeil z löschn. + 3. Ietz bewögst di gan dyr viertn Zeil. + 4. Zipf 2dd , um zwo Zeiln zo n Löschn. + +---> 1) Roosn seind root; +---> 2) Drunter ist s Koot. +---> 3) Veigerln seind blau. +---> 4) Umgrabn tuet s d Sau. +---> 5) D Ur sait de Zeit, +---> 6) Sait, däß s mi freut, +---> 7) Dirndl, dein Gschau. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.7: RUGGGÖNGIG MACHEN (RUGGLN) + + + ** Zipf u , dyrmitst de lösstn Faudungen ruggltst ** + ** older U , um ayn gantze Zeil widerherzstölln. ** + + 1. Bewög önn Mörkl gan dyr mit ---> angmörktn Zeil unt und gee dyrmit auf n + eerstn Faeler. + 2. Zipf x , däßst dös eerste z vile Zaichen löschst. + 3. Ietz demmlt u , dyrmitst de lösste Faudung ruggltst. + 4. Ietz behöb allsand Faeler auf dyr Zeil mit dyr Hilf von n Befelh x . + 5. Aft gibst ayn U (grooß) ein, däßst de Zeil wider yso hinbringst, wie s + gwösn ist. + 6. So, und ietz demmltst so oft u , hinst däßst s U und de andern Fau- + dungen rugggöngig gmacht haast. + 7. Und ietzet widerum schreibst so oft r , hinst däßst allsand Be- + felh widerhergstöllt, z haissn allsse rugg-grugglt haast (also d Rugggön- + gigmachungen rugggöngig gmacht). +---> Beerichtig d Faeller voon dehrer Zeiil und sttöll s mitt n Ruggruggln wi- + der her. + 8. Die Faudungen seind gro wichtig; sö helffend ainn närrisch weiter. + Ietz gee weiter gan dyr Zammenfassung von dyr Letzn 2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 2 + + + 1. Um von n Mörkl aus hinst eyn s naehste Wort zo n Löschn, zipf: dw + 2. Um umbb n Mörkl hinst eyn s End von dyr Zeil zo n Löschn, demmlt d$ + 3. Dyrmitst ayn gantze Zeil löschst, gib ein: dd + 4. Mechst ayn Bewögung, ayn "Wolend", öfters, stöll de entspröchete Zal dyr- + vor: 3dw older aau: d3w + 5. Dyr Pfueg für ayn Önderungsfaudung lautt yso: + Pfemerer [Zal] Bewögungsschrit (Wolend) + Und dös haisst: + Dyr PFEMERER gibt an, WAS taan ghoert, öbbenn d = löschn (»delete«). + [ZAL] - Ayn Zal KAN myn angöbn, wenn myn halt ayn Wolend öfter habn will. + S WOLEND, also dyr Schrit WOHIN, besagt, auf was i aushin will, öbbenn + auf ayn Wort ( w ), s End von dyr Zeil ( $ ) und so weiter. + + 6. Däßst eyn n Anfang von dyr Zeil hinkimmst, schreib aynn Nuller: 0 + + 7. Um öbbs Vorigs wider z ruggln, gib ein: u (klain also) + Um allsand Önderungen in ayner Zeil z ruggln, haast: U (also grooß) + Um "rugg-z-ruggln", also allss wider herzstölln, zipf: r + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.1: ANFÜEGN (»put«) + + + ** Zipf p , dyrmitst öbbs gnetty Glöschts naach n Mörkl anfüegst. ** + + 1. Bewög önn Mörkl gan dyr eerstn untignen Zeil mit ---> dyrvor. + + 2. Zipf dd , um sele Zeil z löschn und dyrmit in aynn Wimm-"Roster" zo n + speichern. + + 3. Bewög önn Mörkl gan dyr Zeil c), ÜBER derer, daa wo de glöschte Zeil ein- + hinkemmen sollt. + + 4. So, und ietz gibst ainfach p ein, und schoon haast dö Zeil unter derer + mit n Mörkl drinn. + 5. Äfert d Schritt 2 hinst 4, hinst däßst allsand Zeiln yso naachynaynand + haast, wie s hinghoernd. + +---> d) Kanst du dös aau? +---> b) Veigerln seind blau. +---> c) Bedachtn kan myn lernen. +---> a) Roosn seind root. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.2: ERSÖTZN (»replace«) + + + ** Zipf rx , um dös Zaichen unter n Mörkl durch x z ersötzn. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen Zeil mit ---> dyrvor. + + 2. Bewög önn Mörkl, hinst däß yr auf n eerstn Faeler steet. + + 3. Zipf r und drafter dös Zaichen, wo dyrfür daa hinghoert. + + 4. Widerhol d Schritt 2 und 3, hinst däßst de eerste Zeil gmaeß dyr zwaittn + berichtigt haast: +---> Wie dö Zeit eingobn wurd, wurdnd ainike falsche Zastnen zipft! +---> Wie dö Zeil eingöbn wurd, wurdnd ainige falsche Tastnen zipft! + + 5. Ietz tue mit dyr Letzn 3.3 weiter. + +Anmörkung: Vergiß nit drauf, däßst mit n Anwenddn lernen solltst und nit öbbenn + mit n Auswendiglernen! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.3: ÖNDERN (»change«) + + + ** Um hinst eyn s Wortend z öndern, zipf ce . ** + + 1. Gee mit n Mörkl auf de eerste mit ---> angmörkte Zeil. + + 2. Ietz farst netty auf s "s" von Wstwr hin. + + 3. Zipf ce ein und aft d Wortberichtigung, daader also örter . + + 4. Druck und bewög önn Mörkl gan n naehstn Zaichen, wo göndert ghoert. + + 5. Äfert d Schritt 3 und 4, hinst däß dyr eerste Saz wie dyr zwaitte ist. + +---> Ainige Wstwr von derer Zlww ghhnnd mit n Öndern-Pfemerer gaauu. +---> Ainige Wörter von derer Zeil ghoernd mit n Öndern-Pfemerer göndert. + +ce löscht also s Wort und schlaaufft di eyn d Eingaab-Artweis. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.4.: NON MEERER ÖNDERUNGEN PFELFS c + + + ** D Löshfaudung c arechtt mit de nömlichnen Wolender wie dö mit d ** + + 1. Dyr Önder-Pfemerer arechtt anleich wie d Löshfaudung mit d , und zwaar + yso: + c [Zal] Bewögungsschritt (Wolend) + + 2. D Wolender seind de gleichn, öbbenn w für Wort und $ für s Zeilnend. + + + 3. Bewög di zo dyr eerstn untignen Zeil mit ---> . + + 4. Ietz geest auf dönn eerstn Faeler. + + 5. Zipf c$ , gib önn Rest von dyr Zeil wie in dyr zwaittn ein und druck aft + . +---> S End von derer Zeil sollt an de zwaitte daader anglichen werdn. +---> S End von derer Zeil sollt mit n Befelh c$ berichtigt werdn. + +Denk allweil dran, däßst iederzeit mit dyr Ruggtastn Faeler ausbössern kanst. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 3 + + + 1. Um ayn vorher glöschts Gwort anzfüegn, zipf p . Daa dyrmit werd dös + gantze Gwort NAACH n Mörkl angfüegt. Wenn s ayn gantze Zeil gwösn ist, + werd dö sel als de Zeil unterhalb n Mörkl eingfüegt. + + 2. Um dös Zaichen unter n Mörkl, also wo dyr Mörkl ist, z ersötzn, zipf r + und aft dös Zaichen, wost daadl habn willst. + + 3. Dyr Önderungspfemerer ( c = »change«) laasst ainn umbb n Mörkl hinst eyn s + End von n Wolend öndern. Zipf ce , dyrmitst umbb n Mörkl hinst eyn s End + von n Wort öndertst, und c$ hinst eyn s End von dyr Zeil. + + 4. Für d Önderung lautt dyr Pfueg: + + c [Zal] Wolend + +Ietz tue mit dyr naehstn Letzn weiter. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.1: MÖRKLSTÖLLUNG UND DAUTTICHTDARSTAND + +** Demmlt g, däßst önn Befand und Darstand von dyr Dautticht anzaigst. ** + ** Zipf G , dyrmitst auf ayn bestimmte Zeil in dyr Dautticht hinkimmst. ** + +Anmörkung: Lis dö gantze Letzn daader durch, ee wennst iewign öbbs unternimmst! + + 1. Druck g . Auf dös hin erscheint auf derer Seitt ganz unt ayn Dar- + standsmeldung mit n Dauttichtnam und n Befand innerhalb dyr Dautticht. + Mörk dyr de Zeilnnummer für n Schrit 3. + +Anmörkung: Müglicherweis seghst aau önn Mörklbefand in n zesmen untern Bild- + schirmögg. Aft ist s "Lindl" (»ruler«) eingstöllt; schau dyrzue mit + n Befelh :help 'ruler' naach. + 2. Druck G , um an s End von dyr Dautticht z kemmen. + gg gibst ein, däßst gan n Anfang von dyr Dautticht aufhinkimmst. + + 3. Gib d Nummer von derer Zeil ein, daa wost vorher warst, und aft non G . + Dös bringt di zrugg gan seler Zeil, daa wost stuenddst, wiest dös eerste + Maal g gadruckst. + + 4. Wennst di sicher gnueg füelst, aft füer d Schritt 1 hinst 3 aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.2: DYR BEFELH ZO N SUECHEN + + + ** Zipf / und dyrnaach aynn Ausdruk, um selbignen zo n Suechen. ** + + 1. Du gibst also in dyr Befelhsartweis s Zaichen / ein. Dös sel wie aau dyr + Mörkl erscheinend drauf unt auf n Schirm, netty wie bei dyr Faudung : . + + 2. Ietz zipf 'Faeeler' . Netty um dös 'Faeeler' willst ietz suechen. + + 3. Willst um gnaun dönn Ausdruk weitersuechen, zipf ainfach n (wie »next«). + Willst hinzrugg suechen, aft gibst N ein. + + 4. Um von Haus aus zruggaus z suechen, nimm ? statt / her. + + 5. Dyrmitst wider daa hinkimmst, wost herkemmen bist, druck o, und dös + öfter, wennst weiter zrugg willst. Mit i widerum kimmst vorwärts. + +---> Aynn Faeler schreibt myn nit "Faeeler"; Faeeler ist ayn Faeler + +Anmörkung: Wenn d Suech s Dauttichtend dyrraicht haat, geet s eyn n Anfang wi- + der weiter dyrmit, men Sach dyr Schaltter 'wrapscan' wär auf aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.3: DE GÖGNKLAMMERN FINDDN + + + ** Zipf % , um de entspröchete Klammer ) , ] older } z finddn. ** + + 1. Sötz önn Mörkl auf iewign aine von dene drei Klammern ( , [ older { + in dyr untignen Zeil, wo mit ---> angmörkt ist. + + 2. Ietzet zipf s Zaichen % . + + 3. Dyr Mörkl geet ietz auf de pässete schliessete Klammer. + + 4. Ietz demmlt % , und dyrmit kimmst gan dyr öffneretn Klammer zrugg. + + 5. Sötz önn Mörkl auf ayn anderne Klammer von ({[]}) und pröblt % aus. + +---> Dös ( ist blooß ayn Pochzeil ( mit [ verschaidne ] { Klammern } drinn. )) + +Anmörkung: Um dö Müglichkeit gaast bsunders froo sein, wennst aynmaal in aynn + Spaichgwort verzweiflt ayn faelete Gögnklammer suechst! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.4: D ERSÖTZUNGSFAUDUNG (»substitute«) + + + ** Zipf :s/alt/neu/g , um 'alt' durch 'neu' zo n Ersötzn. ** + + 1. Gee mit n Mörkl zo dyr unt steehetn mit ---> angmörktn Zeil. + + 2. Zipf :s/dee/de . Der Befelh ersötzt alsnan grad dös +eerste "dee", + wo vürkimmt. + + 3. Ietz pröblt s mit :s/dee/de/g . Dös zuesötzliche g ("Pflok" nennt myn + öbbs Sölchers) bewirkt, däß allss, was dyrmit kennzaichnet ist, innerhalb + von dyr ainn Zeil ersötzt werd. + +---> Dee schoenste Zeit, däß myn dee Blüemln anschaut, ist dee schoene Lan- + gesszeit. + 4. Um ietz allsand Suechbegriff innerhalb von zwo Zeiln zo n Öndern, zipf + :#,#s/alt/neu/g , wobei # ieweils für de eerste und lösste Zeil von dönn + Pfraich steet. + :%s/alt/neu/g zipfst, däßst d Vürkemmen in dyr gantzn Dautticht öndertst. + Mit :%s/alt/neu/gc finddst allsand Vürkemmen in dyr gsamtn Dautticht; + daa werst aber zeerst non gfraagt, obst ys ersötzn willst older nity. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 4 + + 1. g zaigt dönn ietzundn Dauttichtbefand und önn Darstand dyrvon an. + G bringt di an s End von dyr Dautticht. + G bringt di gan dyr entspröchetn Zeilnnummer. + gg bringt di zo dyr eerstn Zeil. + + 2. D Eingaab von / mit aynn Ausdruk suecht VÜRSHLING um dönn Ausdruk. + Gibst ? und aynn Suechbegrif ein, suecht s um dönn ÄRSHLING. + Zipf naach ayner Suech n ; naacherd werd in de gleiche Richtung weiter- + gsuecht. Mit N geet s umkeerter weiter. + o bringt di zo ölterne Befändd zrugg, i zo neuerne. + + 3. D Eingaab von % , wenn dyr Mörkl auf ainer von dene Klammern steet: ({[ + )]} , bringt di zo dyr Gögnklammer. + + 4. Um dös eerste Vürkemmen von "alt" in ayner Zeil durch "neu" z ersötzn, + zipf :s/alt/neu . + Um allsand in ayner Zeil z ersötzn, zipf :s/alt/neu/g . + Mechst allss in zwo Zeiln ersötzn, demmlt zo n Beispil :5,6s/alt/neu/g . + Mechst allss in dyr gantzn Dautticht ersötzn, gib ein: :%s/alt/neu/g . + Willst ayn ieds Maal bstaetln, höng 'c' wie »confirm« hint anhin. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.1: ZWISCHNDRINN AYNN AUSSERIGNEN BEFELH AUSFÜERN + + + ** Willst ayn Gfäßfaudung ausfüern, gib ainfach dö sel naach :! ein. ** + + 1. Zipf dönn bekanntn Befelh : , dyrmitst mit n Mörkl auf n Bildschirm + ganz abhin kimmst. Draufhin kanst aynn gwonen Gfäßbefelh eingöbn. + + 2. Zeerst kimmt aber non ayn Ruefzaichen ! . Und ietz haast de Müglich- + keit, ayn beliebige ausserige Gfäßfaudung auszfüern. + + 3. Als Beispil zipf :!ls ; und schoon haast ayn Auflistung von deinn + Verzaichniss, netty wie wennst ganz gwon in n Eingib wärst. Geet ls + aus iewign aynn Grund nit, aft pröblt s mit :!dir . + +Also non aynmaal: Mit dönn Angang kan ayn iede beliebige ausserige Faudung aus- + gfüert werdn, aau mit Auerwerdd. + +Und wolgmörkt: Allsand Befelh, wo mit : angeend, müessend mit bstö- + tigt werdn. Dös dyrsagn myr vürbaß niemer. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.2: NON MEERER DRÜBER, WIE MYN DAUTTICHTN SCHREIBT + + + ** Um öbbs Gönderts neu z speichern, zipf :w NEUER_DAUTTICHTNAM. ** + + 1. Zipf :!dir older :!ls , däßst dyr ayn Auflistung von deinn Verzaich- + niss ausherlaasst. Däßst dyrnaach eingöbn muesst, waisst ee schoon. + + 2. Suech dyr aynn Dauttichtnam aus, dönn wo s non nit geit, öbbenn POCH. + + 3. Ietz demmlt: :w POCH (also mit POCH als dönn neuen Dauttichtnam). + + 4. Dös speichert ietz de gantze Dautticht, also önn Wimmschainer, unter dönn + Nam POCH. Dös kanst leicht überprüeffen, indem däßst ainfach :!ls older + :!dir zipfst und dyrmit deinn Verzaichnissinhalt seghst. + +Anmörkung: Stigst ietz aus n Wimm aus und gännst n aft wider mit vim POCH , + naacherd wär dö Dautticht ayn gnaune Aamum von n Schainer dyrselbn, + wiest n gspeichert haast. + + 5. Ietz verweitert dö Dautticht - fallsst s Fenstl haast - , mit :!del POCH + beziehungsweis bei aynn Ainslgebäu mit :!rm POCH . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.3: AYNN TAIL VON N GWORT ZO N SPEICHERN AUSWALN + +** Um aynn Tail von dyr Dautticht z speichern, zipf v [Wolend] :w DAUTTICHT ** + + 1. Ruck önn Mörkl auf netty dö Zeil daader. + + 2. Demmlt v und gee mit n Mörkl auf dönn fümftn Auflistungspunt untet. Du + seghst glei, däß s Gwort vürherghöbt erscheint. + + 3. Druck s Zaichen : . Ganz unt auf n Bildschirm erscheint :'<,'> . + + 4. Zipf w POCH , wobei s dönn Dauttichtnam POCH non nit geit. Vergwiß di, + däßst dös :'<,'>w POCH aau +seghst, ee wennst druckst. + + 5. Dyr Wimm schreibt de ausgwaltn Zeil eyn de Dautticht POCH einhin. Benutz + :!dir older :!ls , däßst dös überprüeffst. Lösh s fein nit öbbenn! Mir + brauchend s nömlich für de naehste Letzn. + +Anmörkung: Druckt myn v , ginnt d Sichtisch-Auswal. Du kanst mit n Mörkl um- + aynandfarn, um d Auswal z veröndern. Drafter kan myn mit yn aynn + Pfemerer mit dönn Gwort öbbs machen. Zo n Beispil löscht d dös + Gwort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.4: EINLÖSN UND ZAMMENFÜERN VON DAUTTICHTN + + + ** Um önn Inhalt von ayner Dautticht einzlösn, zipf :r DAUTTICHTNAM ** + + 1. Sötz önn Mörkl über dö Zeil daader. + +OBACHT: Aft däßst önn Schrit 2 ausgfüert haast, seghst auf aynmaal öbbs aus + dyr Letzn 5.3. Bewög di naacherd wider abwärts, dyrmitst dö Letzn wi- + derfinddst. + 2. Ietz lis dein Dautticht POCH ein, indem däßst d Faudung :r POCH aus- + füerst, wobei wie gsait POCH für dönn von dir ausgsuechtn Dauttichtnam + steet. De einglösne Dautticht werd unterhalb dyr Mörklzeil eingfüegt. + + 3. Um zo n Überprüeffen, ob de Dautticht aau gwiß einglösn ist, gee zrugg; + und du seghst, däß s ietz zwo Ausförtigungen von dyr Letzn 5.3. geit, s + Urniss und de eingfüegte Dauttichtfassung. + +Anmörkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlösn. Zo n Bei- + spil list :r !ls d Ausgaab von dyr Faudung ls ein und füegt s + unterhalb n Mörkl ein. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 5 + + + 1. :!FAUDUNG füert aynn ausserignen Befelh aus. + + Daader ayn Öttlych gwänddte Beispiler: + (Fenstl) (Ainsl - Leinsl) + :!dir :!ls - listt s Verzaichniss auf. + :!del DAUTTICHT :!rm DAUTTICHT - verweitert sele Dautticht. + + 2. :w DAUTTICHT speichert de ietzunde Wimmdautticht unter dönn besagtn Nam. + + 3. v WOLEND :w DAUTTICHTNAM schreibt de sichtisch ausgwaltn Zeiln eyn de + Dautticht mit seln Nam. + + 4. :r DAUTTICHTNAM ladt sele Dautticht und füegt s unterhalb n Mörklbefand + ein. + + 5. :r !dir list d Ausgaab von dyr Faudung dir und füegt s unterhalb n + Mörklbefand ein. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.1: ZEIL ÖFFNEN (»open«) + + + ** Zipf o, um ayn Zeil unterhalb n Mörkl z öffnen und eyn d ** + ** Einfüegartweis z kemmen. ** + + 1. Bewög önn Mörkl zo dyr eerstn mit ---> angmörktn Zeil unt. + + 2. Zipf o (klain), um ayn Zeil UNTERHALB n Mörkl z öffnen und mit dyr Ein- + füegartweis weiterztuen. + + 3. Ietz zipf ayn Weeng ayn Gwort und druck , um d Einfüegartweis z ver- + laassn. +---> Mit o werd dyr Mörkl auf de offene Zeil in dyr Einfüegartweis gsötzt. + + 4. Um ayn Zeil OBERHALB n Mörkl aufzmachen, gib ainfach aynn groosss O statt + yn aynn klainen ein. Versuech dös auf dyr untignen Zeil. + +---> Öffnet ayn Zeil über derer daader mit O , wenn dyr Mörkl auf derer Zeil + ist. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.2: GWORT ANFÜEGN (»append«) + + + ** Zipf a , um öbbs NAACH n Mörkl einzfüegn. ** + + 1. Bewög önn Mörkl gan n Anfang von dyr eerstn Üebungszeil mit ---> unt. + + 2. Druck e , hinst däß dyr Mörkl an n End von Zei steet. + + 3. Zipf ayn klains a , um öbbs NAACH n Mörkl anzfüegn. + + 4. Vergöntz dös Wort wie in dyr Zeil drunter. Druck , um d Schreib-Art- + weis z verlaassn. + + 5. Bewög di mit e zo n naehstn ungantzn Wort und widerhol d Schritt 3 und + 4. + +---> Dö Ze biett ayn Glögn , ayn Gwort in ayner Zeil anzfü. +---> Dö Zeil biett ayn Glögnet, ayn Gwort in ayner Zeil anzfüegn. + +Anmörkung: a , i und A bringend ainn gleichermaaßn eyn d Einfüegartweis; + dyr ainzige Unterschaid ist, WO mit n Einfüegn angfangt werd. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.3: AYN ANDERNE WEIS ZO N ERSÖTZN (»replace«) + + + ** Demmlt ayn groosss R , um meerer als wie grad ain Zaichen z ersötzn. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen, mit ---> angmörktn Zeil. + Gee mit n Mörkl gan n Anfang von n eerstn xxx . + + 2. Ietz druck R und zipf sele Zal, wo drunter in dyr zwaittn Zeil steet, + yso däß de sel s xxx ersötzt. + + 3. Druck , um d Ersötzungsartweis z verlaassn. Du gspannst, däß dyr + Rest von dyr Zeil unveröndert bleibt. + + 4. Äfert die Schritt, um dös überblibne xxx z ersötzn. + +---> S Zunddn von 123 zo xxx ergibt xxx. +---> S Zunddn von 123 zo 456 ergibt 579. + +Anmörkung: D Ersötzungsartweis ist wie d Einfüegartweis, aber ayn ieds eindem- + mlte Zaichen löscht ayn vorhanddns. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.4: GWORT AAMEN UND EINFÜEGN + + ** Benutz önn Pfemerer y , um öbbs z aamen, und p , um öbbs einzfüegn. ** + + 1. Gee zo dyr mit ---> angmörktn Zeil unt und sötz önn Mörkl hinter "a)". + + 2. Ginn d Sichtisch-Artweis mit v und bewög önn Mörkl gnaun vor "eerste". + + 3. Zipf y , um dönn vürherghöbtn Tail z aamen. + + 4. Bewög önn Mörkl gan n End von dyr naehstn Zeil: j$ + + 5. Demmlt p , um dös Gwort einzfüegn, und aft: a zwaitte . + + 6. Benutz d Sichtischartweis, um " Eintrag." auszwaln, aam s pfelfs y, be- + wög di gan n End von dyr naehstn Zeil mit j$ und füeg s Gwort dortn mit + p an. + +---> a) dös ist dyr eerste Eintrag. + b) + +Anmörkung: Du kanst y aau als Pfemerer verwenddn; yw aamt ain Wort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.5: SCHALTTER SÖTZN + +** Sötz aynn Schaltter yso, däß ayn Suech older Ersötzung Grooß- und Klain- ** + ** schreibung übergeet. ** + + 1. Suech um 'übergee", indem däßst /übergee eingibst. + Widerhol d Suech ayn Öttlych Maal, indem däßst de Tastn n druckst. + + 2. Sötz de Zwisl - önn Schaltter - 'ic' (»ignore case«), indem däßst :set ic + eingibst. + 3. Ietz suech wider um 'übergee' und tue aau wider mit n weiter. Daa fallt + dyr auf, däß ietz öbbenn aau Übergee und ÜBERGEE hergeet. + + 4. Sötz de Zwisln 'hlsearch' und 'incsearch' pfelfs: :set hls is + + 5. Widerhol d Suech und bobacht, was ietz gschieght: /übergee + + 6. Däßst grooß und klain wider gwon unterscheidst, zipf: :set noic + +Anmörkung: Mechst de Tröffer niemer vürherghöbt seghn, gib ein: :nohlsearch +Anmörkung: Sollt klain/grooß bei ayner ainzignen Suech wurst sein, benutz \c + in n Suechausdruk: /übergee\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 6 + + 1. Zipf o , um ayn Zeil UNTERHALB n Mörkl z öffnen und d Einfüegartweis z + ginnen. + Zipf O , um ayn Zeil OBERHALB n Mörkl z öffnen. + + 2. Zipf a , um NAACH n Mörkl ayn Gwort einzfüegn. + Zipf A , um ayn Gwort naach n Zeilnend anzfüegn. + + 3. D Faudung e bringt di gan n End von aynn Wort. + + 4. Dyr Pfemerer y (»yank«) aamt öbbs, p (»put«) füegt dös ein. + + 5. Ayn groosss R geet eyn d Ersötzungsartweis, hinst däß myn druckt. + + 6. D Eingaab von ":set xxx" sötzt de Zwisl "xxx". Ayn Öttlych Zwisln seind: + 'ic' 'ignorecase' Grooß/klain wurst bei ayner Suech + 'is' 'incsearch' Zaig aau schoon ayn Tailüberainstimmung + 'hls' 'hlsearch' Höb allsand pässetn Ausdrück vürher + Dyr Schaltternam kan in dyr Kurz- older Langform angöbn werdn. + + 7. Stöll yn ayner Zwisl "no" voran, däßst ys abschalttst: :set noic +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.1: AYN HILFGWORT AUFRUEFFEN + + + ** Nutz dös einbaute Hilfgebäu, de "Betribsanlaittung" ** + + Eyn n Wimm ist ayn ausfüerliche "Gebrauchsanweisung" einbaut. Für s Eerste + pröblt ainfach ains von dene dreu aus: + - Druck d -Tastn, wennst öbbenn aine haast. + - Druck de Tastn , fallsst ys haast. + - Zipf :help + + Lis di eyn s Hilffenster ein, dyrmitst draufkimmst, wie dös mit dyr Hilf geet. + Demmlt w w , um von ainn Fenster zo n andern zo n Springen. + Demmlt :q , um s Hilffenster zo n Schliessn. + + Du kanst zo so guet wie allssand ayn Hilf finddn, indem däßst yn dyr Faudung + :help aynn Auerwerd naachstöllst und istig nit vergisst. Pröblt dös: + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.2: ERSTÖLL AYN GIN-SCHRIPF + + + ** Mutz önn Wimm mit de einbautn Faehigkeitn auf ** + + Dyr Wimm besitzt ayn Wösn Schäftungen, wo über n Urwimm aushingeend, aber de + meerern dyrvon seind in dyr Vorgaab ausgschaltt. Dyrmitst meerer aus n Wimm + ausherholst, erstöllst ayn "vimrc"-Dautticht. + + 1. Lög ayn "vimrc"-Dautticht an; dös geet ie naach Betribsgebäu verschidn: + :e ~/.vimrc für s Ainsl + :e $VIM/_vimrc bei n Fenstl + + 2. Ietz lis önn Inhalt von dyr Beispil-"vimrc"-Dautticht ein: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Speichert de Dautticht mit: + :w + + 4. Bei n naehstn Gin von n Wimm ist aft d Füegnussvürherhöbung zuegschaltt. + Du kanst dyr allss eyn dö Dautticht einhinschreibn, wasst bständig habn + willst. Meerer dyrzue erfarst unter: :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.3: VERGÖNTZN + + + ** Befelhszeilnvergöntzung mit d und ** + + 1. Vergwiß di, däß dyr Wimm nit auf n Urwimm-"Glais" fart: :set nocp + + 2. Schaug naach, wölcherne Dauttichtn däß s in n Verzaichniss geit: :!ls + older :!dir + 3. Zipf önn Anfang von ayner Faudung: :e + + 4. Druck d , und dyr Wimm zaigt ayn Listn von Faudungen, wo mit "e" + angeend. + 5. Druck , und dyr Wimm vervollstöndigt önn Faudungsnam zo ":edit". + + 6. Füeg ayn Laerzaichen und önn Anfang von ayner besteehetn Dautticht an: + :edit DAU + + 7. Druck . Dyr Wimm vergöntzt önn Nam, dös haisst, wenn yr aindeuttig + ist. +Anmörkung: D Vergöntzung geit s für aynn Hauffen Faudungen. Versuech ainfach + d und . Bsunders nützlich ist dös bei :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 7 + + + 1. Zipf :help older druck older , um ayn Hilffenster z öffnen. + + 2. Zipf :help FAUDUNG , um auf ayn Hilf gan aynn Befelh z kemmen. + + 3. Zipf w w , um zo n andern Fenster z springen. + + 4. Zipf :q , um s Hilffenster z schliessn. + + 5. Erstöll ayn vimrc-Ginschripf zuer Sicherung von deine Mötzneinstöllungen. + + 6. Druck d, aft däßst naach : mit ayner Faudung angfangt haast, dyr- + mitst mügliche Vergöntzungen anzaigt kriegst. + Druck für ain Vervollstöndigung yllain. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Dös wär ietzet s End von n Wimmschainer. Gangen ist s daa drum, aynn kurtzn + und bündignen Überblik über s Blat WIMM z lifern, netty vil gnueg, däß myn + für s Eerste wirklich öbbs dyrmit anfangen kan. Dyrmit ist s aber auf kain + Weitn non nit taan; dyr Wimm haat schoon non vil meerer auf Lager. Lis als + Naehsts aynmaal s Benutzerhandbuech: :help user-manual . + + Zo n Weiterlösn und Weiterlernen wör dös Buech daader zo n Empfelhen: + Vim - Vi Improved - von n OUALLINE Steve + Verlaag: New Riders + Dös ist dös eerste Buech, wo ganz yn n Wimm gwidmt ist, netty dös Grechte für + Anfönger. Es haat ayn Wösn Beispiler und aau Bilder drinn. + See http://iccf-holland.org/click5.html + + Dös folgete Buech ist schoon ölter und meerer über n Urwimm als wie über n + Wimm, aber aau zo n Empfelhen: Textbearbeitung mit dem vi-Editor - von dyr + LAMB Linda und n ROBBINS Arnold - Verlaag O'Reilly - Buechlaittzal (ISBN): + 3897211262 + In dönn Buech kan myn fast allss finddn, was myn mit n Urwimm angeen mecht. + De söxte Ausgaab enthaltt aau schoon öbbs über n Wimm. + Als ietzunde Bezugniss für d Fassung 6.2 und ayn pfrenge Einfüerung dient + dös folgete Buech: + vim ge-packt von n WOBST Reinhard + mitp-Verlaag, Buechlaittzal 3-8266-1425-9 + Trotz dyr recht pfrengen Darstöllung ist s durch seine viln nützlichnen Bei- + spiler aau für Einsteiger grad grecht. Probhaeupster und de Beispilschripfer + seind zesig zo n Kriegn; see http://iccf-holland.org/click5.html + + Verfasst habnd dönn Schainer dyr PIERCE Michael C. und WARE Robert K. von dyr + Kolraader Knappnschuel (Colorado School of Mines). Er beruet auf Entwürff, wo + dyr SMITH Charles von dyr Kolraader Allschuel (Colorado State University) + zuer Verfüegung gstöllt haat. Gundpost: bware@mines.colorado.edu. + Für n Wimm haat n dyr MOOLENAAR Bram barechtt. + De bairische Übersötzung stammt von n HELL Sepp 2009. Sein Gundpostbrächt ist + sturmibund@t-online.de + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + + + diff --git a/vim/vim-7.2/tutor/tutor.bj.utf-8 b/vim/vim-7.2/tutor/tutor.bj.utf-8 new file mode 100644 index 0000000..80c3ade --- /dev/null +++ b/vim/vim-7.2/tutor/tutor.bj.utf-8 @@ -0,0 +1,987 @@ +=============================================================================== += G o t i k a m i n n W I M M - S c h a i n e r - Fassung 1.7D = +=============================================================================== + + Dyr Wimm ist ayn gro mächtigs Blat, dös was mit aynn Wösn Befelh aufwartt; z + vil, däß myn s allsand in aynn Schainer wie dönn daader unterbräng. Der + Schainer ist yso aufbaut, däß yr halt netty die Befelh allsand bringt, wost + brauchst, däßst mit iem für s Eerste wirklich öbbs anfangen kanst. + Durchhinarechtn kanst di, wennst willst, in ayner halbetn Stund; dös haisst, + wennst di nit grooß mit n Pröbln und Tüftln aufhaltst. + + OBACHT: + Die Faudungen, wost daader finddst, gaand istig s Gwort öndern. Dösswögn + machst eyn n Böstn glei ayn Aamum von derer Dautticht daader. Haast alsnan + dös Gwort daader mit n Befelh "vimtutor bj" ausherlaassn, ist s ee schoon + ayn Aamum. + Mir kan s nit oft gnueg sagn, däß der Schainer daader istig gan n Ãœebn + ghoert. Also muesst schoon aau die Befelh ausfüern, wennst ys gscheid ler- + nen willst. Mit n Lösn yllain ist s +nit taan! + + Ietz schaust grad non, däß dein Föststölltastn nit druckt ist; und aft geest + glei aynmaal mit dyr j-Tastn abwärts (yso laaufft dös nömlich), hinst däßst + de gantze Letzn 1.1 auf n Bildschirm haast. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.1: MIT N MÖRKL UMAYNANDFARN + +** Dyrmitst mit n Mörkl umaynandkimmst, druck h, j, k und l wie unt zaigt. ** + ^ Ayn Öslsbrugg: + k De Tastn h ist winster und +geet aau gan winster. + < h l > S l leit zesm und richtt si gan zesm. + j S j kan myn wie aynn Pfeil gan unt seghn. + v Mit n k kimmst gan n KOPF. + 1. Ietz ruedertst ainfach mit n Mörkl auf n Bildschirm umaynand, hinst däßst + di sicher füelst. + 2. Halt d Abhin-Tastn (j) druckt; aft rumplt s ainfach weiter. Netty yso + kimmst gan dyr naehstn Letzn. + + 3. Wie gsait, ietz bewögst di also mit derer Tastn gan dyr Letzn 1.2. + +Non öbbs: Allweil, wenn dyr niemer ganz wol ist, wasst öbbenn druckt haast, aft + zipfst ; naacherd bist wider ganz gwon in dyr Befelhs-Artweis. + + + Nöbnbei gsait kimmst gwonerweil aau mit de Pfeiltastnen weiter. Aber + hjkl seind z haissn s Wimm-Urgstain; und de "Hörtn" seind ganz dyr- + für, däß myn bei +dene bleibt. Pröblt s ainfach aus! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.2: ÖNN WIMM AUSSCHALTTN + + + ALSO, EE WENNST ÖBBS VON DAA UNT AUSFÃœERST, LIS LIEBER ZEERST DE GANTZE LET- + ZN! + + 1. Druck d -Tastn, dyrmitst aau gwiß in dyr Befelhs-Artweis bist. + + 2. Demmlt :q! . + Daa dyrmit benddst ys Blat und verwirffst allss, wasst öbbenn göndert + haast. + + 3. Balst önn Eingib seghst, gib dö Faudung ein, wo di zo dönn Schainer brun- + gen haat, also vimtutor bj . + + 4. Also, wenn ietz allsse sitzt, naacherd füerst d Schritt 1 hinst 3 aus, mit + wasst ys Blat verlaasst und aft wider einhinkimmst. + +Anmörkung: Mit :q! verwirffst allss, wasst göndert older enther gschribn + haast. In aynn Öttlych Letznen lernst acht, wiest dös allss in ayner + Dautticht speichertst. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.3: GWORT BARECHTN - LÖSCHN + + + ** Druck x , dyrmitst dös Zaichen unter n Mörkl löschst. ** + + 1. Bewög di mit n Mörkl auf de mit ---> angmörkte Zeil unt. + + 2. Zo n Faeler Verbössern farst mit n Mörkl netty auf dös Zaichen, dös wo + glöscht ghoert. + + 3. Druck de Tastn x , däßst dös überflüssige Zaichen löschst. + + 4. Ietz tuest so lang weiter mit 2 hinst 4, hinst däß dyr Saz stimmt. + +---> De Kkuue sprangg übber nn Maanad. + + 5. Wenn ietz de Zeil verbössert ist, geest gan dyr Letzn 1.4. weiter. + +Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn, + allss auswendig z lernen; nän, lern ainfach mit n Anwenddn! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.4: GWORT BARECHTN - EINFÃœEGN + + + ** Druck i , dyrmitst öbbs einfüegst. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen Zeil, wo mit ---> angeet. + + 2. Dyrmitst de eerste Zeil wie de zwaitte machst, bewög önn Mörkl auf dös + eerste Zaichen NAACH derer Stöll, daa wo s Gwort eingfüegt werdn sollt. + + 3. Druck i und gib dös ein, was abgeet. + + 4. Wenn ieweils ayn Faeler verweitert ist, aft druck ; und dyrmit kimmst + gan dyr Befelhsartweis zrugg. + So, und ietz tuest ainfach yso weiter, hinst däß dyr Saz stimmt. + +---> Daader gt dd öbbs b. +---> Daader geet diend öbbs ab. + + 5. Balst mainst, däßst ys Gwort-Einfüegn kanst, aft geest gan dyr Letzn 1.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.5: GWORT BARECHTN - ANFÃœEGN + + + ** Druck A gan n Gwort Anfüegn. ** + + 1. Gee mit n Mörkl gan dyr eerstn untignen Zeil, wo ayn ---> dyrvor haat. + Daa ist s gleich, wo gnaun dyr Mörkl in derer Zeil steet. + + 2. Demmlt A und gib de entspröchetn Ergöntzungen ein. + + 3. Wennst mit n Anfüegn förtig bist, aft druckst , däßst wider eyn de + Befelhsartweis zruggkimmst. + + 4. So, und ietz geest aft non gan dyr zwaittn mit ---> angmörktn Zeil; und + daadl machst ys netty yso. + +---> In derer Zeil gee + In derer Zeil geet ayn Weeng ayn Gwort ab. +---> Aau daader stee + Aau daader steet öbbs Unvollstöndigs. + + 5. Wennst s Anfüegn von Gwort drauf haast, naacherd gee gan dyr Letzn 1.6. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 1.6: AYN DAUTTICHT BARECHTN + + + ** Mit :wq speichertst ayn Dautticht und verlaasst önn Wimm ganz. ** + + !! OBACHT: Ee wennst mit dönn alln daa unt weitertuest, lis zeerst de gantze + Letzn durch!! + + 1. Verlaaß also s Blat, wie s in dyr Letzn 1.2. haisst, mit :q! ! + + 2. Gib dö Faudung eyn n Eingib ein: vim Schainer . 'vim' ruefft s Blat + auf, und 'Schainer' haisst de Dautticht, wost barechtn willst. Dyrmit + haast also ayn Dautticht, dö wost barechtn kanst. + + 3. Ietz füegst öbbs ein older löschst öbbs, wiest ys in de vorignen Letznen + glernt haast. + + 4. Speichert de gönderte Dautticht und verlaaß önn Wimm mit :wq . + + 5. Schmeiß önn Wimmschainer neu an und gee gan dyr folgetn Zammenfassung. + + 6. Aft däßst de obignen Schritt glösn und käppt haast, kanst ys durchfüern. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 1 + + + 1. Dyr Mörkl werd mit de Tastnen hjkl older aau mit de Pfeiltastnen gsteuert. + h (winst) j (ab) k (auf) l (zes) + + 2. Um önn Wimm umbb n Eingib aus z ginnen, demmlt: vim DAUTTICHT . + + 3. Willst önn Wimm verlaassn und aau allss verwerffen, aft gibst ein: + :q! . + Gan n Verlaassn und Speichern aber zipfst :wq . + + 4. Willst dös Zaichen löschn, daa wo dyr Mörkl drauf ist, demmltst x . + + 5. Willst öbbs vor n Mörkl eingöbn, zipfst i und drafter . + Mechst ys aber eyn s Zeilnend anhinhöngen, benutzt ys A . + Und ainfach naach n Mörkl füegst ys mit a ein . + +Anmörkung: Druckst , kimmst eyn de Befelhsartweis zrugg older brichst ayn + Faudung ab, dö wo dyr schiefgangen ist. + + Ietz tue mit dyr Letzn 2 weiter. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.1.: LÖSHFAUDUNGEN + + + ** Demmlt dw , dyrmitst ayn Wort löschst ** + + 1. Druck , dyrmit s aau gwiß ist, däßst in dyr Befelhsartweis bist. + + 2. Bewög önn Mörkl zo dyr mit ---> angmörktn Zeil unt. + + 3. Und daa geest ietz auf n Anfang von aynn Wort, dös wo glöscht ghoert. + + 4. Zipf dw , däßst dös gantze Wort löschst. + + Nöbnbei: Dyr Buechstabn d erscheint auf dyr lösstn Zeil von n Bildschirm, + sobaldst n eingibst. Dyr Wimm wartt ietz drauf, däß öbbs kimmt, al- + so daader ayn w . Seghst freilich öbbs Anderts wie ayn d , + naacherd haast öbbs Falschs demmlt. Druck aft und pröblt + s non aynmaal. +---> Ayn Öttlych Wörter lustig ghoernd nit Fisper eyn dönn Saz einhin. + + 5. Äfert d Schritt 3 und 4, hinst däß dyr Saz pässt, und gee aft gan dyr + Letzn 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.2.: NON MEERER LÖSHFAUDUNGEN + + + ** Gib d$ ein, däßst hinst eyn s Zeilnend löschst. ** + + 1. Druck , dyrmitst aau gwiß in dyr Befelhsartweis bist. + + 2. Bewög önn Mörkl hinst eyn de mit ---> angmörkte Zeil untn. + + 3. Gee mit n Mörkl auf s End von dyr faelerfreien Zeil, NAACH n eerstn . . + + 4. Zipf d$ , däßst hinst eyn s End von dyr Zeil löschst. + +---> Öbber haat s End von dyr Zeil doplt eingöbn. doplt eingöbn. + + + 5. Gee weiter gan dyr Letzn 2.3, dyrmitst versteest, was daader ablaaufft. + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.3: PFEMERER UND WOLENDER + + + Vil Faudungen, wo s Gwort öndernd, sötznd si aus aynn Pfemerer und aynn Wo- + lend zamm. Bal i also öbbs löschn will, schreib i ainsting d und aft s "Wo- + lend", dös haisst also, "wolend", "wohin" däß i will - older was i halt gnaun + löschn will. + + + + + + + Daader also, was i wie löschn kan: + w - hinst eyn n Anfang von n naehstn Wort AANE dönn sein eersts Zaichen. + e - gan n End von n ietzundn Wort MIT dönn seinn lösstn Zaichen. + $ - zo n End von dyr Zeil MIT derer irn lösstn Zaichen. + + Also löscht de Tastnfolg de umbb n Mörkl hinst eyn s Wortend. +Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mörkl + entspröchet weiter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.4: MIT AYNN ZÖLER D WOLENDER ÄFERN + + + ** Gib i ayn Zal vor aynn Wolend ein, werd dös Sel halt widerholt. ** + + 1. Bewög önn Mörkl gan n Anfang von dyr Zeil mit ---> dyrvor unt. + + 2. Zipf 2w , däßst mit n Mörkl zwai Wörter weitergeest. + + 3. Zipf 3e , däßst mit n Mörkl auf s End von n drittn Wort kimmst. + + 4. Zipf 0 (aynn Nuller), däßst eyn n Anfang von dyr Zeil hinkimmst. + + 5. Widerhol d Schritt 2 und 3 mit verschaidne Zöler. + + ---> Dös ist ietz grad ayn Zeil zo n drinn Umaynanderruedern. + + 6. Gee weiter gan dyr Letzn 2.5. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.5: DURCH AYNN ZÖLER GLEI MEERER LÖSCHN + + + ** Ayn Zal vor aynn Pfemerer äfert dönn um seln Werd. ** + + Also, i mecht löschn, und zwaar öbbs Bestimmts, und dös so und so oft: Daa + dyrzue benutz i aynn Zöler: + d Zöler Wolend (also önn Bewögungsschrit) + + 1. Bewög önn Mörkl gan n eerstn Wort in GROOSSBUECHSTABN in dyr mit ---> an- + gmörktn Zeil. + + 2. Demmlt d2w , dyrmitst de ganz grooßgschribnen Wörter löschst. + + 3. Äfert d Schritt 1 und 2 mit dönn entspröchetn Zöler, dyrmitst de drauf- + folgetn ganz großgschribnen Wörter mit ayner ainzignen Faudung löschst: + + +---> Dö ABC DE Zeil FGHI JK LMN OP mit Wörter ist Q RS TUV ietz berichtigt. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.6: ARECHTN AUF ZEILN + + + ** Zipf dd , um ayn gantze Zeil z löschn. ** + + Weil s gro oft vürkimmt, däß myn gantze Zeiln löscht, kaamend schoon d Ent- + wickler von n Urwimm daa drauf, däß myn ainfach dd gan dönn Zwök schreibt. + + + 1. Bewög önn Mörkl gan dyr zwaittn Zeil in n untignen "Gedicht". + 2. Zipf dd , um dö Zeil z löschn. + 3. Ietz bewögst di gan dyr viertn Zeil. + 4. Zipf 2dd , um zwo Zeiln zo n Löschn. + +---> 1) Roosn seind root; +---> 2) Drunter ist s Koot. +---> 3) Veigerln seind blau. +---> 4) Umgrabn tuet s d Sau. +---> 5) D Ur sait de Zeit, +---> 6) Sait, däß s mi freut, +---> 7) Dirndl, dein Gschau. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 2.7: RUGGGÖNGIG MACHEN (RUGGLN) + + + ** Zipf u , dyrmitst de lösstn Faudungen ruggltst ** + ** older U , um ayn gantze Zeil widerherzstölln. ** + + 1. Bewög önn Mörkl gan dyr mit ---> angmörktn Zeil unt und gee dyrmit auf n + eerstn Faeler. + 2. Zipf x , däßst dös eerste z vile Zaichen löschst. + 3. Ietz demmlt u , dyrmitst de lösste Faudung ruggltst. + 4. Ietz behöb allsand Faeler auf dyr Zeil mit dyr Hilf von n Befelh x . + 5. Aft gibst ayn U (grooß) ein, däßst de Zeil wider yso hinbringst, wie s + gwösn ist. + 6. So, und ietz demmltst so oft u , hinst däßst s U und de andern Fau- + dungen rugggöngig gmacht haast. + 7. Und ietzet widerum schreibst so oft r , hinst däßst allsand Be- + felh widerhergstöllt, z haissn allsse rugg-grugglt haast (also d Rugggön- + gigmachungen rugggöngig gmacht). +---> Beerichtig d Faeller voon dehrer Zeiil und sttöll s mitt n Ruggruggln wi- + der her. + 8. Die Faudungen seind gro wichtig; sö helffend ainn närrisch weiter. + Ietz gee weiter gan dyr Zammenfassung von dyr Letzn 2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 2 + + + 1. Um von n Mörkl aus hinst eyn s naehste Wort zo n Löschn, zipf: dw + 2. Um umbb n Mörkl hinst eyn s End von dyr Zeil zo n Löschn, demmlt d$ + 3. Dyrmitst ayn gantze Zeil löschst, gib ein: dd + 4. Mechst ayn Bewögung, ayn "Wolend", öfters, stöll de entspröchete Zal dyr- + vor: 3dw older aau: d3w + 5. Dyr Pfueg für ayn Önderungsfaudung lautt yso: + Pfemerer [Zal] Bewögungsschrit (Wolend) + Und dös haisst: + Dyr PFEMERER gibt an, WAS taan ghoert, öbbenn d = löschn (»delete«). + [ZAL] - Ayn Zal KAN myn angöbn, wenn myn halt ayn Wolend öfter habn will. + S WOLEND, also dyr Schrit WOHIN, besagt, auf was i aushin will, öbbenn + auf ayn Wort ( w ), s End von dyr Zeil ( $ ) und so weiter. + + 6. Däßst eyn n Anfang von dyr Zeil hinkimmst, schreib aynn Nuller: 0 + + 7. Um öbbs Vorigs wider z ruggln, gib ein: u (klain also) + Um allsand Önderungen in ayner Zeil z ruggln, haast: U (also grooß) + Um "rugg-z-ruggln", also allss wider herzstölln, zipf: r + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.1: ANFÃœEGN (»put«) + + + ** Zipf p , dyrmitst öbbs gnetty Glöschts naach n Mörkl anfüegst. ** + + 1. Bewög önn Mörkl gan dyr eerstn untignen Zeil mit ---> dyrvor. + + 2. Zipf dd , um sele Zeil z löschn und dyrmit in aynn Wimm-"Roster" zo n + speichern. + + 3. Bewög önn Mörkl gan dyr Zeil c), ÃœBER derer, daa wo de glöschte Zeil ein- + hinkemmen sollt. + + 4. So, und ietz gibst ainfach p ein, und schoon haast dö Zeil unter derer + mit n Mörkl drinn. + 5. Äfert d Schritt 2 hinst 4, hinst däßst allsand Zeiln yso naachynaynand + haast, wie s hinghoernd. + +---> d) Kanst du dös aau? +---> b) Veigerln seind blau. +---> c) Bedachtn kan myn lernen. +---> a) Roosn seind root. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.2: ERSÖTZN (»replace«) + + + ** Zipf rx , um dös Zaichen unter n Mörkl durch x z ersötzn. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen Zeil mit ---> dyrvor. + + 2. Bewög önn Mörkl, hinst däß yr auf n eerstn Faeler steet. + + 3. Zipf r und drafter dös Zaichen, wo dyrfür daa hinghoert. + + 4. Widerhol d Schritt 2 und 3, hinst däßst de eerste Zeil gmaeß dyr zwaittn + berichtigt haast: +---> Wie dö Zeit eingobn wurd, wurdnd ainike falsche Zastnen zipft! +---> Wie dö Zeil eingöbn wurd, wurdnd ainige falsche Tastnen zipft! + + 5. Ietz tue mit dyr Letzn 3.3 weiter. + +Anmörkung: Vergiß nit drauf, däßst mit n Anwenddn lernen solltst und nit öbbenn + mit n Auswendiglernen! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.3: ÖNDERN (»change«) + + + ** Um hinst eyn s Wortend z öndern, zipf ce . ** + + 1. Gee mit n Mörkl auf de eerste mit ---> angmörkte Zeil. + + 2. Ietz farst netty auf s "s" von Wstwr hin. + + 3. Zipf ce ein und aft d Wortberichtigung, daader also örter . + + 4. Druck und bewög önn Mörkl gan n naehstn Zaichen, wo göndert ghoert. + + 5. Äfert d Schritt 3 und 4, hinst däß dyr eerste Saz wie dyr zwaitte ist. + +---> Ainige Wstwr von derer Zlww ghhnnd mit n Öndern-Pfemerer gaauu. +---> Ainige Wörter von derer Zeil ghoernd mit n Öndern-Pfemerer göndert. + +ce löscht also s Wort und schlaaufft di eyn d Eingaab-Artweis. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 3.4.: NON MEERER ÖNDERUNGEN PFELFS c + + + ** D Löshfaudung c arechtt mit de nömlichnen Wolender wie dö mit d ** + + 1. Dyr Önder-Pfemerer arechtt anleich wie d Löshfaudung mit d , und zwaar + yso: + c [Zal] Bewögungsschritt (Wolend) + + 2. D Wolender seind de gleichn, öbbenn w für Wort und $ für s Zeilnend. + + + 3. Bewög di zo dyr eerstn untignen Zeil mit ---> . + + 4. Ietz geest auf dönn eerstn Faeler. + + 5. Zipf c$ , gib önn Rest von dyr Zeil wie in dyr zwaittn ein und druck aft + . +---> S End von derer Zeil sollt an de zwaitte daader anglichen werdn. +---> S End von derer Zeil sollt mit n Befelh c$ berichtigt werdn. + +Denk allweil dran, däßst iederzeit mit dyr Ruggtastn Faeler ausbössern kanst. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 3 + + + 1. Um ayn vorher glöschts Gwort anzfüegn, zipf p . Daa dyrmit werd dös + gantze Gwort NAACH n Mörkl angfüegt. Wenn s ayn gantze Zeil gwösn ist, + werd dö sel als de Zeil unterhalb n Mörkl eingfüegt. + + 2. Um dös Zaichen unter n Mörkl, also wo dyr Mörkl ist, z ersötzn, zipf r + und aft dös Zaichen, wost daadl habn willst. + + 3. Dyr Önderungspfemerer ( c = »change«) laasst ainn umbb n Mörkl hinst eyn s + End von n Wolend öndern. Zipf ce , dyrmitst umbb n Mörkl hinst eyn s End + von n Wort öndertst, und c$ hinst eyn s End von dyr Zeil. + + 4. Für d Önderung lautt dyr Pfueg: + + c [Zal] Wolend + +Ietz tue mit dyr naehstn Letzn weiter. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.1: MÖRKLSTÖLLUNG UND DAUTTICHTDARSTAND + +** Demmlt g, däßst önn Befand und Darstand von dyr Dautticht anzaigst. ** + ** Zipf G , dyrmitst auf ayn bestimmte Zeil in dyr Dautticht hinkimmst. ** + +Anmörkung: Lis dö gantze Letzn daader durch, ee wennst iewign öbbs unternimmst! + + 1. Druck g . Auf dös hin erscheint auf derer Seitt ganz unt ayn Dar- + standsmeldung mit n Dauttichtnam und n Befand innerhalb dyr Dautticht. + Mörk dyr de Zeilnnummer für n Schrit 3. + +Anmörkung: Müglicherweis seghst aau önn Mörklbefand in n zesmen untern Bild- + schirmögg. Aft ist s "Lindl" (»ruler«) eingstöllt; schau dyrzue mit + n Befelh :help 'ruler' naach. + 2. Druck G , um an s End von dyr Dautticht z kemmen. + gg gibst ein, däßst gan n Anfang von dyr Dautticht aufhinkimmst. + + 3. Gib d Nummer von derer Zeil ein, daa wost vorher warst, und aft non G . + Dös bringt di zrugg gan seler Zeil, daa wost stuenddst, wiest dös eerste + Maal g gadruckst. + + 4. Wennst di sicher gnueg füelst, aft füer d Schritt 1 hinst 3 aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.2: DYR BEFELH ZO N SUECHEN + + + ** Zipf / und dyrnaach aynn Ausdruk, um selbignen zo n Suechen. ** + + 1. Du gibst also in dyr Befelhsartweis s Zaichen / ein. Dös sel wie aau dyr + Mörkl erscheinend drauf unt auf n Schirm, netty wie bei dyr Faudung : . + + 2. Ietz zipf 'Faeeler' . Netty um dös 'Faeeler' willst ietz suechen. + + 3. Willst um gnaun dönn Ausdruk weitersuechen, zipf ainfach n (wie »next«). + Willst hinzrugg suechen, aft gibst N ein. + + 4. Um von Haus aus zruggaus z suechen, nimm ? statt / her. + + 5. Dyrmitst wider daa hinkimmst, wost herkemmen bist, druck o, und dös + öfter, wennst weiter zrugg willst. Mit i widerum kimmst vorwärts. + +---> Aynn Faeler schreibt myn nit "Faeeler"; Faeeler ist ayn Faeler + +Anmörkung: Wenn d Suech s Dauttichtend dyrraicht haat, geet s eyn n Anfang wi- + der weiter dyrmit, men Sach dyr Schaltter 'wrapscan' wär auf aus. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.3: DE GÖGNKLAMMERN FINDDN + + + ** Zipf % , um de entspröchete Klammer ) , ] older } z finddn. ** + + 1. Sötz önn Mörkl auf iewign aine von dene drei Klammern ( , [ older { + in dyr untignen Zeil, wo mit ---> angmörkt ist. + + 2. Ietzet zipf s Zaichen % . + + 3. Dyr Mörkl geet ietz auf de pässete schliessete Klammer. + + 4. Ietz demmlt % , und dyrmit kimmst gan dyr öffneretn Klammer zrugg. + + 5. Sötz önn Mörkl auf ayn anderne Klammer von ({[]}) und pröblt % aus. + +---> Dös ( ist blooß ayn Pochzeil ( mit [ verschaidne ] { Klammern } drinn. )) + +Anmörkung: Um dö Müglichkeit gaast bsunders froo sein, wennst aynmaal in aynn + Spaichgwort verzweiflt ayn faelete Gögnklammer suechst! + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 4.4: D ERSÖTZUNGSFAUDUNG (»substitute«) + + + ** Zipf :s/alt/neu/g , um 'alt' durch 'neu' zo n Ersötzn. ** + + 1. Gee mit n Mörkl zo dyr unt steehetn mit ---> angmörktn Zeil. + + 2. Zipf :s/dee/de . Der Befelh ersötzt alsnan grad dös +eerste "dee", + wo vürkimmt. + + 3. Ietz pröblt s mit :s/dee/de/g . Dös zuesötzliche g ("Pflok" nennt myn + öbbs Sölchers) bewirkt, däß allss, was dyrmit kennzaichnet ist, innerhalb + von dyr ainn Zeil ersötzt werd. + +---> Dee schoenste Zeit, däß myn dee Blüemln anschaut, ist dee schoene Lan- + gesszeit. + 4. Um ietz allsand Suechbegriff innerhalb von zwo Zeiln zo n Öndern, zipf + :#,#s/alt/neu/g , wobei # ieweils für de eerste und lösste Zeil von dönn + Pfraich steet. + :%s/alt/neu/g zipfst, däßst d Vürkemmen in dyr gantzn Dautticht öndertst. + Mit :%s/alt/neu/gc finddst allsand Vürkemmen in dyr gsamtn Dautticht; + daa werst aber zeerst non gfraagt, obst ys ersötzn willst older nity. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 4 + + 1. g zaigt dönn ietzundn Dauttichtbefand und önn Darstand dyrvon an. + G bringt di an s End von dyr Dautticht. + G bringt di gan dyr entspröchetn Zeilnnummer. + gg bringt di zo dyr eerstn Zeil. + + 2. D Eingaab von / mit aynn Ausdruk suecht VÃœRSHLING um dönn Ausdruk. + Gibst ? und aynn Suechbegrif ein, suecht s um dönn ÄRSHLING. + Zipf naach ayner Suech n ; naacherd werd in de gleiche Richtung weiter- + gsuecht. Mit N geet s umkeerter weiter. + o bringt di zo ölterne Befändd zrugg, i zo neuerne. + + 3. D Eingaab von % , wenn dyr Mörkl auf ainer von dene Klammern steet: ({[ + )]} , bringt di zo dyr Gögnklammer. + + 4. Um dös eerste Vürkemmen von "alt" in ayner Zeil durch "neu" z ersötzn, + zipf :s/alt/neu . + Um allsand in ayner Zeil z ersötzn, zipf :s/alt/neu/g . + Mechst allss in zwo Zeiln ersötzn, demmlt zo n Beispil :5,6s/alt/neu/g . + Mechst allss in dyr gantzn Dautticht ersötzn, gib ein: :%s/alt/neu/g . + Willst ayn ieds Maal bstaetln, höng 'c' wie »confirm« hint anhin. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.1: ZWISCHNDRINN AYNN AUSSERIGNEN BEFELH AUSFÃœERN + + + ** Willst ayn Gfäßfaudung ausfüern, gib ainfach dö sel naach :! ein. ** + + 1. Zipf dönn bekanntn Befelh : , dyrmitst mit n Mörkl auf n Bildschirm + ganz abhin kimmst. Draufhin kanst aynn gwonen Gfäßbefelh eingöbn. + + 2. Zeerst kimmt aber non ayn Ruefzaichen ! . Und ietz haast de Müglich- + keit, ayn beliebige ausserige Gfäßfaudung auszfüern. + + 3. Als Beispil zipf :!ls ; und schoon haast ayn Auflistung von deinn + Verzaichniss, netty wie wennst ganz gwon in n Eingib wärst. Geet ls + aus iewign aynn Grund nit, aft pröblt s mit :!dir . + +Also non aynmaal: Mit dönn Angang kan ayn iede beliebige ausserige Faudung aus- + gfüert werdn, aau mit Auerwerdd. + +Und wolgmörkt: Allsand Befelh, wo mit : angeend, müessend mit bstö- + tigt werdn. Dös dyrsagn myr vürbaß niemer. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.2: NON MEERER DRÃœBER, WIE MYN DAUTTICHTN SCHREIBT + + + ** Um öbbs Gönderts neu z speichern, zipf :w NEUER_DAUTTICHTNAM. ** + + 1. Zipf :!dir older :!ls , däßst dyr ayn Auflistung von deinn Verzaich- + niss ausherlaasst. Däßst dyrnaach eingöbn muesst, waisst ee schoon. + + 2. Suech dyr aynn Dauttichtnam aus, dönn wo s non nit geit, öbbenn POCH. + + 3. Ietz demmlt: :w POCH (also mit POCH als dönn neuen Dauttichtnam). + + 4. Dös speichert ietz de gantze Dautticht, also önn Wimmschainer, unter dönn + Nam POCH. Dös kanst leicht überprüeffen, indem däßst ainfach :!ls older + :!dir zipfst und dyrmit deinn Verzaichnissinhalt seghst. + +Anmörkung: Stigst ietz aus n Wimm aus und gännst n aft wider mit vim POCH , + naacherd wär dö Dautticht ayn gnaune Aamum von n Schainer dyrselbn, + wiest n gspeichert haast. + + 5. Ietz verweitert dö Dautticht - fallsst s Fenstl haast - , mit :!del POCH + beziehungsweis bei aynn Ainslgebäu mit :!rm POCH . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.3: AYNN TAIL VON N GWORT ZO N SPEICHERN AUSWALN + +** Um aynn Tail von dyr Dautticht z speichern, zipf v [Wolend] :w DAUTTICHT ** + + 1. Ruck önn Mörkl auf netty dö Zeil daader. + + 2. Demmlt v und gee mit n Mörkl auf dönn fümftn Auflistungspunt untet. Du + seghst glei, däß s Gwort vürherghöbt erscheint. + + 3. Druck s Zaichen : . Ganz unt auf n Bildschirm erscheint :'<,'> . + + 4. Zipf w POCH , wobei s dönn Dauttichtnam POCH non nit geit. Vergwiß di, + däßst dös :'<,'>w POCH aau +seghst, ee wennst druckst. + + 5. Dyr Wimm schreibt de ausgwaltn Zeil eyn de Dautticht POCH einhin. Benutz + :!dir older :!ls , däßst dös überprüeffst. Lösh s fein nit öbbenn! Mir + brauchend s nömlich für de naehste Letzn. + +Anmörkung: Druckt myn v , ginnt d Sichtisch-Auswal. Du kanst mit n Mörkl um- + aynandfarn, um d Auswal z veröndern. Drafter kan myn mit yn aynn + Pfemerer mit dönn Gwort öbbs machen. Zo n Beispil löscht d dös + Gwort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 5.4: EINLÖSN UND ZAMMENFÃœERN VON DAUTTICHTN + + + ** Um önn Inhalt von ayner Dautticht einzlösn, zipf :r DAUTTICHTNAM ** + + 1. Sötz önn Mörkl über dö Zeil daader. + +OBACHT: Aft däßst önn Schrit 2 ausgfüert haast, seghst auf aynmaal öbbs aus + dyr Letzn 5.3. Bewög di naacherd wider abwärts, dyrmitst dö Letzn wi- + derfinddst. + 2. Ietz lis dein Dautticht POCH ein, indem däßst d Faudung :r POCH aus- + füerst, wobei wie gsait POCH für dönn von dir ausgsuechtn Dauttichtnam + steet. De einglösne Dautticht werd unterhalb dyr Mörklzeil eingfüegt. + + 3. Um zo n Ãœberprüeffen, ob de Dautticht aau gwiß einglösn ist, gee zrugg; + und du seghst, däß s ietz zwo Ausförtigungen von dyr Letzn 5.3. geit, s + Urniss und de eingfüegte Dauttichtfassung. + +Anmörkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlösn. Zo n Bei- + spil list :r !ls d Ausgaab von dyr Faudung ls ein und füegt s + unterhalb n Mörkl ein. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 5 + + + 1. :!FAUDUNG füert aynn ausserignen Befelh aus. + + Daader ayn Öttlych gwänddte Beispiler: + (Fenstl) (Ainsl - Leinsl) + :!dir :!ls - listt s Verzaichniss auf. + :!del DAUTTICHT :!rm DAUTTICHT - verweitert sele Dautticht. + + 2. :w DAUTTICHT speichert de ietzunde Wimmdautticht unter dönn besagtn Nam. + + 3. v WOLEND :w DAUTTICHTNAM schreibt de sichtisch ausgwaltn Zeiln eyn de + Dautticht mit seln Nam. + + 4. :r DAUTTICHTNAM ladt sele Dautticht und füegt s unterhalb n Mörklbefand + ein. + + 5. :r !dir list d Ausgaab von dyr Faudung dir und füegt s unterhalb n + Mörklbefand ein. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.1: ZEIL ÖFFNEN (»open«) + + + ** Zipf o, um ayn Zeil unterhalb n Mörkl z öffnen und eyn d ** + ** Einfüegartweis z kemmen. ** + + 1. Bewög önn Mörkl zo dyr eerstn mit ---> angmörktn Zeil unt. + + 2. Zipf o (klain), um ayn Zeil UNTERHALB n Mörkl z öffnen und mit dyr Ein- + füegartweis weiterztuen. + + 3. Ietz zipf ayn Weeng ayn Gwort und druck , um d Einfüegartweis z ver- + laassn. +---> Mit o werd dyr Mörkl auf de offene Zeil in dyr Einfüegartweis gsötzt. + + 4. Um ayn Zeil OBERHALB n Mörkl aufzmachen, gib ainfach aynn groosss O statt + yn aynn klainen ein. Versuech dös auf dyr untignen Zeil. + +---> Öffnet ayn Zeil über derer daader mit O , wenn dyr Mörkl auf derer Zeil + ist. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.2: GWORT ANFÃœEGN (»append«) + + + ** Zipf a , um öbbs NAACH n Mörkl einzfüegn. ** + + 1. Bewög önn Mörkl gan n Anfang von dyr eerstn Ãœebungszeil mit ---> unt. + + 2. Druck e , hinst däß dyr Mörkl an n End von Zei steet. + + 3. Zipf ayn klains a , um öbbs NAACH n Mörkl anzfüegn. + + 4. Vergöntz dös Wort wie in dyr Zeil drunter. Druck , um d Schreib-Art- + weis z verlaassn. + + 5. Bewög di mit e zo n naehstn ungantzn Wort und widerhol d Schritt 3 und + 4. + +---> Dö Ze biett ayn Glögn , ayn Gwort in ayner Zeil anzfü. +---> Dö Zeil biett ayn Glögnet, ayn Gwort in ayner Zeil anzfüegn. + +Anmörkung: a , i und A bringend ainn gleichermaaßn eyn d Einfüegartweis; + dyr ainzige Unterschaid ist, WO mit n Einfüegn angfangt werd. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.3: AYN ANDERNE WEIS ZO N ERSÖTZN (»replace«) + + + ** Demmlt ayn groosss R , um meerer als wie grad ain Zaichen z ersötzn. ** + + 1. Bewög önn Mörkl zo dyr eerstn untignen, mit ---> angmörktn Zeil. + Gee mit n Mörkl gan n Anfang von n eerstn xxx . + + 2. Ietz druck R und zipf sele Zal, wo drunter in dyr zwaittn Zeil steet, + yso däß de sel s xxx ersötzt. + + 3. Druck , um d Ersötzungsartweis z verlaassn. Du gspannst, däß dyr + Rest von dyr Zeil unveröndert bleibt. + + 4. Äfert die Schritt, um dös überblibne xxx z ersötzn. + +---> S Zunddn von 123 zo xxx ergibt xxx. +---> S Zunddn von 123 zo 456 ergibt 579. + +Anmörkung: D Ersötzungsartweis ist wie d Einfüegartweis, aber ayn ieds eindem- + mlte Zaichen löscht ayn vorhanddns. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.4: GWORT AAMEN UND EINFÃœEGN + + ** Benutz önn Pfemerer y , um öbbs z aamen, und p , um öbbs einzfüegn. ** + + 1. Gee zo dyr mit ---> angmörktn Zeil unt und sötz önn Mörkl hinter "a)". + + 2. Ginn d Sichtisch-Artweis mit v und bewög önn Mörkl gnaun vor "eerste". + + 3. Zipf y , um dönn vürherghöbtn Tail z aamen. + + 4. Bewög önn Mörkl gan n End von dyr naehstn Zeil: j$ + + 5. Demmlt p , um dös Gwort einzfüegn, und aft: a zwaitte . + + 6. Benutz d Sichtischartweis, um " Eintrag." auszwaln, aam s pfelfs y, be- + wög di gan n End von dyr naehstn Zeil mit j$ und füeg s Gwort dortn mit + p an. + +---> a) dös ist dyr eerste Eintrag. + b) + +Anmörkung: Du kanst y aau als Pfemerer verwenddn; yw aamt ain Wort. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 6.5: SCHALTTER SÖTZN + +** Sötz aynn Schaltter yso, däß ayn Suech older Ersötzung Grooß- und Klain- ** + ** schreibung übergeet. ** + + 1. Suech um 'übergee", indem däßst /übergee eingibst. + Widerhol d Suech ayn Öttlych Maal, indem däßst de Tastn n druckst. + + 2. Sötz de Zwisl - önn Schaltter - 'ic' (»ignore case«), indem däßst :set ic + eingibst. + 3. Ietz suech wider um 'übergee' und tue aau wider mit n weiter. Daa fallt + dyr auf, däß ietz öbbenn aau Ãœbergee und ÃœBERGEE hergeet. + + 4. Sötz de Zwisln 'hlsearch' und 'incsearch' pfelfs: :set hls is + + 5. Widerhol d Suech und bobacht, was ietz gschieght: /übergee + + 6. Däßst grooß und klain wider gwon unterscheidst, zipf: :set noic + +Anmörkung: Mechst de Tröffer niemer vürherghöbt seghn, gib ein: :nohlsearch +Anmörkung: Sollt klain/grooß bei ayner ainzignen Suech wurst sein, benutz \c + in n Suechausdruk: /übergee\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 6 + + 1. Zipf o , um ayn Zeil UNTERHALB n Mörkl z öffnen und d Einfüegartweis z + ginnen. + Zipf O , um ayn Zeil OBERHALB n Mörkl z öffnen. + + 2. Zipf a , um NAACH n Mörkl ayn Gwort einzfüegn. + Zipf A , um ayn Gwort naach n Zeilnend anzfüegn. + + 3. D Faudung e bringt di gan n End von aynn Wort. + + 4. Dyr Pfemerer y (»yank«) aamt öbbs, p (»put«) füegt dös ein. + + 5. Ayn groosss R geet eyn d Ersötzungsartweis, hinst däß myn druckt. + + 6. D Eingaab von ":set xxx" sötzt de Zwisl "xxx". Ayn Öttlych Zwisln seind: + 'ic' 'ignorecase' Grooß/klain wurst bei ayner Suech + 'is' 'incsearch' Zaig aau schoon ayn Tailüberainstimmung + 'hls' 'hlsearch' Höb allsand pässetn Ausdrück vürher + Dyr Schaltternam kan in dyr Kurz- older Langform angöbn werdn. + + 7. Stöll yn ayner Zwisl "no" voran, däßst ys abschalttst: :set noic +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.1: AYN HILFGWORT AUFRUEFFEN + + + ** Nutz dös einbaute Hilfgebäu, de "Betribsanlaittung" ** + + Eyn n Wimm ist ayn ausfüerliche "Gebrauchsanweisung" einbaut. Für s Eerste + pröblt ainfach ains von dene dreu aus: + - Druck d -Tastn, wennst öbbenn aine haast. + - Druck de Tastn , fallsst ys haast. + - Zipf :help + + Lis di eyn s Hilffenster ein, dyrmitst draufkimmst, wie dös mit dyr Hilf geet. + Demmlt w w , um von ainn Fenster zo n andern zo n Springen. + Demmlt :q , um s Hilffenster zo n Schliessn. + + Du kanst zo so guet wie allssand ayn Hilf finddn, indem däßst yn dyr Faudung + :help aynn Auerwerd naachstöllst und istig nit vergisst. Pröblt dös: + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.2: ERSTÖLL AYN GIN-SCHRIPF + + + ** Mutz önn Wimm mit de einbautn Faehigkeitn auf ** + + Dyr Wimm besitzt ayn Wösn Schäftungen, wo über n Urwimm aushingeend, aber de + meerern dyrvon seind in dyr Vorgaab ausgschaltt. Dyrmitst meerer aus n Wimm + ausherholst, erstöllst ayn "vimrc"-Dautticht. + + 1. Lög ayn "vimrc"-Dautticht an; dös geet ie naach Betribsgebäu verschidn: + :e ~/.vimrc für s Ainsl + :e $VIM/_vimrc bei n Fenstl + + 2. Ietz lis önn Inhalt von dyr Beispil-"vimrc"-Dautticht ein: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Speichert de Dautticht mit: + :w + + 4. Bei n naehstn Gin von n Wimm ist aft d Füegnussvürherhöbung zuegschaltt. + Du kanst dyr allss eyn dö Dautticht einhinschreibn, wasst bständig habn + willst. Meerer dyrzue erfarst unter: :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Letzn 7.3: VERGÖNTZN + + + ** Befelhszeilnvergöntzung mit d und ** + + 1. Vergwiß di, däß dyr Wimm nit auf n Urwimm-"Glais" fart: :set nocp + + 2. Schaug naach, wölcherne Dauttichtn däß s in n Verzaichniss geit: :!ls + older :!dir + 3. Zipf önn Anfang von ayner Faudung: :e + + 4. Druck d , und dyr Wimm zaigt ayn Listn von Faudungen, wo mit "e" + angeend. + 5. Druck , und dyr Wimm vervollstöndigt önn Faudungsnam zo ":edit". + + 6. Füeg ayn Laerzaichen und önn Anfang von ayner besteehetn Dautticht an: + :edit DAU + + 7. Druck . Dyr Wimm vergöntzt önn Nam, dös haisst, wenn yr aindeuttig + ist. +Anmörkung: D Vergöntzung geit s für aynn Hauffen Faudungen. Versuech ainfach + d und . Bsunders nützlich ist dös bei :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ZAMMENFASSUNG VON DYR LETZN 7 + + + 1. Zipf :help older druck older , um ayn Hilffenster z öffnen. + + 2. Zipf :help FAUDUNG , um auf ayn Hilf gan aynn Befelh z kemmen. + + 3. Zipf w w , um zo n andern Fenster z springen. + + 4. Zipf :q , um s Hilffenster z schliessn. + + 5. Erstöll ayn vimrc-Ginschripf zuer Sicherung von deine Mötzneinstöllungen. + + 6. Druck d, aft däßst naach : mit ayner Faudung angfangt haast, dyr- + mitst mügliche Vergöntzungen anzaigt kriegst. + Druck für ain Vervollstöndigung yllain. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Dös wär ietzet s End von n Wimmschainer. Gangen ist s daa drum, aynn kurtzn + und bündignen Ãœberblik über s Blat WIMM z lifern, netty vil gnueg, däß myn + für s Eerste wirklich öbbs dyrmit anfangen kan. Dyrmit ist s aber auf kain + Weitn non nit taan; dyr Wimm haat schoon non vil meerer auf Lager. Lis als + Naehsts aynmaal s Benutzerhandbuech: :help user-manual . + + Zo n Weiterlösn und Weiterlernen wör dös Buech daader zo n Empfelhen: + Vim - Vi Improved - von n OUALLINE Steve + Verlaag: New Riders + Dös ist dös eerste Buech, wo ganz yn n Wimm gwidmt ist, netty dös Grechte für + Anfönger. Es haat ayn Wösn Beispiler und aau Bilder drinn. + See http://iccf-holland.org/click5.html + + Dös folgete Buech ist schoon ölter und meerer über n Urwimm als wie über n + Wimm, aber aau zo n Empfelhen: Textbearbeitung mit dem vi-Editor - von dyr + LAMB Linda und n ROBBINS Arnold - Verlaag O'Reilly - Buechlaittzal (ISBN): + 3897211262 + In dönn Buech kan myn fast allss finddn, was myn mit n Urwimm angeen mecht. + De söxte Ausgaab enthaltt aau schoon öbbs über n Wimm. + Als ietzunde Bezugniss für d Fassung 6.2 und ayn pfrenge Einfüerung dient + dös folgete Buech: + vim ge-packt von n WOBST Reinhard + mitp-Verlaag, Buechlaittzal 3-8266-1425-9 + Trotz dyr recht pfrengen Darstöllung ist s durch seine viln nützlichnen Bei- + spiler aau für Einsteiger grad grecht. Probhaeupster und de Beispilschripfer + seind zesig zo n Kriegn; see http://iccf-holland.org/click5.html + + Verfasst habnd dönn Schainer dyr PIERCE Michael C. und WARE Robert K. von dyr + Kolraader Knappnschuel (Colorado School of Mines). Er beruet auf Entwürff, wo + dyr SMITH Charles von dyr Kolraader Allschuel (Colorado State University) + zuer Verfüegung gstöllt haat. Gundpost: bware@mines.colorado.edu. + Für n Wimm haat n dyr MOOLENAAR Bram barechtt. + De bairische Ãœbersötzung stammt von n HELL Sepp 2009. Sein Gundpostbrächt ist + sturmibund@t-online.de + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + + + diff --git a/vim/vim-7.2/tutor/tutor.eo b/vim/vim-7.2/tutor/tutor.eo new file mode 100644 index 0000000..2ac0689 --- /dev/null +++ b/vim/vim-7.2/tutor/tutor.eo @@ -0,0 +1,989 @@ +============================================================================== += B o n v e n o n al la I n s t r u i l o de V I M - Versio 1.7.eo.2 = +============================================================================== + + Vim estas tre potenca redaktilo, kiu havas multajn komandojn, tro da ili + por æion klarigi en instruilo kiel æi tiu. Æi tiu instruilo estas + fasonita por priskribi sufiæajn komandojn, por ke vi kapablu uzi Vim + kun sufiæa facileco. + + La tempo bezonata por plenumi la kurson estas 25-30 minutoj, kaj dependas + de kiom da tempo estas uzata por eksperimenti. + + ATENTU: + La komandoj en la lecionoj þanøos la tekston. Kopiu tiun æi dosieron + por ekzerci vin (se vi lanæis "vimtutor", tiam estas jam kopio). + + Gravas memori, ke æi tiu instruilo estas organizata por instrui per + la uzo. Tio signifas, ke vi devas plenumi la komandojn por bone lerni + ilin. Se vi nur legas la tekston, vi forgesos la komandojn! + + Nun, certigu, ke la majuskla baskulo NE estas en reøimo majuskla, + kaj premu la klavon j sufiæe da fojoj por movi la kursoron, kaj por + ke la leciono 1.1 plenigu la ekranon. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.1: MOVI LA KURSORON + + + ** Por movi la kursoron, premu la h,j,k,l klavojn kiel montrite. ** + ^ + k Konsilo: La klavo h estas la plej liva kaj movas liven. + < h l > La klavo l estas la plej dekstra kaj movas dekstren. + j La klavo j aspektas kiel malsuprena sago. + v + 1. Movu la kursoron sur la ekrano øis kiam vi sentas vin komforta. + + 2. Premu la klavon (j) øis kiam øi ripetas. + Vi nun scias, kiel moviøi al la sekvanta leciono + + 3. Uzante la malsuprenan klavon, moviøu al la leciono 1.2. + +RIMARKO: Se vi dubas pri tio, kion vi premis, premu por reiri al + la normala reøimo. Tiam repremu la deziratan komandon. + +RIMARKO: La klavoj de la kursoro devus ankaý funkcii. Sed uzante hjkl, + vi kapablos moviøi pli rapide post kiam vi kutimiøos. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.2: ELIRI EL VIM + + + !! RIMARKO: Antaý ol plenumi iujn subajn paþojn ajn, legu la tutan lecionon!! + + 1. Premu la klavon (por certigi, ke vi estas en normala reøimo). + + 2. Tajpu: :q! . + Tio eliras el la rekdaktilo, SEN konservi la þanøojn, kiujn vi faris. + + 3. Kiam vi vidas la þelinviton, tajpu la komandon kiun vi uzis por eniri + en æi tiu instruilo. Tio estus: vimtutor + + 4. Se vi memoris tiujn paþojn kaj sentas vin memfida, plenumu la paþojn + 1 øis 3 por eliri kaj reeniri la redaktilon. + +RIMARKO: :q! eliras sen konservi la þanøojn, kiujn vi faris. + Post kelkaj lecionoj, vi lernos kiel konservi la þanøojn al dosiero. + + 5. Movu la kursoron suben øis la leciono 1.3. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.3: REDAKTO DE TEKSTO - FORVIÞO + + + ** Premu x por forviþi la signon sub la kursoro. ** + + 1. Movu la kursoron al la suba linio markita per --->. + + 2. Por korekti la erarojn, movu la kursoron øis kiam øi estas sur la + forviþenda signo. + + 3. Premu la klavon x por forviþi la nedeziratan signon. + + 4. Ripetu paþojn 2 øis 4 øis kiam la frazo estas øusta. + + +---> La boovinno saaltiss ssur laa luuno. + + 5. Post kiam la linio estas øusta, iru al la leciono 1.4 + +RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.4: REDAKTO DE TEKSTO - ENMETO + + + ** Premu i por enmeti tekston. ** + + 1. Movu la kursoron al la unua suba linio markita per --->. + + 2. Por igi la unuan linion sama kiel la dua, movu la kursoron sur la unuan + signon post kie la teksto estas enmetenda. + + 3. Premu i kaj tajpu la bezonatajn aldonojn. + + 4. Premu kiam la eraroj estas korektitaj por reiri al la normala + reøimo. Ripetu la paþojn 2 øis 4 por korekti la frazon. + +---> Mank en æi linio. +---> Mankas tekston en æi tiu linio. + + 5. Kiam vi sentas vin komforta pri enmeto de teksto, moviøu al la + leciono 1.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.5: REDAKTO DE TEKSTO - POSTALDONO + + + ** Premu A por postaldoni tekston. ** + + 1. Movu la kursoron al la unua suba linio markita per --->. + Ne gravas sur kiu signo estas la kursoro. + + 2. Premu majusklan A kaj tajpu la bezonatajn aldonojn. + + 3. Post kiam la teksto estas aldonita, premu por reiri al la normala + reøimo. + + 4. Movu la kursoron al la dua linio markita per ---> kaj ripetu la + paþojn 2 kaj 3 por korekti la frazon. + +---> Mankas teksto el ti + Mankas teksto el tiu linio. +---> Mankas ankaý teks + Mankas ankaý teksto æi tie. + + 5 Kiam vi sentas vin komforta pri postaldono de teksto, moviøu al la + leciono 1.6 + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1.6: REDAKTI DOSIERON + + ** Uzu :wq por konservi dosieron kaj eliri. ** + + !! RIMARKO: Antaý ol plenumi iun suban paþon ajn, legu la tutan lecionon!! + + 1. Eliru el la instruilo kiel vi faris en la leciono 1.2: :q! + + 2. Æe la þelinvito, tajpu æi tiun komandon: vim tutor + 'vim' estas la komando por lanæi la redaktilon Vim, 'tutor' estas la + dosiernomo de la dosiero, kiun vi volas redakti. Uzu dosieron, kiu + þanøeblas. + + 3. Enmetu kaj forviþu tekston, kiel vi lernis en la antaýaj lecionoj. + + 4. Konservu la dosieron kun þanøoj kaj eliru el Vim per: :wq + + 5. Relanæu la instruilon vimtutor kaj moviøu suben al la sekvanta resumo. + + 6. Post kiam vi legis la suprajn paþojn, kaj komprenis ilin: faru ilin. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 1 RESUMO + + + 1. La kursoro moviøas aý per la sagoklavoj, aý per la klavoj hjkl. + h (liven) j (suben) k (supren) l (dekstren) + + 2. Por lanæi Vim el la þelinvito, tajpu: vim DOSIERNOMO + + 3. Por eliri el Vim, tajpu: :q! por rezigni la þanøojn + + 4. Por forviþi la signojn æe la pozicio de la kursoro, tajpu: x + + 5. Por enmeti aý postaldoni tekston, tajpu: + i tajpu enmetendan tekston + enmetas tekston antaý la kursoro + + A tajpu la postaldonendan tekston + postaldonas post la kursoro + +RIMARKO: Premo de iras al la normala reøimo, aý rezignas la + nedeziratan aý parte plenumita komando. + +Nun daýrigu al la leciono 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.1: KOMANDOJ DE FORVIÞO + + + ** Tajpu dw por forviþi vorton. ** + + 1. Premu por certigi, ke vi estas en normala reøimo. + + 2. Movu la kursoron al la linio markita per --->. + + 3. Movu la kursoron al la komenco de vorto, kiu forviþendas. + + 4. Tajpu dw por forviþi la vorton. + + RIMARKO: La litero d aperos en la lasta linio sur la ekrano kiam vi + tajpas øin. Vim atendas øis kiam vi tajpas w . Se vi vidas + alian signon ol d vi tajpis ion mise; premu kaj + rekomencu. + +---> Estas iuj vortoj kiuj Zamenhof ne devus esti akuzativo en æi tiu frazo. + + 5. Ripetu paþojn 3 kaj 4 øis kiam la frazo estas øusta kaj moviøu al la + leciono 2.2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.2: PLIAJ KOMANDOJ DE FORVIÞO + + + ** Tajpu d$ por forviþi la finon de la linio. ** + + 1. Premu por certigi, ke vi estas en normala reøimo. + + 2. Movu la kursoron sur la suban linion markita per --->. + + 3. Movu la kursoron æe la fino de la øusta linio (POST la unua . ). + + 4. Tajpu d$ por forivþi øis la fino de la linio. + +---> Iu tajpis la finon de æi tiu linio dufoje. fino de æi tiu linio dufoje. + + + 5. Moviøu al la leciono 2.3 por kompreni kio okazas. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.3: PRI OPERATOROJ KAJ MOVOJ + + + Multaj komandoj, kiuj þanøas la tekston, estas faritaj de operatoro kaj + movo. La formato de komando de forviþo per la operatoro de forviþo d + estas kiel sekvas: + + d movo + + Kie: + d - estas la operatoro de movo + movo - estas tio, pri kio la operatoro operacios (listigita sube) + + Mallonga listo de movoj: + w - øis la komenco de la sekvanta vorto, krom øia unua signo. + e - øis la fino de la nuna vorto, krom la lasta signo. + $ - øis la fino de la linio, krom la lasta signo. + + Do tajpo de 'de' forviþos ekde la kursoro øis la fino de la vorto. + +RIMARKO: Premo de nur la movo en Normala reøimo sen operatoro movos + la kursoron kiel specifite. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.4: UZI NOMBRON POR MOVO + + ** Tajpo de nombro antaý movo ripetas øin laýfoje. ** + + 1. Movu la kursoron æe la komenco de la suba linio markita per --->. + + 2. Tajpu 2w por movi la kursoron je du vortoj antaýen. + + 3. Tajpu 3e por movi la kursoron æe la fino de la tria vorto antaýen. + + 4. Tajpu 0 (nul) por moviøi æe la komenco de la linio. + + + 5. Ripetu paþojn 2 øis 3 kun malsamaj nombroj. + +---> Tio estas nur linio kun vortoj, kie vi povas moviøi. + + 6. Moviøu al la leciono 2.5. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.5: UZI NOMBRON POR FORVIÞI PLI + + + ** Tajpo de nombro kun operatoro ripetas øin laýfoje. ** + + En la kombina¼o de la operatoro de forviþo, kaj movo kiel menciita + æi-supre, eblas aldoni nombron antaý la movo por pli forviþi: + d nombro movo + + 1. Movu la kursoron æe la unua MAJUSKLA vorto en la linio markita per --->. + + 2. Tajpu d2w por forviþi la du MAJUSKLAJN vortojn + + 3. Ripetu paþojn 1 øis 2 per malsama nombro por forviþi la sinsekvajn + MAJUSKLAJN vortojn per unu komando + +---> Tiu AB CDE linio FGHI JK LMN OP de vortoj estas Q RS TUV purigita. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.6: OPERACII SUR LINIOJ + + + ** Tajpu dd por forviþi tutan linion. ** + + Pro la ofteco de forviþo de tuta linio, la verkisto de Vi decidis, ke + estus pli facile simple tajpi du d-ojn por forviþi linion. + + 1. Movu la kursoron sur la duan linion en la suba frazo. + 2. Tajpu dd por forviþi la linion. + 3. Nun moviøu al la kvara linio. + 4. Tajpu 2dd por forviþi du liniojn. + +---> 1) Rozoj estas ruøaj, +---> 2) Þlimo estas amuza, +---> 3) Violoj estas bluaj, +---> 4) Mi havas aýton, +---> 5) Horloøoj diras kioma horo estas, +---> 6) Sukero estas dolæa, +---> 7) Kaj tiel vi estas. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2.7: LA KOMANDO DE MALFARO + + + ** Premu u por malfari la lastajn komandojn, U por ripari la tutan linion. ** + + 1. Movu la kursoron æe la suba linio markita per ---> kaj metu øin sur + la unuan eraron. + 2. Tajpu x por forviþi la unuan nedeziratan signon. + 3. Nun tajpu u por malfari la lastan plenumitan komandon. + 4. Æi-foje, riparu æiujn erarojn en la linio kaj øia originala stato. + 5. Nun tajpu majusklan U por igi la linion al øia antaýa stato. + 6. Nun tajpu u kelkfoje por malfari la U kaj antaýajn komandojn. + 7. Nun tajpu CTRL-R (premante la CTRL klavon dum vi premas R) kelkfoje + por refari la komandojn (malfari la malfarojn). + +---> Koorektii la erarojn sur tiuu æi liniio kaj remettu illlin per malfaro. + + 8. Tiuj estas tre utilaj komandoj. Nun moviøu al la leciono 2 RESUMO. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 2 RESUMO + + + 1. Por forviþi ekde la kursoro øis la sekvanta vorto, tajpu: dw + 2. Por forviþi ekde la kursoro øis la fino de la linio, tajpu: d$ + 3. Por forviþi tutan linion, tajpu: dd + + 4. Por ripeti movon, antaýmetu nombron: 2w + 5. La formato de þanøa komando estas: + operatoro [nombro] movo + + kie: + operatoro - estas tio, kio farendas, kiel d por forviþi + [nombro] - estas opcia nombro por ripeti la movon + movo - movas sur la teksto por operacii, kiel ekzemple w (vorto), + $ (øis fino de linio), ktp. + + 6. Por moviøi al la komenco de la linio, uzu nul: 0 + + 7. Por malfari antaýajn agojn, tajpu: u (minuskla u) + Por malfari æiujn þanøojn sur la linio, tajpu: U (majuskla U) + Por refari la malfarojn, tajpu: CTRL-R + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.1 LA KOMANDO DE METO + + + ** Tajpu p por meti tekston forviþitan antaýe post la kursoro. ** + + 1. Movu la kursoron æe la unua ---> suba linio. + + 2. Tajpu dd por forviþi la linion kaj konservi øin ene de reøistro de Vim. + + 3. Movu la kursoron æe la linio c), SUPER kie la forviþita linio devus esti. + + 4. Tajpu p por meti la linion sub la kursoron. + + 5. Ripetu la paþojn 2 øis 4 por meti æiujn liniojn en la øusta ordo. + +---> d) Æu ankaý vi povas lerni? +---> b) Violoj estas bluaj, +---> c) Inteligenteco lerneblas, +---> a) Rozoj estas ruøaj, + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.2 LA KOMANDO DE ANSTATAÝIGO + + + ** Tajpu rx por anstataýigi la signon æe la kursoro per x . ** + + + 1. Movu la kursoron æe la unua suba linio markita per --->. + + 2. Movu la kursoron øis la unua eraro. + + 3. Tajpu r kaj la signon, kiu devus esti tie. + + 4. Ripetu paþojn 2 kaj 3 øis kiam la unua linio egalas la duan. + +---> Kiem tiu lanio estis tajpita, iu pramis la naøuftajn klovojn! +---> Kiam tiu linio estis tajpita, iu premis la neøustajn klavojn! + + 5. Nun moviøu al la leciono 3.3. + +Rimarko: Memoru, ke vi devus lerni per uzo, kaj ne per memorado. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.3 LA OPERATORO DE ÞANØO + + + ** Por þanøi øis la fino de la vorto, tajpu ce . ** + + 1. Movu la kursoron æe la unua suba linio markita per --->. + + 2. Metu la kursoron sur la d en lduzw + + 3. Tajpu ce kaj la øustan vorton (en tiu æi kazo, tajpu inio ). + + 4. Premu kaj moviøu al la sekvanta signo, kiu bezonas þanøon. + + 5. Ripetu la paþojn 3 kaj 4 øis kiam la unua frazo egalas la duan. + +---> Tiu lduzw havas kelkajn vortojn, kiii bezas þanøon per la þanøooto. +---> Tiu linio havas kelkajn vortojn, kiuj bezonas þanøon per la þanøoperatoro. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3.4 PLIAJ ÞANØOJ PER c + + + ** La operatoro de þanøo uzeblas kun la sama movo kiel forviþo. ** + + 1. La operatoro de þanøo funkcias sammaniere kiel forviþo. La formato estas: + + c [nombro] movo + + 2. La movoj estas samaj, kiel ekzemple w (vorto) kaj $ (fino de linio). + + 3. Moviøu æe la unua suba linio markita per --->. + + 4. Movu la kursoron al la unua eraro. + + 5. Tajpu c$ kaj tajpu la reston de la linio kiel la dua kaj premu . + +---> La fino de æi tiu linio bezonas helpon por igi øin same kiel la dua. +---> La fino de æi tiu linio bezonas korektojn per uzo de la komando c$ + +RIMARKO: Vi povas uzi la klavon Retropaþo por korekti erarojn dum vi tajpas. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 3 RESUMO + + + 1. Por remeti tekston, kiun vi ¼us forviþis, tajpu p. Tio metas la + forviþitan tekston POST la kursoro (se linio estis forviþita, øi + iros en la linion sub la kursoro). + + 2. Por anstataýigi la signon sub la kursoro, tajpu r kaj tiam la signon + kion vi deziras havi tie. + + 3. La operatoro de þanøo ebligas al vi þanøi ekde la kursoro, øis kie + la movo iras. Ekz. tajpu ce por þanøi ekde la kursoro øis la fino + de la vorto, c$ por þanøi øis la fino de la linio. + + 4. La formato de þanøo estas: + + c [nombro] movo + +Nun daýrigu al la sekvanta leciono. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.1: POZICIO DE KURSORO KAJ STATO DE DOSIERO + + + ** Tajpu CTRL-G por montri vian pozicion en la dosiero kaj la dosierstaton. + Tajpu G por moviøi al linio en la dosiero. ** + + RIMARKO: Legu la tutan lecionon antaý ol plenumi iun paþon ajn!! + + 1. Premu la klavon Ctrl kaj premu g . Oni nomas tion CTRL-G. + Mesaøo aperos æe la suba parto de la paøo kun la dosiernomo kaj la + pozicio en la dosiero. Memoru la numeron de la linio por paþo 3. + + RIMARKO: Vi eble vidas la pozicion de la kursoro æe la suba dekstra + angulo de la ekrano. Tio okazas kiam la agordo 'ruler' estas + þaltita (vidu :help 'ruler') + + 2. Premu G por moviøi æe la subo de la dosiero. + Tajpu gg por moviøi æe la komenco de la dosiero. + + 3. Tajpu la numeron de la linio kie vi estis kaj poste G . Tio removos + vin al la linio, kie vi estis kiam vi unue premis CTRL-G. + + 4. Se vi sentas vin komforta, plenumu paþojn 1 øis 3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.2 LA KOMANDO DE SERÆO + + + ** Tajpu / kaj poste frazon por seræi la frazon. ** + + 1. En normala reøimo, tajpu la / signon. Rimarku, ke øi kaj la kursoro + aperas æe la suba parto de la ekrano kiel por la : komando. + + 2. Nun tajpu 'errarro' . + Tio estas la vorto, kion vi volas seræi. + + 3. Por seræi la saman frazon denove, simple tajpu n . + Por seræi la saman frazon denove en la retrodirekto, tajpu N . + + 4. Por seræi frazon en la retrodirekto, uzu ? anstataý / . + + 5. Por reiri tien, el kie vi venis, premu CTRL-O (Premu Ctrl kaj o + literon o). Ripetu por pli retroiri. CTRL-I iras antaýen. + +---> "errarro" ne estas maniero por literumi eraro; errarro estas eraro. + +RIMARKO: Kiam la seræo atingas la finon de la dosiero, øi daýras æe la + komenco, krom se la agordo 'wrapscan' estas malþaltita. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.3 SERÆO DE KONGRUAJ KRAMPOJ + + + ** Tajpu % por trovi kongruan ), ] aý } ** + + 1. Poziciu la kursoron sur iun (, [ aý { en la linio markita per --->. + + 2. Nun tajpu la % signon. + + 3. La kursoro moviøas al la kongrua krampo. + + 4. Tajpu % por movi la kursoron al la alia kongrua krampo. + + 5. Movu la kursoron al la alia (, ), [, ], {, } kaj observu tion, + kion % faras. + +---> Æi tiu ( estas testa linio kun (-oj, [-oj, ]-oj kaj {-oj, }-oj en øi. )) + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4.4 LA KOMANDO DE ANSTATAýIGO + + + ** Tajpu :s/malnova/nova/g por anstataýigi 'nova' per 'malnova'. ** + + 1. Movu la kursoron al la suba linio markita per --->. + + 2. Tajpu :s/laa/la . Rimarku, ke la komando þanøas nur la + unuan okaza¼on de "laa" en la linio. + + 3. Nun tajpu :s/laa/la/g . Aldono de g opcio signifas mallokan + anstataýigon en la linio. Øi þanøas æiujn okaza¼ojn de "laa" en la + linio. + +---> laa plej bona tempo por vidi florojn estas en laa printempo. + + 4. Por þanøi æiujn okaza¼ojn de iu æena signo inter du linioj, + tajpu :#,#s/malnova/nova/g kie #,# estas la numeroj de linioj de la + intervalo de la linioj kie la anstataýigo + okazos. + Tajpu :%s/malnova/nova/g por þanøi æiujn okaza¼ojn en la tuta + dosiero. + Tajpu :s/malnova/nova/gc por trovi æiujn okaza¼ojn en la tuta + dosiero, kun invitilo æu anstataýigi + aý ne. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 4 RESUMO + + 1. CTRL-G vidigas vian pozicion en la dosiero kaj la staton de la dosiero. + G movas la kursoron al la fino de la dosiero. + numero G movas la kursoron al numero de tiu linio. + gg movas la kursoron al la unua linio. + + 2. Tajpo de / kaj frazon seræas la frazon antaýen. + Tajpo de ? kaj frazon seræas la frazon malantaýen. + Post seræo, tajpu n por trovi la sekvantan okaza¼on en la sama direkto aý + N por seræi en la mala direkto. + CTRL-O movas vin al la antaýaj pozicioj, CTRL-I al la novaj pozicioj. + + 3. Tajpo de % kiam la kursoro estas sur (,),[,],{ aý } moviøas al øia + kongruo. + + 4. Por anstataýigi 'nova' en la unua 'malnova' en linio :s/malnova/nova + Por anstataýigi 'nova' en æiuj 'malnova'-oj en linio :s/malnova/nova/g + Por anstataýigi frazon inter du #-aj linioj :#,#s/malnova/nova/g + Por anstataýigi æiujn okaza¼ojn en la dosiero :%s/malnova/nova/g + Por demandi konfirmon æiu-foje, aldonu 'c' :%s/malnova/nova/gc + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.1 KIEL PLENUMI EKSTERAN KOMANDON + + + ** Tajpu :! sekvata de ekstera komando por plenumi la komandon. ** + + 1. Tajpu la konatan komandon : por pozicii la kursoron æe la suba parto + de la ekrano. Tio ebligas tajpadon de komando en komanda linio. + + 2. Nun tajpu la ! (krisigno) signon. Tio ebligas al vi plenumi iun + eksteran þelan komandon ajn. + + 3. Ekzemple, tajpu ls post ! kaj tajpu . Tio listigos la + enhavon de la dosierujo, same kiel se vi estis en þela invito. + Aý uzu :!dir se ls ne funkcias. + +RIMARKO: Eblas plenumi iun eksteran komandon ajn tiamaniere, ankaý kun + argumentoj. + +RIMARKO: Æiuj : komandoj devas finiøi per tajpo de + Ekde nun, ni ne plu mencios tion. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.2 PLI PRI KONSERVO DE DOSIERO + + + ** Por konservi la faritajn þanøojn en la teksto, tajpu :w DOSIERNOMO. ** + + 1. Tajpu !dir aý !ls por akiri liston de via dosierujo. + Vi jam scias, ke vi devas tajpi post tio. + + 2. Elektu dosieron, kiu ne jam ekzistas, kiel ekzemple TESTO. + + 3. Nun tajpu: :w TESTO (kie TESTO estas la elektita dosiernomo) + + 4. Tio konservas la tutan dosieron (instruilon de Vim) kun la nomo TESTO. + Por kontroli tion, tajpu :!dir aý !ls denove por vidigi vian + dosierujon. + +RIMARKO: Se vi volus eliri el Vim kaj restartigi øin denove per vim TESTO, + la dosiero estus precize same kiel kopio de la instruilo kiam vi + konservis øin. + + 5. Nun forviþu la dosieron tajpante (MS-DOS): :!del TESTO + aý (UNIKSO): :!rm TESTO + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.3 APARTIGI KONSERVENDAN TESTON + + + ** Por konservi parton de la dosiero, tajpu v movo :w DOSIERNOMO ** + + 1. Movu la kursoron al tiu linio. + + 2. Premu v kaj movu la kursoron al la kvina suba ero. Rimarku, ke la + teksto emfaziøas. + + 3. Premu la : signon. Æe la fino de la ekrano :'<,'> aperos. + + 4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ne jam ekzistas. + Kontrolu, ke vi vidas :'<,'>w TESTO antaý premi . + + 5. Vim konservos la apartigitajn liniojn al la dosiero TESTO. Uzu :dir + aý :!ls por vidigi øin. Ne forviþu øin. Ni uzos øin en la sekvanta + leciono. + +RIMARKO: Premo de v komencas Viduman apartigon. Vi povas movi la kursoron + por pligrandigi aý malpligrandigi la apartigon. Tiam vi povas uzi + operatoron por plenumi ion kun la teksto. Ekzemple, d forviþas + la tekston. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5.4 AKIRI KAJ KUNFANDI DOSIEROJN + + + ** Por enmeti la enhavon de dosiero, tajpu :r DOSIERNOMON ** + + 1. Movu la kursoron ¼us super æi tiu linio. + +RIMARKO: Post plenumo de paþo 2, vi vidos tekston el la leciono 5.3. Tiam + moviøu SUBEN por vidi tiun lecionon denove. + + 2. Nun akiru vian dosieron TESTO uzante la komandon :r TESTO kie TESTO + estas la nomo de la dosiero, kiun vi uzis. + La dosiero, kion vi akiras, estas metita sub la linio de la kursoro. + + 3. Por kontroli, æu la dosiero akiriøis, retromovu la kursoron kaj rimarku, + ke estas nun du kopioj de la leciono 5.3, la originala kaj la versio mem + de la dosiero. + +RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple, + :r !ls legas la eliron de la komando ls kaj metas øin sub la + kursoron. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 5 RESUMO + + + 1. :!komando plenumas eksteran komandon. + + Iuj utilaj ekzemploj estas: + (MS-DOS) (UNIKSO) + :!dir :!ls - listigas dosierujon + :!del DOSIERNOMO :!rm DOSIERNOMO - forviþas la dosieron DOSIERNOMO + + 2. :w DOSIERNOMO konservas la nunan dosieron de Vim al disko kun la + nomo DOSIERNOMO. + + 3. v movo :w DOSIERNOMO konservas la Viduman apartigon de linioj en + dosiero DOSIERNOMO. + + 4. :r DOSIERNOMO akiras la dosieron DOSIERNOMO el la disko kaj metas + øin sub la pozicion de la kursoro. + + 5. :r !dir legas la eligon de la komando dir kaj metas øin sub la + pozicion de la kursoro. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.1 LA KOMANDO DE MALFERMO + + + ** Tajpu o por malfermi linion sub la kursoro kaj eniri Enmetan reøimon. ** + + 1. Movu la kursoron al la suba linio markita per --->. + + 2. Tajpu la minusklan literon o por malfermi linion SUB la kursoro kaj + eniri la Enmetan reøimon. + + 3. Nun tajpu tekston kaj premu por eliri la Enmetan reøimon. + +---> Post tajpo de o la kursoro moviøas al la malfermata linio en + Enmeta reøimo. + + 4. Por malfermi linion SUPER la kursoro, nur tajpu majusklan O , + anstataý minusklan o. Provu tion per la suba linio. + +---> Malfermu linion SUPER tiu tajpante O dum la kursoro estas sur tiu linio. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.2 LA KOMANDO DE POSTALDONO + + + ** Tajpu a por enmeti POST la kursoro. ** + + 1. Movu la kursoron æe la komenco de la linio markita per --->. + + 2. Premu e øis kiam la kursoro estas æe la fino de li. + + 3. Tajpu a (minuskle) por aldoni tekston POST la kursoro. + + 4. Kompletigu la vorton same kiel la linio sub øi. Premu por + eliri la Enmetan reøimon. + + 5. Uzu e por moviøi al la sekvanta nekompleta vorto kaj ripetu + paþojn 3 kaj 4. + +---> Æi tiu lin ebligos vin ekz vin postal tekston al linio. +---> Æi tiu linio ebligos vin ekzerci vin postaldoni tekston al linio. + +RIMARKO: Æiu a, i kaj A iras al la sama Enmeta reøimo, la nura malsamo + estas tie, kie la signoj estas enmetitaj. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.3 ALIA MANIERO POR ANSTATAÝIGI + + + ** Tajpu majusklan R por anstataýigi pli ol unu signo. ** + + 1. Movu la kursoron al la unua suba linio markita per --->. Movu la + kursoron al la komenco de la unua xxx . + + 2. Nun premu R kaj tajpu la nombron sub øi en la dua linio, por ke øi + anstataýigu la xxx . + + 3. Premu por foriri la Anstataýigan reøimon. Rimarku, ke la cetera + parto de la linio restas neþanøata. + + 4. Ripetu la paþojn por anstataýigi la restantajn xxx. + +---> Aldono de 123 al xxx donas al vi xxx. +---> Aldono de 123 al 456 donas al vi 579. + +RIMARKO: Anstataýiga reøimo estas same kiel Enmeta reøimo, sed æiu signo + tajpita forviþas ekzistan signon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.4 KOPII KAJ ALGLUI TEKSTON + + + ** Uzu la y operatoron por kopii tekston, kaj p por alglui øin ** + + + 1. Iru al la linio markita per ---> sube kaj poziciu la kursoron post "a)". + + 2. Komencu la Viduman reøimon per v kaj movu la kursoron ¼us antaý "unua". + + 3. Tajpu y por kopii la emfazitan tekston. + + 4. Movu la kursoron æe la fino de la linio: j$ + + 5. Tajpu p por alglui la tekston. Tiam tajpu: a dua . + + 6. Uzu Viduman reøimon por apartigi " ero.", kopiu øin per y , moviøu + æe la fino de la sekvanta linio per j$ kaj algluu la tekston tie + per p . + +---> a) tio estas la unua ero. + b) + +RIMARKO: vi povas ankaý uzi y kiel operatoro; yw kopias unu vorton. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6.5 AGORDI OPCION + + + ** Agordu opcion por ke seræo aý anstataýigo ignoru usklecon ** + + 1. Seræu 'ignori' per tajpo de /ignori + Ripetu plurfoje premante n . + + 2. Þaltu la opcion 'ic' (ignori usklecon) per: :set ic + + 3. Nun seræu 'ignori' denove premante n + Rimarku, ke Ignori kaj IGNORI estas nun troveblas. + + 4. Þaltu la opciojn 'hlsearch' kaj 'incsearch': :set hls is + + 5. Nun retajpu la seræan komandon kaj vidu kio okazas: /ignore + + 6. Por malþalti ignoron de uskleco: :set noic + +RIMARKO: Por forigi emfazon de kongruo, tajpu: :nohlsearch +RIMARKO: Se vi deziras ignori usklecon por nur unu seræa komando, uzu \c + en la frazo: /ignore\c + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 6 RESUMO + + 1. Tajpu o por malfermi linion SUB la kursoro kaj eki en Enmeta reøimo. + 1. Tajpu O por malfermi linion SUPER la kursoro. + + 2. Tajpu a por enmeti tekston POST la kursoro. + Tajpu A por enmeti tekston post la fino de la linio. + + 3. La e komando movas la kursoron al la fino de vorto. + + 4. la y operatoro kopias tekston, p algluas øin. + + 5. Tajpo de majuskla R eniras la Anstataýigan reøimon øis kiam + estas premita. + + 6. Tajpo de ":set xxx" þaltas la opcion "xxx". Iuj opcioj estas: + 'ic' 'ignorecase' ignori usklecon dum seræo + 'is' 'incsearch' montru partan kongruon dum seræo + 'hls' 'hlsearch' emfazas æiujn kongruajn frazojn + Vi povas uzi aý la longan, aý la mallongan nomon de opcio. + + 7. Antaýaldonu "no" por malþalti la opcion: :set noic + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7.1 AKIRI HELPON + + + ** Uzu la helpan sistemon ** + + Vim havas ampleksan helpan sistemon. Por komenciøi, provu unu el la tiuj + tri: + - premu la klavon (se vi havas øin) + - premu la klavon (se vi havas øin) + - tajpu :help + + Legu la tekston en la helpfenestro por trovi kiel helpo funkcias. + Tajpu CTRL-W CTRL-W por salti de unu fenestro al la alia. + Tajpu :q por fermi la helpan fenestron. + + Vi povas trovi helpon pri io ajn aldonante argumenton al la komando + ":help". Provu tiujn (ne forgesu premi ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7.2 KREI STARTAN SKRIPTON + + + ** Ebligu kapablojn de Vim ** + + Vim havas multe pli da kapabloj ol Vi, sed la plej multaj estas defaýlte + malþaltitaj. Por ekuzi la kapablojn, vi devas krei dosieron "vimrc. + + 1. Ekredaktu la dosieron "vimrc". Tio dependas de via sistemo: + :e ~/.vimrc por Unikso + :e $VIM/_vimrc por MS-Vindozo + + 2. Nun legu la enhavon de la ekzempla "vimrc" + :r $VIMRUNTIME/vimrc_example.vim + + 3. Konservu la dosieron per: + :w + + La sekvantan fojon, kiam vi lanæas Vim, øi uzos sintaksan emfazon. + Vi povas aldoni æiujn viajn preferatajn agordojn al tiu dosiero "vimrc". + Por pli da informoj, tajpu :help vimrc-intro + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7.3 KOMPLETIGO + + + ** Kompletigo de komanda linio per CTRL-D kaj ** + + 1. Certigu ke Vim estas en kongrua reøimo: :set nocp + + 2. Rigardu tiujn dosierojn, kiuj ekzistas en la dosierujo: :!ls aý :!dir + + 3. Tajpu la komencon de komando: :e + + 4. Premu CTRL-D kaj Vim montros liston de komandoj, kiuj komencas per "e". + + 5. Premu kaj Vim kompletigos la nomon de la komando al ":edit". + + 6. Nun aldonu spaceton kaj la komencon de ekzistanta nomo: :edit DOSI + + 7. Premu . Vim kompletigos la nomon (se øi estas unika) + +RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj + . Estas aparte utila por :help . + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leciono 7 RESUMO + + + 1. Tajpu :help aý premu por malfermi helpan fenestron. + + 2. Tajpu :help kmd por trovi helpon pri kmd. + + 3. Tajpu CTRL-W CTRL-W por salti al alia fenestro. + + 4. Tajpu :q to fermi la helpan fenestron. + + 5. Kreu komencan skripton vimrc por konservi viajn agordojn. + + 6. Kiam vi tajpas : komandon, premu CTRL-D por vidi æiujn kompleteblojn. + Premu por uzi unu kompletigon. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Tio konkludas la instruilon de Vim. Øi celis doni mallongan superrigardon + de la redaktilo Vim, nur tio kio sufiæas por ebligi al vi facilan uzon de + la redaktilo. Estas nepre nekompleta, æar Vim havas multajn multajn pliajn + komandojn. Legu la manlibron: ":help user-manual". + + Tiu instruilo estis verkita de Michael C. Pierce kaj Robert K. Ware, + el la Koloradia Lernejo de Minejoj (Colorado School of Mines) uzante + ideojn provizitajn de Charles Smith el la Stata Universitato de Koloradio + (Colorado State University) + + Retpoþto: bware@mines.colorado.edu. + + Modifita por Vim de Bram Moolenaar. + + Tradukita en Esperanto de Dominique Pellé, 2008-04-01 + Retpoþto: dominique.pelle@gmail.com + Lasta þanøo: 2009-02-01 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/vim/vim-7.2/tutor/tutor.nb b/vim/vim-7.2/tutor/tutor.nb new file mode 100644 index 0000000..17178df --- /dev/null +++ b/vim/vim-7.2/tutor/tutor.nb @@ -0,0 +1,973 @@ +=============================================================================== += V e l k o m m e n t i l i n n f ø r i n g e n i V i m -- Ver. 1.7 = +=============================================================================== + + Vim er en meget kraftig editor med mange kommandoer, alt for mange til å + kunne gå gjennom alle i en innføring som denne. Den er beregnet på å + sette deg inn i bruken av nok kommandoer så du vil være i stand til lett + å kunne bruke Vim som en editor til alle formål. + + Tiden som kreves for å gå gjennom denne innføringen tar ca. 25-30 + minutter, avhengig av hvor mye tid du bruker til eksperimentering. + + MERK: + Kommandoene i leksjonene vil modifisere teksten. Lag en kopi av denne + filen som du kan øve deg på (hvis du kjørte «vimtutor»-kommandoen, er + dette allerede en kopi). + + Det er viktig å huske at denne innføringen er beregnet på læring gjennom + bruk. Det betyr at du må utføre kommandoene for å lære dem skikkelig. + Hvis du bare leser teksten, vil du glemme kommandoene! + + Først av alt, sjekk at «Caps Lock» IKKE er aktiv og trykk «j»-tasten for + å flytte markøren helt til leksjon 1.1 fyller skjermen. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.1: FLYTTING AV MARKØREN + + + ** For å flytte markøren, trykk tastene h, j, k, l som vist. ** + ^ + k Tips: h-tasten er til venstre og flytter til venstre. + < h l > l-tasten er til høyre og flytter til høyre. + j j-tasten ser ut som en pil som peker nedover. + v + 1. Flytt markøren rundt på skjermen til du har fått det inn i fingrene. + + 2. Hold inne nedovertasten (j) til den repeterer. + Nå vet du hvordan du beveger deg til neste leksjon. + + 3. Gå til leksjon 1.2 ved hjelp av nedovertasten. + +Merk: Hvis du blir usikker på noe du har skrevet, trykk for å gå til + normalmodus. Skriv deretter kommandoen du ønsket på nytt. + +Merk: Piltastene skal også virke. Men ved å bruke hjkl vil du være i stand til + å bevege markøren mye raskere når du er blitt vant til det. Helt sant! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.2: AVSLUTTE VIM + + + !! MERK: Før du utfører noen av punktene nedenfor, les hele leksjonen!! + + 1. Trykk -tasten (for å forsikre deg om at du er i normalmodus). + + 2. Skriv: :q! . + Dette avslutter editoren og FORKASTER alle forandringer som du har gjort. + + 3. Når du ser kommandolinjen i skallet, skriv kommandoen som startet denne + innføringen. Den er: vimtutor + + 4. Hvis du er sikker på at du husker dette, utfør punktene 1 til 3 for å + avslutte og starte editoren på nytt. + +MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen + få leksjoner vil du lære hvordan du lagrer forandringene til en fil. + + 5. Flytt markøren ned til leksjon 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + + + ** Trykk x for å slette tegnet under markøren. ** + + 1. Flytt markøren til den første linjen merket med --->. + + 2. For å ordne feilene på linjen, flytt markøren til den er oppå tegnet som + skal slettes. + + 3. Trykk tasten x for å slette det uønskede tegnet. + + 4. Repeter punkt 2 til 4 til setningen er lik den som er under. + +---> Hessstennnn brrråsnudddde ii gaaata. +---> Hesten bråsnudde i gata. + + 5. Nå som linjen er korrekt, gå til leksjon 1.4. + +MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, men + bruk dem helt til de sitter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + + + ** Trykk i for å sette inn tekst. ** + + 1. Flytt markøren til den første linjen som er merket med --->. + + 2. For å gjøre den første linjen lik den andre, flytt markøren til den står + på tegnet ETTER posisjonen der teksten skal settes inn. + + 3. Trykk i og skriv inn teksten som mangler. + + 4. Etterhvert som hver feil er fikset, trykk for å returnere til + normalmodus. Repeter punkt 2 til 4 til setningen er korrekt. + +---> Det er tkst som mnglr . +---> Det er ganske mye tekst som mangler her. + + 5. Når du føler deg komfortabel med å sette inn tekst, gå til oppsummeringen + nedenfor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + + + ** Trykk A for å legge til tekst. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + Det har ikke noe å si hvor markøren er plassert på den linjen. + + 2. Trykk A og skriv inn det som skal legges til. + + 3. Når teksten er lagt til, trykk for å returnere til normalmodusen. + + 4. Flytt markøren til den andre linjen markert med ---> og repeter steg 2 og + 3 for å reparere denne setningen. + +---> Det mangler noe tekst p + Det mangler noe tekst på denne linjen. +---> Det mangler også litt tek + Det mangler også litt tekst på denne linjen. + + 5. Når du føler at du behersker å legge til tekst, gå til leksjon 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.6: REDIGERE EN FIL + + + ** Bruk :wq for å lagre en fil og avslutte. ** + + !! MERK: Før du utfører noen av stegene nedenfor, les hele denne leksjonen!! + + 1. Avslutt denne innføringen som du gjorde i leksjon 1.2: :q! + + 2. Skriv denne kommandoen på kommandolinja: vim tutor + «vim» er kommandoen for å starte Vim-editoren, «tutor» er navnet på fila + som du vil redigere. Bruk en fil som kan forandres. + + 3. Sett inn og slett tekst som du lærte i de foregående leksjonene. + + 4. Lagre filen med forandringene og avslutt Vim med: :wq + + 5. Start innføringen på nytt og flytt ned til oppsummeringen som følger. + + 6. Etter å ha lest og forstått stegene ovenfor: Sett i gang. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 1 + + + 1. Markøren beveges ved hjelp av piltastene eller hjkl-tastene. + h (venstre) j (ned) k (opp) l (høyre) + + 2. For å starte Vim fra skall-kommandolinjen, skriv: vim FILNAVN + + 3. For å avslutte Vim, skriv: :q! for å forkaste endringer. + ELLER skriv: :wq for å lagre forandringene. + + 4. For å slette tegnet under markøren, trykk: x + + 5. For å sette inn eller legge til tekst, trykk: + i skriv innsatt tekst sett inn før markøren + A skriv tillagt tekst legg til på slutten av linjen + +MERK: Når du trykker går du til normalmodus eller du avbryter en uønsket + og delvis fullført kommando. + + Nå kan du gå videre til leksjon 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.1: SLETTEKOMMANDOER + + + ** Trykk dw for å slette et ord. ** + + 1. Trykk for å være sikker på at du er i normalmodus. + + 2. Flytt markøren til den første linjen nedenfor merket --->. + + 3. Flytt markøren til begynnelsen av ordet som skal slettes. + + 4. Trykk dw og ordet vil forsvinne. + +MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når + du skriver den. Vim venter på at du skal skrive w . Hvis du ser et annet + tegn enn d har du skrevet noe feil; trykk og start på nytt. + +---> Det er agurk tre ord eple som ikke hører pære hjemme i denne setningen. +---> Det er tre ord som ikke hører hjemme i denne setningen. + + 5. Repeter punkt 3 og 4 til den første setningen er lik den andre. Gå + deretter til leksjon 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.2: FLERE SLETTEKOMMANDOER + + + ** Trykk d$ for å slette til slutten av linjen. ** + + 1. Trykk for å være sikker på at du er i normalmodus. + + 2. Flytt markøren til linjen nedenfor merket --->. + + 3. Flytt markøren til punktet der linjen skal kuttes (ETTER første punktum). + + 4. Trykk d$ for å slette alt til slutten av linjen. + +---> Noen skrev slutten på linjen en gang for mye. linjen en gang for mye. + + 5. Gå til leksjon 2.3 for å forstå hva som skjer. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.3: OM OPERATORER OG BEVEGELSER + + + Mange kommandoer som forandrer teksten er laget ut i fra en operator og en + bevegelse. Formatet for en slettekommando med sletteoperatoren d er: + + d bevegelse + + Der: + d - er sletteoperatoren. + bevegelse - er hva operatoren vil opere på (listet nedenfor). + + En kort liste med bevegelser: + w - til starten av det neste ordet, UNNTATT det første tegnet. + e - til slutten av det nåværende ordet, INKLUDERT det siste tegnet. + $ - til slutten av linjen, INKLUDERT det siste tegnet. + + Ved å skrive de vil altså alt fra markøren til slutten av ordet bli + slettet. + +MERK: Ved å skrive kun bevegelsen i normalmodusen uten en operator vil + markøren flyttes som spesifisert. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + + + ** Ved å skrive et tall foran en bevegelse repeterer den så mange ganger. ** + + 1. Flytt markøren til starten av linjen markert ---> nedenfor. + + 2. Skriv 2w for å flytte markøren to ord framover. + + 3. Skriv 3e for å flytte markøren framover til slutten av det tredje + ordet. + + 4. Skriv 0 (null) for å flytte til starten av linjen. + + 5. Repeter steg 2 og 3 med forskjellige tall. + +---> Dette er en linje med noen ord som du kan bevege deg rundt på. + + 6. Gå videre til leksjon 2.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.5: BRUK AV ANTALL FOR Å SLETTE MER + + + ** Et tall sammen med en operator repeterer den så mange ganger. ** + + I kombinasjonen med sletteoperatoren og en bevegelse nevnt ovenfor setter du + inn antall før bevegelsen for å slette mer: + d nummer bevegelse + + 1. Flytt markøren til det første ordet med STORE BOKSTAVER på linjen markert + med --->. + + 2. Skriv 2dw for å slette de to ordene med store bokstaver. + + 3. Repeter steg 1 og 2 med forskjelling antall for å slette de etterfølgende + ordene som har store bokstaver. + +---> Denne ABC DE linjen FGHI JK LMN OP er nå Q RS TUV litt mer lesbar. + +MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som å + bruke bevegelsen uten en operator. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.6: OPERERE PÅ LINJER + + + ** Trykk dd for å slette en hel linje. ** + + På grunn av at sletting av linjer er mye brukt, fant utviklerne av Vi ut at + det vil være lettere å rett og slett trykke to d-er for å slette en linje. + + 1. Flytt markøren til den andre linjen i verset nedenfor. + 2. Trykk dd å slette linjen. + 3. Flytt deretter til den fjerde linjen. + 4. Trykk 2dd for å slette to linjer. + +---> 1) Roser er røde, +---> 2) Gjørme er gøy, +---> 3) Fioler er blå, +---> 4) Jeg har en bil, +---> 5) Klokker viser tiden, +---> 6) Druer er søte +---> 7) Og du er likeså. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.7: ANGRE-KOMMANDOEN + + + ** Trykk u for å angre siste kommando, U for å fikse en hel linje. ** + + 1. Flytt markøren til linjen nedenfor merket ---> og plasser den på den + første feilen. + 2. Trykk x for å slette det første uønskede tegnet. + 3. Trykk så u for å angre den siste utførte kommandoen. + 4. Deretter ordner du alle feilene på linjene ved å bruke kommandoen x . + 5. Trykk nå en stor U for å sette linjen tilbake til det den var + originalt. + 6. Trykk u noen ganger for å angre U og foregående kommandoer. + 7. Deretter trykker du CTRL-R (hold CTRL nede mens du trykker R) noen + ganger for å gjenopprette kommandoene (omgjøre angrekommandoene). + +---> RReparer feiilene påå denne linnnjen oog erssstatt dem meed angre. + + 8. Dette er meget nyttige kommandoer. Nå kan du gå til oppsummeringen av + leksjon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 2 + + + 1. For å slette fra markøren fram til det neste ordet, trykk: dw + 2. For å slette fra markøren til slutten av en linje, trykk: d$ + 3. For å slette en hel linje, trykk: dd + + 4. For å repetere en bevegelse, sett et nummer foran: 2w + 5. Formatet for en forandringskommando er: + operator [nummer] bevegelse + der: + operator - hva som skal gjøres, f.eks. d for å slette + [nummer] - et valgfritt antall for å repetere bevegelsen + bevegelse - hva kommandoen skal operere på, eksempelvis w (ord), + $ (til slutten av linjen) og så videre. + + 6. For å gå til starten av en linje, bruk en null: 0 + + 7. For å angre tidligere endringer, skriv: u (liten u) + For å angre alle forandringer på en linje, skriv: U (stor U) + For å omgjøre angringen, trykk: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.1: «LIM INN»-KOMMANDOEN + + + ** Trykk p for å lime inn tidligere slettet tekst etter markøren ** + + 1. Flytt markøren til den første linjen med ---> nedenfor. + + 2. Trykk dd for å slette linjen og lagre den i et Vim-register. + + 3. Flytt markøren til c)-linjen, OVER posisjonen linjen skal settes inn. + + 4. Trykk p for å legge linjen under markøren. + + 5. Repeter punkt 2 til 4 helt til linjene er i riktig rekkefølge. + +---> d) Kan du også lære? +---> b) Fioler er blå, +---> c) Intelligens må læres, +---> a) Roser er røde, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.2: «ERSTATT»-KOMMANDOEN + + + ** Trykk rx for å erstatte tegnet under markøren med x. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + + 2. Flytt markøren så den står oppå den første feilen. + + 3. Trykk r og deretter tegnet som skal være der. + + 4. Repeter punkt 2 og 3 til den første linjen er lik den andre. + +---> Da dfnne lynjxn ble zkrevet, var det nøen som tjykket feite taster! +---> Da denne linjen ble skrevet, var det noen som trykket feile taster! + + 5. Gå videre til leksjon 3.2. + +MERK: Husk at du bør lære ved å BRUKE, ikke pugge. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.3: «FORANDRE»-OPERATOREN + + + ** For å forandre til slutten av et ord, trykk ce . ** + + 1. Flytt markøren til den første linjen nedenfor som er merket --->. + + 2. Plasser markøren på u i «lubjwr». + + 3. Trykk ce og det korrekte ordet (i dette tilfellet, skriv «injen»). + + 4. Trykk og gå til det neste tegnet som skal forandres. + + 5. Repeter punkt 3 og 4 helt til den første setningen er lik den andre. + +---> Denne lubjwr har noen wgh som må forkwåp med «forækzryas»-kommandoen. +---> Denne linjen har noen ord som må forandres med «forandre»-kommandoen. + +Vær oppmerksom på at ce sletter ordet og går inn i innsettingsmodus. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + + + ** Forandringskommandoen blir brukt med de samme bevegelser som «slett». ** + + 1. Forandringsoperatoren fungerer på samme måte som «slett». Formatet er: + + c [nummer] bevegelse + + 2. Bevegelsene er de samme, som for eksempel w (ord) og $ (slutten av en + linje). + + 3. Gå til den første linjen nedenfor som er merket --->. + + 4. Flytt markøren til den første feilen. + + 5. Skriv c$ og skriv resten av linjen lik den andre og trykk . + +---> Slutten på denne linjen trenger litt hjelp for å gjøre den lik den neste. +---> Slutten på denne linjen trenger å bli rettet ved bruk av c$-kommandoen. + +MERK: Du kan bruke slettetasten for å rette feil mens du skriver. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 3 + + + 1. For å legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette + limer inn den slettede teksten ETTER markøren (hvis en linje ble slettet + vil den bli limt inn på linjen under markøren). + + 2. For å erstatte et tegn under markøren, trykk r og deretter tegnet som + du vil ha der. + + 3. Forandringsoperatoren lar deg forandre fra markøren til dit bevegelsen + tar deg. Det vil si, skriv ce for å forandre fra markøren til slutten + av ordet, c$ for å forandre til slutten av linjen. + + 4. Formatet for «forandre» er: + + c [nummer] bevegelse + +Nå kan du gå til neste leksjon. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.1: POSISJONERING AV MARKØREN OG FILSTATUS + + ** Trykk CTRL-G for å vise posisjonen i filen og filstatusen. + Trykk G for å gå til en spesifikk linje i filen. ** + + Merk: Les hele leksjonen før du utfører noen av punktene! + + 1. Hold nede Ctrl-tasten og trykk g . Vi kaller dette CTRL-G. En melding + vil komme til syne på bunnen av skjermen med filnavnet og posisjonen i + filen. Husk linjenummeret for bruk i steg 3. + +Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette + skjer når «ruler»-valget er satt (forklart i leksjon 6). + + 2. Trykk G for å gå til bunnen av filen. + Skriv gg for å gå til begynnelsen av filen. + + 3. Skriv inn linjenummeret du var på og deretter G . Dette vil føre deg + tilbake til linjen du var på da du først trykket CTRL-G. + + 4. Utfør steg 1 til 3 hvis du føler deg sikker på prosedyren. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.2: SØKEKOMMANDOEN + + ** Skriv / etterfulgt av en søkestreng som du vil lete etter. ** + + 1. Trykk / når du er i normalmodusen. Legg merke til at skråstreken og + markøren kommer til syne på bunnen av skjermen i likhet med + «:»-kommandoene. + + 2. Skriv «feeeiil» og trykk . Dette er teksten du vil lete etter. + + 3. For å finne neste forekomst av søkestrengen, trykk n . + For å lete etter samme søketeksten i motsatt retning, trykk N . + + 4. For å lete etter en tekst bakover i filen, bruk ? istedenfor / . + + 5. For å gå tilbake til der du kom fra, trykk CTRL-O (Hold Ctrl nede mens + du trykker bokstaven o ). Repeter for å gå enda lengre tilbake. CTRL-I + går framover. + +---> «feeeiil» er ikke måten å skrive «feil» på, feeeiil er helt feil. +Merk: Når søkingen når slutten av filen, vil den fortsette fra starten unntatt + hvis «wrapscan»-valget er resatt. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.3: FINN SAMSVARENDE PARENTESER + + + ** Trykk % for å finne en samsvarende ), ] eller } . ** + + 1. Plasser markøren på en (, [ eller { på linjen nedenfor merket --->. + + 2. Trykk % . + + 3. Markøren vil gå til den samsvarende parentesen eller hakeparentesen. + + 4. Trykk % for å flytte markøren til den andre samsvarende parentesen. + + 5. Flytt markøren til en annen (, ), [, ], { eller } og se hva % gjør. + +---> Dette ( er en testlinje med (, [ ] og { } i den )). + +Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert + antall parenteser! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.4: ERSTATT-KOMMANDOEN + + + ** Skriv :s/gammel/ny/g for å erstatte «gammel» med «ny». ** + + 1. Flytt markøren til linjen nedenfor som er merket med --->. + + 2. Skriv :s/deen/den/ . Legg merke til at denne kommandoen bare + forandrer den første forekomsten av «deen» på linjen. + + 3. Skriv :s/deen/den/g . Når g-flagget legges til, betyr dette global + erstatning på linjen og erstatter alle forekomster av «deen» på linjen. + +---> deen som kan kaste deen tyngste steinen lengst er deen beste + + 4. For å erstatte alle forekomster av en tekststreng mellom to linjer, + skriv :#,#s/gammel/ny/g der #,# er linjenumrene på de to linjene for + linjeområdet erstatningen skal gjøres. + Skriv :%s/gammel/ny/g for å erstatte tekst i hele filen. + Skriv :%s/gammel/ny/gc for å finne alle forekomster i hele filen, og + deretter spørre om teksten skal erstattes eller + ikke. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 4 + + + 1. Ctrl-G viser nåværende posisjon i filen og filstatusen. + G går til slutten av filen. + nummer G går til det linjenummeret. + gg går til den første linjen. + + 2. Skriv / etterfulgt av en søketekst for å lete FRAMOVER etter teksten. + Skriv ? etterfulgt av en søketekst for å lete BAKOVER etter teksten. + Etter et søk kan du trykke n for å finne neste forekomst i den samme + retningen eller N for å lete i motsatt retning. + CTRL-O tar deg tilbake til gamle posisjoner, CTRL-I til nyere posisjoner. + + 3. Skriv % når markøren står på en (, ), [, ], { eller } for å finne den + som samsvarer. + + 4. Erstatte «gammel» med første «ny» på en linje: :s/gammel/ny + Erstatte alle «gammel» med «ny» på en linje: :s/gammel/ny/g + Erstatte tekst mellom to linjenumre: :#,#s/gammel/ny/g + Erstatte alle forekomster i en fil: :%s/gammel/ny/g + For å godkjenne hver erstatning, legg til «c»: :%s/gammel/ny/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO + + + ** Skriv :! etterfulgt av en ekstern kommando for å utføre denne. ** + + 1. Skriv den velkjente kommandoen : for å plassere markøren på bunnen av + skjermen. Dette lar deg skrive en kommandolinjekommando. + + 2. Nå kan du skrive tegnet ! . Dette lar deg utføre en hvilken som helst + ekstern kommando. + + 3. Som et eksempel, skriv ls etter utropstegnet og trykk . Du vil + nå få en liste over filene i katalogen, akkurat som om du hadde kjørt + kommandoen direkte fra kommandolinjen i skallet. Eller bruk :!dir hvis + «ls» ikke virker. + +MERK: Det er mulig å kjøre alle eksterne kommandoer på denne måten, også med + parametere. + +MERK: Alle «:»-kommandoer må avsluttes med . Fra dette punktet er det + ikke alltid vi nevner det. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.2: MER OM LAGRING AV FILER + + + ** For å lagre endringene gjort i en tekst, skriv :w FILNAVN. ** + + 1. Skriv :!dir eller :!ls for å få en liste over filene i katalogen. Du + vet allerede at du må trykke etter dette. + + 2. Velg et filnavn på en fil som ikke finnes, som for eksempel TEST . + + 3. Skriv :w TEST (der TEST er filnavnet du velger). + + 4. Dette lagrer hele filen (denne innføringen) under navnet TEST . For å + sjekke dette, skriv :!dir eller :!ls igjen for å se innholdet av + katalogen. + +Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST», + ville filen vært en eksakt kopi av innføringen da du lagret den. + + 5. Fjern filen ved å skrive :!rm TEST hvis du er på et Unix-lignende + operativsystem, eller :!del TEST hvis du bruker MS-DOS. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + + + ** For å lagre en del av en fil, skriv v bevegelse :w FILNAVN ** + + 1. Flytt markøren til denne linjen. + + 2. Trykk v og flytt markøren til det femte elementet nedenfor. Legg merke + til at teksten blir markert. + + 3. Trykk : (kolon). På bunnen av skjermen vil :'<,'> komme til syne. + + 4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller + at du ser :'<,'>w TEST før du trykker Enter. + + 5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls + for å se den. Ikke slett den enda! Vi vil bruke den i neste leksjon. + +MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for + å gjøre det valgte området større eller mindre. Deretter kan du bruke en + operator for å gjøre noe med teksten. For eksempel sletter d teksten. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.4: HENTING OG SAMMENSLÅING AV FILER + + + ** For å lese inn en annen fil inn i nåværende buffer, skriv :r FILNAVN ** + + 1. Plasser markøren like over denne linjen. + +MERK: Etter å ha utført steg 2 vil du se teksten fra leksjon 5.3. Gå deretter + NED for å se denne leksjonen igjen. + + 2. Hent TEST-filen ved å bruke kommandoen :r TEST der TEST er navnet på + filen du brukte. Filen du henter blir plassert nedenfor markørlinjen. + + 3. For å sjekke at filen ble hentet, gå tilbake og se at det er to kopier av + leksjon 5.3, originalen og denne versjonen. + +MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls + leser utdataene av ls-kommandoen og legger dem nedenfor markøren. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 5 + + + 1. :!kommando utfører en ekstern kommandio. + + Noen nyttige eksempler er: + (MS-DOS) (Unix) + :!dir :!ls - List filene i katalogen. + :!del FILNAVN :!rm FILNAVN - Slett filen FILNAVN. + + 2. :w FILNAVN skriver den nåværende Vim-filen disken med navnet FILNAVN . + + 3. v bevegelse :w FILNAVN lagrer de visuelt valgte linjene til filen + FILNAVN. + + 4. :r FILNAVN henter filen FILNAVN og legger den inn nedenfor markøren. + + 5. :r !dir leser utdataene fra «dir»-kommandoen og legger dem nedenfor + markørposisjonen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.1: «ÅPNE LINJE»-KOMMANDOEN + + + ** Skriv o for å «åpne opp» for en ny linje etter markøren og gå til + innsettingsmodus ** + + 1. Flytt markøren til linjen nedenfor merket --->. + + 2. Skriv o (liten o) for å åpne opp en linje NEDENFOR markøren og gå inn i + innsettingsmodus. + + 3. Skriv litt tekst og trykk for å gå ut av innsettingsmodusen. + +---> Etter at o er skrevet blir markøren plassert på den tomme linjen. + + 4. For å åpne en ny linje OVER markøren, trykk rett og slett en stor O + istedenfor en liten o . Prøv dette på linjen nedenfor. + +---> Lag ny linje over denne ved å trykke O mens markøren er på denne linjen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.2: «LEGG TIL»-KOMMANDOEN + + + ** Skriv a for å legge til tekst ETTER markøren. ** + + 1. Flytt markøren til starten av linjen merket ---> nedenfor. + + 2. Trykk e til markøren er på slutten av «li». + + 3. Trykk a (liten a) for å legge til tekst ETTER markøren. + + 4. Fullfør ordet sånn som på linjen nedenfor. Trykk for å gå ut av + innsettingsmodusen. + + 5. Bruk e for å gå til det neste ufullstendige ordet og repeter steg 3 og + 4. + +---> Denne li lar deg øve på å leg til tek på en linje. +---> Denne linjen lar deg øve på å legge til tekst på en linje. + +Merk: a, i og A går alle til den samme innsettingsmodusen, den eneste + forskjellen er hvor tegnene blir satt inn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.3: EN ANNEN MÅTE Å ERSTATTE PÅ + + + ** Skriv en stor R for å erstatte mer enn ett tegn. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. Flytt markøren + til begynnelsen av den første «xxx»-en. + + 2. Trykk R og skriv inn tallet som står nedenfor på den andre linjen så + det erstatter xxx. + + 3. Trykk for å gå ut av erstatningsmodusen. Legg merke til at resten + av linjen forblir uforandret. + + 4. Repeter stegene for å erstatte den gjenværende xxx. + +---> Ved å legge 123 til xxx får vi xxx. +---> Ved å legge 123 til 456 får vi 579. + +MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives + erstatter et eksisterende tegn. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.4: KOPIERE OG LIME INN TEKST + + + ** Bruk y-operatoren for å kopiere tekst og p for å lime den inn ** + + 1. Gå til linjen merket ---> nedenfor og plasser markøren etter «a)». + + 2. Gå inn i visuell modus med v og flytt markøren til like før «første». + + 3. Trykk y for å kopiere (engelsk: «yank») den uthevede teksten. + + 4. Flytt markøren til slutten av den neste linjen: j$ + + 5. Trykk p for å lime inn teksten. Trykk deretter: a andre . + + 6. Bruk visuell modus for å velge « valget.», kopier det med y , gå til + slutten av den neste linjen med j$ og legg inn teksten der med p . + +---> a) Dette er det første valget. + b) + +Merk: Du kan også bruke y som en operator; yw kopierer ett ord. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.5: SETT VALG + + + ** Sett et valg så søk eller erstatning ignorerer store/små bokstaver. ** + + 1. Let etter «ignore» ved å skrive: /ignore + Repeter flere ganger ved å trykke n . + + 2. Sett «ic»-valget (Ignore Case) ved å skrive: :set ic + + 3. Søk etter «ignore» igjen ved å trykke n . + Legg merke til at både «Ignore» og «IGNORE» blir funnet. + + 4. Sett «hlsearch»- og «incsearch»-valgene: :set hls is + + 5. Skriv søkekommandoen igjen og se hva som skjer: /ignore + + 6. For å slå av ignorering av store/små bokstaver, skriv: :set noic + +Merk: For å fjerne uthevingen av treff, skriv: :nohlsearch +Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk + \c i uttrykket: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 6 + + 1. Trykk o for å legge til en linje NEDENFOR markøren og gå inn i + innsettingsmodus. + Trykk O for å åpne en linje OVER markøren. + + 2. Skriv a for å sette inn tekst ETTER markøren. + Skriv A for å sette inn tekst etter slutten av linjen. + + 3. Kommandoen e går til slutten av et ord. + + 4. Operatoren y («yank») kopierer tekst, p («paste») limer den inn. + + 5. Ved å trykke R går du inn i erstatningsmodus helt til trykkes. + + 6. Skriv «:set xxx» for å sette valget «xxx». Noen valg er: + «ic» «ignorecase» ignorer store/små bokstaver under søk + «is» «incsearch» vis delvise treff for en søketekst + «hls» «hlsearch» uthev alle søketreff + + 7. Legg til «no» foran valget for å slå det av: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.1: FÅ HJELP + + + ** Bruk det innebygde hjelpesystemet. ** + + Vim har et omfattende innebygget hjelpesystem. For å starte det, prøv en av + disse måtene: + - Trykk Hjelp-tasten (hvis du har en) + - Trykk F1-tasten (hvis du har en) + - Skriv :help + + Les teksten i hjelpevinduet for å finne ut hvordan hjelpen virker. + Skriv CTRL-W CTRL-W for å hoppe fra et vindu til et annet + Skriv :q for å lukke hjelpevinduet. + + Du kan få hjelp for omtrent alle temaer om Vim ved å skrive et parameter til + «:help»-kommandoen. Prøv disse (ikke glem å trykke ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + + + ** Slå på funksjoner i Vim ** + + Vim har mange flere funksjoner enn Vi, men flesteparten av dem er slått av + som standard. For å begynne å bruke flere funksjoner må du lage en + «vimrc»-fil. + + 1. Start redigeringen av «vimrc»-filen. Dette avhenger av systemet ditt: + :e ~/.vimrc for Unix + :e $VIM/_vimrc for MS Windows + + 2. Les inn eksempelfilen for «vimrc»: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Lagre filen med: + :w + + Neste gang du starter Vim vil den bruke syntaks-utheving. Du kan legge til + alle dine foretrukne oppsett i denne «vimrc»-filen. + For mer informasjon, skriv :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.3: FULLFØRING + + + ** Kommandolinjefullføring med CTRL-D og ** + + 1. Vær sikker på at Vim ikke er i Vi-kompatibel modus: :set nocp + + 2. Se hvilke filer som er i katalogen: :!ls eller :!dir + + 3. Skriv starten på en kommando: :e + + 4. Trykk CTRL-D og Vim vil vise en liste over kommandoer som starter med + «e». + + 5. Trykk og Vim vil fullføre kommandonavnet til «:edit». + + 6. Legg til et mellomrom og starten på et eksisterende filnavn: :edit FIL + + 7. Trykk . Vim vil fullføre navnet (hvis det er unikt). + +MERK: Fullføring fungerer for mange kommandoer. Prøv ved å trykke CTRL-D og + . Det er spesielt nyttig for bruk sammen med :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 7 + + + 1. Skriv :help eller trykk eller for å åpne et hjelpevindu. + + 2. Skriv :help kommando for å få hjelp om kommando . + + 3. Trykk CTRL-W CTRL-W for å hoppe til et annet vindu. + + 4. Trykk :q for å lukke hjelpevinduet. + + 5. Opprett et vimrc-oppstartsskript for å lagre favorittvalgene dine. + + 6. Når du skriver en «:»-kommando, trykk CTRL-D for å se mulige + fullføringer. Trykk for å bruke en fullføring. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Her slutter innføringen i Vim. Den var ment som en rask oversikt over + editoren, akkurat nok til å la deg sette i gang med enkel bruk. Den er på + langt nær komplett, da Vim har mange flere kommandoer. Les bruksanvisningen + ved å skrive :help user-manual . + + For videre lesing og studier, kan denne boken anbefales: + «Vim - Vi Improved» av Steve Oualline + Utgiver: New Riders + Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for + nybegynnere. Inneholder mange eksempler og illustrasjoner. + Se http://iccf-holland.org/click5.html + + Denne boken er eldre og handler mer om Vi enn Vim, men anbefales også: + «Learning the Vi Editor» av Linda Lamb + Utgiver: O'Reilly & Associates Inc. + Det er en god bok for å få vite omtrent hva som helst om Vi. + Den sjette utgaven inneholder også informasjon om Vim. + + Denne innføringen er skrevet av Michael C. Pierce og Robert K. Ware, + Colorado School of Mines med idéer av Charles Smith, Colorado State + University. E-mail: bware@mines.colorado.edu . + + Modifisert for Vim av Bram Moolenaar. + Oversatt av Øyvind A. Holm. E-mail: vimtutor _AT_ sunbase.org + Id: tutor.no 406 2007-03-18 22:48:36Z sunny + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vim: set ts=8 : diff --git a/vim/vim-7.2/tutor/tutor.nb.utf-8 b/vim/vim-7.2/tutor/tutor.nb.utf-8 new file mode 100644 index 0000000..a7826b7 --- /dev/null +++ b/vim/vim-7.2/tutor/tutor.nb.utf-8 @@ -0,0 +1,973 @@ +=============================================================================== += V e l k o m m e n t i l i n n f ø r i n g e n i V i m -- Ver. 1.7 = +=============================================================================== + + Vim er en meget kraftig editor med mange kommandoer, alt for mange til Ã¥ + kunne gÃ¥ gjennom alle i en innføring som denne. Den er beregnet pÃ¥ Ã¥ + sette deg inn i bruken av nok kommandoer sÃ¥ du vil være i stand til lett + Ã¥ kunne bruke Vim som en editor til alle formÃ¥l. + + Tiden som kreves for Ã¥ gÃ¥ gjennom denne innføringen tar ca. 25-30 + minutter, avhengig av hvor mye tid du bruker til eksperimentering. + + MERK: + Kommandoene i leksjonene vil modifisere teksten. Lag en kopi av denne + filen som du kan øve deg pÃ¥ (hvis du kjørte «vimtutor»-kommandoen, er + dette allerede en kopi). + + Det er viktig Ã¥ huske at denne innføringen er beregnet pÃ¥ læring gjennom + bruk. Det betyr at du mÃ¥ utføre kommandoene for Ã¥ lære dem skikkelig. + Hvis du bare leser teksten, vil du glemme kommandoene! + + Først av alt, sjekk at «Caps Lock» IKKE er aktiv og trykk «j»-tasten for + Ã¥ flytte markøren helt til leksjon 1.1 fyller skjermen. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.1: FLYTTING AV MARKØREN + + + ** For Ã¥ flytte markøren, trykk tastene h, j, k, l som vist. ** + ^ + k Tips: h-tasten er til venstre og flytter til venstre. + < h l > l-tasten er til høyre og flytter til høyre. + j j-tasten ser ut som en pil som peker nedover. + v + 1. Flytt markøren rundt pÃ¥ skjermen til du har fÃ¥tt det inn i fingrene. + + 2. Hold inne nedovertasten (j) til den repeterer. + NÃ¥ vet du hvordan du beveger deg til neste leksjon. + + 3. GÃ¥ til leksjon 1.2 ved hjelp av nedovertasten. + +Merk: Hvis du blir usikker pÃ¥ noe du har skrevet, trykk for Ã¥ gÃ¥ til + normalmodus. Skriv deretter kommandoen du ønsket pÃ¥ nytt. + +Merk: Piltastene skal ogsÃ¥ virke. Men ved Ã¥ bruke hjkl vil du være i stand til + Ã¥ bevege markøren mye raskere nÃ¥r du er blitt vant til det. Helt sant! + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.2: AVSLUTTE VIM + + + !! MERK: Før du utfører noen av punktene nedenfor, les hele leksjonen!! + + 1. Trykk -tasten (for Ã¥ forsikre deg om at du er i normalmodus). + + 2. Skriv: :q! . + Dette avslutter editoren og FORKASTER alle forandringer som du har gjort. + + 3. NÃ¥r du ser kommandolinjen i skallet, skriv kommandoen som startet denne + innføringen. Den er: vimtutor + + 4. Hvis du er sikker pÃ¥ at du husker dette, utfør punktene 1 til 3 for Ã¥ + avslutte og starte editoren pÃ¥ nytt. + +MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen + fÃ¥ leksjoner vil du lære hvordan du lagrer forandringene til en fil. + + 5. Flytt markøren ned til leksjon 1.3. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + + + ** Trykk x for Ã¥ slette tegnet under markøren. ** + + 1. Flytt markøren til den første linjen merket med --->. + + 2. For Ã¥ ordne feilene pÃ¥ linjen, flytt markøren til den er oppÃ¥ tegnet som + skal slettes. + + 3. Trykk tasten x for Ã¥ slette det uønskede tegnet. + + 4. Repeter punkt 2 til 4 til setningen er lik den som er under. + +---> Hessstennnn brrrÃ¥snudddde ii gaaata. +---> Hesten brÃ¥snudde i gata. + + 5. NÃ¥ som linjen er korrekt, gÃ¥ til leksjon 1.4. + +MERK: NÃ¥r du gÃ¥r gjennom innføringen, ikke bare prøv Ã¥ huske kommandoene, men + bruk dem helt til de sitter. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + + + ** Trykk i for Ã¥ sette inn tekst. ** + + 1. Flytt markøren til den første linjen som er merket med --->. + + 2. For Ã¥ gjøre den første linjen lik den andre, flytt markøren til den stÃ¥r + pÃ¥ tegnet ETTER posisjonen der teksten skal settes inn. + + 3. Trykk i og skriv inn teksten som mangler. + + 4. Etterhvert som hver feil er fikset, trykk for Ã¥ returnere til + normalmodus. Repeter punkt 2 til 4 til setningen er korrekt. + +---> Det er tkst som mnglr . +---> Det er ganske mye tekst som mangler her. + + 5. NÃ¥r du føler deg komfortabel med Ã¥ sette inn tekst, gÃ¥ til oppsummeringen + nedenfor. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + + + ** Trykk A for Ã¥ legge til tekst. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + Det har ikke noe Ã¥ si hvor markøren er plassert pÃ¥ den linjen. + + 2. Trykk A og skriv inn det som skal legges til. + + 3. NÃ¥r teksten er lagt til, trykk for Ã¥ returnere til normalmodusen. + + 4. Flytt markøren til den andre linjen markert med ---> og repeter steg 2 og + 3 for Ã¥ reparere denne setningen. + +---> Det mangler noe tekst p + Det mangler noe tekst pÃ¥ denne linjen. +---> Det mangler ogsÃ¥ litt tek + Det mangler ogsÃ¥ litt tekst pÃ¥ denne linjen. + + 5. NÃ¥r du føler at du behersker Ã¥ legge til tekst, gÃ¥ til leksjon 1.6. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 1.6: REDIGERE EN FIL + + + ** Bruk :wq for Ã¥ lagre en fil og avslutte. ** + + !! MERK: Før du utfører noen av stegene nedenfor, les hele denne leksjonen!! + + 1. Avslutt denne innføringen som du gjorde i leksjon 1.2: :q! + + 2. Skriv denne kommandoen pÃ¥ kommandolinja: vim tutor + «vim» er kommandoen for Ã¥ starte Vim-editoren, «tutor» er navnet pÃ¥ fila + som du vil redigere. Bruk en fil som kan forandres. + + 3. Sett inn og slett tekst som du lærte i de foregÃ¥ende leksjonene. + + 4. Lagre filen med forandringene og avslutt Vim med: :wq + + 5. Start innføringen pÃ¥ nytt og flytt ned til oppsummeringen som følger. + + 6. Etter Ã¥ ha lest og forstÃ¥tt stegene ovenfor: Sett i gang. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 1 + + + 1. Markøren beveges ved hjelp av piltastene eller hjkl-tastene. + h (venstre) j (ned) k (opp) l (høyre) + + 2. For Ã¥ starte Vim fra skall-kommandolinjen, skriv: vim FILNAVN + + 3. For Ã¥ avslutte Vim, skriv: :q! for Ã¥ forkaste endringer. + ELLER skriv: :wq for Ã¥ lagre forandringene. + + 4. For Ã¥ slette tegnet under markøren, trykk: x + + 5. For Ã¥ sette inn eller legge til tekst, trykk: + i skriv innsatt tekst sett inn før markøren + A skriv tillagt tekst legg til pÃ¥ slutten av linjen + +MERK: NÃ¥r du trykker gÃ¥r du til normalmodus eller du avbryter en uønsket + og delvis fullført kommando. + + NÃ¥ kan du gÃ¥ videre til leksjon 2. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.1: SLETTEKOMMANDOER + + + ** Trykk dw for Ã¥ slette et ord. ** + + 1. Trykk for Ã¥ være sikker pÃ¥ at du er i normalmodus. + + 2. Flytt markøren til den første linjen nedenfor merket --->. + + 3. Flytt markøren til begynnelsen av ordet som skal slettes. + + 4. Trykk dw og ordet vil forsvinne. + +MERK: Bokstaven d vil komme til syne pÃ¥ den nederste linjen pÃ¥ skjermen nÃ¥r + du skriver den. Vim venter pÃ¥ at du skal skrive w . Hvis du ser et annet + tegn enn d har du skrevet noe feil; trykk og start pÃ¥ nytt. + +---> Det er agurk tre ord eple som ikke hører pære hjemme i denne setningen. +---> Det er tre ord som ikke hører hjemme i denne setningen. + + 5. Repeter punkt 3 og 4 til den første setningen er lik den andre. GÃ¥ + deretter til leksjon 2.2. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.2: FLERE SLETTEKOMMANDOER + + + ** Trykk d$ for Ã¥ slette til slutten av linjen. ** + + 1. Trykk for Ã¥ være sikker pÃ¥ at du er i normalmodus. + + 2. Flytt markøren til linjen nedenfor merket --->. + + 3. Flytt markøren til punktet der linjen skal kuttes (ETTER første punktum). + + 4. Trykk d$ for Ã¥ slette alt til slutten av linjen. + +---> Noen skrev slutten pÃ¥ linjen en gang for mye. linjen en gang for mye. + + 5. GÃ¥ til leksjon 2.3 for Ã¥ forstÃ¥ hva som skjer. + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.3: OM OPERATORER OG BEVEGELSER + + + Mange kommandoer som forandrer teksten er laget ut i fra en operator og en + bevegelse. Formatet for en slettekommando med sletteoperatoren d er: + + d bevegelse + + Der: + d - er sletteoperatoren. + bevegelse - er hva operatoren vil opere pÃ¥ (listet nedenfor). + + En kort liste med bevegelser: + w - til starten av det neste ordet, UNNTATT det første tegnet. + e - til slutten av det nÃ¥værende ordet, INKLUDERT det siste tegnet. + $ - til slutten av linjen, INKLUDERT det siste tegnet. + + Ved Ã¥ skrive de vil altsÃ¥ alt fra markøren til slutten av ordet bli + slettet. + +MERK: Ved Ã¥ skrive kun bevegelsen i normalmodusen uten en operator vil + markøren flyttes som spesifisert. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + + + ** Ved Ã¥ skrive et tall foran en bevegelse repeterer den sÃ¥ mange ganger. ** + + 1. Flytt markøren til starten av linjen markert ---> nedenfor. + + 2. Skriv 2w for Ã¥ flytte markøren to ord framover. + + 3. Skriv 3e for Ã¥ flytte markøren framover til slutten av det tredje + ordet. + + 4. Skriv 0 (null) for Ã¥ flytte til starten av linjen. + + 5. Repeter steg 2 og 3 med forskjellige tall. + +---> Dette er en linje med noen ord som du kan bevege deg rundt pÃ¥. + + 6. GÃ¥ videre til leksjon 2.5. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.5: BRUK AV ANTALL FOR Ã… SLETTE MER + + + ** Et tall sammen med en operator repeterer den sÃ¥ mange ganger. ** + + I kombinasjonen med sletteoperatoren og en bevegelse nevnt ovenfor setter du + inn antall før bevegelsen for Ã¥ slette mer: + d nummer bevegelse + + 1. Flytt markøren til det første ordet med STORE BOKSTAVER pÃ¥ linjen markert + med --->. + + 2. Skriv 2dw for Ã¥ slette de to ordene med store bokstaver. + + 3. Repeter steg 1 og 2 med forskjelling antall for Ã¥ slette de etterfølgende + ordene som har store bokstaver. + +---> Denne ABC DE linjen FGHI JK LMN OP er nÃ¥ Q RS TUV litt mer lesbar. + +MERK: Et antall mellom operatoren d og bevegelsen virker pÃ¥ samme mÃ¥te som Ã¥ + bruke bevegelsen uten en operator. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.6: OPERERE PÃ… LINJER + + + ** Trykk dd for Ã¥ slette en hel linje. ** + + PÃ¥ grunn av at sletting av linjer er mye brukt, fant utviklerne av Vi ut at + det vil være lettere Ã¥ rett og slett trykke to d-er for Ã¥ slette en linje. + + 1. Flytt markøren til den andre linjen i verset nedenfor. + 2. Trykk dd Ã¥ slette linjen. + 3. Flytt deretter til den fjerde linjen. + 4. Trykk 2dd for Ã¥ slette to linjer. + +---> 1) Roser er røde, +---> 2) Gjørme er gøy, +---> 3) Fioler er blÃ¥, +---> 4) Jeg har en bil, +---> 5) Klokker viser tiden, +---> 6) Druer er søte +---> 7) Og du er likesÃ¥. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 2.7: ANGRE-KOMMANDOEN + + + ** Trykk u for Ã¥ angre siste kommando, U for Ã¥ fikse en hel linje. ** + + 1. Flytt markøren til linjen nedenfor merket ---> og plasser den pÃ¥ den + første feilen. + 2. Trykk x for Ã¥ slette det første uønskede tegnet. + 3. Trykk sÃ¥ u for Ã¥ angre den siste utførte kommandoen. + 4. Deretter ordner du alle feilene pÃ¥ linjene ved Ã¥ bruke kommandoen x . + 5. Trykk nÃ¥ en stor U for Ã¥ sette linjen tilbake til det den var + originalt. + 6. Trykk u noen ganger for Ã¥ angre U og foregÃ¥ende kommandoer. + 7. Deretter trykker du CTRL-R (hold CTRL nede mens du trykker R) noen + ganger for Ã¥ gjenopprette kommandoene (omgjøre angrekommandoene). + +---> RReparer feiilene påå denne linnnjen oog erssstatt dem meed angre. + + 8. Dette er meget nyttige kommandoer. NÃ¥ kan du gÃ¥ til oppsummeringen av + leksjon 2. + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 2 + + + 1. For Ã¥ slette fra markøren fram til det neste ordet, trykk: dw + 2. For Ã¥ slette fra markøren til slutten av en linje, trykk: d$ + 3. For Ã¥ slette en hel linje, trykk: dd + + 4. For Ã¥ repetere en bevegelse, sett et nummer foran: 2w + 5. Formatet for en forandringskommando er: + operator [nummer] bevegelse + der: + operator - hva som skal gjøres, f.eks. d for Ã¥ slette + [nummer] - et valgfritt antall for Ã¥ repetere bevegelsen + bevegelse - hva kommandoen skal operere pÃ¥, eksempelvis w (ord), + $ (til slutten av linjen) og sÃ¥ videre. + + 6. For Ã¥ gÃ¥ til starten av en linje, bruk en null: 0 + + 7. For Ã¥ angre tidligere endringer, skriv: u (liten u) + For Ã¥ angre alle forandringer pÃ¥ en linje, skriv: U (stor U) + For Ã¥ omgjøre angringen, trykk: CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.1: «LIM INN»-KOMMANDOEN + + + ** Trykk p for Ã¥ lime inn tidligere slettet tekst etter markøren ** + + 1. Flytt markøren til den første linjen med ---> nedenfor. + + 2. Trykk dd for Ã¥ slette linjen og lagre den i et Vim-register. + + 3. Flytt markøren til c)-linjen, OVER posisjonen linjen skal settes inn. + + 4. Trykk p for Ã¥ legge linjen under markøren. + + 5. Repeter punkt 2 til 4 helt til linjene er i riktig rekkefølge. + +---> d) Kan du ogsÃ¥ lære? +---> b) Fioler er blÃ¥, +---> c) Intelligens mÃ¥ læres, +---> a) Roser er røde, + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.2: «ERSTATT»-KOMMANDOEN + + + ** Trykk rx for Ã¥ erstatte tegnet under markøren med x. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. + + 2. Flytt markøren sÃ¥ den stÃ¥r oppÃ¥ den første feilen. + + 3. Trykk r og deretter tegnet som skal være der. + + 4. Repeter punkt 2 og 3 til den første linjen er lik den andre. + +---> Da dfnne lynjxn ble zkrevet, var det nøen som tjykket feite taster! +---> Da denne linjen ble skrevet, var det noen som trykket feile taster! + + 5. GÃ¥ videre til leksjon 3.2. + +MERK: Husk at du bør lære ved Ã¥ BRUKE, ikke pugge. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.3: «FORANDRE»-OPERATOREN + + + ** For Ã¥ forandre til slutten av et ord, trykk ce . ** + + 1. Flytt markøren til den første linjen nedenfor som er merket --->. + + 2. Plasser markøren pÃ¥ u i «lubjwr». + + 3. Trykk ce og det korrekte ordet (i dette tilfellet, skriv «injen»). + + 4. Trykk og gÃ¥ til det neste tegnet som skal forandres. + + 5. Repeter punkt 3 og 4 helt til den første setningen er lik den andre. + +---> Denne lubjwr har noen wgh som mÃ¥ forkwÃ¥p med «forækzryas»-kommandoen. +---> Denne linjen har noen ord som mÃ¥ forandres med «forandre»-kommandoen. + +Vær oppmerksom pÃ¥ at ce sletter ordet og gÃ¥r inn i innsettingsmodus. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + + + ** Forandringskommandoen blir brukt med de samme bevegelser som «slett». ** + + 1. Forandringsoperatoren fungerer pÃ¥ samme mÃ¥te som «slett». Formatet er: + + c [nummer] bevegelse + + 2. Bevegelsene er de samme, som for eksempel w (ord) og $ (slutten av en + linje). + + 3. GÃ¥ til den første linjen nedenfor som er merket --->. + + 4. Flytt markøren til den første feilen. + + 5. Skriv c$ og skriv resten av linjen lik den andre og trykk . + +---> Slutten pÃ¥ denne linjen trenger litt hjelp for Ã¥ gjøre den lik den neste. +---> Slutten pÃ¥ denne linjen trenger Ã¥ bli rettet ved bruk av c$-kommandoen. + +MERK: Du kan bruke slettetasten for Ã¥ rette feil mens du skriver. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 3 + + + 1. For Ã¥ legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette + limer inn den slettede teksten ETTER markøren (hvis en linje ble slettet + vil den bli limt inn pÃ¥ linjen under markøren). + + 2. For Ã¥ erstatte et tegn under markøren, trykk r og deretter tegnet som + du vil ha der. + + 3. Forandringsoperatoren lar deg forandre fra markøren til dit bevegelsen + tar deg. Det vil si, skriv ce for Ã¥ forandre fra markøren til slutten + av ordet, c$ for Ã¥ forandre til slutten av linjen. + + 4. Formatet for «forandre» er: + + c [nummer] bevegelse + +NÃ¥ kan du gÃ¥ til neste leksjon. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.1: POSISJONERING AV MARKØREN OG FILSTATUS + + ** Trykk CTRL-G for Ã¥ vise posisjonen i filen og filstatusen. + Trykk G for Ã¥ gÃ¥ til en spesifikk linje i filen. ** + + Merk: Les hele leksjonen før du utfører noen av punktene! + + 1. Hold nede Ctrl-tasten og trykk g . Vi kaller dette CTRL-G. En melding + vil komme til syne pÃ¥ bunnen av skjermen med filnavnet og posisjonen i + filen. Husk linjenummeret for bruk i steg 3. + +Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette + skjer nÃ¥r «ruler»-valget er satt (forklart i leksjon 6). + + 2. Trykk G for Ã¥ gÃ¥ til bunnen av filen. + Skriv gg for Ã¥ gÃ¥ til begynnelsen av filen. + + 3. Skriv inn linjenummeret du var pÃ¥ og deretter G . Dette vil føre deg + tilbake til linjen du var pÃ¥ da du først trykket CTRL-G. + + 4. Utfør steg 1 til 3 hvis du føler deg sikker pÃ¥ prosedyren. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.2: SØKEKOMMANDOEN + + ** Skriv / etterfulgt av en søkestreng som du vil lete etter. ** + + 1. Trykk / nÃ¥r du er i normalmodusen. Legg merke til at skrÃ¥streken og + markøren kommer til syne pÃ¥ bunnen av skjermen i likhet med + «:»-kommandoene. + + 2. Skriv «feeeiil» og trykk . Dette er teksten du vil lete etter. + + 3. For Ã¥ finne neste forekomst av søkestrengen, trykk n . + For Ã¥ lete etter samme søketeksten i motsatt retning, trykk N . + + 4. For Ã¥ lete etter en tekst bakover i filen, bruk ? istedenfor / . + + 5. For Ã¥ gÃ¥ tilbake til der du kom fra, trykk CTRL-O (Hold Ctrl nede mens + du trykker bokstaven o ). Repeter for Ã¥ gÃ¥ enda lengre tilbake. CTRL-I + gÃ¥r framover. + +---> «feeeiil» er ikke mÃ¥ten Ã¥ skrive «feil» pÃ¥, feeeiil er helt feil. +Merk: NÃ¥r søkingen nÃ¥r slutten av filen, vil den fortsette fra starten unntatt + hvis «wrapscan»-valget er resatt. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.3: FINN SAMSVARENDE PARENTESER + + + ** Trykk % for Ã¥ finne en samsvarende ), ] eller } . ** + + 1. Plasser markøren pÃ¥ en (, [ eller { pÃ¥ linjen nedenfor merket --->. + + 2. Trykk % . + + 3. Markøren vil gÃ¥ til den samsvarende parentesen eller hakeparentesen. + + 4. Trykk % for Ã¥ flytte markøren til den andre samsvarende parentesen. + + 5. Flytt markøren til en annen (, ), [, ], { eller } og se hva % gjør. + +---> Dette ( er en testlinje med (, [ ] og { } i den )). + +Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert + antall parenteser! + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 4.4: ERSTATT-KOMMANDOEN + + + ** Skriv :s/gammel/ny/g for Ã¥ erstatte «gammel» med «ny». ** + + 1. Flytt markøren til linjen nedenfor som er merket med --->. + + 2. Skriv :s/deen/den/ . Legg merke til at denne kommandoen bare + forandrer den første forekomsten av «deen» pÃ¥ linjen. + + 3. Skriv :s/deen/den/g . NÃ¥r g-flagget legges til, betyr dette global + erstatning pÃ¥ linjen og erstatter alle forekomster av «deen» pÃ¥ linjen. + +---> deen som kan kaste deen tyngste steinen lengst er deen beste + + 4. For Ã¥ erstatte alle forekomster av en tekststreng mellom to linjer, + skriv :#,#s/gammel/ny/g der #,# er linjenumrene pÃ¥ de to linjene for + linjeomrÃ¥det erstatningen skal gjøres. + Skriv :%s/gammel/ny/g for Ã¥ erstatte tekst i hele filen. + Skriv :%s/gammel/ny/gc for Ã¥ finne alle forekomster i hele filen, og + deretter spørre om teksten skal erstattes eller + ikke. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 4 + + + 1. Ctrl-G viser nÃ¥værende posisjon i filen og filstatusen. + G gÃ¥r til slutten av filen. + nummer G gÃ¥r til det linjenummeret. + gg gÃ¥r til den første linjen. + + 2. Skriv / etterfulgt av en søketekst for Ã¥ lete FRAMOVER etter teksten. + Skriv ? etterfulgt av en søketekst for Ã¥ lete BAKOVER etter teksten. + Etter et søk kan du trykke n for Ã¥ finne neste forekomst i den samme + retningen eller N for Ã¥ lete i motsatt retning. + CTRL-O tar deg tilbake til gamle posisjoner, CTRL-I til nyere posisjoner. + + 3. Skriv % nÃ¥r markøren stÃ¥r pÃ¥ en (, ), [, ], { eller } for Ã¥ finne den + som samsvarer. + + 4. Erstatte «gammel» med første «ny» pÃ¥ en linje: :s/gammel/ny + Erstatte alle «gammel» med «ny» pÃ¥ en linje: :s/gammel/ny/g + Erstatte tekst mellom to linjenumre: :#,#s/gammel/ny/g + Erstatte alle forekomster i en fil: :%s/gammel/ny/g + For Ã¥ godkjenne hver erstatning, legg til «c»: :%s/gammel/ny/gc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO + + + ** Skriv :! etterfulgt av en ekstern kommando for Ã¥ utføre denne. ** + + 1. Skriv den velkjente kommandoen : for Ã¥ plassere markøren pÃ¥ bunnen av + skjermen. Dette lar deg skrive en kommandolinjekommando. + + 2. NÃ¥ kan du skrive tegnet ! . Dette lar deg utføre en hvilken som helst + ekstern kommando. + + 3. Som et eksempel, skriv ls etter utropstegnet og trykk . Du vil + nÃ¥ fÃ¥ en liste over filene i katalogen, akkurat som om du hadde kjørt + kommandoen direkte fra kommandolinjen i skallet. Eller bruk :!dir hvis + «ls» ikke virker. + +MERK: Det er mulig Ã¥ kjøre alle eksterne kommandoer pÃ¥ denne mÃ¥ten, ogsÃ¥ med + parametere. + +MERK: Alle «:»-kommandoer mÃ¥ avsluttes med . Fra dette punktet er det + ikke alltid vi nevner det. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.2: MER OM LAGRING AV FILER + + + ** For Ã¥ lagre endringene gjort i en tekst, skriv :w FILNAVN. ** + + 1. Skriv :!dir eller :!ls for Ã¥ fÃ¥ en liste over filene i katalogen. Du + vet allerede at du mÃ¥ trykke etter dette. + + 2. Velg et filnavn pÃ¥ en fil som ikke finnes, som for eksempel TEST . + + 3. Skriv :w TEST (der TEST er filnavnet du velger). + + 4. Dette lagrer hele filen (denne innføringen) under navnet TEST . For Ã¥ + sjekke dette, skriv :!dir eller :!ls igjen for Ã¥ se innholdet av + katalogen. + +Merk: Hvis du nÃ¥ hadde avsluttet Vim og startet pÃ¥ nytt igjen med «vim TEST», + ville filen vært en eksakt kopi av innføringen da du lagret den. + + 5. Fjern filen ved Ã¥ skrive :!rm TEST hvis du er pÃ¥ et Unix-lignende + operativsystem, eller :!del TEST hvis du bruker MS-DOS. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + + + ** For Ã¥ lagre en del av en fil, skriv v bevegelse :w FILNAVN ** + + 1. Flytt markøren til denne linjen. + + 2. Trykk v og flytt markøren til det femte elementet nedenfor. Legg merke + til at teksten blir markert. + + 3. Trykk : (kolon). PÃ¥ bunnen av skjermen vil :'<,'> komme til syne. + + 4. Trykk w TEST , der TEST er et filnavn som ikke finnes enda. Kontroller + at du ser :'<,'>w TEST før du trykker Enter. + + 5. Vim vil skrive de valgte linjene til filen TEST. Bruk :!dir eller !ls + for Ã¥ se den. Ikke slett den enda! Vi vil bruke den i neste leksjon. + +MERK: Ved Ã¥ trykke v startes visuelt valg. Du kan flytte markøren rundt for + Ã¥ gjøre det valgte omrÃ¥det større eller mindre. Deretter kan du bruke en + operator for Ã¥ gjøre noe med teksten. For eksempel sletter d teksten. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 5.4: HENTING OG SAMMENSLÃ…ING AV FILER + + + ** For Ã¥ lese inn en annen fil inn i nÃ¥værende buffer, skriv :r FILNAVN ** + + 1. Plasser markøren like over denne linjen. + +MERK: Etter Ã¥ ha utført steg 2 vil du se teksten fra leksjon 5.3. GÃ¥ deretter + NED for Ã¥ se denne leksjonen igjen. + + 2. Hent TEST-filen ved Ã¥ bruke kommandoen :r TEST der TEST er navnet pÃ¥ + filen du brukte. Filen du henter blir plassert nedenfor markørlinjen. + + 3. For Ã¥ sjekke at filen ble hentet, gÃ¥ tilbake og se at det er to kopier av + leksjon 5.3, originalen og denne versjonen. + +MERK: Du kan ogsÃ¥ lese utdataene av en ekstern kommando. For eksempel, :r !ls + leser utdataene av ls-kommandoen og legger dem nedenfor markøren. + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 5 + + + 1. :!kommando utfører en ekstern kommandio. + + Noen nyttige eksempler er: + (MS-DOS) (Unix) + :!dir :!ls - List filene i katalogen. + :!del FILNAVN :!rm FILNAVN - Slett filen FILNAVN. + + 2. :w FILNAVN skriver den nÃ¥værende Vim-filen disken med navnet FILNAVN . + + 3. v bevegelse :w FILNAVN lagrer de visuelt valgte linjene til filen + FILNAVN. + + 4. :r FILNAVN henter filen FILNAVN og legger den inn nedenfor markøren. + + 5. :r !dir leser utdataene fra «dir»-kommandoen og legger dem nedenfor + markørposisjonen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.1: «ÅPNE LINJE»-KOMMANDOEN + + + ** Skriv o for Ã¥ «åpne opp» for en ny linje etter markøren og gÃ¥ til + innsettingsmodus ** + + 1. Flytt markøren til linjen nedenfor merket --->. + + 2. Skriv o (liten o) for Ã¥ Ã¥pne opp en linje NEDENFOR markøren og gÃ¥ inn i + innsettingsmodus. + + 3. Skriv litt tekst og trykk for Ã¥ gÃ¥ ut av innsettingsmodusen. + +---> Etter at o er skrevet blir markøren plassert pÃ¥ den tomme linjen. + + 4. For Ã¥ Ã¥pne en ny linje OVER markøren, trykk rett og slett en stor O + istedenfor en liten o . Prøv dette pÃ¥ linjen nedenfor. + +---> Lag ny linje over denne ved Ã¥ trykke O mens markøren er pÃ¥ denne linjen. + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.2: «LEGG TIL»-KOMMANDOEN + + + ** Skriv a for Ã¥ legge til tekst ETTER markøren. ** + + 1. Flytt markøren til starten av linjen merket ---> nedenfor. + + 2. Trykk e til markøren er pÃ¥ slutten av «li». + + 3. Trykk a (liten a) for Ã¥ legge til tekst ETTER markøren. + + 4. Fullfør ordet sÃ¥nn som pÃ¥ linjen nedenfor. Trykk for Ã¥ gÃ¥ ut av + innsettingsmodusen. + + 5. Bruk e for Ã¥ gÃ¥ til det neste ufullstendige ordet og repeter steg 3 og + 4. + +---> Denne li lar deg øve pÃ¥ Ã¥ leg til tek pÃ¥ en linje. +---> Denne linjen lar deg øve pÃ¥ Ã¥ legge til tekst pÃ¥ en linje. + +Merk: a, i og A gÃ¥r alle til den samme innsettingsmodusen, den eneste + forskjellen er hvor tegnene blir satt inn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.3: EN ANNEN MÃ…TE Ã… ERSTATTE PÃ… + + + ** Skriv en stor R for Ã¥ erstatte mer enn ett tegn. ** + + 1. Flytt markøren til den første linjen nedenfor merket --->. Flytt markøren + til begynnelsen av den første «xxx»-en. + + 2. Trykk R og skriv inn tallet som stÃ¥r nedenfor pÃ¥ den andre linjen sÃ¥ + det erstatter xxx. + + 3. Trykk for Ã¥ gÃ¥ ut av erstatningsmodusen. Legg merke til at resten + av linjen forblir uforandret. + + 4. Repeter stegene for Ã¥ erstatte den gjenværende xxx. + +---> Ved Ã¥ legge 123 til xxx fÃ¥r vi xxx. +---> Ved Ã¥ legge 123 til 456 fÃ¥r vi 579. + +MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives + erstatter et eksisterende tegn. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.4: KOPIERE OG LIME INN TEKST + + + ** Bruk y-operatoren for Ã¥ kopiere tekst og p for Ã¥ lime den inn ** + + 1. GÃ¥ til linjen merket ---> nedenfor og plasser markøren etter «a)». + + 2. GÃ¥ inn i visuell modus med v og flytt markøren til like før «første». + + 3. Trykk y for Ã¥ kopiere (engelsk: «yank») den uthevede teksten. + + 4. Flytt markøren til slutten av den neste linjen: j$ + + 5. Trykk p for Ã¥ lime inn teksten. Trykk deretter: a andre . + + 6. Bruk visuell modus for Ã¥ velge « valget.», kopier det med y , gÃ¥ til + slutten av den neste linjen med j$ og legg inn teksten der med p . + +---> a) Dette er det første valget. + b) + +Merk: Du kan ogsÃ¥ bruke y som en operator; yw kopierer ett ord. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 6.5: SETT VALG + + + ** Sett et valg sÃ¥ søk eller erstatning ignorerer store/smÃ¥ bokstaver. ** + + 1. Let etter «ignore» ved Ã¥ skrive: /ignore + Repeter flere ganger ved Ã¥ trykke n . + + 2. Sett «ic»-valget (Ignore Case) ved Ã¥ skrive: :set ic + + 3. Søk etter «ignore» igjen ved Ã¥ trykke n . + Legg merke til at bÃ¥de «Ignore» og «IGNORE» blir funnet. + + 4. Sett «hlsearch»- og «incsearch»-valgene: :set hls is + + 5. Skriv søkekommandoen igjen og se hva som skjer: /ignore + + 6. For Ã¥ slÃ¥ av ignorering av store/smÃ¥ bokstaver, skriv: :set noic + +Merk: For Ã¥ fjerne uthevingen av treff, skriv: :nohlsearch +Merk: Hvis du vil ignorere store/smÃ¥ bokstaver for kun en søkekommando, bruk + \c i uttrykket: /ignore\c +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 6 + + 1. Trykk o for Ã¥ legge til en linje NEDENFOR markøren og gÃ¥ inn i + innsettingsmodus. + Trykk O for Ã¥ Ã¥pne en linje OVER markøren. + + 2. Skriv a for Ã¥ sette inn tekst ETTER markøren. + Skriv A for Ã¥ sette inn tekst etter slutten av linjen. + + 3. Kommandoen e gÃ¥r til slutten av et ord. + + 4. Operatoren y («yank») kopierer tekst, p («paste») limer den inn. + + 5. Ved Ã¥ trykke R gÃ¥r du inn i erstatningsmodus helt til trykkes. + + 6. Skriv «:set xxx» for Ã¥ sette valget «xxx». Noen valg er: + «ic» «ignorecase» ignorer store/smÃ¥ bokstaver under søk + «is» «incsearch» vis delvise treff for en søketekst + «hls» «hlsearch» uthev alle søketreff + + 7. Legg til «no» foran valget for Ã¥ slÃ¥ det av: :set noic + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.1: FÃ… HJELP + + + ** Bruk det innebygde hjelpesystemet. ** + + Vim har et omfattende innebygget hjelpesystem. For Ã¥ starte det, prøv en av + disse mÃ¥tene: + - Trykk Hjelp-tasten (hvis du har en) + - Trykk F1-tasten (hvis du har en) + - Skriv :help + + Les teksten i hjelpevinduet for Ã¥ finne ut hvordan hjelpen virker. + Skriv CTRL-W CTRL-W for Ã¥ hoppe fra et vindu til et annet + Skriv :q for Ã¥ lukke hjelpevinduet. + + Du kan fÃ¥ hjelp for omtrent alle temaer om Vim ved Ã¥ skrive et parameter til + «:help»-kommandoen. Prøv disse (ikke glem Ã¥ trykke ): + + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + + + ** SlÃ¥ pÃ¥ funksjoner i Vim ** + + Vim har mange flere funksjoner enn Vi, men flesteparten av dem er slÃ¥tt av + som standard. For Ã¥ begynne Ã¥ bruke flere funksjoner mÃ¥ du lage en + «vimrc»-fil. + + 1. Start redigeringen av «vimrc»-filen. Dette avhenger av systemet ditt: + :e ~/.vimrc for Unix + :e $VIM/_vimrc for MS Windows + + 2. Les inn eksempelfilen for «vimrc»: + :r $VIMRUNTIME/vimrc_example.vim + + 3. Lagre filen med: + :w + + Neste gang du starter Vim vil den bruke syntaks-utheving. Du kan legge til + alle dine foretrukne oppsett i denne «vimrc»-filen. + For mer informasjon, skriv :help vimrc-intro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Leksjon 7.3: FULLFØRING + + + ** Kommandolinjefullføring med CTRL-D og ** + + 1. Vær sikker pÃ¥ at Vim ikke er i Vi-kompatibel modus: :set nocp + + 2. Se hvilke filer som er i katalogen: :!ls eller :!dir + + 3. Skriv starten pÃ¥ en kommando: :e + + 4. Trykk CTRL-D og Vim vil vise en liste over kommandoer som starter med + «e». + + 5. Trykk og Vim vil fullføre kommandonavnet til «:edit». + + 6. Legg til et mellomrom og starten pÃ¥ et eksisterende filnavn: :edit FIL + + 7. Trykk . Vim vil fullføre navnet (hvis det er unikt). + +MERK: Fullføring fungerer for mange kommandoer. Prøv ved Ã¥ trykke CTRL-D og + . Det er spesielt nyttig for bruk sammen med :help . +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + OPPSUMMERING AV LEKSJON 7 + + + 1. Skriv :help eller trykk eller for Ã¥ Ã¥pne et hjelpevindu. + + 2. Skriv :help kommando for Ã¥ fÃ¥ hjelp om kommando . + + 3. Trykk CTRL-W CTRL-W for Ã¥ hoppe til et annet vindu. + + 4. Trykk :q for Ã¥ lukke hjelpevinduet. + + 5. Opprett et vimrc-oppstartsskript for Ã¥ lagre favorittvalgene dine. + + 6. NÃ¥r du skriver en «:»-kommando, trykk CTRL-D for Ã¥ se mulige + fullføringer. Trykk for Ã¥ bruke en fullføring. + + + + + + + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Her slutter innføringen i Vim. Den var ment som en rask oversikt over + editoren, akkurat nok til Ã¥ la deg sette i gang med enkel bruk. Den er pÃ¥ + langt nær komplett, da Vim har mange flere kommandoer. Les bruksanvisningen + ved Ã¥ skrive :help user-manual . + + For videre lesing og studier, kan denne boken anbefales: + «Vim - Vi Improved» av Steve Oualline + Utgiver: New Riders + Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for + nybegynnere. Inneholder mange eksempler og illustrasjoner. + Se http://iccf-holland.org/click5.html + + Denne boken er eldre og handler mer om Vi enn Vim, men anbefales ogsÃ¥: + «Learning the Vi Editor» av Linda Lamb + Utgiver: O'Reilly & Associates Inc. + Det er en god bok for Ã¥ fÃ¥ vite omtrent hva som helst om Vi. + Den sjette utgaven inneholder ogsÃ¥ informasjon om Vim. + + Denne innføringen er skrevet av Michael C. Pierce og Robert K. Ware, + Colorado School of Mines med idéer av Charles Smith, Colorado State + University. E-mail: bware@mines.colorado.edu . + + Modifisert for Vim av Bram Moolenaar. + Oversatt av Øyvind A. Holm. E-mail: vimtutor _AT_ sunbase.org + Id: tutor.no 406 2007-03-18 22:48:36Z sunny + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vim: set ts=8 : diff --git a/warsow/libjpeg.patch b/warsow/libjpeg.patch new file mode 100644 index 0000000..54803a0 --- /dev/null +++ b/warsow/libjpeg.patch @@ -0,0 +1,20 @@ +--- 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 new file mode 100644 index 0000000..84d6081 --- /dev/null +++ b/warsow/r_image.c.new @@ -0,0 +1,2967 @@ +/* +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 \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 ) ); +} -- cgit v1.2.3-24-g4f1b From 2e05b0f65a05ac902532b2b324e9d437054b644a Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 16:33:59 +0100 Subject: update Signed-off-by: Florian Pritz --- apache/PKGBUILD | 14 ++++++-------- apache/httpd | 44 ++++++++++++++++++-------------------------- murmur/PKGBUILD | 5 +++++ 3 files changed, 29 insertions(+), 34 deletions(-) diff --git a/apache/PKGBUILD b/apache/PKGBUILD index 9615c82..4142d78 100644 --- a/apache/PKGBUILD +++ b/apache/PKGBUILD @@ -18,10 +18,12 @@ backup=(etc/httpd/conf/httpd.conf depends=('openssl' 'zlib' 'apr-util' 'pcre') optdepends=('lynx: apachectl status') source=("http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2" - 'httpd.logrotate' 'httpd' 'arch.layout') + 'httpd.logrotate' + 'httpd' + 'arch.layout') md5sums=('a5226203aaf97e5b941c41a71c112704' 'f4d627c64024c1b7b95efb5ffbaa625e' - '3fb8b616e0b5f0118420edd26d8536bb' + '9e001fbb082a08113e7f4bc431085c11' '3d659d41276ba3bfcb20c231eb254e0c') build() { @@ -79,10 +81,6 @@ build() { # cleanup rm -rf ${pkgdir}/usr/share/httpd/manual rm -rf ${pkgdir}/etc/httpd/conf/original - rm -rf ${pkgdir}/srv/http - rmdir ${pkgdir}/usr/bin + rm -rf ${pkgdir}/srv/ + rm -rf ${pkgdir}/usr/bin } -md5sums=('a5226203aaf97e5b941c41a71c112704' - 'f4d627c64024c1b7b95efb5ffbaa625e' - 'ac992b7d9f6dfc71a75e56a8e33f6ca8' - '3d659d41276ba3bfcb20c231eb254e0c') diff --git a/apache/httpd b/apache/httpd index 46ead71..65ccb6e 100755 --- a/apache/httpd +++ b/apache/httpd @@ -5,59 +5,51 @@ daemon_name=httpd . /etc/rc.conf . /etc/rc.d/functions +APACHECTL=/usr/sbin/apachectl case "$1" in start) stat_busy "Starting Apache Web Server" - # RUN - /usr/sbin/apachectl start &>/dev/null - # - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else + [ ! -d /var/run/httpd ] && install -d /var/run/httpd + if $APACHECTL start &>/dev/null ; then add_daemon $daemon_name stat_done + else + stat_fail + exit 1 fi ;; stop) stat_busy "Stopping Apache Web Server" - # KILL - /usr/sbin/apachectl stop &>/dev/null - # - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else + if $APACHECTL stop &>/dev/null ; then rm_daemon $daemon_name stat_done + else + stat_fail + exit 1 fi ;; reload) - apachectl -t || exit 1 stat_busy "Reloading Apache Web Server" - /usr/sbin/apachectl graceful &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else + if $APACHECTL graceful &>/dev/null ; then add_daemon $daemon_name stat_done + else + stat_fail + exit 1 fi ;; restart) - apachectl -t || exit 1 stat_busy "Restarting Apache Web Server" - /usr/sbin/apachectl restart &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else + if $APACHECTL restart &>/dev/null ; then add_daemon $daemon_name stat_done + else + stat_fail + exit 1 fi ;; diff --git a/murmur/PKGBUILD b/murmur/PKGBUILD index a906c62..f9ce48a 100644 --- a/murmur/PKGBUILD +++ b/murmur/PKGBUILD @@ -55,3 +55,8 @@ md5sums=('94b59aef3233b91705fa8cfcdd04d3e1' '11c1cc875e8021739ec2087252cf0533' 'eddea4cdbd0bde4b960a67e16b5d5478' 'c56726cb267ead68f37f35c28e36e6fa') +md5sums=('94b59aef3233b91705fa8cfcdd04d3e1' + 'f13b927a1a18115199f8305c8aad330e' + '11c1cc875e8021739ec2087252cf0533' + 'eddea4cdbd0bde4b960a67e16b5d5478' + 'c56726cb267ead68f37f35c28e36e6fa') -- cgit v1.2.3-24-g4f1b From 669802590369b3f606079f0c5192752bd97f0497 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 20:41:23 +0100 Subject: update Signed-off-by: Florian Pritz --- apache/PKGBUILD | 2 +- awstats/PKGBUILD | 136 +++++++++++++++++++----------------------------- awstats/awstats.install | 11 +--- dovecot-sieve/PKGBUILD | 4 +- highlight/PKGBUILD | 4 +- 5 files changed, 60 insertions(+), 97 deletions(-) diff --git a/apache/PKGBUILD b/apache/PKGBUILD index 4142d78..deca78e 100644 --- a/apache/PKGBUILD +++ b/apache/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 58371 2009-11-07 12:22:43Z andrea $ +# $Id: PKGBUILD 67091 2010-02-03 01:02:51Z andrea $ # Maintainer: Andrea Scarpino # Contributor: Pierre Schmitz diff --git a/awstats/PKGBUILD b/awstats/PKGBUILD index 39d587f..a98377a 100644 --- a/awstats/PKGBUILD +++ b/awstats/PKGBUILD @@ -1,95 +1,65 @@ -# Committer: Piotr Beling +# Maintainer: Phillip Smith pkgname=awstats -pkgver=6.9 +pkgver=6.95 pkgrel=1 pkgdesc="tool that generates web, streaming, ftp and mail server statistics, graphically" -arch=(any) -license=(GPL) +arch=('any') +license='GPL' url="http://awstats.sourceforge.net/" depends=('perl') -source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz awstats) -install=awstats.install +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() { - local RPM_BUILD_ROOT=${startdir}/pkg - local _sysconfdir=etc - cd ${startdir}/src/awstats-${pkgver} - - #next lines comes from http://awstats.sourceforge.net/files/awstats.spec, with % -> $ and some other archlinux specyfic modyfications - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/tools - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/tools/webmin - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/tools/xslt - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes/src - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lib - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins/example - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/css - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/browser - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/clock - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/cpu - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/flags - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/mime - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/os - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/other - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/js - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_f - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_m - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_w - #mkdir -p $RPM_BUILD_ROOT/usr/share/awstats/lang - #mkdir -p $RPM_BUILD_ROOT/usr/share/awstats/man - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/docs - mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/docs/images - mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}/awstats - mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}/cron.hourly - mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}/httpd/conf/extra - mkdir -p $RPM_BUILD_ROOT/var/lib/awstats - - #Arch linux specyfic path: - install -m 644 tools/httpd_conf $RPM_BUILD_ROOT/${_sysconfdir}/httpd/conf/extra/httpd-awstats.conf - install -m 744 ../awstats $RPM_BUILD_ROOT/${_sysconfdir}/cron.hourly/awstats + 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 - install -m 755 tools/logresolvemerge.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/logresolvemerge.pl - install -m 755 tools/maillogconvert.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/maillogconvert.pl - install -m 755 tools/urlaliasbuilder.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/urlaliasbuilder.pl - install -m 755 tools/awstats_buildstaticpages.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_buildstaticpages.pl - install -m 755 tools/awstats_configure.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_configure.pl - install -m 755 tools/awstats_exportlib.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_exportlib.pl - install -m 755 tools/awstats_updateall.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_updateall.pl - install -m 755 tools/webmin/* $RPM_BUILD_ROOT/usr/local/awstats/tools/webmin - install -m 755 tools/xslt/* $RPM_BUILD_ROOT/usr/local/awstats/tools/xslt - install -m 755 wwwroot/classes/awgraphapplet.jar $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes/awgraphapplet.jar - install -m 755 wwwroot/classes/src/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes/src - install -m 755 wwwroot/cgi-bin/awstats.pl $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/awstats.pl - install -m 755 wwwroot/cgi-bin/awredir.pl $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/awredir.pl - install -m 755 wwwroot/cgi-bin/lib/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lib - install -m 755 wwwroot/cgi-bin/plugins/*.pm $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins - install -m 755 wwwroot/cgi-bin/plugins/example/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins/example - install -m 644 wwwroot/cgi-bin/awstats.model.conf $RPM_BUILD_ROOT/${_sysconfdir}/awstats/awstats.model.conf - install -m 444 wwwroot/css/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/css - install -m 444 wwwroot/icon/browser/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/browser - install -m 444 wwwroot/icon/clock/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/clock - install -m 444 wwwroot/icon/cpu/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/cpu - install -m 444 wwwroot/icon/flags/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/flags - install -m 444 wwwroot/icon/mime/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/mime - install -m 444 wwwroot/icon/os/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/os - install -m 444 wwwroot/icon/other/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/other - install -m 444 wwwroot/js/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/js - install -m 444 wwwroot/cgi-bin/lang/tooltips_f/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_f - install -m 444 wwwroot/cgi-bin/lang/tooltips_m/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_m - install -m 444 wwwroot/cgi-bin/lang/tooltips_w/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_w - install -m 444 wwwroot/cgi-bin/lang/awstats* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang - install -m 444 README.TXT $RPM_BUILD_ROOT/usr/local/awstats/README.TXT - #install -m 644 README.TXT $RPM_BUILD_ROOT/usr/share/awstats/man - install -m 444 docs/*.* $RPM_BUILD_ROOT/usr/local/awstats/docs - install -m 444 docs/images/* $RPM_BUILD_ROOT/usr/local/awstats/docs/images - - #echo "deny from all" > $RPM_BUILD_ROOT/.htaccess + echo "deny from all" > $pkgdir/.htaccess } -md5sums=('fc19dbb8449eccf3300efb30ca3376cb' - '3f81c7ec3a5cc64a669ff98303089b2b') +# vim:set ts=2 sw=2 et: diff --git a/awstats/awstats.install b/awstats/awstats.install index 76589ed..706e826 100644 --- a/awstats/awstats.install +++ b/awstats/awstats.install @@ -3,7 +3,7 @@ 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 to /etc/httpd/conf/httpd.conf echo Step 2 : Build/Update Statistics with awstats.pl echo Step 3 : Read Statistics } @@ -17,16 +17,9 @@ post_upgrade() { chown -R web-awstats:web-awstats /var/lib/awstats } -pre_remove() { - /bin/true -} - -post_remove() { - /bin/true -} - op=$1 shift $op $* + # vim: ts=2: ft=sh diff --git a/dovecot-sieve/PKGBUILD b/dovecot-sieve/PKGBUILD index 0beb6b1..617661d 100644 --- a/dovecot-sieve/PKGBUILD +++ b/dovecot-sieve/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Paul Ezvan pkgname=dovecot-sieve -pkgver=0.1.14 +pkgver=0.1.15 pkgrel=1 _dovecotvers=1.2 pkgdesc="Dovecot sieve plugin" @@ -9,7 +9,7 @@ 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=('01a92883fde76a5f985b0343e81b0c3d') +md5sums=('2246fbbcf304d3ec1df0db2d091fe05a') build() { diff --git a/highlight/PKGBUILD b/highlight/PKGBUILD index a288a5d..208785d 100644 --- a/highlight/PKGBUILD +++ b/highlight/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Jan Fader pkgname=highlight -pkgver=2.14 +pkgver=2.15 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" @@ -8,7 +8,7 @@ license=('GPL') arch=('i686' 'x86_64') install= source=(http://www.andre-simon.de/zip/$pkgname-$pkgver.tar.bz2) -md5sums=('1f29f0e9a9bf280e96912e1fa5706d0d') +md5sums=('56a6341a16bbf059e0182c21d3b8aa76') build() { cd "$startdir/src/$pkgname-$pkgver" -- cgit v1.2.3-24-g4f1b From 194af840fa8a77f1e763b2089a3014aa2d56fb1d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 20:44:17 +0100 Subject: update Signed-off-by: Florian Pritz --- amavisd-new/PKGBUILD | 47 +++++++++++++++++++ amavisd-new/amavisd | 77 +++++++++++++++++++++++++++++++ amavisd-new/amavisd-new.install | 35 ++++++++++++++ awstats/cron.awstats | 6 +++ docbook2odf/PKGBUILD | 41 ++++++++++++++++ perl-compress-zlib/PKGBUILD | 27 +++++++++++ perl-unix-syslog/PKGBUILD | 32 +++++++++++++ perl-unix-syslog/perl-unix-syslog.install | 19 ++++++++ 8 files changed, 284 insertions(+) create mode 100644 amavisd-new/PKGBUILD create mode 100644 amavisd-new/amavisd create mode 100644 amavisd-new/amavisd-new.install create mode 100644 awstats/cron.awstats create mode 100644 docbook2odf/PKGBUILD create mode 100644 perl-compress-zlib/PKGBUILD create mode 100644 perl-unix-syslog/PKGBUILD create mode 100644 perl-unix-syslog/perl-unix-syslog.install diff --git a/amavisd-new/PKGBUILD b/amavisd-new/PKGBUILD new file mode 100644 index 0000000..88f8c3d --- /dev/null +++ b/amavisd-new/PKGBUILD @@ -0,0 +1,47 @@ +# Contributor: Piotr Beling +# Based on amavisd-new by: +# Contributor: Wael Nasreddine +# Maintainer: Guillermo A. Amaral (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 new file mode 100644 index 0000000..3061535 --- /dev/null +++ b/amavisd-new/amavisd @@ -0,0 +1,77 @@ +#!/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 new file mode 100644 index 0000000..afa5b2e --- /dev/null +++ b/amavisd-new/amavisd-new.install @@ -0,0 +1,35 @@ +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/awstats/cron.awstats b/awstats/cron.awstats new file mode 100644 index 0000000..ccec1cf --- /dev/null +++ b/awstats/cron.awstats @@ -0,0 +1,6 @@ +#!/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/docbook2odf/PKGBUILD b/docbook2odf/PKGBUILD new file mode 100644 index 0000000..cdeff81 --- /dev/null +++ b/docbook2odf/PKGBUILD @@ -0,0 +1,41 @@ +# Contributor: Mathieu Clabaut +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/perl-compress-zlib/PKGBUILD b/perl-compress-zlib/PKGBUILD new file mode 100644 index 0000000..ed9d427 --- /dev/null +++ b/perl-compress-zlib/PKGBUILD @@ -0,0 +1,27 @@ +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-unix-syslog/PKGBUILD b/perl-unix-syslog/PKGBUILD new file mode 100644 index 0000000..b6be3de --- /dev/null +++ b/perl-unix-syslog/PKGBUILD @@ -0,0 +1,32 @@ +# Contributor: Piotr Beling +# Contributor: Wael Nasreddine +# Maintainer: Guillermo A. Amaral (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 new file mode 100644 index 0000000..641c385 --- /dev/null +++ b/perl-unix-syslog/perl-unix-syslog.install @@ -0,0 +1,19 @@ +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 $* -- cgit v1.2.3-24-g4f1b From 1ab94f90a7ece844c7449fef6a6b0eed6074d5b9 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 20:51:08 +0100 Subject: add dzlad Signed-off-by: Florian Pritz --- dzlad/PKGBUILD | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dzlad/PKGBUILD diff --git a/dzlad/PKGBUILD b/dzlad/PKGBUILD new file mode 100644 index 0000000..8e6404f --- /dev/null +++ b/dzlad/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: lolilolicon +# Contributor: lolilolicon + +pkgname=dzlad +pkgver=0.1.1 +pkgrel=2 +pkgdesc="Dzlad helps you do some AUR tasks" +arch=(any) +url="http://github.com/lolilolicon/dzlad" +license=('MIT') +depends=(ruby) +provides=(dzlad-git) +conflicts=(dzlad-git) +source=(http://cloud.github.com/downloads/lolilolicon/dzlad/$pkgname-$pkgver.tar.bz2) +md5sums=('a96650e52e087a83ad0653c37ad7c497') + +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/license/$pkgname/LICENSE" +} + +# vim:set ts=2 sw=2 et: -- cgit v1.2.3-24-g4f1b From 1cf1f411390e039ec6f01dd02eb296da790b5fc9 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 21:00:21 +0100 Subject: update Signed-off-by: Florian Pritz --- murmur/ChangeLog | 10 +++++++--- murmur/PKGBUILD | 12 ++++-------- murmur/murmur.rc.d | 4 ++++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/murmur/ChangeLog b/murmur/ChangeLog index 84fa086..7537836 100644 --- a/murmur/ChangeLog +++ b/murmur/ChangeLog @@ -1,8 +1,12 @@ -2010-01-9 Otto Allmendinger +2010-02-11 Otto Allmendinger + * 1.2.2-1: + bump to version 1.2.2 + +2010-01-09 Otto Allmendinger * 1.2.1-1: bump to version 1.2.1 -2009-12-18 Otto Allmendinger +2009-12-18 Otto Allmendinger * 1.2.0-8: included dbus configuration file, changed default dbus settings @@ -18,7 +22,7 @@ added some files to backup array added logrotate configuration file -2009-12-15 Otto Allmendinger +2009-12-15 Otto Allmendinger * 1.2.0-5 : simplified dependencies increased visibility of install messages diff --git a/murmur/PKGBUILD b/murmur/PKGBUILD index f9ce48a..295560a 100644 --- a/murmur/PKGBUILD +++ b/murmur/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Malte Rabenseifner pkgname=murmur -pkgver=1.2.1 +pkgver=1.2.2 pkgrel=1 pkgdesc="The voice chat application server for Mumble" arch=('i686' 'x86_64') @@ -50,13 +50,9 @@ build() { install -Dm644 README ${pkgdir}/usr/share/doc/murmur/README install -Dm644 man/murmurd.1 ${pkgdir}/usr/share/man/man1/murmurd.1 } -md5sums=('94b59aef3233b91705fa8cfcdd04d3e1' - '43203340a5210379228f2b0dffea6173' - '11c1cc875e8021739ec2087252cf0533' - 'eddea4cdbd0bde4b960a67e16b5d5478' - 'c56726cb267ead68f37f35c28e36e6fa') -md5sums=('94b59aef3233b91705fa8cfcdd04d3e1' - 'f13b927a1a18115199f8305c8aad330e' + +md5sums=('de30ee85170e183b66568b53b04c5727' + 'a577febe880ea104a2b00582b9cb0ddd' '11c1cc875e8021739ec2087252cf0533' 'eddea4cdbd0bde4b960a67e16b5d5478' 'c56726cb267ead68f37f35c28e36e6fa') diff --git a/murmur/murmur.rc.d b/murmur/murmur.rc.d index 08f3223..fac3fb3 100755 --- a/murmur/murmur.rc.d +++ b/murmur/murmur.rc.d @@ -1,8 +1,12 @@ #!/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) -- cgit v1.2.3-24-g4f1b From 813994129552c271701e8888c1fde872c08b066f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 21:01:16 +0100 Subject: remove leftover file Signed-off-by: Florian Pritz --- vim-nerdtree/download_script.php?src_id=9870 | Bin 38108 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 vim-nerdtree/download_script.php?src_id=9870 diff --git a/vim-nerdtree/download_script.php?src_id=9870 b/vim-nerdtree/download_script.php?src_id=9870 deleted file mode 100644 index c9b8401..0000000 Binary files a/vim-nerdtree/download_script.php?src_id=9870 and /dev/null differ -- cgit v1.2.3-24-g4f1b From 5c067a918c97b5e3f7a73f34cac2166c7b31ba91 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 7 Mar 2010 21:13:13 +0100 Subject: inxi: update Signed-off-by: Florian Pritz --- inxi/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inxi/PKGBUILD b/inxi/PKGBUILD index 00bcaa7..0bba47e 100644 --- a/inxi/PKGBUILD +++ b/inxi/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Florian Pritz pkgname=inxi -pkgver=1.4.6 +pkgver=1.4.8 pkgrel=1 pkgdesc="script to get system information" arch=('any') -- cgit v1.2.3-24-g4f1b From 66da8504777d8228691764cf4e939dc771fbd784 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 11 Mar 2010 22:22:49 +0100 Subject: add dstat Signed-off-by: Florian Pritz --- dstat/PKGBUILD | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 dstat/PKGBUILD diff --git a/dstat/PKGBUILD b/dstat/PKGBUILD new file mode 100644 index 0000000..fa3ecad --- /dev/null +++ b/dstat/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Schnouki +# Contributor: devon +pkgname=dstat +pkgver=0.7.1 +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=('a9287762c4b9dade5fd85124ccd003c8') +sha1sums=('41c958b4bd3222bbb6776fe1986278938800243d') + +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 +} -- cgit v1.2.3-24-g4f1b From 4b3da4f08d06e1000aa2ab7fdeec96941d9ffd16 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 16 Mar 2010 17:59:31 +0100 Subject: add screen with widescreen patch Signed-off-by: Florian Pritz --- screen/PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ screen/screen.install | 42 ++++++++++++++++++++++++++++++++++++++++ screen/screen.pam | 1 + screen/widescreen.patch | 13 +++++++++++++ 4 files changed, 107 insertions(+) create mode 100644 screen/PKGBUILD create mode 100644 screen/screen.install create mode 100644 screen/screen.pam create mode 100644 screen/widescreen.patch diff --git a/screen/PKGBUILD b/screen/PKGBUILD new file mode 100644 index 0000000..951723a --- /dev/null +++ b/screen/PKGBUILD @@ -0,0 +1,51 @@ +# $Id: PKGBUILD 40237 2009-05-29 00:52:11Z allan $ +# Maintainer: Allan McRae +# Committer: dorphell + +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 new file mode 100644 index 0000000..3ef5757 --- /dev/null +++ b/screen/screen.install @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000..07c42ad --- /dev/null +++ b/screen/screen.pam @@ -0,0 +1 @@ +auth required pam_unix.so diff --git a/screen/widescreen.patch b/screen/widescreen.patch new file mode 100644 index 0000000..ce969c3 --- /dev/null +++ b/screen/widescreen.patch @@ -0,0 +1,13 @@ +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 + -- cgit v1.2.3-24-g4f1b From 1dffac4f0cca7bc2f6bdc044e2805edff5be1c87 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 17 Mar 2010 15:36:43 +0100 Subject: remove apache Signed-off-by: Florian Pritz --- apache/PKGBUILD | 86 -------------------------------------------------- apache/arch.layout | 22 ------------- apache/httpd | 65 -------------------------------------- apache/httpd.logrotate | 5 --- 4 files changed, 178 deletions(-) delete mode 100644 apache/PKGBUILD delete mode 100644 apache/arch.layout delete mode 100755 apache/httpd delete mode 100644 apache/httpd.logrotate diff --git a/apache/PKGBUILD b/apache/PKGBUILD deleted file mode 100644 index deca78e..0000000 --- a/apache/PKGBUILD +++ /dev/null @@ -1,86 +0,0 @@ -# $Id: PKGBUILD 67091 2010-02-03 01:02:51Z andrea $ -# Maintainer: Andrea Scarpino -# Contributor: Pierre Schmitz - -pkgname=apache -pkgver=2.2.14 -pkgrel=2 -pkgdesc='A high performance Unix-based HTTP server' -arch=('i686' 'x86_64') -options=('!libtool') -url='http://www.apache.org/dist/httpd' -license=('APACHE') -backup=(etc/httpd/conf/httpd.conf - etc/httpd/conf/extra/httpd-{autoindex,dav,default,info,languages}.conf - etc/httpd/conf/extra/httpd-{manual,mpm,multilang-errordoc}.conf - etc/httpd/conf/extra/httpd-{ssl,userdir,vhosts}.conf - etc/logrotate.d/httpd) -depends=('openssl' 'zlib' 'apr-util' 'pcre') -optdepends=('lynx: apachectl status') -source=("http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2" - 'httpd.logrotate' - 'httpd' - 'arch.layout') -md5sums=('a5226203aaf97e5b941c41a71c112704' - 'f4d627c64024c1b7b95efb5ffbaa625e' - '9e001fbb082a08113e7f4bc431085c11' - '3d659d41276ba3bfcb20c231eb254e0c') - -build() { - cd ${srcdir}/httpd-${pkgver} - - # set default user - sed -e 's#User daemon#User http#' \ - -e 's#Group daemon#Group http#' \ - -i docs/conf/httpd.conf.in - - cat ${srcdir}/arch.layout >> config.layout - ./configure --enable-layout=Arch \ - --enable-modules=all \ - --enable-mods-shared=all \ - --enable-so \ - --enable-suexec \ - --with-suexec-caller=http \ - --with-suexec-docroot=/srv/http \ - --with-suexec-logfile=/var/log/httpd/suexec.log \ - --with-suexec-bin=/usr/sbin/suexec \ - --with-suexec-uidmin=99 --with-suexec-gidmin=99 \ - --enable-ldap --enable-authnz-ldap \ - --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \ - --enable-ssl --with-ssl \ - --enable-deflate --enable-cgid \ - --enable-proxy --enable-proxy-connect \ - --enable-proxy-http --enable-proxy-ftp \ - --enable-dbd \ - --with-apr=/usr/bin/apr-1-config \ - --with-apr-util=/usr/bin/apu-1-config \ - --with-pcre=/usr \ - --with-mpm=worker - - make || return 1 - - make DESTDIR=${pkgdir} install - install -D -m755 ${srcdir}/httpd ${pkgdir}/etc/rc.d/httpd - install -D -m644 ${srcdir}/httpd.logrotate ${pkgdir}/etc/logrotate.d/httpd - - # symlinks for /etc/httpd - ln -fs /var/log/httpd ${pkgdir}/etc/httpd/logs - ln -fs /var/run/httpd ${pkgdir}/etc/httpd/run - ln -fs /usr/lib/httpd/modules ${pkgdir}/etc/httpd/modules - ln -fs /usr/lib/httpd/build ${pkgdir}/etc/httpd/build - - # set sane defaults - sed -e 's#/usr/lib/httpd/modules/#modules/#' \ - -e 's|#\(Include conf/extra/httpd-multilang-errordoc.conf\)|\1|' \ - -e 's|#\(Include conf/extra/httpd-autoindex.conf\)|\1|' \ - -e 's|#\(Include conf/extra/httpd-languages.conf\)|\1|' \ - -e 's|#\(Include conf/extra/httpd-userdir.conf\)|\1|' \ - -e 's|#\(Include conf/extra/httpd-default.conf\)|\1|' \ - -i ${pkgdir}/etc/httpd/conf/httpd.conf - - # cleanup - rm -rf ${pkgdir}/usr/share/httpd/manual - rm -rf ${pkgdir}/etc/httpd/conf/original - rm -rf ${pkgdir}/srv/ - rm -rf ${pkgdir}/usr/bin -} diff --git a/apache/arch.layout b/apache/arch.layout deleted file mode 100644 index ab59db8..0000000 --- a/apache/arch.layout +++ /dev/null @@ -1,22 +0,0 @@ - - prefix: /etc/httpd - exec_prefix: /usr - bindir: /usr/bin - sbindir: /usr/sbin - libdir: /usr/lib/httpd - libexecdir: /usr/lib/httpd/modules - mandir: /usr/share/man - sysconfdir: /etc/httpd/conf - datadir: /usr/share/httpd - installbuilddir: /usr/lib/httpd/build - errordir: /usr/share/httpd/error - iconsdir: /usr/share/httpd/icons - htdocsdir: /srv/http - manualdir: /usr/share/httpd/manual - cgidir: /srv/http/cgi-bin - includedir: /usr/include/httpd - localstatedir: /var - runtimedir: /var/run/httpd - logfiledir: /var/log/httpd - proxycachedir: /var/cache/httpd - \ No newline at end of file diff --git a/apache/httpd b/apache/httpd deleted file mode 100755 index 65ccb6e..0000000 --- a/apache/httpd +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -daemon_name=httpd - -. /etc/rc.conf -. /etc/rc.d/functions - -APACHECTL=/usr/sbin/apachectl - -case "$1" in - start) - stat_busy "Starting Apache Web Server" - [ ! -d /var/run/httpd ] && install -d /var/run/httpd - if $APACHECTL start &>/dev/null ; then - add_daemon $daemon_name - stat_done - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Stopping Apache Web Server" - if $APACHECTL stop &>/dev/null ; then - rm_daemon $daemon_name - stat_done - else - stat_fail - exit 1 - fi - ;; - - reload) - stat_busy "Reloading Apache Web Server" - if $APACHECTL graceful &>/dev/null ; then - add_daemon $daemon_name - stat_done - else - stat_fail - exit 1 - fi - ;; - - restart) - stat_busy "Restarting Apache Web Server" - if $APACHECTL restart &>/dev/null ; then - add_daemon $daemon_name - stat_done - else - stat_fail - exit 1 - fi - ;; - - status) - stat_busy "Checking Apache Web Server status"; - ck_status $daemon_name - ;; - - *) - echo "usage: $0 {start|stop|reload|restart|status}" -esac - -exit 0 diff --git a/apache/httpd.logrotate b/apache/httpd.logrotate deleted file mode 100644 index 3f9298c..0000000 --- a/apache/httpd.logrotate +++ /dev/null @@ -1,5 +0,0 @@ -/var/log/httpd/*log { - postrotate - /bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true - endscript -} -- cgit v1.2.3-24-g4f1b From 0e572da1852de5d350bfa95885600ea21f7343a9 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 17 Mar 2010 15:35:18 +0100 Subject: add spampd Signed-off-by: Florian Pritz --- spampd/ChangeLog | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++ spampd/PKGBUILD | 36 ++++++++++ spampd/rc-config | 2 + spampd/rc-script | 46 +++++++++++++ spampd/spampd.install | 9 +++ 5 files changed, 277 insertions(+) create mode 100644 spampd/ChangeLog create mode 100644 spampd/PKGBUILD create mode 100644 spampd/rc-config create mode 100755 spampd/rc-script create mode 100644 spampd/spampd.install diff --git a/spampd/ChangeLog b/spampd/ChangeLog new file mode 100644 index 0000000..39a07e3 --- /dev/null +++ b/spampd/ChangeLog @@ -0,0 +1,184 @@ +SpamPD Change Log +----------------- + +2.30 (31-Oct-05) +- Another, hopefully final, fix for the Sys::Syslog issue of % signs in the log + string. Fixes possible DoS vulnerability. Thanks to Sven Mueller and Florian + Weimer for the solution. +- Added new options for adding X-Envelope-From and (optionally) X-Envelope-To + headers to messages before SA processing. The idea is to help SA process any + blacklist/whitelist to/from directives on the actual sender/recipients instead + of the possibly bogus envelope headers. Use --seh or --set-envelope-headers + to enable setting both headers, or use --sef or --set-envelope-from to enable + only X-Envelope-From. If added, spampd attempts to remove the X-Envelope-To + header after SA processing to preserve BCC recipient anonymity, but enabling + this header may still expose recipient information. See man page for more + details. This patch was originally submitted by Sven Mueller, was slightly + modified, and the --sef option was added. + +######## + +2.21 (23-Oct-05) (unreleased) +- fixed SA version check on alphanumeric version strings. Stops the annoying + Perl warning messages in the mail log. Thanks to Sven Mueller for the fix. + +######## + +2.20 (05-Oct-04) +- added support for SpamAssassin version 3. spampd should now support all + SA versions (tested with 2.6.3 and 3.0.0). +- removed --add-sc-header feature. It is now redundant with SA v2.6 ability + to (almost fully) customize headers, which v3 improves on. If anyone + really needs this feature, please let me know. +- added --nodetach option to prevent daemon process backgrounding. Patch + provided by Urban Petry. Can be useful for win32/cygwin. +- if --debug is specified, Net::Server log level is increased to 4 (debug) + to provide some more info in the log (can be useful for diagnosing + user/permission issues). Thanks to Urban Petry for idea. +- the message sender (From header) is now included in the log along with message + ID, recipient, and scoring info. Thanks to Roland Koeckel for the patch. + +######## + +2.13 (24-Nov-03) +- SA debug messages redirected from STDERR (warn) to syslog. Thanks to Roland + Koeckel for the suggestion. + +######## + +2.12 (15-Nov-03) +- fixed bug related to Sys::Syslog where we needed to escape % signs in + Message IDs. Thanks to Jeffrey W. Collyer and Yann Grossel for the bug reports. +- minor performance improvement in SpamPD::Client using buffered write to send + message data. Thanks to Sam Horrocks for the tip. +- fixed error condition when an error response ([4|5]xx) was returned after a + DATA command was sent. Thanks to Rodrigo Ventura for bug reports about this. + +######## + +2.11 (15-Jul-03): +- fix for occasional corrupted message headers which caused blank messages + (seemed to have only affected certain malformed spam mail). +- added --logsock option for syslog socket. Defaults to 'unix' except for + HP-UX and SunOS (Solaris) which I'm told prefer 'inet'. + +######## + +2.10 (01-Jul-03): +- added optional 'X-Spam-Checked-By: {hostname}' header, where {hostname} is, + theoretically, the name of the machine doing the message scanning. New + options --add-sc-header and --hostname=name control this behavior. + +######## + +2.00 (10-Jun-03): +- major rewrite of how mail is handled internally. spampd now takes no + responsibility for the mail at any point, instead acting as a transparent + proxy between the originating and the destination servers. That is, the + servers speak to each other through spampd so final mail delivery + occurs only when the destination server acknowledges receipt of the data. + Idea based on smtpprox by Bennett Todd (http://bent.latency.net/smtpprox/). + Unfortunately this breaks the ability to redirect the mail based on spam + score, since scoring happens after all recipients have been specified and + accepted. But, it is much cleaner and safer than the previous method. + +- new architecture doesn't store the mail data in memory any more. Message + is still written to memory before scanning by SpamAssassin, but messages + larger than the --maxsize to be scanned won't eat up a bunch of memory. + From smtpprox documentation by Bennet Todd: + "it [spampd] stores the body of the message in an unlinked file + under /tmp, which should be a tmpfs; this prevents the allocation + overhead associated with large strings (often 2-3x) and ensures that + space will be returned to the OS as soon as it's not needed." + +- as a bonus feature, LMTP is now supported by virtue of spampd's transparency. + +- added a timeout check around the socket operations as suggested in the + Net::Server docs. Added new parameter to control this: --childtimeout=n + where n is number of seconds. + +- added a timeout check around the message processing (spam checking) routines + to guard against a SpamAssassin hang. Added new parameter to control + this: --satimeout=n where n is number of seconds. If a timeout (or error) + occurs while processing, the mail is still passed on unless the new --dose + (die-on-sa-errors) paramater is given. + +- added --children=n parameter to specify how many child + servers to spawn and maintain. Default is 5 children (plus + one parent). + +- now uses Net::Server::PreForkSimple instead of PreFork. (Tried utilizing the + advanced children pool features of PreFork but either couldn't figure it out + or they're kinda broken. If anyone has experience here, please let me know.) + +- improved logging including the Message-ID, recipients, 100ths precision + on spam score, processing time, and file size. Logging format now better + resembles that of spamd (which hopefully means spamd log analysis tools can be + made to work with spampd easily). + +- removed dependencies on Net::SMTP, Net::SMTP::Server::Client, and Error + modules. + +- host/port and relay host/port can both be specified as xx.xx.xx.xx:nn in + the --host and --relayhost parameters, or as individual parameters (--host, + --port, --relayhost, --relayport). + +# The next 3 items are ideas/patches by +# Kurt Andersen, +# Agilent Technologies Postmaster +# Global Messaging Team, Agilent Technologies + +- added optional support for Time::HiRes for more accurate processing time + reporting in the log (automatically loaded if Time::HiRes is available). + +- added optional logging of which SA rules matched a message. New option is + --log-rules-hit or --rh for short. + +- Added auto HPUX OS detection for syslog loggging + "(for some reason HPUX chokes on using the 'unix' socket type)." + +# Thanks Kurt! + +- added much more verbose spampd logging when using the --debug option. + +- 3 parameters are now deprecated but accepted for backwards compatability: + --dead-letters, --heloname, and --stop-at-threshold + +- added shorthand choice for some options: + --aw for --auto-whitelist; --L for --local-only; --a for --tagall + --u for --user; --g for --group; --p for --pid + --d for --debug; --h for --help; + +- documentation updates + +- licensing change due to use of Bennet Todd's code (to GNU GPL from Perl + Artistic). + +######## + +1.0.2 (13-Apr-03): +- added 'local-only' parameter to pass on to SA which turns off all + network-based tests (DNS, Razor, etc). + +######## + +1.0.1 (3-Feb-03): +- fixed minor but substantial bug preventing child processes + from exiting properly since the counter wasn't being incremented (d'oh!). + Thanks to Mark Blackman for pointing this out. + +- fixed typo in pod docs (Thx to James Sizemore for pointing out) + +######## + +Changes to assassind (1.0.0 initial release of spampd - May 2002): +A different message rewriting method (using + Mail::SpamAssassin::NoMailAudit instead of Dave Carrigan's + custom headers and Mail::Audit); +Adding more options for message handling, network/protocol options, + some options to pass on to SpamAssassin (such as whitelist usage); +More orientation to being used as a content filter for the + Postfix MTA, mostly by changing some default values; +Documentation changes; + +## EOF ## \ No newline at end of file diff --git a/spampd/PKGBUILD b/spampd/PKGBUILD new file mode 100644 index 0000000..7e9ee9e --- /dev/null +++ b/spampd/PKGBUILD @@ -0,0 +1,36 @@ +# Contributor: Florian "Bluewind" Pritz +pkgname=spampd +pkgver=2.30 +pkgrel=1 +pkgdesc="Spamassassin Proxy Daemon" +arch=('any') +url="http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm" +license=('GPL') +groups=() +depends=('perl' 'perl-net-server') +makedepends=() +provides=() +conflicts=() +replaces=() +backup=(etc/conf.d/spampd) +options=() +install=spampd.install +source=("http://www.worlddesign.com/Content/rd/mta/$pkgname/$pkgname-$pkgver.tar.gz" + rc-script rc-config) +noextract=() +md5sums=('742c6f2cb75db54e59d044a8ee40445f' + '769f8a73765a0e7d235c9909aeb7ede9' + '637c2d93f76ba90d217e2418af64c9ec') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + make + install -Dm755 spampd "$pkgdir/usr/bin/spampd" + install -Dm755 "$srcdir/rc-script" "$pkgdir/etc/rc.d/spampd" + install -Dm644 "$srcdir/rc-config" "$pkgdir/etc/conf.d/spampd" + install -Dm644 spampd.8.gz "$pkgdir/usr/share/man/man8/spampd.8.gz" + install -m644 changelog.txt "$startdir/ChangeLog" +} + +# vim:set ts=2 sw=2 et: diff --git a/spampd/rc-config b/spampd/rc-config new file mode 100644 index 0000000..61d9b57 --- /dev/null +++ b/spampd/rc-config @@ -0,0 +1,2 @@ +# for information see manpage or spampd --help +ARGS="--port=10025 --relayhost=127.0.0.1:10026 --tagall --rh --user spampd" diff --git a/spampd/rc-script b/spampd/rc-script new file mode 100755 index 0000000..364e064 --- /dev/null +++ b/spampd/rc-script @@ -0,0 +1,46 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/spampd + +PID=$(cat /var/run/spampd.pid) + +start() { + stat_busy "Starting Spampd" + /usr/bin/spampd $ARGS + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon spampd + stat_done + fi +} + +stop() { + stat_busy "Stopping Spampd" + kill $PID + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon postfix + stat_done + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + # calling 'stop' and 'start' without the $0 fails... + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/spampd/spampd.install b/spampd/spampd.install new file mode 100644 index 0000000..135f373 --- /dev/null +++ b/spampd/spampd.install @@ -0,0 +1,9 @@ +post_install() { + useradd -r spampd +} + +post_remove() { + userdel spampd +} + +# vim:set ts=2 sw=2 et: -- cgit v1.2.3-24-g4f1b From c6231092427aacb1f3b5eeb592f368a5ab9ec185 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 17 Mar 2010 15:38:22 +0100 Subject: spampd: clean up PKGBUILD Signed-off-by: Florian Pritz --- spampd/PKGBUILD | 7 ------- 1 file changed, 7 deletions(-) diff --git a/spampd/PKGBUILD b/spampd/PKGBUILD index 7e9ee9e..53eacd9 100644 --- a/spampd/PKGBUILD +++ b/spampd/PKGBUILD @@ -6,18 +6,11 @@ pkgdesc="Spamassassin Proxy Daemon" arch=('any') url="http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm" license=('GPL') -groups=() depends=('perl' 'perl-net-server') -makedepends=() -provides=() -conflicts=() -replaces=() backup=(etc/conf.d/spampd) -options=() install=spampd.install source=("http://www.worlddesign.com/Content/rd/mta/$pkgname/$pkgname-$pkgver.tar.gz" rc-script rc-config) -noextract=() md5sums=('742c6f2cb75db54e59d044a8ee40445f' '769f8a73765a0e7d235c9909aeb7ede9' '637c2d93f76ba90d217e2418af64c9ec') -- cgit v1.2.3-24-g4f1b From 13a4f328ac7ceccedcadfca574e22098cf35e2df Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 17 Mar 2010 20:23:20 +0100 Subject: spampd: add dependency Signed-off-by: Florian Pritz --- spampd/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spampd/PKGBUILD b/spampd/PKGBUILD index 53eacd9..f9c7abd 100644 --- a/spampd/PKGBUILD +++ b/spampd/PKGBUILD @@ -1,12 +1,12 @@ # Contributor: Florian "Bluewind" Pritz pkgname=spampd pkgver=2.30 -pkgrel=1 +pkgrel=2 pkgdesc="Spamassassin Proxy Daemon" arch=('any') url="http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm" license=('GPL') -depends=('perl' 'perl-net-server') +depends=('perl' 'perl-net-server' 'spamassassin') backup=(etc/conf.d/spampd) install=spampd.install source=("http://www.worlddesign.com/Content/rd/mta/$pkgname/$pkgname-$pkgver.tar.gz" -- cgit v1.2.3-24-g4f1b From 5c97e1755c054a83b158961bf92c9a5df34eb344 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 20 Mar 2010 01:14:27 +0100 Subject: update Signed-off-by: Florian Pritz --- celt/PKGBUILD | 12 ++++++------ celt/mumble11x.desktop | 11 +++++++++++ firefox-nightly/PKGBUILD | 2 +- gadmin-samba/PKGBUILD | 6 +++--- lsb-release/PKGBUILD | 30 +++++++++++++----------------- lsb-release/lsb-release.install | 7 +++++++ lsb-release/mumble11x.desktop | 11 +++++++++++ mumble/PKGBUILD | 15 ++++++++------- mumble/mumble.install | 37 +++---------------------------------- mumble/mumble11x.desktop | 2 +- 10 files changed, 64 insertions(+), 69 deletions(-) create mode 100644 celt/mumble11x.desktop create mode 100644 lsb-release/lsb-release.install create mode 100644 lsb-release/mumble11x.desktop diff --git a/celt/PKGBUILD b/celt/PKGBUILD index b003294..456bd46 100644 --- a/celt/PKGBUILD +++ b/celt/PKGBUILD @@ -1,9 +1,9 @@ -# Contributor: Lauri Niskanen +# Maintainer: Lauri Niskanen # Contributor: Ray Rashif pkgname=celt -pkgver=0.7.0 -pkgrel=2 +pkgver=0.7.1 +pkgrel=1 pkgdesc="Low-latency audio communication codec" arch=(i686 x86_64) url="http://www.celt-codec.org" @@ -11,7 +11,7 @@ license=('BSD') depends=('libogg') options=('!libtool') source=(http://downloads.us.xiph.org/releases/$pkgname/$pkgname-$pkgver.tar.gz) -md5sums=('0bb72abec367f4ef12551f79dda11b23') +md5sums=('c7f6b8346e132b1a48dae0eff77ea9f0') build() { cd "$srcdir/$pkgname-$pkgver" @@ -20,8 +20,8 @@ build() { make || return 1 make DESTDIR="$pkgdir" install - ln -s $pkgdir/usr/lib/libcelt.so.0.0.0 $pkgdir/usr/lib/libcelt.so.0.7 - ln -s $pkgdir/usr/lib/libcelt.so.0.0.0 $pkgdir/usr/lib/libcelt.so.0.7.0 + 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 new file mode 100644 index 0000000..5dba0d0 --- /dev/null +++ b/celt/mumble11x.desktop @@ -0,0 +1,11 @@ +[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/firefox-nightly/PKGBUILD b/firefox-nightly/PKGBUILD index 009bc84..0a7dd7b 100644 --- a/firefox-nightly/PKGBUILD +++ b/firefox-nightly/PKGBUILD @@ -7,7 +7,7 @@ license=('MPL' 'GPL' 'LGPL') pkgname=firefox-nightly pkgdesc='Standalone web browser from mozilla.org, nightly build.' url='http://www.mozilla.org/projects/firefox' -pkgver=3.7a2pre +pkgver=3.7a4pre pkgrel=$(date +%Y_%m_%d_%T) source=( 'firefox-nightly.desktop' 'firefox-nightly-safe.desktop' ) diff --git a/gadmin-samba/PKGBUILD b/gadmin-samba/PKGBUILD index 7f19861..87b93ad 100644 --- a/gadmin-samba/PKGBUILD +++ b/gadmin-samba/PKGBUILD @@ -3,7 +3,7 @@ # Contributor: Marcin Kaczorek pkgname=gadmin-samba -pkgver=0.2.8 +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" @@ -25,7 +25,7 @@ build() { install -D -m644 desktop/${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop } -md5sums=('28b92f17f69ca589bd3a2b6674f428b6' +md5sums=('9902f6aff533367e5f62caa9fc383d9b' '23582cbe1716d3683b96987547fa7724') -sha1sums=('b6d4a5e958210ffe2c4e9f6d473a6854ab5eef14' +sha1sums=('0c4f1c2f6ca0dd71579d661c07ef3abaafc9dc76' 'a2c7b7d0e5d8080a8adb11d41466253cbc63be43') diff --git a/lsb-release/PKGBUILD b/lsb-release/PKGBUILD index f754db2..825ea57 100644 --- a/lsb-release/PKGBUILD +++ b/lsb-release/PKGBUILD @@ -1,29 +1,25 @@ -# This is an example PKGBUILD file. Use this as a start to creating your own, -# and remove these comments. For more information, see 'man PKGBUILD'. -# NOTE: Please fill out the license field for your package! If it is unknown, -# then please put 'unknown'. - +# Maintainer: Malte Rabenseifner # Contributor: John Gerritse + pkgname=lsb-release pkgver=1.4 -pkgrel=7 +pkgrel=8 pkgdesc="LSB version query program." -arch=(i686 x86_64) +arch=('i686' 'x86_64') url="http://www.linuxbase.org/" license=('GPL2') -groups= -provides= -depends=('bash') -makedepends=('perl') +install=lsb-release.install source=(http://downloads.sourceforge.net/lsb/$pkgname-$pkgver.tar.gz) md5sums=('30537ef5a01e0ca94b7b8eb6a36bb1e4') build() { - cd "$startdir/src/$pkgname-$pkgver" - mkdir $startdir/pkg/etc/ - echo DISTRIB_ID="arch" > "$startdir/pkg/etc/lsb-release" + cd "$srcdir/$pkgname-$pkgver" + make || return 1 - # make DESTDIR="$startdir/pkg" install - doesn't work, doeing it manually - install -D -m 644 lsb_release.1.gz $startdir/pkg/usr/share/man/man1/lsb_release.1.gz - install -D -m 755 lsb_release $startdir/pkg/usr/bin/lsb_release + + 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 new file mode 100644 index 0000000..a5ed0bd --- /dev/null +++ b/lsb-release/lsb-release.install @@ -0,0 +1,7 @@ +post_install() { + 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 new file mode 100644 index 0000000..5dba0d0 --- /dev/null +++ b/lsb-release/mumble11x.desktop @@ -0,0 +1,11 @@ +[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/mumble/PKGBUILD b/mumble/PKGBUILD index 5c669ac..8798ded 100644 --- a/mumble/PKGBUILD +++ b/mumble/PKGBUILD @@ -6,21 +6,22 @@ # to the depends and delete "no-g15" in the configure line below pkgname=mumble -pkgver=1.2.0 -pkgrel=1 +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') +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=('25872328c8bbc8282ad7ebdeacc0e8b6' - 'b85a15a46a8d0e9a28e87ff6678bb36a') + mumble11x.desktop ) +md5sums=('de30ee85170e183b66568b53b04c5727' + '70dcaa8ad2ecf68c6ba52ea03d112bcd') build() { cd $srcdir/$pkgname-$pkgver diff --git a/mumble/mumble.install b/mumble/mumble.install index 7c28ef5..8eea713 100644 --- a/mumble/mumble.install +++ b/mumble/mumble.install @@ -1,42 +1,11 @@ -# arg 1: the new package version -pre_install() { - /bin/true -} - post_install() { - echo ' -> Mumble will generate an anonymous usage report' - echo ' -> 10 minutes after launch. You can deactivate this' - echo ' -> feature: Menu "Configure" > Settings > User' - echo ' -> Interface > "Expert Config" > Network > "Submit' - echo ' -> anonymous statistics"' - echo '' -} - -# arg 1: the new package version -# arg 2: the old package version -pre_upgrade() { - /bin/true +gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor } post_upgrade() { - echo ' -> Mumble will generate an anonymous usage report' - echo ' -> 10 minutes after launch. You can deactivate this' - echo ' -> feature: Menu "Configure" > Settings > User' - echo ' -> Interface > "Expert Config" > Network > "Submit' - echo ' -> anonymous statistics"' - echo '' +post_install } -# arg 1: the old package version -pre_remove() { - /bin/true -} - -# arg 1: the old package version post_remove() { - /bin/true +post_install } - -op=$1 -shift -$op $* diff --git a/mumble/mumble11x.desktop b/mumble/mumble11x.desktop index 1305f7c..5dba0d0 100644 --- a/mumble/mumble11x.desktop +++ b/mumble/mumble11x.desktop @@ -8,4 +8,4 @@ Terminal=false Type=Application StartupNotify=false Categories=Network;Chat;Qt; -Version=1.0 +Version=1.2.1 -- cgit v1.2.3-24-g4f1b From 1e4c494a66ff91f1c8e75709791a28394a0b865a Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 20 Mar 2010 01:14:54 +0100 Subject: add swaks Signed-off-by: Florian Pritz --- swaks/PKGBUILD | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 swaks/PKGBUILD diff --git a/swaks/PKGBUILD b/swaks/PKGBUILD new file mode 100644 index 0000000..f61f3f9 --- /dev/null +++ b/swaks/PKGBUILD @@ -0,0 +1,16 @@ +# Contributor: Testuser_01 +pkgname=swaks +pkgver=20061116.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/#swaks" +license=('GPL') +depends=('perl-net-dns') +provides=('swaks') +source=("http://jetmore.org/john/code/$pkgname") +md5sums=('0be5dfe89ec415f0296680d61b3e4849') + +build() { + install -m755 -D $pkgname "$pkgdir/usr/bin/$pkgname" || return 1 +} -- cgit v1.2.3-24-g4f1b From 952f23288a0ba083f70b7d8ee5c580b3266202be Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 5 Apr 2010 12:19:47 +0200 Subject: update Signed-off-by: Florian Pritz --- blazeblogger-git/PKGBUILD | 2 +- highlight/PKGBUILD | 4 ++-- highlight/highlight-2.15-1-x86_64.pkg.tar.xz | Bin 0 -> 379400 bytes highlight/highlight-2.16-1-x86_64.pkg.tar.xz | Bin 0 -> 393856 bytes imagemagick-nox/PKGBUILD | 4 ++-- tcc-git/PKGBUILD | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 highlight/highlight-2.15-1-x86_64.pkg.tar.xz create mode 100644 highlight/highlight-2.16-1-x86_64.pkg.tar.xz diff --git a/blazeblogger-git/PKGBUILD b/blazeblogger-git/PKGBUILD index c7d0b0a..62a9034 100644 --- a/blazeblogger-git/PKGBUILD +++ b/blazeblogger-git/PKGBUILD @@ -1,7 +1,7 @@ # Contributor: Florian Pritz # Contributor: Abakus pkgname=blazeblogger-git -pkgver=20091119 +pkgver=20100328 pkgrel=1 pkgdesc="is a simple-to-use but capable CMS for the command line" arch=('any') diff --git a/highlight/PKGBUILD b/highlight/PKGBUILD index 208785d..332fe2c 100644 --- a/highlight/PKGBUILD +++ b/highlight/PKGBUILD @@ -1,6 +1,6 @@ # Contributor: Jan Fader pkgname=highlight -pkgver=2.15 +pkgver=2.16 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" @@ -8,7 +8,7 @@ license=('GPL') arch=('i686' 'x86_64') install= source=(http://www.andre-simon.de/zip/$pkgname-$pkgver.tar.bz2) -md5sums=('56a6341a16bbf059e0182c21d3b8aa76') +md5sums=('08f1429a6db258ab1a7eecbb4e0d44b2') build() { cd "$startdir/src/$pkgname-$pkgver" diff --git a/highlight/highlight-2.15-1-x86_64.pkg.tar.xz b/highlight/highlight-2.15-1-x86_64.pkg.tar.xz new file mode 100644 index 0000000..7101fe7 Binary files /dev/null and b/highlight/highlight-2.15-1-x86_64.pkg.tar.xz differ diff --git a/highlight/highlight-2.16-1-x86_64.pkg.tar.xz b/highlight/highlight-2.16-1-x86_64.pkg.tar.xz new file mode 100644 index 0000000..4c0ab42 Binary files /dev/null and b/highlight/highlight-2.16-1-x86_64.pkg.tar.xz differ diff --git a/imagemagick-nox/PKGBUILD b/imagemagick-nox/PKGBUILD index 600594a..b6aecb0 100644 --- a/imagemagick-nox/PKGBUILD +++ b/imagemagick-nox/PKGBUILD @@ -6,7 +6,7 @@ # Just uninstalling ImageMagick before build fails as it is used during the build processs pkgname=imagemagick-nox -pkgver=6.5.9.1 +pkgver=6.6.0.9 pkgrel=1 pkgdesc="An image viewing/manipulation program, without X dependencies" arch=('i686' 'x86_64') @@ -48,7 +48,7 @@ build() { rm -f ${pkgdir}/usr/lib/*.la || return 1 } -md5sums=('045089aa726b5e709097c5544f181d55' +md5sums=('c04030c3d4649bee4d6a891a16e031a3' '069980fc2590c02aed86420996259302' '7f5851c4450b73d52df55c7e806cc316' 'ff9974decbfe9846f8e347239d87e4eb') diff --git a/tcc-git/PKGBUILD b/tcc-git/PKGBUILD index a062c1e..7597ce4 100644 --- a/tcc-git/PKGBUILD +++ b/tcc-git/PKGBUILD @@ -1,5 +1,5 @@ pkgname=tcc-git -pkgver=20091226 +pkgver=20100328 pkgrel=1 pkgdesc="Tiny C Compiler - small, simple, and fast single-pass C compiler" arch=('i686' 'x86_64') -- cgit v1.2.3-24-g4f1b From 238edd25e3c92032fee54596dba289d92055089c Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 5 Apr 2010 12:21:17 +0200 Subject: remove .xz files Signed-off-by: Florian Pritz --- .gitignore | 1 + highlight/highlight-2.15-1-x86_64.pkg.tar.xz | Bin 379400 -> 0 bytes highlight/highlight-2.16-1-x86_64.pkg.tar.xz | Bin 393856 -> 0 bytes 3 files changed, 1 insertion(+) delete mode 100644 highlight/highlight-2.15-1-x86_64.pkg.tar.xz delete mode 100644 highlight/highlight-2.16-1-x86_64.pkg.tar.xz diff --git a/.gitignore b/.gitignore index bf719dc..72cabac 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ *.gz *.tgz *.bz2 +*.xz *.zip diff --git a/highlight/highlight-2.15-1-x86_64.pkg.tar.xz b/highlight/highlight-2.15-1-x86_64.pkg.tar.xz deleted file mode 100644 index 7101fe7..0000000 Binary files a/highlight/highlight-2.15-1-x86_64.pkg.tar.xz and /dev/null differ diff --git a/highlight/highlight-2.16-1-x86_64.pkg.tar.xz b/highlight/highlight-2.16-1-x86_64.pkg.tar.xz deleted file mode 100644 index 4c0ab42..0000000 Binary files a/highlight/highlight-2.16-1-x86_64.pkg.tar.xz and /dev/null differ -- cgit v1.2.3-24-g4f1b From 5345f3d0234956f594c44a4e7ce81be042fab7ca Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 5 Apr 2010 12:21:55 +0200 Subject: update Signed-off-by: Florian Pritz --- mumble-git/PKGBUILD | 2 +- wireshark-cli/PKGBUILD | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mumble-git/PKGBUILD b/mumble-git/PKGBUILD index 134bfc3..890781f 100644 --- a/mumble-git/PKGBUILD +++ b/mumble-git/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: schlaefer pkgname=mumble-git -pkgver=20100225 +pkgver=20100401 pkgrel=1 pkgdesc="A voice chat application similar to TeamSpeak" arch=('i686' 'x86_64') diff --git a/wireshark-cli/PKGBUILD b/wireshark-cli/PKGBUILD index 6946fb4..22b26ad 100644 --- a/wireshark-cli/PKGBUILD +++ b/wireshark-cli/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: Florian "Bluewind" Pritz pkgname=wireshark-cli -pkgver=1.2.6 +pkgver=1.2.7 pkgrel=1 pkgdesc="A free network protocol analyzer for Unix/Linux and Windows - no GUI" arch=('i686' 'x86_64') @@ -26,8 +26,7 @@ build() { make all || return 1 make DESTDIR=${pkgdir} install || return 1 } - -md5sums=('7de7f59486c034b0cc30743494f14556' +md5sums=('19e358386f7a07d0d225895588b6da6d' 'cc87d7eb31f256df751b3371b1c426e9') -sha1sums=('62f5571e4786d3fa0cfc3d528f69a5c431e42d75' +sha1sums=('068e27540f56f4dec384422fb6258909b0426d6e' '7a743a42542fa59423870a0205e8ed7aa6bde70e') -- cgit v1.2.3-24-g4f1b From 9d1a5d07d1b35b7d75904802e04be6544265e413 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 23 Apr 2010 21:52:10 +0200 Subject: add dovecot-managesieve Signed-off-by: Florian Pritz --- dovecot-managesieve/PKGBUILD | 76 +++++++++++++++++++++++++ dovecot-managesieve/dovecot-managesieve.install | 26 +++++++++ dovecot-managesieve/dovecot.sh | 36 ++++++++++++ 3 files changed, 138 insertions(+) create mode 100644 dovecot-managesieve/PKGBUILD create mode 100644 dovecot-managesieve/dovecot-managesieve.install create mode 100755 dovecot-managesieve/dovecot.sh diff --git a/dovecot-managesieve/PKGBUILD b/dovecot-managesieve/PKGBUILD new file mode 100644 index 0000000..59671d7 --- /dev/null +++ b/dovecot-managesieve/PKGBUILD @@ -0,0 +1,76 @@ +# Contributor: Paul Ezvan +# Based on dovecot PKGBUILD + +pkgname=dovecot-managesieve +pkgver=1.2.11 +_managesievever=0.11.11 +_dovecotvers=1.2 +_sievever=0.1.15 +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) + +build() { + # configure and make dovecot source + cd $startdir/src/dovecot-$pkgver || return 1 + # patch with managesieve support + patch -p1 -i $startdir/src/dovecot-$pkgver-managesieve-${_managesievever}.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 + # build + make || return 1 + # install + make DESTDIR=$startdir/pkg install || return 1 + # 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 || return 1 + rmdir $startdir/pkg/usr/share || return 1 + # install the launch script + install -D -m755 $startdir/src/dovecot.sh $startdir/pkg/etc/rc.d/dovecot || 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 + + + # configure dovecot sieve source + cd $srcdir/dovecot-${_dovecotvers}-sieve-${_sievever} || return 1 + ./configure --prefix=/usr --with-dovecot=$srcdir/dovecot-$pkgver || return 1 + # build + make || return 1 + # install + make DESTDIR="$pkgdir" install || return 1 + + # configure dovecot managesieve plugin + cd $srcdir/dovecot-${_dovecotvers}-managesieve-${_managesievever} || return 1 + ./configure --prefix=/usr --with-dovecot=$srcdir/dovecot-$pkgver \ + --with-dovecot-sieve=$srcdir/dovecot-${_dovecotvers}-sieve-${_sievever} \ + --libexecdir=/usr/lib || return 1 + # build + make || return 1 + # install + make DESTDIR="$pkgdir" install || return 1 +} +md5sums=('d020d43eab4ded6fb379dadc570a9490' + '32ba8d47a3695f8514bd2c2bf7348f96' + 'bdac013fd57aa616ea4bdd9ac34557c6' + 'd773909c5da6ccab092818cf691237bd' + '2246fbbcf304d3ec1df0db2d091fe05a') diff --git a/dovecot-managesieve/dovecot-managesieve.install b/dovecot-managesieve/dovecot-managesieve.install new file mode 100644 index 0000000..5175734 --- /dev/null +++ b/dovecot-managesieve/dovecot-managesieve.install @@ -0,0 +1,26 @@ +# 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 new file mode 100755 index 0000000..b7555fe --- /dev/null +++ b/dovecot-managesieve/dovecot.sh @@ -0,0 +1,36 @@ +#!/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 -- cgit v1.2.3-24-g4f1b From ac57415603ea60e9af632e70827dffa22cfff584 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 9 May 2010 17:54:10 +0200 Subject: tipp10: add patch Signed-off-by: Florian Pritz --- tipp10/PKGBUILD | 15 ++++---- tipp10/gcc-4.5.patch | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 6 deletions(-) create mode 100644 tipp10/gcc-4.5.patch diff --git a/tipp10/PKGBUILD b/tipp10/PKGBUILD index d37bd47..04ff601 100644 --- a/tipp10/PKGBUILD +++ b/tipp10/PKGBUILD @@ -3,14 +3,14 @@ pkgname=tipp10 pkgver=2.0.3 -pkgrel=2 +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 \ +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() { @@ -18,6 +18,7 @@ build() { 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 @@ -28,8 +29,10 @@ build() { md5sums=('e0d6c26220396551386f91ce893e040c' 'ff788e726d357370df1e7c8b19d38fd4' 'ce67b64cb3a1d25119acd1a43804304d' + 'a9d388ddb17ae93f13acb915bc8eba57' 'bac29896ec992496f7e0aab992993004') -sha256sums=('ed18e5cb625463595ca4d84c9e4576d42af407c31a29a76e2bc7a8538288d35d' - '83c2574c3ba23b3344669bf15cbd618dfe8ddc3863bdfce1d70ba22200bd8ff0' - '02e5791a64b4881d0edd87e28d1f161aba228ac77b1d657814c105c2c4eba88f' - 'bf44edc1524b8dac07c0d501368411cc13e5c1a2a6ffb0d1b4d576ba1ad80fd5') +sha1sums=('c0f9f6dab87ed2cc0557bd0bc29a102f8f4483b7' + '42cc902010030dcea92dd64053523e24028b2dae' + '340aa263721b9fc1df74a1cc828c990061c7d625' + '3eb601ab7c1d68d8c64e949e7e4f8a83b06a518e' + 'faf8c7799c934eaca83a0e077cf9ba458334680b') diff --git a/tipp10/gcc-4.5.patch b/tipp10/gcc-4.5.patch new file mode 100644 index 0000000..dfff820 --- /dev/null +++ b/tipp10/gcc-4.5.patch @@ -0,0 +1,99 @@ +--- 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()); + } + + } -- cgit v1.2.3-24-g4f1b