Re: patch 7.1a.001
Bram Moolenaar wrote: Chris Sutcliffe wrote: Hey All, Patch 7.1a.001 I managed to compile 7.1a from cvs yesterday. I went and did a cvs up to grab this patch and I am now getting this error: gui_w32.c:236: error: redefinition of `struct tagNMTTDISPINFOA' gui_w32.c:246: error: redefinition of `struct tagNMTTDISPINFOW' mingw32-make: *** [gobj/gui_w32.o] Error 1 I'm guessing it's not a result of this patch, since this patch did not affect gui_w32.c. Perhaps there was something changed in CVS (I notice the update grabbed a whole bunch of files)? I don't know what happened. When I checkout the files from CVS now I don't see a problem in gui_w32.c. Was this a temporary problem? I was able to get it to compile under cygwin using Make_cyg.mak GUI=yes by removing the two typedefs at line 236 and 247 in gui_w32.c. It would seem that the pre-processor doesn't recognise labels from a previous typedef, so the #ifndef LPNMTTDISPINFO test doesn't work as expected. Or it's something along those lines... Robert
Re: patch 7.1a.001
I was able to get it to compile under cygwin using Make_cyg.mak GUI=yes by removing the two typedefs at line 236 and 247 in gui_w32.c. It would seem that the pre-processor doesn't recognise labels from a previous typedef, so the #ifndef LPNMTTDISPINFO test doesn't work as expected. Or it's something along those lines... What I find interesting is that the #ifndef LPNMTTDISPINFO should have caught that LPNMTTDISPINFO was defined in commctrl.h which is included in gui_w48.c included prior to the #ifndef LPNMTTDISPINFO test. I managed to get it to compile by adding a #ifndef __GNUC__ (which should work with both MinGW and Cygwin) guard around lines 235 to 253 (see the attached patch). Cheers! Chris -- Chris Sutcliffe http://ir0nh34d.googlepages.com http://ir0nh34d.blogspot.com http://emergedesktop.org gui_w32_mingw.patch Description: Binary data
Re: patch 7.1a.001
Redirecting to the vim-dev list... What I find interesting is that the #ifndef LPNMTTDISPINFO should have caught that LPNMTTDISPINFO was defined in commctrl.h which is included in gui_w48.c included prior to the #ifndef LPNMTTDISPINFO test. As far as I know this is not true because in /usr/include/commctrl.h (or /include/commctrl.h for mingw) the LPNMTTDISPINFO is a typedef and this can't be caught by the preprocessor (correct me if I'm wrong). This may be so, I'm not sure. I managed to get it to compile by adding a #ifndef __GNUC__ (which should work with both MinGW and Cygwin) guard around lines 235 to 253 (see the attached patch). I've tried this for mingw and it works. Maybe this is the better patch for this problem. Works for me on MinGW as well (haven't tried Cygwin). Cheers! Chris -- Chris Sutcliffe http://ir0nh34d.googlepages.com http://ir0nh34d.blogspot.com http://emergedesktop.org
Re: Where to find 7.1a patchlevels runtimes? (Was: patch 7.1a.001)
Tony Mechelynck wrote: Bram Moolenaar wrote: Patch 7.1a.001 Problem:Crash when downloading a spell file. (Szabolcs Horvat) Solution: Avoid that did_set_spelllang() is used recursively when a new window is opened for the download. Also avoid wiping out the wrong buffer. Files: runtime/autoload/spellfile.vim, src/buffer.c, src/ex_cmds.c, src/spell.c [...] After a little hunting, I found this patch on the ftp server too (with README, MD5 and MD5SUMS): ftp://ftp.vim.org/pub/vim/unstable/patches/7.1a/ That's right. Note: I prefer not to feed the email itself to the patch program, because: - my ISP's routers sometimes autoconvert the contents between 8-bit and quoted-printable; and the latter make the patch program choke; - if I see several patches published while I was away or asleep, by FTP I can get them all to where patch will find them. - the patch directory on FTP includes a table of contents, README I notice this patch modifies one runtime file. This reminds me that runtime updates are not always reflected in patches. Do the files in ftp://ftp.vim.org/pub/vim/runtime/ (and the equivalent rsync repository, ftp.nluug.nl::Vim/runtime/ ) apply to 7.0 only, or to both 7.0 and 7.1? (The latest changes there are for a large number of spelling dictionaries.) They are for both. There are no (recent) source code changes that are required for the updated runtime files. On thinking back, I would suspect they /aren't/ the same, since the first line of each helpfile mentions either 7.0 or 7.1a -- so at least the contents of the doc/ subfolders are different. So -- will runtime upgrades for 7.1 beta be always reflected in patches, or else will there be a runtime server -- and where? (ftp://pub/vim/unstable/runtime/ contains only one item yet: a softlink to the main spell subfolder.) There were runtime files here during the 7.0 beta testing, but I don't think they are useful now. Hm... I see a snapshot zip, http://ftp.vim.org/pub/vim/unstable/snapshot/vim-7.1a.zip ,but it's more than 24h older than the patch, while it's only about 2h younger than the 7.0.000 tar.gz and tar.bz2 archives so I guess it's 7.1a.000 in one big economy package... It's almost the same. I had trouble getting the CVS server updated, and this snapshot went together with that update. I don't think it adds anything now, it was for when there was no 7.0x release yet. -- hundred-and-one symptoms of being an internet addict: 77. The phone company asks you to test drive their new PBX system /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: patch 7.1a.001
Chris Sutcliffe wrote: Hey All, Patch 7.1a.001 I managed to compile 7.1a from cvs yesterday. I went and did a cvs up to grab this patch and I am now getting this error: gui_w32.c:236: error: redefinition of `struct tagNMTTDISPINFOA' gui_w32.c:246: error: redefinition of `struct tagNMTTDISPINFOW' mingw32-make: *** [gobj/gui_w32.o] Error 1 I'm guessing it's not a result of this patch, since this patch did not affect gui_w32.c. Perhaps there was something changed in CVS (I notice the update grabbed a whole bunch of files)? I don't know what happened. When I checkout the files from CVS now I don't see a problem in gui_w32.c. Was this a temporary problem? -- hundred-and-one symptoms of being an internet addict: 83. Batteries in the TV remote now last for months. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Where to find 7.1a patchlevels runtimes? (Was: patch 7.1a.001)
Bram Moolenaar wrote: Tony Mechelynck wrote: [...] I notice this patch modifies one runtime file. This reminds me that runtime updates are not always reflected in patches. Do the files in ftp://ftp.vim.org/pub/vim/runtime/ (and the equivalent rsync repository, ftp.nluug.nl::Vim/runtime/ ) apply to 7.0 only, or to both 7.0 and 7.1? (The latest changes there are for a large number of spelling dictionaries.) They are for both. There are no (recent) source code changes that are required for the updated runtime files. On thinking back, I would suspect they /aren't/ the same, since the first line of each helpfile mentions either 7.0 or 7.1a -- so at least the contents of the doc/ subfolders are different. So -- will runtime upgrades for 7.1 beta be always reflected in patches, or else will there be a runtime server -- and where? [...] Well, then for 7.1a I suppose I can use the same rsync command, but with --exclude=/doc/ in addition to --exclude=/dos/ so the new helpfiles (with 7.1a in the first line) won't all be replaced, and the :help version-7.1 section won't be deleted. This makes it (please remove spurious linebreaks added by my mailer or by yours, and correct me if I'm wrong) cd ~/.build/vim/vim71a rsync -avzcP --delete --exclude=/dos/ --exclude=/doc/ ftp.nluug.nl::Vim/runtime/ ./runtime/ 21 |tee rsync.log But won't this roll back the 7.1a.001 change in autoload/spellfile.vim ? Best regards, Tony. -- You can make it illegal, but you can't make it unpopular.
patch 7.1a.001
Patch 7.1a.001 Problem:Crash when downloading a spell file. (Szabolcs Horvat) Solution: Avoid that did_set_spelllang() is used recursively when a new window is opened for the download. Also avoid wiping out the wrong buffer. Files: runtime/autoload/spellfile.vim, src/buffer.c, src/ex_cmds.c, src/spell.c *** ../vim-7.1a.000/runtime/autoload/spellfile.vim Tue Aug 29 22:31:34 2006 --- runtime/autoload/spellfile.vim Sun May 6 23:52:05 2007 *** *** 1,6 Vim script to download a missing spell file Maintainer: Bram Moolenaar [EMAIL PROTECTED] ! Last Change:2006 Aug 29 if !exists('g:spellfile_URL') let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell' --- 1,6 Vim script to download a missing spell file Maintainer: Bram Moolenaar [EMAIL PROTECTED] ! Last Change:2007 May 06 if !exists('g:spellfile_URL') let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell' *** *** 58,76 let fname = a:lang . '.' . enc . '.spl' Split the window, read the file into a new buffer. new setlocal bin echo 'Downloading ' . fname . '...' call spellfile#Nread(fname) if getline(2) !~ 'VIMspell' Didn't work, perhaps there is an ASCII one. ! g/^/d let fname = a:lang . '.ascii.spl' echo 'Could not find it, trying ' . fname . '...' call spellfile#Nread(fname) if getline(2) !~ 'VIMspell' echo 'Sorry, downloading failed' ! bwipe! return endif endif --- 58,97 let fname = a:lang . '.' . enc . '.spl' Split the window, read the file into a new buffer. + Remember the buffer number, we check it below. new + let newbufnr = winbufnr(0) setlocal bin echo 'Downloading ' . fname . '...' call spellfile#Nread(fname) if getline(2) !~ 'VIMspell' Didn't work, perhaps there is an ASCII one. !Careful: Nread() may have opened a new window for the error message, !we need to go back to our own buffer and window. ! if newbufnr != winbufnr(0) ! let winnr = bufwinnr(newbufnr) ! if winnr == -1 ! Our buffer has vanished!? Open a new window. ! echomsg download buffer disappeared, opening a new one ! new ! setlocal bin ! else ! exe winnr . wincmd w ! endif ! endif ! if newbufnr == winbufnr(0) !We are back the old buffer, remove any (half-finished) download. ! g/^/d ! else ! let newbufnr = winbufnr(0) ! endif ! let fname = a:lang . '.ascii.spl' echo 'Could not find it, trying ' . fname . '...' call spellfile#Nread(fname) if getline(2) !~ 'VIMspell' echo 'Sorry, downloading failed' ! exe newbufnr . bwipe! return endif endif *** *** 96,112 let fname = substitute(fname, '\.spl$', '.sug', '') echo 'Downloading ' . fname . '...' call spellfile#Nread(fname) ! if getline(2) !~ 'VIMsug' ! echo 'Sorry, downloading failed' ! else 1d exe write . escape(dirlist[dirchoice], ' ') . '/' . fname endif - set nomod endif endif ! bwipe endif endfunc --- 117,145 let fname = substitute(fname, '\.spl$', '.sug', '') echo 'Downloading ' . fname . '...' call spellfile#Nread(fname) ! if getline(2) =~ 'VIMsug' 1d exe write . escape(dirlist[dirchoice], ' ') . '/' . fname + set nomod + else + echo 'Sorry, downloading failed' + Go back to our own buffer/window, Nread() may have taken us to + another window. + if newbufnr != winbufnr(0) + let winnr = bufwinnr(newbufnr) + if winnr != -1 + exe winnr . wincmd w + endif + endif + if newbufnr == winbufnr(0) + set nomod + endif endif endif endif ! Wipe out the buffer we used. ! exe newbufnr . bwipe endif endfunc *** ../vim-7.1a.000/src/buffer.cThu Mar 15 22:53:25 2007 --- src/buffer.cSun May 6 15:44:08 2007 *** *** 1426,1431 --- 1426,1438 if (curbuf-b_kmap_state KEYMAP_INIT) keymap_init(); #endif + #ifdef FEAT_SPELL + /* May need to set the spell language. Can only do this after the buffer + * has been properly setup. */ + if (!curbuf-b_help curwin-w_p_spell *curbuf-b_p_spl != NUL) + did_set_spelllang(curbuf); + #endif + redraw_later(NOT_VALID); } *** *** 2414,2424 /* Set 'foldlevel' to 'foldlevelstart' if it's not negative. */ if (p_fdls = 0) curwin-w_p_fdl = p_fdls; - #endif - - #ifdef FEAT_SPELL - if (curwin-w_p_spell *buf-b_p_spl
Where to find 7.1a patchlevels runtimes? (Was: patch 7.1a.001)
Bram Moolenaar wrote: Patch 7.1a.001 Problem:Crash when downloading a spell file. (Szabolcs Horvat) Solution: Avoid that did_set_spelllang() is used recursively when a new window is opened for the download. Also avoid wiping out the wrong buffer. Files: runtime/autoload/spellfile.vim, src/buffer.c, src/ex_cmds.c, src/spell.c [...] After a little hunting, I found this patch on the ftp server too (with README, MD5 and MD5SUMS): ftp://ftp.vim.org/pub/vim/unstable/patches/7.1a/ Note: I prefer not to feed the email itself to the patch program, because: - my ISP's routers sometimes autoconvert the contents between 8-bit and quoted-printable; and the latter make the patch program choke; - if I see several patches published while I was away or asleep, by FTP I can get them all to where patch will find them. - the patch directory on FTP includes a table of contents, README I notice this patch modifies one runtime file. This reminds me that runtime updates are not always reflected in patches. Do the files in ftp://ftp.vim.org/pub/vim/runtime/ (and the equivalent rsync repository, ftp.nluug.nl::Vim/runtime/ ) apply to 7.0 only, or to both 7.0 and 7.1? (The latest changes there are for a large number of spelling dictionaries.) On thinking back, I would suspect they /aren't/ the same, since the first line of each helpfile mentions either 7.0 or 7.1a -- so at least the contents of the doc/ subfolders are different. So -- will runtime upgrades for 7.1 beta be always reflected in patches, or else will there be a runtime server -- and where? (ftp://pub/vim/unstable/runtime/ contains only one item yet: a softlink to the main spell subfolder.) Hm... I see a snapshot zip, http://ftp.vim.org/pub/vim/unstable/snapshot/vim-7.1a.zip ,but it's more than 24h older than the patch, while it's only about 2h younger than the 7.0.000 tar.gz and tar.bz2 archives so I guess it's 7.1a.000 in one big economy package... Best regards, Tony. -- If you don't have a nasty obituary you probably didn't matter. -- Freeman Dyson
Re: patch 7.1a.001
Sent this direct to Bram by accident instead of to the dev list... Hey All, Patch 7.1a.001 I managed to compile 7.1a from cvs yesterday. I went and did a cvs up to grab this patch and I am now getting this error: gui_w32.c:236: error: redefinition of `struct tagNMTTDISPINFOA' gui_w32.c:246: error: redefinition of `struct tagNMTTDISPINFOW' mingw32-make: *** [gobj/gui_w32.o] Error 1 I'm guessing it's not a result of this patch, since this patch did not affect gui_w32.c. Perhaps there was something changed in CVS (I notice the update grabbed a whole bunch of files)? Chris -- Chris Sutcliffe http://ir0nh34d.googlepages.com http://ir0nh34d.blogspot.com http://emergedesktop.org