Mike Williams wrote: > On 18/08/2010 10:09, Benjamin R. Haskell wrote: > > On Wed, 18 Aug 2010, Christian Brabandt wrote: > > > >> Hi Bram! > >> > >> On Mi, 18 Aug 2010, Bram Moolenaar wrote: > >> > >>> > >>> Christian Brabandt wrote: > >>> > >>>> On Mo, 16 Aug 2010, Christian Brabandt wrote: > >>>> > >>>>> Anyway, I noticed another problem. I cannot edit my .vimrc from > >>>>> within gvim. When writing it, gvim simply crashes. > >>>> > >>>> I found the problem. It can be reproduced on Windows using this > >>>> commandline: > >>>> > >>>> gvim -u NONE -U NONE -N -c "echo strftime('%a %Y\-%m\-%d %R')" > >>> > >>> Thanks for figuring that out. Perhaps someone knows how to fix it? > >>> Which gvim version is this with? > >> > >> As Benjamin said, it's %R and also %T that triggers it. My environment > >> is 32bit WinXP using the official built gvim73.exe from www.vim.org. > >> > >> BTW: a self compiled mingw-Version does not crash. It simply returns > >> the empty string for %R and %T > > > > Via the PHP caveats on strftime (non-)portability[1] that specifically > > mentioned %T and %R on Windows, I also found that %e and %D crash Vim. > > > > This seems to just be due to bad strftime() error-handling > > characteristics. '%0', '%.', and '%-' also crash it (probably any > > invalid format specifiers). > > > > Full list of valid format specifiers for the strftime provided by Visual > > Studio 2010 is at [2], if it's useful for debugging. > > It is by design in the recent VC CRT libraries (VS2005 onwards?) Any > unsupported format specifier will result in a crash. On Windows, or at > least builds that use recent VC CRT libraries, VIM needs to validate the > format string that it only contains supported format specifiers. I'm > guessing mingw is using older versions of the Windows CRT or has its own > version.
And what is the function provided to check for a valid format? -- >From "know your smileys": :-F Bucktoothed vampire with one tooth missing /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php