diff -Nru vim-7.4a.012/Contents vim-7.4.273/Contents --- vim-7.4a.012/Contents 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/Contents 2014-04-29 18:04:09.000000000 +0000 @@ -9,10 +9,10 @@ messages, shows current file name in window title, on-line help, rectangular cut/paste, etc., etc., etc... - Version 7.4a. Also runs under UNIX, MSDOS and other systems. - vim74art.tgz contains the documentation and syntax files. - vim74abin.tgz contains the binaries. - vim74asrc.tgz contains the sources. + Version 7.4. Also runs under UNIX, MSDOS and other systems. + vim74rt.tgz contains the documentation and syntax files. + vim74bin.tgz contains the binaries. + vim74src.tgz contains the sources. Author: Bram Moolenaar et al. diff -Nru vim-7.4a.012/debian/changelog vim-7.4.273/debian/changelog --- vim-7.4a.012/debian/changelog 2013-07-18 03:27:28.000000000 +0000 +++ vim-7.4.273/debian/changelog 2014-06-02 00:10:38.000000000 +0000 @@ -1,8 +1,197 @@ -vim (2:7.4a.012-1~ubuntu12.04.1~ppa1) precise; urgency=low +vim (2:7.4.273-2ubuntu1~ubuntu12.04.1~ppa1) precise; urgency=medium * No-change backport to precise - -- Chris Johnston Wed, 17 Jul 2013 23:27:28 -0400 + -- Chris Johnston Sun, 01 Jun 2014 20:10:38 -0400 + +vim (2:7.4.273-2ubuntu1) utopic; urgency=medium + + * Merge with Debian unstable and drop debian/ubuntu-fix-arches.patch. + + -- Adam Conrad Fri, 02 May 2014 13:11:09 -0600 + +vim (2:7.4.273-2) unstable; urgency=medium + + * syntax/debcontrol.vim: + + Fix architecture orders to work with left-most regex matching. + + -- James McCoy Fri, 02 May 2014 00:17:48 -0400 + +vim (2:7.4.273-1ubuntu1) utopic; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + - debian/patches/debian/update-upstart-syntax.patch: + + Add setuid and setgid to syntax file. + - debian/control: Transition from lua5.1 to lua5.2. + - debian/rules: Ignore failures from flaky test86. + * debian/patches/debian/ubuntu-fix-arches.patch: Fix arch highlighting. + * debian/patches/debian/ubuntu-arches.patch: Dropped, merged upstream. + * debian/patches/debian/ubuntu-dists.patch: Dropped, merged upstream. + + -- Adam Conrad Thu, 01 May 2014 21:47:46 -0600 + +vim (2:7.4.273-1) unstable; urgency=medium + + * Merge upstream tag v7-4-273 + * syntax/debcontrol.vim: + + Correctly highlight any-x32 in Architecture field + + Add ppc64el architecture + * syntax/deb{changelog,sources}.vim: + + Add codenames for Ubuntu's development release (devel, utopic) + + -- James McCoy Thu, 01 May 2014 21:50:24 -0400 + +vim (2:7.4.253-1ubuntu1) utopic; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + - debian/patches/debian/update-upstart-syntax.patch: + + Add setuid and setgid to syntax file. + - debian/patches/debian/ubuntu-dists.patch: + + Add devel and utopic as valid distribution targets. + - debian/patches/debian/ubuntu-arches.patch: + + Support ppc64el as a valid architecture. + - debian/control: Transition from lua5.1 to lua5.2. + - debian/rules: Ignore failures from flaky test86. + * upstream/completion-crash.patch: Drop, merged upstream. + + -- Adam Conrad Mon, 21 Apr 2014 22:00:05 -0600 + +vim (2:7.4.253-1) unstable; urgency=medium + + * Merge upstream tag v7-4-253 + + 7.4.252: Clear blink timer after removing it to avoid GLib-CRITICAL + error. (Closes: #743668) + * rules: Explicitly disable SMACK on Linux, in favor of SELinux. + + -- James McCoy Mon, 07 Apr 2014 22:47:57 -0400 + +vim (2:7.4.225-1) unstable; urgency=medium + + * Merge upstream tag v7-4-225 + + Patches merged upstream: + - upstream/python-ftplugin-include.patch and + upstream/shadowdir-tests.diff + + netrw: Don't try to access the clipboard when support isn't enabled. + (Closes: #737530) + + 7.4.209: Escape a repeated command when storing it for redo. (Closes: + #739656) + + 7.4.222: Use RbConfig::CONFIG['rubyarchhdrdir'] to allow building Vim + against Ruby 2.x. (Closes: #739125) + + -- James McCoy Thu, 27 Mar 2014 22:13:31 -0400 + +vim (2:7.4.161-1) unstable; urgency=medium + + * Merge upstream tag v7-4-161 + + Fix loading of NetRW when editing a directory. (Closes: #732091) + * Update Ubuntu releases in Debian syntax files. + * Add more debian-ports architectures to debcontrol syntax file. (Closes: + #722313) + * ftplugin/debchangelog: Allow changing distribution from UNRELEASED. + (Closes: #734267) + * control: Bump Standards-Version to 3.9.5, no changes needed. + * Add shadowdir-tests.diff to fix building in a shadow build directory. + + -- James McCoy Sun, 02 Feb 2014 19:27:58 -0500 + +vim (2:7.4.052-1ubuntu3) trusty; urgency=medium + + * No-change rebuild for Tcl 8.6. + + -- Matthias Klose Thu, 02 Jan 2014 20:29:37 +0100 + +vim (2:7.4.052-1ubuntu2) trusty; urgency=low + + * upstream/completion-crash.patch: Fix crash with Insert mode completion. + + -- Adam Conrad Tue, 10 Dec 2013 15:32:41 -0700 + +vim (2:7.4.052-1ubuntu1) trusty; urgency=low + + * Merge with Debian unstable, remaining changes: + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + - debian/patches/debian/update-upstart-syntax.patch: + + Add setuid and setgid to syntax file. + * debian/patches/debian/ubuntu-dists.patch: + - Add devel and trusty as valid distribution targets. + * debian/patches/debian/ubuntu-arches.patch: + - Support arm64, ppc64el, and x32 as valid arches. + + -- Adam Conrad Fri, 18 Oct 2013 15:02:17 +0100 + +vim (2:7.4.052-1) unstable; urgency=low + + * Merge upstream tag v7-4-052 + - Remove upstream/python-ftplugin-keywordprg.patch, merged upstream + * debian/watch: Use the pasv option. + * debian/control: Version the ruby1.8{,-dev} Build-Conflicts now that the + Provides: have been dropped. + + -- James McCoy Wed, 09 Oct 2013 00:06:41 -0400 + +vim (2:7.4.027-1) unstable; urgency=low + + * Merge upstream tag v7-4-027 + + 7.4.003: Refresh a stale pointer in new regex engine to avoid + dereferencing a freed pointer. (Closes: #722081) + + 7.4.024: Read an undo file owned by the current user, even if that + differs from the owner of the edited file. (Closes: #721944) + + Use old regex engine for yamlBlockMappingKey highlighting to workaround + performance problem with new engine. (Closes: #719510) + + -- James McCoy Tue, 17 Sep 2013 20:29:24 -0400 + +vim (2:7.4.000-1ubuntu2) saucy; urgency=low + + * Use lua5.2 for the current lua transition in main (LP: #1196921) + * Ignore test86 for now, as it seems to do goofy things on powerpc. + + -- Adam Conrad Sun, 11 Aug 2013 13:11:28 -0600 + +vim (2:7.4.000-1ubuntu1) saucy; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + - debian/update-upstart-syntax.patch: + + Add setuid and setgid to syntax file. + * Drop ubuntu-multiarch.patch, no longer required. + + -- Adam Conrad Sun, 11 Aug 2013 12:23:25 -0600 + +vim (2:7.4.000-1) unstable; urgency=low + + * New upstream release. + * Upload to unstable. + * Stop providing /usr/share/vim/vimcurrent. It shouldn't be used by + anything, since it's Debian specific, and the Vim packaging hasn't used it + (other than documenting the location of debian.vim) for years. + * Override spelling-error-in-binary … tEH the. + + -- James McCoy Sat, 10 Aug 2013 21:24:02 -0400 + +vim (2:7.4b.004-1) experimental; urgency=low + + * Merge upstream tag v7-4b-004 + + 7.4a.044: Clear window from b_wininfo in win_free(). (Closes: #717529) + * debian/rules: Install Japanese translations of man pages. + * Update path in binaries-have-file-conflict lintian override. + * Use canonical URI for Vcs-*. + + -- James McCoy Fri, 02 Aug 2013 22:58:04 -0400 vim (2:7.4a.012-1) experimental; urgency=low @@ -44,6 +233,22 @@ -- James McCoy Sun, 26 May 2013 22:18:36 -0400 +vim (2:7.3.923-1ubuntu1) saucy; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + - debian/ubuntu-multiarch.patch: + + Fix builds with multiarch python and tcl. + - debian/update-upstart-syntax.patch: + + Add setuid and setgid to syntax file. + * Drop ubuntu-raring.patch and usr-share-upstart.patch, merged. + * Drop launchpad-integration delta, no longer used in Ubuntu. + + -- Adam Conrad Tue, 21 May 2013 12:43:50 -0600 + vim (2:7.3.923-1) unstable; urgency=low * Merge upstream tag v7-3-923 @@ -74,6 +279,28 @@ -- James McCoy Thu, 21 Feb 2013 22:13:43 -0500 +vim (2:7.3.547-7ubuntu1) saucy; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if + launchpad-integration is installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + - debian/ubuntu-raring.patch: + + Allow raring in deb* syntax hilighting. + - debian/ubuntu-multiarch.patch: + + Fix builds with multiarch python and tcl. + - debian/usr-share-upstart.patch: + + Set syntax to upstart for usr/share/upstart files. + - debian/update-upstart-syntax.patch: + + Add setuid and setgid to syntax file. + * Update ubuntu-raring.patch to recognize saucy as well. + + -- Adam Conrad Fri, 26 Apr 2013 04:23:33 -0600 + vim (2:7.3.547-7) unstable; urgency=low * Add vim-lesstif.preinst to handle transitioning /usr/share/doc/vim-lesstif @@ -82,12 +309,74 @@ -- James McCoy Sat, 09 Feb 2013 18:43:57 -0500 +vim (2:7.3.547-6ubuntu5) raring; urgency=low + + * Configure for the Tcl 8.5 multiarch installation. + + -- Matthias Klose Tue, 02 Apr 2013 10:57:32 +0200 + +vim (2:7.3.547-6ubuntu4) raring; urgency=low + + * New debian/usr-share-upstart patch to set syntax to upstart for + */usr/share/upstart/**/*.conf files. + * Rename Vcs-* to XS-Debian-Vcs-* in control. + + -- Loïc Minier Wed, 20 Feb 2013 15:21:14 +0100 + +vim (2:7.3.547-6ubuntu3) raring; urgency=low + + * Fix FTBFS with multi-arched Python (lp: #1095320): + + debian/rules: + Specify the Python library's config directory as the configure script + can't find it on its own since the library package got multi-arched. + + d/p/ubuntu-multiarch.patch: + Use the "python-config" script to determine libs and includes for + Python. + + -- Michael Bienia Wed, 02 Jan 2013 08:48:59 -0800 + +vim (2:7.3.547-6ubuntu2) raring; urgency=low + + * d/p/debian/update-upstart-syntax.patch: Add setuid and setgid to + syntax file. + + -- Clint Byrum Fri, 21 Dec 2012 09:42:11 -0800 + +vim (2:7.3.547-6ubuntu1) raring; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if + launchpad-integration is installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + - debian/ubuntu-raring.patch: + + Allow raring in deb* syntax hilighting. + + -- Adam Conrad Sun, 02 Dec 2012 05:21:52 -0700 + vim (2:7.3.547-6) unstable; urgency=low * Always enable ACL support. (Closes: #693462) -- James McCoy Thu, 22 Nov 2012 09:37:52 -0500 +vim (2:7.3.547-5ubuntu1) raring; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if + launchpad-integration is installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + * Add raring to the debchangelog and debsources syntax hilighting. + + -- Adam Conrad Mon, 22 Oct 2012 10:43:15 +0100 + vim (2:7.3.547-5) unstable; urgency=low * Use xz compression for all binary packages. (Closes: #687265) @@ -96,6 +385,20 @@ -- James McCoy Sat, 15 Sep 2012 23:59:18 -0400 +vim (2:7.3.547-4ubuntu1) quantal; urgency=low + + * Make vim-* installable again (lp: #1043035) by merging with Debian + unstable: + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if launchpad-integration is + installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + + -- Michael Bienia Wed, 29 Aug 2012 09:30:43 +0200 + vim (2:7.3.547-4) unstable; urgency=low * Add remove-py_config.patch, removing the dependence on Python's config.c. @@ -116,6 +419,19 @@ -- James McCoy Thu, 21 Jun 2012 22:28:51 -0400 +vim (2:7.3.547-1ubuntu1) quantal; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if launchpad-integration is + installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + + -- Adam Conrad Sun, 24 Jun 2012 03:13:56 -0600 + vim (2:7.3.547-1) unstable; urgency=low * Merge upstream tag v7-3-547 @@ -148,6 +464,35 @@ -- James McCoy Thu, 24 May 2012 21:37:40 -0400 +vim (2:7.3.429-2ubuntu3) quantal; urgency=low + + * Add quantal to the debchangelog and debsources syntax hilighting. + + -- Adam Conrad Fri, 27 Apr 2012 10:17:02 -0600 + +vim (2:7.3.429-2ubuntu2) precise; urgency=low + + * debian/runtime/vimrc, debian/runtime/gvimrc: + Undo the changes from the previous upload as they conflict with/override + user settings from ~/.vimrc (lp: #951440; re-open #871907). + + -- Michael Bienia Sun, 11 Mar 2012 14:30:55 +0100 + +vim (2:7.3.429-2ubuntu1) precise; urgency=low + + * Merge with Debian testing/unstable (lp: #927642). Remaining changes: + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if launchpad-integration is + installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + * debian/runtime/vimrc, debian/runtime/gvimrc: + Set background=dark for vim and background=light for gvim (lp: #871907) + + -- Michael Bienia Sun, 26 Feb 2012 15:26:29 +0100 + vim (2:7.3.429-2) unstable; urgency=low * Ignore failures in test61 since it is highly sensitive to timing. @@ -192,6 +537,19 @@ -- James McCoy Wed, 30 Nov 2011 21:53:43 -0500 +vim (2:7.3.346-1ubuntu1) precise; urgency=low + + * Merge with Debian testing/unstable (lp: #896587). Remaining changes: + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if launchpad-integration is + installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + + -- Michael Bienia Sat, 26 Nov 2011 14:40:17 +0100 + vim (2:7.3.346-1) unstable; urgency=low * Pull upstream tag v7-3-346 @@ -212,6 +570,29 @@ -- James McCoy Thu, 20 Oct 2011 22:17:16 -0400 +vim (2:7.3.333-1ubuntu2) precise; urgency=low + + * Rebuild for Perl 5.14. + + -- Colin Watson Tue, 15 Nov 2011 23:22:43 +0000 + +vim (2:7.3.333-1ubuntu1) precise; urgency=low + + * Merge with Debian testing/unstable; remaining changes: + - debian/rules: + + Work around ICE on ppc64 by exporting DEB_GCC_NO_O3=1. + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if launchpad-integration is + installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + - debian/patches/debian/ubuntu-version.patch: + + Update supported Ubuntu codenames: add precise. + + -- Loïc Minier Mon, 17 Oct 2011 13:47:55 +0200 + vim (2:7.3.333-1) unstable; urgency=low * Pull upstream tag v7-3-333 @@ -269,6 +650,40 @@ -- James Vega Mon, 15 Aug 2011 06:35:08 -0400 +vim (2:7.3.154+hg~74503f6ee649-2ubuntu3) oneiric; urgency=low + + * Update patch debian/ubuntu-version to list new "precise" dist/series in + debchangelog and debsources.vim. + + -- Loïc Minier Thu, 06 Oct 2011 12:03:26 +0200 + +vim (2:7.3.154+hg~74503f6ee649-2ubuntu2) oneiric; urgency=low + + * No-change rebuild with perl 5.12 (lp: #778053) + + -- Michael Bienia Thu, 05 May 2011 20:38:12 +0200 + +vim (2:7.3.154+hg~74503f6ee649-2ubuntu1) oneiric; urgency=low + + * Merge with Debian unstable (lp: #774233) + * Remaining changes: + - debian/rules: + + Work around ICE on ppc64 by exporting DEB_GCC_NO_O3=1. + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if launchpad-integration is + installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + - debian/patches/debian/ubuntu-version.patch: + + Update supported Ubuntu codenames: drop jaunty and karmic, add oneiric. + * debian/gvim.desktop: + Drop path and extension from the Icon filename to allow themes to change + the icon (lp: #740842). + + -- Michael Bienia Sat, 30 Apr 2011 17:21:30 +0200 + vim (2:7.3.154+hg~74503f6ee649-2) unstable; urgency=low * Remove upstream/Makefile-parallel.patch as many parallel invocations of @@ -322,6 +737,69 @@ -- James Vega Sat, 09 Apr 2011 19:18:27 -0400 +vim (2:7.3.035+hg~8fdc12103333-1ubuntu7) natty; urgency=low + + * Updated upstream/debian-runtime.patch to includes Multi-Arch field. + + -- Kees Cook Wed, 23 Mar 2011 22:45:53 -0700 + +vim (2:7.3.035+hg~8fdc12103333-1ubuntu6) natty; urgency=low + + * Update patch upstream/debian-runtime to also list oneiric in + runtime/syntax/debchangelog.vim and runtime/syntax/debsources.vim. + + -- Loïc Minier Wed, 23 Mar 2011 13:23:38 +0100 + +vim (2:7.3.035+hg~8fdc12103333-1ubuntu5) natty; urgency=low + + * runtime/syntax/upstart.vim: Improvements. + + -- James Hunt Fri, 11 Mar 2011 15:20:06 +0000 + +vim (2:7.3.035+hg~8fdc12103333-1ubuntu4) natty; urgency=low + + * runtime/syntax/upstart.vim: New syntax file for Upstart. + * runtime/filetype.vim: Updated to recognise Upstart configuration files. + + -- James Hunt Tue, 08 Mar 2011 12:14:56 +0000 + +vim (2:7.3.035+hg~8fdc12103333-1ubuntu3) natty; urgency=low + + * Work around ICE on ppc64 by exporting DEB_GCC_NO_O3=1. + + -- Colin Watson Fri, 18 Feb 2011 17:37:44 +0000 + +vim (2:7.3.035+hg~8fdc12103333-1ubuntu2) natty; urgency=low + + * No-change rebuild with Python 2.7 (lp: #688149). + + -- Michael Bienia Thu, 09 Dec 2010 17:24:51 +0100 + +vim (2:7.3.035+hg~8fdc12103333-1ubuntu1) natty; urgency=low + + * Merge with Debian unstable (lp: #662276): + - Use case-insensitive matching for month and day of week names in + crontab's syntax file (lp: #517019 aka Debian bug #568378). + - Fix sqlcomplete's / maps so they don't interfere with + normal usage (lp: #584797 aka Debian bug #560083). + - [7.2.386] KDE 3.1 focus hack causes problems for other window managers + (lp: #535341). + * Remaining changes: + - debian/control: + + Drop vim-lesstif package and lesstif2-dev build-dependency. + + Rename Vcs-* to XS-Debian-Vcs-*. + - debian/rules: + + Don't build the vim-lesstif variant in Ubuntu. + - debian/runtime/debian.vim.in: + + Add Launchpad integration to the Help menu if launchpad-integration is + installed. + - debian/runtime/vimrc: + + "syntax on" is a sane default for non-tiny vim + - debian/patches/debian/ubuntu-grub-syntax.patch: + + Add Ubuntu-specific "quiet" keyword. + + -- Michael Bienia Mon, 25 Oct 2010 10:55:05 +0200 + vim (2:7.3.035+hg~8fdc12103333-1) unstable; urgency=low * Pull patches 001 - 035. @@ -511,6 +989,57 @@ -- James Vega Tue, 18 May 2010 18:40:17 -0400 +vim (2:7.2.330-1ubuntu4) maverick; urgency=low + + * runtime/syntax/debchangelog.vim, runtime/syntax/debsources.vim: add natty + to allowed dists. + + -- Loïc Minier Tue, 28 Sep 2010 02:49:59 +0200 + +vim (2:7.2.330-1ubuntu3) lucid; urgency=low + + * runtime/syntax/debchangelog.vim, runtime/syntax/debsources.vim: add + maverick to allowed dists. + + -- Loïc Minier Fri, 16 Apr 2010 11:31:40 +0200 + +vim (2:7.2.330-1ubuntu2) lucid; urgency=low + + * debian/rules: Temporarily disable parallel building until we figure out + where it is broken (fixes the current FTBFS). + + -- Michael Bienia Mon, 08 Mar 2010 20:35:33 +0100 + +vim (2:7.2.330-1ubuntu1) lucid; urgency=low + + [ Michael Bienia ] + * Merge with Debian unstable (LP: #509900): + - Highlight Breaks in debian/control (LP: #498303). + - [7.2.257] GTK 2.17: lots of assertion error messages (LP: #402188). + * Remaining changes: + - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim. + - runtime/syntax/debcontrol.vim: + + Add "metapackages" to the list of valid sections. + - runtime/syntax/grub.vim: + + Add Ubuntu-specific 'quiet' keyword. + - Drop vim-lesstif package and lesstif2-dev build-dependency. + - Enable Python interpreter on basic builds. + - Rename Vcs-* to XS-Debian-Vcs-*. + * runtime/ftplugin/debchangelog.vim: Use python-launchpadlib (and LP API) + instead of python-launchpad-bugs for bug completion for Ubuntu + (forwarded to Debian as bug #566841). + * src/configure.in, src/auto/configure: + As MODLIBS from python's config/Makefile includes LOCALMODLIBS which + shouldn't be used and breaks the build with newer python versions, use + BASEMODLIBS instead of MODLIBS (forwarded to Debian as bug #566842; + LP: #534251). + + [ Colin Watson ] + * Add Launchpad integration to the Help menu if launchpad-integration is + installed (LP: #453103). + + -- Colin Watson Mon, 08 Mar 2010 17:08:44 +0000 + vim (2:7.2.330-1) unstable; urgency=low * [34a85b6] Update README for patches 285 - 330 @@ -558,6 +1087,33 @@ -- James Vega Sun, 08 Nov 2009 16:51:59 -0500 +vim (2:7.2.245-2ubuntu3) lucid; urgency=low + + * rebuild rest of main for armel armv7/thumb2 optimization; + UbuntuSpec:mobile-lucid-arm-gcc-v7-thumb2 + + -- Alexander Sack Sun, 07 Mar 2010 01:10:27 +0100 + +vim (2:7.2.245-2ubuntu2) karmic; urgency=low + + * Add lucid as a valid suite in changelogs and sources.list. + * Rename Vcs-* to XS-Debian-Vcs-*. + + -- Loïc Minier Mon, 21 Sep 2009 13:07:03 +0200 + +vim (2:7.2.245-2ubuntu1) karmic; urgency=low + + * Merge from debian unstable, remaining changes: LP: #407038 + - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim. + - runtime/syntax/debcontrol.vim: + + Add "metapackages" to the list of valid sections. + - runtime/syntax/grub.vim: + + Add Ubuntu-specific 'quiet' keyword. + - Drop vim-lesstif package and lesstif2-dev build-dependency. + - Enable Python interpreter on basic builds. + + -- Bhavani Shankar Fri, 21 Aug 2009 20:07:37 +0530 + vim (2:7.2.245-2) unstable; urgency=low * [5263ec7] Add Suggests: indent to vim-tiny since it will invoke indent @@ -635,6 +1191,33 @@ -- James Vega Wed, 29 Jul 2009 20:18:17 +0200 +vim (2:7.2.148-2ubuntu2) karmic; urgency=low + + * Drop the changes to debian/runtime/debian.vim.in, which were no-ops + since these options are already disabled by default. Thanks to James + Vega for pointing this out. + + -- Steve Langasek Tue, 05 May 2009 18:45:52 +0000 + +vim (2:7.2.148-2ubuntu1) karmic; urgency=low + + * Merge from Debian unstable, remaining changes: + - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim. + - runtime/syntax/debcontrol.vim: + + Add "metapackages" to the list of valid sections. + - runtime/syntax/grub.vim: + + Add Ubuntu-specific 'quiet' keyword. + - Drop vim-lesstif package and lesstif2-dev build-dependency. + - Enable Python interpreter on basic builds. + * Dropped changes, merged in Debian: + - Add jaunty, karmic to the list of valid suites. + - runtime/syntax/debsources.vim: + + Add "jaunty" to debsourcesDistrKeyword + - Create a .pot file for translations. + * Drop gutsy from the list of valid distro series, it's been EOLed. + + -- Steve Langasek Mon, 04 May 2009 11:13:42 +0000 + vim (2:7.2.148-2) unstable; urgency=low * [0657c8d] debian/rules: SHELL really does need to be bash... @@ -693,6 +1276,52 @@ -- James Vega Thu, 05 Mar 2009 08:58:23 -0500 +vim (2:7.2.079-1ubuntu5) jaunty; urgency=low + + * Guard "syntax on" default so that it's only used if the syntax feature + is available, since /etc/vim/vimrc is sometimes used by vim-tiny too + (LP: #342174). + + -- Colin Watson Thu, 19 Mar 2009 15:16:10 +0000 + +vim (2:7.2.079-1ubuntu4) jaunty; urgency=low + + * Added karmic to the list of valid distro series. + + -- Soren Hansen Fri, 13 Mar 2009 16:07:45 +0100 + +vim (2:7.2.079-1ubuntu3) jaunty; urgency=low + + * debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim, + LP: #63172 + + -- Dustin Kirkland Thu, 05 Mar 2009 09:28:52 -0600 + +vim (2:7.2.079-1ubuntu2) jaunty; urgency=low + + * Rebuild for python2.6. + + -- Matthias Klose Mon, 02 Mar 2009 12:19:07 +0100 + +vim (2:7.2.079-1ubuntu1) jaunty; urgency=low + + * Resynchronise with Debian (diversions fix closes LP: #296324). Remaining + changes: + - runtime/syntax/debcontrol.vim: + + Add "metapackages" to the list of valid sections. + - runtime/syntax/debchangelog.vim: + + Add "jaunty" to the list of valid suites. + - Drop vim-lesstif package and lesstif2-dev build-dependency. + - Enable Python interpreter on basic builds. + - Create a .pot file for translations. + - Disable autoindent, line-wrapping, and backup files by default. + - runtime/syntax/debsources.vim: + + Add "jaunty" to debsourcesDistrKeyword + - runtime/syntax/grub.vim: + + Add Ubuntu-specific 'quiet' keyword. + + -- Colin Watson Tue, 13 Jan 2009 18:39:18 +0000 + vim (2:7.2.079-1) unstable; urgency=low * [4d191a4] Update README for patches 50 - 065 @@ -742,6 +1371,24 @@ -- James Vega Tue, 25 Nov 2008 23:38:38 -0500 +vim (2:7.2.025-2ubuntu1) jaunty; urgency=low + + * Merge from debian unstable, remaining changes: + - runtime/syntax/debcontrol.vim: + + Add "metapackages" to the list of valid sections. + - runtime/syntax/debchangelog.vim: + + Add "jaunty" to the list of valid suites. + - Drop vim-lesstif package and lesstif2-dev build-dependency. + - Enable Python interpreter on basic builds. + - Create a .pot file for translations. + - Disable autoindent, line-wrapping, and backup files by default. + - runtime/syntax/debsources.vim: + + Add "jaunty" to debsourcesDistrKeyword + - runtime/syntax/grub.vim: + + Add Ubuntu-specific 'quiet' keyword. + + -- Soren Hansen Wed, 05 Nov 2008 11:37:43 +0100 + vim (2:7.2.025-2) unstable; urgency=low * Remove "deprecated" warnings about (g)vimrc.local from /etc/vim/(g)vimrc. @@ -953,6 +1600,45 @@ -- James Vega Thu, 26 Jun 2008 12:49:16 -0400 +vim (1:7.1.314-3ubuntu3) intrepid; urgency=low + + * runtime/syntax/grub.vim: + - Add Ubuntu-specific 'quiet' keyword. + * Remove some unnecessary divergence from Debian, thanks to James Vega + (LP: #248713): + - Remove explicit settings of textwidth=0 and nobackup, since those are + already the defaults. + - Remove explicit setting of viminfo to a subset of the default, thereby + adding s10 and h. + - Remove NoDisplay=true from gvim.desktop; vim-gui-common isn't + installed by default and there's no reason to withhold the menu entry + from those who have installed it (LP: #3222). + + -- Colin Watson Mon, 21 Jul 2008 14:22:09 +0100 + +vim (1:7.1.314-3ubuntu2) intrepid; urgency=low + + * Rebuild for libgpmg1 -> libgpm2 transistion. + + -- Steve Kowalik Sun, 20 Jul 2008 05:24:49 +1000 + +vim (1:7.1.314-3ubuntu1) intrepid; urgency=low + + * Resynchronise with Debian. Remaining changes: + - Enable detection of GNU screen as a mouse-capable terminal. + - Add NoDisplay=true to gvim.desktop. + - Drop vim-lesstif package and lesstif2-dev build-dependency. + - Build-depend on libxt-dev. + - Enable Python interpreter on basic builds. + - Create a .pot file for translations. + - Disable autoindent, line-wrapping, and backup files by default. + * Fixes various vulnerabilities due to improper quoting of 'execute' + arguments (LP: #240216). + * Drop fixes for upgrade problems from Ubuntu 6.06 LTS; direct upgrades + from 6.06 to 8.10 will not be supported. + + -- Colin Watson Thu, 26 Jun 2008 13:42:18 +0100 + vim (1:7.1.314-3) unstable; urgency=high * Update runtime files affected by the filename escape vulnerability. @@ -1015,6 +1701,23 @@ -- James Vega Tue, 10 Jun 2008 22:28:10 -0400 +vim (1:7.1.293-3ubuntu1) intrepid; urgency=low + + * Merge from debian unstable (LP: #234766), remaining changes: + - Enable detection of GNU screen as a mouse-capable terminal. + - Add NoDisplay=true to gvim.desktop. + - Drop vim-lesstif package and lesstif2-dev build-dependency. + - Build-depend on libxt-dev. + - Restore a number of Conflicts/Replaces and include + /usr/share/man/ru.{KOI8-R,UTF-8}{,/man1}, both to help with upgrade + problems from 6.06. + - Enable Python interpreter on basic builds. + - Create a .pot file for translations. + - Disable autoindent, line-wrapping, and backup files by default. + - Omni completion for Launchpad bugs. + + -- Fabien Tassin Sun, 25 May 2008 14:10:50 +0200 + vim (1:7.1.293-3) unstable; urgency=low * runtime/syntax/debchangelog.vim,debsources.vim: @@ -1040,6 +1743,32 @@ -- James Vega Sun, 04 May 2008 14:11:17 -0400 +vim (1:7.1.293-2ubuntu1) intrepid; urgency=low + + * Resynchronise with Debian (LP: #183935); thanks to James Vega for + including a number of our changes! Remaining changes: + - Enable detection of GNU screen as a mouse-capable terminal. + - Add NoDisplay=true to gvim.desktop. + - Drop vim-lesstif package and lesstif2-dev build-dependency. + - Build-depend on libxt-dev. + - Restore a number of Conflicts/Replaces and include + /usr/share/man/ru.{KOI8-R,UTF-8}{,/man1}, both to help with upgrade + problems from 6.06. + - Enable Python interpreter on basic builds. + - Create a .pot file for translations. + - Disable autoindent, line-wrapping, and backup files by default. + - Add intrepid to lists of Ubuntu distributions. + - Add metapackages to list of allowed debian/control sections. + - Add omni completion support for Launchpad bugs via + python-launchpad-bugs. + * Improve omni completion for Launchpad and debbugs, so that it allows + completion of bug number parts (base), e.g. + "LP:#1" will include all bugs from the package + beginning with "1". Previously, this would have invoked a completion + using debbugs (thanks, Daniel Hahler; LP: #196112). + + -- Colin Watson Thu, 01 May 2008 21:56:46 +0100 + vim (1:7.1.293-2) unstable; urgency=low * debian/rules: @@ -1440,6 +2169,73 @@ -- James Vega Mon, 03 Dec 2007 15:53:27 -0500 +vim (1:7.1-138+1ubuntu3) hardy; urgency=low + + * patches/debchangelog_launchpad.diff: + - Add omni completion support for Launchpad bugs via + python-launchpad-bugs. + + -- Colin Watson Thu, 31 Jan 2008 10:59:03 +0000 + +vim (1:7.1-138+1ubuntu2) hardy; urgency=low + + * debian/control: + - re-add the removed conflicts/replaces that apply for the + dapper->hardy upgrades + + -- Michael Vogt Tue, 20 Nov 2007 14:01:58 +0100 + +vim (1:7.1-138+1ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + + debian/runtime/debian.vim.in: + - Disable autoindent, linebreak and backup files + + debian/rules: + - Enable pythoninterpreter on basic builds + - Skip -lesstif variant + - Create a .pot file for translations + - Use bzip2 compression for vim-runtime + + debian/vim-common.dirs: + - Include /usr/share/man/ru.{KOI8-R,UTF-8}{,/man1} to help with + upgrade problems from dapper; retain this until at least the first + Ubuntu LTS release after 6.06 + + debian/gvim.desktop: + - Add NoDisplay=true + + debian/control: + - DebianMaintainerField + - Drop lesstif2-dev from Build-Depends + - Add libxt-dev to Build-Depends to fix build + - Drop vim-lesstif package + + patches/debcontrol.vim.diff: + - Add XSBC-Original-Maintainer as legal field + + patches/900_debcontrol.vim.diff: + - Add restricted, universe, multiverse, and metapackages to allowed + sections + + patches/screen-mouse-support.diff: + - Enable detection of GNU screen as a mouse-capable terminal + (LP #113227) + + patches/901_debchangelog.vim.diff: + - Add warty, hoary, breezy, dapper, edgy, feisty, gutsy, hardy, + *-proposed, *-updates, *-security, *-backports, *-commercial, and + *-partner to allowed distributions. + + patches/add-ubuntu-sources.diff: + - Add restricted, universe, multiverse to allowed sections + - Add dapper, edgy, feisty, gutsy, hardy, *-proposed, *-updates, + *-security, *-backports, *-commercial, and *-partner to allowed + distributions. + + patches/debchangelog_launchpad.diff: + - Highlight Launchpad bug-closing syntax in debian/changelog files. + * New changes: + + debian/control: + - Add dpkg-dev (>= 1.13.19) dependency (Debian removed it because + stable has new enough dpkg-dev, but Dapper doesn't, so we keep it) + * The following changes were dropped: + + debian/control: + - Pre-Depend on dpkg with bzip2 support (oldest support release has this + already) + + -- Soren Hansen Fri, 19 Oct 2007 15:37:56 +0200 + vim (1:7.1-138+1) unstable; urgency=medium [ Debian Vim Maintainers ] @@ -1500,6 +2296,55 @@ -- James Vega Sun, 07 Oct 2007 15:47:26 -0400 +vim (1:7.1-056+2ubuntu2) gutsy; urgency=low + + * Trigger rebuild for hppa + + -- LaMont Jones Thu, 04 Oct 2007 12:26:15 -0600 + +vim (1:7.1-056+2ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + + debian/runtime/debian.vim.in: + - Disable autoindent, linebreak and backup files + + debian/rules: + - Enable pythoninterpreter on basic builds + - Skip -lesstif variant + - Create a .pot file for translations + - Use bzip2 compression for vim-runtime + + debian/vim-common.dirs: + - Include /usr/share/man/ru.{KOI8-R,UTF-8}{,/man1} to help with + upgrade problems from dapper; retain this until at least the first + Ubuntu LTS release after 6.06 + + debian/gvim.desktop: + - Add NoDisplay=true + + debian/control: + - DebianMaintainerField field + - Drop lesstif2-dev from Build-Depends + - Add libxt-dev to Build-Depends to fix build + - Pre-Depend on dpkg with bzip2 support + - Drop vim-lesstif package + + patches/debcontrol.vim.diff: + - Add XSBC-Original-Maintainer as legal field + + patches/900_debcontrol.vim.diff: + - Add restricted, universe, multiverse, and metapackages to allowed + sections + + patches/901_debchangelog.vim.diff: + - Add warty, hoary, breezy, dapper, edgy, feisty, gutsy, *-proposed, + *-updates, *-security, *-backports, and *-commercial to allowed + distributions. + + patches/add-ubuntu-sources.diff: + - Add restricted, universe, multiverse to allowed sections + - Add dapper, edgy, feisty, gutsy, *-proposed, *-updates, *-security, + and *-backports to allowed distributions. + + patches/debchangelog_launchpad.diff: + - Highlight Launchpad bug-closing syntax in debian/changelog files. + + patches/screen-mouse-support.diff: + - Enable detection of GNU screen as a mouse-capable terminal + (LP #113227) + + -- Soren Hansen Tue, 28 Aug 2007 17:02:33 +0200 + vim (1:7.1-056+2) unstable; urgency=low * Brown paper bag release -- vimrc.tiny should not be calling :let since @@ -1559,6 +2404,52 @@ -- James Vega Wed, 08 Aug 2007 00:18:16 -0400 +vim (1:7.1-022+1ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + + debian/runtime/debian.vim.in: + - disable autoindent and backup files + + debian/rules: + - enable pythoninterpreter on basic builds + - skip -lesstif and -full variants + - remove references to vim-full package + - create a .pot file for translations + - use bzip2 compression for vim-runtime + + debian/vim-common.dirs: + - include /usr/share/man/ru.{KOI8-R,UTF-8}{,/man1} to help with + upgrade problems from dapper; retain this until at least the first + Ubuntu LTS release after 6.06 + + debian/gvim.desktop: + - add NoDisplay=true + + debian/control: + - DebianMaintainerField field + - drop lesstif2-dev from Build-Depends + - add libxt-dev to Build-Depends to fix build + - pre-depend on dpkg with bzip2 support + - drop vim-lesstif package + + patches/debcontrol.vim.diff: + - add XSBC-Original-Maintainer as legal field + + patches/add-ubuntu-sources.diff: + - add restricted, universe, multiverse to allowed sections + - add dapper, edgy, feisty, gutsy, *-proposed, *-updates, *-security, + and *-backports to allowed distributions. + + patches/901_debchangelog.vim.diff: + - add warty, hoary, breezy, dapper, edgy, feisty, gutsy, *-proposed, + *-updates, *-security, *-backports, and *-commercial to allowed + distributions. + + patches/900_debcontrol.vim.diff: + - add restricted, universe, multiverse, and metapackages to allowed + sections + + patches/screen-mouse-support.diff: + - Enable detection of GNU screen as a mouse-capable terminal + (LP #113227) + + patches/debchangelog_launchpad.diff: + - Highlight Launchpad bug-closing syntax in debian/changelog files. + * Dropped debian/kubuntu_01_xdg_menus.diff (hasn't been used in years) and + patches/proc-filetype-detection-fix.diff (applied upstream). + + -- Soren Hansen Fri, 13 Jul 2007 15:32:59 +0200 + vim (1:7.1-022+1) unstable; urgency=low [ Debian Vim Maintainers ] @@ -1614,6 +2505,60 @@ -- James Vega Sat, 07 Jul 2007 15:04:57 -0400 +vim (1:7.1-000+1ubuntu2) gutsy; urgency=low + + [ Micah Cowan ] + * patches/screen-mouse-support.diff: + - Enable detection of GNU screen as a mouse-capable terminal + (LP: #113227) + * patches/proc-filetype-detection-fix.diff: + - Fix detection of files of type Oracle ProC (LP: #86916) + + [ Colin Watson ] + * patches/debchangelog_launchpad.diff: + - Highlight Launchpad bug-closing syntax in debian/changelog files. + + -- Colin Watson Wed, 04 Jul 2007 04:38:55 +0100 + +vim (1:7.1-000+1ubuntu1) gutsy; urgency=low + + * Resynchronise with Debian. Remaining changes: + + debian/runtime/debian.vim.in: + - disable autoindent and backup files + + patches/debcontrol.vim.diff: + - add XSBC-Original-Maintainer as legal field + + patches/900_debcontrol.vim.diff: + - add restricted, universe, multiverse, and metapackages to allowed + sections + + patches/901_debchangelog.vim.diff: + - add breezy, dapper, edgy, feisty, gutsy, *-proposed, *-updates, + *-security, *-backports, and dapper-commercial to allowed + distributions + + patches/add-ubuntu-sources.diff: + - add restricted, universe, multiverse to allowed sections + - add dapper, edgy, feisty, gutsy, *-proposed, *-updates, *-security, + and *-backports to allowed distributions + + debian/control: + - drop lesstif2-dev from Build-Depends + - drop vim-lesstif package + - add libxt-dev to Build-Depends to fix build + - pre-depend on dpkg with bzip2 support + - Ubuntu-specific Maintainer field + + debian/rules: + - enable pythoninterpreter on basic builds + - skip -lesstif and -full variants + - remove references to vim-full package + - create a .pot file for translations + - use bzip2 compression for vim-runtime + + debian/gvim.desktop: + - add NoDisplay=true + + debian/vim-common.dirs: + - include /usr/share/man/ru.{KOI8-R,UTF-8}{,/man1} to help with + upgrade problems from dapper; retain this until at least the first + Ubuntu LTS release after 6.06 + + -- Colin Watson Thu, 24 May 2007 13:12:54 +0100 + vim (1:7.1-000+1) unstable; urgency=low [ Debian Vim Maintainers ] @@ -1647,6 +2592,56 @@ -- James Vega Sat, 12 May 2007 13:24:27 -0400 +vim (1:7.0-219+1ubuntu2) gutsy; urgency=low + + [ Soren Hansen ] + * patches/901_debchangelog.vim.diff: + - Simplify regex for Ubuntu distributions. + + -- Colin Watson Fri, 20 Apr 2007 21:25:54 +0100 + +vim (1:7.0-219+1ubuntu1) gutsy; urgency=low + + * Resynchronise with Debian. Remaining changes: + + debian/runtime/debian.vim.in: + - disable autoindent and backup files + + patches/debcontrol.vim.diff: + - add XSBC-Original-Maintainer as legal field + + patches/900_debcontrol.vim.diff: + - add restricted, universe, multiverse, and metapackages to allowed + sections + + patches/901_debchangelog.vim.diff: + - add breezy, dapper, edgy, feisty, *-proposed, *-updates, *-security, + *-backports, and dapper-commercial to allowed distributions + + patches/add-ubuntu-sources.diff: + - add restricted, universe, multiverse to allowed sections + - add dapper, edgy, feisty, *-proposed, *-updtaes, *-security, and + *-backports to allowed distributions + + debian/control: + - drop lesstif2-dev from Build-Depends + - drop vim-lesstif package + - add libxt-dev to Build-Depends to fix build + - pre-depend on dpkg with bzip2 support + - Ubuntu-specific Maintainer field + + debian/rules: + - enable pythoninterpreter on basic builds + - skip -lesstif and -full variants + - remove references to vim-full package + - create a .pot file for translations + - use bzip2 compression for vim-runtime + + debian/gvim.desktop: + - add NoDisplay=true + + debian/vim-common.dirs: + - include /usr/share/man/ru.{KOI8-R,UTF-8}{,/man1} to help with + upgrade problems from dapper; retain this until at least the first + Ubuntu LTS release after 6.06 + * patches/901_debchangelog.vim.diff: Add gutsy, gutsy-security, + gutsy-proposed, gutsy-updates, and gutsy-backports targets. + * patches/add-ubuntu-sources.diff: Add gutsy distribution. + * patches/cindent-fix.patch: Remove; this is upstream patch 7.0.211. + + -- Colin Watson Fri, 20 Apr 2007 19:24:56 +0100 + vim (1:7.0-219+1) unstable; urgency=low [ Debian Vim Maintainers ] @@ -1693,6 +2688,78 @@ -- James Vega Thu, 4 Jan 2007 01:50:25 -0500 +vim (1:7.0-164+1ubuntu7) feisty; urgency=low + + * Add XSBC-Original-Maintainer to debcontrol syntax highlighting. + + -- Soren Hansen Sat, 10 Mar 2007 22:07:48 +0100 + +vim (1:7.0-164+1ubuntu6) feisty; urgency=low + + * Ubuntu-specific Maintainer field (really, this time saving + the control file before building the package). + + -- Ian Jackson Tue, 20 Feb 2007 16:45:18 +0000 + +vim (1:7.0-164+1ubuntu5) feisty; urgency=low + + * Re-upload with .orig.tar.gz as intended, and bump version number. + * Ubuntu-specific Maintainer field. + + -- Ian Jackson Tue, 20 Feb 2007 14:13:33 +0000 + +vim (1:7.0-164+1ubuntu4) feisty; urgency=low + + * Include /usr/share/man/ru.{KOI8-R,UTF-8}{,/man1} in the + vim-common package which will help with some upgrade problems (LP + #84906). These directories should be retained until at least the + first Ubuntu LTS release after 6.06, to smooth upgrades from Dapper. + + -- Ian Jackson Tue, 20 Feb 2007 12:31:22 +0000 + +vim (1:7.0-164+1ubuntu3) feisty; urgency=low + + * Use bzip2 compression for vim-runtime, saving about 1MB of .deb size. + + -- Colin Watson Tue, 30 Jan 2007 16:08:49 +0000 + +vim (1:7.0-164+1ubuntu2) feisty; urgency=low + + * Rebuild for python2.5 as the default python version. + + -- Matthias Klose Sun, 14 Jan 2007 16:25:53 +0000 + +vim (1:7.0-164+1ubuntu1) feisty; urgency=low + + * Resynchronise with Debian. Remaining changes: + + debian/runtime/debian.vim.in: + - disable autoindent and backup files + + patches/900_debcontrol.vim.diff: + - add restricted, universe, multiverse, and metapackages to allowed + sections + + patches/901_debchangelog.vim.diff: + - add breezy, dapper, edgy, feisty, *-proposed, *-updates, *-security, + *-backports, and dapper-commercial to allowed distributions + + patches/add-ubuntu-sources.diff: + - add restricted, universe, multiverse to allowed sections + - add dapper, edgy, feisty, *-proposed, *-updtaes, *-security, and + *-backports to allowed distributions + + patches/cindent-fix.patch: + - added again + + debian/control: + - drop lesstif2-dev from Build-Depends + - drop vim-lesstif package + - add libxt-dev to Build-Depends to fix build + + debian/rules: + - enable pythoninterpreter on basic builds + - skip -lesstif and -full variants + - remove references to vim-full package + - create a .pot file for translations + + debian/gvim.desktop: + - add NoDisplay=true + + -- Colin Watson Fri, 15 Dec 2006 12:15:18 +0000 + vim (1:7.0-164+1) unstable; urgency=low [ Debian Vim Maintainers ] @@ -1755,6 +2822,18 @@ -- Stefano Zacchiroli Wed, 25 Oct 2006 17:07:37 +0200 +vim (1:7.0-122+1ubuntu1) feisty; urgency=low + + * Resynchronise with Debian. + * patches/900_debcontrol.vim.diff: Add metapackages section. + * patches/901_debchangelog.vim.diff: Add dapper-proposed, edgy-proposed, + feisty, feisty-security, feisty-proposed, feisty-updates, and + feisty-backports targets. + * patches/add-ubuntu-sources.diff: Add feisty, *-proposed, and *-backports + distributions. + + -- Colin Watson Fri, 27 Oct 2006 11:57:31 +0100 + vim (1:7.0-122+1) unstable; urgency=medium [ Debian Vim Maintainers ] @@ -1819,6 +2898,41 @@ -- Stefano Zacchiroli Sun, 10 Sep 2006 11:59:14 +0200 +vim (1:7.0-035+1ubuntu5) edgy; urgency=low + + * Backport from Debian (James Vega, closes: Malone #66733): + - Build vim-tiny with multibyte support. (closes: #361378) + + -- Colin Watson Wed, 18 Oct 2006 18:43:57 +0100 + +vim (1:7.0-035+1ubuntu4) edgy; urgency=low + + * patches/901_debchangelog.vim.diff: Add *-backports and + dapper-commercial. + + -- Colin Watson Mon, 11 Sep 2006 15:52:54 +0100 + +vim (1:7.0-035+1ubuntu3) edgy; urgency=low + + * patches/901_debchangelog.vim.diff: Fix a couple of misplaced spaces so + that dapper and edgy-updates are highlighted properly. + + -- Colin Watson Mon, 11 Sep 2006 13:53:48 +0100 + +vim (1:7.0-035+1ubuntu2) edgy; urgency=low + + * patches/add-ubuntu-sources.diff: + + Add Ubuntu specific parts to the sources.list syntax highlighting. + Thanks to Karl Goetz for the patch (Ubuntu: #30796) + + -- Sebastian Dröge Sat, 22 Jul 2006 17:13:23 +0200 + +vim (1:7.0-035+1ubuntu1) edgy; urgency=low + + * Merge from debian unstable. + + -- Martin Pitt Wed, 12 Jul 2006 15:16:50 +0200 + vim (1:7.0-035+1) unstable; urgency=low [ Debian Vim Maintainers ] @@ -1840,6 +2954,45 @@ -- James Vega Mon, 3 Jul 2006 01:43:11 -0400 +vim (1:7.0-017+8ubuntu2) edgy; urgency=low + + * Cleaned up cruft in debian/rules diff. + * Build vim-full, since we can build it in main. + * Restore old changelog entries. + * patches/901_debchangelog: Add *-security and *-updates pockets for Ubuntu + releases. + + -- Martin Pitt Thu, 29 Jun 2006 12:47:54 +0200 + +vim (1:7.0-017+8ubuntu1) edgy; urgency=low + + * Sync with Debian: + Remaining Ubuntu Changes + + debian/runtime/debian.vim.in: + - disable autoindent and backup files + + patches/debcontrol.vim.diff: + - add restricted, universe, multiverse to allowed sections + + patches/debsources.vim.diff: + - add restricted, universe, multiverse to allowed sections + - add dapper and edgy to allowed distributions + + patches/debchangelog.syntax.vim.diff: + - add breezy, dapper and edgy to allowed distributions + + debian/control: + - drop lesstif2-dev from Build-Depends + - drop vim-lesstif and vim-full packages + - add libxt-dev to Build-Depends to fix build + + debian/rules: + - enable pythoninterpreter on basic builds + - skip -lesstif and -full variants + - remove references to vim-full package + - create a .pot file for translations + + debian/gvim.desktop: + - add NoDisplay=true + + patch/cindent-fix.patch: + - added again + + -- Sebastian Dröge Wed, 28 Jun 2006 00:58:52 +0200 + vim (1:7.0-017+8) unstable; urgency=medium * Rebuild with fixed libruby1.8. Urgency medium since vim-full and vim-ruby @@ -2167,6 +3320,50 @@ -- James Vega Wed, 8 Feb 2006 15:11:37 -0500 +vim (1:6.4-006+2ubuntu6) dapper; urgency=low + + * debian/rules: Create a POT file on build. + + -- Martin Pitt Tue, 23 May 2006 11:39:49 +0200 + +vim (1:6.4-006+2ubuntu5) dapper; urgency=low + + * Apply patch from Ryan Lortie to fix Ubuntu #44431. + * Also add edgy to the Ubuntu releases list. + + -- Scott James Remnant Thu, 18 May 2006 06:11:48 +0100 + +vim (1:6.4-006+2ubuntu4) dapper; urgency=low + + * Reduce the vim alternative to 35 priority, it was having ideas + somewhat above its station. + + -- Scott James Remnant Thu, 27 Apr 2006 23:21:42 +0100 + +vim (1:6.4-006+2ubuntu3) dapper; urgency=low + + * debian/updates/deb{control,sources}.vim: Add Ubuntu releases and + components. Thanks to Karl Goetz and + Barry deFreese for their initial patches. + Closes: LP#30796 + + -- Martin Pitt Wed, 26 Apr 2006 20:49:31 +0200 + +vim (1:6.4-006+2ubuntu2) dapper; urgency=low + + * Reenable vim-ruby since we can now build it in main. + + -- Daniel Silverstone Thu, 23 Mar 2006 12:32:25 +0000 + +vim (1:6.4-006+2ubuntu1) dapper; urgency=low + + * Synchronize with Debian unstable. + * Convert Ubuntu patches to use quilt. + * Re-register alternative for `editor'. + * Install .desktop file again, add attribute NoDisplay=true. + + -- Matthias Klose Thu, 2 Feb 2006 13:55:52 +0000 + vim (1:6.4-006+2) unstable; urgency=low [ Norbert Tretkowski ] @@ -2287,6 +3484,35 @@ -- Debian VIM Maintainers Sun, 23 Oct 2005 16:03:43 +0200 +vim (1:6.4-001+2ubuntu3) dapper; urgency=low + + * Drop GTK support in vim-basic again, to stop blowing out ubuntu-minimal. + + -- Adam Conrad Thu, 10 Nov 2005 12:28:39 -0500 + +vim (1:6.4-001+2ubuntu2) dapper; urgency=low + + * Remove .desktop items -- oops. + * Re-enable GTK support in vim-basic. + + -- Daniel Stone Fri, 28 Oct 2005 09:44:51 +1000 + +vim (1:6.4-001+2ubuntu1) dapper; urgency=low + + * Resync with Debian. + * Add 'dapper' to the list of supported distribution keywords. + * Drop patch #990, as it has been merged upstream. + + -- Daniel Stone Tue, 25 Oct 2005 07:57:58 +1000 + +vim (1:6.4-001+2) unstable; urgency=low + + [ Stefano Zacchiroli ] + * Fixed debian/runtime/vimrc, last version broke some plugins behaviour + (e.g. gzip, netrw) on files specified on cmdline. + + -- Debian VIM Maintainers Sun, 23 Oct 2005 16:03:43 +0200 + vim (1:6.4-001+1) unstable; urgency=low [ Debian VIM Maintainers ] @@ -2469,6 +3695,32 @@ -- Debian VIM Maintainers Thu, 28 Jul 2005 12:16:06 +0200 +vim (1:6.3-078+1ubuntu3) breezy; urgency=low + + * Rebuild for the cairo1 -> cairo2 transition. + + -- Adam Conrad Tue, 23 Aug 2005 01:57:09 +1000 + +vim (1:6.3-078+1ubuntu2) breezy; urgency=low + + * SECURITY UPDATE: Fix code execution. + * Add debian/patches/990_modeline_codeexec.diff: + - Do not execute code in glob() and expand() statements when we read them + from a modeline. + - Combined upstream patches 6.3.081 and 6.3.082. + - References: + http://www.guninski.com/where_do_you_want_billg_to_go_today_5.html + * debian/patches/124_errorformat.vim.diff: Remove obsolete hunk that doesn't + apply any more. + + -- Martin Pitt Tue, 26 Jul 2005 11:30:46 +0000 + +vim (1:6.3-078+1ubuntu1) breezy; urgency=low + + * Resynchronise with Debian. + + -- Michael Vogt Thu, 23 Jun 2005 15:32:31 +0200 + vim (1:6.3-078+1) unstable; urgency=low * New upstream patches (073 to 078), see README.gz for details. @@ -2568,6 +3820,25 @@ -- Norbert Tretkowski Sun, 24 Apr 2005 17:26:49 +0200 +vim (1:6.3-68+4ubuntu3) breezy; urgency=low + + * debian/control: + - Build-Depends on libxt-dev (Ubuntu: #11113). + + -- Sebastien Bacher Fri, 27 May 2005 19:46:38 +0200 + +vim (1:6.3-68+4ubuntu2) breezy; urgency=low + + * Drop vim-lesstif package. + + -- Daniel Stone Mon, 23 May 2005 22:19:45 +1000 + +vim (1:6.3-68+4ubuntu1) breezy; urgency=low + + * Add 'breezy' to the list of accepted distribution keywords. + + -- Daniel Stone Wed, 13 Apr 2005 12:44:25 +1000 + vim (1:6.3-068+4) unstable; urgency=medium * Norbert Tretkowski : @@ -2772,6 +4043,57 @@ -- Norbert Tretkowski Wed, 05 Jan 2005 20:51:36 +0100 +vim (1:6.3-046+1ubuntu7) hoary; urgency=low + + * Ensure kubuntu_01_xdg_menus.diff is not applied before uploading. + + -- Jonathan Riddell Sun, 3 Apr 2005 13:09:32 +0100 + +vim (1:6.3-046+1ubuntu6) hoary; urgency=low + + * Add kubuntu_01_xdg_menus.diff to make kvim menu entry XDG compliant. + + -- Jonathan Riddell Sun, 3 Apr 2005 00:44:21 +0000 + +vim (1:6.3-046+1ubuntu5) hoary; urgency=low + + * Revert KDE removal, thus making the kvim package actually have useful + content rather than just a broken diversion of vim. kvim-ruby is still + skipped. + + -- Colin Watson Tue, 8 Mar 2005 00:09:16 +0000 + +vim (1:6.3-046+1ubuntu4) hoary; urgency=low + + * Drop editor alternative priority to 35, since Ubuntu installs vim by + default (closes: Ubuntu #4710). + + -- Colin Watson Tue, 1 Mar 2005 15:37:33 +0000 + +vim (1:6.3-046+1ubuntu3) hoary; urgency=low + + * Don't autoindent by default (Ubuntu: #5602) + + -- Thom May Wed, 19 Jan 2005 12:10:29 +0000 + +vim (1:6.3-046+1ubuntu2) hoary; urgency=low + + * SECURITY UPDATE: fix insecure temporary files + * Added patch 104_secure_tempfiles.diff: use mktemp instead of insecure $$ + construction to create temporary files in vimspell.sh and tcltags.sh + * References: + CAN-2005-0069 + http://bugs.debian.org/289560 + + -- Martin Pitt Tue, 18 Jan 2005 16:29:10 +0100 + +vim (1:6.3-046+1ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + * debian/vim-variant.desktop: Disable menu item again. + + -- Colin Watson Sun, 19 Dec 2004 11:42:55 +0000 + vim (1:6.3-046+0sarge1) testing-proposed-updates; urgency=high * Built on testing for testing-proposed-updates because patch 045 fixes @@ -2789,6 +4111,35 @@ -- Norbert Tretkowski Sun, 12 Dec 2004 02:36:11 +0100 +vim (1:6.3-031+3ubuntu4) hoary; urgency=low + + * Rebuild with python2.4. + + -- Matthias Klose Thu, 16 Dec 2004 11:57:12 +0100 + +vim (1:6.3-031+3ubuntu3) hoary; urgency=low + + * 900_debcontrol.vim.diff: Add restricted, universe, and multiverse to + debcontrolSection. + * debian/rules (make_patch): Ignore error code from diff, since it'll + normally be non-zero. + + -- Colin Watson Fri, 10 Dec 2004 12:47:00 +0100 + +vim (1:6.3-031+3ubuntu2) hoary; urgency=low + + * 900_debcontrol.vim.diff: Add amd64 to debcontrolArchitecture. + * 901_debchangelog.vim.diff: Add warty and hoary to debchangelogTarget. + * Fix changelog ordering. + + -- Colin Watson Mon, 6 Dec 2004 18:23:01 +0100 + +vim (1:6.3-031+3ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Scott James Remnant Wed, 17 Nov 2004 00:17:02 +0000 + vim (1:6.3-031+3) unstable; urgency=low * Really add Brandens patch which adds XXX and FIXME comment hilighting @@ -2816,6 +4167,30 @@ -- Norbert Tretkowski Tue, 09 Nov 2004 18:56:42 +0100 +vim (1:6.3-025+1ubuntu2) warty; urgency=low + + * debian/vim-gnome.desktop: + - Disable menu item. + + -- Jeff Waugh Fri, 8 Oct 2004 10:04:36 +1000 + +vim (1:6.3-025+1ubuntu1) warty; urgency=low + + * New version from sid (Closes: Warty#1687) + - Fixes diversions (Closes: Warty#834) + * Merge changes from 1:6.2-532+4ubuntu1 + - Don't build kvim* + - Remove build-dependency on kdelibs + - Don't build vim-ruby + - Remove build-dependencies on ruby, ruby-dev + * Build vim-basic with python support + * Don't build with GNOME support, since that would bloat base + * Add conflicts: vim (= 1:6.2-532+4ubuntu2) to vim variants + due to moving of gvimrc + (Closes: Warty#1717 + + -- Matt Zimmerman Fri, 24 Sep 2004 13:46:42 -0700 + vim (1:6.3-025+1) unstable; urgency=low * New upstream patches (020 to 025), see README.gz for details. diff -Nru vim-7.4a.012/debian/control vim-7.4.273/debian/control --- vim-7.4a.012/debian/control 2013-06-24 02:09:28.000000000 +0000 +++ vim-7.4.273/debian/control 2014-05-02 03:39:48.000000000 +0000 @@ -1,10 +1,11 @@ Source: vim Section: editors Priority: optional -Maintainer: Debian Vim Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Vim Maintainers Uploaders: James McCoy -Standards-Version: 3.9.4 -Build-Depends: libacl1-dev, libgpmg1-dev [linux-any], +Standards-Version: 3.9.5 +Build-Depends: libacl1-dev, libgpmg1-dev [linux-any], autoconf, # B-D for dh_bugfiles debhelper (>= 7.2.3~), libtinfo-dev | libncurses5-dev, libselinux1-dev [linux-any], @@ -14,15 +15,15 @@ libgtk2.0-dev, libxaw7-dev, libxt-dev, libxpm-dev, libgnomeui-dev, # B-D for language interpreters # Update d/rules when ruby version changes - libperl-dev, tcl-dev, python-dev, ruby, ruby-dev, lua5.1, - liblua5.1-dev + libperl-dev, tcl-dev, python-dev, ruby, ruby-dev, lua5.2, + liblua5.2-dev # ruby1.8{,-dev} Provides: ruby{,-dev} which can cause breakage on buildds if # ruby/ruby1.8-dev or ruby1.8/ruby-dev pairs get installed due to a mismatch in # the ruby binary version and the library version -Build-Conflicts: ruby1.8, ruby1.8-dev +Build-Conflicts: ruby1.8 (<< 1.8.7.358-8), ruby1.8-dev (<< 1.8.7.358-8) Build-Depends-Indep: docbook-xml, docbook-utils -Vcs-Hg: http://hg.debian.org/hg/pkg-vim/vim -Vcs-Browser: http://hg.debian.org/hg/pkg-vim/vim +XS-Debian-Vcs-Hg: http://anonscm.debian.org/hg/pkg-vim/vim +XS-Debian-Vcs-Browser: http://anonscm.debian.org/hg/pkg-vim/vim Homepage: http://www.vim.org/ Package: vim-common diff -Nru vim-7.4a.012/debian/patches/debian/disabled-modelines.patch vim-7.4.273/debian/patches/debian/disabled-modelines.patch --- vim-7.4a.012/debian/patches/debian/disabled-modelines.patch 2013-07-10 03:04:16.000000000 +0000 +++ vim-7.4.273/debian/patches/debian/disabled-modelines.patch 2014-03-26 01:32:16.000000000 +0000 @@ -9,9 +9,11 @@ Bug-Debian: http://bugs.debian.org/472522 Bug-Ubuntu: https://launchpad.net/bugs/130531 ---- a/runtime/doc/options.txt -+++ b/runtime/doc/options.txt -@@ -4923,7 +4923,7 @@ +Index: vim/runtime/doc/options.txt +=================================================================== +--- vim.orig/runtime/doc/options.txt 2014-03-25 21:32:14.059753991 -0400 ++++ vim/runtime/doc/options.txt 2014-03-25 21:32:14.055753991 -0400 +@@ -4924,7 +4924,7 @@ *'modeline'* *'ml'* *'nomodeline'* *'noml'* 'modeline' 'ml' boolean (Vim default: on (off for root), diff -Nru vim-7.4a.012/debian/patches/debian/extra-tex-detection.patch vim-7.4.273/debian/patches/debian/extra-tex-detection.patch --- vim-7.4a.012/debian/patches/debian/extra-tex-detection.patch 2013-06-27 00:57:45.000000000 +0000 +++ vim-7.4.273/debian/patches/debian/extra-tex-detection.patch 2014-03-26 01:32:24.000000000 +0000 @@ -6,9 +6,11 @@ Bug-Debian: http://bugs.debian.org/384479 Forwarded: 2006-08-26 ---- a/runtime/filetype.vim -+++ b/runtime/filetype.vim -@@ -2137,7 +2137,7 @@ +Index: vim/runtime/filetype.vim +=================================================================== +--- vim.orig/runtime/filetype.vim 2014-03-25 21:32:20.683754034 -0400 ++++ vim/runtime/filetype.vim 2014-03-25 21:32:20.683754034 -0400 +@@ -2158,7 +2158,7 @@ call cursor(1,1) let firstNC = search('^\s*[^[:space:]%]', 'c', 1000) if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword. diff -Nru vim-7.4a.012/debian/patches/debian/ubuntu-grub-syntax.patch vim-7.4.273/debian/patches/debian/ubuntu-grub-syntax.patch --- vim-7.4a.012/debian/patches/debian/ubuntu-grub-syntax.patch 1970-01-01 00:00:00.000000000 +0000 +++ vim-7.4.273/debian/patches/debian/ubuntu-grub-syntax.patch 2014-05-02 03:39:48.000000000 +0000 @@ -0,0 +1,13 @@ +Index: vim-7.3.000+hg~ee53a39d5896/runtime/syntax/grub.vim +=================================================================== +--- vim-7.3.000+hg~ee53a39d5896.orig/runtime/syntax/grub.vim 2010-10-17 12:51:13.000000000 +0200 ++++ vim-7.3.000+hg~ee53a39d5896/runtime/syntax/grub.vim 2010-10-17 12:51:29.000000000 +0200 +@@ -40,7 +40,7 @@ + \ displaymem embed find fstest geometry halt help + \ impsprobe initrd install ioprobe kernel lock + \ makeactive map md5crypt module modulenounzip pause +- \ quit reboot read root rootnoverify savedefault setup ++ \ quiet quit reboot read root rootnoverify savedefault setup + \ testload testvbe uppermem vbeprobe + + syn keyword grubSpecial saved diff -Nru vim-7.4a.012/debian/patches/debian/update-upstart-syntax.patch vim-7.4.273/debian/patches/debian/update-upstart-syntax.patch --- vim-7.4a.012/debian/patches/debian/update-upstart-syntax.patch 1970-01-01 00:00:00.000000000 +0000 +++ vim-7.4.273/debian/patches/debian/update-upstart-syntax.patch 2014-05-02 03:39:48.000000000 +0000 @@ -0,0 +1,17 @@ +Author: Clint Byrum +Description: Add missing setuid and setgid keywords. +Forwarded: no + +Index: vim-7.3.547/runtime/syntax/upstart.vim +=================================================================== +--- vim-7.3.547.orig/runtime/syntax/upstart.vim 2012-06-06 14:08:38.000000000 -0700 ++++ vim-7.3.547/runtime/syntax/upstart.vim 2012-12-21 09:11:08.144350670 -0800 +@@ -36,7 +36,7 @@ + " one argument + syn keyword upstartStatement description author version instance expect + syn keyword upstartStatement pid kill normal console env exit export +-syn keyword upstartStatement umask nice oom chroot chdir exec ++syn keyword upstartStatement umask nice oom chroot chdir exec setuid setgid + + " two arguments + syn keyword upstartStatement limit diff -Nru vim-7.4a.012/debian/patches/debian/vim-tiny.patch vim-7.4.273/debian/patches/debian/vim-tiny.patch --- vim-7.4a.012/debian/patches/debian/vim-tiny.patch 2013-06-24 02:18:58.000000000 +0000 +++ vim-7.4.273/debian/patches/debian/vim-tiny.patch 2014-04-08 00:39:39.000000000 +0000 @@ -20,7 +20,7 @@ } mparm_T; /* Values for edit_type. */ -@@ -1644,6 +1647,10 @@ +@@ -1641,6 +1644,10 @@ } else if (STRNICMP(initstr, "vim", 3) == 0) initstr += 3; @@ -31,7 +31,7 @@ /* Catch "[r][g]vimdiff" and "[r][g]viewdiff". */ if (STRICMP(initstr, "diff") == 0) -@@ -2972,7 +2979,12 @@ +@@ -2968,7 +2975,12 @@ * Get system wide defaults, if the file name is defined. */ #ifdef SYS_VIMRC_FILE @@ -47,7 +47,7 @@ (void)do_source((char_u *)"$VIMRUNTIME/macmap.vim", FALSE, DOSO_NONE); --- a/src/os_unix.h +++ b/src/os_unix.h -@@ -240,6 +240,9 @@ +@@ -242,6 +242,9 @@ /* * Unix system-dependent file names */ diff -Nru vim-7.4a.012/debian/patches/series vim-7.4.273/debian/patches/series --- vim-7.4a.012/debian/patches/series 2013-07-13 01:24:47.000000000 +0000 +++ vim-7.4.273/debian/patches/series 2014-05-02 19:10:36.000000000 +0000 @@ -1,9 +1,10 @@ -upstream/python-ftplugin-include.patch -upstream/python-ftplugin-keywordprg.patch upstream/extra-rst-detection.patch upstream/es.po-recover.patch upstream/pythoncomplete-autoload-init.patch -upstream/shadowdir-fixes.patch +upstream/debcontrol-syntax-arch.patch +upstream/debian-syntax-releases.patch debian/vim-tiny.patch debian/disabled-modelines.patch debian/extra-tex-detection.patch +debian/ubuntu-grub-syntax.patch +debian/update-upstart-syntax.patch diff -Nru vim-7.4a.012/debian/patches/upstream/debcontrol-syntax-arch.patch vim-7.4.273/debian/patches/upstream/debcontrol-syntax-arch.patch --- vim-7.4a.012/debian/patches/upstream/debcontrol-syntax-arch.patch 1970-01-01 00:00:00.000000000 +0000 +++ vim-7.4.273/debian/patches/upstream/debcontrol-syntax-arch.patch 2014-05-02 19:10:27.000000000 +0000 @@ -0,0 +1,48 @@ +--- a/runtime/syntax/debcontrol.vim ++++ b/runtime/syntax/debcontrol.vim +@@ -3,7 +3,7 @@ + " Maintainer: Debian Vim Maintainers + " Former Maintainers: Gerfried Fuchs + " Wichert Akkerman +-" Last Change: 2013 Oct 28 ++" Last Change: 2014 May 01 + " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim + + " Standard syntax initialization +@@ -13,6 +13,9 @@ + finish + endif + ++let s:cpo_save = &cpo ++set cpo&vim ++ + " Should match case except for the keys of each field + syn case match + +@@ -23,8 +26,17 @@ + syn match debControlComma ", *" + syn match debControlSpace " " + ++let s:kernels = '\%(linux\|hurd\|kfreebsd\|knetbsd\|kopensolaris\|netbsd\)' ++let s:archs = '\%(alpha\|amd64\|armeb\|armel\|armhf\|arm64\|avr32\|hppa\|i386' ++ \ . '\|ia64\|lpia\|m32r\|m68k\|mipsel\|mips\|powerpcspe\|powerpc\|ppc64el' ++ \ . '\|ppc64\|s390x\|s390\|sh3eb\|sh3\|sh4eb\|sh4\|sh\|sparc64\|sparc\|x32\)' ++let s:pairs = 'hurd-i386\|kfreebsd-i386\|kfreebsd-amd64\|knetbsd-i386\|kopensolaris-i386\|netbsd-alpha\|netbsd-i386' ++ + " Define some common expressions we can use later on +-syn match debcontrolArchitecture contained "\%(all\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\|hf\|64\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\%(spe\)\=\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|x32\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\|any\)" ++exe 'syn match debcontrolArchitecture contained "\%(all\|'. s:kernels .'-any\|\%(any-\)\='. s:archs .'\|'. s:pairs .'\|any\)"' ++ ++unlet s:kernels s:archs s:pairs ++ + syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)" + syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" + syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" +@@ -108,4 +120,7 @@ + + let b:current_syntax = "debcontrol" + ++let &cpo = s:cpo_save ++unlet s:cpo_save ++ + " vim: ts=8 sw=2 diff -Nru vim-7.4a.012/debian/patches/upstream/debian-syntax-releases.patch vim-7.4.273/debian/patches/upstream/debian-syntax-releases.patch --- vim-7.4a.012/debian/patches/upstream/debian-syntax-releases.patch 1970-01-01 00:00:00.000000000 +0000 +++ vim-7.4.273/debian/patches/upstream/debian-syntax-releases.patch 2014-04-25 02:49:47.000000000 +0000 @@ -0,0 +1,40 @@ +--- a/runtime/syntax/debchangelog.vim ++++ b/runtime/syntax/debchangelog.vim +@@ -3,7 +3,7 @@ + " Maintainer: Debian Vim Maintainers + " Former Maintainers: Gerfried Fuchs + " Wichert Akkerman +-" Last Change: 2014 Jan 20 ++" Last Change: 2014 Apr 24 + " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim + + " Standard syntax initialization +@@ -19,7 +19,7 @@ + " Define some common expressions we can use later on + syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " + syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\=" +-syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(lucid|precise|quantal|saucy|trusty)%(-%(security|proposed|updates|backports|commercial|partner))=)+" ++syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(devel|lucid|precise|quantal|saucy|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+" + syn match debchangelogVersion contained "(.\{-})" + syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" + syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" +--- a/runtime/syntax/debsources.vim ++++ b/runtime/syntax/debsources.vim +@@ -2,7 +2,7 @@ + " Language: Debian sources.list + " Maintainer: Debian Vim Maintainers + " Former Maintainer: Matthijs Mohlmann +-" Last Change: 2014 Jan 20 ++" Last Change: 2014 Apr 24 + " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim + + " Standard syntax initialization +@@ -23,7 +23,7 @@ + + " Match uri's + syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ +-syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|lucid\|precise\|quantal\|saucy\|trusty\)\([-[:alnum:]_./]*\)+ ++syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|devel\|lucid\|precise\|quantal\|saucy\|trusty\|utopic\)\([-[:alnum:]_./]*\)+ + + " Associate our matches and regions with pretty colours + hi def link debsourcesLine Error diff -Nru vim-7.4a.012/debian/patches/upstream/python-ftplugin-include.patch vim-7.4.273/debian/patches/upstream/python-ftplugin-include.patch --- vim-7.4a.012/debian/patches/upstream/python-ftplugin-include.patch 2013-02-22 01:46:54.000000000 +0000 +++ vim-7.4.273/debian/patches/upstream/python-ftplugin-include.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -Subject: Correct value of 'include' in ftplugin/python.vim - 'include' needs to be anchored to the beginning of the line as well as - correctly escaping "\s" to prevent incorrect matches. -Forwarded: 2008-07-16 -Author: Jan Hudec -Bug-Debian: http://bugs.debian.org/367259 - ---- a/runtime/ftplugin/python.vim -+++ b/runtime/ftplugin/python.vim -@@ -10,7 +10,7 @@ - - setlocal cinkeys-=0# - setlocal indentkeys-=0# --setlocal include=\s*\\(from\\\|import\\) -+setlocal include=^\\s*\\(from\\\|import\\) - setlocal includeexpr=substitute(v:fname,'\\.','/','g') - setlocal suffixesadd=.py - setlocal comments-=:% diff -Nru vim-7.4a.012/debian/patches/upstream/python-ftplugin-keywordprg.patch vim-7.4.273/debian/patches/upstream/python-ftplugin-keywordprg.patch --- vim-7.4a.012/debian/patches/upstream/python-ftplugin-keywordprg.patch 2013-02-22 01:46:54.000000000 +0000 +++ vim-7.4.273/debian/patches/upstream/python-ftplugin-keywordprg.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Subject: Set keywordprg=pydoc in ftplugin/python.vim -Forwarded: 2008-07-16 -Author: Stefano Zacchiroli -Bug-Debian: http://bugs.debian.org/389332 - ---- a/runtime/ftplugin/python.vim -+++ b/runtime/ftplugin/python.vim -@@ -16,6 +16,8 @@ - setlocal comments-=:% - setlocal commentstring=#%s - -+setlocal keywordprg=pydoc -+ - setlocal omnifunc=pythoncomplete#Complete - - set wildignore+=*.pyc diff -Nru vim-7.4a.012/debian/patches/upstream/shadowdir-fixes.patch vim-7.4.273/debian/patches/upstream/shadowdir-fixes.patch --- vim-7.4a.012/debian/patches/upstream/shadowdir-fixes.patch 2013-07-13 01:24:47.000000000 +0000 +++ vim-7.4.273/debian/patches/upstream/shadowdir-fixes.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ ---- a/src/testdir/test89.in -+++ b/src/testdir/test89.in -@@ -51,7 +51,10 @@ - :$put h - :" - :let cwd=getcwd() --:cd ../.. -+:cd .. -+:" Tests may be run from a shadow directory, so an extra cd needs to be done to -+:" get above src/ -+:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif - :$put ='' - :$put ='Testing findfile' - :$put ='' ---- a/src/testdir/test86.in -+++ b/src/testdir/test86.in -@@ -857,8 +857,19 @@ - cb.append(fnamemodify('.', ':p:h:t')) - cb.append(vim.eval('@%')) - os.chdir('..') --cb.append(fnamemodify('.', ':p:h:t')) --cb.append(vim.eval('@%').replace(os.path.sep, '/')) -+path = fnamemodify('.', ':p:h:t') -+if path != 'src': -+ # Running tests from a shadow directory, so move up another level -+ # This will result in @% looking like shadow/testdir/test86.in, hence the -+ # extra fnamemodify -+ os.chdir('..') -+ cb.append(fnamemodify('.', ':p:h:t')) -+ cb.append(fnamemodify(vim.eval('@%'), ':s?^%s.??' % path).replace(os.path.sep, '/')) -+ os.chdir(path) -+ del path -+else: -+ cb.append(fnamemodify('.', ':p:h:t')) -+ cb.append(vim.eval('@%').replace(os.path.sep, '/')) - os.chdir('testdir') - cb.append(fnamemodify('.', ':p:h:t')) - cb.append(vim.eval('@%')) ---- a/src/Makefile -+++ b/src/Makefile -@@ -2366,6 +2366,7 @@ - ../../testdir/vimrc.unix \ - ../../testdir/*.in \ - ../../testdir/*.vim \ -+ ../../testdir/python* \ - ../../testdir/test83-tags? \ - ../../testdir/*.ok . - diff -Nru vim-7.4a.012/debian/README.Debian vim-7.4.273/debian/README.Debian --- vim-7.4a.012/debian/README.Debian 2013-02-22 01:46:54.000000000 +0000 +++ vim-7.4.273/debian/README.Debian 2014-03-26 01:23:32.000000000 +0000 @@ -29,7 +29,7 @@ ------------------------------------ Modelines have historically been a source of security/resource vulnerabilities -and are therefore disabled by default in /usr/share/vim/vimcurrent/debian.vim. +and are therefore disabled by default in $VIMRUNTIME/debian.vim. You can enable them in ~/.vimrc or /etc/vim/vimrc with "set modeline". diff -Nru vim-7.4a.012/debian/rules vim-7.4.273/debian/rules --- vim-7.4a.012/debian/rules 2013-07-10 11:33:54.000000000 +0000 +++ vim-7.4.273/debian/rules 2014-05-02 03:39:48.000000000 +0000 @@ -56,8 +56,8 @@ OPTFLAGS:=--enable-cscope ifeq ($(DEB_HOST_ARCH_OS),linux) OPTFLAGS+=--enable-gpm - OPTFLAGS+=--enable-selinux - TINYFLAGS+=--enable-selinux + OPTFLAGS+=--enable-selinux --disable-smack + TINYFLAGS+=--enable-selinux --disable-smack else OPTFLAGS+=--disable-gpm endif @@ -155,7 +155,7 @@ EXPORT_DIR ?= .. ORIG_SOURCE := $(EXPORT_DIR)/$(NAME)_$(DEB_VERSION_UPSTREAM).orig.tar.gz PER_VARIANT_FILES := install postinst prerm links -LANGS := fr it pl ru +LANGS := fr it pl ru ja DOT_IN_DEPS := debian/vim-common.install DOT_IN_DEPS += debian/vim-common.links @@ -267,7 +267,9 @@ cp src/config.mk.dist src/auto/config.mk configure-stamp-%: SHADOWDIR=$* -configure-stamp-%: src/auto/config.mk +# When configure.in is being patched by Debian, autoconf-stamp needs to be a +# prerequisite for this target and autoconf needs to be added to Build-Depends +configure-stamp-%: src/auto/config.mk autoconf-stamp dh_testdir @echo "*** DEBIAN *** CONFIGURING VARIANT $*" $(MAKE) -C src shadow SHADOWDIR=$(SHADOWDIR) @@ -321,10 +323,11 @@ # language interfaces. if [ $(MAKETEST) = "yes" ]; then \ if [ -e src/vim-nox/vim ]; then \ - $(MAKE) -j1 -C src/vim-nox test; \ + $(MAKE) -j1 -C src/vim-nox test || true; \ else \ - $(MAKE) -j1 -C src/vim-basic test; \ + $(MAKE) -j1 -C src/vim-basic test || true; \ fi; \ + [ $$(find src -type f -name '*.failed' \! -name 'test86.failed' | wc -l) -eq 0 ]; \ fi # installvimbin installs the vim binary under debian/tmp but we install # it into the vim package from src/. Need to rm it from debian/tmp so @@ -332,18 +335,16 @@ rm -f debian/tmp/usr/bin/vim mv src/vim-basic/vim src/vim-basic/vim.basic - # DEBIAN INSTALLATION - - # Use UTF-8 manpages for all languages and install them simply into - # man/$lang - rm -rf $(DESTDIR)/usr/share/man/fr.ISO8859-1 $(DESTDIR)/usr/share/man/fr - rm -rf $(DESTDIR)/usr/share/man/it.ISO8859-1 $(DESTDIR)/usr/share/man/it - rm -rf $(DESTDIR)/usr/share/man/pl.ISO8859-2 $(DESTDIR)/usr/share/man/pl - rm -rf $(DESTDIR)/usr/share/man/ru.KOI8-R - mv $(DESTDIR)/usr/share/man/fr.UTF-8 $(DESTDIR)/usr/share/man/fr - mv $(DESTDIR)/usr/share/man/it.UTF-8 $(DESTDIR)/usr/share/man/it - mv $(DESTDIR)/usr/share/man/pl.UTF-8 $(DESTDIR)/usr/share/man/pl - mv $(DESTDIR)/usr/share/man/ru.UTF-8 $(DESTDIR)/usr/share/man/ru +# DEBIAN INSTALLATION +# Use UTF-8 manpages for all languages. +# If a .UTF-8 directory doesn't exist, then the $lang directory is already UTF-8. + for L in $(LANGS); do \ + if [ -d "$(DESTDIR)/usr/share/man/$$L.UTF-8" ]; then \ + rm -rf "$(DESTDIR)/usr/share/man/$$L"; \ + mv "$(DESTDIR)/usr/share/man/$$L.UTF-8" "$(DESTDIR)/usr/share/man/$$L"; \ + fi; \ + rm -rf "$(DESTDIR)/usr/share/man/$$L."*; \ + done # rm stuff handled by alternatives rm -f $(DESTDIR)/usr/bin/ex $(DESTDIR)/usr/bin/view @@ -468,6 +469,7 @@ # the other variants only include the binary install-stamp-%: export DH_OPTIONS=-p$* install-stamp-%: DESTDIR=$(CURDIR)/debian/$* +install-stamp-%: VARIANT=$(patsubst vim-%,%,$*) install-stamp-%: build-stamp-% dh_testdir dh_testroot @@ -479,17 +481,18 @@ # to be kept in sync with those in "install-stamp-vim-basic" target for x in $(PER_VARIANT_FILES) ; do \ if [ "$*" = "vim-nox" ]; then \ - sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(patsubst vim-%,%,$*):g" \ + sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(VARIANT):g" \ -e "s:@COMMON@:vim-common:" \ debian/vim-variant.$$x > debian/$*.$$x ;\ else \ - sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(patsubst vim-%,%,$*):g" \ + sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(VARIANT):g" \ -e "s:@COMMON@:vim-gui-common:" \ debian/vim-variant.$$x > debian/$*.$$x ;\ fi \ done - sed -e "s:@PKG@:$*:;s:@VARIANT@:$(patsubst vim-%,%,$*):" \ + sed -e "s:@PKG@:$*:;s:@VARIANT@:$(VARIANT):" \ debian/lintian/vim-variant > debian/lintian/$* + echo "vim-$(VARIANT): spelling-error-in-binary usr/bin/vim.$(VARIANT) tEH the" >> debian/lintian/$* for L in $(LANGS); do \ sed -e "s:\(.*\)@LANG_ALTS@:\1--slave \$$mandir/$$L/man1/\$$i.1.gz \$$i.$$L.1.gz \$$mandir/$$L/man1/vim.1.gz \\\\\n&:" \ -i debian/$*.postinst; \ diff -Nru vim-7.4a.012/debian/runtime/vimrc vim-7.4.273/debian/runtime/vimrc --- vim-7.4a.012/debian/runtime/vimrc 2013-05-29 23:59:28.000000000 +0000 +++ vim-7.4.273/debian/runtime/vimrc 2014-05-02 03:39:48.000000000 +0000 @@ -1,10 +1,9 @@ -" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just -" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime -" you can find below. If you wish to change any of those settings, you should -" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten -" everytime an upgrade of the vim packages is performed. It is recommended to -" make changes after sourcing debian.vim since it alters the value of the -" 'compatible' option. +" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by +" the call to :runtime you can find below. If you wish to change any of those +" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim +" will be overwritten everytime an upgrade of the vim packages is performed. +" It is recommended to make changes after sourcing debian.vim since it alters +" the value of the 'compatible' option. " This line should not be removed as it ensures that various options are " properly set to work with the Vim-related packages available in Debian. @@ -17,7 +16,9 @@ " Vim5 and later versions support syntax highlighting. Uncommenting the next " line enables syntax highlighting by default. -"syntax on +if has("syntax") + syntax on +endif " If using a dark background within the editing area and syntax highlighting " turn on this option as well diff -Nru vim-7.4a.012/debian/source/lintian-overrides vim-7.4.273/debian/source/lintian-overrides --- vim-7.4a.012/debian/source/lintian-overrides 2013-02-22 01:46:54.000000000 +0000 +++ vim-7.4.273/debian/source/lintian-overrides 2014-03-26 01:23:32.000000000 +0000 @@ -2,5 +2,5 @@ vim source: debhelper-but-no-misc-depends vim-lesstif # vim-tiny provides stub help.txt/tags which are diverted when vim-runtime is # installed -vim source: binaries-have-file-conflict vim-runtime vim-tiny usr/share/vim/vim73/doc/help.txt -vim source: binaries-have-file-conflict vim-runtime vim-tiny usr/share/vim/vim73/doc/tags +vim source: binaries-have-file-conflict vim-runtime vim-tiny usr/share/vim/vim74/doc/help.txt +vim source: binaries-have-file-conflict vim-runtime vim-tiny usr/share/vim/vim74/doc/tags diff -Nru vim-7.4a.012/debian/vim-common.links.in vim-7.4.273/debian/vim-common.links.in --- vim-7.4a.012/debian/vim-common.links.in 2013-02-22 01:46:54.000000000 +0000 +++ vim-7.4.273/debian/vim-common.links.in 2014-03-26 01:23:32.000000000 +0000 @@ -1,5 +1,4 @@ etc/vim usr/share/vim/vimfiles etc/vim/vimrc usr/share/vim/vimrc -usr/share/vim/@VIMCUR@ usr/share/vim/vimcurrent usr/share/man/man1/vim.1 usr/share/man/man1/rvim.1 usr/share/man/man1/vim.1 usr/share/man/man1/rview.1 diff -Nru vim-7.4a.012/debian/watch vim-7.4.273/debian/watch --- vim-7.4a.012/debian/watch 2013-02-22 01:46:54.000000000 +0000 +++ vim-7.4.273/debian/watch 2014-03-26 01:23:32.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -opts=dversionmangle=s/\.\d+$// \ +opts=pasv,dversionmangle=s/\.\d+$// \ ftp://ftp.vim.org/pub/vim/unix/vim-(\d+\.\d+)\.tar\.bz2 diff -Nru vim-7.4a.012/Filelist vim-7.4.273/Filelist --- vim-7.4a.012/Filelist 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/Filelist 2014-04-29 18:04:09.000000000 +0000 @@ -80,10 +80,15 @@ src/main.aap \ src/testdir/main.aap \ src/testdir/*.in \ + src/testdir/sautest/autoload/*.vim \ src/testdir/test[0-9]*.ok \ + src/testdir/test[0-9]*a.ok \ + src/testdir/test_[a-z]*.ok \ src/testdir/test49.vim \ src/testdir/test60.vim \ src/testdir/test83-tags? \ + src/testdir/test77a.com \ + src/testdir/test_*.vim \ src/testdir/python2/*.py \ src/testdir/python3/*.py \ src/testdir/pythonx/*.py \ @@ -694,6 +699,7 @@ runtime/doc/*-fr.UTF-8.1 \ runtime/doc/*-it.1 \ runtime/doc/*-it.UTF-8.1 \ + runtime/doc/*-ja.UTF-8.1 \ runtime/doc/*-pl.1 \ runtime/doc/*-pl.UTF-8.1 \ runtime/doc/*-ru.1 \ diff -Nru vim-7.4a.012/Makefile vim-7.4.273/Makefile --- vim-7.4a.012/Makefile 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/Makefile 2014-04-29 18:04:09.000000000 +0000 @@ -74,7 +74,7 @@ # Before creating an archive first delete all backup files, *.orig, etc. MAJOR = 7 -MINOR = 4a +MINOR = 4 # Uncomment this line if the Win32s version is to be included. # DOSBIN_S = dosbin_s @@ -92,8 +92,6 @@ # runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a # minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def, # src/gvim.exe.mnf. -# - Adjust the date and other info in src/version.h. -# - Correct included_patches[] in src/version.c. # - Compile Vim with GTK, Perl, Python, Python3, TCL, Ruby, MZscheme, Lua (if # you can make it all work), Cscope and "huge" features. Exclude workshop # and SNiFF. @@ -102,8 +100,14 @@ # - With these features: "make depend" (works best with gcc). # - If you have a lint program: "make lint" and check the output (ignore GTK # warnings). -# - Enable the efence library in "src/Makefile" and run "make test". Disable -# Python and Ruby to avoid trouble with threads (efence is not threadsafe). +# - If you have valgrind, enable it in src/testdir/Makefile and run "make +# test". Enable EXITFREE, disable GUI, scheme and tcl to avoid false alarms. +# Check the valgrind output. +# - If you have the efence library, enable it in "src/Makefile" and run "make +# test". Disable Python and Ruby to avoid trouble with threads (efence is +# not threadsafe). +# - Adjust the date and other info in src/version.h. +# - Correct included_patches[] in src/version.c. # - Check for missing entries in runtime/makemenu.vim (with checkmenu script). # - Check for missing options in runtime/optwin.vim et al. (with check.vim). # - Do "make menu" to update the runtime/synmenu.vim file. @@ -111,8 +115,8 @@ # - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL # ADDITIONS". # - In runtime/doc run "make" and "make html" to check for errors. -# - Check if src/Makefile and src/feature.h don't contain any personal -# preferences or the GTK, Perl, etc. mentioned above. +# - Check if src/Makefile, src/testdir/Makefile and src/feature.h don't contain +# any personal preferences or the changes mentioned above. # - Check file protections to be "644" for text and "755" for executables (run # the "check" script). # - Check compiling on Amiga, MS-DOS and MS-Windows. @@ -137,7 +141,7 @@ # Or, when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the # paths when necessary). # For Windows 98/ME the 2003 version is required, but then the executable -# won't work on Windows 7 and 64 bit. +# won't work on Windows 7 and 64 bit systems. # - "nmake -f Make_mvc.mak" (use the same path as for vcvars32.bat) # - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output. # - Rename vim.exe to vimw32.exe, xxd/xxd.exe to xxdw32.exe. diff -Nru vim-7.4a.012/nsis/gvim.nsi vim-7.4.273/nsis/gvim.nsi --- vim-7.4a.012/nsis/gvim.nsi 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/nsis/gvim.nsi 2014-04-29 18:04:09.000000000 +0000 @@ -22,7 +22,7 @@ !define HAVE_NLS !define VER_MAJOR 7 -!define VER_MINOR 4a +!define VER_MINOR 4 # ----------- No configurable settings below this line ----------- diff -Nru vim-7.4a.012/README_amibin.txt vim-7.4.273/README_amibin.txt --- vim-7.4a.012/README_amibin.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_amibin.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_amibin.txt for version 7.4a of Vim: Vi IMproved. +README_amibin.txt for version 7.4 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_ami.txt" for installation instructions for the Amiga. diff -Nru vim-7.4a.012/README_amisrc.txt vim-7.4.273/README_amisrc.txt --- vim-7.4a.012/README_amisrc.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_amisrc.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_amisrc.txt for version 7.4a of Vim: Vi IMproved. +README_amisrc.txt for version 7.4 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_ami.txt" for installation instructions for the Amiga. diff -Nru vim-7.4a.012/README_ami.txt vim-7.4.273/README_ami.txt --- vim-7.4a.012/README_ami.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_ami.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_ami.txt for version 7.4a of Vim: Vi IMproved. +README_ami.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on Amiga systems. See README.txt for general information about Vim. diff -Nru vim-7.4a.012/README_bindos.txt vim-7.4.273/README_bindos.txt --- vim-7.4a.012/README_bindos.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_bindos.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_bindos.txt for version 7.4a of Vim: Vi IMproved. +README_bindos.txt for version 7.4 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows. diff -Nru vim-7.4a.012/README_dos.txt vim-7.4.273/README_dos.txt --- vim-7.4a.012/README_dos.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_dos.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_dos.txt for version 7.4a of Vim: Vi IMproved. +README_dos.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on MS-DOS and MS-Windows systems. See "README.txt" for general information about Vim. diff -Nru vim-7.4a.012/README_extra.txt vim-7.4.273/README_extra.txt --- vim-7.4a.012/README_extra.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_extra.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_extra.txt for version 7.4a of Vim: Vi IMproved. +README_extra.txt for version 7.4 of Vim: Vi IMproved. These extra files of Vim are for special purposes. This README explains what the files are for. For general information about Vim, see the "README.txt" diff -Nru vim-7.4a.012/README_mac.txt vim-7.4.273/README_mac.txt --- vim-7.4a.012/README_mac.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_mac.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_mac.txt for version 7.4a of Vim: Vi IMproved. +README_mac.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on Macintosh systems. See "README.txt" for general information about Vim. diff -Nru vim-7.4a.012/README_ole.txt vim-7.4.273/README_ole.txt --- vim-7.4a.012/README_ole.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_ole.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_ole.txt for version 7.4a of Vim: Vi IMproved. +README_ole.txt for version 7.4 of Vim: Vi IMproved. This archive contains gvim.exe with OLE interface and VisVim. This version of gvim.exe can also load a number of interface dynamically (you diff -Nru vim-7.4a.012/README_os2.txt vim-7.4.273/README_os2.txt --- vim-7.4a.012/README_os2.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_os2.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_os2.txt for version 7.4a of Vim: Vi IMproved. +README_os2.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on OS/2 systems. See "README.txt" for general information about Vim. diff -Nru vim-7.4a.012/README_os390.txt vim-7.4.273/README_os390.txt --- vim-7.4a.012/README_os390.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_os390.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_zOS.txt for version 7.4a of Vim: Vi IMproved. +README_zOS.txt for version 7.4 of Vim: Vi IMproved. This readme explains how to build Vim on z/OS. Formerly called OS/390. See "README.txt" for general information about Vim. diff -Nru vim-7.4a.012/README_srcdos.txt vim-7.4.273/README_srcdos.txt --- vim-7.4a.012/README_srcdos.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_srcdos.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_srcdos.txt for version 7.4a of Vim: Vi IMproved. +README_srcdos.txt for version 7.4 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows. diff -Nru vim-7.4a.012/README_src.txt vim-7.4.273/README_src.txt --- vim-7.4a.012/README_src.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_src.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_src.txt for version 7.4a of Vim: Vi IMproved. +README_src.txt for version 7.4 of Vim: Vi IMproved. The source archive contains the files needed to compile Vim on Unix systems. It is packed for Unix systems (NL line separator). diff -Nru vim-7.4a.012/README.txt vim-7.4.273/README.txt --- vim-7.4a.012/README.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README.txt for version 7.4a of Vim: Vi IMproved. +README.txt for version 7.4 of Vim: Vi IMproved. WHAT IS VIM diff -Nru vim-7.4a.012/README_unix.txt vim-7.4.273/README_unix.txt --- vim-7.4a.012/README_unix.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_unix.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_unix.txt for version 7.4a of Vim: Vi IMproved. +README_unix.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on Unix systems. See "README.txt" for general information about Vim. diff -Nru vim-7.4a.012/README_vms.txt vim-7.4.273/README_vms.txt --- vim-7.4a.012/README_vms.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_vms.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_vms.txt for version 7.4a of Vim: Vi IMproved. +README_vms.txt for version 7.4 of Vim: Vi IMproved. This file explains the installation of Vim on VMS systems. See "README.txt" in the runtime archive for information about Vim. diff -Nru vim-7.4a.012/README_w32s.txt vim-7.4.273/README_w32s.txt --- vim-7.4a.012/README_w32s.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/README_w32s.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -README_w32s.txt for version 7.4a of Vim: Vi IMproved. +README_w32s.txt for version 7.4 of Vim: Vi IMproved. This archive contains the gvim.exe that was specifically compiled for use in the Win32s subsystem in MS-Windows 3.1 and 3.11. diff -Nru vim-7.4a.012/runtime/autoload/clojurecomplete.vim vim-7.4.273/runtime/autoload/clojurecomplete.vim --- vim-7.4a.012/runtime/autoload/clojurecomplete.vim 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/autoload/clojurecomplete.vim 2014-04-29 18:04:09.000000000 +0000 @@ -1,20 +1,22 @@ " Vim completion script -" Language: Clojure -" Maintainer: Sung Pae -" URL: https://github.com/guns/vim-clojure-static -" License: Same as Vim -" Last Change: 05 February 2013 +" Language: Clojure +" Maintainer: Sung Pae +" URL: https://github.com/guns/vim-clojure-static +" License: Same as Vim +" Last Change: 27 March 2014 -" Special forms and public vars in clojure.core -" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-002/vim_clojure_static.clj -" Clojure 1.5.0-RC6 -let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*read-whitelist*","*source-path*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn","bound-fn*","bound?","butlast","byte","byte-array","bytes","case","cast","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","doubles","drop","drop-last","drop-while","empty","empty?","ensure","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-set","identical?","identity","if","if-let","if-not","ifn?","import","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","quot","quote","rand","rand-int","rand-nth","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","realized?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some->","some->>","some-fn","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","sync","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","update-in","update-proxy","use","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","when","when-first","when-let","when-not","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"] +" -*- COMPLETION WORDS -*- +" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-010/clj/src/vim_clojure_static/generate.clj +" Clojure version 1.6.0 +let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*source-path*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn","bound-fn*","bound?","butlast","byte","byte-array","bytes","case","cast","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","doubles","drop","drop-last","drop-while","empty","empty?","ensure","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","identical?","identity","if","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","quot","quote","rand","rand-int","rand-nth","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","realized?","record?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","sync","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unsigned-bit-shift-right","update-in","update-proxy","use","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"] -" Simple word completion omnifunc +" Simple word completion for special forms and public vars in clojure.core function! clojurecomplete#Complete(findstart, base) - if a:findstart - return searchpos('\<', 'bnW', line('.'))[1] - 1 - else - return { 'words': filter(copy(s:words), 'v:val =~ "\\V\\^' . a:base . '"') } - endif + if a:findstart + return searchpos('\<', 'bnW', line('.'))[1] - 1 + else + return { 'words': filter(copy(s:words), 'v:val =~# "\\V\\^' . a:base . '"') } + endif endfunction + +" vim:sts=8:sw=8:ts=8:noet diff -Nru vim-7.4a.012/runtime/autoload/getscript.vim vim-7.4.273/runtime/autoload/getscript.vim --- vim-7.4a.012/runtime/autoload/getscript.vim 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/autoload/getscript.vim 2014-04-29 18:04:09.000000000 +0000 @@ -1,8 +1,8 @@ " --------------------------------------------------------------------- " getscript.vim " Author: Charles E. Campbell -" Date: Apr 17, 2013 -" Version: 35 +" Date: Jan 21, 2014 +" Version: 36 " Installing: :help glvs-install " Usage: :help glvs " @@ -15,7 +15,7 @@ if exists("g:loaded_getscript") finish endif -let g:loaded_getscript= "v35" +let g:loaded_getscript= "v36" if &cp echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)" finish @@ -208,8 +208,8 @@ let lastline = line("$") " call Decho("lastline#".lastline) let firstdir = substitute(&rtp,',.*$','','') - let plugins = split(globpath(firstdir,"plugin/*.vim"),'\n') - let plugins = plugins + split(globpath(firstdir,"AsNeeded/*.vim"),'\n') + let plugins = split(globpath(firstdir,"plugin/**/*.vim"),'\n') + let plugins = plugins + split(globpath(firstdir,"AsNeeded/**/*.vim"),'\n') let foundscript = 0 " this loop updates the GetLatestVimScripts.dat file diff -Nru vim-7.4a.012/runtime/autoload/netrw_gitignore.vim vim-7.4.273/runtime/autoload/netrw_gitignore.vim --- vim-7.4a.012/runtime/autoload/netrw_gitignore.vim 1970-01-01 00:00:00.000000000 +0000 +++ vim-7.4.273/runtime/autoload/netrw_gitignore.vim 2014-04-29 18:04:09.000000000 +0000 @@ -0,0 +1,71 @@ +" netrw_gitignore#Hide: gitignore-based hiding +" Function returns a string of comma separated patterns convenient for +" assignment to `g:netrw_list_hide` option. +" Function can take additional filenames as arguments, example: +" netrw_gitignore#Hide('custom_gitignore1', 'custom_gitignore2') +" +" Usage examples: +" let g:netrw_list_hide = netrw_gitignore#Hide() +" let g:netrw_list_hide = netrw_gitignore#Hide() . 'more,hide,patterns' +" +" Copyright: Copyright (C) 2013 Bruno Sutic {{{1 +" Permission is hereby granted to use and distribute this code, +" with or without modifications, provided that this copyright +" notice is copied with it. Like anything else that's free, +" netrw_gitignore.vim is provided *as is* and comes with no +" warranty of any kind, either expressed or implied. By using +" this plugin, you agree that in no event will the copyright +" holder be liable for any damages resulting from the use +" of this software. +function! netrw_gitignore#Hide(...) + let additional_files = a:000 + + let default_files = ['.gitignore', '.git/info/exclude'] + + " get existing global/system gitignore files + let global_gitignore = expand(substitute(system("git config --global core.excludesfile"), '\n', '', 'g')) + if global_gitignore !=# '' + let default_files = add(default_files, global_gitignore) + endif + let system_gitignore = expand(substitute(system("git config --system core.excludesfile"), '\n', '', 'g')) + if system_gitignore !=# '' + let default_files = add(default_files, system_gitignore) + endif + + " append additional files if given as function arguments + if additional_files !=# [] + let files = extend(default_files, additional_files) + else + let files = default_files + endif + + " keep only existing/readable files + let gitignore_files = [] + for file in files + if filereadable(file) + let gitignore_files = add(gitignore_files, file) + endif + endfor + + " get contents of gitignore patterns from those files + let gitignore_lines = [] + for file in gitignore_files + for line in readfile(file) + " filter empty lines and comments + if line !~# '^#' && line !~# '^$' + let gitignore_lines = add(gitignore_lines, line) + endif + endfor + endfor + + " convert gitignore patterns to Netrw/Vim regex patterns + let escaped_lines = [] + for line in gitignore_lines + let escaped = line + let escaped = substitute(escaped, '\.', '\\.', 'g') + let escaped = substitute(escaped, '*', '.*', 'g') + let escaped_lines = add(escaped_lines, escaped) + endfor + + return join(escaped_lines, ',') +endfunction diff -Nru vim-7.4a.012/runtime/autoload/netrwSettings.vim vim-7.4.273/runtime/autoload/netrwSettings.vim --- vim-7.4a.012/runtime/autoload/netrwSettings.vim 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/autoload/netrwSettings.vim 2014-04-29 18:04:09.000000000 +0000 @@ -1,7 +1,7 @@ " netrwSettings.vim: makes netrw settings simpler -" Date: May 03, 2013 +" Date: Aug 27, 2013 " Maintainer: Charles E Campbell -" Version: 14a ASTRO-ONLY +" Version: 14 " Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright @@ -19,7 +19,7 @@ if exists("g:loaded_netrwSettings") || &cp finish endif -let g:loaded_netrwSettings = "v14a" +let g:loaded_netrwSettings = "v14" if v:version < 700 echohl WarningMsg echo "***warning*** this version of netrwSettings needs vim 7.0" @@ -98,6 +98,11 @@ put = '' put ='+ Netrw Browser Control' + if exists("g:netrw_altfile") + put = 'let g:netrw_altfile = '.g:netrw_altfile + else + put = 'let g:netrw_altfile = 0' + endif put = 'let g:netrw_alto = '.g:netrw_alto put = 'let g:netrw_altv = '.g:netrw_altv put = 'let g:netrw_banner = '.g:netrw_banner diff -Nru vim-7.4a.012/runtime/autoload/netrw.vim vim-7.4.273/runtime/autoload/netrw.vim --- vim-7.4a.012/runtime/autoload/netrw.vim 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/autoload/netrw.vim 2014-04-29 18:04:09.000000000 +0000 @@ -1,10 +1,10 @@ " netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION -" Date: May 18, 2013 -" Version: 149 +" Date: Mar 20, 2014 +" Version: 151 " Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim -" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1 +" Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -22,13 +22,7 @@ if &cp || exists("g:loaded_netrw") finish endif -let g:loaded_netrw = "v149" -if v:version < 703 || (v:version == 703 && !has("patch465")) - echohl WarningMsg - echo "***warning*** this version of netrw needs vim 7.3.465 or later" - echohl Normal - finish -endif +let g:loaded_netrw = "v151" if !exists("s:NOTE") let s:NOTE = 0 let s:WARNING = 1 @@ -36,8 +30,9 @@ endif let s:keepcpo= &cpo -set cpo&vim -"DechoTabOn +setl cpo&vim +"let g:dechofuncname=1 +"DechoRemOn "call Decho("doing autoload/netrw.vim version ".g:loaded_netrw) " ====================== @@ -49,7 +44,7 @@ " 0=note = s:NOTE " 1=warning = s:WARNING " 2=error = s:ERROR -" May 01, 2013 : max errnum currently is 93 +" Mar 04, 2014 : max errnum currently is 96 fun! netrw#ErrorMsg(level,msg,errnum) " call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow) @@ -104,7 +99,7 @@ hi link netrwMesgWarning WarningMsg hi link netrwMesgError Error endif -" call Decho("(ErrorMsg) setl noma ro bh=wipe") +" call Decho("setl noma ro bh=wipe") setl noma ro bh=wipe else @@ -200,6 +195,7 @@ let g:netrw_http_cmd = "" endif endif +call s:NetrwInit("g:netrw_http_put_cmd","curl -T") call s:NetrwInit("g:netrw_rcp_cmd" , "rcp") call s:NetrwInit("g:netrw_rsync_cmd", "rsync") if !exists("g:netrw_scp_cmd") @@ -260,6 +256,7 @@ call s:NetrwInit("g:netrw_cursor" , 2) let s:netrw_usercul = &cursorline let s:netrw_usercuc = &cursorcolumn +call s:NetrwInit("g:netrw_cygdrive","/cygdrive") " Default values - d-g ---------- {{{3 call s:NetrwInit("s:didstarstar",0) call s:NetrwInit("g:netrw_dirhist_cnt" , 0) @@ -291,23 +288,19 @@ endif call s:NetrwInit("g:netrw_keepdir",1) if !exists("g:netrw_list_cmd") - if g:netrw_scp_cmd =~ '^pscp' && executable("pscp") if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable("c:\\private.ppk") " provide a pscp-based listing command let g:netrw_scp_cmd ="pscp -i C:\\private.ppk" endif let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME:" - elseif executable(g:netrw_ssh_cmd) " provide a scp-based default listing command let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa" - else -" call Decho(g:netrw_ssh_cmd." is not executable") +" call Decho("g:netrw_ssh_cmd." is not executable") let g:netrw_list_cmd= "" endif - endif call s:NetrwInit("g:netrw_list_hide","") " Default values - lh-lz ---------- {{{3 @@ -387,8 +380,17 @@ call s:NetrwInit("g:netrw_rename_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mv") call s:NetrwInit("g:netrw_rm_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rm") call s:NetrwInit("g:netrw_rmdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rmdir") -call s:NetrwInit("g:netrw_rmf_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rm -f") -" Default values - s ---------- {{{3 +call s:NetrwInit("g:netrw_rmf_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rm -f ") +" Default values - q-s ---------- {{{3 +call s:NetrwInit("g:netrw_quickhelp",0) +let s:QuickHelp= ["-:go up dir D:delete R:rename s:sort-by x:special", + \ "%:create new file d:create new directory", + \ "o:split&open v:vert-split&open", + \ "i:style qf:file info O:obtain r:reverse p:preview", + \ "mf:mark file mt:set target mm:move mc:copy", + \ "-bookmarks- mb:make mB:delete qb:list gb:go to", + \ "-history- qb:list u:go up U:go down", + \ "-targets- mt:target Tb:use bookmark Th:use history"] " g:netrw_sepchr: picking a character that doesn't appear in filenames that can be used to separate priority from filename call s:NetrwInit("g:netrw_sepchr" , (&enc == "euc-jp")? "\" : "\") call s:NetrwInit("s:netrw_silentxfer" , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil keepj " : "keepj ") @@ -404,7 +406,7 @@ endif call s:NetrwInit("g:netrw_special_syntax" , 0) call s:NetrwInit("g:netrw_ssh_browse_reject", '^total\s\+\d\+$') -call s:NetrwInit("g:netrw_use_noswf" , 0) +call s:NetrwInit("g:netrw_use_noswf" , 1) " Default values - t-w ---------- {{{3 call s:NetrwInit("g:netrw_timefmt","%c") if !exists("g:netrw_xstrlen") @@ -434,6 +436,11 @@ call s:NetrwInit("g:netrw_menu_escape",'.&? \') call s:NetrwInit("g:netrw_tmpfile_escape",' &;') call s:NetrwInit("s:netrw_map_escape","<|\n\r\\\\"") +if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4') + let s:treedepthstring= "│ " +else + let s:treedepthstring= "| " +endif " BufEnter event ignored by decho when following variable is true " Has a side effect that doau BufReadPost doesn't work, so @@ -444,11 +451,18 @@ " Netrw Initialization: {{{1 " ====================== if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on") - let s:initbeval = &beval -" let s:initbexpr = &l:bexpr - let &l:bexpr = "netrw#NetrwBalloonHelp()" - set beval - au BufWinEnter,WinEnter * if &ft == "netrw"|set beval|else|let &beval= s:initbeval|endif +" call Decho("installed beval events") + let &l:bexpr = "netrw#BalloonHelp()" + au FileType netrw setl beval + au WinLeave * if &ft == "netrw" && exists("s:initbeval")|let &beval= s:initbeval|endif + au VimEnter * let s:initbeval= &beval +"else " Decho +" if v:version < 700 | call Decho("did not install beval events: v:version=".v:version." < 700") | endif +" if !has("balloon_eval") | call Decho("did not install beval events: does not have balloon_eval") | endif +" if exists("s:initbeval") | call Decho("did not install beval events: s:initbeval exists") | endif +" if exists("g:netrw_nobeval") | call Decho("did not install beval events: g:netrw_nobeval exists") | endif +" if !has("syntax") | call Decho("did not install beval events: does not have syntax highlighting") | endif +" if exists("g:syntax_on") | call Decho("did not install beval events: g:syntax_on exists") | endif endif au WinEnter * if &ft == "netrw"|call s:NetrwInsureWinVars()|endif @@ -457,276 +471,43 @@ " ============================== " --------------------------------------------------------------------- -" netrw#NetrwBalloonHelp: {{{2 -if v:version >= 700 && has("balloon_eval") && &beval == 1 && has("syntax") && exists("g:syntax_on") - fun! netrw#NetrwBalloonHelp() - if !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval) - let mesg= "" - elseif v:beval_text == "Netrw" || v:beval_text == "Directory" || v:beval_text == "Listing" - let mesg = "i: thin-long-wide-tree gh: quick hide/unhide of dot-files qf: quick file info %:open new file" - elseif getline(v:beval_lnum) =~ '^"\s*/' - let mesg = ": edit/enter o: edit/enter in horiz window t: edit/enter in new tab v:edit/enter in vert window" - elseif v:beval_text == "Sorted" || v:beval_text == "by" - let mesg = 's: sort by name, time, or file size r: reverse sorting order mt: mark target' - elseif v:beval_text == "Sort" || v:beval_text == "sequence" - let mesg = "S: edit sorting sequence" - elseif v:beval_text == "Hiding" || v:beval_text == "Showing" - let mesg = "a: hiding-showing-all ctrl-h: editing hiding list mh: hide/show by suffix" - elseif v:beval_text == "Quick" || v:beval_text == "Help" - let mesg = "Help: press " - elseif v:beval_text == "Copy/Move" || v:beval_text == "Tgt" - let mesg = "mt: mark target mc: copy marked file to target mm: move marked file to target" - else - let mesg= "" - endif - return mesg - endfun -endif - -" ------------------------------------------------------------------------ -" s:NetrwOptionSave: save options prior to setting to "netrw-buffer-standard" form {{{2 -" 06/08/07 : removed call to NetrwSafeOptions(), either placed -" immediately after NetrwOptionSave() calls in NetRead -" and NetWrite, or after the s:NetrwEnew() call in -" NetrwBrowse. -" vt: normally its "w:" or "s:" (a variable type) -fun! s:NetrwOptionSave(vt) -" call Dfunc("s:NetrwOptionSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma) -" call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist")) - - if !exists("{a:vt}netrw_optionsave") - let {a:vt}netrw_optionsave= 1 - else -" call Dret("s:NetrwOptionSave : options already saved") - return - endif -" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff) - - " Save current settings and current directory -" call Decho("saving current settings and current directory") - let s:yykeep = @@ - if exists("&l:acd")|let {a:vt}netrw_acdkeep = &l:acd|endif - let {a:vt}netrw_aikeep = &l:ai - let {a:vt}netrw_awkeep = &l:aw - let {a:vt}netrw_bhkeep = &l:bh - let {a:vt}netrw_blkeep = &l:bl - let {a:vt}netrw_btkeep = &l:bt - let {a:vt}netrw_bombkeep = &l:bomb - let {a:vt}netrw_cedit = &cedit - let {a:vt}netrw_cikeep = &l:ci - let {a:vt}netrw_cinkeep = &l:cin - let {a:vt}netrw_cinokeep = &l:cino - let {a:vt}netrw_comkeep = &l:com - let {a:vt}netrw_cpokeep = &l:cpo - let {a:vt}netrw_diffkeep = &l:diff - let {a:vt}netrw_fenkeep = &l:fen - let {a:vt}netrw_ffkeep = &l:ff - let {a:vt}netrw_fokeep = &l:fo " formatoptions - let {a:vt}netrw_gdkeep = &l:gd " gdefault - let {a:vt}netrw_hidkeep = &l:hidden - let {a:vt}netrw_imkeep = &l:im - let {a:vt}netrw_iskkeep = &l:isk - let {a:vt}netrw_lskeep = &l:ls - let {a:vt}netrw_makeep = &l:ma - let {a:vt}netrw_magickeep = &l:magic - let {a:vt}netrw_modkeep = &l:mod - let {a:vt}netrw_nukeep = &l:nu - let {a:vt}netrw_repkeep = &l:report - let {a:vt}netrw_rokeep = &l:ro - let {a:vt}netrw_selkeep = &l:sel - let {a:vt}netrw_spellkeep = &l:spell - let {a:vt}netrw_tskeep = &l:ts - let {a:vt}netrw_twkeep = &l:tw " textwidth - let {a:vt}netrw_wigkeep = &l:wig " wildignore - let {a:vt}netrw_wrapkeep = &l:wrap - let {a:vt}netrw_writekeep = &l:write - if g:netrw_use_noswf && has("win32") && !has("win95") - let {a:vt}netrw_swfkeep = &l:swf - endif - - " save a few selected netrw-related variables -" call Decho("saving a few selected netrw-related variables") - if g:netrw_keepdir - let {a:vt}netrw_dirkeep = getcwd() - endif - if has("win32") && !has("win95") - let {a:vt}netrw_swfkeep = &l:swf " swapfile - endif - if &go =~# 'a' | sil! let {a:vt}netrw_regstar = @* | endif - sil! let {a:vt}netrw_regslash= @/ - -" call Dret("s:NetrwOptionSave : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) -endfun - -" ------------------------------------------------------------------------ -" s:NetrwOptionRestore: restore options {{{2 -fun! s:NetrwOptionRestore(vt) -" call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$")) - if !exists("{a:vt}netrw_optionsave") - if exists("s:nbcd_curpos_{bufnr('%')}") -" call Decho("(NetrwOptionRestore) restoring previous position (s:nbcd_curpos_".bufnr('%')." exists)") - keepj call netrw#NetrwRestorePosn(s:nbcd_curpos_{bufnr('%')}) -" call Decho("(NetrwOptionRestore) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$")) -" call Decho("(NetrwOptionRestore) unlet s:nbcd_curpos_".bufnr('%')) - unlet s:nbcd_curpos_{bufnr('%')} - else -" call Decho("(NetrwOptionRestore) no previous position") - endif -" call Decho("(NetrwOptionRestore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist") - return - endif - unlet {a:vt}netrw_optionsave - - if exists("+acd") - if exists("{a:vt}netrw_acdkeep") -" call Decho("(NetrwOptionRestore) g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) - let curdir = getcwd() - let &l:acd = {a:vt}netrw_acdkeep - unlet {a:vt}netrw_acdkeep - if &l:acd -" call Decho("exe keepj lcd ".fnameescape(curdir)) " NOTE: was g:netrw_fname_escape for some reason - try - if !exists("&l:acd") && !&l:acd - exe 'keepj lcd '.fnameescape(curdir) - endif - catch /^Vim\%((\a\+)\)\=:E472/ - call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".curdir."> (permissions?)",61) - endtry - endif +" netrw#BalloonHelp: {{{2 +if v:version >= 700 && has("balloon_eval") && has("syntax") && exists("g:syntax_on") && !exists("g:netrw_nobeval") +" call Decho("loading netrw#BalloonHelp()") + fun! netrw#BalloonHelp() + if &ft != "netrw" + return "" endif - endif - if exists("{a:vt}netrw_aikeep") |let &l:ai = {a:vt}netrw_aikeep |unlet {a:vt}netrw_aikeep |endif - if exists("{a:vt}netrw_awkeep") |let &l:aw = {a:vt}netrw_awkeep |unlet {a:vt}netrw_awkeep |endif - if g:netrw_liststyle != s:TREELIST - if exists("{a:vt}netrw_bhkeep") |let &l:bh = {a:vt}netrw_bhkeep |unlet {a:vt}netrw_bhkeep |endif - endif - if exists("{a:vt}netrw_blkeep") |let &l:bl = {a:vt}netrw_blkeep |unlet {a:vt}netrw_blkeep |endif - if exists("{a:vt}netrw_btkeep") |let &l:bt = {a:vt}netrw_btkeep |unlet {a:vt}netrw_btkeep |endif - if exists("{a:vt}netrw_bombkeep") |let &l:bomb = {a:vt}netrw_bombkeep |unlet {a:vt}netrw_bombkeep |endif - if exists("{a:vt}netrw_cedit") |let &cedit = {a:vt}netrw_cedit |unlet {a:vt}netrw_cedit |endif - if exists("{a:vt}netrw_cikeep") |let &l:ci = {a:vt}netrw_cikeep |unlet {a:vt}netrw_cikeep |endif - if exists("{a:vt}netrw_cinkeep") |let &l:cin = {a:vt}netrw_cinkeep |unlet {a:vt}netrw_cinkeep |endif - if exists("{a:vt}netrw_cinokeep") |let &l:cino = {a:vt}netrw_cinokeep |unlet {a:vt}netrw_cinokeep |endif - if exists("{a:vt}netrw_comkeep") |let &l:com = {a:vt}netrw_comkeep |unlet {a:vt}netrw_comkeep |endif - if exists("{a:vt}netrw_cpokeep") |let &l:cpo = {a:vt}netrw_cpokeep |unlet {a:vt}netrw_cpokeep |endif - if exists("{a:vt}netrw_diffkeep") |let &l:diff = {a:vt}netrw_diffkeep |unlet {a:vt}netrw_diffkeep |endif - if exists("{a:vt}netrw_fenkeep") |let &l:fen = {a:vt}netrw_fenkeep |unlet {a:vt}netrw_fenkeep |endif - if exists("{a:vt}netrw_ffkeep") |let &l:ff = {a:vt}netrw_ffkeep |unlet {a:vt}netrw_ffkeep |endif - if exists("{a:vt}netrw_fokeep") |let &l:fo = {a:vt}netrw_fokeep |unlet {a:vt}netrw_fokeep |endif - if exists("{a:vt}netrw_gdkeep") |let &l:gd = {a:vt}netrw_gdkeep |unlet {a:vt}netrw_gdkeep |endif - if exists("{a:vt}netrw_hidkeep") |let &l:hidden = {a:vt}netrw_hidkeep |unlet {a:vt}netrw_hidkeep |endif - if exists("{a:vt}netrw_imkeep") |let &l:im = {a:vt}netrw_imkeep |unlet {a:vt}netrw_imkeep |endif - if exists("{a:vt}netrw_iskkeep") |let &l:isk = {a:vt}netrw_iskkeep |unlet {a:vt}netrw_iskkeep |endif - if exists("{a:vt}netrw_lskeep") |let &l:ls = {a:vt}netrw_lskeep |unlet {a:vt}netrw_lskeep |endif - if exists("{a:vt}netrw_makeep") |let &l:ma = {a:vt}netrw_makeep |unlet {a:vt}netrw_makeep |endif - if exists("{a:vt}netrw_magickeep")|let &l:magic = {a:vt}netrw_magickeep |unlet {a:vt}netrw_magickeep|endif - if exists("{a:vt}netrw_modkeep") |let &l:mod = {a:vt}netrw_modkeep |unlet {a:vt}netrw_modkeep |endif - if exists("{a:vt}netrw_nukeep") |let &l:nu = {a:vt}netrw_nukeep |unlet {a:vt}netrw_nukeep |endif - if exists("{a:vt}netrw_repkeep") |let &l:report = {a:vt}netrw_repkeep |unlet {a:vt}netrw_repkeep |endif - if exists("{a:vt}netrw_rokeep") |let &l:ro = {a:vt}netrw_rokeep |unlet {a:vt}netrw_rokeep |endif - if exists("{a:vt}netrw_selkeep") |let &l:sel = {a:vt}netrw_selkeep |unlet {a:vt}netrw_selkeep |endif - if exists("{a:vt}netrw_spellkeep")|let &l:spell = {a:vt}netrw_spellkeep |unlet {a:vt}netrw_spellkeep|endif - " Problem: start with liststyle=0; press : result, following line resets l:ts. -" if exists("{a:vt}netrw_tskeep") |let &l:ts = {a:vt}netrw_tskeep |unlet {a:vt}netrw_tskeep |endif - if exists("{a:vt}netrw_twkeep") |let &l:tw = {a:vt}netrw_twkeep |unlet {a:vt}netrw_twkeep |endif - if exists("{a:vt}netrw_wigkeep") |let &l:wig = {a:vt}netrw_wigkeep |unlet {a:vt}netrw_wigkeep |endif - if exists("{a:vt}netrw_wrapkeep") |let &l:wrap = {a:vt}netrw_wrapkeep |unlet {a:vt}netrw_wrapkeep |endif - if exists("{a:vt}netrw_writekeep")|let &l:write = {a:vt}netrw_writekeep |unlet {a:vt}netrw_writekeep|endif - if exists("s:yykeep") |let @@ = s:yykeep |unlet s:yykeep |endif - if exists("{a:vt}netrw_swfkeep") - if &directory == "" - " user hasn't specified a swapfile directory; - " netrw will temporarily set the swapfile directory - " to the current directory as returned by getcwd(). - let &l:directory = getcwd() - sil! let &l:swf = {a:vt}netrw_swfkeep - setl directory= - unlet {a:vt}netrw_swfkeep - elseif &l:swf != {a:vt}netrw_swfkeep - " following line causes a Press ENTER in windows -- can't seem to work around it!!! - sil! let &l:swf= {a:vt}netrw_swfkeep - unlet {a:vt}netrw_swfkeep + if !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval) + let mesg= "" + elseif v:beval_text == "Netrw" || v:beval_text == "Directory" || v:beval_text == "Listing" + let mesg = "i: thin-long-wide-tree gh: quick hide/unhide of dot-files qf: quick file info %:open new file" + elseif getline(v:beval_lnum) =~ '^"\s*/' + let mesg = ": edit/enter o: edit/enter in horiz window t: edit/enter in new tab v:edit/enter in vert window" + elseif v:beval_text == "Sorted" || v:beval_text == "by" + let mesg = 's: sort by name, time, or file size r: reverse sorting order mt: mark target' + elseif v:beval_text == "Sort" || v:beval_text == "sequence" + let mesg = "S: edit sorting sequence" + elseif v:beval_text == "Hiding" || v:beval_text == "Showing" + let mesg = "a: hiding-showing-all ctrl-h: editing hiding list mh: hide/show by suffix" + elseif v:beval_text == "Quick" || v:beval_text == "Help" + let mesg = "Help: press " + elseif v:beval_text == "Copy/Move" || v:beval_text == "Tgt" + let mesg = "mt: mark target mc: copy marked file to target mm: move marked file to target" + else + let mesg= "" endif - endif - if exists("{a:vt}netrw_dirkeep") && isdirectory({a:vt}netrw_dirkeep) && g:netrw_keepdir - let dirkeep = substitute({a:vt}netrw_dirkeep,'\\','/','g') - if exists("{a:vt}netrw_dirkeep") |exe "keepj lcd ".fnameescape(dirkeep)|unlet {a:vt}netrw_dirkeep |endif - endif - if exists("{a:vt}netrw_regstar") |sil! let @*= {a:vt}netrw_regstar |unlet {a:vt}netrw_regstar |endif - if exists("{a:vt}netrw_regslash")|sil! let @/= {a:vt}netrw_regslash|unlet {a:vt}netrw_regslash|endif - if exists("s:nbcd_curpos_{bufnr('%')}") -" call Decho("(NetrwOptionRestore) restoring previous position (s:nbcd_curpos_".bufnr('%')." exists)") - keepj call netrw#NetrwRestorePosn(s:nbcd_curpos_{bufnr('%')}) -" call Decho("(NetrwOptionRestore) unlet s:nbcd_curpos_".bufnr('%')) - unlet s:nbcd_curpos_{bufnr('%')} - else -" call Decho("no previous position") - endif - -" call Decho("(NetrwOptionRestore) g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) -" call Decho("(NetrwOptionRestore) fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")) -" call Decho("(NetrwOptionRestore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Decho("(NetrwOptionRestore) diff=".&l:diff." win#".winnr()." w:netrw_diffkeep=".(exists("w:netrw_diffkeep")? w:netrw_diffkeep : "doesn't exist")) -" call Decho("(NetrwOptionRestore) ts=".&l:ts) - " Moved the filetype detect here from NetrwGetFile() because remote files - " were having their filetype detect-generated settings overwritten by - " NetrwOptionRestore. - if &ft != "netrw" -" call Decho("(NetrwOptionRestore) filetype detect (ft=".&ft.")") - filetype detect - endif -" call Dret("s:NetrwOptionRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) -endfun - -" --------------------------------------------------------------------- -" s:NetrwSafeOptions: sets options to help netrw do its job {{{2 -" Use s:NetrwSaveOptions() to save user settings -" Use s:NetrwOptionRestore() to restore user settings -fun! s:NetrwSafeOptions() -" call Dfunc("s:NetrwSafeOptions() win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%"))."> winnr($)=".winnr("$")) -" call Decho("win#".winnr()."'s ft=".&ft) - if exists("+acd") | setl noacd | endif - setl noai - setl noaw - setl nobomb - setl noci - setl nocin - if g:netrw_liststyle == s:TREELIST - setl bh=hide - endif - setl cino= - setl com= - setl cpo-=a - setl cpo-=A - setl fo=nroql2 - setl nohid - setl noim - setl isk+=@ isk+=* isk+=/ - setl magic - setl report=10000 - setl sel=inclusive - setl nospell - setl tw=0 - setl wig= - set cedit& - if g:netrw_use_noswf && has("win32") && !has("win95") - setl noswf - endif - call s:NetrwCursor() - - " allow the user to override safe options -" call Decho("ft<".&ft."> ei=".&ei) - if &ft == "netrw" -" call Decho("do any netrw FileType autocmds (doau FileType netrw)") - sil! keepalt keepj doau FileType netrw - endif - -" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh) -" call Dret("s:NetrwSafeOptions") -endfun + return mesg + endfun +"else " Decho +" if v:version < 700 |call Decho("did not load netrw#BalloonHelp(): vim version ".v:version." < 700 -")|endif +" if !has("balloon_eval") |call Decho("did not load netrw#BalloonHelp(): does not have balloon eval") |endif +" if !has("syntax") |call Decho("did not load netrw#BalloonHelp(): syntax disabled") |endif +" if !exists("g:syntax_on") |call Decho("did not load netrw#BalloonHelp(): g:syntax_on=".g:syntax_on) |endif +" if exists("g:netrw_nobeval") |call Decho("did not load netrw#BalloonHelp(): g:netrw_nobeval exists") |endif +endif -" --------------------------------------------------------------------- +" ------------------------------------------------------------------------ " netrw#Explore: launch the local browser in the directory of the current file {{{2 " indx: == -1: Nexplore " == -2: Pexplore @@ -737,7 +518,7 @@ " * If Hexplore or Vexplore, then this will override " g:netrw_winsize to specify the qty of rows or columns the " newly split window should have. -" dosplit==0: the window will be split iff the current file has been modified +" dosplit==0: the window will be split iff the current file has been modified and hidden not set " dosplit==1: the window will be split before running the local browser " style == 0: Explore style == 1: Explore! " == 2: Hexplore style == 3: Hexplore! @@ -747,26 +528,52 @@ " call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." modifiable=".&modifiable." a:0=".a:0." win#".winnr()." buf#".bufnr("%")) if !exists("b:netrw_curdir") let b:netrw_curdir= getcwd() - if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) - let b:netrw_curdir= substitute(b:netrw_curdir,'\','/','g') - endif -" call Decho("(Explore) set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)") +" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)") + endif + + " record current file for Rexplore's benefit + if &ft != "netrw" + let w:netrw_rexfile= expand("%:p") endif + + " record current directory let curdir = simplify(b:netrw_curdir) let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e') if !exists("g:netrw_cygwin") && (has("win32") || has("win95") || has("win64") || has("win16")) let curdir= substitute(curdir,'\','/','g') endif -" call Decho("(Explore) curdir<".curdir."> curfiledir<".curfiledir.">") +" call Decho("curdir<".curdir."> curfiledir<".curfiledir.">") + + " using completion, directories with spaces in their names (thanks, Bill Gates, for a truly dumb idea) + " will end up with backslashes here. Solution: strip off backslashes that precede white space and + " try Explore again. + if a:0 > 0 +" call Decho('considering retry: a:1<'.a:1.'>: '. + \ ((a:1 =~ "\\\s")? 'has backslash whitespace' : 'does not have backslash whitespace').', '. + \ ((filereadable(a:1))? 'is readable' : 'is not readable').', '. + \ ((isdirectory(a:1))? 'is a directory' : 'is not a directory')) + if a:1 =~ "\\\s" && !filereadable(a:1) && !isdirectory(a:1) +" call Decho("re-trying Explore with <".substitute(a:1,'\\\(\s\)','\1','g').">") + call netrw#Explore(a:indx,a:dosplit,a:style,substitute(a:1,'\\\(\s\)','\1','g')) +" call Dret("netrw#Explore : returning from retry") + return +" else " Decho +" call Decho("retry not needed") + endif + endif " save registers - sil! let keepregstar = @* - sil! let keepregplus = @+ + if has("clipboard") + sil! let keepregstar = @* + sil! let keepregplus = @+ + endif sil! let keepregslash= @/ - " if dosplit or file has been modified - if a:dosplit || &modified || a:style == 6 -" call Decho("(Explore) case dosplit=".a:dosplit." modified=".&modified." a:style=".a:style.": dosplit or file has been modified") + " if dosplit + " -or- file has been modified AND file not hidden when abandoned + " -or- Texplore used + if a:dosplit || (&modified && &hidden == 0 && &bufhidden != "hide") || a:style == 6 +" call Decho("case dosplit=".a:dosplit." modified=".&modified." a:style=".a:style.": dosplit or file has been modified") call s:SaveWinVars() let winsz= g:netrw_winsize if a:indx > 0 @@ -774,106 +581,106 @@ endif if a:style == 0 " Explore, Sexplore -" call Decho("(Explore) style=0: Explore or Sexplore") +" call Decho("style=0: Explore or Sexplore") let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz exe winsz."wincmd s" elseif a:style == 1 "Explore!, Sexplore! -" call Decho("(Explore) style=1: Explore! or Sexplore!") +" call Decho("style=1: Explore! or Sexplore!") let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz exe "keepalt ".winsz."wincmd v" elseif a:style == 2 " Hexplore -" call Decho("(Explore) style=2: Hexplore") +" call Decho("style=2: Hexplore") let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz exe "keepalt bel ".winsz."wincmd s" elseif a:style == 3 " Hexplore! -" call Decho("(Explore) style=3: Hexplore!") +" call Decho("style=3: Hexplore!") let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz exe "keepalt abo ".winsz."wincmd s" elseif a:style == 4 " Vexplore -" call Decho("(Explore) style=4: Vexplore") +" call Decho("style=4: Vexplore") let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz exe "keepalt lefta ".winsz."wincmd v" elseif a:style == 5 " Vexplore! -" call Decho("(Explore) style=5: Vexplore!") +" call Decho("style=5: Vexplore!") let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz exe "keepalt rightb ".winsz."wincmd v" elseif a:style == 6 " Texplore call s:SaveBufVars() -" call Decho("(Explore) style = 6: Texplore") +" call Decho("style = 6: Texplore") exe "keepalt tabnew ".fnameescape(curdir) call s:RestoreBufVars() endif call s:RestoreWinVars() " else " Decho -" call Decho("(Explore) case a:dosplit=".a:dosplit." AND modified=".&modified." AND a:style=".a:style." is not 6") +" call Decho("case a:dosplit=".a:dosplit." AND modified=".&modified." AND a:style=".a:style." is not 6") endif keepj norm! 0 if a:0 > 0 -" call Decho("(Explore) case [a:0=".a:0."] > 0: a:1<".a:1.">") +" call Decho("case [a:0=".a:0."] > 0: a:1<".a:1.">") if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)) -" call Decho("(Explore) ..case a:1<".a:1.">: starts with ~ and unix or cygwin") +" call Decho("..case a:1<".a:1.">: starts with ~ and unix or cygwin") let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),'')) -" call Decho("(Explore) ..using dirname<".dirname."> (case: ~ && unix||cygwin)") +" call Decho("..using dirname<".dirname."> (case: ~ && unix||cygwin)") elseif a:1 == '.' -" call Decho("(Explore) ..case a:1<".a:1.">: matches .") +" call Decho("..case a:1<".a:1.">: matches .") let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd()) if dirname !~ '/$' let dirname= dirname."/" endif -" call Decho("(Explore) ..using dirname<".dirname."> (case: ".(exists("b:netrw_curdir")? "b:netrw_curdir" : "getcwd()").")") +" call Decho("..using dirname<".dirname."> (case: ".(exists("b:netrw_curdir")? "b:netrw_curdir" : "getcwd()").")") elseif a:1 =~ '\$' -" call Decho("(Explore) ..case a:1<".a:1.">: matches ending $") +" call Decho("..case a:1<".a:1.">: matches ending $") let dirname= simplify(expand(a:1)) -" call Decho("(Explore) ..using user-specified dirname<".dirname."> with $env-var") +" call Decho("..using user-specified dirname<".dirname."> with $env-var") elseif a:1 !~ '^\*\{1,2}/' && a:1 !~ '^\a\{3,}://' -" call Decho("(Explore) ..case a:1<".a:1.">: other, not pattern or filepattern") +" call Decho("..case a:1<".a:1.">: other, not pattern or filepattern") let dirname= simplify(a:1) -" call Decho("(Explore) ..using user-specified dirname<".dirname.">") +" call Decho("..using user-specified dirname<".dirname.">") else -" call Decho("(Explore) ..case a:1: pattern or filepattern") +" call Decho("..case a:1: pattern or filepattern") let dirname= a:1 endif else " clear explore -" call Decho("(Explore) case a:0=".a:0.": clearing Explore list") +" call Decho("case a:0=".a:0.": clearing Explore list") call s:NetrwClearExplore() " call Dret("netrw#Explore : cleared list") return endif -" call Decho("(Explore) dirname<".dirname.">") +" call Decho("dirname<".dirname.">") if dirname =~ '\.\./\=$' let dirname= simplify(fnamemodify(dirname,':p:h')) elseif dirname =~ '\.\.' || dirname == '.' let dirname= simplify(fnamemodify(dirname,':p')) endif -" call Decho("(Explore) dirname<".dirname."> (after simplify)") +" call Decho("dirname<".dirname."> (after simplify)") if dirname =~ '^\*//' " starpat=1: Explore *//pattern (current directory only search for files containing pattern) -" call Decho("(Explore) case starpat=1: Explore *//pattern") +" call Decho("case starpat=1: Explore *//pattern") let pattern= substitute(dirname,'^\*//\(.*\)$','\1','') let starpat= 1 -" call Decho("(Explore) ..Explore *//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") +" call Decho("..Explore *//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif elseif dirname =~ '^\*\*//' " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) -" call Decho("(Explore) case starpat=2: Explore **//pattern") +" call Decho("case starpat=2: Explore **//pattern") let pattern= substitute(dirname,'^\*\*//','','') let starpat= 2 -" call Decho("(Explore) ..Explore **//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") +" call Decho("..Explore **//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") elseif dirname =~ '/\*\*/' " handle .../**/.../filepat -" call Decho("(Explore) case starpat=4: Explore .../**/.../filepat") +" call Decho("case starpat=4: Explore .../**/.../filepat") let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','') if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16"))) let b:netrw_curdir = prefixdir @@ -882,30 +689,30 @@ endif let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','') let starpat= 4 -" call Decho("(Explore) ..pwd<".getcwd()."> dirname<".dirname.">") -" call Decho("(Explore) ..case Explore ../**/../filepat (starpat=".starpat.")") +" call Decho("..pwd<".getcwd()."> dirname<".dirname.">") +" call Decho("..case Explore ../**/../filepat (starpat=".starpat.")") elseif dirname =~ '^\*/' " case starpat=3: Explore */filepat (search in current directory for filenames matching filepat) let starpat= 3 -" call Decho("(Explore) case starpat=3: Explore */filepat (starpat=".starpat.")") +" call Decho("case starpat=3: Explore */filepat (starpat=".starpat.")") elseif dirname=~ '^\*\*/' " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) let starpat= 4 -" call Decho("(Explore) case starpat=4: Explore **/filepat (starpat=".starpat.")") +" call Decho("case starpat=4: Explore **/filepat (starpat=".starpat.")") else let starpat= 0 -" call Decho("(Explore) case starpat=0: default") +" call Decho("case starpat=0: default") endif if starpat == 0 && a:indx >= 0 " [Explore Hexplore Vexplore Sexplore] [dirname] -" call Decho("(Explore) case starpat==0 && a:indx=".a:indx.": dirname<".dirname.">, handles Explore Hexplore Vexplore Sexplore") +" call Decho("case starpat==0 && a:indx=".a:indx.": dirname<".dirname.">, handles Explore Hexplore Vexplore Sexplore") if dirname == "" let dirname= curfiledir -" call Decho("(Explore) ..empty dirname, using current file's directory<".dirname.">") +" call Decho("..empty dirname, using current file's directory<".dirname.">") endif if dirname =~ '^scp://' || dirname =~ '^ftp://' call netrw#Nread(2,dirname) @@ -914,15 +721,17 @@ if dirname == "" let dirname= getcwd() elseif (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin - if dirname !~ '^[a-zA-Z]:' + " Windows : check for a drive specifier, or else for a remote share name ('\\Foo' or '//Foo', + " depending on whether backslashes have been converted to forward slashes by earlier code). + if dirname !~ '^[a-zA-Z]:' && dirname !~ '^\\\\\w\+' && dirname !~ '^//\w\+' let dirname= b:netrw_curdir."/".dirname endif elseif dirname !~ '^/' let dirname= b:netrw_curdir."/".dirname endif -" call Decho("(Explore) ..calling LocalBrowseCheck(dirname<".dirname.">)") +" call Decho("..calling LocalBrowseCheck(dirname<".dirname.">)") call netrw#LocalBrowseCheck(dirname) -" call Decho("(Explore) win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) +" call Decho("win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) endif if exists("w:netrw_bannercnt") " done to handle P08-Ingelrest. :Explore will _Always_ go to the line just after the banner. @@ -930,7 +739,7 @@ exe w:netrw_bannercnt endif -" call Decho("(Explore) curdir<".curdir.">") +" call Decho("curdir<".curdir.">") " --------------------------------------------------------------------- " Jan 24, 2013: not sure why the following was present. See P08-Ingelrest " if has("win32") || has("win95") || has("win64") || has("win16") @@ -946,30 +755,32 @@ " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) elseif a:indx <= 0 " Nexplore, Pexplore, Explore: handle starpat -" call Decho("(Explore) case a:indx<=0: Nexplore, Pexplore, , starpat=".starpat." a:indx=".a:indx) +" call Decho("case a:indx<=0: Nexplore, Pexplore, , starpat=".starpat." a:indx=".a:indx) if !mapcheck("","n") && !mapcheck("","n") && exists("b:netrw_curdir") -" call Decho("(Explore) ..set up and maps") +" call Decho("..set up and maps") let s:didstarstar= 1 nnoremap :Pexplore nnoremap :Nexplore endif if has("path_extra") -" call Decho("(Explore) ..starpat=".starpat.": has +path_extra") +" call Decho("..starpat=".starpat.": has +path_extra") if !exists("w:netrw_explore_indx") let w:netrw_explore_indx= 0 endif let indx = a:indx -" call Decho("(Explore) ..starpat=".starpat.": set indx= [a:indx=".indx."]") +" call Decho("..starpat=".starpat.": set indx= [a:indx=".indx."]") if indx == -1 " Nexplore -" call Decho("(Explore) ..case Nexplore with starpat=".starpat.": (indx=".indx.")") +" call Decho("..case Nexplore with starpat=".starpat.": (indx=".indx.")") if !exists("w:netrw_explore_list") " sanity check keepj call netrw#ErrorMsg(s:WARNING,"using Nexplore or improperly; see help for netrw-starstar",40) - sil! let @* = keepregstar - sil! let @+ = keepregstar + if has("clipboard") + sil! let @* = keepregstar + sil! let @+ = keepregstar + endif sil! let @/ = keepregslash " call Dret("netrw#Explore") return @@ -978,21 +789,23 @@ if indx < 0 | let indx= 0 | endif if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif let curfile= w:netrw_explore_list[indx] -" call Decho("(Explore) ....indx=".indx." curfile<".curfile.">") +" call Decho("....indx=".indx." curfile<".curfile.">") while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx] let indx= indx + 1 -" call Decho("(Explore) ....indx=".indx." (Nexplore while loop)") +" call Decho("....indx=".indx." (Nexplore while loop)") endwhile if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif -" call Decho("(Explore) ....Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) +" call Decho("....Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) elseif indx == -2 " Pexplore -" call Decho("(Explore) case Pexplore with starpat=".starpat.": (indx=".indx.")") +" call Decho("case Pexplore with starpat=".starpat.": (indx=".indx.")") if !exists("w:netrw_explore_list") " sanity check keepj call netrw#ErrorMsg(s:WARNING,"using Pexplore or improperly; see help for netrw-starstar",41) - sil! let @* = keepregstar - sil! let @+ = keepregstar + if has("clipboard") + sil! let @* = keepregstar + sil! let @+ = keepregstar + endif sil! let @/ = keepregslash " call Dret("netrw#Explore") return @@ -1001,30 +814,30 @@ if indx < 0 | let indx= 0 | endif if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif let curfile= w:netrw_explore_list[indx] -" call Decho("(Explore) ....indx=".indx." curfile<".curfile.">") +" call Decho("....indx=".indx." curfile<".curfile.">") while indx >= 0 && curfile == w:netrw_explore_list[indx] let indx= indx - 1 -" call Decho("(Explore) ....indx=".indx." (Pexplore while loop)") +" call Decho("....indx=".indx." (Pexplore while loop)") endwhile if indx < 0 | let indx= 0 | endif -" call Decho("(Explore) ....Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) +" call Decho("....Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) else " Explore -- initialize " build list of files to Explore with Nexplore/Pexplore -" call Decho("(Explore) ..starpat=".starpat.": case Explore: initialize (indx=".indx.")") +" call Decho("..starpat=".starpat.": case Explore: initialize (indx=".indx.")") keepj keepalt call s:NetrwClearExplore() let w:netrw_explore_indx= 0 if !exists("b:netrw_curdir") let b:netrw_curdir= getcwd() endif -" call Decho("(Explore) ....starpat=".starpat.": b:netrw_curdir<".b:netrw_curdir.">") +" call Decho("....starpat=".starpat.": b:netrw_curdir<".b:netrw_curdir.">") " switch on starpat to build the w:netrw_explore_list of files if starpat == 1 " starpat=1: Explore *//pattern (current directory only search for files containing pattern) -" call Decho("(Explore) ..case starpat=".starpat.": build *//pattern list (curdir-only srch for files containing pattern) &hls=".&hls) -" call Decho("(Explore) ....pattern<".pattern.">") +" call Decho("..case starpat=".starpat.": build *//pattern list (curdir-only srch for files containing pattern) &hls=".&hls) +" call Decho("....pattern<".pattern.">") try exe "keepj noautocmd vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*" catch /^Vim\%((\a\+)\)\=:E480/ @@ -1037,15 +850,17 @@ elseif starpat == 2 " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) -" call Decho("(Explore) ..case starpat=".starpat.": build **//pattern list (recursive descent files containing pattern)") -" call Decho("(Explore) ....pattern<".pattern.">") +" call Decho("..case starpat=".starpat.": build **//pattern list (recursive descent files containing pattern)") +" call Decho("....pattern<".pattern.">") try exe "sil keepj noautocmd keepalt vimgrep /".pattern."/gj "."**/*" catch /^Vim\%((\a\+)\)\=:E480/ keepalt call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45) if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif - sil! let @* = keepregstar - sil! let @+ = keepregstar + if has("clipboard") + sil! let @* = keepregstar + sil! let @+ = keepregstar + endif sil! let @/ = keepregslash " call Dret("netrw#Explore : no files matched pattern") return @@ -1057,29 +872,31 @@ elseif starpat == 3 " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) -" call Decho("(Explore) ..case starpat=".starpat.": build */filepat list (curdir-only srch filenames matching filepat) &hls=".&hls) +" call Decho("..case starpat=".starpat.": build */filepat list (curdir-only srch filenames matching filepat) &hls=".&hls) let filepat= substitute(dirname,'^\*/','','') let filepat= substitute(filepat,'^[%#<]','\\&','') -" call Decho("(Explore) ....b:netrw_curdir<".b:netrw_curdir.">") -" call Decho("(Explore) ....filepat<".filepat.">") +" call Decho("....b:netrw_curdir<".b:netrw_curdir.">") +" call Decho("....filepat<".filepat.">") let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".filepat),'\n')) if &hls | let keepregslash= s:ExplorePatHls(filepat) | endif elseif starpat == 4 " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) -" call Decho("(Explore) ..case starpat=".starpat.": build **/filepat list (recursive descent srch filenames matching filepat) &hls=".&hls) +" call Decho("..case starpat=".starpat.": build **/filepat list (recursive descent srch filenames matching filepat) &hls=".&hls) let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".dirname),'\n')) if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif endif " switch on starpat to build w:netrw_explore_list let w:netrw_explore_listlen = len(w:netrw_explore_list) -" call Decho("(Explore) ....w:netrw_explore_list<".string(w:netrw_explore_list).">") -" call Decho("(Explore) ....w:netrw_explore_listlen=".w:netrw_explore_listlen) +" call Decho("....w:netrw_explore_list<".string(w:netrw_explore_list).">") +" call Decho("....w:netrw_explore_listlen=".w:netrw_explore_listlen) if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/') keepalt keepj call netrw#ErrorMsg(s:WARNING,"no files matched",42) - sil! let @* = keepregstar - sil! let @+ = keepregstar + if has("clipboard") + sil! let @* = keepregstar + sil! let @+ = keepregstar + endif sil! let @/ = keepregslash " call Dret("netrw#Explore : no files matched") return @@ -1088,22 +905,22 @@ " NetrwStatusLine support - for exploring support let w:netrw_explore_indx= indx -" call Decho("(Explore) ....w:netrw_explore_list<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen) +" call Decho("....w:netrw_explore_list<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen) " wrap the indx around, but issue a note if indx >= w:netrw_explore_listlen || indx < 0 -" call Decho("(Explore) ....wrap indx (indx=".indx." listlen=".w:netrw_explore_listlen.")") +" call Decho("....wrap indx (indx=".indx." listlen=".w:netrw_explore_listlen.")") let indx = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0 let w:netrw_explore_indx= indx keepalt keepj call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43) endif exe "let dirfile= w:netrw_explore_list[".indx."]" -" call Decho("(Explore) ....dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">") +" call Decho("....dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">") let newdir= substitute(dirfile,'/[^/]*$','','e') -" call Decho("(Explore) ....newdir<".newdir.">") +" call Decho("....newdir<".newdir.">") -" call Decho("(Explore) ....calling LocalBrowseCheck(newdir<".newdir.">)") +" call Decho("....calling LocalBrowseCheck(newdir<".newdir.">)") call netrw#LocalBrowseCheck(newdir) if !exists("w:netrw_liststyle") let w:netrw_liststyle= g:netrw_liststyle @@ -1117,22 +934,24 @@ let w:netrw_explore_bufnr = bufnr("%") let w:netrw_explore_line = line(".") keepalt keepj call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}') -" call Decho("(Explore) ....explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line) +" call Decho("....explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line) else -" call Decho("(Explore) ..your vim does not have +path_extra") +" call Decho("..your vim does not have +path_extra") if !exists("g:netrw_quiet") keepalt keepj call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44) endif - sil! let @* = keepregstar - sil! let @+ = keepregstar + if has("clipboard") + sil! let @* = keepregstar + sil! let @+ = keepregstar + endif sil! let @/ = keepregslash " call Dret("netrw#Explore : missing +path_extra") return endif else -" call Decho("(Explore) ..default case: Explore newdir<".dirname.">") +" call Decho("..default case: Explore newdir<".dirname.">") if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/' sil! unlet w:netrw_treedict sil! unlet w:netrw_treetop @@ -1146,22 +965,22 @@ endif " visual display of **/ **// */ Exploration files -" call Decho("(Explore) w:netrw_explore_indx=".(exists("w:netrw_explore_indx")? w:netrw_explore_indx : "doesn't exist")) -" call Decho("(Explore) b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "n/a").">") +" call Decho("w:netrw_explore_indx=".(exists("w:netrw_explore_indx")? w:netrw_explore_indx : "doesn't exist")) +" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "n/a").">") if exists("w:netrw_explore_indx") && exists("b:netrw_curdir") -" call Decho("(Explore) s:explore_prvdir<".(exists("s:explore_prvdir")? s:explore_prvdir : "-doesn't exist-")) +" call Decho("s:explore_prvdir<".(exists("s:explore_prvdir")? s:explore_prvdir : "-doesn't exist-")) if !exists("s:explore_prvdir") || s:explore_prvdir != b:netrw_curdir - " only update match list if current directory isn't the same as before -" call Decho("(Explore) only update match list if current directory not the same as before") + " only update match list when current directory isn't the same as before +" call Decho("only update match list when current directory not the same as before") let s:explore_prvdir = b:netrw_curdir let s:explore_match = "" - let dirlen = s:Strlen(b:netrw_curdir) + let dirlen = strlen(b:netrw_curdir) if b:netrw_curdir !~ '/$' let dirlen= dirlen + 1 endif let prvfname= "" for fname in w:netrw_explore_list -" call Decho("(Explore) fname<".fname.">") +" call Decho("fname<".fname.">") if fname =~ '^'.b:netrw_curdir if s:explore_match == "" let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' @@ -1177,7 +996,7 @@ endif let prvfname= fname endfor -" call Decho("(Explore) explore_match<".s:explore_match.">") +" call Decho("explore_match<".s:explore_match.">") exe "2match netrwMarkFile /".s:explore_match."/" endif echo "==Pexplore ==Nexplore" @@ -1186,47 +1005,76 @@ if exists("s:explore_match") | unlet s:explore_match | endif if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif echo " " -" call Decho("(Explore) cleared explore match list") +" call Decho("cleared explore match list") endif - sil! let @* = keepregstar - sil! let @+ = keepregstar + " since Explore may be used to initialize netrw's browser, + " there's no danger of a late FocusGained event on initialization. + " Consequently, set s:netrw_events to 2. + let s:netrw_events= 2 + if has("clipboard") + sil! let @* = keepregstar + sil! let @+ = keepregstar + endif sil! let @/ = keepregslash " call Dret("netrw#Explore : @/<".@/.">") endfun " --------------------------------------------------------------------- -" netrw#NetrwMakeTgt: make a target out of the directory name provided {{{2 -fun! netrw#NetrwMakeTgt(dname) -" call Dfunc("netrw#NetrwMakeTgt(dname<".a:dname.">)") - " simplify the target (eg. /abc/def/../ghi -> /abc/ghi) - let svpos = netrw#NetrwSavePosn() - let s:netrwmftgt_islocal= (a:dname !~ '^\a\+://') -" call Decho("s:netrwmftgt_islocal=".s:netrwmftgt_islocal) - if s:netrwmftgt_islocal - let netrwmftgt= simplify(a:dname) - else - let netrwmftgt= a:dname +" netrw#Lexplore: toggle Explorer window, keeping it on the left of the current tab {{{2 +fun! netrw#Lexplore(...) +" call Dfunc("netrw#Lexplore() a:0=".a:0) + if a:0 > 0 && a:1 != "" + " if a netrw window is already on the left-side of the tab + " and a directory has been specified, explore with that + " directory. + let lexwinnr= winnr() + exe "1wincmd w" + if &ft == "netrw" + exe "Explore ".fnameescape(a:1) + exe lexwinnr."wincmd w" + endif + exe lexwinnr."wincmd w" +" call Dret("netrw#Lexplore") + return endif - if exists("s:netrwmftgt") && netrwmftgt == s:netrwmftgt - " re-selected target, so just clear it - unlet s:netrwmftgt s:netrwmftgt_islocal + + if exists("t:netrw_lexbufnr") + " close down netrw explorer window + let lexwinnr = bufwinnr(t:netrw_lexbufnr) + if lexwinnr != -1 + let curwin = winnr() + exe lexwinnr."wincmd w" + close + exe curwin."wincmd w" + endif + unlet t:netrw_lexbufnr + else - let s:netrwmftgt= netrwmftgt + " open netrw explorer window + exe "1wincmd w" + let keep_altv = g:netrw_altv + let g:netrw_altv = 0 + if a:0 > 0 && a:1 != "" + exe "Vexplore ".fnameescape(a:1) + else + Vexplore . + endif + let g:netrw_altv = keep_altv + let t:netrw_lexbufnr = bufnr("%") endif - if g:netrw_fastbrowse <= 1 - call s:NetrwRefresh((b:netrw_curdir !~ '\a\+://'),b:netrw_curdir) + if exists("g:netrw_chgwin") && g:netrw_chgwin == -1 + let g:netrw_chgwin= 2 endif - call netrw#NetrwRestorePosn(svpos) -" call Dret("netrw#NetrwMakeTgt") +" call Dret("netrw#Lexplore") endfun " --------------------------------------------------------------------- -" netrw#NetrwClean: remove netrw {{{2 +" netrw#Clean: remove netrw {{{2 " supports :NetrwClean -- remove netrw from first directory on runtimepath " :NetrwClean! -- remove netrw from all directories on runtimepath -fun! netrw#NetrwClean(sys) -" call Dfunc("netrw#NetrwClean(sys=".a:sys.")") +fun! netrw#Clean(sys) +" call Dfunc("netrw#Clean(sys=".a:sys.")") if a:sys let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No") @@ -1264,28 +1112,44 @@ endif echohl None -" call Dret("netrw#NetrwClean") +" call Dret("netrw#Clean") endfun " --------------------------------------------------------------------- -" netrw#Nread: {{{2 -fun! netrw#Nread(mode,fname) -" call Dfunc("netrw#Nread(mode=".a:mode." fname<".a:fname.">)") - call netrw#NetrwSavePosn() - call netrw#NetRead(a:mode,a:fname) - call netrw#NetrwRestorePosn() -" call Dret("netrw#Nread") +" netrw#MakeTgt: make a target out of the directory name provided {{{2 +fun! netrw#MakeTgt(dname) +" call Dfunc("netrw#MakeTgt(dname<".a:dname.">)") + " simplify the target (eg. /abc/def/../ghi -> /abc/ghi) + let svpos = netrw#SavePosn() + let s:netrwmftgt_islocal= (a:dname !~ '^\a\+://') +" call Decho("s:netrwmftgt_islocal=".s:netrwmftgt_islocal) + if s:netrwmftgt_islocal + let netrwmftgt= simplify(a:dname) + else + let netrwmftgt= a:dname + endif + if exists("s:netrwmftgt") && netrwmftgt == s:netrwmftgt + " re-selected target, so just clear it + unlet s:netrwmftgt s:netrwmftgt_islocal + else + let s:netrwmftgt= netrwmftgt + endif + if g:netrw_fastbrowse <= 1 + call s:NetrwRefresh((b:netrw_curdir !~ '\a\+://'),b:netrw_curdir) + endif + call netrw#RestorePosn(svpos) +" call Dret("netrw#MakeTgt") endfun -" ------------------------------------------------------------------------ -" netrw#NetrwObtain: {{{2 -" netrw#NetrwObtain(islocal,fname[,tgtdirectory]) +" --------------------------------------------------------------------- +" netrw#Obtain: {{{2 +" netrw#Obtain(islocal,fname[,tgtdirectory]) " islocal=0 obtain from remote source " =1 obtain from local source " fname : a filename or a list of filenames " tgtdir : optional place where files are to go (not present, uses getcwd()) -fun! netrw#NetrwObtain(islocal,fname,...) -" call Dfunc("netrw#NetrwObtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0) +fun! netrw#Obtain(islocal,fname,...) +" call Dfunc("netrw#Obtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0) " NetrwStatusLine support - for obtaining support if type(a:fname) == 1 @@ -1294,7 +1158,7 @@ let fnamelist= a:fname else call netrw#ErrorMsg(s:ERROR,"attempting to use NetrwObtain on something not a filename or a list",62) -" call Dret("netrw#NetrwObtain") +" call Dret("netrw#Obtain") return endif " call Decho("fnamelist<".string(fnamelist).">") @@ -1472,7 +1336,7 @@ endif endif elseif !exists("b:netrw_method") || b:netrw_method < 0 -" call Dfunc("netrw#NetrwObtain : unsupported method") +" call Dfunc("netrw#Obtain : unsupported method") return endif @@ -1492,553 +1356,407 @@ endif endif -" call Dret("netrw#NetrwObtain") +" call Dret("netrw#Obtain") endfun " --------------------------------------------------------------------- -" NetrwStatusLine: {{{2 -fun! NetrwStatusLine() - -" vvv NetrwStatusLine() debugging vvv -" let g:stlmsg="" -" if !exists("w:netrw_explore_bufnr") -" let g:stlmsg="!X" -" elseif w:netrw_explore_bufnr != bufnr("%") -" let g:stlmsg="explore_bufnr!=".bufnr("%") -" endif -" if !exists("w:netrw_explore_line") -" let g:stlmsg=" !X" -" elseif w:netrw_explore_line != line(".") -" let g:stlmsg=" explore_line!={line(.)<".line(".").">" -" endif -" if !exists("w:netrw_explore_list") -" let g:stlmsg=" !X" -" endif -" ^^^ NetrwStatusLine() debugging ^^^ +" netrw#Nread: save position, call netrw#NetRead(), and restore position {{{2 +fun! netrw#Nread(mode,fname) +" call Dfunc("netrw#Nread(mode=".a:mode." fname<".a:fname.">)") + call netrw#SavePosn() + call netrw#NetRead(a:mode,a:fname) + call netrw#RestorePosn() - if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") - " restore user's status line - let &stl = s:netrw_users_stl - let &laststatus = s:netrw_users_ls - if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif - if exists("w:netrw_explore_line") |unlet w:netrw_explore_line |endif - return "" - else - return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen + if exists("w:netrw_liststyle") && w:netrw_liststyle != s:TREELIST + if exists("w:netrw_bannercnt") + " start with cursor just after the banner + exe w:netrw_bannercnt + endif endif +" call Dret("netrw#Nread") endfun -" --------------------------------------------------------------------- -" Netrw Transfer Functions: {{{1 -" =============================== - " ------------------------------------------------------------------------ -" netrw#NetRead: responsible for reading a file over the net {{{2 -" mode: =0 read remote file and insert before current line -" =1 read remote file and insert after current line -" =2 replace with remote file -" =3 obtain file, but leave in temporary format -fun! netrw#NetRead(mode,...) -" call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw.((a:0 > 0)? " a:1<".a:1.">" : "")) - - " NetRead: save options {{{3 - call s:NetrwOptionSave("w:") - call s:NetrwSafeOptions() - call s:RestoreCursorline() - - " NetRead: interpret mode into a readcmd {{{3 - if a:mode == 0 " read remote file before current line - let readcmd = "0r" - elseif a:mode == 1 " read file after current line - let readcmd = "r" - elseif a:mode == 2 " replace with remote file - let readcmd = "%r" - elseif a:mode == 3 " skip read of file (leave as temporary) - let readcmd = "t" - else - exe a:mode - let readcmd = "r" - endif - let ichoice = (a:0 == 0)? 0 : 1 -" call Decho("readcmd<".readcmd."> ichoice=".ichoice) - - " NetRead: get temporary filename {{{3 - let tmpfile= s:GetTempfile("") - if tmpfile == "" -" call Dret("netrw#NetRead : unable to get a tempfile!") +" s:NetrwOptionRestore: restore options (based on prior s:NetrwOptionSave) {{{2 +fun! s:NetrwOptionRestore(vt) +" call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$")) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt) + if !exists("{a:vt}netrw_optionsave") + if exists("s:nbcd_curpos_{bufnr('%')}") +" call Decho("restoring previous position (s:nbcd_curpos_".bufnr('%')." exists)") + keepj call netrw#RestorePosn(s:nbcd_curpos_{bufnr('%')}) +" call Decho("win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$")) +" call Decho("unlet s:nbcd_curpos_".bufnr('%')) + unlet s:nbcd_curpos_{bufnr('%')} + else +" call Decho("no previous position") + endif +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist") return endif + unlet {a:vt}netrw_optionsave - while ichoice <= a:0 - - " attempt to repeat with previous host-file-etc - if exists("b:netrw_lastfile") && a:0 == 0 -" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") - let choice = b:netrw_lastfile - let ichoice= ichoice + 1 - - else - exe "let choice= a:" . ichoice -" call Decho("no lastfile: choice<" . choice . ">") - - if match(choice,"?") == 0 - " give help - echomsg 'NetRead Usage:' - echomsg ':Nread machine:path uses rcp' - echomsg ':Nread "machine path" uses ftp with <.netrc>' - echomsg ':Nread "machine id password path" uses ftp' - echomsg ':Nread dav://machine[:port]/path uses cadaver' - echomsg ':Nread fetch://machine/path uses fetch' - echomsg ':Nread ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' - echomsg ':Nread http://[user@]machine/path uses http wget' - echomsg ':Nread rcp://[user@]machine/path uses rcp' - echomsg ':Nread rsync://machine[:port]/path uses rsync' - echomsg ':Nread scp://[user@]machine[[:#]port]/path uses scp' - echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp' - sleep 4 - break - - elseif match(choice,'^"') != -1 - " Reconstruct Choice if choice starts with '"' -" call Decho("reconstructing choice") - if match(choice,'"$') != -1 - " case "..." - let choice= strpart(choice,1,strlen(choice)-2) - else - " case "... ... ..." - let choice = strpart(choice,1,strlen(choice)-1) - let wholechoice = "" - - while match(choice,'"$') == -1 - let wholechoice = wholechoice . " " . choice - let ichoice = ichoice + 1 - if ichoice > a:0 - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3) - endif -" call Dret("netrw#NetRead :2 getcwd<".getcwd().">") - return - endif - let choice= a:{ichoice} - endwhile - let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) - endif + if exists("+acd") + if exists("{a:vt}netrw_acdkeep") +" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) + let curdir = getcwd() + let &l:acd = {a:vt}netrw_acdkeep + unlet {a:vt}netrw_acdkeep + if &l:acd + call s:NetrwLcd(curdir) endif endif - -" call Decho("choice<" . choice . ">") - let ichoice= ichoice + 1 - - " NetRead: Determine method of read (ftp, rcp, etc) {{{3 - call s:NetrwMethod(choice) - if !exists("b:netrw_method") || b:netrw_method < 0 -" call Dfunc("netrw#NetRead : unsupported method") - return + endif + if exists("{a:vt}netrw_aikeep") |let &l:ai = {a:vt}netrw_aikeep |unlet {a:vt}netrw_aikeep |endif + if exists("{a:vt}netrw_awkeep") |let &l:aw = {a:vt}netrw_awkeep |unlet {a:vt}netrw_awkeep |endif + if g:netrw_liststyle != s:TREELIST + if exists("{a:vt}netrw_bhkeep") |let &l:bh = {a:vt}netrw_bhkeep |unlet {a:vt}netrw_bhkeep |endif + endif + if exists("{a:vt}netrw_blkeep") |let &l:bl = {a:vt}netrw_blkeep |unlet {a:vt}netrw_blkeep |endif + if exists("{a:vt}netrw_btkeep") |let &l:bt = {a:vt}netrw_btkeep |unlet {a:vt}netrw_btkeep |endif + if exists("{a:vt}netrw_bombkeep") |let &l:bomb = {a:vt}netrw_bombkeep |unlet {a:vt}netrw_bombkeep |endif + if exists("{a:vt}netrw_cedit") |let &cedit = {a:vt}netrw_cedit |unlet {a:vt}netrw_cedit |endif + if exists("{a:vt}netrw_cikeep") |let &l:ci = {a:vt}netrw_cikeep |unlet {a:vt}netrw_cikeep |endif + if exists("{a:vt}netrw_cinkeep") |let &l:cin = {a:vt}netrw_cinkeep |unlet {a:vt}netrw_cinkeep |endif + if exists("{a:vt}netrw_cinokeep") |let &l:cino = {a:vt}netrw_cinokeep |unlet {a:vt}netrw_cinokeep |endif + if exists("{a:vt}netrw_comkeep") |let &l:com = {a:vt}netrw_comkeep |unlet {a:vt}netrw_comkeep |endif + if exists("{a:vt}netrw_cpokeep") |let &l:cpo = {a:vt}netrw_cpokeep |unlet {a:vt}netrw_cpokeep |endif + if exists("{a:vt}netrw_diffkeep") |let &l:diff = {a:vt}netrw_diffkeep |unlet {a:vt}netrw_diffkeep |endif + if exists("{a:vt}netrw_fenkeep") |let &l:fen = {a:vt}netrw_fenkeep |unlet {a:vt}netrw_fenkeep |endif + if exists("{a:vt}netrw_ffkeep") |let &l:ff = {a:vt}netrw_ffkeep |unlet {a:vt}netrw_ffkeep |endif + if exists("{a:vt}netrw_fokeep") |let &l:fo = {a:vt}netrw_fokeep |unlet {a:vt}netrw_fokeep |endif + if exists("{a:vt}netrw_gdkeep") |let &l:gd = {a:vt}netrw_gdkeep |unlet {a:vt}netrw_gdkeep |endif + if exists("{a:vt}netrw_hidkeep") |let &l:hidden = {a:vt}netrw_hidkeep |unlet {a:vt}netrw_hidkeep |endif + if exists("{a:vt}netrw_imkeep") |let &l:im = {a:vt}netrw_imkeep |unlet {a:vt}netrw_imkeep |endif + if exists("{a:vt}netrw_iskkeep") |let &l:isk = {a:vt}netrw_iskkeep |unlet {a:vt}netrw_iskkeep |endif + if exists("{a:vt}netrw_lskeep") |let &l:ls = {a:vt}netrw_lskeep |unlet {a:vt}netrw_lskeep |endif + if exists("{a:vt}netrw_makeep") |let &l:ma = {a:vt}netrw_makeep |unlet {a:vt}netrw_makeep |endif + if exists("{a:vt}netrw_magickeep")|let &l:magic = {a:vt}netrw_magickeep |unlet {a:vt}netrw_magickeep|endif + if exists("{a:vt}netrw_modkeep") |let &l:mod = {a:vt}netrw_modkeep |unlet {a:vt}netrw_modkeep |endif + if exists("{a:vt}netrw_nukeep") |let &l:nu = {a:vt}netrw_nukeep |unlet {a:vt}netrw_nukeep |endif + if exists("{a:vt}netrw_repkeep") |let &l:report = {a:vt}netrw_repkeep |unlet {a:vt}netrw_repkeep |endif + if exists("{a:vt}netrw_rokeep") |let &l:ro = {a:vt}netrw_rokeep |unlet {a:vt}netrw_rokeep |endif + if exists("{a:vt}netrw_selkeep") |let &l:sel = {a:vt}netrw_selkeep |unlet {a:vt}netrw_selkeep |endif + if exists("{a:vt}netrw_spellkeep")|let &l:spell = {a:vt}netrw_spellkeep |unlet {a:vt}netrw_spellkeep|endif + if has("clipboard") + if exists("{a:vt}netrw_starkeep") |let @* = {a:vt}netrw_starkeep |unlet {a:vt}netrw_starkeep |endif + endif + " Problem: start with liststyle=0; press : result, following line resets l:ts. +" if exists("{a:vt}netrw_tskeep") |let &l:ts = {a:vt}netrw_tskeep |unlet {a:vt}netrw_tskeep |endif + if exists("{a:vt}netrw_twkeep") |let &l:tw = {a:vt}netrw_twkeep |unlet {a:vt}netrw_twkeep |endif + if exists("{a:vt}netrw_wigkeep") |let &l:wig = {a:vt}netrw_wigkeep |unlet {a:vt}netrw_wigkeep |endif + if exists("{a:vt}netrw_wrapkeep") |let &l:wrap = {a:vt}netrw_wrapkeep |unlet {a:vt}netrw_wrapkeep |endif + if exists("{a:vt}netrw_writekeep")|let &l:write = {a:vt}netrw_writekeep |unlet {a:vt}netrw_writekeep|endif + if exists("s:yykeep") |let @@ = s:yykeep |unlet s:yykeep |endif + if exists("{a:vt}netrw_swfkeep") + if &directory == "" + " user hasn't specified a swapfile directory; + " netrw will temporarily set the swapfile directory + " to the current directory as returned by getcwd(). + let &l:directory= getcwd() + sil! let &l:swf = {a:vt}netrw_swfkeep + setl directory= + unlet {a:vt}netrw_swfkeep + elseif &l:swf != {a:vt}netrw_swfkeep + " following line causes a Press ENTER in windows -- can't seem to work around it!!! + sil! let &l:swf= {a:vt}netrw_swfkeep + unlet {a:vt}netrw_swfkeep endif - let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix - - " Check if NetrwBrowse() should be handling this request -" call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">") - if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://' -" call Decho("yes, choice matches '^.*[\/]$'") - keepj call s:NetrwBrowse(0,choice) -" call Dret("netrw#NetRead :3 getcwd<".getcwd().">") - return + endif + if exists("{a:vt}netrw_dirkeep") && isdirectory({a:vt}netrw_dirkeep) && g:netrw_keepdir + let dirkeep = substitute({a:vt}netrw_dirkeep,'\\','/','g') + if exists("{a:vt}netrw_dirkeep") + call s:NetrwLcd(dirkeep) + unlet {a:vt}netrw_dirkeep + endif + endif + if has("clipboard") + if exists("{a:vt}netrw_regstar") |sil! let @*= {a:vt}netrw_regstar |unlet {a:vt}netrw_regstar |endif + endif + if exists("{a:vt}netrw_regslash")|sil! let @/= {a:vt}netrw_regslash|unlet {a:vt}netrw_regslash|endif + if exists("s:nbcd_curpos_{bufnr('%')}") +" call Decho("restoring previous position (s:nbcd_curpos_".bufnr('%')." exists)") + keepj call netrw#RestorePosn(s:nbcd_curpos_{bufnr('%')}) +" call Decho("unlet s:nbcd_curpos_".bufnr('%')) + if exists("s:nbcd_curpos_".bufnr('%')) + unlet s:nbcd_curpos_{bufnr('%')} endif + else +" call Decho("no previous position") + endif - " ============ - " NetRead: Perform Protocol-Based Read {{{3 - " =========================== - if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 - echo "(netrw) Processing your read request..." - endif +" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) +" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Decho("diff=".&l:diff." win#".winnr()." w:netrw_diffkeep=".(exists("w:netrw_diffkeep")? w:netrw_diffkeep : "doesn't exist")) +" call Decho("ts=".&l:ts) + " Moved the filetype detect here from NetrwGetFile() because remote files + " were having their filetype detect-generated settings overwritten by + " NetrwOptionRestore. + if &ft != "netrw" +" call Decho("filetype detect (ft=".&ft.")") + filetype detect + endif +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt) +" call Dret("s:NetrwOptionRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) +endfun - "......................................... - " NetRead: (rcp) NetRead Method #1 {{{3 - if b:netrw_method == 1 " read with rcp -" call Decho("read via rcp (method #1)") - " ER: nothing done with g:netrw_uid yet? - " ER: on Win2K" rcp machine[.user]:file tmpfile - " ER: if machine contains '.' adding .user is required (use $USERNAME) - " ER: the tmpfile is full path: rcp sees C:\... as host C - if s:netrw_has_nt_rcp == 1 - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_machine .'.'. g:netrw_uid - else - " Any way needed it machine contains a '.' - let uid_machine = g:netrw_machine .'.'. $USERNAME - endif - else - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_uid .'@'. g:netrw_machine - else - let uid_machine = g:netrw_machine - endif - endif -" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) - exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice +" --------------------------------------------------------------------- +" s:NetrwOptionSave: save options prior to setting to "netrw-buffer-standard" form {{{2 +" Options get restored by s:NetrwOptionRestore() +" 06/08/07 : removed call to NetrwSafeOptions(), either placed +" immediately after NetrwOptionSave() calls in NetRead +" and NetWrite, or after the s:NetrwEnew() call in +" NetrwBrowse. +" vt: normally its "w:" or "s:" (a variable type) +fun! s:NetrwOptionSave(vt) +" call Dfunc("s:NetrwOptionSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma) +" call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist")) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt) - "......................................... - " NetRead: (ftp + <.netrc>) NetRead Method #2 {{{3 - elseif b:netrw_method == 2 " read with ftp + <.netrc> -" call Decho("read via ftp+.netrc (method #2)") - let netrw_fname= b:netrw_fname - keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() - let filtbuf= bufnr("%") - setl ff=unix - keepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline(line("$"))) - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline(line("$"))) - endif - call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile) -" call Decho("filter input: ".getline(line("$"))) - if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) - else -" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) - endif - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' - let debugkeep = &debug - setl debug=msg - keepj call netrw#ErrorMsg(s:ERROR,getline(1),4) - let &debug = debugkeep - endif - call s:SaveBufVars() - bd! - if bufname("%") == "" && getline("$") == "" && line('$') == 1 - " needed when one sources a file in a nolbl setting window via ftp - q! - endif - call s:RestoreBufVars() - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice + if !exists("{a:vt}netrw_optionsave") + let {a:vt}netrw_optionsave= 1 + else +" call Dret("s:NetrwOptionSave : options already saved") + return + endif +" call Decho("prior to save: fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff) - "......................................... - " NetRead: (ftp + machine,id,passwd,filename) NetRead Method #3 {{{3 - elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname - " Construct execution string (four lines) which will be passed through filter -" call Decho("read via ftp+mipf (method #3)") - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() - let filtbuf= bufnr("%") - setl ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - keepj put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho("filter input: ".getline('.')) - else - keepj put ='open '.g:netrw_machine -" call Decho("filter input: ".getline('.')) - endif + " Save current settings and current directory +" call Decho("saving current settings and current directory") + let s:yykeep = @@ + if exists("&l:acd")|let {a:vt}netrw_acdkeep = &l:acd|endif + let {a:vt}netrw_aikeep = &l:ai + let {a:vt}netrw_awkeep = &l:aw + let {a:vt}netrw_bhkeep = &l:bh + let {a:vt}netrw_blkeep = &l:bl +" let {a:vt}netrw_btkeep = &l:bt + let {a:vt}netrw_bombkeep = &l:bomb + let {a:vt}netrw_cedit = &cedit + let {a:vt}netrw_cikeep = &l:ci + let {a:vt}netrw_cinkeep = &l:cin + let {a:vt}netrw_cinokeep = &l:cino + let {a:vt}netrw_comkeep = &l:com + let {a:vt}netrw_cpokeep = &l:cpo + let {a:vt}netrw_diffkeep = &l:diff + let {a:vt}netrw_fenkeep = &l:fen + let {a:vt}netrw_ffkeep = &l:ff + let {a:vt}netrw_fokeep = &l:fo " formatoptions + let {a:vt}netrw_gdkeep = &l:gd " gdefault + let {a:vt}netrw_hidkeep = &l:hidden + let {a:vt}netrw_imkeep = &l:im + let {a:vt}netrw_iskkeep = &l:isk + let {a:vt}netrw_lskeep = &l:ls + let {a:vt}netrw_makeep = &l:ma + let {a:vt}netrw_magickeep = &l:magic + let {a:vt}netrw_modkeep = &l:mod + let {a:vt}netrw_nukeep = &l:nu + let {a:vt}netrw_repkeep = &l:report + let {a:vt}netrw_rokeep = &l:ro + let {a:vt}netrw_selkeep = &l:sel + let {a:vt}netrw_spellkeep = &l:spell + if g:netrw_use_noswf + let {a:vt}netrw_swfkeep = &l:swf + endif + if has("clipboard") + let {a:vt}netrw_starkeep = @* + endif + let {a:vt}netrw_tskeep = &l:ts + let {a:vt}netrw_twkeep = &l:tw " textwidth + let {a:vt}netrw_wigkeep = &l:wig " wildignore + let {a:vt}netrw_wrapkeep = &l:wrap + let {a:vt}netrw_writekeep = &l:write - if exists("g:netrw_uid") && g:netrw_uid != "" - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - keepj put =g:netrw_uid -" call Decho("filter input: ".getline('.')) - if exists("s:netrw_passwd") - keepj put ='\"'.s:netrw_passwd.'\"' - endif -" call Decho("filter input: ".getline('.')) - elseif exists("s:netrw_passwd") - keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline('.')) - endif - endif + " save a few selected netrw-related variables +" call Decho("saving a few selected netrw-related variables") + if g:netrw_keepdir + let {a:vt}netrw_dirkeep = getcwd() + endif + if has("clipboard") + if &go =~# 'a' | sil! let {a:vt}netrw_regstar = @* | endif + endif + sil! let {a:vt}netrw_regslash= @/ - if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" - keepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('.')) - endif - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('.')) - endif - keepj put ='get \"'.netrw_fname.'\" '.tmpfile -" call Decho("filter input: ".getline('.')) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt) +" call Dret("s:NetrwOptionSave : tab#".tabpagenr()." win#".winnr()) +endfun - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password - keepj norm! 1Gdd -" call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" -" call Decho("error<".getline(1).">") - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,getline(1),5) - endif - endif - call s:SaveBufVars()|bd!|call s:RestoreBufVars() - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice +" ------------------------------------------------------------------------ +" s:NetrwSafeOptions: sets options to help netrw do its job {{{2 +" Use s:NetrwSaveOptions() to save user settings +" Use s:NetrwOptionRestore() to restore user settings +fun! s:NetrwSafeOptions() +" call Dfunc("s:NetrwSafeOptions() win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%"))."> winnr($)=".winnr("$")) +" call Decho("win#".winnr()."'s ft=".&ft) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) + if exists("+acd") | setl noacd | endif + setl noai + setl noaw + setl nobl + setl nobomb + setl bt=nofile + setl noci + setl nocin + if g:netrw_liststyle == s:TREELIST + setl bh=hide + endif + setl cino= + setl com= + setl cpo-=a + setl cpo-=A + setl fo=nroql2 + setl nohid + setl noim + setl isk+=@ isk+=* isk+=/ + setl magic + if g:netrw_use_noswf + setl noswf + endif + setl report=10000 + setl sel=inclusive + setl nospell + setl tw=0 + setl wig= + setl cedit& + call s:NetrwCursor() - "......................................... - " NetRead: (scp) NetRead Method #4 {{{3 - elseif b:netrw_method == 4 " read with scp -" call Decho("read via scp (method #4)") - if exists("g:netrw_port") && g:netrw_port != "" - let useport= " ".g:netrw_scpport." ".g:netrw_port - else - let useport= "" - endif -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) - exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice + " allow the user to override safe options +" call Decho("ft<".&ft."> ei=".&ei) + if &ft == "netrw" +" call Decho("do any netrw FileType autocmds (doau FileType netrw)") + sil! keepalt keepj doau FileType netrw + endif - "......................................... - " NetRead: (http) NetRead Method #5 (wget) {{{3 - elseif b:netrw_method == 5 -" call Decho("read via http (method #5)") - if g:netrw_http_cmd == "" - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"neither the wget nor the fetch command is available",6) - endif -" call Dret("netrw#NetRead :4 getcwd<".getcwd().">") - return - endif - - if match(b:netrw_fname,"#") == -1 || exists("g:netrw_http_xcmd") - " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch) -" call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)") - if exists("g:netrw_http_xcmd") -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)) - exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1) - else -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)) - exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1) - endif - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - - else - " wget/curl/fetch plus a jump to an in-page marker (ie. http://abc/def.html#aMarker) -" call Decho("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)") - let netrw_html= substitute(b:netrw_fname,"#.*$","","") - let netrw_tag = substitute(b:netrw_fname,"^.*#","","") -" call Decho("netrw_html<".netrw_html.">") -" call Decho("netrw_tag <".netrw_tag.">") -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1)) - exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1) - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) -" call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/') - exe 'keepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\" - endif - let b:netrw_lastfile = choice -" call Decho("(NetRead) setl ro") - setl ro - - "......................................... - " NetRead: (dav) NetRead Method #6 {{{3 - elseif b:netrw_method == 6 -" call Decho("read via cadaver (method #6)") - - if !executable(g:netrw_dav_cmd) - call netrw#ErrorMsg(s:ERROR,g:netrw_dav_cmd." is not executable",73) -" call Dret("netrw#NetRead : ".g:netrw_dav_cmd." not executable") - return - endif - if g:netrw_dav_cmd =~ "curl" -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1)) - exe s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1) - else - " Construct execution string (four lines) which will be passed through filter - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - new - setl ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - keepj put ='open '.g:netrw_machine.' '.g:netrw_port - else - keepj put ='open '.g:netrw_machine - endif - if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" - keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd - endif - keepj put ='get '.netrw_fname.' '.tmpfile - keepj put ='quit' - - " perform cadaver operation: - keepj norm! 1Gdd -" call Decho("executing: %!".g:netrw_dav_cmd) - exe s:netrw_silentxfer."%!".g:netrw_dav_cmd - bd! - endif - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: (rsync) NetRead Method #7 {{{3 - elseif b:netrw_method == 7 -" call Decho("read via rsync (method #7)") -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) - exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) - let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: (fetch) NetRead Method #8 {{{3 - " fetch://[user@]host[:http]/path - elseif b:netrw_method == 8 -" call Decho("read via fetch (method #8)") - if g:netrw_fetch_cmd == "" - if !exists("g:netrw_quiet") - keepj call netrw#ErrorMsg(s:ERROR,"fetch command not available",7) - endif -" call Dret("NetRead") - return - endif - if exists("g:netrw_option") && g:netrw_option == ":https\=" - let netrw_option= "http" - else - let netrw_option= "ftp" - endif -" call Decho("read via fetch for ".netrw_option) - - if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != "" -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)) - exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1) - else -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)) - exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1) - endif - - let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) - let b:netrw_lastfile = choice -" call Decho("(NetRead) setl ro") - setl ro +" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dret("s:NetrwSafeOptions") +endfun - "......................................... - " NetRead: (sftp) NetRead Method #9 {{{3 - elseif b:netrw_method == 9 -" call Decho("read via sftp (method #9)") -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile) - exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice +" --------------------------------------------------------------------- +" NetrwStatusLine: {{{2 +fun! NetrwStatusLine() - "......................................... - " NetRead: Complain {{{3 - else - call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8) - endif - endwhile +" vvv NetrwStatusLine() debugging vvv +" let g:stlmsg="" +" if !exists("w:netrw_explore_bufnr") +" let g:stlmsg="!X" +" elseif w:netrw_explore_bufnr != bufnr("%") +" let g:stlmsg="explore_bufnr!=".bufnr("%") +" endif +" if !exists("w:netrw_explore_line") +" let g:stlmsg=" !X" +" elseif w:netrw_explore_line != line(".") +" let g:stlmsg=" explore_line!={line(.)<".line(".").">" +" endif +" if !exists("w:netrw_explore_list") +" let g:stlmsg=" !X" +" endif +" ^^^ NetrwStatusLine() debugging ^^^ - " NetRead: cleanup {{{3 - if exists("b:netrw_method") -" call Decho("cleanup b:netrw_method and b:netrw_fname") - unlet b:netrw_method - unlet b:netrw_fname - endif - if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' && tmpfile !~ '.tar.xz$' && tmpfile !~ '.txz' -" call Decho("cleanup by deleting tmpfile<".tmpfile.">") - keepj call s:NetrwDelete(tmpfile) + if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") + " restore user's status line + let &stl = s:netrw_users_stl + let &laststatus = s:netrw_users_ls + if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif + if exists("w:netrw_explore_line") |unlet w:netrw_explore_line |endif + return "" + else + return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen endif - keepj call s:NetrwOptionRestore("w:") - -" call Dret("netrw#NetRead :5 getcwd<".getcwd().">") endfun +" --------------------------------------------------------------------- +" Netrw Transfer Functions: {{{1 +" =============================== + " ------------------------------------------------------------------------ -" netrw#NetWrite: responsible for writing a file over the net {{{2 -fun! netrw#NetWrite(...) range -" call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw) +" netrw#NetRead: responsible for reading a file over the net {{{2 +" mode: =0 read remote file and insert before current line +" =1 read remote file and insert after current line +" =2 replace with remote file +" =3 obtain file, but leave in temporary format +fun! netrw#NetRead(mode,...) +" call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw.((a:0 > 0)? " a:1<".a:1.">" : "")) - " NetWrite: option handling {{{3 - let mod= 0 + " NetRead: save options {{{3 call s:NetrwOptionSave("w:") call s:NetrwSafeOptions() + call s:RestoreCursorline() - " NetWrite: Get Temporary Filename {{{3 - let tmpfile= s:GetTempfile("") - if tmpfile == "" -" call Dret("netrw#NetWrite : unable to get a tempfile!") - return - endif - - if a:0 == 0 - let ichoice = 0 - else - let ichoice = 1 - endif - - let curbufname= expand("%") -" call Decho("curbufname<".curbufname.">") - if &binary - " For binary writes, always write entire file. - " (line numbers don't really make sense for that). - " Also supports the writing of tar and zip files. -" call Decho("(write entire file) sil exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)) - exe "sil keepj w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) - elseif g:netrw_cygwin - " write (selected portion of) file to temporary - let cygtmpfile= substitute(tmpfile,'/cygdrive/\(.\)','\1:','') -" call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)) - exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile) + " NetRead: interpret mode into a readcmd {{{3 + if a:mode == 0 " read remote file before current line + let readcmd = "0r" + elseif a:mode == 1 " read file after current line + let readcmd = "r" + elseif a:mode == 2 " replace with remote file + let readcmd = "%r" + elseif a:mode == 3 " skip read of file (leave as temporary) + let readcmd = "t" else - " write (selected portion of) file to temporary -" call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)) - exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) + exe a:mode + let readcmd = "r" endif + let ichoice = (a:0 == 0)? 0 : 1 +" call Decho("readcmd<".readcmd."> ichoice=".ichoice) - if curbufname == "" - " if the file is [No Name], and one attempts to Nwrite it, the buffer takes - " on the temporary file's name. Deletion of the temporary file during - " cleanup then causes an error message. - 0file! + " NetRead: get temporary filename {{{3 + let tmpfile= s:GetTempfile("") + if tmpfile == "" +" call Dret("netrw#NetRead : unable to get a tempfile!") + return endif - " NetWrite: while choice loop: {{{3 while ichoice <= a:0 - " Process arguments: {{{4 " attempt to repeat with previous host-file-etc if exists("b:netrw_lastfile") && a:0 == 0 " call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") let choice = b:netrw_lastfile let ichoice= ichoice + 1 + else exe "let choice= a:" . ichoice +" call Decho("no lastfile: choice<" . choice . ">") - " Reconstruct Choice if choice starts with '"' if match(choice,"?") == 0 - echomsg 'NetWrite Usage:"' - echomsg ':Nwrite machine:path uses rcp' - echomsg ':Nwrite "machine path" uses ftp with <.netrc>' - echomsg ':Nwrite "machine id password path" uses ftp' - echomsg ':Nwrite dav://[user@]machine/path uses cadaver' - echomsg ':Nwrite fetch://[user@]machine/path uses fetch' - echomsg ':Nwrite ftp://machine[#port]/path uses ftp (autodetects <.netrc>)' - echomsg ':Nwrite rcp://machine/path uses rcp' - echomsg ':Nwrite rsync://[user@]machine/path uses rsync' - echomsg ':Nwrite scp://[user@]machine[[:#]port]/path uses scp' - echomsg ':Nwrite sftp://[user@]machine/path uses sftp' - sleep 4 - break - - elseif match(choice,"^\"") != -1 - if match(choice,"\"$") != -1 - " case "..." - let choice=strpart(choice,1,strlen(choice)-2) - else - " case "... ... ..." - let choice = strpart(choice,1,strlen(choice)-1) - let wholechoice = "" + " give help + echomsg 'NetRead Usage:' + echomsg ':Nread machine:path uses rcp' + echomsg ':Nread "machine path" uses ftp with <.netrc>' + echomsg ':Nread "machine id password path" uses ftp' + echomsg ':Nread dav://machine[:port]/path uses cadaver' + echomsg ':Nread fetch://machine/path uses fetch' + echomsg ':Nread ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' + echomsg ':Nread http://[user@]machine/path uses http wget' + echomsg ':Nread https://[user@]machine/path uses http wget' + echomsg ':Nread rcp://[user@]machine/path uses rcp' + echomsg ':Nread rsync://machine[:port]/path uses rsync' + echomsg ':Nread scp://[user@]machine[[:#]port]/path uses scp' + echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp' + sleep 4 + break - while match(choice,"\"$") == -1 - let wholechoice= wholechoice . " " . choice - let ichoice = ichoice + 1 - if choice > a:0 + elseif match(choice,'^"') != -1 + " Reconstruct Choice if choice starts with '"' +" call Decho("reconstructing choice") + if match(choice,'"$') != -1 + " case "..." + let choice= strpart(choice,1,strlen(choice)-2) + else + " case "... ... ..." + let choice = strpart(choice,1,strlen(choice)-1) + let wholechoice = "" + + while match(choice,'"$') == -1 + let wholechoice = wholechoice . " " . choice + let ichoice = ichoice + 1 + if ichoice > a:0 if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13) + call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3) endif -" call Dret("netrw#NetWrite") +" call Dret("netrw#NetRead :2 getcwd<".getcwd().">") return endif let choice= a:{ichoice} @@ -2047,105 +1765,110 @@ endif endif endif + +" call Decho("choice<" . choice . ">") let ichoice= ichoice + 1 -" call Decho("choice<" . choice . "> ichoice=".ichoice) - " Determine method of write (ftp, rcp, etc) {{{4 - keepj call s:NetrwMethod(choice) + " NetRead: Determine method of read (ftp, rcp, etc) {{{3 + call s:NetrwMethod(choice) if !exists("b:netrw_method") || b:netrw_method < 0 -" call Dfunc("netrw#NetWrite : unsupported method") +" call Dfunc("netrw#NetRead : unsupported method") + return + endif + let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix + + " Check whether or not NetrwBrowse() should be handling this request +" call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">") + if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://' +" call Decho("yes, choice matches '^.*[\/]$'") + keepj call s:NetrwBrowse(0,choice) +" call Dret("netrw#NetRead :3 getcwd<".getcwd().">") return endif - " ============= - " NetWrite: Perform Protocol-Based Write {{{3 - " ============================ + " ============ + " NetRead: Perform Protocol-Based Read {{{3 + " =========================== if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 - echo "(netrw) Processing your write request..." -" call Decho("(netrw) Processing your write request...") + echo "(netrw) Processing your read request..." endif "......................................... - " NetWrite: (rcp) NetWrite Method #1 {{{3 - if b:netrw_method == 1 -" call Decho("write via rcp (method #1)") - if s:netrw_has_nt_rcp == 1 - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_machine .'.'. g:netrw_uid - else - let uid_machine = g:netrw_machine .'.'. $USERNAME - endif + " NetRead: (rcp) NetRead Method #1 {{{3 + if b:netrw_method == 1 " read with rcp +" call Decho("read via rcp (method #1)") + " ER: nothing done with g:netrw_uid yet? + " ER: on Win2K" rcp machine[.user]:file tmpfile + " ER: when machine contains '.' adding .user is required (use $USERNAME) + " ER: the tmpfile is full path: rcp sees C:\... as host C + if s:netrw_has_nt_rcp == 1 + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_machine .'.'. g:netrw_uid else - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_uid .'@'. g:netrw_machine - else - let uid_machine = g:netrw_machine - endif - endif -" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1)) - exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1) - let b:netrw_lastfile = choice - - "......................................... - " NetWrite: (ftp + <.netrc>) NetWrite Method #2 {{{3 - elseif b:netrw_method == 2 -" call Decho("write via ftp+.netrc (method #2)") - let netrw_fname = b:netrw_fname - - " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead - let bhkeep = &l:bh - let curbuf = bufnr("%") - setl bh=hide - keepalt enew - -" call Decho("filter input window#".winnr()) - setl ff=unix - keepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('$')) - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline("$")) + " Any way needed it machine contains a '.' + let uid_machine = g:netrw_machine .'.'. $USERNAME endif - keepj call setline(line("$")+1,'put "'.tmpfile.'" "'.netrw_fname.'"') -" call Decho("filter input: ".getline("$")) - if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) + else + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_uid .'@'. g:netrw_machine else -" call Decho("filter input window#".winnr()) -" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) - exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) - endif - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" - if !exists("g:netrw_quiet") - keepj call netrw#ErrorMsg(s:ERROR,getline(1),14) - endif - let mod=1 + let uid_machine = g:netrw_machine endif + endif +" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice - " remove enew buffer (quietly) - let filtbuf= bufnr("%") - exe curbuf."b!" - let &l:bh = bhkeep - exe filtbuf."bw!" - - let b:netrw_lastfile = choice + "......................................... + " NetRead: (ftp + <.netrc>) NetRead Method #2 {{{3 + elseif b:netrw_method == 2 " read with ftp + <.netrc> +" call Decho("read via ftp+.netrc (method #2)") + let netrw_fname= b:netrw_fname + keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() + let filtbuf= bufnr("%") + setl ff=unix + keepj put =g:netrw_ftpmode +" call Decho("filter input: ".getline(line("$"))) + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline(line("$"))) + endif + call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile) +" call Decho("filter input: ".getline(line("$"))) + if exists("g:netrw_port") && g:netrw_port != "" +" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) + else +" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + let debugkeep = &debug + setl debug=msg + keepj call netrw#ErrorMsg(s:ERROR,getline(1),4) + let &debug = debugkeep + endif + call s:SaveBufVars() + bd! + if bufname("%") == "" && getline("$") == "" && line('$') == 1 + " needed when one sources a file in a nolbl setting window via ftp + q! + endif + call s:RestoreBufVars() + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice "......................................... - " NetWrite: (ftp + machine, id, passwd, filename) NetWrite Method #3 {{{3 - elseif b:netrw_method == 3 - " Construct execution string (three or more lines) which will be passed through filter + " NetRead: (ftp + machine,id,passwd,filename) NetRead Method #3 {{{3 + elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname + " Construct execution string (four lines) which will be passed through filter " call Decho("read via ftp+mipf (method #3)") - let netrw_fname = b:netrw_fname - let bhkeep = &l:bh - - " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead - let curbuf = bufnr("%") - setl bh=hide - keepalt enew + let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) + keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() + let filtbuf= bufnr("%") setl ff=unix - if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port " call Decho("filter input: ".getline('.')) @@ -2153,29 +1876,31 @@ keepj put ='open '.g:netrw_machine " call Decho("filter input: ".getline('.')) endif + if exists("g:netrw_uid") && g:netrw_uid != "" if exists("g:netrw_ftp") && g:netrw_ftp == 1 keepj put =g:netrw_uid -" call Decho("filter input: ".getline('.')) - if exists("s:netrw_passwd") && s:netrw_passwd != "" +" call Decho("filter input: ".getline('.')) + if exists("s:netrw_passwd") keepj put ='\"'.s:netrw_passwd.'\"' endif " call Decho("filter input: ".getline('.')) - elseif exists("s:netrw_passwd") && s:netrw_passwd != "" + elseif exists("s:netrw_passwd") keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' " call Decho("filter input: ".getline('.')) endif endif - keepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('$')) + + if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" + keepj put =g:netrw_ftpmode +" call Decho("filter input: ".getline('.')) + endif if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline("$")) +" call Decho("filter input: ".getline('.')) endif - keepj put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"' + keepj put ='get \"'.netrw_fname.'\" '.tmpfile " call Decho("filter input: ".getline('.')) - " save choice/id/password for future use - let b:netrw_lastfile = choice " perform ftp: " -i : turns off interactive prompting from ftp @@ -2186,3113 +1911,3829 @@ exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,getline(1),15) +" call Decho("error<".getline(1).">") + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,getline(1),5) endif - let mod=1 endif - - " remove enew buffer (quietly) - let filtbuf= bufnr("%") - exe curbuf."b!" - let &l:bh= bhkeep - exe filtbuf."bw!" + call s:SaveBufVars()|bd!|call s:RestoreBufVars() + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice "......................................... - " NetWrite: (scp) NetWrite Method #4 {{{3 - elseif b:netrw_method == 4 -" call Decho("write via scp (method #4)") + " NetRead: (scp) NetRead Method #4 {{{3 + elseif b:netrw_method == 4 " read with scp +" call Decho("read via scp (method #4)") if exists("g:netrw_port") && g:netrw_port != "" - let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port) + let useport= " ".g:netrw_scpport." ".g:netrw_port else let useport= "" endif -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)) - exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1) +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... - " NetWrite: (http) NetWrite Method #5 {{{3 - elseif b:netrw_method == 5 -" call Decho("write via http (method #5)") - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"currently does not support writing using http:",16) - endif - - "......................................... - " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{3 - elseif b:netrw_method == 6 -" call Decho("write via cadaver (method #6)") - - " Construct execution string (four lines) which will be passed through filter - let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape) - let bhkeep = &l:bh + " NetRead: (http) NetRead Method #5 (wget) {{{3 + elseif b:netrw_method == 5 +" call Decho("read via http (method #5)") + if g:netrw_http_cmd == "" + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"neither the wget nor the fetch command is available",6) + endif +" call Dret("netrw#NetRead :4 getcwd<".getcwd().">") + return + endif - " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead - let curbuf = bufnr("%") - setl bh=hide - keepalt enew + if match(b:netrw_fname,"#") == -1 || exists("g:netrw_http_xcmd") + " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch) +" call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)") + if exists("g:netrw_http_xcmd") +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1) + else +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1) + endif + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - setl ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - keepj put ='open '.g:netrw_machine.' '.g:netrw_port else - keepj put ='open '.g:netrw_machine - endif - if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" - keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd + " wget/curl/fetch plus a jump to an in-page marker (ie. http://abc/def.html#aMarker) +" call Decho("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)") + let netrw_html= substitute(b:netrw_fname,"#.*$","","") + let netrw_tag = substitute(b:netrw_fname,"^.*#","","") +" call Decho("netrw_html<".netrw_html.">") +" call Decho("netrw_tag <".netrw_tag.">") +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.netrw_html,1)) + exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape(b:netrw_http."://".g:netrw_machine.netrw_html,1) + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) +" call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/') + exe 'keepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\" endif - keepj put ='put '.tmpfile.' '.netrw_fname + let b:netrw_lastfile = choice +" call Decho("setl ro") + setl ro - " perform cadaver operation: - keepj norm! 1Gdd -" call Decho("executing: %!".g:netrw_dav_cmd) - exe s:netrw_silentxfer."%!".g:netrw_dav_cmd + "......................................... + " NetRead: (dav) NetRead Method #6 {{{3 + elseif b:netrw_method == 6 +" call Decho("read via cadaver (method #6)") - " remove enew buffer (quietly) - let filtbuf= bufnr("%") - exe curbuf."b!" - let &l:bh = bhkeep - exe filtbuf."bw!" + if !executable(g:netrw_dav_cmd) + call netrw#ErrorMsg(s:ERROR,g:netrw_dav_cmd." is not executable",73) +" call Dret("netrw#NetRead : ".g:netrw_dav_cmd." not executable") + return + endif + if g:netrw_dav_cmd =~ "curl" +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1) + else + " Construct execution string (four lines) which will be passed through filter + let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) + new + setl ff=unix + if exists("g:netrw_port") && g:netrw_port != "" + keepj put ='open '.g:netrw_machine.' '.g:netrw_port + else + keepj put ='open '.g:netrw_machine + endif + if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" + keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd + endif + keepj put ='get '.netrw_fname.' '.tmpfile + keepj put ='quit' + " perform cadaver operation: + keepj norm! 1Gdd +" call Decho("executing: %!".g:netrw_dav_cmd) + exe s:netrw_silentxfer."%!".g:netrw_dav_cmd + bd! + endif + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... - " NetWrite: (rsync) NetWrite Method #7 {{{3 - elseif b:netrw_method == 7 -" call Decho("write via rsync (method #7)") -" call Decho("executing: !".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)) - exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1) + " NetRead: (rsync) NetRead Method #7 {{{3 + elseif b:netrw_method == 7 +" call Decho("read via rsync (method #7)") +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) + let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... - " NetWrite: (sftp) NetWrite Method #9 {{{3 - elseif b:netrw_method == 9 -" call Decho("write via sftp (method #9)") - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_uid .'@'. g:netrw_machine + " NetRead: (fetch) NetRead Method #8 {{{3 + " fetch://[user@]host[:http]/path + elseif b:netrw_method == 8 +" call Decho("read via fetch (method #8)") + if g:netrw_fetch_cmd == "" + if !exists("g:netrw_quiet") + keepj call netrw#ErrorMsg(s:ERROR,"fetch command not available",7) + endif +" call Dret("NetRead") + return + endif + if exists("g:netrw_option") && g:netrw_option =~ ":https\=" + let netrw_option= "http" else - let uid_machine = g:netrw_machine + let netrw_option= "ftp" endif +" call Decho("read via fetch for ".netrw_option) - " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead - let bhkeep = &l:bh - let curbuf = bufnr("%") - setl bh=hide - keepalt enew + if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != "" +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1) + else +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1) + endif - setl ff=unix - call setline(1,'put "'.escape(tmpfile,'\').'" '.netrw_fname) -" call Decho("filter input: ".getline('.')) -" call Decho("executing: %!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1)) - let sftpcmd= substitute(g:netrw_sftp_cmd,"%TEMPFILE%",escape(tmpfile,'\'),"g") - exe s:netrw_silentxfer."%!".sftpcmd.' '.shellescape(uid_machine,1) - let filtbuf= bufnr("%") - exe curbuf."b!" - let &l:bh = bhkeep - exe filtbuf."bw!" + let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice +" call Decho("setl ro") + setl ro "......................................... - " NetWrite: Complain {{{3 + " NetRead: (sftp) NetRead Method #9 {{{3 + elseif b:netrw_method == 9 +" call Decho("read via sftp (method #9)") +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile) + exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: Complain {{{3 else - call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17) - let leavemod= 1 + call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8) endif endwhile - " NetWrite: Cleanup: {{{3 -" call Decho("cleanup") - if s:FileReadable(tmpfile) -" call Decho("tmpfile<".tmpfile."> readable, will now delete it") - call s:NetrwDelete(tmpfile) + " NetRead: cleanup {{{3 + if exists("b:netrw_method") +" call Decho("cleanup b:netrw_method and b:netrw_fname") + unlet b:netrw_method + unlet b:netrw_fname endif - call s:NetrwOptionRestore("w:") - - if a:firstline == 1 && a:lastline == line("$") - " restore modifiability; usually equivalent to set nomod - let &mod= mod -" call Decho("(NetWrite) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") - elseif !exists("leavemod") - " indicate that the buffer has not been modified since last written -" call Decho("(NetWrite) set nomod") - set nomod -" call Decho("(NetWrite) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' && tmpfile !~ '.tar.xz$' && tmpfile !~ '.txz' +" call Decho("cleanup by deleting tmpfile<".tmpfile.">") + keepj call s:NetrwDelete(tmpfile) endif + keepj call s:NetrwOptionRestore("w:") -" call Dret("netrw#NetWrite") +" call Dret("netrw#NetRead :5 getcwd<".getcwd().">") endfun -" --------------------------------------------------------------------- -" netrw#NetSource: source a remotely hosted vim script {{{2 -" uses NetRead to get a copy of the file into a temporarily file, -" then sources that file, -" then removes that file. -fun! netrw#NetSource(...) -" call Dfunc("netrw#NetSource() a:0=".a:0) - if a:0 > 0 && a:1 == '?' - " give help - echomsg 'NetSource Usage:' - echomsg ':Nsource dav://machine[:port]/path uses cadaver' - echomsg ':Nsource fetch://machine/path uses fetch' - echomsg ':Nsource ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' - echomsg ':Nsource http[s]://[user@]machine/path uses http wget' - echomsg ':Nsource rcp://[user@]machine/path uses rcp' - echomsg ':Nsource rsync://machine[:port]/path uses rsync' - echomsg ':Nsource scp://[user@]machine[[:#]port]/path uses scp' - echomsg ':Nsource sftp://[user@]machine[[:#]port]/path uses sftp' - sleep 4 - else - let i= 1 - while i <= a:0 - call netrw#NetRead(3,a:{i}) -" call Decho("(netrw#NetSource) s:netread_tmpfile<".s:netrw_tmpfile.">") - if s:FileReadable(s:netrw_tmpfile) -" call Decho("(netrw#NetSource) exe so ".fnameescape(s:netrw_tmpfile)) - exe "so ".fnameescape(s:netrw_tmpfile) -" call Decho("(netrw#NetSource) delete(".s:netrw_tmpfile.")") - call delete(s:netrw_tmpfile) - unlet s:netrw_tmpfile - else - call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48) - endif - let i= i + 1 - endwhile - endif -" call Dret("netrw#NetSource") -endfun +" ------------------------------------------------------------------------ +" netrw#NetWrite: responsible for writing a file over the net {{{2 +fun! netrw#NetWrite(...) range +" call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw) -" =========================================== -" s:NetrwGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2 -" readcmd == %r : replace buffer with newly read file -" == 0r : read file at top of buffer -" == r : read file after current line -" == t : leave file in temporary form (ie. don't read into buffer) -fun! s:NetrwGetFile(readcmd, tfile, method) -" call Dfunc("NetrwGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)") + " NetWrite: option handling {{{3 + let mod= 0 + call s:NetrwOptionSave("w:") + call s:NetrwSafeOptions() - " readcmd=='t': simply do nothing - if a:readcmd == 't' -" call Decho("(NetrwGetFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Dret("NetrwGetFile : skip read of <".a:tfile.">") + " NetWrite: Get Temporary Filename {{{3 + let tmpfile= s:GetTempfile("") + if tmpfile == "" +" call Dret("netrw#NetWrite : unable to get a tempfile!") return endif - " get name of remote filename (ie. url and all) - let rfile= bufname("%") -" call Decho("rfile<".rfile.">") - - if exists("*NetReadFixup") - " for the use of NetReadFixup (not otherwise used internally) - let line2= line("$") + if a:0 == 0 + let ichoice = 0 + else + let ichoice = 1 endif - if a:readcmd[0] == '%' - " get file into buffer -" call Decho("get file into buffer") - - " rename the current buffer to the temp file (ie. tfile) - if g:netrw_cygwin - let tfile= substitute(a:tfile,'/cygdrive/\(.\)','\1:','') - else - let tfile= a:tfile - endif -" call Decho("exe sil! keepalt file ".fnameescape(tfile)) - exe "sil! keepalt file ".fnameescape(tfile) - - " edit temporary file (ie. read the temporary file in) - if rfile =~ '\.zip$' -" call Decho("handling remote zip file with zip#Browse(tfile<".tfile.">)") - call zip#Browse(tfile) - elseif rfile =~ '\.tar$' -" call Decho("handling remote tar file with tar#Browse(tfile<".tfile.">)") - call tar#Browse(tfile) - elseif rfile =~ '\.tar\.gz$' -" call Decho("handling remote gzip-compressed tar file") - call tar#Browse(tfile) - elseif rfile =~ '\.tar\.bz2$' -" call Decho("handling remote bz2-compressed tar file") - call tar#Browse(tfile) - elseif rfile =~ '\.tar\.xz$' -" call Decho("handling remote xz-compressed tar file") - call tar#Browse(tfile) - elseif rfile =~ '\.txz$' -" call Decho("handling remote xz-compressed tar file (.txz)") - call tar#Browse(tfile) - else -" call Decho("edit temporary file") - e! - endif - - " rename buffer back to remote filename -" call Decho("exe sil! keepalt file ".fnameescape(rfile)) - exe "sil! keepj keepalt file ".fnameescape(rfile) - - " Detect filetype of local version of remote file. - " Note that isk must not include a "/" for scripts.vim - " to process this detection correctly. -" call Decho("detect filetype of local version of remote file") - let iskkeep= &l:isk - setl isk-=/ - let &l:isk= iskkeep -" call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!") - let line1 = 1 - let line2 = line("$") - - elseif s:FileReadable(a:tfile) - " read file after current line -" call Decho("read file<".a:tfile."> after current line") - let curline = line(".") - let lastline= line("$") -" call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)."> line#".curline) - exe "keepj ".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile) - let line1= curline + 1 - let line2= line("$") - lastline + 1 - + let curbufname= expand("%") +" call Decho("curbufname<".curbufname.">") + if &binary + " For binary writes, always write entire file. + " (line numbers don't really make sense for that). + " Also supports the writing of tar and zip files. +" call Decho("(write entire file) sil exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)) + exe "sil keepj w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) + elseif g:netrw_cygwin + " write (selected portion of) file to temporary + let cygtmpfile= substitute(tmpfile,g:netrw_cygdrive.'/\(.\)','\1:','') +" call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)) + exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile) else - " not readable -" call Decho("(NetrwGetFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Decho("tfile<".a:tfile."> not readable") - keepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9) -" call Dret("NetrwGetFile : tfile<".a:tfile."> not readable") - return + " write (selected portion of) file to temporary +" call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)) + exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) endif - " User-provided (ie. optional) fix-it-up command - if exists("*NetReadFixup") -" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")") - keepj call NetReadFixup(a:method, line1, line2) -" else " Decho -" call Decho("NetReadFixup() not called, doesn't exist (line1=".line1." line2=".line2.")") + if curbufname == "" + " when the file is [No Name], and one attempts to Nwrite it, the buffer takes + " on the temporary file's name. Deletion of the temporary file during + " cleanup then causes an error message. + 0file! endif - if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu - " update the Buffers menu - keepj call s:UpdateBuffersMenu() - endif + " NetWrite: while choice loop: {{{3 + while ichoice <= a:0 -" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile)) + " Process arguments: {{{4 + " attempt to repeat with previous host-file-etc + if exists("b:netrw_lastfile") && a:0 == 0 +" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") + let choice = b:netrw_lastfile + let ichoice= ichoice + 1 + else + exe "let choice= a:" . ichoice - " make sure file is being displayed -" redraw! + " Reconstruct Choice when choice starts with '"' + if match(choice,"?") == 0 + echomsg 'NetWrite Usage:"' + echomsg ':Nwrite machine:path uses rcp' + echomsg ':Nwrite "machine path" uses ftp with <.netrc>' + echomsg ':Nwrite "machine id password path" uses ftp' + echomsg ':Nwrite dav://[user@]machine/path uses cadaver' + echomsg ':Nwrite fetch://[user@]machine/path uses fetch' + echomsg ':Nwrite ftp://machine[#port]/path uses ftp (autodetects <.netrc>)' + echomsg ':Nwrite rcp://machine/path uses rcp' + echomsg ':Nwrite rsync://[user@]machine/path uses rsync' + echomsg ':Nwrite scp://[user@]machine[[:#]port]/path uses scp' + echomsg ':Nwrite sftp://[user@]machine/path uses sftp' + sleep 4 + break -" call Decho("(NetrwGetFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Dret("NetrwGetFile") -endfun + elseif match(choice,"^\"") != -1 + if match(choice,"\"$") != -1 + " case "..." + let choice=strpart(choice,1,strlen(choice)-2) + else + " case "... ... ..." + let choice = strpart(choice,1,strlen(choice)-1) + let wholechoice = "" -" ------------------------------------------------------------------------ -" s:NetrwMethod: determine method of transfer {{{2 -" Input: -" choice = url [protocol:]//[userid@]hostname[:port]/[path-to-file] -" Output: -" b:netrw_method= 1: rcp -" 2: ftp + <.netrc> -" 3: ftp + machine, id, password, and [path]filename -" 4: scp -" 5: http[s] (wget) -" 6: dav -" 7: rsync -" 8: fetch -" 9: sftp -" g:netrw_machine= hostname -" b:netrw_fname = filename -" g:netrw_port = optional port number (for ftp) -" g:netrw_choice = copy of input url (choice) -fun! s:NetrwMethod(choice) -" call Dfunc("NetrwMethod(a:choice<".a:choice.">)") + while match(choice,"\"$") == -1 + let wholechoice= wholechoice . " " . choice + let ichoice = ichoice + 1 + if choice > a:0 + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13) + endif +" call Dret("netrw#NetWrite") + return + endif + let choice= a:{ichoice} + endwhile + let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) + endif + endif + endif + let ichoice= ichoice + 1 +" call Decho("choice<" . choice . "> ichoice=".ichoice) - " sanity check: choice should have at least three slashes in it - if strlen(substitute(a:choice,'[^/]','','g')) < 3 - call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78) - let b:netrw_method = -1 -" call Dret("NetrwMethod : incorrect url format<".a:choice.">") + " Determine method of write (ftp, rcp, etc) {{{4 + keepj call s:NetrwMethod(choice) + if !exists("b:netrw_method") || b:netrw_method < 0 +" call Dfunc("netrw#NetWrite : unsupported method") return endif - " record current g:netrw_machine, if any - " curmachine used if protocol == ftp and no .netrc - if exists("g:netrw_machine") - let curmachine= g:netrw_machine -" call Decho("curmachine<".curmachine.">") - else - let curmachine= "N O T A HOST" - endif - if exists("g:netrw_port") - let netrw_port= g:netrw_port + " ============= + " NetWrite: Perform Protocol-Based Write {{{3 + " ============================ + if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 + echo "(netrw) Processing your write request..." +" call Decho("(netrw) Processing your write request...") endif - " insure that netrw_ftp_cmd starts off every method determination - " with the current g:netrw_ftp_cmd - let s:netrw_ftp_cmd= g:netrw_ftp_cmd + "......................................... + " NetWrite: (rcp) NetWrite Method #1 {{{3 + if b:netrw_method == 1 +" call Decho("write via rcp (method #1)") + if s:netrw_has_nt_rcp == 1 + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_machine .'.'. g:netrw_uid + else + let uid_machine = g:netrw_machine .'.'. $USERNAME + endif + else + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_uid .'@'. g:netrw_machine + else + let uid_machine = g:netrw_machine + endif + endif +" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1) + let b:netrw_lastfile = choice - " initialization - let b:netrw_method = 0 - let g:netrw_machine = "" - let b:netrw_fname = "" - let g:netrw_port = "" - let g:netrw_choice = a:choice + "......................................... + " NetWrite: (ftp + <.netrc>) NetWrite Method #2 {{{3 + elseif b:netrw_method == 2 +" call Decho("write via ftp+.netrc (method #2)") + let netrw_fname = b:netrw_fname - " Patterns: - " mipf : a:machine a:id password filename Use ftp - " mf : a:machine filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd - " ftpurm : ftp://[user@]host[[#:]port]/filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd - " rcpurm : rcp://[user@]host/filename Use rcp - " rcphf : [user@]host:filename Use rcp - " scpurm : scp://[user@]host[[#:]port]/filename Use scp - " httpurm : http[s]://[user@]host/filename Use wget - " davurm : dav[s]://host[:port]/path Use cadaver/curl - " rsyncurm : rsync://host[:port]/path Use rsync - " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http) - " sftpurm : sftp://[user@]host/filename Use scp - let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$' - let mf = '^\(\S\+\)\s\+\(\S\+\)$' -" let ftpurm = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' -" let rcpurm = '^rcp://\%(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$' -" let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' - let ftpurm = '^ftp://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' - let rcpurm = '^rcp://\%(\([^/]*\)@\)\=\([^/]\{-}\)/\(.*\)$' - let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$' - let scpurm = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$' - let httpurm = '^https\=://\([^/]\{-}\)\(/.*\)\=$' - let davurm = '^davs\=://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$' - let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$' - let fetchurm = '^fetch://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' - let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$' + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead + let bhkeep = &l:bh + let curbuf = bufnr("%") + setl bh=hide + keepalt enew -" call Decho("determine method:") - " Determine Method - " Method#1: rcp://user@hostname/...path-to-file {{{3 - if match(a:choice,rcpurm) == 0 -" call Decho("rcp://...") - let b:netrw_method = 1 - let userid = substitute(a:choice,rcpurm,'\1',"") - let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"") - let b:netrw_fname = substitute(a:choice,rcpurm,'\3',"") - if userid != "" - let g:netrw_uid= userid - endif - - " Method#4: scp://user@hostname/...path-to-file {{{3 - elseif match(a:choice,scpurm) == 0 -" call Decho("scp://...") - let b:netrw_method = 4 - let g:netrw_machine = substitute(a:choice,scpurm,'\1',"") - let g:netrw_port = substitute(a:choice,scpurm,'\2',"") - let b:netrw_fname = substitute(a:choice,scpurm,'\3',"") +" call Decho("filter input window#".winnr()) + setl ff=unix + keepj put =g:netrw_ftpmode +" call Decho("filter input: ".getline('$')) + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline("$")) + endif + keepj call setline(line("$")+1,'put "'.tmpfile.'" "'.netrw_fname.'"') +" call Decho("filter input: ".getline("$")) + if exists("g:netrw_port") && g:netrw_port != "" +" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) + else +" call Decho("filter input window#".winnr()) +" call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" + if !exists("g:netrw_quiet") + keepj call netrw#ErrorMsg(s:ERROR,getline(1),14) + endif + let mod=1 + endif - " Method#5: http[s]://user@hostname/...path-to-file {{{3 - elseif match(a:choice,httpurm) == 0 -" call Decho("http://...") - let b:netrw_method = 5 - let g:netrw_machine= substitute(a:choice,httpurm,'\1',"") - let b:netrw_fname = substitute(a:choice,httpurm,'\2',"") + " remove enew buffer (quietly) + let filtbuf= bufnr("%") + exe curbuf."b!" + let &l:bh = bhkeep + exe filtbuf."bw!" - " Method#6: dav://hostname[:port]/..path-to-file.. {{{3 - elseif match(a:choice,davurm) == 0 -" call Decho("dav://...") - let b:netrw_method= 6 - if a:choice =~ 'davs:' - let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"") - else - let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"") - endif - let b:netrw_fname = substitute(a:choice,davurm,'\3',"") + let b:netrw_lastfile = choice - " Method#7: rsync://user@hostname/...path-to-file {{{3 - elseif match(a:choice,rsyncurm) == 0 -" call Decho("rsync://...") - let b:netrw_method = 7 - let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"") - let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"") + "......................................... + " NetWrite: (ftp + machine, id, passwd, filename) NetWrite Method #3 {{{3 + elseif b:netrw_method == 3 + " Construct execution string (three or more lines) which will be passed through filter +" call Decho("read via ftp+mipf (method #3)") + let netrw_fname = b:netrw_fname + let bhkeep = &l:bh - " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{3 - elseif match(a:choice,ftpurm) == 0 -" call Decho("ftp://...") - let userid = substitute(a:choice,ftpurm,'\2',"") - let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"") - let g:netrw_port = substitute(a:choice,ftpurm,'\4',"") - let b:netrw_fname = substitute(a:choice,ftpurm,'\5',"") -" call Decho("g:netrw_machine<".g:netrw_machine.">") - if userid != "" - let g:netrw_uid= userid - endif + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead + let curbuf = bufnr("%") + setl bh=hide + keepalt enew + setl ff=unix - if curmachine != g:netrw_machine - if exists("s:netwr_hup[".g:netrw_machine."]") - call NetUserPass("ftp:".g:netrw_machine) - elseif exists("s:netrw_passwd") - " if there's a change in hostname, require password re-entry - unlet s:netrw_passwd + if exists("g:netrw_port") && g:netrw_port != "" + keepj put ='open '.g:netrw_machine.' '.g:netrw_port +" call Decho("filter input: ".getline('.')) + else + keepj put ='open '.g:netrw_machine +" call Decho("filter input: ".getline('.')) endif - if exists("netrw_port") - unlet netrw_port + if exists("g:netrw_uid") && g:netrw_uid != "" + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + keepj put =g:netrw_uid +" call Decho("filter input: ".getline('.')) + if exists("s:netrw_passwd") && s:netrw_passwd != "" + keepj put ='\"'.s:netrw_passwd.'\"' + endif +" call Decho("filter input: ".getline('.')) + elseif exists("s:netrw_passwd") && s:netrw_passwd != "" + keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' +" call Decho("filter input: ".getline('.')) + endif endif - endif - - if exists("g:netrw_uid") && exists("s:netrw_passwd") - let b:netrw_method = 3 - else - let host= substitute(g:netrw_machine,'\..*$','','') - if exists("s:netrw_hup[host]") - call NetUserPass("ftp:".host) + keepj put =g:netrw_ftpmode +" call Decho("filter input: ".getline('$')) + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline("$")) + endif + keepj put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"' +" call Decho("filter input: ".getline('.')) + " save choice/id/password for future use + let b:netrw_lastfile = choice - elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~ '-[sS]:' -" call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">") -" call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">") - if g:netrw_ftp_cmd =~ '-[sS]:\S*MACHINE\>' - let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\',g:netrw_machine,'') -" call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">") - endif - let b:netrw_method= 2 - elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc -" call Decho("using <".expand("$HOME/.netrc")."> (readable)") - let b:netrw_method= 2 - else - if !exists("g:netrw_uid") || g:netrw_uid == "" - call NetUserPass() - elseif !exists("s:netrw_passwd") || s:netrw_passwd == "" - call NetUserPass(g:netrw_uid) - " else just use current g:netrw_uid and s:netrw_passwd + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + keepj norm! 1Gdd +" call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) + exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,getline(1),15) endif - let b:netrw_method= 3 + let mod=1 endif - endif - " Method#8: fetch {{{3 - elseif match(a:choice,fetchurm) == 0 -" call Decho("fetch://...") - let b:netrw_method = 8 - let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"") - let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"") - let b:netrw_option = substitute(a:choice,fetchurm,'\4',"") - let b:netrw_fname = substitute(a:choice,fetchurm,'\5',"") + " remove enew buffer (quietly) + let filtbuf= bufnr("%") + exe curbuf."b!" + let &l:bh= bhkeep + exe filtbuf."bw!" - " Method#3: Issue an ftp : "machine id password [path/]filename" {{{3 - elseif match(a:choice,mipf) == 0 -" call Decho("(ftp) host id pass file") - let b:netrw_method = 3 - let g:netrw_machine = substitute(a:choice,mipf,'\1',"") - let g:netrw_uid = substitute(a:choice,mipf,'\2',"") - let s:netrw_passwd = substitute(a:choice,mipf,'\3',"") - let b:netrw_fname = substitute(a:choice,mipf,'\4',"") - call NetUserPass(g:netrw_machine,g:netrw_uid,s:netrw_passwd) + "......................................... + " NetWrite: (scp) NetWrite Method #4 {{{3 + elseif b:netrw_method == 4 +" call Decho("write via scp (method #4)") + if exists("g:netrw_port") && g:netrw_port != "" + let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port) + else + let useport= "" + endif +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1) + let b:netrw_lastfile = choice - " Method#3: Issue an ftp: "hostname [path/]filename" {{{3 - elseif match(a:choice,mf) == 0 -" call Decho("(ftp) host file") - if exists("g:netrw_uid") && exists("s:netrw_passwd") - let b:netrw_method = 3 - let g:netrw_machine = substitute(a:choice,mf,'\1',"") - let b:netrw_fname = substitute(a:choice,mf,'\2',"") + "......................................... + " NetWrite: (http) NetWrite Method #5 {{{3 + elseif b:netrw_method == 5 +" call Decho("write via http (method #5)") + let curl= substitute(g:netrw_http_put_cmd,'\s\+.*$',"","") + if executable(curl) + let url= g:netrw_choice +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_put_cmd." ".shellescape(tmpfile,1)." ".shellescape(url,1) ) + exe s:netrw_silentxfer."!".g:netrw_http_put_cmd." ".shellescape(tmpfile,1)." ".shellescape(url,1) + elseif !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd".">".",16) + endif - elseif s:FileReadable(expand("$HOME/.netrc")) - let b:netrw_method = 2 - let g:netrw_machine = substitute(a:choice,mf,'\1',"") - let b:netrw_fname = substitute(a:choice,mf,'\2',"") - endif + "......................................... + " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{3 + elseif b:netrw_method == 6 +" call Decho("write via cadaver (method #6)") - " Method#9: sftp://user@hostname/...path-to-file {{{3 - elseif match(a:choice,sftpurm) == 0 -" call Decho("sftp://...") - let b:netrw_method = 9 - let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"") - let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"") + " Construct execution string (four lines) which will be passed through filter + let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape) + let bhkeep = &l:bh - " Method#1: Issue an rcp: hostname:filename" (this one should be last) {{{3 - elseif match(a:choice,rcphf) == 0 -" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">") - let b:netrw_method = 1 - let userid = substitute(a:choice,rcphf,'\2',"") - let g:netrw_machine = substitute(a:choice,rcphf,'\3',"") - let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") -" call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">") -" call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">") -" call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">") -" call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">") - if userid != "" - let g:netrw_uid= userid - endif + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead + let curbuf = bufnr("%") + setl bh=hide + keepalt enew - " Cannot Determine Method {{{3 - else - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45) - endif - let b:netrw_method = -1 - endif - "}}}3 + setl ff=unix + if exists("g:netrw_port") && g:netrw_port != "" + keepj put ='open '.g:netrw_machine.' '.g:netrw_port + else + keepj put ='open '.g:netrw_machine + endif + if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" + keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd + endif + keepj put ='put '.tmpfile.' '.netrw_fname - if g:netrw_port != "" - " remove any leading [:#] from port number - let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','') - elseif exists("netrw_port") - " retain port number as implicit for subsequent ftp operations - let g:netrw_port= netrw_port - endif + " perform cadaver operation: + keepj norm! 1Gdd +" call Decho("executing: %!".g:netrw_dav_cmd) + exe s:netrw_silentxfer."%!".g:netrw_dav_cmd -" call Decho("a:choice <".a:choice.">") -" call Decho("b:netrw_method <".b:netrw_method.">") -" call Decho("g:netrw_machine<".g:netrw_machine.">") -" call Decho("g:netrw_port <".g:netrw_port.">") -" if exists("g:netrw_uid") "Decho -" call Decho("g:netrw_uid <".g:netrw_uid.">") -" endif "Decho -" if exists("s:netrw_passwd") "Decho -" call Decho("s:netrw_passwd <".s:netrw_passwd.">") -" endif "Decho -" call Decho("b:netrw_fname <".b:netrw_fname.">") -" call Dret("NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port) -endfun + " remove enew buffer (quietly) + let filtbuf= bufnr("%") + exe curbuf."b!" + let &l:bh = bhkeep + exe filtbuf."bw!" -" ------------------------------------------------------------------------ -" NetReadFixup: this sort of function is typically written by the user {{{2 -" to handle extra junk that their system's ftp dumps -" into the transfer. This function is provided as an -" example and as a fix for a Windows 95 problem: in my -" experience, win95's ftp always dumped four blank lines -" at the end of the transfer. -if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp - fun! NetReadFixup(method, line1, line2) -" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") + let b:netrw_lastfile = choice - " sanity checks -- attempt to convert inputs to integers - let method = a:method + 0 - let line1 = a:line1 + 0 - let line2 = a:line2 + 0 - if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 0 -" call Dret("NetReadFixup") - return - endif + "......................................... + " NetWrite: (rsync) NetWrite Method #7 {{{3 + elseif b:netrw_method == 7 +" call Decho("write via rsync (method #7)") +" call Decho("executing: !".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1) + let b:netrw_lastfile = choice - if method == 3 " ftp (no <.netrc>) - let fourblanklines= line2 - 3 - if fourblanklines >= line1 - exe "sil keepj ".fourblanklines.",".line2."g/^\s*$/d" - call histdel("/",-1) + "......................................... + " NetWrite: (sftp) NetWrite Method #9 {{{3 + elseif b:netrw_method == 9 +" call Decho("write via sftp (method #9)") + let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_uid .'@'. g:netrw_machine + else + let uid_machine = g:netrw_machine endif - endif - -" call Dret("NetReadFixup") - endfun -endif - -" --------------------------------------------------------------------- -" NetUserPass: set username and password for subsequent ftp transfer {{{2 -" Usage: :call NetUserPass() -- will prompt for userid and password -" :call NetUserPass("uid") -- will prompt for password -" :call NetUserPass("uid","password") -- sets global userid and password -" :call NetUserPass("ftp:host") -- looks up userid and password using hup dictionary -" :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password -fun! NetUserPass(...) -" call Dfunc("NetUserPass() a:0=".a:0) + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead + let bhkeep = &l:bh + let curbuf = bufnr("%") + setl bh=hide + keepalt enew - if !exists('s:netrw_hup') - let s:netrw_hup= {} - endif + setl ff=unix + call setline(1,'put "'.escape(tmpfile,'\').'" '.netrw_fname) +" call Decho("filter input: ".getline('.')) +" call Decho("executing: %!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1)) + let sftpcmd= substitute(g:netrw_sftp_cmd,"%TEMPFILE%",escape(tmpfile,'\'),"g") + exe s:netrw_silentxfer."%!".sftpcmd.' '.shellescape(uid_machine,1) + let filtbuf= bufnr("%") + exe curbuf."b!" + let &l:bh = bhkeep + exe filtbuf."bw!" + let b:netrw_lastfile = choice - if a:0 == 0 - " case: no input arguments + "......................................... + " NetWrite: Complain {{{3 + else + call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17) + let leavemod= 1 + endif + endwhile - " change host and username if not previously entered; get new password - if !exists("g:netrw_machine") - let g:netrw_machine= input('Enter hostname: ') - endif - if !exists("g:netrw_uid") || g:netrw_uid == "" - " get username (user-id) via prompt - let g:netrw_uid= input('Enter username: ') + " NetWrite: Cleanup: {{{3 +" call Decho("cleanup") + if s:FileReadable(tmpfile) +" call Decho("tmpfile<".tmpfile."> readable, will now delete it") + call s:NetrwDelete(tmpfile) endif - " get password via prompting - let s:netrw_passwd= inputsecret("Enter Password: ") + call s:NetrwOptionRestore("w:") - " set up hup database - let host = substitute(g:netrw_machine,'\..*$','','') - if !exists('s:netrw_hup[host]') - let s:netrw_hup[host]= {} + if a:firstline == 1 && a:lastline == line("$") + " restore modifiability; usually equivalent to set nomod + let &mod= mod +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + elseif !exists("leavemod") + " indicate that the buffer has not been modified since last written +" call Decho("set nomod") + setl nomod +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") endif - let s:netrw_hup[host].uid = g:netrw_uid - let s:netrw_hup[host].passwd = s:netrw_passwd - elseif a:0 == 1 - " case: one input argument - - if a:1 =~ '^ftp:' - " get host from ftp:... url - " access userid and password from hup (host-user-passwd) dictionary - let host = substitute(a:1,'^ftp:','','') - let host = substitute(host,'\..*','','') - if exists("s:netrw_hup[host]") - let g:netrw_uid = s:netrw_hup[host].uid - let s:netrw_passwd = s:netrw_hup[host].passwd -" call Decho("get s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">") -" call Decho("get s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">") - else - let g:netrw_uid = input("Enter UserId: ") - let s:netrw_passwd = inputsecret("Enter Password: ") - endif +" call Dret("netrw#NetWrite") +endfun +" --------------------------------------------------------------------- +" netrw#NetSource: source a remotely hosted vim script {{{2 +" uses NetRead to get a copy of the file into a temporarily file, +" then sources that file, +" then removes that file. +fun! netrw#NetSource(...) +" call Dfunc("netrw#NetSource() a:0=".a:0) + if a:0 > 0 && a:1 == '?' + " give help + echomsg 'NetSource Usage:' + echomsg ':Nsource dav://machine[:port]/path uses cadaver' + echomsg ':Nsource fetch://machine/path uses fetch' + echomsg ':Nsource ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' + echomsg ':Nsource http[s]://[user@]machine/path uses http wget' + echomsg ':Nsource rcp://[user@]machine/path uses rcp' + echomsg ':Nsource rsync://machine[:port]/path uses rsync' + echomsg ':Nsource scp://[user@]machine[[:#]port]/path uses scp' + echomsg ':Nsource sftp://[user@]machine[[:#]port]/path uses sftp' + sleep 4 else - " case: one input argument, not an url. Using it as a new user-id. - if exists("g:netrw_machine") - let host= substitute(g:netrw_machine,'\..*$','','') - else - let g:netrw_machine= input('Enter hostname: ') - endif - let g:netrw_uid = a:1 -" call Decho("set g:netrw_uid= <".g:netrw_uid.">") - if exists("g:netrw_passwd") - " ask for password if one not previously entered - let s:netrw_passwd= g:netrw_passwd - else - let s:netrw_passwd = inputsecret("Enter Password: ") - endif + let i= 1 + while i <= a:0 + call netrw#NetRead(3,a:{i}) +" call Decho("s:netread_tmpfile<".s:netrw_tmpfile.">") + if s:FileReadable(s:netrw_tmpfile) +" call Decho("exe so ".fnameescape(s:netrw_tmpfile)) + exe "so ".fnameescape(s:netrw_tmpfile) +" call Decho("delete(".s:netrw_tmpfile.")") + call delete(s:netrw_tmpfile) + unlet s:netrw_tmpfile + else + call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48) + endif + let i= i + 1 + endwhile endif +" call Dret("netrw#NetSource") +endfun -" call Decho("host<".host.">") - if exists("host") - if !exists('s:netrw_hup[host]') - let s:netrw_hup[host]= {} - endif - let s:netrw_hup[host].uid = g:netrw_uid - let s:netrw_hup[host].passwd = s:netrw_passwd +" --------------------------------------------------------------------- +" netrw#SetTreetop: resets the tree top to the current directory/specified directory {{{2 +" (implements the :Ntree command) +fun! netrw#SetTreetop(...) +" call Dfunc("netrw#SetTreetop(".((a:0 > 0)? a:1 : "").") a:0=".a:0) + + " clear out the current tree + if exists("w:netrw_treetop") +" call Decho("clearing out current tree") + let inittreetop= w:netrw_treetop + unlet w:netrw_treetop + endif + if exists("w:netrw_treedict") +" call Decho("freeing w:netrw_treedict") + unlet w:netrw_treedict + endif + + if a:1 == "" && exists("inittreetop") + let treedir= s:NetrwTreePath(inittreetop) +" call Decho("treedir<".treedir.">") + else + if isdirectory(a:1) +" call Decho("a:1<".a:1."> is a directory") + let treedir= a:1 + elseif exists("b:netrw_curdir") && isdirectory(b:netrw_curdir."/".a:1) + let treedir= b:netrw_curdir."/".a:1 +" call Decho("a:1<".a:1."> is NOT a directory, trying treedir<".treedir.">") + else + call netrw#ErrorMsg(s:ERROR,"sorry, ".a:1." doesn't seem to be a directory!",95) + let treedir= "." + endif + endif +" call Decho("treedir<".treedir.">") + let islocal= expand("%") !~ '^\a\+://' +" call Decho("islocal=".islocal) + if islocal + call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(islocal,treedir)) + else + call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,treedir)) endif +" call Dret("netrw#SetTreetop") +endfun - elseif a:0 == 2 - let g:netrw_uid = a:1 - let s:netrw_passwd = a:2 +" =========================================== +" s:NetrwGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2 +" readcmd == %r : replace buffer with newly read file +" == 0r : read file at top of buffer +" == r : read file after current line +" == t : leave file in temporary form (ie. don't read into buffer) +fun! s:NetrwGetFile(readcmd, tfile, method) +" call Dfunc("NetrwGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)") - elseif a:0 == 3 - " enter hostname, user-id, and password into the hup dictionary - let host = substitute(a:1,'^\a\+:','','') - let host = substitute(host,'\..*$','','') - if !exists('s:netrw_hup[host]') - let s:netrw_hup[host]= {} + " readcmd=='t': simply do nothing + if a:readcmd == 't' +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Dret("NetrwGetFile : skip read of <".a:tfile.">") + return endif - let s:netrw_hup[host].uid = a:2 - let s:netrw_hup[host].passwd = a:3 - let g:netrw_uid = s:netrw_hup[host].uid - let s:netrw_passwd = s:netrw_hup[host].passwd -" call Decho("set s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">") -" call Decho("set s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">") - endif -" call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">") -endfun + " get name of remote filename (ie. url and all) + let rfile= bufname("%") +" call Decho("rfile<".rfile.">") -" =========================================== -" Shared Browsing Support: {{{1 -" =========================================== + if exists("*NetReadFixup") + " for the use of NetReadFixup (not otherwise used internally) + let line2= line("$") + endif -" --------------------------------------------------------------------- -" s:NetrwMaps: {{{2 -fun! s:NetrwMaps(islocal) -" call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") + if a:readcmd[0] == '%' + " get file into buffer +" call Decho("get file into buffer") - " set up Rexplore and [ 2-leftmouse-click -or- c-leftmouse ] -" call Decho("(NetrwMaps) set up Rexplore command") - com! Rexplore if exists("w:netrw_rexlocal")|call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")|else|call netrw#ErrorMsg(s:WARNING,"not a former netrw window",79)|endif - if g:netrw_mousemaps && g:netrw_retmap -" call Decho("(NetrwMaps) set up Rexplore 2-leftmouse") - if !hasmapto("NetrwReturn") - if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$' -" call Decho("(NetrwMaps) making map for 2-leftmouse") - nmap <2-leftmouse> NetrwReturn - elseif maparg("","n") == "" -" call Decho("(NetrwMaps) making map for c-leftmouse") - nmap NetrwReturn - endif + " rename the current buffer to the temp file (ie. tfile) + if g:netrw_cygwin + let tfile= substitute(a:tfile,g:netrw_cygdrive.'/\(.\)','\1:','') + else + let tfile= a:tfile endif - nno NetrwReturn :Rexplore -" call Decho("(NetrwMaps) made NetrwReturn map") +" call Decho("exe sil! keepalt file ".fnameescape(tfile)) + exe "sil! keepalt file ".fnameescape(tfile) + + " edit temporary file (ie. read the temporary file in) + if rfile =~ '\.zip$' +" call Decho("handling remote zip file with zip#Browse(tfile<".tfile.">)") + call zip#Browse(tfile) + elseif rfile =~ '\.tar$' +" call Decho("handling remote tar file with tar#Browse(tfile<".tfile.">)") + call tar#Browse(tfile) + elseif rfile =~ '\.tar\.gz$' +" call Decho("handling remote gzip-compressed tar file") + call tar#Browse(tfile) + elseif rfile =~ '\.tar\.bz2$' +" call Decho("handling remote bz2-compressed tar file") + call tar#Browse(tfile) + elseif rfile =~ '\.tar\.xz$' +" call Decho("handling remote xz-compressed tar file") + call tar#Browse(tfile) + elseif rfile =~ '\.txz$' +" call Decho("handling remote xz-compressed tar file (.txz)") + call tar#Browse(tfile) + else +" call Decho("edit temporary file") + e! + endif + + " rename buffer back to remote filename +" call Decho("exe sil! keepalt file ".fnameescape(rfile)) + exe "sil! keepj keepalt file ".fnameescape(rfile) + + " Detect filetype of local version of remote file. + " Note that isk must not include a "/" for scripts.vim + " to process this detection correctly. +" call Decho("detect filetype of local version of remote file") + let iskkeep= &l:isk + setl isk-=/ + let &l:isk= iskkeep +" call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!") + let line1 = 1 + let line2 = line("$") + + elseif !&ma + " attempting to read a file after the current line in the file, but the buffer is not modifiable + keepj call netrw#ErrorMsg(s:WARNING,"attempt to read<".a:tfile."> into a non-modifiable buffer!",94) +" call Dret("NetrwGetFile : attempt to read<".a:tfile."> into a non-modifiable buffer!") + return + + elseif s:FileReadable(a:tfile) + " read file after current line +" call Decho("read file<".a:tfile."> after current line") + let curline = line(".") + let lastline= line("$") +" call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)."> line#".curline) + exe "keepj ".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile) + let line1= curline + 1 + let line2= line("$") - lastline + 1 + + else + " not readable +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Decho("tfile<".a:tfile."> not readable") + keepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9) +" call Dret("NetrwGetFile : tfile<".a:tfile."> not readable") + return endif - if a:islocal -" call Decho("(NetrwMaps) make local maps") - " local normal-mode maps - nnoremap a :call NetrwHide(1) - nnoremap % :call NetrwOpenFile(1) - nnoremap c :exe "keepjumps lcd ".fnameescape(b:netrw_curdir) - nnoremap C :let g:netrw_chgwin= winnr() - nnoremap :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord())) - nnoremap d :call NetrwMakeDir("") - nnoremap - :exe "norm! 0"call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,'../')) - nnoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) - nnoremap gd :call NetrwForceChgDir(1,NetrwGetWord()) - nnoremap gf :call NetrwForceFile(1,NetrwGetWord()) - nnoremap gh :call NetrwHidden(1) - nnoremap gp :call NetrwChgPerm(1,b:netrw_curdir) - nnoremap I :call NetrwBannerCtrl(1) - nnoremap i :call NetrwListStyle(1) - nnoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) - nnoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) - nnoremap mc :call NetrwMarkFileCopy(1) - nnoremap md :call NetrwMarkFileDiff(1) - nnoremap me :call NetrwMarkFileEdit(1) - nnoremap mf :call NetrwMarkFile(1,NetrwGetWord()) - nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) - nnoremap mg :call NetrwMarkFileGrep(1) - nnoremap mh :call NetrwMarkHideSfx(1) - nnoremap mm :call NetrwMarkFileMove(1) - nnoremap mp :call NetrwMarkFilePrint(1) - nnoremap mr :call NetrwMarkFileRegexp(1) - nnoremap ms :call NetrwMarkFileSource(1) - nnoremap mt :call NetrwMarkFileTgt(1) - nnoremap mT :call NetrwMarkFileTag(1) - nnoremap mu :call NetrwUnMarkFile(1) - nnoremap mx :call NetrwMarkFileExe(1) - nnoremap mX :call NetrwMarkFileVimCmd(1) - nnoremap mz :call NetrwMarkFileCompress(1) - nnoremap O :call NetrwObtain(1) - nnoremap o :call NetrwSplit(3) - nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) - nnoremap P :call NetrwPrevWinOpen(1) - nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) - nnoremap qf :call NetrwFileInfo(1,NetrwGetWord()) - nnoremap qF :call NetrwMarkFileQFEL(1,getqflist()) - nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) - nnoremap s :call NetrwSortStyle(1) - nnoremap S :call NetSortSequence(1) - nnoremap t :call NetrwSplit(4) - nnoremap Tb :call NetrwSetTgt('b',v:count1) - nnoremap Th :call NetrwSetTgt('h',v:count) - nnoremap u :call NetrwBookHistHandler(4,expand("%")) - nnoremap U :call NetrwBookHistHandler(5,expand("%")) - nnoremap v :call NetrwSplit(5) - nnoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),0),0)" - nnoremap X :call NetrwLocalExecute(expand(""))" - " local insert-mode maps - inoremap a :call NetrwHide(1) - inoremap c :exe "keepjumps lcd ".fnameescape(b:netrw_curdir) - inoremap C :let g:netrw_chgwin= winnr() - inoremap % :call NetrwOpenFile(1) - inoremap - :exe "norm! 0"call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,'../')) - inoremap :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord())) - inoremap d :call NetrwMakeDir("") - inoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) - inoremap gh :call NetrwHidden(1) - inoremap gp :call NetrwChgPerm(1,b:netrw_curdir) - inoremap I :call NetrwBannerCtrl(1) - inoremap i :call NetrwListStyle(1) - inoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) - inoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) - inoremap mc :call NetrwMarkFileCopy(1) - inoremap md :call NetrwMarkFileDiff(1) - inoremap me :call NetrwMarkFileEdit(1) - inoremap mf :call NetrwMarkFile(1,NetrwGetWord()) - inoremap mg :call NetrwMarkFileGrep(1) - inoremap mh :call NetrwMarkHideSfx(1) - inoremap mm :call NetrwMarkFileMove(1) - inoremap mp :call NetrwMarkFilePrint(1) - inoremap mr :call NetrwMarkFileRegexp(1) - inoremap ms :call NetrwMarkFileSource(1) - inoremap mT :call NetrwMarkFileTag(1) - inoremap mt :call NetrwMarkFileTgt(1) - inoremap mu :call NetrwUnMarkFile(1) - inoremap mx :call NetrwMarkFileExe(1) - inoremap mX :call NetrwMarkFileVimCmd(1) - inoremap mz :call NetrwMarkFileCompress(1) - inoremap O :call NetrwObtain(1) - inoremap o :call NetrwSplit(3) - inoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) - inoremap P :call NetrwPrevWinOpen(1) - inoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) - inoremap qf :call NetrwFileInfo(1,NetrwGetWord()) - inoremap qF :call NetrwMarkFileQFEL(1,getqflist()) - inoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) - inoremap s :call NetrwSortStyle(1) - inoremap S :call NetSortSequence(1) - inoremap t :call NetrwSplit(4) - inoremap Tb :call NetrwSetTgt('b',v:count1) - inoremap Th :call NetrwSetTgt('h',v:count) - inoremap u :call NetrwBookHistHandler(4,expand("%")) - inoremap U :call NetrwBookHistHandler(5,expand("%")) - inoremap v :call NetrwSplit(5) - inoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),0),0)" - if !hasmapto('NetrwHideEdit') - nmap NetrwHideEdit - imap NetrwHideEdit + " User-provided (ie. optional) fix-it-up command + if exists("*NetReadFixup") +" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")") + keepj call NetReadFixup(a:method, line1, line2) +" else " Decho +" call Decho("NetReadFixup() not called, doesn't exist (line1=".line1." line2=".line2.")") + endif + + if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu + " update the Buffers menu + keepj call s:UpdateBuffersMenu() + endif + +" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile)) + + " make sure file is being displayed +" redraw! + +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Dret("NetrwGetFile") +endfun + +" ------------------------------------------------------------------------ +" s:NetrwMethod: determine method of transfer {{{2 +" Input: +" choice = url [protocol:]//[userid@]hostname[:port]/[path-to-file] +" Output: +" b:netrw_method= 1: rcp +" 2: ftp + <.netrc> +" 3: ftp + machine, id, password, and [path]filename +" 4: scp +" 5: http[s] (wget) +" 6: dav +" 7: rsync +" 8: fetch +" 9: sftp +" g:netrw_machine= hostname +" b:netrw_fname = filename +" g:netrw_port = optional port number (for ftp) +" g:netrw_choice = copy of input url (choice) +fun! s:NetrwMethod(choice) +" call Dfunc("NetrwMethod(a:choice<".a:choice.">)") + + " sanity check: choice should have at least three slashes in it + if strlen(substitute(a:choice,'[^/]','','g')) < 3 + call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78) + let b:netrw_method = -1 +" call Dret("NetrwMethod : incorrect url format<".a:choice.">") + return endif - nnoremap NetrwHideEdit :call NetrwHideEdit(1) - if !hasmapto('NetrwRefresh') - nmap NetrwRefresh - imap NetrwRefresh + + " record current g:netrw_machine, if any + " curmachine used if protocol == ftp and no .netrc + if exists("g:netrw_machine") + let curmachine= g:netrw_machine +" call Decho("curmachine<".curmachine.">") + else + let curmachine= "N O T A HOST" endif - nnoremap NetrwRefresh :call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) - if s:didstarstar || !mapcheck("","n") - nnoremap :Nexplore - inoremap :Nexplore - endif - if s:didstarstar || !mapcheck("","n") - nnoremap :Pexplore - inoremap :Pexplore - endif - let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape) - if g:netrw_mousemaps == 1 - nmap NetrwLeftmouse - nno NetrwLeftmouse :call NetrwLeftmouse(1) - nmap NetrwRightdrag - nno NetrwRightdrag :call NetrwRightdrag(1) - nmap NetrwMiddlemouse - nno NetrwMiddlemouse :call NetrwPrevWinOpen(1) - nmap NetrwSLeftmouse - nno NetrwSLeftmouse :call NetrwMarkFile(1,NetrwGetWord()) - nmap <2-leftmouse> Netrw2Leftmouse - nmap Netrw2Leftmouse - - imap ILeftmouse - ino ILeftmouse :call NetrwLeftmouse(1) - imap IMiddlemouse - ino IMiddlemouse :call NetrwPrevWinOpen(1) - imap ISLeftmouse - ino ISLeftmouse :call NetrwMarkFile(1,NetrwGetWord()) - exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'inoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + if exists("g:netrw_port") + let netrw_port= g:netrw_port endif - exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'nnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'nnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' - exe 'nnoremap m :call NetrwMakeDir("")' - exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'vnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'vnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' - exe 'inoremap :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'inoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'inoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' - exe 'inoremap m :call NetrwMakeDir("")' - nnoremap :he netrw-quickhelp - else " remote -" call Decho("(NetrwMaps) make remote maps") - call s:RemotePathAnalysis(b:netrw_curdir) - " remote normal-mode maps - nnoremap :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord())) - nnoremap :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) - nnoremap - :exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'../')) - nnoremap a :call NetrwHide(0) - nnoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) - nnoremap mc :call NetrwMarkFileCopy(0) - nnoremap md :call NetrwMarkFileDiff(0) - nnoremap me :call NetrwMarkFileEdit(0) - nnoremap mf :call NetrwMarkFile(0,NetrwGetWord()) - nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) - nnoremap mg :call NetrwMarkFileGrep(0) - nnoremap mh :call NetrwMarkHideSfx(0) - nnoremap mm :call NetrwMarkFileMove(0) - nnoremap mp :call NetrwMarkFilePrint(0) - nnoremap mr :call NetrwMarkFileRegexp(0) - nnoremap ms :call NetrwMarkFileSource(0) - nnoremap mt :call NetrwMarkFileTgt(0) - nnoremap mT :call NetrwMarkFileTag(0) - nnoremap mu :call NetrwUnMarkFile(0) - nnoremap mx :call NetrwMarkFileExe(0) - nnoremap mX :call NetrwMarkFileVimCmd(0) - nnoremap mz :call NetrwMarkFileCompress(0) - nnoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) - nnoremap gd :call NetrwForceChgDir(0,NetrwGetWord()) - nnoremap gf :call NetrwForceFile(0,NetrwGetWord()) - nnoremap gh :call NetrwHidden(0) - nnoremap gp :call NetrwChgPerm(0,b:netrw_curdir) - nnoremap C :let g:netrw_chgwin= winnr() - nnoremap i :call NetrwListStyle(0) - nnoremap I :call NetrwBannerCtrl(1) - nnoremap o :call NetrwSplit(0) - nnoremap O :call NetrwObtain(0) - nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) - nnoremap P :call NetrwPrevWinOpen(0) - nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) - nnoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) - nnoremap qf :call NetrwFileInfo(0,NetrwGetWord()) - nnoremap qF :call NetrwMarkFileQFEL(0,getqflist()) - nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./')) - nnoremap s :call NetrwSortStyle(0) - nnoremap S :call NetSortSequence(0) - nnoremap t :call NetrwSplit(1) - nnoremap Tb :call NetrwSetTgt('b',v:count1) - nnoremap Th :call NetrwSetTgt('h',v:count) - nnoremap u :call NetrwBookHistHandler(4,b:netrw_curdir) - nnoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) - nnoremap v :call NetrwSplit(2) - nnoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(0,NetrwGetWord()),1) - nnoremap % :call NetrwOpenFile(0) - " remote insert-mode maps - inoremap :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord())) - inoremap :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) - inoremap - :exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'../')) - inoremap a :call NetrwHide(0) - inoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) - inoremap mc :call NetrwMarkFileCopy(0) - inoremap md :call NetrwMarkFileDiff(0) - inoremap me :call NetrwMarkFileEdit(0) - inoremap mf :call NetrwMarkFile(0,NetrwGetWord()) - inoremap mg :call NetrwMarkFileGrep(0) - inoremap mh :call NetrwMarkHideSfx(0) - inoremap mm :call NetrwMarkFileMove(0) - inoremap mp :call NetrwMarkFilePrint(0) - inoremap mr :call NetrwMarkFileRegexp(0) - inoremap ms :call NetrwMarkFileSource(0) - inoremap mt :call NetrwMarkFileTgt(0) - inoremap mT :call NetrwMarkFileTag(0) - inoremap mu :call NetrwUnMarkFile(0) - inoremap mx :call NetrwMarkFileExe(0) - inoremap mX :call NetrwMarkFileVimCmd(0) - inoremap mz :call NetrwMarkFileCompress(0) - inoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) - inoremap gh :call NetrwHidden(0) - inoremap gp :call NetrwChgPerm(0,b:netrw_curdir) - inoremap C :let g:netrw_chgwin= winnr() - inoremap i :call NetrwListStyle(0) - inoremap I :call NetrwBannerCtrl(1) - inoremap o :call NetrwSplit(0) - inoremap O :call NetrwObtain(0) - inoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) - inoremap P :call NetrwPrevWinOpen(0) - inoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) - inoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) - inoremap qf :call NetrwFileInfo(0,NetrwGetWord()) - inoremap qF :call NetrwMarkFileQFEL(0,getqflist()) - inoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./')) - inoremap s :call NetrwSortStyle(0) - inoremap S :call NetSortSequence(0) - inoremap t :call NetrwSplit(1) - inoremap Tb :call NetrwSetTgt('b',v:count1) - inoremap Th :call NetrwSetTgt('h',v:count) - inoremap u :call NetrwBookHistHandler(4,b:netrw_curdir) - inoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) - inoremap v :call NetrwSplit(2) - inoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(0,NetrwGetWord()),1) - inoremap % :call NetrwOpenFile(0) - if !hasmapto('NetrwHideEdit') - nmap NetrwHideEdit - imap NetrwHideEdit - endif - nnoremap NetrwHideEdit :call NetrwHideEdit(0) - if !hasmapto('NetrwRefresh') - nmap NetrwRefresh - imap NetrwRefresh - endif + " insure that netrw_ftp_cmd starts off every method determination + " with the current g:netrw_ftp_cmd + let s:netrw_ftp_cmd= g:netrw_ftp_cmd - let mapsafepath = escape(s:path, s:netrw_map_escape) - let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape) + " initialization + let b:netrw_method = 0 + let g:netrw_machine = "" + let b:netrw_fname = "" + let g:netrw_port = "" + let g:netrw_choice = a:choice - nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) - if g:netrw_mousemaps == 1 - nmap NetrwLeftmouse - nno NetrwLeftmouse :call NetrwLeftmouse(0) - nmap NetrwLeftdrag - nno NetrwLeftdrag :call NetrwLeftdrag(0) - nmap NetrwMiddlemouse - nno NetrwMiddlemouse :call NetrwPrevWinOpen(0) - nmap NetrwSLeftmouse - nno NetrwSLeftmouse :call NetrwMarkFile(0,NetrwGetWord()) - nmap <2-leftmouse> Netrw2Leftmouse - nmap Netrw2Leftmouse - - imap ILeftmouse - ino ILeftmouse :call NetrwLeftmouse(0) - imap IMiddlemouse - ino IMiddlemouse :call NetrwPrevWinOpen(0) - imap ISLeftmouse - ino ISLeftmouse :call NetrwMarkFile(0,NetrwGetWord()) - exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'inoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + " Patterns: + " mipf : a:machine a:id password filename Use ftp + " mf : a:machine filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd + " ftpurm : ftp://[user@]host[[#:]port]/filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd + " rcpurm : rcp://[user@]host/filename Use rcp + " rcphf : [user@]host:filename Use rcp + " scpurm : scp://[user@]host[[#:]port]/filename Use scp + " httpurm : http[s]://[user@]host/filename Use wget + " davurm : dav[s]://host[:port]/path Use cadaver/curl + " rsyncurm : rsync://host[:port]/path Use rsync + " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http) + " sftpurm : sftp://[user@]host/filename Use scp + let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$' + let mf = '^\(\S\+\)\s\+\(\S\+\)$' +" let ftpurm = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' +" let rcpurm = '^rcp://\%(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$' +" let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' + let ftpurm = '^ftp://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' + let rcpurm = '^rcp://\%(\([^/]*\)@\)\=\([^/]\{-}\)/\(.*\)$' + let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$' + let scpurm = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$' + let httpurm = '^https\=://\([^/]\{-}\)\(/.*\)\=$' + let davurm = '^davs\=://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$' + let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$' + let fetchurm = '^fetch://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' + let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$' + +" call Decho("determine method:") + " Determine Method + " Method#1: rcp://user@hostname/...path-to-file {{{3 + if match(a:choice,rcpurm) == 0 +" call Decho("rcp://...") + let b:netrw_method = 1 + let userid = substitute(a:choice,rcpurm,'\1',"") + let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"") + let b:netrw_fname = substitute(a:choice,rcpurm,'\3',"") + if userid != "" + let g:netrw_uid= userid endif - exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'nnoremap d :call NetrwMakeDir("'.mapsafeusermach.'")' - exe 'nnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'nnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'vnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'vnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'inoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'inoremap d :call NetrwMakeDir("'.mapsafeusermach.'")' - exe 'inoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'inoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' - nnoremap :he netrw-quickhelp - inoremap :he netrw-quickhelp - endif - keepj call s:SetRexDir(a:islocal,b:netrw_curdir) + " Method#4: scp://user@hostname/...path-to-file {{{3 + elseif match(a:choice,scpurm) == 0 +" call Decho("scp://...") + let b:netrw_method = 4 + let g:netrw_machine = substitute(a:choice,scpurm,'\1',"") + let g:netrw_port = substitute(a:choice,scpurm,'\2',"") + let b:netrw_fname = substitute(a:choice,scpurm,'\3',"") -" call Dret("s:NetrwMaps") -endfun + " Method#5: http[s]://user@hostname/...path-to-file {{{3 + elseif match(a:choice,httpurm) == 0 +" call Decho("http[s]://...") + let b:netrw_method = 5 + let g:netrw_machine= substitute(a:choice,httpurm,'\1',"") + let b:netrw_fname = substitute(a:choice,httpurm,'\2',"") + let b:netrw_http = (a:choice =~ '^https:')? "https" : "http" -" --------------------------------------------------------------------- -" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2 -fun! s:ExplorePatHls(pattern) -" call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)") - let repat= substitute(a:pattern,'^**/\{1,2}','','') -" call Decho("repat<".repat.">") - let repat= escape(repat,'][.\') -" call Decho("repat<".repat.">") - let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>' -" call Dret("s:ExplorePatHls repat<".repat.">") - return repat -endfun + " Method#6: dav://hostname[:port]/..path-to-file.. {{{3 + elseif match(a:choice,davurm) == 0 +" call Decho("dav://...") + let b:netrw_method= 6 + if a:choice =~ 'davs:' + let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"") + else + let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"") + endif + let b:netrw_fname = substitute(a:choice,davurm,'\3',"") -" --------------------------------------------------------------------- -" s:NetrwBookHistHandler: {{{2 -" 0: (user: ) bookmark current directory -" 1: (user: ) change to the bookmarked directory -" 2: (user: ) list bookmarks -" 3: (browsing) record current directory history -" 4: (user: ) go up (previous) bookmark -" 5: (user: ) go down (next) bookmark -" 6: (user: ) delete bookmark -fun! s:NetrwBookHistHandler(chg,curdir) -" call Dfunc("s:NetrwBookHistHandler(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." histcnt=".g:netrw_dirhist_cnt." histmax=".g:netrw_dirhistmax) - if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 -" " call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax") - return - endif + " Method#7: rsync://user@hostname/...path-to-file {{{3 + elseif match(a:choice,rsyncurm) == 0 +" call Decho("rsync://...") + let b:netrw_method = 7 + let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"") + let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"") - let ykeep= @@ - if a:chg == 0 - " bookmark the current directory -" call Decho("(user: ) bookmark the current directory") - if !exists("g:netrw_bookmarklist") - let g:netrw_bookmarklist= [] - endif - if index(g:netrw_bookmarklist,a:curdir) == -1 - " curdir not currently in g:netrw_bookmarklist, so include it - call add(g:netrw_bookmarklist,a:curdir) - call sort(g:netrw_bookmarklist) + " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{3 + elseif match(a:choice,ftpurm) == 0 +" call Decho("ftp://...") + let userid = substitute(a:choice,ftpurm,'\2',"") + let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"") + let g:netrw_port = substitute(a:choice,ftpurm,'\4',"") + let b:netrw_fname = substitute(a:choice,ftpurm,'\5',"") +" call Decho("g:netrw_machine<".g:netrw_machine.">") + if userid != "" + let g:netrw_uid= userid endif - echo "bookmarked the current directory" - elseif a:chg == 1 - " change to the bookmarked directory -" call Decho("(user: <".v:count."gb>) change to the bookmarked directory") - if exists("g:netrw_bookmarklist[v:count-1]") -" call Decho("(user: <".v:count."gb>) bookmarklist=".string(g:netrw_bookmarklist)) - exe "keepj e ".fnameescape(g:netrw_bookmarklist[v:count-1]) - else - echomsg "Sorry, bookmark#".v:count." doesn't exist!" + if curmachine != g:netrw_machine + if exists("s:netwr_hup[".g:netrw_machine."]") + call NetUserPass("ftp:".g:netrw_machine) + elseif exists("s:netrw_passwd") + " if there's a change in hostname, require password re-entry + unlet s:netrw_passwd + endif + if exists("netrw_port") + unlet netrw_port + endif endif - elseif a:chg == 2 -" redraw! - let didwork= 0 - " list user's bookmarks -" call Decho("(user: ) list user's bookmarks") - if exists("g:netrw_bookmarklist") -" call Decho('list '.len(g:netrw_bookmarklist).' bookmarks') - let cnt= 1 - for bmd in g:netrw_bookmarklist -" call Decho("Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1]) - echo printf("Netrw Bookmark#%-2d: %s",cnt,g:netrw_bookmarklist[cnt-1]) - let didwork = 1 - let cnt = cnt + 1 - endfor - endif + if exists("g:netrw_uid") && exists("s:netrw_passwd") + let b:netrw_method = 3 + else + let host= substitute(g:netrw_machine,'\..*$','','') + if exists("s:netrw_hup[host]") + call NetUserPass("ftp:".host) - " list directory history - let cnt = g:netrw_dirhist_cnt - let first = 1 - let histcnt = 0 - if g:netrw_dirhistmax > 0 - while ( first || cnt != g:netrw_dirhist_cnt ) -" call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:netrw_dirhist_cnt) - if exists("g:netrw_dirhist_{cnt}") -" call Decho("Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt}) - echo printf("Netrw History#%-2d: %s",histcnt,g:netrw_dirhist_{cnt}) - let didwork= 1 + elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~ '-[sS]:' +" call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">") +" call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">") + if g:netrw_ftp_cmd =~ '-[sS]:\S*MACHINE\>' + let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\',g:netrw_machine,'') +" call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">") endif - let histcnt = histcnt + 1 - let first = 0 - let cnt = ( cnt - 1 ) % g:netrw_dirhistmax - if cnt < 0 - let cnt= cnt + g:netrw_dirhistmax + let b:netrw_method= 2 + elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc +" call Decho("using <".expand("$HOME/.netrc")."> (readable)") + let b:netrw_method= 2 + else + if !exists("g:netrw_uid") || g:netrw_uid == "" + call NetUserPass() + elseif !exists("s:netrw_passwd") || s:netrw_passwd == "" + call NetUserPass(g:netrw_uid) + " else just use current g:netrw_uid and s:netrw_passwd endif - endwhile - else - let g:netrw_dirhist_cnt= 0 - endif - if didwork - call inputsave()|call input("Press to continue")|call inputrestore() - endif - - elseif a:chg == 3 - " saves most recently visited directories (when they differ) -" call Decho("(browsing) record curdir history") - if !exists("g:netrw_dirhist_cnt") || !exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") || g:netrw_dirhist_{g:netrw_dirhist_cnt} != a:curdir - if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt = ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax - let g:netrw_dirhist_{g:netrw_dirhist_cnt} = a:curdir + let b:netrw_method= 3 endif -" call Decho("save dirhist#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">") endif - elseif a:chg == 4 - " u: change to the previous directory stored on the history list -" call Decho("(user: ) chg to prev dir from history") - if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - v:count1 ) % g:netrw_dirhistmax - if g:netrw_dirhist_cnt < 0 - let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax - endif - else - let g:netrw_dirhist_cnt= 0 - endif - if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") -" call Decho("changedir u#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">") - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") - setl ma noro -" call Decho("(NetrwBookHistHandler) setl ma noro") - sil! keepj %d - setl nomod -" call Decho("(NetrwBookHistHandler) setl nomod") -" call Decho("(NetrwBookHistHandler) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") - endif -" " call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})) - exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}) - else - if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + v:count1 ) % g:netrw_dirhistmax - else - let g:netrw_dirhist_cnt= 0 - endif - echo "Sorry, no predecessor directory exists yet" + " Method#8: fetch {{{3 + elseif match(a:choice,fetchurm) == 0 +" call Decho("fetch://...") + let b:netrw_method = 8 + let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"") + let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"") + let b:netrw_option = substitute(a:choice,fetchurm,'\4',"") + let b:netrw_fname = substitute(a:choice,fetchurm,'\5',"") + + " Method#3: Issue an ftp : "machine id password [path/]filename" {{{3 + elseif match(a:choice,mipf) == 0 +" call Decho("(ftp) host id pass file") + let b:netrw_method = 3 + let g:netrw_machine = substitute(a:choice,mipf,'\1',"") + let g:netrw_uid = substitute(a:choice,mipf,'\2',"") + let s:netrw_passwd = substitute(a:choice,mipf,'\3',"") + let b:netrw_fname = substitute(a:choice,mipf,'\4',"") + call NetUserPass(g:netrw_machine,g:netrw_uid,s:netrw_passwd) + + " Method#3: Issue an ftp: "hostname [path/]filename" {{{3 + elseif match(a:choice,mf) == 0 +" call Decho("(ftp) host file") + if exists("g:netrw_uid") && exists("s:netrw_passwd") + let b:netrw_method = 3 + let g:netrw_machine = substitute(a:choice,mf,'\1',"") + let b:netrw_fname = substitute(a:choice,mf,'\2',"") + + elseif s:FileReadable(expand("$HOME/.netrc")) + let b:netrw_method = 2 + let g:netrw_machine = substitute(a:choice,mf,'\1',"") + let b:netrw_fname = substitute(a:choice,mf,'\2',"") endif - elseif a:chg == 5 - " U: change to the subsequent directory stored on the history list -" call Decho("(user: ) chg to next dir from history") - if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax - if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") -" call Decho("changedir U#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">") - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") -" call Decho("(NetrwBookHistHandler) setl ma noro") - setl ma noro - sil! keepj %d -" call Decho("removed all lines from buffer (%d)") -" call Decho("(NetrwBookHistHandler) setl nomod") - setl nomod -" call Decho("(set nomod) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") - endif -" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})) - exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}) - else - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - 1 ) % g:netrw_dirhistmax - if g:netrw_dirhist_cnt < 0 - let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax - endif - echo "Sorry, no successor directory exists yet" - endif - else - let g:netrw_dirhist_cnt= 0 - echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")" + " Method#9: sftp://user@hostname/...path-to-file {{{3 + elseif match(a:choice,sftpurm) == 0 +" call Decho("sftp://...") + let b:netrw_method = 9 + let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"") + let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"") + + " Method#1: Issue an rcp: hostname:filename" (this one should be last) {{{3 + elseif match(a:choice,rcphf) == 0 +" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">") + let b:netrw_method = 1 + let userid = substitute(a:choice,rcphf,'\2',"") + let g:netrw_machine = substitute(a:choice,rcphf,'\3',"") + let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") +" call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">") +" call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">") +" call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">") +" call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">") + if userid != "" + let g:netrw_uid= userid endif - elseif a:chg == 6 - " delete the v:count'th bookmark -" call Decho("delete bookmark#".v:count."<".g:netrw_bookmarklist[v:count-1].">") - let savefile= s:NetrwHome()."/.netrwbook" - if filereadable(savefile) -" call Decho("merge bookmarks (active and file)") - keepj call s:NetrwBookHistSave() " done here to merge bookmarks first -" call Decho("bookmark delete savefile<".savefile.">") - keepj call delete(savefile) + " Cannot Determine Method {{{3 + else + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45) endif -" call Decho("remove g:netrw_bookmarklist[".(v:count-1)."]") - keepj call remove(g:netrw_bookmarklist,v:count-1) -" call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist)) + let b:netrw_method = -1 endif - call s:NetrwBookmarkMenu() - call s:NetrwTgtMenu() - let @@= ykeep -" call Dret("s:NetrwBookHistHandler") -endfun + "}}}3 -" --------------------------------------------------------------------- -" s:NetrwBookHistRead: this function reads bookmarks and history {{{2 -" Sister function: s:NetrwBookHistSave() -fun! s:NetrwBookHistRead() -" call Dfunc("s:NetrwBookHistRead()") - if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 -" " call Dret("s:NetrwBookHistRead - suppressed due to g:netrw_dirhistmax") - return + if g:netrw_port != "" + " remove any leading [:#] from port number + let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','') + elseif exists("netrw_port") + " retain port number as implicit for subsequent ftp operations + let g:netrw_port= netrw_port endif - let ykeep= @@ - if !exists("s:netrw_initbookhist") - let home = s:NetrwHome() - let savefile= home."/.netrwbook" - if filereadable(savefile) -" call Decho("sourcing .netrwbook") - exe "keepalt keepj so ".savefile + +" call Decho("a:choice <".a:choice.">") +" call Decho("b:netrw_method <".b:netrw_method.">") +" call Decho("g:netrw_machine<".g:netrw_machine.">") +" call Decho("g:netrw_port <".g:netrw_port.">") +" if exists("g:netrw_uid") "Decho +" call Decho("g:netrw_uid <".g:netrw_uid.">") +" endif "Decho +" if exists("s:netrw_passwd") "Decho +" call Decho("s:netrw_passwd <".s:netrw_passwd.">") +" endif "Decho +" call Decho("b:netrw_fname <".b:netrw_fname.">") +" call Dret("NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port) +endfun + +" ------------------------------------------------------------------------ +" NetReadFixup: this sort of function is typically written by the user {{{2 +" to handle extra junk that their system's ftp dumps +" into the transfer. This function is provided as an +" example and as a fix for a Windows 95 problem: in my +" experience, win95's ftp always dumped four blank lines +" at the end of the transfer. +if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp + fun! NetReadFixup(method, line1, line2) +" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") + + " sanity checks -- attempt to convert inputs to integers + let method = a:method + 0 + let line1 = a:line1 + 0 + let line2 = a:line2 + 0 + if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 0 +" call Dret("NetReadFixup") + return endif - if g:netrw_dirhistmax > 0 - let savefile= home."/.netrwhist" - if filereadable(savefile) -" call Decho("sourcing .netrwhist") - exe "keepalt keepj so ".savefile + + if method == 3 " ftp (no <.netrc>) + let fourblanklines= line2 - 3 + if fourblanklines >= line1 + exe "sil keepj ".fourblanklines.",".line2."g/^\s*$/d" + call histdel("/",-1) endif - let s:netrw_initbookhist= 1 - au VimLeave * call s:NetrwBookHistSave() endif - endif - let @@= ykeep -" call Dret("s:NetrwBookHistRead") -endfun + +" call Dret("NetReadFixup") + endfun +endif " --------------------------------------------------------------------- -" s:NetrwBookHistSave: this function saves bookmarks and history {{{2 -" Sister function: s:NetrwBookHistRead() -" I used to do this via viminfo but that appears to -" be unreliable for long-term storage -fun! s:NetrwBookHistSave() -" call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax) - if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 -" call Dret("s:NetrwBookHistSave : dirhistmax=".g:netrw_dirhistmax) - return - endif +" NetUserPass: set username and password for subsequent ftp transfer {{{2 +" Usage: :call NetUserPass() -- will prompt for userid and password +" :call NetUserPass("uid") -- will prompt for password +" :call NetUserPass("uid","password") -- sets global userid and password +" :call NetUserPass("ftp:host") -- looks up userid and password using hup dictionary +" :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password +fun! NetUserPass(...) - let savefile= s:NetrwHome()."/.netrwhist" - 1split - call s:NetrwEnew() - setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf - setl nocin noai noci magic nospell nohid wig= noaw - setl ma noro write - if exists("+acd") | setl noacd | endif - sil! keepj keepalt %d +" call Dfunc("NetUserPass() a:0=".a:0) - " save .netrwhist -- no attempt to merge - sil! keepalt file .netrwhist - call setline(1,"let g:netrw_dirhistmax =".g:netrw_dirhistmax) - call setline(2,"let g:netrw_dirhist_cnt =".g:netrw_dirhist_cnt) - let lastline = line("$") - let cnt = 1 - while cnt <= g:netrw_dirhist_cnt - call setline((cnt+lastline),'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'") - let cnt= cnt + 1 - endwhile - exe "sil! w! ".savefile + if !exists('s:netrw_hup') + let s:netrw_hup= {} + endif - sil keepj %d - if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] - " merge and write .netrwbook - let savefile= s:NetrwHome()."/.netrwbook" + if a:0 == 0 + " case: no input arguments - if filereadable(savefile) - let booklist= deepcopy(g:netrw_bookmarklist) - exe "sil keepj keepalt so ".savefile - for bdm in booklist - if index(g:netrw_bookmarklist,bdm) == -1 - call add(g:netrw_bookmarklist,bdm) - endif - endfor - call sort(g:netrw_bookmarklist) - exe "sil! w! ".savefile - endif + " change host and username if not previously entered; get new password + if !exists("g:netrw_machine") + let g:netrw_machine= input('Enter hostname: ') + endif + if !exists("g:netrw_uid") || g:netrw_uid == "" + " get username (user-id) via prompt + let g:netrw_uid= input('Enter username: ') + endif + " get password via prompting + let s:netrw_passwd= inputsecret("Enter Password: ") - " construct and save .netrwbook - call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist)) - exe "sil! w! ".savefile + " set up hup database + let host = substitute(g:netrw_machine,'\..*$','','') + if !exists('s:netrw_hup[host]') + let s:netrw_hup[host]= {} endif - let bgone= bufnr("%") - q! - exe "keepalt ".bgone."bwipe!" + let s:netrw_hup[host].uid = g:netrw_uid + let s:netrw_hup[host].passwd = s:netrw_passwd -" call Dret("s:NetrwBookHistSave") -endfun + elseif a:0 == 1 + " case: one input argument -" --------------------------------------------------------------------- -" s:NetrwBrowse: This function uses the command in g:netrw_list_cmd to provide a {{{2 -" list of the contents of a local or remote directory. It is assumed that the -" g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted -" with the requested remote hostname first. -fun! s:NetrwBrowse(islocal,dirname) - if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif -" call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%")."> win#".winnr()) -" call Decho("(NetrwBrowse) tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) - " s:NetrwBrowse: initialize history {{{3 - if !exists("s:netrw_initbookhist") - keepj call s:NetrwBookHistRead() - endif + if a:1 =~ '^ftp:' + " get host from ftp:... url + " access userid and password from hup (host-user-passwd) dictionary +" call Decho("case a:0=1: a:1<".a:1."> (get host from ftp:... url)") + let host = substitute(a:1,'^ftp:','','') + let host = substitute(host,'\..*','','') + if exists("s:netrw_hup[host]") + let g:netrw_uid = s:netrw_hup[host].uid + let s:netrw_passwd = s:netrw_hup[host].passwd +" call Decho("get s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">") +" call Decho("get s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">") + else + let g:netrw_uid = input("Enter UserId: ") + let s:netrw_passwd = inputsecret("Enter Password: ") + endif - " s:NetrwBrowse: simplify the dirname (especially for ".."s in dirnames) {{{3 - if a:dirname !~ '^\a\+://' - let dirname= simplify(a:dirname) else - let dirname= a:dirname - endif - - if exists("s:netrw_skipbrowse") - unlet s:netrw_skipbrowse -" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse) - return + " case: one input argument, not an url. Using it as a new user-id. +" call Decho("case a:0=1: a:1<".a:1."> (get host from input argument, not an url)") + if exists("g:netrw_machine") + if g:netrw_machine =~ '[0-9.]\+' + let host= g:netrw_machine + else + let host= substitute(g:netrw_machine,'\..*$','','') + endif + else + let g:netrw_machine= input('Enter hostname: ') + endif + let g:netrw_uid = a:1 +" call Decho("set g:netrw_uid= <".g:netrw_uid.">") + if exists("g:netrw_passwd") + " ask for password if one not previously entered + let s:netrw_passwd= g:netrw_passwd + else + let s:netrw_passwd = inputsecret("Enter Password: ") + endif endif - " s:NetrwBrowse: sanity checks: {{{3 - if !exists("*shellescape") - keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69) -" call Dret("s:NetrwBrowse : missing shellescape()") - return - endif - if !exists("*fnameescape") - keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70) -" call Dret("s:NetrwBrowse : missing fnameescape()") - return +" call Decho("host<".host.">") + if exists("host") + if !exists('s:netrw_hup[host]') + let s:netrw_hup[host]= {} + endif + let s:netrw_hup[host].uid = g:netrw_uid + let s:netrw_hup[host].passwd = s:netrw_passwd endif - " s:NetrwBrowse: save options: {{{3 - call s:NetrwOptionSave("w:") + elseif a:0 == 2 + let g:netrw_uid = a:1 + let s:netrw_passwd = a:2 - " s:NetrwBrowse: re-instate any marked files {{{3 - if exists("s:netrwmarkfilelist_{bufnr('%')}") -" call Decho("(NetrwBrowse) clearing marked files") - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" + elseif a:0 == 3 + " enter hostname, user-id, and password into the hup dictionary + let host = substitute(a:1,'^\a\+:','','') + let host = substitute(host,'\..*$','','') + if !exists('s:netrw_hup[host]') + let s:netrw_hup[host]= {} endif + let s:netrw_hup[host].uid = a:2 + let s:netrw_hup[host].passwd = a:3 + let g:netrw_uid = s:netrw_hup[host].uid + let s:netrw_passwd = s:netrw_hup[host].passwd +" call Decho("set s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">") +" call Decho("set s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">") + endif - if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep - " s:NetrwBrowse: set up "safe" options for local directory/file {{{3 -" call Decho("(NetrwBrowse) handle w:netrw_acdkeep:") -" call Decho("(NetrwBrowse) keepjumps lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")") - exe 'keepj lcd '.fnameescape(dirname) - call s:NetrwSafeOptions() -" call Decho("(NetrwBrowse) getcwd<".getcwd().">") +" call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">") +endfun - elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"' - " s:NetrwBrowse: looks like a remote regular file, attempt transfer {{{3 -" call Decho("(NetrwBrowse) attempt transfer as regular file<".dirname.">") +" =========================================== +" Shared Browsing Support: {{{1 +" =========================================== - " remove any filetype indicator from end of dirname, except for the - " "this is a directory" indicator (/). - " There shouldn't be one of those here, anyway. - let path= substitute(dirname,'[*=@|]\r\=$','','e') -" call Decho("(NetrwBrowse) new path<".path.">") - call s:RemotePathAnalysis(dirname) - - " s:NetrwBrowse: remote-read the requested file into current buffer {{{3 - keepj mark ' - call s:NetrwEnew(dirname) - call s:NetrwSafeOptions() - setl ma noro -" call Decho("(NetrwBrowse) setl ma noro") - let b:netrw_curdir = dirname - let url = s:method."://".s:user.s:machine.(s:port ? ":".s:port : "")."/".s:path -" call Decho("(NetrwBrowse) exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")") - exe "sil! keepj keepalt file ".fnameescape(url) - exe "sil! keepj keepalt doau BufReadPre ".fnameescape(s:fname) - sil call netrw#NetRead(2,url) - if s:path !~ '.tar.bz2$' && s:path !~ '.tar.gz' && s:path !~ '.tar.xz' && s:path !~ '.txz' - " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error - exe "sil keepj keepalt doau BufReadPost ".fnameescape(s:fname) - endif - - " s:NetrwBrowse: save certain window-oriented variables into buffer-oriented variables {{{3 - call s:SetBufWinVars() - call s:NetrwOptionRestore("w:") -" call Decho("(NetrwBrowse) setl ma nomod") - setl ma nomod -" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" --------------------------------------------------------------------- +" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2 +fun! s:ExplorePatHls(pattern) +" call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)") + let repat= substitute(a:pattern,'^**/\{1,2}','','') +" call Decho("repat<".repat.">") + let repat= escape(repat,'][.\') +" call Decho("repat<".repat.">") + let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>' +" call Dret("s:ExplorePatHls repat<".repat.">") + return repat +endfun -" call Dret("s:NetrwBrowse : file<".s:fname.">") +" --------------------------------------------------------------------- +" s:NetrwBookHistHandler: {{{2 +" 0: (user: ) bookmark current directory +" 1: (user: ) change to the bookmarked directory +" 2: (user: ) list bookmarks +" 3: (browsing) record current directory history +" 4: (user: ) go up (previous) bookmark +" 5: (user: ) go down (next) bookmark +" 6: (user: ) delete bookmark +fun! s:NetrwBookHistHandler(chg,curdir) +" call Dfunc("s:NetrwBookHistHandler(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." histcnt=".g:netrw_dirhist_cnt." histmax=".g:netrw_dirhistmax) + if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 +" " call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax") return endif - " use buffer-oriented WinVars if buffer variables exist but associated window variables don't {{{3 - call s:UseBufWinVars() - - " set up some variables {{{3 - let b:netrw_browser_active = 1 - let dirname = dirname - let s:last_sort_by = g:netrw_sort_by - - " set up menu {{{3 - keepj call s:NetrwMenu(1) - - " get/set-up buffer {{{3 - let reusing= s:NetrwGetBuffer(a:islocal,dirname) - " maintain markfile highlighting - if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" -" call Decho("(NetrwBrowse) bufnr(%)=".bufnr('%')) -" call Decho("(NetrwBrowse) exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/") - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" - else -" call Decho("(NetrwBrowse) 2match none") - 2match none - endif - if reusing && line("$") > 1 - call s:NetrwOptionRestore("w:") -" call Decho("(NetrwBrowse) setl noma nomod nowrap") - setl noma nomod nowrap -" call Decho("(NetrwBrowse) (set noma nomod nowrap) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Dret("s:NetrwBrowse : re-using buffer") - return - endif + let ykeep= @@ + if a:chg == 0 + " bookmark the current directory +" call Decho("(user: ) bookmark the current directory") + if !exists("g:netrw_bookmarklist") + let g:netrw_bookmarklist= [] + endif + if index(g:netrw_bookmarklist,a:curdir) == -1 + " curdir not currently in g:netrw_bookmarklist, so include it + call add(g:netrw_bookmarklist,a:curdir) + call sort(g:netrw_bookmarklist) + endif + echo "bookmarked the current directory" - " set b:netrw_curdir to the new directory name {{{3 -" call Decho("(NetrwBrowse) set b:netrw_curdir to the new directory name: (buf#".bufnr("%").")") - let b:netrw_curdir= dirname - if b:netrw_curdir =~ '[/\\]$' - let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e') - endif - if b:netrw_curdir == '' - if has("amiga") - " On the Amiga, the empty string connotes the current directory - let b:netrw_curdir= getcwd() + elseif a:chg == 1 + " change to the bookmarked directory +" call Decho("(user: <".v:count."gb>) change to the bookmarked directory") + if exists("g:netrw_bookmarklist[v:count-1]") +" call Decho("(user: <".v:count."gb>) bookmarklist=".string(g:netrw_bookmarklist)) + exe "keepj e ".fnameescape(g:netrw_bookmarklist[v:count-1]) else - " under unix, when the root directory is encountered, the result - " from the preceding substitute is an empty string. - let b:netrw_curdir= '/' + echomsg "Sorry, bookmark#".v:count." doesn't exist!" endif - endif - if !a:islocal && b:netrw_curdir !~ '/$' - let b:netrw_curdir= b:netrw_curdir.'/' - endif -" call Decho("(NetrwBrowse) b:netrw_curdir<".b:netrw_curdir.">") - - " ------------ - " (local only) {{{3 - " ------------ - if a:islocal -" call Decho("(NetrwBrowse) local only:") - - " Set up ShellCmdPost handling. Append current buffer to browselist - call s:LocalFastBrowser() - " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3 - if !g:netrw_keepdir -" call Decho("(NetrwBrowse) handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) -" call Decho("(NetrwBrowse) l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist")) - if !exists("&l:acd") || !&l:acd -" call Decho('exe keepjumps lcd '.fnameescape(b:netrw_curdir)) - try - exe 'keepj lcd '.fnameescape(b:netrw_curdir) - catch /^Vim\%((\a\+)\)\=:E472/ - call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".b:netrw_curdir."> (permissions?)",61) - if exists("w:netrw_prvdir") - let b:netrw_curdir= w:netrw_prvdir - else - call s:NetrwOptionRestore("w:") -" call Decho("(NetrwBrowse) setl noma nomod nowrap") - setl noma nomod nowrap -" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") - let b:netrw_curdir= dirname -" call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") - return - endif - endtry - endif + elseif a:chg == 2 +" redraw! + let didwork= 0 + " list user's bookmarks +" call Decho("(user: ) list user's bookmarks") + if exists("g:netrw_bookmarklist") +" call Decho('list '.len(g:netrw_bookmarklist).' bookmarks') + let cnt= 1 + for bmd in g:netrw_bookmarklist +" call Decho("Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1]) + echo printf("Netrw Bookmark#%-2d: %s",cnt,g:netrw_bookmarklist[cnt-1]) + let didwork = 1 + let cnt = cnt + 1 + endfor endif - " -------------------------------- - " remote handling: {{{3 - " -------------------------------- - else -" call Decho("(NetrwBrowse) remote only:") - - " analyze dirname and g:netrw_list_cmd {{{3 -" call Decho("(NetrwBrowse) b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">") - if dirname =~ "^NetrwTreeListing\>" - let dirname= b:netrw_curdir -" call Decho("(NetrwBrowse) (dirname was ) dirname<".dirname.">") - elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") - let dirname= substitute(b:netrw_curdir,'\\','/','g') - if dirname !~ '/$' - let dirname= dirname.'/' - endif - let b:netrw_curdir = dirname -" call Decho("(NetrwBrowse) (liststyle is TREELIST) dirname<".dirname.">") + " list directory history + let cnt = g:netrw_dirhist_cnt + let first = 1 + let histcnt = 0 + if g:netrw_dirhistmax > 0 + while ( first || cnt != g:netrw_dirhist_cnt ) +" call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:netrw_dirhist_cnt) + if exists("g:netrw_dirhist_{cnt}") +" call Decho("Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt}) + echo printf("Netrw History#%-2d: %s",histcnt,g:netrw_dirhist_{cnt}) + let didwork= 1 + endif + let histcnt = histcnt + 1 + let first = 0 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax + if cnt < 0 + let cnt= cnt + g:netrw_dirhistmax + endif + endwhile else - let dirname = substitute(dirname,'\\','/','g') -" call Decho("(NetrwBrowse) (normal) dirname<".dirname.">") + let g:netrw_dirhist_cnt= 0 + endif + if didwork + call inputsave()|call input("Press to continue")|call inputrestore() endif - let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$' - if dirname !~ dirpat - if !exists("g:netrw_quiet") - keepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20) + elseif a:chg == 3 + " saves most recently visited directories (when they differ) +" call Decho("(browsing) record curdir history") + if !exists("g:netrw_dirhist_cnt") || !exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") || g:netrw_dirhist_{g:netrw_dirhist_cnt} != a:curdir + if g:netrw_dirhistmax > 0 + let g:netrw_dirhist_cnt = ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax + let g:netrw_dirhist_{g:netrw_dirhist_cnt} = a:curdir endif - keepj call s:NetrwOptionRestore("w:") -" call Decho("(NetrwBrowse) setl noma nomod nowrap") - setl noma nomod nowrap -" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">") - return +" call Decho("save dirhist#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">") endif - let b:netrw_curdir= dirname -" call Decho("(NetrwBrowse) b:netrw_curdir<".b:netrw_curdir."> (remote)") - endif " (additional remote handling) - - " ----------------------- - " Directory Listing: {{{3 - " ----------------------- - keepj call s:NetrwMaps(a:islocal) - keepj call s:PerformListing(a:islocal) - if v:version >= 700 && has("balloon_eval") && &beval == 0 && &l:bexpr == "" && !exists("g:netrw_nobeval") - let &l:bexpr= "netrw#NetrwBalloonHelp()" -" call Decho("(NetrwBrowse) set up balloon help: l:bexpr=".&l:bexpr) - set beval - endif - call s:NetrwOptionRestore("w:") - - " The s:LocalBrowseShellCmdRefresh() function is called by an autocmd - " installed by s:LocalFastBrowser() when g:netrw_fastbrowse <= 1 (ie. slow, medium speed). - " However, s:NetrwBrowse() causes the ShellCmdPost event itself to fire once; setting - " the variable below avoids that second refresh of the screen. The s:LocalBrowseShellCmdRefresh() - " function gets called due to that autocmd; it notices that the following variable is set - " and skips the refresh and sets s:locbrowseshellcmd to zero. Oct 13, 2008 - let s:locbrowseshellcmd= 1 - -" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Dret("s:NetrwBrowse : did PerformListing ft<".&ft.">") - return -endfun -" --------------------------------------------------------------------- -" s:NetrwFileInfo: supports qf (query for file information) {{{2 -fun! s:NetrwFileInfo(islocal,fname) -" call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">)") - let ykeep= @@ - if a:islocal - if (has("unix") || has("macunix")) && executable("/bin/ls") - if exists("b:netrw_curdir") -" call Decho('using ls with b:netrw_curdir<'.b:netrw_curdir.'>') - if b:netrw_curdir =~ '/$' - echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname)) - else - echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname)) - endif - else -" call Decho('using ls '.a:fname." using cwd<".getcwd().">") - echo system("/bin/ls -lsad ".shellescape(a:fname)) + elseif a:chg == 4 + " u: change to the previous directory stored on the history list +" call Decho("(user: ) chg to prev dir from history") + if g:netrw_dirhistmax > 0 + let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - v:count1 ) % g:netrw_dirhistmax + if g:netrw_dirhist_cnt < 0 + let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax endif else - " use vim functions to return information about file below cursor -" call Decho("using vim functions to query for file info") - if !isdirectory(a:fname) && !filereadable(a:fname) && a:fname =~ '[*@/]' - let fname= substitute(a:fname,".$","","") + let g:netrw_dirhist_cnt= 0 + endif + if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") +" call Decho("changedir u#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">") + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") + setl ma noro +" call Decho("setl ma noro") + sil! keepj %d + setl nomod +" call Decho("setl nomod") +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + endif +" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})) + exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}) + else + if g:netrw_dirhistmax > 0 + let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + v:count1 ) % g:netrw_dirhistmax else - let fname= a:fname - endif - let t = getftime(fname) - let sz = getfsize(fname) - echo a:fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(fname)) -" call Decho(fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(fname))) - endif - else - echo "sorry, \"qf\" not supported yet for remote files" - endif - let @@= ykeep -" call Dret("s:NetrwFileInfo") -endfun - -" --------------------------------------------------------------------- -" s:NetrwGetBuffer: {{{2 -" returns 0=cleared buffer -" 1=re-used buffer -fun! s:NetrwGetBuffer(islocal,dirname) -" call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle) -" call Decho("(NetrwGetBuffer) modiable=".&mod." modifiable=".&ma." readonly=".&ro) - let dirname= a:dirname - - " re-use buffer if possible {{{3 -" call Decho("(NetrwGetBuffer) --re-use a buffer if possible--") - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - " find NetrwTreeList buffer if there is one -" call Decho("(NetrwGetBuffer) case liststyle=treelist: find NetrwTreeList buffer if there is one") - if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 0 -" call Decho("(NetrwGetBuffer) re-using w:netrw_treebufnr=".w:netrw_treebufnr) - setl mod - sil! keepj %d - let eikeep= &ei - set ei=all - exe "sil! keepalt b ".w:netrw_treebufnr - let &ei= eikeep -" call Dret("s:NetrwGetBuffer 0 : bufnum#".w:netrw_treebufnr."") - return 0 - endif - let bufnum= -1 -" call Decho("(NetrwGetBuffer) liststyle=TREE but w:netrw_treebufnr doesn't exist") - - else - " find buffer number of buffer named precisely the same as dirname {{{3 -" call Decho("(NetrwGetBuffer) case listtyle not treelist: find buffer numnber of buffer named precisely the same as dirname--") - - " get dirname and associated buffer number - let bufnum = bufnr(escape(dirname,'\')) -" call Decho("(NetrwGetBuffer) find buffer<".dirname.">'s number ") -" call Decho("(NetrwGetBuffer) bufnr(dirname<".escape(dirname,'\').">)=".bufnum) - - if bufnum < 0 && dirname !~ '/$' - " try appending a trailing / -" call Decho("(NetrwGetBuffer) try appending a trailing / to dirname<".dirname.">") - let bufnum= bufnr(escape(dirname.'/','\')) - if bufnum > 0 - let dirname= dirname.'/' - endif - endif - - if bufnum < 0 && dirname =~ '/$' - " try removing a trailing / -" call Decho("(NetrwGetBuffer) try removing a trailing / from dirname<".dirname.">") - let bufnum= bufnr(escape(substitute(dirname,'/$','',''),'\')) - if bufnum > 0 - let dirname= substitute(dirname,'/$','','') + let g:netrw_dirhist_cnt= 0 endif + echo "Sorry, no predecessor directory exists yet" endif -" call Decho("(NetrwGetBuffer) findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)") - " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/ and abc/ matches) - if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.' - " handle approximate matches -" call Decho("(NetrwGetBuffer) handling approx match: bufnum#".bufnum.">0 AND bufname<".bufname(bufnum).">!=dirname<".dirname."> AND bufname(".bufnum.")!='.'") - let ibuf = 1 - let buflast = bufnr("$") -" call Decho("(NetrwGetBuffer) findbuf2: buflast=bufnr($)=".buflast) - while ibuf <= buflast - let bname= substitute(bufname(ibuf),'\\','/','g') - let bname= substitute(bname,'.\zs/$','','') -" call Decho("(NetrwGetBuffer) findbuf3: while [ibuf=",ibuf."]<=[buflast=".buflast."]: dirname<".dirname."> bname=bufname(".ibuf.")<".bname.">") - if bname != '' && dirname =~ '/'.bname.'/\=$' && dirname !~ '^/' - " bname is not empty - " dirname ends with bname, - " dirname doesn't start with /, so its not a absolute path -" call Decho("(NetrwGetBuffer) findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/') - break - endif - if bname =~ '^'.dirname.'/\=$' - " bname begins with dirname -" call Decho(' findbuf3b: passes test 2 : bname<'.bname.'>=~^'.dirname.'/\=$') - break - endif - if dirname =~ '^'.bname.'/$' -" call Decho(' findbuf3c: passes test 3 : dirname<'.dirname.'>=~^'.bname.'/$') - break - endif - if bname != '' && dirname =~ '/'.bname.'$' && bname == bufname("%") && line("$") == 1 -" call Decho(' findbuf3d: passes test 4 : dirname<'.dirname.'>=~ /'.bname.'$') - break + elseif a:chg == 5 + " U: change to the subsequent directory stored on the history list +" call Decho("(user: ) chg to next dir from history") + if g:netrw_dirhistmax > 0 + let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax + if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") +" call Decho("changedir U#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">") + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") +" call Decho("setl ma noro") + setl ma noro + sil! keepj %d +" call Decho("removed all lines from buffer (%d)") +" call Decho("setl nomod") + setl nomod +" call Decho("(set nomod) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") endif - let ibuf= ibuf + 1 - endwhile - if ibuf > buflast - let bufnum= -1 - else - let bufnum= ibuf - endif -" call Decho("(NetrwGetBuffer) findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")") - endif - endif - - " get enew buffer and name it -or- re-use buffer {{{3 -" call Decho("(NetrwGetBuffer) get enew buffer and name it OR re-use buffer") - sil! keepj keepalt mark ' - if bufnum < 0 || !bufexists(bufnum) -" call Decho("(NetrwGetBuffer) --get enew buffer and name it (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)") - call s:NetrwEnew(dirname) -" call Decho("(NetrwGetBuffer) got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)") - " name the buffer - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - " Got enew buffer; transform into a NetrwTreeListing -" call Decho("(NetrwGetBuffer) --transform enew buffer#".bufnr("%")." into a NetrwTreeListing --") - if !exists("s:netrw_treelistnum") - let s:netrw_treelistnum= 1 +" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})) + exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}) else - let s:netrw_treelistnum= s:netrw_treelistnum + 1 + let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - 1 ) % g:netrw_dirhistmax + if g:netrw_dirhist_cnt < 0 + let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax + endif + echo "Sorry, no successor directory exists yet" endif - let w:netrw_treebufnr= bufnr("%") -" call Decho("(NetrwGetBuffer) exe sil! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum)) - exe 'sil! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum) - set bt=nofile noswf - nnoremap [ :sil call TreeListMove('[') - nnoremap ] :sil call TreeListMove(']') - nnoremap [[ :sil call TreeListMove('[') - nnoremap ]] :sil call TreeListMove(']') -" call Decho("(NetrwGetBuffer) tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr) else -" let v:errmsg= "" " Decho - let escdirname= fnameescape(dirname) -" call Decho("(NetrwGetBuffer) errmsg<".v:errmsg."> bufnr(escdirname<".escdirname.">)=".bufnr(escdirname)." bufname()<".bufname(bufnr(escdirname)).">") -" call Decho(' exe sil! keepalt file '.escdirname) -" let v:errmsg= "" " Decho - exe 'sil! keepalt file '.escdirname -" call Decho("(NetrwGetBuffer) errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">") + let g:netrw_dirhist_cnt= 0 + echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")" endif -" call Decho("(NetrwGetBuffer) named enew buffer#".bufnr("%")."<".bufname("%").">") - else " Re-use the buffer -" call Decho("(NetrwGetBuffer) --re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)") - let eikeep= &ei - set ei=all - if getline(2) =~ '^" Netrw Directory Listing' -" call Decho("(NetrwGetBuffer) getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum) - exe "sil! keepalt b ".bufnum - else -" call Decho("(NetrwGetBuffer) getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum) - exe "sil! keepalt b ".bufnum - endif - if bufname("%") == '.' -" call Decho("(NetrwGetBuffer) exe sil! keepalt file ".fnameescape(getcwd())) - exe "sil! keepalt file ".fnameescape(getcwd()) - endif - let &ei= eikeep - if line("$") <= 1 - keepj call s:NetrwListSettings(a:islocal) -" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it") - return 0 - elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1) - keepj call s:NetrwListSettings(a:islocal) - sil keepj %d -" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but refreshing due to g:netrw_fastbrowse=".g:netrw_fastbrowse) - return 0 - elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST -" call Decho("(NetrwGetBuffer) --re-use tree listing--") -" call Decho("(NetrwGetBuffer) clear buffer<".expand("%")."> with :%d") - sil keepj %d - keepj call s:NetrwListSettings(a:islocal) -" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh") - return 0 - else -" call Dret("s:NetrwGetBuffer 1 : buf#".bufnr("%")) - return 1 + elseif a:chg == 6 + " delete the v:count'th bookmark +" call Decho("delete bookmark#".v:count."<".g:netrw_bookmarklist[v:count-1].">") + let savefile= s:NetrwHome()."/.netrwbook" + if filereadable(savefile) +" call Decho("merge bookmarks (active and file)") + keepj call s:NetrwBookHistSave() " done here to merge bookmarks first +" call Decho("bookmark delete savefile<".savefile.">") + keepj call delete(savefile) endif +" call Decho("remove g:netrw_bookmarklist[".(v:count-1)."]") + keepj call remove(g:netrw_bookmarklist,v:count-1) +" call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist)) endif - - " do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc {{{3 - " fastbrowse Local Remote Hiding a buffer implies it may be re-used (fast) - " slow 0 D D Deleting a buffer implies it will not be re-used (slow) - " med 1 D H - " fast 2 H H -" call Decho("(NetrwGetBuffer) --do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--") - let fname= expand("%") - keepj call s:NetrwListSettings(a:islocal) -" call Decho("(NetrwGetBuffer) exe sil! keepalt file ".fnameescape(fname)) - exe "sil! keepj keepalt file ".fnameescape(fname) - - " delete all lines from buffer {{{3 -" call Decho("(NetrwGetBuffer) --delete all lines from buffer--") -" call Decho("(NetrwGetBuffer) clear buffer<".expand("%")."> with :%d") - sil! keepalt keepj %d - -" call Dret("s:NetrwGetBuffer 0 : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) - return 0 + call s:NetrwBookmarkMenu() + call s:NetrwTgtMenu() + let @@= ykeep +" call Dret("s:NetrwBookHistHandler") endfun " --------------------------------------------------------------------- -" s:NetrwGetcwd: get the current directory. {{{2 -" Change backslashes to forward slashes, if any. -" If doesc is true, escape certain troublesome characters -fun! s:NetrwGetcwd(doesc) -" call Dfunc("NetrwGetcwd(doesc=".a:doesc.")") - let curdir= substitute(getcwd(),'\\','/','ge') - if curdir !~ '[\/]$' - let curdir= curdir.'/' +" s:NetrwBookHistRead: this function reads bookmarks and history {{{2 +" Sister function: s:NetrwBookHistSave() +fun! s:NetrwBookHistRead() +" call Dfunc("s:NetrwBookHistRead()") + if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 +" " call Dret("s:NetrwBookHistRead - suppressed due to g:netrw_dirhistmax") + return endif - if a:doesc - let curdir= fnameescape(curdir) + let ykeep= @@ + if !exists("s:netrw_initbookhist") + let home = s:NetrwHome() + let savefile= home."/.netrwbook" + if filereadable(savefile) +" call Decho("sourcing .netrwbook") + exe "keepalt keepj so ".savefile + endif + if g:netrw_dirhistmax > 0 + let savefile= home."/.netrwhist" + if filereadable(savefile) +" call Decho("sourcing .netrwhist") + exe "keepalt keepj so ".savefile + endif + let s:netrw_initbookhist= 1 + au VimLeave * call s:NetrwBookHistSave() + endif endif -" call Dret("NetrwGetcwd <".curdir.">") - return curdir + let @@= ykeep +" call Dret("s:NetrwBookHistRead") endfun " --------------------------------------------------------------------- -" s:NetrwGetWord: it gets the directory/file named under the cursor {{{2 -fun! s:NetrwGetWord() -" call Dfunc("s:NetrwGetWord() line#".line(".")." liststyle=".g:netrw_liststyle." virtcol=".virtcol(".")) - call s:UseBufWinVars() - - " insure that w:netrw_liststyle is set up - if !exists("w:netrw_liststyle") - if exists("g:netrw_liststyle") - let w:netrw_liststyle= g:netrw_liststyle - else - let w:netrw_liststyle= s:THINLIST - endif -" call Decho("w:netrw_liststyle=".w:netrw_liststyle) +" s:NetrwBookHistSave: this function saves bookmarks and history {{{2 +" Sister function: s:NetrwBookHistRead() +" I used to do this via viminfo but that appears to +" be unreliable for long-term storage +fun! s:NetrwBookHistSave() +" call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax) + if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 +" call Dret("s:NetrwBookHistSave : dirhistmax=".g:netrw_dirhistmax) + return endif - if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt - " Active Banner support -" call Decho("active banner handling") - keepj norm! 0 - let dirname= "./" - let curline= getline('.') - - if curline =~ '"\s*Sorted by\s' - keepj norm s - let s:netrw_skipbrowse= 1 - echo 'Pressing "s" also works' - - elseif curline =~ '"\s*Sort sequence:' - let s:netrw_skipbrowse= 1 - echo 'Press "S" to edit sorting sequence' + let savefile= s:NetrwHome()."/.netrwhist" + 1split + call s:NetrwEnew() + setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf + setl nocin noai noci magic nospell nohid wig= noaw + setl ma noro write + if exists("+acd") | setl noacd | endif + sil! keepj keepalt %d - elseif curline =~ '"\s*Quick Help:' - keepj norm ? - let s:netrw_skipbrowse= 1 - echo 'Pressing "?" also works' + " save .netrwhist -- no attempt to merge + sil! keepalt file .netrwhist + call setline(1,"let g:netrw_dirhistmax =".g:netrw_dirhistmax) + call setline(2,"let g:netrw_dirhist_cnt =".g:netrw_dirhist_cnt) + let lastline = line("$") + let cnt = 1 + while cnt <= g:netrw_dirhist_cnt + call setline((cnt+lastline),'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'") + let cnt= cnt + 1 + endwhile + exe "sil! w! ".savefile - elseif curline =~ '"\s*\%(Hiding\|Showing\):' - keepj norm a - let s:netrw_skipbrowse= 1 - echo 'Pressing "a" also works' + sil keepj %d + if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] + " merge and write .netrwbook + let savefile= s:NetrwHome()."/.netrwbook" - elseif line("$") > w:netrw_bannercnt - exe 'sil keepj '.w:netrw_bannercnt + if filereadable(savefile) + let booklist= deepcopy(g:netrw_bookmarklist) + exe "sil keepj keepalt so ".savefile + for bdm in booklist + if index(g:netrw_bookmarklist,bdm) == -1 + call add(g:netrw_bookmarklist,bdm) + endif + endfor + call sort(g:netrw_bookmarklist) + exe "sil! w! ".savefile endif - elseif w:netrw_liststyle == s:THINLIST -" call Decho("thin column handling") - keepj norm! 0 - let dirname= getline('.') - - elseif w:netrw_liststyle == s:LONGLIST -" call Decho("long column handling") - keepj norm! 0 - let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e') + " construct and save .netrwbook + call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist)) + exe "sil! w! ".savefile + endif + let bgone= bufnr("%") + q! + exe "keepalt ".bgone."bwipe!" - elseif w:netrw_liststyle == s:TREELIST -" call Decho("treelist handling") - let dirname= substitute(getline('.'),'^\(| \)*','','e') +" call Dret("s:NetrwBookHistSave") +endfun - else -" call Decho("obtain word from wide listing") - let dirname= getline('.') +" --------------------------------------------------------------------- +" s:NetrwBrowse: This function uses the command in g:netrw_list_cmd to provide a {{{2 +" list of the contents of a local or remote directory. It is assumed that the +" g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted +" with the requested remote hostname first. +fun! s:NetrwBrowse(islocal,dirname) + if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif +" call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%")."> win#".winnr()) +" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) +" call Dredir("ls!") - if !exists("b:netrw_cpf") - let b:netrw_cpf= 0 - exe 'sil keepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' - call histdel("/",-1) -" call Decho("computed cpf=".b:netrw_cpf) - endif + " s:NetrwBrowse: initialize history {{{3 + if !exists("s:netrw_initbookhist") + keepj call s:NetrwBookHistRead() + endif -" call Decho("buf#".bufnr("%")."<".bufname("%").">") - let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf -" call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart." bannercnt=".w:netrw_bannercnt) -" call Decho("1: dirname<".dirname.">") - if filestart == 0 - keepj norm! 0ma - else - call cursor(line("."),filestart+1) - keepj norm! ma - endif - let rega= @a - let eofname= filestart + b:netrw_cpf + 1 - if eofname <= col("$") - call cursor(line("."),filestart+b:netrw_cpf+1) - keepj norm! "ay`a - else - keepj norm! "ay$ - endif - let dirname = @a - let @a = rega -" call Decho("2: dirname<".dirname.">") - let dirname= substitute(dirname,'\s\+$','','e') -" call Decho("3: dirname<".dirname.">") + " s:NetrwBrowse: simplify the dirname (especially for ".."s in dirnames) {{{3 + if a:dirname !~ '^\a\+://' + let dirname= simplify(a:dirname) + else + let dirname= a:dirname endif - " symlinks are indicated by a trailing "@". Remove it before further processing. - let dirname= substitute(dirname,"@$","","") + if exists("s:netrw_skipbrowse") + unlet s:netrw_skipbrowse +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." filename<".expand("%")."> win#".winnr()." ft<".&ft.">") +" call Dret("s:NetrwBrowse : s:netrw_skipbrowse existed") + return + endif - " executables are indicated by a trailing "*". Remove it before further processing. - let dirname= substitute(dirname,"\*$","","") + " s:NetrwBrowse: sanity checks: {{{3 + if !exists("*shellescape") + keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69) +" call Dret("s:NetrwBrowse : missing shellescape()") + return + endif + if !exists("*fnameescape") + keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70) +" call Dret("s:NetrwBrowse : missing fnameescape()") + return + endif -" call Dret("s:NetrwGetWord <".dirname.">") - return dirname -endfun + " s:NetrwBrowse: save options: {{{3 + call s:NetrwOptionSave("w:") -" --------------------------------------------------------------------- -" s:NetrwListSettings: make standard settings for a netrw listing {{{2 -fun! s:NetrwListSettings(islocal) -" call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")") - let fname= bufname("%") -" call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro") - setl bt=nofile nobl ma nonu nowrap noro -" call Decho("(NetrwListSettings) exe sil! keepalt file ".fnameescape(fname)) - exe "sil! keepalt file ".fnameescape(fname) - if g:netrw_use_noswf - setl noswf - endif -" call Decho("(NetrwListSettings) exe setl ts=".(g:netrw_maxfilenamelen+1)) - exe "setl ts=".(g:netrw_maxfilenamelen+1) - setl isk+=.,~,- - if g:netrw_fastbrowse > a:islocal - setl bh=hide - else - setl bh=delete + " s:NetrwBrowse: re-instate any marked files {{{3 + if exists("s:netrwmarkfilelist_{bufnr('%')}") +" call Decho("clearing marked files") + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" endif -" call Dret("s:NetrwListSettings") -endfun -" --------------------------------------------------------------------- -" s:NetrwListStyle: {{{2 -" islocal=0: remote browsing -" =1: local browsing -fun! s:NetrwListStyle(islocal) -" call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle) - let ykeep = @@ - let fname = s:NetrwGetWord() - if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif - let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST -" call Decho("fname<".fname.">") -" call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle) -" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">") + if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep + " s:NetrwBrowse: set up "safe" options for local directory/file {{{3 +" call Decho("handle w:netrw_acdkeep:") +" call Decho("keepjumps lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")") + call s:NetrwLcd(dirname) + call s:NetrwSafeOptions() +" call Decho("getcwd<".getcwd().">") - if w:netrw_liststyle == s:THINLIST - " use one column listing -" call Decho("use one column list") - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') + elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"' + " s:NetrwBrowse: looks like a remote regular file, attempt transfer {{{3 +" call Decho("attempt transfer as regular file<".dirname.">") - elseif w:netrw_liststyle == s:LONGLIST - " use long list -" call Decho("use long list") - let g:netrw_list_cmd = g:netrw_list_cmd." -l" + " remove any filetype indicator from end of dirname, except for the + " "this is a directory" indicator (/). + " There shouldn't be one of those here, anyway. + let path= substitute(dirname,'[*=@|]\r\=$','','e') +" call Decho("new path<".path.">") + call s:RemotePathAnalysis(dirname) - elseif w:netrw_liststyle == s:WIDELIST - " give wide list -" call Decho("use wide list") - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') + " s:NetrwBrowse: remote-read the requested file into current buffer {{{3 + keepj mark ' + call s:NetrwEnew(dirname) + call s:NetrwSafeOptions() + setl ma noro +" call Decho("setl ma noro") + let b:netrw_curdir = dirname + let url = s:method."://".s:user.s:machine.(s:port ? ":".s:port : "")."/".s:path +" call Decho("exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")") + exe "sil! keepj keepalt file ".fnameescape(url) + exe "sil! keepj keepalt doau BufReadPre ".fnameescape(s:fname) + sil call netrw#NetRead(2,url) + " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error +" call Decho("url<".url.">") +" call Decho("s:path<".s:path.">") +" call Decho("s:fname<".s:fname.">") + if s:path =~ '.bz2' + exe "sil keepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.bz2$','','')) + elseif s:path =~ '.gz' + exe "sil keepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.gz$','','')) + elseif s:path =~ '.gz' + exe "sil keepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.txz$','','')) + else + exe "sil keepj keepalt doau BufReadPost ".fnameescape(s:fname) + endif - elseif w:netrw_liststyle == s:TREELIST -" call Decho("use tree list") - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') + " s:NetrwBrowse: save certain window-oriented variables into buffer-oriented variables {{{3 + call s:SetBufWinVars() + call s:NetrwOptionRestore("w:") +" call Decho("setl ma nomod") + setl ma nomod +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") - else - keepj call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46) - let g:netrw_liststyle = s:THINLIST - let w:netrw_liststyle = g:netrw_liststyle - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') +" call Dret("s:NetrwBrowse : file<".s:fname.">") + return endif - setl ma noro -" call Decho("setl ma noro") - - " clear buffer - this will cause NetrwBrowse/LocalBrowseCheck to do a refresh -" call Decho("clear buffer<".expand("%")."> with :%d") - sil! keepj %d - " following prevents tree listing buffer from being marked "modified" -" call Decho("(NetrwListStyle) setl nomod") - setl nomod -" call Decho("(NetrwListStyle) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") - " refresh the listing -" call Decho("(NetrwListStyle) refresh the listing") - let svpos= netrw#NetrwSavePosn() - keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) - keepj call s:NetrwCursor() + " use buffer-oriented WinVars if buffer variables exist but associated window variables don't {{{3 + call s:UseBufWinVars() - " keep cursor on the filename - sil! keepj $ - let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') -" call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A')) - if result <= 0 && exists("w:netrw_bannercnt") - exe "sil! keepj ".w:netrw_bannercnt - endif - let @@= ykeep + " set up some variables {{{3 + let b:netrw_browser_active = 1 + let dirname = dirname + let s:last_sort_by = g:netrw_sort_by -" call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : "")) -endfun + " set up menu {{{3 + keepj call s:NetrwMenu(1) -" --------------------------------------------------------------------- -" s:NetrwBannerCtrl: toggles the display of the banner {{{2 -fun! s:NetrwBannerCtrl(islocal) -" call Dfunc("s:NetrwBannerCtrl(islocal=".a:islocal.") g:netrw_banner=".g:netrw_banner) - - let ykeep= @@ - " toggle the banner (enable/suppress) - let g:netrw_banner= !g:netrw_banner - - " refresh the listing - let svpos= netrw#NetrwSavePosn() - call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - - " keep cursor on the filename - let fname= s:NetrwGetWord() - sil keepj $ - let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') -" call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A')) - if result <= 0 && exists("w:netrw_bannercnt") - exe "keepj ".w:netrw_bannercnt + " get/set-up buffer {{{3 + let reusing= s:NetrwGetBuffer(a:islocal,dirname) + " maintain markfile highlighting + if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" +" call Decho("bufnr(%)=".bufnr('%')) +" call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/") + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" + else +" call Decho("2match none") + 2match none endif - let @@= ykeep -" call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner) -endfun - -" --------------------------------------------------------------------- -" s:NetrwBookmarkMenu: Uses menu priorities {{{2 -" .2.[cnt] for bookmarks, and -" .3.[cnt] for history -" (see s:NetrwMenu()) -fun! s:NetrwBookmarkMenu() - if !exists("s:netrw_menucnt") + if reusing && line("$") > 1 + call s:NetrwOptionRestore("w:") +" call Decho("setl noma nomod nowrap") + setl noma nomod nowrap +" call Decho("(set noma nomod nowrap) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Dret("s:NetrwBrowse : re-using buffer") return endif -" call Dfunc("NetrwBookmarkMenu() histcnt=".g:netrw_dirhist_cnt." menucnt=".s:netrw_menucnt) - " the following test assures that gvim is running, has menus available, and has menus enabled. - if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu - if exists("g:NetrwTopLvlMenu") -" call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)") - exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks' - exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete' - endif - if !exists("s:netrw_initbookhist") - call s:NetrwBookHistRead() + " set b:netrw_curdir to the new directory name {{{3 +" call Decho("set b:netrw_curdir to the new directory name<".dirname."> (buf#".bufnr("%").")") + let b:netrw_curdir= dirname + if b:netrw_curdir =~ '[/\\]$' + let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e') + endif + if b:netrw_curdir =~ '\a:$' && (has("win32") || has("win95") || has("win64") || has("win16")) + let b:netrw_curdir= b:netrw_curdir."/" + endif + if b:netrw_curdir == '' + if has("amiga") + " On the Amiga, the empty string connotes the current directory + let b:netrw_curdir= getcwd() + else + " under unix, when the root directory is encountered, the result + " from the preceding substitute is an empty string. + let b:netrw_curdir= '/' endif + endif + if !a:islocal && b:netrw_curdir !~ '/$' + let b:netrw_curdir= b:netrw_curdir.'/' + endif +" call Decho("b:netrw_curdir<".b:netrw_curdir.">") - " show bookmarked places - if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0 - let cnt= 1 - for bmd in g:netrw_bookmarklist - let ebmd= escape(bmd,g:netrw_menu_escape) -" call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.ebmd.' :e '.bmd) + " ------------ + " (local only) {{{3 + " ------------ + if a:islocal +" call Decho("local only:") - " show bookmarks for goto menu - exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.ebmd.' :e '.bmd."\" + " Set up ShellCmdPost handling. Append current buffer to browselist + call s:LocalFastBrowser() - " show bookmarks for deletion menu - exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.ebmd.' '.cnt."mB" - let cnt= cnt + 1 - endfor + " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3 + if !g:netrw_keepdir +" call Decho("handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) +" call Decho("l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist")) + if !exists("&l:acd") || !&l:acd + call s:NetrwLcd(b:netrw_curdir) + endif + endif + + " -------------------------------- + " remote handling: {{{3 + " -------------------------------- + else +" call Decho("remote only:") + " analyze dirname and g:netrw_list_cmd {{{3 +" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">") + if dirname =~ "^NetrwTreeListing\>" + let dirname= b:netrw_curdir +" call Decho("(dirname was ) dirname<".dirname.">") + elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") + let dirname= substitute(b:netrw_curdir,'\\','/','g') + if dirname !~ '/$' + let dirname= dirname.'/' + endif + let b:netrw_curdir = dirname +" call Decho("(liststyle is TREELIST) dirname<".dirname.">") + else + let dirname = substitute(dirname,'\\','/','g') +" call Decho("(normal) dirname<".dirname.">") endif - " show directory browsing history - if g:netrw_dirhistmax > 0 - let cnt = g:netrw_dirhist_cnt - let first = 1 - let histcnt = 0 - while ( first || cnt != g:netrw_dirhist_cnt ) - let histcnt = histcnt + 1 - let priority = g:netrw_dirhist_cnt + histcnt - if exists("g:netrw_dirhist_{cnt}") - let histdir= escape(g:netrw_dirhist_{cnt},g:netrw_menu_escape) -" call Decho('sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir) - exe 'sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir."\" - endif - let first = 0 - let cnt = ( cnt - 1 ) % g:netrw_dirhistmax - if cnt < 0 - let cnt= cnt + g:netrw_dirhistmax - endif - endwhile + let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$' + if dirname !~ dirpat + if !exists("g:netrw_quiet") + keepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20) + endif + keepj call s:NetrwOptionRestore("w:") +" call Decho("setl noma nomod nowrap") + setl noma nomod nowrap +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">") + return endif + let b:netrw_curdir= dirname +" call Decho("b:netrw_curdir<".b:netrw_curdir."> (remote)") + endif " (additional remote handling) + " ----------------------- + " Directory Listing: {{{3 + " ----------------------- + keepj call s:NetrwMaps(a:islocal) + keepj call s:NetrwCommands(a:islocal) + keepj call s:PerformListing(a:islocal) + if v:version >= 700 && has("balloon_eval") && &beval == 0 && &l:bexpr == "" && !exists("g:netrw_nobeval") + let &l:bexpr= "netrw#BalloonHelp()" +" call Decho("set up balloon help: l:bexpr=".&l:bexpr) + setl beval endif -" call Dret("NetrwBookmarkMenu") + call s:NetrwOptionRestore("w:") + + " The s:LocalBrowseRefresh() function is called by an autocmd + " installed by s:LocalFastBrowser() when g:netrw_fastbrowse <= 1 (ie. slow, medium speed). + " However, s:NetrwBrowse() causes the FocusGained event to fire the firstt time. + +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Dret("s:NetrwBrowse : did PerformListing ft<".&ft.">") + return endfun " --------------------------------------------------------------------- -" s:NetrwBrowseChgDir: constructs a new directory based on the current {{{2 -" directory and a new directory name. Also, if the -" "new directory name" is actually a file, -" NetrwBrowseChgDir() edits the file. -fun! s:NetrwBrowseChgDir(islocal,newdir,...) -" call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">") - +" s:NetrwFileInfo: supports qf (query for file information) {{{2 +fun! s:NetrwFileInfo(islocal,fname) +" call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">) b:netrw_curdir<".b:netrw_curdir.">") let ykeep= @@ - if !exists("b:netrw_curdir") - " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called - " and the current window is the NetrwMessage window. - let @@= ykeep -" call Decho("(NetrwBrowseChgDir) b:netrw_curdir doesn't exist!") -" call Decho("(NetrwBrowseChgDir) getcwd<".getcwd().">") -" call Dret("s:NetrwBrowseChgDir") - return - endif + if a:islocal + if (has("unix") || has("macunix")) && executable("/bin/ls") - " NetrwBrowseChgDir: save options and initialize {{{3 - keepj call s:NetrwOptionSave("s:") - keepj call s:NetrwSafeOptions() - let nbcd_curpos = netrw#NetrwSavePosn() - let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos -" call Decho("(NetrwBrowseChgDir) setting s:nbcd_curpos_".bufnr('%')." to SavePosn") - if (has("win32") || has("win95") || has("win64") || has("win16")) - let dirname = substitute(b:netrw_curdir,'\\','/','ge') - else - let dirname= b:netrw_curdir - endif - let newdir = a:newdir - let dolockout = 0 + if getline(".") == "../" + echo system("/bin/ls -lsad ".shellescape("..")) +" call Decho("#1: echo system(/bin/ls -lsad ".shellescape(..).")") + + elseif w:netrw_liststyle == s:TREELIST && getline(".") !~ '^'.s:treedepthstring + echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir)) +" call Decho("#2: echo system(/bin/ls -lsad ".shellescape(b:netrw_curdir).")") - " set up o/s-dependent directory recognition pattern - if has("amiga") - let dirpat= '[\/:]$' + elseif exists("b:netrw_curdir") + if b:netrw_curdir =~ '/$' + echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname)) +" call Decho("#3: echo system(/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname).")") + + else + echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname)) +" call Decho("#4: echo system(/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname).")") + endif + + else +" call Decho('using ls '.a:fname." using cwd<".getcwd().">") + echo system("/bin/ls -lsad ".shellescape(a:fname)) +" call Decho("#5: echo system(/bin/ls -lsad ".shellescape(a:fname).")") + endif + else + " use vim functions to return information about file below cursor +" call Decho("using vim functions to query for file info") + if !isdirectory(a:fname) && !filereadable(a:fname) && a:fname =~ '[*@/]' + let fname= substitute(a:fname,".$","","") + else + let fname= a:fname + endif + let t = getftime(fname) + let sz = getfsize(fname) + echo a:fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(fname)) +" call Decho("fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(fname))) + endif else - let dirpat= '[\/]$' + echo "sorry, \"qf\" not supported yet for remote files" endif -" call Decho("(NetrwBrowseChgDir) dirname<".dirname."> dirpat<".dirpat.">") + let @@= ykeep +" call Dret("s:NetrwFileInfo") +endfun - if dirname !~ dirpat - " apparently vim is "recognizing" that it is in a directory and - " is removing the trailing "/". Bad idea, so let's put it back. - let dirname= dirname.'/' -" call Decho("(NetrwBrowseChgDir) adjusting dirname<".dirname.">") - endif +" --------------------------------------------------------------------- +" s:NetrwGetBuffer: {{{2 +" returns 0=cleared buffer +" 1=re-used buffer +fun! s:NetrwGetBuffer(islocal,dirname) +" call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) + let dirname= a:dirname - if newdir !~ dirpat - " ------------------------------ - " NetrwBrowseChgDir: edit a file {{{3 - " ------------------------------ -" call Decho('(NetrwBrowseChgDir:edit-a-file) case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">") + " re-use buffer if possible {{{3 +" call Decho("--re-use a buffer if possible--") + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + " find NetrwTreeList buffer if there is one +" call Decho("case liststyle=treelist: find NetrwTreeList buffer if there is one") + if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 0 +" call Decho(" re-using w:netrw_treebufnr=".w:netrw_treebufnr) + let eikeep= &ei + setl ei=all + exe "sil! keepalt b ".w:netrw_treebufnr + let &ei= eikeep + setl ma + sil! keepj %d +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dret("s:NetrwGetBuffer 0 : bufnum#".w:netrw_treebufnr."") + return 0 + endif + let bufnum= -1 +" call Decho(" liststyle=TREE but w:netrw_treebufnr doesn't exist") - " save position for benefit of Rexplore - let s:rexposn_{bufnr("%")}= netrw#NetrwSavePosn() + else + " find buffer number of buffer named precisely the same as dirname {{{3 +" call Decho("case listtyle not treelist: find buffer numnber of buffer named precisely the same as dirname--") +" call Dredir("(NetrwGetBuffer) ls!","ls!") -" call Decho("(NetrwBrowseChgDir:edit-a-file) setting s:rexposn_".bufnr("%")." to SavePosn") - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)' - let dirname= s:NetrwTreeDir() - if dirname =~ '/$' - let dirname= dirname.newdir - else - let dirname= s:NetrwTreeDir()."/".newdir + " get dirname and associated buffer number + let bufnum = bufnr(escape(dirname,'\')) +" call Decho(" find buffer<".dirname.">'s number ") +" call Decho(" bufnr(dirname<".escape(dirname,'\').">)=".bufnum) + + if bufnum < 0 && dirname !~ '/$' + " try appending a trailing / +" call Decho(" try appending a trailing / to dirname<".dirname.">") + let bufnum= bufnr(escape(dirname.'/','\')) + if bufnum > 0 + let dirname= dirname.'/' endif -" call Decho("(NetrwBrowseChgDir:edit-a-file) dirname<".dirname.">") -" call Decho("(NetrwBrowseChgDir:edit-a-file) tree listing") - elseif newdir =~ '^\(/\|\a:\)' - let dirname= newdir - else - let dirname= s:ComposePath(dirname,newdir) endif -" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file: dirname<".dirname."> (a:0=".a:0.")") - " this lets NetrwBrowseX avoid the edit - if a:0 < 1 -" call Decho("(NetrwBrowseChgDir:edit-a-file) set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist")) - keepj call s:NetrwOptionRestore("s:") - if !exists("s:didsplit") -" call Decho("(NetrwBrowseChgDir:edit-a-file) s:didsplit does not exist; g:netrw_browse_split=".g:netrw_browse_split." win#".winnr()) - if g:netrw_browse_split == 1 - " horizontally splitting the window first - keepalt new - if !&ea - keepalt wincmd _ - endif - elseif g:netrw_browse_split == 2 - " vertically splitting the window first - keepalt rightb vert new - if !&ea - keepalt wincmd | - endif - elseif g:netrw_browse_split == 3 - " open file in new tab - keepalt tabnew - elseif g:netrw_browse_split == 4 - " act like "P" (ie. open previous window) - if s:NetrwPrevWinOpen(2) == 3 - let @@= ykeep -" call Dret("s:NetrwBrowseChgDir") - return - endif - else - " handling a file, didn't split, so remove menu -" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a file+didn't split, so remove menu") - call s:NetrwMenu(0) - " optional change to window - if g:netrw_chgwin >= 1 - exe "keepj keepalt ".g:netrw_chgwin."wincmd w" - endif - endif - endif - " the point where netrw actually edits the (local) file - " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will - if a:islocal -" call Decho("(NetrwBrowseChgDir:edit-a-file) edit local file: exe e! ".fnameescape(dirname)) - exe "keepj keepalt e! ".fnameescape(dirname) - call s:NetrwCursor() - else -" call Decho("(NetrwBrowseChgDir:edit-a-file) remote file: NetrwBrowse will edit it") + if bufnum < 0 && dirname =~ '/$' + " try removing a trailing / +" call Decho(" try removing a trailing / from dirname<".dirname.">") + let bufnum= bufnr(escape(substitute(dirname,'/$','',''),'\')) + if bufnum > 0 + let dirname= substitute(dirname,'/$','','') endif - let dolockout= 1 + endif - " handle g:Netrw_funcref -- call external-to-netrw functions - " This code will handle g:Netrw_funcref as an individual function reference - " or as a list of function references. It will ignore anything that's not - " a function reference. See :help Funcref for information about function references. - if exists("g:Netrw_funcref") -" call Decho("(NetrwBrowseChgDir:edit-a-file) handle optional Funcrefs") - if type(g:Netrw_funcref) == 2 -" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a g:Netrw_funcref") - keepj call g:Netrw_funcref() - elseif type(g:Netrw_funcref) == 3 -" call Decho("(NetrwBrowseChgDir:edit-a-file) handling a list of g:Netrw_funcrefs") - for Fncref in g:Netrw_funcref - if type(FncRef) == 2 - keepj call FncRef() - endif - endfor +" call Decho(" findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)") + " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/ and abc/ matches) + if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.' + " handle approximate matches +" call Decho(" handling approx match: bufnum#".bufnum.">0 AND bufname<".bufname(bufnum).">!=dirname<".dirname."> AND bufname(".bufnum.")!='.'") + let ibuf = 1 + let buflast = bufnr("$") +" call Decho(" findbuf2: buflast=bufnr($)=".buflast) + while ibuf <= buflast + let bname= substitute(bufname(ibuf),'\\','/','g') + let bname= substitute(bname,'.\zs/$','','') +" call Decho(" findbuf3: while [ibuf=",ibuf."]<=[buflast=".buflast."]: dirname<".dirname."> bname=bufname(".ibuf.")<".bname.">") + if bname != '' && dirname =~ '/'.bname.'/\=$' && dirname !~ '^/' + " bname is not empty + " dirname ends with bname, + " dirname doesn't start with /, so its not a absolute path +" call Decho(" findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/') + break + endif + if bname =~ '^'.dirname.'/\=$' + " bname begins with dirname +" call Decho(' findbuf3b: passes test 2 : bname<'.bname.'>=~^'.dirname.'/\=$') + break + endif + if dirname =~ '^'.bname.'/$' +" call Decho(' findbuf3c: passes test 3 : dirname<'.dirname.'>=~^'.bname.'/$') + break + endif + if bname != '' && dirname =~ '/'.bname.'$' && bname == bufname("%") && line("$") == 1 +" call Decho(' findbuf3d: passes test 4 : dirname<'.dirname.'>=~ /'.bname.'$') + break endif + let ibuf= ibuf + 1 + endwhile + if ibuf > buflast + let bufnum= -1 + else + let bufnum= ibuf endif +" call Decho(" findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")") endif + endif - elseif newdir =~ '^/' - " ---------------------------------------------------- - " NetrwBrowseChgDir: just go to the new directory spec {{{3 - " ---------------------------------------------------- -" call Decho('(NetrwBrowseChgDir:goto-newdir) case "just go to new directory spec": newdir<'.newdir.'>') - let dirname = newdir - keepj call s:SetRexDir(a:islocal,dirname) - keepj call s:NetrwOptionRestore("s:") - - elseif newdir == './' - " --------------------------------------------- - " NetrwBrowseChgDir: refresh the directory list {{{3 - " --------------------------------------------- -" call Decho('(NetrwBrowseChgDir:refresh-dirlist) case "refresh directory listing": newdir == "./"') - keepj call s:SetRexDir(a:islocal,dirname) - - elseif newdir == '../' - " -------------------------------------- - " NetrwBrowseChgDir: go up one directory {{{3 - " -------------------------------------- -" call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../"') - - if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") - " force a refresh -" call Decho("(NetrwBrowseChgDir:go-up) clear buffer<".expand("%")."> with :%d") -" call Decho("(NetrwBrowseChgDir:go-up) setl noro ma") - setl noro ma - keepj %d - endif - - if has("amiga") - " amiga -" call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and amiga') - if a:islocal - let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','') - let dirname= substitute(dirname,'/$','','') + " get enew buffer and name it -or- re-use buffer {{{3 +" call Decho(" get enew buffer and name it OR re-use buffer") + sil! keepj keepalt mark ' + if bufnum < 0 || !bufexists(bufnum) +" call Decho("--get enew buffer and name it (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)") + call s:NetrwEnew(dirname) +" call Decho(" got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)") + " name the buffer + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + " Got enew buffer; transform into a NetrwTreeListing +" call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --") + if !exists("s:netrw_treelistnum") + let s:netrw_treelistnum= 1 else - let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','') + let s:netrw_treelistnum= s:netrw_treelistnum + 1 endif -" call Decho("(NetrwBrowseChgDir:go-up) amiga: dirname<".dirname."> (go up one dir)") - + let w:netrw_treebufnr= bufnr("%") +" call Decho(" exe sil! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum)) + exe 'sil! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum) + setl bt=nofile noswf + nnoremap [ :sil call TreeListMove('[') + nnoremap ] :sil call TreeListMove(']') + nnoremap [[ :sil call TreeListMove('[') + nnoremap ]] :sil call TreeListMove(']') +" call Decho(" tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr) else - " unix or cygwin -" call Decho('(NetrwBrowseChgDir:go-up) case "go up one directory": newdir == "../" and unix or cygwin') - if a:islocal - let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') - if dirname == "" - let dirname= '/' - endif - else - let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') - endif -" call Decho("(NetrwBrowseChgDir:go-up) unix: dirname<".dirname."> (go up one dir)") - endif - keepj call s:SetRexDir(a:islocal,dirname) - - elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") - " -------------------------------------- - " NetrwBrowseChgDir: Handle Tree Listing {{{3 - " -------------------------------------- -" call Decho('(NetrwBrowseChgDir:tree-list) case liststyle is TREELIST and w:netrw_treedict exists') - " force a refresh (for TREELIST, wait for NetrwTreeDir() to force the refresh) -" call Decho("(NetrwBrowseChgDir) (treelist) setl noro ma") - setl noro ma - if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")) -" call Decho("(NetrwBrowseChgDir) clear buffer<".expand("%")."> with :%d") - keepj %d +" let v:errmsg= "" " Decho + let escdirname= fnameescape(dirname) +" call Decho(" errmsg<".v:errmsg."> bufnr(escdirname<".escdirname.">)=".bufnr(escdirname)." bufname()<".bufname(bufnr(escdirname)).">") +" call Decho(' exe sil! keepalt file '.escdirname) +" let v:errmsg= "" " Decho + exe 'sil! keepalt file '.escdirname +" call Decho(" errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">") endif - let treedir = s:NetrwTreeDir() - let s:treecurpos = nbcd_curpos - let haskey= 0 -" call Decho("(NetrwBrowseChgDir:tree-list) w:netrw_treedict<".string(w:netrw_treedict).">") +" call Decho(" named enew buffer#".bufnr("%")."<".bufname("%").">") - " search treedict for tree dir as-is - if has_key(w:netrw_treedict,treedir) -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : found it!') - let haskey= 1 + else " Re-use the buffer +" call Decho("--re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)") + let eikeep= &ei + setl ei=all + if getline(2) =~ '^" Netrw Directory Listing' +" call Decho(" getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum) + exe "sil! keepalt b ".bufnum else -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found') - endif - - " search treedict for treedir with a / appended - if !haskey && treedir !~ '/$' - if has_key(w:netrw_treedict,treedir."/") - let treedir= treedir."/" -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched.for treedir<'.treedir.'> found it!') - let haskey = 1 - else -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'/> : not found') - endif +" call Decho(" getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum) + exe "sil! keepalt b ".bufnum endif - - " search treedict for treedir with any trailing / elided - if !haskey && treedir =~ '/$' - let treedir= substitute(treedir,'/$','','') - if has_key(w:netrw_treedict,treedir) -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched.for treedir<'.treedir.'> found it!') - let haskey = 1 - else -" call Decho('(NetrwBrowseChgDir:tree-list) ....searched for treedir<'.treedir.'> : not found') - endif + if bufname("%") == '.' +" call Decho("exe sil! keepalt file ".fnameescape(getcwd())) + exe "sil! keepalt file ".fnameescape(getcwd()) endif - - if haskey - " close tree listing for selected subdirectory -" call Decho("(NetrwBrowseChgDir:tree-list) closing selected subdirectory<".dirname.">") - call remove(w:netrw_treedict,treedir) -" call Decho("(NetrwBrowseChgDir) removed entry<".treedir."> from treedict") -" call Decho("(NetrwBrowseChgDir) yielding treedict<".string(w:netrw_treedict).">") - let dirname= w:netrw_treetop + let &ei= eikeep + if line("$") <= 1 + keepj call s:NetrwListSettings(a:islocal) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it") + return 0 + elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1) + keepj call s:NetrwListSettings(a:islocal) + sil keepj %d +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but refreshing due to g:netrw_fastbrowse=".g:netrw_fastbrowse) + return 0 + elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST +" call Decho("--re-use tree listing--") +" call Decho(" clear buffer<".expand("%")."> with :%d") + sil keepj %d + keepj call s:NetrwListSettings(a:islocal) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh") + return 0 else - " go down one directory - let dirname= substitute(treedir,'/*$','/','') -" call Decho("(NetrwBrowseChgDir:tree-list) go down one dir: treedir<".treedir.">") +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dret("s:NetrwGetBuffer 1 : buf#".bufnr("%")) + return 1 endif - keepj call s:SetRexDir(a:islocal,dirname) - let s:treeforceredraw = 1 - - else - " ---------------------------------------- - " NetrwBrowseChgDir: Go down one directory {{{3 - " ---------------------------------------- - let dirname = s:ComposePath(dirname,newdir) -" call Decho("(NetrwBrowseChgDir:go-down) go down one dir: dirname<".dirname."> newdir<".newdir.">") - keepj call s:SetRexDir(a:islocal,dirname) endif - " -------------------------------------- - " NetrwBrowseChgDir: Restore and Cleanup {{{3 - " -------------------------------------- - keepj call s:NetrwOptionRestore("s:") - if dolockout -" call Decho("(NetrwBrowseChgDir:restore) filewritable(dirname<".dirname.">)=".filewritable(dirname)) - if filewritable(dirname) -" call Decho("(NetrwBrowseChgDir:restore) doing modification lockout settings: ma nomod noro") -" call Decho("(NetrwBrowseChgDir:restore) setl ma nomod noro") - setl ma nomod noro -" call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") - else -" call Decho("(NetrwBrowseChgDir:restore) doing modification lockout settings: ma nomod ro") -" call Decho("(NetrwBrowseChgDir:restore) setl ma nomod noro") - setl ma nomod ro -" call Decho("(NetrwBrowseChgDir:restore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") - endif - endif - let @@= ykeep + " do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc {{{3 + " fastbrowse Local Remote Hiding a buffer implies it may be re-used (fast) + " slow 0 D D Deleting a buffer implies it will not be re-used (slow) + " med 1 D H + " fast 2 H H +" call Decho("--do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--") + let fname= expand("%") + keepj call s:NetrwListSettings(a:islocal) +" call Decho("exe sil! keepalt file ".fnameescape(fname)) + exe "sil! keepj keepalt file ".fnameescape(fname) -" call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">") - return dirname + " delete all lines from buffer {{{3 +" call Decho("--delete all lines from buffer--") +" call Decho(" clear buffer<".expand("%")."> with :%d") + sil! keepalt keepj %d + +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dret("s:NetrwGetBuffer 0 : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")) + return 0 endfun " --------------------------------------------------------------------- -" s:NetrwBrowseX: (implements "x") executes a special "viewer" script or program for the {{{2 -" given filename; typically this means given their extension. -" 0=local, 1=remote -fun! netrw#NetrwBrowseX(fname,remote) -" call Dfunc("NetrwBrowseX(fname<".a:fname."> remote=".a:remote.")") - - let ykeep = @@ - let screenposn = netrw#NetrwSavePosn() - - " special core dump handler - if a:fname =~ '/core\(\.\d\+\)\=$' - if exists("g:Netrw_corehandler") - if type(g:Netrw_corehandler) == 2 - " g:Netrw_corehandler is a function reference (see :help Funcref) -" call Decho("g:Netrw_corehandler is a funcref") - call g:Netrw_corehandler(a:fname) - elseif type(g:Netrw_corehandler) == 3 - " g:Netrw_corehandler is a List of function references (see :help Funcref) -" call Decho("g:Netrw_corehandler is a List") - for Fncref in g:Netrw_corehandler - if type(FncRef) == 2 - call FncRef(a:fname) - endif - endfor - endif - call netrw#NetrwRestorePosn(screenposn) - let @@= ykeep -" call Dret("NetrwBrowseX : coredump handler invoked") - return - endif +" s:NetrwGetcwd: get the current directory. {{{2 +" Change backslashes to forward slashes, if any. +" If doesc is true, escape certain troublesome characters +fun! s:NetrwGetcwd(doesc) +" call Dfunc("NetrwGetcwd(doesc=".a:doesc.")") + let curdir= substitute(getcwd(),'\\','/','ge') + if curdir !~ '[\/]$' + let curdir= curdir.'/' endif - - " set up the filename - " (lower case the extension, make a local copy of a remote file) - let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e') - if has("win32") || has("win95") || has("win64") || has("win16") - let exten= substitute(exten,'^.*$','\L&\E','') + if a:doesc + let curdir= fnameescape(curdir) endif -" call Decho("exten<".exten.">") +" call Dret("NetrwGetcwd <".curdir.">") + return curdir +endfun - " seems kde systems often have gnome-open due to dependencies, even though - " gnome-open's subsidiary display tools are largely absent. Kde systems - " usually have "kdeinit" running, though... (tnx Mikolaj Machowski) - if !exists("s:haskdeinit") - if has("unix") && executable("ps") && !has("win32unix") - let s:haskdeinit= system("ps -e") =~ 'kdeinit' - if v:shell_error - let s:haskdeinit = 0 - endif - else - let s:haskdeinit= 0 - endif -" call Decho("setting s:haskdeinit=".s:haskdeinit) - endif +" --------------------------------------------------------------------- +" s:NetrwGetWord: it gets the directory/file named under the cursor {{{2 +fun! s:NetrwGetWord() +" call Dfunc("s:NetrwGetWord() line#".line(".")." liststyle=".g:netrw_liststyle." virtcol=".virtcol(".")) + call s:UseBufWinVars() - if a:remote == 1 - " create a local copy -" call Decho("(remote) a:remote=".a:remote.": create a local copy of <".a:fname.">") - setl bh=delete - call netrw#NetRead(3,a:fname) - " attempt to rename tempfile - let basename= substitute(a:fname,'^\(.*\)/\(.*\)\.\([^.]*\)$','\2','') - let newname = substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','') -" call Decho("basename<".basename.">") -" call Decho("newname <".newname.">") - if rename(s:netrw_tmpfile,newname) == 0 - " renaming succeeded - let fname= newname + " insure that w:netrw_liststyle is set up + if !exists("w:netrw_liststyle") + if exists("g:netrw_liststyle") + let w:netrw_liststyle= g:netrw_liststyle else - " renaming failed - let fname= s:netrw_tmpfile - endif - else -" call Decho("(local) a:remote=".a:remote.": handling local copy of <".a:fname.">") - let fname= a:fname - " special ~ handler for local - if fname =~ '^\~' && expand("$HOME") != "" -" call Decho('invoking special ~ handler') - let fname= substitute(fname,'^\~',expand("$HOME"),'') + let w:netrw_liststyle= s:THINLIST endif +" call Decho("w:netrw_liststyle=".w:netrw_liststyle) endif -" call Decho("fname<".fname.">") -" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten)) - " set up redirection - if &srr =~ "%s" - if (has("win32") || has("win95") || has("win64") || has("win16")) - let redir= substitute(&srr,"%s","nul","") - else - let redir= substitute(&srr,"%s","/dev/null","") - endif - elseif (has("win32") || has("win95") || has("win64") || has("win16")) - let redir= &srr . "nul" - else - let redir= &srr . "/dev/null" - endif -" call Decho("set up redirection: redir{".redir."} srr{".&srr."}") + if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt + " Active Banner support +" call Decho("active banner handling") + keepj norm! 0 + let dirname= "./" + let curline= getline('.') - " extract any viewing options. Assumes that they're set apart by quotes. -" call Decho("extract any viewing options") - if exists("g:netrw_browsex_viewer") -" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") - if g:netrw_browsex_viewer =~ '\s' - let viewer = substitute(g:netrw_browsex_viewer,'\s.*$','','') - let viewopt = substitute(g:netrw_browsex_viewer,'^\S\+\s*','','')." " - let oviewer = '' - let cnt = 1 - while !executable(viewer) && viewer != oviewer - let viewer = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\1','') - let viewopt = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\3','')." " - let cnt = cnt + 1 - let oviewer = viewer -" call Decho("!exe: viewer<".viewer."> viewopt<".viewopt.">") - endwhile - else - let viewer = g:netrw_browsex_viewer - let viewopt = "" - endif -" call Decho("viewer<".viewer."> viewopt<".viewopt.">") - endif + if curline =~ '"\s*Sorted by\s' + keepj norm s + let s:netrw_skipbrowse= 1 + echo 'Pressing "s" also works' - " execute the file handler -" call Decho("execute the file handler (if any)") - if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-' -" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") - let ret= netrwFileHandlers#Invoke(exten,fname) + elseif curline =~ '"\s*Sort sequence:' + let s:netrw_skipbrowse= 1 + echo 'Press "S" to edit sorting sequence' - elseif exists("g:netrw_browsex_viewer") && executable(viewer) -" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") -" call Decho("exe sil !".viewer." ".viewopt.shellescape(fname,1).redir) - exe "sil !".viewer." ".viewopt.shellescape(fname,1).redir - let ret= v:shell_error + elseif curline =~ '"\s*Quick Help:' + keepj norm ? + let s:netrw_skipbrowse= 1 + echo 'Pressing "?" also works' - elseif has("win32") || has("win64") -" call Decho("windows") - if executable("start") -" call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) - exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) - elseif executable("rundll32") -" call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) - exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) - else - call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) - endif - call inputsave()|call input("Press to continue")|call inputrestore() - let ret= v:shell_error + elseif curline =~ '"\s*\%(Hiding\|Showing\):' + keepj norm a + let s:netrw_skipbrowse= 1 + echo 'Pressing "a" also works' - elseif has("win32unix") - let winfname= 'c:\cygwin'.substitute(fname,'/','\\','g') -" call Decho("cygwin: winfname<".shellescape(winfname,1).">") - if executable("start") -" call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)) - exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1) - elseif executable("rundll32") -" call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)) - exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1) - else - call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) + elseif line("$") > w:netrw_bannercnt + exe 'sil keepj '.w:netrw_bannercnt endif - call inputsave()|call input("Press to continue")|call inputrestore() - let ret= v:shell_error - elseif has("unix") && executable("xdg-open") && !s:haskdeinit -" call Decho("unix and xdg-open") -" call Decho("exe sil !xdg-open ".shellescape(fname,1)." ".redir) - exe "sil !xdg-open ".shellescape(fname,1).redir - let ret= v:shell_error + elseif w:netrw_liststyle == s:THINLIST +" call Decho("thin column handling") + keepj norm! 0 + let dirname= getline('.') - elseif has("unix") && executable("kfmclient") && s:haskdeinit -" call Decho("unix and kfmclient") -" call Decho("exe sil !kfmclient exec ".shellescape(fname,1)." ".redir) - exe "sil !kfmclient exec ".shellescape(fname,1)." ".redir - let ret= v:shell_error + elseif w:netrw_liststyle == s:LONGLIST +" call Decho("long column handling") + keepj norm! 0 + let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e') - elseif has("macunix") && executable("open") -" call Decho("macunix and open") -" call Decho("exe sil !open ".shellescape(fname,1)." ".redir) - exe "sil !open ".shellescape(fname,1)." ".redir - let ret= v:shell_error + elseif w:netrw_liststyle == s:TREELIST +" call Decho("treelist handling") + let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e') else - " netrwFileHandlers#Invoke() always returns 0 - let ret= netrwFileHandlers#Invoke(exten,fname) - endif +" call Decho("obtain word from wide listing") + let dirname= getline('.') - " if unsuccessful, attempt netrwFileHandlers#Invoke() - if ret - let ret= netrwFileHandlers#Invoke(exten,fname) + if !exists("b:netrw_cpf") + let b:netrw_cpf= 0 + exe 'sil keepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' + call histdel("/",-1) +" call Decho("computed cpf=".b:netrw_cpf) + endif + +" call Decho("buf#".bufnr("%")."<".bufname("%").">") + let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf +" call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart." bannercnt=".w:netrw_bannercnt) +" call Decho("1: dirname<".dirname.">") + if filestart == 0 + keepj norm! 0ma + else + call cursor(line("."),filestart+1) + keepj norm! ma + endif + let rega= @a + let eofname= filestart + b:netrw_cpf + 1 + if eofname <= col("$") + call cursor(line("."),filestart+b:netrw_cpf+1) + keepj norm! "ay`a + else + keepj norm! "ay$ + endif + let dirname = @a + let @a = rega +" call Decho("2: dirname<".dirname.">") + let dirname= substitute(dirname,'\s\+$','','e') +" call Decho("3: dirname<".dirname.">") endif - " restoring redraw! after external file handlers - redraw! + " symlinks are indicated by a trailing "@". Remove it before further processing. + let dirname= substitute(dirname,"@$","","") - " cleanup: remove temporary file, - " delete current buffer if success with handler, - " return to prior buffer (directory listing) - " Feb 12, 2008: had to de-activiate removal of - " temporary file because it wasn't getting seen. -" if a:remote == 1 && fname != a:fname -"" call Decho("deleting temporary file<".fname.">") -" call s:NetrwDelete(fname) -" endif - - if a:remote == 1 - setl bh=delete bt=nofile - if g:netrw_use_noswf - setl noswf - endif - exe "sil! keepj norm! \" -" redraw! - endif - call netrw#NetrwRestorePosn(screenposn) - let @@= ykeep + " executables are indicated by a trailing "*". Remove it before further processing. + let dirname= substitute(dirname,"\*$","","") -" call Dret("NetrwBrowseX") +" call Dret("s:NetrwGetWord <".dirname.">") + return dirname endfun " --------------------------------------------------------------------- -" s:NetrwChgPerm: (implements "gp") change file permission {{{2 -fun! s:NetrwChgPerm(islocal,curdir) -" call Dfunc("s:NetrwChgPerm(islocal=".a:islocal." curdir<".a:curdir.">)") - let ykeep = @@ - call inputsave() - let newperm= input("Enter new permission: ") - call inputrestore() - let chgperm= substitute(g:netrw_chgperm,'\',shellescape(expand("")),'') - let chgperm= substitute(chgperm,'\',shellescape(newperm),'') -" call Decho("chgperm<".chgperm.">") - call system(chgperm) - if v:shell_error != 0 - keepj call netrw#ErrorMsg(1,"changing permission on file<".expand("")."> seems to have failed",75) +" s:NetrwListSettings: make standard settings for a netrw listing {{{2 +fun! s:NetrwListSettings(islocal) +" call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")") +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) + let fname= bufname("%") +" call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro") + setl bt=nofile nobl ma nonu nowrap noro +" call Decho("(NetrwListSettings) exe sil! keepalt file ".fnameescape(fname)) + exe "sil! keepalt file ".fnameescape(fname) + if g:netrw_use_noswf + setl noswf endif - if a:islocal - keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) +" call Dredir("ls!") +" call Decho("(NetrwListSettings) exe setl ts=".(g:netrw_maxfilenamelen+1)) + exe "setl ts=".(g:netrw_maxfilenamelen+1) + setl isk+=.,~,- + if g:netrw_fastbrowse > a:islocal + setl bh=hide + else + setl bh=delete endif - let @@= ykeep -" call Dret("s:NetrwChgPerm") +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dret("s:NetrwListSettings") endfun " --------------------------------------------------------------------- -" s:NetrwClearExplore: clear explore variables (if any) {{{2 -fun! s:NetrwClearExplore() -" call Dfunc("s:NetrwClearExplore()") - 2match none - if exists("s:explore_match") |unlet s:explore_match |endif - if exists("s:explore_indx") |unlet s:explore_indx |endif - if exists("s:netrw_explore_prvdir") |unlet s:netrw_explore_prvdir |endif - if exists("s:dirstarstar") |unlet s:dirstarstar |endif - if exists("s:explore_prvdir") |unlet s:explore_prvdir |endif - if exists("w:netrw_explore_indx") |unlet w:netrw_explore_indx |endif - if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif - if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif - if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif -" redraw! - echo " " - echo " " -" call Dret("s:NetrwClearExplore") -endfun +" s:NetrwListStyle: {{{2 +" islocal=0: remote browsing +" =1: local browsing +fun! s:NetrwListStyle(islocal) +" call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle) + let ykeep = @@ + let fname = s:NetrwGetWord() + if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif + let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST +" call Decho("fname<".fname.">") +" call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle) +" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">") -" --------------------------------------------------------------------- -" s:NetrwExploreListUniq: {{{2 -fun! s:NetrwExploreListUniq(explist) -" call Dfunc("s:NetrwExploreListUniq(explist<".string(a:explist).">)") + if w:netrw_liststyle == s:THINLIST + " use one column listing +" call Decho("use one column list") + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') - " this assumes that the list is already sorted - let newexplist= [] - for member in a:explist - if !exists("uniqmember") || member != uniqmember - let uniqmember = member - let newexplist = newexplist + [ member ] - endif - endfor + elseif w:netrw_liststyle == s:LONGLIST + " use long list +" call Decho("use long list") + let g:netrw_list_cmd = g:netrw_list_cmd." -l" -" call Dret("s:NetrwExploreListUniq newexplist<".string(newexplist).">") - return newexplist -endfun + elseif w:netrw_liststyle == s:WIDELIST + " give wide list +" call Decho("use wide list") + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') -" --------------------------------------------------------------------- -" s:NetrwForceChgDir: (gd support) Force treatment as a directory {{{2 -fun! s:NetrwForceChgDir(islocal,newdir) -" call Dfunc("s:NetrwForceChgDir(islocal=".a:islocal." newdir<".a:newdir.">)") - let ykeep= @@ - if a:newdir !~ '/$' - " ok, looks like force is needed to get directory-style treatment - if a:newdir =~ '@$' - let newdir= substitute(a:newdir,'@$','/','') - elseif a:newdir =~ '[*=|\\]$' - let newdir= substitute(a:newdir,'.$','/','') - else - let newdir= a:newdir.'/' - endif -" call Decho("adjusting newdir<".newdir."> due to gd") - else - " should already be getting treatment as a directory - let newdir= a:newdir - endif - let newdir= s:NetrwBrowseChgDir(a:islocal,newdir) - call s:NetrwBrowse(a:islocal,newdir) - let @@= ykeep -" call Dret("s:NetrwForceChgDir") -endfun + elseif w:netrw_liststyle == s:TREELIST +" call Decho("use tree list") + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') -" --------------------------------------------------------------------- -" s:NetrwForceFile: (gf support) Force treatment as a file {{{2 -fun! s:NetrwForceFile(islocal,newfile) -" call Dfunc("s:NetrwForceFile(islocal=".a:islocal." newdir<".a:newfile.">)") - if a:newfile =~ '[/@*=|\\]$' - let newfile= substitute(a:newfile,'.$','','') else - let newfile= a:newfile + keepj call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46) + let g:netrw_liststyle = s:THINLIST + let w:netrw_liststyle = g:netrw_liststyle + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') endif - if a:islocal - call s:NetrwBrowseChgDir(a:islocal,newfile) - else - call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,newfile)) + setl ma noro +" call Decho("setl ma noro") + + " clear buffer - this will cause NetrwBrowse/LocalBrowseCheck to do a refresh +" call Decho("clear buffer<".expand("%")."> with :%d") + sil! keepj %d + " following prevents tree listing buffer from being marked "modified" +" call Decho("setl nomod") + setl nomod +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + + " refresh the listing +" call Decho("refresh the listing") + let svpos= netrw#SavePosn() + keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) + keepj call netrw#RestorePosn(svpos) + keepj call s:NetrwCursor() + + " keep cursor on the filename + sil! keepj $ + let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') +" call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A')) + if result <= 0 && exists("w:netrw_bannercnt") + exe "sil! keepj ".w:netrw_bannercnt endif -" call Dret("s:NetrwForceFile") + let @@= ykeep + +" call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : "")) endfun " --------------------------------------------------------------------- -" s:NetrwHide: this function is invoked by the "a" map for browsing {{{2 -" and switches the hiding mode. The actual hiding is done by -" s:NetrwListHide(). -" g:netrw_hide= 0: show all -" 1: show not-hidden files -" 2: show hidden files only -fun! s:NetrwHide(islocal) -" call Dfunc("NetrwHide(islocal=".a:islocal.") g:netrw_hide=".g:netrw_hide) - let ykeep= @@ - let svpos= netrw#NetrwSavePosn() - - if exists("s:netrwmarkfilelist_{bufnr('%')}") -" call Decho(((g:netrw_hide == 1)? "unhide" : "hide")." files in markfilelist<".string(s:netrwmarkfilelist_{bufnr("%")}).">") -" call Decho("g:netrw_list_hide<".g:netrw_list_hide.">") +" s:NetrwBannerCtrl: toggles the display of the banner {{{2 +fun! s:NetrwBannerCtrl(islocal) +" call Dfunc("s:NetrwBannerCtrl(islocal=".a:islocal.") g:netrw_banner=".g:netrw_banner) - " hide the files in the markfile list - for fname in s:netrwmarkfilelist_{bufnr("%")} -" call Decho("match(g:netrw_list_hide<".g:netrw_list_hide.'> fname<\<'.fname.'\>>)='.match(g:netrw_list_hide,'\<'.fname.'\>')." l:isk=".&l:isk) - if match(g:netrw_list_hide,'\<'.fname.'\>') != -1 - " remove fname from hiding list - let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','') - let g:netrw_list_hide= substitute(g:netrw_list_hide,',,',',','g') - let g:netrw_list_hide= substitute(g:netrw_list_hide,'^,\|,$','','') -" call Decho("unhide: g:netrw_list_hide<".g:netrw_list_hide.">") - else - " append fname to hiding list - if exists("g:netrw_list_hide") && g:netrw_list_hide != "" - let g:netrw_list_hide= g:netrw_list_hide.',\<'.escape(fname,g:netrw_fname_escape).'\>' - else - let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>' - endif -" call Decho("hide: g:netrw_list_hide<".g:netrw_list_hide.">") - endif - endfor - keepj call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) - let g:netrw_hide= 1 + let ykeep= @@ + " toggle the banner (enable/suppress) + let g:netrw_banner= !g:netrw_banner - else + " refresh the listing + let svpos= netrw#SavePosn() + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - " switch between show-all/show-not-hidden/show-hidden - let g:netrw_hide=(g:netrw_hide+1)%3 - exe "keepj norm! 0" - if g:netrw_hide && g:netrw_list_hide == "" - keepj call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49) - let @@= ykeep -" call Dret("NetrwHide") - return - endif + " keep cursor on the filename + let fname= s:NetrwGetWord() + sil keepj $ + let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') +" call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A')) + if result <= 0 && exists("w:netrw_bannercnt") + exe "keepj ".w:netrw_bannercnt endif - - keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) let @@= ykeep -" call Dret("NetrwHide") +" call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner) endfun " --------------------------------------------------------------------- -" s:NetrwHidden: invoked by "gh" {{{2 -fun! s:NetrwHidden(islocal) -" call Dfunc("s:NetrwHidden()") - let ykeep= @@ - " save current position - let svpos= netrw#NetrwSavePosn() +" s:NetrwBookmarkMenu: Uses menu priorities {{{2 +" .2.[cnt] for bookmarks, and +" .3.[cnt] for history +" (see s:NetrwMenu()) +fun! s:NetrwBookmarkMenu() + if !exists("s:netrw_menucnt") + return + endif +" call Dfunc("NetrwBookmarkMenu() histcnt=".g:netrw_dirhist_cnt." menucnt=".s:netrw_menucnt) - if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+' - " remove pattern from hiding list - let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','') - elseif s:Strlen(g:netrw_list_hide) >= 1 - let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+' - else - let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+' - endif + " the following test assures that gvim is running, has menus available, and has menus enabled. + if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu + if exists("g:NetrwTopLvlMenu") +" call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)") + exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks' + exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete' + endif + if !exists("s:netrw_initbookhist") + call s:NetrwBookHistRead() + endif - " refresh screen and return to saved position - keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) - let @@= ykeep -" call Dret("s:NetrwHidden") -endfun + " show bookmarked places + if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0 + let cnt= 1 + for bmd in g:netrw_bookmarklist +" call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmd.' :e '.bmd) + let bmd= escape(bmd,g:netrw_menu_escape) + + " show bookmarks for goto menu + exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmd.' :e '.bmd."\" + + " show bookmarks for deletion menu + exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.bmd.' '.cnt."mB" + let cnt= cnt + 1 + endfor -" --------------------------------------------------------------------- -" s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2 -fun! s:NetrwHome() - if exists("g:netrw_home") - let home= g:netrw_home - else - " go to vim plugin home - for home in split(&rtp,',') + [''] - if isdirectory(home) && filewritable(home) | break | endif - let basehome= substitute(home,'[/\\]\.vim$','','') - if isdirectory(basehome) && filewritable(basehome) - let home= basehome."/.vim" - break - endif - endfor - if home == "" - " just pick the first directory - let home= substitute(&rtp,',.*$','','') - endif - if (has("win32") || has("win95") || has("win64") || has("win16")) - let home= substitute(home,'/','\\','g') endif - endif - " insure that the home directory exists - if g:netrw_dirhistmax > 0 && !isdirectory(home) - if exists("g:netrw_mkdir") - call system(g:netrw_mkdir." ".shellescape(home)) - else - call mkdir(home) + + " show directory browsing history + if g:netrw_dirhistmax > 0 + let cnt = g:netrw_dirhist_cnt + let first = 1 + let histcnt = 0 + while ( first || cnt != g:netrw_dirhist_cnt ) + let histcnt = histcnt + 1 + let priority = g:netrw_dirhist_cnt + histcnt + if exists("g:netrw_dirhist_{cnt}") + let histdir= escape(g:netrw_dirhist_{cnt},g:netrw_menu_escape) +" call Decho('sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir) + exe 'sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir."\" + endif + let first = 0 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax + if cnt < 0 + let cnt= cnt + g:netrw_dirhistmax + endif + endwhile endif + endif - let g:netrw_home= home - return home +" call Dret("NetrwBookmarkMenu") endfun " --------------------------------------------------------------------- -" s:NetrwLeftmouse: handles the when in a netrw browsing window {{{2 -fun! s:NetrwLeftmouse(islocal) - if exists("s:netrwdrag") - return - endif -" call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")") +" s:NetrwBrowseChgDir: constructs a new directory based on the current {{{2 +" directory and a new directory name. Also, if the +" "new directory name" is actually a file, +" NetrwBrowseChgDir() edits the file. +fun! s:NetrwBrowseChgDir(islocal,newdir,...) +" call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">") +" call Decho("win#".winnr()) let ykeep= @@ - " check if the status bar was clicked on instead of a file/directory name - while getchar(0) != 0 - "clear the input stream - endwhile - call feedkeys("\") - let c = getchar() - let mouse_lnum = v:mouse_lnum - let wlastline = line('w$') - let lastline = line('$') -" call Decho("v:mouse_lnum=".mouse_lnum." line(w$)=".wlastline." line($)=".lastline." v:mouse_win=".v:mouse_win." winnr#".winnr()) -" call Decho("v:mouse_col =".v:mouse_col." col=".col(".")." wincol =".wincol()." winwidth =".winwidth(0)) - if mouse_lnum >= wlastline + 1 || v:mouse_win != winnr() - " appears to be a status bar leftmouse click - let @@= ykeep -" call Dret("s:NetrwLeftmouse : detected a status bar leftmouse click") - return - endif - if v:mouse_col != col('.') + if !exists("b:netrw_curdir") + " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called + " and the current window is the NetrwMessage window. let @@= ykeep -" call Dret("s:NetrwLeftmouse : detected a vertical separator bar leftmouse click") +" call Decho("b:netrw_curdir doesn't exist!") +" call Decho("getcwd<".getcwd().">") +" call Dredir("ls!") +" call Dret("s:NetrwBrowseChgDir") return endif - if a:islocal - if exists("b:netrw_curdir") - keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord())) - endif + " NetrwBrowseChgDir: save options and initialize {{{3 +" call Decho("saving options") + keepj call s:NetrwOptionSave("s:") + keepj call s:NetrwSafeOptions() + let nbcd_curpos = netrw#SavePosn() + let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos +" call Decho("setting s:nbcd_curpos_".bufnr('%')." to SavePosn") + if (has("win32") || has("win95") || has("win64") || has("win16")) + let dirname = substitute(b:netrw_curdir,'\\','/','ge') else - if exists("b:netrw_curdir") - keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord())) - endif + let dirname = b:netrw_curdir endif - let @@= ykeep -" call Dret("s:NetrwLeftmouse") -endfun + let newdir = a:newdir + let dolockout = 0 +" call Decho("dirname<".dirname.">") -" --------------------------------------------------------------------- -" s:NetrwRightdrag: {{{2 -"DechoTabOn -fun! s:NetrwRightdrag(islocal) -" call Dfunc("s:NetrwRightdrag(islocal=".a:islocal.")") - if !exists("s:netrwdrag") - let s:netrwdrag = winnr() - call s:NetrwMarkFile(a:islocal,s:NetrwGetWord()) - if a:islocal - nno :call NetrwRightrelease(1) - else - nno :call NetrwRightrelease(0) + " ignore s when done in the banner + if g:netrw_banner +" call Decho("w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." line(.)#".line('.')." line($)#".line("#")) + if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt && line("$") >= w:netrw_bannercnt + if getline(".") =~ 'Quick Help' +" call Decho("#1: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + let g:netrw_quickhelp= (g:netrw_quickhelp + 1)%len(s:QuickHelp) +" call Decho("#2: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + setl noro ma nowrap + keepj call setline(line('.'),'" Quick Help: :help '.s:QuickHelp[g:netrw_quickhelp]) + setl noma nomod nowrap + keepj call netrw#RestorePosn(nbcd_curpos) + keepj call s:NetrwOptionRestore("s:") +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + endif endif +" else " Decho +" call Decho("(s:NetrwBrowseChgdir) g:netrw_banner=".g:netrw_banner." (no banner)") endif -" call Dret("s:NetrwRightdrag : s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) -endfun -" --------------------------------------------------------------------- -" s:NetrwRightrelease: {{{2 -fun! s:NetrwRightrelease(islocal) -" call Dfunc("s:NetrwRightrelease(islocal=".a:islocal.") s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) - if exists("s:netrwdrag") - nunmap - let tgt = s:NetrwGetWord() -" call Decho("target#1: ".tgt) - if tgt =~ '/$' && tgt !~ '^\./$' - let tgt = b:netrw_curdir."/".tgt - else - let tgt= b:netrw_curdir - endif -" call Decho("target#2: ".tgt) - call netrw#NetrwMakeTgt(tgt) - let curwin= winnr() - exe s:netrwdrag."wincmd w" - call s:NetrwMarkFileMove(a:islocal) - exe curwin."wincmd w" - unlet s:netrwdrag + " set up o/s-dependent directory recognition pattern +" call Decho("set up o/s-dependent directory recognition pattern") + if has("amiga") + let dirpat= '[\/:]$' + else + let dirpat= '[\/]$' endif -" call Dret("s:NetrwRightrelease") -endfun - -" --------------------------------------------------------------------- -" s:NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2 -" separated patterns given in g:netrw_list_hide -fun! s:NetrwListHide() -" call Dfunc("NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") - let ykeep= @@ +" call Decho("dirname<".dirname."> dirpat<".dirpat.">") - " find a character not in the "hide" string to use as a separator for :g and :v commands - " How-it-works: take the hiding command, convert it into a range. Duplicate - " characters don't matter. Remove all such characters from the '/~...90' - " string. Use the first character left as a separator character. - let listhide= g:netrw_list_hide - let sep = strpart(substitute('/~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1) -" call Decho("sep=".sep) - - while listhide != "" - if listhide =~ ',' - let hide = substitute(listhide,',.*$','','e') - let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e') - else - let hide = listhide - let listhide = "" - endif - - " Prune the list by hiding any files which match - if g:netrw_hide == 1 -" call Decho("hiding<".hide."> listhide<".listhide.">") - exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' - elseif g:netrw_hide == 2 -" call Decho("showing<".hide."> listhide<".listhide.">") - exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' - endif - endwhile - if g:netrw_hide == 2 - exe 'sil! keepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' - exe 'sil! keepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' + if dirname !~ dirpat + " apparently vim is "recognizing" that it is in a directory and + " is removing the trailing "/". Bad idea, so let's put it back. + let dirname= dirname.'/' +" call Decho("adjusting dirname<".dirname.">") endif - " remove any blank lines that have somehow remained. - " This seems to happen under Windows. - exe 'sil! keepj 1,$g@^\s*$@d' + if newdir !~ dirpat + " ------------------------------ + " NetrwBrowseChgDir: edit a file {{{3 + " ------------------------------ +" call Decho('edit-a-file: case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">") - let @@= ykeep -" call Dret("NetrwListHide") -endfun + " save position for benefit of Rexplore + let s:rexposn_{bufnr("%")}= netrw#SavePosn() -" --------------------------------------------------------------------- -" NetrwHideEdit: allows user to edit the file/directory hiding list -fun! s:NetrwHideEdit(islocal) -" call Dfunc("NetrwHideEdit(islocal=".a:islocal.")") +" call Decho("edit-a-file: setting s:rexposn_".bufnr("%")." to SavePosn") +" call Decho("edit-a-file: win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> ft=".&ft) +" call Decho("edit-a-file: w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a')." w:netrw_treedict:".(exists("w:netrw_treedict")? "exists" : 'n/a')." newdir<".newdir.">") - let ykeep= @@ - " save current cursor position - let svpos= netrw#NetrwSavePosn() + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)' +" call Decho("edit-a-file: handle tree listing: w:netrw_treedict<".(exists("w:netrw_treedict")? string(w:netrw_treedict) : 'n/a').">") +" call Decho("edit-a-file: newdir<".newdir.">") + let dirname= s:NetrwTreeDir() + if dirname =~ '/$' + let dirname= dirname.newdir + else + let dirname= dirname."/".newdir + endif +" call Decho("edit-a-file: dirname<".dirname.">") +" call Decho("edit-a-file: tree listing") + elseif newdir =~ '^\(/\|\a:\)' + let dirname= newdir + else + let dirname= s:ComposePath(dirname,newdir) + endif +" call Decho("edit-a-file: handling a file: dirname<".dirname."> (a:0=".a:0.")") + " this lets NetrwBrowseX avoid the edit + if a:0 < 1 +" call Decho("edit-a-file: set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist")) + keepj call s:NetrwOptionRestore("s:") + if !exists("s:didsplit") +" call Decho("edit-a-file: s:didsplit does not exist; g:netrw_browse_split=".g:netrw_browse_split." win#".winnr()) + if g:netrw_browse_split == 1 + " horizontally splitting the window first + keepalt new + if !&ea + keepalt wincmd _ + endif + elseif g:netrw_browse_split == 2 + " vertically splitting the window first + keepalt rightb vert new + if !&ea + keepalt wincmd | + endif + elseif g:netrw_browse_split == 3 + " open file in new tab + keepalt tabnew + elseif g:netrw_browse_split == 4 + " act like "P" (ie. open previous window) + if s:NetrwPrevWinOpen(2) == 3 + let @@= ykeep +" call Dret("s:NetrwBrowseChgDir") + return + endif + else + " handling a file, didn't split, so remove menu +" call Decho("edit-a-file: handling a file+didn't split, so remove menu") + call s:NetrwMenu(0) + " optional change to window + if g:netrw_chgwin >= 1 + exe "keepj keepalt ".g:netrw_chgwin."wincmd w" + endif + endif + endif - " get new hiding list from user - call inputsave() - let newhide= input("Edit Hiding List: ",g:netrw_list_hide) - call inputrestore() - let g:netrw_list_hide= newhide -" call Decho("new g:netrw_list_hide<".g:netrw_list_hide.">") + " the point where netrw actually edits the (local) file + " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will + " no keepalt to support :e # to return to a directory listing + if a:islocal +" call Decho("edit-a-file: edit local file: exe e! ".fnameescape(dirname)) + " some like c-^ to return to the last edited file + " others like c-^ to return to the netrw buffer + if exists("g:netrw_altfile") && g:netrw_altfile + exe "keepj keepalt e! ".fnameescape(dirname) + else + exe "keepj e! ".fnameescape(dirname) + endif + call s:NetrwCursor() + else +" call Decho("edit-a-file: remote file: NetrwBrowse will edit it") + endif + let dolockout= 1 - " refresh the listing - sil keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,"./")) + " handle g:Netrw_funcref -- call external-to-netrw functions + " This code will handle g:Netrw_funcref as an individual function reference + " or as a list of function references. It will ignore anything that's not + " a function reference. See :help Funcref for information about function references. + if exists("g:Netrw_funcref") +" call Decho("edit-a-file: handle optional Funcrefs") + if type(g:Netrw_funcref) == 2 +" call Decho("edit-a-file: handling a g:Netrw_funcref") + keepj call g:Netrw_funcref() + elseif type(g:Netrw_funcref) == 3 +" call Decho("edit-a-file: handling a list of g:Netrw_funcrefs") + for Fncref in g:Netrw_funcref + if type(FncRef) == 2 + keepj call FncRef() + endif + endfor + endif + endif + endif - " restore cursor position - call netrw#NetrwRestorePosn(svpos) - let @@= ykeep + elseif newdir =~ '^/' + " ---------------------------------------------------- + " NetrwBrowseChgDir: just go to the new directory spec {{{3 + " ---------------------------------------------------- +" call Decho('goto-newdir: case "just go to new directory spec": newdir<'.newdir.'>') + let dirname = newdir + keepj call s:SetRexDir(a:islocal,dirname) + keepj call s:NetrwOptionRestore("s:") -" call Dret("NetrwHideEdit") -endfun + elseif newdir == './' + " --------------------------------------------- + " NetrwBrowseChgDir: refresh the directory list {{{3 + " --------------------------------------------- +" call Decho('refresh-dirlist: case "refresh directory listing": newdir == "./"') + keepj call s:SetRexDir(a:islocal,dirname) -" --------------------------------------------------------------------- -" NetSortSequence: allows user to edit the sorting sequence -fun! s:NetSortSequence(islocal) -" call Dfunc("NetSortSequence(islocal=".a:islocal.")") + elseif newdir == '../' + " -------------------------------------- + " NetrwBrowseChgDir: go up one directory {{{3 + " -------------------------------------- +" call Decho('go-up: case "go up one directory": newdir == "../"') - let ykeep= @@ - let svpos= netrw#NetrwSavePosn() - call inputsave() - let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence) - call inputrestore() + if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") + " force a refresh +" call Decho("go-up: clear buffer<".expand("%")."> with :%d") +" call Decho("go-up: setl noro ma") + setl noro ma + keepj %d + endif - " refresh the listing - let g:netrw_sort_sequence= newsortseq - keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) - let @@= ykeep + if has("amiga") + " amiga +" call Decho('go-up: case "go up one directory": newdir == "../" and amiga') + if a:islocal + let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','') + let dirname= substitute(dirname,'/$','','') + else + let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','') + endif +" call Decho("go-up: amiga: dirname<".dirname."> (go up one dir)") -" call Dret("NetSortSequence") -endfun + elseif !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + " windows + if a:islocal + let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') + if dirname == "" + let dirname= '/' + endif + else + let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') + endif + if dirname =~ '^\a:$' + let dirname= dirname.'/' + endif +" call Decho("go-up: windows: dirname<".dirname."> (go up one dir)") -" --------------------------------------------------------------------- -" s:NetrwMakeDir: this function makes a directory (both local and remote) {{{2 -fun! s:NetrwMakeDir(usrhost) -" call Dfunc("NetrwMakeDir(usrhost<".a:usrhost.">)") + else + " unix or cygwin +" call Decho('go-up: case "go up one directory": newdir == "../" and unix or cygwin') + if a:islocal + let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') + if dirname == "" + let dirname= '/' + endif + else + let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') + endif +" call Decho("go-up: unix: dirname<".dirname."> (go up one dir)") + endif + keepj call s:SetRexDir(a:islocal,dirname) - let ykeep= @@ - " get name of new directory from user. A bare will skip. - " if its currently a directory, also request will be skipped, but with - " a message. - call inputsave() - let newdirname= input("Please give directory name: ") - call inputrestore() -" call Decho("newdirname<".newdirname.">") + elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") + " -------------------------------------- + " NetrwBrowseChgDir: Handle Tree Listing {{{3 + " -------------------------------------- +" call Decho('tree-list: case liststyle is TREELIST and w:netrw_treedict exists') + " force a refresh (for TREELIST, wait for NetrwTreeDir() to force the refresh) +" call Decho("tree-list: setl noro ma") + setl noro ma + if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")) +" call Decho("tree-list: clear buffer<".expand("%")."> with :%d") + keepj %d + endif + let treedir = s:NetrwTreeDir() + let s:treecurpos = nbcd_curpos + let haskey= 0 +" call Decho("tree-list: w:netrw_treedict<".string(w:netrw_treedict).">") - if newdirname == "" - let @@= ykeep -" call Dret("NetrwMakeDir : user aborted with bare ") - return + " search treedict for tree dir as-is + if has_key(w:netrw_treedict,treedir) +" call Decho('tree-list: ....searched for treedir<'.treedir.'> : found it!') + let haskey= 1 + else +" call Decho('tree-list: ....searched for treedir<'.treedir.'> : not found') + endif + + " search treedict for treedir with a / appended + if !haskey && treedir !~ '/$' + if has_key(w:netrw_treedict,treedir."/") + let treedir= treedir."/" +" call Decho('tree-list: ....searched.for treedir<'.treedir.'> found it!') + let haskey = 1 + else +" call Decho('tree-list: ....searched for treedir<'.treedir.'/> : not found') + endif + endif + + " search treedict for treedir with any trailing / elided + if !haskey && treedir =~ '/$' + let treedir= substitute(treedir,'/$','','') + if has_key(w:netrw_treedict,treedir) +" call Decho('tree-list: ....searched.for treedir<'.treedir.'> found it!') + let haskey = 1 + else +" call Decho('tree-list: ....searched for treedir<'.treedir.'> : not found') + endif + endif + + if haskey + " close tree listing for selected subdirectory +" call Decho("tree-list: closing selected subdirectory<".dirname.">") + call remove(w:netrw_treedict,treedir) +" call Decho("tree-list: removed entry<".treedir."> from treedict") +" call Decho("tree-list: yielding treedict<".string(w:netrw_treedict).">") + let dirname= w:netrw_treetop + else + " go down one directory + let dirname= substitute(treedir,'/*$','/','') +" call Decho("tree-list: go down one dir: treedir<".treedir.">") + endif + keepj call s:SetRexDir(a:islocal,dirname) + let s:treeforceredraw = 1 + + else + " ---------------------------------------- + " NetrwBrowseChgDir: Go down one directory {{{3 + " ---------------------------------------- + let dirname = s:ComposePath(dirname,newdir) +" call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">") + keepj call s:SetRexDir(a:islocal,dirname) endif - if a:usrhost == "" -" call Decho("local mkdir") + " -------------------------------------- + " NetrwBrowseChgDir: Restore and Cleanup {{{3 + " -------------------------------------- + keepj call s:NetrwOptionRestore("s:") + if dolockout +" call Decho("restore: filewritable(dirname<".dirname.">)=".filewritable(dirname)) + if filewritable(dirname) +" call Decho("restore: doing modification lockout settings: ma nomod noro") +" call Decho("restore: setl ma nomod noro") + setl ma nomod noro +" call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + else +" call Decho("restore: doing modification lockout settings: ma nomod ro") +" call Decho("restore: setl ma nomod noro") + setl ma nomod ro +" call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + endif + endif + let @@= ykeep - " Local mkdir: - " sanity checks - let fullnewdir= b:netrw_curdir.'/'.newdirname -" call Decho("fullnewdir<".fullnewdir.">") - if isdirectory(fullnewdir) - if !exists("g:netrw_quiet") - keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24) +" call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">") + return dirname +endfun + +" --------------------------------------------------------------------- +" s:NetrwBrowseUpDir: implements the "-" mappings {{{2 +" for thin, long, and wide: cursor placed just after banner +" for tree, keeps cursor on current filename +fun! s:NetrwBrowseUpDir(islocal) +" call Dfunc("s:NetrwBrowseUpDir(islocal=".a:islocal.")") + norm! 0 + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") +" call Decho("ftp + treestyle") + let curline= getline(".") + let swwline= winline() - 1 + if exists("w:netrw_treetop") + let b:netrw_curdir= w:netrw_treetop + endif + if a:islocal + call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,'../')) + else + call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../')) + endif + if !search('\c^'.s:treedepthstring.curline,'cw') + if !search('\c^'.curline,'cw') + sil! keepj 1 endif - let @@= ykeep -" call Dret("NetrwMakeDir : directory<".newdirname."> exists previously") - return endif - if s:FileReadable(fullnewdir) - if !exists("g:netrw_quiet") - keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25) + exe "sil! keepj norm! z\" + while winline() < swwline + let curwinline= winline() + exe "sil! keepj norm! \" + if curwinline == winline() + break + endif + endwhile + else +" call Decho("ftp + not treestyle") + if a:islocal + call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,'../')) + else + call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../')) + endif + if exists("w:netrw_bannercnt") +" call Decho("moving to line#".w:netrw_bannercnt) + exe w:netrw_bannercnt + else + 1 + endif + endif +" call Dret("s:NetrwBrowseUpDir") +endfun + +" --------------------------------------------------------------------- +" s:NetrwBrowseX: (implements "x") executes a special "viewer" script or program for the {{{2 +" given filename; typically this means given their extension. +" 0=local, 1=remote +fun! netrw#NetrwBrowseX(fname,remote) +" call Dfunc("NetrwBrowseX(fname<".a:fname."> remote=".a:remote.")") + + let ykeep = @@ + let screenposn = netrw#SavePosn() + + " special core dump handler + if a:fname =~ '/core\(\.\d\+\)\=$' + if exists("g:Netrw_corehandler") + if type(g:Netrw_corehandler) == 2 + " g:Netrw_corehandler is a function reference (see :help Funcref) +" call Decho("g:Netrw_corehandler is a funcref") + call g:Netrw_corehandler(a:fname) + elseif type(g:Netrw_corehandler) == 3 + " g:Netrw_corehandler is a List of function references (see :help Funcref) +" call Decho("g:Netrw_corehandler is a List") + for Fncref in g:Netrw_corehandler + if type(FncRef) == 2 + call FncRef(a:fname) + endif + endfor endif + call netrw#RestorePosn(screenposn) let @@= ykeep -" call Dret("NetrwMakeDir : file<".newdirname."> exists previously") +" call Dret("NetrwBrowseX : coredump handler invoked") return endif + endif - " requested new local directory is neither a pre-existing file or - " directory, so make it! - if exists("*mkdir") - call mkdir(fullnewdir,"p") - else - let netrw_origdir= s:NetrwGetcwd(1) - exe 'keepj lcd '.fnameescape(b:netrw_curdir) -" call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">") -" call Decho("exe sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)) - exe "sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1) - if v:shell_error != 0 - let @@= ykeep - call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) -" call Dret("NetrwMakeDir : failed: sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)) + " set up the filename + " (lower case the extension, make a local copy of a remote file) + let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e') + if has("win32") || has("win95") || has("win64") || has("win16") + let exten= substitute(exten,'^.*$','\L&\E','') + endif +" call Decho("exten<".exten.">") + + " seems kde systems often have gnome-open due to dependencies, even though + " gnome-open's subsidiary display tools are largely absent. Kde systems + " usually have "kdeinit" running, though... (tnx Mikolaj Machowski) + if !exists("s:haskdeinit") + if has("unix") && executable("ps") && !has("win32unix") + let s:haskdeinit= system("ps -e") =~ 'kdeinit' + if v:shell_error + let s:haskdeinit = 0 + endif + else + let s:haskdeinit= 0 + endif +" call Decho("setting s:haskdeinit=".s:haskdeinit) + endif + + if a:remote == 1 + " create a local copy +" call Decho("remote: a:remote=".a:remote.": create a local copy of <".a:fname.">") + setl bh=delete + call netrw#NetRead(3,a:fname) + " attempt to rename tempfile + let basename= substitute(a:fname,'^\(.*\)/\(.*\)\.\([^.]*\)$','\2','') + let newname = substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','') +" call Decho("basename<".basename.">") +" call Decho("newname <".newname.">") + if rename(s:netrw_tmpfile,newname) == 0 + " renaming succeeded + let fname= newname + else + " renaming failed + let fname= s:netrw_tmpfile + endif + else +" call Decho("local: a:remote=".a:remote.": handling local copy of <".a:fname.">") + let fname= a:fname + " special ~ handler for local + if fname =~ '^\~' && expand("$HOME") != "" +" call Decho('invoking special ~ handler') + let fname= substitute(fname,'^\~',expand("$HOME"),'') + endif + endif +" call Decho("fname<".fname.">") +" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten)) + + " set up redirection + if &srr =~ "%s" + if (has("win32") || has("win95") || has("win64") || has("win16")) + let redir= substitute(&srr,"%s","nul","") + else + let redir= substitute(&srr,"%s","/dev/null","") + endif + elseif (has("win32") || has("win95") || has("win64") || has("win16")) + let redir= &srr . "nul" + else + let redir= &srr . "/dev/null" + endif +" call Decho("set up redirection: redir{".redir."} srr{".&srr."}") + + " extract any viewing options. Assumes that they're set apart by quotes. +" call Decho("extract any viewing options") + if exists("g:netrw_browsex_viewer") +" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") + if g:netrw_browsex_viewer =~ '\s' + let viewer = substitute(g:netrw_browsex_viewer,'\s.*$','','') + let viewopt = substitute(g:netrw_browsex_viewer,'^\S\+\s*','','')." " + let oviewer = '' + let cnt = 1 + while !executable(viewer) && viewer != oviewer + let viewer = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\1','') + let viewopt = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\3','')." " + let cnt = cnt + 1 + let oviewer = viewer +" call Decho("!exe: viewer<".viewer."> viewopt<".viewopt.">") + endwhile + else + let viewer = g:netrw_browsex_viewer + let viewopt = "" + endif +" call Decho("viewer<".viewer."> viewopt<".viewopt.">") + endif + + " execute the file handler +" call Decho("execute the file handler (if any)") + if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-' +" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") + let ret= netrwFileHandlers#Invoke(exten,fname) + + elseif exists("g:netrw_browsex_viewer") && executable(viewer) +" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") +" call Decho("exe sil !".viewer." ".viewopt.shellescape(fname,1).redir) + exe "sil !".viewer." ".viewopt.shellescape(fname,1).redir + let ret= v:shell_error + + elseif has("win32") || has("win64") +" call Decho("windows") + if executable("start") +" call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) + exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) + elseif executable("rundll32") +" call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) + exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) + else + call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) + endif + call inputsave()|call input("Press to continue")|call inputrestore() + let ret= v:shell_error + + elseif has("win32unix") + let winfname= 'c:\cygwin'.substitute(fname,'/','\\','g') +" call Decho("cygwin: winfname<".shellescape(winfname,1).">") + if executable("start") +" call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)) + exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1) + elseif executable("rundll32") +" call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1)) + exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(winfname,1) + else + call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) + endif + call inputsave()|call input("Press to continue")|call inputrestore() + let ret= v:shell_error + + elseif has("unix") && executable("xdg-open") && !s:haskdeinit +" call Decho("unix and xdg-open") +" call Decho("exe sil !xdg-open ".shellescape(fname,1)." ".redir) + exe "sil !xdg-open ".shellescape(fname,1).redir + let ret= v:shell_error + + elseif has("unix") && executable("kfmclient") && s:haskdeinit +" call Decho("unix and kfmclient") +" call Decho("exe sil !kfmclient exec ".shellescape(fname,1)." ".redir) + exe "sil !kfmclient exec ".shellescape(fname,1)." ".redir + let ret= v:shell_error + + elseif has("macunix") && executable("open") +" call Decho("macunix and open") +" call Decho("exe sil !open ".shellescape(fname,1)." ".redir) + exe "sil !open ".shellescape(fname,1)." ".redir + let ret= v:shell_error + + else + " netrwFileHandlers#Invoke() always returns 0 + let ret= netrwFileHandlers#Invoke(exten,fname) + endif + + " if unsuccessful, attempt netrwFileHandlers#Invoke() + if ret + let ret= netrwFileHandlers#Invoke(exten,fname) + endif + + " restoring redraw! after external file handlers + redraw! + + " cleanup: remove temporary file, + " delete current buffer if success with handler, + " return to prior buffer (directory listing) + " Feb 12, 2008: had to de-activiate removal of + " temporary file because it wasn't getting seen. +" if a:remote == 1 && fname != a:fname +"" call Decho("deleting temporary file<".fname.">") +" call s:NetrwDelete(fname) +" endif + + if a:remote == 1 + setl bh=delete bt=nofile + if g:netrw_use_noswf + setl noswf + endif + exe "sil! keepj norm! \" +" redraw! + endif + call netrw#RestorePosn(screenposn) + let @@= ykeep + +" call Dret("NetrwBrowseX") +endfun + +" --------------------------------------------------------------------- +" s:NetrwChgPerm: (implements "gp") change file permission {{{2 +fun! s:NetrwChgPerm(islocal,curdir) +" call Dfunc("s:NetrwChgPerm(islocal=".a:islocal." curdir<".a:curdir.">)") + let ykeep = @@ + call inputsave() + let newperm= input("Enter new permission: ") + call inputrestore() + let chgperm= substitute(g:netrw_chgperm,'\',shellescape(expand("")),'') + let chgperm= substitute(chgperm,'\',shellescape(newperm),'') +" call Decho("chgperm<".chgperm.">") + call system(chgperm) + if v:shell_error != 0 + keepj call netrw#ErrorMsg(1,"changing permission on file<".expand("")."> seems to have failed",75) + endif + if a:islocal + keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) + endif + let @@= ykeep +" call Dret("s:NetrwChgPerm") +endfun + +" --------------------------------------------------------------------- +" s:NetrwClearExplore: clear explore variables (if any) {{{2 +fun! s:NetrwClearExplore() +" call Dfunc("s:NetrwClearExplore()") + 2match none + if exists("s:explore_match") |unlet s:explore_match |endif + if exists("s:explore_indx") |unlet s:explore_indx |endif + if exists("s:netrw_explore_prvdir") |unlet s:netrw_explore_prvdir |endif + if exists("s:dirstarstar") |unlet s:dirstarstar |endif + if exists("s:explore_prvdir") |unlet s:explore_prvdir |endif + if exists("w:netrw_explore_indx") |unlet w:netrw_explore_indx |endif + if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif + if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif + if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif +" redraw! + echo " " + echo " " +" call Dret("s:NetrwClearExplore") +endfun + +" --------------------------------------------------------------------- +" s:NetrwExploreListUniq: {{{2 +fun! s:NetrwExploreListUniq(explist) +" call Dfunc("s:NetrwExploreListUniq(explist<".string(a:explist).">)") + + " this assumes that the list is already sorted + let newexplist= [] + for member in a:explist + if !exists("uniqmember") || member != uniqmember + let uniqmember = member + let newexplist = newexplist + [ member ] + endif + endfor + +" call Dret("s:NetrwExploreListUniq newexplist<".string(newexplist).">") + return newexplist +endfun + +" --------------------------------------------------------------------- +" s:NetrwForceChgDir: (gd support) Force treatment as a directory {{{2 +fun! s:NetrwForceChgDir(islocal,newdir) +" call Dfunc("s:NetrwForceChgDir(islocal=".a:islocal." newdir<".a:newdir.">)") + let ykeep= @@ + if a:newdir !~ '/$' + " ok, looks like force is needed to get directory-style treatment + if a:newdir =~ '@$' + let newdir= substitute(a:newdir,'@$','/','') + elseif a:newdir =~ '[*=|\\]$' + let newdir= substitute(a:newdir,'.$','/','') + else + let newdir= a:newdir.'/' + endif +" call Decho("adjusting newdir<".newdir."> due to gd") + else + " should already be getting treatment as a directory + let newdir= a:newdir + endif + let newdir= s:NetrwBrowseChgDir(a:islocal,newdir) + call s:NetrwBrowse(a:islocal,newdir) + let @@= ykeep +" call Dret("s:NetrwForceChgDir") +endfun + +" --------------------------------------------------------------------- +" s:NetrwForceFile: (gf support) Force treatment as a file {{{2 +fun! s:NetrwForceFile(islocal,newfile) +" call Dfunc("s:NetrwForceFile(islocal=".a:islocal." newdir<".a:newfile.">)") + if a:newfile =~ '[/@*=|\\]$' + let newfile= substitute(a:newfile,'.$','','') + else + let newfile= a:newfile + endif + if a:islocal + call s:NetrwBrowseChgDir(a:islocal,newfile) + else + call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,newfile)) + endif +" call Dret("s:NetrwForceFile") +endfun + +" --------------------------------------------------------------------- +" s:NetrwHide: this function is invoked by the "a" map for browsing {{{2 +" and switches the hiding mode. The actual hiding is done by +" s:NetrwListHide(). +" g:netrw_hide= 0: show all +" 1: show not-hidden files +" 2: show hidden files only +fun! s:NetrwHide(islocal) +" call Dfunc("NetrwHide(islocal=".a:islocal.") g:netrw_hide=".g:netrw_hide) + let ykeep= @@ + let svpos= netrw#SavePosn() + + if exists("s:netrwmarkfilelist_{bufnr('%')}") +" call Decho("((g:netrw_hide == 1)? "unhide" : "hide")." files in markfilelist<".string(s:netrwmarkfilelist_{bufnr("%")}).">") +" call Decho("g:netrw_list_hide<".g:netrw_list_hide.">") + + " hide the files in the markfile list + for fname in s:netrwmarkfilelist_{bufnr("%")} +" call Decho("match(g:netrw_list_hide<".g:netrw_list_hide.'> fname<\<'.fname.'\>>)='.match(g:netrw_list_hide,'\<'.fname.'\>')." l:isk=".&l:isk) + if match(g:netrw_list_hide,'\<'.fname.'\>') != -1 + " remove fname from hiding list + let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','') + let g:netrw_list_hide= substitute(g:netrw_list_hide,',,',',','g') + let g:netrw_list_hide= substitute(g:netrw_list_hide,'^,\|,$','','') +" call Decho("unhide: g:netrw_list_hide<".g:netrw_list_hide.">") + else + " append fname to hiding list + if exists("g:netrw_list_hide") && g:netrw_list_hide != "" + let g:netrw_list_hide= g:netrw_list_hide.',\<'.escape(fname,g:netrw_fname_escape).'\>' + else + let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>' + endif +" call Decho("hide: g:netrw_list_hide<".g:netrw_list_hide.">") + endif + endfor + keepj call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) + let g:netrw_hide= 1 + + else + + " switch between show-all/show-not-hidden/show-hidden + let g:netrw_hide=(g:netrw_hide+1)%3 + exe "keepj norm! 0" + if g:netrw_hide && g:netrw_list_hide == "" + keepj call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49) + let @@= ykeep +" call Dret("NetrwHide") + return + endif + endif + + keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) + keepj call netrw#RestorePosn(svpos) + let @@= ykeep +" call Dret("NetrwHide") +endfun + +" --------------------------------------------------------------------- +" s:NetrwHidden: invoked by "gh" {{{2 +fun! s:NetrwHidden(islocal) +" call Dfunc("s:NetrwHidden()") + let ykeep= @@ + " save current position + let svpos= netrw#SavePosn() + + if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+' + " remove pattern from hiding list + let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','') + elseif s:Strlen(g:netrw_list_hide) >= 1 + let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+' + else + let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+' + endif + + " refresh screen and return to saved position + keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) + keepj call netrw#RestorePosn(svpos) + let @@= ykeep +" call Dret("s:NetrwHidden") +endfun + +" --------------------------------------------------------------------- +" s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2 +fun! s:NetrwHome() + if exists("g:netrw_home") + let home= g:netrw_home + else + " go to vim plugin home + for home in split(&rtp,',') + [''] + if isdirectory(home) && filewritable(home) | break | endif + let basehome= substitute(home,'[/\\]\.vim$','','') + if isdirectory(basehome) && filewritable(basehome) + let home= basehome."/.vim" + break + endif + endfor + if home == "" + " just pick the first directory + let home= substitute(&rtp,',.*$','','') + endif + if (has("win32") || has("win95") || has("win64") || has("win16")) + let home= substitute(home,'/','\\','g') + endif + endif + " insure that the home directory exists + if g:netrw_dirhistmax > 0 && !isdirectory(home) + if exists("g:netrw_mkdir") + call system(g:netrw_mkdir." ".shellescape(home)) + else + call mkdir(home) + endif + endif + let g:netrw_home= home + return home +endfun + +" --------------------------------------------------------------------- +" s:NetrwLeftmouse: handles the when in a netrw browsing window {{{2 +fun! s:NetrwLeftmouse(islocal) + if exists("s:netrwdrag") + return + endif +" call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")") + + let ykeep= @@ + " check if the status bar was clicked on instead of a file/directory name + while getchar(0) != 0 + "clear the input stream + endwhile + call feedkeys("\") + let c = getchar() + let mouse_lnum = v:mouse_lnum + let wlastline = line('w$') + let lastline = line('$') +" call Decho("v:mouse_lnum=".mouse_lnum." line(w$)=".wlastline." line($)=".lastline." v:mouse_win=".v:mouse_win." winnr#".winnr()) +" call Decho("v:mouse_col =".v:mouse_col." col=".col(".")." wincol =".wincol()." winwidth =".winwidth(0)) + if mouse_lnum >= wlastline + 1 || v:mouse_win != winnr() + " appears to be a status bar leftmouse click + let @@= ykeep +" call Dret("s:NetrwLeftmouse : detected a status bar leftmouse click") + return + endif + " NOTE: following test is preventing leftmouse selection/deselection of directories and files in treelist mode (Dec 04, 2013) + " Windows are separated by vertical separator bars - but the mouse seems to be doing what it should when dragging that bar + " without this test. +" if v:mouse_col != col('.') +" let @@= ykeep +" call Dret("s:NetrwLeftmouse : detected a vertical separator bar leftmouse click") +" return +" endif + + if a:islocal + if exists("b:netrw_curdir") + keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord())) + endif + else + if exists("b:netrw_curdir") + keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord())) + endif + endif + let @@= ykeep +" call Dret("s:NetrwLeftmouse") +endfun + +" --------------------------------------------------------------------- +" s:NetrwSLeftmouse: marks the file under the cursor. May be dragged to select additional files {{{2 +fun! s:NetrwSLeftmouse(islocal) +" call Dfunc("s:NetrwSLeftmouse(islocal=".a:islocal.")") + + let s:ngw= s:NetrwGetWord() + call s:NetrwMarkFile(a:islocal,s:ngw) + +" call Dret("s:NetrwSLeftmouse") +endfun + +" --------------------------------------------------------------------- +" s:NetrwSLeftdrag: invoked via a shift-leftmouse and dragging {{{2 +" Used to mark multiple files. +fun! s:NetrwSLeftdrag(islocal) +" call Dfunc("s:NetrwSLeftdrag(islocal=".a:islocal.")") + if !exists("s:netrwdrag") + let s:netrwdrag = winnr() + if a:islocal + nno :call NetrwSLeftrelease(1) + else + nno :call NetrwSLeftrelease(0) + endif + endif + let ngw = s:NetrwGetWord() + if !exists("s:ngw") || s:ngw != ngw + call s:NetrwMarkFile(a:islocal,ngw) + endif + let s:ngw= ngw +" call Dret("s:NetrwSLeftdrag : s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) +endfun + +" --------------------------------------------------------------------- +" s:NetrwSLeftrelease: terminates shift-leftmouse dragging {{{2 +fun! s:NetrwSLeftrelease(islocal) +" call Dfunc("s:NetrwSLeftrelease(islocal=".a:islocal.") s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) + if exists("s:netrwdrag") + nunmap + let ngw = s:NetrwGetWord() + if !exists("s:ngw") || s:ngw != ngw + call s:NetrwMarkFile(a:islocal,ngw) + endif + if exists("s:ngw") + unlet s:ngw + endif + unlet s:netrwdrag + endif +" call Dret("s:NetrwSLeftrelease") +endfun + +" --------------------------------------------------------------------- +" s:NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2 +" separated patterns given in g:netrw_list_hide +fun! s:NetrwListHide() +" call Dfunc("NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") + let ykeep= @@ + + " find a character not in the "hide" string to use as a separator for :g and :v commands + " How-it-works: take the hiding command, convert it into a range. Duplicate + " characters don't matter. Remove all such characters from the '/~...90' + " string. Use the first character left as a separator character. + let listhide= g:netrw_list_hide + let sep = strpart(substitute('/~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1) +" call Decho("sep=".sep) + + while listhide != "" + if listhide =~ ',' + let hide = substitute(listhide,',.*$','','e') + let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e') + else + let hide = listhide + let listhide = "" + endif + + " Prune the list by hiding any files which match + if g:netrw_hide == 1 +" call Decho("hiding<".hide."> listhide<".listhide.">") + exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' + elseif g:netrw_hide == 2 +" call Decho("showing<".hide."> listhide<".listhide.">") + exe 'sil! keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' + endif + endwhile + if g:netrw_hide == 2 + exe 'sil! keepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' + exe 'sil! keepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' + endif + + " remove any blank lines that have somehow remained. + " This seems to happen under Windows. + exe 'sil! keepj 1,$g@^\s*$@d' + + let @@= ykeep +" call Dret("NetrwListHide") +endfun + +" --------------------------------------------------------------------- +" NetrwHideEdit: allows user to edit the file/directory hiding list +fun! s:NetrwHideEdit(islocal) +" call Dfunc("NetrwHideEdit(islocal=".a:islocal.")") + + let ykeep= @@ + " save current cursor position + let svpos= netrw#SavePosn() + + " get new hiding list from user + call inputsave() + let newhide= input("Edit Hiding List: ",g:netrw_list_hide) + call inputrestore() + let g:netrw_list_hide= newhide +" call Decho("new g:netrw_list_hide<".g:netrw_list_hide.">") + + " refresh the listing + sil keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,"./")) + + " restore cursor position + call netrw#RestorePosn(svpos) + let @@= ykeep + +" call Dret("NetrwHideEdit") +endfun + +" --------------------------------------------------------------------- +" NetSortSequence: allows user to edit the sorting sequence +fun! s:NetSortSequence(islocal) +" call Dfunc("NetSortSequence(islocal=".a:islocal.")") + + let ykeep= @@ + let svpos= netrw#SavePosn() + call inputsave() + let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence) + call inputrestore() + + " refresh the listing + let g:netrw_sort_sequence= newsortseq + keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) + keepj call netrw#RestorePosn(svpos) + let @@= ykeep + +" call Dret("NetSortSequence") +endfun + +" --------------------------------------------------------------------- +" s:NetrwMakeDir: this function makes a directory (both local and remote) {{{2 +fun! s:NetrwMakeDir(usrhost) +" call Dfunc("s:NetrwMakeDir(usrhost<".a:usrhost.">)") + + let ykeep= @@ + " get name of new directory from user. A bare will skip. + " if its currently a directory, also request will be skipped, but with + " a message. + call inputsave() + let newdirname= input("Please give directory name: ") + call inputrestore() +" call Decho("newdirname<".newdirname.">") + + if newdirname == "" + let @@= ykeep +" call Dret("s:NetrwMakeDir : user aborted with bare ") + return + endif + + if a:usrhost == "" +" call Decho("local mkdir") + + " Local mkdir: + " sanity checks + let fullnewdir= b:netrw_curdir.'/'.newdirname +" call Decho("fullnewdir<".fullnewdir.">") + if isdirectory(fullnewdir) + if !exists("g:netrw_quiet") + keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24) + endif + let @@= ykeep +" call Dret("s:NetrwMakeDir : directory<".newdirname."> exists previously") + return + endif + if s:FileReadable(fullnewdir) + if !exists("g:netrw_quiet") + keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25) + endif + let @@= ykeep +" call Dret("s:NetrwMakeDir : file<".newdirname."> exists previously") + return + endif + + " requested new local directory is neither a pre-existing file or + " directory, so make it! + if exists("*mkdir") + if has("unix") + call mkdir(fullnewdir,"p",xor(0777, system("umask"))) + else + call mkdir(fullnewdir,"p") + endif + else + let netrw_origdir= s:NetrwGetcwd(1) + call s:NetrwLcd(b:netrw_curdir) +" call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">") +" call Decho("exe sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)) + exe "sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1) + if v:shell_error != 0 + let @@= ykeep + call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) +" call Dret("s:NetrwMakeDir : failed: sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)) return endif if !g:netrw_keepdir - exe 'keepj lcd '.fnameescape(netrw_origdir) -" call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">") +" call Decho("restoring netrw_origdir since g:netrw_keepdir=".g:netrw_keepdir) + call s:NetrwLcd(netrw_origdir) + endif + endif + + if v:shell_error == 0 + " refresh listing +" call Decho("refresh listing") + let svpos= netrw#SavePosn() + call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) + call netrw#RestorePosn(svpos) + elseif !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",26) + endif +" redraw! + + elseif !exists("b:netrw_method") || b:netrw_method == 4 + " Remote mkdir: using ssh +" call Decho("remote mkdir") + let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd) + let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname +" call Decho("exe sil! !".mkdircmd." ".shellescape(newdirname,1)) + exe "sil! !".mkdircmd." ".shellescape(newdirname,1) + if v:shell_error == 0 + " refresh listing + let svpos= netrw#SavePosn() + keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) + keepj call netrw#RestorePosn(svpos) + elseif !exists("g:netrw_quiet") + keepj call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27) + endif +" redraw! + + elseif b:netrw_method == 2 + " Remote mkdir: using ftp+.netrc + let svpos= netrw#SavePosn() +" call Decho("b:netrw_curdir<".b:netrw_curdir.">") + if exists("b:netrw_fname") +" call Decho("b:netrw_fname<".b:netrw_fname.">") + let remotepath= b:netrw_fname + else + let remotepath= "" + endif + call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"') + keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) + keepj call netrw#RestorePosn(svpos) + + elseif b:netrw_method == 3 + " Remote mkdir: using ftp + machine, id, passwd, and fname (ie. no .netrc) + let svpos= netrw#SavePosn() +" call Decho("b:netrw_curdir<".b:netrw_curdir.">") + if exists("b:netrw_fname") +" call Decho("b:netrw_fname<".b:netrw_fname.">") + let remotepath= b:netrw_fname + else + let remotepath= "" + endif + call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"') + keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) + keepj call netrw#RestorePosn(svpos) + endif + + let @@= ykeep +" call Dret("s:NetrwMakeDir") +endfun + +" --------------------------------------------------------------------- +" s:TreeSqueezeDir: allows a shift-cr (gvim only) to squeeze the current tree-listing directory {{{2 +fun! s:TreeSqueezeDir(islocal) +" call Dfunc("s:TreeSqueezeDir(islocal=".a:islocal.")") + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") + " its a tree-listing style + let curdepth = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e') + let iline = line(".") - 1 + let stopline = (exists("w:netrw_bannercnt")? (w:netrw_bannercnt + 1) : 1) +" call Decho("curdepth=".curdepth) +" call Decho("stopline#".stopline) +" call Decho("starting with line#".line(".").": ".getline('.')) + while iline > stopline + " find a line that has less depth + let depth = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e') +" call Decho("considering line#".line(".").": ".getline('.')) + if depth < curdepth + break + endif + norm! k + endwhile +" call Decho("squeezing at line#".line(".").": ".getline('.')) + call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,s:NetrwGetWord())) + endif +" call Dret("s:TreeSqueezeDir") +endfun + +" --------------------------------------------------------------------- +" s:NetrwMaps: {{{2 +fun! s:NetrwMaps(islocal) +" call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") + + if g:netrw_mousemaps && g:netrw_retmap +" call Decho("set up Rexplore 2-leftmouse") + if !hasmapto("NetrwReturn") + if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$' +" call Decho("making map for 2-leftmouse") + nmap <2-leftmouse> NetrwReturn + elseif maparg("","n") == "" +" call Decho("making map for c-leftmouse") + nmap NetrwReturn endif endif + nno NetrwReturn :Rexplore +" call Decho("made NetrwReturn map") + endif + + if a:islocal +" call Decho("make local maps") + " local normal-mode maps + nnoremap a :call NetrwHide(1) + nnoremap % :call NetrwOpenFile(1) + nnoremap c :call NetrwLcd(b:netrw_curdir) + nnoremap C :let g:netrw_chgwin= winnr() + nnoremap :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord())) + nnoremap :call TreeSqueezeDir(1) + nnoremap d :call NetrwMakeDir("") + nnoremap - :call NetrwBrowseUpDir(1) + nnoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) + nnoremap gd :call NetrwForceChgDir(1,NetrwGetWord()) + nnoremap gf :call NetrwForceFile(1,NetrwGetWord()) + nnoremap gh :call NetrwHidden(1) + nnoremap gp :call NetrwChgPerm(1,b:netrw_curdir) + nnoremap I :call NetrwBannerCtrl(1) + nnoremap i :call NetrwListStyle(1) + nnoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) + nnoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) + nnoremap mc :call NetrwMarkFileCopy(1) + nnoremap md :call NetrwMarkFileDiff(1) + nnoremap me :call NetrwMarkFileEdit(1) + nnoremap mf :call NetrwMarkFile(1,NetrwGetWord()) + nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) + nnoremap mg :call NetrwMarkFileGrep(1) + nnoremap mh :call NetrwMarkHideSfx(1) + nnoremap mm :call NetrwMarkFileMove(1) + nnoremap mp :call NetrwMarkFilePrint(1) + nnoremap mr :call NetrwMarkFileRegexp(1) + nnoremap ms :call NetrwMarkFileSource(1) + nnoremap mt :call NetrwMarkFileTgt(1) + nnoremap mT :call NetrwMarkFileTag(1) + nnoremap mu :call NetrwUnMarkFile(1) + nnoremap mx :call NetrwMarkFileExe(1) + nnoremap mX :call NetrwMarkFileVimCmd(1) + nnoremap mz :call NetrwMarkFileCompress(1) + nnoremap O :call NetrwObtain(1) + nnoremap o :call NetrwSplit(3) + nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) + nnoremap P :call NetrwPrevWinOpen(1) + nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) + nnoremap qf :call NetrwFileInfo(1,NetrwGetWord()) + nnoremap qF :call NetrwMarkFileQFEL(1,getqflist()) + nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) + nnoremap s :call NetrwSortStyle(1) + nnoremap S :call NetSortSequence(1) + nnoremap t :call NetrwSplit(4) + nnoremap Tb :call NetrwSetTgt('b',v:count1) + nnoremap Th :call NetrwSetTgt('h',v:count) + nnoremap u :call NetrwBookHistHandler(4,expand("%")) + nnoremap U :call NetrwBookHistHandler(5,expand("%")) + nnoremap v :call NetrwSplit(5) + nnoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),0),0)" + nnoremap X :call NetrwLocalExecute(expand(""))" + " local insert-mode maps + inoremap a :call NetrwHide(1) + inoremap c :exe "keepjumps lcd ".fnameescape(b:netrw_curdir) + inoremap c :call NetrwLcd(b:netrw_curdir) + inoremap C :let g:netrw_chgwin= winnr() + inoremap % :call NetrwOpenFile(1) + inoremap - :call NetrwBrowseUpDir(1) + inoremap :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord())) + inoremap :call TreeSqueezeDir(1) + inoremap d :call NetrwMakeDir("") + inoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) + inoremap gh :call NetrwHidden(1) + inoremap gp :call NetrwChgPerm(1,b:netrw_curdir) + inoremap I :call NetrwBannerCtrl(1) + inoremap i :call NetrwListStyle(1) + inoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) + inoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) + inoremap mc :call NetrwMarkFileCopy(1) + inoremap md :call NetrwMarkFileDiff(1) + inoremap me :call NetrwMarkFileEdit(1) + inoremap mf :call NetrwMarkFile(1,NetrwGetWord()) + inoremap mg :call NetrwMarkFileGrep(1) + inoremap mh :call NetrwMarkHideSfx(1) + inoremap mm :call NetrwMarkFileMove(1) + inoremap mp :call NetrwMarkFilePrint(1) + inoremap mr :call NetrwMarkFileRegexp(1) + inoremap ms :call NetrwMarkFileSource(1) + inoremap mT :call NetrwMarkFileTag(1) + inoremap mt :call NetrwMarkFileTgt(1) + inoremap mu :call NetrwUnMarkFile(1) + inoremap mx :call NetrwMarkFileExe(1) + inoremap mX :call NetrwMarkFileVimCmd(1) + inoremap mz :call NetrwMarkFileCompress(1) + inoremap O :call NetrwObtain(1) + inoremap o :call NetrwSplit(3) + inoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) + inoremap P :call NetrwPrevWinOpen(1) + inoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) + inoremap qf :call NetrwFileInfo(1,NetrwGetWord()) + inoremap qF :call NetrwMarkFileQFEL(1,getqflist()) + inoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) + inoremap s :call NetrwSortStyle(1) + inoremap S :call NetSortSequence(1) + inoremap t :call NetrwSplit(4) + inoremap Tb :call NetrwSetTgt('b',v:count1) + inoremap Th :call NetrwSetTgt('h',v:count) + inoremap u :call NetrwBookHistHandler(4,expand("%")) + inoremap U :call NetrwBookHistHandler(5,expand("%")) + inoremap v :call NetrwSplit(5) + inoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),0),0)" + if !hasmapto('NetrwHideEdit') + nmap NetrwHideEdit + imap NetrwHideEdit + endif + nnoremap NetrwHideEdit :call NetrwHideEdit(1) + if !hasmapto('NetrwRefresh') + nmap NetrwRefresh + imap NetrwRefresh + endif + nnoremap NetrwRefresh :call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) + if s:didstarstar || !mapcheck("","n") + nnoremap :Nexplore + inoremap :Nexplore + endif + if s:didstarstar || !mapcheck("","n") + nnoremap :Pexplore + inoremap :Pexplore + endif + let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape) + if g:netrw_mousemaps == 1 + nmap NetrwLeftmouse + nno NetrwLeftmouse :call NetrwLeftmouse(1) + nmap NetrwMiddlemouse + nno NetrwMiddlemouse :call NetrwPrevWinOpen(1) + nmap NetrwSLeftmouse + nno NetrwSLeftmouse :call NetrwSLeftmouse(1) + nmap NetrwSLeftdrag + nno NetrwSLeftdrag :call NetrwSLeftdrag(1) + nmap <2-leftmouse> Netrw2Leftmouse + nmap Netrw2Leftmouse - + imap ILeftmouse + ino ILeftmouse :call NetrwLeftmouse(1) + imap IMiddlemouse + ino IMiddlemouse :call NetrwPrevWinOpen(1) + imap ISLeftmouse + ino ISLeftmouse :call NetrwMarkFile(1,NetrwGetWord()) + exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'inoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + endif + exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'nnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'nnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' + exe 'nnoremap d :call NetrwMakeDir("")' + exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'vnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'vnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' + exe 'inoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'inoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'inoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' + exe 'inoremap d :call NetrwMakeDir("")' + nnoremap :he netrw-quickhelp + + else " remote +" call Decho("make remote maps") + call s:RemotePathAnalysis(b:netrw_curdir) + " remote normal-mode maps + nnoremap :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord())) + nnoremap :call TreeSqueezeDir(0) + nnoremap :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) + nnoremap - :call NetrwBrowseUpDir(0) + nnoremap a :call NetrwHide(0) + nnoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) + nnoremap mc :call NetrwMarkFileCopy(0) + nnoremap md :call NetrwMarkFileDiff(0) + nnoremap me :call NetrwMarkFileEdit(0) + nnoremap mf :call NetrwMarkFile(0,NetrwGetWord()) + nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) + nnoremap mg :call NetrwMarkFileGrep(0) + nnoremap mh :call NetrwMarkHideSfx(0) + nnoremap mm :call NetrwMarkFileMove(0) + nnoremap mp :call NetrwMarkFilePrint(0) + nnoremap mr :call NetrwMarkFileRegexp(0) + nnoremap ms :call NetrwMarkFileSource(0) + nnoremap mt :call NetrwMarkFileTgt(0) + nnoremap mT :call NetrwMarkFileTag(0) + nnoremap mu :call NetrwUnMarkFile(0) + nnoremap mx :call NetrwMarkFileExe(0) + nnoremap mX :call NetrwMarkFileVimCmd(0) + nnoremap mz :call NetrwMarkFileCompress(0) + nnoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) + nnoremap gd :call NetrwForceChgDir(0,NetrwGetWord()) + nnoremap gf :call NetrwForceFile(0,NetrwGetWord()) + nnoremap gh :call NetrwHidden(0) + nnoremap gp :call NetrwChgPerm(0,b:netrw_curdir) + nnoremap C :let g:netrw_chgwin= winnr() + nnoremap i :call NetrwListStyle(0) + nnoremap I :call NetrwBannerCtrl(1) + nnoremap o :call NetrwSplit(0) + nnoremap O :call NetrwObtain(0) + nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) + nnoremap P :call NetrwPrevWinOpen(0) + nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) + nnoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) + nnoremap qf :call NetrwFileInfo(0,NetrwGetWord()) + nnoremap qF :call NetrwMarkFileQFEL(0,getqflist()) + nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./')) + nnoremap s :call NetrwSortStyle(0) + nnoremap S :call NetSortSequence(0) + nnoremap t :call NetrwSplit(1) + nnoremap Tb :call NetrwSetTgt('b',v:count1) + nnoremap Th :call NetrwSetTgt('h',v:count) + nnoremap u :call NetrwBookHistHandler(4,b:netrw_curdir) + nnoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) + nnoremap v :call NetrwSplit(2) + nnoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(0,NetrwGetWord()),1) + nnoremap % :call NetrwOpenFile(0) + " remote insert-mode maps + inoremap :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord())) + inoremap :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) + inoremap :call TreeSqueezeDir(0) + inoremap - :call NetrwBrowseUpDir(0) + inoremap a :call NetrwHide(0) + inoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) + inoremap mc :call NetrwMarkFileCopy(0) + inoremap md :call NetrwMarkFileDiff(0) + inoremap me :call NetrwMarkFileEdit(0) + inoremap mf :call NetrwMarkFile(0,NetrwGetWord()) + inoremap mg :call NetrwMarkFileGrep(0) + inoremap mh :call NetrwMarkHideSfx(0) + inoremap mm :call NetrwMarkFileMove(0) + inoremap mp :call NetrwMarkFilePrint(0) + inoremap mr :call NetrwMarkFileRegexp(0) + inoremap ms :call NetrwMarkFileSource(0) + inoremap mt :call NetrwMarkFileTgt(0) + inoremap mT :call NetrwMarkFileTag(0) + inoremap mu :call NetrwUnMarkFile(0) + inoremap mx :call NetrwMarkFileExe(0) + inoremap mX :call NetrwMarkFileVimCmd(0) + inoremap mz :call NetrwMarkFileCompress(0) + inoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) + inoremap gh :call NetrwHidden(0) + inoremap gp :call NetrwChgPerm(0,b:netrw_curdir) + inoremap C :let g:netrw_chgwin= winnr() + inoremap i :call NetrwListStyle(0) + inoremap I :call NetrwBannerCtrl(1) + inoremap o :call NetrwSplit(0) + inoremap O :call NetrwObtain(0) + inoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) + inoremap P :call NetrwPrevWinOpen(0) + inoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) + inoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) + inoremap qf :call NetrwFileInfo(0,NetrwGetWord()) + inoremap qF :call NetrwMarkFileQFEL(0,getqflist()) + inoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./')) + inoremap s :call NetrwSortStyle(0) + inoremap S :call NetSortSequence(0) + inoremap t :call NetrwSplit(1) + inoremap Tb :call NetrwSetTgt('b',v:count1) + inoremap Th :call NetrwSetTgt('h',v:count) + inoremap u :call NetrwBookHistHandler(4,b:netrw_curdir) + inoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) + inoremap v :call NetrwSplit(2) + inoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(0,NetrwGetWord()),1) + inoremap % :call NetrwOpenFile(0) + if !hasmapto('NetrwHideEdit') + nmap NetrwHideEdit + imap NetrwHideEdit + endif + nnoremap NetrwHideEdit :call NetrwHideEdit(0) + if !hasmapto('NetrwRefresh') + nmap NetrwRefresh + imap NetrwRefresh + endif + + let mapsafepath = escape(s:path, s:netrw_map_escape) + let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape) + + nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) + if g:netrw_mousemaps == 1 + nmap NetrwLeftmouse + nno NetrwLeftmouse :call NetrwLeftmouse(0) + nmap NetrwLeftdrag + nno NetrwLeftdrag :call NetrwLeftdrag(0) + nmap NetrwSLeftmouse + nno NetrwSLeftmouse :call NetrwSLeftmouse(0) + nmap NetrwSLeftdrag + nno NetrwSLeftdrag :call NetrwSLeftdrag(0) + nmap NetrwMiddlemouse + nno NetrwMiddlemouse :call NetrwPrevWinOpen(0) + nmap <2-leftmouse> Netrw2Leftmouse + nmap Netrw2Leftmouse - + imap ILeftmouse + ino ILeftmouse :call NetrwLeftmouse(0) + imap IMiddlemouse + ino IMiddlemouse :call NetrwPrevWinOpen(0) + imap ISLeftmouse + ino ISLeftmouse :call NetrwMarkFile(0,NetrwGetWord()) + exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'inoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + endif + exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'nnoremap d :call NetrwMakeDir("'.mapsafeusermach.'")' + exe 'nnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'nnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'inoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'inoremap d :call NetrwMakeDir("'.mapsafeusermach.'")' + exe 'inoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'inoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' + nnoremap :he netrw-quickhelp + inoremap :he netrw-quickhelp + endif - if v:shell_error == 0 - " refresh listing -" call Decho("refresh listing") - let svpos= netrw#NetrwSavePosn() - call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) - call netrw#NetrwRestorePosn(svpos) - elseif !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",26) - endif -" redraw! + keepj call s:SetRexDir(a:islocal,b:netrw_curdir) - elseif !exists("b:netrw_method") || b:netrw_method == 4 - " Remote mkdir: -" call Decho("remote mkdir") - let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd) - let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname -" call Decho("exe sil! !".mkdircmd." ".shellescape(newdirname,1)) - exe "sil! !".mkdircmd." ".shellescape(newdirname,1) - if v:shell_error == 0 - " refresh listing - let svpos= netrw#NetrwSavePosn() - keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) - keepj call netrw#NetrwRestorePosn(svpos) - elseif !exists("g:netrw_quiet") - keepj call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27) - endif -" redraw! +" call Dret("s:NetrwMaps") +endfun - elseif b:netrw_method == 2 - let svpos= netrw#NetrwSavePosn() - call s:NetrwRemoteFtpCmd("",g:netrw_remote_mkdir.' "'.newdirname.'"') - keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) - keepj call netrw#NetrwRestorePosn(svpos) - elseif b:netrw_method == 3 - let svpos= netrw#NetrwSavePosn() - call s:NetrwRemoteFtpCmd("",g:netrw_remote_mkdir.' "'.newdirname.'"') - keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) - keepj call netrw#NetrwRestorePosn(svpos) +" --------------------------------------------------------------------- +" s:NetrwCommands: sets up commands available only in the netrw buffer windows {{{2 +fun! s:NetrwCommands(islocal) +" call Dfunc("s:NetrwCommands(islocal=".a:islocal.")") + + com! Rexplore if exists("w:netrw_rexlocal")|call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")|else|call netrw#ErrorMsg(s:WARNING,"not a former netrw window",79)|endif + if a:islocal + com! -buffer -nargs=+ -complete=file MF call s:NetrwMarkFiles(1,) + else + com! -buffer -nargs=+ -complete=file MF call s:NetrwMarkFiles(0,) endif + com! -buffer -nargs=? -complete=file MT call s:NetrwMarkTarget() - let @@= ykeep -" call Dret("NetrwMakeDir") +" call Dret("s:NetrwCommands") +endfun + +" --------------------------------------------------------------------- +" s:NetrwMarkFiles: apply s:NetrwMarkFile() to named file(s) {{{2 +" glob()ing only works with local files +fun! s:NetrwMarkFiles(islocal,...) +" call Dfunc("s:NetrwMarkFiles(islocal=".a:islocal."...) a:0=".a:0) + let i = 1 + while i <= a:0 + if a:islocal + let mffiles= glob(a:{i},0,1) + else + let mffiles= [a:{i}] + endif +" call Decho("mffiles".string(mffiles)) + for mffile in mffiles +" call Decho("mffile<".mffile.">") + call s:NetrwMarkFile(a:islocal,mffile) + endfor + let i= i + 1 + endwhile +" call Dret("s:NetrwMarkFiles") +endfun + +" --------------------------------------------------------------------- +" s:NetrwMarkTarget: {{{2 +fun! s:NetrwMarkTarget(...) +" call Dfunc("s:NetrwMarkTarget() a:0=".a:0) + if a:0 == 0 || (a:0 == 1 && a:1 == "") + let tgt= b:netrw_curdir + else + let tgt= a:1 + endif +" call Decho("tgt<".tgt.">") + let s:netrwmftgt = tgt + let s:netrwmftgt_islocal = tgt !~ '^\a\+://' + let curislocal = b:netrw_curdir !~ '^\a\+://' + let svpos = netrw#SavePosn() + call s:NetrwRefresh(curislocal,s:NetrwBrowseChgDir(curislocal,'./')) + call netrw#RestorePosn(svpos) +" call Dret("s:NetrwMarkTarget") endfun " --------------------------------------------------------------------- @@ -5324,7 +5765,16 @@ let ykeep = @@ let curbufnr= bufnr("%") let curdir = b:netrw_curdir - let trailer = '[@=|\/\*]\=\ze\%( \|\t\|$\)' + if a:fname =~ '^\a' + let leader= '\<' + else + let leader= '' + endif + if a:fname =~ '\a$' + let trailer = '\>[@=|\/\*]\=\ze\%( \|\t\|$\)' + else + let trailer = '[@=|\/\*]\=\ze\%( \|\t\|$\)' + endif if exists("s:netrwmarkfilelist_{curbufnr}") " markfile list pre-exists @@ -5336,7 +5786,7 @@ " append filename to buffer's markfilelist " call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">") call add(s:netrwmarkfilelist_{curbufnr},a:fname) - let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|\<'.escape(a:fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").trailer + let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|'.leader.escape(a:fname,g:netrw_markfileesc).trailer else " remove filename from buffer's markfilelist @@ -5350,12 +5800,12 @@ " rebuild match list to display markings correctly " call Decho("rebuild s:netrwmarkfilemtch_".curbufnr) let s:netrwmarkfilemtch_{curbufnr}= "" - let first = 1 + let first = 1 for fname in s:netrwmarkfilelist_{curbufnr} if first - let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\<'.escape(fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").trailer + let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.leader.escape(fname,g:netrw_markfileesc).trailer else - let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|\<'.escape(fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").trailer + let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|'.leader.escape(fname,g:netrw_markfileesc).trailer endif let first= 0 endfor @@ -5373,9 +5823,9 @@ " build initial markfile matching pattern if a:fname =~ '/$' - let s:netrwmarkfilemtch_{curbufnr}= '\<'.escape(a:fname,g:netrw_markfileesc) + let s:netrwmarkfilemtch_{curbufnr}= leader.escape(a:fname,g:netrw_markfileesc) else - let s:netrwmarkfilemtch_{curbufnr}= '\<'.escape(a:fname,g:netrw_markfileesc).trailer + let s:netrwmarkfilemtch_{curbufnr}= leader.escape(a:fname,g:netrw_markfileesc).trailer endif " call Decho("ending s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">") endif @@ -5427,7 +5877,7 @@ " g:netrw_decompress = { ".gz" : "gunzip" , ".bz2" : "bunzip2" , ".zip" : "unzip" , ".tar" : "tar -xf", ".xz" : "unxz"} fun! s:NetrwMarkFileCompress(islocal) " call Dfunc("s:NetrwMarkFileCompress(islocal=".a:islocal.")") - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let curdir = b:netrw_curdir let curbufnr = bufnr("%") @@ -5482,7 +5932,7 @@ call s:NetrwUnmarkList(curbufnr,curdir) keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) endif " call Dret("s:NetrwMarkFileCompress") endfun @@ -5596,7 +6046,7 @@ elseif !a:islocal && s:netrwmftgt_islocal " Copy marked files, remote directory to local directory " call Decho("copy from remote to local") - keepj call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) + keepj call netrw#Obtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) elseif !a:islocal && !s:netrwmftgt_islocal " Copy marked files, remote directory to remote directory @@ -5617,15 +6067,15 @@ endif endif if isdirectory(tmpdir) - exe "keepj lcd ".fnameescape(tmpdir) - keepj call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir) + call s:NetrwLcd(tmpdir) + keepj call netrw#Obtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir) let localfiles= map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")') keepj call s:NetrwUpload(localfiles,s:netrwmftgt) if getcwd() == tmpdir for fname in s:netrwmarkfilelist_{bufnr('%')} keepj call s:NetrwDelete(fname) endfor - exe "keepj lcd ".fnameescape(curdir) + call s:NetrwLcd(curdir) exe "sil !".g:netrw_localrmdir." ".shellescape(tmpdir,1) if v:shell_error != 0 call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",80) @@ -5633,7 +6083,7 @@ return endif else - exe "keepj lcd ".fnameescape(curdir) + call s:NetrwLcd(curdir) endif endif endif @@ -5655,7 +6105,7 @@ keepj call s:NetrwRefreshDir(a:islocal,curdir) endif if g:netrw_fastbrowse <= 1 - keepj call s:LocalBrowseShellCmdRefresh() + keepj call s:LocalBrowseRefresh() endif " call Dret("s:NetrwMarkFileCopy 1") @@ -5679,7 +6129,7 @@ endif " call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr})) - if exists("s:netrwmarkfilelist_{."curbufnr}") + if exists("s:netrwmarkfilelist_{".curbufnr."}") let cnt = 0 let curdir = b:netrw_curdir for fname in s:netrwmarkfilelist @@ -5771,7 +6221,7 @@ " Uses the local marked-file list. fun! s:NetrwMarkFileExe(islocal) " call Dfunc("s:NetrwMarkFileExe(islocal=".a:islocal.")") - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let curdir = b:netrw_curdir let curbufnr = bufnr("%") @@ -5829,7 +6279,7 @@ " refresh the listing keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) else keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif @@ -5843,7 +6293,7 @@ " Uses the local marked file list. fun! s:NetrwMarkHideSfx(islocal) " call Dfunc("s:NetrwMarkHideSfx(islocal=".a:islocal.")") - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let curbufnr = bufnr("%") " s:netrwmarkfilelist_{curbufnr}: the List of marked files @@ -5886,7 +6336,7 @@ " refresh the listing keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) else keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif @@ -5899,7 +6349,7 @@ " Uses the local marked-file list. fun! s:NetrwMarkFileVimCmd(islocal) " call Dfunc("s:NetrwMarkFileVimCmd(islocal=".a:islocal.")") - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let curdir = b:netrw_curdir let curbufnr = bufnr("%") @@ -5943,7 +6393,7 @@ " refresh the listing keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) else keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif @@ -5957,7 +6407,7 @@ " Uses the local marked file list. fun! s:NetrwMarkHideSfx(islocal) " call Dfunc("s:NetrwMarkHideSfx(islocal=".a:islocal.")") - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let curbufnr = bufnr("%") " s:netrwmarkfilelist_{curbufnr}: the List of marked files @@ -6000,7 +6450,7 @@ " refresh the listing keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) else keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif @@ -6013,7 +6463,7 @@ " Uses the global markfilelist fun! s:NetrwMarkFileGrep(islocal) " call Dfunc("s:NetrwMarkFileGrep(islocal=".a:islocal.")") - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let curbufnr = bufnr("%") if exists("s:netrwmarkfilelist") @@ -6053,7 +6503,7 @@ echo "(use :cn, :cp to navigate, :Rex to return)" 2match none - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) if exists("nonisi") " original, user-supplied pattern did not begin with a character from isident @@ -6094,7 +6544,7 @@ if a:islocal && s:netrwmftgt_islocal " move: local -> local " call Decho("move from local to local") -" call Decho("(s:NetrwMarkFileMove) local to local move") +" call Decho("local to local move") if !executable(g:netrw_localmovecmd) && g:netrw_localmovecmd !~ '\ not executable on your system, aborting",90) " call Dfunc("s:NetrwMarkFileMove : g:netrw_localmovecmd<".g:netrw_localmovecmd."> n/a!") @@ -6189,7 +6639,7 @@ endif if g:netrw_fastbrowse <= 1 " call Decho("since g:netrw_fastbrowse=".g:netrw_fastbrowse.", perform shell cmd refresh") - keepj call s:LocalBrowseShellCmdRefresh() + keepj call s:LocalBrowseRefresh() endif " call Dret("s:NetrwMarkFileMove") @@ -6267,8 +6717,8 @@ let eikeep = &ei let areg = @a sil keepj %y a - set ei=all ma -" call Decho("set ei=all ma") + setl ei=all ma +" call Decho("setl ei=all ma") 1split keepj call s:NetrwEnew() keepj call s:NetrwSafeOptions() @@ -6276,7 +6726,7 @@ keepj 2 let bannercnt= search('^" =====','W') exe "sil keepj 1,".bannercnt."d" - set bt=nofile + setl bt=nofile if g:netrw_liststyle == s:LONGLIST sil keepj %s/\s\{2,}\S.*$//e call histdel("/",-1) @@ -6284,7 +6734,7 @@ sil keepj %s/\s\{2,}/\r/ge call histdel("/",-1) elseif g:netrw_liststyle == s:TREELIST - sil keepj %s/^| //e + exe 'sil keepj %s/^'.s:treedepthstring.' //e' sil! keepj g/^ .*$/d call histdel("/",-1) call histdel("/",-1) @@ -6348,7 +6798,7 @@ " Uses the global markfilelist fun! s:NetrwMarkFileTag(islocal) " call Dfunc("s:NetrwMarkFileTag(islocal=".a:islocal.")") - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let curdir = b:netrw_curdir let curbufnr = bufnr("%") @@ -6374,7 +6824,7 @@ endif else let cmd = s:RemoteSystem(g:netrw_ctags." ".netrwmarkfilelist) - call netrw#NetrwObtain(a:islocal,"tags") + call netrw#Obtain(a:islocal,"tags") let curdir= b:netrw_curdir 1split e tags @@ -6386,7 +6836,7 @@ endif 2match none call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - call netrw#NetrwRestorePosn(svpos) + call netrw#RestorePosn(svpos) endif " call Dret("s:NetrwMarkFileTag") @@ -6400,7 +6850,7 @@ " 1=target directory is local fun! s:NetrwMarkFileTgt(islocal) " call Dfunc("s:NetrwMarkFileTgt(islocal=".a:islocal.")") - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let curdir = b:netrw_curdir let hadtgt = exists("s:netrwmftgt") if !exists("w:netrw_bannercnt") @@ -6414,10 +6864,10 @@ " call Decho("cursor in banner region, and target already is <".b:netrw_curdir.">: removing target") unlet s:netrwmftgt s:netrwmftgt_islocal if g:netrw_fastbrowse <= 1 - call s:LocalBrowseShellCmdRefresh() + call s:LocalBrowseRefresh() endif call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - call netrw#NetrwRestorePosn(svpos) + call netrw#RestorePosn(svpos) " call Dret("s:NetrwMarkFileTgt : removed target") return else @@ -6454,10 +6904,10 @@ let s:netrwmftgt_islocal= a:islocal if g:netrw_fastbrowse <= 1 - call s:LocalBrowseShellCmdRefresh() + call s:LocalBrowseRefresh() endif call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - call netrw#NetrwRestorePosn(svpos) + call netrw#RestorePosn(svpos) if !hadtgt sil! keepj norm! j endif @@ -6559,7 +7009,7 @@ " s:NetrwUnMarkFile: {{{2 fun! s:NetrwUnMarkFile(islocal) " call Dfunc("s:NetrwUnMarkFile(islocal=".a:islocal.")") - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let curbufnr = bufnr("%") " unmark marked file list (although I expect s:NetrwUpload() @@ -6573,7 +7023,7 @@ endif " call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - call netrw#NetrwRestorePosn(svpos) + call netrw#RestorePosn(svpos) " call Dret("s:NetrwUnMarkFile") endfun @@ -6688,10 +7138,10 @@ let ykeep= @@ if exists("s:netrwmarkfilelist_{bufnr('%')}") let islocal= s:netrwmarkfilelist_{bufnr('%')}[1] !~ '^\a\+://' - call netrw#NetrwObtain(islocal,s:netrwmarkfilelist_{bufnr('%')}) + call netrw#Obtain(islocal,s:netrwmarkfilelist_{bufnr('%')}) call s:NetrwUnmarkList(bufnr('%'),b:netrw_curdir) else - call netrw#NetrwObtain(a:islocal,expand("")) + call netrw#Obtain(a:islocal,expand("")) endif let @@= ykeep @@ -6707,19 +7157,22 @@ " choice = 2 : didn't save modified file, opened window " choice = 3 : cancel open fun! s:NetrwPrevWinOpen(islocal) -" call Dfunc("NetrwPrevWinOpen(islocal=".a:islocal.")") +" call Dfunc("s:NetrwPrevWinOpen(islocal=".a:islocal.")") let ykeep= @@ " grab a copy of the b:netrw_curdir to pass it along to newly split windows - let curdir = b:netrw_curdir + let curdir = b:netrw_curdir " get last window number and the word currently under the cursor + let origwin = winnr() let lastwinnr = winnr("$") let curword = s:NetrwGetWord() let choice = 0 -" call Decho("lastwinnr=".lastwinnr." curword<".curword.">") + let s:treedir = s:NetrwTreeDir() + let curdir = s:treedir +" call Decho("winnr($)#".lastwinnr." curword<".curword.">") - let didsplit = 0 + let didsplit = 0 if lastwinnr == 1 " if only one window, open a new one first " call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")") @@ -6732,68 +7185,73 @@ " call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s") exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" endif - let didsplit = 1 + let didsplit = 1 +" call Decho("did split") else keepj call s:SaveBufVars() -" call Decho("wincmd p") + let eikeep= &ei + setl ei=all wincmd p +" call Decho("wincmd p (now in win#".winnr().") curdir<".curdir.">") + + " prevwinnr: the window number of the "prev" window + " prevbufnr: the buffer number of the buffer in the "prev" window + " bnrcnt : the qty of windows open on the "prev" buffer + let prevwinnr = winnr() + let prevbufnr = bufnr("%") + let prevbufname = bufname("%") + let prevmod = &mod + let bnrcnt = 0 keepj call s:RestoreBufVars() - " if the previous window's buffer has been changed (is modified), +" call Decho("after wincmd p: win#".winnr()." win($)#".winnr("$")." origwin#".origwin." &mod=".&mod." bufname(%)<".bufname("%")."> prevbufnr=".prevbufnr) + + " if the previous window's buffer has been changed (ie. its modified flag is set), " and it doesn't appear in any other extant window, then ask the " user if s/he wants to abandon modifications therein. - let bnr = winbufnr(0) - let bnrcnt = 0 - if &mod -" call Decho("detected: prev window's buffer has been modified: bnr=".bnr." winnr#".winnr()) - let eikeep= &ei - set ei=all - windo if winbufnr(0) == bnr | let bnrcnt=bnrcnt+1 | endif - exe bnr."wincmd p" - let &ei= eikeep -" call Decho("bnr=".bnr." bnrcnt=".bnrcnt." buftype=".&bt." winnr#".winnr()) - if bnrcnt == 1 - let bufname = bufname(winbufnr(winnr())) - let choice = confirm("Save modified file<".bufname.">?","&Yes\n&No\n&Cancel") -" call Decho("bufname<".bufname."> choice=".choice." winnr#".winnr()) + if prevmod +" call Decho("detected that prev window's buffer has been modified: prevbufnr=".prevbufnr." winnr()#".winnr()) + windo if winbufnr(0) == prevbufnr | let bnrcnt=bnrcnt+1 | endif +" call Decho("prevbufnr=".prevbufnr." bnrcnt=".bnrcnt." buftype=".&bt." winnr()=".winnr()." prevwinnr#".prevwinnr) + exe prevwinnr."wincmd w" + + if bnrcnt == 1 && &hidden == 0 + " only one copy of the modified buffer in a window, and + " hidden not set, so overwriting will lose the modified file. Ask first... + let choice = confirm("Save modified buffer<".prevbufname."> first?","&Yes\n&No\n&Cancel") +" call Decho("(NetrwPrevWinOpen) prevbufname<".prevbufname."> choice=".choice." current-winnr#".winnr()) + let &ei= eikeep if choice == 1 " Yes -- write file & then browse let v:errmsg= "" sil w if v:errmsg != "" - call netrw#ErrorMsg(s:ERROR,"unable to write <".bufname.">!",30) - if didsplit - q - else - wincmd p - endif - let @@= ykeep -" call Dret("NetrwPrevWinOpen ".choice." : unable to write <".bufname.">") + call netrw#ErrorMsg(s:ERROR,"unable to write <".prevbufname.">!",30) + exe origwin."wincmd w" + let &ei = eikeep + let @@ = ykeep +" call Dret("s:NetrwPrevWinOpen ".choice." : unable to write <".prevbufname.">") return choice endif elseif choice == 2 " No -- don't worry about changed file, just browse anyway -" call Decho("(NetrwPrevWinOpen) setl nomod") - setl nomod -" call Decho("(NetrwPrevWinOpen) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") - keepj call netrw#ErrorMsg(s:WARNING,bufname." changes to ".bufname." abandoned",31) - wincmd p +" call Decho("don't worry about chgd file, just browse anyway (winnr($)#".winnr("$").")") + echomsg "**note** changes to ".prevbufname." abandoned" else " Cancel -- don't do this - if didsplit - q - else - wincmd p - endif - let @@= ykeep -" call Dret("NetrwPrevWinOpen ".choice." : cancelled") +" call Decho("cancel, don't browse, switch to win#".origwin) + exe origwin."wincmd w" + let &ei= eikeep + let @@ = ykeep +" call Dret("s:NetrwPrevWinOpen ".choice." : cancelled") return choice endif endif endif + let &ei= eikeep endif " restore b:netrw_curdir (window split/enew may have lost it) @@ -6806,7 +7264,7 @@ endif endif let @@= ykeep -" call Dret("NetrwPrevWinOpen ".choice) +" call Dret("s:NetrwPrevWinOpen ".choice) return choice endfun @@ -6855,7 +7313,7 @@ " call Decho("handle uploading a list of files via scp") let curdir= getcwd() if a:tgt =~ '^scp:' - exe "keepjumps sil lcd ".fnameescape(fromdir) + call s:NetrwLcd(fromdir) let filelist= deepcopy(s:netrwmarkfilelist_{bufnr('%')}) let args = join(map(filelist,"shellescape(v:val, 1)")) if exists("g:netrw_port") && g:netrw_port != "" @@ -6867,7 +7325,7 @@ let tgt = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','') " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".args." ".shellescape(machine.":".tgt,1)) exe s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".args." ".shellescape(machine.":".tgt,1) - exe "keepjumps sil lcd ".fnameescape(curdir) + call s:NetrwLcd(curdir) elseif a:tgt =~ '^ftp:' call s:NetrwMethod(a:tgt) @@ -7035,7 +7493,7 @@ " call Decho("setl ma noro") " call Decho("clear buffer<".expand("%")."> with :%d") let ykeep = @@ - let screenposn = netrw#NetrwSavePosn() + let screenposn = netrw#SavePosn() " call Decho("clearing buffer prior to refresh") sil! keepj %d if a:islocal @@ -7043,7 +7501,7 @@ else keepj call s:NetrwBrowse(a:islocal,a:dirname) endif - keepj call netrw#NetrwRestorePosn(screenposn) + keepj call netrw#RestorePosn(screenposn) " restore file marks if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" @@ -7062,7 +7520,7 @@ " --------------------------------------------------------------------- " s:NetrwRefreshDir: refreshes a directory by name {{{2 " Called by NetrwMarkFileCopy() -" Interfaces to s:NetrwRefresh() and s:LocalBrowseShellCmdRefresh() +" Interfaces to s:NetrwRefresh() and s:LocalBrowseRefresh() fun! s:NetrwRefreshDir(islocal,dirname) " call Dfunc("s:NetrwRefreshDir(islocal=".a:islocal." dirname<".a:dirname.">) g:netrw_fastbrowse=".g:netrw_fastbrowse) if g:netrw_fastbrowse == 0 @@ -7087,7 +7545,7 @@ elseif g:netrw_fastbrowse <= 1 " call Decho("medium-speed mode: refresh local buffers only") - keepj call s:LocalBrowseShellCmdRefresh() + keepj call s:LocalBrowseRefresh() endif " call Dret("s:NetrwRefreshDir") endfun @@ -7149,7 +7607,7 @@ let priority = priority + 1 endwhile if exists("starpriority") - exe 'sil keepj '.w:netrw_bannercnt.',$v/^\d\{3}'.g:netrw_sepchr.'/s/^/'.starpriority.'/' + exe 'sil keepj '.w:netrw_bannercnt.',$v/^\d\{3}'.g:netrw_sepchr.'/s/^/'.starpriority.'/e' keepj call histdel("/",-1) endif @@ -7178,7 +7636,7 @@ " supports choosing a bookmark as a target using a qb-generated list let choice= a:choice - 1 if exists("g:netrw_bookmarklist[".choice."]") - call netrw#NetrwMakeTgt(g:netrw_bookmarklist[choice]) + call netrw#MakeTgt(g:netrw_bookmarklist[choice]) else echomsg "Sorry, bookmark#".a:choice." doesn't exist!" endif @@ -7188,7 +7646,7 @@ let choice= (a:choice % g:netrw_dirhistmax) + 1 if exists("g:netrw_dirhist_".choice) let histentry = g:netrw_dirhist_{choice} - call netrw#NetrwMakeTgt(histentry) + call netrw#MakeTgt(histentry) else echomsg "Sorry, history#".a:choice." not available!" endif @@ -7202,12 +7660,12 @@ fun! s:NetrwSortStyle(islocal) " call Dfunc("s:NetrwSortStyle(islocal=".a:islocal.") netrw_sort_by<".g:netrw_sort_by.">") keepj call s:NetrwSaveWordPosn() - let svpos= netrw#NetrwSavePosn() + let svpos= netrw#SavePosn() let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name' keepj norm! 0 keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) " call Dret("s:NetrwSortStyle : netrw_sort_by<".g:netrw_sort_by.">") endfun @@ -7269,13 +7727,29 @@ elseif a:mode == 4 " local and t let cursorword = s:NetrwGetWord() + let eikeep = &ei + let netrw_winnr = winnr() + let netrw_line = line(".") + let netrw_col = virtcol(".") + keepj norm! H0 + let netrw_hline = line(".") + setl ei=all + exe "keepj norm! ".netrw_hline."G0z\" + exe "keepj norm! ".netrw_line."G0".netrw_col."\" + let &ei= eikeep let netrw_curdir= s:NetrwTreeDir() " call Decho("tabnew") tabnew - let b:netrw_curdir= netrw_curdir - let s:didsplit= 1 + let b:netrw_curdir = netrw_curdir + let s:didsplit = 1 keepj call s:RestoreWinVars() keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,cursorword)) + if &ft == "netrw" + setl ei=all + exe "keepj norm! ".netrw_hline."G0z\" + exe "keepj norm! ".netrw_line."G0".netrw_col."\" + let &ei= eikeep + endif unlet s:didsplit elseif a:mode == 5 @@ -7322,7 +7796,7 @@ let ebmd= escape(bmd,g:netrw_menu_escape) " show bookmarks for goto menu " call Decho("menu: Targets: ".bmd) - exe 'sil! menu '.g:NetrwMenuPriority.".19.1.".cnt." ".g:NetrwTopLvlMenu.'Targets.'.ebmd." :call netrw#NetrwMakeTgt('".bmd."')\" + exe 'sil! menu '.g:NetrwMenuPriority.".19.1.".cnt." ".g:NetrwTopLvlMenu.'Targets.'.ebmd." :call netrw#MakeTgt('".bmd."')\" let cnt= cnt + 1 endfor endif @@ -7337,7 +7811,7 @@ let histentry = g:netrw_dirhist_{histcnt} let ehistentry = escape(histentry,g:netrw_menu_escape) " call Decho("menu: Targets: ".histentry) - exe 'sil! menu '.g:NetrwMenuPriority.".19.2.".priority." ".g:NetrwTopLvlMenu.'Targets.'.ehistentry." :call netrw#NetrwMakeTgt('".histentry."')\" + exe 'sil! menu '.g:NetrwMenuPriority.".19.2.".priority." ".g:NetrwTopLvlMenu.'Targets.'.ehistentry." :call netrw#MakeTgt('".histentry."')\" endif let histcnt = histcnt + 1 endwhile @@ -7350,60 +7824,57 @@ " s:NetrwTreeDir: determine tree directory given current cursor position {{{2 " (full path directory with trailing slash returned) fun! s:NetrwTreeDir() -" call Dfunc("NetrwTreeDir() curline#".line(".")."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">") +" call Dfunc("s:NetrwTreeDir() getline(".line(".").")"."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> ft=".&ft) - let treedir= b:netrw_curdir -" call Decho("(NetrwTreeDir) set initial treedir<".treedir.">") - let s:treecurpos= netrw#NetrwSavePosn() + if exists("s:treedir") + " s:NetrwPrevWinOpen opens a "previous" window -- and thus needs to and does call s:NetrwTreeDir early + let treedir= s:treedir + unlet s:treedir +" call Dret("s:NetrwTreeDir ".treedir) + return treedir + endif + if !exists("b:netrw_curdir") || b:netrw_curdir == "" + let b:netrw_curdir= getcwd() + endif + let treedir = b:netrw_curdir +" call Decho("set initial treedir<".treedir.">") + let s:treecurpos= netrw#SavePosn() if w:netrw_liststyle == s:TREELIST -" call Decho("(NetrwTreeDir) w:netrw_liststyle is TREELIST:") -" call Decho("(NetrwTreeDir) line#".line(".")." getline(.)<".getline('.')."> treecurpos<".string(s:treecurpos).">") +" call Decho("w:netrw_liststyle is TREELIST:") +" call Decho("line#".line(".")." getline(.)<".getline('.')."> treecurpos<".string(s:treecurpos).">") " extract tree directory if on a line specifying a subdirectory (ie. ends with "/") if getline('.') =~ '/$' - let treedir= substitute(getline('.'),'^\%(| \)*\([^|].\{-}\)$','\1','e') +" call Decho("extract tree subdirectory from current line") + let treedir= substitute(getline('.'),'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e') +" call Decho("treedir<".treedir.">") else +" call Decho("do not extract tree subdirectory from current line and set treedir to empty") let treedir= "" endif -" call Decho("(NetrwTreeDir) treedir<".treedir.">") " detect user attempting to close treeroot - if getline('.') !~ '|' && getline('.') != '..' -" call Decho("user attempted to close treeroot") +" call Decho("win#".winnr()." buf#".bufnr("%")."<".bufname("%").">") +" call Decho("getline(".line(".").")<".getline('.').'> '.((getline('.') =~ '^'.s:treedepthstring)? '=~' : '!~').' ^'.s:treedepthstring) + if getline('.') !~ '^'.s:treedepthstring && getline('.') != '..' +" call Decho("user may have attempted to close treeroot") " now force a refresh -" call Decho("(NetrwTreeDir) clear buffer<".expand("%")."> with :%d") +" call Decho("clear buffer<".expand("%")."> with :%d") sil! keepj %d -" call Dret("NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">") +" call Dret("s:NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">") return b:netrw_curdir +" else " Decho +" call Decho("user did not attempt to close treeroot") endif - " elide all non-depth information - let depth = substitute(getline('.'),'^\(\%(| \)*\)[^|].\{-}$','\1','e') -" call Decho("(NetrwTreeDir) depth<".depth."> 1st subst (non-depth info removed)") - - " elide first depth - let depth = substitute(depth,'^| ','','') -" call Decho("(NetrwTreeDir) depth<".depth."> 2nd subst (first depth removed)") - - " construct treedir by searching backwards at correct depth -" call Decho("(NetrwTreeDir) constructing treedir<".treedir."> depth<".depth.">") - while depth != "" && search('^'.depth.'[^|].\{-}/$','bW') - let dirname= substitute(getline('.'),'^\(| \)*','','e') - let treedir= dirname.treedir - let depth = substitute(depth,'^| ','','') -" call Decho("(NetrwTreeDir) constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">") - endwhile - if w:netrw_treetop =~ '/$' - let treedir= w:netrw_treetop.treedir - else - let treedir= w:netrw_treetop.'/'.treedir - endif -" call Decho("(NetrwTreeDir) bufnr(.)=".bufnr("%")." line($)=".line("$")." line(.)=".line(".")) + let treedir = s:NetrwTreePath(w:netrw_treetop) endif + + " sanity maintenance: keep those //s away... let treedir= substitute(treedir,'//$','/','') -" call Dret("NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">") +" call Dret("s:NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">") return treedir endfun @@ -7440,7 +7911,7 @@ endif " display subtrees (if any) - let depth= "| ".a:depth + let depth= s:treedepthstring.a:depth " call Decho("display subtrees with depth<".depth."> and current leaves") for entry in w:netrw_treedict[a:dir] @@ -7457,6 +7928,7 @@ sil! keepj call setline(line("$")+1,depth.entry) endif endfor + " call Dret("NetrwTreeDisplay") endfun @@ -7466,7 +7938,8 @@ if w:netrw_liststyle == s:TREELIST " call Dfunc("NetrwTreeListing() bufname<".expand("%").">") " call Decho("curdir<".a:dirname.">") -" call Decho("win#".winnr().": w:netrw_treetop ".(exists("w:netrw_treetop")? "exists" : "doesn't exit")." w:netrw_treedict ".(exists("w:netrw_treedict")? "exists" : "doesn't exit")) +" call Decho("win#".winnr().": w:netrw_treetop ".(exists("w:netrw_treetop")? "exists" : "doesn't exist")." w:netrw_treedict ".(exists("w:netrw_treedict")? "exists" : "doesn't exit")) +" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")") " update the treetop " call Decho("update the treetop") @@ -7485,7 +7958,7 @@ " update the directory listing for the current directory " call Decho("updating dictionary with ".a:dirname.":[..directory listing..]") -" call Decho("bannercnt=".w:netrw_bannercnt." line($)=".line("$")) +" call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." line($)=".line("$")) exe "sil! keepj ".w:netrw_bannercnt.',$g@^\.\.\=/$@d' let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$")) " call Decho("w:treedict[".a:dirname."]= ".string(w:netrw_treedict[a:dirname])) @@ -7498,9 +7971,19 @@ let fname= "" endif " call Decho("fname<".fname.">") +" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")") " display from treetop on down keepj call s:NetrwTreeDisplay(w:netrw_treetop,"") +" call Decho("s:NetrwTreeDisplay) setl noma nomod ro") + + " remove any blank line remaining as line#1 (happens in treelisting mode with banner suppressed) + while getline(1) =~ '^\s*$' && byte2line(1) > 0 +" call Decho("deleting blank line") + 1d + endwhile + + setl noma nomod ro " call Dret("NetrwTreeListing : bufname<".expand("%").">") return @@ -7508,6 +7991,44 @@ endfun " --------------------------------------------------------------------- +" s:NetrwTreePath: returns path to current file in tree listing {{{2 +" Normally, treetop is w:netrw_treetop, but a +" user of the function ( netrw#SetTreetop() ) +" wipes that out prior to calling this function +fun! s:NetrwTreePath(treetop) +" call Dfunc("s:NetrwTreePath() line#".line(".")."<".getline(".").">") + let depth = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e') +" call Decho("(s:NetrwTreePath) depth<".depth."> 1st subst") + let depth = substitute(depth,'^'.s:treedepthstring,'','') +" call Decho("(s:NetrwTreePath) depth<".depth."> 2nd subst (first depth removed)") + if getline('.') =~ '/$' +" call Decho("extract tree directory from current line") + let treedir= substitute(getline('.'),'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e') +" call Decho("(s:NetrwTreePath) treedir<".treedir.">") + else +" call Decho("(s:NetrwTreePath) do not extract tree directory from current line and set treedir to empty") + let treedir= "" + endif + " construct treedir by searching backwards at correct depth +" call Decho("(s:NetrwTreePath) construct treedir by searching backwards for correct depth") +" call Decho("(s:NetrwTreePath) initial treedir<".treedir."> depth<".depth.">") + while depth != "" && search('^'.depth.'[^'.s:treedepthstring.'].\{-}/$','bW') + let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e') + let treedir= dirname.treedir + let depth = substitute(depth,'^'.s:treedepthstring,'','') +" call Decho("(s:NetrwTreePath) constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">") + endwhile + if a:treetop =~ '/$' + let treedir= a:treetop.treedir + else + let treedir= a:treetop.'/'.treedir + endif + let treedir= substitute(treedir,'//$','/','') +" call Dret("s:NetrwTreePath <".treedir.">") + return treedir +endfun + +" --------------------------------------------------------------------- " s:NetrwWideListing: {{{2 fun! s:NetrwWideListing() @@ -7544,7 +8065,9 @@ let newcolstart = w:netrw_bannercnt + fpc let newcolend = newcolstart + fpc - 1 " call Decho("bannercnt=".w:netrw_bannercnt." fpl=".w:netrw_fpl." fpc=".fpc." newcol[".newcolstart.",".newcolend."]") - sil! let keepregstar = @* + if has("clipboard") + sil! let keepregstar = @* + endif while line("$") >= newcolstart if newcolend > line("$") | let newcolend= line("$") | endif let newcolqty= newcolend - newcolstart @@ -7557,7 +8080,9 @@ exe "sil! keepj ".newcolstart.','.newcolend.'d' exe 'sil! keepj '.w:netrw_bannercnt endwhile - sil! let @*= keepregstar + if has("clipboard") + sil! let @*= keepregstar + endif exe "sil! keepj ".w:netrw_bannercnt.',$s/\s\+$//e' keepj call histdel("/",-1) exe "nmap w /^\\\\|\\s\\s\\zs\\S/\" @@ -7582,30 +8107,32 @@ " s:PerformListing: {{{2 fun! s:PerformListing(islocal) " call Dfunc("s:PerformListing(islocal=".a:islocal.") bufnr(%)=".bufnr("%")."<".bufname("%").">") +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (enter)") " set up syntax highlighting {{{3 -" call Decho("(PerformListing) set up syntax highlighting") +" call Decho("set up syntax highlighting") if has("syntax") if !exists("g:syntax_on") || !g:syntax_on -" call Decho("(PerformListing) but g:syntax_on".(exists("g:syntax_on")? "=".g:syntax_on : "")) +" call Decho("but g:syntax_on".(exists("g:syntax_on")? "=".g:syntax_on : "")) setl ft= elseif &ft != "netrw" +" call Decho("setl ft=netrw") setl ft=netrw endif endif keepj call s:NetrwSafeOptions() - set noro ma -" call Decho("(PerformListing) setl noro ma bh=".&bh) + setl noro ma +" call Decho("setl noro ma bh=".&bh) " if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 " Decho -" call Decho("(PerformListing) (netrw) Processing your browsing request...") +" call Decho("(netrw) Processing your browsing request...") " endif " Decho " call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a')) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") " force a refresh for tree listings -" call Decho("(PerformListing) force refresh for treelisting: clear buffer<".expand("%")."> with :%d") +" call Decho("force refresh for treelisting: clear buffer<".expand("%")."> with :%d") sil! keepj %d endif @@ -7614,7 +8141,7 @@ " Set up the banner {{{3 if g:netrw_banner -" call Decho("(PerformListing) set up banner") +" call Decho("set up banner") keepj call setline(1,'" ============================================================================') keepj call setline(2,'" Netrw Directory Listing (netrw '.g:loaded_netrw.')') if exists("g:netrw_bannerbackslash") && g:netrw_bannerbackslash @@ -7628,6 +8155,7 @@ keepj 1 let w:netrw_bannercnt= 1 endif +" call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." win#".winnr()) let sortby= g:netrw_sort_by if g:netrw_sort_direction =~ "^r" @@ -7636,26 +8164,28 @@ " Sorted by... {{{3 if g:netrw_banner -" call Decho("(PerformListing) handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">") +" call Decho("handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">") if g:netrw_sort_by =~ "^n" -" call Decho("(PerformListing) directories will be sorted by name") +" call Decho("directories will be sorted by name") " sorted by name keepj put ='\" Sorted by '.sortby keepj put ='\" Sort sequence: '.g:netrw_sort_sequence let w:netrw_bannercnt= w:netrw_bannercnt + 2 else -" call Decho("(PerformListing) directories will be sorted by size or time") +" call Decho("directories will be sorted by size or time") " sorted by size or date keepj put ='\" Sorted by '.sortby let w:netrw_bannercnt= w:netrw_bannercnt + 1 endif exe "sil! keepj ".w:netrw_bannercnt +" else " Decho +" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")") endif " show copy/move target, if any if g:netrw_banner if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") -" call Decho("(PerformListing) show copy/move target<".s:netrwmftgt.">") +" call Decho("show copy/move target<".s:netrwmftgt.">") keepj put ='' if s:netrwmftgt_islocal sil! keepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (local)') @@ -7664,14 +8194,14 @@ endif let w:netrw_bannercnt= w:netrw_bannercnt + 1 else -" call Decho("(PerformListing) s:netrwmftgt does not exist, don't make Copy/Move Tgt") +" call Decho("s:netrwmftgt does not exist, don't make Copy/Move Tgt") endif exe "sil! keepj ".w:netrw_bannercnt endif " Hiding... -or- Showing... {{{3 if g:netrw_banner -" call Decho("(PerformListing) handle hiding/showing (g:netrw_hide=".g:netrw_list_hide." g:netrw_list_hide<".g:netrw_list_hide.">)") +" call Decho("handle hiding/showing (g:netrw_hide=".g:netrw_list_hide." g:netrw_list_hide<".g:netrw_list_hide.">)") if g:netrw_list_hide != "" && g:netrw_hide if g:netrw_hide == 1 keepj put ='\" Hiding: '.g:netrw_list_hide @@ -7681,47 +8211,62 @@ let w:netrw_bannercnt= w:netrw_bannercnt + 1 endif exe "keepjumps ".w:netrw_bannercnt - keepj put ='\" Quick Help: :help -:go up dir D:delete R:rename s:sort-by x:exec' - keepj put ='\" ============================================================================' + +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + let quickhelp = g:netrw_quickhelp%len(s:QuickHelp) +" call Decho("quickhelp =".quickhelp) + keepj put ='\" Quick Help: :help '.s:QuickHelp[quickhelp] +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + keepj put ='\" ==============================================================================' let w:netrw_bannercnt= w:netrw_bannercnt + 2 +" else " Decho +" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")") endif " bannercnt should index the line just after the banner if g:netrw_banner let w:netrw_bannercnt= w:netrw_bannercnt + 1 exe "sil! keepj ".w:netrw_bannercnt -" call Decho("(PerformListing) w:netrw_bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$")) +" call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$")) +" else " Decho +" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")") endif " get list of files -" call Decho("(PerformListing) Get list of files - islocal=".a:islocal) +" call Decho("Get list of files - islocal=".a:islocal) if a:islocal keepj call s:LocalListing() else " remote - keepj call s:NetrwRemoteListing() + keepj let badresult= s:NetrwRemoteListing() + if badresult +" call Decho("w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">") +" call Dret("s:PerformListing : error detected by NetrwRemoteListing") + return + endif endif " manipulate the directory listing (hide, sort) {{{3 if !exists("w:netrw_bannercnt") let w:netrw_bannercnt= 0 endif -" call Decho("(PerformListing) g:netrw_banner=".g:netrw_banner." w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)") +" call Decho("g:netrw_banner=".g:netrw_banner." w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)") +" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")") if !g:netrw_banner || line("$") >= w:netrw_bannercnt -" call Decho("(PerformListing) manipulate directory listing (hide)") -" call Decho("(PerformListing) g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") +" call Decho("manipulate directory listing (hide)") +" call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") if g:netrw_hide && g:netrw_list_hide != "" keepj call s:NetrwListHide() endif if !g:netrw_banner || line("$") >= w:netrw_bannercnt -" call Decho("(PerformListing) manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">") +" call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">") if g:netrw_sort_by =~ "^n" " sort by name keepj call s:NetrwSetSort() if !g:netrw_banner || w:netrw_bannercnt < line("$") -" call Decho("(PerformListing) g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")") +" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")") if g:netrw_sort_direction =~ 'n' " normal direction sorting exe 'sil keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options @@ -7731,13 +8276,13 @@ endif endif " remove priority pattern prefix -" call Decho("(PerformListing) remove priority pattern prefix") +" call Decho("remove priority pattern prefix") exe 'sil! keepj '.w:netrw_bannercnt.',$s/^\d\{3}'.g:netrw_sepchr.'//e' keepj call histdel("/",-1) elseif a:islocal if !g:netrw_banner || w:netrw_bannercnt < line("$") -" call Decho("(PerformListing) g:netrw_sort_direction=".g:netrw_sort_direction) +" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction) if g:netrw_sort_direction =~ 'n' " call Decho('exe sil keepjumps '.w:netrw_bannercnt.',$sort') exe 'sil! keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options @@ -7751,149 +8296,306 @@ endif elseif g:netrw_sort_direction =~ 'r' -" call Decho('reverse the sorted listing') +" call Decho('(s:PerformListing) reverse the sorted listing') if !g:netrw_banner || w:netrw_bannercnt < line('$') exe 'sil! keepj '.w:netrw_bannercnt.',$g/^/m '.w:netrw_bannercnt call histdel("/",-1) endif endif endif +" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")") " convert to wide/tree listing {{{3 -" call Decho("(PerformListing) modify display if wide/tree listing style") +" call Decho("modify display if wide/tree listing style") +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#1)") keepj call s:NetrwWideListing() +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#2)") keepj call s:NetrwTreeListing(b:netrw_curdir) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#3)") if exists("w:netrw_bannercnt") && (line("$") > w:netrw_bannercnt || !g:netrw_banner) " place cursor on the top-left corner of the file listing -" call Decho("(PerformListing) place cursor on top-left corner of file listing") +" call Decho("place cursor on top-left corner of file listing") exe 'sil! keepj '.w:netrw_bannercnt sil! keepj norm! 0 endif " record previous current directory let w:netrw_prvdir= b:netrw_curdir -" call Decho("(PerformListing) record netrw_prvdir<".w:netrw_prvdir.">") +" call Decho("record netrw_prvdir<".w:netrw_prvdir.">") " save certain window-oriented variables into buffer-oriented variables {{{3 +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#4)") keepj call s:SetBufWinVars() +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#5)") keepj call s:NetrwOptionRestore("w:") +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#6)") " set display to netrw display settings -" call Decho("(PerformListing) set display to netrw display settings (".g:netrw_bufsettings.")") +" call Decho("set display to netrw display settings (".g:netrw_bufsettings.")") exe "setl ".g:netrw_bufsettings +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#7)") if g:netrw_liststyle == s:LONGLIST -" call Decho("(PerformListing) exe setl ts=".(g:netrw_maxfilenamelen+1)) +" call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1)) exe "setl ts=".(g:netrw_maxfilenamelen+1) endif - if exists("s:treecurpos") - keepj call netrw#NetrwRestorePosn(s:treecurpos) + if exists("s:treecurpos") +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#8)") + keepj call netrw#RestorePosn(s:treecurpos) unlet s:treecurpos endif +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (return)") " call Dret("s:PerformListing : curpos<".string(getpos(".")).">") endfun -" --------------------------------------------------------------------- -" s:SetupNetrwStatusLine: {{{2 -fun! s:SetupNetrwStatusLine(statline) -" call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)") +" --------------------------------------------------------------------- +" s:SetupNetrwStatusLine: {{{2 +fun! s:SetupNetrwStatusLine(statline) +" call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)") + + if !exists("s:netrw_setup_statline") + let s:netrw_setup_statline= 1 +" call Decho("do first-time status line setup") + + if !exists("s:netrw_users_stl") + let s:netrw_users_stl= &stl + endif + if !exists("s:netrw_users_ls") + let s:netrw_users_ls= &laststatus + endif + + " set up User9 highlighting as needed + let keepa= @a + redir @a + try + hi User9 + catch /^Vim\%((\a\+)\)\=:E411/ + if &bg == "dark" + hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue + else + hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue + endif + endtry + redir END + let @a= keepa + endif + + " set up status line (may use User9 highlighting) + " insure that windows have a statusline + " make sure statusline is displayed + let &stl=a:statline + setl laststatus=2 +" call Decho("stl=".&stl) + redraw + +" call Dret("SetupNetrwStatusLine : stl=".&stl) +endfun + +" --------------------------------------------------------------------- +" Remote Directory Browsing Support: {{{1 +" =========================================== + +" --------------------------------------------------------------------- +" s:NetrwRemoteFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2 +" This function assumes that a long listing will be received. Size, time, +" and reverse sorts will be requested of the server but not otherwise +" enforced here. +fun! s:NetrwRemoteFtpCmd(path,listcmd) +" call Dfunc("NetrwRemoteFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) w:netrw_method=".(exists("w:netrw_method")? w:netrw_method : (exists("b:netrw_method")? b:netrw_method : "???"))) +" call Decho("line($)=".line("$")." w:netrw_bannercnt=".w:netrw_bannercnt) + " sanity check: {{{3 + if !exists("w:netrw_method") + if exists("b:netrw_method") + let w:netrw_method= b:netrw_method + else + call netrw#ErrorMsg(2,"(s:NetrwRemoteFtpCmd) internal netrw error",93) +" call Dret("NetrwRemoteFtpCmd") + return + endif + endif + + " WinXX ftp uses unix style input, so set ff to unix " {{{3 + let ffkeep= &ff + setl ma ff=unix noro +" call Decho("setl ma ff=unix noro") + + " clear off any older non-banner lines " {{{3 + " note that w:netrw_bannercnt indexes the line after the banner +" call Decho('exe sil! keepjumps '.w:netrw_bannercnt.",$d (clear off old non-banner lines)") + exe "sil! keepjumps ".w:netrw_bannercnt.",$d" + + "......................................... + if w:netrw_method == 2 || w:netrw_method == 5 " {{{3 + " ftp + <.netrc>: Method #2 + if a:path != "" + keepj put ='cd \"'.a:path.'\"' + endif + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline('.')) + endif + keepj call setline(line("$")+1,a:listcmd) +" exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' + if exists("g:netrw_port") && g:netrw_port != "" +" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) + exe s:netrw_silentxfer." keepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) + else +" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer." keepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) + endif + + "......................................... + elseif w:netrw_method == 3 " {{{3 + " ftp + machine,id,passwd,filename: Method #3 + setl ff=unix + if exists("g:netrw_port") && g:netrw_port != "" + keepj put ='open '.g:netrw_machine.' '.g:netrw_port + else + keepj put ='open '.g:netrw_machine + endif + + " handle userid and password + let host= substitute(g:netrw_machine,'\..*$','','') +" call Decho("host<".host.">") + if exists("s:netrw_hup") && exists("s:netrw_hup[host]") + call NetUserPass("ftp:".host) + endif + if exists("g:netrw_uid") && g:netrw_uid != "" + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + keepj put =g:netrw_uid + if exists("s:netrw_passwd") && s:netrw_passwd != "" + keepj put ='\"'.s:netrw_passwd.'\"' + endif + elseif exists("s:netrw_passwd") + keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' + endif + endif + + if a:path != "" + keepj put ='cd \"'.a:path.'\"' + endif + if exists("g:netrw_ftpextracmd") + keepj put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline('.')) + endif + keepj call setline(line("$")+1,a:listcmd) + + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + if exists("w:netrw_bannercnt") +" exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' +" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) + exe s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options +" else " Decho +" call Decho("WARNING: w:netrw_bannercnt doesn't exist!") +" g/^./call Decho("SKIPPING ftp#".line(".").": ".getline(".")) " COMBAK + endif + + "......................................... + elseif w:netrw_method == 9 " {{{3 + " sftp username@machine: Method #9 + " s:netrw_sftp_cmd + setl ff=unix + + " restore settings + let &ff= ffkeep +" call Dret("NetrwRemoteFtpCmd") + return - if !exists("s:netrw_setup_statline") - let s:netrw_setup_statline= 1 -" call Decho("do first-time status line setup") + "......................................... + else " {{{3 + keepj call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . bufname("%") . ">",23) + endif - if !exists("s:netrw_users_stl") - let s:netrw_users_stl= &stl - endif - if !exists("s:netrw_users_ls") - let s:netrw_users_ls= &laststatus + " cleanup for Windows " {{{3 + if has("win32") || has("win95") || has("win64") || has("win16") + sil! keepj %s/\r$//e + keepj call histdel("/",-1) + endif + if a:listcmd == "dir" + " infer directory/link based on the file permission string + sil! keepj g/d\%([-r][-w][-x]\)\{3}/keepj s@$@/@e + sil! keepj g/l\%([-r][-w][-x]\)\{3}/keepj s/$/@/e + keepj call histdel("/",-1) + keepj call histdel("/",-1) + if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST + exe "sil! keepj ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e' + keepj call histdel("/",-1) endif - - " set up User9 highlighting as needed - let keepa= @a - redir @a - try - hi User9 - catch /^Vim\%((\a\+)\)\=:E411/ - if &bg == "dark" - hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue - else - hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue - endif - endtry - redir END - let @a= keepa endif - " set up status line (may use User9 highlighting) - " insure that windows have a statusline - " make sure statusline is displayed - let &stl=a:statline - setl laststatus=2 -" call Decho("stl=".&stl) - redraw + " ftp's listing doesn't seem to include ./ or ../ " {{{3 + if !search('^\.\/$\|\s\.\/$','wn') + exe 'keepj '.w:netrw_bannercnt + keepj put ='./' + endif + if !search('^\.\.\/$\|\s\.\.\/$','wn') + exe 'keepj '.w:netrw_bannercnt + keepj put ='../' + endif -" call Dret("SetupNetrwStatusLine : stl=".&stl) + " restore settings " {{{3 + let &ff= ffkeep +" call Dret("NetrwRemoteFtpCmd") endfun " --------------------------------------------------------------------- -" Remote Directory Browsing Support: {{{1 -" =========================================== - -" --------------------------------------------------------------------- " s:NetrwRemoteListing: {{{2 fun! s:NetrwRemoteListing() " call Dfunc("s:NetrwRemoteListing() b:netrw_curdir<".b:netrw_curdir.">)") + if !exists("w:netrw_bannercnt") && exists("s:bannercnt") + let w:netrw_bannercnt= s:bannercnt + endif + if !exists("w:netrw_bannercnt") && exists("b:bannercnt") + let w:netrw_bannercnt= s:bannercnt + endif + call s:RemotePathAnalysis(b:netrw_curdir) -" call Decho("b:netrw_method#".(exists("b:netrw_method")? b:netrw_method : 'n/a')) -" call Decho("g:netrw_list_cmd<".(exists("g:netrw_list_cmd")? g:netrw_list_cmd : 'n/a').">") -" call Decho("ssh is ".(executable("ssh")? "" : "not ")."executable") -" call Decho("ftp is ".(executable("ftp")? "" : "not ")."executable") -" call Decho("sftp is ".(executable("sftp")? "" : "not ")."executable") " sanity check: if exists("b:netrw_method") && b:netrw_method =~ '[235]' - " b:netrw_method = 2: ftp+.netrc - " b:netrw_method = 3: ftp+machine,id,p/w,filename (ie. no .netrc) - " b:netrw_method = 5: wget (http) -" call Decho("b:netrw_method=".b:netrw_method." (for ".s:method.")") +" call Decho("b:netrw_method=".b:netrw_method) if !executable("ftp") +" call Decho("ftp is not executable") if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18) endif call s:NetrwOptionRestore("w:") -" call Dret("s:NetrwRemoteListing") - return +" call Dret("s:NetrwRemoteListing -1") + return -1 endif - elseif s:method == "scp" && (!exists("g:netrw_list_cmd") || g:netrw_list_cmd == '') -" call Decho("g:netrw_list_cmd<".(exists("g:netrw_list_cmd")? g:netrw_list_cmd : 'n/a').">") + elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == '' +" call Decho("g:netrw_list_cmd<",(exists("g:netrw_list_cmd")? 'n/a' : "-empty-").">") if !exists("g:netrw_quiet") - if !exists("g:netrw_list_cmd") || g:netrw_list_cmd == "" - keepj call netrw#ErrorMsg(s:ERROR,"neither ssh nor ftp"." is executable on your system",47) + if g:netrw_list_cmd == "" + keepj call netrw#ErrorMsg(s:ERROR,"your g:netrw_list_cmd is empty; perhaps ".g:netrw_ssh_cmd." is not executable on your system",47) else keepj call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ".g:netrw_list_cmd,19) endif endif keepj call s:NetrwOptionRestore("w:") -" call Dret("s:NetrwRemoteListing") - return +" call Dret("s:NetrwRemoteListing -1") + return -1 endif " (remote handling sanity check) +" call Decho("passed remote listing sanity checks") if exists("b:netrw_method") " call Decho("setting w:netrw_method to b:netrw_method<".b:netrw_method.">") let w:netrw_method= b:netrw_method endif - if s:method == "ftp" + if s:method == "ftp" || s:method == "sftp" " use ftp to get remote file listing {{{3 " call Decho("use ftp to get remote file listing") - let s:method = "ftp" - let listcmd = g:netrw_ftp_list_cmd + let s:method = "ftp" + let listcmd = g:netrw_ftp_list_cmd if g:netrw_sort_by =~ '^t' let listcmd= g:netrw_ftp_timelist_cmd elseif g:netrw_sort_by =~ '^s' @@ -7903,6 +8605,20 @@ call s:NetrwRemoteFtpCmd(s:path,listcmd) " exe "sil! keepalt keepj ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."))' + " report on missing file or directory messages + if search('[Nn]o such file or directory\|Failed to change directory') + let mesg= getline(".") + if exists("w:netrw_bannercnt") + setl ma + exe w:netrw_bannercnt.",$d" + setl noma + endif + keepj call s:NetrwOptionRestore("w:") + call netrw#ErrorMsg(s:WARNING,mesg,96) +" call Dret("s:NetrwRemoteListing : -1") + return -1 + endif + if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST " shorten the listing " call Decho("generate short listing") @@ -7975,8 +8691,8 @@ endif " cleanup - if g:netrw_ftp_browse_reject != "" -" call Decho("(cleanup) exe sil! g/".g:netrw_ssh_browse_reject."/keepjumps d") + if g:netrw_ssh_browse_reject != "" +" call Decho("cleanup: exe sil! g/".g:netrw_ssh_browse_reject."/keepjumps d") exe "sil! g/".g:netrw_ssh_browse_reject."/keepj d" keepj call histdel("/",-1) endif @@ -8023,7 +8739,9 @@ " if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho " exe "keepj ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."))' " endif " Decho -" call Dret("s:NetrwRemoteListing") + +" call Dret("s:NetrwRemoteListing 0") + return 0 endfun " --------------------------------------------------------------------- @@ -8031,7 +8749,7 @@ fun! s:NetrwRemoteRm(usrhost,path) range " call Dfunc("s:NetrwRemoteRm(usrhost<".a:usrhost."> path<".a:path.">) virtcol=".virtcol(".")) " call Decho("firstline=".a:firstline." lastline=".a:lastline) - let svpos= netrw#NetrwSavePosn() + let svpos= netrw#SavePosn() let all= 0 if exists("s:netrwmarkfilelist_{bufnr('%')}") @@ -8070,7 +8788,7 @@ " refresh the (remote) directory listing " call Decho("refresh remote directory listing") keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) " call Dret("s:NetrwRemoteRm") endfun @@ -8190,141 +8908,12 @@ endfun " --------------------------------------------------------------------- -" s:NetrwRemoteFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2 -" This function assumes that a long listing will be received. Size, time, -" and reverse sorts will be requested of the server but not otherwise -" enforced here. -fun! s:NetrwRemoteFtpCmd(path,listcmd) -" call Dfunc("NetrwRemoteFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) w:netrw_method=".(exists("w:netrw_method")? w:netrw_method : (exists("b:netrw_method")? b:netrw_method : "???"))) -" call Decho("line($)=".line("$")." w:netrw_bannercnt=".w:netrw_bannercnt) - if !exists("w:netrw_method") - if exists("b:netrw_method") - let w:netrw_method= b:netrw_method - else - call netrw#ErrorMsg(2,"(s:NetrwRemoteFtpCmd) internal netrw error",93) -" call Dret("NetrwRemoteFtpCmd") - return - endif - endif - - " because WinXX ftp uses unix style input - let ffkeep= &ff - setl ma ff=unix noro -" call Decho("setl ma ff=unix noro") - - " clear off any older non-banner lines - " note that w:netrw_bannercnt indexes the line after the banner -" call Decho('exe sil! keepjumps '.w:netrw_bannercnt.",$d (clear off old non-banner lines)") - exe "sil! keepjumps ".w:netrw_bannercnt.",$d" - - "......................................... - if w:netrw_method == 2 || w:netrw_method == 5 - " ftp + <.netrc>: Method #2 - if a:path != "" - keepj put ='cd \"'.a:path.'\"' - endif - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('.')) - endif - keepj call setline(line("$")+1,a:listcmd) -" exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' - if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) - exe s:netrw_silentxfer." keepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) - else -" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) - exe s:netrw_silentxfer." keepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) - endif - - "......................................... - elseif w:netrw_method == 3 - " ftp + machine,id,passwd,filename: Method #3 - setl ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - keepj put ='open '.g:netrw_machine.' '.g:netrw_port - else - keepj put ='open '.g:netrw_machine - endif - - " handle userid and password - let host= substitute(g:netrw_machine,'\..*$','','') -" call Decho("host<".host.">") - if exists("s:netrw_hup") && exists("s:netrw_hup[host]") - call NetUserPass("ftp:".host) - endif - if exists("g:netrw_uid") && g:netrw_uid != "" - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - keepj put =g:netrw_uid - if exists("s:netrw_passwd") && s:netrw_passwd != "" - keepj put ='\"'.s:netrw_passwd.'\"' - endif - elseif exists("s:netrw_passwd") - keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' - endif - endif - - if a:path != "" - keepj put ='cd \"'.a:path.'\"' - endif - if exists("g:netrw_ftpextracmd") - keepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('.')) - endif - keepj call setline(line("$")+1,a:listcmd) - - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password -" exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' -" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) - exe s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options - - "......................................... - else - keepj call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",23) - endif - - " cleanup for Windows - if has("win32") || has("win95") || has("win64") || has("win16") - sil! keepj %s/\r$//e - keepj call histdel("/",-1) - endif - if a:listcmd == "dir" - " infer directory/link based on the file permission string - sil! keepj g/d\%([-r][-w][-x]\)\{3}/keepj s@$@/@ - sil! keepj g/l\%([-r][-w][-x]\)\{3}/keepj s/$/@/ - keepj call histdel("/",-1) - keepj call histdel("/",-1) - if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST - exe "sil! keepj ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e' - keepj call histdel("/",-1) - endif - endif - - " ftp's listing doesn't seem to include ./ or ../ - if !search('^\.\/$\|\s\.\/$','wn') - exe 'keepj '.w:netrw_bannercnt - keepj put ='./' - endif - if !search('^\.\.\/$\|\s\.\.\/$','wn') - exe 'keepj '.w:netrw_bannercnt - keepj put ='../' - endif - - " restore settings - let &ff= ffkeep -" call Dret("NetrwRemoteFtpCmd") -endfun - -" --------------------------------------------------------------------- " s:NetrwRemoteRename: rename a remote file or directory {{{2 fun! s:NetrwRemoteRename(usrhost,path) range " call Dfunc("NetrwRemoteRename(usrhost<".a:usrhost."> path<".a:path.">)") " preparation for removing multiple files/directories - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() let ctr = a:firstline let rename_cmd = s:MakeSshCmd(g:netrw_rename_cmd) @@ -8387,7 +8976,7 @@ " refresh the directory keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) " call Dret("NetrwRemoteRename") endfun @@ -8439,9 +9028,9 @@ exe 'sil! bdelete '.plainfname exe 'keepalt file! '.plainfname keepj 1d -" call Decho("(FileUrlRead) setl nomod") +" call Decho("setl nomod") setl nomod -" call Decho("(FileUrlRead) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("netrw#FileUrlRead") exe "sil doau BufReadPost ".fname2396e endfun @@ -8456,107 +9045,263 @@ " The &ft == "netrw" test was installed because the BufEnter event " would hit when re-entering netrw windows, creating unexpected " refreshes (and would do so in the middle of NetrwSaveOptions(), too) -" call Decho("(LocalBrowseCheck) isdir<".a:dirname.">=".isdirectory(a:dirname).((exists("s:treeforceredraw")? " treeforceredraw" : ""))) -" call Dredir("LocalBrowseCheck","ls!")|redraw!|sleep 3 +" call Dfunc("netrw#LocalBrowseCheck(dirname<".a:dirname.">") +" call Decho("isdir<".a:dirname.">=".isdirectory(a:dirname).((exists("s:treeforceredraw")? " treeforceredraw" : ""))) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dredir("ls!","ls!") + let ykeep= @@ if isdirectory(a:dirname) -" call Decho("(LocalBrowseCheck) is-directory ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")." ft<".&ft."> g:netrw_fastbrowse=".g:netrw_fastbrowse) - let svposn= netrw#NetrwSavePosn() +" call Decho("is-directory ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")." ft<".&ft."> g:netrw_fastbrowse=".g:netrw_fastbrowse) + let svposn= netrw#SavePosn() if &ft != "netrw" || (exists("b:netrw_curdir") && b:netrw_curdir != a:dirname) || g:netrw_fastbrowse <= 1 +" call Decho("case 1 : ft=".&ft) sil! keepj keepalt call s:NetrwBrowse(1,a:dirname) - keepalt call netrw#NetrwRestorePosn(svposn) + keepalt call netrw#RestorePosn(svposn) + elseif &ft == "netrw" && line("$") == 1 +" call Decho("case 2 (ft≡netrw && line($)≡1)") sil! keepj keepalt call s:NetrwBrowse(1,a:dirname) - keepalt call netrw#NetrwRestorePosn(svposn) + keepalt call netrw#RestorePosn(svposn) + elseif exists("s:treeforceredraw") +" call Decho("case 3 (treeforceredraw)") unlet s:treeforceredraw sil! keepj keepalt call s:NetrwBrowse(1,a:dirname) - keepalt call netrw#NetrwRestorePosn(svposn) + keepalt call netrw#RestorePosn(svposn) + endif + +" call Dret("netrw#LocalBrowseCheck") + return + endif + + " following code wipes out currently unused netrw buffers + " IF g:netrw_fastbrowse is zero (ie. slow browsing selected) + " AND IF the listing style is not a tree listing + if exists("g:netrw_fastbrowse") && g:netrw_fastbrowse == 0 && g:netrw_liststyle != s:TREELIST +" call Decho("wiping out currently unused netrw buffers") + let ibuf = 1 + let buflast = bufnr("$") + while ibuf <= buflast + if bufwinnr(ibuf) == -1 && isdirectory(bufname(ibuf)) + exe "sil! keepalt ".ibuf."bw!" + endif + let ibuf= ibuf + 1 + endwhile + endif + let @@= ykeep +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) + " not a directory, ignore it +" call Dret("netrw#LocalBrowseCheck : not a directory, ignoring it; dirname<".a:dirname.">") +endfun + +" --------------------------------------------------------------------- +" s:LocalBrowseRefresh: this function is called after a user has {{{2 +" performed any shell command. The idea is to cause all local-browsing +" buffers to be refreshed after a user has executed some shell command, +" on the chance that s/he removed/created a file/directory with it. +fun! s:LocalBrowseRefresh() +" call Dfunc("s:LocalBrowseRefresh() tabpagenr($)=".tabpagenr("$")) +" call Decho("s:netrw_browselist =".(exists("s:netrw_browselist")? string(s:netrw_browselist) : '')) +" call Decho("w:netrw_bannercnt =".(exists("w:netrw_bannercnt")? string(w:netrw_bannercnt) : '')) + + " determine which buffers currently reside in a tab + if !exists("s:netrw_browselist") +" call Dret("s:LocalBrowseRefresh : browselist is empty") + return + endif + if !exists("w:netrw_bannercnt") +" call Dret("s:LocalBrowseRefresh : don't refresh when focus not on netrw window") + return + endif + if exists("s:netrw_events") && s:netrw_events == 1 + " s:LocalFastBrowser gets called (indirectly) from a + let s:netrw_events= 2 +" call Dret("s:LocalBrowseRefresh : avoid initial double refresh") + return + endif + let itab = 1 + let buftablist = [] + let ykeep = @@ + while itab <= tabpagenr("$") + let buftablist = buftablist + tabpagebuflist() + let itab = itab + 1 + tabn + endwhile +" call Decho("buftablist".string(buftablist)) +" call Decho("s:netrw_browselist<".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "").">") + " GO through all buffers on netrw_browselist (ie. just local-netrw buffers): + " | refresh any netrw window + " | wipe out any non-displaying netrw buffer + let curwin = winnr() + let ibl = 0 + for ibuf in s:netrw_browselist +" call Decho("bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf)) + if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 + " wipe out any non-displaying netrw buffer +" call Decho("wiping buf#".ibuf,"<".bufname(ibuf).">") + exe "sil! bd ".fnameescape(ibuf) + call remove(s:netrw_browselist,ibl) +" call Decho("browselist=".string(s:netrw_browselist)) + continue + elseif index(tabpagebuflist(),ibuf) != -1 + " refresh any netrw buffer +" call Decho("refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf)) + exe bufwinnr(ibuf)."wincmd w" + if getline(".") =~ 'Quick Help' + " decrement g:netrw_quickhelp to prevent refresh from changing g:netrw_quickhelp + " (counteracts s:NetrwBrowseChgDir()'s incrementing) + let g:netrw_quickhelp= g:netrw_quickhelp - 1 + endif +" call Decho("#3: quickhelp=".g:netrw_quickhelp) + keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) endif + let ibl= ibl + 1 + endfor + exe curwin."wincmd w" + let @@= ykeep + +" call Dret("s:LocalBrowseRefresh") +endfun + +" --------------------------------------------------------------------- +" s:LocalFastBrowser: handles setting up/taking down fast browsing for the local browser {{{2 +" +" g:netrw_ Directory Is +" fastbrowse Local Remote +" slow 0 D D D=Deleting a buffer implies it will not be re-used (slow) +" med 1 D H H=Hiding a buffer implies it may be re-used (fast) +" fast 2 H H +" +" Deleting a buffer means that it will be re-loaded when examined, hence "slow". +" Hiding a buffer means that it will be re-used when examined, hence "fast". +" (re-using a buffer may not be as accurate) +" +" s:netrw_events : doesn't exist, s:LocalFastBrowser() will install autocmds whena med or fast browsing +" =1: autocmds installed, but ignore next FocusGained event to avoid initial double-refresh of listing. +" BufEnter may be first event, then a FocusGained event. Ignore the first FocusGained event. +" If :Explore used: it sets s:netrw_events to 2, so no FocusGained events are ignored. +" =2: autocmds installed (doesn't ignore any FocusGained events) +fun! s:LocalFastBrowser() +" call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse) +" call Decho("s:netrw_events ".(exists("s:netrw_events")? "exists" : 'n/a')) +" call Decho("autocmd: ShellCmdPost ".(exists("#ShellCmdPost")? "installed" : "not installed")) +" call Decho("autocmd: FocusGained ".(exists("#FocusGained")? "installed" : "not installed")) + + " initialize browselist, a list of buffer numbers that the local browser has used + if !exists("s:netrw_browselist") +" call Decho("initialize s:netrw_browselist") + let s:netrw_browselist= [] endif - " following code wipes out currently unused netrw buffers - " IF g:netrw_fastbrowse is zero (ie. slow browsing selected) - " AND IF the listing style is not a tree listing - if exists("g:netrw_fastbrowse") && g:netrw_fastbrowse == 0 && g:netrw_liststyle != s:TREELIST - let ibuf = 1 - let buflast = bufnr("$") - while ibuf <= buflast - if bufwinnr(ibuf) == -1 && isdirectory(bufname(ibuf)) - exe "sil! keepalt ".ibuf."bw!" + + " append current buffer to fastbrowse list + if empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1] +" call Decho("appendng current buffer to browselist") + call add(s:netrw_browselist,bufnr("%")) +" call Decho("browselist=".string(s:netrw_browselist)) + endif + + " enable autocmd events to handle refreshing/removing local browser buffers + " If local browse buffer is currently showing: refresh it + " If local browse buffer is currently hidden : wipe it + " g:netrw_fastbrowse=0 : slow speed, never re-use directory listing + " =1 : medium speed, re-use directory listing for remote only + " =2 : fast speed, always re-use directory listing when possible + if g:netrw_fastbrowse <= 1 && !exists("#ShellCmdPost") && !exists("s:netrw_events") + let s:netrw_events= 1 + augroup AuNetrwEvent + au! + if (has("win32") || has("win95") || has("win64") || has("win16")) +" call Decho("installing autocmd: ShellCmdPost") + au ShellCmdPost * call s:LocalBrowseRefresh() + else +" call Decho("installing autocmds: ShellCmdPost FocusGained") + au ShellCmdPost,FocusGained * call s:LocalBrowseRefresh() endif - let ibuf= ibuf + 1 - endwhile + augroup END + + " user must have changed fastbrowse to its fast setting, so remove + " the associated autocmd events + elseif g:netrw_fastbrowse > 1 && exists("#ShellCmdPost") && exists("s:netrw_events") +" call Decho("remove AuNetrwEvent autcmd group") + unlet s:netrw_events + augroup AuNetrwEvent + au! + augroup END + augroup! AuNetrwEvent endif - let @@= ykeep - " not a directory, ignore it + +" call Dret("LocalFastBrowser : browselist<".string(s:netrw_browselist).">") endfun " --------------------------------------------------------------------- " s:LocalListing: does the job of "ls" for local directories {{{2 fun! s:LocalListing() " call Dfunc("s:LocalListing()") -" call Decho("(LocalListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") -" call Decho("(LocalListing) tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) -" if exists("b:netrw_curdir") |call Decho('(LocalListing) b:netrw_curdir<'.b:netrw_curdir.">") |else|call Decho("(LocalListing) b:netrw_curdir doesn't exist") |endif -" if exists("g:netrw_sort_by")|call Decho('(LocalListing) g:netrw_sort_by<'.g:netrw_sort_by.">")|else|call Decho("(LocalListing) g:netrw_sort_by doesn't exist")|endif +" if exists("b:netrw_curdir") |call Decho('b:netrw_curdir<'.b:netrw_curdir.">") |else|call Decho("b:netrw_curdir doesn't exist") |endif +" if exists("g:netrw_sort_by")|call Decho('g:netrw_sort_by<'.g:netrw_sort_by.">")|else|call Decho("g:netrw_sort_by doesn't exist")|endif +" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")") " get the list of files contained in the current directory let dirname = b:netrw_curdir - let dirnamelen = s:Strlen(b:netrw_curdir) + let dirnamelen = strlen(b:netrw_curdir) let filelist = glob(s:ComposePath(dirname,"*"),0,1) let filelist = filelist + glob(s:ComposePath(dirname,".*"),0,1) -" call Decho("(LocalListing) filelist=".filelist) +" call Decho("filelist=".filelist) if g:netrw_cygwin == 0 && (has("win32") || has("win95") || has("win64") || has("win16")) -" call Decho("(LocalListing) filelist=".string(filelist)) +" call Decho("filelist=".string(filelist)) elseif index(filelist,'..') == -1 && b:netrw_curdir !~ '/' " include ../ in the glob() entry if its missing -" call Decho("(LocalListing) forcibly including on \"..\"") +" call Decho("forcibly including on \"..\"") let filelist= filelist+[s:ComposePath(b:netrw_curdir,"../")] -" call Decho("(LocalListing) filelist=".string(filelist)) +" call Decho("filelist=".string(filelist)) endif -" call Decho("(LocalListing) (before while) dirname<".dirname.">") -" call Decho("(LocalListing) (before while) dirnamelen<".dirnamelen.">") -" call Decho("(LocalListing) (before while) filelist=".string(filelist)) +" call Decho("before while: dirname<".dirname.">") +" call Decho("before while: dirnamelen<".dirnamelen.">") +" call Decho("before while: filelist=".string(filelist)) if get(g:, 'netrw_dynamic_maxfilenamelen', 0) let filelistcopy = map(deepcopy(filelist),'fnamemodify(v:val, ":t")') let g:netrw_maxfilenamelen = max(map(filelistcopy,'len(v:val)')) + 1 -" call Decho("(LocalListing) dynamic_maxfilenamelen: filenames =".string(filelistcopy)) -" call Decho("(LocalListing) dynamic_maxfilenamelen: g:netrw_maxfilenamelen=".g:netrw_maxfilenamelen) +" call Decho("dynamic_maxfilenamelen: filenames =".string(filelistcopy)) +" call Decho("dynamic_maxfilenamelen: g:netrw_maxfilenamelen=".g:netrw_maxfilenamelen) endif +" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")") for filename in filelist -" call Decho("(LocalListing) ") -" call Decho("(LocalListing) (while) filename<".filename.">") +" call Decho(" ") +" call Decho("for filename in filelist: filename<".filename.">") if getftype(filename) == "link" " indicate a symbolic link -" call Decho("(LocalListing) indicate <".filename."> is a symbolic link with trailing @") +" call Decho("indicate <".filename."> is a symbolic link with trailing @") let pfile= filename."@" elseif getftype(filename) == "socket" " indicate a socket -" call Decho("(LocalListing) indicate <".filename."> is a socket with trailing =") +" call Decho("indicate <".filename."> is a socket with trailing =") let pfile= filename."=" elseif getftype(filename) == "fifo" " indicate a fifo -" call Decho("(LocalListing) indicate <".filename."> is a fifo with trailing |") +" call Decho("indicate <".filename."> is a fifo with trailing |") let pfile= filename."|" elseif isdirectory(filename) " indicate a directory -" call Decho("(LocalListing) indicate <".filename."> is a directory with trailing /") +" call Decho("indicate <".filename."> is a directory with trailing /") let pfile= filename."/" elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(filename) if (has("win32") || has("win95") || has("win64") || has("win16")) if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$' " indicate an executable -" call Decho("(LocalListing) indicate <".filename."> is executable with trailing *") +" call Decho("indicate <".filename."> is executable with trailing *") let pfile= filename."*" else " normal file @@ -8564,7 +9309,7 @@ endif elseif executable(filename) " indicate an executable -" call Decho("(LocalListing) indicate <".filename."> is executable with trailing *") +" call Decho("indicate <".filename."> is executable with trailing *") let pfile= filename."*" else " normal file @@ -8575,45 +9320,45 @@ " normal file let pfile= filename endif -" call Decho("(LocalListing) pfile<".pfile."> (after *@/ appending)") +" call Decho("pfile<".pfile."> (after *@/ appending)") if pfile =~ '//$' let pfile= substitute(pfile,'//$','/','e') -" call Decho("(LocalListing) change // to /: pfile<".pfile.">") +" call Decho("change // to /: pfile<".pfile.">") endif let pfile= strpart(pfile,dirnamelen) let pfile= substitute(pfile,'^[/\\]','','e') -" call Decho("(LocalListing) filename<".filename.">") -" call Decho("(LocalListing) pfile <".pfile.">") +" call Decho("filename<".filename.">") +" call Decho("pfile <".pfile.">") if w:netrw_liststyle == s:LONGLIST let sz = getfsize(filename) let fsz = strpart(" ",1,15-strlen(sz)).sz let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(filename)) -" call Decho("(LocalListing) sz=".sz." fsz=".fsz) +" call Decho("sz=".sz." fsz=".fsz) endif if g:netrw_sort_by =~ "^t" " sort by time (handles time up to 1 quintillion seconds, US) -" call Decho("(LocalListing) getftime(".filename.")=".getftime(filename)) +" call Decho("getftime(".filename.")=".getftime(filename)) let t = getftime(filename) let ft = strpart("000000000000000000",1,18-strlen(t)).t -" call Decho("(LocalListing) exe keepjumps put ='".ft.'/'.filename."'") +" call Decho("exe keepjumps put ='".ft.'/'.filename."'") let ftpfile= ft.'/'.pfile sil! keepj put=ftpfile elseif g:netrw_sort_by =~ "^s" " sort by size (handles file sizes up to 1 quintillion bytes, US) -" call Decho("(LocalListing) getfsize(".filename.")=".getfsize(filename)) +" call Decho("getfsize(".filename.")=".getfsize(filename)) let sz = getfsize(filename) let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz -" call Decho("(LocalListing) exe keepj put ='".fsz.'/'.filename."'") +" call Decho("exe keepj put ='".fsz.'/'.filename."'") let fszpfile= fsz.'/'.pfile sil! keepj put =fszpfile else " sort by name -" call Decho("(LocalListing) exe keepjumps put ='".pfile."'") +" call Decho("exe keepjumps put ='".pfile."'") sil! keepj put=pfile endif endfor @@ -8622,138 +9367,13 @@ sil! keepj g/^$/d sil! keepj %s/\r$//e call histdel("/",-1) -" call Decho("(LocalListing) exe setl ts=".(g:netrw_maxfilenamelen+1)) +" call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1)) exe "setl ts=".(g:netrw_maxfilenamelen+1) " call Dret("s:LocalListing") endfun " --------------------------------------------------------------------- -" s:LocalBrowseShellCmdRefresh: this function is called after a user has {{{2 -" performed any shell command. The idea is to cause all local-browsing -" buffers to be refreshed after a user has executed some shell command, -" on the chance that s/he removed/created a file/directory with it. -fun! s:LocalBrowseShellCmdRefresh() -" call Dfunc("LocalBrowseShellCmdRefresh() browselist=".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "empty")." ".tabpagenr("$")." tabs") - " determine which buffers currently reside in a tab - if !exists("s:netrw_browselist") -" call Dret("LocalBrowseShellCmdRefresh : browselist is empty") - return - endif - if !exists("w:netrw_bannercnt") -" call Dret("LocalBrowseShellCmdRefresh : don't refresh when focus not on netrw window") - return - endif - if exists("s:locbrowseshellcmd") - if s:locbrowseshellcmd - let s:locbrowseshellcmd= 0 -" call Dret("LocalBrowseShellCmdRefresh : NetrwBrowse itself caused the refresh") - return - endif - let s:locbrowseshellcmd= 0 - endif - let itab = 1 - let buftablist = [] - let ykeep = @@ - while itab <= tabpagenr("$") - let buftablist = buftablist + tabpagebuflist() - let itab = itab + 1 - tabn - endwhile -" call Decho("(LocalBrowseShellCmdRefresh) buftablist".string(buftablist)) -" call Decho("(LocalBrowseShellCmdRefresh) s:netrw_browselist<".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "").">") - " GO through all buffers on netrw_browselist (ie. just local-netrw buffers): - " | refresh any netrw window - " | wipe out any non-displaying netrw buffer - let curwin = winnr() - let ibl = 0 - for ibuf in s:netrw_browselist -" call Decho("(LocalBrowseShellCmdRefresh) bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf)) - if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 - " wipe out any non-displaying netrw buffer -" call Decho("(LocalBrowseShellCmdRefresh) wiping buf#".ibuf,"<".bufname(ibuf).">") - exe "sil! bd ".fnameescape(ibuf) - call remove(s:netrw_browselist,ibl) -" call Decho("(LocalBrowseShellCmdRefresh) browselist=".string(s:netrw_browselist)) - continue - elseif index(tabpagebuflist(),ibuf) != -1 - " refresh any netrw buffer -" call Decho("(LocalBrowseShellCmdRefresh) refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf)) - exe bufwinnr(ibuf)."wincmd w" - keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) - endif - let ibl= ibl + 1 - endfor - exe curwin."wincmd w" - let @@= ykeep - -" call Dret("LocalBrowseShellCmdRefresh") -endfun - -" --------------------------------------------------------------------- -" s:LocalFastBrowser: handles setting up/taking down fast browsing for the local browser {{{2 -" -" g:netrw_ Directory Is -" fastbrowse Local Remote -" slow 0 D D D=Deleting a buffer implies it will not be re-used (slow) -" med 1 D H H=Hiding a buffer implies it may be re-used (fast) -" fast 2 H H -" -" Deleting a buffer means that it will be re-loaded when examined, hence "slow". -" Hiding a buffer means that it will be re-used when examined, hence "fast". -" (re-using a buffer may not be as accurate) -fun! s:LocalFastBrowser() -" call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse." s:netrw_browser_shellcmd ".(exists("s:netrw_browser_shellcmd")? "exists" : "does not exist")) - - " initialize browselist, a list of buffer numbers that the local browser has used - if !exists("s:netrw_browselist") -" call Decho("(LocalFastBrowser) initialize s:netrw_browselist") - let s:netrw_browselist= [] - endif - - " append current buffer to fastbrowse list - if empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1] -" call Decho("(LocalFastBrowser) appendng current buffer to browselist") - call add(s:netrw_browselist,bufnr("%")) -" call Decho("(LocalFastBrowser) browselist=".string(s:netrw_browselist)) - endif - - " enable autocmd events to handle refreshing/removing local browser buffers - " If local browse buffer is currently showing: refresh it - " If local browse buffer is currently hidden : wipe it - " g:netrw_fastbrowse=0 : slow speed, never re-use directory listing - " =1 : medium speed, re-use directory listing for remote only - " =2 : fast speed, always re-use directory listing when possible - if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1 -" call Decho("(LocalFastBrowser) setting up local-browser shell command refresh") - let s:netrw_browser_shellcmd= 1 - augroup AuNetrwShellCmd - au! - if (has("win32") || has("win95") || has("win64") || has("win16")) -" call Decho("(LocalFastBrowser) autocmd: ShellCmdPost * call s:LocalBrowseShellCmdRefresh()") - au ShellCmdPost * call s:LocalBrowseShellCmdRefresh() - else - au ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh() -" call Decho("(LocalFastBrowser) autocmd: ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh()") - endif - augroup END - endif - - " user must have changed fastbrowse to its fast setting, so remove - " the associated autocmd events - if g:netrw_fastbrowse > 1 && exists("s:netrw_browser_shellcmd") -" call Decho("(LocalFastBrowser) remove AuNetrwShellCmd autcmd group") - unlet s:netrw_browser_shellcmd - augroup AuNetrwShellCmd - au! - augroup END - augroup! AuNetrwShellCmd - endif - -" call Dret("LocalFastBrowser : browselist<".string(s:netrw_browselist).">") -endfun - -" --------------------------------------------------------------------- " s:NetrwLocalExecute: uses system() to execute command under cursor ("X" command support) {{{2 fun! s:NetrwLocalExecute(cmd) " call Dfunc("s:NetrwLocalExecute(cmd<".a:cmd.">)") @@ -8769,7 +9389,7 @@ let optargs= input(":!".a:cmd,"","file") " call Decho("optargs<".optargs.">") let result= system(a:cmd.optargs) -" call Decho(result) +" call Decho("result) " strip any ansi escape sequences off let result = substitute(result,"\e\\[[0-9;]*m","","g") @@ -8789,7 +9409,7 @@ " preparation for removing multiple files/directories let ykeep = @@ let ctr = a:firstline - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() " rename files given by the markfilelist if exists("s:netrwmarkfilelist_{bufnr('%')}") @@ -8848,7 +9468,7 @@ " refresh the directory " call Decho("refresh the directory listing") keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) let @@= ykeep " call Dret("NetrwLocalRename") @@ -8864,7 +9484,7 @@ let ykeep = @@ let ret = 0 let all = 0 - let svpos = netrw#NetrwSavePosn() + let svpos = netrw#SavePosn() if exists("s:netrwmarkfilelist_{bufnr('%')}") " remove all marked files @@ -8911,7 +9531,7 @@ " call Decho("bufname<".bufname("%").">") if bufname("%") != "NetrwMessage" keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) - keepj call netrw#NetrwRestorePosn(svpos) + keepj call netrw#RestorePosn(svpos) endif let @@= ykeep @@ -9007,31 +9627,26 @@ " Support Functions: {{{1 " --------------------------------------------------------------------- -" netrw#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{2 -fun! netrw#WinPath(path) -" call Dfunc("netrw#WinPath(path<".a:path.">)") - if (!g:netrw_cygwin || &shell !~ '\%(\\|\\)\%(\.exe\)\=$') && (has("win32") || has("win95") || has("win64") || has("win16")) - " remove cygdrive prefix, if present - let path = substitute(a:path,'/cygdrive/\(.\)','\1:','') - " remove trailing slash (Win95) - let path = substitute(path, '\(\\\|/\)$', '', 'g') - " remove escaped spaces - let path = substitute(path, '\ ', ' ', 'g') - " convert slashes to backslashes - let path = substitute(path, '/', '\', 'g') - else - let path= a:path - endif -" call Dret("netrw#WinPath <".path.">") - return path +" netrw#Access: intended to provide access to variable values for netrw's test suite {{{2 +" 0: marked file list of current buffer +" 1: marked file target +fun! netrw#Access(ilist) + if a:ilist == 0 + if exists("s:netrwmarkfilelist_".bufnr('%')) + return s:netrwmarkfilelist_{bufnr('%')} + else + return "no-list-buf#".bufnr('%') + endif + elseif a:ilist == 1 + return s:netrwmftgt endfun -" --------------------------------------------------------------------- -" netrw#NetrwRestorePosn: restores the cursor and file position as saved by NetrwSavePosn() {{{2 -fun! netrw#NetrwRestorePosn(...) -" call Dfunc("netrw#NetrwRestorePosn() a:0=".a:0." winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : -1)." line=".(exists("w:netrw_line")? w:netrw_line : -1)." col=".(exists("w:netrw_col")? w:netrw_col : -1)." hline=".(exists("w:netrw_hline")? w:netrw_hline : -1)) +" ------------------------------------------------------------------------ +" netrw#RestorePosn: restores the cursor and file position as saved by NetrwSavePosn() {{{2 +fun! netrw#RestorePosn(...) +" call Dfunc("netrw#RestorePosn() a:0=".a:0." winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : -1)." line=".(exists("w:netrw_line")? w:netrw_line : -1)." col=".(exists("w:netrw_col")? w:netrw_col : -1)." hline=".(exists("w:netrw_hline")? w:netrw_hline : -1)) let eikeep= &ei - set ei=all + setl ei=all if expand("%") == "NetrwMessage" if exists("s:winBeforeErr") exe s:winBeforeErr."wincmd w" @@ -9044,7 +9659,7 @@ " restore window if exists("w:netrw_winnr") -" call Decho("(NetrwRestorePosn) restore window: exe sil! ".w:netrw_winnr."wincmd w") +" call Decho("restore window: exe sil! ".w:netrw_winnr."wincmd w") exe "sil! ".w:netrw_winnr."wincmd w" endif if v:shell_error == 0 @@ -9055,29 +9670,38 @@ " restore top-of-screen line if exists("w:netrw_hline") -" call Decho("(NetrwRestorePosn) restore topofscreen: exe keepj norm! ".w:netrw_hline."G0z") +" call Decho("restore topofscreen: exe keepj norm! ".w:netrw_hline."G0z") exe "keepj norm! ".w:netrw_hline."G0z\" endif " restore position if exists("w:netrw_line") && exists("w:netrw_col") -" call Decho("(NetrwRestorePosn) restore posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|") +" call Decho("restore posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|") exe "keepj norm! ".w:netrw_line."G0".w:netrw_col."\" endif let &ei= eikeep -" call Dret("netrw#NetrwRestorePosn : line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()) +" call Dret("netrw#RestorePosn : line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()) +endfun + +" --------------------------------------------------------------------- +" netrw#RFC2396: converts %xx into characters {{{2 +fun! netrw#RFC2396(fname) +" call Dfunc("netrw#RFC2396(fname<".a:fname.">)") + let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t") +" call Dret("netrw#RFC2396 ".fname) + return fname endfun " --------------------------------------------------------------------- -" netrw#NetrwSavePosn: saves position of cursor on screen {{{2 -fun! netrw#NetrwSavePosn() -" call Dfunc("netrw#NetrwSavePosn() line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()) +" netrw#SavePosn: saves position of cursor on screen {{{2 +fun! netrw#SavePosn() +" call Dfunc("netrw#SavePosn() line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()) " Save current line and column let w:netrw_winnr= winnr() let w:netrw_line = line(".") let w:netrw_col = virtcol(".") -" call Decho("(NetrwSavePosn) currently, win#".w:netrw_winnr." line#".w:netrw_line." col#".w:netrw_col) +" call Decho("currently, win#".w:netrw_winnr." line#".w:netrw_line." col#".w:netrw_col) " Save top-of-screen line keepj norm! H0 @@ -9086,33 +9710,29 @@ " set up string holding position parameters let ret = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline - keepj call netrw#NetrwRestorePosn() -" call Dret("netrw#NetrwSavePosn : winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline) + keepj call netrw#RestorePosn() +" call Dret("netrw#SavePosn : winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : "n/a")." line=".(exists("w:netrw_line")? w:netrw_line : "n/a")." col=".(exists("w:netrw_col")? w:netrw_col : "n/a")." hline=".(exists("w:netrw_hline")? w:netrw_hline : "n/a")) return ret endfun " --------------------------------------------------------------------- -" netrw#NetrwAccess: intended to provide access to variable values for netrw's test suite {{{2 -" 0: marked file list of current buffer -" 1: marked file target -fun! netrw#NetrwAccess(ilist) - if a:ilist == 0 - if exists("s:netrwmarkfilelist_".bufnr('%')) - return s:netrwmarkfilelist_{bufnr('%')} - else - return "no-list-buf#".bufnr('%') - endif - elseif a:ilist == 1 - return s:netrwmftgt -endfun - -" ------------------------------------------------------------------------ -" netrw#RFC2396: converts %xx into characters {{{2 -fun! netrw#RFC2396(fname) -" call Dfunc("netrw#RFC2396(fname<".a:fname.">)") - let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t") -" call Dret("netrw#RFC2396 ".fname) - return fname +" netrw#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{2 +fun! netrw#WinPath(path) +" call Dfunc("netrw#WinPath(path<".a:path.">)") + if (!g:netrw_cygwin || &shell !~ '\%(\\|\\)\%(\.exe\)\=$') && (has("win32") || has("win95") || has("win64") || has("win16")) + " remove cygdrive prefix, if present + let path = substitute(a:path,g:netrw_cygdrive.'/\(.\)','\1:','') + " remove trailing slash (Win95) + let path = substitute(path, '\(\\\|/\)$', '', 'g') + " remove escaped spaces + let path = substitute(path, '\ ', ' ', 'g') + " convert slashes to backslashes + let path = substitute(path, '/', '\', 'g') + else + let path= a:path + endif +" call Dret("netrw#WinPath <".path.">") + return path endfun " --------------------------------------------------------------------- @@ -9179,7 +9799,7 @@ " call Dfunc("s:FileReadable(fname<".a:fname.">)") if g:netrw_cygwin - let ret= filereadable(substitute(a:fname,'/cygdrive/\(.\)','\1:/','')) + let ret= filereadable(substitute(a:fname,g:netrw_cygdrive.'/\(.\)','\1:/','')) else let ret= filereadable(a:fname) endif @@ -9205,7 +9825,7 @@ " sanity check -- does the temporary file's directory exist? if !isdirectory(substitute(tmpfile,'[^/]\+$','','e')) -" call Decho("(GetTempfile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") keepj call netrw#ErrorMsg(s:ERROR,"your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!",2) " call Dret("s:GetTempfile getcwd<".getcwd().">") return "" @@ -9217,7 +9837,7 @@ " o/s dependencies if g:netrw_cygwin != 0 - let tmpfile = substitute(tmpfile,'^\(\a\):','/cygdrive/\1','e') + let tmpfile = substitute(tmpfile,'^\(\a\):',g:netrw_cygdrive.'/\1','e') elseif has("win32") || has("win95") || has("win64") || has("win16") if !exists("+shellslash") || !&ssl let tmpfile = substitute(tmpfile,'/','\','g') @@ -9253,7 +9873,7 @@ endif endif -" call Decho("(GetTempFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("s:GetTempfile <".tmpfile.">") return tmpfile endfun @@ -9342,7 +9962,7 @@ let &l:cursorcolumn = s:netrw_usercuc if w:netrw_liststyle == s:WIDELIST " call Decho("case g:netrw_cursor==2 and wide: setl cul (use user's cuc)") - set cursorline + setl cursorline else " call Decho("case g:netrw_cursor==2 and not wide: (use user's cul,cuc)") let &l:cursorline = s:netrw_usercul @@ -9361,7 +9981,7 @@ " --------------------------------------------------------------------- " s:RestoreCursorline: restores cursorline/cursorcolumn to original user settings {{{2 fun! s:RestoreCursorline() -" call Dfunc("s:RestoreCursorline() currently, cul=".&l:cursorline." cuc=".&l:cursorcolumn." win#".winnr()." buf#".bufnr("%")." mod=".&mod) +" call Dfunc("s:RestoreCursorline() currently, cul=".&l:cursorline." cuc=".&l:cursorcolumn." win#".winnr()." buf#".bufnr("%")) if exists("s:netrw_usercul") let &l:cursorline = s:netrw_usercul endif @@ -9432,7 +10052,7 @@ let netrw_keepdiff= &l:diff keepj keepalt enew! let &l:diff= netrw_keepdiff -" call Decho("bufnr($)=".bufnr("$")) +" call Decho("bufnr($)=".bufnr("$")." winnr($)=".winnr("$")) keepj call s:NetrwOptionSave("w:") " copy function-local-variables to buffer variable equivalents @@ -9459,7 +10079,7 @@ if b:netrw_curdir =~ '/$' if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST file NetrwTreeListing - set bt=nowrite noswf bh=hide + setl bt=nowrite noswf bh=hide nno [ :sil call TreeListMove('[') nno ] :sil call TreeListMove(']') else @@ -9468,7 +10088,7 @@ endif endif -" call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#")."> bh=".&bh) +" call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#")."> bh=".&bh." win#".winnr()." winnr($)#".winnr("$")) endfun " --------------------------------------------------------------------- @@ -9499,6 +10119,43 @@ " call Dret("s:NetrwInsureWinVars win#".winnr()) endfun +" --------------------------------------------------------------------- +" s:NetrwLcd: handles changing the (local) directory {{{2 +fun! s:NetrwLcd(newdir) +" call Dfunc("s:NetrwLcd(newdir<".a:newdir.">)") + + try + exe 'keepj sil lcd '.fnameescape(a:newdir) + catch /^Vim\%((\a\+)\)\=:E344/ + " Vim's lcd fails with E344 when attempting to go above the 'root' of a Windows share. + " Therefore, detect if a Windows share is present, and if E344 occurs, just settle at + " 'root' (ie. '\'). The share name may start with either backslashes ('\\Foo') or + " forward slashes ('//Foo'), depending on whether backslashes have been converted to + " forward slashes by earlier code; so check for both. + if (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin + if a:newdir =~ '^\\\\\w\+' || a:newdir =~ '^//\w\+' + let dirname = '\' + exe 'keepj sil lcd '.fnameescape(dirname) + endif + endif + catch /^Vim\%((\a\+)\)\=:E472/ + call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".a:newdir."> (permissions?)",61) + if exists("w:netrw_prvdir") + let a:newdir= w:netrw_prvdir + else + call s:NetrwOptionRestore("w:") +" call Decho("setl noma nomod nowrap") + setl noma nomod nowrap +" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") + let a:newdir= dirname +" call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") + return + endif + endtry + +" call Dret("s:NetrwLcd") +endfun + " ------------------------------------------------------------------------ " s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2 " changed sorting, etc. Also see s:NetrwRestoreWordPosn(). @@ -9537,13 +10194,19 @@ fun! s:RemotePathAnalysis(dirname) " call Dfunc("s:RemotePathAnalysis(a:dirname<".a:dirname.">)") - let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/:#]\+\)\%([:#]\(\d\+\)\)\=/\(.*\)$' + " method :// user @ machine :port /path + let dirpat = '^\(\w\{-}\)://\(\(\w\+\)@\)\=\([^/:#]\+\)\%([:#]\(\d\+\)\)\=/\(.*\)$' let s:method = substitute(a:dirname,dirpat,'\1','') - let s:user = substitute(a:dirname,dirpat,'\2','') - let s:machine = substitute(a:dirname,dirpat,'\3','') - let s:port = substitute(a:dirname,dirpat,'\4','') - let s:path = substitute(a:dirname,dirpat,'\5','') + let s:user = substitute(a:dirname,dirpat,'\3','') + let s:machine = substitute(a:dirname,dirpat,'\4','') + let s:port = substitute(a:dirname,dirpat,'\5','') + let s:path = substitute(a:dirname,dirpat,'\6','') let s:fname = substitute(a:dirname,'^.*/\ze.','','') + if s:machine =~ '@' + let dirpat = '^\(.*\)@\(.\{-}\)$' + let s:user = s:user.'@'.substitute(s:machine,dirpat,'\1','') + let s:machine = substitute(s:machine,dirpat,'\2','') + endif " call Decho("set up s:method <".s:method .">") " call Decho("set up s:user <".s:user .">") @@ -9620,33 +10283,51 @@ return endif " call Dfunc("s:NetrwRexplore() w:netrw_rexlocal=".w:netrw_rexlocal." w:netrw_rexdir<".w:netrw_rexdir.">") +" call Decho("ft=".&ft." win#".winnr()." w:netrw_rexfile<".(exists("w:netrw_rexfile")? w:netrw_rexfile : 'n/a').">") + + if &ft == "netrw" && exists("w:netrw_rexfile") && w:netrw_rexfile != "" +" call Decho("in netrw buffer, will edit file<".w:netrw_rexfile.">") + exe "e ".w:netrw_rexfile + unlet w:netrw_rexfile +" call Dret("s:NetrwRexplore returning from netrw to buf#".bufnr("%")."<".bufname("%")."> (ft=".&ft.")") + return + endif + + " record current file so :Rex can return to it from netrw + let w:netrw_rexfile= expand("%") + if !exists("w:netrw_rexlocal") -" " call Dret("s:NetrwRexplore() w:netrw_rexlocal doesn't exist") +" call Dret("s:NetrwRexplore w:netrw_rexlocal doesn't exist (".&ft.")") return endif +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) if w:netrw_rexlocal keepj call netrw#LocalBrowseCheck(w:netrw_rexdir) else keepj call s:NetrwBrowse(0,w:netrw_rexdir) endif if exists("s:initbeval") - set beval + setl beval endif if exists("s:rexposn_".bufnr("%")) -" call Decho("(NetrwRexplore) restore posn, then unlet s:rexposn_".bufnr('%')) - keepj call netrw#NetrwRestorePosn(s:rexposn_{bufnr('%')}) +" call Decho("restore posn, then unlet s:rexposn_".bufnr('%')) + keepj call netrw#RestorePosn(s:rexposn_{bufnr('%')}) unlet s:rexposn_{bufnr('%')} else -" call Decho("(NetrwRexplore) s:rexposn_".bufnr('%')." doesn't exist") +" call Decho("s:rexposn_".bufnr('%')." doesn't exist") endif + if exists("s:explore_match") exe "2match netrwMarkFile /".s:explore_match."/" endif -" call Dret("s:NetrwRexplore") + +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo) +" call Dret("s:NetrwRexplore : ft=".&ft) endfun " --------------------------------------------------------------------- -" s:SaveBufVars: {{{2 +" s:SaveBufVars: save selected b: variables to s: variables {{{2 +" use s:RestoreBufVars() to restore b: variables from s: variables fun! s:SaveBufVars() " call Dfunc("s:SaveBufVars() buf#".bufnr("%")) @@ -9717,42 +10398,48 @@ endfun " --------------------------------------------------------------------- -" s:Strlen: this function returns the length of a string, even if its {{{2 -" using multiple-byte characters. -" Solution from Nicolai Weibull, vim docs (:help strlen()), Tony Mechelynck, -" and a bit from me. -" if g:netrw_xstrlen is zero (default), then the builtin strlen() function is used. +" s:Strlen: this function returns the length of a string, even if its using multi-byte characters. {{{2 +" Solution from Nicolai Weibull, vim docs (:help strlen()), +" Tony Mechelynck, and my own invention. fun! s:Strlen(x) -" call Dfunc("s:Strlen(x<".a:x.">") - if g:netrw_xstrlen == 1 +" "" call Dfunc("s:Strlen(x<".a:x."> g:Align_xstrlen=".g:Align_xstrlen.")") + + if v:version >= 703 && exists("*strdisplaywidth") + let ret= strdisplaywidth(a:x) + + elseif type(g:Align_xstrlen) == 1 + " allow user to specify a function to compute the string length (ie. let g:Align_xstrlen="mystrlenfunc") + exe "let ret= ".g:Align_xstrlen."('".substitute(a:x,"'","''","g")."')" + + elseif g:Align_xstrlen == 1 " number of codepoints (Latin a + combining circumflex is two codepoints) " (comment from TM, solution from NW) let ret= strlen(substitute(a:x,'.','c','g')) - - elseif g:netrw_xstrlen == 2 - " number of spacing codepoints (Latin a + combining circumflex is one spacing + + elseif g:Align_xstrlen == 2 + " number of spacing codepoints (Latin a + combining circumflex is one spacing " codepoint; a hard tab is one; wide and narrow CJK are one each; etc.) " (comment from TM, solution from TM) - let ret=strlen(substitute(a:x, '.\Z', 'x', 'g')) - - elseif g:netrw_xstrlen == 3 - " virtual length (counting, for instance, tabs as anything between 1 and - " 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately + let ret=strlen(substitute(a:x, '.\Z', 'x', 'g')) + + elseif g:Align_xstrlen == 3 + " virtual length (counting, for instance, tabs as anything between 1 and + " 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately " preceded by lam, one otherwise, etc.) " (comment from TM, solution from me) - let modkeep= &mod - exe "keepj norm! o\" + let modkeep= &l:mod + exe "norm! o\" call setline(line("."),a:x) let ret= virtcol("$") - 1 - keepj d + d keepj norm! k - let &mod= modkeep - + let &l:mod= modkeep + else " at least give a decent default - let ret= strlen(a:x) + let ret= strlen(a:x) endif -" call Dret("s:Strlen ".ret) +" "" call Dret("s:Strlen ".ret) return ret endfun @@ -9764,7 +10451,7 @@ let prvline = (line(".") > 1)? getline(line(".")-1) : '' let nxtline = (line(".") < line("$"))? getline(line(".")+1) : '' let curindent= substitute(curline,'^\([| ]*\).\{-}$','\1','') - let indentm1 = substitute(curindent,'^| ','','') + let indentm1 = substitute(curindent,'^'.s:treedepthstring.' ','','') " call Decho("prvline <".prvline."> #".line(".")-1) " call Decho("curline <".curline."> #".line(".")) " call Decho("nxtline <".nxtline."> #".line(".")+1) @@ -9775,22 +10462,22 @@ " call Decho('regfile') if a:dir == '[' && prvline != '' keepj norm! 0 - let nl = search('^'.indentm1.'[^|]','bWe') " search backwards from regular file + let nl = search('^'.indentm1.'[^'.s:treedepthstring.']','bWe') " search backwards from regular file " call Decho("regfile srch back: ".nl) elseif a:dir == ']' && nxtline != '' keepj norm! $ - let nl = search('^'.indentm1.'[^|]','We') " search forwards from regular file + let nl = search('^'.indentm1.'[^'.s:treedepthstring.']','We') " search forwards from regular file " call Decho("regfile srch fwd: ".nl) endif elseif a:dir == '[' && prvline != '' keepj norm! 0 let curline= line(".") - let nl = search('^'.curindent.'[^|]','bWe') " search backwards From directory, same indentation + let nl = search('^'.curindent.'[^'.s:treedepthstring.']','bWe') " search backwards From directory, same indentation " call Decho("dir srch back ind: ".nl) if nl != 0 if line(".") == curline-1 - let nl= search('^'.indentm1.'[^|]','bWe') " search backwards from directory, indentation - 1 + let nl= search('^'.indentm1.'[^'.s:treedepthstring.']','bWe') " search backwards from directory, indentation - 1 " call Decho("dir srch back ind-1: ".nl) endif endif @@ -9798,11 +10485,11 @@ elseif a:dir == ']' && nxtline != '' keepj norm! $ let curline = line(".") - let nl = search('^'.curindent.'[^|]','We') " search forwards from directory, same indentation + let nl = search('^'.curindent.'[^'.s:treedepthstring.']','We') " search forwards from directory, same indentation " call Decho("dir srch fwd ind: ".nl) if nl != 0 if line(".") == curline+1 - let nl= search('^'.indentm1.'[^|]','We') " search forwards from directory, indentation - 1 + let nl= search('^'.indentm1.'[^'.s:treedepthstring.']','We') " search forwards from directory, indentation - 1 " call Decho("dir srch fwd ind-1: ".nl) endif endif diff -Nru vim-7.4a.012/runtime/autoload/phpcomplete.vim vim-7.4.273/runtime/autoload/phpcomplete.vim --- vim-7.4a.012/runtime/autoload/phpcomplete.vim 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/autoload/phpcomplete.vim 2014-04-29 18:04:09.000000000 +0000 @@ -1,27 +1,99 @@ " Vim completion script " Language: PHP -" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) -" Last Change: 2011 Dec 08 +" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com ) +" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) " -" TODO: -" - Class aware completion: -" a) caching? -" - Switching to HTML (XML?) completion (SQL) inside of phpStrings -" - allow also for XML completion <- better do html_flavor for HTML -" completion -" - outside of getting parent tag may cause problems. Heh, even in -" perfect conditions GetLastOpenTag doesn't cooperate... Inside of -" phpStrings this can be even a bonus but outside of it is not the -" best situation +" OPTIONS: +" +" let g:phpcomplete_relax_static_constraint = 1/0 [default 0] +" Enables completion for non-static methods when completing for static context (::). +" This generates E_STRICT level warning, but php calls these methods nontheless. +" +" let g:phpcomplete_complete_for_unknown_classes = 1/0 [default 0] +" Enables completion of variables and functions in "everything under the sun" fashion +" when completing for an instance or static class context but the code can't tell the class +" or locate the file that it lives in. +" The completion list generated this way is only filtered by the completion base +" and generally not much more accurate then simple keyword completion. +" +" let g:phpcomplete_search_tags_for_variables = 1/0 [default 0] +" Enables use of tags when the plugin tries to find variables. +" When enabled the plugin will search for the variables in the tag files with kind 'v', +" lines like $some_var = new Foo; but these usually yield highly inaccurate results and +" can be fairly slow. +" +" let g:phpcomplete_min_num_of_chars_for_namespace_completion = n [default 1] +" This option controls the number of characters the user needs to type before +" the tags will be searched for namespaces and classes in typed out namespaces in +" "use ..." context. Setting this to 0 is not recommended because that means the code +" have to scan every tag, and vim's taglist() function runs extremly slow with a +" "match everything" pattern. +" +" let g:phpcomplete_parse_docblock_comments = 1/0 [default 0] +" When enabled the preview window's content will include information +" extracted from docblock comments of the completions. +" Enabling this option will add return types to the completion menu for functions too. +" +" let g:phpcomplete_cache_taglists = 1/0 [default 1] +" When enabled the taglist() lookups will be cached and subsequent searches +" for the same pattern will not check the tagfiles any more, thus making the +" lookups faster. Cache expiration is based on the mtimes of the tag files. +" +" TODO: +" - Switching to HTML (XML?) completion (SQL) inside of phpStrings +" - allow also for XML completion <- better do html_flavor for HTML +" completion +" - outside of getting parent tag may cause problems. Heh, even in +" perfect conditions GetLastOpenTag doesn't cooperate... Inside of +" phpStrings this can be even a bonus but outside of it is not the +" best situation + +if !exists('g:phpcomplete_relax_static_constraint') + let g:phpcomplete_relax_static_constraint = 0 +endif + +if !exists('g:phpcomplete_complete_for_unknown_classes') + let g:phpcomplete_complete_for_unknown_classes = 0 +endif + +if !exists('g:phpcomplete_search_tags_for_variables') + let g:phpcomplete_search_tags_for_variables = 0 +endif + +if !exists('g:phpcomplete_min_num_of_chars_for_namespace_completion') + let g:phpcomplete_min_num_of_chars_for_namespace_completion = 1 +endif + +if !exists('g:phpcomplete_parse_docblock_comments') + let g:phpcomplete_parse_docblock_comments = 0 +endif + +if !exists('g:phpcomplete_cache_taglists') + let g:phpcomplete_cache_taglists = 1 +endif + +if !exists('s:cache_classstructures') + let s:cache_classstructures = {} +endif + +if !exists('s:cache_tags') + let s:cache_tags = {} +endif + +if !exists('s:cache_tags_checksum') + let s:cache_tags_checksum = '' +endif + +let s:script_path = fnamemodify(resolve(expand(':p')), ':h') -function! phpcomplete#CompletePHP(findstart, base) +function! phpcomplete#CompletePHP(findstart, base) " {{{ if a:findstart unlet! b:php_menu " Check if we are inside of PHP markup let pos = getpos('.') let phpbegin = searchpairpos('', 'bWn', \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\|comment"') - let phpend = searchpairpos('', 'Wn', + let phpend = searchpairpos('', 'Wn', \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\|comment"') if phpbegin == [0,0] && phpend == [0,0] @@ -37,5116 +109,2449 @@ let start = col('.') - 1 let curline = line('.') let compl_begin = col('.') - 2 - while start >= 0 && line[start - 1] =~ '[a-zA-Z_0-9\x7f-\xff$]' + while start >= 0 && line[start - 1] =~ '[\\a-zA-Z_0-9\x7f-\xff$]' let start -= 1 endwhile - let b:compl_context = getline('.')[0:compl_begin] - return start + let b:phpbegin = phpbegin + let b:compl_context = phpcomplete#GetCurrentInstruction(line('.'), col('.') - 2, phpbegin) + return start " We can be also inside of phpString with HTML tags. Deal with " it later (time, not lines). endif - endif + + " If exists b:php_menu it means completion was already constructed we " don't need to do anything more if exists("b:php_menu") return b:php_menu endif - " Initialize base return lists - let res = [] - let res2 = [] + + if !exists('g:php_builtin_functions') + call phpcomplete#LoadData() + endif + " a:base is very short - we need context if exists("b:compl_context") let context = b:compl_context unlet! b:compl_context - endif + " chop of the "base" from the end of the current instruction + if a:base != "" + let context = substitute(context, '\s*\$\?\([a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\)*$', '', '') + end + end - if !exists('g:php_builtin_functions') - call phpcomplete#LoadData() + let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.'))) + + if context =~? '^use\s' + return phpcomplete#CompleteUse(a:base) endif - let scontext = substitute(context, '\$\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*$', '', '') + if context =~ '\(->\|::\)$' + " {{{ + " Get name of the class + let classname = phpcomplete#GetClassName(line('.'), context, current_namespace, imports) + + " Get location of class definition, we have to iterate through all + if classname != '' + if classname =~ '\' + " split the last \ segment as a classname, everything else is the namespace + let classname_parts = split(classname, '\') + let namespace = join(classname_parts[0:-2], '\') + let classname = classname_parts[-1] + else + let namespace = '\' + endif + let classlocation = phpcomplete#GetClassLocation(classname, namespace) + else + let classlocation = '' + endif - if scontext =~ '\(=\s*new\|extends\)\s\+$' - " Complete class name - " Internal solution for finding classes in current file. - let file = getline(1, '$') - call filter(file, - \ 'v:val =~ "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') - let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) - let jfile = join(file, ' ') - let int_values = split(jfile, 'class\s\+') - let int_classes = {} - for i in int_values - let c_name = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') - if c_name != '' - let int_classes[c_name] = '' + if classlocation != '' + if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname)) + return phpcomplete#CompleteBuiltInClass(context, classname, a:base) endif - endfor - " Prepare list of classes from tags file - let ext_classes = {} - let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) - if fnames != '' - exe 'silent! vimgrep /^'.a:base.'.*\tc\(\t\|$\)/j '.fnames - let qflist = getqflist() - if len(qflist) > 0 - for field in qflist - " [:space:] thing: we don't have to be so strict when - " dealing with tags files - entries there were already - " checked by ctags. - let item = matchstr(field['text'], '^[^[:space:]]\+') - let ext_classes[item] = '' - endfor + if filereadable(classlocation) + let classfile = readfile(classlocation) + let classcontent = '' + let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname) + let sccontent = split(classcontent, "\n") + let visibility = expand('%:p') == fnamemodify(classlocation, ':p') ? 'private' : 'public' + + return phpcomplete#CompleteUserClass(context, a:base, sccontent, visibility) endif endif - " Prepare list of built in classes from g:php_builtin_functions - if !exists("g:php_omni_bi_classes") - let g:php_omni_bi_classes = {} - for i in keys(g:php_builtin_object_functions) - let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = '' - endfor + return phpcomplete#CompleteUnknownClass(a:base, context) + " }}} + elseif context =~? 'implements' + return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports) + elseif context =~? 'extends\s\+.\+$' + return ['implements'] + elseif context =~? 'extends' + let kinds = context =~? 'class\s' ? ['c'] : ['i'] + return phpcomplete#CompleteClassName(a:base, kinds, current_namespace, imports) + elseif context =~? 'class [a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*' + " special case when you've typed the class keyword and the name too, only extends and implements allowed there + return filter(['extends', 'implements'], 'stridx(v:val, a:base) == 0') + elseif context =~? 'new' + return phpcomplete#CompleteClassName(a:base, ['c'], current_namespace, imports) + endif + + if a:base =~ '^\$' + return phpcomplete#CompleteVariable(a:base) + else + return phpcomplete#CompleteGeneral(a:base, current_namespace, imports) + endif +endfunction +" }}} + +function! phpcomplete#CompleteUse(base) " {{{ + " completes builtin class names regadless of g:phpcomplete_min_num_of_chars_for_namespace_completion + " completes namespaces from tags + " * requires patched ctags + " completes classnames from tags within the already typed out namespace using the "namespace" field of tags + " * requires patched ctags + + let res = [] + + " class and namespace names are always considered absoltute in use ... expressions, leading slash is not recommended + " by the php manual, so we gonna get rid of that + if a:base =~? '^\' + let base = substitute(a:base, '^\', '', '') + else + let base = a:base + endif + + let namespace_match_pattern = substitute(base, '\\', '\\\\', 'g') + let classname_match_pattern = matchstr(base, '[^\\]\+$') + let namespace_for_class = substitute(substitute(namespace_match_pattern, '\\\\', '\\', 'g'), '\\*'.classname_match_pattern.'$', '', '') + + if len(namespace_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion + if len(classname_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion + let tags = phpcomplete#GetTaglist('^\('.namespace_match_pattern.'\|'.classname_match_pattern.'\)') + else + let tags = phpcomplete#GetTaglist('^'.namespace_match_pattern) endif - let classes = sort(keys(int_classes)) - let classes += sort(keys(ext_classes)) - let classes += sort(keys(g:php_omni_bi_classes)) - - for m in classes - if m =~ '^'.a:base - call add(res, m) + let patched_ctags_detected = 0 + let namespaced_matches = [] + let no_namespace_matches = [] + for tag in tags + if has_key(tag, 'namespace') + let patched_ctags_detected = 1 + endif + if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern + let patched_ctags_detected = 1 + call add(namespaced_matches, {'word': tag.name, 'kind': 'n', 'menu': tag.filename, 'info': tag.filename }) + elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i') && tag.namespace ==? namespace_for_class + call add(namespaced_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename }) + elseif (tag.kind ==? 'c' || tag.kind ==? 'i') + call add(no_namespace_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename }) endif endfor + " if it seems that the tags file have namespace informations we can safely throw + " away namespaceless tag matches since we can be sure they are invalid + if patched_ctags_detected + no_namespace_matches = [] + endif + let res += namespaced_matches + no_namespace_matches + endif - let final_menu = [] - for i in res - let final_menu += [{'word':i, 'kind':'c'}] + if base !~ '\' + let builtin_classnames = filter(keys(copy(g:php_builtin_classnames)), 'v:val =~? "^'.classname_match_pattern.'"') + for classname in builtin_classnames + call add(res, {'word': classname, 'kind': 'c'}) endfor + let builtin_interfacenames = filter(keys(copy(g:php_builtin_interfacenames)), 'v:val =~? "^'.classname_match_pattern.'"') + for interfacename in builtin_interfacenames + call add(res, {'word': interfacename, 'kind': 'i'}) + endfor + endif - return final_menu + return res +endfunction +" }}} - elseif scontext =~ '\(->\|::\)$' - " Complete user functions and variables - " Internal solution for current file. - " That seems as unnecessary repeating of functions but there are - " few not so subtle differences as not appending of $ and addition - " of 'kind' tag (not necessary in regular completion) - - if scontext =~ '->$' && scontext !~ '\$this->$' - - " Get name of the class - let classname = phpcomplete#GetClassName(scontext) - - " Get location of class definition, we have to iterate through all - " tags files separately because we need relative path from current - " file to the exact file (tags file can be in different dir) - if classname != '' - let classlocation = phpcomplete#GetClassLocation(classname) - else - let classlocation = '' - endif +function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{ + " Complete everything else - + " + functions, DONE + " + keywords of language DONE + " + defines (constant definitions), DONE + " + extend keywords for predefined constants, DONE + " + classes (after new), DONE + " + limit choice after -> and :: to funcs and vars DONE - if classlocation == 'VIMPHP_BUILTINOBJECT' + " Internal solution for finding functions in current file. - for object in keys(g:php_builtin_object_functions) - if object =~ '^'.classname - let res += [{'word':substitute(object, '.*::', '', ''), - \ 'info': g:php_builtin_object_functions[object]}] - endif - endfor + if a:base =~? '^\' + let leading_slash = '\' + else + let leading_slash = '' + endif - return res + let file = getline(1, '$') + call filter(file, + \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') + let jfile = join(file, ' ') + let int_values = split(jfile, 'function\s\+') + let int_functions = {} + for i in int_values + let f_name = matchstr(i, + \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') + if f_name =~? '^'.substitute(a:base, '\\', '\\\\', 'g') + let f_args = matchstr(i, + \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|$\)') + let int_functions[f_name.'('] = f_args.')' + endif + endfor - endif + " Internal solution for finding constants in current file + let file = getline(1, '$') + call filter(file, 'v:val =~ "define\\s*("') + let jfile = join(file, ' ') + let int_values = split(jfile, 'define\s*(\s*') + let int_constants = {} + for i in int_values + let c_name = matchstr(i, '\(["'']\)\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze\1') + if c_name != '' && c_name =~# '^'.substitute(a:base, '\\', '\\\\', 'g') + let int_constants[leading_slash.c_name] = '' + endif + endfor - if filereadable(classlocation) - let classfile = readfile(classlocation) - let classcontent = '' - let classcontent .= "\n".phpcomplete#GetClassContents(classfile, classname) - let sccontent = split(classcontent, "\n") + " Prepare list of functions from tags file + let ext_functions = {} + let ext_constants = {} + let ext_classes = {} + let ext_interfaces = {} + let ext_namespaces = {} + + let base = substitute(a:base, '^\\', '', '') + let [tag_match_pattern, namespace_for_tag] = phpcomplete#ExpandClassName(a:base, a:current_namespace, a:imports) + let namespace_match_pattern = substitute((namespace_for_tag == '' ? '' : namespace_for_tag.'\').tag_match_pattern, '\\', '\\\\', 'g') + + let tags = [] + if len(namespace_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion && len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion && tag_match_pattern != namespace_match_pattern + let tags = phpcomplete#GetTaglist('\c^\('.tag_match_pattern.'\|'.namespace_match_pattern.'\)') + elseif len(namespace_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion + let tags = phpcomplete#GetTaglist('\c^'.namespace_match_pattern) + elseif len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion + let tags = phpcomplete#GetTaglist('\c^'.tag_match_pattern) + endif - " YES, YES, YES! - we have whole content including extends! - " Now we need to get two elements: public functions and public - " vars - " NO, NO, NO! - third separate filtering looking for content - " :(, but all of them have differences. To squeeze them into - " one implementation would require many additional arguments - " and ifs. No good solution - " Functions declared with public keyword or without any - " keyword are public - let functions = filter(deepcopy(sccontent), - \ 'v:val =~ "^\\s*\\(static\\s\\+\\|public\\s\\+\\)*function"') - let jfuncs = join(functions, ' ') - let sfuncs = split(jfuncs, 'function\s\+') - let c_functions = {} - for i in sfuncs - let f_name = matchstr(i, - \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') - let f_args = matchstr(i, - \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*{') - if f_name != '' - let c_functions[f_name.'('] = f_args - endif - endfor - " Variables declared with var or with public keyword are - " public - let variables = filter(deepcopy(sccontent), - \ 'v:val =~ "^\\s*\\(public\\|var\\)\\s\\+\\$"') - let jvars = join(variables, ' ') - let svars = split(jvars, '\$') - let c_variables = {} - for i in svars - let c_var = matchstr(i, - \ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') - if c_var != '' - let c_variables[c_var] = '' - endif - endfor + for tag in tags + if !has_key(tag, 'namespace') || tag.namespace ==? a:current_namespace || tag.namespace ==? namespace_for_tag + if has_key(tag, 'namespace') + let full_name = tag.namespace.'\'.tag.name " absolute namespaced name (without leading '\') + + let base_parts = split(a:base, '\') + if len(base_parts) > 1 + let namespace_part = join(base_parts[0:-2], '\') + else + let namespace_part = '' + endif + let relative_name = (namespace_part == '' ? '' : namespace_part.'\').tag.name + endif - let all_values = {} - call extend(all_values, c_functions) - call extend(all_values, c_variables) - - for m in sort(keys(all_values)) - if m =~ '^'.a:base && m !~ '::' - call add(res, m) - elseif m =~ '::'.a:base - call add(res2, m) + if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern + let info = tag.name.' - '.tag.filename + " patched ctag provides absolute namespace names as tag name, namespace tags dont have namespace fields + let full_name = tag.name + + let base_parts = split(a:base, '\') + let full_name_parts = split(full_name, '\') + if len(base_parts) > 1 + " the first segment could be a renamed import, take the first segment from the user provided input + " so if it's a sub namespace of a renamed namespace, just use the typed in segments in place of the absolute path + " for example: + " you have a namespace NS1\SUBNS as SUB + " you have a sub-sub-namespace NS1\SUBNS\SUBSUB + " typed in SUB\SU + " the tags will return NS1\SUBNS\SUBSUB + " the completion should be: SUB\SUBSUB by replacing the NS1\SUBSN to SUB as in the import + if has_key(a:imports, base_parts[0]) && a:imports[base_parts[0]].kind == 'n' + let import = a:imports[base_parts[0]] + let relative_name = substitute(full_name, '^'.substitute(import.name, '\\', '\\\\', 'g'), base_parts[0], '') + else + let relative_name = strpart(full_name, stridx(full_name, a:base)) endif - endfor + else + let relative_name = strpart(full_name, stridx(full_name, a:base)) + endif - let start_list = res + res2 + if leading_slash == '' + let ext_namespaces[relative_name.'\'] = info + else + let ext_namespaces['\'.full_name.'\'] = info + endif + elseif tag.kind ==? 'f' && !has_key(tag, 'class') " class related functions (methods) completed elsewhere, only works with patched ctags + if has_key(tag, 'signature') + let prototype = tag.signature[1:-2] " drop the ()s around the string + else + let prototype = matchstr(tag.cmd, + \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') + endif + let info = prototype.') - '.tag.filename - let final_list = [] - for i in start_list - if has_key(c_variables, i) - let class = ' ' - if all_values[i] != '' - let class = i.' class ' + if !has_key(tag, 'namespace') + let ext_functions[tag.name.'('] = info + else + if tag.namespace ==? namespace_for_tag + if leading_slash == '' + let ext_functions[relative_name.'('] = info + else + let ext_functions['\'.full_name.'('] = info endif - let final_list += - \ [{'word':i, - \ 'info':class.all_values[i], - \ 'kind':'v'}] - else - let final_list += - \ [{'word':substitute(i, '.*::', '', ''), - \ 'info':i.all_values[i].')', - \ 'kind':'f'}] endif - endfor + endif + elseif tag.kind ==? 'd' + let info = ' - '.tag.filename + if !has_key(tag, 'namespace') + let ext_constants[tag.name] = info + else + if tag.namespace ==? namespace_for_tag + if leading_slash == '' + let ext_constants[relative_name] = info + else + let ext_constants['\'.full_name] = info + endif + endif + endif + elseif tag.kind ==? 'c' || tag.kind ==? 'i' + let info = ' - '.tag.filename - return final_list + let key = '' + if !has_key(tag, 'namespace') + let key = tag.name + else + if tag.namespace ==? namespace_for_tag + if leading_slash == '' + let key = relative_name + else + let key = '\'.full_name + endif + endif + endif + if key != '' + if tag.kind ==? 'c' + let ext_classes[key] = info + elseif tag.kind ==? 'i' + let ext_interfaces[key] = info + endif + endif endif - endif + endfor - if a:base =~ '^\$' - let adddollar = '$' - else - let adddollar = '' - endif - let file = getline(1, '$') - let jfile = join(file, ' ') - let sfile = split(jfile, '\$') - let int_vars = {} - for i in sfile - if i =~ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new' - let val = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*').'->' - else - let val = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') - endif - if val !~ '' - let int_vars[adddollar.val] = '' + let builtin_constants = {} + let builtin_classnames = {} + let builtin_interfaces = {} + let builtin_functions = {} + let builtin_keywords = {} + let base = substitute(a:base, '^\', '', '') + if a:current_namespace == '\' || (a:base =~ '^\\' && a:base =~ '^\\[^\\]*$') + + " Add builtin class names + for [classname, info] in items(g:php_builtin_classnames) + if classname =~? '^'.base + let builtin_classnames[leading_slash.classname] = info endif endfor - - " ctags has good support for PHP, use tags file for external - " variables - let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) - let ext_vars = {} - if fnames != '' - let sbase = substitute(a:base, '^\$', '', '') - exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames - let qflist = getqflist() - if len(qflist) > 0 - for field in qflist - let item = matchstr(field['text'], '^[^[:space:]]\+') - " Add -> if it is possible object declaration - let classname = '' - if field['text'] =~ item.'\s*=\s*new\s\+' - let item = item.'->' - let classname = matchstr(field['text'], - \ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') - endif - let ext_vars[adddollar.item] = classname - endfor + for [interfacename, info] in items(g:php_builtin_interfacenames) + if interfacename =~? '^'.base + let builtin_interfaces[leading_slash.interfacename] = info endif - endif - - " Now we have all variables in int_vars dictionary - call extend(int_vars, ext_vars) - - " Internal solution for finding functions in current file. - let file = getline(1, '$') - call filter(file, - \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') - let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) - let jfile = join(file, ' ') - let int_values = split(jfile, 'function\s\+') - let int_functions = {} - for i in int_values - let f_name = matchstr(i, - \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') - let f_args = matchstr(i, - \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*{') - let int_functions[f_name.'('] = f_args.')' endfor + endif - " Prepare list of functions from tags file - let ext_functions = {} - if fnames != '' - exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames - let qflist = getqflist() - if len(qflist) > 0 - for field in qflist - " File name - let item = matchstr(field['text'], '^[^[:space:]]\+') - let fname = matchstr(field['text'], '\t\zs\f\+\ze') - let prototype = matchstr(field['text'], - \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') - let ext_functions[item.'('] = prototype.') - '.fname - endfor - endif + " Prepare list of constants from built-in constants + for [constant, info] in items(g:php_constants) + if constant =~# '^'.base + let builtin_constants[leading_slash.constant] = info endif + endfor - let all_values = {} - call extend(all_values, int_functions) - call extend(all_values, ext_functions) - call extend(all_values, int_vars) " external variables are already in - call extend(all_values, g:php_builtin_object_functions) - - for m in sort(keys(all_values)) - if m =~ '\(^\|::\)'.a:base - call add(res, m) + if leading_slash == '' " keywords should not be completed when base starts with '\' + " Treat keywords as constants + for [constant, info] in items(g:php_keywords) + if constant =~? '^'.a:base + let builtin_keywords[constant] = info endif endfor + endif - let start_list = res + for [function_name, info] in items(g:php_builtin_functions) + if function_name =~? '^'.base + let builtin_functions[leading_slash.function_name] = info + endif + endfor - let final_list = [] - for i in start_list - if has_key(int_vars, i) - let class = ' ' - if all_values[i] != '' - let class = i.' class ' + " All constants + call extend(int_constants, ext_constants) + + " All functions + call extend(int_functions, ext_functions) + call extend(int_functions, builtin_functions) + + for [imported_name, import] in items(a:imports) + if imported_name =~? '^'.base + if import.kind ==? 'c' + if import.builtin + let builtin_classnames[imported_name] = ' '.import.name + else + let ext_classes[imported_name] = ' '.import.name.' - '.import.filename + endif + elseif import.kind ==? 'i' + if import.builtin + let builtin_interfaces[imported_name] = ' '.import.name + else + let ext_interfaces[imported_name] = ' '.import.name.' - '.import.filename endif - let final_list += [{'word':i, 'info':class.all_values[i], 'kind':'v'}] - else - let final_list += - \ [{'word':substitute(i, '.*::', '', ''), - \ 'info':i.all_values[i], - \ 'kind':'f'}] endif - endfor - return final_list - endif + " no builtin interfaces + if import.kind == 'n' + let ext_namespaces[imported_name.'\'] = ' '.import.name.' - '.import.filename + endif + end + endfor - if a:base =~ '^\$' - " Complete variables - " Built-in variables {{{ - let g:php_builtin_vars = {'$GLOBALS':'', - \ '$_SERVER':'', - \ '$_GET':'', - \ '$_POST':'', - \ '$_COOKIE':'', - \ '$_FILES':'', - \ '$_ENV':'', - \ '$_REQUEST':'', - \ '$_SESSION':'', - \ '$HTTP_SERVER_VARS':'', - \ '$HTTP_ENV_VARS':'', - \ '$HTTP_COOKIE_VARS':'', - \ '$HTTP_GET_VARS':'', - \ '$HTTP_POST_VARS':'', - \ '$HTTP_POST_FILES':'', - \ '$HTTP_SESSION_VARS':'', - \ '$php_errormsg':'', - \ '$this':'' - \ } - " }}} + let all_values = {} - " Internal solution for current file. - let file = getline(1, '$') - let jfile = join(file, ' ') - let int_vals = split(jfile, '\ze\$') - let int_vars = {} - for i in int_vals - if i =~ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new' - let val = matchstr(i, - \ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*').'->' - else - let val = matchstr(i, - \ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') - endif - if val != '' - let int_vars[val] = '' - endif - endfor + " Add functions found in this file + call extend(all_values, int_functions) - call extend(int_vars,g:php_builtin_vars) + " Add namespaces from tags + call extend(all_values, ext_namespaces) - " ctags has support for PHP, use tags file for external variables - let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) - let ext_vars = {} - if fnames != '' - let sbase = substitute(a:base, '^\$', '', '') - exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames - let qflist = getqflist() - if len(qflist) > 0 - for field in qflist - let item = '$'.matchstr(field['text'], '^[^[:space:]]\+') - let m_menu = '' - " Add -> if it is possible object declaration - if field['text'] =~ item.'\s*=\s*new\s\+' - let item = item.'->' - let m_menu = matchstr(field['text'], - \ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') - endif - let ext_vars[item] = m_menu - endfor - endif - endif + " Add constants from the current file + call extend(all_values, int_constants) - call extend(int_vars, ext_vars) - let g:a0 = keys(int_vars) + " Add built-in constants + call extend(all_values, builtin_constants) - for m in sort(keys(int_vars)) - if m =~ '^\'.a:base - call add(res, m) - endif - endfor + " Add external classes + call extend(all_values, ext_classes) - let int_list = res + " Add external interfaces + call extend(all_values, ext_interfaces) - let int_dict = [] - for i in int_list - if int_vars[i] != '' - let class = ' ' - if int_vars[i] != '' - let class = i.' class ' - endif - let int_dict += [{'word':i, 'info':class.int_vars[i], 'kind':'v'}] - else - let int_dict += [{'word':i, 'kind':'v'}] - endif - endfor + " Add built-in classes + call extend(all_values, builtin_classnames) - return int_dict + " Add built-in interfaces + call extend(all_values, builtin_interfaces) - else - " Complete everything else - - " + functions, DONE - " + keywords of language DONE - " + defines (constant definitions), DONE - " + extend keywords for predefined constants, DONE - " + classes (after new), DONE - " + limit choice after -> and :: to funcs and vars DONE - - " Internal solution for finding functions in current file. - let file = getline(1, '$') - call filter(file, - \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') - let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) - let jfile = join(file, ' ') - let int_values = split(jfile, 'function\s\+') - let int_functions = {} - for i in int_values - let f_name = matchstr(i, - \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') - let f_args = matchstr(i, - \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\s*\zs.\{-}\ze\s*)\_s*{') - let int_functions[f_name.'('] = f_args.')' - endfor + " Add php keywords + call extend(all_values, builtin_keywords) - " Prepare list of functions from tags file - let ext_functions = {} - if fnames != '' - exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames - let qflist = getqflist() - if len(qflist) > 0 - for field in qflist - " File name - let item = matchstr(field['text'], '^[^[:space:]]\+') - let fname = matchstr(field['text'], '\t\zs\f\+\ze') - let prototype = matchstr(field['text'], - \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') - let ext_functions[item.'('] = prototype.') - '.fname - endfor - endif + let final_list = [] + let int_list = sort(keys(all_values)) + for i in int_list + if has_key(ext_namespaces, i) + let final_list += [{'word':i, 'kind':'n', 'menu': ext_namespaces[i], 'info': ext_namespaces[i]}] + elseif has_key(int_functions, i) + let final_list += + \ [{'word':i, + \ 'info':i.int_functions[i], + \ 'menu':int_functions[i], + \ 'kind':'f'}] + elseif has_key(ext_classes, i) || has_key(builtin_classnames, i) + let info = has_key(ext_classes, i) ? ext_classes[i] : builtin_classnames[i].' - builtin' + let final_list += [{'word':i, 'kind': 'c', 'menu': info, 'info': i.info}] + elseif has_key(ext_interfaces, i) || has_key(builtin_interfaces, i) + let info = has_key(ext_interfaces, i) ? ext_interfaces[i] : builtin_interfaces[i].' - builtin' + let final_list += [{'word':i, 'kind': 'i', 'menu': info, 'info': i.info}] + elseif has_key(int_constants, i) || has_key(builtin_constants, i) + let info = has_key(int_constants, i) ? int_constants[i] : ' - builtin' + let final_list += [{'word':i, 'kind': 'd', 'menu': info, 'info': i.info}] + else + let final_list += [{'word':i}] endif + endfor - " All functions - call extend(int_functions, ext_functions) - call extend(int_functions, g:php_builtin_functions) - - " Internal solution for finding constants in current file - let file = getline(1, '$') - call filter(file, 'v:val =~ "define\\s*("') - let jfile = join(file, ' ') - let int_values = split(jfile, 'define\s*(\s*') - let int_constants = {} - for i in int_values - let c_name = matchstr(i, '\(["'']\)\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze\1') - " let c_value = matchstr(i, - " \ '\(["'']\)[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\1\s*,\s*\zs.\{-}\ze\s*)') - if c_name != '' - let int_constants[c_name] = '' " c_value - endif - endfor + return final_list +endfunction +" }}} - " Prepare list of constants from tags file - let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) - let ext_constants = {} - if fnames != '' - exe 'silent! vimgrep /^'.a:base.'.*\td\(\t\|$\)/j '.fnames - let qflist = getqflist() - if len(qflist) > 0 - for field in qflist - let item = matchstr(field['text'], '^[^[:space:]]\+') - let ext_constants[item] = '' - endfor - endif - endif +function! phpcomplete#CompleteUnknownClass(base, context) " {{{ + let res = [] - " All constants - call extend(int_constants, ext_constants) - " Treat keywords as constants + if g:phpcomplete_complete_for_unknown_classes != 1 + return [] + endif + + if a:base =~ '^\$' + let adddollar = '$' + else + let adddollar = '' + endif - let all_values = {} + let file = getline(1, '$') - " One big dictionary of functions - call extend(all_values, int_functions) + " Internal solution for finding object properties in current file. + if a:context =~ '::' + let variables = filter(deepcopy(file), + \ 'v:val =~ "^\\s*\\(static\\|static\\s\\+\\(public\\|var\\)\\|\\(public\\|var\\)\\s\\+static\\)\\s\\+\\$"') + elseif a:context =~ '->' + let variables = filter(deepcopy(file), + \ 'v:val =~ "^\\s*\\(public\\|var\\)\\s\\+\\$"') + endif + let jvars = join(variables, ' ') + let svars = split(jvars, '\$') + let int_vars = {} + for i in svars + let c_var = matchstr(i, + \ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') + if c_var != '' + let int_vars[adddollar.c_var] = '' + endif + endfor - " Add constants - call extend(all_values, int_constants) - " Add keywords - call extend(all_values, g:php_keywords) - - for m in sort(keys(all_values)) - if m =~ '^'.a:base - call add(res, m) - endif - endfor + " Internal solution for finding functions in current file. + call filter(deepcopy(file), + \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') + let jfile = join(file, ' ') + let int_values = split(jfile, 'function\s\+') + let int_functions = {} + for i in int_values + let f_name = matchstr(i, + \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') + let f_args = matchstr(i, + \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|$\)') - let int_list = res + let int_functions[f_name.'('] = f_args.')' + endfor - let final_list = [] - for i in int_list - if has_key(int_functions, i) - let final_list += - \ [{'word':i, - \ 'info':i.int_functions[i], - \ 'kind':'f'}] - elseif has_key(int_constants, i) - let final_list += [{'word':i, 'kind':'d'}] + " collect external functions from tags + let ext_functions = {} + let tags = phpcomplete#GetTaglist('^'.substitute(a:base, '^\$', '', '')) + for tag in tags + if tag.kind ==? 'f' + let item = tag.name + if has_key(tag, 'signature') + let prototype = tag.signature[1:-2] else - let final_list += [{'word':i}] + let prototype = matchstr(tag.cmd, + \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') endif - endfor + let ext_functions[item.'('] = prototype.') - '.tag['filename'] + endif + endfor - return final_list + " All functions to one hash for later reference when deciding kind + call extend(int_functions, ext_functions) - endif + let all_values = {} + call extend(all_values, int_functions) + call extend(all_values, int_vars) " external variables are already in + call extend(all_values, g:php_builtin_object_functions) + + for m in sort(keys(all_values)) + if m =~ '\(^\|::\)'.a:base + call add(res, m) + endif + endfor + let start_list = res + + let final_list = [] + for i in start_list + if has_key(int_vars, i) + let class = ' ' + if all_values[i] != '' + let class = i.' class ' + endif + let final_list += [{'word':i, 'info':class.all_values[i], 'kind':'v'}] + else + let final_list += + \ [{'word':substitute(i, '.*::', '', ''), + \ 'info':i.all_values[i], + \ 'menu':all_values[i], + \ 'kind':'f'}] + endif + endfor + return final_list endfunction +" }}} -function! phpcomplete#GetClassName(scontext) " {{{ - " Get class name - " Class name can be detected in few ways: - " @var $myVar class - " line above - " or line in tags file +function! phpcomplete#CompleteVariable(base) " {{{ + let res = [] - let object = matchstr(a:scontext, '\zs[a-zA-Z_0-9\x7f-\xff]\+\ze->') - let i = 1 - while i < line('.') - let line = getline(line('.')-i) - if line =~ '^\s*\*\/\?\s*$' - let i += 1 - continue + " Internal solution for current file. + let file = getline(1, '$') + let jfile = join(file, ' ') + let int_vals = split(jfile, '\ze\$') + let int_vars = {} + for i in int_vals + if i =~? '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new' + let val = matchstr(i, + \ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') else - if line =~ '@var\s\+\$'.object.'\s\+[a-zA-Z_0-9\x7f-\xff]\+' - let classname = matchstr(line, '@var\s\+\$'.object.'\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+') - return classname - else - break - endif + let val = matchstr(i, + \ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') endif - endwhile + if val != '' + let int_vars[val] = '' + endif + endfor - " OK, first way failed, now check tags file(s) - let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) - exe 'silent! vimgrep /^'.object.'.*\$'.object.'.*=\s*new\s\+.*\tv\(\t\|$\)/j '.fnames - let qflist = getqflist() - if len(qflist) == 0 - return '' - else - " In all properly managed projects it should be one item list, even if it - " *is* longer we cannot solve conflicts, assume it is first element - let classname = matchstr(qflist[0]['text'], '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') - return classname - endif + call extend(int_vars, g:php_builtin_vars) -endfunction -" }}} -function! phpcomplete#GetClassLocation(classname) " {{{ - " Check classname may be name of built in object - if !exists("g:php_omni_bi_classes") - let g:php_omni_bi_classes = {} - for i in keys(g:php_builtin_object_functions) - let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = '' + " ctags has support for PHP, use tags file for external variables + if g:phpcomplete_search_tags_for_variables + let ext_vars = {} + let tags = phpcomplete#GetTaglist('\C^'.substitute(a:base, '^\$', '', '')) + for tag in tags + if tag.kind ==? 'v' + let item = tag.name + let m_menu = '' + if tag.cmd =~? tag['name'].'\s*=\s*new\s\+' + let m_menu = matchstr(tag.cmd, + \ '\c=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') + endif + let ext_vars['$'.item] = m_menu + endif endfor - endif - if has_key(g:php_omni_bi_classes, a:classname) - return 'VIMPHP_BUILTINOBJECT' + call extend(int_vars, ext_vars) endif - " Get class location - for fname in tagfiles() - let fhead = fnamemodify(fname, ":h") - if fhead != '' - let psep = '/' " Note: slash is potential problem! - let fhead .= psep - endif - let fname = escape(fname, " \\") - exe 'silent! vimgrep /^'.a:classname.'.*\tc\(\t\|$\)/j '.fname - let qflist = getqflist() - " As in GetClassName we can manage only one element if it exists - if len(qflist) > 0 - let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t') - else - return '' + for m in sort(keys(int_vars)) + if m =~# '^\'.a:base + call add(res, m) endif - " And only one class location - if classlocation != '' - let classlocation = fhead.classlocation - return classlocation + endfor + + let int_list = res + + let int_dict = [] + for i in int_list + if int_vars[i] != '' + let class = ' ' + if int_vars[i] != '' + let class = i.' class ' + endif + let int_dict += [{'word':i, 'info':class.int_vars[i], 'menu':int_vars[i], 'kind':'v'}] else - return '' + let int_dict += [{'word':i, 'kind':'v'}] endif endfor + return int_dict endfunction " }}} -function! phpcomplete#GetClassContents(file, name) " {{{ - let cfile = join(a:file, "\n") - " We use new buffer and (later) normal! because - " this is the most efficient way. The other way - " is to go through the looong string looking for - " matching {} - let original_window = winnr() - below 1new - 0put =cfile - call search('class\s\+'.a:name) - let cfline = line('.') - " Catch extends - if getline('.') =~ 'extends' - let extends_class = matchstr(getline('.'), - \ 'class\s\+'.a:name.'\s\+extends\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') +function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports) " {{{ + let kinds = sort(a:kinds) + " Complete class name + let res = [] + if a:base =~? '^\' + let leading_slash = '\' + let base = substitute(a:base, '^\', '', '') else - let extends_class = '' + let leading_slash = '' + let base = a:base endif - call search('{') - normal! % - let classc = getline(cfline, ".") - let classcontent = join(classc, "\n") - - bw! % - " go back to where we started - exe original_window.'wincmd w' - if extends_class != '' - let classlocation = phpcomplete#GetClassLocation(extends_class) - if filereadable(classlocation) - let classfile = readfile(classlocation) - let classcontent .= "\n".phpcomplete#GetClassContents(classfile, extends_class) - endif + " Internal solution for finding classes in current file. + let file = getline(1, '$') + let filterstr = '' + + if kinds == ['c', 'i'] + let filterstr = 'v:val =~? "\\(class\\|interface\\)\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"' + elseif kinds == ['c'] + let filterstr = 'v:val =~? "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"' + elseif kinds == ['i'] + let filterstr = 'v:val =~? "interface\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"' endif - return classcontent -endfunction -" }}} + call filter(file, filterstr) -function! phpcomplete#LoadData() " {{{ -" Keywords/reserved words, all other special things {{{ -" Later it is possible to add some help to values, or type of -" defined variable -let g:php_keywords = { -\ 'PHP_SELF':'', -\ 'argv':'', -\ 'argc':'', -\ 'GATEWAY_INTERFACE':'', -\ 'SERVER_ADDR':'', -\ 'SERVER_NAME':'', -\ 'SERVER_SOFTWARE':'', -\ 'SERVER_PROTOCOL':'', -\ 'REQUEST_METHOD':'', -\ 'REQUEST_TIME':'', -\ 'QUERY_STRING':'', -\ 'DOCUMENT_ROOT':'', -\ 'HTTP_ACCEPT':'', -\ 'HTTP_ACCEPT_CHARSET':'', -\ 'HTTP_ACCEPT_ENCODING':'', -\ 'HTTP_ACCEPT_LANGUAGE':'', -\ 'HTTP_CONNECTION':'', -\ 'HTTP_POST':'', -\ 'HTTP_REFERER':'', -\ 'HTTP_USER_AGENT':'', -\ 'HTTPS':'', -\ 'REMOTE_ADDR':'', -\ 'REMOTE_HOST':'', -\ 'REMOTE_PORT':'', -\ 'SCRIPT_FILENAME':'', -\ 'SERVER_ADMIN':'', -\ 'SERVER_PORT':'', -\ 'SERVER_SIGNATURE':'', -\ 'PATH_TRANSLATED':'', -\ 'SCRIPT_NAME':'', -\ 'REQUEST_URI':'', -\ 'PHP_AUTH_DIGEST':'', -\ 'PHP_AUTH_USER':'', -\ 'PHP_AUTH_PW':'', -\ 'AUTH_TYPE':'', -\ 'and':'', -\ 'or':'', -\ 'xor':'', -\ '__FILE__':'', -\ 'exception':'', -\ '__LINE__':'', -\ 'as':'', -\ 'break':'', -\ 'case':'', -\ 'class':'', -\ 'const':'', -\ 'continue':'', -\ 'declare':'', -\ 'default':'', -\ 'do':'', -\ 'echo':'', -\ 'else':'', -\ 'elseif':'', -\ 'enddeclare':'', -\ 'endfor':'', -\ 'endforeach':'', -\ 'endif':'', -\ 'endswitch':'', -\ 'endwhile':'', -\ 'extends':'', -\ 'for':'', -\ 'foreach':'', -\ 'function':'', -\ 'global':'', -\ 'if':'', -\ 'new':'', -\ 'static':'', -\ 'switch':'', -\ 'use':'', -\ 'var':'', -\ 'while':'', -\ '__FUNCTION__':'', -\ '__CLASS__':'', -\ '__METHOD__':'', -\ 'final':'', -\ 'php_user_filter':'', -\ 'interface':'', -\ 'implements':'', -\ 'public':'', -\ 'private':'', -\ 'protected':'', -\ 'abstract':'', -\ 'clone':'', -\ 'try':'', -\ 'catch':'', -\ 'throw':'', -\ 'cfunction':'', -\ 'old_function':'', -\ 'this':'', -\ 'PHP_VERSION': '', -\ 'PHP_OS': '', -\ 'PHP_SAPI': '', -\ 'PHP_EOL': '', -\ 'PHP_INT_MAX': '', -\ 'PHP_INT_SIZE': '', -\ 'DEFAULT_INCLUDE_PATH': '', -\ 'PEAR_INSTALL_DIR': '', -\ 'PEAR_EXTENSION_DIR': '', -\ 'PHP_EXTENSION_DIR': '', -\ 'PHP_PREFIX': '', -\ 'PHP_BINDIR': '', -\ 'PHP_LIBDIR': '', -\ 'PHP_DATADIR': '', -\ 'PHP_SYSCONFDIR': '', -\ 'PHP_LOCALSTATEDIR': '', -\ 'PHP_CONFIG_FILE_PATH': '', -\ 'PHP_CONFIG_FILE_SCAN_DIR': '', -\ 'PHP_SHLIB_SUFFIX': '', -\ 'PHP_OUTPUT_HANDLER_START': '', -\ 'PHP_OUTPUT_HANDLER_CONT': '', -\ 'PHP_OUTPUT_HANDLER_END': '', -\ 'E_ERROR': '', -\ 'E_WARNING': '', -\ 'E_PARSE': '', -\ 'E_NOTICE': '', -\ 'E_CORE_ERROR': '', -\ 'E_CORE_WARNING': '', -\ 'E_COMPILE_ERROR': '', -\ 'E_COMPILE_WARNING': '', -\ 'E_USER_ERROR': '', -\ 'E_USER_WARNING': '', -\ 'E_USER_NOTICE': '', -\ 'E_ALL': '', -\ 'E_STRICT': '', -\ '__COMPILER_HALT_OFFSET__': '', -\ 'EXTR_OVERWRITE': '', -\ 'EXTR_SKIP': '', -\ 'EXTR_PREFIX_SAME': '', -\ 'EXTR_PREFIX_ALL': '', -\ 'EXTR_PREFIX_INVALID': '', -\ 'EXTR_PREFIX_IF_EXISTS': '', -\ 'EXTR_IF_EXISTS': '', -\ 'SORT_ASC': '', -\ 'SORT_DESC': '', -\ 'SORT_REGULAR': '', -\ 'SORT_NUMERIC': '', -\ 'SORT_STRING': '', -\ 'CASE_LOWER': '', -\ 'CASE_UPPER': '', -\ 'COUNT_NORMAL': '', -\ 'COUNT_RECURSIVE': '', -\ 'ASSERT_ACTIVE': '', -\ 'ASSERT_CALLBACK': '', -\ 'ASSERT_BAIL': '', -\ 'ASSERT_WARNING': '', -\ 'ASSERT_QUIET_EVAL': '', -\ 'CONNECTION_ABORTED': '', -\ 'CONNECTION_NORMAL': '', -\ 'CONNECTION_TIMEOUT': '', -\ 'INI_USER': '', -\ 'INI_PERDIR': '', -\ 'INI_SYSTEM': '', -\ 'INI_ALL': '', -\ 'M_E': '', -\ 'M_LOG2E': '', -\ 'M_LOG10E': '', -\ 'M_LN2': '', -\ 'M_LN10': '', -\ 'M_PI': '', -\ 'M_PI_2': '', -\ 'M_PI_4': '', -\ 'M_1_PI': '', -\ 'M_2_PI': '', -\ 'M_2_SQRTPI': '', -\ 'M_SQRT2': '', -\ 'M_SQRT1_2': '', -\ 'CRYPT_SALT_LENGTH': '', -\ 'CRYPT_STD_DES': '', -\ 'CRYPT_EXT_DES': '', -\ 'CRYPT_MD5': '', -\ 'CRYPT_BLOWFISH': '', -\ 'DIRECTORY_SEPARATOR': '', -\ 'SEEK_SET': '', -\ 'SEEK_CUR': '', -\ 'SEEK_END': '', -\ 'LOCK_SH': '', -\ 'LOCK_EX': '', -\ 'LOCK_UN': '', -\ 'LOCK_NB': '', -\ 'HTML_SPECIALCHARS': '', -\ 'HTML_ENTITIES': '', -\ 'ENT_COMPAT': '', -\ 'ENT_QUOTES': '', -\ 'ENT_NOQUOTES': '', -\ 'INFO_GENERAL': '', -\ 'INFO_CREDITS': '', -\ 'INFO_CONFIGURATION': '', -\ 'INFO_MODULES': '', -\ 'INFO_ENVIRONMENT': '', -\ 'INFO_VARIABLES': '', -\ 'INFO_LICENSE': '', -\ 'INFO_ALL': '', -\ 'CREDITS_GROUP': '', -\ 'CREDITS_GENERAL': '', -\ 'CREDITS_SAPI': '', -\ 'CREDITS_MODULES': '', -\ 'CREDITS_DOCS': '', -\ 'CREDITS_FULLPAGE': '', -\ 'CREDITS_QA': '', -\ 'CREDITS_ALL': '', -\ 'STR_PAD_LEFT': '', -\ 'STR_PAD_RIGHT': '', -\ 'STR_PAD_BOTH': '', -\ 'PATHINFO_DIRNAME': '', -\ 'PATHINFO_BASENAME': '', -\ 'PATHINFO_EXTENSION': '', -\ 'PATH_SEPARATOR': '', -\ 'CHAR_MAX': '', -\ 'LC_CTYPE': '', -\ 'LC_NUMERIC': '', -\ 'LC_TIME': '', -\ 'LC_COLLATE': '', -\ 'LC_MONETARY': '', -\ 'LC_ALL': '', -\ 'LC_MESSAGES': '', -\ 'ABDAY_1': '', -\ 'ABDAY_2': '', -\ 'ABDAY_3': '', -\ 'ABDAY_4': '', -\ 'ABDAY_5': '', -\ 'ABDAY_6': '', -\ 'ABDAY_7': '', -\ 'DAY_1': '', -\ 'DAY_2': '', -\ 'DAY_3': '', -\ 'DAY_4': '', -\ 'DAY_5': '', -\ 'DAY_6': '', -\ 'DAY_7': '', -\ 'ABMON_1': '', -\ 'ABMON_2': '', -\ 'ABMON_3': '', -\ 'ABMON_4': '', -\ 'ABMON_5': '', -\ 'ABMON_6': '', -\ 'ABMON_7': '', -\ 'ABMON_8': '', -\ 'ABMON_9': '', -\ 'ABMON_10': '', -\ 'ABMON_11': '', -\ 'ABMON_12': '', -\ 'MON_1': '', -\ 'MON_2': '', -\ 'MON_3': '', -\ 'MON_4': '', -\ 'MON_5': '', -\ 'MON_6': '', -\ 'MON_7': '', -\ 'MON_8': '', -\ 'MON_9': '', -\ 'MON_10': '', -\ 'MON_11': '', -\ 'MON_12': '', -\ 'AM_STR': '', -\ 'PM_STR': '', -\ 'D_T_FMT': '', -\ 'D_FMT': '', -\ 'T_FMT': '', -\ 'T_FMT_AMPM': '', -\ 'ERA': '', -\ 'ERA_YEAR': '', -\ 'ERA_D_T_FMT': '', -\ 'ERA_D_FMT': '', -\ 'ERA_T_FMT': '', -\ 'ALT_DIGITS': '', -\ 'INT_CURR_SYMBOL': '', -\ 'CURRENCY_SYMBOL': '', -\ 'CRNCYSTR': '', -\ 'MON_DECIMAL_POINT': '', -\ 'MON_THOUSANDS_SEP': '', -\ 'MON_GROUPING': '', -\ 'POSITIVE_SIGN': '', -\ 'NEGATIVE_SIGN': '', -\ 'INT_FRAC_DIGITS': '', -\ 'FRAC_DIGITS': '', -\ 'P_CS_PRECEDES': '', -\ 'P_SEP_BY_SPACE': '', -\ 'N_CS_PRECEDES': '', -\ 'N_SEP_BY_SPACE': '', -\ 'P_SIGN_POSN': '', -\ 'N_SIGN_POSN': '', -\ 'DECIMAL_POINT': '', -\ 'RADIXCHAR': '', -\ 'THOUSANDS_SEP': '', -\ 'THOUSEP': '', -\ 'GROUPING': '', -\ 'YESEXPR': '', -\ 'NOEXPR': '', -\ 'YESSTR': '', -\ 'NOSTR': '', -\ 'CODESET': '', -\ 'LOG_EMERG': '', -\ 'LOG_ALERT': '', -\ 'LOG_CRIT': '', -\ 'LOG_ERR': '', -\ 'LOG_WARNING': '', -\ 'LOG_NOTICE': '', -\ 'LOG_INFO': '', -\ 'LOG_DEBUG': '', -\ 'LOG_KERN': '', -\ 'LOG_USER': '', -\ 'LOG_MAIL': '', -\ 'LOG_DAEMON': '', -\ 'LOG_AUTH': '', -\ 'LOG_SYSLOG': '', -\ 'LOG_LPR': '', -\ 'LOG_NEWS': '', -\ 'LOG_UUCP': '', -\ 'LOG_CRON': '', -\ 'LOG_AUTHPRIV': '', -\ 'LOG_LOCAL0': '', -\ 'LOG_LOCAL1': '', -\ 'LOG_LOCAL2': '', -\ 'LOG_LOCAL3': '', -\ 'LOG_LOCAL4': '', -\ 'LOG_LOCAL5': '', -\ 'LOG_LOCAL6': '', -\ 'LOG_LOCAL7': '', -\ 'LOG_PID': '', -\ 'LOG_CONS': '', -\ 'LOG_ODELAY': '', -\ 'LOG_NDELAY': '', -\ 'LOG_NOWAIT': '', -\ 'LOG_PERROR': '', -\ } -" }}} -" PHP builtin functions {{{ -" To create from scratch list of functions: -" 1. Download multi html file PHP documentation -" 2. run for i in `ls | grep "^function\."`; do grep -A4 Description $i >> funcs; done -" 3. Open funcs in Vim and -" a) g/Description/normal! 5J -" b) remove all html tags (it will require few s/// and g//) -" c) :%s/^\([^[:space:]]\+\) \([^[:space:]]\+\) ( \(.*\))/\\ '\2(': '\3| \1', -" This will create Dictionary -" d) remove all /^[^\\] lines -let g:php_builtin_functions = { -\ 'abs(': 'mixed number | number', -\ 'acosh(': 'float arg | float', -\ 'acos(': 'float arg | float', -\ 'addcslashes(': 'string str, string charlist | string', -\ 'addslashes(': 'string str | string', -\ 'aggregate(': 'object object, string class_name | void', -\ 'aggregate_info(': 'object object | array', -\ 'aggregate_methods_by_list(': 'object object, string class_name, array methods_list [, bool exclude] | void', -\ 'aggregate_methods_by_regexp(': 'object object, string class_name, string regexp [, bool exclude] | void', -\ 'aggregate_methods(': 'object object, string class_name | void', -\ 'aggregate_properties_by_list(': 'object object, string class_name, array properties_list [, bool exclude] | void', -\ 'aggregate_properties_by_regexp(': 'object object, string class_name, string regexp [, bool exclude] | void', -\ 'aggregate_properties(': 'object object, string class_name | void', -\ 'apache_child_terminate(': 'void | bool', -\ 'apache_getenv(': 'string variable [, bool walk_to_top] | string', -\ 'apache_get_modules(': 'void | array', -\ 'apache_get_version(': 'void | string', -\ 'apache_lookup_uri(': 'string filename | object', -\ 'apache_note(': 'string note_name [, string note_value] | string', -\ 'apache_request_headers(': 'void | array', -\ 'apache_reset_timeout(': 'void | bool', -\ 'apache_response_headers(': 'void | array', -\ 'apache_setenv(': 'string variable, string value [, bool walk_to_top] | bool', -\ 'apc_cache_info(': '[string cache_type] | array', -\ 'apc_clear_cache(': '[string cache_type] | bool', -\ 'apc_define_constants(': 'string key, array constants [, bool case_sensitive] | bool', -\ 'apc_delete(': 'string key | bool', -\ 'apc_fetch(': 'string key | mixed', -\ 'apc_load_constants(': 'string key [, bool case_sensitive] | bool', -\ 'apc_sma_info(': 'void | array', -\ 'apc_store(': 'string key, mixed var [, int ttl] | bool', -\ 'apd_breakpoint(': 'int debug_level | bool', -\ 'apd_callstack(': 'void | array', -\ 'apd_clunk(': 'string warning [, string delimiter] | void', -\ 'apd_continue(': 'int debug_level | bool', -\ 'apd_croak(': 'string warning [, string delimiter] | void', -\ 'apd_dump_function_table(': 'void | void', -\ 'apd_dump_persistent_resources(': 'void | array', -\ 'apd_dump_regular_resources(': 'void | array', -\ 'apd_echo(': 'string output | bool', -\ 'apd_get_active_symbols(': ' | array', -\ 'apd_set_pprof_trace(': '[string dump_directory] | void', -\ 'apd_set_session(': 'int debug_level | void', -\ 'apd_set_session_trace(': 'int debug_level [, string dump_directory] | void', -\ 'apd_set_socket_session_trace(': 'string ip_address_or_unix_socket_file, int socket_type, int port, int debug_level | bool', -\ 'array_change_key_case(': 'array input [, int case] | array', -\ 'array_chunk(': 'array input, int size [, bool preserve_keys] | array', -\ 'array_combine(': 'array keys, array values | array', -\ 'array_count_values(': 'array input | array', -\ 'array_diff_assoc(': 'array array1, array array2 [, array ...] | array', -\ 'array_diff(': 'array array1, array array2 [, array ...] | array', -\ 'array_diff_key(': 'array array1, array array2 [, array ...] | array', -\ 'array_diff_uassoc(': 'array array1, array array2 [, array ..., callback key_compare_func] | array', -\ 'array_diff_ukey(': 'array array1, array array2 [, array ..., callback key_compare_func] | array', -\ 'array_fill(': 'int start_index, int num, mixed value | array', -\ 'array_filter(': 'array input [, callback callback] | array', -\ 'array_flip(': 'array trans | array', -\ 'array(': '[mixed ...] | array', -\ 'array_intersect_assoc(': 'array array1, array array2 [, array ...] | array', -\ 'array_intersect(': 'array array1, array array2 [, array ...] | array', -\ 'array_intersect_key(': 'array array1, array array2 [, array ...] | array', -\ 'array_intersect_uassoc(': 'array array1, array array2 [, array ..., callback key_compare_func] | array', -\ 'array_intersect_ukey(': 'array array1, array array2 [, array ..., callback key_compare_func] | array', -\ 'array_key_exists(': 'mixed key, array search | bool', -\ 'array_keys(': 'array input [, mixed search_value [, bool strict]] | array', -\ 'array_map(': 'callback callback, array arr1 [, array ...] | array', -\ 'array_merge(': 'array array1 [, array array2 [, array ...]] | array', -\ 'array_merge_recursive(': 'array array1 [, array ...] | array', -\ 'array_multisort(': 'array ar1 [, mixed arg [, mixed ... [, array ...]]] | bool', -\ 'array_pad(': 'array input, int pad_size, mixed pad_value | array', -\ 'array_pop(': 'array &array | mixed', -\ 'array_product(': 'array array | number', -\ 'array_push(': 'array &array, mixed var [, mixed ...] | int', -\ 'array_rand(': 'array input [, int num_req] | mixed', -\ 'array_reduce(': 'array input, callback function [, int initial] | mixed', -\ 'array_reverse(': 'array array [, bool preserve_keys] | array', -\ 'array_search(': 'mixed needle, array haystack [, bool strict] | mixed', -\ 'array_shift(': 'array &array | mixed', -\ 'array_slice(': 'array array, int offset [, int length [, bool preserve_keys]] | array', -\ 'array_splice(': 'array &input, int offset [, int length [, array replacement]] | array', -\ 'array_sum(': 'array array | number', -\ 'array_udiff_assoc(': 'array array1, array array2 [, array ..., callback data_compare_func] | array', -\ 'array_udiff(': 'array array1, array array2 [, array ..., callback data_compare_func] | array', -\ 'array_udiff_uassoc(': 'array array1, array array2 [, array ..., callback data_compare_func, callback key_compare_func] | array', -\ 'array_uintersect_assoc(': 'array array1, array array2 [, array ..., callback data_compare_func] | array', -\ 'array_uintersect(': 'array array1, array array2 [, array ..., callback data_compare_func] | array', -\ 'array_uintersect_uassoc(': 'array array1, array array2 [, array ..., callback data_compare_func, callback key_compare_func] | array', -\ 'array_unique(': 'array array | array', -\ 'array_unshift(': 'array &array, mixed var [, mixed ...] | int', -\ 'array_values(': 'array input | array', -\ 'array_walk(': 'array &array, callback funcname [, mixed userdata] | bool', -\ 'array_walk_recursive(': 'array &input, callback funcname [, mixed userdata] | bool', -\ 'arsort(': 'array &array [, int sort_flags] | bool', -\ 'ascii2ebcdic(': 'string ascii_str | int', -\ 'asinh(': 'float arg | float', -\ 'asin(': 'float arg | float', -\ 'asort(': 'array &array [, int sort_flags] | bool', -\ 'aspell_check(': 'int dictionary_link, string word | bool', -\ 'aspell_check_raw(': 'int dictionary_link, string word | bool', -\ 'aspell_new(': 'string master [, string personal] | int', -\ 'aspell_suggest(': 'int dictionary_link, string word | array', -\ 'assert(': 'mixed assertion | bool', -\ 'assert_options(': 'int what [, mixed value] | mixed', -\ 'atan2(': 'float y, float x | float', -\ 'atanh(': 'float arg | float', -\ 'atan(': 'float arg | float', -\ 'base64_decode(': 'string encoded_data | string', -\ 'base64_encode(': 'string data | string', -\ 'base_convert(': 'string number, int frombase, int tobase | string', -\ 'basename(': 'string path [, string suffix] | string', -\ 'bcadd(': 'string left_operand, string right_operand [, int scale] | string', -\ 'bccomp(': 'string left_operand, string right_operand [, int scale] | int', -\ 'bcdiv(': 'string left_operand, string right_operand [, int scale] | string', -\ 'bcmod(': 'string left_operand, string modulus | string', -\ 'bcmul(': 'string left_operand, string right_operand [, int scale] | string', -\ 'bcompiler_load_exe(': 'string filename | bool', -\ 'bcompiler_load(': 'string filename | bool', -\ 'bcompiler_parse_class(': 'string class, string callback | bool', -\ 'bcompiler_read(': 'resource filehandle | bool', -\ 'bcompiler_write_class(': 'resource filehandle, string className [, string extends] | bool', -\ 'bcompiler_write_constant(': 'resource filehandle, string constantName | bool', -\ 'bcompiler_write_exe_footer(': 'resource filehandle, int startpos | bool', -\ 'bcompiler_write_file(': 'resource filehandle, string filename | bool', -\ 'bcompiler_write_footer(': 'resource filehandle | bool', -\ 'bcompiler_write_function(': 'resource filehandle, string functionName | bool', -\ 'bcompiler_write_functions_from_file(': 'resource filehandle, string fileName | bool', -\ 'bcompiler_write_header(': 'resource filehandle [, string write_ver] | bool', -\ 'bcpow(': 'string x, string y [, int scale] | string', -\ 'bcpowmod(': 'string x, string y, string modulus [, int scale] | string', -\ 'bcscale(': 'int scale | bool', -\ 'bcsqrt(': 'string operand [, int scale] | string', -\ 'bcsub(': 'string left_operand, string right_operand [, int scale] | string', -\ 'bin2hex(': 'string str | string', -\ 'bindec(': 'string binary_string | number', -\ 'bind_textdomain_codeset(': 'string domain, string codeset | string', -\ 'bindtextdomain(': 'string domain, string directory | string', -\ 'bzclose(': 'resource bz | int', -\ 'bzcompress(': 'string source [, int blocksize [, int workfactor]] | mixed', -\ 'bzdecompress(': 'string source [, int small] | mixed', -\ 'bzerrno(': 'resource bz | int', -\ 'bzerror(': 'resource bz | array', -\ 'bzerrstr(': 'resource bz | string', -\ 'bzflush(': 'resource bz | int', -\ 'bzopen(': 'string filename, string mode | resource', -\ 'bzread(': 'resource bz [, int length] | string', -\ 'bzwrite(': 'resource bz, string data [, int length] | int', -\ 'cal_days_in_month(': 'int calendar, int month, int year | int', -\ 'cal_from_jd(': 'int jd, int calendar | array', -\ 'cal_info(': '[int calendar] | array', -\ 'call_user_func_array(': 'callback function, array param_arr | mixed', -\ 'call_user_func(': 'callback function [, mixed parameter [, mixed ...]] | mixed', -\ 'call_user_method_array(': 'string method_name, object &obj, array paramarr | mixed', -\ 'call_user_method(': 'string method_name, object &obj [, mixed parameter [, mixed ...]] | mixed', -\ 'cal_to_jd(': 'int calendar, int month, int day, int year | int', -\ 'ccvs_add(': 'string session, string invoice, string argtype, string argval | string', -\ 'ccvs_auth(': 'string session, string invoice | string', -\ 'ccvs_command(': 'string session, string type, string argval | string', -\ 'ccvs_count(': 'string session, string type | int', -\ 'ccvs_delete(': 'string session, string invoice | string', -\ 'ccvs_done(': 'string sess | string', -\ 'ccvs_init(': 'string name | string', -\ 'ccvs_lookup(': 'string session, string invoice, int inum | string', -\ 'ccvs_new(': 'string session, string invoice | string', -\ 'ccvs_report(': 'string session, string type | string', -\ 'ccvs_return(': 'string session, string invoice | string', -\ 'ccvs_reverse(': 'string session, string invoice | string', -\ 'ccvs_sale(': 'string session, string invoice | string', -\ 'ccvs_status(': 'string session, string invoice | string', -\ 'ccvs_textvalue(': 'string session | string', -\ 'ccvs_void(': 'string session, string invoice | string', -\ 'ceil(': 'float value | float', -\ 'chdir(': 'string directory | bool', -\ 'checkdate(': 'int month, int day, int year | bool', -\ 'checkdnsrr(': 'string host [, string type] | int', -\ 'chgrp(': 'string filename, mixed group | bool', -\ 'chmod(': 'string filename, int mode | bool', -\ 'chown(': 'string filename, mixed user | bool', -\ 'chr(': 'int ascii | string', -\ 'chroot(': 'string directory | bool', -\ 'chunk_split(': 'string body [, int chunklen [, string end]] | string', -\ 'class_exists(': 'string class_name [, bool autoload] | bool', -\ 'class_implements(': 'mixed class [, bool autoload] | array', -\ 'classkit_import(': 'string filename | array', -\ 'classkit_method_add(': 'string classname, string methodname, string args, string code [, int flags] | bool', -\ 'classkit_method_copy(': 'string dClass, string dMethod, string sClass [, string sMethod] | bool', -\ 'classkit_method_redefine(': 'string classname, string methodname, string args, string code [, int flags] | bool', -\ 'classkit_method_remove(': 'string classname, string methodname | bool', -\ 'classkit_method_rename(': 'string classname, string methodname, string newname | bool', -\ 'class_parents(': 'mixed class [, bool autoload] | array', -\ 'clearstatcache(': 'void | void', -\ 'closedir(': 'resource dir_handle | void', -\ 'closelog(': 'void | bool', -\ 'com_addref(': 'void | void', -\ 'com_create_guid(': 'void | string', -\ 'com_event_sink(': 'variant comobject, object sinkobject [, mixed sinkinterface] | bool', -\ 'com_get_active_object(': 'string progid [, int code_page] | variant', -\ 'com_get(': 'resource com_object, string property | mixed', -\ 'com_invoke(': 'resource com_object, string function_name [, mixed function_parameters] | mixed', -\ 'com_isenum(': 'variant com_module | bool', -\ 'com_load(': 'string module_name [, string server_name [, int codepage]] | resource', -\ 'com_load_typelib(': 'string typelib_name [, bool case_insensitive] | bool', -\ 'com_message_pump(': '[int timeoutms] | bool', -\ 'compact(': 'mixed varname [, mixed ...] | array', -\ 'com_print_typeinfo(': 'object comobject [, string dispinterface [, bool wantsink]] | bool', -\ 'com_release(': 'void | void', -\ 'com_set(': 'resource com_object, string property, mixed value | void', -\ 'connection_aborted(': 'void | int', -\ 'connection_status(': 'void | int', -\ 'connection_timeout(': 'void | bool', -\ 'constant(': 'string name | mixed', -\ 'convert_cyr_string(': 'string str, string from, string to | string', -\ 'convert_uudecode(': 'string data | string', -\ 'convert_uuencode(': 'string data | string', -\ 'copy(': 'string source, string dest | bool', -\ 'cosh(': 'float arg | float', -\ 'cos(': 'float arg | float', -\ 'count_chars(': 'string string [, int mode] | mixed', -\ 'count(': 'mixed var [, int mode] | int', -\ 'cpdf_add_annotation(': 'int pdf_document, float llx, float lly, float urx, float ury, string title, string content [, int mode] | bool', -\ 'cpdf_add_outline(': 'int pdf_document, int lastoutline, int sublevel, int open, int pagenr, string text | int', -\ 'cpdf_arc(': 'int pdf_document, float x_coor, float y_coor, float radius, float start, float end [, int mode] | bool', -\ 'cpdf_begin_text(': 'int pdf_document | bool', -\ 'cpdf_circle(': 'int pdf_document, float x_coor, float y_coor, float radius [, int mode] | bool', -\ 'cpdf_clip(': 'int pdf_document | bool', -\ 'cpdf_close(': 'int pdf_document | bool', -\ 'cpdf_closepath_fill_stroke(': 'int pdf_document | bool', -\ 'cpdf_closepath(': 'int pdf_document | bool', -\ 'cpdf_closepath_stroke(': 'int pdf_document | bool', -\ 'cpdf_continue_text(': 'int pdf_document, string text | bool', -\ 'cpdf_curveto(': 'int pdf_document, float x1, float y1, float x2, float y2, float x3, float y3 [, int mode] | bool', -\ 'cpdf_end_text(': 'int pdf_document | bool', -\ 'cpdf_fill(': 'int pdf_document | bool', -\ 'cpdf_fill_stroke(': 'int pdf_document | bool', -\ 'cpdf_finalize(': 'int pdf_document | bool', -\ 'cpdf_finalize_page(': 'int pdf_document, int page_number | bool', -\ 'cpdf_global_set_document_limits(': 'int maxpages, int maxfonts, int maximages, int maxannotations, int maxobjects | bool', -\ 'cpdf_import_jpeg(': 'int pdf_document, string file_name, float x_coor, float y_coor, float angle, float width, float height, float x_scale, float y_scale, int gsave [, int mode] | bool', -\ 'cpdf_lineto(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', -\ 'cpdf_moveto(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', -\ 'cpdf_newpath(': 'int pdf_document | bool', -\ 'cpdf_open(': 'int compression [, string filename [, array doc_limits]] | int', -\ 'cpdf_output_buffer(': 'int pdf_document | bool', -\ 'cpdf_page_init(': 'int pdf_document, int page_number, int orientation, float height, float width [, float unit] | bool', -\ 'cpdf_place_inline_image(': 'int pdf_document, int image, float x_coor, float y_coor, float angle, float width, float height, int gsave [, int mode] | bool', -\ 'cpdf_rect(': 'int pdf_document, float x_coor, float y_coor, float width, float height [, int mode] | bool', -\ 'cpdf_restore(': 'int pdf_document | bool', -\ 'cpdf_rlineto(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', -\ 'cpdf_rmoveto(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', -\ 'cpdf_rotate(': 'int pdf_document, float angle | bool', -\ 'cpdf_rotate_text(': 'int pdfdoc, float angle | bool', -\ 'cpdf_save(': 'int pdf_document | bool', -\ 'cpdf_save_to_file(': 'int pdf_document, string filename | bool', -\ 'cpdf_scale(': 'int pdf_document, float x_scale, float y_scale | bool', -\ 'cpdf_set_action_url(': 'int pdfdoc, float xll, float yll, float xur, float xur, string url [, int mode] | bool', -\ 'cpdf_set_char_spacing(': 'int pdf_document, float space | bool', -\ 'cpdf_set_creator(': 'int pdf_document, string creator | bool', -\ 'cpdf_set_current_page(': 'int pdf_document, int page_number | bool', -\ 'cpdf_setdash(': 'int pdf_document, float white, float black | bool', -\ 'cpdf_setflat(': 'int pdf_document, float value | bool', -\ 'cpdf_set_font_directories(': 'int pdfdoc, string pfmdir, string pfbdir | bool', -\ 'cpdf_set_font(': 'int pdf_document, string font_name, float size, string encoding | bool', -\ 'cpdf_set_font_map_file(': 'int pdfdoc, string filename | bool', -\ 'cpdf_setgray_fill(': 'int pdf_document, float value | bool', -\ 'cpdf_setgray(': 'int pdf_document, float gray_value | bool', -\ 'cpdf_setgray_stroke(': 'int pdf_document, float gray_value | bool', -\ 'cpdf_set_horiz_scaling(': 'int pdf_document, float scale | bool', -\ 'cpdf_set_keywords(': 'int pdf_document, string keywords | bool', -\ 'cpdf_set_leading(': 'int pdf_document, float distance | bool', -\ 'cpdf_setlinecap(': 'int pdf_document, int value | bool', -\ 'cpdf_setlinejoin(': 'int pdf_document, int value | bool', -\ 'cpdf_setlinewidth(': 'int pdf_document, float width | bool', -\ 'cpdf_setmiterlimit(': 'int pdf_document, float value | bool', -\ 'cpdf_set_page_animation(': 'int pdf_document, int transition, float duration, float direction, int orientation, int inout | bool', -\ 'cpdf_setrgbcolor_fill(': 'int pdf_document, float red_value, float green_value, float blue_value | bool', -\ 'cpdf_setrgbcolor(': 'int pdf_document, float red_value, float green_value, float blue_value | bool', -\ 'cpdf_setrgbcolor_stroke(': 'int pdf_document, float red_value, float green_value, float blue_value | bool', -\ 'cpdf_set_subject(': 'int pdf_document, string subject | bool', -\ 'cpdf_set_text_matrix(': 'int pdf_document, array matrix | bool', -\ 'cpdf_set_text_pos(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', -\ 'cpdf_set_text_rendering(': 'int pdf_document, int rendermode | bool', -\ 'cpdf_set_text_rise(': 'int pdf_document, float value | bool', -\ 'cpdf_set_title(': 'int pdf_document, string title | bool', -\ 'cpdf_set_viewer_preferences(': 'int pdfdoc, array preferences | bool', -\ 'cpdf_set_word_spacing(': 'int pdf_document, float space | bool', -\ 'cpdf_show(': 'int pdf_document, string text | bool', -\ 'cpdf_show_xy(': 'int pdf_document, string text, float x_coor, float y_coor [, int mode] | bool', -\ 'cpdf_stringwidth(': 'int pdf_document, string text | float', -\ 'cpdf_stroke(': 'int pdf_document | bool', -\ 'cpdf_text(': 'int pdf_document, string text [, float x_coor, float y_coor [, int mode [, float orientation [, int alignmode]]]] | bool', -\ 'cpdf_translate(': 'int pdf_document, float x_coor, float y_coor | bool', -\ 'crack_check(': 'resource dictionary, string password | bool', -\ 'crack_closedict(': '[resource dictionary] | bool', -\ 'crack_getlastmessage(': 'void | string', -\ 'crack_opendict(': 'string dictionary | resource', -\ 'crc32(': 'string str | int', -\ 'create_function(': 'string args, string code | string', -\ 'crypt(': 'string str [, string salt] | string', -\ 'ctype_alnum(': 'string text | bool', -\ 'ctype_alpha(': 'string text | bool', -\ 'ctype_cntrl(': 'string text | bool', -\ 'ctype_digit(': 'string text | bool', -\ 'ctype_graph(': 'string text | bool', -\ 'ctype_lower(': 'string text | bool', -\ 'ctype_print(': 'string text | bool', -\ 'ctype_punct(': 'string text | bool', -\ 'ctype_space(': 'string text | bool', -\ 'ctype_upper(': 'string text | bool', -\ 'ctype_xdigit(': 'string text | bool', -\ 'curl_close(': 'resource ch | void', -\ 'curl_copy_handle(': 'resource ch | resource', -\ 'curl_errno(': 'resource ch | int', -\ 'curl_error(': 'resource ch | string', -\ 'curl_exec(': 'resource ch | mixed', -\ 'curl_getinfo(': 'resource ch [, int opt] | mixed', -\ 'curl_init(': '[string url] | resource', -\ 'curl_multi_add_handle(': 'resource mh, resource ch | int', -\ 'curl_multi_close(': 'resource mh | void', -\ 'curl_multi_exec(': 'resource mh, int &still_running | int', -\ 'curl_multi_getcontent(': 'resource ch | string', -\ 'curl_multi_info_read(': 'resource mh | array', -\ 'curl_multi_init(': 'void | resource', -\ 'curl_multi_remove_handle(': 'resource mh, resource ch | int', -\ 'curl_multi_select(': 'resource mh [, float timeout] | int', -\ 'curl_setopt(': 'resource ch, int option, mixed value | bool', -\ 'curl_version(': '[int version] | array', -\ 'current(': 'array &array | mixed', -\ 'cybercash_base64_decode(': 'string inbuff | string', -\ 'cybercash_base64_encode(': 'string inbuff | string', -\ 'cybercash_decr(': 'string wmk, string sk, string inbuff | array', -\ 'cybercash_encr(': 'string wmk, string sk, string inbuff | array', -\ 'cybermut_creerformulairecm(': 'string url_cm, string version, string tpe, string price, string ref_command, string text_free, string url_return, string url_return_ok, string url_return_err, string language, string code_company, string text_button | string', -\ 'cybermut_creerreponsecm(': 'string sentence | string', -\ 'cybermut_testmac(': 'string code_mac, string version, string tpe, string cdate, string price, string ref_command, string text_free, string code_return | bool', -\ 'cyrus_authenticate(': 'resource connection [, string mechlist [, string service [, string user [, int minssf [, int maxssf [, string authname [, string password]]]]]]] | void', -\ 'cyrus_bind(': 'resource connection, array callbacks | bool', -\ 'cyrus_close(': 'resource connection | bool', -\ 'cyrus_connect(': '[string host [, string port [, int flags]]] | resource', -\ 'cyrus_query(': 'resource connection, string query | array', -\ 'cyrus_unbind(': 'resource connection, string trigger_name | bool', -\ 'date_default_timezone_get(': 'void | string', -\ 'date_default_timezone_set(': 'string timezone_identifier | bool', -\ 'date(': 'string format [, int timestamp] | string', -\ 'date_sunrise(': 'int timestamp [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]] | mixed', -\ 'date_sunset(': 'int timestamp [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]] | mixed', -\ 'db2_autocommit(': 'resource connection [, bool value] | mixed', -\ 'db2_bind_param(': 'resource stmt, int parameter-number, string variable-name [, int parameter-type [, int data-type [, int precision [, int scale]]]] | bool', -\ 'db2_client_info(': 'resource connection | object', -\ 'db2_close(': 'resource connection | bool', -\ 'db2_column_privileges(': 'resource connection [, string qualifier [, string schema [, string table-name [, string column-name]]]] | resource', -\ 'db2_columns(': 'resource connection [, string qualifier [, string schema [, string table-name [, string column-name]]]] | resource', -\ 'db2_commit(': 'resource connection | bool', -\ 'db2_connect(': 'string database, string username, string password [, array options] | resource', -\ 'db2_conn_error(': '[resource connection] | string', -\ 'db2_conn_errormsg(': '[resource connection] | string', -\ 'db2_cursor_type(': 'resource stmt | int', -\ 'db2_exec(': 'resource connection, string statement [, array options] | resource', -\ 'db2_execute(': 'resource stmt [, array parameters] | bool', -\ 'db2_fetch_array(': 'resource stmt [, int row_number] | array', -\ 'db2_fetch_assoc(': 'resource stmt [, int row_number] | array', -\ 'db2_fetch_both(': 'resource stmt [, int row_number] | array', -\ 'db2_fetch_object(': 'resource stmt [, int row_number] | object', -\ 'db2_fetch_row(': 'resource stmt [, int row_number] | bool', -\ 'db2_field_display_size(': 'resource stmt, mixed column | int', -\ 'db2_field_name(': 'resource stmt, mixed column | string', -\ 'db2_field_num(': 'resource stmt, mixed column | int', -\ 'db2_field_precision(': 'resource stmt, mixed column | int', -\ 'db2_field_scale(': 'resource stmt, mixed column | int', -\ 'db2_field_type(': 'resource stmt, mixed column | string', -\ 'db2_field_width(': 'resource stmt, mixed column | int', -\ 'db2_foreign_keys(': 'resource connection, string qualifier, string schema, string table-name | resource', -\ 'db2_free_result(': 'resource stmt | bool', -\ 'db2_free_stmt(': 'resource stmt | bool', -\ 'db2_next_result(': 'resource stmt | resource', -\ 'db2_num_fields(': 'resource stmt | int', -\ 'db2_num_rows(': 'resource stmt | int', -\ 'db2_pconnect(': 'string database, string username, string password [, array options] | resource', -\ 'db2_prepare(': 'resource connection, string statement [, array options] | resource', -\ 'db2_primary_keys(': 'resource connection, string qualifier, string schema, string table-name | resource', -\ 'db2_procedure_columns(': 'resource connection, string qualifier, string schema, string procedure, string parameter | resource', -\ 'db2_procedures(': 'resource connection, string qualifier, string schema, string procedure | resource', -\ 'db2_result(': 'resource stmt, mixed column | mixed', -\ 'db2_rollback(': 'resource connection | bool', -\ 'db2_server_info(': 'resource connection | object', -\ 'db2_special_columns(': 'resource connection, string qualifier, string schema, string table_name, int scope | resource', -\ 'db2_statistics(': 'resource connection, string qualifier, string schema, string table-name, bool unique | resource', -\ 'db2_stmt_error(': '[resource stmt] | string', -\ 'db2_stmt_errormsg(': '[resource stmt] | string', -\ 'db2_table_privileges(': 'resource connection [, string qualifier [, string schema [, string table_name]]] | resource', -\ 'db2_tables(': 'resource connection [, string qualifier [, string schema [, string table-name [, string table-type]]]] | resource', -\ 'dba_close(': 'resource handle | void', -\ 'dba_delete(': 'string key, resource handle | bool', -\ 'dba_exists(': 'string key, resource handle | bool', -\ 'dba_fetch(': 'string key, resource handle | string', -\ 'dba_firstkey(': 'resource handle | string', -\ 'dba_handlers(': '[bool full_info] | array', -\ 'dba_insert(': 'string key, string value, resource handle | bool', -\ 'dba_key_split(': 'mixed key | mixed', -\ 'dba_list(': 'void | array', -\ 'dba_nextkey(': 'resource handle | string', -\ 'dba_open(': 'string path, string mode [, string handler [, mixed ...]] | resource', -\ 'dba_optimize(': 'resource handle | bool', -\ 'dba_popen(': 'string path, string mode [, string handler [, mixed ...]] | resource', -\ 'dba_replace(': 'string key, string value, resource handle | bool', -\ 'dbase_add_record(': 'int dbase_identifier, array record | bool', -\ 'dbase_close(': 'int dbase_identifier | bool', -\ 'dbase_create(': 'string filename, array fields | int', -\ 'dbase_delete_record(': 'int dbase_identifier, int record_number | bool', -\ 'dbase_get_header_info(': 'int dbase_identifier | array', -\ 'dbase_get_record(': 'int dbase_identifier, int record_number | array', -\ 'dbase_get_record_with_names(': 'int dbase_identifier, int record_number | array', -\ 'dbase_numfields(': 'int dbase_identifier | int', -\ 'dbase_numrecords(': 'int dbase_identifier | int', -\ 'dbase_open(': 'string filename, int mode | int', -\ 'dbase_pack(': 'int dbase_identifier | bool', -\ 'dbase_replace_record(': 'int dbase_identifier, array record, int record_number | bool', -\ 'dba_sync(': 'resource handle | bool', -\ 'dblist(': 'void | string', -\ 'dbmclose(': 'resource dbm_identifier | bool', -\ 'dbmdelete(': 'resource dbm_identifier, string key | bool', -\ 'dbmexists(': 'resource dbm_identifier, string key | bool', -\ 'dbmfetch(': 'resource dbm_identifier, string key | string', -\ 'dbmfirstkey(': 'resource dbm_identifier | string', -\ 'dbminsert(': 'resource dbm_identifier, string key, string value | int', -\ 'dbmnextkey(': 'resource dbm_identifier, string key | string', -\ 'dbmopen(': 'string filename, string flags | resource', -\ 'dbmreplace(': 'resource dbm_identifier, string key, string value | int', -\ 'dbplus_add(': 'resource relation, array tuple | int', -\ 'dbplus_aql(': 'string query [, string server [, string dbpath]] | resource', -\ 'dbplus_chdir(': '[string newdir] | string', -\ 'dbplus_close(': 'resource relation | mixed', -\ 'dbplus_curr(': 'resource relation, array &tuple | int', -\ 'dbplus_errcode(': '[int errno] | string', -\ 'dbplus_errno(': 'void | int', -\ 'dbplus_find(': 'resource relation, array constraints, mixed tuple | int', -\ 'dbplus_first(': 'resource relation, array &tuple | int', -\ 'dbplus_flush(': 'resource relation | int', -\ 'dbplus_freealllocks(': 'void | int', -\ 'dbplus_freelock(': 'resource relation, string tname | int', -\ 'dbplus_freerlocks(': 'resource relation | int', -\ 'dbplus_getlock(': 'resource relation, string tname | int', -\ 'dbplus_getunique(': 'resource relation, int uniqueid | int', -\ 'dbplus_info(': 'resource relation, string key, array &result | int', -\ 'dbplus_last(': 'resource relation, array &tuple | int', -\ 'dbplus_lockrel(': 'resource relation | int', -\ 'dbplus_next(': 'resource relation, array &tuple | int', -\ 'dbplus_open(': 'string name | resource', -\ 'dbplus_prev(': 'resource relation, array &tuple | int', -\ 'dbplus_rchperm(': 'resource relation, int mask, string user, string group | int', -\ 'dbplus_rcreate(': 'string name, mixed domlist [, bool overwrite] | resource', -\ 'dbplus_rcrtexact(': 'string name, resource relation [, bool overwrite] | mixed', -\ 'dbplus_rcrtlike(': 'string name, resource relation [, int overwrite] | mixed', -\ 'dbplus_resolve(': 'string relation_name | array', -\ 'dbplus_restorepos(': 'resource relation, array tuple | int', -\ 'dbplus_rkeys(': 'resource relation, mixed domlist | mixed', -\ 'dbplus_ropen(': 'string name | resource', -\ 'dbplus_rquery(': 'string query [, string dbpath] | resource', -\ 'dbplus_rrename(': 'resource relation, string name | int', -\ 'dbplus_rsecindex(': 'resource relation, mixed domlist, int type | mixed', -\ 'dbplus_runlink(': 'resource relation | int', -\ 'dbplus_rzap(': 'resource relation | int', -\ 'dbplus_savepos(': 'resource relation | int', -\ 'dbplus_setindexbynumber(': 'resource relation, int idx_number | int', -\ 'dbplus_setindex(': 'resource relation, string idx_name | int', -\ 'dbplus_sql(': 'string query [, string server [, string dbpath]] | resource', -\ 'dbplus_tcl(': 'int sid, string script | string', -\ 'dbplus_tremove(': 'resource relation, array tuple [, array &current] | int', -\ 'dbplus_undo(': 'resource relation | int', -\ 'dbplus_undoprepare(': 'resource relation | int', -\ 'dbplus_unlockrel(': 'resource relation | int', -\ 'dbplus_unselect(': 'resource relation | int', -\ 'dbplus_update(': 'resource relation, array old, array new | int', -\ 'dbplus_xlockrel(': 'resource relation | int', -\ 'dbplus_xunlockrel(': 'resource relation | int', -\ 'dbx_close(': 'object link_identifier | bool', -\ 'dbx_compare(': 'array row_a, array row_b, string column_key [, int flags] | int', -\ 'dbx_connect(': 'mixed module, string host, string database, string username, string password [, int persistent] | object', -\ 'dbx_error(': 'object link_identifier | string', -\ 'dbx_escape_string(': 'object link_identifier, string text | string', -\ 'dbx_fetch_row(': 'object result_identifier | mixed', -\ 'dbx_query(': 'object link_identifier, string sql_statement [, int flags] | mixed', -\ 'dbx_sort(': 'object result, string user_compare_function | bool', -\ 'dcgettext(': 'string domain, string message, int category | string', -\ 'dcngettext(': 'string domain, string msgid1, string msgid2, int n, int category | string', -\ 'deaggregate(': 'object object [, string class_name] | void', -\ 'debug_backtrace(': 'void | array', -\ 'debugger_off(': 'void | int', -\ 'debugger_on(': 'string address | int', -\ 'debug_print_backtrace(': 'void | void', -\ 'debug_zval_dump(': 'mixed variable | void', -\ 'decbin(': 'int number | string', -\ 'dechex(': 'int number | string', -\ 'decoct(': 'int number | string', -\ 'defined(': 'string name | bool', -\ 'define(': 'string name, mixed value [, bool case_insensitive] | bool', -\ 'define_syslog_variables(': 'void | void', -\ 'deg2rad(': 'float number | float', -\ 'delete(': 'string file | void', -\ 'dgettext(': 'string domain, string message | string', -\ 'dio_close(': 'resource fd | void', -\ 'dio_fcntl(': 'resource fd, int cmd [, mixed args] | mixed', -\ 'dio_open(': 'string filename, int flags [, int mode] | resource', -\ 'dio_read(': 'resource fd [, int len] | string', -\ 'dio_seek(': 'resource fd, int pos [, int whence] | int', -\ 'dio_stat(': 'resource fd | array', -\ 'dio_tcsetattr(': 'resource fd, array options | bool', -\ 'dio_truncate(': 'resource fd, int offset | bool', -\ 'dio_write(': 'resource fd, string data [, int len] | int', -\ 'dirname(': 'string path | string', -\ 'disk_free_space(': 'string directory | float', -\ 'disk_total_space(': 'string directory | float', -\ 'dl(': 'string library | int', -\ 'dngettext(': 'string domain, string msgid1, string msgid2, int n | string', -\ 'dns_check_record(': 'string host [, string type] | bool', -\ 'dns_get_mx(': 'string hostname, array &mxhosts [, array &weight] | bool', -\ 'dns_get_record(': 'string hostname [, int type [, array &authns, array &addtl]] | array', -\ 'DomDocument->add_root(': 'string name | domelement', -\ 'DomDocument->create_attribute(': 'string name, string value | domattribute', -\ 'DomDocument->create_cdata_section(': 'string content | domcdata', -\ 'DomDocument->create_comment(': 'string content | domcomment', -\ 'DomDocument->create_element(': 'string name | domelement', -\ 'DomDocument->create_element_ns(': 'string uri, string name [, string prefix] | domelement', -\ 'DomDocument->create_entity_reference(': 'string content | domentityreference', -\ 'DomDocument->create_processing_instruction(': 'string content | domprocessinginstruction', -\ 'DomDocument->create_text_node(': 'string content | domtext', -\ 'DomDocument->doctype(': 'void | domdocumenttype', -\ 'DomDocument->document_element(': 'void | domelement', -\ 'DomDocument->dump_file(': 'string filename [, bool compressionmode [, bool format]] | string', -\ 'DomDocument->dump_mem(': '[bool format [, string encoding]] | string', -\ 'DomDocument->get_element_by_id(': 'string id | domelement', -\ 'DomDocument->get_elements_by_tagname(': 'string name | array', -\ 'DomDocument->html_dump_mem(': 'void | string', -\ 'DomDocument->xinclude(': 'void | int', -\ 'dom_import_simplexml(': 'SimpleXMLElement node | DOMElement', -\ 'DomNode->append_sibling(': 'domelement newnode | domelement', -\ 'DomNode->attributes(': 'void | array', -\ 'DomNode->child_nodes(': 'void | array', -\ 'DomNode->clone_node(': 'void | domelement', -\ 'DomNode->dump_node(': 'void | string', -\ 'DomNode->first_child(': 'void | domelement', -\ 'DomNode->get_content(': 'void | string', -\ 'DomNode->has_attributes(': 'void | bool', -\ 'DomNode->has_child_nodes(': 'void | bool', -\ 'DomNode->insert_before(': 'domelement newnode, domelement refnode | domelement', -\ 'DomNode->is_blank_node(': 'void | bool', -\ 'DomNode->last_child(': 'void | domelement', -\ 'DomNode->next_sibling(': 'void | domelement', -\ 'DomNode->node_name(': 'void | string', -\ 'DomNode->node_type(': 'void | int', -\ 'DomNode->node_value(': 'void | string', -\ 'DomNode->owner_document(': 'void | domdocument', -\ 'DomNode->parent_node(': 'void | domnode', -\ 'DomNode->prefix(': 'void | string', -\ 'DomNode->previous_sibling(': 'void | domelement', -\ 'DomNode->remove_child(': 'domtext oldchild | domtext', -\ 'DomNode->replace_child(': 'domelement oldnode, domelement newnode | domelement', -\ 'DomNode->replace_node(': 'domelement newnode | domelement', -\ 'DomNode->set_content(': 'string content | bool', -\ 'DomNode->set_name(': 'void | bool', -\ 'DomNode->set_namespace(': 'string uri [, string prefix] | void', -\ 'DomNode->unlink_node(': 'void | void', -\ 'domxml_new_doc(': 'string version | DomDocument', -\ 'domxml_open_file(': 'string filename [, int mode [, array &error]] | DomDocument', -\ 'domxml_open_mem(': 'string str [, int mode [, array &error]] | DomDocument', -\ 'domxml_version(': 'void | string', -\ 'domxml_xmltree(': 'string str | DomDocument', -\ 'domxml_xslt_stylesheet_doc(': 'DomDocument xsl_doc | DomXsltStylesheet', -\ 'domxml_xslt_stylesheet_file(': 'string xsl_file | DomXsltStylesheet', -\ 'domxml_xslt_stylesheet(': 'string xsl_buf | DomXsltStylesheet', -\ 'domxml_xslt_version(': 'void | int', -\ 'dotnet_load(': 'string assembly_name [, string datatype_name [, int codepage]] | int', -\ 'each(': 'array &array | array', -\ 'easter_date(': '[int year] | int', -\ 'easter_days(': '[int year [, int method]] | int', -\ 'ebcdic2ascii(': 'string ebcdic_str | int', -\ 'echo(': 'string arg1 [, string ...] | void', -\ 'empty(': 'mixed var | bool', -\ 'end(': 'array &array | mixed', -\ 'ereg(': 'string pattern, string string [, array &regs] | int', -\ 'eregi(': 'string pattern, string string [, array &regs] | int', -\ 'eregi_replace(': 'string pattern, string replacement, string string | string', -\ 'ereg_replace(': 'string pattern, string replacement, string string | string', -\ 'error_log(': 'string message [, int message_type [, string destination [, string extra_headers]]] | bool', -\ 'error_reporting(': '[int level] | int', -\ 'escapeshellarg(': 'string arg | string', -\ 'escapeshellcmd(': 'string command | string', -\ 'eval(': 'string code_str | mixed', -\ 'exec(': 'string command [, array &output [, int &return_var]] | string', -\ 'exif_imagetype(': 'string filename | int', -\ 'exif_read_data(': 'string filename [, string sections [, bool arrays [, bool thumbnail]]] | array', -\ 'exif_tagname(': 'string index | string', -\ 'exif_thumbnail(': 'string filename [, int &width [, int &height [, int &imagetype]]] | string', -\ 'exit(': '[string status] | void', -\ 'expect_expectl(': 'resource expect, array cases, string &match | mixed', -\ 'expect_popen(': 'string command | resource', -\ 'exp(': 'float arg | float', -\ 'explode(': 'string separator, string string [, int limit] | array', -\ 'expm1(': 'float number | float', -\ 'extension_loaded(': 'string name | bool', -\ 'extract(': 'array var_array [, int extract_type [, string prefix]] | int', -\ 'ezmlm_hash(': 'string addr | int', -\ 'fam_cancel_monitor(': 'resource fam, resource fam_monitor | bool', -\ 'fam_close(': 'resource fam | void', -\ 'fam_monitor_collection(': 'resource fam, string dirname, int depth, string mask | resource', -\ 'fam_monitor_directory(': 'resource fam, string dirname | resource', -\ 'fam_monitor_file(': 'resource fam, string filename | resource', -\ 'fam_next_event(': 'resource fam | array', -\ 'fam_open(': '[string appname] | resource', -\ 'fam_pending(': 'resource fam | int', -\ 'fam_resume_monitor(': 'resource fam, resource fam_monitor | bool', -\ 'fam_suspend_monitor(': 'resource fam, resource fam_monitor | bool', -\ 'fbsql_affected_rows(': '[resource link_identifier] | int', -\ 'fbsql_autocommit(': 'resource link_identifier [, bool OnOff] | bool', -\ 'fbsql_blob_size(': 'string blob_handle [, resource link_identifier] | int', -\ 'fbsql_change_user(': 'string user, string password [, string database [, resource link_identifier]] | resource', -\ 'fbsql_clob_size(': 'string clob_handle [, resource link_identifier] | int', -\ 'fbsql_close(': '[resource link_identifier] | bool', -\ 'fbsql_commit(': '[resource link_identifier] | bool', -\ 'fbsql_connect(': '[string hostname [, string username [, string password]]] | resource', -\ 'fbsql_create_blob(': 'string blob_data [, resource link_identifier] | string', -\ 'fbsql_create_clob(': 'string clob_data [, resource link_identifier] | string', -\ 'fbsql_create_db(': 'string database_name [, resource link_identifier [, string database_options]] | bool', -\ 'fbsql_database(': 'resource link_identifier [, string database] | string', -\ 'fbsql_database_password(': 'resource link_identifier [, string database_password] | string', -\ 'fbsql_data_seek(': 'resource result_identifier, int row_number | bool', -\ 'fbsql_db_query(': 'string database, string query [, resource link_identifier] | resource', -\ 'fbsql_db_status(': 'string database_name [, resource link_identifier] | int', -\ 'fbsql_drop_db(': 'string database_name [, resource link_identifier] | bool', -\ 'fbsql_errno(': '[resource link_identifier] | int', -\ 'fbsql_error(': '[resource link_identifier] | string', -\ 'fbsql_fetch_array(': 'resource result [, int result_type] | array', -\ 'fbsql_fetch_assoc(': 'resource result | array', -\ 'fbsql_fetch_field(': 'resource result [, int field_offset] | object', -\ 'fbsql_fetch_lengths(': 'resource result | array', -\ 'fbsql_fetch_object(': 'resource result [, int result_type] | object', -\ 'fbsql_fetch_row(': 'resource result | array', -\ 'fbsql_field_flags(': 'resource result [, int field_offset] | string', -\ 'fbsql_field_len(': 'resource result [, int field_offset] | int', -\ 'fbsql_field_name(': 'resource result [, int field_index] | string', -\ 'fbsql_field_seek(': 'resource result [, int field_offset] | bool', -\ 'fbsql_field_table(': 'resource result [, int field_offset] | string', -\ 'fbsql_field_type(': 'resource result [, int field_offset] | string', -\ 'fbsql_free_result(': 'resource result | bool', -\ 'fbsql_get_autostart_info(': '[resource link_identifier] | array', -\ 'fbsql_hostname(': 'resource link_identifier [, string host_name] | string', -\ 'fbsql_insert_id(': '[resource link_identifier] | int', -\ 'fbsql_list_dbs(': '[resource link_identifier] | resource', -\ 'fbsql_list_fields(': 'string database_name, string table_name [, resource link_identifier] | resource', -\ 'fbsql_list_tables(': 'string database [, resource link_identifier] | resource', -\ 'fbsql_next_result(': 'resource result_id | bool', -\ 'fbsql_num_fields(': 'resource result | int', -\ 'fbsql_num_rows(': 'resource result | int', -\ 'fbsql_password(': 'resource link_identifier [, string password] | string', -\ 'fbsql_pconnect(': '[string hostname [, string username [, string password]]] | resource', -\ 'fbsql_query(': 'string query [, resource link_identifier [, int batch_size]] | resource', -\ 'fbsql_read_blob(': 'string blob_handle [, resource link_identifier] | string', -\ 'fbsql_read_clob(': 'string clob_handle [, resource link_identifier] | string', -\ 'fbsql_result(': 'resource result [, int row [, mixed field]] | mixed', -\ 'fbsql_rollback(': '[resource link_identifier] | bool', -\ 'fbsql_select_db(': '[string database_name [, resource link_identifier]] | bool', -\ 'fbsql_set_lob_mode(': 'resource result, string database_name | bool', -\ 'fbsql_set_password(': 'resource link_identifier, string user, string password, string old_password | bool', -\ 'fbsql_set_transaction(': 'resource link_identifier, int Locking, int Isolation | void', -\ 'fbsql_start_db(': 'string database_name [, resource link_identifier [, string database_options]] | bool', -\ 'fbsql_stop_db(': 'string database_name [, resource link_identifier] | bool', -\ 'fbsql_tablename(': 'resource result, int i | string', -\ 'fbsql_username(': 'resource link_identifier [, string username] | string', -\ 'fbsql_warnings(': '[bool OnOff] | bool', -\ 'fclose(': 'resource handle | bool', -\ 'fdf_add_doc_javascript(': 'resource fdfdoc, string script_name, string script_code | bool', -\ 'fdf_add_template(': 'resource fdfdoc, int newpage, string filename, string template, int rename | bool', -\ 'fdf_close(': 'resource fdf_document | void', -\ 'fdf_create(': 'void | resource', -\ 'fdf_enum_values(': 'resource fdfdoc, callback function [, mixed userdata] | bool', -\ 'fdf_errno(': 'void | int', -\ 'fdf_error(': '[int error_code] | string', -\ 'fdf_get_ap(': 'resource fdf_document, string field, int face, string filename | bool', -\ 'fdf_get_attachment(': 'resource fdf_document, string fieldname, string savepath | array', -\ 'fdf_get_encoding(': 'resource fdf_document | string', -\ 'fdf_get_file(': 'resource fdf_document | string', -\ 'fdf_get_flags(': 'resource fdfdoc, string fieldname, int whichflags | int', -\ 'fdf_get_opt(': 'resource fdfdof, string fieldname [, int element] | mixed', -\ 'fdf_get_status(': 'resource fdf_document | string', -\ 'fdf_get_value(': 'resource fdf_document, string fieldname [, int which] | mixed', -\ 'fdf_get_version(': '[resource fdf_document] | string', -\ 'fdf_header(': 'void | void', -\ 'fdf_next_field_name(': 'resource fdf_document [, string fieldname] | string', -\ 'fdf_open(': 'string filename | resource', -\ 'fdf_open_string(': 'string fdf_data | resource', -\ 'fdf_remove_item(': 'resource fdfdoc, string fieldname, int item | bool', -\ 'fdf_save(': 'resource fdf_document [, string filename] | bool', -\ 'fdf_save_string(': 'resource fdf_document | string', -\ 'fdf_set_ap(': 'resource fdf_document, string field_name, int face, string filename, int page_number | bool', -\ 'fdf_set_encoding(': 'resource fdf_document, string encoding | bool', -\ 'fdf_set_file(': 'resource fdf_document, string url [, string target_frame] | bool', -\ 'fdf_set_flags(': 'resource fdf_document, string fieldname, int whichFlags, int newFlags | bool', -\ 'fdf_set_javascript_action(': 'resource fdf_document, string fieldname, int trigger, string script | bool', -\ 'fdf_set_on_import_javascript(': 'resource fdfdoc, string script, bool before_data_import | bool', -\ 'fdf_set_opt(': 'resource fdf_document, string fieldname, int element, string str1, string str2 | bool', -\ 'fdf_set_status(': 'resource fdf_document, string status | bool', -\ 'fdf_set_submit_form_action(': 'resource fdf_document, string fieldname, int trigger, string script, int flags | bool', -\ 'fdf_set_target_frame(': 'resource fdf_document, string frame_name | bool', -\ 'fdf_set_value(': 'resource fdf_document, string fieldname, mixed value [, int isName] | bool', -\ 'fdf_set_version(': 'resource fdf_document, string version | bool', -\ 'feof(': 'resource handle | bool', -\ 'fflush(': 'resource handle | bool', -\ 'fgetc(': 'resource handle | string', -\ 'fgetcsv(': 'resource handle [, int length [, string delimiter [, string enclosure]]] | array', -\ 'fgets(': 'resource handle [, int length] | string', -\ 'fgetss(': 'resource handle [, int length [, string allowable_tags]] | string', -\ 'fileatime(': 'string filename | int', -\ 'filectime(': 'string filename | int', -\ 'file_exists(': 'string filename | bool', -\ 'file_get_contents(': 'string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]] | string', -\ 'filegroup(': 'string filename | int', -\ 'file(': 'string filename [, int use_include_path [, resource context]] | array', -\ 'fileinode(': 'string filename | int', -\ 'filemtime(': 'string filename | int', -\ 'fileowner(': 'string filename | int', -\ 'fileperms(': 'string filename | int', -\ 'filepro_fieldcount(': 'void | int', -\ 'filepro_fieldname(': 'int field_number | string', -\ 'filepro_fieldtype(': 'int field_number | string', -\ 'filepro_fieldwidth(': 'int field_number | int', -\ 'filepro(': 'string directory | bool', -\ 'filepro_retrieve(': 'int row_number, int field_number | string', -\ 'filepro_rowcount(': 'void | int', -\ 'file_put_contents(': 'string filename, mixed data [, int flags [, resource context]] | int', -\ 'filesize(': 'string filename | int', -\ 'filetype(': 'string filename | string', -\ 'floatval(': 'mixed var | float', -\ 'flock(': 'resource handle, int operation [, int &wouldblock] | bool', -\ 'floor(': 'float value | float', -\ 'flush(': 'void | void', -\ 'fmod(': 'float x, float y | float', -\ 'fnmatch(': 'string pattern, string string [, int flags] | bool', -\ 'fopen(': 'string filename, string mode [, bool use_include_path [, resource zcontext]] | resource', -\ 'fpassthru(': 'resource handle | int', -\ 'fprintf(': 'resource handle, string format [, mixed args [, mixed ...]] | int', -\ 'fputcsv(': 'resource handle [, array fields [, string delimiter [, string enclosure]]] | int', -\ 'fread(': 'resource handle, int length | string', -\ 'frenchtojd(': 'int month, int day, int year | int', -\ 'fribidi_log2vis(': 'string str, string direction, int charset | string', -\ 'fscanf(': 'resource handle, string format [, mixed &...] | mixed', -\ 'fseek(': 'resource handle, int offset [, int whence] | int', -\ 'fsockopen(': 'string target [, int port [, int &errno [, string &errstr [, float timeout]]]] | resource', -\ 'fstat(': 'resource handle | array', -\ 'ftell(': 'resource handle | int', -\ 'ftok(': 'string pathname, string proj | int', -\ 'ftp_alloc(': 'resource ftp_stream, int filesize [, string &result] | bool', -\ 'ftp_cdup(': 'resource ftp_stream | bool', -\ 'ftp_chdir(': 'resource ftp_stream, string directory | bool', -\ 'ftp_chmod(': 'resource ftp_stream, int mode, string filename | int', -\ 'ftp_close(': 'resource ftp_stream | bool', -\ 'ftp_connect(': 'string host [, int port [, int timeout]] | resource', -\ 'ftp_delete(': 'resource ftp_stream, string path | bool', -\ 'ftp_exec(': 'resource ftp_stream, string command | bool', -\ 'ftp_fget(': 'resource ftp_stream, resource handle, string remote_file, int mode [, int resumepos] | bool', -\ 'ftp_fput(': 'resource ftp_stream, string remote_file, resource handle, int mode [, int startpos] | bool', -\ 'ftp_get(': 'resource ftp_stream, string local_file, string remote_file, int mode [, int resumepos] | bool', -\ 'ftp_get_option(': 'resource ftp_stream, int option | mixed', -\ 'ftp_login(': 'resource ftp_stream, string username, string password | bool', -\ 'ftp_mdtm(': 'resource ftp_stream, string remote_file | int', -\ 'ftp_mkdir(': 'resource ftp_stream, string directory | string', -\ 'ftp_nb_continue(': 'resource ftp_stream | int', -\ 'ftp_nb_fget(': 'resource ftp_stream, resource handle, string remote_file, int mode [, int resumepos] | int', -\ 'ftp_nb_fput(': 'resource ftp_stream, string remote_file, resource handle, int mode [, int startpos] | int', -\ 'ftp_nb_get(': 'resource ftp_stream, string local_file, string remote_file, int mode [, int resumepos] | int', -\ 'ftp_nb_put(': 'resource ftp_stream, string remote_file, string local_file, int mode [, int startpos] | int', -\ 'ftp_nlist(': 'resource ftp_stream, string directory | array', -\ 'ftp_pasv(': 'resource ftp_stream, bool pasv | bool', -\ 'ftp_put(': 'resource ftp_stream, string remote_file, string local_file, int mode [, int startpos] | bool', -\ 'ftp_pwd(': 'resource ftp_stream | string', -\ 'ftp_raw(': 'resource ftp_stream, string command | array', -\ 'ftp_rawlist(': 'resource ftp_stream, string directory [, bool recursive] | array', -\ 'ftp_rename(': 'resource ftp_stream, string oldname, string newname | bool', -\ 'ftp_rmdir(': 'resource ftp_stream, string directory | bool', -\ 'ftp_set_option(': 'resource ftp_stream, int option, mixed value | bool', -\ 'ftp_site(': 'resource ftp_stream, string command | bool', -\ 'ftp_size(': 'resource ftp_stream, string remote_file | int', -\ 'ftp_ssl_connect(': 'string host [, int port [, int timeout]] | resource', -\ 'ftp_systype(': 'resource ftp_stream | string', -\ 'ftruncate(': 'resource handle, int size | bool', -\ 'func_get_arg(': 'int arg_num | mixed', -\ 'func_get_args(': 'void | array', -\ 'func_num_args(': 'void | int', -\ 'function_exists(': 'string function_name | bool', -\ 'fwrite(': 'resource handle, string string [, int length] | int', -\ 'gd_info(': 'void | array', -\ 'getallheaders(': 'void | array', -\ 'get_browser(': '[string user_agent [, bool return_array]] | mixed', -\ 'get_cfg_var(': 'string varname | string', -\ 'get_class(': '[object obj] | string', -\ 'get_class_methods(': 'mixed class_name | array', -\ 'get_class_vars(': 'string class_name | array', -\ 'get_current_user(': 'void | string', -\ 'getcwd(': 'void | string', -\ 'getdate(': '[int timestamp] | array', -\ 'get_declared_classes(': 'void | array', -\ 'get_declared_interfaces(': 'void | array', -\ 'get_defined_constants(': '[mixed categorize] | array', -\ 'get_defined_functions(': 'void | array', -\ 'get_defined_vars(': 'void | array', -\ 'getenv(': 'string varname | string', -\ 'get_extension_funcs(': 'string module_name | array', -\ 'get_headers(': 'string url [, int format] | array', -\ 'gethostbyaddr(': 'string ip_address | string', -\ 'gethostbyname(': 'string hostname | string', -\ 'gethostbynamel(': 'string hostname | array', -\ 'get_html_translation_table(': '[int table [, int quote_style]] | array', -\ 'getimagesize(': 'string filename [, array &imageinfo] | array', -\ 'get_included_files(': 'void | array', -\ 'get_include_path(': 'void | string', -\ 'getlastmod(': 'void | int', -\ 'get_loaded_extensions(': 'void | array', -\ 'get_magic_quotes_gpc(': 'void | int', -\ 'get_magic_quotes_runtime(': 'void | int', -\ 'get_meta_tags(': 'string filename [, bool use_include_path] | array', -\ 'getmxrr(': 'string hostname, array &mxhosts [, array &weight] | bool', -\ 'getmygid(': 'void | int', -\ 'getmyinode(': 'void | int', -\ 'getmypid(': 'void | int', -\ 'getmyuid(': 'void | int', -\ 'get_object_vars(': 'object obj | array', -\ 'getopt(': 'string options | array', -\ 'get_parent_class(': '[mixed obj] | string', -\ 'getprotobyname(': 'string name | int', -\ 'getprotobynumber(': 'int number | string', -\ 'getrandmax(': 'void | int', -\ 'get_resource_type(': 'resource handle | string', -\ 'getrusage(': '[int who] | array', -\ 'getservbyname(': 'string service, string protocol | int', -\ 'getservbyport(': 'int port, string protocol | string', -\ 'gettext(': 'string message | string', -\ 'gettimeofday(': '[bool return_float] | mixed', -\ 'gettype(': 'mixed var | string', -\ 'glob(': 'string pattern [, int flags] | array', -\ 'gmdate(': 'string format [, int timestamp] | string', -\ 'gmmktime(': '[int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] | int', -\ 'gmp_abs(': 'resource a | resource', -\ 'gmp_add(': 'resource a, resource b | resource', -\ 'gmp_and(': 'resource a, resource b | resource', -\ 'gmp_clrbit(': 'resource &a, int index | void', -\ 'gmp_cmp(': 'resource a, resource b | int', -\ 'gmp_com(': 'resource a | resource', -\ 'gmp_divexact(': 'resource n, resource d | resource', -\ 'gmp_div_q(': 'resource a, resource b [, int round] | resource', -\ 'gmp_div_qr(': 'resource n, resource d [, int round] | array', -\ 'gmp_div_r(': 'resource n, resource d [, int round] | resource', -\ 'gmp_fact(': 'int a | resource', -\ 'gmp_gcdext(': 'resource a, resource b | array', -\ 'gmp_gcd(': 'resource a, resource b | resource', -\ 'gmp_hamdist(': 'resource a, resource b | int', -\ 'gmp_init(': 'mixed number [, int base] | resource', -\ 'gmp_intval(': 'resource gmpnumber | int', -\ 'gmp_invert(': 'resource a, resource b | resource', -\ 'gmp_jacobi(': 'resource a, resource p | int', -\ 'gmp_legendre(': 'resource a, resource p | int', -\ 'gmp_mod(': 'resource n, resource d | resource', -\ 'gmp_mul(': 'resource a, resource b | resource', -\ 'gmp_neg(': 'resource a | resource', -\ 'gmp_or(': 'resource a, resource b | resource', -\ 'gmp_perfect_square(': 'resource a | bool', -\ 'gmp_popcount(': 'resource a | int', -\ 'gmp_pow(': 'resource base, int exp | resource', -\ 'gmp_powm(': 'resource base, resource exp, resource mod | resource', -\ 'gmp_prob_prime(': 'resource a [, int reps] | int', -\ 'gmp_random(': 'int limiter | resource', -\ 'gmp_scan0(': 'resource a, int start | int', -\ 'gmp_scan1(': 'resource a, int start | int', -\ 'gmp_setbit(': 'resource &a, int index [, bool set_clear] | void', -\ 'gmp_sign(': 'resource a | int', -\ 'gmp_sqrt(': 'resource a | resource', -\ 'gmp_sqrtrem(': 'resource a | array', -\ 'gmp_strval(': 'resource gmpnumber [, int base] | string', -\ 'gmp_sub(': 'resource a, resource b | resource', -\ 'gmp_xor(': 'resource a, resource b | resource', -\ 'gmstrftime(': 'string format [, int timestamp] | string', -\ 'gnupg_adddecryptkey(': 'resource identifier, string fingerprint, string passphrase | bool', -\ 'gnupg_addencryptkey(': 'resource identifier, string fingerprint | bool', -\ 'gnupg_addsignkey(': 'resource identifier, string fingerprint [, string passphrase] | bool', -\ 'gnupg_cleardecryptkeys(': 'resource identifier | bool', -\ 'gnupg_clearencryptkeys(': 'resource identifier | bool', -\ 'gnupg_clearsignkeys(': 'resource identifier | bool', -\ 'gnupg_decrypt(': 'resource identifier, string text | string', -\ 'gnupg_decryptverify(': 'resource identifier, string text, string plaintext | array', -\ 'gnupg_encrypt(': 'resource identifier, string plaintext | string', -\ 'gnupg_encryptsign(': 'resource identifier, string plaintext | string', -\ 'gnupg_export(': 'resource identifier, string fingerprint | string', -\ 'gnupg_geterror(': 'resource identifier | string', -\ 'gnupg_getprotocol(': 'resource identifier | int', -\ 'gnupg_import(': 'resource identifier, string keydata | array', -\ 'gnupg_keyinfo(': 'resource identifier, string pattern | array', -\ 'gnupg_setarmor(': 'resource identifier, int armor | bool', -\ 'gnupg_seterrormode(': 'resource identifier, int errormode | void', -\ 'gnupg_setsignmode(': 'resource identifier, int signmode | bool', -\ 'gnupg_sign(': 'resource identifier, string plaintext | string', -\ 'gnupg_verify(': 'resource identifier, string signed_text, string signature [, string plaintext] | array', -\ 'gopher_parsedir(': 'string dirent | array', -\ 'gregoriantojd(': 'int month, int day, int year | int', -\ 'gzclose(': 'resource zp | bool', -\ 'gzcompress(': 'string data [, int level] | string', -\ 'gzdeflate(': 'string data [, int level] | string', -\ 'gzencode(': 'string data [, int level [, int encoding_mode]] | string', -\ 'gzeof(': 'resource zp | int', -\ 'gzfile(': 'string filename [, int use_include_path] | array', -\ 'gzgetc(': 'resource zp | string', -\ 'gzgets(': 'resource zp, int length | string', -\ 'gzgetss(': 'resource zp, int length [, string allowable_tags] | string', -\ 'gzinflate(': 'string data [, int length] | string', -\ 'gzopen(': 'string filename, string mode [, int use_include_path] | resource', -\ 'gzpassthru(': 'resource zp | int', -\ 'gzread(': 'resource zp, int length | string', -\ 'gzrewind(': 'resource zp | bool', -\ 'gzseek(': 'resource zp, int offset | int', -\ 'gztell(': 'resource zp | int', -\ 'gzuncompress(': 'string data [, int length] | string', -\ 'gzwrite(': 'resource zp, string string [, int length] | int', -\ '__halt_compiler(': 'void | void', -\ 'hash_algos(': 'void | array', -\ 'hash_file(': 'string algo, string filename [, bool raw_output] | string', -\ 'hash_final(': 'resource context [, bool raw_output] | string', -\ 'hash_hmac_file(': 'string algo, string filename, string key [, bool raw_output] | string', -\ 'hash_hmac(': 'string algo, string data, string key [, bool raw_output] | string', -\ 'hash(': 'string algo, string data [, bool raw_output] | string', -\ 'hash_init(': 'string algo [, int options, string key] | resource', -\ 'hash_update_file(': 'resource context, string filename [, resource context] | bool', -\ 'hash_update(': 'resource context, string data | bool', -\ 'hash_update_stream(': 'resource context, resource handle [, int length] | int', -\ 'header(': 'string string [, bool replace [, int http_response_code]] | void', -\ 'headers_list(': 'void | array', -\ 'headers_sent(': '[string &file [, int &line]] | bool', -\ 'hebrevc(': 'string hebrew_text [, int max_chars_per_line] | string', -\ 'hebrev(': 'string hebrew_text [, int max_chars_per_line] | string', -\ 'hexdec(': 'string hex_string | number', -\ 'highlight_file(': 'string filename [, bool return] | mixed', -\ 'highlight_string(': 'string str [, bool return] | mixed', -\ 'htmlentities(': 'string string [, int quote_style [, string charset]] | string', -\ 'html_entity_decode(': 'string string [, int quote_style [, string charset]] | string', -\ 'htmlspecialchars_decode(': 'string string [, int quote_style] | string', -\ 'htmlspecialchars(': 'string string [, int quote_style [, string charset]] | string', -\ 'http_build_query(': 'array formdata [, string numeric_prefix] | string', -\ 'hw_api_attribute(': '[string name [, string value]] | HW_API_Attribute', -\ 'hw_api_attribute->key(': 'void | string', -\ 'hw_api_attribute->langdepvalue(': 'string language | string', -\ 'hw_api_attribute->value(': 'void | string', -\ 'hw_api_attribute->values(': 'void | array', -\ 'hw_api->checkin(': 'array parameter | bool', -\ 'hw_api->checkout(': 'array parameter | bool', -\ 'hw_api->children(': 'array parameter | array', -\ 'hw_api->content(': 'array parameter | HW_API_Content', -\ 'hw_api_content->mimetype(': 'void | string', -\ 'hw_api_content->read(': 'string buffer, int len | string', -\ 'hw_api->copy(': 'array parameter | hw_api_object', -\ 'hw_api->dbstat(': 'array parameter | hw_api_object', -\ 'hw_api->dcstat(': 'array parameter | hw_api_object', -\ 'hw_api->dstanchors(': 'array parameter | array', -\ 'hw_api->dstofsrcanchor(': 'array parameter | hw_api_object', -\ 'hw_api_error->count(': 'void | int', -\ 'hw_api_error->reason(': 'void | HW_API_Reason', -\ 'hw_api->find(': 'array parameter | array', -\ 'hw_api->ftstat(': 'array parameter | hw_api_object', -\ 'hwapi_hgcsp(': 'string hostname [, int port] | HW_API', -\ 'hw_api->hwstat(': 'array parameter | hw_api_object', -\ 'hw_api->identify(': 'array parameter | bool', -\ 'hw_api->info(': 'array parameter | array', -\ 'hw_api->insertanchor(': 'array parameter | hw_api_object', -\ 'hw_api->insertcollection(': 'array parameter | hw_api_object', -\ 'hw_api->insertdocument(': 'array parameter | hw_api_object', -\ 'hw_api->insert(': 'array parameter | hw_api_object', -\ 'hw_api->link(': 'array parameter | bool', -\ 'hw_api->lock(': 'array parameter | bool', -\ 'hw_api->move(': 'array parameter | bool', -\ 'hw_api_content(': 'string content, string mimetype | HW_API_Content', -\ 'hw_api_object->assign(': 'array parameter | bool', -\ 'hw_api_object->attreditable(': 'array parameter | bool', -\ 'hw_api->objectbyanchor(': 'array parameter | hw_api_object', -\ 'hw_api_object->count(': 'array parameter | int', -\ 'hw_api->object(': 'array parameter | hw_api_object', -\ 'hw_api_object->insert(': 'HW_API_Attribute attribute | bool', -\ 'hw_api_object(': 'array parameter | hw_api_object', -\ 'hw_api_object->remove(': 'string name | bool', -\ 'hw_api_object->title(': 'array parameter | string', -\ 'hw_api_object->value(': 'string name | string', -\ 'hw_api->parents(': 'array parameter | array', -\ 'hw_api_reason->description(': 'void | string', -\ 'hw_api_reason->type(': 'void | HW_API_Reason', -\ 'hw_api->remove(': 'array parameter | bool', -\ 'hw_api->replace(': 'array parameter | hw_api_object', -\ 'hw_api->setcommittedversion(': 'array parameter | hw_api_object', -\ 'hw_api->srcanchors(': 'array parameter | array', -\ 'hw_api->srcsofdst(': 'array parameter | array', -\ 'hw_api->unlock(': 'array parameter | bool', -\ 'hw_api->user(': 'array parameter | hw_api_object', -\ 'hw_api->userlist(': 'array parameter | array', -\ 'hw_array2objrec(': 'array object_array | string', -\ 'hw_changeobject(': 'int link, int objid, array attributes | bool', -\ 'hw_children(': 'int connection, int objectID | array', -\ 'hw_childrenobj(': 'int connection, int objectID | array', -\ 'hw_close(': 'int connection | bool', -\ 'hw_connect(': 'string host, int port [, string username, string password] | int', -\ 'hw_connection_info(': 'int link | void', -\ 'hw_cp(': 'int connection, array object_id_array, int destination_id | int', -\ 'hw_deleteobject(': 'int connection, int object_to_delete | bool', -\ 'hw_docbyanchor(': 'int connection, int anchorID | int', -\ 'hw_docbyanchorobj(': 'int connection, int anchorID | string', -\ 'hw_document_attributes(': 'int hw_document | string', -\ 'hw_document_bodytag(': 'int hw_document [, string prefix] | string', -\ 'hw_document_content(': 'int hw_document | string', -\ 'hw_document_setcontent(': 'int hw_document, string content | bool', -\ 'hw_document_size(': 'int hw_document | int', -\ 'hw_dummy(': 'int link, int id, int msgid | string', -\ 'hw_edittext(': 'int connection, int hw_document | bool', -\ 'hw_error(': 'int connection | int', -\ 'hw_errormsg(': 'int connection | string', -\ 'hw_free_document(': 'int hw_document | bool', -\ 'hw_getanchors(': 'int connection, int objectID | array', -\ 'hw_getanchorsobj(': 'int connection, int objectID | array', -\ 'hw_getandlock(': 'int connection, int objectID | string', -\ 'hw_getchildcoll(': 'int connection, int objectID | array', -\ 'hw_getchildcollobj(': 'int connection, int objectID | array', -\ 'hw_getchilddoccoll(': 'int connection, int objectID | array', -\ 'hw_getchilddoccollobj(': 'int connection, int objectID | array', -\ 'hw_getobjectbyquerycoll(': 'int connection, int objectID, string query, int max_hits | array', -\ 'hw_getobjectbyquerycollobj(': 'int connection, int objectID, string query, int max_hits | array', -\ 'hw_getobjectbyquery(': 'int connection, string query, int max_hits | array', -\ 'hw_getobjectbyqueryobj(': 'int connection, string query, int max_hits | array', -\ 'hw_getobject(': 'int connection, mixed objectID [, string query] | mixed', -\ 'hw_getparents(': 'int connection, int objectID | array', -\ 'hw_getparentsobj(': 'int connection, int objectID | array', -\ 'hw_getrellink(': 'int link, int rootid, int sourceid, int destid | string', -\ 'hw_getremotechildren(': 'int connection, string object_record | mixed', -\ 'hw_getremote(': 'int connection, int objectID | int', -\ 'hw_getsrcbydestobj(': 'int connection, int objectID | array', -\ 'hw_gettext(': 'int connection, int objectID [, mixed rootID/prefix] | int', -\ 'hw_getusername(': 'int connection | string', -\ 'hw_identify(': 'int link, string username, string password | string', -\ 'hw_incollections(': 'int connection, array object_id_array, array collection_id_array, int return_collections | array', -\ 'hw_info(': 'int connection | string', -\ 'hw_inscoll(': 'int connection, int objectID, array object_array | int', -\ 'hw_insdoc(': 'resource connection, int parentID, string object_record [, string text] | int', -\ 'hw_insertanchors(': 'int hwdoc, array anchorecs, array dest [, array urlprefixes] | bool', -\ 'hw_insertdocument(': 'int connection, int parent_id, int hw_document | int', -\ 'hw_insertobject(': 'int connection, string object_rec, string parameter | int', -\ 'hw_mapid(': 'int connection, int server_id, int object_id | int', -\ 'hw_modifyobject(': 'int connection, int object_to_change, array remove, array add [, int mode] | bool', -\ 'hw_mv(': 'int connection, array object_id_array, int source_id, int destination_id | int', -\ 'hw_new_document(': 'string object_record, string document_data, int document_size | int', -\ 'hw_objrec2array(': 'string object_record [, array format] | array', -\ 'hw_output_document(': 'int hw_document | bool', -\ 'hw_pconnect(': 'string host, int port [, string username, string password] | int', -\ 'hw_pipedocument(': 'int connection, int objectID [, array url_prefixes] | int', -\ 'hw_root(': ' | int', -\ 'hw_setlinkroot(': 'int link, int rootid | int', -\ 'hw_stat(': 'int link | string', -\ 'hw_unlock(': 'int connection, int objectID | bool', -\ 'hw_who(': 'int connection | array', -\ 'hypot(': 'float x, float y | float', -\ 'i18n_loc_get_default(': 'void | string', -\ 'i18n_loc_set_default(': 'string name | bool', -\ 'ibase_add_user(': 'resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]] | bool', -\ 'ibase_affected_rows(': '[resource link_identifier] | int', -\ 'ibase_backup(': 'resource service_handle, string source_db, string dest_file [, int options [, bool verbose]] | mixed', -\ 'ibase_blob_add(': 'resource blob_handle, string data | void', -\ 'ibase_blob_cancel(': 'resource blob_handle | bool', -\ 'ibase_blob_close(': 'resource blob_handle | mixed', -\ 'ibase_blob_create(': '[resource link_identifier] | resource', -\ 'ibase_blob_echo(': 'resource link_identifier, string blob_id | bool', -\ 'ibase_blob_get(': 'resource blob_handle, int len | string', -\ 'ibase_blob_import(': 'resource link_identifier, resource file_handle | string', -\ 'ibase_blob_info(': 'resource link_identifier, string blob_id | array', -\ 'ibase_blob_open(': 'resource link_identifier, string blob_id | resource', -\ 'ibase_close(': '[resource connection_id] | bool', -\ 'ibase_commit(': '[resource link_or_trans_identifier] | bool', -\ 'ibase_commit_ret(': '[resource link_or_trans_identifier] | bool', -\ 'ibase_connect(': '[string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role [, int sync]]]]]]]] | resource', -\ 'ibase_db_info(': 'resource service_handle, string db, int action [, int argument] | string', -\ 'ibase_delete_user(': 'resource service_handle, string user_name | bool', -\ 'ibase_drop_db(': '[resource connection] | bool', -\ 'ibase_errcode(': 'void | int', -\ 'ibase_errmsg(': 'void | string', -\ 'ibase_execute(': 'resource query [, mixed bind_arg [, mixed ...]] | resource', -\ 'ibase_fetch_assoc(': 'resource result [, int fetch_flag] | array', -\ 'ibase_fetch_object(': 'resource result_id [, int fetch_flag] | object', -\ 'ibase_fetch_row(': 'resource result_identifier [, int fetch_flag] | array', -\ 'ibase_field_info(': 'resource result, int field_number | array', -\ 'ibase_free_event_handler(': 'resource event | bool', -\ 'ibase_free_query(': 'resource query | bool', -\ 'ibase_free_result(': 'resource result_identifier | bool', -\ 'ibase_gen_id(': 'string generator [, int increment [, resource link_identifier]] | mixed', -\ 'ibase_maintain_db(': 'resource service_handle, string db, int action [, int argument] | bool', -\ 'ibase_modify_user(': 'resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]] | bool', -\ 'ibase_name_result(': 'resource result, string name | bool', -\ 'ibase_num_fields(': 'resource result_id | int', -\ 'ibase_num_params(': 'resource query | int', -\ 'ibase_param_info(': 'resource query, int param_number | array', -\ 'ibase_pconnect(': '[string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role [, int sync]]]]]]]] | resource', -\ 'ibase_prepare(': 'string query | resource', -\ 'ibase_query(': '[resource link_identifier, string query [, int bind_args]] | resource', -\ 'ibase_restore(': 'resource service_handle, string source_file, string dest_db [, int options [, bool verbose]] | mixed', -\ 'ibase_rollback(': '[resource link_or_trans_identifier] | bool', -\ 'ibase_rollback_ret(': '[resource link_or_trans_identifier] | bool', -\ 'ibase_server_info(': 'resource service_handle, int action | string', -\ 'ibase_service_attach(': 'string host, string dba_username, string dba_password | resource', -\ 'ibase_service_detach(': 'resource service_handle | bool', -\ 'ibase_set_event_handler(': 'callback event_handler, string event_name1 [, string event_name2 [, string ...]] | resource', -\ 'ibase_timefmt(': 'string format [, int columntype] | int', -\ 'ibase_trans(': '[int trans_args [, resource link_identifier]] | resource', -\ 'ibase_wait_event(': 'string event_name1 [, string event_name2 [, string ...]] | string', -\ 'icap_close(': 'int icap_stream [, int flags] | int', -\ 'icap_create_calendar(': 'int stream_id, string calendar | string', -\ 'icap_delete_calendar(': 'int stream_id, string calendar | string', -\ 'icap_delete_event(': 'int stream_id, int uid | string', -\ 'icap_fetch_event(': 'int stream_id, int event_id [, int options] | int', -\ 'icap_list_alarms(': 'int stream_id, array date, array time | int', -\ 'icap_list_events(': 'int stream_id, int begin_date [, int end_date] | array', -\ 'icap_open(': 'string calendar, string username, string password, string options | resource', -\ 'icap_rename_calendar(': 'int stream_id, string old_name, string new_name | string', -\ 'icap_reopen(': 'int stream_id, string calendar [, int options] | int', -\ 'icap_snooze(': 'int stream_id, int uid | string', -\ 'icap_store_event(': 'int stream_id, object event | string', -\ 'iconv_get_encoding(': '[string type] | mixed', -\ 'iconv(': 'string in_charset, string out_charset, string str | string', -\ 'iconv_mime_decode_headers(': 'string encoded_headers [, int mode [, string charset]] | array', -\ 'iconv_mime_decode(': 'string encoded_header [, int mode [, string charset]] | string', -\ 'iconv_mime_encode(': 'string field_name, string field_value [, array preferences] | string', -\ 'iconv_set_encoding(': 'string type, string charset | bool', -\ 'iconv_strlen(': 'string str [, string charset] | int', -\ 'iconv_strpos(': 'string haystack, string needle [, int offset [, string charset]] | int', -\ 'iconv_strrpos(': 'string haystack, string needle [, string charset] | int', -\ 'iconv_substr(': 'string str, int offset [, int length [, string charset]] | string', -\ 'id3_get_frame_long_name(': 'string frameId | string', -\ 'id3_get_frame_short_name(': 'string frameId | string', -\ 'id3_get_genre_id(': 'string genre | int', -\ 'id3_get_genre_list(': 'void | array', -\ 'id3_get_genre_name(': 'int genre_id | string', -\ 'id3_get_tag(': 'string filename [, int version] | array', -\ 'id3_get_version(': 'string filename | int', -\ 'id3_remove_tag(': 'string filename [, int version] | bool', -\ 'id3_set_tag(': 'string filename, array tag [, int version] | bool', -\ 'idate(': 'string format [, int timestamp] | int', -\ 'ifx_affected_rows(': 'int result_id | int', -\ 'ifx_blobinfile_mode(': 'int mode | void', -\ 'ifx_byteasvarchar(': 'int mode | void', -\ 'ifx_close(': '[int link_identifier] | int', -\ 'ifx_connect(': '[string database [, string userid [, string password]]] | int', -\ 'ifx_copy_blob(': 'int bid | int', -\ 'ifx_create_blob(': 'int type, int mode, string param | int', -\ 'ifx_create_char(': 'string param | int', -\ 'ifx_do(': 'int result_id | int', -\ 'ifx_error(': 'void | string', -\ 'ifx_errormsg(': '[int errorcode] | string', -\ 'ifx_fetch_row(': 'int result_id [, mixed position] | array', -\ 'ifx_fieldproperties(': 'int result_id | array', -\ 'ifx_fieldtypes(': 'int result_id | array', -\ 'ifx_free_blob(': 'int bid | int', -\ 'ifx_free_char(': 'int bid | int', -\ 'ifx_free_result(': 'int result_id | int', -\ 'ifx_get_blob(': 'int bid | int', -\ 'ifx_get_char(': 'int bid | int', -\ 'ifx_getsqlca(': 'int result_id | array', -\ 'ifx_htmltbl_result(': 'int result_id [, string html_table_options] | int', -\ 'ifx_nullformat(': 'int mode | void', -\ 'ifx_num_fields(': 'int result_id | int', -\ 'ifx_num_rows(': 'int result_id | int', -\ 'ifx_pconnect(': '[string database [, string userid [, string password]]] | int', -\ 'ifx_prepare(': 'string query, int conn_id [, int cursor_def, mixed blobidarray] | int', -\ 'ifx_query(': 'string query, int link_identifier [, int cursor_type [, mixed blobidarray]] | int', -\ 'ifx_textasvarchar(': 'int mode | void', -\ 'ifx_update_blob(': 'int bid, string content | bool', -\ 'ifx_update_char(': 'int bid, string content | int', -\ 'ifxus_close_slob(': 'int bid | int', -\ 'ifxus_create_slob(': 'int mode | int', -\ 'ifxus_free_slob(': 'int bid | int', -\ 'ifxus_open_slob(': 'int bid, int mode | int', -\ 'ifxus_read_slob(': 'int bid, int nbytes | int', -\ 'ifxus_seek_slob(': 'int bid, int mode, int offset | int', -\ 'ifxus_tell_slob(': 'int bid | int', -\ 'ifxus_write_slob(': 'int bid, string content | int', -\ 'ignore_user_abort(': '[bool setting] | int', -\ 'iis_add_server(': 'string path, string comment, string server_ip, int port, string host_name, int rights, int start_server | int', -\ 'iis_get_dir_security(': 'int server_instance, string virtual_path | int', -\ 'iis_get_script_map(': 'int server_instance, string virtual_path, string script_extension | string', -\ 'iis_get_server_by_comment(': 'string comment | int', -\ 'iis_get_server_by_path(': 'string path | int', -\ 'iis_get_server_rights(': 'int server_instance, string virtual_path | int', -\ 'iis_get_service_state(': 'string service_id | int', -\ 'iis_remove_server(': 'int server_instance | int', -\ 'iis_set_app_settings(': 'int server_instance, string virtual_path, string application_scope | int', -\ 'iis_set_dir_security(': 'int server_instance, string virtual_path, int directory_flags | int', -\ 'iis_set_script_map(': 'int server_instance, string virtual_path, string script_extension, string engine_path, int allow_scripting | int', -\ 'iis_set_server_rights(': 'int server_instance, string virtual_path, int directory_flags | int', -\ 'iis_start_server(': 'int server_instance | int', -\ 'iis_start_service(': 'string service_id | int', -\ 'iis_stop_server(': 'int server_instance | int', -\ 'iis_stop_service(': 'string service_id | int', -\ 'image2wbmp(': 'resource image [, string filename [, int threshold]] | int', -\ 'imagealphablending(': 'resource image, bool blendmode | bool', -\ 'imageantialias(': 'resource im, bool on | bool', -\ 'imagearc(': 'resource image, int cx, int cy, int w, int h, int s, int e, int color | bool', -\ 'imagechar(': 'resource image, int font, int x, int y, string c, int color | bool', -\ 'imagecharup(': 'resource image, int font, int x, int y, string c, int color | bool', -\ 'imagecolorallocatealpha(': 'resource image, int red, int green, int blue, int alpha | int', -\ 'imagecolorallocate(': 'resource image, int red, int green, int blue | int', -\ 'imagecolorat(': 'resource image, int x, int y | int', -\ 'imagecolorclosestalpha(': 'resource image, int red, int green, int blue, int alpha | int', -\ 'imagecolorclosest(': 'resource image, int red, int green, int blue | int', -\ 'imagecolorclosesthwb(': 'resource image, int red, int green, int blue | int', -\ 'imagecolordeallocate(': 'resource image, int color | bool', -\ 'imagecolorexactalpha(': 'resource image, int red, int green, int blue, int alpha | int', -\ 'imagecolorexact(': 'resource image, int red, int green, int blue | int', -\ 'imagecolormatch(': 'resource image1, resource image2 | bool', -\ 'imagecolorresolvealpha(': 'resource image, int red, int green, int blue, int alpha | int', -\ 'imagecolorresolve(': 'resource image, int red, int green, int blue | int', -\ 'imagecolorset(': 'resource image, int index, int red, int green, int blue | void', -\ 'imagecolorsforindex(': 'resource image, int index | array', -\ 'imagecolorstotal(': 'resource image | int', -\ 'imagecolortransparent(': 'resource image [, int color] | int', -\ 'imageconvolution(': 'resource image, array matrix3x3, float div, float offset | bool', -\ 'imagecopy(': 'resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h | bool', -\ 'imagecopymergegray(': 'resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct | bool', -\ 'imagecopymerge(': 'resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct | bool', -\ 'imagecopyresampled(': 'resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h | bool', -\ 'imagecopyresized(': 'resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h | bool', -\ 'imagecreatefromgd2(': 'string filename | resource', -\ 'imagecreatefromgd2part(': 'string filename, int srcX, int srcY, int width, int height | resource', -\ 'imagecreatefromgd(': 'string filename | resource', -\ 'imagecreatefromgif(': 'string filename | resource', -\ 'imagecreatefromjpeg(': 'string filename | resource', -\ 'imagecreatefrompng(': 'string filename | resource', -\ 'imagecreatefromstring(': 'string image | resource', -\ 'imagecreatefromwbmp(': 'string filename | resource', -\ 'imagecreatefromxbm(': 'string filename | resource', -\ 'imagecreatefromxpm(': 'string filename | resource', -\ 'imagecreate(': 'int x_size, int y_size | resource', -\ 'imagecreatetruecolor(': 'int x_size, int y_size | resource', -\ 'imagedashedline(': 'resource image, int x1, int y1, int x2, int y2, int color | bool', -\ 'imagedestroy(': 'resource image | bool', -\ 'imageellipse(': 'resource image, int cx, int cy, int w, int h, int color | bool', -\ 'imagefilledarc(': 'resource image, int cx, int cy, int w, int h, int s, int e, int color, int style | bool', -\ 'imagefilledellipse(': 'resource image, int cx, int cy, int w, int h, int color | bool', -\ 'imagefilledpolygon(': 'resource image, array points, int num_points, int color | bool', -\ 'imagefilledrectangle(': 'resource image, int x1, int y1, int x2, int y2, int color | bool', -\ 'imagefill(': 'resource image, int x, int y, int color | bool', -\ 'imagefilltoborder(': 'resource image, int x, int y, int border, int color | bool', -\ 'imagefilter(': 'resource src_im, int filtertype [, int arg1 [, int arg2 [, int arg3]]] | bool', -\ 'imagefontheight(': 'int font | int', -\ 'imagefontwidth(': 'int font | int', -\ 'imageftbbox(': 'float size, float angle, string font_file, string text [, array extrainfo] | array', -\ 'imagefttext(': 'resource image, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo] | array', -\ 'imagegammacorrect(': 'resource image, float inputgamma, float outputgamma | bool', -\ 'imagegd2(': 'resource image [, string filename [, int chunk_size [, int type]]] | bool', -\ 'imagegd(': 'resource image [, string filename] | bool', -\ 'imagegif(': 'resource image [, string filename] | bool', -\ 'imageinterlace(': 'resource image [, int interlace] | int', -\ 'imageistruecolor(': 'resource image | bool', -\ 'imagejpeg(': 'resource image [, string filename [, int quality]] | bool', -\ 'imagelayereffect(': 'resource image, int effect | bool', -\ 'imageline(': 'resource image, int x1, int y1, int x2, int y2, int color | bool', -\ 'imageloadfont(': 'string file | int', -\ 'imagepalettecopy(': 'resource destination, resource source | void', -\ 'imagepng(': 'resource image [, string filename] | bool', -\ 'imagepolygon(': 'resource image, array points, int num_points, int color | bool', -\ 'imagepsbbox(': 'string text, int font, int size [, int space, int tightness, float angle] | array', -\ 'imagepscopyfont(': 'resource fontindex | int', -\ 'imagepsencodefont(': 'resource font_index, string encodingfile | bool', -\ 'imagepsextendfont(': 'int font_index, float extend | bool', -\ 'imagepsfreefont(': 'resource fontindex | bool', -\ 'imagepsloadfont(': 'string filename | resource', -\ 'imagepsslantfont(': 'resource font_index, float slant | bool', -\ 'imagepstext(': 'resource image, string text, resource font, int size, int foreground, int background, int x, int y [, int space, int tightness, float angle, int antialias_steps] | array', -\ 'imagerectangle(': 'resource image, int x1, int y1, int x2, int y2, int col | bool', -\ 'imagerotate(': 'resource src_im, float angle, int bgd_color [, int ignore_transparent] | resource', -\ 'imagesavealpha(': 'resource image, bool saveflag | bool', -\ 'imagesetbrush(': 'resource image, resource brush | bool', -\ 'imagesetpixel(': 'resource image, int x, int y, int color | bool', -\ 'imagesetstyle(': 'resource image, array style | bool', -\ 'imagesetthickness(': 'resource image, int thickness | bool', -\ 'imagesettile(': 'resource image, resource tile | bool', -\ 'imagestring(': 'resource image, int font, int x, int y, string s, int col | bool', -\ 'imagestringup(': 'resource image, int font, int x, int y, string s, int col | bool', -\ 'imagesx(': 'resource image | int', -\ 'imagesy(': 'resource image | int', -\ 'imagetruecolortopalette(': 'resource image, bool dither, int ncolors | bool', -\ 'imagettfbbox(': 'float size, float angle, string fontfile, string text | array', -\ 'imagettftext(': 'resource image, float size, float angle, int x, int y, int color, string fontfile, string text | array', -\ 'imagetypes(': 'void | int', -\ 'image_type_to_extension(': 'int imagetype [, bool include_dot] | string', -\ 'image_type_to_mime_type(': 'int imagetype | string', -\ 'imagewbmp(': 'resource image [, string filename [, int foreground]] | bool', -\ 'imagexbm(': 'resource image, string filename [, int foreground] | bool', -\ 'imap_8bit(': 'string string | string', -\ 'imap_alerts(': 'void | array', -\ 'imap_append(': 'resource imap_stream, string mbox, string message [, string options] | bool', -\ 'imap_base64(': 'string text | string', -\ 'imap_binary(': 'string string | string', -\ 'imap_body(': 'resource imap_stream, int msg_number [, int options] | string', -\ 'imap_bodystruct(': 'resource stream_id, int msg_no, string section | object', -\ 'imap_check(': 'resource imap_stream | object', -\ 'imap_clearflag_full(': 'resource stream, string sequence, string flag [, string options] | bool', -\ 'imap_close(': 'resource imap_stream [, int flag] | bool', -\ 'imap_createmailbox(': 'resource imap_stream, string mbox | bool', -\ 'imap_delete(': 'int imap_stream, int msg_number [, int options] | bool', -\ 'imap_deletemailbox(': 'resource imap_stream, string mbox | bool', -\ 'imap_errors(': 'void | array', -\ 'imap_expunge(': 'resource imap_stream | bool', -\ 'imap_fetchbody(': 'resource imap_stream, int msg_number, string part_number [, int options] | string', -\ 'imap_fetchheader(': 'resource imap_stream, int msgno [, int options] | string', -\ 'imap_fetch_overview(': 'resource imap_stream, string sequence [, int options] | array', -\ 'imap_fetchstructure(': 'resource imap_stream, int msg_number [, int options] | object', -\ 'imap_getacl(': 'resource stream_id, string mailbox | array', -\ 'imap_getmailboxes(': 'resource imap_stream, string ref, string pattern | array', -\ 'imap_get_quota(': 'resource imap_stream, string quota_root | array', -\ 'imap_get_quotaroot(': 'resource imap_stream, string quota_root | array', -\ 'imap_getsubscribed(': 'resource imap_stream, string ref, string pattern | array', -\ 'imap_headerinfo(': 'resource imap_stream, int msg_number [, int fromlength [, int subjectlength [, string defaulthost]]] | object', -\ 'imap_headers(': 'resource imap_stream | array', -\ 'imap_last_error(': 'void | string', -\ 'imap_list(': 'resource imap_stream, string ref, string pattern | array', -\ 'imap_listscan(': 'resource imap_stream, string ref, string pattern, string content | array', -\ 'imap_lsub(': 'resource imap_stream, string ref, string pattern | array', -\ 'imap_mailboxmsginfo(': 'resource imap_stream | object', -\ 'imap_mail_compose(': 'array envelope, array body | string', -\ 'imap_mail_copy(': 'resource imap_stream, string msglist, string mbox [, int options] | bool', -\ 'imap_mail(': 'string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]] | bool', -\ 'imap_mail_move(': 'resource imap_stream, string msglist, string mbox [, int options] | bool', -\ 'imap_mime_header_decode(': 'string text | array', -\ 'imap_msgno(': 'resource imap_stream, int uid | int', -\ 'imap_num_msg(': 'resource imap_stream | int', -\ 'imap_num_recent(': 'resource imap_stream | int', -\ 'imap_open(': 'string mailbox, string username, string password [, int options] | resource', -\ 'imap_ping(': 'resource imap_stream | bool', -\ 'imap_qprint(': 'string string | string', -\ 'imap_renamemailbox(': 'resource imap_stream, string old_mbox, string new_mbox | bool', -\ 'imap_reopen(': 'resource imap_stream, string mailbox [, int options] | bool', -\ 'imap_rfc822_parse_adrlist(': 'string address, string default_host | array', -\ 'imap_rfc822_parse_headers(': 'string headers [, string defaulthost] | object', -\ 'imap_rfc822_write_address(': 'string mailbox, string host, string personal | string', -\ 'imap_search(': 'resource imap_stream, string criteria [, int options [, string charset]] | array', -\ 'imap_setacl(': 'resource stream_id, string mailbox, string id, string rights | bool', -\ 'imap_setflag_full(': 'resource stream, string sequence, string flag [, string options] | bool', -\ 'imap_set_quota(': 'resource imap_stream, string quota_root, int quota_limit | bool', -\ 'imap_sort(': 'resource stream, int criteria, int reverse [, int options [, string search_criteria [, string charset]]] | array', -\ 'imap_status(': 'resource imap_stream, string mailbox, int options | object', -\ 'imap_subscribe(': 'resource imap_stream, string mbox | bool', -\ 'imap_thread(': 'resource stream_id [, int options] | array', -\ 'imap_timeout(': 'int timeout_type [, int timeout] | mixed', -\ 'imap_uid(': 'resource imap_stream, int msgno | int', -\ 'imap_undelete(': 'resource imap_stream, int msg_number [, int flags] | bool', -\ 'imap_unsubscribe(': 'string imap_stream, string mbox | bool', -\ 'imap_utf7_decode(': 'string text | string', -\ 'imap_utf7_encode(': 'string data | string', -\ 'imap_utf8(': 'string mime_encoded_text | string', -\ 'implode(': 'string glue, array pieces | string', -\ 'import_request_variables(': 'string types [, string prefix] | bool', -\ 'in_array(': 'mixed needle, array haystack [, bool strict] | bool', -\ 'inet_ntop(': 'string in_addr | string', -\ 'inet_pton(': 'string address | string', -\ 'ingres_autocommit(': '[resource link] | bool', -\ 'ingres_close(': '[resource link] | bool', -\ 'ingres_commit(': '[resource link] | bool', -\ 'ingres_connect(': '[string database [, string username [, string password]]] | resource', -\ 'ingres_cursor(': '[resource link] | string', -\ 'ingres_errno(': '[resource link] | int', -\ 'ingres_error(': '[resource link] | string', -\ 'ingres_errsqlstate(': '[resource link] | string', -\ 'ingres_fetch_array(': '[int result_type [, resource link]] | array', -\ 'ingres_fetch_object(': '[int result_type [, resource link]] | object', -\ 'ingres_fetch_row(': '[resource link] | array', -\ 'ingres_field_length(': 'int index [, resource link] | int', -\ 'ingres_field_name(': 'int index [, resource link] | string', -\ 'ingres_field_nullable(': 'int index [, resource link] | bool', -\ 'ingres_field_precision(': 'int index [, resource link] | int', -\ 'ingres_field_scale(': 'int index [, resource link] | int', -\ 'ingres_field_type(': 'int index [, resource link] | string', -\ 'ingres_num_fields(': '[resource link] | int', -\ 'ingres_num_rows(': '[resource link] | int', -\ 'ingres_pconnect(': '[string database [, string username [, string password]]] | resource', -\ 'ingres_query(': 'string query [, resource link] | bool', -\ 'ingres_rollback(': '[resource link] | bool', -\ 'ini_get_all(': '[string extension] | array', -\ 'ini_get(': 'string varname | string', -\ 'ini_restore(': 'string varname | void', -\ 'ini_set(': 'string varname, string newvalue | string', -\ 'interface_exists(': 'string interface_name [, bool autoload] | bool', -\ 'intval(': 'mixed var [, int base] | int', -\ 'ip2long(': 'string ip_address | int', -\ 'iptcembed(': 'string iptcdata, string jpeg_file_name [, int spool] | mixed', -\ 'iptcparse(': 'string iptcblock | array', -\ 'ircg_channel_mode(': 'resource connection, string channel, string mode_spec, string nick | bool', -\ 'ircg_disconnect(': 'resource connection, string reason | bool', -\ 'ircg_eval_ecmascript_params(': 'string params | array', -\ 'ircg_fetch_error_msg(': 'resource connection | array', -\ 'ircg_get_username(': 'resource connection | string', -\ 'ircg_html_encode(': 'string html_string [, bool auto_links [, bool conv_br]] | string', -\ 'ircg_ignore_add(': 'resource connection, string nick | void', -\ 'ircg_ignore_del(': 'resource connection, string nick | bool', -\ 'ircg_invite(': 'resource connection, string channel, string nickname | bool', -\ 'ircg_is_conn_alive(': 'resource connection | bool', -\ 'ircg_join(': 'resource connection, string channel [, string key] | bool', -\ 'ircg_kick(': 'resource connection, string channel, string nick, string reason | bool', -\ 'ircg_list(': 'resource connection, string channel | bool', -\ 'ircg_lookup_format_messages(': 'string name | bool', -\ 'ircg_lusers(': 'resource connection | bool', -\ 'ircg_msg(': 'resource connection, string recipient, string message [, bool suppress] | bool', -\ 'ircg_names(': 'int connection, string channel [, string target] | bool', -\ 'ircg_nick(': 'resource connection, string nick | bool', -\ 'ircg_nickname_escape(': 'string nick | string', -\ 'ircg_nickname_unescape(': 'string nick | string', -\ 'ircg_notice(': 'resource connection, string recipient, string message | bool', -\ 'ircg_oper(': 'resource connection, string name, string password | bool', -\ 'ircg_part(': 'resource connection, string channel | bool', -\ 'ircg_pconnect(': 'string username [, string server_ip [, int server_port [, string msg_format [, array ctcp_messages [, array user_settings [, bool bailout_on_trivial]]]]]] | resource', -\ 'ircg_register_format_messages(': 'string name, array messages | bool', -\ 'ircg_set_current(': 'resource connection | bool', -\ 'ircg_set_file(': 'resource connection, string path | bool', -\ 'ircg_set_on_die(': 'resource connection, string host, int port, string data | bool', -\ 'ircg_topic(': 'resource connection, string channel, string new_topic | bool', -\ 'ircg_who(': 'resource connection, string mask [, bool ops_only] | bool', -\ 'ircg_whois(': 'resource connection, string nick | bool', -\ 'is_a(': 'object object, string class_name | bool', -\ 'is_array(': 'mixed var | bool', -\ 'is_bool(': 'mixed var | bool', -\ 'is_callable(': 'mixed var [, bool syntax_only [, string &callable_name]] | bool', -\ 'is_dir(': 'string filename | bool', -\ 'is_executable(': 'string filename | bool', -\ 'is_file(': 'string filename | bool', -\ 'is_finite(': 'float val | bool', -\ 'is_float(': 'mixed var | bool', -\ 'is_infinite(': 'float val | bool', -\ 'is_int(': 'mixed var | bool', -\ 'is_link(': 'string filename | bool', -\ 'is_nan(': 'float val | bool', -\ 'is_null(': 'mixed var | bool', -\ 'is_numeric(': 'mixed var | bool', -\ 'is_object(': 'mixed var | bool', -\ 'is_readable(': 'string filename | bool', -\ 'is_resource(': 'mixed var | bool', -\ 'is_scalar(': 'mixed var | bool', -\ 'isset(': 'mixed var [, mixed var [, ...]] | bool', -\ 'is_soap_fault(': 'mixed obj | bool', -\ 'is_string(': 'mixed var | bool', -\ 'is_subclass_of(': 'mixed object, string class_name | bool', -\ 'is_uploaded_file(': 'string filename | bool', -\ 'is_writable(': 'string filename | bool', -\ 'iterator_count(': 'IteratorAggregate iterator | int', -\ 'iterator_to_array(': 'IteratorAggregate iterator | array', -\ 'java_last_exception_clear(': 'void | void', -\ 'java_last_exception_get(': 'void | object', -\ 'jddayofweek(': 'int julianday [, int mode] | mixed', -\ 'jdmonthname(': 'int julianday, int mode | string', -\ 'jdtofrench(': 'int juliandaycount | string', -\ 'jdtogregorian(': 'int julianday | string', -\ 'jdtojewish(': 'int juliandaycount [, bool hebrew [, int fl]] | string', -\ 'jdtojulian(': 'int julianday | string', -\ 'jdtounix(': 'int jday | int', -\ 'jewishtojd(': 'int month, int day, int year | int', -\ 'jpeg2wbmp(': 'string jpegname, string wbmpname, int d_height, int d_width, int threshold | int', -\ 'juliantojd(': 'int month, int day, int year | int', -\ 'kadm5_chpass_principal(': 'resource handle, string principal, string password | bool', -\ 'kadm5_create_principal(': 'resource handle, string principal [, string password [, array options]] | bool', -\ 'kadm5_delete_principal(': 'resource handle, string principal | bool', -\ 'kadm5_destroy(': 'resource handle | bool', -\ 'kadm5_flush(': 'resource handle | bool', -\ 'kadm5_get_policies(': 'resource handle | array', -\ 'kadm5_get_principal(': 'resource handle, string principal | array', -\ 'kadm5_get_principals(': 'resource handle | array', -\ 'kadm5_init_with_password(': 'string admin_server, string realm, string principal, string password | resource', -\ 'kadm5_modify_principal(': 'resource handle, string principal, array options | bool', -\ 'key(': 'array &array | mixed', -\ 'krsort(': 'array &array [, int sort_flags] | bool', -\ 'ksort(': 'array &array [, int sort_flags] | bool', -\ 'lcg_value(': 'void | float', -\ 'ldap_8859_to_t61(': 'string value | string', -\ 'ldap_add(': 'resource link_identifier, string dn, array entry | bool', -\ 'ldap_bind(': 'resource link_identifier [, string bind_rdn [, string bind_password]] | bool', -\ 'ldap_compare(': 'resource link_identifier, string dn, string attribute, string value | mixed', -\ 'ldap_connect(': '[string hostname [, int port]] | resource', -\ 'ldap_count_entries(': 'resource link_identifier, resource result_identifier | int', -\ 'ldap_delete(': 'resource link_identifier, string dn | bool', -\ 'ldap_dn2ufn(': 'string dn | string', -\ 'ldap_err2str(': 'int errno | string', -\ 'ldap_errno(': 'resource link_identifier | int', -\ 'ldap_error(': 'resource link_identifier | string', -\ 'ldap_explode_dn(': 'string dn, int with_attrib | array', -\ 'ldap_first_attribute(': 'resource link_identifier, resource result_entry_identifier, int &ber_identifier | string', -\ 'ldap_first_entry(': 'resource link_identifier, resource result_identifier | resource', -\ 'ldap_first_reference(': 'resource link, resource result | resource', -\ 'ldap_free_result(': 'resource result_identifier | bool', -\ 'ldap_get_attributes(': 'resource link_identifier, resource result_entry_identifier | array', -\ 'ldap_get_dn(': 'resource link_identifier, resource result_entry_identifier | string', -\ 'ldap_get_entries(': 'resource link_identifier, resource result_identifier | array', -\ 'ldap_get_option(': 'resource link_identifier, int option, mixed &retval | bool', -\ 'ldap_get_values(': 'resource link_identifier, resource result_entry_identifier, string attribute | array', -\ 'ldap_get_values_len(': 'resource link_identifier, resource result_entry_identifier, string attribute | array', -\ 'ldap_list(': 'resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]] | resource', -\ 'ldap_mod_add(': 'resource link_identifier, string dn, array entry | bool', -\ 'ldap_mod_del(': 'resource link_identifier, string dn, array entry | bool', -\ 'ldap_modify(': 'resource link_identifier, string dn, array entry | bool', -\ 'ldap_mod_replace(': 'resource link_identifier, string dn, array entry | bool', -\ 'ldap_next_attribute(': 'resource link_identifier, resource result_entry_identifier, resource &ber_identifier | string', -\ 'ldap_next_entry(': 'resource link_identifier, resource result_entry_identifier | resource', -\ 'ldap_next_reference(': 'resource link, resource entry | resource', -\ 'ldap_parse_reference(': 'resource link, resource entry, array &referrals | bool', -\ 'ldap_parse_result(': 'resource link, resource result, int &errcode [, string &matcheddn [, string &errmsg [, array &referrals]]] | bool', -\ 'ldap_read(': 'resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]] | resource', -\ 'ldap_rename(': 'resource link_identifier, string dn, string newrdn, string newparent, bool deleteoldrdn | bool', -\ 'ldap_sasl_bind(': 'resource link [, string binddn [, string password [, string sasl_mech [, string sasl_realm [, string sasl_authz_id [, string props]]]]]] | bool', -\ 'ldap_search(': 'resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]] | resource', -\ 'ldap_set_option(': 'resource link_identifier, int option, mixed newval | bool', -\ 'ldap_set_rebind_proc(': 'resource link, callback callback | bool', -\ 'ldap_sort(': 'resource link, resource result, string sortfilter | bool', -\ 'ldap_start_tls(': 'resource link | bool', -\ 'ldap_t61_to_8859(': 'string value | string', -\ 'ldap_unbind(': 'resource link_identifier | bool', -\ 'levenshtein(': 'string str1, string str2 [, int cost_ins [, int cost_rep, int cost_del]] | int', -\ 'libxml_clear_errors(': 'void | void', -\ 'libxml_get_errors(': 'void | array', -\ 'libxml_get_last_error(': 'void | LibXMLError', -\ 'libxml_set_streams_context(': 'resource streams_context | void', -\ 'libxml_use_internal_errors(': '[bool use_errors] | bool', -\ 'link(': 'string target, string link | bool', -\ 'linkinfo(': 'string path | int', -\ 'list(': 'mixed varname, mixed ... | void', -\ 'localeconv(': 'void | array', -\ 'localtime(': '[int timestamp [, bool is_associative]] | array', -\ 'log10(': 'float arg | float', -\ 'log1p(': 'float number | float', -\ 'log(': 'float arg [, float base] | float', -\ 'long2ip(': 'int proper_address | string', -\ 'lstat(': 'string filename | array', -\ 'ltrim(': 'string str [, string charlist] | string', -\ 'lzf_compress(': 'string data | string', -\ 'lzf_decompress(': 'string data | string', -\ 'lzf_optimized_for(': 'void | int', -\ 'mail(': 'string to, string subject, string message [, string additional_headers [, string additional_parameters]] | bool', -\ 'mailparse_determine_best_xfer_encoding(': 'resource fp | string', -\ 'mailparse_msg_create(': 'void | resource', -\ 'mailparse_msg_extract_part_file(': 'resource rfc2045, string filename [, callback callbackfunc] | string', -\ 'mailparse_msg_extract_part(': 'resource rfc2045, string msgbody [, callback callbackfunc] | void', -\ 'mailparse_msg_free(': 'resource rfc2045buf | bool', -\ 'mailparse_msg_get_part_data(': 'resource rfc2045 | array', -\ 'mailparse_msg_get_part(': 'resource rfc2045, string mimesection | resource', -\ 'mailparse_msg_get_structure(': 'resource rfc2045 | array', -\ 'mailparse_msg_parse_file(': 'string filename | resource', -\ 'mailparse_msg_parse(': 'resource rfc2045buf, string data | bool', -\ 'mailparse_rfc822_parse_addresses(': 'string addresses | array', -\ 'mailparse_stream_encode(': 'resource sourcefp, resource destfp, string encoding | bool', -\ 'mailparse_uudecode_all(': 'resource fp | array', -\ 'maxdb_connect_errno(': 'void | int', -\ 'maxdb_connect_error(': 'void | string', -\ 'maxdb_debug(': 'string debug | void', -\ 'maxdb_disable_rpl_parse(': 'resource link | bool', -\ 'maxdb_dump_debug_info(': 'resource link | bool', -\ 'maxdb_embedded_connect(': '[string dbname] | resource', -\ 'maxdb_enable_reads_from_master(': 'resource link | bool', -\ 'maxdb_enable_rpl_parse(': 'resource link | bool', -\ 'maxdb_get_client_info(': 'void | string', -\ 'maxdb_get_client_version(': 'void | int', -\ 'maxdb_init(': 'void | resource', -\ 'maxdb_master_query(': 'resource link, string query | bool', -\ 'maxdb_more_results(': 'resource link | bool', -\ 'maxdb_next_result(': 'resource link | bool', -\ 'maxdb_report(': 'int flags | bool', -\ 'maxdb_rollback(': 'resource link | bool', -\ 'maxdb_rpl_parse_enabled(': 'resource link | int', -\ 'maxdb_rpl_probe(': 'resource link | bool', -\ 'maxdb_rpl_query_type(': 'resource link | int', -\ 'maxdb_select_db(': 'resource link, string dbname | bool', -\ 'maxdb_send_query(': 'resource link, string query | bool', -\ 'maxdb_server_end(': 'void | void', -\ 'maxdb_server_init(': '[array server [, array groups]] | bool', -\ 'maxdb_stmt_sqlstate(': 'resource stmt | string', -\ 'max(': 'number arg1, number arg2 [, number ...] | mixed', -\ 'mb_convert_case(': 'string str, int mode [, string encoding] | string', -\ 'mb_convert_encoding(': 'string str, string to_encoding [, mixed from_encoding] | string', -\ 'mb_convert_kana(': 'string str [, string option [, string encoding]] | string', -\ 'mb_convert_variables(': 'string to_encoding, mixed from_encoding, mixed &vars [, mixed &...] | string', -\ 'mb_decode_mimeheader(': 'string str | string', -\ 'mb_decode_numericentity(': 'string str, array convmap [, string encoding] | string', -\ 'mb_detect_encoding(': 'string str [, mixed encoding_list [, bool strict]] | string', -\ 'mb_detect_order(': '[mixed encoding_list] | mixed', -\ 'mb_encode_mimeheader(': 'string str [, string charset [, string transfer_encoding [, string linefeed]]] | string', -\ 'mb_encode_numericentity(': 'string str, array convmap [, string encoding] | string', -\ 'mb_ereg(': 'string pattern, string string [, array regs] | int', -\ 'mb_eregi(': 'string pattern, string string [, array regs] | int', -\ 'mb_eregi_replace(': 'string pattern, string replace, string string [, string option] | string', -\ 'mb_ereg_match(': 'string pattern, string string [, string option] | bool', -\ 'mb_ereg_replace(': 'string pattern, string replacement, string string [, string option] | string', -\ 'mb_ereg_search_getpos(': 'void | int', -\ 'mb_ereg_search_getregs(': 'void | array', -\ 'mb_ereg_search(': '[string pattern [, string option]] | bool', -\ 'mb_ereg_search_init(': 'string string [, string pattern [, string option]] | bool', -\ 'mb_ereg_search_pos(': '[string pattern [, string option]] | array', -\ 'mb_ereg_search_regs(': '[string pattern [, string option]] | array', -\ 'mb_ereg_search_setpos(': 'int position | bool', -\ 'mb_get_info(': '[string type] | mixed', -\ 'mb_http_input(': '[string type] | mixed', -\ 'mb_http_output(': '[string encoding] | mixed', -\ 'mb_internal_encoding(': '[string encoding] | mixed', -\ 'mb_language(': '[string language] | mixed', -\ 'mb_list_encodings(': 'void | array', -\ 'mb_output_handler(': 'string contents, int status | string', -\ 'mb_parse_str(': 'string encoded_string [, array &result] | bool', -\ 'mb_preferred_mime_name(': 'string encoding | string', -\ 'mb_regex_encoding(': '[string encoding] | mixed', -\ 'mb_regex_set_options(': '[string options] | string', -\ 'mb_send_mail(': 'string to, string subject, string message [, string additional_headers [, string additional_parameter]] | bool', -\ 'mb_split(': 'string pattern, string string [, int limit] | array', -\ 'mb_strcut(': 'string str, int start [, int length [, string encoding]] | string', -\ 'mb_strimwidth(': 'string str, int start, int width [, string trimmarker [, string encoding]] | string', -\ 'mb_strlen(': 'string str [, string encoding] | int', -\ 'mb_strpos(': 'string haystack, string needle [, int offset [, string encoding]] | int', -\ 'mb_strrpos(': 'string haystack, string needle [, string encoding] | int', -\ 'mb_strtolower(': 'string str [, string encoding] | string', -\ 'mb_strtoupper(': 'string str [, string encoding] | string', -\ 'mb_strwidth(': 'string str [, string encoding] | int', -\ 'mb_substitute_character(': '[mixed substrchar] | mixed', -\ 'mb_substr_count(': 'string haystack, string needle [, string encoding] | int', -\ 'mb_substr(': 'string str, int start [, int length [, string encoding]] | string', -\ 'mcal_append_event(': 'int mcal_stream | int', -\ 'mcal_close(': 'int mcal_stream [, int flags] | bool', -\ 'mcal_create_calendar(': 'int stream, string calendar | bool', -\ 'mcal_date_compare(': 'int a_year, int a_month, int a_day, int b_year, int b_month, int b_day | int', -\ 'mcal_date_valid(': 'int year, int month, int day | bool', -\ 'mcal_day_of_week(': 'int year, int month, int day | int', -\ 'mcal_day_of_year(': 'int year, int month, int day | int', -\ 'mcal_days_in_month(': 'int month, int leap_year | int', -\ 'mcal_delete_calendar(': 'int stream, string calendar | bool', -\ 'mcal_delete_event(': 'int mcal_stream, int event_id | bool', -\ 'mcal_event_add_attribute(': 'int stream, string attribute, string value | bool', -\ 'mcal_event_init(': 'int stream | void', -\ 'mcal_event_set_alarm(': 'int stream, int alarm | void', -\ 'mcal_event_set_category(': 'int stream, string category | void', -\ 'mcal_event_set_class(': 'int stream, int class | void', -\ 'mcal_event_set_description(': 'int stream, string description | void', -\ 'mcal_event_set_end(': 'int stream, int year, int month, int day [, int hour [, int min [, int sec]]] | void', -\ 'mcal_event_set_recur_daily(': 'int stream, int year, int month, int day, int interval | void', -\ 'mcal_event_set_recur_monthly_mday(': 'int stream, int year, int month, int day, int interval | void', -\ 'mcal_event_set_recur_monthly_wday(': 'int stream, int year, int month, int day, int interval | void', -\ 'mcal_event_set_recur_none(': 'int stream | void', -\ 'mcal_event_set_recur_weekly(': 'int stream, int year, int month, int day, int interval, int weekdays | void', -\ 'mcal_event_set_recur_yearly(': 'int stream, int year, int month, int day, int interval | void', -\ 'mcal_event_set_start(': 'int stream, int year, int month, int day [, int hour [, int min [, int sec]]] | void', -\ 'mcal_event_set_title(': 'int stream, string title | void', -\ 'mcal_expunge(': 'int stream | bool', -\ 'mcal_fetch_current_stream_event(': 'int stream | object', -\ 'mcal_fetch_event(': 'int mcal_stream, int event_id [, int options] | object', -\ 'mcal_is_leap_year(': 'int year | bool', -\ 'mcal_list_alarms(': 'int mcal_stream [, int begin_year, int begin_month, int begin_day, int end_year, int end_month, int end_day] | array', -\ 'mcal_list_events(': 'int mcal_stream [, int begin_year, int begin_month, int begin_day, int end_year, int end_month, int end_day] | array', -\ 'mcal_next_recurrence(': 'int stream, int weekstart, array next | object', -\ 'mcal_open(': 'string calendar, string username, string password [, int options] | int', -\ 'mcal_popen(': 'string calendar, string username, string password [, int options] | int', -\ 'mcal_rename_calendar(': 'int stream, string old_name, string new_name | bool', -\ 'mcal_reopen(': 'int mcal_stream, string calendar [, int options] | bool', -\ 'mcal_snooze(': 'int stream_id, int event_id | bool', -\ 'mcal_store_event(': 'int mcal_stream | int', -\ 'mcal_time_valid(': 'int hour, int minutes, int seconds | bool', -\ 'mcal_week_of_year(': 'int day, int month, int year | int', -\ 'm_checkstatus(': 'resource conn, int identifier | int', -\ 'm_completeauthorizations(': 'resource conn, int &array | int', -\ 'm_connect(': 'resource conn | int', -\ 'm_connectionerror(': 'resource conn | string', -\ 'mcrypt_cbc(': 'int cipher, string key, string data, int mode [, string iv] | string', -\ 'mcrypt_cfb(': 'int cipher, string key, string data, int mode, string iv | string', -\ 'mcrypt_create_iv(': 'int size [, int source] | string', -\ 'mcrypt_decrypt(': 'string cipher, string key, string data, string mode [, string iv] | string', -\ 'mcrypt_ecb(': 'int cipher, string key, string data, int mode | string', -\ 'mcrypt_enc_get_algorithms_name(': 'resource td | string', -\ 'mcrypt_enc_get_block_size(': 'resource td | int', -\ 'mcrypt_enc_get_iv_size(': 'resource td | int', -\ 'mcrypt_enc_get_key_size(': 'resource td | int', -\ 'mcrypt_enc_get_modes_name(': 'resource td | string', -\ 'mcrypt_enc_get_supported_key_sizes(': 'resource td | array', -\ 'mcrypt_enc_is_block_algorithm(': 'resource td | bool', -\ 'mcrypt_enc_is_block_algorithm_mode(': 'resource td | bool', -\ 'mcrypt_enc_is_block_mode(': 'resource td | bool', -\ 'mcrypt_encrypt(': 'string cipher, string key, string data, string mode [, string iv] | string', -\ 'mcrypt_enc_self_test(': 'resource td | int', -\ 'mcrypt_generic_deinit(': 'resource td | bool', -\ 'mcrypt_generic_end(': 'resource td | bool', -\ 'mcrypt_generic(': 'resource td, string data | string', -\ 'mcrypt_generic_init(': 'resource td, string key, string iv | int', -\ 'mcrypt_get_block_size(': 'int cipher | int', -\ 'mcrypt_get_cipher_name(': 'int cipher | string', -\ 'mcrypt_get_iv_size(': 'string cipher, string mode | int', -\ 'mcrypt_get_key_size(': 'int cipher | int', -\ 'mcrypt_list_algorithms(': '[string lib_dir] | array', -\ 'mcrypt_list_modes(': '[string lib_dir] | array', -\ 'mcrypt_module_close(': 'resource td | bool', -\ 'mcrypt_module_get_algo_block_size(': 'string algorithm [, string lib_dir] | int', -\ 'mcrypt_module_get_algo_key_size(': 'string algorithm [, string lib_dir] | int', -\ 'mcrypt_module_get_supported_key_sizes(': 'string algorithm [, string lib_dir] | array', -\ 'mcrypt_module_is_block_algorithm(': 'string algorithm [, string lib_dir] | bool', -\ 'mcrypt_module_is_block_algorithm_mode(': 'string mode [, string lib_dir] | bool', -\ 'mcrypt_module_is_block_mode(': 'string mode [, string lib_dir] | bool', -\ 'mcrypt_module_open(': 'string algorithm, string algorithm_directory, string mode, string mode_directory | resource', -\ 'mcrypt_module_self_test(': 'string algorithm [, string lib_dir] | bool', -\ 'mcrypt_ofb(': 'int cipher, string key, string data, int mode, string iv | string', -\ 'md5_file(': 'string filename [, bool raw_output] | string', -\ 'md5(': 'string str [, bool raw_output] | string', -\ 'mdecrypt_generic(': 'resource td, string data | string', -\ 'm_deletetrans(': 'resource conn, int identifier | bool', -\ 'm_destroyconn(': 'resource conn | bool', -\ 'm_destroyengine(': 'void | void', -\ 'memcache_debug(': 'bool on_off | bool', -\ 'memory_get_usage(': 'void | int', -\ 'metaphone(': 'string str [, int phones] | string', -\ 'method_exists(': 'object object, string method_name | bool', -\ 'm_getcellbynum(': 'resource conn, int identifier, int column, int row | string', -\ 'm_getcell(': 'resource conn, int identifier, string column, int row | string', -\ 'm_getcommadelimited(': 'resource conn, int identifier | string', -\ 'm_getheader(': 'resource conn, int identifier, int column_num | string', -\ 'mhash_count(': 'void | int', -\ 'mhash_get_block_size(': 'int hash | int', -\ 'mhash_get_hash_name(': 'int hash | string', -\ 'mhash(': 'int hash, string data [, string key] | string', -\ 'mhash_keygen_s2k(': 'int hash, string password, string salt, int bytes | string', -\ 'microtime(': '[bool get_as_float] | mixed', -\ 'mime_content_type(': 'string filename | string', -\ 'ming_keypress(': 'string str | int', -\ 'ming_setcubicthreshold(': 'int threshold | void', -\ 'ming_setscale(': 'int scale | void', -\ 'ming_useConstants(': 'int use | void', -\ 'ming_useswfversion(': 'int version | void', -\ 'min(': 'number arg1, number arg2 [, number ...] | mixed', -\ 'm_initconn(': 'void | resource', -\ 'm_initengine(': 'string location | int', -\ 'm_iscommadelimited(': 'resource conn, int identifier | int', -\ 'mkdir(': 'string pathname [, int mode [, bool recursive [, resource context]]] | bool', -\ 'mktime(': '[int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] | int', -\ 'm_maxconntimeout(': 'resource conn, int secs | bool', -\ 'm_monitor(': 'resource conn | int', -\ 'm_numcolumns(': 'resource conn, int identifier | int', -\ 'm_numrows(': 'resource conn, int identifier | int', -\ 'money_format(': 'string format, float number | string', -\ 'move_uploaded_file(': 'string filename, string destination | bool', -\ 'm_parsecommadelimited(': 'resource conn, int identifier | int', -\ 'm_responsekeys(': 'resource conn, int identifier | array', -\ 'm_responseparam(': 'resource conn, int identifier, string key | string', -\ 'm_returnstatus(': 'resource conn, int identifier | int', -\ 'msession_connect(': 'string host, string port | bool', -\ 'msession_count(': 'void | int', -\ 'msession_create(': 'string session | bool', -\ 'msession_destroy(': 'string name | bool', -\ 'msession_disconnect(': 'void | void', -\ 'msession_find(': 'string name, string value | array', -\ 'msession_get_array(': 'string session | array', -\ 'msession_get_data(': 'string session | string', -\ 'msession_get(': 'string session, string name, string value | string', -\ 'msession_inc(': 'string session, string name | string', -\ 'msession_list(': 'void | array', -\ 'msession_listvar(': 'string name | array', -\ 'msession_lock(': 'string name | int', -\ 'msession_plugin(': 'string session, string val [, string param] | string', -\ 'msession_randstr(': 'int param | string', -\ 'msession_set_array(': 'string session, array tuples | void', -\ 'msession_set_data(': 'string session, string value | bool', -\ 'msession_set(': 'string session, string name, string value | bool', -\ 'msession_timeout(': 'string session [, int param] | int', -\ 'msession_uniq(': 'int param | string', -\ 'msession_unlock(': 'string session, int key | int', -\ 'm_setblocking(': 'resource conn, int tf | int', -\ 'm_setdropfile(': 'resource conn, string directory | int', -\ 'm_setip(': 'resource conn, string host, int port | int', -\ 'm_setssl_cafile(': 'resource conn, string cafile | int', -\ 'm_setssl_files(': 'resource conn, string sslkeyfile, string sslcertfile | int', -\ 'm_setssl(': 'resource conn, string host, int port | int', -\ 'm_settimeout(': 'resource conn, int seconds | int', -\ 'msg_get_queue(': 'int key [, int perms] | resource', -\ 'msg_receive(': 'resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed &message [, bool unserialize [, int flags [, int &errorcode]]] | bool', -\ 'msg_remove_queue(': 'resource queue | bool', -\ 'msg_send(': 'resource queue, int msgtype, mixed message [, bool serialize [, bool blocking [, int &errorcode]]] | bool', -\ 'msg_set_queue(': 'resource queue, array data | bool', -\ 'msg_stat_queue(': 'resource queue | array', -\ 'msql_affected_rows(': 'resource result | int', -\ 'msql_close(': '[resource link_identifier] | bool', -\ 'msql_connect(': '[string hostname] | resource', -\ 'msql_create_db(': 'string database_name [, resource link_identifier] | bool', -\ 'msql_data_seek(': 'resource result, int row_number | bool', -\ 'msql_db_query(': 'string database, string query [, resource link_identifier] | resource', -\ 'msql_drop_db(': 'string database_name [, resource link_identifier] | bool', -\ 'msql_error(': 'void | string', -\ 'msql_fetch_array(': 'resource result [, int result_type] | array', -\ 'msql_fetch_field(': 'resource result [, int field_offset] | object', -\ 'msql_fetch_object(': 'resource result | object', -\ 'msql_fetch_row(': 'resource result | array', -\ 'msql_field_flags(': 'resource result, int field_offset | string', -\ 'msql_field_len(': 'resource result, int field_offset | int', -\ 'msql_field_name(': 'resource result, int field_offset | string', -\ 'msql_field_seek(': 'resource result, int field_offset | bool', -\ 'msql_field_table(': 'resource result, int field_offset | int', -\ 'msql_field_type(': 'resource result, int field_offset | string', -\ 'msql_free_result(': 'resource result | bool', -\ 'msql_list_dbs(': '[resource link_identifier] | resource', -\ 'msql_list_fields(': 'string database, string tablename [, resource link_identifier] | resource', -\ 'msql_list_tables(': 'string database [, resource link_identifier] | resource', -\ 'msql_num_fields(': 'resource result | int', -\ 'msql_num_rows(': 'resource query_identifier | int', -\ 'msql_pconnect(': '[string hostname] | resource', -\ 'msql_query(': 'string query [, resource link_identifier] | resource', -\ 'msql_result(': 'resource result, int row [, mixed field] | string', -\ 'msql_select_db(': 'string database_name [, resource link_identifier] | bool', -\ 'm_sslcert_gen_hash(': 'string filename | string', -\ 'mssql_bind(': 'resource stmt, string param_name, mixed &var, int type [, int is_output [, int is_null [, int maxlen]]] | bool', -\ 'mssql_close(': '[resource link_identifier] | bool', -\ 'mssql_connect(': '[string servername [, string username [, string password]]] | resource', -\ 'mssql_data_seek(': 'resource result_identifier, int row_number | bool', -\ 'mssql_execute(': 'resource stmt [, bool skip_results] | mixed', -\ 'mssql_fetch_array(': 'resource result [, int result_type] | array', -\ 'mssql_fetch_assoc(': 'resource result_id | array', -\ 'mssql_fetch_batch(': 'resource result_index | int', -\ 'mssql_fetch_field(': 'resource result [, int field_offset] | object', -\ 'mssql_fetch_object(': 'resource result | object', -\ 'mssql_fetch_row(': 'resource result | array', -\ 'mssql_field_length(': 'resource result [, int offset] | int', -\ 'mssql_field_name(': 'resource result [, int offset] | string', -\ 'mssql_field_seek(': 'resource result, int field_offset | bool', -\ 'mssql_field_type(': 'resource result [, int offset] | string', -\ 'mssql_free_result(': 'resource result | bool', -\ 'mssql_free_statement(': 'resource statement | bool', -\ 'mssql_get_last_message(': 'void | string', -\ 'mssql_guid_string(': 'string binary [, int short_format] | string', -\ 'mssql_init(': 'string sp_name [, resource conn_id] | resource', -\ 'mssql_min_error_severity(': 'int severity | void', -\ 'mssql_min_message_severity(': 'int severity | void', -\ 'mssql_next_result(': 'resource result_id | bool', -\ 'mssql_num_fields(': 'resource result | int', -\ 'mssql_num_rows(': 'resource result | int', -\ 'mssql_pconnect(': '[string servername [, string username [, string password]]] | resource', -\ 'mssql_query(': 'string query [, resource link_identifier [, int batch_size]] | mixed', -\ 'mssql_result(': 'resource result, int row, mixed field | string', -\ 'mssql_rows_affected(': 'resource conn_id | int', -\ 'mssql_select_db(': 'string database_name [, resource link_identifier] | bool', -\ 'mt_getrandmax(': 'void | int', -\ 'mt_rand(': '[int min, int max] | int', -\ 'm_transactionssent(': 'resource conn | int', -\ 'm_transinqueue(': 'resource conn | int', -\ 'm_transkeyval(': 'resource conn, int identifier, string key, string value | int', -\ 'm_transnew(': 'resource conn | int', -\ 'm_transsend(': 'resource conn, int identifier | int', -\ 'mt_srand(': '[int seed] | void', -\ 'muscat_close(': 'resource muscat_handle | void', -\ 'muscat_get(': 'resource muscat_handle | string', -\ 'muscat_give(': 'resource muscat_handle, string string | void', -\ 'muscat_setup(': 'int size [, string muscat_dir] | resource', -\ 'muscat_setup_net(': 'string muscat_host | resource', -\ 'm_uwait(': 'int microsecs | int', -\ 'm_validateidentifier(': 'resource conn, int tf | int', -\ 'm_verifyconnection(': 'resource conn, int tf | bool', -\ 'm_verifysslcert(': 'resource conn, int tf | bool', -\ 'mysql_affected_rows(': '[resource link_identifier] | int', -\ 'mysql_change_user(': 'string user, string password [, string database [, resource link_identifier]] | int', -\ 'mysql_client_encoding(': '[resource link_identifier] | string', -\ 'mysql_close(': '[resource link_identifier] | bool', -\ 'mysql_connect(': '[string server [, string username [, string password [, bool new_link [, int client_flags]]]]] | resource', -\ 'mysql_create_db(': 'string database_name [, resource link_identifier] | bool', -\ 'mysql_data_seek(': 'resource result, int row_number | bool', -\ 'mysql_db_name(': 'resource result, int row [, mixed field] | string', -\ 'mysql_db_query(': 'string database, string query [, resource link_identifier] | resource', -\ 'mysql_drop_db(': 'string database_name [, resource link_identifier] | bool', -\ 'mysql_errno(': '[resource link_identifier] | int', -\ 'mysql_error(': '[resource link_identifier] | string', -\ 'mysql_escape_string(': 'string unescaped_string | string', -\ 'mysql_fetch_array(': 'resource result [, int result_type] | array', -\ 'mysql_fetch_assoc(': 'resource result | array', -\ 'mysql_fetch_field(': 'resource result [, int field_offset] | object', -\ 'mysql_fetch_lengths(': 'resource result | array', -\ 'mysql_fetch_object(': 'resource result | object', -\ 'mysql_fetch_row(': 'resource result | array', -\ 'mysql_field_flags(': 'resource result, int field_offset | string', -\ 'mysql_field_len(': 'resource result, int field_offset | int', -\ 'mysql_field_name(': 'resource result, int field_offset | string', -\ 'mysql_field_seek(': 'resource result, int field_offset | bool', -\ 'mysql_field_table(': 'resource result, int field_offset | string', -\ 'mysql_field_type(': 'resource result, int field_offset | string', -\ 'mysql_free_result(': 'resource result | bool', -\ 'mysql_get_client_info(': 'void | string', -\ 'mysql_get_host_info(': '[resource link_identifier] | string', -\ 'mysql_get_proto_info(': '[resource link_identifier] | int', -\ 'mysql_get_server_info(': '[resource link_identifier] | string', -\ 'mysqli_connect_errno(': 'void | int', -\ 'mysqli_connect_error(': 'void | string', -\ 'mysqli_debug(': 'string debug | bool', -\ 'mysqli_disable_rpl_parse(': 'mysqli link | bool', -\ 'mysqli_dump_debug_info(': 'mysqli link | bool', -\ 'mysqli_embedded_connect(': '[string dbname] | mysqli', -\ 'mysqli_enable_reads_from_master(': 'mysqli link | bool', -\ 'mysqli_enable_rpl_parse(': 'mysqli link | bool', -\ 'mysqli_get_client_info(': 'void | string', -\ 'mysqli_get_client_version(': 'void | int', -\ 'mysqli_init(': 'void | mysqli', -\ 'mysqli_master_query(': 'mysqli link, string query | bool', -\ 'mysqli_more_results(': 'mysqli link | bool', -\ 'mysqli_next_result(': 'mysqli link | bool', -\ 'mysql_info(': '[resource link_identifier] | string', -\ 'mysql_insert_id(': '[resource link_identifier] | int', -\ 'mysqli_report(': 'int flags | bool', -\ 'mysqli_rollback(': 'mysqli link | bool', -\ 'mysqli_rpl_parse_enabled(': 'mysqli link | int', -\ 'mysqli_rpl_probe(': 'mysqli link | bool', -\ 'mysqli_select_db(': 'mysqli link, string dbname | bool', -\ 'mysqli_server_end(': 'void | void', -\ 'mysqli_server_init(': '[array server [, array groups]] | bool', -\ 'mysqli_set_charset(': 'mysqli link, string charset | bool', -\ 'mysqli_stmt_sqlstate(': 'mysqli_stmt stmt | string', -\ 'mysql_list_dbs(': '[resource link_identifier] | resource', -\ 'mysql_list_fields(': 'string database_name, string table_name [, resource link_identifier] | resource', -\ 'mysql_list_processes(': '[resource link_identifier] | resource', -\ 'mysql_list_tables(': 'string database [, resource link_identifier] | resource', -\ 'mysql_num_fields(': 'resource result | int', -\ 'mysql_num_rows(': 'resource result | int', -\ 'mysql_pconnect(': '[string server [, string username [, string password [, int client_flags]]]] | resource', -\ 'mysql_ping(': '[resource link_identifier] | bool', -\ 'mysql_query(': 'string query [, resource link_identifier] | resource', -\ 'mysql_real_escape_string(': 'string unescaped_string [, resource link_identifier] | string', -\ 'mysql_result(': 'resource result, int row [, mixed field] | string', -\ 'mysql_select_db(': 'string database_name [, resource link_identifier] | bool', -\ 'mysql_stat(': '[resource link_identifier] | string', -\ 'mysql_tablename(': 'resource result, int i | string', -\ 'mysql_thread_id(': '[resource link_identifier] | int', -\ 'mysql_unbuffered_query(': 'string query [, resource link_identifier] | resource', -\ 'natcasesort(': 'array &array | bool', -\ 'natsort(': 'array &array | bool', -\ 'ncurses_addch(': 'int ch | int', -\ 'ncurses_addchnstr(': 'string s, int n | int', -\ 'ncurses_addchstr(': 'string s | int', -\ 'ncurses_addnstr(': 'string s, int n | int', -\ 'ncurses_addstr(': 'string text | int', -\ 'ncurses_assume_default_colors(': 'int fg, int bg | int', -\ 'ncurses_attroff(': 'int attributes | int', -\ 'ncurses_attron(': 'int attributes | int', -\ 'ncurses_attrset(': 'int attributes | int', -\ 'ncurses_baudrate(': 'void | int', -\ 'ncurses_beep(': 'void | int', -\ 'ncurses_bkgd(': 'int attrchar | int', -\ 'ncurses_bkgdset(': 'int attrchar | void', -\ 'ncurses_border(': 'int left, int right, int top, int bottom, int tl_corner, int tr_corner, int bl_corner, int br_corner | int', -\ 'ncurses_bottom_panel(': 'resource panel | int', -\ 'ncurses_can_change_color(': 'void | bool', -\ 'ncurses_cbreak(': 'void | bool', -\ 'ncurses_clear(': 'void | bool', -\ 'ncurses_clrtobot(': 'void | bool', -\ 'ncurses_clrtoeol(': 'void | bool', -\ 'ncurses_color_content(': 'int color, int &r, int &g, int &b | int', -\ 'ncurses_color_set(': 'int pair | int', -\ 'ncurses_curs_set(': 'int visibility | int', -\ 'ncurses_define_key(': 'string definition, int keycode | int', -\ 'ncurses_def_prog_mode(': 'void | bool', -\ 'ncurses_def_shell_mode(': 'void | bool', -\ 'ncurses_delay_output(': 'int milliseconds | int', -\ 'ncurses_delch(': 'void | bool', -\ 'ncurses_deleteln(': 'void | bool', -\ 'ncurses_del_panel(': 'resource panel | bool', -\ 'ncurses_delwin(': 'resource window | bool', -\ 'ncurses_doupdate(': 'void | bool', -\ 'ncurses_echochar(': 'int character | int', -\ 'ncurses_echo(': 'void | bool', -\ 'ncurses_end(': 'void | int', -\ 'ncurses_erasechar(': 'void | string', -\ 'ncurses_erase(': 'void | bool', -\ 'ncurses_filter(': 'void | void', -\ 'ncurses_flash(': 'void | bool', -\ 'ncurses_flushinp(': 'void | bool', -\ 'ncurses_getch(': 'void | int', -\ 'ncurses_getmaxyx(': 'resource window, int &y, int &x | void', -\ 'ncurses_getmouse(': 'array &mevent | bool', -\ 'ncurses_getyx(': 'resource window, int &y, int &x | void', -\ 'ncurses_halfdelay(': 'int tenth | int', -\ 'ncurses_has_colors(': 'void | bool', -\ 'ncurses_has_ic(': 'void | bool', -\ 'ncurses_has_il(': 'void | bool', -\ 'ncurses_has_key(': 'int keycode | int', -\ 'ncurses_hide_panel(': 'resource panel | int', -\ 'ncurses_hline(': 'int charattr, int n | int', -\ 'ncurses_inch(': 'void | string', -\ 'ncurses_init_color(': 'int color, int r, int g, int b | int', -\ 'ncurses_init(': 'void | void', -\ 'ncurses_init_pair(': 'int pair, int fg, int bg | int', -\ 'ncurses_insch(': 'int character | int', -\ 'ncurses_insdelln(': 'int count | int', -\ 'ncurses_insertln(': 'void | bool', -\ 'ncurses_insstr(': 'string text | int', -\ 'ncurses_instr(': 'string &buffer | int', -\ 'ncurses_isendwin(': 'void | bool', -\ 'ncurses_keyok(': 'int keycode, bool enable | int', -\ 'ncurses_keypad(': 'resource window, bool bf | int', -\ 'ncurses_killchar(': 'void | string', -\ 'ncurses_longname(': 'void | string', -\ 'ncurses_meta(': 'resource window, bool 8bit | int', -\ 'ncurses_mouseinterval(': 'int milliseconds | int', -\ 'ncurses_mousemask(': 'int newmask, int &oldmask | int', -\ 'ncurses_mouse_trafo(': 'int &y, int &x, bool toscreen | bool', -\ 'ncurses_move(': 'int y, int x | int', -\ 'ncurses_move_panel(': 'resource panel, int startx, int starty | int', -\ 'ncurses_mvaddch(': 'int y, int x, int c | int', -\ 'ncurses_mvaddchnstr(': 'int y, int x, string s, int n | int', -\ 'ncurses_mvaddchstr(': 'int y, int x, string s | int', -\ 'ncurses_mvaddnstr(': 'int y, int x, string s, int n | int', -\ 'ncurses_mvaddstr(': 'int y, int x, string s | int', -\ 'ncurses_mvcur(': 'int old_y, int old_x, int new_y, int new_x | int', -\ 'ncurses_mvdelch(': 'int y, int x | int', -\ 'ncurses_mvgetch(': 'int y, int x | int', -\ 'ncurses_mvhline(': 'int y, int x, int attrchar, int n | int', -\ 'ncurses_mvinch(': 'int y, int x | int', -\ 'ncurses_mvvline(': 'int y, int x, int attrchar, int n | int', -\ 'ncurses_mvwaddstr(': 'resource window, int y, int x, string text | int', -\ 'ncurses_napms(': 'int milliseconds | int', -\ 'ncurses_newpad(': 'int rows, int cols | resource', -\ 'ncurses_new_panel(': 'resource window | resource', -\ 'ncurses_newwin(': 'int rows, int cols, int y, int x | resource', -\ 'ncurses_nl(': 'void | bool', -\ 'ncurses_nocbreak(': 'void | bool', -\ 'ncurses_noecho(': 'void | bool', -\ 'ncurses_nonl(': 'void | bool', -\ 'ncurses_noqiflush(': 'void | void', -\ 'ncurses_noraw(': 'void | bool', -\ 'ncurses_pair_content(': 'int pair, int &f, int &b | int', -\ 'ncurses_panel_above(': 'resource panel | resource', -\ 'ncurses_panel_below(': 'resource panel | resource', -\ 'ncurses_panel_window(': 'resource panel | resource', -\ 'ncurses_pnoutrefresh(': 'resource pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol | int', -\ 'ncurses_prefresh(': 'resource pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol | int', -\ 'ncurses_putp(': 'string text | int', -\ 'ncurses_qiflush(': 'void | void', -\ 'ncurses_raw(': 'void | bool', -\ 'ncurses_refresh(': 'int ch | int', -\ 'ncurses_replace_panel(': 'resource panel, resource window | int', -\ 'ncurses_reset_prog_mode(': 'void | int', -\ 'ncurses_reset_shell_mode(': 'void | int', -\ 'ncurses_resetty(': 'void | bool', -\ 'ncurses_savetty(': 'void | bool', -\ 'ncurses_scr_dump(': 'string filename | int', -\ 'ncurses_scr_init(': 'string filename | int', -\ 'ncurses_scrl(': 'int count | int', -\ 'ncurses_scr_restore(': 'string filename | int', -\ 'ncurses_scr_set(': 'string filename | int', -\ 'ncurses_show_panel(': 'resource panel | int', -\ 'ncurses_slk_attr(': 'void | bool', -\ 'ncurses_slk_attroff(': 'int intarg | int', -\ 'ncurses_slk_attron(': 'int intarg | int', -\ 'ncurses_slk_attrset(': 'int intarg | int', -\ 'ncurses_slk_clear(': 'void | bool', -\ 'ncurses_slk_color(': 'int intarg | int', -\ 'ncurses_slk_init(': 'int format | bool', -\ 'ncurses_slk_noutrefresh(': 'void | bool', -\ 'ncurses_slk_refresh(': 'void | bool', -\ 'ncurses_slk_restore(': 'void | bool', -\ 'ncurses_slk_set(': 'int labelnr, string label, int format | bool', -\ 'ncurses_slk_touch(': 'void | bool', -\ 'ncurses_standend(': 'void | int', -\ 'ncurses_standout(': 'void | int', -\ 'ncurses_start_color(': 'void | int', -\ 'ncurses_termattrs(': 'void | bool', -\ 'ncurses_termname(': 'void | string', -\ 'ncurses_timeout(': 'int millisec | void', -\ 'ncurses_top_panel(': 'resource panel | int', -\ 'ncurses_typeahead(': 'int fd | int', -\ 'ncurses_ungetch(': 'int keycode | int', -\ 'ncurses_ungetmouse(': 'array mevent | bool', -\ 'ncurses_update_panels(': 'void | void', -\ 'ncurses_use_default_colors(': 'void | bool', -\ 'ncurses_use_env(': 'bool flag | void', -\ 'ncurses_use_extended_names(': 'bool flag | int', -\ 'ncurses_vidattr(': 'int intarg | int', -\ 'ncurses_vline(': 'int charattr, int n | int', -\ 'ncurses_waddch(': 'resource window, int ch | int', -\ 'ncurses_waddstr(': 'resource window, string str [, int n] | int', -\ 'ncurses_wattroff(': 'resource window, int attrs | int', -\ 'ncurses_wattron(': 'resource window, int attrs | int', -\ 'ncurses_wattrset(': 'resource window, int attrs | int', -\ 'ncurses_wborder(': 'resource window, int left, int right, int top, int bottom, int tl_corner, int tr_corner, int bl_corner, int br_corner | int', -\ 'ncurses_wclear(': 'resource window | int', -\ 'ncurses_wcolor_set(': 'resource window, int color_pair | int', -\ 'ncurses_werase(': 'resource window | int', -\ 'ncurses_wgetch(': 'resource window | int', -\ 'ncurses_whline(': 'resource window, int charattr, int n | int', -\ 'ncurses_wmouse_trafo(': 'resource window, int &y, int &x, bool toscreen | bool', -\ 'ncurses_wmove(': 'resource window, int y, int x | int', -\ 'ncurses_wnoutrefresh(': 'resource window | int', -\ 'ncurses_wrefresh(': 'resource window | int', -\ 'ncurses_wstandend(': 'resource window | int', -\ 'ncurses_wstandout(': 'resource window | int', -\ 'ncurses_wvline(': 'resource window, int charattr, int n | int', -\ 'newt_bell(': 'void | void', -\ 'newt_button_bar(': 'array &buttons | resource', -\ 'newt_button(': 'int left, int top, string text | resource', -\ 'newt_centered_window(': 'int width, int height [, string title] | int', -\ 'newt_checkbox_get_value(': 'resource checkbox | string', -\ 'newt_checkbox(': 'int left, int top, string text, string def_value [, string seq] | resource', -\ 'newt_checkbox_set_flags(': 'resource checkbox, int flags, int sense | void', -\ 'newt_checkbox_set_value(': 'resource checkbox, string value | void', -\ 'newt_checkbox_tree_add_item(': 'resource checkboxtree, string text, mixed data, int flags, int index [, int ...] | void', -\ 'newt_checkbox_tree_find_item(': 'resource checkboxtree, mixed data | array', -\ 'newt_checkbox_tree_get_current(': 'resource checkboxtree | mixed', -\ 'newt_checkbox_tree_get_entry_value(': 'resource checkboxtree, mixed data | string', -\ 'newt_checkbox_tree_get_multi_selection(': 'resource checkboxtree, string seqnum | array', -\ 'newt_checkbox_tree_get_selection(': 'resource checkboxtree | array', -\ 'newt_checkbox_tree(': 'int left, int top, int height [, int flags] | resource', -\ 'newt_checkbox_tree_multi(': 'int left, int top, int height, string seq [, int flags] | resource', -\ 'newt_checkbox_tree_set_current(': 'resource checkboxtree, mixed data | void', -\ 'newt_checkbox_tree_set_entry(': 'resource checkboxtree, mixed data, string text | void', -\ 'newt_checkbox_tree_set_entry_value(': 'resource checkboxtree, mixed data, string value | void', -\ 'newt_checkbox_tree_set_width(': 'resource checkbox_tree, int width | void', -\ 'newt_clear_key_buffer(': 'void | void', -\ 'newt_cls(': 'void | void', -\ 'newt_compact_button(': 'int left, int top, string text | resource', -\ 'newt_component_add_callback(': 'resource component, mixed func_name, mixed data | void', -\ 'newt_component_takes_focus(': 'resource component, bool takes_focus | void', -\ 'newt_create_grid(': 'int cols, int rows | resource', -\ 'newt_cursor_off(': 'void | void', -\ 'newt_cursor_on(': 'void | void', -\ 'newt_delay(': 'int microseconds | void', -\ 'newt_draw_form(': 'resource form | void', -\ 'newt_draw_root_text(': 'int left, int top, string text | void', -\ 'newt_entry_get_value(': 'resource entry | string', -\ 'newt_entry(': 'int left, int top, int width [, string init_value [, int flags]] | resource', -\ 'newt_entry_set_filter(': 'resource entry, callback filter, mixed data | void', -\ 'newt_entry_set_flags(': 'resource entry, int flags, int sense | void', -\ 'newt_entry_set(': 'resource entry, string value [, bool cursor_at_end] | void', -\ 'newt_finished(': 'void | int', -\ 'newt_form_add_component(': 'resource form, resource component | void', -\ 'newt_form_add_components(': 'resource form, array components | void', -\ 'newt_form_add_host_key(': 'resource form, int key | void', -\ 'newt_form_destroy(': 'resource form | void', -\ 'newt_form_get_current(': 'resource form | resource', -\ 'newt_form(': '[resource vert_bar [, string help [, int flags]]] | resource', -\ 'newt_form_run(': 'resource form, array &exit_struct | void', -\ 'newt_form_set_background(': 'resource from, int background | void', -\ 'newt_form_set_height(': 'resource form, int height | void', -\ 'newt_form_set_size(': 'resource form | void', -\ 'newt_form_set_timer(': 'resource form, int milliseconds | void', -\ 'newt_form_set_width(': 'resource form, int width | void', -\ 'newt_form_watch_fd(': 'resource form, resource stream [, int flags] | void', -\ 'newt_get_screen_size(': 'int &cols, int &rows | void', -\ 'newt_grid_add_components_to_form(': 'resource grid, resource form, bool recurse | void', -\ 'newt_grid_basic_window(': 'resource text, resource middle, resource buttons | resource', -\ 'newt_grid_free(': 'resource grid, bool recurse | void', -\ 'newt_grid_get_size(': 'resouce grid, int &width, int &height | void', -\ 'newt_grid_h_close_stacked(': 'int element1_type, resource element1 [, int ... [, resource ...]] | resource', -\ 'newt_grid_h_stacked(': 'int element1_type, resource element1 [, int ... [, resource ...]] | resource', -\ 'newt_grid_place(': 'resource grid, int left, int top | void', -\ 'newt_grid_set_field(': 'resource grid, int col, int row, int type, resource val, int pad_left, int pad_top, int pad_right, int pad_bottom, int anchor [, int flags] | void', -\ 'newt_grid_simple_window(': 'resource text, resource middle, resource buttons | resource', -\ 'newt_grid_v_close_stacked(': 'int element1_type, resource element1 [, int ... [, resource ...]] | resource', -\ 'newt_grid_v_stacked(': 'int element1_type, resource element1 [, int ... [, resource ...]] | resource', -\ 'newt_grid_wrapped_window_at(': 'resource grid, string title, int left, int top | void', -\ 'newt_grid_wrapped_window(': 'resource grid, string title | void', -\ 'newt_init(': 'void | int', -\ 'newt_label(': 'int left, int top, string text | resource', -\ 'newt_label_set_text(': 'resource label, string text | void', -\ 'newt_listbox_append_entry(': 'resource listbox, string text, mixed data | void', -\ 'newt_listbox_clear(': 'resource listobx | void', -\ 'newt_listbox_clear_selection(': 'resource listbox | void', -\ 'newt_listbox_delete_entry(': 'resource listbox, mixed key | void', -\ 'newt_listbox_get_current(': 'resource listbox | string', -\ 'newt_listbox_get_selection(': 'resource listbox | array', -\ 'newt_listbox(': 'int left, int top, int height [, int flags] | resource', -\ 'newt_listbox_insert_entry(': 'resource listbox, string text, mixed data, mixed key | void', -\ 'newt_listbox_item_count(': 'resource listbox | int', -\ 'newt_listbox_select_item(': 'resource listbox, mixed key, int sense | void', -\ 'newt_listbox_set_current_by_key(': 'resource listbox, mixed key | void', -\ 'newt_listbox_set_current(': 'resource listbox, int num | void', -\ 'newt_listbox_set_data(': 'resource listbox, int num, mixed data | void', -\ 'newt_listbox_set_entry(': 'resource listbox, int num, string text | void', -\ 'newt_listbox_set_width(': 'resource listbox, int width | void', -\ 'newt_listitem_get_data(': 'resource item | mixed', -\ 'newt_listitem(': 'int left, int top, string text, bool is_default, resouce prev_item, mixed data [, int flags] | resource', -\ 'newt_listitem_set(': 'resource item, string text | void', -\ 'newt_open_window(': 'int left, int top, int width, int height [, string title] | int', -\ 'newt_pop_help_line(': 'void | void', -\ 'newt_pop_window(': 'void | void', -\ 'newt_push_help_line(': '[string text] | void', -\ 'newt_radiobutton(': 'int left, int top, string text, bool is_default [, resource prev_button] | resource', -\ 'newt_radio_get_current(': 'resource set_member | resource', -\ 'newt_redraw_help_line(': 'void | void', -\ 'newt_reflow_text(': 'string text, int width, int flex_down, int flex_up, int &actual_width, int &actual_height | string', -\ 'newt_refresh(': 'void | void', -\ 'newt_resize_screen(': '[bool redraw] | void', -\ 'newt_resume(': 'void | void', -\ 'newt_run_form(': 'resource form | resource', -\ 'newt_scale(': 'int left, int top, int width, int full_value | resource', -\ 'newt_scale_set(': 'resource scale, int amount | void', -\ 'newt_scrollbar_set(': 'resource scrollbar, int where, int total | void', -\ 'newt_set_help_callback(': 'mixed function | void', -\ 'newt_set_suspend_callback(': 'callback function, mixed data | void', -\ 'newt_suspend(': 'void | void', -\ 'newt_texbox_set_text(': 'resource textbox, string text | void', -\ 'newt_textbox_get_num_lines(': 'resource textbox | int', -\ 'newt_textbox(': 'int left, int top, int width, int height [, int flags] | resource', -\ 'newt_textbox_reflowed(': 'int left, int top, char *text, int width, int flex_down, int flex_up [, int flags] | resource', -\ 'newt_textbox_set_height(': 'resource textbox, int height | void', -\ 'newt_vertical_scrollbar(': 'int left, int top, int height [, int normal_colorset [, int thumb_colorset]] | resource', -\ 'newt_wait_for_key(': 'void | void', -\ 'newt_win_choice(': 'string title, string button1_text, string button2_text, string format [, mixed args [, mixed ...]] | int', -\ 'newt_win_entries(': 'string title, string text, int suggested_width, int flex_down, int flex_up, int data_width, array &items, string button1 [, string ...] | int', -\ 'newt_win_menu(': 'string title, string text, int suggestedWidth, int flexDown, int flexUp, int maxListHeight, array items, int &listItem [, string button1 [, string ...]] | int', -\ 'newt_win_message(': 'string title, string button_text, string format [, mixed args [, mixed ...]] | void', -\ 'newt_win_messagev(': 'string title, string button_text, string format, array args | void', -\ 'newt_win_ternary(': 'string title, string button1_text, string button2_text, string button3_text, string format [, mixed args [, mixed ...]] | int', -\ 'next(': 'array &array | mixed', -\ 'ngettext(': 'string msgid1, string msgid2, int n | string', -\ 'nl2br(': 'string string | string', -\ 'nl_langinfo(': 'int item | string', -\ 'notes_body(': 'string server, string mailbox, int msg_number | array', -\ 'notes_copy_db(': 'string from_database_name, string to_database_name | bool', -\ 'notes_create_db(': 'string database_name | bool', -\ 'notes_create_note(': 'string database_name, string form_name | bool', -\ 'notes_drop_db(': 'string database_name | bool', -\ 'notes_find_note(': 'string database_name, string name [, string type] | int', -\ 'notes_header_info(': 'string server, string mailbox, int msg_number | object', -\ 'notes_list_msgs(': 'string db | bool', -\ 'notes_mark_read(': 'string database_name, string user_name, string note_id | bool', -\ 'notes_mark_unread(': 'string database_name, string user_name, string note_id | bool', -\ 'notes_nav_create(': 'string database_name, string name | bool', -\ 'notes_search(': 'string database_name, string keywords | array', -\ 'notes_unread(': 'string database_name, string user_name | array', -\ 'notes_version(': 'string database_name | float', -\ 'nsapi_request_headers(': 'void | array', -\ 'nsapi_response_headers(': 'void | array', -\ 'nsapi_virtual(': 'string uri | bool', -\ 'number_format(': 'float number [, int decimals [, string dec_point, string thousands_sep]] | string', -\ 'ob_clean(': 'void | void', -\ 'ob_end_clean(': 'void | bool', -\ 'ob_end_flush(': 'void | bool', -\ 'ob_flush(': 'void | void', -\ 'ob_get_clean(': 'void | string', -\ 'ob_get_contents(': 'void | string', -\ 'ob_get_flush(': 'void | string', -\ 'ob_get_length(': 'void | int', -\ 'ob_get_level(': 'void | int', -\ 'ob_gzhandler(': 'string buffer, int mode | string', -\ 'ob_iconv_handler(': 'string contents, int status | string', -\ 'ob_implicit_flush(': '[int flag] | void', -\ 'ob_list_handlers(': 'void | array', -\ 'ob_start(': '[callback output_callback [, int chunk_size [, bool erase]]] | bool', -\ 'ob_tidyhandler(': 'string input [, int mode] | string', -\ 'oci_bind_by_name(': 'resource stmt, string ph_name, mixed &variable [, int maxlength [, int type]] | bool', -\ 'oci_cancel(': 'resource stmt | bool', -\ 'oci_close(': 'resource connection | bool', -\ 'oci_commit(': 'resource connection | bool', -\ 'oci_connect(': 'string username, string password [, string db [, string charset [, int session_mode]]] | resource', -\ 'oci_define_by_name(': 'resource statement, string column_name, mixed &variable [, int type] | bool', -\ 'oci_error(': '[resource source] | array', -\ 'oci_execute(': 'resource stmt [, int mode] | bool', -\ 'oci_fetch_all(': 'resource statement, array &output [, int skip [, int maxrows [, int flags]]] | int', -\ 'oci_fetch_array(': 'resource statement [, int mode] | array', -\ 'oci_fetch_assoc(': 'resource statement | array', -\ 'oci_fetch(': 'resource statement | bool', -\ 'ocifetchinto(': 'resource statement, array &result [, int mode] | int', -\ 'oci_fetch_object(': 'resource statement | object', -\ 'oci_fetch_row(': 'resource statement | array', -\ 'oci_field_is_null(': 'resource stmt, mixed field | bool', -\ 'oci_field_name(': 'resource statement, int field | string', -\ 'oci_field_precision(': 'resource statement, int field | int', -\ 'oci_field_scale(': 'resource statement, int field | int', -\ 'oci_field_size(': 'resource stmt, mixed field | int', -\ 'oci_field_type(': 'resource stmt, int field | mixed', -\ 'oci_field_type_raw(': 'resource statement, int field | int', -\ 'oci_free_statement(': 'resource statement | bool', -\ 'oci_internal_debug(': 'int onoff | void', -\ 'oci_lob_copy(': 'OCI-Lob lob_to, OCI-Lob lob_from [, int length] | bool', -\ 'oci_lob_is_equal(': 'OCI-Lob lob1, OCI-Lob lob2 | bool', -\ 'oci_new_collection(': 'resource connection, string tdo [, string schema] | OCI-Collection', -\ 'oci_new_connect(': 'string username, string password [, string db [, string charset [, int session_mode]]] | resource', -\ 'oci_new_cursor(': 'resource connection | resource', -\ 'oci_new_descriptor(': 'resource connection [, int type] | OCI-Lob', -\ 'oci_num_fields(': 'resource statement | int', -\ 'oci_num_rows(': 'resource stmt | int', -\ 'oci_parse(': 'resource connection, string query | resource', -\ 'oci_password_change(': 'resource connection, string username, string old_password, string new_password | bool', -\ 'oci_pconnect(': 'string username, string password [, string db [, string charset [, int session_mode]]] | resource', -\ 'oci_result(': 'resource statement, mixed field | mixed', -\ 'oci_rollback(': 'resource connection | bool', -\ 'oci_server_version(': 'resource connection | string', -\ 'oci_set_prefetch(': 'resource statement [, int rows] | bool', -\ 'oci_statement_type(': 'resource statement | string', -\ 'octdec(': 'string octal_string | number', -\ 'odbc_autocommit(': 'resource connection_id [, bool OnOff] | mixed', -\ 'odbc_binmode(': 'resource result_id, int mode | bool', -\ 'odbc_close_all(': 'void | void', -\ 'odbc_close(': 'resource connection_id | void', -\ 'odbc_columnprivileges(': 'resource connection_id, string qualifier, string owner, string table_name, string column_name | resource', -\ 'odbc_columns(': 'resource connection_id [, string qualifier [, string schema [, string table_name [, string column_name]]]] | resource', -\ 'odbc_commit(': 'resource connection_id | bool', -\ 'odbc_connect(': 'string dsn, string user, string password [, int cursor_type] | resource', -\ 'odbc_cursor(': 'resource result_id | string', -\ 'odbc_data_source(': 'resource connection_id, int fetch_type | array', -\ 'odbc_do(': 'resource conn_id, string query | resource', -\ 'odbc_error(': '[resource connection_id] | string', -\ 'odbc_errormsg(': '[resource connection_id] | string', -\ 'odbc_exec(': 'resource connection_id, string query_string [, int flags] | resource', -\ 'odbc_execute(': 'resource result_id [, array parameters_array] | bool', -\ 'odbc_fetch_array(': 'resource result [, int rownumber] | array', -\ 'odbc_fetch_into(': 'resource result_id, array &result_array [, int rownumber] | int', -\ 'odbc_fetch_object(': 'resource result [, int rownumber] | object', -\ 'odbc_fetch_row(': 'resource result_id [, int row_number] | bool', -\ 'odbc_field_len(': 'resource result_id, int field_number | int', -\ 'odbc_field_name(': 'resource result_id, int field_number | string', -\ 'odbc_field_num(': 'resource result_id, string field_name | int', -\ 'odbc_field_precision(': 'resource result_id, int field_number | int', -\ 'odbc_field_scale(': 'resource result_id, int field_number | int', -\ 'odbc_field_type(': 'resource result_id, int field_number | string', -\ 'odbc_foreignkeys(': 'resource connection_id, string pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, string fk_owner, string fk_table | resource', -\ 'odbc_free_result(': 'resource result_id | bool', -\ 'odbc_gettypeinfo(': 'resource connection_id [, int data_type] | resource', -\ 'odbc_longreadlen(': 'resource result_id, int length | bool', -\ 'odbc_next_result(': 'resource result_id | bool', -\ 'odbc_num_fields(': 'resource result_id | int', -\ 'odbc_num_rows(': 'resource result_id | int', -\ 'odbc_pconnect(': 'string dsn, string user, string password [, int cursor_type] | resource', -\ 'odbc_prepare(': 'resource connection_id, string query_string | resource', -\ 'odbc_primarykeys(': 'resource connection_id, string qualifier, string owner, string table | resource', -\ 'odbc_procedurecolumns(': 'resource connection_id [, string qualifier, string owner, string proc, string column] | resource', -\ 'odbc_procedures(': 'resource connection_id [, string qualifier, string owner, string name] | resource', -\ 'odbc_result_all(': 'resource result_id [, string format] | int', -\ 'odbc_result(': 'resource result_id, mixed field | mixed', -\ 'odbc_rollback(': 'resource connection_id | bool', -\ 'odbc_setoption(': 'resource id, int function, int option, int param | bool', -\ 'odbc_specialcolumns(': 'resource connection_id, int type, string qualifier, string owner, string table, int scope, int nullable | resource', -\ 'odbc_statistics(': 'resource connection_id, string qualifier, string owner, string table_name, int unique, int accuracy | resource', -\ 'odbc_tableprivileges(': 'resource connection_id, string qualifier, string owner, string name | resource', -\ 'odbc_tables(': 'resource connection_id [, string qualifier [, string owner [, string name [, string types]]]] | resource', -\ 'openal_buffer_create(': 'void | resource', -\ 'openal_buffer_data(': 'resource buffer, int format, string data, int freq | bool', -\ 'openal_buffer_destroy(': 'resource buffer | bool', -\ 'openal_buffer_get(': 'resource buffer, int property | int', -\ 'openal_buffer_loadwav(': 'resource buffer, string wavfile | bool', -\ 'openal_context_create(': 'resource device | resource', -\ 'openal_context_current(': 'resource context | bool', -\ 'openal_context_destroy(': 'resource context | bool', -\ 'openal_context_process(': 'resource context | bool', -\ 'openal_context_suspend(': 'resource context | bool', -\ 'openal_device_close(': 'resource device | bool', -\ 'openal_device_open(': '[string device_desc] | resource', -\ 'openal_listener_get(': 'int property | mixed', -\ 'openal_listener_set(': 'int property, mixed setting | bool', -\ 'openal_source_create(': 'void | resource', -\ 'openal_source_destroy(': 'resource source | bool', -\ 'openal_source_get(': 'resource source, int property | mixed', -\ 'openal_source_pause(': 'resource source | bool', -\ 'openal_source_play(': 'resource source | bool', -\ 'openal_source_rewind(': 'resource source | bool', -\ 'openal_source_set(': 'resource source, int property, mixed setting | bool', -\ 'openal_source_stop(': 'resource source | bool', -\ 'openal_stream(': 'resource source, int format, int rate | resource', -\ 'opendir(': 'string path [, resource context] | resource', -\ 'openlog(': 'string ident, int option, int facility | bool', -\ 'openssl_csr_export(': 'resource csr, string &out [, bool notext] | bool', -\ 'openssl_csr_export_to_file(': 'resource csr, string outfilename [, bool notext] | bool', -\ 'openssl_csr_new(': 'array dn, resource &privkey [, array configargs [, array extraattribs]] | mixed', -\ 'openssl_csr_sign(': 'mixed csr, mixed cacert, mixed priv_key, int days [, array configargs [, int serial]] | resource', -\ 'openssl_error_string(': 'void | string', -\ 'openssl_free_key(': 'resource key_identifier | void', -\ 'openssl_open(': 'string sealed_data, string &open_data, string env_key, mixed priv_key_id | bool', -\ 'openssl_pkcs7_decrypt(': 'string infilename, string outfilename, mixed recipcert [, mixed recipkey] | bool', -\ 'openssl_pkcs7_encrypt(': 'string infile, string outfile, mixed recipcerts, array headers [, int flags [, int cipherid]] | bool', -\ 'openssl_pkcs7_sign(': 'string infilename, string outfilename, mixed signcert, mixed privkey, array headers [, int flags [, string extracerts]] | bool', -\ 'openssl_pkcs7_verify(': 'string filename, int flags [, string outfilename [, array cainfo [, string extracerts]]] | mixed', -\ 'openssl_pkey_export(': 'mixed key, string &out [, string passphrase [, array configargs]] | bool', -\ 'openssl_pkey_export_to_file(': 'mixed key, string outfilename [, string passphrase [, array configargs]] | bool', -\ 'openssl_pkey_free(': 'resource key | void', -\ 'openssl_pkey_get_private(': 'mixed key [, string passphrase] | resource', -\ 'openssl_pkey_get_public(': 'mixed certificate | resource', -\ 'openssl_pkey_new(': '[array configargs] | resource', -\ 'openssl_private_decrypt(': 'string data, string &decrypted, mixed key [, int padding] | bool', -\ 'openssl_private_encrypt(': 'string data, string &crypted, mixed key [, int padding] | bool', -\ 'openssl_public_decrypt(': 'string data, string &decrypted, mixed key [, int padding] | bool', -\ 'openssl_public_encrypt(': 'string data, string &crypted, mixed key [, int padding] | bool', -\ 'openssl_seal(': 'string data, string &sealed_data, array &env_keys, array pub_key_ids | int', -\ 'openssl_sign(': 'string data, string &signature, mixed priv_key_id [, int signature_alg] | bool', -\ 'openssl_verify(': 'string data, string signature, mixed pub_key_id | int', -\ 'openssl_x509_check_private_key(': 'mixed cert, mixed key | bool', -\ 'openssl_x509_checkpurpose(': 'mixed x509cert, int purpose [, array cainfo [, string untrustedfile]] | int', -\ 'openssl_x509_export(': 'mixed x509, string &output [, bool notext] | bool', -\ 'openssl_x509_export_to_file(': 'mixed x509, string outfilename [, bool notext] | bool', -\ 'openssl_x509_free(': 'resource x509cert | void', -\ 'openssl_x509_parse(': 'mixed x509cert [, bool shortnames] | array', -\ 'openssl_x509_read(': 'mixed x509certdata | resource', -\ 'ora_bind(': 'resource cursor, string PHP_variable_name, string SQL_parameter_name, int length [, int type] | bool', -\ 'ora_close(': 'resource cursor | bool', -\ 'ora_columnname(': 'resource cursor, int column | string', -\ 'ora_columnsize(': 'resource cursor, int column | int', -\ 'ora_columntype(': 'resource cursor, int column | string', -\ 'ora_commit(': 'resource conn | bool', -\ 'ora_commitoff(': 'resource conn | bool', -\ 'ora_commiton(': 'resource conn | bool', -\ 'ora_do(': 'resource conn, string query | resource', -\ 'ora_errorcode(': '[resource cursor_or_connection] | int', -\ 'ora_error(': '[resource cursor_or_connection] | string', -\ 'ora_exec(': 'resource cursor | bool', -\ 'ora_fetch(': 'resource cursor | bool', -\ 'ora_fetch_into(': 'resource cursor, array &result [, int flags] | int', -\ 'ora_getcolumn(': 'resource cursor, int column | string', -\ 'ora_logoff(': 'resource connection | bool', -\ 'ora_logon(': 'string user, string password | resource', -\ 'ora_numcols(': 'resource cursor | int', -\ 'ora_numrows(': 'resource cursor | int', -\ 'ora_open(': 'resource connection | resource', -\ 'ora_parse(': 'resource cursor, string sql_statement [, int defer] | bool', -\ 'ora_plogon(': 'string user, string password | resource', -\ 'ora_rollback(': 'resource connection | bool', -\ 'OrbitEnum(': 'string id | new', -\ 'OrbitObject(': 'string ior | new', -\ 'OrbitStruct(': 'string id | new', -\ 'ord(': 'string string | int', -\ 'output_add_rewrite_var(': 'string name, string value | bool', -\ 'output_reset_rewrite_vars(': 'void | bool', -\ 'overload(': '[string class_name] | void', -\ 'override_function(': 'string function_name, string function_args, string function_code | bool', -\ 'ovrimos_close(': 'int connection | void', -\ 'ovrimos_commit(': 'int connection_id | bool', -\ 'ovrimos_connect(': 'string host, string db, string user, string password | int', -\ 'ovrimos_cursor(': 'int result_id | string', -\ 'ovrimos_exec(': 'int connection_id, string query | int', -\ 'ovrimos_execute(': 'int result_id [, array parameters_array] | bool', -\ 'ovrimos_fetch_into(': 'int result_id, array &result_array [, string how [, int rownumber]] | bool', -\ 'ovrimos_fetch_row(': 'int result_id [, int how [, int row_number]] | bool', -\ 'ovrimos_field_len(': 'int result_id, int field_number | int', -\ 'ovrimos_field_name(': 'int result_id, int field_number | string', -\ 'ovrimos_field_num(': 'int result_id, string field_name | int', -\ 'ovrimos_field_type(': 'int result_id, int field_number | int', -\ 'ovrimos_free_result(': 'int result_id | bool', -\ 'ovrimos_longreadlen(': 'int result_id, int length | bool', -\ 'ovrimos_num_fields(': 'int result_id | int', -\ 'ovrimos_num_rows(': 'int result_id | int', -\ 'ovrimos_prepare(': 'int connection_id, string query | int', -\ 'ovrimos_result_all(': 'int result_id [, string format] | int', -\ 'ovrimos_result(': 'int result_id, mixed field | string', -\ 'ovrimos_rollback(': 'int connection_id | bool', -\ 'pack(': 'string format [, mixed args [, mixed ...]] | string', -\ 'parse_ini_file(': 'string filename [, bool process_sections] | array', -\ 'parsekit_compile_file(': 'string filename [, array &errors [, int options]] | array', -\ 'parsekit_compile_string(': 'string phpcode [, array &errors [, int options]] | array', -\ 'parsekit_func_arginfo(': 'mixed function | array', -\ 'parse_str(': 'string str [, array &arr] | void', -\ 'parse_url(': 'string url | array', -\ 'passthru(': 'string command [, int &return_var] | void', -\ 'pathinfo(': 'string path [, int options] | mixed', -\ 'pclose(': 'resource handle | int', -\ 'pcntl_alarm(': 'int seconds | int', -\ 'pcntl_exec(': 'string path [, array args [, array envs]] | void', -\ 'pcntl_fork(': 'void | int', -\ 'pcntl_getpriority(': '[int pid [, int process_identifier]] | int', -\ 'pcntl_setpriority(': 'int priority [, int pid [, int process_identifier]] | bool', -\ 'pcntl_signal(': 'int signo, callback handle [, bool restart_syscalls] | bool', -\ 'pcntl_wait(': 'int &status [, int options] | int', -\ 'pcntl_waitpid(': 'int pid, int &status [, int options] | int', -\ 'pcntl_wexitstatus(': 'int status | int', -\ 'pcntl_wifexited(': 'int status | bool', -\ 'pcntl_wifsignaled(': 'int status | bool', -\ 'pcntl_wifstopped(': 'int status | bool', -\ 'pcntl_wstopsig(': 'int status | int', -\ 'pcntl_wtermsig(': 'int status | int', -\ 'pdf_activate_item(': 'resource pdfdoc, int id | bool', -\ 'pdf_add_launchlink(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string filename | bool', -\ 'pdf_add_locallink(': 'resource pdfdoc, float lowerleftx, float lowerlefty, float upperrightx, float upperrighty, int page, string dest | bool', -\ 'pdf_add_nameddest(': 'resource pdfdoc, string name, string optlist | bool', -\ 'pdf_add_note(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string contents, string title, string icon, int open | bool', -\ 'pdf_add_pdflink(': 'resource pdfdoc, float bottom_left_x, float bottom_left_y, float up_right_x, float up_right_y, string filename, int page, string dest | bool', -\ 'pdf_add_thumbnail(': 'resource pdfdoc, int image | bool', -\ 'pdf_add_weblink(': 'resource pdfdoc, float lowerleftx, float lowerlefty, float upperrightx, float upperrighty, string url | bool', -\ 'pdf_arc(': 'resource p, float x, float y, float r, float alpha, float beta | bool', -\ 'pdf_arcn(': 'resource p, float x, float y, float r, float alpha, float beta | bool', -\ 'pdf_attach_file(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string filename, string description, string author, string mimetype, string icon | bool', -\ 'pdf_begin_document(': 'resource pdfdoc, string filename, string optlist | int', -\ 'pdf_begin_font(': 'resource pdfdoc, string filename, float a, float b, float c, float d, float e, float f, string optlist | bool', -\ 'pdf_begin_glyph(': 'resource pdfdoc, string glyphname, float wx, float llx, float lly, float urx, float ury | bool', -\ 'pdf_begin_item(': 'resource pdfdoc, string tag, string optlist | int', -\ 'pdf_begin_layer(': 'resource pdfdoc, int layer | bool', -\ 'pdf_begin_page_ext(': 'resource pdfdoc, float width, float height, string optlist | bool', -\ 'pdf_begin_page(': 'resource pdfdoc, float width, float height | bool', -\ 'pdf_begin_pattern(': 'resource pdfdoc, float width, float height, float xstep, float ystep, int painttype | int', -\ 'pdf_begin_template(': 'resource pdfdoc, float width, float height | int', -\ 'pdf_circle(': 'resource pdfdoc, float x, float y, float r | bool', -\ 'pdf_clip(': 'resource p | bool', -\ 'pdf_close(': 'resource p | bool', -\ 'pdf_close_image(': 'resource p, int image | void', -\ 'pdf_closepath_fill_stroke(': 'resource p | bool', -\ 'pdf_closepath(': 'resource p | bool', -\ 'pdf_closepath_stroke(': 'resource p | bool', -\ 'pdf_close_pdi(': 'resource p, int doc | bool', -\ 'pdf_close_pdi_page(': 'resource p, int page | bool', -\ 'pdf_concat(': 'resource p, float a, float b, float c, float d, float e, float f | bool', -\ 'pdf_continue_text(': 'resource p, string text | bool', -\ 'pdf_create_action(': 'resource pdfdoc, string type, string optlist | int', -\ 'pdf_create_annotation(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string type, string optlist | bool', -\ 'pdf_create_bookmark(': 'resource pdfdoc, string text, string optlist | int', -\ 'pdf_create_fieldgroup(': 'resource pdfdoc, string name, string optlist | bool', -\ 'pdf_create_field(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string name, string type, string optlist | bool', -\ 'pdf_create_gstate(': 'resource pdfdoc, string optlist | int', -\ 'pdf_create_pvf(': 'resource pdfdoc, string filename, string data, string optlist | bool', -\ 'pdf_create_textflow(': 'resource pdfdoc, string text, string optlist | int', -\ 'pdf_curveto(': 'resource p, float x1, float y1, float x2, float y2, float x3, float y3 | bool', -\ 'pdf_define_layer(': 'resource pdfdoc, string name, string optlist | int', -\ 'pdf_delete(': 'resource pdfdoc | bool', -\ 'pdf_delete_pvf(': 'resource pdfdoc, string filename | int', -\ 'pdf_delete_textflow(': 'resource pdfdoc, int textflow | bool', -\ 'pdf_encoding_set_char(': 'resource pdfdoc, string encoding, int slot, string glyphname, int uv | bool', -\ 'pdf_end_document(': 'resource pdfdoc, string optlist | bool', -\ 'pdf_end_font(': 'resource pdfdoc | bool', -\ 'pdf_end_glyph(': 'resource pdfdoc | bool', -\ 'pdf_end_item(': 'resource pdfdoc, int id | bool', -\ 'pdf_end_layer(': 'resource pdfdoc | bool', -\ 'pdf_end_page_ext(': 'resource pdfdoc, string optlist | bool', -\ 'pdf_end_page(': 'resource p | bool', -\ 'pdf_end_pattern(': 'resource p | bool', -\ 'pdf_end_template(': 'resource p | bool', -\ 'pdf_fill(': 'resource p | bool', -\ 'pdf_fill_imageblock(': 'resource pdfdoc, int page, string blockname, int image, string optlist | int', -\ 'pdf_fill_pdfblock(': 'resource pdfdoc, int page, string blockname, int contents, string optlist | int', -\ 'pdf_fill_stroke(': 'resource p | bool', -\ 'pdf_fill_textblock(': 'resource pdfdoc, int page, string blockname, string text, string optlist | int', -\ 'pdf_findfont(': 'resource p, string fontname, string encoding, int embed | int', -\ 'pdf_fit_image(': 'resource pdfdoc, int image, float x, float y, string optlist | bool', -\ 'pdf_fit_pdi_page(': 'resource pdfdoc, int page, float x, float y, string optlist | bool', -\ 'pdf_fit_textflow(': 'resource pdfdoc, int textflow, float llx, float lly, float urx, float ury, string optlist | string', -\ 'pdf_fit_textline(': 'resource pdfdoc, string text, float x, float y, string optlist | bool', -\ 'pdf_get_apiname(': 'resource pdfdoc | string', -\ 'pdf_get_buffer(': 'resource p | string', -\ 'pdf_get_errmsg(': 'resource pdfdoc | string', -\ 'pdf_get_errnum(': 'resource pdfdoc | int', -\ 'pdf_get_majorversion(': 'void | int', -\ 'pdf_get_minorversion(': 'void | int', -\ 'pdf_get_parameter(': 'resource p, string key, float modifier | string', -\ 'pdf_get_pdi_parameter(': 'resource p, string key, int doc, int page, int reserved | string', -\ 'pdf_get_pdi_value(': 'resource p, string key, int doc, int page, int reserved | float', -\ 'pdf_get_value(': 'resource p, string key, float modifier | float', -\ 'pdf_info_textflow(': 'resource pdfdoc, int textflow, string keyword | float', -\ 'pdf_initgraphics(': 'resource p | bool', -\ 'pdf_lineto(': 'resource p, float x, float y | bool', -\ 'pdf_load_font(': 'resource pdfdoc, string fontname, string encoding, string optlist | int', -\ 'pdf_load_iccprofile(': 'resource pdfdoc, string profilename, string optlist | int', -\ 'pdf_load_image(': 'resource pdfdoc, string imagetype, string filename, string optlist | int', -\ 'pdf_makespotcolor(': 'resource p, string spotname | int', -\ 'pdf_moveto(': 'resource p, float x, float y | bool', -\ 'pdf_new(': ' | resource', -\ 'pdf_open_ccitt(': 'resource pdfdoc, string filename, int width, int height, int BitReverse, int k, int Blackls1 | int', -\ 'pdf_open_file(': 'resource p, string filename | bool', -\ 'pdf_open_image_file(': 'resource p, string imagetype, string filename, string stringparam, int intparam | int', -\ 'pdf_open_image(': 'resource p, string imagetype, string source, string data, int length, int width, int height, int components, int bpc, string params | int', -\ 'pdf_open_memory_image(': 'resource p, resource image | int', -\ 'pdf_open_pdi(': 'resource pdfdoc, string filename, string optlist, int len | int', -\ 'pdf_open_pdi_page(': 'resource p, int doc, int pagenumber, string optlist | int', -\ 'pdf_place_image(': 'resource pdfdoc, int image, float x, float y, float scale | bool', -\ 'pdf_place_pdi_page(': 'resource pdfdoc, int page, float x, float y, float sx, float sy | bool', -\ 'pdf_process_pdi(': 'resource pdfdoc, int doc, int page, string optlist | int', -\ 'pdf_rect(': 'resource p, float x, float y, float width, float height | bool', -\ 'pdf_restore(': 'resource p | bool', -\ 'pdf_resume_page(': 'resource pdfdoc, string optlist | bool', -\ 'pdf_rotate(': 'resource p, float phi | bool', -\ 'pdf_save(': 'resource p | bool', -\ 'pdf_scale(': 'resource p, float sx, float sy | bool', -\ 'pdf_set_border_color(': 'resource p, float red, float green, float blue | bool', -\ 'pdf_set_border_dash(': 'resource pdfdoc, float black, float white | bool', -\ 'pdf_set_border_style(': 'resource pdfdoc, string style, float width | bool', -\ 'pdf_setcolor(': 'resource p, string fstype, string colorspace, float c1, float c2, float c3, float c4 | bool', -\ 'pdf_setdash(': 'resource pdfdoc, float b, float w | bool', -\ 'pdf_setdashpattern(': 'resource pdfdoc, string optlist | bool', -\ 'pdf_setflat(': 'resource pdfdoc, float flatness | bool', -\ 'pdf_setfont(': 'resource pdfdoc, int font, float fontsize | bool', -\ 'pdf_setgray_fill(': 'resource p, float g | bool', -\ 'pdf_setgray(': 'resource p, float g | bool', -\ 'pdf_setgray_stroke(': 'resource p, float g | bool', -\ 'pdf_set_gstate(': 'resource pdfdoc, int gstate | bool', -\ 'pdf_set_info(': 'resource p, string key, string value | bool', -\ 'pdf_set_layer_dependency(': 'resource pdfdoc, string type, string optlist | bool', -\ 'pdf_setlinecap(': 'resource p, int linecap | bool', -\ 'pdf_setlinejoin(': 'resource p, int value | bool', -\ 'pdf_setlinewidth(': 'resource p, float width | bool', -\ 'pdf_setmatrix(': 'resource p, float a, float b, float c, float d, float e, float f | bool', -\ 'pdf_setmiterlimit(': 'resource pdfdoc, float miter | bool', -\ 'pdf_set_parameter(': 'resource p, string key, string value | bool', -\ 'pdf_setrgbcolor_fill(': 'resource p, float red, float green, float blue | bool', -\ 'pdf_setrgbcolor(': 'resource p, float red, float green, float blue | bool', -\ 'pdf_setrgbcolor_stroke(': 'resource p, float red, float green, float blue | bool', -\ 'pdf_set_text_pos(': 'resource p, float x, float y | bool', -\ 'pdf_set_value(': 'resource p, string key, float value | bool', -\ 'pdf_shading(': 'resource pdfdoc, string shtype, float x0, float y0, float x1, float y1, float c1, float c2, float c3, float c4, string optlist | int', -\ 'pdf_shading_pattern(': 'resource pdfdoc, int shading, string optlist | int', -\ 'pdf_shfill(': 'resource pdfdoc, int shading | bool', -\ 'pdf_show_boxed(': 'resource p, string text, float left, float top, float width, float height, string mode, string feature | int', -\ 'pdf_show(': 'resource pdfdoc, string text | bool', -\ 'pdf_show_xy(': 'resource p, string text, float x, float y | bool', -\ 'pdf_skew(': 'resource p, float alpha, float beta | bool', -\ 'pdf_stringwidth(': 'resource p, string text, int font, float fontsize | float', -\ 'pdf_stroke(': 'resource p | bool', -\ 'pdf_suspend_page(': 'resource pdfdoc, string optlist | bool', -\ 'pdf_translate(': 'resource p, float tx, float ty | bool', -\ 'pdf_utf16_to_utf8(': 'resource pdfdoc, string utf16string | string', -\ 'pdf_utf8_to_utf16(': 'resource pdfdoc, string utf8string, string ordering | string', -\ 'pdf_xshow(': 'resource pdfdoc, string text | bool', -\ 'pfpro_cleanup(': 'void | bool', -\ 'pfpro_init(': 'void | bool', -\ 'pfpro_process(': 'array parameters [, string address [, int port [, int timeout [, string proxy_address [, int proxy_port [, string proxy_logon [, string proxy_password]]]]]]] | array', -\ 'pfpro_process_raw(': 'string parameters [, string address [, int port [, int timeout [, string proxy_address [, int proxy_port [, string proxy_logon [, string proxy_password]]]]]]] | string', -\ 'pfpro_version(': 'void | string', -\ 'pfsockopen(': 'string hostname [, int port [, int &errno [, string &errstr [, float timeout]]]] | resource', -\ 'pg_affected_rows(': 'resource result | int', -\ 'pg_cancel_query(': 'resource connection | bool', -\ 'pg_client_encoding(': '[resource connection] | string', -\ 'pg_close(': '[resource connection] | bool', -\ 'pg_connect(': 'string connection_string [, int connect_type] | resource', -\ 'pg_connection_busy(': 'resource connection | bool', -\ 'pg_connection_reset(': 'resource connection | bool', -\ 'pg_connection_status(': 'resource connection | int', -\ 'pg_convert(': 'resource connection, string table_name, array assoc_array [, int options] | array', -\ 'pg_copy_from(': 'resource connection, string table_name, array rows [, string delimiter [, string null_as]] | bool', -\ 'pg_copy_to(': 'resource connection, string table_name [, string delimiter [, string null_as]] | array', -\ 'pg_dbname(': '[resource connection] | string', -\ 'pg_delete(': 'resource connection, string table_name, array assoc_array [, int options] | mixed', -\ 'pg_end_copy(': '[resource connection] | bool', -\ 'pg_escape_bytea(': 'string data | string', -\ 'pg_escape_string(': 'string data | string', -\ 'pg_execute(': 'resource connection, string stmtname, array params | resource', -\ 'pg_fetch_all_columns(': 'resource result [, int column] | array', -\ 'pg_fetch_all(': 'resource result | array', -\ 'pg_fetch_array(': 'resource result [, int row [, int result_type]] | array', -\ 'pg_fetch_assoc(': 'resource result [, int row] | array', -\ 'pg_fetch_object(': 'resource result [, int row [, int result_type]] | object', -\ 'pg_fetch_result(': 'resource result, int row, mixed field | string', -\ 'pg_fetch_row(': 'resource result [, int row] | array', -\ 'pg_field_is_null(': 'resource result, int row, mixed field | int', -\ 'pg_field_name(': 'resource result, int field_number | string', -\ 'pg_field_num(': 'resource result, string field_name | int', -\ 'pg_field_prtlen(': 'resource result, int row_number, mixed field_name_or_number | int', -\ 'pg_field_size(': 'resource result, int field_number | int', -\ 'pg_field_type(': 'resource result, int field_number | string', -\ 'pg_field_type_oid(': 'resource result, int field_number | int', -\ 'pg_free_result(': 'resource result | bool', -\ 'pg_get_notify(': 'resource connection [, int result_type] | array', -\ 'pg_get_pid(': 'resource connection | int', -\ 'pg_get_result(': '[resource connection] | resource', -\ 'pg_host(': '[resource connection] | string', -\ 'pg_insert(': 'resource connection, string table_name, array assoc_array [, int options] | mixed', -\ 'pg_last_error(': '[resource connection] | string', -\ 'pg_last_notice(': 'resource connection | string', -\ 'pg_last_oid(': 'resource result | string', -\ 'pg_lo_close(': 'resource large_object | bool', -\ 'pg_lo_create(': '[resource connection] | int', -\ 'pg_lo_export(': 'resource connection, int oid, string pathname | bool', -\ 'pg_lo_import(': 'resource connection, string pathname | int', -\ 'pg_lo_open(': 'resource connection, int oid, string mode | resource', -\ 'pg_lo_read_all(': 'resource large_object | int', -\ 'pg_lo_read(': 'resource large_object [, int len] | string', -\ 'pg_lo_seek(': 'resource large_object, int offset [, int whence] | bool', -\ 'pg_lo_tell(': 'resource large_object | int', -\ 'pg_lo_unlink(': 'resource connection, int oid | bool', -\ 'pg_lo_write(': 'resource large_object, string data [, int len] | int', -\ 'pg_meta_data(': 'resource connection, string table_name | array', -\ 'pg_num_fields(': 'resource result | int', -\ 'pg_num_rows(': 'resource result | int', -\ 'pg_options(': '[resource connection] | string', -\ 'pg_parameter_status(': 'resource connection, string param_name | string', -\ 'pg_pconnect(': 'string connection_string [, int connect_type] | resource', -\ 'pg_ping(': '[resource connection] | bool', -\ 'pg_port(': '[resource connection] | int', -\ 'pg_prepare(': 'resource connection, string stmtname, string query | resource', -\ 'pg_put_line(': 'string data | bool', -\ 'pg_query(': 'string query | resource', -\ 'pg_query_params(': 'resource connection, string query, array params | resource', -\ 'pg_result_error_field(': 'resource result, int fieldcode | string', -\ 'pg_result_error(': 'resource result | string', -\ 'pg_result_seek(': 'resource result, int offset | bool', -\ 'pg_result_status(': 'resource result [, int type] | mixed', -\ 'pg_select(': 'resource connection, string table_name, array assoc_array [, int options] | mixed', -\ 'pg_send_execute(': 'resource connection, string stmtname, array params | bool', -\ 'pg_send_prepare(': 'resource connection, string stmtname, string query | bool', -\ 'pg_send_query(': 'resource connection, string query | bool', -\ 'pg_send_query_params(': 'resource connection, string query, array params | bool', -\ 'pg_set_client_encoding(': 'string encoding | int', -\ 'pg_set_error_verbosity(': 'resource connection, int verbosity | int', -\ 'pg_trace(': 'string pathname [, string mode [, resource connection]] | bool', -\ 'pg_transaction_status(': 'resource connection | int', -\ 'pg_tty(': '[resource connection] | string', -\ 'pg_unescape_bytea(': 'string data | string', -\ 'pg_untrace(': '[resource connection] | bool', -\ 'pg_update(': 'resource connection, string table_name, array data, array condition [, int options] | mixed', -\ 'pg_version(': '[resource connection] | array', -\ 'php_check_syntax(': 'string file_name [, string &error_message] | bool', -\ 'phpcredits(': '[int flag] | bool', -\ 'phpinfo(': '[int what] | bool', -\ 'php_ini_scanned_files(': 'void | string', -\ 'php_logo_guid(': 'void | string', -\ 'php_sapi_name(': 'void | string', -\ 'php_strip_whitespace(': 'string filename | string', -\ 'php_uname(': '[string mode] | string', -\ 'phpversion(': '[string extension] | string', -\ 'pi(': 'void | float', -\ 'png2wbmp(': 'string pngname, string wbmpname, int d_height, int d_width, int threshold | int', -\ 'popen(': 'string command, string mode | resource', -\ 'posix_access(': 'string file [, int mode] | bool', -\ 'posix_ctermid(': 'void | string', -\ 'posix_getcwd(': 'void | string', -\ 'posix_getegid(': 'void | int', -\ 'posix_geteuid(': 'void | int', -\ 'posix_getgid(': 'void | int', -\ 'posix_getgrgid(': 'int gid | array', -\ 'posix_getgrnam(': 'string name | array', -\ 'posix_getgroups(': 'void | array', -\ 'posix_get_last_error(': 'void | int', -\ 'posix_getlogin(': 'void | string', -\ 'posix_getpgid(': 'int pid | int', -\ 'posix_getpgrp(': 'void | int', -\ 'posix_getpid(': 'void | int', -\ 'posix_getppid(': 'void | int', -\ 'posix_getpwnam(': 'string username | array', -\ 'posix_getpwuid(': 'int uid | array', -\ 'posix_getrlimit(': 'void | array', -\ 'posix_getsid(': 'int pid | int', -\ 'posix_getuid(': 'void | int', -\ 'posix_isatty(': 'int fd | bool', -\ 'posix_kill(': 'int pid, int sig | bool', -\ 'posix_mkfifo(': 'string pathname, int mode | bool', -\ 'posix_mknod(': 'string pathname, int mode [, int major [, int minor]] | bool', -\ 'posix_setegid(': 'int gid | bool', -\ 'posix_seteuid(': 'int uid | bool', -\ 'posix_setgid(': 'int gid | bool', -\ 'posix_setpgid(': 'int pid, int pgid | bool', -\ 'posix_setsid(': 'void | int', -\ 'posix_setuid(': 'int uid | bool', -\ 'posix_strerror(': 'int errno | string', -\ 'posix_times(': 'void | array', -\ 'posix_ttyname(': 'int fd | string', -\ 'posix_uname(': 'void | array', -\ 'pow(': 'number base, number exp | number', -\ 'preg_grep(': 'string pattern, array input [, int flags] | array', -\ 'preg_match_all(': 'string pattern, string subject, array &matches [, int flags [, int offset]] | int', -\ 'preg_match(': 'string pattern, string subject [, array &matches [, int flags [, int offset]]] | int', -\ 'preg_quote(': 'string str [, string delimiter] | string', -\ 'preg_replace_callback(': 'mixed pattern, callback callback, mixed subject [, int limit [, int &count]] | mixed', -\ 'preg_replace(': 'mixed pattern, mixed replacement, mixed subject [, int limit [, int &count]] | mixed', -\ 'preg_split(': 'string pattern, string subject [, int limit [, int flags]] | array', -\ 'prev(': 'array &array | mixed', -\ 'printer_abort(': 'resource handle | void', -\ 'printer_close(': 'resource handle | void', -\ 'printer_create_brush(': 'int style, string color | resource', -\ 'printer_create_dc(': 'resource handle | void', -\ 'printer_create_font(': 'string face, int height, int width, int font_weight, bool italic, bool underline, bool strikeout, int orientation | resource', -\ 'printer_create_pen(': 'int style, int width, string color | resource', -\ 'printer_delete_brush(': 'resource handle | void', -\ 'printer_delete_dc(': 'resource handle | bool', -\ 'printer_delete_font(': 'resource handle | void', -\ 'printer_delete_pen(': 'resource handle | void', -\ 'printer_draw_bmp(': 'resource handle, string filename, int x, int y [, int width, int height] | bool', -\ 'printer_draw_chord(': 'resource handle, int rec_x, int rec_y, int rec_x1, int rec_y1, int rad_x, int rad_y, int rad_x1, int rad_y1 | void', -\ 'printer_draw_elipse(': 'resource handle, int ul_x, int ul_y, int lr_x, int lr_y | void', -\ 'printer_draw_line(': 'resource printer_handle, int from_x, int from_y, int to_x, int to_y | void', -\ 'printer_draw_pie(': 'resource handle, int rec_x, int rec_y, int rec_x1, int rec_y1, int rad1_x, int rad1_y, int rad2_x, int rad2_y | void', -\ 'printer_draw_rectangle(': 'resource handle, int ul_x, int ul_y, int lr_x, int lr_y | void', -\ 'printer_draw_roundrect(': 'resource handle, int ul_x, int ul_y, int lr_x, int lr_y, int width, int height | void', -\ 'printer_draw_text(': 'resource printer_handle, string text, int x, int y | void', -\ 'printer_end_doc(': 'resource handle | bool', -\ 'printer_end_page(': 'resource handle | bool', -\ 'printer_get_option(': 'resource handle, string option | mixed', -\ 'printer_list(': 'int enumtype [, string name [, int level]] | array', -\ 'printer_logical_fontheight(': 'resource handle, int height | int', -\ 'printer_open(': '[string devicename] | resource', -\ 'printer_select_brush(': 'resource printer_handle, resource brush_handle | void', -\ 'printer_select_font(': 'resource printer_handle, resource font_handle | void', -\ 'printer_select_pen(': 'resource printer_handle, resource pen_handle | void', -\ 'printer_set_option(': 'resource handle, int option, mixed value | bool', -\ 'printer_start_doc(': 'resource handle [, string document] | bool', -\ 'printer_start_page(': 'resource handle | bool', -\ 'printer_write(': 'resource handle, string content | bool', -\ 'printf(': 'string format [, mixed args [, mixed ...]] | int', -\ 'print(': 'string arg | int', -\ 'print_r(': 'mixed expression [, bool return] | bool', -\ 'proc_close(': 'resource process | int', -\ 'proc_get_status(': 'resource process | array', -\ 'proc_nice(': 'int increment | bool', -\ 'proc_open(': 'string cmd, array descriptorspec, array &pipes [, string cwd [, array env [, array other_options]]] | resource', -\ 'proc_terminate(': 'resource process [, int signal] | int', -\ 'property_exists(': 'mixed class, string property | bool', -\ 'ps_add_bookmark(': 'resource psdoc, string text [, int parent [, int open]] | int', -\ 'ps_add_launchlink(': 'resource psdoc, float llx, float lly, float urx, float ury, string filename | bool', -\ 'ps_add_locallink(': 'resource psdoc, float llx, float lly, float urx, float ury, int page, string dest | bool', -\ 'ps_add_note(': 'resource psdoc, float llx, float lly, float urx, float ury, string contents, string title, string icon, int open | bool', -\ 'ps_add_pdflink(': 'resource psdoc, float llx, float lly, float urx, float ury, string filename, int page, string dest | bool', -\ 'ps_add_weblink(': 'resource psdoc, float llx, float lly, float urx, float ury, string url | bool', -\ 'ps_arc(': 'resource psdoc, float x, float y, float radius, float alpha, float beta | bool', -\ 'ps_arcn(': 'resource psdoc, float x, float y, float radius, float alpha, float beta | bool', -\ 'ps_begin_page(': 'resource psdoc, float width, float height | bool', -\ 'ps_begin_pattern(': 'resource psdoc, float width, float height, float xstep, float ystep, int painttype | bool', -\ 'ps_begin_template(': 'resource psdoc, float width, float height | bool', -\ 'ps_circle(': 'resource psdoc, float x, float y, float radius | bool', -\ 'ps_clip(': 'resource psdoc | bool', -\ 'ps_close(': 'resource psdoc | bool', -\ 'ps_close_image(': 'resource psdoc, int imageid | void', -\ 'ps_closepath(': 'resource psdoc | bool', -\ 'ps_closepath_stroke(': 'resource psdoc | bool', -\ 'ps_continue_text(': 'resource psdoc, string text | bool', -\ 'ps_curveto(': 'resource psdoc, float x1, float y1, float x2, float y2, float x3, float y3 | bool', -\ 'ps_delete(': 'resource psdoc | bool', -\ 'ps_end_page(': 'resource psdoc | bool', -\ 'ps_end_pattern(': 'resource psdoc | bool', -\ 'ps_end_template(': 'resource psdoc | bool', -\ 'ps_fill(': 'resource psdoc | bool', -\ 'ps_fill_stroke(': 'resource psdoc | bool', -\ 'ps_findfont(': 'resource psdoc, string fontname, string encoding [, bool embed] | int', -\ 'ps_get_buffer(': 'resource psdoc | string', -\ 'ps_get_parameter(': 'resource psdoc, string name [, float modifier] | string', -\ 'ps_get_value(': 'resource psdoc, string name [, float modifier] | float', -\ 'ps_hyphenate(': 'resource psdoc, string text | array', -\ 'ps_lineto(': 'resource psdoc, float x, float y | bool', -\ 'ps_makespotcolor(': 'resource psdoc, string name [, float reserved] | int', -\ 'ps_moveto(': 'resource psdoc, float x, float y | bool', -\ 'ps_new(': 'void | resource', -\ 'ps_open_file(': 'resource psdoc [, string filename] | bool', -\ 'ps_open_image_file(': 'resource psdoc, string type, string filename [, string stringparam [, int intparam]] | int', -\ 'ps_open_image(': 'resource psdoc, string type, string source, string data, int lenght, int width, int height, int components, int bpc, string params | int', -\ 'pspell_add_to_personal(': 'int dictionary_link, string word | bool', -\ 'pspell_add_to_session(': 'int dictionary_link, string word | bool', -\ 'pspell_check(': 'int dictionary_link, string word | bool', -\ 'pspell_clear_session(': 'int dictionary_link | bool', -\ 'pspell_config_create(': 'string language [, string spelling [, string jargon [, string encoding]]] | int', -\ 'pspell_config_data_dir(': 'int conf, string directory | bool', -\ 'pspell_config_dict_dir(': 'int conf, string directory | bool', -\ 'pspell_config_ignore(': 'int dictionary_link, int n | bool', -\ 'pspell_config_mode(': 'int dictionary_link, int mode | bool', -\ 'pspell_config_personal(': 'int dictionary_link, string file | bool', -\ 'pspell_config_repl(': 'int dictionary_link, string file | bool', -\ 'pspell_config_runtogether(': 'int dictionary_link, bool flag | bool', -\ 'pspell_config_save_repl(': 'int dictionary_link, bool flag | bool', -\ 'pspell_new_config(': 'int config | int', -\ 'pspell_new(': 'string language [, string spelling [, string jargon [, string encoding [, int mode]]]] | int', -\ 'pspell_new_personal(': 'string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]] | int', -\ 'pspell_save_wordlist(': 'int dictionary_link | bool', -\ 'pspell_store_replacement(': 'int dictionary_link, string misspelled, string correct | bool', -\ 'pspell_suggest(': 'int dictionary_link, string word | array', -\ 'ps_place_image(': 'resource psdoc, int imageid, float x, float y, float scale | bool', -\ 'ps_rect(': 'resource psdoc, float x, float y, float width, float height | bool', -\ 'ps_restore(': 'resource psdoc | bool', -\ 'ps_rotate(': 'resource psdoc, float rot | bool', -\ 'ps_save(': 'resource psdoc | bool', -\ 'ps_scale(': 'resource psdoc, float x, float y | bool', -\ 'ps_set_border_color(': 'resource psdoc, float red, float green, float blue | bool', -\ 'ps_set_border_dash(': 'resource psdoc, float black, float white | bool', -\ 'ps_set_border_style(': 'resource psdoc, string style, float width | bool', -\ 'ps_setcolor(': 'resource psdoc, string type, string colorspace, float c1, float c2, float c3, float c4 | bool', -\ 'ps_setdash(': 'resource psdoc, float on, float off | bool', -\ 'ps_setflat(': 'resource psdoc, float value | bool', -\ 'ps_setfont(': 'resource psdoc, int fontid, float size | bool', -\ 'ps_setgray(': 'resource psdoc, float gray | bool', -\ 'ps_set_info(': 'resource p, string key, string val | bool', -\ 'ps_setlinecap(': 'resource psdoc, int type | bool', -\ 'ps_setlinejoin(': 'resource psdoc, int type | bool', -\ 'ps_setlinewidth(': 'resource psdoc, float width | bool', -\ 'ps_setmiterlimit(': 'resource psdoc, float value | bool', -\ 'ps_set_parameter(': 'resource psdoc, string name, string value | bool', -\ 'ps_setpolydash(': 'resource psdoc, float arr | bool', -\ 'ps_set_text_pos(': 'resource psdoc, float x, float y | bool', -\ 'ps_set_value(': 'resource psdoc, string name, float value | bool', -\ 'ps_shading(': 'resource psdoc, string type, float x0, float y0, float x1, float y1, float c1, float c2, float c3, float c4, string optlist | int', -\ 'ps_shading_pattern(': 'resource psdoc, int shadingid, string optlist | int', -\ 'ps_shfill(': 'resource psdoc, int shadingid | bool', -\ 'ps_show_boxed(': 'resource psdoc, string text, float left, float bottom, float width, float height, string hmode [, string feature] | int', -\ 'ps_show(': 'resource psdoc, string text | bool', -\ 'ps_show_xy(': 'resource psdoc, string text, float x, float y | bool', -\ 'ps_string_geometry(': 'resource psdoc, string text [, int fontid [, float size]] | array', -\ 'ps_stringwidth(': 'resource psdoc, string text [, int fontid [, float size]] | float', -\ 'ps_stroke(': 'resource psdoc | bool', -\ 'ps_symbol(': 'resource psdoc, int ord | bool', -\ 'ps_symbol_name(': 'resource psdoc, int ord [, int fontid] | string', -\ 'ps_symbol_width(': 'resource psdoc, int ord [, int fontid [, float size]] | float', -\ 'ps_translate(': 'resource psdoc, float x, float y | bool', -\ 'putenv(': 'string setting | bool', -\ 'px_close(': 'resource pxdoc | bool', -\ 'px_create_fp(': 'resource pxdoc, resource file, array fielddesc | bool', -\ 'px_date2string(': 'resource pxdoc, int value, string format | string', -\ 'px_delete(': 'resource pxdoc | bool', -\ 'px_delete_record(': 'resource pxdoc, int num | bool', -\ 'px_get_field(': 'resource pxdoc, int fieldno | array', -\ 'px_get_info(': 'resource pxdoc | array', -\ 'px_get_parameter(': 'resource pxdoc, string name | string', -\ 'px_get_record(': 'resource pxdoc, int num [, int mode] | array', -\ 'px_get_schema(': 'resource pxdoc [, int mode] | array', -\ 'px_get_value(': 'resource pxdoc, string name | float', -\ 'px_insert_record(': 'resource pxdoc, array data | int', -\ 'px_new(': 'void | resource', -\ 'px_numfields(': 'resource pxdoc | int', -\ 'px_numrecords(': 'resource pxdoc | int', -\ 'px_open_fp(': 'resource pxdoc, resource file | bool', -\ 'px_put_record(': 'resource pxdoc, array record [, int recpos] | bool', -\ 'px_retrieve_record(': 'resource pxdoc, int num [, int mode] | array', -\ 'px_set_blob_file(': 'resource pxdoc, string filename | bool', -\ 'px_set_parameter(': 'resource pxdoc, string name, string value | bool', -\ 'px_set_tablename(': 'resource pxdoc, string name | void', -\ 'px_set_targetencoding(': 'resource pxdoc, string encoding | bool', -\ 'px_set_value(': 'resource pxdoc, string name, float value | bool', -\ 'px_timestamp2string(': 'resource pxdoc, float value, string format | string', -\ 'px_update_record(': 'resource pxdoc, array data, int num | bool', -\ 'qdom_error(': 'void | string', -\ 'qdom_tree(': 'string doc | QDomDocument', -\ 'quoted_printable_decode(': 'string str | string', -\ 'quotemeta(': 'string str | string', -\ 'rad2deg(': 'float number | float', -\ 'radius_acct_open(': 'void | resource', -\ 'radius_add_server(': 'resource radius_handle, string hostname, int port, string secret, int timeout, int max_tries | bool', -\ 'radius_auth_open(': 'void | resource', -\ 'radius_close(': 'resource radius_handle | bool', -\ 'radius_config(': 'resource radius_handle, string file | bool', -\ 'radius_create_request(': 'resource radius_handle, int type | bool', -\ 'radius_cvt_addr(': 'string data | string', -\ 'radius_cvt_int(': 'string data | int', -\ 'radius_cvt_string(': 'string data | string', -\ 'radius_demangle(': 'resource radius_handle, string mangled | string', -\ 'radius_demangle_mppe_key(': 'resource radius_handle, string mangled | string', -\ 'radius_get_attr(': 'resource radius_handle | mixed', -\ 'radius_get_vendor_attr(': 'string data | array', -\ 'radius_put_addr(': 'resource radius_handle, int type, string addr | bool', -\ 'radius_put_attr(': 'resource radius_handle, int type, string value | bool', -\ 'radius_put_int(': 'resource radius_handle, int type, int value | bool', -\ 'radius_put_string(': 'resource radius_handle, int type, string value | bool', -\ 'radius_put_vendor_addr(': 'resource radius_handle, int vendor, int type, string addr | bool', -\ 'radius_put_vendor_attr(': 'resource radius_handle, int vendor, int type, string value | bool', -\ 'radius_put_vendor_int(': 'resource radius_handle, int vendor, int type, int value | bool', -\ 'radius_put_vendor_string(': 'resource radius_handle, int vendor, int type, string value | bool', -\ 'radius_request_authenticator(': 'resource radius_handle | string', -\ 'radius_send_request(': 'resource radius_handle | int', -\ 'radius_server_secret(': 'resource radius_handle | string', -\ 'radius_strerror(': 'resource radius_handle | string', -\ 'rand(': '[int min, int max] | int', -\ 'range(': 'mixed low, mixed high [, number step] | array', -\ 'rar_close(': 'resource rar_file | bool', -\ 'rar_entry_get(': 'resource rar_file, string entry_name | RarEntry', -\ 'rar_list(': 'resource rar_file | array', -\ 'rar_open(': 'string filename [, string password] | resource', -\ 'rawurldecode(': 'string str | string', -\ 'rawurlencode(': 'string str | string', -\ 'readdir(': 'resource dir_handle | string', -\ 'readfile(': 'string filename [, bool use_include_path [, resource context]] | int', -\ 'readgzfile(': 'string filename [, int use_include_path] | int', -\ 'readline_add_history(': 'string line | bool', -\ 'readline_callback_handler_install(': 'string prompt, callback callback | bool', -\ 'readline_callback_handler_remove(': 'void | bool', -\ 'readline_callback_read_char(': 'void | void', -\ 'readline_clear_history(': 'void | bool', -\ 'readline_completion_function(': 'callback function | bool', -\ 'readline(': 'string prompt | string', -\ 'readline_info(': '[string varname [, string newvalue]] | mixed', -\ 'readline_list_history(': 'void | array', -\ 'readline_on_new_line(': 'void | void', -\ 'readline_read_history(': '[string filename] | bool', -\ 'readline_redisplay(': 'void | void', -\ 'readline_write_history(': '[string filename] | bool', -\ 'readlink(': 'string path | string', -\ 'realpath(': 'string path | string', -\ 'recode_file(': 'string request, resource input, resource output | bool', -\ 'recode_string(': 'string request, string string | string', -\ 'register_shutdown_function(': 'callback function [, mixed parameter [, mixed ...]] | void', -\ 'register_tick_function(': 'callback function [, mixed arg [, mixed ...]] | bool', -\ 'rename_function(': 'string original_name, string new_name | bool', -\ 'rename(': 'string oldname, string newname [, resource context] | bool', -\ 'reset(': 'array &array | mixed', -\ 'restore_error_handler(': 'void | bool', -\ 'restore_exception_handler(': 'void | bool', -\ 'restore_include_path(': 'void | void', -\ 'rewinddir(': 'resource dir_handle | void', -\ 'rewind(': 'resource handle | bool', -\ 'rmdir(': 'string dirname [, resource context] | bool', -\ 'round(': 'float val [, int precision] | float', -\ 'rpm_close(': 'resource rpmr | boolean', -\ 'rpm_get_tag(': 'resource rpmr, int tagnum | mixed', -\ 'rpm_is_valid(': 'string filename | boolean', -\ 'rpm_open(': 'string filename | resource', -\ 'rpm_version(': 'void | string', -\ 'rsort(': 'array &array [, int sort_flags] | bool', -\ 'rtrim(': 'string str [, string charlist] | string', -\ 'runkit_class_adopt(': 'string classname, string parentname | bool', -\ 'runkit_class_emancipate(': 'string classname | bool', -\ 'runkit_constant_add(': 'string constname, mixed value | bool', -\ 'runkit_constant_redefine(': 'string constname, mixed newvalue | bool', -\ 'runkit_constant_remove(': 'string constname | bool', -\ 'runkit_function_add(': 'string funcname, string arglist, string code | bool', -\ 'runkit_function_copy(': 'string funcname, string targetname | bool', -\ 'runkit_function_redefine(': 'string funcname, string arglist, string code | bool', -\ 'runkit_function_remove(': 'string funcname | bool', -\ 'runkit_function_rename(': 'string funcname, string newname | bool', -\ 'runkit_import(': 'string filename [, int flags] | bool', -\ 'runkit_lint_file(': 'string filename | bool', -\ 'runkit_lint(': 'string code | bool', -\ 'runkit_method_add(': 'string classname, string methodname, string args, string code [, int flags] | bool', -\ 'runkit_method_copy(': 'string dClass, string dMethod, string sClass [, string sMethod] | bool', -\ 'runkit_method_redefine(': 'string classname, string methodname, string args, string code [, int flags] | bool', -\ 'runkit_method_remove(': 'string classname, string methodname | bool', -\ 'runkit_method_rename(': 'string classname, string methodname, string newname | bool', -\ 'runkit_return_value_used(': 'void | bool', -\ 'runkit_sandbox_output_handler(': 'object sandbox [, mixed callback] | mixed', -\ 'runkit_superglobals(': 'void | array', -\ 'satellite_caught_exception(': 'void | bool', -\ 'satellite_exception_id(': 'void | string', -\ 'satellite_exception_value(': 'void | OrbitStruct', -\ 'satellite_get_repository_id(': 'object obj | int', -\ 'satellite_load_idl(': 'string file | bool', -\ 'satellite_object_to_string(': 'object obj | string', -\ 'scandir(': 'string directory [, int sorting_order [, resource context]] | array', -\ 'sem_acquire(': 'resource sem_identifier | bool', -\ 'sem_get(': 'int key [, int max_acquire [, int perm [, int auto_release]]] | resource', -\ 'sem_release(': 'resource sem_identifier | bool', -\ 'sem_remove(': 'resource sem_identifier | bool', -\ 'serialize(': 'mixed value | string', -\ 'sesam_affected_rows(': 'string result_id | int', -\ 'sesam_commit(': 'void | bool', -\ 'sesam_connect(': 'string catalog, string schema, string user | bool', -\ 'sesam_diagnostic(': 'void | array', -\ 'sesam_disconnect(': 'void | bool', -\ 'sesam_errormsg(': 'void | string', -\ 'sesam_execimm(': 'string query | string', -\ 'sesam_fetch_array(': 'string result_id [, int whence [, int offset]] | array', -\ 'sesam_fetch_result(': 'string result_id [, int max_rows] | mixed', -\ 'sesam_fetch_row(': 'string result_id [, int whence [, int offset]] | array', -\ 'sesam_field_array(': 'string result_id | array', -\ 'sesam_field_name(': 'string result_id, int index | int', -\ 'sesam_free_result(': 'string result_id | int', -\ 'sesam_num_fields(': 'string result_id | int', -\ 'sesam_query(': 'string query [, bool scrollable] | string', -\ 'sesam_rollback(': 'void | bool', -\ 'sesam_seek_row(': 'string result_id, int whence [, int offset] | bool', -\ 'sesam_settransaction(': 'int isolation_level, int read_only | bool', -\ 'session_cache_expire(': '[int new_cache_expire] | int', -\ 'session_cache_limiter(': '[string cache_limiter] | string', -\ 'session_decode(': 'string data | bool', -\ 'session_destroy(': 'void | bool', -\ 'session_encode(': 'void | string', -\ 'session_get_cookie_params(': 'void | array', -\ 'session_id(': '[string id] | string', -\ 'session_is_registered(': 'string name | bool', -\ 'session_module_name(': '[string module] | string', -\ 'session_name(': '[string name] | string', -\ 'session_pgsql_add_error(': 'int error_level [, string error_message] | bool', -\ 'session_pgsql_get_error(': '[bool with_error_message] | array', -\ 'session_pgsql_get_field(': 'void | string', -\ 'session_pgsql_reset(': 'void | bool', -\ 'session_pgsql_set_field(': 'string value | bool', -\ 'session_pgsql_status(': 'void | array', -\ 'session_regenerate_id(': '[bool delete_old_session] | bool', -\ 'session_register(': 'mixed name [, mixed ...] | bool', -\ 'session_save_path(': '[string path] | string', -\ 'session_set_cookie_params(': 'int lifetime [, string path [, string domain [, bool secure]]] | void', -\ 'session_set_save_handler(': 'callback open, callback close, callback read, callback write, callback destroy, callback gc | bool', -\ 'session_start(': 'void | bool', -\ 'session_unregister(': 'string name | bool', -\ 'session_unset(': 'void | void', -\ 'session_write_close(': 'void | void', -\ 'setcookie(': 'string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]] | bool', -\ 'set_error_handler(': 'callback error_handler [, int error_types] | mixed', -\ 'set_exception_handler(': 'callback exception_handler | string', -\ 'set_include_path(': 'string new_include_path | string', -\ 'setlocale(': 'int category, string locale [, string ...] | string', -\ 'set_magic_quotes_runtime(': 'int new_setting | bool', -\ 'setrawcookie(': 'string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]] | bool', -\ 'set_time_limit(': 'int seconds | void', -\ 'settype(': 'mixed &var, string type | bool', -\ 'sha1_file(': 'string filename [, bool raw_output] | string', -\ 'sha1(': 'string str [, bool raw_output] | string', -\ 'shell_exec(': 'string cmd | string', -\ 'shm_attach(': 'int key [, int memsize [, int perm]] | int', -\ 'shm_detach(': 'int shm_identifier | bool', -\ 'shm_get_var(': 'int shm_identifier, int variable_key | mixed', -\ 'shmop_close(': 'int shmid | void', -\ 'shmop_delete(': 'int shmid | bool', -\ 'shmop_open(': 'int key, string flags, int mode, int size | int', -\ 'shmop_read(': 'int shmid, int start, int count | string', -\ 'shmop_size(': 'int shmid | int', -\ 'shmop_write(': 'int shmid, string data, int offset | int', -\ 'shm_put_var(': 'int shm_identifier, int variable_key, mixed variable | bool', -\ 'shm_remove(': 'int shm_identifier | bool', -\ 'shm_remove_var(': 'int shm_identifier, int variable_key | bool', -\ 'shuffle(': 'array &array | bool', -\ 'similar_text(': 'string first, string second [, float &percent] | int', -\ 'SimpleXMLElement->asXML(': '[string filename] | mixed', -\ 'simplexml_element->attributes(': '[string data] | SimpleXMLElement', -\ 'simplexml_element->children(': '[string nsprefix] | SimpleXMLElement', -\ 'SimpleXMLElement->xpath(': 'string path | array', -\ 'simplexml_import_dom(': 'DOMNode node [, string class_name] | SimpleXMLElement', -\ 'simplexml_load_file(': 'string filename [, string class_name [, int options]] | object', -\ 'simplexml_load_string(': 'string data [, string class_name [, int options]] | object', -\ 'sinh(': 'float arg | float', -\ 'sin(': 'float arg | float', -\ 'sleep(': 'int seconds | int', -\ 'snmpget(': 'string hostname, string community, string object_id [, int timeout [, int retries]] | string', -\ 'snmpgetnext(': 'string host, string community, string object_id [, int timeout [, int retries]] | string', -\ 'snmp_get_quick_print(': 'void | bool', -\ 'snmp_get_valueretrieval(': 'void | int', -\ 'snmp_read_mib(': 'string filename | bool', -\ 'snmprealwalk(': 'string host, string community, string object_id [, int timeout [, int retries]] | array', -\ 'snmp_set_enum_print(': 'int enum_print | void', -\ 'snmpset(': 'string hostname, string community, string object_id, string type, mixed value [, int timeout [, int retries]] | bool', -\ 'snmp_set_oid_numeric_print(': 'int oid_numeric_print | void', -\ 'snmp_set_quick_print(': 'bool quick_print | void', -\ 'snmp_set_valueretrieval(': 'int method | void', -\ 'snmpwalk(': 'string hostname, string community, string object_id [, int timeout [, int retries]] | array', -\ 'snmpwalkoid(': 'string hostname, string community, string object_id [, int timeout [, int retries]] | array', -\ 'socket_accept(': 'resource socket | resource', -\ 'socket_bind(': 'resource socket, string address [, int port] | bool', -\ 'socket_clear_error(': '[resource socket] | void', -\ 'socket_close(': 'resource socket | void', -\ 'socket_connect(': 'resource socket, string address [, int port] | bool', -\ 'socket_create(': 'int domain, int type, int protocol | resource', -\ 'socket_create_listen(': 'int port [, int backlog] | resource', -\ 'socket_create_pair(': 'int domain, int type, int protocol, array &fd | bool', -\ 'socket_get_option(': 'resource socket, int level, int optname | mixed', -\ 'socket_getpeername(': 'resource socket, string &addr [, int &port] | bool', -\ 'socket_getsockname(': 'resource socket, string &addr [, int &port] | bool', -\ 'socket_last_error(': '[resource socket] | int', -\ 'socket_listen(': 'resource socket [, int backlog] | bool', -\ 'socket_read(': 'resource socket, int length [, int type] | string', -\ 'socket_recvfrom(': 'resource socket, string &buf, int len, int flags, string &name [, int &port] | int', -\ 'socket_recv(': 'resource socket, string &buf, int len, int flags | int', -\ 'socket_select(': 'array &read, array &write, array &except, int tv_sec [, int tv_usec] | int', -\ 'socket_send(': 'resource socket, string buf, int len, int flags | int', -\ 'socket_sendto(': 'resource socket, string buf, int len, int flags, string addr [, int port] | int', -\ 'socket_set_block(': 'resource socket | bool', -\ 'socket_set_nonblock(': 'resource socket | bool', -\ 'socket_set_option(': 'resource socket, int level, int optname, mixed optval | bool', -\ 'socket_shutdown(': 'resource socket [, int how] | bool', -\ 'socket_strerror(': 'int errno | string', -\ 'socket_write(': 'resource socket, string buffer [, int length] | int', -\ 'sort(': 'array &array [, int sort_flags] | bool', -\ 'soundex(': 'string str | string', -\ 'spl_classes(': 'void | array', -\ 'split(': 'string pattern, string string [, int limit] | array', -\ 'spliti(': 'string pattern, string string [, int limit] | array', -\ 'sprintf(': 'string format [, mixed args [, mixed ...]] | string', -\ 'sqlite_array_query(': 'resource dbhandle, string query [, int result_type [, bool decode_binary]] | array', -\ 'sqlite_busy_timeout(': 'resource dbhandle, int milliseconds | void', -\ 'sqlite_changes(': 'resource dbhandle | int', -\ 'sqlite_close(': 'resource dbhandle | void', -\ 'sqlite_column(': 'resource result, mixed index_or_name [, bool decode_binary] | mixed', -\ 'sqlite_create_aggregate(': 'resource dbhandle, string function_name, callback step_func, callback finalize_func [, int num_args] | void', -\ 'sqlite_create_function(': 'resource dbhandle, string function_name, callback callback [, int num_args] | void', -\ 'sqlite_current(': 'resource result [, int result_type [, bool decode_binary]] | array', -\ 'sqlite_error_string(': 'int error_code | string', -\ 'sqlite_escape_string(': 'string item | string', -\ 'sqlite_exec(': 'resource dbhandle, string query [, string &error_msg] | bool', -\ 'sqlite_factory(': 'string filename [, int mode [, string &error_message]] | SQLiteDatabase', -\ 'sqlite_fetch_all(': 'resource result [, int result_type [, bool decode_binary]] | array', -\ 'sqlite_fetch_array(': 'resource result [, int result_type [, bool decode_binary]] | array', -\ 'sqlite_fetch_column_types(': 'string table_name, resource dbhandle [, int result_type] | array', -\ 'sqlite_fetch_object(': 'resource result [, string class_name [, array ctor_params [, bool decode_binary]]] | object', -\ 'sqlite_fetch_single(': 'resource result [, bool decode_binary] | string', -\ 'sqlite_field_name(': 'resource result, int field_index | string', -\ 'sqlite_has_more(': 'resource result | bool', -\ 'sqlite_has_prev(': 'resource result | bool', -\ 'sqlite_key(': 'resource result | int', -\ 'sqlite_last_error(': 'resource dbhandle | int', -\ 'sqlite_last_insert_rowid(': 'resource dbhandle | int', -\ 'sqlite_libencoding(': 'void | string', -\ 'sqlite_libversion(': 'void | string', -\ 'sqlite_next(': 'resource result | bool', -\ 'sqlite_num_fields(': 'resource result | int', -\ 'sqlite_num_rows(': 'resource result | int', -\ 'sqlite_open(': 'string filename [, int mode [, string &error_message]] | resource', -\ 'sqlite_popen(': 'string filename [, int mode [, string &error_message]] | resource', -\ 'sqlite_prev(': 'resource result | bool', -\ 'sqlite_query(': 'resource dbhandle, string query [, int result_type [, string &error_msg]] | resource', -\ 'sqlite_rewind(': 'resource result | bool', -\ 'sqlite_seek(': 'resource result, int rownum | bool', -\ 'sqlite_single_query(': 'resource db, string query [, bool first_row_only [, bool decode_binary]] | array', -\ 'sqlite_udf_decode_binary(': 'string data | string', -\ 'sqlite_udf_encode_binary(': 'string data | string', -\ 'sqlite_unbuffered_query(': 'resource dbhandle, string query [, int result_type [, string &error_msg]] | resource', -\ 'sqlite_valid(': 'resource result | bool', -\ 'sql_regcase(': 'string string | string', -\ 'sqrt(': 'float arg | float', -\ 'srand(': '[int seed] | void', -\ 'sscanf(': 'string str, string format [, mixed &...] | mixed', -\ 'ssh2_auth_hostbased_file(': 'resource session, string username, string hostname, string pubkeyfile, string privkeyfile [, string passphrase [, string local_username]] | bool', -\ 'ssh2_auth_none(': 'resource session, string username | mixed', -\ 'ssh2_auth_password(': 'resource session, string username, string password | bool', -\ 'ssh2_auth_pubkey_file(': 'resource session, string username, string pubkeyfile, string privkeyfile [, string passphrase] | bool', -\ 'ssh2_connect(': 'string host [, int port [, array methods [, array callbacks]]] | resource', -\ 'ssh2_exec(': 'resource session, string command [, string pty [, array env [, int width [, int height [, int width_height_type]]]]] | resource', -\ 'ssh2_fetch_stream(': 'resource channel, int streamid | resource', -\ 'ssh2_fingerprint(': 'resource session [, int flags] | string', -\ 'ssh2_methods_negotiated(': 'resource session | array', -\ 'ssh2_publickey_add(': 'resource pkey, string algoname, string blob [, bool overwrite [, array attributes]] | bool', -\ 'ssh2_publickey_init(': 'resource session | resource', -\ 'ssh2_publickey_list(': 'resource pkey | array', -\ 'ssh2_publickey_remove(': 'resource pkey, string algoname, string blob | bool', -\ 'ssh2_scp_recv(': 'resource session, string remote_file, string local_file | bool', -\ 'ssh2_scp_send(': 'resource session, string local_file, string remote_file [, int create_mode] | bool', -\ 'ssh2_sftp(': 'resource session | resource', -\ 'ssh2_sftp_lstat(': 'resource sftp, string path | array', -\ 'ssh2_sftp_mkdir(': 'resource sftp, string dirname [, int mode [, bool recursive]] | bool', -\ 'ssh2_sftp_readlink(': 'resource sftp, string link | string', -\ 'ssh2_sftp_realpath(': 'resource sftp, string filename | string', -\ 'ssh2_sftp_rename(': 'resource sftp, string from, string to | bool', -\ 'ssh2_sftp_rmdir(': 'resource sftp, string dirname | bool', -\ 'ssh2_sftp_stat(': 'resource sftp, string path | array', -\ 'ssh2_sftp_symlink(': 'resource sftp, string target, string link | bool', -\ 'ssh2_sftp_unlink(': 'resource sftp, string filename | bool', -\ 'ssh2_shell(': 'resource session [, string term_type [, array env [, int width [, int height [, int width_height_type]]]]] | resource', -\ 'ssh2_tunnel(': 'resource session, string host, int port | resource', -\ 'stat(': 'string filename | array', -\ 'stats_absolute_deviation(': 'array a | float', -\ 'stats_cdf_beta(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_binomial(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_cauchy(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_chisquare(': 'float par1, float par2, int which | float', -\ 'stats_cdf_exponential(': 'float par1, float par2, int which | float', -\ 'stats_cdf_f(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_gamma(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_laplace(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_logistic(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_negative_binomial(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_noncentral_chisquare(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_noncentral_f(': 'float par1, float par2, float par3, float par4, int which | float', -\ 'stats_cdf_poisson(': 'float par1, float par2, int which | float', -\ 'stats_cdf_t(': 'float par1, float par2, int which | float', -\ 'stats_cdf_uniform(': 'float par1, float par2, float par3, int which | float', -\ 'stats_cdf_weibull(': 'float par1, float par2, float par3, int which | float', -\ 'stats_covariance(': 'array a, array b | float', -\ 'stats_dens_beta(': 'float x, float a, float b | float', -\ 'stats_dens_cauchy(': 'float x, float ave, float stdev | float', -\ 'stats_dens_chisquare(': 'float x, float dfr | float', -\ 'stats_dens_exponential(': 'float x, float scale | float', -\ 'stats_dens_f(': 'float x, float dfr1, float dfr2 | float', -\ 'stats_dens_gamma(': 'float x, float shape, float scale | float', -\ 'stats_dens_laplace(': 'float x, float ave, float stdev | float', -\ 'stats_dens_logistic(': 'float x, float ave, float stdev | float', -\ 'stats_dens_negative_binomial(': 'float x, float n, float pi | float', -\ 'stats_dens_normal(': 'float x, float ave, float stdev | float', -\ 'stats_dens_pmf_binomial(': 'float x, float n, float pi | float', -\ 'stats_dens_pmf_hypergeometric(': 'float n1, float n2, float N1, float N2 | float', -\ 'stats_dens_pmf_poisson(': 'float x, float lb | float', -\ 'stats_dens_t(': 'float x, float dfr | float', -\ 'stats_dens_weibull(': 'float x, float a, float b | float', -\ 'stats_den_uniform(': 'float x, float a, float b | float', -\ 'stats_harmonic_mean(': 'array a | number', -\ 'stats_kurtosis(': 'array a | float', -\ 'stats_rand_gen_beta(': 'float a, float b | float', -\ 'stats_rand_gen_chisquare(': 'float df | float', -\ 'stats_rand_gen_exponential(': 'float av | float', -\ 'stats_rand_gen_f(': 'float dfn, float dfd | float', -\ 'stats_rand_gen_funiform(': 'float low, float high | float', -\ 'stats_rand_gen_gamma(': 'float a, float r | float', -\ 'stats_rand_gen_ibinomial(': 'int n, float pp | int', -\ 'stats_rand_gen_ibinomial_negative(': 'int n, float p | int', -\ 'stats_rand_gen_int(': 'void | int', -\ 'stats_rand_gen_ipoisson(': 'float mu | int', -\ 'stats_rand_gen_iuniform(': 'int low, int high | int', -\ 'stats_rand_gen_noncenral_chisquare(': 'float df, float xnonc | float', -\ 'stats_rand_gen_noncentral_f(': 'float dfn, float dfd, float xnonc | float', -\ 'stats_rand_gen_noncentral_t(': 'float df, float xnonc | float', -\ 'stats_rand_gen_normal(': 'float av, float sd | float', -\ 'stats_rand_gen_t(': 'float df | float', -\ 'stats_rand_get_seeds(': 'void | array', -\ 'stats_rand_phrase_to_seeds(': 'string phrase | array', -\ 'stats_rand_ranf(': 'void | float', -\ 'stats_rand_setall(': 'int iseed1, int iseed2 | void', -\ 'stats_skew(': 'array a | float', -\ 'stats_standard_deviation(': 'array a [, bool sample] | float', -\ 'stats_stat_binomial_coef(': 'int x, int n | float', -\ 'stats_stat_correlation(': 'array arr1, array arr2 | float', -\ 'stats_stat_gennch(': 'int n | float', -\ 'stats_stat_independent_t(': 'array arr1, array arr2 | float', -\ 'stats_stat_innerproduct(': 'array arr1, array arr2 | float', -\ 'stats_stat_noncentral_t(': 'float par1, float par2, float par3, int which | float', -\ 'stats_stat_paired_t(': 'array arr1, array arr2 | float', -\ 'stats_stat_percentile(': 'float df, float xnonc | float', -\ 'stats_stat_powersum(': 'array arr, float power | float', -\ 'stats_variance(': 'array a [, bool sample] | float', -\ 'strcasecmp(': 'string str1, string str2 | int', -\ 'strcmp(': 'string str1, string str2 | int', -\ 'strcoll(': 'string str1, string str2 | int', -\ 'strcspn(': 'string str1, string str2 [, int start [, int length]] | int', -\ 'stream_bucket_append(': 'resource brigade, resource bucket | void', -\ 'stream_bucket_make_writeable(': 'resource brigade | object', -\ 'stream_bucket_new(': 'resource stream, string buffer | object', -\ 'stream_bucket_prepend(': 'resource brigade, resource bucket | void', -\ 'stream_context_create(': '[array options] | resource', -\ 'stream_context_get_default(': '[array options] | resource', -\ 'stream_context_get_options(': 'resource stream_or_context | array', -\ 'stream_context_set_option(': 'resource stream_or_context, string wrapper, string option, mixed value | bool', -\ 'stream_context_set_params(': 'resource stream_or_context, array params | bool', -\ 'stream_copy_to_stream(': 'resource source, resource dest [, int maxlength [, int offset]] | int', -\ 'stream_filter_append(': 'resource stream, string filtername [, int read_write [, mixed params]] | resource', -\ 'stream_filter_prepend(': 'resource stream, string filtername [, int read_write [, mixed params]] | resource', -\ 'stream_filter_register(': 'string filtername, string classname | bool', -\ 'stream_filter_remove(': 'resource stream_filter | bool', -\ 'stream_get_contents(': 'resource handle [, int maxlength [, int offset]] | string', -\ 'stream_get_filters(': 'void | array', -\ 'stream_get_line(': 'resource handle, int length [, string ending] | string', -\ 'stream_get_meta_data(': 'resource stream | array', -\ 'stream_get_transports(': 'void | array', -\ 'stream_get_wrappers(': 'void | array', -\ 'stream_select(': 'array &read, array &write, array &except, int tv_sec [, int tv_usec] | int', -\ 'stream_set_blocking(': 'resource stream, int mode | bool', -\ 'stream_set_timeout(': 'resource stream, int seconds [, int microseconds] | bool', -\ 'stream_set_write_buffer(': 'resource stream, int buffer | int', -\ 'stream_socket_accept(': 'resource server_socket [, float timeout [, string &peername]] | resource', -\ 'stream_socket_client(': 'string remote_socket [, int &errno [, string &errstr [, float timeout [, int flags [, resource context]]]]] | resource', -\ 'stream_socket_enable_crypto(': 'resource stream, bool enable [, int crypto_type [, resource session_stream]] | mixed', -\ 'stream_socket_get_name(': 'resource handle, bool want_peer | string', -\ 'stream_socket_pair(': 'int domain, int type, int protocol | array', -\ 'stream_socket_recvfrom(': 'resource socket, int length [, int flags [, string &address]] | string', -\ 'stream_socket_sendto(': 'resource socket, string data [, int flags [, string address]] | int', -\ 'stream_socket_server(': 'string local_socket [, int &errno [, string &errstr [, int flags [, resource context]]]] | resource', -\ 'stream_wrapper_register(': 'string protocol, string classname | bool', -\ 'stream_wrapper_restore(': 'string protocol | bool', -\ 'stream_wrapper_unregister(': 'string protocol | bool', -\ 'strftime(': 'string format [, int timestamp] | string', -\ 'stripcslashes(': 'string str | string', -\ 'stripos(': 'string haystack, string needle [, int offset] | int', -\ 'stripslashes(': 'string str | string', -\ 'strip_tags(': 'string str [, string allowable_tags] | string', -\ 'str_ireplace(': 'mixed search, mixed replace, mixed subject [, int &count] | mixed', -\ 'stristr(': 'string haystack, string needle | string', -\ 'strlen(': 'string string | int', -\ 'strnatcasecmp(': 'string str1, string str2 | int', -\ 'strnatcmp(': 'string str1, string str2 | int', -\ 'strncasecmp(': 'string str1, string str2, int len | int', -\ 'strncmp(': 'string str1, string str2, int len | int', -\ 'str_pad(': 'string input, int pad_length [, string pad_string [, int pad_type]] | string', -\ 'strpbrk(': 'string haystack, string char_list | string', -\ 'strpos(': 'string haystack, mixed needle [, int offset] | int', -\ 'strptime(': 'string date, string format | array', -\ 'strrchr(': 'string haystack, string needle | string', -\ 'str_repeat(': 'string input, int multiplier | string', -\ 'str_replace(': 'mixed search, mixed replace, mixed subject [, int &count] | mixed', -\ 'strrev(': 'string string | string', -\ 'strripos(': 'string haystack, string needle [, int offset] | int', -\ 'str_rot13(': 'string str | string', -\ 'strrpos(': 'string haystack, string needle [, int offset] | int', -\ 'str_shuffle(': 'string str | string', -\ 'str_split(': 'string string [, int split_length] | array', -\ 'strspn(': 'string str1, string str2 [, int start [, int length]] | int', -\ 'strstr(': 'string haystack, string needle | string', -\ 'strtok(': 'string str, string token | string', -\ 'strtolower(': 'string str | string', -\ 'strtotime(': 'string time [, int now] | int', -\ 'strtoupper(': 'string string | string', -\ 'strtr(': 'string str, string from, string to | string', -\ 'strval(': 'mixed var | string', -\ 'str_word_count(': 'string string [, int format [, string charlist]] | mixed', -\ 'substr_compare(': 'string main_str, string str, int offset [, int length [, bool case_insensitivity]] | int', -\ 'substr_count(': 'string haystack, string needle [, int offset [, int length]] | int', -\ 'substr(': 'string string, int start [, int length] | string', -\ 'substr_replace(': 'mixed string, string replacement, int start [, int length] | mixed', -\ 'swf_actiongeturl(': 'string url, string target | void', -\ 'swf_actiongotoframe(': 'int framenumber | void', -\ 'swf_actiongotolabel(': 'string label | void', -\ 'swfaction(': 'string script | SWFAction', -\ 'swf_actionnextframe(': 'void | void', -\ 'swf_actionplay(': 'void | void', -\ 'swf_actionprevframe(': 'void | void', -\ 'swf_actionsettarget(': 'string target | void', -\ 'swf_actionstop(': 'void | void', -\ 'swf_actiontogglequality(': 'void | void', -\ 'swf_actionwaitforframe(': 'int framenumber, int skipcount | void', -\ 'swf_addbuttonrecord(': 'int states, int shapeid, int depth | void', -\ 'swf_addcolor(': 'float r, float g, float b, float a | void', -\ 'swfbitmap->getheight(': 'void | float', -\ 'swfbitmap->getwidth(': 'void | float', -\ 'swfbitmap(': 'mixed file [, mixed alphafile] | SWFBitmap', -\ 'swfbutton->addaction(': 'resource action, int flags | void', -\ 'swfbutton->addshape(': 'resource shape, int flags | void', -\ 'swfbutton(': 'void | SWFButton', -\ 'swfbutton->setaction(': 'resource action | void', -\ 'swfbutton->setdown(': 'resource shape | void', -\ 'swfbutton->sethit(': 'resource shape | void', -\ 'swfbutton->setover(': 'resource shape | void', -\ 'swfbutton->setup(': 'resource shape | void', -\ 'swf_closefile(': '[int return_file] | void', -\ 'swf_definebitmap(': 'int objid, string image_name | void', -\ 'swf_definefont(': 'int fontid, string fontname | void', -\ 'swf_defineline(': 'int objid, float x1, float y1, float x2, float y2, float width | void', -\ 'swf_definepoly(': 'int objid, array coords, int npoints, float width | void', -\ 'swf_definerect(': 'int objid, float x1, float y1, float x2, float y2, float width | void', -\ 'swf_definetext(': 'int objid, string str, int docenter | void', -\ 'swfdisplayitem->addcolor(': 'int red, int green, int blue [, int a] | void', -\ 'swfdisplayitem->move(': 'int dx, int dy | void', -\ 'swfdisplayitem->moveto(': 'int x, int y | void', -\ 'swfdisplayitem->multcolor(': 'int red, int green, int blue [, int a] | void', -\ 'swfdisplayitem->remove(': 'void | void', -\ 'swfdisplayitem->rotate(': 'float ddegrees | void', -\ 'swfdisplayitem->rotateto(': 'float degrees | void', -\ 'swfdisplayitem->scale(': 'int dx, int dy | void', -\ 'swfdisplayitem->scaleto(': 'int x [, int y] | void', -\ 'swfdisplayitem->setdepth(': 'float depth | void', -\ 'swfdisplayitem->setname(': 'string name | void', -\ 'swfdisplayitem->setratio(': 'float ratio | void', -\ 'swfdisplayitem->skewx(': 'float ddegrees | void', -\ 'swfdisplayitem->skewxto(': 'float degrees | void', -\ 'swfdisplayitem->skewy(': 'float ddegrees | void', -\ 'swfdisplayitem->skewyto(': 'float degrees | void', -\ 'swf_endbutton(': 'void | void', -\ 'swf_enddoaction(': 'void | void', -\ 'swf_endshape(': 'void | void', -\ 'swf_endsymbol(': 'void | void', -\ 'swffill(': 'void | SWFFill', -\ 'swffill->moveto(': 'int x, int y | void', -\ 'swffill->rotateto(': 'float degrees | void', -\ 'swffill->scaleto(': 'int x [, int y] | void', -\ 'swffill->skewxto(': 'float x | void', -\ 'swffill->skewyto(': 'float y | void', -\ 'swffont->getwidth(': 'string string | float', -\ 'swffont(': 'string filename | SWFFont', -\ 'swf_fontsize(': 'float size | void', -\ 'swf_fontslant(': 'float slant | void', -\ 'swf_fonttracking(': 'float tracking | void', -\ 'swf_getbitmapinfo(': 'int bitmapid | array', -\ 'swf_getfontinfo(': 'void | array', -\ 'swf_getframe(': 'void | int', -\ 'swfgradient->addentry(': 'float ratio, int red, int green, int blue [, int a] | void', -\ 'swfgradient(': 'void | SWFGradient', -\ 'swf_labelframe(': 'string name | void', -\ 'swf_lookat(': 'float view_x, float view_y, float view_z, float reference_x, float reference_y, float reference_z, float twist | void', -\ 'swf_modifyobject(': 'int depth, int how | void', -\ 'swfmorph->getshape1(': 'void | mixed', -\ 'swfmorph->getshape2(': 'void | mixed', -\ 'swfmorph(': 'void | SWFMorph', -\ 'swfmovie->add(': 'resource instance | void', -\ 'swfmovie(': 'void | SWFMovie', -\ 'swfmovie->nextframe(': 'void | void', -\ 'swfmovie->output(': '[int compression] | int', -\ 'swfmovie->remove(': 'resource instance | void', -\ 'swfmovie->save(': 'string filename [, int compression] | int', -\ 'swfmovie->setbackground(': 'int red, int green, int blue | void', -\ 'swfmovie->setdimension(': 'int width, int height | void', -\ 'swfmovie->setframes(': 'string numberofframes | void', -\ 'swfmovie->setrate(': 'int rate | void', -\ 'swfmovie->streammp3(': 'mixed mp3File | void', -\ 'swf_mulcolor(': 'float r, float g, float b, float a | void', -\ 'swf_nextid(': 'void | int', -\ 'swf_oncondition(': 'int transition | void', -\ 'swf_openfile(': 'string filename, float width, float height, float framerate, float r, float g, float b | void', -\ 'swf_ortho2(': 'float xmin, float xmax, float ymin, float ymax | void', -\ 'swf_ortho(': 'float xmin, float xmax, float ymin, float ymax, float zmin, float zmax | void', -\ 'swf_perspective(': 'float fovy, float aspect, float near, float far | void', -\ 'swf_placeobject(': 'int objid, int depth | void', -\ 'swf_polarview(': 'float dist, float azimuth, float incidence, float twist | void', -\ 'swf_popmatrix(': 'void | void', -\ 'swf_posround(': 'int round | void', -\ 'SWFPrebuiltClip(': '[string file] | SWFPrebuiltClip', -\ 'swf_pushmatrix(': 'void | void', -\ 'swf_removeobject(': 'int depth | void', -\ 'swf_rotate(': 'float angle, string axis | void', -\ 'swf_scale(': 'float x, float y, float z | void', -\ 'swf_setfont(': 'int fontid | void', -\ 'swf_setframe(': 'int framenumber | void', -\ 'SWFShape->addFill(': 'int red, int green, int blue [, int a] | SWFFill', -\ 'swf_shapearc(': 'float x, float y, float r, float ang1, float ang2 | void', -\ 'swf_shapecurveto3(': 'float x1, float y1, float x2, float y2, float x3, float y3 | void', -\ 'swf_shapecurveto(': 'float x1, float y1, float x2, float y2 | void', -\ 'swfshape->drawcurve(': 'int controldx, int controldy, int anchordx, int anchordy [, int targetdx, int targetdy] | int', -\ 'swfshape->drawcurveto(': 'int controlx, int controly, int anchorx, int anchory [, int targetx, int targety] | int', -\ 'swfshape->drawline(': 'int dx, int dy | void', -\ 'swfshape->drawlineto(': 'int x, int y | void', -\ 'swf_shapefillbitmapclip(': 'int bitmapid | void', -\ 'swf_shapefillbitmaptile(': 'int bitmapid | void', -\ 'swf_shapefilloff(': 'void | void', -\ 'swf_shapefillsolid(': 'float r, float g, float b, float a | void', -\ 'swfshape(': 'void | SWFShape', -\ 'swf_shapelinesolid(': 'float r, float g, float b, float a, float width | void', -\ 'swf_shapelineto(': 'float x, float y | void', -\ 'swfshape->movepen(': 'int dx, int dy | void', -\ 'swfshape->movepento(': 'int x, int y | void', -\ 'swf_shapemoveto(': 'float x, float y | void', -\ 'swfshape->setleftfill(': 'swfgradient fill | void', -\ 'swfshape->setline(': 'swfshape shape | void', -\ 'swfshape->setrightfill(': 'swfgradient fill | void', -\ 'swf_showframe(': 'void | void', -\ 'SWFSound(': 'string filename, int flags | SWFSound', -\ 'swfsprite->add(': 'resource object | void', -\ 'swfsprite(': 'void | SWFSprite', -\ 'swfsprite->nextframe(': 'void | void', -\ 'swfsprite->remove(': 'resource object | void', -\ 'swfsprite->setframes(': 'int numberofframes | void', -\ 'swf_startbutton(': 'int objid, int type | void', -\ 'swf_startdoaction(': 'void | void', -\ 'swf_startshape(': 'int objid | void', -\ 'swf_startsymbol(': 'int objid | void', -\ 'swftext->addstring(': 'string string | void', -\ 'swftextfield->addstring(': 'string string | void', -\ 'swftextfield->align(': 'int alignement | void', -\ 'swftextfield(': '[int flags] | SWFTextField', -\ 'swftextfield->setbounds(': 'int width, int height | void', -\ 'swftextfield->setcolor(': 'int red, int green, int blue [, int a] | void', -\ 'swftextfield->setfont(': 'string font | void', -\ 'swftextfield->setheight(': 'int height | void', -\ 'swftextfield->setindentation(': 'int width | void', -\ 'swftextfield->setleftmargin(': 'int width | void', -\ 'swftextfield->setlinespacing(': 'int height | void', -\ 'swftextfield->setmargins(': 'int left, int right | void', -\ 'swftextfield->setname(': 'string name | void', -\ 'swftextfield->setrightmargin(': 'int width | void', -\ 'swftext->getwidth(': 'string string | float', -\ 'swftext(': 'void | SWFText', -\ 'swftext->moveto(': 'int x, int y | void', -\ 'swftext->setcolor(': 'int red, int green, int blue [, int a] | void', -\ 'swftext->setfont(': 'string font | void', -\ 'swftext->setheight(': 'int height | void', -\ 'swftext->setspacing(': 'float spacing | void', -\ 'swf_textwidth(': 'string str | float', -\ 'swf_translate(': 'float x, float y, float z | void', -\ 'SWFVideoStream(': '[string file] | SWFVideoStream', -\ 'swf_viewport(': 'float xmin, float xmax, float ymin, float ymax | void', -\ 'sybase_affected_rows(': '[resource link_identifier] | int', -\ 'sybase_close(': '[resource link_identifier] | bool', -\ 'sybase_connect(': '[string servername [, string username [, string password [, string charset [, string appname]]]]] | resource', -\ 'sybase_data_seek(': 'resource result_identifier, int row_number | bool', -\ 'sybase_deadlock_retry_count(': 'int retry_count | void', -\ 'sybase_fetch_array(': 'resource result | array', -\ 'sybase_fetch_assoc(': 'resource result | array', -\ 'sybase_fetch_field(': 'resource result [, int field_offset] | object', -\ 'sybase_fetch_object(': 'resource result [, mixed object] | object', -\ 'sybase_fetch_row(': 'resource result | array', -\ 'sybase_field_seek(': 'resource result, int field_offset | bool', -\ 'sybase_free_result(': 'resource result | bool', -\ 'sybase_get_last_message(': 'void | string', -\ 'sybase_min_client_severity(': 'int severity | void', -\ 'sybase_min_error_severity(': 'int severity | void', -\ 'sybase_min_message_severity(': 'int severity | void', -\ 'sybase_min_server_severity(': 'int severity | void', -\ 'sybase_num_fields(': 'resource result | int', -\ 'sybase_num_rows(': 'resource result | int', -\ 'sybase_pconnect(': '[string servername [, string username [, string password [, string charset [, string appname]]]]] | resource', -\ 'sybase_query(': 'string query [, resource link_identifier] | mixed', -\ 'sybase_result(': 'resource result, int row, mixed field | string', -\ 'sybase_select_db(': 'string database_name [, resource link_identifier] | bool', -\ 'sybase_set_message_handler(': 'callback handler [, resource connection] | bool', -\ 'sybase_unbuffered_query(': 'string query, resource link_identifier [, bool store_result] | resource', -\ 'symlink(': 'string target, string link | bool', -\ 'sys_getloadavg(': 'void | array', -\ 'syslog(': 'int priority, string message | bool', -\ 'system(': 'string command [, int &return_var] | string', -\ 'tanh(': 'float arg | float', -\ 'tan(': 'float arg | float', -\ 'tcpwrap_check(': 'string daemon, string address [, string user [, bool nodns]] | bool', -\ 'tempnam(': 'string dir, string prefix | string', -\ 'textdomain(': 'string text_domain | string', -\ 'tidy_access_count(': 'tidy object | int', -\ 'tidy_config_count(': 'tidy object | int', -\ 'tidy_error_count(': 'tidy object | int', -\ 'tidy_get_output(': 'tidy object | string', -\ 'tidy_load_config(': 'string filename, string encoding | void', -\ 'tidy_node->get_attr(': 'int attrib_id | tidy_attr', -\ 'tidy_node->get_nodes(': 'int node_id | array', -\ 'tidyNode->hasChildren(': 'void | bool', -\ 'tidyNode->hasSiblings(': 'void | bool', -\ 'tidyNode->isAsp(': 'void | bool', -\ 'tidyNode->isComment(': 'void | bool', -\ 'tidyNode->isHtml(': 'void | bool', -\ 'tidyNode->isJste(': 'void | bool', -\ 'tidyNode->isPhp(': 'void | bool', -\ 'tidyNode->isText(': 'void | bool', -\ 'tidy_node->next(': 'void | tidy_node', -\ 'tidy_node->prev(': 'void | tidy_node', -\ 'tidy_repair_file(': 'string filename [, mixed config [, string encoding [, bool use_include_path]]] | string', -\ 'tidy_repair_string(': 'string data [, mixed config [, string encoding]] | string', -\ 'tidy_reset_config(': 'void | bool', -\ 'tidy_save_config(': 'string filename | bool', -\ 'tidy_set_encoding(': 'string encoding | bool', -\ 'tidy_setopt(': 'string option, mixed value | bool', -\ 'tidy_warning_count(': 'tidy object | int', -\ 'time(': 'void | int', -\ 'time_nanosleep(': 'int seconds, int nanoseconds | mixed', -\ 'time_sleep_until(': 'float timestamp | bool', -\ 'tmpfile(': 'void | resource', -\ 'token_get_all(': 'string source | array', -\ 'token_name(': 'int token | string', -\ 'touch(': 'string filename [, int time [, int atime]] | bool', -\ 'trigger_error(': 'string error_msg [, int error_type] | bool', -\ 'trim(': 'string str [, string charlist] | string', -\ 'uasort(': 'array &array, callback cmp_function | bool', -\ 'ucfirst(': 'string str | string', -\ 'ucwords(': 'string str | string', -\ 'udm_add_search_limit(': 'resource agent, int var, string val | bool', -\ 'udm_alloc_agent_array(': 'array databases | resource', -\ 'udm_alloc_agent(': 'string dbaddr [, string dbmode] | resource', -\ 'udm_api_version(': 'void | int', -\ 'udm_cat_list(': 'resource agent, string category | array', -\ 'udm_cat_path(': 'resource agent, string category | array', -\ 'udm_check_charset(': 'resource agent, string charset | bool', -\ 'udm_check_stored(': 'resource agent, int link, string doc_id | int', -\ 'udm_clear_search_limits(': 'resource agent | bool', -\ 'udm_close_stored(': 'resource agent, int link | int', -\ 'udm_crc32(': 'resource agent, string str | int', -\ 'udm_errno(': 'resource agent | int', -\ 'udm_error(': 'resource agent | string', -\ 'udm_find(': 'resource agent, string query | resource', -\ 'udm_free_agent(': 'resource agent | int', -\ 'udm_free_ispell_data(': 'int agent | bool', -\ 'udm_free_res(': 'resource res | bool', -\ 'udm_get_doc_count(': 'resource agent | int', -\ 'udm_get_res_field(': 'resource res, int row, int field | string', -\ 'udm_get_res_param(': 'resource res, int param | string', -\ 'udm_hash32(': 'resource agent, string str | int', -\ 'udm_load_ispell_data(': 'resource agent, int var, string val1, string val2, int flag | bool', -\ 'udm_open_stored(': 'resource agent, string storedaddr | int', -\ 'udm_set_agent_param(': 'resource agent, int var, string val | bool', -\ 'uksort(': 'array &array, callback cmp_function | bool', -\ 'umask(': '[int mask] | int', -\ 'unicode_encode(': 'unicode input, string encoding | string', -\ 'unicode_semantics(': 'void | bool', -\ 'uniqid(': '[string prefix [, bool more_entropy]] | string', -\ 'unixtojd(': '[int timestamp] | int', -\ 'unlink(': 'string filename [, resource context] | bool', -\ 'unpack(': 'string format, string data | array', -\ 'unregister_tick_function(': 'string function_name | void', -\ 'unserialize(': 'string str | mixed', -\ 'unset(': 'mixed var [, mixed var [, mixed ...]] | void', -\ 'urldecode(': 'string str | string', -\ 'urlencode(': 'string str | string', -\ 'use_soap_error_handler(': '[bool handler] | bool', -\ 'usleep(': 'int micro_seconds | void', -\ 'usort(': 'array &array, callback cmp_function | bool', -\ 'utf8_decode(': 'string data | string', -\ 'utf8_encode(': 'string data | string', -\ 'var_dump(': 'mixed expression [, mixed expression [, ...]] | void', -\ 'var_export(': 'mixed expression [, bool return] | mixed', -\ 'variant_abs(': 'mixed val | mixed', -\ 'variant_add(': 'mixed left, mixed right | mixed', -\ 'variant_and(': 'mixed left, mixed right | mixed', -\ 'variant_cast(': 'variant variant, int type | variant', -\ 'variant_cat(': 'mixed left, mixed right | mixed', -\ 'variant_cmp(': 'mixed left, mixed right [, int lcid [, int flags]] | int', -\ 'variant_date_from_timestamp(': 'int timestamp | variant', -\ 'variant_date_to_timestamp(': 'variant variant | int', -\ 'variant_div(': 'mixed left, mixed right | mixed', -\ 'variant_eqv(': 'mixed left, mixed right | mixed', -\ 'variant_fix(': 'mixed variant | mixed', -\ 'variant_get_type(': 'variant variant | int', -\ 'variant_idiv(': 'mixed left, mixed right | mixed', -\ 'variant_imp(': 'mixed left, mixed right | mixed', -\ 'variant_int(': 'mixed variant | mixed', -\ 'variant_mod(': 'mixed left, mixed right | mixed', -\ 'variant_mul(': 'mixed left, mixed right | mixed', -\ 'variant_neg(': 'mixed variant | mixed', -\ 'variant_not(': 'mixed variant | mixed', -\ 'variant_or(': 'mixed left, mixed right | mixed', -\ 'variant_pow(': 'mixed left, mixed right | mixed', -\ 'variant_round(': 'mixed variant, int decimals | mixed', -\ 'variant_set(': 'variant variant, mixed value | void', -\ 'variant_set_type(': 'variant variant, int type | void', -\ 'variant_sub(': 'mixed left, mixed right | mixed', -\ 'variant_xor(': 'mixed left, mixed right | mixed', -\ 'version_compare(': 'string version1, string version2 [, string operator] | mixed', -\ 'vfprintf(': 'resource handle, string format, array args | int', -\ 'virtual(': 'string filename | bool', -\ 'vpopmail_add_alias_domain_ex(': 'string olddomain, string newdomain | bool', -\ 'vpopmail_add_alias_domain(': 'string domain, string aliasdomain | bool', -\ 'vpopmail_add_domain_ex(': 'string domain, string passwd [, string quota [, string bounce [, bool apop]]] | bool', -\ 'vpopmail_add_domain(': 'string domain, string dir, int uid, int gid | bool', -\ 'vpopmail_add_user(': 'string user, string domain, string password [, string gecos [, bool apop]] | bool', -\ 'vpopmail_alias_add(': 'string user, string domain, string alias | bool', -\ 'vpopmail_alias_del_domain(': 'string domain | bool', -\ 'vpopmail_alias_del(': 'string user, string domain | bool', -\ 'vpopmail_alias_get_all(': 'string domain | array', -\ 'vpopmail_alias_get(': 'string alias, string domain | array', -\ 'vpopmail_auth_user(': 'string user, string domain, string password [, string apop] | bool', -\ 'vpopmail_del_domain_ex(': 'string domain | bool', -\ 'vpopmail_del_domain(': 'string domain | bool', -\ 'vpopmail_del_user(': 'string user, string domain | bool', -\ 'vpopmail_error(': 'void | string', -\ 'vpopmail_passwd(': 'string user, string domain, string password [, bool apop] | bool', -\ 'vpopmail_set_user_quota(': 'string user, string domain, string quota | bool', -\ 'vprintf(': 'string format, array args | int', -\ 'vsprintf(': 'string format, array args | string', -\ 'w32api_deftype(': 'string typename, string member1_type, string member1_name [, string ... [, string ...]] | bool', -\ 'w32api_init_dtype(': 'string typename, mixed value [, mixed ...] | resource', -\ 'w32api_invoke_function(': 'string funcname, mixed argument [, mixed ...] | mixed', -\ 'w32api_register_function(': 'string library, string function_name, string return_type | bool', -\ 'w32api_set_call_method(': 'int method | void', -\ 'wddx_add_vars(': 'int packet_id, mixed name_var [, mixed ...] | bool', -\ 'wddx_packet_end(': 'resource packet_id | string', -\ 'wddx_packet_start(': '[string comment] | resource', -\ 'wddx_serialize_value(': 'mixed var [, string comment] | string', -\ 'wddx_serialize_vars(': 'mixed var_name [, mixed ...] | string', -\ 'wddx_unserialize(': 'string packet | mixed', -\ 'win32_create_service(': 'array details [, string machine] | int', -\ 'win32_delete_service(': 'string servicename [, string machine] | int', -\ 'win32_get_last_control_message(': 'void | int', -\ 'win32_ps_list_procs(': 'void | array', -\ 'win32_ps_stat_mem(': 'void | array', -\ 'win32_ps_stat_proc(': '[int pid] | array', -\ 'win32_query_service_status(': 'string servicename [, string machine] | mixed', -\ 'win32_set_service_status(': 'int status | bool', -\ 'win32_start_service_ctrl_dispatcher(': 'string name | bool', -\ 'win32_start_service(': 'string servicename [, string machine] | int', -\ 'win32_stop_service(': 'string servicename [, string machine] | int', -\ 'wordwrap(': 'string str [, int width [, string break [, bool cut]]] | string', -\ 'xattr_get(': 'string filename, string name [, int flags] | string', -\ 'xattr_list(': 'string filename [, int flags] | array', -\ 'xattr_remove(': 'string filename, string name [, int flags] | bool', -\ 'xattr_set(': 'string filename, string name, string value [, int flags] | bool', -\ 'xattr_supported(': 'string filename [, int flags] | bool', -\ 'xdiff_file_diff_binary(': 'string file1, string file2, string dest | bool', -\ 'xdiff_file_diff(': 'string file1, string file2, string dest [, int context [, bool minimal]] | bool', -\ 'xdiff_file_merge3(': 'string file1, string file2, string file3, string dest | mixed', -\ 'xdiff_file_patch_binary(': 'string file, string patch, string dest | bool', -\ 'xdiff_file_patch(': 'string file, string patch, string dest [, int flags] | mixed', -\ 'xdiff_string_diff_binary(': 'string str1, string str2 | string', -\ 'xdiff_string_diff(': 'string str1, string str2 [, int context [, bool minimal]] | string', -\ 'xdiff_string_merge3(': 'string str1, string str2, string str3 [, string &error] | mixed', -\ 'xdiff_string_patch_binary(': 'string str, string patch | string', -\ 'xdiff_string_patch(': 'string str, string patch [, int flags [, string &error]] | string', -\ 'xml_error_string(': 'int code | string', -\ 'xml_get_current_byte_index(': 'resource parser | int', -\ 'xml_get_current_column_number(': 'resource parser | int', -\ 'xml_get_current_line_number(': 'resource parser | int', -\ 'xml_get_error_code(': 'resource parser | int', -\ 'xml_parse(': 'resource parser, string data [, bool is_final] | int', -\ 'xml_parse_into_struct(': 'resource parser, string data, array &values [, array &index] | int', -\ 'xml_parser_create(': '[string encoding] | resource', -\ 'xml_parser_create_ns(': '[string encoding [, string separator]] | resource', -\ 'xml_parser_free(': 'resource parser | bool', -\ 'xml_parser_get_option(': 'resource parser, int option | mixed', -\ 'xml_parser_set_option(': 'resource parser, int option, mixed value | bool', -\ 'xmlrpc_decode(': 'string xml [, string encoding] | array', -\ 'xmlrpc_decode_request(': 'string xml, string &method [, string encoding] | array', -\ 'xmlrpc_encode(': 'mixed value | string', -\ 'xmlrpc_encode_request(': 'string method, mixed params [, array output_options] | string', -\ 'xmlrpc_get_type(': 'mixed value | string', -\ 'xmlrpc_is_fault(': 'array arg | bool', -\ 'xmlrpc_parse_method_descriptions(': 'string xml | array', -\ 'xmlrpc_server_add_introspection_data(': 'resource server, array desc | int', -\ 'xmlrpc_server_call_method(': 'resource server, string xml, mixed user_data [, array output_options] | string', -\ 'xmlrpc_server_create(': 'void | resource', -\ 'xmlrpc_server_destroy(': 'resource server | int', -\ 'xmlrpc_server_register_introspection_callback(': 'resource server, string function | bool', -\ 'xmlrpc_server_register_method(': 'resource server, string method_name, string function | bool', -\ 'xmlrpc_set_type(': 'string &value, string type | bool', -\ 'xml_set_character_data_handler(': 'resource parser, callback handler | bool', -\ 'xml_set_default_handler(': 'resource parser, callback handler | bool', -\ 'xml_set_element_handler(': 'resource parser, callback start_element_handler, callback end_element_handler | bool', -\ 'xml_set_end_namespace_decl_handler(': 'resource parser, callback handler | bool', -\ 'xml_set_external_entity_ref_handler(': 'resource parser, callback handler | bool', -\ 'xml_set_notation_decl_handler(': 'resource parser, callback handler | bool', -\ 'xml_set_object(': 'resource parser, object &object | bool', -\ 'xml_set_processing_instruction_handler(': 'resource parser, callback handler | bool', -\ 'xml_set_start_namespace_decl_handler(': 'resource parser, callback handler | bool', -\ 'xml_set_unparsed_entity_decl_handler(': 'resource parser, callback handler | bool', -\ 'xmlwriter_end_attribute(': 'resource xmlwriter | bool', -\ 'xmlwriter_end_cdata(': 'resource xmlwriter | bool', -\ 'xmlwriter_end_comment(': 'resource xmlwriter | bool', -\ 'xmlwriter_end_document(': 'resource xmlwriter | bool', -\ 'xmlwriter_end_dtd_attlist(': 'resource xmlwriter | bool', -\ 'xmlwriter_end_dtd_element(': 'resource xmlwriter | bool', -\ 'xmlwriter_end_dtd_entity(': 'resource xmlwriter | bool', -\ 'xmlwriter_end_dtd(': 'resource xmlwriter | bool', -\ 'xmlwriter_end_element(': 'resource xmlwriter | bool', -\ 'xmlwriter_end_pi(': 'resource xmlwriter | bool', -\ 'xmlwriter_flush(': 'resource xmlwriter [, bool empty] | mixed', -\ 'xmlwriter_full_end_element(': 'resource xmlwriter | bool', -\ 'xmlwriter_open_memory(': 'void | resource', -\ 'xmlwriter_open_uri(': 'string source | resource', -\ 'xmlwriter_output_memory(': 'resource xmlwriter [, bool flush] | string', -\ 'xmlwriter_set_indent(': 'resource xmlwriter, bool indent | bool', -\ 'xmlwriter_set_indent_string(': 'resource xmlwriter, string indentString | bool', -\ 'xmlwriter_start_attribute(': 'resource xmlwriter, string name | bool', -\ 'xmlwriter_start_attribute_ns(': 'resource xmlwriter, string prefix, string name, string uri | bool', -\ 'xmlwriter_start_cdata(': 'resource xmlwriter | bool', -\ 'xmlwriter_start_comment(': 'resource xmlwriter | bool', -\ 'xmlwriter_start_document(': 'resource xmlwriter [, string version [, string encoding [, string standalone]]] | bool', -\ 'xmlwriter_start_dtd_attlist(': 'resource xmlwriter, string name | bool', -\ 'xmlwriter_start_dtd_element(': 'resource xmlwriter, string name | bool', -\ 'xmlwriter_start_dtd_entity(': 'resource xmlwriter, string name, bool isparam | bool', -\ 'xmlwriter_start_dtd(': 'resource xmlwriter, string name [, string pubid [, string sysid]] | bool', -\ 'xmlwriter_start_element(': 'resource xmlwriter, string name | bool', -\ 'xmlwriter_start_element_ns(': 'resource xmlwriter, string prefix, string name, string uri | bool', -\ 'xmlwriter_start_pi(': 'resource xmlwriter, string target | bool', -\ 'xmlwriter_text(': 'resource xmlwriter, string content | bool', -\ 'xmlwriter_write_attribute(': 'resource xmlwriter, string name, string content | bool', -\ 'xmlwriter_write_attribute_ns(': 'resource xmlwriter, string prefix, string name, string uri, string content | bool', -\ 'xmlwriter_write_cdata(': 'resource xmlwriter, string content | bool', -\ 'xmlwriter_write_comment(': 'resource xmlwriter, string content | bool', -\ 'xmlwriter_write_dtd_attlist(': 'resource xmlwriter, string name, string content | bool', -\ 'xmlwriter_write_dtd_element(': 'resource xmlwriter, string name, string content | bool', -\ 'xmlwriter_write_dtd_entity(': 'resource xmlwriter, string name, string content | bool', -\ 'xmlwriter_write_dtd(': 'resource xmlwriter, string name [, string pubid [, string sysid [, string subset]]] | bool', -\ 'xmlwriter_write_element(': 'resource xmlwriter, string name, string content | bool', -\ 'xmlwriter_write_element_ns(': 'resource xmlwriter, string prefix, string name, string uri, string content | bool', -\ 'xmlwriter_write_pi(': 'resource xmlwriter, string target, string content | bool', -\ 'xmlwriter_write_raw(': 'resource xmlwriter, string content | bool', -\ 'xpath_new_context(': 'domdocument dom_document | XPathContext', -\ 'xpath_register_ns_auto(': 'XPathContext xpath_context [, object context_node] | bool', -\ 'xpath_register_ns(': 'XPathContext xpath_context, string prefix, string uri | bool', -\ 'xptr_new_context(': 'void | XPathContext', -\ 'xslt_backend_info(': 'void | string', -\ 'xslt_backend_name(': 'void | string', -\ 'xslt_backend_version(': 'void | string', -\ 'xslt_create(': 'void | resource', -\ 'xslt_errno(': 'resource xh | int', -\ 'xslt_error(': 'resource xh | string', -\ 'xslt_free(': 'resource xh | void', -\ 'xslt_getopt(': 'resource processor | int', -\ 'xslt_process(': 'resource xh, string xmlcontainer, string xslcontainer [, string resultcontainer [, array arguments [, array parameters]]] | mixed', -\ 'xslt_set_base(': 'resource xh, string uri | void', -\ 'xslt_set_encoding(': 'resource xh, string encoding | void', -\ 'xslt_set_error_handler(': 'resource xh, mixed handler | void', -\ 'xslt_set_log(': 'resource xh [, mixed log] | void', -\ 'xslt_set_object(': 'resource processor, object &obj | bool', -\ 'xslt_setopt(': 'resource processor, int newmask | mixed', -\ 'xslt_set_sax_handler(': 'resource xh, array handlers | void', -\ 'xslt_set_sax_handlers(': 'resource processor, array handlers | void', -\ 'xslt_set_scheme_handler(': 'resource xh, array handlers | void', -\ 'xslt_set_scheme_handlers(': 'resource processor, array handlers | void', -\ 'yaz_addinfo(': 'resource id | string', -\ 'yaz_ccl_conf(': 'resource id, array config | void', -\ 'yaz_ccl_parse(': 'resource id, string query, array &result | bool', -\ 'yaz_close(': 'resource id | bool', -\ 'yaz_connect(': 'string zurl [, mixed options] | mixed', -\ 'yaz_database(': 'resource id, string databases | bool', -\ 'yaz_element(': 'resource id, string elementset | bool', -\ 'yaz_errno(': 'resource id | int', -\ 'yaz_error(': 'resource id | string', -\ 'yaz_es_result(': 'resource id | array', -\ 'yaz_get_option(': 'resource id, string name | string', -\ 'yaz_hits(': 'resource id [, array searchresult] | int', -\ 'yaz_itemorder(': 'resource id, array args | void', -\ 'yaz_present(': 'resource id | bool', -\ 'yaz_range(': 'resource id, int start, int number | void', -\ 'yaz_record(': 'resource id, int pos, string type | string', -\ 'yaz_scan(': 'resource id, string type, string startterm [, array flags] | void', -\ 'yaz_scan_result(': 'resource id [, array &result] | array', -\ 'yaz_schema(': 'resource id, string schema | void', -\ 'yaz_search(': 'resource id, string type, string query | bool', -\ 'yaz_set_option(': 'resource id, string name, string value | void', -\ 'yaz_sort(': 'resource id, string criteria | void', -\ 'yaz_syntax(': 'resource id, string syntax | void', -\ 'yaz_wait(': '[array &options] | mixed', -\ 'yp_all(': 'string domain, string map, string callback | void', -\ 'yp_cat(': 'string domain, string map | array', -\ 'yp_errno(': 'void | int', -\ 'yp_err_string(': 'int errorcode | string', -\ 'yp_first(': 'string domain, string map | array', -\ 'yp_get_default_domain(': 'void | string', -\ 'yp_master(': 'string domain, string map | string', -\ 'yp_match(': 'string domain, string map, string key | string', -\ 'yp_next(': 'string domain, string map, string key | array', -\ 'yp_order(': 'string domain, string map | int', -\ 'zend_logo_guid(': 'void | string', -\ 'zend_version(': 'void | string', -\ 'zip_close(': 'resource zip | void', -\ 'zip_entry_close(': 'resource zip_entry | void', -\ 'zip_entry_compressedsize(': 'resource zip_entry | int', -\ 'zip_entry_compressionmethod(': 'resource zip_entry | string', -\ 'zip_entry_filesize(': 'resource zip_entry | int', -\ 'zip_entry_name(': 'resource zip_entry | string', -\ 'zip_entry_open(': 'resource zip, resource zip_entry [, string mode] | bool', -\ 'zip_entry_read(': 'resource zip_entry [, int length] | string', -\ 'zip_open(': 'string filename | resource', -\ 'zip_read(': 'resource zip | resource', -\ 'zlib_get_coding_type(': 'void | string' -\ } -" }}} -" built-in object functions {{{ -let g:php_builtin_object_functions = { -\ 'ArrayIterator::current(': 'void | mixed', -\ 'ArrayIterator::key(': 'void | mixed', -\ 'ArrayIterator::next(': 'void | void', -\ 'ArrayIterator::rewind(': 'void | void', -\ 'ArrayIterator::seek(': 'int position | void', -\ 'ArrayIterator::valid(': 'void | bool', -\ 'ArrayObject::append(': 'mixed newval | void', -\ 'ArrayObject::__construct(': 'mixed input | ArrayObject', -\ 'ArrayObject::count(': 'void | int', -\ 'ArrayObject::getIterator(': 'void | ArrayIterator', -\ 'ArrayObject::offsetExists(': 'mixed index | bool', -\ 'ArrayObject::offsetGet(': 'mixed index | bool', -\ 'ArrayObject::offsetSet(': 'mixed index, mixed newval | void', -\ 'ArrayObject::offsetUnset(': 'mixed index | void', -\ 'CachingIterator::hasNext(': 'void | bool', -\ 'CachingIterator::next(': 'void | void', -\ 'CachingIterator::rewind(': 'void | void', -\ 'CachingIterator::__toString(': 'void | string', -\ 'CachingIterator::valid(': 'void | bool', -\ 'CachingRecursiveIterator::getChildren(': 'void | CachingRecursiveIterator', -\ 'CachingRecursiveIterator::hasChildren(': 'void | bolean', -\ 'DirectoryIterator::__construct(': 'string path | DirectoryIterator', -\ 'DirectoryIterator::current(': 'void | DirectoryIterator', -\ 'DirectoryIterator::getATime(': 'void | int', -\ 'DirectoryIterator::getChildren(': 'void | RecursiveDirectoryIterator', -\ 'DirectoryIterator::getCTime(': 'void | int', -\ 'DirectoryIterator::getFilename(': 'void | string', -\ 'DirectoryIterator::getGroup(': 'void | int', -\ 'DirectoryIterator::getInode(': 'void | int', -\ 'DirectoryIterator::getMTime(': 'void | int', -\ 'DirectoryIterator::getOwner(': 'void | int', -\ 'DirectoryIterator::getPath(': 'void | string', -\ 'DirectoryIterator::getPathname(': 'void | string', -\ 'DirectoryIterator::getPerms(': 'void | int', -\ 'DirectoryIterator::getSize(': 'void | int', -\ 'DirectoryIterator::getType(': 'void | string', -\ 'DirectoryIterator::isDir(': 'void | bool', -\ 'DirectoryIterator::isDot(': 'void | bool', -\ 'DirectoryIterator::isExecutable(': 'void | bool', -\ 'DirectoryIterator::isFile(': 'void | bool', -\ 'DirectoryIterator::isLink(': 'void | bool', -\ 'DirectoryIterator::isReadable(': 'void | bool', -\ 'DirectoryIterator::isWritable(': 'void | bool', -\ 'DirectoryIterator::key(': 'void | string', -\ 'DirectoryIterator::next(': 'void | void', -\ 'DirectoryIterator::rewind(': 'void | void', -\ 'DirectoryIterator::valid(': 'void | string', -\ 'FilterIterator::current(': 'void | mixed', -\ 'FilterIterator::getInnerIterator(': 'void | Iterator', -\ 'FilterIterator::key(': 'void | mixed', -\ 'FilterIterator::next(': 'void | void', -\ 'FilterIterator::rewind(': 'void | void', -\ 'FilterIterator::valid(': 'void | bool', -\ 'LimitIterator::getPosition(': 'void | int', -\ 'LimitIterator::next(': 'void | void', -\ 'LimitIterator::rewind(': 'void | void', -\ 'LimitIterator::seek(': 'int position | void', -\ 'LimitIterator::valid(': 'void | bool', -\ 'Memcache::add(': 'string key, mixed var [, int flag [, int expire]] | bool', -\ 'Memcache::addServer(': 'string host [, int port [, bool persistent [, int weight [, int timeout [, int retry_interval]]]]] | bool', -\ 'Memcache::close(': 'void | bool', -\ 'Memcache::connect(': 'string host [, int port [, int timeout]] | bool', -\ 'Memcache::decrement(': 'string key [, int value] | int', -\ 'Memcache::delete(': 'string key [, int timeout] | bool', -\ 'Memcache::flush(': 'void | bool', -\ 'Memcache::getExtendedStats(': 'void | array', -\ 'Memcache::get(': 'string key | string', -\ 'Memcache::getStats(': 'void | array', -\ 'Memcache::getVersion(': 'void | string', -\ 'Memcache::increment(': 'string key [, int value] | int', -\ 'Memcache::pconnect(': 'string host [, int port [, int timeout]] | bool', -\ 'Memcache::replace(': 'string key, mixed var [, int flag [, int expire]] | bool', -\ 'Memcache::setCompressThreshold(': 'int threshold [, float min_savings] | bool', -\ 'Memcache::set(': 'string key, mixed var [, int flag [, int expire]] | bool', -\ 'ParentIterator::getChildren(': 'void | ParentIterator', -\ 'ParentIterator::hasChildren(': 'void | bool', -\ 'ParentIterator::next(': 'void | void', -\ 'ParentIterator::rewind(': 'void | void', -\ 'PDO::beginTransaction(': 'void | bool', -\ 'PDO::commit(': 'void | bool', -\ 'PDO::__construct(': 'string dsn [, string username [, string password [, array driver_options]]] | PDO', -\ 'PDO::errorCode(': 'void | string', -\ 'PDO::errorInfo(': 'void | array', -\ 'PDO::exec(': 'string statement | int', -\ 'PDO::getAttribute(': 'int attribute | mixed', -\ 'PDO::getAvailableDrivers(': 'void | array', -\ 'PDO::lastInsertId(': '[string name] | string', -\ 'PDO::prepare(': 'string statement [, array driver_options] | PDOStatement', -\ 'PDO::query(': 'string statement | PDOStatement', -\ 'PDO::quote(': 'string string [, int parameter_type] | string', -\ 'PDO::rollBack(': 'void | bool', -\ 'PDO::setAttribute(': 'int attribute, mixed value | bool', -\ 'PDO::sqliteCreateAggregate(': 'string function_name, callback step_func, callback finalize_func [, int num_args] | bool', -\ 'PDO::sqliteCreateFunction(': 'string function_name, callback callback [, int num_args] | bool', -\ 'PDOStatement::bindColumn(': 'mixed column, mixed &param [, int type] | bool', -\ 'PDOStatement::bindParam(': 'mixed parameter, mixed &variable [, int data_type [, int length [, mixed driver_options]]] | bool', -\ 'PDOStatement::bindValue(': 'mixed parameter, mixed value [, int data_type] | bool', -\ 'PDOStatement::closeCursor(': 'void | bool', -\ 'PDOStatement::columnCount(': 'void | int', -\ 'PDOStatement::errorCode(': 'void | string', -\ 'PDOStatement::errorInfo(': 'void | array', -\ 'PDOStatement::execute(': '[array input_parameters] | bool', -\ 'PDOStatement::fetchAll(': '[int fetch_style [, int column_index]] | array', -\ 'PDOStatement::fetchColumn(': '[int column_number] | string', -\ 'PDOStatement::fetch(': '[int fetch_style [, int cursor_orientation [, int cursor_offset]]] | mixed', -\ 'PDOStatement::fetchObject(': '[string class_name [, array ctor_args]] | mixed', -\ 'PDOStatement::getAttribute(': 'int attribute | mixed', -\ 'PDOStatement::getColumnMeta(': 'int column | mixed', -\ 'PDOStatement::nextRowset(': 'void | bool', -\ 'PDOStatement::rowCount(': 'void | int', -\ 'PDOStatement::setAttribute(': 'int attribute, mixed value | bool', -\ 'PDOStatement::setFetchMode(': 'int mode | bool', -\ 'Rar::extract(': 'string dir [, string filepath] | bool', -\ 'Rar::getAttr(': 'void | int', -\ 'Rar::getCrc(': 'void | int', -\ 'Rar::getFileTime(': 'void | string', -\ 'Rar::getHostOs(': 'void | int', -\ 'Rar::getMethod(': 'void | int', -\ 'Rar::getName(': 'void | string', -\ 'Rar::getPackedSize(': 'void | int', -\ 'Rar::getUnpackedSize(': 'void | int', -\ 'Rar::getVersion(': 'void | int', -\ 'RecursiveDirectoryIterator::getChildren(': 'void | object', -\ 'RecursiveDirectoryIterator::hasChildren(': '[bool allow_links] | bool', -\ 'RecursiveDirectoryIterator::key(': 'void | string', -\ 'RecursiveDirectoryIterator::next(': 'void | void', -\ 'RecursiveDirectoryIterator::rewind(': 'void | void', -\ 'RecursiveIteratorIterator::current(': 'void | mixed', -\ 'RecursiveIteratorIterator::getDepth(': 'void | int', -\ 'RecursiveIteratorIterator::getSubIterator(': 'void | RecursiveIterator', -\ 'RecursiveIteratorIterator::key(': 'void | mixed', -\ 'RecursiveIteratorIterator::next(': 'void | void', -\ 'RecursiveIteratorIterator::rewind(': 'void | void', -\ 'RecursiveIteratorIterator::valid(': 'void | bolean', -\ 'SDO_DAS_ChangeSummary::beginLogging(': 'void | void', -\ 'SDO_DAS_ChangeSummary::endLogging(': 'void | void', -\ 'SDO_DAS_ChangeSummary::getChangedDataObjects(': 'void | SDO_List', -\ 'SDO_DAS_ChangeSummary::getChangeType(': 'SDO_DataObject dataObject | int', -\ 'SDO_DAS_ChangeSummary::getOldContainer(': 'SDO_DataObject data_object | SDO_DataObject', -\ 'SDO_DAS_ChangeSummary::getOldValues(': 'SDO_DataObject data_object | SDO_List', -\ 'SDO_DAS_ChangeSummary::isLogging(': 'void | bool', -\ 'SDO_DAS_DataFactory::addPropertyToType(': 'string parent_type_namespace_uri, string parent_type_name, string property_name, string type_namespace_uri, string type_name [, array options] | void', -\ 'SDO_DAS_DataFactory::addType(': 'string type_namespace_uri, string type_name [, array options] | void', -\ 'SDO_DAS_DataFactory::getDataFactory(': 'void | SDO_DAS_DataFactory', -\ 'SDO_DAS_DataObject::getChangeSummary(': 'void | SDO_DAS_ChangeSummary', -\ 'SDO_DAS_Relational::applyChanges(': 'PDO database_handle, SDODataObject root_data_object | void', -\ 'SDO_DAS_Relational::__construct(': 'array database_metadata [, string application_root_type [, array SDO_containment_references_metadata]] | SDO_DAS_Relational', -\ 'SDO_DAS_Relational::createRootDataObject(': 'void | SDODataObject', -\ 'SDO_DAS_Relational::executePreparedQuery(': 'PDO database_handle, PDOStatement prepared_statement, array value_list [, array column_specifier] | SDODataObject', -\ 'SDO_DAS_Relational::executeQuery(': 'PDO database_handle, string SQL_statement [, array column_specifier] | SDODataObject', -\ 'SDO_DAS_Setting::getListIndex(': 'void | int', -\ 'SDO_DAS_Setting::getPropertyIndex(': 'void | int', -\ 'SDO_DAS_Setting::getPropertyName(': 'void | string', -\ 'SDO_DAS_Setting::getValue(': 'void | mixed', -\ 'SDO_DAS_Setting::isSet(': 'void | bool', -\ 'SDO_DAS_XML::addTypes(': 'string xsd_file | void', -\ 'SDO_DAS_XML::createDataObject(': 'string namespace_uri, string type_name | SDO_DataObject', -\ 'SDO_DAS_XML::createDocument(': '[string document_element_name] | SDO_DAS_XML_Document', -\ 'SDO_DAS_XML::create(': '[string xsd_file] | SDO_DAS_XML', -\ 'SDO_DAS_XML_Document::getRootDataObject(': 'void | SDO_DataObject', -\ 'SDO_DAS_XML_Document::getRootElementName(': 'void | string', -\ 'SDO_DAS_XML_Document::getRootElementURI(': 'void | string', -\ 'SDO_DAS_XML_Document::setEncoding(': 'string encoding | void', -\ 'SDO_DAS_XML_Document::setXMLDeclaration(': 'bool xmlDeclatation | void', -\ 'SDO_DAS_XML_Document::setXMLVersion(': 'string xmlVersion | void', -\ 'SDO_DAS_XML::loadFile(': 'string xml_file | SDO_XMLDocument', -\ 'SDO_DAS_XML::loadString(': 'string xml_string | SDO_DAS_XML_Document', -\ 'SDO_DAS_XML::saveFile(': 'SDO_XMLDocument xdoc, string xml_file [, int indent] | void', -\ 'SDO_DAS_XML::saveString(': 'SDO_XMLDocument xdoc [, int indent] | string', -\ 'SDO_DataFactory::create(': 'string type_namespace_uri, string type_name | void', -\ 'SDO_DataObject::clear(': 'void | void', -\ 'SDO_DataObject::createDataObject(': 'mixed identifier | SDO_DataObject', -\ 'SDO_DataObject::getContainer(': 'void | SDO_DataObject', -\ 'SDO_DataObject::getSequence(': 'void | SDO_Sequence', -\ 'SDO_DataObject::getTypeName(': 'void | string', -\ 'SDO_DataObject::getTypeNamespaceURI(': 'void | string', -\ 'SDO_Exception::getCause(': 'void | mixed', -\ 'SDO_List::insert(': 'mixed value [, int index] | void', -\ 'SDO_Model_Property::getContainingType(': 'void | SDO_Model_Type', -\ 'SDO_Model_Property::getDefault(': 'void | mixed', -\ 'SDO_Model_Property::getName(': 'void | string', -\ 'SDO_Model_Property::getType(': 'void | SDO_Model_Type', -\ 'SDO_Model_Property::isContainment(': 'void | bool', -\ 'SDO_Model_Property::isMany(': 'void | bool', -\ 'SDO_Model_ReflectionDataObject::__construct(': 'SDO_DataObject data_object | SDO_Model_ReflectionDataObject', -\ 'SDO_Model_ReflectionDataObject::export(': 'SDO_Model_ReflectionDataObject rdo [, bool return] | mixed', -\ 'SDO_Model_ReflectionDataObject::getContainmentProperty(': 'void | SDO_Model_Property', -\ 'SDO_Model_ReflectionDataObject::getInstanceProperties(': 'void | array', -\ 'SDO_Model_ReflectionDataObject::getType(': 'void | SDO_Model_Type', -\ 'SDO_Model_Type::getBaseType(': 'void | SDO_Model_Type', -\ 'SDO_Model_Type::getName(': 'void | string', -\ 'SDO_Model_Type::getNamespaceURI(': 'void | string', -\ 'SDO_Model_Type::getProperties(': 'void | array', -\ 'SDO_Model_Type::getProperty(': 'mixed identifier | SDO_Model_Property', -\ 'SDO_Model_Type::isAbstractType(': 'void | bool', -\ 'SDO_Model_Type::isDataType(': 'void | bool', -\ 'SDO_Model_Type::isInstance(': 'SDO_DataObject data_object | bool', -\ 'SDO_Model_Type::isOpenType(': 'void | bool', -\ 'SDO_Model_Type::isSequencedType(': 'void | bool', -\ 'SDO_Sequence::getProperty(': 'int sequence_index | SDO_Model_Property', -\ 'SDO_Sequence::insert(': 'mixed value [, int sequenceIndex [, mixed propertyIdentifier]] | void', -\ 'SDO_Sequence::move(': 'int toIndex, int fromIndex | void', -\ 'SimpleXMLIterator::current(': 'void | mixed', -\ 'SimpleXMLIterator::getChildren(': 'void | object', -\ 'SimpleXMLIterator::hasChildren(': 'void | bool', -\ 'SimpleXMLIterator::key(': 'void | mixed', -\ 'SimpleXMLIterator::next(': 'void | void', -\ 'SimpleXMLIterator::rewind(': 'void | void', -\ 'SimpleXMLIterator::valid(': 'void | bool', -\ 'SWFButton::addASound(': 'SWFSound sound, int flags | SWFSoundInstance', -\ 'SWFButton::setMenu(': 'int flag | void', -\ 'SWFDisplayItem::addAction(': 'SWFAction action, int flags | void', -\ 'SWFDisplayItem::endMask(': 'void | void', -\ 'SWFDisplayItem::getRot(': 'void | float', -\ 'SWFDisplayItem::getX(': 'void | float', -\ 'SWFDisplayItem::getXScale(': 'void | float', -\ 'SWFDisplayItem::getXSkew(': 'void | float', -\ 'SWFDisplayItem::getY(': 'void | float', -\ 'SWFDisplayItem::getYScale(': 'void | float', -\ 'SWFDisplayItem::getYSkew(': 'void | float', -\ 'SWFDisplayItem::setMaskLevel(': 'int level | void', -\ 'SWFDisplayItem::setMatrix(': 'float a, float b, float c, float d, float x, float y | void', -\ 'SWFFontChar::addChars(': 'string char | void', -\ 'SWFFontChar::addUTF8Chars(': 'string char | void', -\ 'SWFFont::getAscent(': 'void | float', -\ 'SWFFont::getDescent(': 'void | float', -\ 'SWFFont::getLeading(': 'void | float', -\ 'SWFFont::getShape(': 'int code | string', -\ 'SWFFont::getUTF8Width(': 'string string | float', -\ 'SWFMovie::addExport(': 'SWFCharacter char, string name | void', -\ 'SWFMovie::addFont(': 'SWFFont font | SWFFontChar', -\ 'SWFMovie::importChar(': 'string libswf, string name | SWFSprite', -\ 'SWFMovie::importFont(': 'string libswf, string name | SWFFontChar', -\ 'SWFMovie::labelFrame(': 'string label | void', -\ 'SWFMovie::saveToFile(': 'stream x [, int compression] | int', -\ 'SWFMovie::startSound(': 'SWFSound sound | SWFSoundInstance', -\ 'SWFMovie::stopSound(': 'SWFSound sound | void', -\ 'SWFMovie::writeExports(': 'void | void', -\ 'SWFShape::drawArc(': 'float r, float startAngle, float endAngle | void', -\ 'SWFShape::drawCircle(': 'float r | void', -\ 'SWFShape::drawCubic(': 'float bx, float by, float cx, float cy, float dx, float dy | int', -\ 'SWFShape::drawCubicTo(': 'float bx, float by, float cx, float cy, float dx, float dy | int', -\ 'SWFShape::drawGlyph(': 'SWFFont font, string character [, int size] | void', -\ 'SWFSoundInstance::loopCount(': 'int point | void', -\ 'SWFSoundInstance::loopInPoint(': 'int point | void', -\ 'SWFSoundInstance::loopOutPoint(': 'int point | void', -\ 'SWFSoundInstance::noMultiple(': 'void | void', -\ 'SWFSprite::labelFrame(': 'string label | void', -\ 'SWFSprite::startSound(': 'SWFSound sound | SWFSoundInstance', -\ 'SWFSprite::stopSound(': 'SWFSound sound | void', -\ 'SWFText::addUTF8String(': 'string text | void', -\ 'SWFTextField::addChars(': 'string chars | void', -\ 'SWFTextField::setPadding(': 'float padding | void', -\ 'SWFText::getAscent(': 'void | float', -\ 'SWFText::getDescent(': 'void | float', -\ 'SWFText::getLeading(': 'void | float', -\ 'SWFText::getUTF8Width(': 'string string | float', -\ 'SWFVideoStream::getNumFrames(': 'void | int', -\ 'SWFVideoStream::setDimension(': 'int x, int y | void', -\ 'tidy::__construct(': '[string filename [, mixed config [, string encoding [, bool use_include_path]]]] | tidy' -\ } - " }}} -" Add control structures (they are outside regular pattern of PHP functions) -let php_control = { - \ 'include(': 'string filename | resource', - \ 'include_once(': 'string filename | resource', + for line in file + let c_name = matchstr(line, '\c\(class\|interface\)\s*\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') + let kind = (line =~? '^\s*class' ? 'c' : 'i') + if c_name != '' && c_name =~? '^'.base + call add(res, {'word': c_name, 'kind': kind}) + endif + endfor + + " resolve the typed in part with namespaces (if theres a \ in it) + let [tag_match_pattern, namespace_for_class] = phpcomplete#ExpandClassName(a:base, a:current_namespace, a:imports) + + let tags = [] + if len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion + let tags = phpcomplete#GetTaglist('^'.tag_match_pattern) + endif + + if len(tags) + let base_parts = split(a:base, '\') + if len(base_parts) > 1 + let namespace_part = join(base_parts[0:-2], '\').'\' + else + let namespace_part = '' + endif + let no_namespace_matches = [] + let namespaced_matches = [] + let seen_namespaced_tag = 0 + for tag in tags + if has_key(tag, 'namespace') + let seen_namespaced_tag = 1 + endif + let relative_name = namespace_part.tag.name + " match base without the namespace part for namespaced base but not namespaced tags, for tagfiles with old ctags + if !has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && stridx(tag.name, base[len(namespace_part):]) == 0 + call add(no_namespace_matches, {'word': leading_slash.relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename }) + endif + if has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && tag.namespace ==? namespace_for_class + let full_name = tag.namespace.'\'.tag.name " absolute namespaced name (without leading '\') + call add(namespaced_matches, {'word': leading_slash == '\' ? leading_slash.full_name : relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename }) + endif + endfor + " if there was a tag with namespace field, assume tag files with namespace support, so the matches + " without a namespace field are in the global namespace so if there were namespace in the base + " we should not add them to the matches + if seen_namespaced_tag && namespace_part != '' + let no_namespace_matches = [] + endif + let res += no_namespace_matches + namespaced_matches + endif + + " look for built in classnames and interfaces + let base_parts = split(base, '\') + if a:current_namespace == '\' || (leading_slash == '\' && len(base_parts) < 2) + if index(kinds, 'c') != -1 + let builtin_classnames = filter(keys(copy(g:php_builtin_classnames)), 'v:val =~? "^'.substitute(a:base, '\\', '', 'g').'"') + for classname in builtin_classnames + let menu = '' + " if we have a constructor for this class, add parameters as to the info + if has_key(g:php_builtin_classes[tolower(classname)].methods, '__construct') + let menu = g:php_builtin_classes[tolower(classname)]['methods']['__construct']['signature'] + endif + call add(res, {'word': leading_slash.classname, 'kind': 'c', 'menu': menu}) + endfor + endif + + if index(kinds, 'i') != -1 + let builtin_interfaces = filter(keys(copy(g:php_builtin_interfaces)), 'v:val =~? "^'.substitute(a:base, '\\', '', 'g').'"') + for interfacename in builtin_interfaces + call add(res, {'word': leading_slash.g:php_builtin_interfaces[interfacename]['name'], 'kind': 'i', 'menu': ''}) + endfor + endif + endif + + " add matching imported things + for [imported_name, import] in items(a:imports) + if imported_name =~? '^'.base && index(kinds, import.kind) != -1 + let menu = import.name.(import.builtin ? ' - builtin' : '') + call add(res, {'word': imported_name, 'kind': import.kind, 'menu': menu}) + endif + endfor + + let res = sort(res, 'phpcomplete#CompareCompletionRow') + return res +endfunction +" }}} + +function! phpcomplete#CompareCompletionRow(i1, i2) " {{{ + return a:i1.word == a:i2.word ? 0 : a:i1.word > a:i2.word ? 1 : -1 +endfunction +" }}} + +function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) " {{{ + " if theres no modifier, and no modifier is allowed and no modifier is required + if len(a:modifiers) == 0 && len(a:required_modifiers) == 0 + return 1 + else + " check if every requred modifier is present + for required_modifier in a:required_modifiers + if index(a:modifiers, required_modifier) == -1 + return 0 + endif + endfor + + for modifier in a:modifiers + " if the modifier is prohibited its a no match + if index(a:prohibited_modifiers, modifier) != -1 + return 0 + endif + endfor + + " anything that is not explicitly required or prohibited is allowed + return 1 + endif +endfunction +" }}} + +function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) " {{{ + let final_list = [] + let res = [] + + let required_modifiers = [] + let prohibited_modifiers = [] + + if a:visibility == 'public' + let prohibited_modifiers += ['private', 'protected'] + endif + + " limit based on context to static or normal methods + let static_con = '' + if a:context =~ '::$' && a:context !~? 'parent::$' + if g:phpcomplete_relax_static_constraint != 1 + let required_modifiers += ['static'] + endif + elseif a:context =~ '->$' + let prohibited_modifiers += ['static'] + endif + + let all_function = filter(deepcopy(a:sccontent), + \ 'v:val =~ "^\\s*\\(public\\s\\+\\|protected\\s\\+\\|private\\s\\+\\|final\\s\\+\\|abstract\\s\\+\\|static\\s\\+\\)*function"') + + let functions = [] + for i in all_function + let modifiers = split(matchstr(tolower(i), '\zs.\+\zefunction'), '\s\+') + if phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) == 1 + call add(functions, i) + endif + endfor + + let c_functions = {} + let c_doc = {} + for i in functions + let f_name = matchstr(i, + \ 'function\s*&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') + let f_args = matchstr(i, + \ 'function\s*&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|\_$\)') + if f_name != '' + let c_functions[f_name.'('] = f_args + if g:phpcomplete_parse_docblock_comments + let c_doc[f_name.'('] = phpcomplete#GetDocBlock(a:sccontent, 'function\s*\<'.f_name.'\>') + endif + endif + endfor + + " limit based on context to static or normal attributes + if a:context =~ '::$' && a:context !~? 'parent::$' + " variables must have static to be accessed as static unlike functions + let required_modifiers += ['static'] + endif + let all_variable = filter(deepcopy(a:sccontent), + \ 'v:val =~ "^\\s*\\(var\\s\\+\\|public\\s\\+\\|protected\\s\\+\\|private\\s\\+\\|final\\s\\+\\|abstract\\s\\+\\|static\\s\\+\\)\\+\\$"') + + let variables = [] + for i in all_variable + let modifiers = split(matchstr(tolower(i), '\zs.\+\ze\$'), '\s\+') + if phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) == 1 + call add(variables, i) + endif + endfor + + let jvars = join(variables, ' ') + let svars = split(jvars, '\$') + let c_variables = {} + + let var_index = 0 + for i in svars + let c_var = matchstr(i, + \ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') + if c_var != '' + if a:context =~ '::$' + let c_var = '$'.c_var + endif + let c_variables[c_var] = '' + if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index)) > 0 + let c_doc[c_var] = phpcomplete#GetDocBlock(a:sccontent, variables[var_index]) + endif + let var_index += 1 + endif + endfor + + let constants = filter(deepcopy(a:sccontent), + \ 'v:val =~ "^\\s*const\\s\\+"') + + let jcons = join(constants, ' ') + let scons = split(jcons, 'const') + + let c_constants = {} + let const_index = 0 + for i in scons + let c_con = matchstr(i, + \ '^\s*\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') + if c_con != '' + let c_constants[c_con] = '' + if g:phpcomplete_parse_docblock_comments && len(get(constants, const_index)) > 0 + let c_doc[c_con] = phpcomplete#GetDocBlock(a:sccontent, constants[const_index]) + endif + let const_index += 1 + endif + endfor + + let all_values = {} + call extend(all_values, c_functions) + call extend(all_values, c_variables) + call extend(all_values, c_constants) + + for m in sort(keys(all_values)) + if stridx(m, a:base) == 0 + call add(res, m) + endif + endfor + + let start_list = res + + let final_list = [] + for i in start_list + let docblock = phpcomplete#ParseDocBlock(get(c_doc, i, '')) + if has_key(c_variables, i) + let final_list += + \ [{'word': i, + \ 'info':phpcomplete#FormatDocBlock(docblock), + \ 'menu':get(docblock.var, 'type', ''), + \ 'kind':'v'}] + elseif has_key(c_constants, i) + let info = phpcomplete#FormatDocBlock(docblock) + if info != '' + let info = "\n".info + endif + let final_list += + \ [{'word':i, + \ 'info':i.info, + \ 'menu':all_values[i], + \ 'kind':'d'}] + else + let return_type = get(docblock.return, 'type', '') + if return_type != '' + let return_type = ' | '.return_type + endif + let info = phpcomplete#FormatDocBlock(docblock) + if info != '' + let info = "\n".info + endif + let final_list += + \ [{'word':substitute(i, '.*::', '', ''), + \ 'info':i.all_values[i].')'.info, + \ 'menu':all_values[i].')'.return_type, + \ 'kind':'f'}] + endif + endfor + + return final_list +endfunction +" }}} + +function! phpcomplete#CompleteBuiltInClass(context, classname, base) " {{{ + let class_info = g:php_builtin_classes[tolower(a:classname)] + let res = [] + if a:context =~ '->$' " complete for everything instance related + " methods + for [method_name, method_info] in items(class_info.methods) + if a:base == '' || method_name =~? '^'.a:base + call add(res, {'word':method_name.'(', 'kind': 'f', 'menu': method_info.signature, 'info': method_info.signature }) + endif + endfor + " properties + for [property_name, property_info] in items(class_info.properties) + if a:base == '' || property_name =~? '^'.a:base + call add(res, {'word':property_name, 'kind': 'v', 'menu': property_info.type, 'info': property_info.type }) + endif + endfor + elseif a:context =~ '::$' " complete for everything static + " methods + for [method_name, method_info] in items(class_info.static_methods) + if a:base == '' || method_name =~? '^'.a:base + call add(res, {'word':method_name.'(', 'kind': 'f', 'menu': method_info.signature, 'info': method_info.signature }) + endif + endfor + " properties + for [property_name, property_info] in items(class_info.static_properties) + if a:base == '' || property_name =~? '^'.a:base + call add(res, {'word':property_name, 'kind': 'v', 'menu': property_info.type, 'info': property_info.type }) + endif + endfor + " constants + for [constant_name, constant_info] in items(class_info.constants) + if a:base == '' || constant_name =~? '^'.a:base + call add(res, {'word':constant_name, 'kind': 'd', 'menu': constant_info, 'info': constant_info}) + endif + endfor + endif + return res +endfunction +" }}} + +function! phpcomplete#GetTaglist(pattern) " {{{ + + let cache_checksum = '' + if g:phpcomplete_cache_taglists == 1 + " build a string with format of ":$:..." + " to validate that the tags are not changed since the time we saved the results in cache + for tagfile in sort(tagfiles()) + let cache_checksum .= fnamemodify(tagfile, ':p').':'.getftime(tagfile).'$' + endfor + + if s:cache_tags_checksum != cache_checksum + " tag file(s) changed + " since we don't know where individual tags coming from when calling taglist() we zap the whole cache + " no way to clear only the entries originating from the changed tag file + let s:cache_tags = {} + endif + + if has_key(s:cache_tags, a:pattern) + return s:cache_tags[a:pattern] + endif + endif + + let tags = taglist(a:pattern) + let s:cache_tags[a:pattern] = tags + let has_key = has_key(s:cache_tags, a:pattern) + let s:cache_tags_checksum = cache_checksum + return tags +endfunction +" }}} + +function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) " {{{ + " locate the current instruction (up until the previous non comment or string ";" or php region start (', '<', '.', '?', + \ ';', '(', '|', '[' + \ ] + + let phpbegin_length = len(matchstr(getline(a:phpbegin[0]), '\zs= 0 && bracket_depth >= 0 && synIDName !~? 'comment\|string' + " break if we are on a "naked" stop_char (operators, colon, openparent...) + if index(stop_chars, current_char) != -1 + let do_break = 1 + " dont break does not look like a "->" + if (prev_char == '-' && current_char == '>') || (current_char == '-' && next_char == '>') + let do_break = 0 + endif + " dont break if its looks like a "::" + if (prev_char == ':' && current_char == ':') || (current_char == ':' && next_char == ':') + let do_break = 0 + endif + + if do_break + break + endif + endif + + " save the coma position for later use if theres a "naked" , possibly separating a parameter and it is not in a parented part + if first_coma_break_pos == -1 && current_char == ',' + let first_coma_break_pos = len(instruction) + endif + endif + + " count nested darenthesis and brackets so we can tell if we need to break on a ';' or not (think of for (;;) loops) + if synIDName =~? 'phpBraceFunc\|phpParent\|Delimiter' + if current_char == '(' + let parent_depth += 1 + elseif current_char == ')' + let parent_depth -= 1 + + elseif current_char == '[' + let bracket_depth += 1 + elseif current_char == ']' + let bracket_depth -= 1 + endif + endif + + " stop collecting chars if we see a function start { (think of first line in a function) + if (current_char == '{' || current_char == '}') && synIDName =~? 'phpBraceFunc\|phpParent\|Delimiter' + break + endif + + " break if we are reached the php block start (foo()->bar()->baz()-> + + let classname_candidate = a:classname_candidate + let class_candidate_namespace = a:class_candidate_namespace + let methodstack = a:methodstack + let unknown_result = ['', ''] + let prev_method_is_array = (methodstack[0] =~ '\v^[^([]+\[' ? 1 : 0) + let classname_candidate_is_array = (classname_candidate =~ '\[\]$' ? 1 : 0) + + if prev_method_is_array + if classname_candidate_is_array + let classname_candidate = substitute(classname_candidate, '\[\]$', '', '') + else + return unknown_result + endif + endif + + if (len(methodstack) == 1) + let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, a:imports) + return [classname_candidate, class_candidate_namespace] + else + call remove(methodstack, 0) + let method_is_array = (methodstack[0] =~ '\v^[^[]+\[' ? 1 : 0) + let method = matchstr(methodstack[0], '\v^\$*\zs[^[(]+\ze') + + let classlocation = phpcomplete#GetClassLocation(classname_candidate, class_candidate_namespace) + + if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname_candidate)) + let class_info = g:php_builtin_classes[tolower(classname_candidate)] + if has_key(class_info['methods'], method) + return phpcomplete#GetCallChainReturnType(class_info['methods'][method].return_type, '\', a:imports, methodstack) + endif + if has_key(class_info['properties'], method) + return phpcomplete#GetCallChainReturnType(class_info['properties'][method].type, '\', a:imports, methodstack) + endif + if has_key(class_info['static_methods'], method) + return phpcomplete#GetCallChainReturnType(class_info['static_methods'][method].return_type, '\', a:imports, methodstack) + endif + if has_key(class_info['static_properties'], method) + return phpcomplete#GetCallChainReturnType(class_info['static_properties'][method].type, '\', a:imports, methodstack) + endif + + return unknown_result + + elseif filereadable(classlocation) + " Read the next method from the stack and extract only the name + + let classcontents = phpcomplete#GetCachedClassContents(classlocation, classname_candidate) + + " Get Structured information of all classes and subclasses including namespace and includes + " try to find the method's return type in docblock comment + for classstructure in classcontents + let doclock_target_pattern = 'function\s\+'.method.'\|\(public\|private\|protected\|var\).\+\$'.method + let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), doclock_target_pattern) + if doc_str != '' + break + endif + endfor + if doc_str != '' + let docblock = phpcomplete#ParseDocBlock(doc_str) + if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') + let type = has_key(docblock.return, 'type') ? docblock.return.type : docblock.var.type + + " there's a namespace in the type, threat the type as FQCN + if type =~ '\\' + let parts = split(substitute(type, '^\\', '', ''), '\') + let class_candidate_namespace = join(parts[0:-2], '\') + let classname_candidate = parts[-1] + " check for renamed namepsace in imports + if has_key(classstructure.imports, class_candidate_namespace) + let class_candidate_namespace = classstructure.imports[class_candidate_namespace].name + endif + else + " no namespace in the type, threat it as a relative classname + let returnclass = type + if has_key(classstructure.imports, returnclass) + if has_key(classstructure.imports[returnclass], 'namespace') + let fullnamespace = classstructure.imports[returnclass].namespace + else + let fullnamespace = class_candidate_namespace + endif + else + let fullnamespace = class_candidate_namespace + endif + let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports) + endif + + return phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, a:imports, methodstack) + endif + endif + + return unknown_result + else + return unknown_result + endif + endif +endfunction " }}} + +function! phpcomplete#GetMethodStack(line) " {{{ + let methodstack = [] + let i = 0 + let end = len(a:line) + + let current_part = '' + + let parent_depth = 0 + let in_string = 0 + let string_start = '' + + let next_char = '' + + while i < end + let current_char = a:line[i] + let next_char = i + 1 < end ? a:line[i + 1] : '' + let prev_char = i >= 1 ? a:line[i - 1] : '' + let prev_prev_char = i >= 2 ? a:line[i - 2] : '' + + if in_string == 0 && parent_depth == 0 && ((current_char == '-' && next_char == '>') || (current_char == ':' && next_char == ':')) + call add(methodstack, current_part) + let current_part = '' + let i += 2 + continue + endif + + " if it's looks like a string + if current_char == "'" || current_char == '"' + " and it is not escaped + if prev_char != '\' || (prev_char == '\' && prev_prev_char == '\') + " and we are in a string already + if in_string + " and that string started with this char too + if current_char == string_start + " clear the string mark + let in_string = 0 + endif + else " ... and we are not in a string + " set the string mark + let in_string = 1 + let string_start = current_char + endif + endif + endif + + if !in_string && a:line[i] == '(' + let parent_depth += 1 + endif + if !in_string && a:line[i] == ')' + let parent_depth -= 1 + endif + + let current_part .= current_char + let i += 1 + endwhile + + " add the last remaining part, this can be an empty string and this is expected + " the empty string represents the completion base (which happen to be an empty string) + if current_part != '' + call add(methodstack, current_part) + endif + + return methodstack +endfunction +" }}} + +function! phpcomplete#GetClassName(start_line, context, current_namespace, imports) " {{{ + " Get class name + " Class name can be detected in few ways: + " @var $myVar class + " in the same line (php 5.4 (new Class)-> syntax) + " line above + " or line in tags file + + let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*' + let function_name_pattern = '[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*' + let function_invocation_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*(' + let variable_name_pattern = '\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' + + let classname_candidate = '' + let class_candidate_namespace = a:current_namespace + let class_candidate_imports = a:imports + let methodstack = phpcomplete#GetMethodStack(a:context) + + if a:context =~? '\$this->' || a:context =~? '\(self\|static\)::' || a:context =~? 'parent::' + let i = 1 + while i < a:start_line + let line = getline(a:start_line - i) + + " Don't complete self:: or $this if outside of a class + " (assumes correct indenting) + if line =~ '^}' + return '' + endif + + if line =~? '\v^\s*(abstract\s+|final\s+)*\s*class' + let class_name = matchstr(line, '\c\s*class\s*\zs'.class_name_pattern.'\ze') + let extended_class = matchstr(line, '\cclass\s\+'.class_name_pattern.'\s\+extends\s\+\zs'.class_name_pattern.'\ze') + + let classname_candidate = a:context =~? 'parent::' ? extended_class : class_name + else + let i += 1 + continue + endif + + if classname_candidate != '' + let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack) + " return absolute classname, without leading \ + return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate + endif + endwhile + elseif a:context =~? '(\s*new\s\+'.class_name_pattern.'\s*)->' + let classname_candidate = matchstr(a:context, '\cnew\s\+\zs'.class_name_pattern.'\ze') + let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack) + " return absolute classname, without leading \ + return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate + elseif get(methodstack, 0) =~# function_invocation_pattern + let function_name = matchstr(methodstack[0], '^\s*\zs'.function_name_pattern) + let function_file = phpcomplete#GetFunctionLocation(function_name, a:current_namespace) + + if function_file == 'VIMPHP_BUILTINFUNCTION' + " built in function, grab the return type from the info string + let return_type = matchstr(g:php_builtin_functions[function_name.'('], '\v\|\s+\zs.+$') + let classname_candidate = return_type + let class_candidate_namespace = '\' + else + let file_lines = readfile(function_file) + let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*\<'.function_name.'\>') + let docblock = phpcomplete#ParseDocBlock(docblock_str) + if has_key(docblock.return, 'type') + let classname_candidate = docblock.return.type + let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines) + " try to expand the classname of the returned type with the context got from the function's source file + + let [classname_candidate, unused] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports) + endif + endif + if classname_candidate != '' + let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack) + " return absolute classname, without leading \ + return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate + endif + else + " check Constant lookup + let constant_object = matchstr(a:context, '\zs'.class_name_pattern.'\ze::') + if constant_object != '' + let classname_candidate = constant_object + endif + + " extract the variable name from the context + let object = methodstack[0] + let object_is_array = (object =~ '\v^[^[]+\[' ? 1 : 0) + let object = matchstr(object, variable_name_pattern) + + " scan the file backwards from current line for explicit type declaration (@var $variable Classname) + let i = 1 " start from the current line - 1 + while i < a:start_line + let line = getline(a:start_line - i) + " in file lookup for /* @var $foo Class */ + if line =~# '@var\s\+'.object.'\s\+'.class_name_pattern + let classname_candidate = matchstr(line, '@var\s\+'.object.'\s\+\zs'.class_name_pattern.'\(\[\]\)\?') + break + elseif line !~ '^\s*$' + " type indicator comments should be next to the variable + " non empty lines break the search + break + endif + let i += 1 + endwhile + + if classname_candidate != '' + let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack) + " return absolute classname, without leading \ + return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate + endif + + " scan the file backwards from the current line + let i = 1 + while i < a:start_line + let line = getline(a:start_line - i) + + " do in-file lookup of $var = new Class + if line =~# '^\s*'.object.'\s*=\s*new\s\+'.class_name_pattern && !object_is_array + let classname_candidate = matchstr(line, object.'\c\s*=\s*new\s*\zs'.class_name_pattern.'\ze') + break + endif + + " in-file lookup for Class::getInstance() + if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*getInstance' && !object_is_array + let classname_candidate = matchstr(line, object.'\s*=&\?\s*\zs'.class_name_pattern.'\ze\s*::\s*getInstance') + break + endif + + " do in-file lookup for static method invocation of a built-in class, like: $d = DateTime::createFromFormat() + if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*$\?[a-zA-Z_0-9\x7f-\xff]\+' + let classname = matchstr(line, '^\s*'.object.'\s*=&\?\s*\zs'.class_name_pattern.'\ze\s*::') + if has_key(a:imports, classname) && a:imports[classname].kind == 'c' + let classname = a:imports[classname].name + endif + if has_key(g:php_builtin_classes, tolower(classname)) + let sub_methodstack = phpcomplete#GetMethodStack(matchstr(line, '^\s*'.object.'\s*=&\?\s*\s\+\zs.*')) + let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname, '\', {}, sub_methodstack) + return classname_candidate + else + " try to get the class name from the static method's docblock + let [classname, namespace_for_class] = phpcomplete#ExpandClassName(classname, a:current_namespace, a:imports) + let sub_methodstack = phpcomplete#GetMethodStack(matchstr(line, '^\s*'.object.'\s*=&\?\s*\s\+\zs.*')) + let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType( + \ classname, + \ a:current_namespace, + \ a:imports, + \ sub_methodstack) + return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate + endif + endif + + " in-file lookup for typehinted function arguments + " - the function can have a name or be anonymous (e.g., function qux() { ... } vs. function () { ... }) + " - the type-hinted argument can be anywhere in the arguments list. + if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array + let f_args = matchstr(line, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)') + let args = split(f_args, '\s*\zs,\ze\s*') + for arg in args + if arg =~# object.'\(,\|$\)' + let classname_candidate = matchstr(arg, '\s*\zs'.class_name_pattern.'\ze\s\+'.object) + break + endif + endfor + if classname_candidate != '' + break + endif + endif + + " if we see a function declaration, try loading the docblock for it and look for matching @params + if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.object + let match_line = substitute(line, '\\', '\\\\', 'g') + let sccontent = getline(0, a:start_line - i) + let doc_str = phpcomplete#GetDocBlock(sccontent, match_line) + if doc_str != '' + let docblock = phpcomplete#ParseDocBlock(doc_str) + for param in docblock.params + if param.name =~? object + let classname_candidate = matchstr(param.type, class_name_pattern.'\(\[\]\)\?') + break + endif + endfor + if classname_candidate != '' + break + endif + endif + endif + + " assignment for the variable in question with a variable on the right hand side + if line =~# '^\s*'.object.'\s*=&\?\s*'.variable_name_pattern + let tailing_semicolon = match(line, ';\s*$') + let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i)) + let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin) + let prev_class = phpcomplete#GetClassName(a:start_line - i, prev_context, a:current_namespace, a:imports) + + if stridx(prev_class, '\') != -1 + let classname_parts = split(prev_class, '\\\+') + let classname_candidate = classname_parts[-1] + let class_candidate_namespace = join(classname_parts[0:-2], '\') + else + let classname_candidate = prev_class + let class_candidate_namespace = '\' + endif + break + endif + + " assignment for the variable in question with a function on the right hand side + if line =~# '^\s*'.object.'\s*=&\?\s*'.function_invocation_pattern + let tailing_semicolon = match(line, ';\s*$') + let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i)) + let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin) + + let function_name = matchstr(prev_context, '^'.function_invocation_pattern.'\ze') + let function_name = matchstr(function_name, '^\zs.\+\ze\s*($') " strip the trailing ( + let [function_name, function_namespace] = phpcomplete#ExpandClassName(function_name, a:current_namespace, a:imports) + + let function_file = phpcomplete#GetFunctionLocation(function_name, function_namespace) + + if function_file == 'VIMPHP_BUILTINFUNCTION' + " built in function, grab the return type from the info string + let return_type = matchstr(g:php_builtin_functions[function_name.'('], '\v\|\s+\zs.+$') + let classname_candidate = return_type + let class_candidate_namespace = '\' + break + else + let file_lines = readfile(function_file) + let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*\<'.function_name.'\>') + let docblock = phpcomplete#ParseDocBlock(docblock_str) + if has_key(docblock.return, 'type') + let classname_candidate = docblock.return.type + let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines) + " try to expand the classname of the returned type with the context got from the function's source file + let [classname_candidate, unused] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports) + break + endif + endif + endif + + " foreach with the variable in question + if line =~? 'foreach\s*(.\{-}\s\+'.object.'\s*)' + let sub_context = matchstr(line, 'foreach\s*(\s*\zs.\{-}\ze\s\+as') + let prev_class = phpcomplete#GetClassName(a:start_line - i, sub_context, a:current_namespace, a:imports) + + " the iterated expression should return an array type + if prev_class =~ '\[\]$' + let prev_class = matchstr(prev_class, '\v^[^[]+') + else + return + endif + + if stridx(prev_class, '\') != -1 + let classname_parts = split(prev_class, '\\\+') + let classname_candidate = classname_parts[-1] + let class_candidate_namespace = join(classname_parts[0:-2], '\') + else + let classname_candidate = prev_class + let class_candidate_namespace = '\' + endif + break + endif + + " catch clause with the variable in question + if line =~? 'catch\s*(\zs'.class_name_pattern.'\ze\s\+'.object + let classname = matchstr(line, 'catch\s*(\zs'.class_name_pattern.'\ze\s\+'.object) + if stridx(classname, '\') != -1 + let classname_parts = split(classname, '\\\+') + let classname_candidate = classname_parts[-1] + let class_candidate_namespace = join(classname_parts[0:-2], '\') + else + let classname_candidate = classname + let class_candidate_namespace = '\' + endif + break + endif + + let i += 1 + endwhile + + if classname_candidate != '' + let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack) + " return absolute classname, without leading \ + return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate + endif + + " OK, first way failed, now check tags file(s) + " This method is useless when local variables are not indexed by ctags and + " pretty inaccurate even if it is + if g:phpcomplete_search_tags_for_variables + let tags = phpcomplete#GetTaglist('^'.substitute(object, '^\$', '', '')) + if len(tags) == 0 + return + else + for tag in tags + if tag.kind ==? 'v' && tag.cmd =~? '=\s*new\s\+\zs'.class_name_pattern.'\ze' + let classname = matchstr(tag.cmd, '=\s*new\s\+\zs'.class_name_pattern.'\ze') + return classname + endif + endfor + endif + endif + endif +endfunction +" }}} + +function! phpcomplete#GetClassLocation(classname, namespace) " {{{ + " Check classname may be name of built in object + if has_key(g:php_builtin_classes, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\') + return 'VIMPHP_BUILTINOBJECT' + endif + + if a:namespace == '' || a:namespace == '\' + let search_namespace = '\' + else + let search_namespace = tolower(a:namespace) + endif + let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.'))) + + " do in-file lookup for class definition + let i = 1 + while i < line('.') + let line = getline(line('.')-i) + if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*class\s*'.a:classname.'\(\s\+\|$\)' && tolower(current_namespace) == search_namespace + return expand('%:p') + else + let i += 1 + continue + endif + endwhile + + " Get class location from tags + let no_namespace_candidate = '' + let tags = phpcomplete#GetTaglist('^'.a:classname.'$') + for tag in tags + if tag.kind == 'c' || tag.kind == 'i' + if !has_key(tag, 'namespace') + let no_namespace_candidate = tag.filename + else + if search_namespace == tolower(tag.namespace) + return tag.filename + endif + endif + endif + endfor + if no_namespace_candidate != '' + return no_namespace_candidate + endif + +endfunction +" }}} + +function! phpcomplete#GetFunctionLocation(function_name, namespace) " {{{ + " builtin functions doesn't need explicit \ in front of them even in namespaces, + " aliased built-in function names are not handled + if has_key(g:php_builtin_functions, a:function_name.'(') + return 'VIMPHP_BUILTINFUNCTION' + endif + + " do in-file lookup for function definition + let i = 1 + let buffer_lines = getline(1, line('$')) + for line in buffer_lines + if line =~? '^\s*function\s\+'.a:function_name.'\s*(' + return expand('%:p') + endif + endfor + + + if a:namespace == '' || a:namespace == '\' + let search_namespace = '\' + else + let search_namespace = tolower(a:namespace) + endif + let no_namespace_candidate = '' + let tags = phpcomplete#GetTaglist('\c^'.a:function_name.'$') + + for tag in tags + if tag.kind == 'f' + if !has_key(tag, 'namespace') + let no_namespace_candidate = tag.filename + else + if search_namespace == tolower(tag.namespace) + return tag.filename + endif + endif + endif + endfor + if no_namespace_candidate != '' + return no_namespace_candidate + endif +endif + +endfunction +" }}} + +function! phpcomplete#GetCachedClassContents(classlocation, class_name) " {{{ + let full_file_path = fnamemodify(a:classlocation, ':p') + let cache_key = full_file_path.'#'.a:class_name.'#'.getftime(full_file_path) + + " try to read from the cache first + if has_key(s:cache_classstructures, cache_key) + let classcontents = s:cache_classstructures[cache_key] + " cached class contents can contain content from multiple files (superclasses) so we have to + " validate cached result's validness by the filemtimes used to create the cached value + let valid = 1 + for classstructure in classcontents + if getftime(classstructure.file) != classstructure.mtime + let valid = 0 + " we could break here, but the time required for checking probably worth + " the the memory we can free by checking every file in the cached hirearchy + call phpcomplete#ClearCachedClassContents(classstructure.file) + endif + endfor + + if valid + " cache hit, we found an entry for this file + class pair and every + " file in the response is also valid + return classcontents + else + " clear the outdated cached value from the cache store + call remove(s:cache_classstructures, cache_key) + call phpcomplete#ClearCachedClassContents(full_file_path) + + " fall trough for the read from files path + endif + else + call phpcomplete#ClearCachedClassContents(full_file_path) + endif + + " cache miss, fetch the content from the files itself + let classfile = readfile(a:classlocation) + let classcontents = phpcomplete#GetClassContentsStructure(full_file_path, classfile, a:class_name) + let s:cache_classstructures[cache_key] = classcontents + + return classcontents +endfunction " }}} + +function! phpcomplete#ClearCachedClassContents(full_file_path) " {{{ + for [cache_key, cached_value] in items(s:cache_classstructures) + if stridx(cache_key, a:full_file_path.'#') == 0 + call remove(s:cache_classstructures, cache_key) + endif + endfor +endfunction " }}} + +function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_name) " {{{ + " returns dictionary containing content, namespace and imports for the class and all parent classes. + " Example: + " [ + " { + " class: 'foo', + " content: '... class foo extends bar ... ', + " namespace: 'NS\Foo', + " imports : { ... }, + " file: '/foo.php', + " mtime: 42, + " }, + " { + " class: 'bar', + " content: '... class bar extends baz ... ', + " namespace: 'NS\Bar', + " imports : { ... } + " file: '/bar.php', + " mtime: 42, + " }, + " ... + " ] + " + let full_file_path = fnamemodify(a:file_path, ':p') + let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*' + let cfile = join(a:file_lines, "\n") + let result = [] + " We use new buffer and (later) normal! because + " this is the most efficient way. The other way + " is to go through the looong string looking for + " matching {} + + " remember the window we started at + let phpcomplete_original_window = winnr() + + silent! below 1new + silent! 0put =cfile + call search('\(class\|interface\)\s\+'.a:class_name.'\(\>\|$\)') + let cfline = line('.') + call search('{') + let endline = line('.') + + let content = join(getline(cfline, endline),"\n") + " Catch extends + if content =~? 'extends' + let extends_class = matchstr(content, 'class\_s\+'.a:class_name.'\_s\+extends\_s\+\zs'.class_name_pattern.'\ze') + else + let extends_class = '' + endif + call searchpair('{', '', '}', 'W') + let classcontent = join(getline(cfline, line('.')), "\n") + silent! bw! % + let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline]) + " go back to original window + exe phpcomplete_original_window.'wincmd w' + call add(result, { + \ 'class': a:class_name, + \ 'content': classcontent, + \ 'namespace': current_namespace, + \ 'imports': imports, + \ 'file': full_file_path, + \ 'mtime': getftime(full_file_path), + \ }) + + if extends_class != '' + let [extends_class, namespace] = phpcomplete#ExpandClassName(extends_class, current_namespace, imports) + if namespace == '' + let namespace = '\' + endif + let classlocation = phpcomplete#GetClassLocation(extends_class, namespace) + if filereadable(classlocation) + let full_file_path = fnamemodify(classlocation, ':p') + let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), extends_class) + elseif tolower(current_namespace) == tolower(namespace) + " try to find the declaration in the same file. + let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, extends_class) + endif + endif + + return result +endfunction +" }}} + +function! phpcomplete#GetClassContents(classlocation, class_name) " {{{ + let classcontents = phpcomplete#GetCachedClassContents(a:classlocation, a:class_name) + let result = [] + for classstructure in classcontents + call add(result, classstructure.content) + endfor + return join(result, "\n") +endfunction +" }}} + +function! phpcomplete#GetDocBlock(sccontent, search) " {{{ + let i = 0 + let l = 0 + let comment_start = -1 + let comment_end = -1 + let sccontent_len = len(a:sccontent) + + while (i < sccontent_len) + let line = a:sccontent[i] + " search for a function declaration + if line =~? a:search + let l = i - 1 + " start backward serch for the comment block + while l != 0 + let line = a:sccontent[l] + " if comment end found save line position and end search + if line =~? '^\s*\*/' + let comment_end = l + break + " ... or the line doesn't blank (only whitespace or nothing) end search + elseif line !~? '^\s*$' + break + endif + let l -= 1 + endwhile + " no comment found + if comment_end == -1 + return '' + end + + while l != 0 + let line = a:sccontent[l] + if line =~? '^\s*/\*\*' + let comment_start = l + break + endif + let l -= 1 + endwhile + " no docblock comment start found + if comment_start == -1 + return '' + end + + let comment_start += 1 " we dont need the /** + let comment_end -= 1 " we dont need the */ + + " remove leading whitespace and '*'s + let docblock = join(map(copy(a:sccontent[comment_start :comment_end]), 'substitute(v:val, "^\\s*\\*\\s*", "", "")'), "\n") + return docblock + endif + let i += 1 + endwhile + return '' +endfunction +" }}} + +function! phpcomplete#ParseDocBlock(docblock) " {{{ + let res = { + \ 'description': '', + \ 'params': [], + \ 'return': {}, + \ 'throws': [], + \ 'var': {}, + \ } + + let res.description = substitute(matchstr(a:docblock, '\zs\_.\{-}\ze\(@var\|@param\|@return\|$\)'), '\(^\_s*\|\_s*$\)', '', 'g') + let docblock_lines = split(a:docblock, "\n") + + let param_lines = filter(copy(docblock_lines), 'v:val =~? "^@param"') + for param_line in param_lines + let parts = matchlist(param_line, '@param\s\+\(\S\+\)\s\+\(\S\+\)\s*\(.*\)') + if len(parts) > 0 + call add(res.params, { + \ 'line': parts[0], + \ 'type': phpcomplete#GetTypeFromDocBlockParam(get(parts, 1, '')), + \ 'name': get(parts, 2, ''), + \ 'description': get(parts, 3, '')}) + endif + endfor + + let return_line = filter(copy(docblock_lines), 'v:val =~? "^@return"') + if len(return_line) > 0 + let return_parts = matchlist(return_line[0], '@return\s\+\(\S\+\)\s*\(.*\)') + let res['return'] = { + \ 'line': return_parts[0], + \ 'type': phpcomplete#GetTypeFromDocBlockParam(get(return_parts, 1, '')), + \ 'description': get(return_parts, 2, '')} + endif + + let exception_lines = filter(copy(docblock_lines), 'v:val =~? "^\\(@throws\\|@exception\\)"') + for exception_line in exception_lines + let parts = matchlist(exception_line, '^\(@throws\|@exception\)\s\+\(\S\+\)\s*\(.*\)') + if len(parts) > 0 + call add(res.throws, { + \ 'line': parts[0], + \ 'type': phpcomplete#GetTypeFromDocBlockParam(get(parts, 2, '')), + \ 'description': get(parts, 3, '')}) + endif + endfor + + let var_line = filter(copy(docblock_lines), 'v:val =~? "^@var"') + if len(var_line) > 0 + let var_parts = matchlist(var_line[0], '@var\s\+\(\S\+\)\s*\(.*\)') + let res['var'] = { + \ 'line': var_parts[0], + \ 'type': phpcomplete#GetTypeFromDocBlockParam(get(var_parts, 1, '')), + \ 'description': get(var_parts, 2, '')} + endif + + return res +endfunction +" }}} + +function! phpcomplete#GetTypeFromDocBlockParam(docblock_type) " {{{ + if a:docblock_type !~ '|' + return a:docblock_type + endif + + let primitive_types = [ + \ 'string', 'float', 'double', 'int', + \ 'scalar', 'array', 'bool', 'void', 'mixed', + \ 'null', 'callable', 'resource', 'object'] + + " add array of primitives to the list too, like string[] + let primitive_types += map(copy(primitive_types), 'v:val."[]"') + let types = split(a:docblock_type, '|') + for type in types + if index(primitive_types, type) == -1 + return type + endif + endfor + + " only primitive types found, return the first one + return types[0] + +endfunction +" }}} + +function! phpcomplete#FormatDocBlock(info) " {{{ + let res = '' + if len(a:info.description) + let res .= "Description:\n".join(map(split(a:info['description'], "\n"), '"\t".v:val'), "\n")."\n" + endif + + if len(a:info.params) + let res .= "\nArguments:\n" + for arginfo in a:info.params + let res .= "\t".arginfo['name'].' '.arginfo['type'] + if len(arginfo.description) > 0 + let res .= ': '.arginfo['description'] + endif + let res .= "\n" + endfor + endif + + if has_key(a:info.return, 'type') + let res .= "\nReturn:\n\t".a:info['return']['type'] + if len(a:info.return.description) > 0 + let res .= ": ".a:info['return']['description'] + endif + let res .= "\n" + endif + + if len(a:info.throws) + let res .= "\nThrows:\n" + for excinfo in a:info.throws + let res .= "\t".excinfo['type'] + if len(excinfo['description']) > 0 + let res .= ": ".excinfo['description'] + endif + let res .= "\n" + endfor + endif + + if has_key(a:info.var, 'type') + let res .= "Type:\n\t".a:info['var']['type']."\n" + if len(a:info['var']['description']) > 0 + let res .= ': '.a:info['var']['description'] + endif + endif + + return res +endfunction! +" }}} + +function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{ + let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*' + let file_lines = reverse(copy(a:file_lines)) + let i = 0 + let file_length = len(file_lines) + let imports = {} + + let current_namespace = '\' + + while i < file_length + let line = file_lines[i] + + if line =~? '^\s*namespace\s*'.namespace_name_pattern + let current_namespace = matchstr(line, '^\s*namespace\s*\zs'.namespace_name_pattern.'\ze') + break + endif + + if line =~? '^\s*use\>' + if line =~? ';' + let use_line = line + else + " try to find the next line containing ';' + let l = i + let search_line = line + let use_line = line + + " add lines from the file until theres no ';' in them + while search_line !~? ';' && l > 0 + " file lines are reversed so we need to go backwards + let l -= 1 + let search_line = file_lines[l] + let use_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g') + endwhile + endif + let use_expression = matchstr(use_line, '^\s*use\s\+\zs.\{-}\ze;') + let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")') + for part in use_parts + if part =~? '\s\+as\s\+' + let [object, name] = split(part, '\s\+as\s\+') + let object = substitute(object, '^\\', '', '') + let name = substitute(name, '^\\', '', '') + else + let object = part + let name = part + let object = substitute(object, '^\\', '', '') + let name = substitute(name, '^\\', '', '') + if name =~? '\\' + let name = matchstr(name, '\\\zs[^\\]\+\ze$') + endif + endif + " leading slash is not required use imports are always absolute + let imports[name] = {'name': object, 'kind': ''} + endfor + + " find kind flags from tags or built in methods for the objects we extracted + " they can be either classes, interfaces or namespaces, no other thing is importable in php + for [key, import] in items(imports) + " if theres a \ in the name we have it's definetly not a built in thing, look for tags + if import.name =~ '\\' + let patched_ctags_detected = 0 + let [classname, namespace_for_classes] = phpcomplete#ExpandClassName(import.name, '\', {}) + let namespace_name_candidate = substitute(import.name, '\\', '\\\\', 'g') + " can be a namespace name as is, or can be a tagname at the end with a namespace + let tags = phpcomplete#GetTaglist('^\('.namespace_name_candidate.'\|'.classname.'\)$') + if len(tags) > 0 + for tag in tags + " if there's a namespace with the name of the import + if tag.kind == 'n' && tag.name == import.name + call extend(import, tag) + let import['builtin'] = 0 + let patched_ctags_detected = 1 + break + endif + " if the name matches with the extracted classname and namespace + if (tag.kind == 'c' || tag.kind == 'i') && tag.name == classname + if has_key(tag, 'namespace') + let patched_ctags_detected = 1 + if tag.namespace == namespace_for_classes + call extend(import, tag) + let import['builtin'] = 0 + break + endif + elseif !exists('no_namespace_candidate') + " save the first namespacless match to be used if no better + " candidate found later on + let no_namespace_candidate = tag + endif + endif + endfor + " there were a namespacless class name match, if we think that the + " tags are not generated with patched ctags we will take it as a match + if exists('no_namespace_candidate') && !patched_ctags_detected + call extend(import, no_namespace_candidate) + let import['builtin'] = 0 + endif + else + " if no tags are found, extract the namespace from the name + let ns = matchstr(import.name, '\c\zs[a-zA-Z0-9\\]\+\ze\\' . name) + if len(ns) > 0 + let import['name'] = name + let import['namespace'] = ns + let import['builtin'] = 0 + endif + endif + else + " if no \ in the name, it can be a built in class + if has_key(g:php_builtin_classnames, tolower(import.name)) + let import['kind'] = 'c' + let import['builtin'] = 1 + elseif has_key(g:php_builtin_interfaces, import.name) + let import['kind'] = 'i' + let import['builtin'] = 1 + else + " or can be a tag with exactly matchign name + let tags = phpcomplete#GetTaglist('^'.import['name'].'$') + for tag in tags + " search for the first matchin namespace, class, interface with no namespace + if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i') + call extend(import, tag) + let import['builtin'] = 0 + break + endif + endfor + endif + endif + endfor + endif + let i += 1 + endwhile + let sorted_imports = {} + for name in sort(keys(imports)) + let sorted_imports[name] = imports[name] + endfor + return [current_namespace, sorted_imports] +endfunction +" }}} + +function! phpcomplete#ExpandClassName(classname, current_namespace, imports) " {{{ + " if there's an imported class, just use that class's information + if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i') + let namespace = has_key(a:imports[a:classname], 'namespace') ? a:imports[a:classname].namespace : '' + return [a:imports[a:classname].name, namespace] + endif + + " try to find relative namespace in imports, imported names takes precedence over + " current namespace when resolving relative namespaced class names + if a:classname !~ '^\' && a:classname =~ '\\' + let classname_parts = split(a:classname, '\\\+') + if has_key(a:imports, classname_parts[0]) && a:imports[classname_parts[0]].kind == 'n' + let classname_parts[0] = a:imports[classname_parts[0]].name + let namespace = join(classname_parts[0:-2], '\') + let classname = classname_parts[-1] + return [classname, namespace] + endif + endif + + " no imported class or namespace matched, expand with the current namespace + let namespace = '' + let classname = a:classname + " if the classname have namespaces in in or we are in a namespace + if a:classname =~ '\\' || (a:current_namespace != '\' && a:current_namespace != '') + " add current namespace to the a:classname + if a:classname !~ '^\' + let classname = a:current_namespace.'\'.substitute(a:classname, '^\\', '', '') + else + " remove leading \, tag files doesn't have those + let classname = substitute(a:classname, '^\\', '', '') + endif + " split classname to classname and namespace + let classname_parts = split(classname, '\\\+') + if len(classname_parts) > 1 + let namespace = join(classname_parts[0:-2], '\') + let classname = classname_parts[-1] + endif + endif + return [classname, namespace] +endfunction +" }}} + +function! phpcomplete#LoadData() " {{{ +" Keywords/reserved words, all other special things +" Later it is possible to add some help to values, or type of defined variable +let g:php_keywords={'PHP_SELF':'','argv':'','argc':'','GATEWAY_INTERFACE':'','SERVER_ADDR':'','SERVER_NAME':'','SERVER_SOFTWARE':'','SERVER_PROTOCOL':'','REQUEST_METHOD':'','REQUEST_TIME':'','QUERY_STRING':'','DOCUMENT_ROOT':'','HTTP_ACCEPT':'','HTTP_ACCEPT_CHARSET':'','HTTP_ACCEPT_ENCODING':'','HTTP_ACCEPT_LANGUAGE':'','HTTP_CONNECTION':'','HTTP_POST':'','HTTP_REFERER':'','HTTP_USER_AGENT':'','HTTPS':'','REMOTE_ADDR':'','REMOTE_HOST':'','REMOTE_PORT':'','SCRIPT_FILENAME':'','SERVER_ADMIN':'','SERVER_PORT':'','SERVER_SIGNATURE':'','PATH_TRANSLATED':'','SCRIPT_NAME':'','REQUEST_URI':'','PHP_AUTH_DIGEST':'','PHP_AUTH_USER':'','PHP_AUTH_PW':'','AUTH_TYPE':'','and':'','or':'','xor':'','__FILE__':'','exception':'','__LINE__':'','as':'','break':'','case':'','class':'','const':'','continue':'','declare':'','default':'','do':'','echo':'','else':'','elseif':'','enddeclare':'','endfor':'','endforeach':'','endif':'','endswitch':'','endwhile':'','extends':'','for':'','foreach':'','function':'','global':'','if':'','new':'','static':'','switch':'','use':'','var':'','while':'','final':'','php_user_filter':'','interface':'','implements':'','public':'','private':'','protected':'','abstract':'','clone':'','try':'','catch':'','throw':'','cfunction':'','old_function':'','this':'','INI_USER': '','INI_PERDIR': '','INI_SYSTEM': '','INI_ALL': '','ABDAY_1': '','ABDAY_2': '','ABDAY_3': '','ABDAY_4': '','ABDAY_5': '','ABDAY_6': '','ABDAY_7': '','DAY_1': '','DAY_2': '','DAY_3': '','DAY_4': '','DAY_5': '','DAY_6': '','DAY_7': '','ABMON_1': '','ABMON_2': '','ABMON_3': '','ABMON_4': '','ABMON_5': '','ABMON_6': '','ABMON_7': '','ABMON_8': '','ABMON_9': '','ABMON_10': '','ABMON_11': '','ABMON_12': '','MON_1': '','MON_2': '','MON_3': '','MON_4': '','MON_5': '','MON_6': '','MON_7': '','MON_8': '','MON_9': '','MON_10': '','MON_11': '','MON_12': '','AM_STR': '','D_T_FMT': '','ALT_DIGITS': '',} +" One giant hash of all built-in function, class, interface and constant grouped by extension +let php_builtin = {'functions':{},'classes':{},'interfaces':{},'constants':{},} +let php_builtin['functions']['math']={'abs(':'mixed $number | number','acos(':'float $arg | float','acosh(':'float $arg | float','asin(':'float $arg | float','asinh(':'float $arg | float','atan(':'float $arg | float','atan2(':'float $y, float $x | float','atanh(':'float $arg | float','base_convert(':'string $number, int $frombase, int $tobase | string','bindec(':'string $binary_string | number','ceil(':'float $value | float','cos(':'float $arg | float','cosh(':'float $arg | float','decbin(':'int $number | string','dechex(':'int $number | string','decoct(':'int $number | string','deg2rad(':'float $number | float','exp(':'float $arg | float','expm1(':'float $arg | float','floor(':'float $value | float','fmod(':'float $x, float $y | float','getrandmax(':'void | int','hexdec(':'string $hex_string | number','hypot(':'float $x, float $y | float','is_finite(':'float $val | bool','is_infinite(':'float $val | bool','is_nan(':'float $val | bool','lcg_value(':'void | float','log(':'float $arg [, float $base = M_E] | float','log10(':'float $arg | float','log1p(':'float $number | float','max(':'array $values | mixed','min(':'array $values | mixed','mt_getrandmax(':'void | int','mt_rand(':'void | int','mt_srand(':'[ int $seed] | void','octdec(':'string $octal_string | number','pi(':'void | float','pow(':'number $base, number $exp | number','rad2deg(':'float $number | float','rand(':'void | int','round(':'float $val [, int $precision = 0 [, int $mode = PHP_ROUND_HALF_UP]] | float','sin(':'float $arg | float','sinh(':'float $arg | float','sqrt(':'float $arg | float','srand(':'[ int $seed] | void','tan(':'float $arg | float','tanh(':'float $arg | float',} +let php_builtin['functions']['strings']={'addcslashes(':'string $str, string $charlist | string','addslashes(':'string $str | string','bin2hex(':'string $str | string','chop(':'chop — Alias of rtrim()','chr(':'int $ascii | string','chunk_split(':'string $body [, int $chunklen = 76 [, string $end = "\r\n"]] | string','convert_cyr_string(':'string $str, string $from, string $to | string','convert_uudecode(':'string $data | string','convert_uuencode(':'string $data | string','count_chars(':'string $string [, int $mode = 0] | mixed','crc32(':'string $str | int','crypt(':'string $str [, string $salt] | string','echo(':'string $arg1 [, string $...] | void','explode(':'string $delimiter, string $string [, int $limit] | array','fprintf(':'resource $handle, string $format [, mixed $args [, mixed $...]] | int','get_html_translation_table(':'[ int $table = HTML_SPECIALCHARS [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'']]] | array','hebrev(':'string $hebrew_text [, int $max_chars_per_line = 0] | string','hebrevc(':'string $hebrew_text [, int $max_chars_per_line = 0] | string','hex2bin(':'string $data | string','html_entity_decode(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'']] | string','htmlentities(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'' [, bool $double_encode = true]]] | string','htmlspecialchars_decode(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401] | string','htmlspecialchars(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'' [, bool $double_encode = true]]] | string','implode(':'string $glue, array $pieces | string','join(':'join — Alias of implode()','lcfirst(':'string $str | string','levenshtein(':'string $str1, string $str2 | int','localeconv(':'void | array','ltrim(':'string $str [, string $character_mask] | string','md5_file(':'string $filename [, bool $raw_output = false] | string','md5(':'string $str [, bool $raw_output = false] | string','metaphone(':'string $str [, int $phonemes = 0] | string','money_format(':'string $format, float $number | string','nl_langinfo(':'int $item | string','nl2br(':'string $string [, bool $is_xhtml = true] | string','number_format(':'float $number [, int $decimals = 0] | string','ord(':'string $string | int','parse_str(':'string $str [, array &$arr] | void','print(':'string $arg | int','printf(':'string $format [, mixed $args [, mixed $...]] | int','quoted_printable_decode(':'string $str | string','quoted_printable_encode(':'string $str | string','quotemeta(':'string $str | string','rtrim(':'string $str [, string $character_mask] | string','setlocale(':'int $category, string $locale [, string $...] | string','sha1_file(':'string $filename [, bool $raw_output = false] | string','sha1(':'string $str [, bool $raw_output = false] | string','similar_text(':'string $first, string $second [, float &$percent] | int','soundex(':'string $str | string','sprintf(':'string $format [, mixed $args [, mixed $...]] | string','sscanf(':'string $str, string $format [, mixed &$...] | mixed','str_getcsv(':'string $input [, string $delimiter = '','' [, string $enclosure = ''"'' [, string $escape = ''\\'']]] | array','str_ireplace(':'mixed $search, mixed $replace, mixed $subject [, int &$count] | mixed','str_pad(':'string $input, int $pad_length [, string $pad_string = " " [, int $pad_type = STR_PAD_RIGHT]] | string','str_repeat(':'string $input, int $multiplier | string','str_replace(':'mixed $search, mixed $replace, mixed $subject [, int &$count] | mixed','str_rot13(':'string $str | string','str_shuffle(':'string $str | string','str_split(':'string $string [, int $split_length = 1] | array','str_word_count(':'string $string [, int $format = 0 [, string $charlist]] | mixed','strcasecmp(':'string $str1, string $str2 | int','strchr(':'strchr — Alias of strstr()','strcmp(':'string $str1, string $str2 | int','strcoll(':'string $str1, string $str2 | int','strcspn(':'string $str1, string $str2 [, int $start [, int $length]] | int','strip_tags(':'string $str [, string $allowable_tags] | string','stripcslashes(':'string $str | string','stripos(':'string $haystack, string $needle [, int $offset = 0] | int','stripslashes(':'string $str | string','stristr(':'string $haystack, mixed $needle [, bool $before_needle = false] | string','strlen(':'string $string | int','strnatcasecmp(':'string $str1, string $str2 | int','strnatcmp(':'string $str1, string $str2 | int','strncasecmp(':'string $str1, string $str2, int $len | int','strncmp(':'string $str1, string $str2, int $len | int','strpbrk(':'string $haystack, string $char_list | string','strpos(':'string $haystack, mixed $needle [, int $offset = 0] | mixed','strrchr(':'string $haystack, mixed $needle | string','strrev(':'string $string | string','strripos(':'string $haystack, string $needle [, int $offset = 0] | int','strrpos(':'string $haystack, string $needle [, int $offset = 0] | int','strspn(':'string $subject, string $mask [, int $start [, int $length]] | int','strstr(':'string $haystack, mixed $needle [, bool $before_needle = false] | string','strtok(':'string $str, string $token | string','strtolower(':'string $str | string','strtoupper(':'string $string | string','strtr(':'string $str, string $from, string $to | string','substr_compare(':'string $main_str, string $str, int $offset [, int $length [, bool $case_insensitivity = false]] | int','substr_count(':'string $haystack, string $needle [, int $offset = 0 [, int $length]] | int','substr_replace(':'mixed $string, mixed $replacement, mixed $start [, mixed $length] | mixed','substr(':'string $string, int $start [, int $length] | string','trim(':'string $str [, string $character_mask = " \t\n\r\0\x0B"] | string','ucfirst(':'string $str | string','ucwords(':'string $str | string','vfprintf(':'resource $handle, string $format, array $args | int','vprintf(':'string $format, array $args | int','vsprintf(':'string $format, array $args | string','wordwrap(':'string $str [, int $width = 75 [, string $break = "\n" [, bool $cut = false]]] | string',} +let php_builtin['functions']['apache']={'apache_child_terminate(':'void | bool','apache_get_modules(':'void | array','apache_get_version(':'void | string','apache_getenv(':'string $variable [, bool $walk_to_top = false] | string','apache_lookup_uri(':'string $filename | object','apache_note(':'string $note_name [, string $note_value = ""] | string','apache_request_headers(':'void | array','apache_reset_timeout(':'void | bool','apache_response_headers(':'void | array','apache_setenv(':'string $variable, string $value [, bool $walk_to_top = false] | bool','getallheaders(':'void | array','virtual(':'string $filename | bool',} +let php_builtin['functions']['arrays']={'array_change_key_case(':'array $array [, int $case = CASE_LOWER] | array','array_chunk(':'array $array, int $size [, bool $preserve_keys = false] | array','array_column(':'array $array, mixed $column_key [, mixed $index_key = null] | array','array_combine(':'array $keys, array $values | array','array_count_values(':'array $array | array','array_diff_assoc(':'array $array1, array $array2 [, array $...] | array','array_diff_key(':'array $array1, array $array2 [, array $...] | array','array_diff_uassoc(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_diff_ukey(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_diff(':'array $array1, array $array2 [, array $...] | array','array_fill_keys(':'array $keys, mixed $value | array','array_fill(':'int $start_index, int $num, mixed $value | array','array_filter(':'array $array [, callable $callback] | array','array_flip(':'array $array | array','array_intersect_assoc(':'array $array1, array $array2 [, array $...] | array','array_intersect_key(':'array $array1, array $array2 [, array $...] | array','array_intersect_uassoc(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_intersect_ukey(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_intersect(':'array $array1, array $array2 [, array $...] | array','array_key_exists(':'mixed $key, array $array | bool','array_keys(':'array $array [, mixed $search_value [, bool $strict = false]] | array','array_map(':'callable $callback, array $array1 [, array $...] | array','array_merge_recursive(':'array $array1 [, array $...] | array','array_merge(':'array $array1 [, array $...] | array','array_multisort(':'array &$array1 [, mixed $array1_sort_order = SORT_ASC [, mixed $array1_sort_flags = SORT_REGULAR [, mixed $...]]] | bool','array_pad(':'array $array, int $size, mixed $value | array','array_pop(':'array &$array | mixed','array_product(':'array $array | number','array_push(':'array &$array, mixed $value1 [, mixed $...] | int','array_rand(':'array $array [, int $num = 1] | mixed','array_reduce(':'array $array, callable $callback [, mixed $initial = NULL] | mixed','array_replace_recursive(':'array $array1, array $array2 [, array $...] | array','array_replace(':'array $array1, array $array2 [, array $...] | array','array_reverse(':'array $array [, bool $preserve_keys = false] | array','array_search(':'mixed $needle, array $haystack [, bool $strict = false] | mixed','array_shift(':'array &$array | mixed','array_slice(':'array $array, int $offset [, int $length = NULL [, bool $preserve_keys = false]] | array','array_splice(':'array &$input, int $offset [, int $length [, mixed $replacement = array()]] | array','array_sum(':'array $array | number','array_udiff_assoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_udiff_uassoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func [, callable $key_compare_func]]] | array','array_udiff(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_uintersect_assoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_uintersect_uassoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func [, callable $key_compare_func]]] | array','array_uintersect(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_unique(':'array $array [, int $sort_flags = SORT_STRING] | array','array_unshift(':'array &$array, mixed $value1 [, mixed $...] | int','array_values(':'array $array | array','array_walk_recursive(':'array &$array, callable $callback [, mixed $userdata = NULL] | bool','array_walk(':'array &$array, callable $callback [, mixed $userdata = NULL] | bool','array(':'[ mixed $...] | array','arsort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','asort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','compact(':'mixed $varname1 [, mixed $...] | array','count(':'mixed $array_or_countable [, int $mode = COUNT_NORMAL] | int','current(':'array &$array | mixed','each(':'array &$array | array','end(':'array &$array | mixed','extract(':'array &$array [, int $flags = EXTR_OVERWRITE [, string $prefix = NULL]] | int','in_array(':'mixed $needle, array $haystack [, bool $strict = FALSE] | bool','key_exists(':'key_exists — Alias of array_key_exists()','key(':'array &$array | mixed','krsort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','ksort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','list(':'mixed $var1 [, mixed $...] | array','natcasesort(':'array &$array | bool','natsort(':'array &$array | bool','next(':'array &$array | mixed','pos(':'pos — Alias of current()','prev(':'array &$array | mixed','range(':'mixed $start, mixed $end [, number $step = 1] | array','reset(':'array &$array | mixed','rsort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','shuffle(':'array &$array | bool','sizeof(':'sizeof — Alias of count()','sort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','uasort(':'array &$array, callable $value_compare_func | bool','uksort(':'array &$array, callable $key_compare_func | bool','usort(':'array &$array, callable $value_compare_func | bool',} +let php_builtin['functions']['php_options_info']={'assert_options(':'int $what [, mixed $value] | mixed','assert(':'mixed $assertion [, string $description] | bool','cli_get_process_title(':'void | string','cli_set_process_title(':'string $title | bool','dl(':'string $library | bool','extension_loaded(':'string $name | bool','gc_collect_cycles(':'void | int','gc_disable(':'void | void','gc_enable(':'void | void','gc_enabled(':'void | bool','get_cfg_var(':'string $option | string','get_current_user(':'void | string','get_defined_constants(':'[ bool $categorize = false] | array','get_extension_funcs(':'string $module_name | array','get_include_path(':'void | string','get_included_files(':'void | array','get_loaded_extensions(':'[ bool $zend_extensions = false] | array','get_magic_quotes_gpc(':'void | bool','get_magic_quotes_runtime(':'void | bool','get_required_files(':'get_required_files — Alias of get_included_files()','getenv(':'string $varname | string','getlastmod(':'void | int','getmygid(':'void | int','getmyinode(':'void | int','getmypid(':'void | int','getmyuid(':'void | int','getopt(':'string $options [, array $longopts] | array','getrusage(':'[ int $who = 0] | array','ini_alter(':'ini_alter — Alias of ini_set()','ini_get_all(':'[ string $extension [, bool $details = true]] | array','ini_get(':'string $varname | string','ini_restore(':'string $varname | void','ini_set(':'string $varname, string $newvalue | string','magic_quotes_runtime(':'magic_quotes_runtime — Alias of set_magic_quotes_runtime()','memory_get_peak_usage(':'[ bool $real_usage = false] | int','memory_get_usage(':'[ bool $real_usage = false] | int','php_ini_loaded_file(':'void | string','php_ini_scanned_files(':'void | string','php_logo_guid(':'void | string','php_sapi_name(':'void | string','php_uname(':'[ string $mode = "a"] | string','phpcredits(':'[ int $flag = CREDITS_ALL] | bool','phpinfo(':'[ int $what = INFO_ALL] | bool','phpversion(':'[ string $extension] | string','putenv(':'string $setting | bool','restore_include_path(':'void | void','set_include_path(':'string $new_include_path | string','set_magic_quotes_runtime(':'bool $new_setting | bool','set_time_limit(':'int $seconds | void','sys_get_temp_dir(':'void | string','version_compare(':'string $version1, string $version2 [, string $operator] | mixed','zend_logo_guid(':'void | string','zend_thread_id(':'void | int','zend_version(':'void | string',} +let php_builtin['functions']['classes_objects']={'__autoload(':'string $class | void','call_user_method_array(':'string $method_name, object &$obj, array $params | mixed','call_user_method(':'string $method_name, object &$obj [, mixed $parameter [, mixed $...]] | mixed','class_alias(':'string $original, string $alias [, bool $autoload = TRUE] | bool','class_exists(':'string $class_name [, bool $autoload = true] | bool','get_called_class(':'void | string','get_class_methods(':'mixed $class_name | array','get_class_vars(':'string $class_name | array','get_class(':'[ object $object = NULL] | string','get_declared_classes(':'void | array','get_declared_interfaces(':'void | array','get_declared_traits(':'void | array','get_object_vars(':'object $object | array','get_parent_class(':'[ mixed $object] | string','interface_exists(':'string $interface_name [, bool $autoload = true] | bool','is_a(':'object $object, string $class_name [, bool $allow_string = FALSE] | bool','is_subclass_of(':'mixed $object, string $class_name [, bool $allow_string = TRUE] | bool','method_exists(':'mixed $object, string $method_name | bool','property_exists(':'mixed $class, string $property | bool','trait_exists(':'string $traitname [, bool $autoload] | bool',} +let php_builtin['functions']['urls']={'base64_decode(':'string $data [, bool $strict = false] | string','base64_encode(':'string $data | string','get_headers(':'string $url [, int $format = 0] | array','get_meta_tags(':'string $filename [, bool $use_include_path = false] | array','http_build_query(':'mixed $query_data [, string $numeric_prefix [, string $arg_separator [, int $enc_type = PHP_QUERY_RFC1738]]] | string','parse_url(':'string $url [, int $component = -1] | mixed','rawurldecode(':'string $str | string','rawurlencode(':'string $str | string','urldecode(':'string $str | string','urlencode(':'string $str | string',} +let php_builtin['functions']['filesystem']={'basename(':'string $path [, string $suffix] | string','chgrp(':'string $filename, mixed $group | bool','chmod(':'string $filename, int $mode | bool','chown(':'string $filename, mixed $user | bool','clearstatcache(':'[ bool $clear_realpath_cache = false [, string $filename]] | void','copy(':'string $source, string $dest [, resource $context] | bool','dirname(':'string $path | string','disk_free_space(':'string $directory | float','disk_total_space(':'string $directory | float','diskfreespace(':'diskfreespace — Alias of disk_free_space()','fclose(':'resource $handle | bool','feof(':'resource $handle | bool','fflush(':'resource $handle | bool','fgetc(':'resource $handle | string','fgetcsv(':'resource $handle [, int $length = 0 [, string $delimiter = '','' [, string $enclosure = ''"'' [, string $escape = ''\\'']]]] | array','fgets(':'resource $handle [, int $length] | string','fgetss(':'resource $handle [, int $length [, string $allowable_tags]] | string','file_exists(':'string $filename | bool','file_get_contents(':'string $filename [, bool $use_include_path = false [, resource $context [, int $offset = -1 [, int $maxlen]]]] | string','file_put_contents(':'string $filename, mixed $data [, int $flags = 0 [, resource $context]] | int','file(':'string $filename [, int $flags = 0 [, resource $context]] | array','fileatime(':'string $filename | int','filectime(':'string $filename | int','filegroup(':'string $filename | int','fileinode(':'string $filename | int','filemtime(':'string $filename | int','fileowner(':'string $filename | int','fileperms(':'string $filename | int','filesize(':'string $filename | int','filetype(':'string $filename | string','flock(':'resource $handle, int $operation [, int &$wouldblock] | bool','fnmatch(':'string $pattern, string $string [, int $flags = 0] | bool','fopen(':'string $filename, string $mode [, bool $use_include_path = false [, resource $context]] | resource','fpassthru(':'resource $handle | int','fputcsv(':'resource $handle, array $fields [, string $delimiter = '','' [, string $enclosure = ''"'']] | int','fputs(':'fputs — Alias of fwrite()','fread(':'resource $handle, int $length | string','fscanf(':'resource $handle, string $format [, mixed &$...] | mixed','fseek(':'resource $handle, int $offset [, int $whence = SEEK_SET] | int','fstat(':'resource $handle | array','ftell(':'resource $handle | int','ftruncate(':'resource $handle, int $size | bool','fwrite(':'resource $handle, string $string [, int $length] | int','glob(':'string $pattern [, int $flags = 0] | array','is_dir(':'string $filename | bool','is_executable(':'string $filename | bool','is_file(':'string $filename | bool','is_link(':'string $filename | bool','is_readable(':'string $filename | bool','is_uploaded_file(':'string $filename | bool','is_writable(':'string $filename | bool','is_writeable(':'is_writeable — Alias of is_writable()','lchgrp(':'string $filename, mixed $group | bool','lchown(':'string $filename, mixed $user | bool','link(':'string $target, string $link | bool','linkinfo(':'string $path | int','lstat(':'string $filename | array','mkdir(':'string $pathname [, int $mode = 0777 [, bool $recursive = false [, resource $context]]] | bool','move_uploaded_file(':'string $filename, string $destination | bool','parse_ini_file(':'string $filename [, bool $process_sections = false [, int $scanner_mode = INI_SCANNER_NORMAL]] | array','parse_ini_string(':'string $ini [, bool $process_sections = false [, int $scanner_mode = INI_SCANNER_NORMAL]] | array','pathinfo(':'string $path [, int $options = PATHINFO_DIRNAME | PATHINFO_BASENAME | PATHINFO_EXTENSION | PATHINFO_FILENAME] | mixed','pclose(':'resource $handle | int','popen(':'string $command, string $mode | resource','readfile(':'string $filename [, bool $use_include_path = false [, resource $context]] | int','readlink(':'string $path | string','realpath_cache_get(':'void | array','realpath_cache_size(':'void | int','realpath(':'string $path | string','rename(':'string $oldname, string $newname [, resource $context] | bool','rewind(':'resource $handle | bool','rmdir(':'string $dirname [, resource $context] | bool','set_file_buffer(':'set_file_buffer — Alias of stream_set_write_buffer()','stat(':'string $filename | array','symlink(':'string $target, string $link | bool','tempnam(':'string $dir, string $prefix | string','tmpfile(':'void | resource','touch(':'string $filename [, int $time = time() [, int $atime]] | bool','umask(':'[ int $mask] | int','unlink(':'string $filename [, resource $context] | bool',} +let php_builtin['functions']['variable_handling']={'boolval(':'mixed $var | boolean','debug_zval_dump(':'mixed $variable [, mixed $...] | void','doubleval(':'doubleval — Alias of floatval()','empty(':'mixed $var | bool','floatval(':'mixed $var | float','get_defined_vars(':'void | array','get_resource_type(':'resource $handle | string','gettype(':'mixed $var | string','import_request_variables(':'string $types [, string $prefix] | bool','intval(':'mixed $var [, int $base = 10] | int','is_array(':'mixed $var | bool','is_bool(':'mixed $var | bool','is_callable(':'callable $name [, bool $syntax_only = false [, string &$callable_name]] | bool','is_double(':'is_double — Alias of is_float()','is_float(':'mixed $var | bool','is_int(':'mixed $var | bool','is_integer(':'is_integer — Alias of is_int()','is_long(':'is_long — Alias of is_int()','is_null(':'mixed $var | bool','is_numeric(':'mixed $var | bool','is_object(':'mixed $var | bool','is_real(':'is_real — Alias of is_float()','is_resource(':'mixed $var | bool','is_scalar(':'mixed $var | bool','is_string(':'mixed $var | bool','isset(':'mixed $var [, mixed $...] | bool','print_r(':'mixed $expression [, bool $return = false] | mixed','serialize(':'mixed $value | string','settype(':'mixed &$var, string $type | bool','strval(':'mixed $var | string','unserialize(':'string $str | mixed','unset(':'mixed $var [, mixed $...] | void','var_dump(':'mixed $expression [, mixed $...] | void','var_export(':'mixed $expression [, bool $return = false] | mixed',} +let php_builtin['functions']['calendar']={'cal_days_in_month(':'int $calendar, int $month, int $year | int','cal_from_jd(':'int $jd, int $calendar | array','cal_info(':'[ int $calendar = -1] | array','cal_to_jd(':'int $calendar, int $month, int $day, int $year | int','easter_date(':'[ int $year] | int','easter_days(':'[ int $year [, int $method = CAL_EASTER_DEFAULT]] | int','frenchtojd(':'int $month, int $day, int $year | int','gregoriantojd(':'int $month, int $day, int $year | int','jddayofweek(':'int $julianday [, int $mode = CAL_DOW_DAYNO] | mixed','jdmonthname(':'int $julianday, int $mode | string','jdtofrench(':'int $juliandaycount | string','jdtogregorian(':'int $julianday | string','jdtojewish(':'int $juliandaycount [, bool $hebrew = false [, int $fl = 0]] | string','jdtojulian(':'int $julianday | string','jdtounix(':'int $jday | int','jewishtojd(':'int $month, int $day, int $year | int','juliantojd(':'int $month, int $day, int $year | int','unixtojd(':'[ int $timestamp = time()] | int',} +let php_builtin['functions']['function_handling']={'call_user_func_array(':'callable $callback, array $param_arr | mixed','call_user_func(':'callable $callback [, mixed $parameter [, mixed $...]] | mixed','create_function(':'string $args, string $code | string','forward_static_call_array(':'callable $function, array $parameters | mixed','forward_static_call(':'callable $function [, mixed $parameter [, mixed $...]] | mixed','func_get_arg(':'int $arg_num | mixed','func_get_args(':'void | array','func_num_args(':'void | int','function_exists(':'string $function_name | bool','get_defined_functions(':'void | array','register_shutdown_function(':'callable $callback [, mixed $parameter [, mixed $...]] | void','register_tick_function(':'callable $function [, mixed $arg [, mixed $...]] | bool','unregister_tick_function(':'string $function_name | void',} +let php_builtin['functions']['directories']={'chdir(':'string $directory | bool','chroot(':'string $directory | bool','closedir(':'[ resource $dir_handle] | void','dir(':'string $directory [, resource $context] | Directory','getcwd(':'void | string','opendir(':'string $path [, resource $context] | resource','readdir(':'[ resource $dir_handle] | string','rewinddir(':'[ resource $dir_handle] | void','scandir(':'string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context]] | array',} +let php_builtin['functions']['date_time']={'checkdate(':'int $month, int $day, int $year | bool','date_default_timezone_get(':'void | string','date_default_timezone_set(':'string $timezone_identifier | bool','date_parse_from_format(':'string $format, string $date | array','date_parse(':'string $date | array','date_sun_info(':'int $time, float $latitude, float $longitude | array','date_sunrise(':'int $timestamp [, int $format = SUNFUNCS_RET_STRING [, float $latitude = ini_get("date.default_latitude") [, float $longitude = ini_get("date.default_longitude") [, float $zenith = ini_get("date.sunrise_zenith") [, float $gmt_offset = 0]]]]] | mixed','date_sunset(':'int $timestamp [, int $format = SUNFUNCS_RET_STRING [, float $latitude = ini_get("date.default_latitude") [, float $longitude = ini_get("date.default_longitude") [, float $zenith = ini_get("date.sunset_zenith") [, float $gmt_offset = 0]]]]] | mixed','date(':'string $format [, int $timestamp = time()] | string','getdate(':'[ int $timestamp = time()] | array','gettimeofday(':'[ bool $return_float = false] | mixed','gmdate(':'string $format [, int $timestamp = time()] | string','gmmktime(':'[ int $hour = gmdate("H") [, int $minute = gmdate("i") [, int $second = gmdate("s") [, int $month = gmdate("n") [, int $day = gmdate("j") [, int $year = gmdate("Y") [, int $is_dst = -1]]]]]]] | int','gmstrftime(':'string $format [, int $timestamp = time()] | string','idate(':'string $format [, int $timestamp = time()] | int','localtime(':'[ int $timestamp = time() [, bool $is_associative = false]] | array','microtime(':'[ bool $get_as_float = false] | mixed','mktime(':'[ int $hour = date("H") [, int $minute = date("i") [, int $second = date("s") [, int $month = date("n") [, int $day = date("j") [, int $year = date("Y") [, int $is_dst = -1]]]]]]] | int','strftime(':'string $format [, int $timestamp = time()] | string','strptime(':'string $date, string $format | array','strtotime(':'string $time [, int $now = time()] | int','time(':'void | int','timezone_name_from_abbr(':'string $abbr [, int $gmtOffset = -1 [, int $isdst = -1]] | string','timezone_version_get(':'void | string',} +let php_builtin['functions']['network']={'checkdnsrr(':'string $host [, string $type = "MX"] | bool','closelog(':'void | bool','define_syslog_variables(':'void | void','dns_get_record(':'string $hostname [, int $type = DNS_ANY [, array &$authns [, array &$addtl [, bool &$raw = false]]]] | array','fsockopen(':'string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout")]]]] | resource','gethostbyaddr(':'string $ip_address | string','gethostbyname(':'string $hostname | string','gethostbynamel(':'string $hostname | array','gethostname(':'void | string','getmxrr(':'string $hostname, array &$mxhosts [, array &$weight] | bool','getprotobyname(':'string $name | int','getprotobynumber(':'int $number | string','getservbyname(':'string $service, string $protocol | int','getservbyport(':'int $port, string $protocol | string','header_register_callback(':'callable $callback | bool','header_remove(':'[ string $name] | void','header(':'string $string [, bool $replace = true [, int $http_response_code]] | void','headers_list(':'void | array','headers_sent(':'[ string &$file [, int &$line]] | bool','http_response_code(':'[ int $response_code] | int','inet_ntop(':'string $in_addr | string','inet_pton(':'string $address | string','ip2long(':'string $ip_address | int','long2ip(':'string $proper_address | string','openlog(':'string $ident, int $option, int $facility | bool','pfsockopen(':'string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout")]]]] | resource','setcookie(':'string $name [, string $value [, int $expire = 0 [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false]]]]]] | bool','setrawcookie(':'string $name [, string $value [, int $expire = 0 [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false]]]]]] | bool','socket_get_status(':'socket_get_status — Alias of stream_get_meta_data()','socket_set_blocking(':'socket_set_blocking — Alias of stream_set_blocking()','socket_set_timeout(':'socket_set_timeout — Alias of stream_set_timeout()','syslog(':'int $priority, string $message | bool',} +let php_builtin['functions']['spl']={'class_implements(':'mixed $class [, bool $autoload = true] | array','class_parents(':'mixed $class [, bool $autoload = true] | array','class_uses(':'mixed $class [, bool $autoload = true] | array','iterator_apply(':'Traversable $iterator, callable $function [, array $args] | int','iterator_count(':'Traversable $iterator | int','iterator_to_array(':'Traversable $iterator [, bool $use_keys = true] | array','spl_autoload_call(':'string $class_name | void','spl_autoload_extensions(':'[ string $file_extensions] | string','spl_autoload_functions(':'void | array','spl_autoload_register(':'[ callable $autoload_function [, bool $throw = true [, bool $prepend = false]]] | bool','spl_autoload_unregister(':'mixed $autoload_function | bool','spl_autoload(':'string $class_name [, string $file_extensions = spl_autoload_extensions()] | void','spl_classes(':'void | array','spl_object_hash(':'object $obj | string',} +let php_builtin['functions']['misc']={'connection_aborted(':'void | int','connection_status(':'void | int','connection_timeout(':'void | int','constant(':'string $name | mixed','define(':'string $name, mixed $value [, bool $case_insensitive = false] | bool','defined(':'string $name | bool','eval(':'string $code | mixed','exit(':'[ string $status] | void','get_browser(':'[ string $user_agent [, bool $return_array = false]] | mixed','__halt_compiler(':'void | void','highlight_file(':'string $filename [, bool $return = false] | mixed','highlight_string(':'string $str [, bool $return = false] | mixed','ignore_user_abort(':'[ string $value] | int','pack(':'string $format [, mixed $args [, mixed $...]] | string','php_check_syntax(':'string $filename [, string &$error_message] | bool','php_strip_whitespace(':'string $filename | string','show_source(':'show_source — Alias of highlight_file()','sleep(':'int $seconds | int','sys_getloadavg(':'void | array','time_nanosleep(':'int $seconds, int $nanoseconds | mixed','time_sleep_until(':'float $timestamp | bool','uniqid(':'[ string $prefix = "" [, bool $more_entropy = false]] | string','unpack(':'string $format, string $data | array','usleep(':'int $micro_seconds | void',} +let php_builtin['functions']['curl']={'curl_close(':'resource $ch | void','curl_copy_handle(':'resource $ch | resource','curl_errno(':'resource $ch | int','curl_error(':'resource $ch | string','curl_escape(':'resource $ch, string $str | string','curl_exec(':'resource $ch | mixed','curl_getinfo(':'resource $ch [, int $opt = 0] | mixed','curl_init(':'[ string $url = NULL] | resource','curl_multi_add_handle(':'resource $mh, resource $ch | int','curl_multi_close(':'resource $mh | void','curl_multi_exec(':'resource $mh, int &$still_running | int','curl_multi_getcontent(':'resource $ch | string','curl_multi_info_read(':'resource $mh [, int &$msgs_in_queue = NULL] | array','curl_multi_init(':'void | resource','curl_multi_remove_handle(':'resource $mh, resource $ch | int','curl_multi_select(':'resource $mh [, float $timeout = 1.0] | int','curl_multi_setopt(':'resource $mh, int $option, mixed $value | bool','curl_multi_strerror(':'int $errornum | string','curl_pause(':'resource $ch, int $bitmask | int','curl_reset(':'resource $ch | void','curl_setopt_array(':'resource $ch, array $options | bool','curl_setopt(':'resource $ch, int $option, mixed $value | bool','curl_share_close(':'resource $sh | void','curl_share_init(':'void | resource','curl_share_setopt(':'resource $sh, int $option, string $value | bool','curl_strerror(':'int $errornum | string','curl_unescape(':'resource $ch, string $str | string','curl_version(':'[ int $age = CURLVERSION_NOW] | array',} +let php_builtin['functions']['error_handling']={'debug_backtrace(':'[ int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT [, int $limit = 0]] | array','debug_print_backtrace(':'[ int $options = 0 [, int $limit = 0]] | void','error_get_last(':'void | array','error_log(':'string $message [, int $message_type = 0 [, string $destination [, string $extra_headers]]] | bool','error_reporting(':'[ int $level] | int','restore_error_handler(':'void | bool','restore_exception_handler(':'void | bool','set_error_handler(':'callable $error_handler [, int $error_types = E_ALL | E_STRICT] | mixed','set_exception_handler(':'callable $exception_handler | callable','trigger_error(':'string $error_msg [, int $error_type = E_USER_NOTICE] | bool',} +let php_builtin['functions']['dom']={'dom_import_simplexml(':'SimpleXMLElement $node | DOMElement',} +let php_builtin['functions']['program_execution']={'escapeshellarg(':'string $arg | string','escapeshellcmd(':'string $command | string','exec(':'string $command [, array &$output [, int &$return_var]] | string','passthru(':'string $command [, int &$return_var] | void','proc_close(':'resource $process | int','proc_get_status(':'resource $process | array','proc_nice(':'int $increment | bool','proc_open(':'string $cmd, array $descriptorspec, array &$pipes [, string $cwd [, array $env [, array $other_options]]] | resource','proc_terminate(':'resource $process [, int $signal = 15] | bool','shell_exec(':'string $cmd | string','system(':'string $command [, int &$return_var] | string',} +let php_builtin['functions']['mail']={'ezmlm_hash(':'string $addr | int','mail(':'string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] | bool',} +let php_builtin['functions']['fastcgi_process_manager']={'fastcgi_finish_request(':'void | boolean',} +let php_builtin['functions']['filter']={'filter_has_var(':'int $type, string $variable_name | bool','filter_id(':'string $filtername | int','filter_input_array(':'int $type [, mixed $definition [, bool $add_empty = true]] | mixed','filter_input(':'int $type, string $variable_name [, int $filter = FILTER_DEFAULT [, mixed $options]] | mixed','filter_list(':'void | array','filter_var_array(':'array $data [, mixed $definition [, bool $add_empty = true]] | mixed','filter_var(':'mixed $variable [, int $filter = FILTER_DEFAULT [, mixed $options]] | mixed',} +let php_builtin['functions']['fileinfo']={'finfo_buffer(':'resource $finfo [, string $string = NULL [, int $options = FILEINFO_NONE [, resource $context = NULL]]] | string','finfo_close(':'resource $finfo | bool','finfo_file(':'resource $finfo [, string $file_name = NULL [, int $options = FILEINFO_NONE [, resource $context = NULL]]] | string','finfo_open(':'[ int $options = FILEINFO_NONE [, string $magic_file = NULL]] | resource','finfo_set_flags(':'resource $finfo, int $options | bool','mime_content_type(':'string $filename | string',} +let php_builtin['functions']['output_control']={'flush(':'void | void','ob_clean(':'void | void','ob_end_clean(':'void | bool','ob_end_flush(':'void | bool','ob_flush(':'void | void','ob_get_clean(':'void | string','ob_get_contents(':'void | string','ob_get_flush(':'void | string','ob_get_length(':'void | int','ob_get_level(':'void | int','ob_get_status(':'[ bool $full_status = FALSE] | array','ob_gzhandler(':'string $buffer, int $mode | string','ob_implicit_flush(':'[ int $flag = true] | void','ob_list_handlers(':'void | array','ob_start(':'[ callable $output_callback = NULL [, int $chunk_size = 0 [, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS]]] | bool','output_add_rewrite_var(':'string $name, string $value | bool','output_reset_rewrite_vars(':'void | bool',} +let php_builtin['functions']['gd']={'gd_info(':'void | array','getimagesize(':'string $filename [, array &$imageinfo] | array','getimagesizefromstring(':'string $imagedata [, array &$imageinfo] | array','image_type_to_extension(':'int $imagetype [, bool $include_dot = TRUE] | string','image_type_to_mime_type(':'int $imagetype | string','image2wbmp(':'resource $image [, string $filename [, int $threshold]] | bool','imageaffine(':'resource $image, array $affine [, array $clip] | resource','imageaffinematrixconcat(':'array $m1, array $m2 | array','imageaffinematrixget(':'int $type [, mixed $options] | array','imagealphablending(':'resource $image, bool $blendmode | bool','imageantialias(':'resource $image, bool $enabled | bool','imagearc(':'resource $image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color | bool','imagechar(':'resource $image, int $font, int $x, int $y, string $c, int $color | bool','imagecharup(':'resource $image, int $font, int $x, int $y, string $c, int $color | bool','imagecolorallocate(':'resource $image, int $red, int $green, int $blue | int','imagecolorallocatealpha(':'resource $image, int $red, int $green, int $blue, int $alpha | int','imagecolorat(':'resource $image, int $x, int $y | int','imagecolorclosest(':'resource $image, int $red, int $green, int $blue | int','imagecolorclosestalpha(':'resource $image, int $red, int $green, int $blue, int $alpha | int','imagecolorclosesthwb(':'resource $image, int $red, int $green, int $blue | int','imagecolordeallocate(':'resource $image, int $color | bool','imagecolorexact(':'resource $image, int $red, int $green, int $blue | int','imagecolorexactalpha(':'resource $image, int $red, int $green, int $blue, int $alpha | int','imagecolormatch(':'resource $image1, resource $image2 | bool','imagecolorresolve(':'resource $image, int $red, int $green, int $blue | int','imagecolorresolvealpha(':'resource $image, int $red, int $green, int $blue, int $alpha | int','imagecolorset(':'resource $image, int $index, int $red, int $green, int $blue [, int $alpha = 0] | void','imagecolorsforindex(':'resource $image, int $index | array','imagecolorstotal(':'resource $image | int','imagecolortransparent(':'resource $image [, int $color] | int','imageconvolution(':'resource $image, array $matrix, float $div, float $offset | bool','imagecopy(':'resource $dst_im, resource $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h | bool','imagecopymerge(':'resource $dst_im, resource $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct | bool','imagecopymergegray(':'resource $dst_im, resource $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct | bool','imagecopyresampled(':'resource $dst_image, resource $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h | bool','imagecopyresized(':'resource $dst_image, resource $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h | bool','imagecreate(':'int $width, int $height | resource','imagecreatefromgd(':'string $filename | resource','imagecreatefromgd2(':'string $filename | resource','imagecreatefromgd2part(':'string $filename, int $srcX, int $srcY, int $width, int $height | resource','imagecreatefromgif(':'string $filename | resource','imagecreatefromjpeg(':'string $filename | resource','imagecreatefrompng(':'string $filename | resource','imagecreatefromstring(':'string $image | resource','imagecreatefromwbmp(':'string $filename | resource','imagecreatefromwebp(':'string $filename | resource','imagecreatefromxbm(':'string $filename | resource','imagecreatefromxpm(':'string $filename | resource','imagecreatetruecolor(':'int $width, int $height | resource','imagecrop(':'resource $image, array $rect | resource','imagecropauto(':'resource $image [, int $mode = -1 [, float $threshold = .5 [, int $color = -1]]] | resource','imagedashedline(':'resource $image, int $x1, int $y1, int $x2, int $y2, int $color | bool','imagedestroy(':'resource $image | bool','imageellipse(':'resource $image, int $cx, int $cy, int $width, int $height, int $color | bool','imagefill(':'resource $image, int $x, int $y, int $color | bool','imagefilledarc(':'resource $image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color, int $style | bool','imagefilledellipse(':'resource $image, int $cx, int $cy, int $width, int $height, int $color | bool','imagefilledpolygon(':'resource $image, array $points, int $num_points, int $color | bool','imagefilledrectangle(':'resource $image, int $x1, int $y1, int $x2, int $y2, int $color | bool','imagefilltoborder(':'resource $image, int $x, int $y, int $border, int $color | bool','imagefilter(':'resource $image, int $filtertype [, int $arg1 [, int $arg2 [, int $arg3 [, int $arg4]]]] | bool','imageflip(':'resource $image, int $mode | bool','imagefontheight(':'int $font | int','imagefontwidth(':'int $font | int','imageftbbox(':'float $size, float $angle, string $fontfile, string $text [, array $extrainfo] | array','imagefttext(':'resource $image, float $size, float $angle, int $x, int $y, int $color, string $fontfile, string $text [, array $extrainfo] | array','imagegammacorrect(':'resource $image, float $inputgamma, float $outputgamma | bool','imagegd(':'resource $image [, string $filename] | bool','imagegd2(':'resource $image [, string $filename [, int $chunk_size [, int $type = IMG_GD2_RAW]]] | bool','imagegif(':'resource $image [, string $filename] | bool','imagegrabscreen(':'void | resource','imagegrabwindow(':'int $window_handle [, int $client_area = 0] | resource','imageinterlace(':'resource $image [, int $interlace = 0] | int','imageistruecolor(':'resource $image | bool','imagejpeg(':'resource $image [, string $filename [, int $quality]] | bool','imagelayereffect(':'resource $image, int $effect | bool','imageline(':'resource $image, int $x1, int $y1, int $x2, int $y2, int $color | bool','imageloadfont(':'string $file | int','imagepalettecopy(':'resource $destination, resource $source | void','imagepalettetotruecolor(':'resource $src | bool','imagepng(':'resource $image [, string $filename [, int $quality [, int $filters]]] | bool','imagepolygon(':'resource $image, array $points, int $num_points, int $color | bool','imagepsbbox(':'string $text, resource $font, int $size | array','imagepsencodefont(':'resource $font_index, string $encodingfile | bool','imagepsextendfont(':'resource $font_index, float $extend | bool','imagepsfreefont(':'resource $font_index | bool','imagepsloadfont(':'string $filename | resource','imagepsslantfont(':'resource $font_index, float $slant | bool','imagepstext(':'resource $image, string $text, resource $font_index, int $size, int $foreground, int $background, int $x, int $y [, int $space = 0 [, int $tightness = 0 [, float $angle = 0.0 [, int $antialias_steps = 4]]]] | array','imagerectangle(':'resource $image, int $x1, int $y1, int $x2, int $y2, int $color | bool','imagerotate(':'resource $image, float $angle, int $bgd_color [, int $ignore_transparent = 0] | resource','imagesavealpha(':'resource $image, bool $saveflag | bool','imagescale(':'resource $image, int $new_width [, int $new_height = -1 [, int $mode = IMG_BILINEAR_FIXED]] | resource','imagesetbrush(':'resource $image, resource $brush | bool','imagesetinterpolation(':'resource $image [, int $method = IMG_BILINEAR_FIXED] | bool','imagesetpixel(':'resource $image, int $x, int $y, int $color | bool','imagesetstyle(':'resource $image, array $style | bool','imagesetthickness(':'resource $image, int $thickness | bool','imagesettile(':'resource $image, resource $tile | bool','imagestring(':'resource $image, int $font, int $x, int $y, string $string, int $color | bool','imagestringup(':'resource $image, int $font, int $x, int $y, string $string, int $color | bool','imagesx(':'resource $image | int','imagesy(':'resource $image | int','imagetruecolortopalette(':'resource $image, bool $dither, int $ncolors | bool','imagettfbbox(':'float $size, float $angle, string $fontfile, string $text | array','imagettftext(':'resource $image, float $size, float $angle, int $x, int $y, int $color, string $fontfile, string $text | array','imagetypes(':'void | int','imagewbmp(':'resource $image [, string $filename [, int $foreground]] | bool','imagewebp(':'resource $image, string $filename | bool','imagexbm(':'resource $image, string $filename [, int $foreground] | bool','iptcembed(':'string $iptcdata, string $jpeg_file_name [, int $spool] | mixed','iptcparse(':'string $iptcblock | array','jpeg2wbmp(':'string $jpegname, string $wbmpname, int $dest_height, int $dest_width, int $threshold | bool','png2wbmp(':'string $pngname, string $wbmpname, int $dest_height, int $dest_width, int $threshold | bool',} +let php_builtin['functions']['iconv']={'iconv_get_encoding(':'[ string $type = "all"] | mixed','iconv_mime_decode_headers(':'string $encoded_headers [, int $mode = 0 [, string $charset = ini_get("iconv.internal_encoding")]] | array','iconv_mime_decode(':'string $encoded_header [, int $mode = 0 [, string $charset = ini_get("iconv.internal_encoding")]] | string','iconv_mime_encode(':'string $field_name, string $field_value [, array $preferences = NULL] | string','iconv_set_encoding(':'string $type, string $charset | bool','iconv_strlen(':'string $str [, string $charset = ini_get("iconv.internal_encoding")] | int','iconv_strpos(':'string $haystack, string $needle [, int $offset = 0 [, string $charset = ini_get("iconv.internal_encoding")]] | int','iconv_strrpos(':'string $haystack, string $needle [, string $charset = ini_get("iconv.internal_encoding")] | int','iconv_substr(':'string $str, int $offset [, int $length = iconv_strlen($str, $charset) [, string $charset = ini_get("iconv.internal_encoding")]] | string','iconv(':'string $in_charset, string $out_charset, string $str | string','ob_iconv_handler(':'string $contents, int $status | string',} +let php_builtin['functions']['json']={'json_decode(':'string $json [, bool $assoc = false [, int $depth = 512 [, int $options = 0]]] | mixed','json_encode(':'mixed $value [, int $options = 0 [, int $depth = 512]] | string','json_last_error_msg(':'void | string','json_last_error(':'void | int',} +let php_builtin['functions']['libxml']={'libxml_clear_errors(':'void | void','libxml_disable_entity_loader(':'[ bool $disable = true] | bool','libxml_get_errors(':'void | array','libxml_get_last_error(':'void | LibXMLError','libxml_set_external_entity_loader(':'callable $resolver_function | void','libxml_set_streams_context(':'resource $streams_context | void','libxml_use_internal_errors(':'[ bool $use_errors = false] | bool',} +let php_builtin['functions']['multibyte_string']={'mb_check_encoding(':'[ string $var = NULL [, string $encoding = mb_internal_encoding()]] | bool','mb_convert_case(':'string $str, int $mode [, string $encoding = mb_internal_encoding()] | string','mb_convert_encoding(':'string $str, string $to_encoding [, mixed $from_encoding = mb_internal_encoding()] | string','mb_convert_kana(':'string $str [, string $option = "KV" [, string $encoding = mb_internal_encoding()]] | string','mb_convert_variables(':'string $to_encoding, mixed $from_encoding, mixed &$vars [, mixed &$...] | string','mb_decode_mimeheader(':'string $str | string','mb_decode_numericentity(':'string $str, array $convmap [, string $encoding = mb_internal_encoding()] | string','mb_detect_encoding(':'string $str [, mixed $encoding_list = mb_detect_order() [, bool $strict = false]] | string','mb_detect_order(':'[ mixed $encoding_list = mb_detect_order()] | mixed','mb_encode_mimeheader(':'string $str [, string $charset = mb_internal_encoding() [, string $transfer_encoding = "B" [, string $linefeed = "\r\n" [, int $indent = 0]]]] | string','mb_encode_numericentity(':'string $str, array $convmap [, string $encoding = mb_internal_encoding() [, bool $is_hex = FALSE]] | string','mb_encoding_aliases(':'string $encoding | array','mb_ereg_match(':'string $pattern, string $string [, string $option = "msr"] | bool','mb_ereg_replace_callback(':'string $pattern, callable $callback, string $string [, string $option = "msr"] | string','mb_ereg_replace(':'string $pattern, string $replacement, string $string [, string $option = "msr"] | string','mb_ereg_search_getpos(':'void | int','mb_ereg_search_getregs(':'void | array','mb_ereg_search_init(':'string $string [, string $pattern [, string $option = "msr"]] | bool','mb_ereg_search_pos(':'[ string $pattern [, string $option = "ms"]] | array','mb_ereg_search_regs(':'[ string $pattern [, string $option = "ms"]] | array','mb_ereg_search_setpos(':'int $position | bool','mb_ereg_search(':'[ string $pattern [, string $option = "ms"]] | bool','mb_ereg(':'string $pattern, string $string [, array $regs] | int','mb_eregi_replace(':'string $pattern, string $replace, string $string [, string $option = "msri"] | string','mb_eregi(':'string $pattern, string $string [, array $regs] | int','mb_get_info(':'[ string $type = "all"] | mixed','mb_http_input(':'[ string $type = ""] | mixed','mb_http_output(':'[ string $encoding = mb_http_output()] | mixed','mb_internal_encoding(':'[ string $encoding = mb_internal_encoding()] | mixed','mb_language(':'[ string $language = mb_language()] | mixed','mb_list_encodings(':'void | array','mb_output_handler(':'string $contents, int $status | string','mb_parse_str(':'string $encoded_string [, array &$result] | bool','mb_preferred_mime_name(':'string $encoding | string','mb_regex_encoding(':'[ string $encoding = mb_regex_encoding()] | mixed','mb_regex_set_options(':'[ string $options = mb_regex_set_options()] | string','mb_send_mail(':'string $to, string $subject, string $message [, string $additional_headers = NULL [, string $additional_parameter = NULL]] | bool','mb_split(':'string $pattern, string $string [, int $limit = -1] | array','mb_strcut(':'string $str, int $start [, int $length = NULL [, string $encoding = mb_internal_encoding()]] | string','mb_strimwidth(':'string $str, int $start, int $width [, string $trimmarker = "" [, string $encoding = mb_internal_encoding()]] | string','mb_stripos(':'string $haystack, string $needle [, int $offset = 0 [, string $encoding = mb_internal_encoding()]] | int','mb_stristr(':'string $haystack, string $needle [, bool $before_needle = false [, string $encoding = mb_internal_encoding()]] | string','mb_strlen(':'string $str [, string $encoding = mb_internal_encoding()] | mixed','mb_strpos(':'string $haystack, string $needle [, int $offset = 0 [, string $encoding = mb_internal_encoding()]] | int','mb_strrchr(':'string $haystack, string $needle [, bool $part = false [, string $encoding = mb_internal_encoding()]] | string','mb_strrichr(':'string $haystack, string $needle [, bool $part = false [, string $encoding = mb_internal_encoding()]] | string','mb_strripos(':'string $haystack, string $needle [, int $offset = 0 [, string $encoding = mb_internal_encoding()]] | int','mb_strrpos(':'string $haystack, string $needle [, int $offset = 0 [, string $encoding = mb_internal_encoding()]] | int','mb_strstr(':'string $haystack, string $needle [, bool $before_needle = false [, string $encoding = mb_internal_encoding()]] | string','mb_strtolower(':'string $str [, string $encoding = mb_internal_encoding()] | string','mb_strtoupper(':'string $str [, string $encoding = mb_internal_encoding()] | string','mb_strwidth(':'string $str [, string $encoding = mb_internal_encoding()] | int','mb_substitute_character(':'[ mixed $substrchar = mb_substitute_character()] | mixed','mb_substr_count(':'string $haystack, string $needle [, string $encoding = mb_internal_encoding()] | int','mb_substr(':'string $str, int $start [, int $length = NULL [, string $encoding = mb_internal_encoding()]] | string',} +let php_builtin['functions']['mssql']={'mssql_bind(':'resource $stmt, string $param_name, mixed &$var, int $type [, bool $is_output = false [, bool $is_null = false [, int $maxlen = -1]]] | bool','mssql_close(':'[ resource $link_identifier] | bool','mssql_connect(':'[ string $servername [, string $username [, string $password [, bool $new_link = false]]]] | resource','mssql_data_seek(':'resource $result_identifier, int $row_number | bool','mssql_execute(':'resource $stmt [, bool $skip_results = false] | mixed','mssql_fetch_array(':'resource $result [, int $result_type = MSSQL_BOTH] | array','mssql_fetch_assoc(':'resource $result_id | array','mssql_fetch_batch(':'resource $result | int','mssql_fetch_field(':'resource $result [, int $field_offset = -1] | object','mssql_fetch_object(':'resource $result | object','mssql_fetch_row(':'resource $result | array','mssql_field_length(':'resource $result [, int $offset = -1] | int','mssql_field_name(':'resource $result [, int $offset = -1] | string','mssql_field_seek(':'resource $result, int $field_offset | bool','mssql_field_type(':'resource $result [, int $offset = -1] | string','mssql_free_result(':'resource $result | bool','mssql_free_statement(':'resource $stmt | bool','mssql_get_last_message(':'void | string','mssql_guid_string(':'string $binary [, bool $short_format = false] | string','mssql_init(':'string $sp_name [, resource $link_identifier] | resource','mssql_min_error_severity(':'int $severity | void','mssql_min_message_severity(':'int $severity | void','mssql_next_result(':'resource $result_id | bool','mssql_num_fields(':'resource $result | int','mssql_num_rows(':'resource $result | int','mssql_pconnect(':'[ string $servername [, string $username [, string $password [, bool $new_link = false]]]] | resource','mssql_query(':'string $query [, resource $link_identifier [, int $batch_size = 0]] | mixed','mssql_result(':'resource $result, int $row, mixed $field | string','mssql_rows_affected(':'resource $link_identifier | int','mssql_select_db(':'string $database_name [, resource $link_identifier] | bool',} +let php_builtin['functions']['mysql']={'mysql_affected_rows(':'[ resource $link_identifier = NULL] | int','mysql_client_encoding(':'[ resource $link_identifier = NULL] | string','mysql_close(':'[ resource $link_identifier = NULL] | bool','mysql_connect(':'[ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, bool $new_link = false [, int $client_flags = 0]]]]] | resource','mysql_create_db(':'string $database_name [, resource $link_identifier = NULL] | bool','mysql_data_seek(':'resource $result, int $row_number | bool','mysql_db_name(':'resource $result, int $row [, mixed $field = NULL] | string','mysql_db_query(':'string $database, string $query [, resource $link_identifier = NULL] | resource','mysql_drop_db(':'string $database_name [, resource $link_identifier = NULL] | bool','mysql_errno(':'[ resource $link_identifier = NULL] | int','mysql_error(':'[ resource $link_identifier = NULL] | string','mysql_escape_string(':'string $unescaped_string | string','mysql_fetch_array(':'resource $result [, int $result_type = MYSQL_BOTH] | array','mysql_fetch_assoc(':'resource $result | array','mysql_fetch_field(':'resource $result [, int $field_offset = 0] | object','mysql_fetch_lengths(':'resource $result | array','mysql_fetch_object(':'resource $result [, string $class_name [, array $params]] | object','mysql_fetch_row(':'resource $result | array','mysql_field_flags(':'resource $result, int $field_offset | string','mysql_field_len(':'resource $result, int $field_offset | int','mysql_field_name(':'resource $result, int $field_offset | string','mysql_field_seek(':'resource $result, int $field_offset | bool','mysql_field_table(':'resource $result, int $field_offset | string','mysql_field_type(':'resource $result, int $field_offset | string','mysql_free_result(':'resource $result | bool','mysql_get_client_info(':'void | string','mysql_get_host_info(':'[ resource $link_identifier = NULL] | string','mysql_get_proto_info(':'[ resource $link_identifier = NULL] | int','mysql_get_server_info(':'[ resource $link_identifier = NULL] | string','mysql_info(':'[ resource $link_identifier = NULL] | string','mysql_insert_id(':'[ resource $link_identifier = NULL] | int','mysql_list_dbs(':'[ resource $link_identifier = NULL] | resource','mysql_list_fields(':'string $database_name, string $table_name [, resource $link_identifier = NULL] | resource','mysql_list_processes(':'[ resource $link_identifier = NULL] | resource','mysql_list_tables(':'string $database [, resource $link_identifier = NULL] | resource','mysql_num_fields(':'resource $result | int','mysql_num_rows(':'resource $result | int','mysql_pconnect(':'[ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, int $client_flags = 0]]]] | resource','mysql_ping(':'[ resource $link_identifier = NULL] | bool','mysql_query(':'string $query [, resource $link_identifier = NULL] | mixed','mysql_real_escape_string(':'string $unescaped_string [, resource $link_identifier = NULL] | string','mysql_result(':'resource $result, int $row [, mixed $field = 0] | string','mysql_select_db(':'string $database_name [, resource $link_identifier = NULL] | bool','mysql_set_charset(':'string $charset [, resource $link_identifier = NULL] | bool','mysql_stat(':'[ resource $link_identifier = NULL] | string','mysql_tablename(':'resource $result, int $i | string','mysql_thread_id(':'[ resource $link_identifier = NULL] | int','mysql_unbuffered_query(':'string $query [, resource $link_identifier = NULL] | resource',} +let php_builtin['functions']['mysqli']={'mysqli_disable_reads_from_master(':'mysqli $link | bool','mysqli_disable_rpl_parse(':'mysqli $link | bool','mysqli_enable_reads_from_master(':'mysqli $link | bool','mysqli_enable_rpl_parse(':'mysqli $link | bool','mysqli_get_cache_stats(':'void | array','mysqli_master_query(':'mysqli $link, string $query | bool','mysqli_rpl_parse_enabled(':'mysqli $link | int','mysqli_rpl_probe(':'mysqli $link | bool','mysqli_slave_query(':'mysqli $link, string $query | bool',} +let php_builtin['functions']['password_hashing']={'password_get_info(':'string $hash | array','password_hash(':'string $password, integer $algo [, array $options] | string','password_needs_rehash(':'string $hash, string $algo [, string $options] | boolean','password_verify(':'string $password, string $hash | boolean',} +let php_builtin['functions']['postgresql']={'pg_affected_rows(':'resource $result | int','pg_cancel_query(':'resource $connection | bool','pg_client_encoding(':'[ resource $connection] | string','pg_close(':'[ resource $connection] | bool','pg_connect(':'string $connection_string [, int $connect_type] | resource','pg_connection_busy(':'resource $connection | bool','pg_connection_reset(':'resource $connection | bool','pg_connection_status(':'resource $connection | int','pg_convert(':'resource $connection, string $table_name, array $assoc_array [, int $options = 0] | array','pg_copy_from(':'resource $connection, string $table_name, array $rows [, string $delimiter [, string $null_as]] | bool','pg_copy_to(':'resource $connection, string $table_name [, string $delimiter [, string $null_as]] | array','pg_dbname(':'[ resource $connection] | string','pg_delete(':'resource $connection, string $table_name, array $assoc_array [, int $options = PGSQL_DML_EXEC] | mixed','pg_end_copy(':'[ resource $connection] | bool','pg_escape_bytea(':'[ resource $connection [, string $data]] | string','pg_escape_identifier(':'[ resource $connection [, string $data]] | string','pg_escape_literal(':'[ resource $connection [, string $data]] | string','pg_escape_string(':'[ resource $connection [, string $data]] | string','pg_execute(':'[ resource $connection [, string $stmtname [, array $params]]] | resource','pg_fetch_all_columns(':'resource $result [, int $column = 0] | array','pg_fetch_all(':'resource $result | array','pg_fetch_array(':'resource $result [, int $row [, int $result_type = PGSQL_BOTH]] | array','pg_fetch_assoc(':'resource $result [, int $row] | array','pg_fetch_object(':'resource $result [, int $row [, int $result_type = PGSQL_ASSOC]] | object','pg_fetch_result(':'resource $result, int $row, mixed $field | string','pg_fetch_row(':'resource $result [, int $row] | array','pg_field_is_null(':'resource $result, int $row, mixed $field | int','pg_field_name(':'resource $result, int $field_number | string','pg_field_num(':'resource $result, string $field_name | int','pg_field_prtlen(':'resource $result, int $row_number, mixed $field_name_or_number | int','pg_field_size(':'resource $result, int $field_number | int','pg_field_table(':'resource $result, int $field_number [, bool $oid_only = false] | mixed','pg_field_type_oid(':'resource $result, int $field_number | int','pg_field_type(':'resource $result, int $field_number | string','pg_free_result(':'resource $result | bool','pg_get_notify(':'resource $connection [, int $result_type] | array','pg_get_pid(':'resource $connection | int','pg_get_result(':'[ resource $connection] | resource','pg_host(':'[ resource $connection] | string','pg_insert(':'resource $connection, string $table_name, array $assoc_array [, int $options = PGSQL_DML_EXEC] | mixed','pg_last_error(':'[ resource $connection] | string','pg_last_notice(':'resource $connection | string','pg_last_oid(':'resource $result | string','pg_lo_close(':'resource $large_object | bool','pg_lo_create(':'[ resource $connection [, mixed $object_id]] | int','pg_lo_export(':'[ resource $connection [, int $oid [, string $pathname]]] | bool','pg_lo_import(':'[ resource $connection [, string $pathname [, mixed $object_id]]] | int','pg_lo_open(':'resource $connection, int $oid, string $mode | resource','pg_lo_read_all(':'resource $large_object | int','pg_lo_read(':'resource $large_object [, int $len = 8192] | string','pg_lo_seek(':'resource $large_object, int $offset [, int $whence = PGSQL_SEEK_CUR] | bool','pg_lo_tell(':'resource $large_object | int','pg_lo_truncate(':'resource $large_object, int $size | bool','pg_lo_unlink(':'resource $connection, int $oid | bool','pg_lo_write(':'resource $large_object, string $data [, int $len] | int','pg_meta_data(':'resource $connection, string $table_name [, bool $extended] | array','pg_num_fields(':'resource $result | int','pg_num_rows(':'resource $result | int','pg_options(':'[ resource $connection] | string','pg_parameter_status(':'[ resource $connection [, string $param_name]] | string','pg_pconnect(':'string $connection_string [, int $connect_type] | resource','pg_ping(':'[ resource $connection] | bool','pg_port(':'[ resource $connection] | int','pg_prepare(':'[ resource $connection [, string $stmtname [, string $query]]] | resource','pg_put_line(':'[ resource $connection [, string $data]] | bool','pg_query_params(':'[ resource $connection [, string $query [, array $params]]] | resource','pg_query(':'[ resource $connection [, string $query]] | resource','pg_result_error_field(':'resource $result, int $fieldcode | string','pg_result_error(':'resource $result | string','pg_result_seek(':'resource $result, int $offset | bool','pg_result_status(':'resource $result [, int $type = PGSQL_STATUS_LONG] | mixed','pg_select(':'resource $connection, string $table_name, array $assoc_array [, int $options = PGSQL_DML_EXEC] | mixed','pg_send_execute(':'resource $connection, string $stmtname, array $params | bool','pg_send_prepare(':'resource $connection, string $stmtname, string $query | bool','pg_send_query_params(':'resource $connection, string $query, array $params | bool','pg_send_query(':'resource $connection, string $query | bool','pg_set_client_encoding(':'[ resource $connection [, string $encoding]] | int','pg_set_error_verbosity(':'[ resource $connection [, int $verbosity]] | int','pg_trace(':'string $pathname [, string $mode = "w" [, resource $connection]] | bool','pg_transaction_status(':'resource $connection | int','pg_tty(':'[ resource $connection] | string','pg_unescape_bytea(':'string $data | string','pg_untrace(':'[ resource $connection] | bool','pg_update(':'resource $connection, string $table_name, array $data, array $condition [, int $options = PGSQL_DML_EXEC] | mixed','pg_version(':'[ resource $connection] | array',} +let php_builtin['functions']['pcre']={'preg_filter(':'mixed $pattern, mixed $replacement, mixed $subject [, int $limit = -1 [, int &$count]] | mixed','preg_grep(':'string $pattern, array $input [, int $flags = 0] | array','preg_last_error(':'void | int','preg_match_all(':'string $pattern, string $subject [, array &$matches [, int $flags = PREG_PATTERN_ORDER [, int $offset = 0]]] | int','preg_match(':'string $pattern, string $subject [, array &$matches [, int $flags = 0 [, int $offset = 0]]] | int','preg_quote(':'string $str [, string $delimiter = NULL] | string','preg_replace_callback(':'mixed $pattern, callable $callback, mixed $subject [, int $limit = -1 [, int &$count]] | mixed','preg_replace(':'mixed $pattern, mixed $replacement, mixed $subject [, int $limit = -1 [, int &$count]] | mixed','preg_split(':'string $pattern, string $subject [, int $limit = -1 [, int $flags = 0]] | array',} +let php_builtin['functions']['sessions']={'session_cache_expire(':'[ string $new_cache_expire] | int','session_cache_limiter(':'[ string $cache_limiter] | string','session_commit(':'session_commit — Alias of session_write_close()','session_decode(':'string $data | bool','session_destroy(':'void | bool','session_encode(':'void | string','session_get_cookie_params(':'void | array','session_id(':'[ string $id] | string','session_is_registered(':'string $name | bool','session_module_name(':'[ string $module] | string','session_name(':'[ string $name] | string','session_regenerate_id(':'[ bool $delete_old_session = false] | bool','session_register_shutdown(':'void | void','session_register(':'mixed $name [, mixed $...] | bool','session_save_path(':'[ string $path] | string','session_set_cookie_params(':'int $lifetime [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false]]]] | void','session_set_save_handler(':'callable $open, callable $close, callable $read, callable $write, callable $destroy, callable $gc | bool','session_start(':'void | bool','session_status(':'void | int','session_unregister(':'string $name | bool','session_unset(':'void | void','session_write_close(':'void | void',} +let php_builtin['functions']['streams']={'set_socket_blocking(':'set_socket_blocking — Alias of stream_set_blocking()','stream_bucket_append(':'resource $brigade, resource $bucket | void','stream_bucket_make_writeable(':'resource $brigade | object','stream_bucket_new(':'resource $stream, string $buffer | object','stream_bucket_prepend(':'resource $brigade, resource $bucket | void','stream_context_create(':'[ array $options [, array $params]] | resource','stream_context_get_default(':'[ array $options] | resource','stream_context_get_options(':'resource $stream_or_context | array','stream_context_get_params(':'resource $stream_or_context | array','stream_context_set_default(':'array $options | resource','stream_context_set_option(':'resource $stream_or_context, string $wrapper, string $option, mixed $value | bool','stream_context_set_params(':'resource $stream_or_context, array $params | bool','stream_copy_to_stream(':'resource $source, resource $dest [, int $maxlength = -1 [, int $offset = 0]] | int','stream_encoding(':'resource $stream [, string $encoding] | bool','stream_filter_append(':'resource $stream, string $filtername [, int $read_write [, mixed $params]] | resource','stream_filter_prepend(':'resource $stream, string $filtername [, int $read_write [, mixed $params]] | resource','stream_filter_register(':'string $filtername, string $classname | bool','stream_filter_remove(':'resource $stream_filter | bool','stream_get_contents(':'resource $handle [, int $maxlength = -1 [, int $offset = -1]] | string','stream_get_filters(':'void | array','stream_get_line(':'resource $handle, int $length [, string $ending] | string','stream_get_meta_data(':'resource $stream | array','stream_get_transports(':'void | array','stream_get_wrappers(':'void | array','stream_is_local(':'mixed $stream_or_url | bool','stream_notification_callback(':'int $notification_code, int $severity, string $message, int $message_code, int $bytes_transferred, int $bytes_max | void','stream_resolve_include_path(':'string $filename | string','stream_select(':'array &$read, array &$write, array &$except, int $tv_sec [, int $tv_usec = 0] | int','stream_set_blocking(':'resource $stream, int $mode | bool','stream_set_chunk_size(':'resource $fp, int $chunk_size | int','stream_set_read_buffer(':'resource $stream, int $buffer | int','stream_set_timeout(':'resource $stream, int $seconds [, int $microseconds = 0] | bool','stream_set_write_buffer(':'resource $stream, int $buffer | int','stream_socket_accept(':'resource $server_socket [, float $timeout = ini_get("default_socket_timeout") [, string &$peername]] | resource','stream_socket_client(':'string $remote_socket [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout") [, int $flags = STREAM_CLIENT_CONNECT [, resource $context]]]]] | resource','stream_socket_enable_crypto(':'resource $stream, bool $enable [, int $crypto_type [, resource $session_stream]] | mixed','stream_socket_get_name(':'resource $handle, bool $want_peer | string','stream_socket_pair(':'int $domain, int $type, int $protocol | array','stream_socket_recvfrom(':'resource $socket, int $length [, int $flags = 0 [, string &$address]] | string','stream_socket_sendto(':'resource $socket, string $data [, int $flags = 0 [, string $address]] | int','stream_socket_server(':'string $local_socket [, int &$errno [, string &$errstr [, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN [, resource $context]]]] | resource','stream_socket_shutdown(':'resource $stream, int $how | bool','stream_supports_lock(':'resource $stream | bool','stream_wrapper_register(':'string $protocol, string $classname [, int $flags = 0] | bool','stream_wrapper_restore(':'string $protocol | bool','stream_wrapper_unregister(':'string $protocol | bool',} +let php_builtin['functions']['simplexml']={'simplexml_import_dom(':'DOMNode $node [, string $class_name = "SimpleXMLElement"] | SimpleXMLElement','simplexml_load_file(':'string $filename [, string $class_name = "SimpleXMLElement" [, int $options = 0 [, string $ns = "" [, bool $is_prefix = false]]]] | SimpleXMLElement','simplexml_load_string(':'string $data [, string $class_name = "SimpleXMLElement" [, int $options = 0 [, string $ns = "" [, bool $is_prefix = false]]]] | SimpleXMLElement',} +let php_builtin['functions']['xmlwriter']={'xmlwriter_end_attribute(':'resource $xmlwriter | bool','xmlwriter_end_cdata(':'resource $xmlwriter | bool','xmlwriter_end_comment(':'resource $xmlwriter | bool','xmlwriter_end_document(':'resource $xmlwriter | bool','xmlwriter_end_dtd_attlist(':'resource $xmlwriter | bool','xmlwriter_end_dtd_element(':'resource $xmlwriter | bool','xmlwriter_end_dtd_entity(':'resource $xmlwriter | bool','xmlwriter_end_dtd(':'resource $xmlwriter | bool','xmlwriter_end_element(':'resource $xmlwriter | bool','xmlwriter_end_pi(':'resource $xmlwriter | bool','xmlwriter_flush(':'resource $xmlwriter [, bool $empty = true] | mixed','xmlwriter_full_end_element(':'resource $xmlwriter | bool','xmlwriter_open_memory(':'void | resource','xmlwriter_open_uri(':'string $uri | resource','xmlwriter_output_memory(':'resource $xmlwriter [, bool $flush = true] | string','xmlwriter_set_indent_string(':'resource $xmlwriter, string $indentString | bool','xmlwriter_set_indent(':'resource $xmlwriter, bool $indent | bool','xmlwriter_start_attribute_ns(':'resource $xmlwriter, string $prefix, string $name, string $uri | bool','xmlwriter_start_attribute(':'resource $xmlwriter, string $name | bool','xmlwriter_start_cdata(':'resource $xmlwriter | bool','xmlwriter_start_comment(':'resource $xmlwriter | bool','xmlwriter_start_document(':'resource $xmlwriter [, string $version = 1.0 [, string $encoding = NULL [, string $standalone]]] | bool','xmlwriter_start_dtd_attlist(':'resource $xmlwriter, string $name | bool','xmlwriter_start_dtd_element(':'resource $xmlwriter, string $qualifiedName | bool','xmlwriter_start_dtd_entity(':'resource $xmlwriter, string $name, bool $isparam | bool','xmlwriter_start_dtd(':'resource $xmlwriter, string $qualifiedName [, string $publicId [, string $systemId]] | bool','xmlwriter_start_element_ns(':'resource $xmlwriter, string $prefix, string $name, string $uri | bool','xmlwriter_start_element(':'resource $xmlwriter, string $name | bool','xmlwriter_start_pi(':'resource $xmlwriter, string $target | bool','xmlwriter_text(':'resource $xmlwriter, string $content | bool','xmlwriter_write_attribute_ns(':'resource $xmlwriter, string $prefix, string $name, string $uri, string $content | bool','xmlwriter_write_attribute(':'resource $xmlwriter, string $name, string $value | bool','xmlwriter_write_cdata(':'resource $xmlwriter, string $content | bool','xmlwriter_write_comment(':'resource $xmlwriter, string $content | bool','xmlwriter_write_dtd_attlist(':'resource $xmlwriter, string $name, string $content | bool','xmlwriter_write_dtd_element(':'resource $xmlwriter, string $name, string $content | bool','xmlwriter_write_dtd_entity(':'resource $xmlwriter, string $name, string $content, bool $pe, string $pubid, string $sysid, string $ndataid | bool','xmlwriter_write_dtd(':'resource $xmlwriter, string $name [, string $publicId [, string $systemId [, string $subset]]] | bool','xmlwriter_write_element_ns(':'resource $xmlwriter, string $prefix, string $name, string $uri [, string $content] | bool','xmlwriter_write_element(':'resource $xmlwriter, string $name [, string $content] | bool','xmlwriter_write_pi(':'resource $xmlwriter, string $target, string $content | bool','xmlwriter_write_raw(':'resource $xmlwriter, string $content | bool',} +let php_builtin['functions']['zip']={'zip_close(':'resource $zip | void','zip_entry_close(':'resource $zip_entry | bool','zip_entry_compressedsize(':'resource $zip_entry | int','zip_entry_compressionmethod(':'resource $zip_entry | string','zip_entry_filesize(':'resource $zip_entry | int','zip_entry_name(':'resource $zip_entry | string','zip_entry_open(':'resource $zip, resource $zip_entry [, string $mode] | bool','zip_entry_read(':'resource $zip_entry [, int $length = 1024] | string','zip_open(':'string $filename | resource','zip_read(':'resource $zip | resource',} +let php_builtin['classes']['spl']={'appenditerator':{'name':'AppendIterator','methods':{'__construct':{'signature':'Traversable $iterator','return_type':''},'append':{'signature':'Iterator $iterator | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'getArrayIterator':{'signature':'void | void','return_type':'void'},'getInnerIterator':{'signature':'void | Traversable','return_type':'Traversable'},'getIteratorIndex':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'arrayiterator':{'name':'ArrayIterator','methods':{'append':{'signature':'mixed $value | void','return_type':'void'},'asort':{'signature':'void | void','return_type':'void'},'__construct':{'signature':'[ mixed $array = array() [, int $flags = 0]]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getArrayCopy':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | mixed','return_type':'mixed'},'ksort':{'signature':'void | void','return_type':'void'},'natcasesort':{'signature':'void | void','return_type':'void'},'natsort':{'signature':'void | void','return_type':'void'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'string $index | void','return_type':'void'},'offsetGet':{'signature':'string $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'string $index, string $newval | void','return_type':'void'},'offsetUnset':{'signature':'string $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $position | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'setFlags':{'signature':'string $flags | void','return_type':'void'},'uasort':{'signature':'string $cmp_function | void','return_type':'void'},'uksort':{'signature':'string $cmp_function | void','return_type':'void'},'unserialize':{'signature':'string $serialized | string','return_type':'string'},'valid':{'signature':'void | bool','return_type':'bool'},},},'arrayobject':{'name':'ArrayObject','constants':{'STD_PROP_LIST':'1','ARRAY_AS_PROPS':'2',},'methods':{'__construct':{'signature':'[ mixed $input = [] [, int $flags = 0 [, string $iterator_class = "ArrayIterator"]]]','return_type':''},'append':{'signature':'mixed $value | void','return_type':'void'},'asort':{'signature':'void | void','return_type':'void'},'count':{'signature':'void | int','return_type':'int'},'exchangeArray':{'signature':'mixed $input | array','return_type':'array'},'getArrayCopy':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | int','return_type':'int'},'getIterator':{'signature':'void | ArrayIterator','return_type':'ArrayIterator'},'getIteratorClass':{'signature':'void | string','return_type':'string'},'ksort':{'signature':'void | void','return_type':'void'},'natcasesort':{'signature':'void | void','return_type':'void'},'natsort':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'mixed $index | bool','return_type':'bool'},'offsetGet':{'signature':'mixed $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'mixed $index | void','return_type':'void'},'serialize':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setIteratorClass':{'signature':'string $iterator_class | void','return_type':'void'},'uasort':{'signature':'callable $cmp_function | void','return_type':'void'},'uksort':{'signature':'callable $cmp_function | void','return_type':'void'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},},},'badfunctioncallexception':{'name':'BadFunctionCallException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'badmethodcallexception':{'name':'BadMethodCallException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'cachingiterator':{'name':'CachingIterator','constants':{'CALL_TOSTRING':'1','CATCH_GET_CHILD':'16','TOSTRING_USE_KEY':'2','TOSTRING_USE_CURRENT':'4','TOSTRING_USE_INNER':'8','FULL_CACHE':'256',},'methods':{'__construct':{'signature':'Iterator $iterator [, string $flags = self::CALL_TOSTRING]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | void','return_type':'void'},'getCache':{'signature':'void | void','return_type':'void'},'getFlags':{'signature':'void | void','return_type':'void'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'hasNext':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'string $index | void','return_type':'void'},'offsetGet':{'signature':'string $index | void','return_type':'void'},'offsetSet':{'signature':'string $index, string $newval | void','return_type':'void'},'offsetUnset':{'signature':'string $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'bitmask $flags | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | void','return_type':'void'},},},'callbackfilteriterator':{'name':'CallbackFilterIterator','methods':{'__construct':{'signature':'Iterator $iterator','return_type':''},'accept':{'signature':'void | bool','return_type':'bool'},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'directoryiterator':{'name':'DirectoryIterator','methods':{'__construct':{'signature':'string $path','return_type':''},'current':{'signature':'void | DirectoryIterator','return_type':'DirectoryIterator'},'getATime':{'signature':'void | int','return_type':'int'},'getBasename':{'signature':'[ string $suffix] | string','return_type':'string'},'getCTime':{'signature':'void | int','return_type':'int'},'getExtension':{'signature':'void | string','return_type':'string'},'getFilename':{'signature':'void | string','return_type':'string'},'getGroup':{'signature':'void | int','return_type':'int'},'getInode':{'signature':'void | int','return_type':'int'},'getMTime':{'signature':'void | int','return_type':'int'},'getOwner':{'signature':'void | int','return_type':'int'},'getPath':{'signature':'void | string','return_type':'string'},'getPathname':{'signature':'void | string','return_type':'string'},'getPerms':{'signature':'void | int','return_type':'int'},'getSize':{'signature':'void | int','return_type':'int'},'getType':{'signature':'void | string','return_type':'string'},'isDir':{'signature':'void | bool','return_type':'bool'},'isDot':{'signature':'void | bool','return_type':'bool'},'isExecutable':{'signature':'void | bool','return_type':'bool'},'isFile':{'signature':'void | bool','return_type':'bool'},'isLink':{'signature':'void | bool','return_type':'bool'},'isReadable':{'signature':'void | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | string','return_type':'string'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $position | void','return_type':'void'},'__toString':{'signature':'void | string','return_type':'string'},'valid':{'signature':'void | bool','return_type':'bool'},},},'domainexception':{'name':'DomainException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'emptyiterator':{'name':'EmptyIterator','methods':{'current':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | void','return_type':'void'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | void','return_type':'void'},},},'filesystemiterator':{'name':'FilesystemIterator','constants':{'CURRENT_AS_PATHNAME':'32','CURRENT_AS_FILEINFO':'0','CURRENT_AS_SELF':'16','CURRENT_MODE_MASK':'240','KEY_AS_PATHNAME':'0','KEY_AS_FILENAME':'256','FOLLOW_SYMLINKS':'512','KEY_MODE_MASK':'3840','NEW_CURRENT_AND_KEY':'256','SKIP_DOTS':'4096','UNIX_PATHS':'8192',},'methods':{'__construct':{'signature':'string $path [, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS]','return_type':''},'current':{'signature':'void | DirectoryIterator','return_type':'DirectoryIterator'},'getFlags':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | string','return_type':'string'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'[ int $flags] | void','return_type':'void'},'getATime':{'signature':'void | int','return_type':'int'},'getBasename':{'signature':'[ string $suffix] | string','return_type':'string'},'getCTime':{'signature':'void | int','return_type':'int'},'getExtension':{'signature':'void | string','return_type':'string'},'getFilename':{'signature':'void | string','return_type':'string'},'getGroup':{'signature':'void | int','return_type':'int'},'getInode':{'signature':'void | int','return_type':'int'},'getMTime':{'signature':'void | int','return_type':'int'},'getOwner':{'signature':'void | int','return_type':'int'},'getPath':{'signature':'void | string','return_type':'string'},'getPathname':{'signature':'void | string','return_type':'string'},'getPerms':{'signature':'void | int','return_type':'int'},'getSize':{'signature':'void | int','return_type':'int'},'getType':{'signature':'void | string','return_type':'string'},'isDir':{'signature':'void | bool','return_type':'bool'},'isDot':{'signature':'void | bool','return_type':'bool'},'isExecutable':{'signature':'void | bool','return_type':'bool'},'isFile':{'signature':'void | bool','return_type':'bool'},'isLink':{'signature':'void | bool','return_type':'bool'},'isReadable':{'signature':'void | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'seek':{'signature':'int $position | void','return_type':'void'},'__toString':{'signature':'void | string','return_type':'string'},'valid':{'signature':'void | bool','return_type':'bool'},},},'filteriterator':{'name':'FilterIterator','methods':{'accept':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'Iterator $iterator','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'globiterator':{'name':'GlobIterator','methods':{'__construct':{'signature':'string $path [, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getFlags':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | string','return_type':'string'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'[ int $flags] | void','return_type':'void'},},},'infiniteiterator':{'name':'InfiniteIterator','methods':{'__construct':{'signature':'Traversable $iterator','return_type':''},'next':{'signature':'void | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Traversable','return_type':'Traversable'},'key':{'signature':'void | scalar','return_type':'scalar'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'invalidargumentexception':{'name':'InvalidArgumentException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'iteratoriterator':{'name':'IteratorIterator','methods':{'__construct':{'signature':'Traversable $iterator','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Traversable','return_type':'Traversable'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'lengthexception':{'name':'LengthException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'limititerator':{'name':'LimitIterator','methods':{'__construct':{'signature':'Iterator $iterator [, int $offset = 0 [, int $count = -1]]','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'getPosition':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $position | int','return_type':'int'},'valid':{'signature':'void | bool','return_type':'bool'},},},'logicexception':{'name':'LogicException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'multipleiterator':{'name':'MultipleIterator','constants':{'MIT_NEED_ANY':'0','MIT_NEED_ALL':'1','MIT_KEYS_NUMERIC':'0','MIT_KEYS_ASSOC':'2',},'methods':{'__construct':{'signature':'[ int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC]','return_type':''},'attachIterator':{'signature':'Iterator $iterator [, string $infos] | void','return_type':'void'},'containsIterator':{'signature':'Iterator $iterator | void','return_type':'void'},'countIterators':{'signature':'void | void','return_type':'void'},'current':{'signature':'void | array','return_type':'array'},'detachIterator':{'signature':'Iterator $iterator | void','return_type':'void'},'getFlags':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | array','return_type':'array'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'valid':{'signature':'void | void','return_type':'void'},},},'norewinditerator':{'name':'NoRewindIterator','methods':{'__construct':{'signature':'Traversable $iterator','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Traversable','return_type':'Traversable'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'outofboundsexception':{'name':'OutOfBoundsException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'outofrangeexception':{'name':'OutOfRangeException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'overflowexception':{'name':'OverflowException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'parentiterator':{'name':'ParentIterator','methods':{'accept':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'RecursiveIterator $iterator','return_type':''},'getChildren':{'signature':'void | ParentIterator','return_type':'ParentIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},},},'rangeexception':{'name':'RangeException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'recursivearrayiterator':{'name':'RecursiveArrayIterator','methods':{'getChildren':{'signature':'void | RecursiveArrayIterator','return_type':'RecursiveArrayIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'append':{'signature':'mixed $value | void','return_type':'void'},'asort':{'signature':'void | void','return_type':'void'},'__construct':{'signature':'[ mixed $array = array() [, int $flags = 0]]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getArrayCopy':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | mixed','return_type':'mixed'},'ksort':{'signature':'void | void','return_type':'void'},'natcasesort':{'signature':'void | void','return_type':'void'},'natsort':{'signature':'void | void','return_type':'void'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'string $index | void','return_type':'void'},'offsetGet':{'signature':'string $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'string $index, string $newval | void','return_type':'void'},'offsetUnset':{'signature':'string $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $position | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'setFlags':{'signature':'string $flags | void','return_type':'void'},'uasort':{'signature':'string $cmp_function | void','return_type':'void'},'uksort':{'signature':'string $cmp_function | void','return_type':'void'},'unserialize':{'signature':'string $serialized | string','return_type':'string'},'valid':{'signature':'void | bool','return_type':'bool'},},},'recursivecachingiterator':{'name':'RecursiveCachingIterator','methods':{'__construct':{'signature':'Iterator $iterator [, string $flags = self::CALL_TOSTRING]','return_type':''},'getChildren':{'signature':'void | RecursiveCachingIterator','return_type':'RecursiveCachingIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | void','return_type':'void'},'getCache':{'signature':'void | void','return_type':'void'},'getFlags':{'signature':'void | void','return_type':'void'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'hasNext':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'string $index | void','return_type':'void'},'offsetGet':{'signature':'string $index | void','return_type':'void'},'offsetSet':{'signature':'string $index, string $newval | void','return_type':'void'},'offsetUnset':{'signature':'string $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'bitmask $flags | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | void','return_type':'void'},},},'recursivecallbackfilteriterator':{'name':'RecursiveCallbackFilterIterator','methods':{'__construct':{'signature':'RecursiveIterator $iterator, string $callback','return_type':''},'getChildren':{'signature':'void | RecursiveCallbackFilterIterator','return_type':'RecursiveCallbackFilterIterator'},'hasChildren':{'signature':'void | void','return_type':'void'},'accept':{'signature':'void | string','return_type':'string'},},},'recursivedirectoryiterator':{'name':'RecursiveDirectoryIterator','methods':{'__construct':{'signature':'string $path [, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS]','return_type':''},'getChildren':{'signature':'void | mixed','return_type':'mixed'},'getSubPath':{'signature':'void | string','return_type':'string'},'getSubPathname':{'signature':'void | string','return_type':'string'},'hasChildren':{'signature':'[ bool $allow_links = false] | bool','return_type':'bool'},'key':{'signature':'void | string','return_type':'string'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'getFlags':{'signature':'void | int','return_type':'int'},'setFlags':{'signature':'[ int $flags] | void','return_type':'void'},},},'recursivefilteriterator':{'name':'RecursiveFilterIterator','methods':{'__construct':{'signature':'Iterator $iterator','return_type':''},'getChildren':{'signature':'void | void','return_type':'void'},'hasChildren':{'signature':'void | void','return_type':'void'},'accept':{'signature':'void | bool','return_type':'bool'},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'recursiveiteratoriterator':{'name':'RecursiveIteratorIterator','constants':{'LEAVES_ONLY':'0','SELF_FIRST':'1','CHILD_FIRST':'2','CATCH_GET_CHILD':'16',},'methods':{'beginChildren':{'signature':'void | void','return_type':'void'},'beginIteration':{'signature':'void | void','return_type':'void'},'callGetChildren':{'signature':'void | RecursiveIterator','return_type':'RecursiveIterator'},'callHasChildren':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'Traversable $iterator [, int $mode = RecursiveIteratorIterator::LEAVES_ONLY [, int $flags = 0]]','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'endChildren':{'signature':'void | void','return_type':'void'},'endIteration':{'signature':'void | void','return_type':'void'},'getDepth':{'signature':'void | int','return_type':'int'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'getMaxDepth':{'signature':'void | mixed','return_type':'mixed'},'getSubIterator':{'signature':'[ int $level] | RecursiveIterator','return_type':'RecursiveIterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'nextElement':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setMaxDepth':{'signature':'[ string $max_depth = -1] | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'recursiveregexiterator':{'name':'RecursiveRegexIterator','methods':{'__construct':{'signature':'RecursiveIterator $iterator, string $regex [, int $mode = self::MATCH [, int $flags = 0 [, int $preg_flags = 0]]]','return_type':''},'getChildren':{'signature':'void | RecursiveIterator','return_type':'RecursiveIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'accept':{'signature':'void | bool','return_type':'bool'},'getFlags':{'signature':'void | int','return_type':'int'},'getMode':{'signature':'void | int','return_type':'int'},'getPregFlags':{'signature':'void | int','return_type':'int'},'getRegex':{'signature':'void | string','return_type':'string'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setMode':{'signature':'int $mode | void','return_type':'void'},'setPregFlags':{'signature':'int $preg_flags | void','return_type':'void'},},},'recursivetreeiterator':{'name':'RecursiveTreeIterator','constants':{'BYPASS_CURRENT':'4','BYPASS_KEY':'8','PREFIX_LEFT':'0','PREFIX_MID_HAS_NEXT':'1','PREFIX_MID_LAST':'2','PREFIX_END_HAS_NEXT':'3','PREFIX_END_LAST':'4','PREFIX_RIGHT':'5',},'methods':{'beginChildren':{'signature':'void | void','return_type':'void'},'beginIteration':{'signature':'void | void','return_type':'void'},'callGetChildren':{'signature':'void | RecursiveIterator','return_type':'RecursiveIterator'},'callHasChildren':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'Traversable $iterator [, int $mode = RecursiveIteratorIterator::LEAVES_ONLY [, int $flags = 0]]','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'endChildren':{'signature':'void | void','return_type':'void'},'endIteration':{'signature':'void | void','return_type':'void'},'getEntry':{'signature':'void | string','return_type':'string'},'getPostfix':{'signature':'void | void','return_type':'void'},'getPrefix':{'signature':'void | string','return_type':'string'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'nextElement':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setPrefixPart':{'signature':'int $part, string $value | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},'getDepth':{'signature':'void | int','return_type':'int'},'getInnerIterator':{'signature':'void | iterator','return_type':'iterator'},'getMaxDepth':{'signature':'void | mixed','return_type':'mixed'},'getSubIterator':{'signature':'[ int $level] | RecursiveIterator','return_type':'RecursiveIterator'},'setMaxDepth':{'signature':'[ string $max_depth = -1] | void','return_type':'void'},},},'regexiterator':{'name':'RegexIterator','constants':{'MATCH':'0','GET_MATCH':'1','ALL_MATCHES':'2','SPLIT':'3','REPLACE':'4','USE_KEY':'1',},'methods':{'__construct':{'signature':'Iterator $iterator','return_type':''},'accept':{'signature':'void | bool','return_type':'bool'},'getFlags':{'signature':'void | int','return_type':'int'},'getMode':{'signature':'void | int','return_type':'int'},'getPregFlags':{'signature':'void | int','return_type':'int'},'getRegex':{'signature':'void | string','return_type':'string'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setMode':{'signature':'int $mode | void','return_type':'void'},'setPregFlags':{'signature':'int $preg_flags | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'runtimeexception':{'name':'RuntimeException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'spldoublylinkedlist':{'name':'SplDoublyLinkedList','methods':{'__construct':{'signature':'void','return_type':''},'bottom':{'signature':'void | mixed','return_type':'mixed'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getIteratorMode':{'signature':'void | int','return_type':'int'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'mixed $index | bool','return_type':'bool'},'offsetGet':{'signature':'mixed $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'mixed $index | void','return_type':'void'},'pop':{'signature':'void | mixed','return_type':'mixed'},'prev':{'signature':'void | void','return_type':'void'},'push':{'signature':'mixed $value | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'setIteratorMode':{'signature':'int $mode | void','return_type':'void'},'shift':{'signature':'void | mixed','return_type':'mixed'},'top':{'signature':'void | mixed','return_type':'mixed'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},'unshift':{'signature':'mixed $value | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splfileinfo':{'name':'SplFileInfo','methods':{'__construct':{'signature':'string $file_name','return_type':''},'getATime':{'signature':'void | int','return_type':'int'},'getBasename':{'signature':'[ string $suffix] | string','return_type':'string'},'getCTime':{'signature':'void | int','return_type':'int'},'getExtension':{'signature':'void | string','return_type':'string'},'getFileInfo':{'signature':'[ string $class_name] | SplFileInfo','return_type':'SplFileInfo'},'getFilename':{'signature':'void | string','return_type':'string'},'getGroup':{'signature':'void | int','return_type':'int'},'getInode':{'signature':'void | int','return_type':'int'},'getLinkTarget':{'signature':'void | string','return_type':'string'},'getMTime':{'signature':'void | int','return_type':'int'},'getOwner':{'signature':'void | int','return_type':'int'},'getPath':{'signature':'void | string','return_type':'string'},'getPathInfo':{'signature':'[ string $class_name] | SplFileInfo','return_type':'SplFileInfo'},'getPathname':{'signature':'void | string','return_type':'string'},'getPerms':{'signature':'void | int','return_type':'int'},'getRealPath':{'signature':'void | string','return_type':'string'},'getSize':{'signature':'void | int','return_type':'int'},'getType':{'signature':'void | string','return_type':'string'},'isDir':{'signature':'void | bool','return_type':'bool'},'isExecutable':{'signature':'void | bool','return_type':'bool'},'isFile':{'signature':'void | bool','return_type':'bool'},'isLink':{'signature':'void | bool','return_type':'bool'},'isReadable':{'signature':'void | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'openFile':{'signature':'[ string $open_mode = r [, bool $use_include_path = false [, resource $context = NULL]]] | SplFileObject','return_type':'SplFileObject'},'setFileClass':{'signature':'[ string $class_name] | void','return_type':'void'},'setInfoClass':{'signature':'[ string $class_name] | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},},},'splfileobject':{'name':'SplFileObject','constants':{'DROP_NEW_LINE':'1','READ_AHEAD':'2','SKIP_EMPTY':'4','READ_CSV':'8',},'methods':{'__construct':{'signature':'string $file_name','return_type':''},'current':{'signature':'void | string|array','return_type':'string|array'},'eof':{'signature':'void | bool','return_type':'bool'},'fflush':{'signature':'void | bool','return_type':'bool'},'fgetc':{'signature':'void | string','return_type':'string'},'fgetcsv':{'signature':'[ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\"]]] | array','return_type':'array'},'fgets':{'signature':'void | string','return_type':'string'},'fgetss':{'signature':'[ string $allowable_tags] | string','return_type':'string'},'flock':{'signature':'int $operation [, int &$wouldblock] | bool','return_type':'bool'},'fpassthru':{'signature':'void | int','return_type':'int'},'fputcsv':{'signature':'array $fields [, string $delimiter = '','' [, string $enclosure = ''"'']] | int','return_type':'int'},'fscanf':{'signature':'string $format [, mixed &$...] | mixed','return_type':'mixed'},'fseek':{'signature':'int $offset [, int $whence = SEEK_SET] | int','return_type':'int'},'fstat':{'signature':'void | array','return_type':'array'},'ftell':{'signature':'void | int','return_type':'int'},'ftruncate':{'signature':'int $size | bool','return_type':'bool'},'fwrite':{'signature':'string $str [, int $length] | int','return_type':'int'},'getChildren':{'signature':'void | void','return_type':'void'},'getCsvControl':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | int','return_type':'int'},'getMaxLineLen':{'signature':'void | int','return_type':'int'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | int','return_type':'int'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $line_pos | void','return_type':'void'},'setCsvControl':{'signature':'[ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\"]]] | void','return_type':'void'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setMaxLineLen':{'signature':'int $max_len | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},'getATime':{'signature':'void | int','return_type':'int'},'getBasename':{'signature':'[ string $suffix] | string','return_type':'string'},'getCTime':{'signature':'void | int','return_type':'int'},'getExtension':{'signature':'void | string','return_type':'string'},'getFileInfo':{'signature':'[ string $class_name] | SplFileInfo','return_type':'SplFileInfo'},'getFilename':{'signature':'void | string','return_type':'string'},'getGroup':{'signature':'void | int','return_type':'int'},'getInode':{'signature':'void | int','return_type':'int'},'getLinkTarget':{'signature':'void | string','return_type':'string'},'getMTime':{'signature':'void | int','return_type':'int'},'getOwner':{'signature':'void | int','return_type':'int'},'getPath':{'signature':'void | string','return_type':'string'},'getPathInfo':{'signature':'[ string $class_name] | SplFileInfo','return_type':'SplFileInfo'},'getPathname':{'signature':'void | string','return_type':'string'},'getPerms':{'signature':'void | int','return_type':'int'},'getRealPath':{'signature':'void | string','return_type':'string'},'getSize':{'signature':'void | int','return_type':'int'},'getType':{'signature':'void | string','return_type':'string'},'isDir':{'signature':'void | bool','return_type':'bool'},'isExecutable':{'signature':'void | bool','return_type':'bool'},'isFile':{'signature':'void | bool','return_type':'bool'},'isLink':{'signature':'void | bool','return_type':'bool'},'isReadable':{'signature':'void | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'openFile':{'signature':'[ string $open_mode = r [, bool $use_include_path = false [, resource $context = NULL]]] | SplFileObject','return_type':'SplFileObject'},'setFileClass':{'signature':'[ string $class_name] | void','return_type':'void'},'setInfoClass':{'signature':'[ string $class_name] | void','return_type':'void'},},},'splfixedarray':{'name':'SplFixedArray','methods':{'__construct':{'signature':'[ int $size = 0]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getSize':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | int','return_type':'int'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'int $index | bool','return_type':'bool'},'offsetGet':{'signature':'int $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'int $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'int $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setSize':{'signature':'int $size | int','return_type':'int'},'toArray':{'signature':'void | array','return_type':'array'},'valid':{'signature':'void | bool','return_type':'bool'},'__wakeup':{'signature':'void | void','return_type':'void'},},'static_methods':{'fromArray':{'signature':'array $array [, bool $save_indexes = true] | SplFixedArray','return_type':'SplFixedArray'},},},'splheap':{'name':'SplHeap','methods':{'__construct':{'signature':'void','return_type':''},'compare':{'signature':'mixed $value1, mixed $value2 | int','return_type':'int'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'extract':{'signature':'void | mixed','return_type':'mixed'},'insert':{'signature':'mixed $value | void','return_type':'void'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'recoverFromCorruption':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'top':{'signature':'void | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splmaxheap':{'name':'SplMaxHeap','methods':{'compare':{'signature':'mixed $value1, mixed $value2 | int','return_type':'int'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'extract':{'signature':'void | mixed','return_type':'mixed'},'insert':{'signature':'mixed $value | void','return_type':'void'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'recoverFromCorruption':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'top':{'signature':'void | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splminheap':{'name':'SplMinHeap','methods':{'compare':{'signature':'mixed $value1, mixed $value2 | int','return_type':'int'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'extract':{'signature':'void | mixed','return_type':'mixed'},'insert':{'signature':'mixed $value | void','return_type':'void'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'recoverFromCorruption':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'top':{'signature':'void | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splobjectstorage':{'name':'SplObjectStorage','methods':{'addAll':{'signature':'SplObjectStorage $storage | void','return_type':'void'},'attach':{'signature':'object $object [, mixed $data = NULL] | void','return_type':'void'},'contains':{'signature':'object $object | bool','return_type':'bool'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | object','return_type':'object'},'detach':{'signature':'object $object | void','return_type':'void'},'getHash':{'signature':'object $object | string','return_type':'string'},'getInfo':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | int','return_type':'int'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'object $object | bool','return_type':'bool'},'offsetGet':{'signature':'object $object | mixed','return_type':'mixed'},'offsetSet':{'signature':'object $object [, mixed $data = NULL] | void','return_type':'void'},'offsetUnset':{'signature':'object $object | void','return_type':'void'},'removeAll':{'signature':'SplObjectStorage $storage | void','return_type':'void'},'removeAllExcept':{'signature':'SplObjectStorage $storage | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'setInfo':{'signature':'mixed $data | void','return_type':'void'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splpriorityqueue':{'name':'SplPriorityQueue','methods':{'__construct':{'signature':'void','return_type':''},'compare':{'signature':'mixed $priority1, mixed $priority2 | int','return_type':'int'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'extract':{'signature':'void | mixed','return_type':'mixed'},'insert':{'signature':'mixed $value, mixed $priority | void','return_type':'void'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'recoverFromCorruption':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setExtractFlags':{'signature':'int $flags | void','return_type':'void'},'top':{'signature':'void | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splqueue':{'name':'SplQueue','methods':{'__construct':{'signature':'void','return_type':''},'dequeue':{'signature':'void | mixed','return_type':'mixed'},'enqueue':{'signature':'mixed $value | void','return_type':'void'},'setIteratorMode':{'signature':'int $mode | void','return_type':'void'},'bottom':{'signature':'void | mixed','return_type':'mixed'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getIteratorMode':{'signature':'void | int','return_type':'int'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'mixed $index | bool','return_type':'bool'},'offsetGet':{'signature':'mixed $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'mixed $index | void','return_type':'void'},'pop':{'signature':'void | mixed','return_type':'mixed'},'prev':{'signature':'void | void','return_type':'void'},'push':{'signature':'mixed $value | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'shift':{'signature':'void | mixed','return_type':'mixed'},'top':{'signature':'void | mixed','return_type':'mixed'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},'unshift':{'signature':'mixed $value | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splstack':{'name':'SplStack','methods':{'__construct':{'signature':'void','return_type':''},'setIteratorMode':{'signature':'int $mode | void','return_type':'void'},'bottom':{'signature':'void | mixed','return_type':'mixed'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getIteratorMode':{'signature':'void | int','return_type':'int'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'mixed $index | bool','return_type':'bool'},'offsetGet':{'signature':'mixed $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'mixed $index | void','return_type':'void'},'pop':{'signature':'void | mixed','return_type':'mixed'},'prev':{'signature':'void | void','return_type':'void'},'push':{'signature':'mixed $value | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'shift':{'signature':'void | mixed','return_type':'mixed'},'top':{'signature':'void | mixed','return_type':'mixed'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},'unshift':{'signature':'mixed $value | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'spltempfileobject':{'name':'SplTempFileObject','methods':{'__construct':{'signature':'string $filename [, string $open_mode = "r" [, bool $use_include_path = false [, resource $context]]]','return_type':''},'current':{'signature':'void | string|array','return_type':'string|array'},'eof':{'signature':'void | bool','return_type':'bool'},'fflush':{'signature':'void | bool','return_type':'bool'},'fgetc':{'signature':'void | string','return_type':'string'},'fgetcsv':{'signature':'[ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\"]]] | array','return_type':'array'},'fgets':{'signature':'void | string','return_type':'string'},'fgetss':{'signature':'[ string $allowable_tags] | string','return_type':'string'},'flock':{'signature':'int $operation [, int &$wouldblock] | bool','return_type':'bool'},'fpassthru':{'signature':'void | int','return_type':'int'},'fputcsv':{'signature':'array $fields [, string $delimiter = '','' [, string $enclosure = ''"'']] | int','return_type':'int'},'fscanf':{'signature':'string $format [, mixed &$...] | mixed','return_type':'mixed'},'fseek':{'signature':'int $offset [, int $whence = SEEK_SET] | int','return_type':'int'},'fstat':{'signature':'void | array','return_type':'array'},'ftell':{'signature':'void | int','return_type':'int'},'ftruncate':{'signature':'int $size | bool','return_type':'bool'},'fwrite':{'signature':'string $str [, int $length] | int','return_type':'int'},'getChildren':{'signature':'void | void','return_type':'void'},'getCsvControl':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | int','return_type':'int'},'getMaxLineLen':{'signature':'void | int','return_type':'int'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | int','return_type':'int'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $line_pos | void','return_type':'void'},'setCsvControl':{'signature':'[ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\"]]] | void','return_type':'void'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setMaxLineLen':{'signature':'int $max_len | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'underflowexception':{'name':'UnderflowException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'unexpectedvalueexception':{'name':'UnexpectedValueException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},} +let php_builtin['classes']['predefined_interfaces_and_classes']={'closure':{'name':'Closure','methods':{'__construct':{'signature':'void','return_type':''},'bindTo':{'signature':'object $newthis [, mixed $newscope = ''static''] | Closure','return_type':'Closure'},},'static_methods':{'bind':{'signature':'Closure $closure, object $newthis [, mixed $newscope = ''static''] | Closure','return_type':'Closure'},},},'generator':{'name':'Generator','methods':{'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'send':{'signature':'mixed $value | mixed','return_type':'mixed'},'throw':{'signature':'Exception $exception | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},'__wakeup':{'signature':'void | void','return_type':'void'},},},} +let php_builtin['classes']['curl']={'curlfile':{'name':'CURLFile','properties': {'name':{'initializer':'','type':''},'mime':{'initializer':'','type':''},'postname':{'initializer':'','type':''},},'methods':{'__construct':{'signature':'string $filename [, string $mimetype [, string $postname]]','return_type':''},'getFilename':{'signature':'void | string','return_type':'string'},'getMimeType':{'signature':'void | string','return_type':'string'},'getPostFilename':{'signature':'void | string','return_type':'string'},'setMimeType':{'signature':'string $mime | void','return_type':'void'},'setPostFilename':{'signature':'string $postname | void','return_type':'void'},'__wakeup':{'signature':'void | void','return_type':'void'},},},} +let php_builtin['classes']['date_time']={'dateinterval':{'name':'DateInterval','properties': {'y':{'initializer':'','type':'integer'},'m':{'initializer':'','type':'integer'},'d':{'initializer':'','type':'integer'},'h':{'initializer':'','type':'integer'},'i':{'initializer':'','type':'integer'},'s':{'initializer':'','type':'integer'},'invert':{'initializer':'','type':'integer'},'days':{'initializer':'','type':'mixed'},},'methods':{'__construct':{'signature':'string $interval_spec','return_type':''},'format':{'signature':'string $format | string','return_type':'string'},},'static_methods':{'createFromDateString':{'signature':'string $time | DateInterval','return_type':'DateInterval'},},},'dateperiod':{'name':'DatePeriod','constants':{'EXCLUDE_START_DATE':'1',},'methods':{'__construct':{'signature':'string $isostr [, int $options]','return_type':''},},},'datetime':{'name':'DateTime','constants':{'ATOM':'"Y-m-d\TH:i:sP"','COOKIE':'"l, d-M-y H:i:s T"','ISO8601':'"Y-m-d\TH:i:sO"','RFC822':'"D, d M y H:i:s O"','RFC850':'"l, d-M-y H:i:s T"','RFC1036':'"D, d M y H:i:s O"','RFC1123':'"D, d M Y H:i:s O"','RFC2822':'"D, d M Y H:i:s O"','RFC3339':'"Y-m-d\TH:i:sP"','RSS':'"D, d M Y H:i:s O"','W3C':'"Y-m-d\TH:i:sP"',},'methods':{'__construct':{'signature':'[ string $time = "now" [, DateTimeZone $timezone = NULL]]','return_type':''},'add':{'signature':'DateInterval $interval | DateTime','return_type':'DateTime'},'modify':{'signature':'string $modify | DateTime','return_type':'DateTime'},'setDate':{'signature':'int $year, int $month, int $day | DateTime','return_type':'DateTime'},'setISODate':{'signature':'int $year, int $week [, int $day = 1] | DateTime','return_type':'DateTime'},'setTime':{'signature':'int $hour, int $minute [, int $second = 0] | DateTime','return_type':'DateTime'},'setTimestamp':{'signature':'int $unixtimestamp | DateTime','return_type':'DateTime'},'setTimezone':{'signature':'DateTimeZone $timezone | DateTime','return_type':'DateTime'},'sub':{'signature':'DateInterval $interval | DateTime','return_type':'DateTime'},'diff':{'signature':'DateTimeInterface $datetime2 [, bool $absolute = false] | DateInterval','return_type':'DateInterval'},'format':{'signature':'string $format | string','return_type':'string'},'getOffset':{'signature':'void | int','return_type':'int'},'getTimestamp':{'signature':'void | int','return_type':'int'},'getTimezone':{'signature':'void | DateTimeZone','return_type':'DateTimeZone'},'__wakeup':{'signature':'void','return_type':''},},'static_methods':{'createFromFormat':{'signature':'string $format, string $time [, DateTimeZone $timezone] | DateTime','return_type':'DateTime'},'getLastErrors':{'signature':'void | array','return_type':'array'},'__set_state':{'signature':'array $array | DateTime','return_type':'DateTime'},},},'datetimeimmutable':{'name':'DateTimeImmutable','methods':{'__construct':{'signature':'[ string $time = "now" [, DateTimeZone $timezone = NULL]]','return_type':''},'add':{'signature':'DateInterval $interval | DateTimeImmutable','return_type':'DateTimeImmutable'},'modify':{'signature':'string $modify | DateTimeImmutable','return_type':'DateTimeImmutable'},'setDate':{'signature':'int $year, int $month, int $day | DateTimeImmutable','return_type':'DateTimeImmutable'},'setISODate':{'signature':'int $year, int $week [, int $day = 1] | DateTimeImmutable','return_type':'DateTimeImmutable'},'setTime':{'signature':'int $hour, int $minute [, int $second = 0] | DateTimeImmutable','return_type':'DateTimeImmutable'},'setTimestamp':{'signature':'int $unixtimestamp | DateTimeImmutable','return_type':'DateTimeImmutable'},'setTimezone':{'signature':'DateTimeZone $timezone | DateTimeImmutable','return_type':'DateTimeImmutable'},'sub':{'signature':'DateInterval $interval | DateTimeImmutable','return_type':'DateTimeImmutable'},'diff':{'signature':'DateTimeInterface $datetime2 [, bool $absolute = false] | DateInterval','return_type':'DateInterval'},'format':{'signature':'string $format | string','return_type':'string'},'getOffset':{'signature':'void | int','return_type':'int'},'getTimestamp':{'signature':'void | int','return_type':'int'},'getTimezone':{'signature':'void | DateTimeZone','return_type':'DateTimeZone'},'__wakeup':{'signature':'void','return_type':''},},'static_methods':{'createFromFormat':{'signature':'string $format, string $time [, DateTimeZone $timezone] | DateTimeImmutable','return_type':'DateTimeImmutable'},'getLastErrors':{'signature':'void | array','return_type':'array'},'__set_state':{'signature':'array $array | DateTimeImmutable','return_type':'DateTimeImmutable'},},},'datetimezone':{'name':'DateTimeZone','constants':{'AFRICA':'1','AMERICA':'2','ANTARCTICA':'4','ARCTIC':'8','ASIA':'16','ATLANTIC':'32','AUSTRALIA':'64','EUROPE':'128','INDIAN':'256','PACIFIC':'512','UTC':'1024','ALL':'2047','ALL_WITH_BC':'4095','PER_COUNTRY':'4096',},'methods':{'__construct':{'signature':'string $timezone','return_type':''},'getLocation':{'signature':'void | array','return_type':'array'},'getName':{'signature':'void | string','return_type':'string'},'getOffset':{'signature':'DateTime $datetime | int','return_type':'int'},'getTransitions':{'signature':'[ int $timestamp_begin [, int $timestamp_end]] | array','return_type':'array'},},'static_methods':{'listAbbreviations':{'signature':'void | array','return_type':'array'},'listIdentifiers':{'signature':'[ int $what = DateTimeZone::ALL [, string $country = NULL]] | array','return_type':'array'},},},} +let php_builtin['classes']['directories']={'directory':{'name':'Directory','properties': {'path':{'initializer':'','type':'string'},'handle':{'initializer':'','type':'resource'},},'methods':{'close':{'signature':'[ resource $dir_handle] | void','return_type':'void'},'read':{'signature':'[ resource $dir_handle] | string','return_type':'string'},'rewind':{'signature':'[ resource $dir_handle] | void','return_type':'void'},},},} +let php_builtin['classes']['dom']={'domattr':{'name':'DOMAttr','properties': {'name':{'initializer':'','type':'string'},'ownerElement':{'initializer':'','type':'DOMElement'},'schemaTypeInfo':{'initializer':'','type':'bool'},'specified':{'initializer':'','type':'bool'},'value':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'string $name [, string $value]','return_type':''},'isId':{'signature':'void | bool','return_type':'bool'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domcdatasection':{'name':'DOMCdataSection','methods':{'__construct':{'signature':'string $value','return_type':''},'isWhitespaceInElementContent':{'signature':'void | bool','return_type':'bool'},'splitText':{'signature':'int $offset | DOMText','return_type':'DOMText'},},},'domcharacterdata':{'name':'DOMCharacterData','properties': {'data':{'initializer':'','type':'string'},'length':{'initializer':'','type':'int'},},'methods':{'appendData':{'signature':'string $data | void','return_type':'void'},'deleteData':{'signature':'int $offset, int $count | void','return_type':'void'},'insertData':{'signature':'int $offset, string $data | void','return_type':'void'},'replaceData':{'signature':'int $offset, int $count, string $data | void','return_type':'void'},'substringData':{'signature':'int $offset, int $count | string','return_type':'string'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domcomment':{'name':'DOMComment','methods':{'__construct':{'signature':'[ string $value]','return_type':''},'appendData':{'signature':'string $data | void','return_type':'void'},'deleteData':{'signature':'int $offset, int $count | void','return_type':'void'},'insertData':{'signature':'int $offset, string $data | void','return_type':'void'},'replaceData':{'signature':'int $offset, int $count, string $data | void','return_type':'void'},'substringData':{'signature':'int $offset, int $count | string','return_type':'string'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domdocument':{'name':'DOMDocument','properties': {'actualEncoding':{'initializer':'','type':'string'},'config':{'initializer':'','type':'DOMConfiguration'},'doctype':{'initializer':'','type':'DOMDocumentType'},'documentElement':{'initializer':'','type':'DOMElement'},'documentURI':{'initializer':'','type':'string'},'encoding':{'initializer':'','type':'string'},'formatOutput':{'initializer':'','type':'bool'},'implementation':{'initializer':'','type':'DOMImplementation'},'preserveWhiteSpace':{'initializer':'true','type':'bool'},'recover':{'initializer':'','type':'bool'},'resolveExternals':{'initializer':'','type':'bool'},'standalone':{'initializer':'','type':'bool'},'strictErrorChecking':{'initializer':'true','type':'bool'},'substituteEntities':{'initializer':'','type':'bool'},'validateOnParse':{'initializer':'false','type':'bool'},'version':{'initializer':'','type':'string'},'xmlEncoding':{'initializer':'','type':'string'},'xmlStandalone':{'initializer':'','type':'bool'},'xmlVersion':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'[ string $version [, string $encoding]]','return_type':''},'createAttribute':{'signature':'string $name | DOMAttr','return_type':'DOMAttr'},'createAttributeNS':{'signature':'string $namespaceURI, string $qualifiedName | DOMAttr','return_type':'DOMAttr'},'createCDATASection':{'signature':'string $data | DOMCDATASection','return_type':'DOMCDATASection'},'createComment':{'signature':'string $data | DOMComment','return_type':'DOMComment'},'createDocumentFragment':{'signature':'void | DOMDocumentFragment','return_type':'DOMDocumentFragment'},'createElement':{'signature':'string $name [, string $value] | DOMElement','return_type':'DOMElement'},'createElementNS':{'signature':'string $namespaceURI, string $qualifiedName [, string $value] | DOMElement','return_type':'DOMElement'},'createEntityReference':{'signature':'string $name | DOMEntityReference','return_type':'DOMEntityReference'},'createProcessingInstruction':{'signature':'string $target [, string $data] | DOMProcessingInstruction','return_type':'DOMProcessingInstruction'},'createTextNode':{'signature':'string $content | DOMText','return_type':'DOMText'},'getElementById':{'signature':'string $elementId | DOMElement','return_type':'DOMElement'},'getElementsByTagName':{'signature':'string $name | DOMNodeList','return_type':'DOMNodeList'},'getElementsByTagNameNS':{'signature':'string $namespaceURI, string $localName | DOMNodeList','return_type':'DOMNodeList'},'importNode':{'signature':'DOMNode $importedNode [, bool $deep] | DOMNode','return_type':'DOMNode'},'load':{'signature':'string $filename [, int $options = 0] | mixed','return_type':'mixed'},'loadHTML':{'signature':'string $source [, int $options = 0] | bool','return_type':'bool'},'loadHTMLFile':{'signature':'string $filename [, int $options = 0] | bool','return_type':'bool'},'loadXML':{'signature':'string $source [, int $options = 0] | mixed','return_type':'mixed'},'normalizeDocument':{'signature':'void | void','return_type':'void'},'registerNodeClass':{'signature':'string $baseclass, string $extendedclass | bool','return_type':'bool'},'relaxNGValidate':{'signature':'string $filename | bool','return_type':'bool'},'relaxNGValidateSource':{'signature':'string $source | bool','return_type':'bool'},'save':{'signature':'string $filename [, int $options] | int','return_type':'int'},'saveHTML':{'signature':'[ DOMNode $node = NULL] | string','return_type':'string'},'saveHTMLFile':{'signature':'string $filename | int','return_type':'int'},'saveXML':{'signature':'[ DOMNode $node [, int $options]] | string','return_type':'string'},'schemaValidate':{'signature':'string $filename [, int $flags] | bool','return_type':'bool'},'schemaValidateSource':{'signature':'string $source [, int $flags] | bool','return_type':'bool'},'validate':{'signature':'void | bool','return_type':'bool'},'xinclude':{'signature':'[ int $options] | int','return_type':'int'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domdocumentfragment':{'name':'DOMDocumentFragment','methods':{'appendXML':{'signature':'string $data | bool','return_type':'bool'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domdocumenttype':{'name':'DOMDocumentType','properties': {'publicId':{'initializer':'','type':'string'},'systemId':{'initializer':'','type':'string'},'name':{'initializer':'','type':'string'},'entities':{'initializer':'','type':'DOMNamedNodeMap'},'notations':{'initializer':'','type':'DOMNamedNodeMap'},'internalSubset':{'initializer':'','type':'string'},},'methods':{'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domelement':{'name':'DOMElement','properties': {'schemaTypeInfo':{'initializer':'','type':'bool'},'tagName':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'string $name [, string $value [, string $namespaceURI]]','return_type':''},'getAttribute':{'signature':'string $name | string','return_type':'string'},'getAttributeNode':{'signature':'string $name | DOMAttr','return_type':'DOMAttr'},'getAttributeNodeNS':{'signature':'string $namespaceURI, string $localName | DOMAttr','return_type':'DOMAttr'},'getAttributeNS':{'signature':'string $namespaceURI, string $localName | string','return_type':'string'},'getElementsByTagName':{'signature':'string $name | DOMNodeList','return_type':'DOMNodeList'},'getElementsByTagNameNS':{'signature':'string $namespaceURI, string $localName | DOMNodeList','return_type':'DOMNodeList'},'hasAttribute':{'signature':'string $name | bool','return_type':'bool'},'hasAttributeNS':{'signature':'string $namespaceURI, string $localName | bool','return_type':'bool'},'removeAttribute':{'signature':'string $name | bool','return_type':'bool'},'removeAttributeNode':{'signature':'DOMAttr $oldnode | bool','return_type':'bool'},'removeAttributeNS':{'signature':'string $namespaceURI, string $localName | bool','return_type':'bool'},'setAttribute':{'signature':'string $name, string $value | DOMAttr','return_type':'DOMAttr'},'setAttributeNode':{'signature':'DOMAttr $attr | DOMAttr','return_type':'DOMAttr'},'setAttributeNodeNS':{'signature':'DOMAttr $attr | DOMAttr','return_type':'DOMAttr'},'setAttributeNS':{'signature':'string $namespaceURI, string $qualifiedName, string $value | void','return_type':'void'},'setIdAttribute':{'signature':'string $name, bool $isId | void','return_type':'void'},'setIdAttributeNode':{'signature':'DOMAttr $attr, bool $isId | void','return_type':'void'},'setIdAttributeNS':{'signature':'string $namespaceURI, string $localName, bool $isId | void','return_type':'void'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domentity':{'name':'DOMEntity','properties': {'publicId':{'initializer':'','type':'string'},'systemId':{'initializer':'','type':'string'},'notationName':{'initializer':'','type':'string'},'actualEncoding':{'initializer':'','type':'string'},'encoding':{'initializer':'','type':'string'},'version':{'initializer':'','type':'string'},},'methods':{'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domentityreference':{'name':'DOMEntityReference','methods':{'__construct':{'signature':'string $name','return_type':''},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domexception':{'name':'DOMException','properties': {'code':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'domimplementation':{'name':'DOMImplementation','methods':{'__construct':{'signature':'void','return_type':''},'createDocument':{'signature':'[ string $namespaceURI = NULL [, string $qualifiedName = NULL [, DOMDocumentType $doctype = NULL]]] | DOMDocument','return_type':'DOMDocument'},'createDocumentType':{'signature':'[ string $qualifiedName = NULL [, string $publicId = NULL [, string $systemId = NULL]]] | DOMDocumentType','return_type':'DOMDocumentType'},'hasFeature':{'signature':'string $feature, string $version | bool','return_type':'bool'},},},'domnamednodemap':{'name':'DOMNamedNodeMap','properties': {'length':{'initializer':'','type':'int'},},'methods':{'getNamedItem':{'signature':'string $name | DOMNode','return_type':'DOMNode'},'getNamedItemNS':{'signature':'string $namespaceURI, string $localName | DOMNode','return_type':'DOMNode'},'item':{'signature':'int $index | DOMNode','return_type':'DOMNode'},},},'domnode':{'name':'DOMNode','properties': {'nodeName':{'initializer':'','type':'string'},'nodeValue':{'initializer':'','type':'string'},'nodeType':{'initializer':'','type':'int'},'parentNode':{'initializer':'','type':'DOMNode'},'childNodes':{'initializer':'','type':'DOMNodeList'},'firstChild':{'initializer':'','type':'DOMNode'},'lastChild':{'initializer':'','type':'DOMNode'},'previousSibling':{'initializer':'','type':'DOMNode'},'nextSibling':{'initializer':'','type':'DOMNode'},'attributes':{'initializer':'','type':'DOMNamedNodeMap'},'ownerDocument':{'initializer':'','type':'DOMDocument'},'namespaceURI':{'initializer':'','type':'string'},'prefix':{'initializer':'','type':'string'},'localName':{'initializer':'','type':'string'},'baseURI':{'initializer':'','type':'string'},'textContent':{'initializer':'','type':'string'},},'methods':{'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domnodelist':{'name':'DOMNodeList','properties': {'length':{'initializer':'','type':'int'},},'methods':{'item':{'signature':'int $index | DOMNode','return_type':'DOMNode'},},},'domnotation':{'name':'DOMNotation','properties': {'publicId':{'initializer':'','type':'string'},'systemId':{'initializer':'','type':'string'},},'methods':{'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domprocessinginstruction':{'name':'DOMProcessingInstruction','properties': {'target':{'initializer':'','type':'string'},'data':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'string $name [, string $value]','return_type':''},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domtext':{'name':'DOMText','properties': {'wholeText':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'[ string $value]','return_type':''},'isWhitespaceInElementContent':{'signature':'void | bool','return_type':'bool'},'splitText':{'signature':'int $offset | DOMText','return_type':'DOMText'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domxpath':{'name':'DOMXPath','properties': {'document':{'initializer':'','type':'DOMDocument'},},'methods':{'__construct':{'signature':'DOMDocument $doc','return_type':''},'evaluate':{'signature':'string $expression [, DOMNode $contextnode [, bool $registerNodeNS = true]] | mixed','return_type':'mixed'},'query':{'signature':'string $expression [, DOMNode $contextnode [, bool $registerNodeNS = true]] | DOMNodeList','return_type':'DOMNodeList'},'registerNamespace':{'signature':'string $prefix, string $namespaceURI | bool','return_type':'bool'},'registerPhpFunctions':{'signature':'[ mixed $restrict] | void','return_type':'void'},},},} +let php_builtin['classes']['predefined_exceptions']={'errorexception':{'name':'ErrorException','properties': {'severity':{'initializer':'','type':'int'},'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'__construct':{'signature':'[ string $message = "" [, int $code = 0 [, int $severity = 1 [, string $filename = __FILE__ [, int $lineno = __LINE__ [, Exception $previous = NULL]]]]]]','return_type':''},'getSeverity':{'signature':'void | int','return_type':'int'},'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'exception':{'name':'Exception','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'__construct':{'signature':'[ string $message = "" [, int $code = 0 [, Exception $previous = NULL]]]','return_type':''},'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},} +let php_builtin['classes']['libxml']={'libxmlerror':{'name':'libXMLError','properties': {'level':{'initializer':'','type':'int'},'code':{'initializer':'','type':'int'},'column':{'initializer':'','type':'int'},'message':{'initializer':'','type':'string'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},},} +let php_builtin['classes']['mysqli']={'mysqli_driver':{'name':'mysqli_driver','properties': {'client_info':{'initializer':'','type':'string'},'client_version':{'initializer':'','type':'string'},'driver_version':{'initializer':'','type':'string'},'embedded':{'initializer':'','type':'string'},'reconnect':{'initializer':'','type':'bool'},'report_mode':{'initializer':'','type':'int'},},'methods':{'embedded_server_end':{'signature':'void | void','return_type':'void'},'embedded_server_start':{'signature':'bool $start, array $arguments, array $groups | bool','return_type':'bool'},},},'mysqli_result':{'name':'mysqli_result','properties': {'current_field':{'initializer':'','type':'int'},'field_count':{'initializer':'','type':'int'},'lengths':{'initializer':'','type':'array'},'num_rows':{'initializer':'','type':'int'},},'methods':{'data_seek':{'signature':'int $offset | bool','return_type':'bool'},'fetch_all':{'signature':'[ int $resulttype = MYSQLI_NUM] | mixed','return_type':'mixed'},'fetch_array':{'signature':'[ int $resulttype = MYSQLI_BOTH] | mixed','return_type':'mixed'},'fetch_assoc':{'signature':'void | array','return_type':'array'},'fetch_field_direct':{'signature':'int $fieldnr | object','return_type':'object'},'fetch_field':{'signature':'void | object','return_type':'object'},'fetch_fields':{'signature':'void | array','return_type':'array'},'fetch_object':{'signature':'[ string $class_name [, array $params]] | object','return_type':'object'},'fetch_row':{'signature':'void | mixed','return_type':'mixed'},'field_seek':{'signature':'int $fieldnr | bool','return_type':'bool'},'free':{'signature':'void | void','return_type':'void'},},},'mysqli_sql_exception':{'name':'mysqli_sql_exception','properties': {'sqlstate':{'initializer':'','type':'string'},'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},},'mysqli_stmt':{'name':'mysqli_stmt','properties': {'affected_rows':{'initializer':'','type':'int'},'errno':{'initializer':'','type':'int'},'error_list':{'initializer':'','type':'array'},'error':{'initializer':'','type':'string'},'field_count':{'initializer':'','type':'int'},'insert_id':{'initializer':'','type':'int'},'num_rows':{'initializer':'','type':'int'},'param_count':{'initializer':'','type':'int'},'sqlstate':{'initializer':'','type':'string'},},'methods':{'attr_get':{'signature':'int $attr | int','return_type':'int'},'attr_set':{'signature':'int $attr, int $mode | bool','return_type':'bool'},'bind_param':{'signature':'string $types, mixed &$var1 [, mixed &$...] | bool','return_type':'bool'},'bind_result':{'signature':'mixed &$var1 [, mixed &$...] | bool','return_type':'bool'},'close':{'signature':'void | bool','return_type':'bool'},'data_seek':{'signature':'int $offset | void','return_type':'void'},'execute':{'signature':'void | bool','return_type':'bool'},'fetch':{'signature':'void | bool','return_type':'bool'},'free_result':{'signature':'void | void','return_type':'void'},'get_result':{'signature':'void | mysqli_result','return_type':'mysqli_result'},'get_warnings':{'signature':'mysqli_stmt $stmt | object','return_type':'object'},'prepare':{'signature':'string $query | mixed','return_type':'mixed'},'reset':{'signature':'void | bool','return_type':'bool'},'result_metadata':{'signature':'void | mysqli_result','return_type':'mysqli_result'},'send_long_data':{'signature':'int $param_nr, string $data | bool','return_type':'bool'},'store_result':{'signature':'void | bool','return_type':'bool'},},},'mysqli_warning':{'name':'mysqli_warning','properties': {'message':{'initializer':'','type':''},'sqlstate':{'initializer':'','type':''},'errno':{'initializer':'','type':''},},'methods':{'__construct':{'signature':'void','return_type':''},'next':{'signature':'void | void','return_type':'void'},},},'mysqli':{'name':'mysqli','properties': {'affected_rows':{'initializer':'','type':'int'},'client_info':{'initializer':'','type':'string'},'client_version':{'initializer':'','type':'int'},'connect_errno':{'initializer':'','type':'string'},'connect_error':{'initializer':'','type':'string'},'errno':{'initializer':'','type':'int'},'error_list':{'initializer':'','type':'array'},'error':{'initializer':'','type':'string'},'field_count':{'initializer':'','type':'int'},'host_info':{'initializer':'','type':'string'},'protocol_version':{'initializer':'','type':'string'},'server_info':{'initializer':'','type':'string'},'server_version':{'initializer':'','type':'int'},'info':{'initializer':'','type':'string'},'insert_id':{'initializer':'','type':'mixed'},'sqlstate':{'initializer':'','type':'string'},'thread_id':{'initializer':'','type':'int'},'warning_count':{'initializer':'','type':'int'},},'methods':{'__construct':{'signature':'[ string $host = ini_get("mysqli.default_host") [, string $username = ini_get("mysqli.default_user") [, string $passwd = ini_get("mysqli.default_pw") [, string $dbname = "" [, int $port = ini_get("mysqli.default_port") [, string $socket = ini_get("mysqli.default_socket")]]]]]]','return_type':''},'autocommit':{'signature':'bool $mode | bool','return_type':'bool'},'change_user':{'signature':'string $user, string $password, string $database | bool','return_type':'bool'},'character_set_name':{'signature':'void | string','return_type':'string'},'close':{'signature':'void | bool','return_type':'bool'},'commit':{'signature':'[ int $flags [, string $name]] | bool','return_type':'bool'},'debug':{'signature':'string $message | bool','return_type':'bool'},'dump_debug_info':{'signature':'void | bool','return_type':'bool'},'get_charset':{'signature':'void | object','return_type':'object'},'get_client_info':{'signature':'void | string','return_type':'string'},'get_connection_stats':{'signature':'void | bool','return_type':'bool'},'get_warnings':{'signature':'void | mysqli_warning','return_type':'mysqli_warning'},'init':{'signature':'void | mysqli','return_type':'mysqli'},'kill':{'signature':'int $processid | bool','return_type':'bool'},'more_results':{'signature':'void | bool','return_type':'bool'},'multi_query':{'signature':'string $query | bool','return_type':'bool'},'next_result':{'signature':'void | bool','return_type':'bool'},'options':{'signature':'int $option, mixed $value | bool','return_type':'bool'},'ping':{'signature':'void | bool','return_type':'bool'},'prepare':{'signature':'string $query | mysqli_stmt','return_type':'mysqli_stmt'},'query':{'signature':'string $query [, int $resultmode = MYSQLI_STORE_RESULT] | mixed','return_type':'mixed'},'real_connect':{'signature':'[ string $host [, string $username [, string $passwd [, string $dbname [, int $port [, string $socket [, int $flags]]]]]]] | bool','return_type':'bool'},'escape_string':{'signature':'string $escapestr | string','return_type':'string'},'real_query':{'signature':'string $query | bool','return_type':'bool'},'reap_async_query':{'signature':'void | mysqli_result','return_type':'mysqli_result'},'refresh':{'signature':'int $options | bool','return_type':'bool'},'rollback':{'signature':'[ int $flags [, string $name]] | bool','return_type':'bool'},'rpl_query_type':{'signature':'string $query | int','return_type':'int'},'select_db':{'signature':'string $dbname | bool','return_type':'bool'},'send_query':{'signature':'string $query | bool','return_type':'bool'},'set_charset':{'signature':'string $charset | bool','return_type':'bool'},'set_local_infile_handler':{'signature':'mysqli $link, callable $read_func | bool','return_type':'bool'},'ssl_set':{'signature':'string $key, string $cert, string $ca, string $capath, string $cipher | bool','return_type':'bool'},'stat':{'signature':'void | string','return_type':'string'},'stmt_init':{'signature':'void | mysqli_stmt','return_type':'mysqli_stmt'},'store_result':{'signature':'void | mysqli_result','return_type':'mysqli_result'},'use_result':{'signature':'void | mysqli_result','return_type':'mysqli_result'},},'static_methods':{'poll':{'signature':'array &$read, array &$error, array &$reject, int $sec [, int $usec] | int','return_type':'int'},},},} +let php_builtin['classes']['pdo']={'pdo':{'name':'PDO','constants':{'FETCH_ORI_ABS':'','ATTR_PERSISTENT':'','CLASS_CONSTANT':'','ATTR_DEFAULT_FETCH_MODE':'','FETCH_PROPS_LATE':'','FETCH_KEY_PAIR':'','FB_ATTR_DATE_FORMAT':'','FB_ATTR_TIME_FORMAT':'','FB_ATTR_TIMESTAMP_FORMAT':'','MYSQL_ATTR_READ_DEFAULT_FILE':'','MYSQL_ATTR_READ_DEFAULT_GROUP':'','ATTR_AUTOCOMMIT':'','FOURD_ATTR_CHARSET':'','FOURD_ATTR_PREFERRED_IMAGE_TYPES':'','PARAM_LOB':'','PARAM_BOOL':'','PARAM_NULL':'','PARAM_INT':'','PARAM_STR':'','PARAM_STMT':'','PARAM_INPUT_OUTPUT':'','FETCH_LAZY':'','FETCH_ASSOC':'','FETCH_NAMED':'','FETCH_NUM':'','FETCH_BOTH':'','FETCH_OBJ':'','FETCH_BOUND':'','FETCH_COLUMN':'','FETCH_CLASS':'','FETCH_INTO':'','FETCH_FUNC':'','FETCH_GROUP':'','FETCH_UNIQUE':'','FETCH_CLASSTYPE':'','FETCH_SERIALIZE':'','ATTR_PREFETCH':'','ATTR_TIMEOUT':'','ATTR_ERRMODE':'','ATTR_SERVER_VERSION':'','ATTR_CLIENT_VERSION':'','ATTR_SERVER_INFO':'','ATTR_CONNECTION_STATUS':'','ATTR_CASE':'','ATTR_CURSOR_NAME':'','ATTR_CURSOR':'','CURSOR_FWDONLY':'','CURSOR_SCROLL':'','ATTR_DRIVER_NAME':'','ATTR_ORACLE_NULLS':'','ATTR_STATEMENT_CLASS':'','ATTR_FETCH_CATALOG_NAMES':'','ATTR_FETCH_TABLE_NAMES':'','ATTR_STRINGIFY_FETCHES':'','ATTR_MAX_COLUMN_LEN':'','ATTR_EMULATE_PREPARES':'','ERRMODE_SILENT':'','ERRMODE_WARNING':'','ERRMODE_EXCEPTION':'','CASE_NATURAL':'','CASE_LOWER':'','CASE_UPPER':'','NULL_NATURAL':'','NULL_EMPTY_STRING':'','NULL_TO_STRING':'','FETCH_ORI_NEXT':'','FETCH_ORI_PRIOR':'','FETCH_ORI_FIRST':'','FETCH_ORI_LAST':'','FETCH_ORI_REL':'','ERR_NONE':'','PARAM_EVT_ALLOC':'','PARAM_EVT_FREE':'','PARAM_EVT_EXEC_PRE':'','PARAM_EVT_EXEC_POST':'','PARAM_EVT_FETCH_PRE':'','PARAM_EVT_FETCH_POST':'','PARAM_EVT_NORMALIZE':'','MYSQL_ATTR_INIT_COMMAND':'','MYSQL_ATTR_USE_BUFFERED_QUERY':'','MYSQL_ATTR_LOCAL_INFILE':'','MYSQL_ATTR_MAX_BUFFER_SIZE':'','MYSQL_ATTR_DIRECT_QUERY':'','MYSQL_ATTR_FOUND_ROWS':'','MYSQL_ATTR_IGNORE_SPACE':'','MYSQL_ATTR_COMPRESS':'','MYSQL_ATTR_SSL_CA':'','MYSQL_ATTR_SSL_CAPATH':'','MYSQL_ATTR_SSL_CERT':'','MYSQL_ATTR_SSL_CIPHER':'','MYSQL_ATTR_SSL_KEY':'','SQLSRV_TXN_READ_UNCOMMITTED':'','SQLSRV_TXN_READ_COMMITTED':'','SQLSRV_TXN_REPEATABLE_READ':'','SQLSRV_TXN_SNAPSHOT':'','SQLSRV_TXN_SERIALIZABLE':'','SQLSRV_ENCODING_BINARY':'','SQLSRV_ENCODING_SYSTEM':'','SQLSRV_ENCODING_UTF8':'','SQLSRV_ENCODING_DEFAULT':'','SQLSRV_ATTR_QUERY_TIMEOUT':'','SQLSRV_ATTR_DIRECT_QUERY':'',},'methods':{'__construct':{'signature':'string $dsn [, string $username [, string $password [, array $driver_options]]]','return_type':''},'beginTransaction':{'signature':'void | bool','return_type':'bool'},'commit':{'signature':'void | bool','return_type':'bool'},'errorCode':{'signature':'void | mixed','return_type':'mixed'},'errorInfo':{'signature':'void | array','return_type':'array'},'exec':{'signature':'string $statement | int','return_type':'int'},'getAttribute':{'signature':'int $attribute | mixed','return_type':'mixed'},'inTransaction':{'signature':'void | bool','return_type':'bool'},'lastInsertId':{'signature':'[ string $name = NULL] | string','return_type':'string'},'prepare':{'signature':'string $statement [, array $driver_options = array()] | PDOStatement','return_type':'PDOStatement'},'query':{'signature':'string $statement | PDOStatement','return_type':'PDOStatement'},'quote':{'signature':'string $string [, int $parameter_type = PDO::PARAM_STR] | string','return_type':'string'},'rollBack':{'signature':'void | bool','return_type':'bool'},'setAttribute':{'signature':'int $attribute, mixed $value | bool','return_type':'bool'},},'static_methods':{'getAvailableDrivers':{'signature':'void | array','return_type':'array'},},},'pdoexception':{'name':'PDOException','properties': {'errorInfo':{'initializer':'','type':'array'},'code':{'initializer':'','type':'int'},'message':{'initializer':'','type':'string'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'pdostatement':{'name':'PDOStatement','properties': {'queryString':{'initializer':'','type':'string'},},'methods':{'bindColumn':{'signature':'mixed $column, mixed &$param [, int $type [, int $maxlen [, mixed $driverdata]]] | bool','return_type':'bool'},'bindParam':{'signature':'mixed $parameter, mixed &$variable [, int $data_type = PDO::PARAM_STR [, int $length [, mixed $driver_options]]] | bool','return_type':'bool'},'bindValue':{'signature':'mixed $parameter, mixed $value [, int $data_type = PDO::PARAM_STR] | bool','return_type':'bool'},'closeCursor':{'signature':'void | bool','return_type':'bool'},'columnCount':{'signature':'void | int','return_type':'int'},'debugDumpParams':{'signature':'void | void','return_type':'void'},'errorCode':{'signature':'void | string','return_type':'string'},'errorInfo':{'signature':'void | array','return_type':'array'},'execute':{'signature':'[ array $input_parameters] | bool','return_type':'bool'},'fetch':{'signature':'[ int $fetch_style [, int $cursor_orientation = PDO::FETCH_ORI_NEXT [, int $cursor_offset = 0]]] | mixed','return_type':'mixed'},'fetchAll':{'signature':'[ int $fetch_style [, mixed $fetch_argument [, array $ctor_args = array()]]] | array','return_type':'array'},'fetchColumn':{'signature':'[ int $column_number = 0] | string','return_type':'string'},'fetchObject':{'signature':'[ string $class_name = "stdClass" [, array $ctor_args]] | mixed','return_type':'mixed'},'getAttribute':{'signature':'int $attribute | mixed','return_type':'mixed'},'getColumnMeta':{'signature':'int $column | array','return_type':'array'},'nextRowset':{'signature':'void | bool','return_type':'bool'},'rowCount':{'signature':'void | int','return_type':'int'},'setAttribute':{'signature':'int $attribute, mixed $value | bool','return_type':'bool'},'setFetchMode':{'signature':'int $mode | bool','return_type':'bool'},},},} +let php_builtin['classes']['phar']={'phar':{'name':'Phar','methods':{'addEmptyDir':{'signature':'string $dirname | void','return_type':'void'},'addFile':{'signature':'string $file [, string $localname] | void','return_type':'void'},'addFromString':{'signature':'string $localname, string $contents | void','return_type':'void'},'buildFromDirectory':{'signature':'string $base_dir [, string $regex] | array','return_type':'array'},'buildFromIterator':{'signature':'Iterator $iter [, string $base_directory] | array','return_type':'array'},'compress':{'signature':'int $compression [, string $extension] | object','return_type':'object'},'compressAllFilesBZIP2':{'signature':'void | bool','return_type':'bool'},'compressAllFilesGZ':{'signature':'void | bool','return_type':'bool'},'compressFiles':{'signature':'int $compression | void','return_type':'void'},'__construct':{'signature':'string $fname [, int $flags [, string $alias]]','return_type':''},'convertToData':{'signature':'[ int $format = 9021976 [, int $compression = 9021976 [, string $extension]]] | PharData','return_type':'PharData'},'convertToExecutable':{'signature':'[ int $format = 9021976 [, int $compression = 9021976 [, string $extension]]] | Phar','return_type':'Phar'},'copy':{'signature':'string $oldfile, string $newfile | bool','return_type':'bool'},'count':{'signature':'void | int','return_type':'int'},'decompress':{'signature':'[ string $extension] | object','return_type':'object'},'decompressFiles':{'signature':'void | bool','return_type':'bool'},'delMetadata':{'signature':'void | bool','return_type':'bool'},'delete':{'signature':'string $entry | bool','return_type':'bool'},'extractTo':{'signature':'string $pathto [, string|array $files [, bool $overwrite = false]] | bool','return_type':'bool'},'getMetadata':{'signature':'void | mixed','return_type':'mixed'},'getModified':{'signature':'void | bool','return_type':'bool'},'getSignature':{'signature':'void | array','return_type':'array'},'getStub':{'signature':'void | string','return_type':'string'},'getVersion':{'signature':'void | string','return_type':'string'},'hasMetadata':{'signature':'void | bool','return_type':'bool'},'isBuffering':{'signature':'void | bool','return_type':'bool'},'isCompressed':{'signature':'void | mixed','return_type':'mixed'},'isFileFormat':{'signature':'int $format | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'offsetExists':{'signature':'string $offset | bool','return_type':'bool'},'offsetGet':{'signature':'string $offset | int','return_type':'int'},'offsetSet':{'signature':'string $offset, string $value | void','return_type':'void'},'offsetUnset':{'signature':'string $offset | bool','return_type':'bool'},'setAlias':{'signature':'string $alias | bool','return_type':'bool'},'setDefaultStub':{'signature':'[ string $index [, string $webindex]] | bool','return_type':'bool'},'setMetadata':{'signature':'mixed $metadata | void','return_type':'void'},'setSignatureAlgorithm':{'signature':'int $sigtype [, string $privatekey] | void','return_type':'void'},'setStub':{'signature':'string $stub [, int $len = -1] | bool','return_type':'bool'},'startBuffering':{'signature':'void | void','return_type':'void'},'stopBuffering':{'signature':'void | void','return_type':'void'},'uncompressAllFiles':{'signature':'void | bool','return_type':'bool'},},'static_methods':{'apiVersion':{'signature':'void | string','return_type':'string'},'canCompress':{'signature':'[ int $type = 0] | bool','return_type':'bool'},'canWrite':{'signature':'void | bool','return_type':'bool'},'createDefaultStub':{'signature':'[ string $indexfile [, string $webindexfile]] | string','return_type':'string'},'getSupportedCompression':{'signature':'void | array','return_type':'array'},'getSupportedSignatures':{'signature':'void | array','return_type':'array'},'interceptFileFuncs':{'signature':'void | void','return_type':'void'},'isValidPharFilename':{'signature':'string $filename [, bool $executable = true] | bool','return_type':'bool'},'loadPhar':{'signature':'string $filename [, string $alias] | bool','return_type':'bool'},'mapPhar':{'signature':'[ string $alias [, int $dataoffset = 0]] | bool','return_type':'bool'},'mount':{'signature':'string $pharpath, string $externalpath | void','return_type':'void'},'mungServer':{'signature':'array $munglist | void','return_type':'void'},'running':{'signature':'[ bool $retphar = true] | string','return_type':'string'},'unlinkArchive':{'signature':'string $archive | bool','return_type':'bool'},'webPhar':{'signature':'[ string $alias [, string $index = "index.php" [, string $f404 [, array $mimetypes [, callable $rewrites]]]]] | void','return_type':'void'},},},'phardata':{'name':'PharData','methods':{'addEmptyDir':{'signature':'string $dirname | void','return_type':'void'},'addFile':{'signature':'string $file [, string $localname] | void','return_type':'void'},'addFromString':{'signature':'string $localname, string $contents | void','return_type':'void'},'buildFromDirectory':{'signature':'string $base_dir [, string $regex] | array','return_type':'array'},'buildFromIterator':{'signature':'Iterator $iter [, string $base_directory] | array','return_type':'array'},'compress':{'signature':'int $compression [, string $extension] | object','return_type':'object'},'compressFiles':{'signature':'int $compression | void','return_type':'void'},'__construct':{'signature':'string $fname [, int $flags [, string $alias]]','return_type':''},'convertToData':{'signature':'[ int $format = 9021976 [, int $compression = 9021976 [, string $extension]]] | PharData','return_type':'PharData'},'convertToExecutable':{'signature':'[ int $format = 9021976 [, int $compression = 9021976 [, string $extension]]] | Phar','return_type':'Phar'},'copy':{'signature':'string $oldfile, string $newfile | bool','return_type':'bool'},'decompress':{'signature':'[ string $extension] | object','return_type':'object'},'decompressFiles':{'signature':'void | bool','return_type':'bool'},'delMetadata':{'signature':'void | bool','return_type':'bool'},'delete':{'signature':'string $entry | bool','return_type':'bool'},'extractTo':{'signature':'string $pathto [, string|array $files [, bool $overwrite = false]] | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'offsetSet':{'signature':'string $offset, string $value | void','return_type':'void'},'offsetUnset':{'signature':'string $offset | bool','return_type':'bool'},'setAlias':{'signature':'string $alias | bool','return_type':'bool'},'setDefaultStub':{'signature':'[ string $index [, string $webindex]] | bool','return_type':'bool'},'setMetadata':{'signature':'mixed $metadata | void','return_type':'void'},'setSignatureAlgorithm':{'signature':'int $sigtype [, string $privatekey] | void','return_type':'void'},'setStub':{'signature':'string $stub [, int $len = -1] | bool','return_type':'bool'},'compressAllFilesBZIP2':{'signature':'void | bool','return_type':'bool'},'compressAllFilesGZ':{'signature':'void | bool','return_type':'bool'},'count':{'signature':'void | int','return_type':'int'},'getMetadata':{'signature':'void | mixed','return_type':'mixed'},'getModified':{'signature':'void | bool','return_type':'bool'},'getSignature':{'signature':'void | array','return_type':'array'},'getStub':{'signature':'void | string','return_type':'string'},'getVersion':{'signature':'void | string','return_type':'string'},'hasMetadata':{'signature':'void | bool','return_type':'bool'},'isBuffering':{'signature':'void | bool','return_type':'bool'},'isCompressed':{'signature':'void | mixed','return_type':'mixed'},'isFileFormat':{'signature':'int $format | bool','return_type':'bool'},'offsetExists':{'signature':'string $offset | bool','return_type':'bool'},'offsetGet':{'signature':'string $offset | int','return_type':'int'},'startBuffering':{'signature':'void | void','return_type':'void'},'stopBuffering':{'signature':'void | void','return_type':'void'},'uncompressAllFiles':{'signature':'void | bool','return_type':'bool'},},'static_methods':{'apiVersion':{'signature':'void | string','return_type':'string'},'canCompress':{'signature':'[ int $type = 0] | bool','return_type':'bool'},'canWrite':{'signature':'void | bool','return_type':'bool'},'createDefaultStub':{'signature':'[ string $indexfile [, string $webindexfile]] | string','return_type':'string'},'getSupportedCompression':{'signature':'void | array','return_type':'array'},'getSupportedSignatures':{'signature':'void | array','return_type':'array'},'interceptFileFuncs':{'signature':'void | void','return_type':'void'},'isValidPharFilename':{'signature':'string $filename [, bool $executable = true] | bool','return_type':'bool'},'loadPhar':{'signature':'string $filename [, string $alias] | bool','return_type':'bool'},'mapPhar':{'signature':'[ string $alias [, int $dataoffset = 0]] | bool','return_type':'bool'},'mount':{'signature':'string $pharpath, string $externalpath | void','return_type':'void'},'mungServer':{'signature':'array $munglist | void','return_type':'void'},'running':{'signature':'[ bool $retphar = true] | string','return_type':'string'},'unlinkArchive':{'signature':'string $archive | bool','return_type':'bool'},'webPhar':{'signature':'[ string $alias [, string $index = "index.php" [, string $f404 [, array $mimetypes [, callable $rewrites]]]]] | void','return_type':'void'},},},'pharexception':{'name':'PharException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'pharfileinfo':{'name':'PharFileInfo','methods':{'chmod':{'signature':'int $permissions | void','return_type':'void'},'compress':{'signature':'int $compression | bool','return_type':'bool'},'__construct':{'signature':'string $entry','return_type':''},'decompress':{'signature':'void | bool','return_type':'bool'},'delMetadata':{'signature':'void | bool','return_type':'bool'},'getCRC32':{'signature':'void | int','return_type':'int'},'getCompressedSize':{'signature':'void | int','return_type':'int'},'getMetadata':{'signature':'void | mixed','return_type':'mixed'},'getPharFlags':{'signature':'void | int','return_type':'int'},'hasMetadata':{'signature':'void | bool','return_type':'bool'},'isCRCChecked':{'signature':'void | bool','return_type':'bool'},'isCompressed':{'signature':'[ int $compression_type = 9021976] | bool','return_type':'bool'},'isCompressedBZIP2':{'signature':'void | bool','return_type':'bool'},'isCompressedGZ':{'signature':'void | bool','return_type':'bool'},'setCompressedBZIP2':{'signature':'void | bool','return_type':'bool'},'setCompressedGZ':{'signature':'void | bool','return_type':'bool'},'setMetadata':{'signature':'mixed $metadata | void','return_type':'void'},'setUncompressed':{'signature':'void | bool','return_type':'bool'},},},} +let php_builtin['classes']['streams']={'php_user_filter':{'name':'php_user_filter','properties': {'filtername':{'initializer':'','type':''},'params':{'initializer':'','type':''},},'methods':{'filter':{'signature':'resource $in, resource $out, int &$consumed, bool $closing | int','return_type':'int'},'onClose':{'signature':'void | void','return_type':'void'},'onCreate':{'signature':'void | bool','return_type':'bool'},},},} +let php_builtin['classes']['sessions']={'sessionhandler':{'name':'SessionHandler','methods':{'close':{'signature':'void | bool','return_type':'bool'},'destroy':{'signature':'string $session_id | bool','return_type':'bool'},'gc':{'signature':'int $maxlifetime | bool','return_type':'bool'},'open':{'signature':'string $save_path, string $session_id | bool','return_type':'bool'},'read':{'signature':'string $session_id | string','return_type':'string'},'write':{'signature':'string $session_id, string $session_data | bool','return_type':'bool'},},},'sessionhandlerinterface':{'name':'SessionHandlerInterface','methods':{'close':{'signature':'void | bool','return_type':'bool'},'destroy':{'signature':'string $session_id | bool','return_type':'bool'},'gc':{'signature':'string $maxlifetime | bool','return_type':'bool'},'open':{'signature':'string $save_path, string $name | bool','return_type':'bool'},'read':{'signature':'string $session_id | string','return_type':'string'},'write':{'signature':'string $session_id, string $session_data | bool','return_type':'bool'},},},} +let php_builtin['classes']['simplexml']={'simplexmlelement':{'name':'SimpleXMLElement','methods':{'__construct':{'signature':'string $data [, int $options = 0 [, bool $data_is_url = false [, string $ns = "" [, bool $is_prefix = false]]]]','return_type':''},'addAttribute':{'signature':'string $name [, string $value [, string $namespace]] | void','return_type':'void'},'addChild':{'signature':'string $name [, string $value [, string $namespace]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'asXML':{'signature':'[ string $filename] | mixed','return_type':'mixed'},'attributes':{'signature':'[ string $ns = NULL [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'children':{'signature':'[ string $ns [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'count':{'signature':'void | int','return_type':'int'},'getDocNamespaces':{'signature':'[ bool $recursive = false [, bool $from_root = true]] | array','return_type':'array'},'getName':{'signature':'void | string','return_type':'string'},'getNamespaces':{'signature':'[ bool $recursive = false] | array','return_type':'array'},'registerXPathNamespace':{'signature':'string $prefix, string $ns | bool','return_type':'bool'},'__toString':{'signature':'void | string','return_type':'string'},'xpath':{'signature':'string $path | array','return_type':'array'},},},'simplexmliterator':{'name':'SimpleXMLIterator','methods':{'current':{'signature':'void | mixed','return_type':'mixed'},'getChildren':{'signature':'void | SimpleXMLIterator','return_type':'SimpleXMLIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'string $data [, int $options = 0 [, bool $data_is_url = false [, string $ns = "" [, bool $is_prefix = false]]]]','return_type':''},'addAttribute':{'signature':'string $name [, string $value [, string $namespace]] | void','return_type':'void'},'addChild':{'signature':'string $name [, string $value [, string $namespace]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'asXML':{'signature':'[ string $filename] | mixed','return_type':'mixed'},'attributes':{'signature':'[ string $ns = NULL [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'children':{'signature':'[ string $ns [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'count':{'signature':'void | int','return_type':'int'},'getDocNamespaces':{'signature':'[ bool $recursive = false [, bool $from_root = true]] | array','return_type':'array'},'getName':{'signature':'void | string','return_type':'string'},'getNamespaces':{'signature':'[ bool $recursive = false] | array','return_type':'array'},'registerXPathNamespace':{'signature':'string $prefix, string $ns | bool','return_type':'bool'},'__toString':{'signature':'void | string','return_type':'string'},'xpath':{'signature':'string $path | array','return_type':'array'},},},} +let php_builtin['classes']['spl_types']={'splbool':{'name':'SplBool','constants':{'__default':'false','false':'false','true':'true',},'methods':{'getConstList':{'signature':'[ bool $include_default = false] | array','return_type':'array'},},},'splenum':{'name':'SplEnum','constants':{'__default':'null',},'methods':{'getConstList':{'signature':'[ bool $include_default = false] | array','return_type':'array'},'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'splfloat':{'name':'SplFloat','constants':{'__default':'0',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'splint':{'name':'SplInt','constants':{'__default':'0',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'splstring':{'name':'SplString','constants':{'__default':'0',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'spltype':{'name':'SplType','constants':{'__default':'null',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},} +let php_builtin['classes']['xmlreader']={'xmlreader':{'name':'XMLReader','constants':{'NONE':'0','ELEMENT':'1','ATTRIBUTE':'2','TEXT':'3','CDATA':'4','ENTITY_REF':'5','ENTITY':'6','PI':'7','COMMENT':'8','DOC':'9','DOC_TYPE':'10','DOC_FRAGMENT':'11','NOTATION':'12','WHITESPACE':'13','SIGNIFICANT_WHITESPACE':'14','END_ELEMENT':'15','END_ENTITY':'16','XML_DECLARATION':'17','LOADDTD':'1','DEFAULTATTRS':'2','VALIDATE':'3','SUBST_ENTITIES':'4',},'properties': {'attributeCount':{'initializer':'','type':'int'},'baseURI':{'initializer':'','type':'string'},'depth':{'initializer':'','type':'int'},'hasAttributes':{'initializer':'','type':'bool'},'hasValue':{'initializer':'','type':'bool'},'isDefault':{'initializer':'','type':'bool'},'isEmptyElement':{'initializer':'','type':'bool'},'localName':{'initializer':'','type':'string'},'name':{'initializer':'','type':'string'},'namespaceURI':{'initializer':'','type':'string'},'nodeType':{'initializer':'','type':'int'},'prefix':{'initializer':'','type':'string'},'value':{'initializer':'','type':'string'},'xmlLang':{'initializer':'','type':'string'},},'methods':{'close':{'signature':'void | bool','return_type':'bool'},'expand':{'signature':'[ DOMNode $basenode] | DOMNode','return_type':'DOMNode'},'getAttribute':{'signature':'string $name | string','return_type':'string'},'getAttributeNo':{'signature':'int $index | string','return_type':'string'},'getAttributeNs':{'signature':'string $localName, string $namespaceURI | string','return_type':'string'},'getParserProperty':{'signature':'int $property | bool','return_type':'bool'},'isValid':{'signature':'void | bool','return_type':'bool'},'lookupNamespace':{'signature':'string $prefix | bool','return_type':'bool'},'moveToAttribute':{'signature':'string $name | bool','return_type':'bool'},'moveToAttributeNo':{'signature':'int $index | bool','return_type':'bool'},'moveToAttributeNs':{'signature':'string $localName, string $namespaceURI | bool','return_type':'bool'},'moveToElement':{'signature':'void | bool','return_type':'bool'},'moveToFirstAttribute':{'signature':'void | bool','return_type':'bool'},'moveToNextAttribute':{'signature':'void | bool','return_type':'bool'},'next':{'signature':'[ string $localname] | bool','return_type':'bool'},'open':{'signature':'string $URI [, string $encoding [, int $options = 0]] | bool','return_type':'bool'},'read':{'signature':'void | bool','return_type':'bool'},'readInnerXML':{'signature':'void | string','return_type':'string'},'readOuterXML':{'signature':'void | string','return_type':'string'},'readString':{'signature':'void | string','return_type':'string'},'setParserProperty':{'signature':'int $property, bool $value | bool','return_type':'bool'},'setRelaxNGSchema':{'signature':'string $filename | bool','return_type':'bool'},'setRelaxNGSchemaSource':{'signature':'string $source | bool','return_type':'bool'},'setSchema':{'signature':'string $filename | bool','return_type':'bool'},'xml':{'signature':'string $source [, string $encoding [, int $options = 0]] | bool','return_type':'bool'},},},} +let php_builtin['classes']['xmlwriter'] = {'xmlwriter':{'name':'XMLWriter','methods':{'endAttribute':{'signature':'void | bool','return_type':'bool'},'endCData':{'signature':'void | bool','return_type':'bool'},'endComment':{'signature':'void | bool','return_type':'bool'},'endDocument':{'signature':'void | bool','return_type':'bool'},'endDTDAttlist':{'signature':'void | bool','return_type':'bool'},'endDTDElement':{'signature':'void | bool','return_type':'bool'},'endDTDEntity':{'signature':'void | bool','return_type':'bool'},'endDTD':{'signature':'void | bool','return_type':'bool'},'endElement':{'signature':'void | bool','return_type':'bool'},'endPI':{'signature':'void | bool','return_type':'bool'},'flush':{'signature':'[bool $empty = true] | bool','return_type':'bool'},'fullEndElement':{'signature':'void | bool','return_type':'bool'},'openMemory':{'signature':'void | bool','return_type':'bool'},'openURI':{'signature':'string $uri | bool','return_type':'bool'},'outputMemory':{'signature':'[bool $flush = true] | bool','return_type':'bool'},'setIndentString':{'signature':'string $indentString | bool','return_type':'bool'},'setIndent':{'signature':'bool $indent | bool','return_type':'bool'},'startAttributeNS':{'signature':'string $prefix, string $name, string $uri | bool','return_type':'bool'},'startAttribute':{'signature':'string $name | bool','return_type':'bool'},'startCData':{'signature':'void | bool','return_type':'bool'},'startComment':{'signature':'void | bool','return_type':'bool'},'startDocument':{'signature':'[string $version = 1.0 [, string $encoding = NULL [, string $standalone ]]] | bool','return_type':'bool'},'startDTDAttlist':{'signature':'string $name | bool','return_type':'bool'},'startDTDElement':{'signature':'string $qualifiedName | bool','return_type':'bool'},'startDTDEntity':{'signature':'string $name, bool $isparam | bool','return_type':'bool'},'startDTD':{'signature':'string $qualifiedName [, string $publicId [, string $systemId ]] | bool','return_type':'bool'},'startElementNS':{'signature':'string $prefix, string $name, string $uri | bool','return_type':'bool'},'startElement':{'signature':'string $name | bool','return_type':'bool'},'startPI':{'signature':'string $target | bool','return_type':'bool'},'text':{'signature':'string $content | bool','return_type':'bool'},'writeAttributeNS':{'signature':'string $prefix, string $name, string $uri, string $content | bool','return_type':'bool'},'writeAttribute':{'signature':'string $name, string $value | bool','return_type':'bool'},'writeCData':{'signature':'string $content | bool','return_type':'bool'},'writeComment':{'signature':'string $content | bool','return_type':'bool'},'writeDTDAttlist':{'signature':'string $name, string $content | bool','return_type':'bool'},'writeDTDElement':{'signature':'string $name, string $content | bool','return_type':'bool'},'writeDTDEntity':{'signature':'string $name, string $content, bool $pe, string $pubid, string $sysid, string $ndataid | bool','return_type':'bool'},'writeDTD':{'signature':'string $name [, string $publicId [, string $systemId [, string $subset ]]] | bool','return_type':'bool'},'writeElementNS':{'signature':'string $prefix, string $name, string $uri [, string $content ] | bool','return_type':'bool'},'writeElement':{'signature':'string $name [, string $content ] | bool','return_type':'bool'},'writePI':{'signature':'string $target, string $content | bool','return_type':'bool'},'writeRaw':{'signature':'string $content | bool','return_type':'bool'},},},} +let php_builtin['classes']['zip']={'ziparchive':{'name':'ZipArchive','properties': {'status':{'initializer':'','type':'int'},'statusSys':{'initializer':'','type':'int'},'numFiles':{'initializer':'','type':'int'},'filename':{'initializer':'','type':'string'},'comment':{'initializer':'','type':'string'},},'methods':{'addEmptyDir':{'signature':'string $dirname | bool','return_type':'bool'},'addFile':{'signature':'string $filename [, string $localname = NULL [, int $start = 0 [, int $length = 0]]] | bool','return_type':'bool'},'addFromString':{'signature':'string $localname, string $contents | bool','return_type':'bool'},'addGlob':{'signature':'string $pattern [, int $flags = 0 [, array $options = array()]] | bool','return_type':'bool'},'addPattern':{'signature':'string $pattern [, string $path = ''.'' [, array $options = array()]] | bool','return_type':'bool'},'close':{'signature':'void | bool','return_type':'bool'},'deleteIndex':{'signature':'int $index | bool','return_type':'bool'},'deleteName':{'signature':'string $name | bool','return_type':'bool'},'extractTo':{'signature':'string $destination [, mixed $entries] | bool','return_type':'bool'},'getArchiveComment':{'signature':'[ int $flags] | string','return_type':'string'},'getCommentIndex':{'signature':'int $index [, int $flags] | string','return_type':'string'},'getCommentName':{'signature':'string $name [, int $flags] | string','return_type':'string'},'getFromIndex':{'signature':'int $index [, int $length = 0 [, int $flags]] | string','return_type':'string'},'getFromName':{'signature':'string $name [, int $length = 0 [, int $flags]] | string','return_type':'string'},'getNameIndex':{'signature':'int $index [, int $flags] | string','return_type':'string'},'getStatusString':{'signature':'void | string','return_type':'string'},'getStream':{'signature':'string $name | resource','return_type':'resource'},'locateName':{'signature':'string $name [, int $flags] | int','return_type':'int'},'open':{'signature':'string $filename [, int $flags] | mixed','return_type':'mixed'},'renameIndex':{'signature':'int $index, string $newname | bool','return_type':'bool'},'renameName':{'signature':'string $name, string $newname | bool','return_type':'bool'},'setArchiveComment':{'signature':'string $comment | bool','return_type':'bool'},'setCommentIndex':{'signature':'int $index, string $comment | bool','return_type':'bool'},'setCommentName':{'signature':'string $name, string $comment | bool','return_type':'bool'},'statIndex':{'signature':'int $index [, int $flags] | array','return_type':'array'},'statName':{'signature':'string $name [, int $flags] | array','return_type':'array'},'unchangeAll':{'signature':'void | bool','return_type':'bool'},'unchangeArchive':{'signature':'void | bool','return_type':'bool'},'unchangeIndex':{'signature':'int $index | bool','return_type':'bool'},'unchangeName':{'signature':'string $name | bool','return_type':'bool'},},},} +let php_builtin['interfaces']['predefined_interfaces_and_classes']={'arrayaccess':{'name':'ArrayAccess','methods':{'offsetExists':{'signature':'mixed $offset | boolean','return_type':'boolean'},'offsetGet':{'signature':'mixed $offset | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $offset, mixed $value | void','return_type':'void'},'offsetUnset':{'signature':'mixed $offset | void','return_type':'void'},},},'iterator':{'name':'Iterator','methods':{'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'iteratoraggregate':{'name':'IteratorAggregate','methods':{'getIterator':{'signature':'void | Traversable','return_type':'Traversable'},},},'serializable':{'name':'Serializable','methods':{'serialize':{'signature':'void | string','return_type':'string'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},},},'traversable':{'name':'Traversable',},} +let php_builtin['interfaces']['spl']={'countable':{'name':'Countable','methods':{'count':{'signature':'void | int','return_type':'int'},},},'outeriterator':{'name':'OuterIterator','methods':{'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'recursiveiterator':{'name':'RecursiveIterator','methods':{'getChildren':{'signature':'void | RecursiveIterator','return_type':'RecursiveIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'seekableiterator':{'name':'SeekableIterator','methods':{'seek':{'signature':'int $position | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'splobserver':{'name':'SplObserver','methods':{'update':{'signature':'SplSubject $subject | void','return_type':'void'},},},'splsubject':{'name':'SplSubject','methods':{'attach':{'signature':'SplObserver $observer | void','return_type':'void'},'detach':{'signature':'SplObserver $observer | void','return_type':'void'},'notify':{'signature':'void | void','return_type':'void'},},},} +let php_builtin['interfaces']['date_time']={'datetimeinterface':{'name':'DateTimeInterface','methods':{'diff':{'signature':'DateTimeInterface $datetime2 [, bool $absolute = false] | DateInterval','return_type':'DateInterval'},'format':{'signature':'string $format | string','return_type':'string'},'getOffset':{'signature':'void | int','return_type':'int'},'getTimestamp':{'signature':'void | int','return_type':'int'},'getTimezone':{'signature':'void | DateTimeZone','return_type':'DateTimeZone'},'__wakeup':{'signature':'void','return_type':''},},},} +let php_builtin['interfaces']['json']={'jsonserializable':{'name':'JsonSerializable','methods':{'jsonSerialize':{'signature':'void | mixed','return_type':'mixed'},},},} +let php_builtin['constants']['common']={'TRUE':'','FALSE':'','NULL':'','E_NOTICE':'','E_DEPRECATED':'','E_RECOVERABLE_ERROR':'','E_ALL':'','E_STRICT':'','E_WARNING':'','E_ERROR':'','E_PARSE':'','E_CORE_ERROR':'','E_CORE_WARNING':'','E_COMPILE_ERROR':'','E_COMPILE_WARNING':'','E_USER_ERROR':'','E_USER_WARNING':'','E_USER_NOTICE':'','E_USER_DEPRECATED':'','__COMPILER_HALT_OFFSET__':'','__FILE__':'','__LINE__':'','__DIR__':'','__FUNCTION__':'','__CLASS__':'','__TRAIT__':'','__METHOD__':'','__NAMESPACE__':'',} +let php_builtin['constants']['arrays']={'CASE_LOWER':'','CASE_UPPER':'','SORT_ASC':'','SORT_DESC':'','SORT_REGULAR':'','SORT_NUMERIC':'','SORT_STRING':'','SORT_LOCALE_STRING':'','SORT_NATURAL':'','SORT_FLAG_CASE':'','COUNT_NORMAL':'','COUNT_RECURSIVE':'','EXTR_OVERWRITE':'','EXTR_SKIP':'','EXTR_PREFIX_SAME':'','EXTR_PREFIX_ALL':'','EXTR_PREFIX_INVALID':'','EXTR_PREFIX_IF_EXISTS':'','EXTR_IF_EXISTS':'','EXTR_REFS':'',} +let php_builtin['constants']['calendar']={'CAL_GREGORIAN':'','CAL_JULIAN':'','CAL_JEWISH':'','CAL_FRENCH':'','CAL_NUM_CALS':'','CAL_DOW_DAYNO':'','CAL_DOW_SHORT':'','CAL_DOW_LONG':'','CAL_MONTH_GREGORIAN_SHORT':'','CAL_MONTH_GREGORIAN_LONG':'','CAL_MONTH_JULIAN_SHORT':'','CAL_MONTH_JULIAN_LONG':'','CAL_MONTH_JEWISH':'','CAL_MONTH_FRENCH':'','CAL_EASTER_DEFAULT':'','CAL_EASTER_ROMAN':'','CAL_EASTER_ALWAYS_GREGORIAN':'','CAL_EASTER_ALWAYS_JULIAN':'','CAL_JEWISH_ADD_ALAFIM_GERESH':'','CAL_JEWISH_ADD_ALAFIM':'','CAL_JEWISH_ADD_GERESHAYIM':'',} +let php_builtin['constants']['curl']={'CURLOPT_POSTFIELDS':'','CURLOPT_CAINFO':'','CURLOPT_AUTOREFERER':'','CURLOPT_COOKIESESSION':'','CURLOPT_DNS_USE_GLOBAL_CACHE':'','CURLOPT_DNS_CACHE_TIMEOUT':'','CURLOPT_FTP_SSL':'','CURLFTPSSL_TRY':'','CURLFTPSSL_ALL':'','CURLFTPSSL_CONTROL':'','CURLFTPSSL_NONE':'','CURLOPT_PRIVATE':'','CURLOPT_FTPSSLAUTH':'','CURLOPT_PORT':'','CURLOPT_FILE':'','CURLOPT_INFILE':'','CURLOPT_INFILESIZE':'','CURLOPT_URL':'','CURLOPT_PROXY':'','CURLOPT_VERBOSE':'','CURLOPT_HEADER':'','CURLOPT_HTTPHEADER':'','CURLOPT_NOPROGRESS':'','CURLOPT_NOBODY':'','CURLOPT_FAILONERROR':'','CURLOPT_UPLOAD':'','CURLOPT_POST':'','CURLOPT_FTPLISTONLY':'','CURLOPT_FTPAPPEND':'','CURLOPT_FTP_CREATE_MISSING_DIRS':'','CURLOPT_NETRC':'','CURLOPT_FOLLOWLOCATION':'','CURLOPT_FTPASCII':'','CURLOPT_PUT':'','CURLOPT_MUTE':'','CURLOPT_USERPWD':'','CURLOPT_PROXYUSERPWD':'','CURLOPT_RANGE':'','CURLOPT_TIMEOUT':'','CURLOPT_TIMEOUT_MS':'','CURLOPT_TCP_NODELAY':'','CURLOPT_PROGRESSFUNCTION':'','CURLOPT_REFERER':'','CURLOPT_USERAGENT':'','CURLOPT_FTPPORT':'','CURLOPT_FTP_USE_EPSV':'','CURLOPT_LOW_SPEED_LIMIT':'','CURLOPT_LOW_SPEED_TIME':'','CURLOPT_RESUME_FROM':'','CURLOPT_COOKIE':'','CURLOPT_SSLCERT':'','CURLOPT_SSLCERTPASSWD':'','CURLOPT_WRITEHEADER':'','CURLOPT_SSL_VERIFYHOST':'','CURLOPT_COOKIEFILE':'','CURLOPT_SSLVERSION':'','CURLOPT_TIMECONDITION':'','CURLOPT_TIMEVALUE':'','CURLOPT_CUSTOMREQUEST':'','CURLOPT_STDERR':'','CURLOPT_TRANSFERTEXT':'','CURLOPT_RETURNTRANSFER':'','CURLOPT_QUOTE':'','CURLOPT_POSTQUOTE':'','CURLOPT_INTERFACE':'','CURLOPT_KRB4LEVEL':'','CURLOPT_HTTPPROXYTUNNEL':'','CURLOPT_FILETIME':'','CURLOPT_WRITEFUNCTION':'','CURLOPT_READFUNCTION':'','CURLOPT_PASSWDFUNCTION':'','CURLOPT_HEADERFUNCTION':'','CURLOPT_MAXREDIRS':'','CURLOPT_MAXCONNECTS':'','CURLOPT_CLOSEPOLICY':'','CURLOPT_FRESH_CONNECT':'','CURLOPT_FORBID_REUSE':'','CURLOPT_RANDOM_FILE':'','CURLOPT_EGDSOCKET':'','CURLOPT_CONNECTTIMEOUT':'','CURLOPT_CONNECTTIMEOUT_MS':'','CURLOPT_SSL_VERIFYPEER':'','CURLOPT_CAPATH':'','CURLOPT_COOKIEJAR':'','CURLOPT_SSL_CIPHER_LIST':'','CURLOPT_BINARYTRANSFER':'','CURLOPT_NOSIGNAL':'','CURLOPT_PROXYTYPE':'','CURLOPT_BUFFERSIZE':'','CURLOPT_HTTPGET':'','CURLOPT_HTTP_VERSION':'','CURLOPT_SSLKEY':'','CURLOPT_SSLKEYTYPE':'','CURLOPT_SSLKEYPASSWD':'','CURLOPT_SSLENGINE':'','CURLOPT_SSLENGINE_DEFAULT':'','CURLOPT_SSLCERTTYPE':'','CURLOPT_CRLF':'','CURLOPT_ENCODING':'','CURLOPT_PROXYPORT':'','CURLOPT_UNRESTRICTED_AUTH':'','CURLOPT_FTP_USE_EPRT':'','CURLOPT_HTTP200ALIASES':'','CURLOPT_HTTPAUTH':'','CURLAUTH_BASIC':'','CURLAUTH_DIGEST':'','CURLAUTH_GSSNEGOTIATE':'','CURLAUTH_NTLM':'','CURLAUTH_ANY':'','CURLAUTH_ANYSAFE':'','CURLOPT_PROXYAUTH':'','CURLOPT_MAX_RECV_SPEED_LARGE':'','CURLOPT_MAX_SEND_SPEED_LARGE':'','CURLCLOSEPOLICY_LEAST_RECENTLY_USED':'','CURLCLOSEPOLICY_LEAST_TRAFFIC':'','CURLCLOSEPOLICY_SLOWEST':'','CURLCLOSEPOLICY_CALLBACK':'','CURLCLOSEPOLICY_OLDEST':'','CURLINFO_PRIVATE':'','CURLINFO_EFFECTIVE_URL':'','CURLINFO_HTTP_CODE':'','CURLINFO_HEADER_OUT':'','CURLINFO_HEADER_SIZE':'','CURLINFO_REQUEST_SIZE':'','CURLINFO_TOTAL_TIME':'','CURLINFO_NAMELOOKUP_TIME':'','CURLINFO_CONNECT_TIME':'','CURLINFO_PRETRANSFER_TIME':'','CURLINFO_SIZE_UPLOAD':'','CURLINFO_SIZE_DOWNLOAD':'','CURLINFO_SPEED_DOWNLOAD':'','CURLINFO_SPEED_UPLOAD':'','CURLINFO_FILETIME':'','CURLINFO_SSL_VERIFYRESULT':'','CURLINFO_CONTENT_LENGTH_DOWNLOAD':'','CURLINFO_CONTENT_LENGTH_UPLOAD':'','CURLINFO_STARTTRANSFER_TIME':'','CURLINFO_CONTENT_TYPE':'','CURLINFO_REDIRECT_TIME':'','CURLINFO_REDIRECT_COUNT':'','CURL_TIMECOND_IFMODSINCE':'','CURL_TIMECOND_IFUNMODSINCE':'','CURL_TIMECOND_LASTMOD':'','CURL_VERSION_IPV6':'','CURL_VERSION_KERBEROS4':'','CURL_VERSION_SSL':'','CURL_VERSION_LIBZ':'','CURLVERSION_NOW':'','CURLE_OK':'','CURLE_UNSUPPORTED_PROTOCOL':'','CURLE_FAILED_INIT':'','CURLE_URL_MALFORMAT':'','CURLE_URL_MALFORMAT_USER':'','CURLE_COULDNT_RESOLVE_PROXY':'','CURLE_COULDNT_RESOLVE_HOST':'','CURLE_COULDNT_CONNECT':'','CURLE_FTP_WEIRD_SERVER_REPLY':'','CURLE_FTP_ACCESS_DENIED':'','CURLE_FTP_USER_PASSWORD_INCORRECT':'','CURLE_FTP_WEIRD_PASS_REPLY':'','CURLE_FTP_WEIRD_USER_REPLY':'','CURLE_FTP_WEIRD_PASV_REPLY':'','CURLE_FTP_WEIRD_227_FORMAT':'','CURLE_FTP_CANT_GET_HOST':'','CURLE_FTP_CANT_RECONNECT':'','CURLE_FTP_COULDNT_SET_BINARY':'','CURLE_PARTIAL_FILE':'','CURLE_FTP_COULDNT_RETR_FILE':'','CURLE_FTP_WRITE_ERROR':'','CURLE_FTP_QUOTE_ERROR':'','CURLE_HTTP_NOT_FOUND':'','CURLE_WRITE_ERROR':'','CURLE_MALFORMAT_USER':'','CURLE_FTP_COULDNT_STOR_FILE':'','CURLE_READ_ERROR':'','CURLE_OUT_OF_MEMORY':'','CURLE_OPERATION_TIMEOUTED':'','CURLE_FTP_COULDNT_SET_ASCII':'','CURLE_FTP_PORT_FAILED':'','CURLE_FTP_COULDNT_USE_REST':'','CURLE_FTP_COULDNT_GET_SIZE':'','CURLE_HTTP_RANGE_ERROR':'','CURLE_HTTP_POST_ERROR':'','CURLE_SSL_CONNECT_ERROR':'','CURLE_FTP_BAD_DOWNLOAD_RESUME':'','CURLE_FILE_COULDNT_READ_FILE':'','CURLE_LDAP_CANNOT_BIND':'','CURLE_LDAP_SEARCH_FAILED':'','CURLE_LIBRARY_NOT_FOUND':'','CURLE_FUNCTION_NOT_FOUND':'','CURLE_ABORTED_BY_CALLBACK':'','CURLE_BAD_FUNCTION_ARGUMENT':'','CURLE_BAD_CALLING_ORDER':'','CURLE_HTTP_PORT_FAILED':'','CURLE_BAD_PASSWORD_ENTERED':'','CURLE_TOO_MANY_REDIRECTS':'','CURLE_UNKNOWN_TELNET_OPTION':'','CURLE_TELNET_OPTION_SYNTAX':'','CURLE_OBSOLETE':'','CURLE_SSL_PEER_CERTIFICATE':'','CURLE_GOT_NOTHING':'','CURLE_SSL_ENGINE_NOTFOUND':'','CURLE_SSL_ENGINE_SETFAILED':'','CURLE_SEND_ERROR':'','CURLE_RECV_ERROR':'','CURLE_SHARE_IN_USE':'','CURLE_SSL_CERTPROBLEM':'','CURLE_SSL_CIPHER':'','CURLE_SSL_CACERT':'','CURLE_BAD_CONTENT_ENCODING':'','CURLE_LDAP_INVALID_URL':'','CURLE_FILESIZE_EXCEEDED':'','CURLE_FTP_SSL_FAILED':'','CURLFTPAUTH_DEFAULT':'','CURLFTPAUTH_SSL':'','CURLFTPAUTH_TLS':'','CURLPROXY_HTTP':'','CURLPROXY_SOCKS5':'','CURL_NETRC_OPTIONAL':'','CURL_NETRC_IGNORED':'','CURL_NETRC_REQUIRED':'','CURL_HTTP_VERSION_NONE':'','CURL_HTTP_VERSION_1_0':'','CURL_HTTP_VERSION_1_1':'','CURLM_CALL_MULTI_PERFORM':'','CURLM_OK':'','CURLM_BAD_HANDLE':'','CURLM_BAD_EASY_HANDLE':'','CURLM_OUT_OF_MEMORY':'','CURLM_INTERNAL_ERROR':'','CURLMSG_DONE':'','CURLOPT_KEYPASSWD':'','CURLOPT_SSH_AUTH_TYPES':'','CURLOPT_SSH_HOST_PUBLIC_KEY_MD5':'','CURLOPT_SSH_PRIVATE_KEYFILE':'','CURLOPT_SSH_PUBLIC_KEYFILE':'','CURLMOPT_PIPELINING':'','CURLMOPT_MAXCONNECTS':'','CURLSSH_AUTH_ANY':'','CURLSSH_AUTH_DEFAULT':'','CURLSSH_AUTH_HOST':'','CURLSSH_AUTH_KEYBOARD':'','CURLSSH_AUTH_NONE':'','CURLSSH_AUTH_PASSWORD':'','CURLSSH_AUTH_PUBLICKEY':'','CURL_WRAPPERS_ENABLED':'','CURLPAUSE_ALL':'','CURLPAUSE_CONT':'','CURLPAUSE_RECV':'','CURLPAUSE_RECV_CONT':'','CURLPAUSE_SEND':'','CURLPAUSE_SEND_CONT':'','CURLM_XXX':'','CURLOPT_CERTINFO':'','CURLOPT_CONNECT_ONLY':'','CURLINFO_':'','CURLOPT_PROTOCOLS':'','CURLOPT_REDIR_PROTOCOLS':'','CURLOPT_IPRESOLVE':'','CURL_IPRESOLVE_WHATEVER':'','CURL_IPRESOLVE_V4':'','CURL_IPRESOLVE_V6':'','CURLOPT_SHARE':'','CURLSHOPT_SHARE':'','CURLSHOPT_UNSHARE':'','CURL_LOCK_DATA_COOKIE':'','CURL_LOCK_DATA_DNS':'','CURL_LOCK_DATA_SSL_SESSION':'',} +let php_builtin['constants']['date_time']={'DATE_ATOM':'','DATE_COOKIE':'','DATE_ISO8601':'','DATE_RFC822':'','DATE_RFC850':'','DATE_RFC1036':'','DATE_RFC1123':'','DATE_RFC2822':'','DATE_RFC3339':'','DATE_RSS':'','DATE_W3C':'','SUNFUNCS_RET_TIMESTAMP':'','SUNFUNCS_RET_STRING':'','SUNFUNCS_RET_DOUBLE':'','LC_TIME':'',} +let php_builtin['constants']['libxml']={'LIBXML_ERR_WARNING':'','LIBXML_ERR_ERROR':'','LIBXML_ERR_FATAL':'','LIBXML_NONET':'','LIBXML_COMPACT':'','LIBXML_DTDATTR':'','LIBXML_DTDLOAD':'','LIBXML_DTDVALID':'','LIBXML_HTML_NOIMPLIED':'','LIBXML_HTML_NODEFDTD':'','LIBXML_NOBLANKS':'','LIBXML_NOCDATA':'','LIBXML_NOEMPTYTAG':'','LIBXML_NOENT':'','LIBXML_NOERROR':'','LIBXML_NOWARNING':'','LIBXML_NOXMLDECL':'','LIBXML_NSCLEAN':'','LIBXML_PARSEHUGE':'','LIBXML_PEDANTIC':'','LIBXML_XINCLUDE':'','LIBXML_ERR_NONE':'','LIBXML_VERSION':'','LIBXML_DOTTED_VERSION':'','LIBXML_SCHEMA_CREATE':'',} +let php_builtin['constants']['mysqli']={'MYSQLI_REPORT_OFF':'','MYSQLI_REPORT_ALL':'','MYSQLI_REPORT_STRICT':'','MYSQLI_REPORT_ERROR':'','MYSQLI_REPORT_INDEX':'','MYSQLI_ASSOC':'','MYSQLI_NUM':'','MYSQLI_BOTH':'','PHP_INT_MAX':'','MYSQLI_READ_DEFAULT_GROUP':'','MYSQLI_READ_DEFAULT_FILE':'','MYSQLI_OPT_CONNECT_TIMEOUT':'','MYSQLI_OPT_LOCAL_INFILE':'','MYSQLI_INIT_COMMAND':'','MYSQLI_CLIENT_SSL':'','MYSQLI_CLIENT_COMPRESS':'','MYSQLI_CLIENT_INTERACTIVE':'','MYSQLI_CLIENT_IGNORE_SPACE':'','MYSQLI_CLIENT_NO_SCHEMA':'','MYSQLI_CLIENT_MULTI_QUERIES':'','MYSQLI_STORE_RESULT':'','MYSQLI_USE_RESULT':'','MYSQLI_NOT_NULL_FLAG':'','MYSQLI_PRI_KEY_FLAG':'','MYSQLI_UNIQUE_KEY_FLAG':'','MYSQLI_MULTIPLE_KEY_FLAG':'','MYSQLI_BLOB_FLAG':'','MYSQLI_UNSIGNED_FLAG':'','MYSQLI_ZEROFILL_FLAG':'','MYSQLI_AUTO_INCREMENT_FLAG':'','MYSQLI_TIMESTAMP_FLAG':'','MYSQLI_SET_FLAG':'','MYSQLI_NUM_FLAG':'','MYSQLI_PART_KEY_FLAG':'','MYSQLI_GROUP_FLAG':'','MYSQLI_TYPE_DECIMAL':'','MYSQLI_TYPE_NEWDECIMAL':'','MYSQLI_TYPE_BIT':'','MYSQLI_TYPE_TINY':'','MYSQLI_TYPE_SHORT':'','MYSQLI_TYPE_LONG':'','MYSQLI_TYPE_FLOAT':'','MYSQLI_TYPE_DOUBLE':'','MYSQLI_TYPE_NULL':'','MYSQLI_TYPE_TIMESTAMP':'','MYSQLI_TYPE_LONGLONG':'','MYSQLI_TYPE_INT24':'','MYSQLI_TYPE_DATE':'','MYSQLI_TYPE_TIME':'','MYSQLI_TYPE_DATETIME':'','MYSQLI_TYPE_YEAR':'','MYSQLI_TYPE_NEWDATE':'','MYSQLI_TYPE_INTERVAL':'','MYSQLI_TYPE_ENUM':'','MYSQLI_TYPE_SET':'','MYSQLI_TYPE_TINY_BLOB':'','MYSQLI_TYPE_MEDIUM_BLOB':'','MYSQLI_TYPE_LONG_BLOB':'','MYSQLI_TYPE_BLOB':'','MYSQLI_TYPE_VAR_STRING':'','MYSQLI_TYPE_STRING':'','MYSQLI_TYPE_CHAR':'','MYSQLI_TYPE_GEOMETRY':'','MYSQLI_NEED_DATA':'','MYSQLI_NO_DATA':'','MYSQLI_DATA_TRUNCATED':'','MYSQLI_ENUM_FLAG':'','MYSQLI_BINARY_FLAG':'','MYSQLI_CURSOR_TYPE_FOR_UPDATE':'','MYSQLI_CURSOR_TYPE_NO_CURSOR':'','MYSQLI_CURSOR_TYPE_READ_ONLY':'','MYSQLI_CURSOR_TYPE_SCROLLABLE':'','MYSQLI_STMT_ATTR_CURSOR_TYPE':'','MYSQLI_STMT_ATTR_PREFETCH_ROWS':'','MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH':'','MYSQLI_SET_CHARSET_NAME':'','MYSQLI_DEBUG_TRACE_ENABLED':'','MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED':'','MYSQLI_SERVER_QUERY_NO_INDEX_USED':'','MYSQLI_REFRESH_GRANT':'','MYSQLI_REFRESH_LOG':'','MYSQLI_REFRESH_TABLES':'','MYSQLI_REFRESH_HOSTS':'','MYSQLI_REFRESH_STATUS':'','MYSQLI_REFRESH_THREADS':'','MYSQLI_REFRESH_SLAVE':'','MYSQLI_REFRESH_MASTER':'','MYSQLI_TRANS_COR_AND_CHAIN':'','MYSQLI_TRANS_COR_AND_NO_CHAIN':'','MYSQLI_TRANS_COR_RELEASE':'','MYSQLI_TRANS_COR_NO_RELEASE':'','MYSQL_READ_DEFAULT_FILE':'','MYSQLI_SERVER_PUBLIC_KEY':'','MYSQLI_NO_CHANGE_USER_ON_PCONNECT':'','MYSQLI_ASYNC':'','MYSQLI_OPT_INT_AND_FLOAT_NATIVE':'','MYSQLI_CLIENT_FOUND_ROWS':'','MULTI_STATEMENT':'','MYSQLI_RPL_MASTER':'','MYSQLI_RPL_SLAVE':'','MYSQLI_RPL_ADMIN':'',} +let php_builtin['constants']['spl']={'READ_AHEAD':'','MIT_NEED_ALL':'','MIT_KEYS_ASSOC':'','CALL_TOSTRING':'','CATCH_GET_CHILD':'','RIT_LEAVES_ONLY':'','LOCK_SH':'','LOCK_EX':'','LOCK_UN':'','LOCK_NB':'','SEEK_SET':'','SEEK_CUR':'','SEEK_END':'','PHP_INT_MAX':'',} +let php_builtin['constants']['unknow']={'PHP_INI_ALL':'','PHP_INI_PERDIR':'','PHP_INI_SYSTEM':'','PHP_INI_USER':'','COUNTER_FLAG_PERSIST':'','COUNTER_FLAG_SAVE':'','COUNTER_FLAG_NO_OVERWRITE':'','COUNTER_META_NAME':'','COUNTER_META_IS_PERISTENT':'','COUNTER_RESET_NEVER':'','COUNTER_RESET_PER_LOAD':'','COUNTER_RESET_PER_REQUEST':'','PDO_PLACEHOLDER_NAMED':'','PDO_PLACEHOLDER_POSITIONAL':'','PDO_PLACEHOLDER_NONE':'','PDO_CASE_NATURAL':'','PDO_CASE_UPPER':'','PDO_CASE_LOWER':'','PDO_ATTR_CASE':'','PHP_COUNTER_API':'','PHPAPI':'','COMPILE_DL_COUNTER':'','ZEND_GET_MODULE':'','HAVE_COUNTER':'','COUNTER_G':'','TSRMLS_DC':'','TSRMLS_FETCH':'','STANDARD_MODULE_HEADER':'','STANDARD_MODULE_HEADER_EX':'','STANDARD_MODULE_PROPERTIES':'','STANDARD_MODULE_PROPERTIES_EX':'','ZEND_MODULE_API_NO':'','ZEND_DEBUG':'','USING_ZTS':'','NO_VERSION_YET':'','NO_MODULE_GLOBALS':'','PHP_MODULE_GLOBALS':'','IGNORE_PATH':'','USE_PATH':'','IGNORE_URL':'','IGNORE_URL_WIN':'','ENFORCE_SAFE_MODE':'','REPORT_ERRORS':'','STREAM_MUST_SEEK':'','STREAM_WILL_CAST':'',} +let php_builtin['constants']['directories']={'DIRECTORY_SEPARATOR':'','PATH_SEPARATOR':'','SCANDIR_SORT_ASCENDING':'','SCANDIR_SORT_DESCENDING':'','SCANDIR_SORT_NONE':'',} +let php_builtin['constants']['dom']={'XML_ELEMENT_NODE':'','XML_ATTRIBUTE_NODE':'','XML_TEXT_NODE':'','XML_CDATA_SECTION_NODE':'','XML_ENTITY_REF_NODE':'','XML_ENTITY_NODE':'','XML_PI_NODE':'','XML_COMMENT_NODE':'','XML_DOCUMENT_NODE':'','XML_DOCUMENT_TYPE_NODE':'','XML_DOCUMENT_FRAG_NODE':'','XML_NOTATION_NODE':'','XML_HTML_DOCUMENT_NODE':'','XML_DTD_NODE':'','XML_ELEMENT_DECL_NODE':'','XML_ATTRIBUTE_DECL_NODE':'','XML_ENTITY_DECL_NODE':'','XML_NAMESPACE_DECL_NODE':'','XML_ATTRIBUTE_CDATA':'','XML_ATTRIBUTE_ID':'','XML_ATTRIBUTE_IDREF':'','XML_ATTRIBUTE_IDREFS':'','XML_ATTRIBUTE_ENTITY':'','XML_ATTRIBUTE_NMTOKEN':'','XML_ATTRIBUTE_NMTOKENS':'','XML_ATTRIBUTE_ENUMERATION':'','XML_ATTRIBUTE_NOTATION':'','DOM_PHP_ERR':'','DOM_INDEX_SIZE_ERR':'','DOMSTRING_SIZE_ERR':'','DOM_HIERARCHY_REQUEST_ERR':'','DOM_WRONG_DOCUMENT_ERR':'','DOM_INVALID_CHARACTER_ERR':'','DOM_NO_DATA_ALLOWED_ERR':'','DOM_NO_MODIFICATION_ALLOWED_ERR':'','DOM_NOT_FOUND_ERR':'','DOM_NOT_SUPPORTED_ERR':'','DOM_INUSE_ATTRIBUTE_ERR':'','DOM_INVALID_STATE_ERR':'','DOM_SYNTAX_ERR':'','DOM_INVALID_MODIFICATION_ERR':'','DOM_NAMESPACE_ERR':'','DOM_INVALID_ACCESS_ERR':'','DOM_VALIDATION_ERR':'','DOM_NOT_FOUND_ERROR':'','DOM_NOT_FOUND':'',} +let php_builtin['constants']['command_line_usage']={'PHP_SAPI':'','STDIN':'','STDOUT':'','STDERR':'',} +let php_builtin['constants']['handling_file_uploads']={'UPLOAD_ERR_OK':'','UPLOAD_ERR_INI_SIZE':'','UPLOAD_ERR_FORM_SIZE':'','UPLOAD_ERR_PARTIAL':'','UPLOAD_ERR_NO_FILE':'','UPLOAD_ERR_NO_TMP_DIR':'','UPLOAD_ERR_CANT_WRITE':'','UPLOAD_ERR_EXTENSION':'',} +let php_builtin['constants']['fileinfo']={'FILEINFO_NONE':'','FILEINFO_SYMLINK':'','FILEINFO_MIME_TYPE':'','FILEINFO_MIME_ENCODING':'','FILEINFO_MIME':'','FILEINFO_COMPRESS':'','FILEINFO_DEVICES':'','FILEINFO_CONTINUE':'','FILEINFO_PRESERVE_ATIME':'','FILEINFO_RAW':'',} +let php_builtin['constants']['filesystem']={'SEEK_SET':'','SEEK_CUR':'','SEEK_END':'','LOCK_SH':'','LOCK_EX':'','LOCK_UN':'','LOCK_NB':'','GLOB_BRACE':'','GLOB_ONLYDIR':'','GLOB_MARK':'','GLOB_NOSORT':'','GLOB_NOCHECK':'','GLOB_NOESCAPE':'','GLOB_AVAILABLE_FLAGS':'','PATHINFO_DIRNAME':'','PATHINFO_BASENAME':'','PATHINFO_EXTENSION':'','PATHINFO_FILENAME':'','FILE_USE_INCLUDE_PATH':'','FILE_NO_DEFAULT_CONTEXT':'','FILE_APPEND':'','FILE_IGNORE_NEW_LINES':'','FILE_SKIP_EMPTY_LINES':'','FILE_BINARY':'','FILE_TEXT':'','INI_SCANNER_NORMAL':'','INI_SCANNER_RAW':'','FNM_NOESCAPE':'','FNM_PATHNAME':'','FNM_PERIOD':'','FNM_CASEFOLD':'','GLOB_ERR':'',} +let php_builtin['constants']['filter']={'FILTER_FLAG_NO_ENCODE_QUOTES':'','INPUT_POST':'','INPUT_GET':'','INPUT_COOKIE':'','INPUT_ENV':'','INPUT_SERVER':'','INPUT_SESSION':'','INPUT_REQUEST':'','FILTER_FLAG_NONE':'','FILTER_REQUIRE_SCALAR':'','FILTER_REQUIRE_ARRAY':'','FILTER_FORCE_ARRAY':'','FILTER_NULL_ON_FAILURE':'','FILTER_VALIDATE_INT':'','FILTER_VALIDATE_BOOLEAN':'','FILTER_VALIDATE_FLOAT':'','FILTER_VALIDATE_REGEXP':'','FILTER_VALIDATE_URL':'','FILTER_VALIDATE_EMAIL':'','FILTER_VALIDATE_IP':'','FILTER_DEFAULT':'','FILTER_UNSAFE_RAW':'','FILTER_SANITIZE_STRING':'','FILTER_SANITIZE_STRIPPED':'','FILTER_SANITIZE_ENCODED':'','FILTER_SANITIZE_SPECIAL_CHARS':'','FILTER_SANITIZE_EMAIL':'','FILTER_SANITIZE_URL':'','FILTER_SANITIZE_NUMBER_INT':'','FILTER_SANITIZE_NUMBER_FLOAT':'','FILTER_SANITIZE_MAGIC_QUOTES':'','FILTER_CALLBACK':'','FILTER_FLAG_ALLOW_OCTAL':'','FILTER_FLAG_ALLOW_HEX':'','FILTER_FLAG_STRIP_LOW':'','FILTER_FLAG_STRIP_HIGH':'','FILTER_FLAG_ENCODE_LOW':'','FILTER_FLAG_ENCODE_HIGH':'','FILTER_FLAG_ENCODE_AMP':'','FILTER_FLAG_EMPTY_STRING_NULL':'','FILTER_FLAG_ALLOW_FRACTION':'','FILTER_FLAG_ALLOW_THOUSAND':'','FILTER_FLAG_ALLOW_SCIENTIFIC':'','FILTER_FLAG_PATH_REQUIRED':'','FILTER_FLAG_QUERY_REQUIRED':'','FILTER_FLAG_IPV4':'','FILTER_FLAG_IPV6':'','FILTER_FLAG_NO_RES_RANGE':'','FILTER_FLAG_NO_PRIV_RANGE':'','FILTER_SANITIZE_RAW':'','FILTER_SANITIZE_FULL_SPECIAL_CHARS':'','ENT_QUOTES':'',} +let php_builtin['constants']['php_options_info']={'ASSERT_CALLBACK':'','RUSAGE_CHILDREN':'','PHP_SAPI':'','PHP_OS':'','CREDITS_DOCS':'','CREDITS_GENERAL':'','CREDITS_GROUP':'','CREDITS_MODULES':'','CREDITS_FULLPAGE':'','PHP_VERSION_ID':'','PHP_VERSION':'','PATH_SEPARATOR':'','CREDITS_SAPI':'','CREDITS_QA':'','CREDITS_ALL':'','INFO_GENERAL':'','INFO_CREDITS':'','INFO_CONFIGURATION':'','INFO_MODULES':'','INFO_ENVIRONMENT':'','INFO_VARIABLES':'','INFO_LICENSE':'','INFO_ALL':'','ASSERT_ACTIVE':'','ASSERT_BAIL':'','ASSERT_WARNING':'','ASSERT_QUIET_EVAL':'','PHP_WINDOWS_VERSION_MAJOR':'','PHP_WINDOWS_VERSION_MINOR':'','PHP_WINDOWS_VERSION_BUILD':'','PHP_WINDOWS_VERSION_PLATFORM':'','PHP_WINDOWS_VERSION_SP_MAJOR':'','PHP_WINDOWS_VERSION_SP_MINOR':'','PHP_WINDOWS_VERSION_SUITEMASK':'','PHP_WINDOWS_VERSION_PRODUCTTYPE':'','PHP_WINDOWS_NT_DOMAIN_CONTROLLER':'','PHP_WINDOWS_NT_SERVER':'','PHP_WINDOWS_NT_WORKSTATION':'',} +let php_builtin['constants']['strings']={'CRYPT_SALT_LENGTH':'','CRYPT_STD_DES':'','CRYPT_EXT_DES':'','CRYPT_MD5':'','CRYPT_BLOWFISH':'','CRYPT_SHA256':'','CRYPT_SHA512':'','HTML_ENTITIES':'','HTML_SPECIALCHARS':'','ENT_COMPAT':'','ENT_QUOTES':'','ENT_NOQUOTES':'','ENT_HTML401':'','ENT_XML1':'','ENT_XHTML':'','ENT_HTML5':'','ENT_IGNORE':'','ENT_SUBSTITUTE':'','ENT_DISALLOWED':'','CHAR_MAX':'','LC_MONETARY':'','AM_STR':'','PM_STR':'','D_T_FMT':'','D_FMT':'','T_FMT':'','T_FMT_AMPM':'','ERA':'','ERA_YEAR':'','ERA_D_T_FMT':'','ERA_D_FMT':'','ERA_T_FMT':'','INT_CURR_SYMBOL':'','CURRENCY_SYMBOL':'','CRNCYSTR':'','MON_DECIMAL_POINT':'','MON_THOUSANDS_SEP':'','MON_GROUPING':'','POSITIVE_SIGN':'','NEGATIVE_SIGN':'','INT_FRAC_DIGITS':'','FRAC_DIGITS':'','P_CS_PRECEDES':'','P_SEP_BY_SPACE':'','N_CS_PRECEDES':'','N_SEP_BY_SPACE':'','P_SIGN_POSN':'','N_SIGN_POSN':'','DECIMAL_POINT':'','RADIXCHAR':'','THOUSANDS_SEP':'','THOUSEP':'','GROUPING':'','YESEXPR':'','NOEXPR':'','YESSTR':'','NOSTR':'','CODESET':'','LC_ALL':'','LC_COLLATE':'','LC_CTYPE':'','LC_NUMERIC':'','LC_TIME':'','LC_MESSAGES':'','PHP_INT_MAX':'','STR_PAD_RIGHT':'','STR_PAD_LEFT':'','STR_PAD_BOTH':'',} +let php_builtin['constants']['error_handling']={'DEBUG_BACKTRACE_PROVIDE_OBJECT':'','DEBUG_BACKTRACE_IGNORE_ARGS':'',} +let php_builtin['constants']['math']={'PHP_INT_MAX':'','M_PI':'','PHP_ROUND_HALF_UP':'','PHP_ROUND_HALF_DOWN':'','PHP_ROUND_HALF_EVEN':'','PHP_ROUND_HALF_ODD':'','M_E':'','M_LOG2E':'','M_LOG10E':'','M_LN2':'','M_LN10':'','M_PI_2':'','M_PI_4':'','M_1_PI':'','M_2_PI':'','M_SQRTPI':'','M_2_SQRTPI':'','M_SQRT2':'','M_SQRT3':'','M_SQRT1_2':'','M_LNPI':'','M_EULER':'','NAN':'','INF':'',} +let php_builtin['constants']['network']={'LOG_EMERG':'','LOG_ALERT':'','LOG_CRIT':'','LOG_ERR':'','LOG_WARNING':'','LOG_NOTICE':'','LOG_INFO':'','LOG_DEBUG':'','LOG_KERN':'','LOG_USER':'','LOG_MAIL':'','LOG_DAEMON':'','LOG_AUTH':'','LOG_SYSLOG':'','LOG_LPR':'','LOG_NEWS':'','LOG_CRON':'','LOG_AUTHPRIV':'','LOG_LOCAL0':'','LOG_LOCAL1':'','LOG_LOCAL2':'','LOG_LOCAL3':'','LOG_LOCAL4':'','LOG_LOCAL5':'','LOG_LOCAL6':'','LOG_LOCAL7':'','LOG_PID':'','LOG_CONS':'','LOG_ODELAY':'','LOG_NDELAY':'','LOG_NOWAIT':'','LOG_PERROR':'','DNS_A':'','DNS_CNAME':'','DNS_HINFO':'','DNS_MX':'','DNS_NS':'','DNS_PTR':'','DNS_SOA':'','DNS_TXT':'','DNS_AAAA':'','DNS_SRV':'','DNS_NAPTR':'','DNS_A6':'','DNS_ALL':'','DNS_ANY':'','SID':'','LOG_UUCP':'',} +let php_builtin['constants']['urls']={'PHP_QUERY_RFC1738':'','PHP_QUERY_RFC3986':'','PHP_URL_SCHEME':'','PHP_URL_HOST':'','PHP_URL_PORT':'','PHP_URL_USER':'','PHP_URL_PASS':'','PHP_URL_PATH':'','PHP_URL_QUERY':'','PHP_URL_FRAGMENT':'',} +let php_builtin['constants']['gd']={'IMAGETYPE_GIF':'','IMAGETYPE_JPEG':'','IMAGETYPE_PNG':'','IMAGETYPE_SWF':'','IMAGETYPE_PSD':'','IMAGETYPE_BMP':'','IMAGETYPE_TIFF_II':'','IMAGETYPE_TIFF_MM':'','IMAGETYPE_JPC':'','IMAGETYPE_JP2':'','IMAGETYPE_JPX':'','IMAGETYPE_JB2':'','IMAGETYPE_SWC':'','IMAGETYPE_IFF':'','IMAGETYPE_WBMP':'','IMAGETYPE_XBM':'','IMAGETYPE_ICO':'','IMG_CROP_THRESHOLD':'','IMG_ARC_PIE':'','IMG_ARC_CHORD':'','IMG_ARC_NOFILL':'','IMG_ARC_EDGED':'','IMG_FILTER_NEGATE':'','IMG_FILTER_GRAYSCALE':'','IMG_FILTER_BRIGHTNESS':'','IMG_FILTER_CONTRAST':'','IMG_FILTER_COLORIZE':'','IMG_FILTER_EDGEDETECT':'','IMG_FILTER_EMBOSS':'','IMG_FILTER_GAUSSIAN_BLUR':'','IMG_FILTER_SELECTIVE_BLUR':'','IMG_FILTER_MEAN_REMOVAL':'','IMG_FILTER_SMOOTH':'','IMG_FILTER_PIXELATE':'','IMG_FLIP_HORIZONTAL':'','IMG_FLIP_VERTICAL':'','IMG_FLIP_BOTH':'','IMG_GD2_RAW':'','IMG_GD2_COMPRESSED':'','IMG_EFFECT_REPLACE':'','IMG_EFFECT_ALPHABLEND':'','IMG_EFFECT_NORMAL':'','IMG_EFFECT_OVERLAY':'','PNG_NO_FILTER':'','PNG_ALL_FILTERS':'','IMG_NEAREST_NEIGHBOUR':'','IMG_BILINEAR_FIXED':'','IMG_BICUBIC':'','IMG_BICUBIC_FIXED':'','IMG_COLOR_BRUSHED':'','IMG_COLOR_STYLEDBRUSHED':'','IMG_BELL':'','IMG_BESSEL':'','IMG_BLACKMAN':'','IMG_BOX':'','IMG_BSPLINE':'','IMG_CATMULLROM':'','IMG_GAUSSIAN':'','IMG_GENERALIZED_CUBIC':'','IMG_HERMITE':'','IMG_HAMMING':'','IMG_HANNING':'','IMG_MITCHELL':'','IMG_POWER':'','IMG_QUADRATIC':'','IMG_SINC':'','IMG_WEIGHTED4':'','IMG_TRIANGLE':'','IMG_COLOR_STYLED':'','IMG_COLOR_TRANSPARENT':'','IMG_COLOR_TILED':'','IMG_GIF':'','IMG_JPG':'','IMG_PNG':'','IMG_WBMP':'','IMG_XPM':'','GD_VERSION':'','GD_MAJOR_VERSION':'','GD_MINOR_VERSION':'','GD_RELEASE_VERSION':'','GD_EXTRA_VERSION':'','GD_BUNDLED':'','IMG_JPEG':'','IMG_ARC_ROUNDED':'','IMAGETYPE_JPEG2000':'','PNG_FILTER_NONE':'','PNG_FILTER_SUB':'','PNG_FILTER_UP':'','PNG_FILTER_AVG':'','PNG_FILTER_PAETH':'',} +let php_builtin['constants']['json']={'JSON_BIGINT_AS_STRING':'','JSON_HEX_QUOT':'','JSON_HEX_TAG':'','JSON_HEX_AMP':'','JSON_HEX_APOS':'','JSON_NUMERIC_CHECK':'','JSON_PRETTY_PRINT':'','JSON_UNESCAPED_SLASHES':'','JSON_FORCE_OBJECT':'','JSON_UNESCAPED_UNICODE':'','JSON_ERROR_NONE':'','JSON_ERROR_DEPTH':'','JSON_ERROR_STATE_MISMATCH':'','JSON_ERROR_CTRL_CHAR':'','JSON_ERROR_SYNTAX':'','JSON_ERROR_UTF8':'','JSON_ERROR_RECURSION':'','JSON_ERROR_INF_OR_NAN':'','NAN':'','INF':'','JSON_ERROR_UNSUPPORTED_TYPE':'','JSON_PARTIAL_OUTPUT_ON_ERROR':'',} +let php_builtin['constants']['multibyte_string']={'MB_CASE_UPPER':'','MB_CASE_LOWER':'','MB_CASE_TITLE':'','MB_OVERLOAD_MAIL':'','MB_OVERLOAD_STRING':'','MB_OVERLOAD_REGEX':'',} +let php_builtin['constants']['mssql']={'SQLTEXT':'','SQLVARCHAR':'','SQLCHAR':'','SQLINT1':'','SQLINT2':'','SQLINT4':'','SQLBIT':'','SQLFLT4':'','SQLFLT8':'','SQLFLTN':'','MSSQL_ASSOC':'','MSSQL_NUM':'','MSSQL_BOTH':'',} +let php_builtin['constants']['mysql']={'MYSQL_CLIENT_SSL':'','MYSQL_CLIENT_COMPRESS':'','MYSQL_CLIENT_IGNORE_SPACE':'','MYSQL_CLIENT_INTERACTIVE':'','MYSQL_ASSOC':'','MYSQL_NUM':'','MYSQL_BOTH':'','MYSQL_PORT':'',} +let php_builtin['constants']['output_control']={'PHP_OUTPUT_HANDLER_STDFLAGS':'','PHP_OUTPUT_HANDLER_CLEANABLE':'','PHP_OUTPUT_HANDLER_FLUSHABLE':'','PHP_OUTPUT_HANDLER_REMOVABLE':'','PHP_OUTPUT_HANDLER_START':'','PHP_OUTPUT_HANDLER_WRITE':'','PHP_OUTPUT_HANDLER_FLUSH':'','PHP_OUTPUT_HANDLER_CLEAN':'','PHP_OUTPUT_HANDLER_FINAL':'','PHP_OUTPUT_HANDLER_CONT':'','PHP_OUTPUT_HANDLER_END':'',} +let php_builtin['constants']['password_hashing']={'PASSWORD_DEFAULT':'','PASSWORD_BCRYPT':'','CRYPT_BLOWFISH':'',} +let php_builtin['constants']['postgresql']={'PGSQL_CONNECT_FORCE_NEW':'','PGSQL_CONNECTION_OK':'','PGSQL_CONNECTION_BAD':'','PGSQL_CONV_IGNORE_DEFAULT':'','PGSQL_CONV_FORCE_NULL':'','PGSQL_CONV_IGNORE_NOT_NULL':'','PGSQL_DML_NO_CONV':'','PGSQL_DML_ESCAPE':'','PGSQL_DML_EXEC':'','PGSQL_DML_ASYNC':'','PGSQL_DML_STRING':'','PGSQL_ASSOC':'','PGSQL_NUM':'','PGSQL_BOTH':'','PGSQL_CONV_OPTS':'','INV_READ':'','INV_WRITE':'','INV_ARCHIVE':'','PGSQL_SEEK_SET':'','PGSQL_SEEK_CUR':'','PGSQL_SEEK_END':'','PGSQL_DIAG_SEVERITY':'','PGSQL_DIAG_SQLSTATE':'','PGSQL_DIAG_MESSAGE_PRIMARY':'','PGSQL_DIAG_MESSAGE_DETAIL':'','PGSQL_DIAG_MESSAGE_HINT':'','PGSQL_DIAG_STATEMENT_POSITION':'','PGSQL_DIAG_INTERNAL_POSITION':'','PGSQL_DIAG_INTERNAL_QUERY':'','PGSQL_DIAG_CONTEXT':'','PGSQL_DIAG_SOURCE_FILE':'','PGSQL_DIAG_SOURCE_LINE':'','PGSQL_DIAG_SOURCE_FUNCTION':'','PGSQL_STATUS_LONG':'','PGSQL_STATUS_STRING':'','PGSQL_EMPTY_QUERY':'','PGSQL_COMMAND_OK':'','PGSQL_TUPLES_OK':'','PGSQL_COPY_OUT':'','PGSQL_COPY_IN':'','PGSQL_BAD_RESPONSE':'','PGSQL_NONFATAL_ERROR':'','PGSQL_FATAL_ERROR':'','PGSQL_ERRORS_TERSE':'','PGSQL_ERRORS_DEFAULT':'','PGSQL_ERRORS_VERBOSE':'','PGSQL_TRANSACTION_IDLE':'','PGSQL_TRANSACTION_ACTIVE':'','PGSQL_TRANSACTION_INTRANS':'','PGSQL_TRANSACTION_INERROR':'','PGSQL_TRANSACTION_UNKNOWN':'','PG_DIAG_STATEMENT_POSITION':'','PG_DIAG_INTERNAL_QUERY':'',} +let php_builtin['constants']['pcre']={'PREG_GREP_INVERT':'','PREG_NO_ERROR':'','PREG_INTERNAL_ERROR':'','PREG_BACKTRACK_LIMIT_ERROR':'','PREG_RECURSION_LIMIT_ERROR':'','PREG_BAD_UTF8_ERROR':'','PREG_BAD_UTF8_OFFSET_ERROR':'','PREG_PATTERN_ORDER':'','PREG_SET_ORDER':'','PREG_OFFSET_CAPTURE':'','PREG_SPLIT_NO_EMPTY':'','PREG_SPLIT_DELIM_CAPTURE':'','PREG_SPLIT_OFFSET_CAPTURE':'','PCRE_VERSION':'',} +let php_builtin['constants']['program_execution']={'STDIN':'',} +let php_builtin['constants']['sessions']={'SID':'','PHP_SESSION_DISABLED':'','PHP_SESSION_NONE':'','PHP_SESSION_ACTIVE':'','UPLOAD_ERR_EXTENSION':'',} +let php_builtin['constants']['variable_handling']={'PHP_INT_MAX':'',} +let php_builtin['constants']['misc']={'WAIT_IO_COMPLETION':'','CONNECTION_ABORTED':'','CONNECTION_NORMAL':'','CONNECTION_TIMEOUT':'',} +let php_builtin['constants']['streams']={'STREAM_FILTER_READ':'','STREAM_FILTER_WRITE':'','STREAM_FILTER_ALL':'','PHP_INT_MAX':'','STREAM_CLIENT_CONNECT':'','STREAM_CLIENT_ASYNC_CONNECT':'','STREAM_CLIENT_PERSISTENT':'','STREAM_CRYPTO_METHOD_TLS_CLIENT':'','STREAM_CRYPTO_METHOD_TLS_SERVER':'','STREAM_PF_INET':'','STREAM_PF_INET6':'','STREAM_PF_UNIX':'','STREAM_SOCK_DGRAM':'','STREAM_SOCK_RAW':'','STREAM_SOCK_RDM':'','STREAM_SOCK_SEQPACKET':'','STREAM_SOCK_STREAM':'','STREAM_IPPROTO_ICMP':'','STREAM_IPPROTO_IP':'','STREAM_IPPROTO_RAW':'','STREAM_IPPROTO_TCP':'','STREAM_IPPROTO_UDP':'','STREAM_OOB':'','STREAM_PEEK':'','AF_INET':'','STREAM_SERVER_BIND':'','STREAM_SHUT_RD':'','STREAM_SHUT_WR':'','STREAM_SHUT_RDWR':'','STREAM_IS_URL':'','PSFS_PASS_ON':'','PSFS_FEED_ME':'','PSFS_ERR_FATAL':'','PSFS_FLAG_NORMAL':'','PSFS_FLAG_FLUSH_INC':'','PSFS_FLAG_FLUSH_CLOSE':'','STREAM_USE_PATH':'','STREAM_REPORT_ERRORS':'','STREAM_SERVER_LISTEN':'','STREAM_NOTIFY_RESOLVE':'','STREAM_NOTIFY_CONNECT':'','STREAM_NOTIFY_AUTH_REQUIRED':'','STREAM_NOTIFY_SEVERITY_ERR':'','STREAM_NOTIFY_MIME_TYPE_IS':'','STREAM_NOTIFY_FILE_SIZE_IS':'','STREAM_NOTIFY_REDIRECTED':'','STREAM_NOTIFY_PROGRESS':'','STREAM_NOTIFY_COMPLETED':'','STREAM_NOTIFY_FAILURE':'','STREAM_NOTIFY_AUTH_RESULT':'','STREAM_NOTIFY_SEVERITY_INFO':'','STREAM_NOTIFY_SEVERITY_WARN':'','STREAM_CAST_FOR_SELECT':'','STREAM_CAST_AS_STREAM':'','STREAM_META_TOUCH':'','STREAM_META_OWNER':'','STREAM_META_OWNER_NAME':'','STREAM_META_GROUP':'','STREAM_META_GROUP_NAME':'','STREAM_META_ACCESS':'','STREAM_MKDIR_RECURSIVE':'','LOCK_EX':'','LOCK_UN':'','LOCK_SH':'','LOCK_NB':'','SEEK_SET':'','SEEK_CUR':'','SEEK_END':'','STREAM_OPTION_BLOCKING':'','STREAM_OPTION_READ_TIMEOUT':'','STREAM_OPTION_WRITE_BUFFER':'','STREAM_BUFFER_NONE':'','STREAM_BUFFER_FULL':'',} +let php_builtin['constants']['iconv']={'ICONV_IMPL':'','ICONV_VERSION':'','ICONV_MIME_DECODE_STRICT':'','ICONV_MIME_DECODE_CONTINUE_ON_ERROR':'',} +let php_builtin['constants']['phpini_directives']={'PATH_SEPARATOR':'','PHP_INI_SYSTEM':'',} +let php_builtin['constants']['types']={'NAN':'','PHP_INT_SIZE':'','PHP_INT_MAX':'',} +let php_builtin['constants']['pdo']={'PDO_PARAM_BOOL':'',} +let php_builtin['constants']['list_of_reserved_words']={'PHP_VERSION':'','PHP_MAJOR_VERSION':'','PHP_MINOR_VERSION':'','PHP_RELEASE_VERSION':'','PHP_VERSION_ID':'','PHP_EXTRA_VERSION':'','PHP_ZTS':'','PHP_DEBUG':'','PHP_MAXPATHLEN':'','PHP_OS':'','PHP_SAPI':'','PHP_EOL':'','PHP_INT_MAX':'','PHP_INT_SIZE':'','DEFAULT_INCLUDE_PATH':'','PEAR_INSTALL_DIR':'','PEAR_EXTENSION_DIR':'','PHP_EXTENSION_DIR':'','PHP_PREFIX':'','PHP_BINDIR':'','PHP_BINARY':'','PHP_MANDIR':'','PHP_LIBDIR':'','PHP_DATADIR':'','PHP_SYSCONFDIR':'','PHP_LOCALSTATEDIR':'','PHP_CONFIG_FILE_PATH':'','PHP_CONFIG_FILE_SCAN_DIR':'','PHP_SHLIB_SUFFIX':'',} +let php_builtin['constants']['php_type_comparison_tables']={'NAN':'',} + +" Built in functions +let g:php_builtin_functions = {} +for [ext, data] in items(php_builtin['functions']) + call extend(g:php_builtin_functions, data) +endfor + +" Built in classs +let g:php_builtin_classes = {} +for [ext, data] in items(php_builtin['classes']) + call extend(g:php_builtin_classes, data) +endfor + +" Built in interfaces +let g:php_builtin_interfaces = {} +for [ext, data] in items(php_builtin['interfaces']) + call extend(g:php_builtin_interfaces, data) +endfor + +" Built in constants +let g:php_constants = {} +for [ext, data] in items(php_builtin['constants']) + call extend(g:php_constants, data) +endfor + +" When the classname not found or found but the tags dosen't contain that +" class we will try to complate any method of any builtin class. To speed up +" that lookup we compile a 'ClassName::MethodName':'info' dictionary from the +" builtin class informations +let g:php_builtin_object_functions = {} + +" When completing for 'everyting imaginable' (no class context, not a +" variable) we need a list of built-in classes in a format of {'classname':''} +" for performance reasons we precompile this too +let g:php_builtin_classnames = {} + +" In order to reduce file size, empty keys are omitted from class structures. +" To make the structure of in-memory hashes normalized we will add them in runtime +let required_class_hash_keys = ['constants', 'properties', 'static_properties', 'methods', 'static_methods'] + +for [classname, class_info] in items(g:php_builtin_classes) + for property_name in required_class_hash_keys + if !has_key(class_info, property_name) + let class_info[property_name] = {} + endif + endfor + + let g:php_builtin_classnames[class_info.name] = '' + for [method_name, method_info] in items(class_info.methods) + let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature + endfor + for [method_name, method_info] in items(class_info.static_methods) + let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature + endfor +endfor + +let g:php_builtin_interfacenames = {} +for [interfacename, info] in items(g:php_builtin_interfaces) + for property_name in required_class_hash_keys + if !has_key(class_info, property_name) + let class_info[property_name] = {} + endif + endfor + + let g:php_builtin_interfacenames[interfacename] = '' + for [method_name, method_info] in items(class_info.methods) + let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature + endfor + for [method_name, method_info] in items(class_info.static_methods) + let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature + endfor +endfor + + +" Add control structures (they are outside regular pattern of PHP functions) +let php_control = { + \ 'include(': 'string filename | resource', + \ 'include_once(': 'string filename | resource', \ 'require(': 'string filename | resource', \ 'require_once(': 'string filename | resource', \ } call extend(g:php_builtin_functions, php_control) + + +" Built-in variables " {{{ +let g:php_builtin_vars ={ + \ '$GLOBALS':'', + \ '$_SERVER':'', + \ '$_GET':'', + \ '$_POST':'', + \ '$_COOKIE':'', + \ '$_FILES':'', + \ '$_ENV':'', + \ '$_REQUEST':'', + \ '$_SESSION':'', + \ '$HTTP_SERVER_VARS':'', + \ '$HTTP_ENV_VARS':'', + \ '$HTTP_COOKIE_VARS':'', + \ '$HTTP_GET_VARS':'', + \ '$HTTP_POST_VARS':'', + \ '$HTTP_POST_FILES':'', + \ '$HTTP_SESSION_VARS':'', + \ '$php_errormsg':'', + \ '$this':'', + \ } +" }}} endfunction " }}} -" vim:set foldmethod=marker: + +" vim: foldmethod=marker:noexpandtab:ts=8:sts=4 diff -Nru vim-7.4a.012/runtime/colors/delek.vim vim-7.4.273/runtime/colors/delek.vim --- vim-7.4a.012/runtime/colors/delek.vim 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/colors/delek.vim 2014-04-29 18:04:09.000000000 +0000 @@ -1,10 +1,10 @@ " Vim color file -" Maintainer: David Schweikert -" Last Change: 2006 Apr 30 +" Maintainer: David Schweikert +" Last Change: 2014 Mar 19 hi clear -let colors_name = "delek" +let g:colors_name = "delek" " Normal should come first hi Normal guifg=Black guibg=White @@ -28,7 +28,11 @@ hi Pmenu guibg=LightBlue hi PmenuSel ctermfg=White ctermbg=DarkBlue guifg=White guibg=DarkBlue hi Question ctermfg=DarkGreen gui=bold guifg=SeaGreen -hi Search ctermfg=NONE ctermbg=Yellow guibg=Yellow guifg=NONE +if &background == "light" + hi Search ctermfg=NONE ctermbg=Yellow guibg=Yellow guifg=NONE +else + hi Search ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black +endif hi SpecialKey ctermfg=DarkBlue guifg=Blue hi StatusLine cterm=bold ctermbg=blue ctermfg=yellow guibg=gold guifg=blue hi StatusLineNC cterm=bold ctermbg=blue ctermfg=black guibg=gold guifg=blue diff -Nru vim-7.4a.012/runtime/colors/industry.vim vim-7.4.273/runtime/colors/industry.vim --- vim-7.4a.012/runtime/colors/industry.vim 1970-01-01 00:00:00.000000000 +0000 +++ vim-7.4.273/runtime/colors/industry.vim 2014-04-29 18:04:09.000000000 +0000 @@ -0,0 +1,40 @@ +" Vim color file +" Maintainer: Shian Lee +" Last Change: 2014 Mar 6 (for vim 7.4) +" Remark: "industry" stands for 'industrial' color scheme. In industrial +" HMI (Human-Machine-Interface) programming, using a standard color +" scheme is mandatory in many cases (in traffic-lights for example): +" LIGHT_RED is 'Warning' +" LIGHT_YELLOW is 'Attention' +" LIGHT_GREEN is 'Normal' +" LIGHT_MAGENTA is 'Warning-Attention' (light RED-YELLOW) +" LIGHT_CYAN is 'Attention-Normal' (light YELLOW-GREEN). +" BLACK is Dark-High-Contrast Background for maximum safety. +" BLUE is Shade of BLACK (not supposed to get attention). +" +" Industrial color scheme is by nature clear, safe and productive. +" Yet, depends on the file type's syntax, it might appear incorrect. + +" Reset to dark background, then reset everything to defaults: +set background=dark +highlight clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "industry" + +" First set Normal to regular white on black text colors: +hi Normal ctermfg=LightGray ctermbg=Black guifg=#dddddd guibg=Black + +" Syntax highlighting (other color-groups using default, see :help group-name): +hi Comment cterm=NONE ctermfg=DarkCyan gui=NONE guifg=#00aaaa +hi Constant cterm=NONE ctermfg=LightCyan gui=NONE guifg=#00ffff +hi Identifier cterm=NONE ctermfg=LightMagenta gui=NONE guifg=#ff00ff +hi Function cterm=NONE ctermfg=LightGreen gui=NONE guifg=#00ff00 +hi Statement cterm=NONE ctermfg=White gui=bold guifg=#ffffff +hi PreProc cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 +hi Type cterm=NONE ctermfg=LightGreen gui=bold guifg=#00ff00 +hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=#ff0000 +hi Delimiter cterm=NONE ctermfg=Yellow gui=NONE guifg=#ffff00 + diff -Nru vim-7.4a.012/runtime/colors/README.txt vim-7.4.273/runtime/colors/README.txt --- vim-7.4a.012/runtime/colors/README.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/colors/README.txt 2014-04-29 18:04:09.000000000 +0000 @@ -36,6 +36,14 @@ removed in your color scheme. Use something like "gui=NONE" to remove the attributes. +In case you want to set 'background' depending on the colorscheme selected, +this autocmd might be useful: + autocmd SourcePre */colors/blue_sky.vim set background=dark +Replace "blue_sky" with the name of the colorscheme. + +In case you want to tweak a colorscheme after it was loaded, check out that +ColorScheme autocmd event. + To see which highlight group is used where, find the help for "highlight-groups" and "group-name". diff -Nru vim-7.4a.012/runtime/compiler/gcc.vim vim-7.4.273/runtime/compiler/gcc.vim --- vim-7.4a.012/runtime/compiler/gcc.vim 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/compiler/gcc.vim 2014-04-29 18:04:09.000000000 +0000 @@ -25,10 +25,10 @@ \%f:%l:\ %tarning:\ %m, \%f:%l:\ %m, \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m, - \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', - \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', - \%D%*\\a:\ Entering\ directory\ `%f', - \%X%*\\a:\ Leaving\ directory\ `%f', + \%D%*\\a[%*\\d]:\ Entering\ directory\ [`']%f', + \%X%*\\a[%*\\d]:\ Leaving\ directory\ [`']%f', + \%D%*\\a:\ Entering\ directory\ [`']%f', + \%X%*\\a:\ Leaving\ directory\ [`']%f', \%DMaking\ %*\\a\ in\ %f if exists('g:compiler_gcc_ignore_unmatched_lines') diff -Nru vim-7.4a.012/runtime/doc/arabic.txt vim-7.4.273/runtime/doc/arabic.txt --- vim-7.4a.012/runtime/doc/arabic.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/arabic.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*arabic.txt* For Vim version 7.4a. Last change: 2010 Nov 13 +*arabic.txt* For Vim version 7.4. Last change: 2010 Nov 13 VIM REFERENCE MANUAL by Nadim Shaikli diff -Nru vim-7.4a.012/runtime/doc/autocmd.txt vim-7.4.273/runtime/doc/autocmd.txt --- vim-7.4a.012/runtime/doc/autocmd.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/autocmd.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.4a. Last change: 2013 Jun 15 +*autocmd.txt* For Vim version 7.4. Last change: 2014 Jan 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -304,6 +304,9 @@ |InsertCharPre| when a character was typed in Insert mode, before inserting it +|TextChanged| after a change was made to the text in Normal mode +|TextChangedI| after a change was made to the text in Insert mode + |ColorScheme| after loading a color scheme |RemoteReply| a reply from a server Vim was received @@ -480,6 +483,12 @@ |cmdwin-char| *ColorScheme* ColorScheme After loading a color scheme. |:colorscheme| + The pattern is matched against the + colorscheme name. can be used for the + name of the actual file where this option was + set, and for the new colorscheme + name. + *CompleteDone* CompleteDone After Insert mode completion is done. Either @@ -553,6 +562,9 @@ It is not allowed to change to another buffer here. You can reload the buffer but not edit another one. + *E881* + If the number of lines changes saving for undo + may fail and the change will be aborted. *FileChangedShell* FileChangedShell When Vim notices that the modification time of a file has changed since editing started. @@ -731,7 +743,7 @@ command is run, before jumping to the first location. For |:cfile| and |:lfile| commands it is run after error file is read and before - moving to the first error. + moving to the first error. See |QuickFixCmdPost-example|. *QuitPre* QuitPre When using `:quit`, `:wq` or `:qall`, before @@ -952,7 +964,8 @@ *file-pattern* The pattern is interpreted like mostly used in file names: - * matches any sequence of characters + * matches any sequence of characters; Unusual: includes path + separators ? matches any single character \? matches a '?' . matches a '.' @@ -961,6 +974,9 @@ \, matches a ',' { } like \( \) in a |pattern| , inside { }: like \| in a |pattern| + \} literal } + \{ literal { + \\\{n,m\} like \{n,m} in a |pattern| \ special meaning like in a |pattern| [ch] matches 'c' or 'h' [^ch] match any character but 'c' and 'h' diff -Nru vim-7.4a.012/runtime/doc/change.txt vim-7.4.273/runtime/doc/change.txt --- vim-7.4a.012/runtime/doc/change.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/change.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.4a. Last change: 2013 Mar 19 +*change.txt* For Vim version 7.4. Last change: 2014 Feb 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -71,9 +71,21 @@ "D" deletes the highlighted text plus all text until the end of the line. {not in Vi} - *:d* *:de* *:del* *:delete* *:dl* + *:d* *:de* *:del* *:delete* *:dl* *:dp* :[range]d[elete] [x] Delete [range] lines (default: current line) [into register x]. + Note these weird abbreviations: + :dl delete and list + :dell idem + :delel idem + :deletl idem + :deletel idem + :dp delete and print + :dep idem + :delp idem + :delep idem + :deletp idem + :deletep idem :[range]d[elete] [x] {count} Delete {count} lines, starting with [range] @@ -144,6 +156,9 @@ The 'B' and 'M' flags in 'formatoptions' change the behavior for inserting spaces before and after a multi-byte character |fo-table|. +The '[ mark is set at the end of the first line that was joined, '] at the end +of the resulting line. + ============================================================================== 2. Delete and insert *delete-insert* *replacing* @@ -463,8 +478,8 @@ 'shiftwidth'. If the 'smartindent' option is on, or 'cindent' is on and 'cinkeys' contains -'#', shift right does not affect lines starting with '#' (these are supposed -to be C preprocessor lines that must stay in column 1). +'#' with a zero value, shift right does not affect lines starting with '#' +(these are supposed to be C preprocessor lines that must stay in column 1). When the 'expandtab' option is off (this is the default) Vim uses s as much as possible to make the indent. You can use ">><<" to replace an indent @@ -812,7 +827,7 @@ < Substitute with an expression *sub-replace-expression* - *sub-replace-\=* + *sub-replace-\=* *s/\=* When the substitute string starts with "\=" the remainder is interpreted as an expression. This does not work recursively: a |substitute()| function inside the expression cannot use "\=" for the substitute string. @@ -1057,6 +1072,11 @@ replace and use "0p . You can repeat this as many times as you like, the unnamed register will be changed each time. +When you use a blockwise Visual mode command and yank only a single line into +a register, a paste on a visual selected area will paste that single line on +each of the selected lines (thus replacing the blockwise selected region by a +block of the pasted line). + *blockwise-register* If you use a blockwise Visual mode command to get the text into the register, the block of text will be inserted before ("P") or after ("p") the cursor @@ -1114,6 +1134,8 @@ made for the delete operator with these movement commands: |%|, |(|, |)|, |`|, |/|, |?|, |n|, |N|, |{| and |}|. Register "1 is always used then (this is Vi compatible). The "- register is used as well if the delete is within a line. +Note that these characters may be mapped. E.g. |%| is mapped by the matchit +plugin. With each successive deletion or change, Vim shifts the previous contents of register 1 into register 2, 2 into 3, and so forth, losing the previous contents of register 9. @@ -1628,7 +1650,7 @@ 7. Sorting text *sorting* Vim has a sorting function and a sorting command. The sorting function can be -found here: |sort()|. +found here: |sort()|, |uniq()|. *:sor* *:sort* :[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/] diff -Nru vim-7.4a.012/runtime/doc/cmdline.txt vim-7.4.273/runtime/doc/cmdline.txt --- vim-7.4a.012/runtime/doc/cmdline.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/cmdline.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 7.4a. Last change: 2013 Mar 16 +*cmdline.txt* For Vim version 7.4. Last change: 2014 Feb 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -356,6 +356,10 @@ List the recent five entries from all histories: > :history all -5, +:keepp[atterns] {command} *:keepp* *:keeppatterns* + Execute {command}, without adding anything to the search + history + ============================================================================== 2. Command-line completion *cmdline-completion* @@ -754,6 +758,7 @@ function expand() |expand()|. % Is replaced with the current file name. *:_%* *c_%* # Is replaced with the alternate file name. *:_#* *c_#* + This is remembered for every window. #n (where n is a number) is replaced with *:_#0* *:_#n* the file name of buffer n. "#0" is the same as "#". *c_#n* ## Is replaced with all names in the argument list *:_##* *c_##* @@ -819,8 +824,8 @@ the start of the function. *filename-modifiers* - *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* - *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* +*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S* + *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* *%:S* The file name modifiers can be used after "%", "#", "#n", "", "", "" or "". They are also used with the |fnamemodify()| function. These are not available when Vim has been compiled without the |+modify_fname| @@ -875,6 +880,10 @@ :gs?pat?sub? Substitute all occurrences of "pat" with "sub". Otherwise this works like ":s". + :S Escape special characters for use with a shell command (see + |shellescape()|). Must be the last one. Examples: > + :!dir :S + :call system('chmod +w -- ' . expand('%:S')) Examples, when the file name is "src/version.c", current dir "/home/mool/vim": > diff -Nru vim-7.4a.012/runtime/doc/debugger.txt vim-7.4.273/runtime/doc/debugger.txt --- vim-7.4a.012/runtime/doc/debugger.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/debugger.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*debugger.txt* For Vim version 7.4a. Last change: 2005 Mar 29 +*debugger.txt* For Vim version 7.4. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Gordon Prieur diff -Nru vim-7.4a.012/runtime/doc/debug.txt vim-7.4.273/runtime/doc/debug.txt --- vim-7.4a.012/runtime/doc/debug.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/debug.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*debug.txt* For Vim version 7.4a. Last change: 2012 Feb 11 +*debug.txt* For Vim version 7.4. Last change: 2012 Feb 11 VIM REFERENCE MANUAL by Bram Moolenaar diff -Nru vim-7.4a.012/runtime/doc/develop.txt vim-7.4.273/runtime/doc/develop.txt --- vim-7.4a.012/runtime/doc/develop.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/develop.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 7.4a. Last change: 2013 Apr 27 +*develop.txt* For Vim version 7.4. Last change: 2014 Mar 27 VIM REFERENCE MANUAL by Bram Moolenaar @@ -19,7 +19,6 @@ Vim is open source software. Everybody is encouraged to contribute to help improving Vim. For sending patches a context diff "diff -c" is preferred. -Also see http://www.vim.org/tips/tip.php?tip_id=618. Also see http://vim.wikia.com/wiki/How_to_make_and_submit_a_patch. ============================================================================== diff -Nru vim-7.4a.012/runtime/doc/diff.txt vim-7.4.273/runtime/doc/diff.txt --- vim-7.4a.012/runtime/doc/diff.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/diff.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*diff.txt* For Vim version 7.4a. Last change: 2013 Jul 07 +*diff.txt* For Vim version 7.4. Last change: 2013 Sep 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -123,10 +123,14 @@ file for a moment and come back to the same file and be in diff mode again. *:diffo* *:diffoff* -:diffo[ff] Switch off diff mode for the current window. +:diffo[ff] Switch off diff mode for the current window. Resets related + options also when 'diff' was not set. :diffo[ff]! Switch off diff mode for the current window and in all windows - in the current tab page where 'diff' is set. + in the current tab page where 'diff' is set. Resetting + related options only happens in a window that has 'diff' set, + if the current window does not have 'diff' set then no options + in it are changed. The ":diffoff" command resets the relevant options to the values they had when using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim in diff mode. diff -Nru vim-7.4a.012/runtime/doc/digraph.txt vim-7.4.273/runtime/doc/digraph.txt --- vim-7.4a.012/runtime/doc/digraph.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/digraph.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*digraph.txt* For Vim version 7.4a. Last change: 2011 Jan 15 +*digraph.txt* For Vim version 7.4. Last change: 2013 Dec 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -147,7 +147,7 @@ Two 2 Hook Nine 9 Horn - Equals = Cyrillic + Equals = Cyrillic (= used as second char) Asterisk * Greek Percent sign % Greek/Cyrillic special Plus + smalls: Arabic, capitals: Hebrew diff -Nru vim-7.4a.012/runtime/doc/editing.txt vim-7.4.273/runtime/doc/editing.txt --- vim-7.4a.012/runtime/doc/editing.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/editing.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 7.4a. Last change: 2013 Feb 07 +*editing.txt* For Vim version 7.4. Last change: 2013 Nov 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,6 +38,7 @@ file name. It can be used with "#" on the command line |:_#| and you can use the |CTRL-^| command to toggle between the current and the alternate file. However, the alternate file name is not changed when |:keepalt| is used. +An alternate file name is remembered for each window. *:keepalt* *:keepa* :keepalt {cmd} Execute {cmd} while keeping the current alternate file @@ -185,12 +186,13 @@ that does not work for all commands. If you want to keep the changed buffer without saving it, switch on the -'hidden' option. See |hidden-buffer|. +'hidden' option. See |hidden-buffer|. Some commands work like this even when +'hidden' is not set, check the help for the command. ============================================================================== 2. Editing a file *edit-a-file* - *:e* *:edit* + *:e* *:edit* *reload* :e[dit] [++opt] [+cmd] Edit the current file. This is useful to re-edit the current file, when it has been changed outside of Vim. This fails when changes have been made to the current @@ -199,7 +201,7 @@ Also see |++opt| and |+cmd|. {Vi: no ++opt} - *:edit!* + *:edit!* *discard* :e[dit]! [++opt] [+cmd] Edit the current file always. Discard any changes to the current buffer. This is useful if you want to diff -Nru vim-7.4a.012/runtime/doc/eval.txt vim-7.4.273/runtime/doc/eval.txt --- vim-7.4a.012/runtime/doc/eval.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/eval.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.4a. Last change: 2013 Jun 11 +*eval.txt* For Vim version 7.4. Last change: 2014 Apr 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -123,6 +123,7 @@ :echo Fn() < *E704* *E705* *E707* A Funcref variable must start with a capital, "s:", "w:", "t:" or "b:". You +can use "g:" but the following name must still start with a capital. You cannot have both a Funcref variable and a function with the same name. A special case is defining a function and directly assigning its Funcref to a @@ -147,7 +148,7 @@ 1.3 Lists ~ - *List* *Lists* *E686* + *list* *List* *Lists* *E686* A List is an ordered sequence of items. An item can be of any type. Items can be accessed by their index number. Items can be added and removed at any position in the sequence. @@ -326,6 +327,7 @@ Changing the order of items in a list: > :call sort(list) " sort a list alphabetically :call reverse(list) " reverse the order of items + :call uniq(sort(list)) " sort and remove duplicates For loop ~ @@ -392,7 +394,7 @@ 1.4 Dictionaries ~ - *Dictionaries* *Dictionary* + *dict* *Dictionaries* *Dictionary* A Dictionary is an associative array: Each entry has a key and a value. The entry can be located with the key. The entries are stored without a specific ordering. @@ -1003,7 +1005,7 @@ -string *expr-string* *E114* +string *string* *expr-string* *E114* ------ "string" string constant *expr-quote* @@ -1142,7 +1144,7 @@ |local-variable| l: Local to a function. |script-variable| s: Local to a |:source|'ed Vim script. |function-argument| a: Function argument (only inside a function). -|vim-variable| v: Global, predefined by Vim. +|vim-variable| v: Global, predefined by Vim. The scope name by itself can be used as a |Dictionary|. For example, to delete all script-local variables: > @@ -1454,6 +1456,13 @@ v:foldstart Used for 'foldtext': first line of closed fold. Read-only in the |sandbox|. |fold-foldtext| + *v:hlsearch* *hlsearch-variable* +v:hlsearch Variable that determines whether search highlighting is on. + Makes sense only if 'hlsearch' is enabled which requires + |+extra_search|. Setting this variable to zero acts the like + |:nohlsearch| command, setting it to one acts like > + let &hlsearch = &hlsearch +< *v:insertmode* *insertmode-variable* v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand events. Values: @@ -1511,6 +1520,7 @@ startup. These are the files that Vim remembers marks for. The length of the List is limited by the ' argument of the 'viminfo' option (default is 100). + When the |viminfo| file is not used the List is empty. Also see |:oldfiles| and |c_#<|. The List can be modified, but this has no effect on what is stored in the |viminfo| file later. If you use values other @@ -1548,6 +1558,16 @@ |evim| etc., or any other name you might symlink to Vim. Read-only. + *v:progpath* *progpath-variable* +v:progpath Contains the command with which Vim was invoked, including the + path. Useful if you want to message a Vim server using a + |--remote-expr|. + To get the full path use: > + echo exepath(v:progpath) +< NOTE: This does not work when the command is a relative path + and the current directory has changed. + Read-only. + *v:register* *register-variable* v:register The name of the register in effect for the current normal mode command (regardless of whether that command actually used a @@ -1662,7 +1682,7 @@ is 501. Read-only. "version" also works, for backwards compatibility. Use |has()| to check if a certain patch was included, e.g.: > - if has("patch123") + if has("patch-7.4.123") < Note that patch numbers are specific to the version, thus both version 5.0 and 5.1 may have a patch 123, but these are completely different. @@ -1712,6 +1732,7 @@ bufwinnr( {expr}) Number window number of buffer {expr} byte2line( {byte}) Number line number at byte count {byte} byteidx( {expr}, {nr}) Number byte index of {nr}'th char in {expr} +byteidxcomp( {expr}, {nr}) Number byte index of {nr}'th char in {expr} call( {func}, {arglist} [, {dict}]) any call {func} with arguments {arglist} ceil( {expr}) Float round {expr} up @@ -1735,7 +1756,7 @@ cursor( {lnum}, {col} [, {coladd}]) Number move cursor to {lnum}, {col}, {coladd} cursor( {list}) Number move cursor to position in {list} -deepcopy( {expr}) any make a full copy of {expr} +deepcopy( {expr} [, {noref}]) any make a full copy of {expr} delete( {fname}) Number delete file {fname} did_filetype() Number TRUE if FileType autocommand event used diff_filler( {lnum}) Number diff filler lines about {lnum} @@ -1745,6 +1766,7 @@ eval( {string}) any evaluate {string} into its value eventhandler( ) Number TRUE if inside an event handler executable( {expr}) Number 1 if executable {expr} exists +exepath( {expr}) String full path of the command {expr} exists( {expr}) Number TRUE if {expr} exists extend( {expr1}, {expr2} [, {expr3}]) List/Dict insert items of {expr2} into {expr1} @@ -1797,7 +1819,8 @@ getpid() Number process ID of Vim getpos( {expr}) List position of cursor, mark, etc. getqflist() List list of quickfix items -getreg( [{regname} [, 1]]) String contents of register +getreg( [{regname} [, 1 [, {list}]]]) + String or List contents of register getregtype( [{regname}]) String type of register gettabvar( {nr}, {varname} [, {def}]) any variable {varname} in tab {nr} or {def} @@ -1968,7 +1991,8 @@ Number last index of {needle} in {haystack} strtrans( {expr}) String translate string to make it printable strwidth( {expr}) Number display cell length of the String {expr} -submatch( {nr}) String specific match in ":s" or substitute() +submatch( {nr}[, {list}]) String or List + specific match in ":s" or substitute() substitute( {expr}, {pat}, {sub}, {flags}) String all {pat} in {expr} replaced with {sub} synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} @@ -1978,6 +2002,7 @@ synconcealed( {lnum}, {col}) List info about concealing synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col} system( {expr} [, {input}]) String output of shell command/filter {expr} +systemlist( {expr} [, {input}]) List output of shell command/filter {expr} tabpagebuflist( [{arg}]) List list of buffer numbers in tab page tabpagenr( [{arg}]) Number number of current or last tab page tabpagewinnr( {tabarg}[, {arg}]) @@ -1995,6 +2020,8 @@ type( {name}) Number type of variable {name} undofile( {name}) String undo file name for {name} undotree() List undo file tree +uniq( {list} [, {func} [, {dict}]]) + List remove adjacent duplicates from a list values( {dict}) List values in {dict} virtcol( {expr}) Number screen column of cursor or mark visualmode( [expr]) String last visual mode used @@ -2260,7 +2287,10 @@ {expr}. Use zero for the first character, it returns zero. This function is only useful when there are multibyte characters, otherwise the returned value is equal to {nr}. - Composing characters are counted as a separate character. + Composing characters are not counted separately, their byte + length is added to the preceding base character. See + |byteidxcomp()| below for counting composing characters + separately. Example : > echo matchstr(str, ".", byteidx(str, 3)) < will display the fourth character. Another way to do the @@ -2269,7 +2299,20 @@ echo strpart(s, 0, byteidx(s, 1)) < If there are less than {nr} characters -1 is returned. If there are exactly {nr} characters the length of the string - is returned. + in bytes is returned. + +byteidxcomp({expr}, {nr}) *byteidxcomp()* + Like byteidx(), except that a composing character is counted + as a separate character. Example: > + let s = 'e' . nr2char(0x301) + echo byteidx(s, 1) + echo byteidxcomp(s, 1) + echo byteidxcomp(s, 2) +< The first and third echo result in 3 ('e' plus composing + character is 3 bytes), the second echo results in 1 ('e' is + one byte). + Only works different from byteidx() when 'encoding' is set to + a Unicode encoding. call({func}, {arglist} [, {dict}]) *call()* *E699* Call function {func} with the items in |List| {arglist} as @@ -2671,6 +2714,15 @@ 0 does not exist -1 not implemented on this system +exepath({expr}) *exepath()* + If {expr} is an executable and is either an absolute path, a + relative path or found in $PATH, return the full path. + Note that the current directory is used when {expr} starts + with "./", which may be a problem for Vim: > + echo exepath(v:progpath) +< If {expr} cannot be found in $PATH or is not executable then + an empty string is returned. + *exists()* exists({expr}) The result is a Number, which is non-zero if {expr} is defined, zero otherwise. The {expr} argument is a string, @@ -2789,7 +2841,7 @@ autocmd file name autocmd buffer number (as a String!) autocmd matched name - sourced script file name + sourced script file or function name sourced script file line number word under the cursor WORD under the cursor @@ -3175,7 +3227,7 @@ If [expr] is 1, only check if a character is available, it is not consumed. Return zero if no character available. - Without {expr} and when {expr} is 0 a whole character or + Without [expr] and when [expr] is 0 a whole character or special key is returned. If it is an 8-bit character, the result is a number. Use nr2char() to convert it to a String. Otherwise a String is returned with the encoded character. @@ -3185,7 +3237,7 @@ String when a modifier (shift, control, alt) was used that is not included in the character. - When {expr} is 1 only the first byte is returned. For a + When [expr] is 1 only the first byte is returned. For a one-byte character it is the character itself as a number. Use nr2char() to convert it to a String. @@ -3417,7 +3469,7 @@ :endfor -getreg([{regname} [, 1]]) *getreg()* +getreg([{regname} [, 1 [, {list}]]]) *getreg()* The result is a String, which is the contents of register {regname}. Example: > :let cliptext = getreg('*') @@ -3426,6 +3478,11 @@ getreg('=', 1) returns the expression itself, so that it can be restored with |setreg()|. For other registers the extra argument is ignored, thus you can always give it. + If {list} is present and non-zero result type is changed to + |List|. Each list item is one text line. Use it if you care + about zero bytes possibly present inside register: without + third argument both NLs and zero bytes are represented as NLs + (see |NL-used-for-Nul|). If {regname} is not specified, |v:register| is used. @@ -3435,7 +3492,7 @@ "v" for |characterwise| text "V" for |linewise| text "{width}" for |blockwise-visual| text - 0 for an empty or unknown register + "" for an empty or unknown register is one character with value 0x16. If {regname} is not specified, |v:register| is used. @@ -4109,6 +4166,8 @@ (|mapmode-ic|) "sid" The script local ID, used for mappings (||). + "nowait" Do not wait for other, longer mappings. + (|:map-|). The mappings local to the current buffer are checked first, then the global mappings. @@ -4210,6 +4269,9 @@ "match"). It will be highlighted with {group}. Returns an identification number (ID), which can be used to delete the match using |matchdelete()|. + Matching is case sensitive and magic, unless case sensitivity + or magicness are explicitly overridden in {pattern}. The + 'magic', 'smartcase' and 'ignorecase' options are not used. The optional {priority} argument assigns a priority to the match. A match with a high priority will have its @@ -4419,6 +4481,9 @@ it is the offset in screen columns from the start of the character. E.g., a position within a or after the last character. + Note that for '< and '> Visual mode matters: when it is "V" + (visual line mode) the column of '< is zero and the column of + '> is a large number. This can be used to save and restore the cursor position: > let save_cursor = getpos(".") MoveTheCursorAround @@ -5242,6 +5307,10 @@ character. E.g., a position within a or after the last character. + Note that for '< and '> changing the line number may result in + the marks to be effectively be swapped, so that '< is always + before '>. + Returns 0 when the position could be set, -1 otherwise. An error message is given if {expr} is invalid. @@ -5300,6 +5369,8 @@ *setreg()* setreg({regname}, {value} [,{options}]) Set the register {regname} to {value}. + {value} may be any value returned by |getreg()|, including + a |List|. If {options} contains "a" or {regname} is upper case, then the value is appended. {options} can also contain a register type specification: @@ -5312,10 +5383,15 @@ in the longest line (counting a as 1 character). If {options} contains no register settings, then the default - is to use character mode unless {value} ends in a . - Setting the '=' register is not possible, but you can use > - :let @= = var_expr -< Returns zero for success, non-zero for failure. + is to use character mode unless {value} ends in a for + string {value} and linewise mode for list {value}. Blockwise + mode is never selected automatically. + Returns zero for success, non-zero for failure. + + *E883* + Note: you may not use |List| containing more then one item to + set search and expression registers. Lists containing no + items act like empty strings. Examples: > :call setreg(v:register, @*) @@ -5323,8 +5399,11 @@ :call setreg('a', "1\n2\n3", 'b5') < This example shows using the functions to save and restore a - register. > - :let var_a = getreg('a', 1) + register (note: you may not reliably restore register value + without using the third argument to |getreg()| as without it + newlines are represented as newlines AND Nul bytes are + represented as newlines as well, see |NL-used-for-Nul|). > + :let var_a = getreg('a', 1, 1) :let var_amode = getregtype('a') .... :call setreg('a', var_a, var_amode) @@ -5390,6 +5469,7 @@ < This results in a directory listing for the file under the cursor. Example of use with |system()|: > :call system("chmod +w -- " . shellescape(expand("%"))) +< See also |::S|. shiftwidth() *shiftwidth()* @@ -5449,20 +5529,26 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702* - Sort the items in {list} in-place. Returns {list}. If you - want a list to remain unmodified make a copy first: > + Sort the items in {list} in-place. Returns {list}. + + If you want a list to remain unmodified make a copy first: > :let sortedlist = sort(copy(mylist)) < Uses the string representation of each item to sort on. Numbers sort after Strings, |Lists| after Numbers. For sorting text in the current buffer use |:sort|. + When {func} is given and it is one then case is ignored. - {dict} is for functions with the "dict" attribute. It will be - used to set the local variable "self". |Dictionary-function| When {func} is a |Funcref| or a function name, this function is called to compare items. The function is invoked with two items as argument and must return zero if they are equal, 1 or bigger if the first one sorts after the second one, -1 or smaller if the first one sorts before the second one. + + {dict} is for functions with the "dict" attribute. It will be + used to set the local variable "self". |Dictionary-function| + + Also see |uniq()|. + Example: > func MyCompare(i1, i2) return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1 @@ -5604,7 +5690,7 @@ strdisplaywidth({expr}[, {col}]) *strdisplaywidth()* The result is a Number, which is the number of display cells - String {expr} occupies on the screen. + String {expr} occupies on the screen when it starts a {col}. When {col} is omitted zero is used. Otherwise it is the screen column where to start. This matters for Tab characters. @@ -5729,12 +5815,23 @@ Ambiguous, this function's return value depends on 'ambiwidth'. Also see |strlen()|, |strdisplaywidth()| and |strchars()|. -submatch({nr}) *submatch()* +submatch({nr}[, {list}]) *submatch()* Only for an expression in a |:substitute| command or substitute() function. Returns the {nr}'th submatch of the matched text. When {nr} is 0 the whole matched text is returned. + Note that a NL in the string can stand for a line break of a + multi-line match or a NUL character in the text. Also see |sub-replace-expression|. + + If {list} is present and non-zero then submatch() returns + a list of strings, similar to |getline()| with two arguments. + NL characters in the text represent NUL characters in the + text. + Only returns more than one item for |:substitute|, inside + |substitute()| this list will always contain one or zero + items, since there are no real line breaks. + Example: > :s/\d\+/\=submatch(0) + 1/ < This finds the first number in the line and adds one to it. @@ -5867,23 +5964,36 @@ valid positions. system({expr} [, {input}]) *system()* *E677* - Get the output of the shell command {expr}. - When {input} is given, this string is written to a file and - passed as stdin to the command. The string is written as-is, - you need to take care of using the correct line separators - yourself. Pipes are not used. - Note: Use |shellescape()| to escape special characters in a - command argument. Newlines in {expr} may cause the command to - fail. The characters in 'shellquote' and 'shellxquote' may - also cause trouble. + Get the output of the shell command {expr} as a string. See + |systemlist()| to get the output as a List. + + When {input} is given and is a string this string is written + to a file and passed as stdin to the command. The string is + written as-is, you need to take care of using the correct line + separators yourself. + If {input} is given and is a |List| it is written to the file + in a way |writefile()| does with {binary} set to "b" (i.e. + with a newline between each list item with newlines inside + list items converted to NULs). + Pipes are not used. + + Note: Use |shellescape()| or |::S| with |expand()| or + |fnamemodify()| to escape special characters in a command + argument. Newlines in {expr} may cause the command to fail. + The characters in 'shellquote' and 'shellxquote' may also + cause trouble. This is not to be used for interactive commands. The result is a String. Example: > :let files = system("ls " . shellescape(expand('%:h'))) + :let files = system('ls ' . expand('%:h:S')) < To make the result more system-independent, the shell output is filtered to replace with for Macintosh, and with for DOS-like systems. + To avoid the string being truncated at a NUL, all NUL + characters are replaced with SOH (0x01). + The command executed is constructed using several options: 'shell' 'shellcmdflag' 'shellxquote' {expr} 'shellredir' {tmp} 'shellxquote' ({tmp} is an automatically generated file name). @@ -5903,6 +6013,16 @@ Use |:checktime| to force a check. +systemlist({expr} [, {input}]) *systemlist()* + Same as |system()|, but returns a |List| with lines (parts of + output separated by NL) with NULs transformed into NLs. Output + is the same as |readfile()| will output with {binary} argument + set to "b". + + Returns an empty string on error, so be careful not to run + into |E706|. + + tabpagebuflist([{arg}]) *tabpagebuflist()* The result is a |List|, where each item is the number of the buffer associated with each window in the current tab page. @@ -5925,7 +6045,7 @@ The number can be used with the |:tab| command. -tabpagewinnr({tabarg}, [{arg}]) *tabpagewinnr()* +tabpagewinnr({tabarg} [, {arg}]) *tabpagewinnr()* Like |winnr()| but for tab page {tabarg}. {tabarg} specifies the number of tab page to be used. {arg} is used like with |winnr()|: @@ -6125,6 +6245,14 @@ blocks. Each item may again have an "alt" item. +uniq({list} [, {func} [, {dict}]]) *uniq()* *E882* + Remove second and succeeding copies of repeated adjacent + {list} items in-place. Returns {list}. If you want a list + to remain unmodified make a copy first: > + :let newlist = uniq(copy(mylist)) +< The default compare function uses the string representation of + each item. For the use of {func} and {dict} see |sort()|. + values({dict}) *values()* Return a |List| with all the values of {dict}. The |List| is in arbitrary order. @@ -6327,13 +6455,23 @@ Example: > :if has("gui_running") < *has-patch* -3. Included patches. First check |v:version| for the version of Vim. - Then the "patch123" feature means that patch 123 has been included for - this version. Example (checking version 6.2.148 or later): > +3. Included patches. The "patch123" feature means that patch 123 has been + included. Note that this form does not check the version of Vim, you need + to inspect |v:version| for that. + Example (checking version 6.2.148 or later): > :if v:version > 602 || v:version == 602 && has("patch148") -< Note that it's possible for patch 147 to be omitted even though 148 is +< Note that it's possible for patch 147 to be omitted even though 148 is included. +4. Beyond a certain version or at a certain version and including a specific + patch. The "patch-7.4.123" feature means that the Vim version is 7.5 or + later, or it is version 7.4 and patch 123 was included. + The example above can be simplified to: > + :if has("patch-6.2.148") +< Note that it's possible for patch 147 to be omitted even though 148 is + included. + +acl Compiled with |ACL| support. all_builtin_terms Compiled with all builtin terminals enabled. amiga Amiga version of Vim. arabic Compiled with Arabic support |Arabic|. @@ -6500,7 +6638,9 @@ writebackup Compiled with 'writebackup' default on. xfontset Compiled with X fontset support |xfontset|. xim Compiled with X input method support |xim|. -xpm_w32 Compiled with pixmap support for Win32. +xpm Compiled with pixmap support. +xpm_w32 Compiled with pixmap support for Win32. (Only for + backward compatibility. Use "xpm" instead.) xsmp Compiled with X session management support. xsmp_interact Compiled with interactive X session management support. xterm_clipboard Compiled with support for xterm clipboard. @@ -6577,7 +6717,8 @@ :fu[nction][!] {name}([arguments]) [range] [abort] [dict] Define a new function by the name {name}. The name must be made of alphanumeric characters and '_', and - must start with a capital or "s:" (see above). + must start with a capital or "s:" (see above). When + using a capital "g:" be prepended. {name} can also be a |Dictionary| entry that is a |Funcref|: > @@ -6596,7 +6737,7 @@ For the {arguments} see |function-argument|. - *a:firstline* *a:lastline* + *:func-range* *a:firstline* *a:lastline* When the [range] argument is added, the function is expected to take care of a range itself. The range is passed as "a:firstline" and "a:lastline". If [range] @@ -6605,10 +6746,10 @@ of each line. See |function-range-example|. The cursor is still moved to the first line of the range, as is the case with all Ex commands. - + *:func-abort* When the [abort] argument is added, the function will abort as soon as an error is detected. - + *:func-dict* When the [dict] argument is added, the function must be invoked through an entry in a |Dictionary|. The local variable "self" will then be set to the @@ -7270,6 +7411,8 @@ {pattern}, so long as it does not have a special meaning (e.g., '|' or '"') and doesn't occur inside {pattern}. + Information about the exception is available in + |v:exception|. Also see |throw-variables|. NOTE: It is not reliable to ":catch" the TEXT of an error message because it may vary in different locales. @@ -7413,13 +7556,22 @@ for Vim commands, |shellescape()| for |:!| commands. Examples: > :execute "e " . fnameescape(filename) - :execute "!ls " . shellescape(expand('%:h'), 1) + :execute "!ls " . shellescape(filename, 1) < Note: The executed string may be any command-line, but - you cannot start or end a "while", "for" or "if" - command. Thus this is illegal: > - :execute 'while i > 5' - :execute 'echo "test" | break' + starting or ending "if", "while" and "for" does not + always work, because when commands are skipped the + ":execute" is not evaluated and Vim loses track of + where blocks start and end. Also "break" and + "continue" should not be inside ":execute". + This example does not work, because the ":execute" is + not evaluated and Vim does not see the "while", and + gives an error for finding an ":endwhile": > + :if 0 + : execute 'while i > 5' + : echo "test" + : endwhile + :endif < It is allowed to have a "while" or "if" command completely in the executed string: > diff -Nru vim-7.4a.012/runtime/doc/evim-ja.UTF-8.1 vim-7.4.273/runtime/doc/evim-ja.UTF-8.1 --- vim-7.4a.012/runtime/doc/evim-ja.UTF-8.1 1970-01-01 00:00:00.000000000 +0000 +++ vim-7.4.273/runtime/doc/evim-ja.UTF-8.1 2014-04-29 18:04:09.000000000 +0000 @@ -0,0 +1,51 @@ +.TH EVIM 1 "2002 February 16" +.SH 名前 +evim \- easy Vim, モードレスエディタ Vim +.SH 書式 +.br +.B evim +[options] [file ..] +.br +.B eview +.SH 説明 +.B eVim +は +.B Vim +を起動して、モードレスエディタとして動作するためのオプションを設定します。 +Vim の動作が point-and-click エディタのような動作になります。 +MS-Windows のメモ帳のような動作です。 +.B eVim +は常に GUI で起動し、メニューとツールバーを表示します。 +.PP +どうしても Vim の操作に馴染めない場合に使ってください。 +編集効率は下がります。 +.PP +.B eview +は同様に、読み込み専用モードで起動します。evim \-R と同じです。 +.PP +引数や Vim についての詳細は vim(1) を参照してください。 +.PP +オプション 'insertmode' が設定され、テキストを直接、入力できるようになりま +す。 +.br +コピーとペーストのキー操作が MS-Windows と同じになるように、マップが設定され +ます。 +CTRL-X が切り取り、CTRL-C がコピー、CTRL-V がペーストです。 +標準の CTRL-V の操作は CTRL-Q に割り当てられます。 +.SH オプション +vim(1) を参照してください。 +.SH ファイル +.TP 15 +/usr/local/lib/vim/evim.vim +eVim の初期化スクリプト。 +.SH 別名 +evim は "gumbies のための Vim" とも呼ばれています。 +evim を使っているあなたはきっと、頭にハンカチをかぶっているのです。 +(訳注: gumbies は Monty Python に登場するおもしろ集団。ハンカチをかぶっ +ている。) +.SH 関連項目 +vim(1) +.SH 著者 +.B Vim +のほとんどの機能は Bram Moolenaar が開発し、多くの人が協力しました。 +メニューの Help/Credits を参照してください。 diff -Nru vim-7.4a.012/runtime/doc/farsi.txt vim-7.4.273/runtime/doc/farsi.txt --- vim-7.4a.012/runtime/doc/farsi.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/farsi.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*farsi.txt* For Vim version 7.4a. Last change: 2010 Aug 07 +*farsi.txt* For Vim version 7.4. Last change: 2010 Aug 07 VIM REFERENCE MANUAL by Mortaza Ghassab Shiran diff -Nru vim-7.4a.012/runtime/doc/filetype.txt vim-7.4.273/runtime/doc/filetype.txt --- vim-7.4a.012/runtime/doc/filetype.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/filetype.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 7.4a. Last change: 2013 May 25 +*filetype.txt* For Vim version 7.4. Last change: 2013 Dec 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -447,23 +447,25 @@ %% insert a single '%' character %d insert the date from above %u insert the user from above + %p insert result of b:changelog_entry_prefix %c where to position cursor when done - The default is "%d %u\n\n\t* %c\n\n", which produces + The default is "%d %u\n\n\t* %p%c\n\n", which produces something like (| is where cursor will be, unless at the start of the line where it denotes the beginning of the line) > |2003-01-14 Full Name | - | * | + | * prefix| < g:changelog_new_entry_format The format used when creating a new entry. The following table describes special tokens in the string: + %p insert result of b:changelog_entry_prefix %c where to position cursor when done The default is "\t*%c", which produces something similar to > - | * | + | * prefix| < g:changelog_date_entry_search The search pattern to use when searching for a diff -Nru vim-7.4a.012/runtime/doc/fold.txt vim-7.4.273/runtime/doc/fold.txt --- vim-7.4a.012/runtime/doc/fold.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/fold.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*fold.txt* For Vim version 7.4a. Last change: 2010 May 13 +*fold.txt* For Vim version 7.4. Last change: 2013 Dec 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -285,9 +285,10 @@ *zd* *E351* zd Delete one fold at the cursor. When the cursor is on a folded line, that fold is deleted. Nested folds are moved one level - up. In Visual mode all folds (partially) in the selected area - are deleted. Careful: This easily deletes more folds than you - expect and there is no undo. + up. In Visual mode one level of all folds (partially) in the + selected area are deleted. + Careful: This easily deletes more folds than you expect and + there is no undo for manual folding. This only works when 'foldmethod' is "manual" or "marker". Also see |fold-delete-marker|. diff -Nru vim-7.4a.012/runtime/doc/ft_ada.txt vim-7.4.273/runtime/doc/ft_ada.txt --- vim-7.4a.012/runtime/doc/ft_ada.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/ft_ada.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*ft_ada.txt* For Vim version 7.4a. Last change: 2010 Jul 20 +*ft_ada.txt* For Vim version 7.4. Last change: 2010 Jul 20 ADA FILE TYPE PLUG-INS REFERENCE MANUAL~ diff -Nru vim-7.4a.012/runtime/doc/ft_sql.txt vim-7.4.273/runtime/doc/ft_sql.txt --- vim-7.4a.012/runtime/doc/ft_sql.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/ft_sql.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*ft_sql.txt* For Vim version 7.4a. Last change: 2013 May 15 +*ft_sql.txt* For Vim version 7.4. Last change: 2013 May 15 by David Fishburn diff -Nru vim-7.4a.012/runtime/doc/gui.txt vim-7.4.273/runtime/doc/gui.txt --- vim-7.4a.012/runtime/doc/gui.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/gui.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*gui.txt* For Vim version 7.4a. Last change: 2013 Jun 12 +*gui.txt* For Vim version 7.4. Last change: 2014 Mar 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -133,6 +133,7 @@ :winp[os] Display current position of the top left corner of the GUI vim window in pixels. Does not work in all versions. + Also see |getwinposx()| and |getwinposy()|. :winp[os] {X} {Y} *E466* Put the GUI vim window at the given {X} and {Y} coordinates. @@ -151,8 +152,11 @@ option. If you are running the X Window System, you can get information about the -window Vim is running in with this command: > +window Vim is running in with these commands: > :!xwininfo -id $WINDOWID + :!xprop -id $WINDOWID + :execute '!xwininfo -id ' . v:windowid + :execute '!xprop -id ' . v:windowid < *gui-IME* *iBus* Input methods for international characters in X that rely on the XIM diff -Nru vim-7.4a.012/runtime/doc/gui_w16.txt vim-7.4.273/runtime/doc/gui_w16.txt --- vim-7.4a.012/runtime/doc/gui_w16.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/gui_w16.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*gui_w16.txt* For Vim version 7.4a. Last change: 2005 Mar 29 +*gui_w16.txt* For Vim version 7.4. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff -Nru vim-7.4a.012/runtime/doc/gui_w32.txt vim-7.4.273/runtime/doc/gui_w32.txt --- vim-7.4a.012/runtime/doc/gui_w32.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/gui_w32.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*gui_w32.txt* For Vim version 7.4a. Last change: 2012 Aug 04 +*gui_w32.txt* For Vim version 7.4. Last change: 2012 Aug 04 VIM REFERENCE MANUAL by Bram Moolenaar diff -Nru vim-7.4a.012/runtime/doc/gui_x11.txt vim-7.4.273/runtime/doc/gui_x11.txt --- vim-7.4a.012/runtime/doc/gui_x11.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/gui_x11.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*gui_x11.txt* For Vim version 7.4a. Last change: 2011 Sep 14 +*gui_x11.txt* For Vim version 7.4. Last change: 2014 Mar 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -442,7 +442,7 @@ *gui-x11-kde* There is no KDE version of Vim. There has been some work on a port using the Qt toolkit, but it never worked properly and it has been abandoned. Work -continues on Yzis: www.yzis.org. +continues on Yzis: https://github.com/chrizel/Yzis. ============================================================================== 8. Compiling *gui-x11-compiling* diff -Nru vim-7.4a.012/runtime/doc/hangulin.txt vim-7.4.273/runtime/doc/hangulin.txt --- vim-7.4a.012/runtime/doc/hangulin.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/hangulin.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*hangulin.txt* For Vim version 7.4a. Last change: 2009 Jun 24 +*hangulin.txt* For Vim version 7.4. Last change: 2009 Jun 24 VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam diff -Nru vim-7.4a.012/runtime/doc/hebrew.txt vim-7.4.273/runtime/doc/hebrew.txt --- vim-7.4a.012/runtime/doc/hebrew.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/hebrew.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*hebrew.txt* For Vim version 7.4a. Last change: 2007 Jun 14 +*hebrew.txt* For Vim version 7.4. Last change: 2007 Jun 14 VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem) diff -Nru vim-7.4a.012/runtime/doc/helphelp.txt vim-7.4.273/runtime/doc/helphelp.txt --- vim-7.4a.012/runtime/doc/helphelp.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/helphelp.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 7.4a. Last change: 2012 Nov 28 +*helphelp.txt* For Vim version 7.4. Last change: 2012 Nov 28 VIM REFERENCE MANUAL by Bram Moolenaar diff -Nru vim-7.4a.012/runtime/doc/help.txt vim-7.4.273/runtime/doc/help.txt --- vim-7.4a.012/runtime/doc/help.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/help.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*help.txt* For Vim version 7.4a. Last change: 2012 Dec 06 +*help.txt* For Vim version 7.4. Last change: 2012 Dec 06 VIM - main help file k diff -Nru vim-7.4a.012/runtime/doc/howto.txt vim-7.4.273/runtime/doc/howto.txt --- vim-7.4a.012/runtime/doc/howto.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/howto.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*howto.txt* For Vim version 7.4a. Last change: 2006 Apr 02 +*howto.txt* For Vim version 7.4. Last change: 2006 Apr 02 VIM REFERENCE MANUAL by Bram Moolenaar diff -Nru vim-7.4a.012/runtime/doc/if_cscop.txt vim-7.4.273/runtime/doc/if_cscop.txt --- vim-7.4a.012/runtime/doc/if_cscop.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/if_cscop.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*if_cscop.txt* For Vim version 7.4a. Last change: 2011 Jun 12 +*if_cscop.txt* For Vim version 7.4. Last change: 2011 Jun 12 VIM REFERENCE MANUAL by Andy Kahn diff -Nru vim-7.4a.012/runtime/doc/if_lua.txt vim-7.4.273/runtime/doc/if_lua.txt --- vim-7.4a.012/runtime/doc/if_lua.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/if_lua.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*if_lua.txt* For Vim version 7.4a. Last change: 2012 Jun 29 +*if_lua.txt* For Vim version 7.4. Last change: 2013 Sep 04 VIM REFERENCE MANUAL by Luis Carvalho @@ -135,7 +135,7 @@ < vim.funcref({name}) Returns a Funcref to function {name} (see |Funcref|). It is equivalent to Vim's - "function". + "function". NOT IMPLEMENTED YET vim.buffer([arg]) If "arg" is a number, returns buffer with number "arg" in the buffer list or, if "arg" diff -Nru vim-7.4a.012/runtime/doc/if_mzsch.txt vim-7.4.273/runtime/doc/if_mzsch.txt --- vim-7.4a.012/runtime/doc/if_mzsch.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/if_mzsch.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*if_mzsch.txt* For Vim version 7.4a. Last change: 2012 Dec 17 +*if_mzsch.txt* For Vim version 7.4. Last change: 2012 Dec 17 VIM REFERENCE MANUAL by Sergey Khorev diff -Nru vim-7.4a.012/runtime/doc/if_ole.txt vim-7.4.273/runtime/doc/if_ole.txt --- vim-7.4a.012/runtime/doc/if_ole.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/if_ole.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*if_ole.txt* For Vim version 7.4a. Last change: 2008 Aug 16 +*if_ole.txt* For Vim version 7.4. Last change: 2008 Aug 16 VIM REFERENCE MANUAL by Paul Moore diff -Nru vim-7.4a.012/runtime/doc/if_perl.txt vim-7.4.273/runtime/doc/if_perl.txt --- vim-7.4a.012/runtime/doc/if_perl.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/if_perl.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*if_perl.txt* For Vim version 7.4a. Last change: 2012 Oct 25 +*if_perl.txt* For Vim version 7.4. Last change: 2013 Oct 05 VIM REFERENCE MANUAL by Sven Verdoolaege diff -Nru vim-7.4a.012/runtime/doc/if_pyth.txt vim-7.4.273/runtime/doc/if_pyth.txt --- vim-7.4a.012/runtime/doc/if_pyth.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/if_pyth.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 7.4a. Last change: 2013 Jun 28 +*if_pyth.txt* For Vim version 7.4. Last change: 2013 Jul 10 VIM REFERENCE MANUAL by Paul Moore @@ -23,6 +23,7 @@ |+python| feature. The Python 3 interface is available only when Vim was compiled with the |+python3| feature. +Both can be available at the same time, but read |python-2-and-3|. ============================================================================== 1. Commands *python-commands* @@ -711,7 +712,7 @@ 3. Python 3 support only (-python, +python3 or +python3/dyn) 4. Python 2 and 3 support (+python/dyn, +python3/dyn) -Some more details on the special case 4: +Some more details on the special case 4: *python-2-and-3* When Python 2 and Python 3 are both supported they must be loaded dynamically. diff -Nru vim-7.4a.012/runtime/doc/if_ruby.txt vim-7.4.273/runtime/doc/if_ruby.txt --- vim-7.4a.012/runtime/doc/if_ruby.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/if_ruby.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*if_ruby.txt* For Vim version 7.4a. Last change: 2012 Aug 02 +*if_ruby.txt* For Vim version 7.4. Last change: 2012 Aug 02 VIM REFERENCE MANUAL by Shugo Maeda diff -Nru vim-7.4a.012/runtime/doc/if_sniff.txt vim-7.4.273/runtime/doc/if_sniff.txt --- vim-7.4a.012/runtime/doc/if_sniff.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/if_sniff.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*if_sniff.txt* For Vim version 7.4a. Last change: 2005 Mar 29 +*if_sniff.txt* For Vim version 7.4. Last change: 2005 Mar 29 VIM REFERENCE MANUAL diff -Nru vim-7.4a.012/runtime/doc/if_tcl.txt vim-7.4.273/runtime/doc/if_tcl.txt --- vim-7.4a.012/runtime/doc/if_tcl.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/if_tcl.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*if_tcl.txt* For Vim version 7.4a. Last change: 2012 Aug 02 +*if_tcl.txt* For Vim version 7.4. Last change: 2012 Aug 02 VIM REFERENCE MANUAL by Ingo Wilken diff -Nru vim-7.4a.012/runtime/doc/indent.txt vim-7.4.273/runtime/doc/indent.txt --- vim-7.4a.012/runtime/doc/indent.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/indent.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*indent.txt* For Vim version 7.4a. Last change: 2013 Jun 13 +*indent.txt* For Vim version 7.4. Last change: 2013 Nov 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -545,10 +545,12 @@ (default 70 lines). *cino-#* - #N When N is non-zero recognize shell/Perl comments, starting with - '#'. Default N is zero: don't recognize '#' comments. Note - that lines starting with # will still be seen as preprocessor - lines. + #N When N is non-zero recognize shell/Perl comments starting with + '#', do not recognize preprocessor lines; allow right-shifting + lines that start with "#". + When N is zero (default): don't recognize '#' comments, do + recognize preprocessor lines; right-shifting lines that start + with "#" does not work. The defaults, spelled out in full, are: @@ -556,7 +558,7 @@ c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0 Vim puts a line in column 1 if: -- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'. +- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#0'. - It starts with a label (a keyword followed by ':', other than "case" and "default") and 'cinoptions' does not contain an 'L' entry with a positive value. @@ -581,8 +583,8 @@ Clojure indentation differs somewhat from traditional Lisps, due in part to the use of square and curly brackets, and otherwise by community convention. -These conventions are not always universally followed, so the Clojure indent -script offers a few configurable options, listed below. +These conventions are not universally followed, so the Clojure indent script +offers a few configurable options, listed below. If the current vim does not include searchpairpos(), the indent script falls back to normal 'lisp' indenting, and the following options are ignored. @@ -596,7 +598,6 @@ " Default let g:clojure_maxlines = 100 < - *g:clojure_fuzzy_indent* *g:clojure_fuzzy_indent_patterns* *g:clojure_fuzzy_indent_blacklist* @@ -650,7 +651,6 @@ let g:clojure_special_indent_words = \ 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn' < - *g:clojure_align_multiline_strings* Align subsequent lines in multiline strings to the column after the opening @@ -675,7 +675,28 @@ " Default let g:clojure_align_multiline_strings = 0 < + *g:clojure_align_subforms* +By default, parenthesized compound forms that look like function calls and +whose head subform is on its own line have subsequent subforms indented by +two spaces relative to the opening paren: +> + (foo + bar + baz) +< +Setting this option changes this behavior so that all subforms are aligned to +the same column, emulating the default behavior of clojure-mode.el: +> + (foo + bar + baz) +< +This option is off by default. +> + " Default + let g:clojure_align_subforms = 0 +< FORTRAN *ft-fortran-indent* diff -Nru vim-7.4a.012/runtime/doc/index.txt vim-7.4.273/runtime/doc/index.txt --- vim-7.4a.012/runtime/doc/index.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/index.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*index.txt* For Vim version 7.4a. Last change: 2013 Jun 21 +*index.txt* For Vim version 7.4. Last change: 2014 Mar 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1124,8 +1124,8 @@ |:cNfile| :cNf[ile] go to last error in previous file |:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode |:cabclear| :cabc[lear] clear all abbreviations for Command-line mode -|:caddbuffer| :caddb[uffer] add errors from buffer -|:caddexpr| :cad[dexpr] add errors from expr +|:caddbuffer| :cad[dbuffer] add errors from buffer +|:caddexpr| :cadde[xpr] add errors from expr |:caddfile| :caddf[ile] add error message to current quickfix list |:call| :cal[l] call a function |:catch| :cat[ch] part of a :try command @@ -1191,9 +1191,12 @@ |:digraphs| :dig[raphs] show or enter digraphs |:display| :di[splay] display registers |:djump| :dj[ump] jump to #define -|:dlist| :dl[ist] list #defines +|:dl| :dl short for |:delete| with the 'l' flag +|:dl| :del[ete]l short for |:delete| with the 'l' flag +|:dlist| :dli[st] list #defines |:doautocmd| :do[autocmd] apply autocommands to current buffer |:doautoall| :doautoa[ll] apply autocommands for all loaded buffers +|:dp| :d[elete]p short for |:delete| with the 'p' flag |:drop| :dr[op] jump to window editing file or edit file in current window |:dsearch| :ds[earch] list one #define @@ -1272,6 +1275,7 @@ |:keepalt| :keepa[lt] following command keeps the alternate file |:keepmarks| :kee[pmarks] following command keeps marks where they are |:keepjumps| :keepj[umps] following command keeps jumplist and marks +|:keeppatterns| :keepp[atterns] following command keeps search pattern history |:lNext| :lN[ext] go to previous entry in location list |:lNfile| :lNf[ile] go to last entry in previous file |:list| :l[ist] print lines @@ -1357,13 +1361,14 @@ |:nmenu| :nme[nu] add menu for Normal mode |:nnoremap| :nn[oremap] like ":noremap" but for Normal mode |:nnoremenu| :nnoreme[nu] like ":noremenu" but for Normal mode -|:noautocmd| :noa[utocmd] following command don't trigger autocommands +|:noautocmd| :noa[utocmd] following commands don't trigger autocommands |:noremap| :no[remap] enter a mapping that will not be remapped |:nohlsearch| :noh[lsearch] suspend 'hlsearch' highlighting |:noreabbrev| :norea[bbrev] enter an abbreviation that will not be remapped |:noremenu| :noreme[nu] enter a menu that will not be remapped |:normal| :norm[al] execute Normal mode commands +|:noswapfile| :nos[wapfile] following commands don't create a swap file |:number| :nu[mber] print lines with line number |:nunmap| :nun[map] like ":unmap" but for Normal mode |:nunmenu| :nunme[nu] remove menu for Normal mode diff -Nru vim-7.4a.012/runtime/doc/insert.txt vim-7.4.273/runtime/doc/insert.txt --- vim-7.4a.012/runtime/doc/insert.txt 2013-07-12 18:16:58.000000000 +0000 +++ vim-7.4.273/runtime/doc/insert.txt 2014-04-29 18:04:09.000000000 +0000 @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.4a. Last change: 2013 Jul 04 +*insert.txt* For Vim version 7.4. Last change: 2013 Jul 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1359,7 +1359,7 @@ Completion works in separate JavaScript files (&ft==javascript), inside of