diff --git a/Filelist b/Filelist index 1134bbe4f6..4fa57b2525 100644 --- a/Filelist +++ b/Filelist @@ -694,7 +694,6 @@ EXTRA = \ src/tee/Makefile \ src/tee/Make_mvc.mak \ src/tee/tee.c \ - csdpmi4b.zip \ # generic language files LANG_GEN = \ diff --git a/csdpmi4b.zip b/csdpmi4b.zip deleted file mode 100755 index 211396fae1..0000000000 Binary files a/csdpmi4b.zip and /dev/null differ diff --git a/runtime/doc/os_msdos.txt b/runtime/doc/os_msdos.txt index bd996be0c3..662403ea07 100644 --- a/runtime/doc/os_msdos.txt +++ b/runtime/doc/os_msdos.txt @@ -1,276 +1,15 @@ -*os_msdos.txt* For Vim version 7.4. Last change: 2005 Mar 29 +*os_msdos.txt* For Vim version 7.4. Last change: 2016 Feb 26 VIM REFERENCE MANUAL by Bram Moolenaar *msdos* *ms-dos* *MSDOS* *MS-DOS* -This file contains the particularities for the MS-DOS version of Vim. +This file used to contain the particularities for the MS-DOS version of Vim. +MS-DOS support was removed in patch 7.4.1399. If you want to use it you will +need to get a version older than that. Note that the MS-DOS version doesn't +work, there is not enough memory. The DOS32 version (using DJGPP) might still +work on older systems. -1. Two versions for MS-DOS |msdos-versions| -2. Known problems |msdos-problems| -3. Long file names |msdos-longfname| -4. Termcap codes |msdos-termcap| -5. Shifted arrow keys |msdos-arrows| -6. Filename extensions |msdos-fname-extensions| -7. Memory usage and limitations |msdos-limitations| -8. Symbolically linked files |msdos-linked-files| -9. Copy/paste in a dos box |msdos-copy-paste| - -Additionally, there are a number of common Win32 and DOS items: -File locations |dos-locations| -Using backslashes |dos-backslash| -Standard mappings |dos-standard-mappings| -Screen output and colors |dos-colors| -File formats |dos-file-formats| -:cd command |dos-:cd| -Interrupting |dos-CTRL-Break| -Temp files |dos-temp-files| -Shell option default |dos-shell| - -For compiling Vim see src/INSTALL.pc. *msdos-compiling* - -============================================================================== -1. Two versions for MS-DOS *msdos-versions* - -There are two versions of Vim that can be used with MS-DOS machines: - - *dos16* -Dos16 version Can be used on any MS-DOS system, only uses up to 640 Kbyte of - memory. Also runs on OS/2, Windows 95, and NT. Excludes some - Vim-specific features (autocommands, syntax highlighting, - etc.). Recommended for use on pre-386 machines. - *dos32* -Dos32 version Requires 386 processor and a |DPMI| driver, uses all - available memory. Supports long file names and the Windows - clipboard, but NOT on Windows NT. Recommended for MS-DOS, - Windows 3.1 and Windows 95. - -There are also two versions that run under Windows: -Win32 version Requires Windows 95 or Windows NT, uses all available - memory, supports long file names, etc. Has some problems on - Windows 95. Recommended for Windows NT. See |os_win32.txt| -Win32 GUI Requirements like the Win32 version, but runs in its own - window, instead of a console. Has scrollbars, menu, etc. - Recommended for Windows 95 and Windows NT. See |gui-w32|. - -It is recommended to use the Dos32 or Win32 version. Although the Dos16 -version is able to edit very big files, it quickly runs out of memory when -making big changes. Disabling undo helps: ":set ul=-1". The screen updating -of the Dos16 version is the fastest of the three on DOS or Windows 95; on -Windows NT, the Win32 version is just as fast. - - *DPMI* -For the Dos32 version, you may need a DPMI driver when running in MS-DOS. If -you are running Windows or installed a clever memory manager, it will probably -work already. If you get the message "No DPMI", you need to install a DPMI -driver. Such a driver is included with the executable in CSDPMI4B.ZIP. Run -"cwsdpmi" just before starting Vim each time. Or you might want to include -"cwsdpmi -p" in your autoexec.bat to make it resident. The latest version of -"CSDPMI*.ZIP" can be obtained from: "ftp.neosoft.com:pub/users/s/sandmann". - - *minimal-features* -The 16 bit DOS version has been compiled with minimal features. Check the -|+feature-list| which ones are included (marked with a "T"). -You can include more features by editing feature.h and recompiling. - -============================================================================== -2. Known problems *msdos-problems* - -When using smartdrive (MS-DOS 6.x) with write-behind caching, it is possible -that Vim will try to create a swap file on a read-only file system (e.g. -write protected floppy). You will then be given the message > - A serious disk error has occurred .., Retry (r)? -There is nothing you can do but unprotect the floppy or switch off the -computer. Even CTRL-ALT-DEL will not get you out of this. This is really a -problem of smartdrive, not Vim. Smartdrive works fine otherwise. If this -bothers you, don't use the write-behind caching. - -Vim can't read swap files that have been opened already, unless the "share" -command has been used. If you see stray warnings for existing swap files, -include the "share" command in your config.sys or autoexec.bat (see your MSDOS -documentation). - -The Dos16 version can only have about 10 files open (in a window or hidden) at -one time. With more files you will get error messages when trying to read or -write a file, and for filter commands. Or Vim runs out of memory, and random -problems may result. - -The Dos32 version cannot have an unlimited number of files open at any one -time. The limit depends on the setting of FILES in your CONFIG.SYS. This -defaults to 15; if you need to edit a lot of files, you should increase this. -If you do not set FILES high enough, you can get strange errors, and shell -commands may cause a crash! - -The Dos32 version can work with long file names. When doing file name -completion, matches for the short file name will also be found. But this will -result in the corresponding long file name. For example, if you have the long -file name "this_is_a_test" with the short file name "this_i~1", the command -":e *1" will start editing "this_is_a_test". - -When using the Dos32 version and you run into problems with DPMI support, -check if there is a program in your config.sys that eats resources. One -program known to cause this problem is "netx", which says "NetWare v. 3.26 -Workstation shell". Replace it with version 3.32 to fix the problem. - -The Dos32 version will parse its arguments to handle quotation. This is good -to edit a file with spaces in its name, for example: > - vim "program files\accessories\ppp.scp" -A side effect is that single quotes are removed. Insert a backslash to avoid -that. For example, to edit the file "fi'le.txt": > - vim fi\'le.txt - -============================================================================== -3. Long file names *msdos-longfname* - -If the Dos32 version is run on Windows 95, it can use long file names. It -will work by default. If you want to disable this, use this setting: - set LFN=N -You can put this in your autoexec.bat file. - -Note: If you have installed DJGPP on your machine, you probably have a -"djgpp.env" file, which contains "LFN=n". You need to use "LFN=Y" to switch -on using long file names then. - -============================================================================== -4. Termcap codes *msdos-termcap* - -If you want to use another output method (e.g., when using a terminal on a COM -port), set the terminal name to "pcansi". You can change the termcap options -when needed (see |terminal-options|). Note that the -normal IBM ansi.sys does not support all the codes of the builtin pcansi -terminal. If you use ansi.sys, you will need to delete the termcap entries -t_al and t_dl with > - :set t_al= t_dl= -Otherwise, the screen will not be updated correctly. It is better to use -nansi.sys, nnansi.sys, or the like instead of ansi.sys. - -If you want to use Vim on a terminal connected to a COM: port, reset the -'bioskey' option. Otherwise the commands will be read from the PC keyboard. -CTRL-C and CTRL-P may not work correctly with 'bioskey' reset. - -============================================================================== -5. Shifted arrow keys *msdos-arrows* - -Use CTRL-arrow-left and CTRL-arrow-right instead of SHIFT-arrow-left and -SHIFT-arrow-right. The arrow-up and arrow-down cannot be used with SHIFT or -CTRL. - -============================================================================== -6. Filename extensions *msdos-fname-extensions* - -MS-DOS allows for only one file name extension. Therefore, when appending an -extension, the '.' in the original file name is replaced with a '_', the name -is truncated to 8 characters, and the new extension (e.g., ".swp") is -appended. Two examples: "test.c" becomes "test_c.bak", "thisisat.est" -becomes "thisisat.bak". To reduce these problems, the default for -'backupext' is "~" instead of ".bak". The backup file for "thisisat.est" -then becomes "thisisat.es~". The 'shortname' option is not available, -because it would always be set. - -============================================================================== -7. Memory usage and limitations *msdos-limitations* - -A swap file is used to store most of the text. You should be able to edit -very large files. However, memory is used for undo and other things. If you -delete a lot of text, you can still run out of memory in the Dos16 version. - -If Vim gives an "Out of memory" warning, you should stop editing. The result -of further editing actions is unpredictable. Setting 'undolevels' to 0 saves -some memory. Running the maze macros on a big maze is guaranteed to run out -of memory, because each change is remembered for undo. In this case set -'undolevels' to a negative number. This will switch off undo completely. - - *msdos-clipboard-limits* -In the Dos32 version, extended memory is used to avoid these problems. -However, if you are using the clipboard, you can still run into memory -limitations because the Windows clipboard can only communicate with Vim using -Dos memory. This means that the largest amount of text that can be sent to -or received from the Windows clipboard is limited by how much free Dos memory -is available on your system. - -You can usually maximize the amount of available Dos memory by adding the -following lines to Dos's "config.sys" file: > - - DOS=HIGH,UMB - DEVICE=C:\WINDOWS\himem.sys - DEVICE=C:\WINDOWS\emm386.exe RAM - -Modifying config.sys in this way will also help to make more memory available -for the Dos16 version, if you are using that. - -In the Dos16 version the line length is limited to about 32000 characters. -When reading a file the lines are automatically split. But editing a line -in such a way that it becomes too long may give unexpected results. - -============================================================================== -8. Symbolically linked files *msdos-linked-files* - -When using Vim to edit a symbolically linked file on a unix NFS file server, -you may run into problems. When writing the file, Vim does not "write -through" the symlink. Instead, it deletes the symbolic link and creates a new -file in its place. - -On Unix, Vim is prepared for links (symbolic or hard). A backup copy of the -original file is made and then the original file is overwritten. This assures -that all properties of the file remain the same. On non-Unix systems, the -original file is renamed and a new file is written. Only the protection bits -are set like the original file. However, this doesn't work properly when -working on an NFS-mounted file system where links and other things exist. The -only way to fix this in the current version is not making a backup file, by -":set nobackup nowritebackup" |'writebackup'| - -A similar problem occurs when mounting a Unix filesystem through Samba or a -similar system. When Vim creates a new file it will get the default user ID -for the mounted file system. This may be different from the original user ID. -To avoid this set the 'backupcopy' option to "yes". - -============================================================================== -9. Copy/paste in a dos box *msdos-copy-paste* - - *E450* *E451* *E452* *E453* *E454* -The 32 bit version can copy/paste from/to the Windows clipboard directly. Use -the "* register. Large amounts of text can be copied this way, but it must be -possible to allocate memory for it, see |msdos-clipboard-limits|. When moving -text from one Vim to another, the type of the selection -(characterwise/linewise/blockwise) is passed on. - -In other versions, the following can be used. - -(posted to comp.editors by John Velman ) - -How to copy/paste text from/to vim in a dos box: - -1) To get VIM to run in a window, instead of full screen, press alt+enter. - This toggles back and forth between full screen and a dos window. - NOTE: In Windows 95 you must have the property "Fast Pasting" unchecked! - In the properties dialog box for the MS-DOS window, go to "MS-DOS - Prompt/Misc/Fast pasting" and make sure that it is NOT checked. - To make this permanent, change the properties for - "\windows\system\conagent.exe" (from Philip Nelson, unverified). - -2) To paste something _into_ Vim, put Vim in insert mode. - -3) Put the text you want to paste on the windows clipboard. - -4) Click the control box in the upper left of the Vim window. (This looks - like a big minus sign.) If you don't want to use the mouse, you can get - this with alt+spacebar. -5) On the resulting dropdown menu choose "Edit". -6) On the child dropdown menu choose "Paste". - -To copy something from the Vim window to the clipboard, - -1) Select the control box to get the control drop down menu. -2) Select "Edit". -3) Select "Mark". -4) Using either the keys or the mouse, select the part of the Vim window that - you want to copy. To use the keys, use the arrow keys, and hold down shift - to extend the selection. -5) When you've completed your selection, press 'enter'. The selection - is now in the windows clipboard. By the way, this can be any - rectangular selection, for example columns 4-25 in rows 7-10. It can - include anything in the VIM window: the output of a :!dir, for - example. vim:tw=78:ts=8:ft=help:norl: diff --git a/src/INSTALLpc.txt b/src/INSTALLpc.txt index 071ede44a2..31da97dc49 100644 --- a/src/INSTALLpc.txt +++ b/src/INSTALLpc.txt @@ -686,64 +686,13 @@ Or when using MinGW (as one line): 13. Windows 3.1x ================ -make -f Make_w16.mak 16 bit, Borland C++ 5.0 - -Warning: Be sure to use the right make.exe. It should be Borland make. - -You will almost certainly have to change the paths for libs and include files -in the Makefile. Look for "D:\BC5" and "ctl3dv2". You will get a number of -warnings which can be ignored ( _chmod, precompiled header files, and -"possibly incorrect assignment"). - -The makefile should also work for BC++ 4.0 and 4.5, but may need tweaking to -remove unsupported compiler & liker options. - -For making the Win32s version, you need Microsoft Visual C++ 4.1 OR EARLIER. -In MSVC 4.2 support for Win32s was dropped! Use this command: - nmake -f Make_mvc.mak GUI=yes +The Windows 3.1x support was removed in patch 7.4.1364. 14. MS-DOS ========== -Summary: -ren Make_bc3.mak Makefile; make 16 bit, Borland C++ and Turbo C++ -ren Make_tcc.mak Makefile; make 16 bit, Turbo C -make -f Make_djg.mak 32 bit, DJGPP 2.0 -make -f Make_bc5.mak 32 bit, Borland C++ 5.x (edit it to - define DOS) - -Warning: Be sure to use the right make.exe. Microsoft C make doesn't work; -Borland make only works with Make_bc3.mak, Make_bc5.mak and Make_tcc.mak; -DJGPP/GNU make must be used for Make_djg.mak. - -The Borland C++ compiler has been used to generate the MS-DOS executable; it -should work without problems. You will probably have to change the paths for -LIBPATH and INCLUDEPATH in the start of the Makefile. You will get two -warnings which can be ignored (one about _chmod and one about precompiled -header files). - -The "spawno" library by Ralf Brown was used in order to free memory when Vim -starts a shell or other external command. Only about 200 bytes are taken from -conventional memory. When recompiling get the spawno library from Simtel, -directory "msdos/c". It is called something like "spwno413.zip". Or follow -the instructions in the Makefile to remove the library. - -The Turbo C Makefile has not been tested much lately. It is included for those -that don't have C++. You may need to make a few changes to get it to work. - -DJGPP needs to be installed properly to compile Vim; you need a lot of things -before it works. When your setup is OK, Vim should compile with just one -warning (about an argument to signal()). - -Make_bc5.mak is for those that have Borland C++ 5.0 or later. At the top of -the file, there are some variables you can change to make either a 32-bit -Windows exe (GUI or console mode), or a 16-bit MS-DOS version. -NOTE: multi-byte support is broken in the Borland libraries, not everything -will work properly! Esp. handling multi-byte file names. - -If you get all kinds of strange error messages when compiling, try changing -the file format from "unix" to "dos". +The MS-DOS support was removed in patch 7.4.1399. 15. Installing after building from sources diff --git a/src/channel.c b/src/channel.c index e7ceb90c8a..209d9084ec 100644 --- a/src/channel.c +++ b/src/channel.c @@ -310,11 +310,14 @@ add_channel(void) } /* - * Return TRUE if "channel" has a callback. + * Return TRUE if "channel" has a callback and the associated job wasn't + * killed. */ static int -channel_has_callback(channel_T *channel) +channel_still_useful(channel_T *channel) { + if (channel->ch_job_killed && channel->ch_job == NULL) + return FALSE; return channel->ch_callback != NULL #ifdef CHANNEL_PIPES || channel->ch_part[PART_OUT].ch_callback != NULL @@ -325,12 +328,13 @@ channel_has_callback(channel_T *channel) /* * Close a channel and free all its resources if there is no further action - * possible, there is no callback to be invoked. + * possible, there is no callback to be invoked or the associated job was + * killed. */ void channel_may_free(channel_T *channel) { - if (!channel_has_callback(channel)) + if (!channel_still_useful(channel)) channel_free(channel); } @@ -1778,10 +1782,13 @@ channel_read(channel_T *channel, int part, char *func) break; /* did read everything that's available */ } - /* Reading a disconnection (readlen == 0), or an error. - * TODO: call error callback. */ + /* Reading a disconnection (readlen == 0), or an error. */ if (readlen <= 0) { + /* Do not give an error message, most likely the other end just + * exited. */ + ch_errors(channel, "%s(): Cannot read from channel", func); + /* Queue a "DETACH" netbeans message in the command queue in order to * terminate the netbeans session later. Do not end the session here * directly as we may be running in the context of a call to @@ -1792,7 +1799,6 @@ channel_read(channel_T *channel, int part, char *func) * -> gui event loop or select loop * -> channel_read() */ - ch_errors(channel, "%s(): Cannot read", func); msg = channel->ch_part[part].ch_mode == MODE_RAW || channel->ch_part[part].ch_mode == MODE_NL ? DETACH_MSG_RAW : DETACH_MSG_JSON; @@ -1804,12 +1810,6 @@ channel_read(channel_T *channel, int part, char *func) channel_close(channel, TRUE); if (channel->ch_nb_close_cb != NULL) (*channel->ch_nb_close_cb)(); - - if (len < 0) - { - ch_error(channel, "channel_read(): cannot read from channel"); - PERROR(_("E896: read from channel")); - } } #if defined(CH_HAS_GUI) && defined(FEAT_GUI_GTK) @@ -2193,7 +2193,7 @@ channel_parse_messages(void) while (channel != NULL) { - if (channel->ch_refcount == 0 && !channel_has_callback(channel)) + if (channel->ch_refcount == 0 && !channel_still_useful(channel)) { /* channel is no longer useful, free it */ channel_free(channel); diff --git a/src/eval.c b/src/eval.c index ec1424827c..99400c38a0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -7770,8 +7770,11 @@ job_free(job_T *job) # ifdef FEAT_CHANNEL if (job->jv_channel != NULL) { - /* The channel doesn't count as a references for the job, we need to - * NULL the reference when the job is freed. */ + /* The link from the channel to the job doesn't count as a reference, + * thus don't decrement the refcount of the job. The reference from + * the job to the channel does count the refrence, decrement it and + * NULL the reference. We don't set ch_job_killed, unreferencing the + * job doesn't mean it stops running. */ job->jv_channel->ch_job = NULL; channel_unref(job->jv_channel); } @@ -15180,7 +15183,14 @@ f_job_stop(typval_T *argvars UNUSED, typval_T *rettv UNUSED) if (mch_stop_job(job, arg) == FAIL) rettv->vval.v_number = 0; else + { rettv->vval.v_number = 1; + /* Assume that "hup" does not kill the job. */ + if (job->jv_channel != NULL && STRCMP(arg, "hup") != 0) + job->jv_channel->ch_job_killed = TRUE; + } + /* We don't try freeing the job, obviously the caller still has a + * reference to it. */ } } #endif diff --git a/src/structs.h b/src/structs.h index 09405871d6..9b4701bc88 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1376,6 +1376,8 @@ struct channel_S { job_T *ch_job; /* Job that uses this channel; this does not * count as a reference to avoid a circular * reference. */ + int ch_job_killed; /* TRUE when there was a job and it was killed + * or we know it died. */ int ch_refcount; /* reference count */ }; diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak index bfd624c512..66cf12f2e1 100644 --- a/src/testdir/Make_dos.mak +++ b/src/testdir/Make_dos.mak @@ -114,4 +114,4 @@ bench_re_freeze.out: bench_re_freeze.vim newtests: $(NEW_TESTS) .vim.res: - $(VIMPROG) -u NONE -U NONE -S runtest.vim $*.vim + $(VIMPROG) -u NONE $(NO_PLUGIN) -S runtest.vim $*.vim diff --git a/src/version.c b/src/version.c index dcf4546c4c..25f17eac05 100644 --- a/src/version.c +++ b/src/version.c @@ -763,6 +763,14 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1425, +/**/ + 1424, +/**/ + 1423, +/**/ + 1422, /**/ 1421, /**/