Re: www.vim.org looks like gone

2017-09-01 Fir de Conversatie Taro MURAOKA
> On Sep 1, 2017 11:22, "Taro MURAOKA"  wrote:
> Hi list and Bram.
> 
> 
> 
> When I try to access www.vim.org,
> 
> it returns 302 (redirect to) vim.sourceforge.io.
> 
> 
> 
> > $ curl -I http://www.vim.org
> 
> > HTTP/1.1 302 Found
> 
> > Server: nginx
> 
> > Date: Fri, 01 Sep 2017 15:16:22 GMT
> 
> > Content-Type: text/html; charset=iso-8859-1
> 
> > Connection: keep-alive
> 
> > Location: https://vim.sourceforge.io/
> 
> > Cache-Control: max-age=172800
> 
> > Expires: Sun, 03 Sep 2017 15:16:22 GMT
> 
> 
> 
> I know it is HTTPS version of www.vim.org.
> 
> But losing www.vim.org is not small impact.
> 
> 
> 
> Is this an expected result?
> 
> 
> Your misinterpreting the results. You got a 302 redirect, but curl doesn't 
> follow redirects by default. Use "curl -L" to enable following redirects.
> 
> 
> Cheers,
> James

It is not a my point.
The domain name "www.vim.org" is not displayed in the address bar of the 
browser.
I think that that is not a small problem.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


www.vim.org looks like gone

2017-09-01 Fir de Conversatie Taro MURAOKA
Hi list and Bram.

When I try to access www.vim.org,
it returns 302 (redirect to) vim.sourceforge.io.

> $ curl -I http://www.vim.org
> HTTP/1.1 302 Found
> Server: nginx
> Date: Fri, 01 Sep 2017 15:16:22 GMT
> Content-Type: text/html; charset=iso-8859-1
> Connection: keep-alive
> Location: https://vim.sourceforge.io/
> Cache-Control: max-age=172800
> Expires: Sun, 03 Sep 2017 15:16:22 GMT

I know it is HTTPS version of www.vim.org.
But losing www.vim.org is not small impact.

Is this an expected result?

Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 8.0.0187

2017-01-14 Fir de Conversatie Taro MURAOKA

> I'm building vim on Windows 7 with MinGW. After compiling the latest
> pull I get:
> 
> 
> [...]
> gobjZi686/if_ruby.o:if_ruby.c:(.text+0x862): undefined reference to 
> `ruby_sysinit'
> gobjZi686/if_ruby.o:if_ruby.c:(.text+0x23fa): undefined reference to 
> `ruby_sysinit'
> collect2.exe: error: ld returned 1 exit status
> make: *** [gvim.exe] Error 1
> Error by compiling gvim.exe
> 
> 
> Many thanks in advance,
> 
> -- 
> Cesar


I have wrote an attached patch to fix this.
Please try it.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 509d2f6..afa27ab 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -303,6 +303,7 @@ static void ruby_vim_init(void);
 # define ruby_init_loadpath		dll_ruby_init_loadpath
 # ifdef WIN3264
 #  define NtInitialize			dll_NtInitialize
+#  define ruby_sysinit			dll_ruby_sysinit
 #  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
 #   define rb_w32_snprintf		dll_rb_w32_snprintf
 #  endif
@@ -405,6 +406,7 @@ static void (*dll_ruby_init) (void);
 static void (*dll_ruby_init_loadpath) (void);
 # ifdef WIN3264
 static void (*dll_NtInitialize) (int*, char***);
+static void (*dll_ruby_sysinit) (int*, char***);
 #  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
 static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
 #  endif
@@ -594,13 +596,11 @@ static struct
 {"ruby_init", (RUBY_PROC*)&dll_ruby_init},
 {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
 # ifdef WIN3264
-{
 #  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19
-"NtInitialize",
+{"NtInitialize", (RUBY_PROC*)&dll_NtInitialize},
 #  else
-"ruby_sysinit",
+{"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit},
 #  endif
-			(RUBY_PROC*)&dll_NtInitialize},
 #  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
 {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
 #  endif


Re: Patch 7.4.2259

2016-08-27 Fir de Conversatie Taro MURAOKA
2016/8/27 17:22:49 UTC+9 Urtica dioica:
> I do like the idea for the feature. I tried it, it has some bugs, but they'll 
> get ironed out eventually.


I have the same problem.

Procedure to reproduce the problem is like this:

 1. With enabling 'incsearch'
 2. Enter search mode by hitting `/`
 3. Try to access search hitories by typing CTRL-P some times

Expected behavior (before 7.4.2259) is going for back search histories.
But actual behavior (after 7.4.2259) is show previous matches.

Of course I can access search histories by CTRL-P with 'noincsearch'.
But it looks like some kind of breaking changes.
So I think it would be better to change bindings for accessing histories
or showing next/previous matches.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vim] windows: compile failed with GETTEXT_DLL only. (#589)

2016-01-23 Fir de Conversatie Taro MURAOKA
Hi Bram and the list.

I have wrote a patch and make a PR for it.
https://github.com/vim/vim/pull/590
Please check this.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Windows 64bit build in 32bit command prompt

2015-11-29 Fir de Conversatie Taro MURAOKA
I wrote:
> We may be able to use "Platform" environment variable for this purpose.
> It get one of values: "x64", "X64", "X86" or "ARM" as cross compiling target,
> in all of VS10, 11, 12, 14 environments.


Hi Mike and Ken.


I have wrote a patch to use PLATFORM for this purpose.
Please try https://gist.github.com/koron/c51efe584d0b4e5686a4

Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Windows 64bit build in 32bit command prompt

2015-11-29 Fir de Conversatie Taro MURAOKA
I wrote:
> So we should try/find another way.

We may be able to use "Platform" environment variable for this purpose.
It get one of values: "x64", "X64", "X86" or "ARM" as cross compiling target,
in all of VS10, 11, 12, 14 environments.

You can see these variables at VC\bin\**\vcvars*.bat in each VS.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Windows 64bit build in 32bit command prompt

2015-11-29 Fir de Conversatie Taro MURAOKA
Mike Williams wrote
> Hi,
> 
> Just done my first build of VIM on an old Windows 7 32bit machine 
> upgraded to Windows 10 using VC.  The link stage was failing due to 
> mixed machine targets being used in the make file - 32 and 64 bit!  I 
> tracked this down to some fun with the PROCESSOR_ARCHITECTURE in a 32bit 
> prompt on a 64bit machine, see -

Sorry but I disapprove this.

Because PROCESSOR_ARCHITEW6432 is set "AMD64" on 64bit OS
when using 32bit compiler.
Therefore, we never be able to build 32bit binary on 64bit OS,
if this patch would be applied.

So we should try/find another way.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


workaround console problem on Windows 7

2015-09-19 Fir de Conversatie Taro MURAOKA
Hi list and Bram.


Continue from reported problem: 
https://groups.google.com/d/msg/vim_dev/G9KD895VTxw/ch5R5nqDBQAJ


Problem:

After 7.4.851, on Windows7, when using vim.exe with msys or msys2,
conhost.exe (console window provider on Windows7) will freeze or crash.
It can be reproduced by this like basic commands.

:r!cat somefile.txt

("cat" should be part of msys or msys2)
When executing this, vim looks like freeeze or crash.

I don't know the root cause of this, but I have discovered that
those host (conhost.exe) freezes or crashes
when execute a program of msys or msys2 from vim,
under the condition of vim's own screen buffer is active,


Solution:

Make original screen buffer active,
before executing external program on Windows 7.
And when the program is finished, revert to vim's one.


Patch: https://gist.github.com/koron/4cabff43767bca269792

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.867

2015-09-15 Fir de Conversatie Taro MURAOKA
Thank you so much!

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.866

2015-09-15 Fir de Conversatie Taro MURAOKA
This patch breaks Windows build.

Because, there are no "server_parse_messages" symbol defined for Windows.
It is used in misc2.c.

You could see failed log here:
https://ci.appveyor.com/project/koron/vim/build/19#L95

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.851

2015-09-05 Fir de Conversatie Taro MURAOKA
Hi list.

This patch (7.4.851) causes a problem with Windows 7.

It crashes test47 (not fail).

I built vim.exe using VS10 and 11 compiler,
and both of them crash on test47.

We vim-jp disscussing this at https://github.com/vim-jp/issues/issues/764
(sorry, disscussing in Japanese).
And Ken Takata is working on it.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Schedule for switching to github

2015-07-28 Fir de Conversatie Taro MURAOKA
I want to known the date to switch Vim's main repository to github.
AFAIK https://github.com/vim/vim is just "try out".

According to this blog 
http://google-opensource.blogspot.jp/2015/03/farewell-to-google-code.html
code.google.com will become readonly mode at August 24, 2015.

It remains less a month.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Visual Studio 2015 support

2015-07-21 Fir de Conversatie Taro MURAOKA
Hi Bram and list.

Visual Studio 2015 was released.
It have another version of nmake (14.00.23026.0), 
So I need this attached patch to compile vim with it.

Please check it.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  758fe8fd4bae94737337d3944a16112c7e590b28

diff -r 758fe8fd4bae -r f29b10f25389 src/Make_mvc.mak
--- a/src/Make_mvc.mak	Sun Jul 19 14:42:23 2015 +0200
+++ b/src/Make_mvc.mak	Tue Jul 21 21:57:12 2015 +0900
@@ -446,7 +446,7 @@
 !if "$(_NMAKE_VER)" == "12.00.21005.1"
 MSVCVER = 12.0
 !endif
-!if ("$(_NMAKE_VER)" == "14.00.22609.0") || ("$(_NMAKE_VER)" == "14.00.22816.0")
+!if ("$(_NMAKE_VER)" == "14.00.22609.0") || ("$(_NMAKE_VER)" == "14.00.22816.0") || ("$(_NMAKE_VER)" == "14.00.23026.0")
 MSVCVER = 14.0
 !endif
 !endif


Re: Patch 7.4.754

2015-06-28 Fir de Conversatie Taro MURAOKA
2015年6月26日金曜日 0時48分10秒 UTC+9 Bram Moolenaar:
> Ken Takata wrote:
> 
> > 2015/6/25 Thu 20:58:52 UTC+9 Bram Moolenaar wrote:
> > > Patch 7.4.754
> > > Problem:Using CTRL-A in Visual mode does not work well. (Gary Johnson)
> > > Solution:   Make it increment all numbers in the Visual area. (Christian
> > > Brabandt)
> > > Files:  runtime/doc/change.txt, src/normal.c, src/ops.c,
> > > src/proto/ops.pro, src/testdir/Make_amiga.mak,
> > > src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
> > > src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
> > > src/testdir/Makefile, src/testdir/test_increment.in,
> > > src/testdir/test_increment.ok
> > 
> > After this patch, CI on windows fails.
> > https://ci.appveyor.com/project/k-takata/vim-ci/build/313#L1676
> > 
> > 9,10c9,12
> > < foobar
> > < foobar-
> > ---
> > > foobar-11
> > > foobar-9
> > > 
> > > 
> > 23a26,29
> > > 9
> > > 19
> > > 29
> > > 39
> 
> It works fine on Linux, what could be different on MS-Windows?
> 


Hi Bram and Ken

I have wrote a patch to fix this.
Please check https://gist.github.com/koron/0d2cbab00c6b3eba7cf1


Best regards.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.754

2015-06-28 Fir de Conversatie Taro MURAOKA
2015年6月26日金曜日 0時48分10秒 UTC+9 Bram Moolenaar:
> It works fine on Linux, what could be different on MS-Windows?

It is caused by `initmappings` in getchar.c

https://github.com/vim-jp/vim/blob/318083ec08ce7b586ba564deccd0a59256e632d9/src/getchar.c#L5308-L5356

It should be unmapped or disabled for this test. 


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Preparations for moving to github

2015-03-24 Fir de Conversatie Taro MURAOKA
> I do have the tags in my local git repository.  Do they not get pushed
> to the repository with "git push" ?  v7-4-678 would be the last one that
> was imported, the patches after that I pushed from my git repository.

Please try "--tags" option to push.  Like this:

  $ git push --tags


Regards

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Google Code shuts down

2015-03-12 Fir de Conversatie Taro MURAOKA
I have a suggestion.

We should create/obtain an organization which have good simple name like "vim" 
on bitbucket/github, for accesibility and convenience of end-users.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Google Code shuts down

2015-03-12 Fir de Conversatie Taro MURAOKA
It is not difficult to migrate/sync the repository from mercurial to git.

We (vim-jp) have been maintaining a mirror on github already.

https://github.com/vim-jp/vim

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.619

2015-02-03 Fir de Conversatie Taro MURAOKA
Subject of this mail is wrong.
It would be "Patch 7.4.618".

And this patch is not in mercurial repo yet.
https://code.google.com/p/vim/source/list

Are there any relations?

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.539

2014-11-30 Fir de Conversatie Taro MURAOKA
This broke small and tiny builds.

Please check https://travis-ci.org/vim-jp/vim-ci/builds/42544356 for details

> ex_docmd.c:2132:22: error: use of undeclared identifier 'CMD_USER'
>if (ea.cmdidx != CMD_USER && ea.cmdidx != CMD_SIZE)

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Improve tests for mercurial repos on Windows

2014-09-25 Fir de Conversatie Taro MURAOKA
It seems very nice!

Thank you Ken.


2014年9月25日木曜日 21時50分47秒 UTC+9 Ken Takata:
> Hi Taro,
> 
> 2013/7/6 Sat 15:43:27 UTC+9 Taro MURAOKA wrote:
> > Hi list.
> > 
> > 
> > When using vim's mercurial repository on Windows,
> > executing tests has some problems and is very very very stressfull.
> > 
> >   * converting 'ff' of *.ok and *.in causes messy status for hg.
> >   * executing single test is failed often,
> > because of forgetting convert 'ff'.
> >   * debugging and modifing tests are not easy.  too many steps are
> > required.
> > 
> > To resolve these problems, I have changed most part of
> > src/testdir/Make_dos.mak.  What are changed:
> > 
> >   * Place converted files into temporary directory (dostmp).
> >   * Set dependencies between input, temporary and output files.
> >   * Use upper case letters for commands which derived from DOS.
> > 
> > As a result of these changes, we can execute tests very easily.
> > 
> >   $ nmake -f Make_dos.mak win32
> >   $ nmake -f Make_dos.mak test87.out
> >   $ hg status
> >   (nothing changed, when test was succeeded)
> > 
> > Please check an attached patch.
> > 
> > 
> > Best.
> 
> I think your patch is very useful, but I found an issue with it.
> When I wanted to run a test again, I used to delete the output then run
> the test.
> E.g.:
> 
> $ nmake -f Make_dos.mak test87.out
> $ del test87.out
> $ nmake -f Make_dos.mak test87.out
> 
> This doesn't work after applying your patch.
> (Actually, deleting dostmp\test87.out instead of test87.out works fine,
> but it is a little bit confusing.)
> 
> Attached patch is an additional patch to the Taro's patch.
> 
> Regards,
> Ken Takata

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: helptags failed because E888 are duplicated

2014-08-30 Fir de Conversatie Taro MURAOKA
> Related to 7.4.421
> 
> https://groups.google.com/d/msg/vim_dev/e95YWigigyQ/DMvHGRiAOo8J
> 
> New error code E888 was introduced.
> But it appears twice in doc/pattern.txt.
> 
> https://code.google.com/p/vim/source/browse/runtime/doc/pattern.txt#832
> https://code.google.com/p/vim/source/browse/runtime/doc/pattern.txt#841
> 
> It make trouble for :helptags command,
> it doesn't allow duplicated tag definitions.
> 
> 
> I don't know how to fix it.  Any idea?


I'm using this patch to avoid this problem:

https://bitbucket.org/koron/vim-kaoriya-patches/raw/340434b3c4f53ef88d3e7bda9b1eec9bbadb03c4/GH624-remove-duplicated-e888.diff

But, it is not good idea.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


helptags failed because E888 are duplicated

2014-08-30 Fir de Conversatie Taro MURAOKA
Related to 7.4.421

https://groups.google.com/d/msg/vim_dev/e95YWigigyQ/DMvHGRiAOo8J

New error code E888 was introduced.
But it appears twice in doc/pattern.txt.

https://code.google.com/p/vim/source/browse/runtime/doc/pattern.txt#832
https://code.google.com/p/vim/source/browse/runtime/doc/pattern.txt#841

It make trouble for :helptags command,
it doesn't allow duplicated tag definitions.


I don't know how to fix it.  Any idea?

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Exit when loaded invalid python 2.7

2014-07-20 Fir de Conversatie Taro MURAOKA
Taro MURAOKA:
> Hi.
> 
> 
> 
> > Is loading the "site" module done by all versions of Python, or was it
> 
> > added recently?
> 
> 
> 
> I don't think all version.
> 
> But as I can check, python 2.0-7 are loading the "site" module.
> 
> 
> 
> 2.0 - 
> http://svn.python.org/view/python/branches/release20-maint/Python/pythonrun.c?view=markup
> 
> 2.2 - 
> http://svn.python.org/view/python/branches/release22-maint/Python/pythonrun.c?view=markup
> 
> 2.6 - 
> http://svn.python.org/view/python/branches/release26-maint/Python/pythonrun.c?view=markup
> 
> 
> 
> But it seems that only 2.7 call "exit()" when it failed.
> 
> 
> 
> > I suppose that without the "site" module Python cannot do its work?
> 
> 
> 
> Pure Python may be able to work without the "site" module.
> 
> Python CLI has an option "-S" to disable implicit "site" loading.
> 
> But most of existing Vim plugins which use Python interface,
> 
> would expect "site" is loaded implicitly.
> 
> 
> 
> 2014-07-21 5:05 GMT+09:00 Bram Moolenaar :
> 
> >
> 
> > Taro Muraoka wrote:
> 
> >
> 
> >> Hi list and Bram.
> 
> >>
> 
> >> I wrote a patch to fix a problem related if_python.
> 
> >> Please check attached.
> 
> >>
> 
> >> Problem:
> 
> >> When python 2.7 can't find "site" module, vim is exit.
> 
> >> For example, on Windows which not installed official python 2.7,
> 
> >> but installed Mecurial or so (py2exe'ed binary),
> 
> >> Vim will try to load python27.dll of Mercurial,
> 
> >> but it failed to load "site" module, and exit.
> 
> >>
> 
> >> The cause:
> 
> >> Python try to load "site" module, and if it is failed, call exit().
> 
> >> See at line 718 in 
> >> http://svn.python.org/view/python/branches/release27-maint/Python/pythonrun.c?revision=85905&view=markup
> 
> >>
> 
> >> Solution:
> 
> >> Suppress to load "site" module by setting Py_NoSiteFlag before 
> >> Py_Initialize(),
> 
> >> then load it explicitly.
> 
> >
> 
> > Is loading the "site" module done by all versions of Python, or was it
> 
> > added recently?
> 
> >
> 
> > I suppose that without the "site" module Python cannot do its work?
> 
> >
> 
> >
> 
> > --
> 
> > SOLDIER: What?  Ridden on a horse?
> 
> > ARTHUR:  Yes!
> 
> > SOLDIER: You're using coconuts!
> 
> >  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 
> > LTD
> 
> >
> 
> >  /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
> 
> > ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> 
> > \\\  an exciting new programming language -- http://www.Zimbu.org///
> 
> >  \\\help me help AIDS victims -- http://ICCF-Holland.org///
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> MURAOKA Taro 

I have updated the patch to limit for Python 2.7 or above.
Please check attached.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent 8ac1a3f3273929167574f064c810a1f4e3f851b9

diff -r 8ac1a3f32739 src/if_python.c
--- a/src/if_python.c	Mon Jul 21 08:46:27 2014 +0900
+++ b/src/if_python.c	Mon Jul 21 08:57:37 2014 +0900
@@ -295,6 +295,9 @@
 #  define PyCObject_FromVoidPtr dll_PyCObject_FromVoidPtr
 #  define PyCObject_AsVoidPtr dll_PyCObject_AsVoidPtr
 # endif
+# if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x0207
+#  define Py_NoSiteFlag (*dll_Py_NoSiteFlag)
+# endif
 
 /*
  * Pointers for dynamic link
@@ -440,6 +443,9 @@
 static PyObject* (*dll_PyCObject_FromVoidPtr)(void *cobj, void (*destr)(void *));
 static void* (*dll_PyCObject_AsVoidPtr)(PyObject *);
 # endif
+# if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x0207
+static int* dll_Py_NoSiteFlag;
+# endif
 
 static HINSTANCE hinstPython = 0; /* Instance of python.dll */
 
@@ -633,6 +639,9 @@
 {"PyCObject_FromVoidPtr", (PYTHO

Exit when loaded invalid python 2.7

2014-07-20 Fir de Conversatie Taro MURAOKA
Hi list and Bram.


I wrote a patch to fix a problem related if_python.
Please check attached.


Problem:
When python 2.7 can't find "site" module, vim is exit.
For example, on Windows which not installed official python 2.7,
but installed Mecurial or so (py2exe'ed binary),
Vim will try to load python27.dll of Mercurial,
but it failed to load "site" module, and exit.

The cause:
Python try to load "site" module, and if it is failed, call exit().
See at line 718 in 
http://svn.python.org/view/python/branches/release27-maint/Python/pythonrun.c?revision=85905&view=markup

Solution:
Suppress to load "site" module by setting Py_NoSiteFlag before Py_Initialize(),
then load it explicitly.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent d15bda4b3b0ae67e263b2fd3def95c1575140a14

diff -r d15bda4b3b0a src/if_python.c
--- a/src/if_python.c	Mon Jul 21 02:26:09 2014 +0900
+++ b/src/if_python.c	Mon Jul 21 02:39:19 2014 +0900
@@ -295,6 +295,7 @@
 #  define PyCObject_FromVoidPtr dll_PyCObject_FromVoidPtr
 #  define PyCObject_AsVoidPtr dll_PyCObject_AsVoidPtr
 # endif
+# define Py_NoSiteFlag (*dll_Py_NoSiteFlag)
 
 /*
  * Pointers for dynamic link
@@ -440,6 +441,7 @@
 static PyObject* (*dll_PyCObject_FromVoidPtr)(void *cobj, void (*destr)(void *));
 static void* (*dll_PyCObject_AsVoidPtr)(PyObject *);
 # endif
+static int* dll_Py_NoSiteFlag;
 
 static HINSTANCE hinstPython = 0; /* Instance of python.dll */
 
@@ -633,6 +635,7 @@
 {"PyCObject_FromVoidPtr", (PYTHON_PROC*)&dll_PyCObject_FromVoidPtr},
 {"PyCObject_AsVoidPtr", (PYTHON_PROC*)&dll_PyCObject_AsVoidPtr},
 # endif
+{"Py_NoSiteFlag", (PYTHON_PROC*)&dll_Py_NoSiteFlag},
 {"", NULL},
 };
 
@@ -901,6 +904,8 @@
 {
 if (!initialised)
 {
+	PyObject *site;
+
 #ifdef DYNAMIC_PYTHON
 	if (!python_enabled(TRUE))
 	{
@@ -915,11 +920,24 @@
 
 	init_structs();
 
+	/* Disable implicit 'import site'. */
+	Py_NoSiteFlag++;
+
 #if !defined(MACOS) || defined(MACOS_X_UNIX)
 	Py_Initialize();
 #else
 	PyMac_Initialize();
 #endif
+
+	/* 'import site' explicitly. */
+	site = PyImport_ImportModule("site");
+	if (site == NULL)
+	{
+	EMSG(_("EXXX: Sorry, this command is disabled, the Python's site module could not be loaded."));
+	goto fail;
+	}
+	Py_DECREF(site);
+
 	/* Initialise threads, and below save the state using
 	 * PyEval_SaveThread.  Without the call to PyEval_SaveThread, thread
 	 * specific state (such as the system trace hook), will be lost


Can't run test_listlbr on Windows

2014-07-15 Fir de Conversatie Taro MURAOKA
Hi list and Bram.


I found a problem test_listlbr is never executed on Windows.
And I wrote an attached patch to fix it.
Please check it.


Best

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent 0efec12f52acd812b1c03e42347a4ef275c0e74d
diff -r 0efec12f52ac -r 20941ca15648 src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak	Thu Jul 10 22:01:47 2014 +0200
+++ b/src/testdir/Make_dos.mak	Wed Jul 16 01:01:37 2014 +0900
@@ -37,7 +37,7 @@
 		test105.out test106.out  test107.out\
 		test_autoformat_join.out \
 		test_breakindent.out \
-		test_listlbr \
+		test_listlbr.out \
 		test_eval.out \
 		test_options.out
 


Re: Patch 7.4.193

2014-03-10 Fir de Conversatie Taro MURAOKA
After this patch test 86 and 87 are failed.
It may be forgotten to fix typos in those tests.

I have wrote a patch to fix this.
Please check it

Thanks!

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent bfbf4bedfa2aa1269ad91c31caa465a4ceea16d2
diff -r bfbf4bedfa2a -r f54acbd5dd24 src/testdir/test86.in
--- a/src/testdir/test86.in	Mon Mar 10 20:58:25 2014 +0900
+++ b/src/testdir/test86.in	Mon Mar 10 21:05:38 2014 +0900
@@ -675,7 +675,7 @@
 # Check GCing iterator that was not fully exhausted
 i = iter(vim.buffers)
 cb.append('i:' + str(next(i)))
-# and also check creating more then one iterator at a time
+# and also check creating more than one iterator at a time
 i2 = iter(vim.buffers)
 cb.append('i2:' + str(next(i2)))
 cb.append('i:' + str(next(i)))
diff -r bfbf4bedfa2a -r f54acbd5dd24 src/testdir/test86.ok
--- a/src/testdir/test86.ok	Mon Mar 10 20:58:25 2014 +0900
+++ b/src/testdir/test86.ok	Mon Mar 10 21:05:38 2014 +0900
@@ -882,11 +882,11 @@
 l[:] = FailingIter():NotImplementedError:('iter',)
 l[:] = FailingIterNext():NotImplementedError:('next',)
 <<< Finished
-nel[1:10:2]  = "abcK":ValueError:('attempt to assign sequence of size greater then 2 to extended slice',)
+nel[1:10:2]  = "abcK":ValueError:('attempt to assign sequence of size greater than 2 to extended slice',)
 ('a', 'b', 'c', 'O')
 nel[1:10:2]  = "a":ValueError:('attempt to assign sequence of size 1 to extended slice of size 2',)
 ('a', 'b', 'c', 'O')
-nel[1:1:-1]  = "a":ValueError:('attempt to assign sequence of size greater then 0 to extended slice',)
+nel[1:1:-1]  = "a":ValueError:('attempt to assign sequence of size greater than 0 to extended slice',)
 ('a', 'b', 'c', 'O')
 nel[:] = FailingIterNextN(2):NotImplementedError:('next N',)
 ('a', 'b', 'c', 'O')
@@ -1233,8 +1233,8 @@
 >>> Testing NumberToLong using vim.buffers[%s]
 vim.buffers[[]]:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
 vim.buffers[None]:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
-vim.buffers[-1]:ValueError:('number must be greater then zero',)
-vim.buffers[0]:ValueError:('number must be greater then zero',)
+vim.buffers[-1]:ValueError:('number must be greater than zero',)
+vim.buffers[0]:ValueError:('number must be greater than zero',)
 <<< Finished
 > Current
 >> CurrentGetattr
diff -r bfbf4bedfa2a -r f54acbd5dd24 src/testdir/test87.in
--- a/src/testdir/test87.in	Mon Mar 10 20:58:25 2014 +0900
+++ b/src/testdir/test87.in	Mon Mar 10 21:05:38 2014 +0900
@@ -664,7 +664,7 @@
 # Check GCing iterator that was not fully exhausted
 i = iter(vim.buffers)
 cb.append('i:' + str(next(i)))
-# and also check creating more then one iterator at a time
+# and also check creating more than one iterator at a time
 i2 = iter(vim.buffers)
 cb.append('i2:' + str(next(i2)))
 cb.append('i:' + str(next(i)))
diff -r bfbf4bedfa2a -r f54acbd5dd24 src/testdir/test87.ok
--- a/src/testdir/test87.ok	Mon Mar 10 20:58:25 2014 +0900
+++ b/src/testdir/test87.ok	Mon Mar 10 21:05:38 2014 +0900
@@ -882,11 +882,11 @@
 l[:] = FailingIter():(, NotImplementedError('iter',))
 l[:] = FailingIterNext():(, NotImplementedError('next',))
 <<< Finished
-nel[1:10:2]  = "abcK":(, ValueError('attempt to assign sequence of size greater then 2 to extended slice',))
+nel[1:10:2]  = "abcK":(, ValueError('attempt to assign sequence of size greater than 2 to extended slice',))
 (b'a', b'b', b'c', b'O')
 nel[1:10:2]  = "a":(, ValueError('attempt to assign sequence of size 1 to extended slice of size 2',))
 (b'a', b'b', b'c', b'O')
-nel[1:1:-1]  = "a":(, ValueError('attempt to assign sequence of size greater then 0 to extended slice',))
+nel[1:1:-1]  = "a":(, ValueError('attempt to assign sequence of size greater than 0 to extended slice',))
 (b'a', b'b', b'c', b'O')
 nel[:] = FailingIterNextN(2):(, NotImplementedError('next N',))
 (b'a', b'b', b'c', b'O')
@@ -1233,8 +1233,8 @@
 >>> Testing NumberToLong using vim.buffers[%s]
 vim.buffers[[]]:(, TypeError('expected int() or something supporting coercing to int(), but got list',))
 vim.buffers[None]:(, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
-vim.buffers[-1]:(, ValueError('number must be greater then zero',))
-vim.buffers[0]:(, ValueError('number must be greater then zero',))
+vim.buffers[-1]:(, ValueError('number must be greater than zero',))
+vim.buffers[0]:(, ValueError('number must be greater than zero',))
 <<< Finished
 > Current
 >> CurrentGetattr


patch: test100 failed on Windows

2013-12-12 Fir de Conversatie Taro MURAOKA
Hi list and Bram.

I found a problem that test100 is failed on Windows (ff=dos environment)
And I have wrote an attached patch, please check it.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
# HG changeset patch
# Parent ae5361b49b21d7b4de5bd76770f12f6169555d64
diff -r ae5361b49b21 -r 5030ad0a5516 src/testdir/test100.in
--- a/src/testdir/test100.in	Fri Dec 13 00:37:14 2013 +0900
+++ b/src/testdir/test100.in	Fri Dec 13 00:56:45 2013 +0900
@@ -18,6 +18,7 @@
 :call FillBuffer()
 :call feedkeys(":earlier 10\n", 't')
 :call UndoLevel()
+:set ff=unix
 :%w! test.out
 :new two
 :0put ='TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)'
@@ -27,6 +28,7 @@
 :call UndoLevel()
 :setlocal ul=10
 :call UndoLevel()
+:set ff=unix
 :%w >> test.out
 :wincmd p
 :redir >>test.out | echo "global value shouldn't be changed and still be 5!" | echo 'ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'|:setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |echo "" |redir end
@@ -35,6 +37,7 @@
 :1put ='global value should be changed to 50'
 :2put ='THREE: expecting global undolevels: 50, local undolevels: -123456 (default)'
 :call UndoLevel()
+:set ff=unix
 :%w >> test.out
 :"sleep 10
 :qa!


Re: Patch 7.4a.027

2013-07-17 Fir de Conversatie Taro MURAOKA
> This patch has caused a linking failure under Cygwin:
> 
> objects/if_python.o: In function `InsertBufferLines':
> /usr/src/vim/src/if_py_both.h:4018: undefined reference to `find_win_for_buf'
> /usr/src/vim/src/if_py_both.h:4076: undefined reference to `find_win_for_buf'
> objects/if_python3.o: In function `InsertBufferLines':
> /usr/src/vim/src/if_py_both.h:4018: undefined reference to `find_win_for_buf'
> /usr/src/vim/src/if_py_both.h:4076: undefined reference to `find_win_for_buf'
> collect2: error: ld returned 1 exit status

It is observed on traivs-ci (Linux):

  https://travis-ci.org/vim-jp/vim-ci/builds/9193099

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Patch 7.4a.006

2013-07-09 Fir de Conversatie Taro MURAOKA
After this patch, build was failed like this

> Mismatching error/warning code in line 3006
> make[2]: *** [nl.ck] Error 1
> make[2]: Leaving directory `/home/travis/build/vim-jp/vim-ci/vim/src/po'
> make[1]: *** [test] Error 2


Check this for details: https://travis-ci.org/vim-jp/vim-ci/jobs/8886799

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Patch 7.4a.001

2013-07-06 Fir de Conversatie Taro MURAOKA
Hi Bram.


On mercurial repositry, the patch number 1 is duplicated.
Please check here 
https://code.google.com/p/vim/source/browse/src/version.c?r=0ddba00c204d855c0b3da30cb338d9bdb0ded847#732

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Japanese translations for Vim 7.4 (2013-Jul version)

2013-07-06 Fir de Conversatie Taro MURAOKA
> I'm going to make a beta release today.

Wow! It's so great! I'm very exciting!

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Japanese translations for Vim 7.4 (2013-Jul version)

2013-07-06 Fir de Conversatie Taro MURAOKA
> I'm going to make a beta release today.

Wow! It's so great! I'm very exiting!

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Improve tests for mercurial repos on Windows

2013-07-05 Fir de Conversatie Taro MURAOKA
Hi list.


When using vim's mercurial repository on Windows,
executing tests has some problems and is very very very stressfull.

  * converting 'ff' of *.ok and *.in causes messy status for hg.
  * executing single test is failed often,
because of forgetting convert 'ff'.
  * debugging and modifing tests are not easy.  too many steps are
required.

To resolve these problems, I have changed most part of
src/testdir/Make_dos.mak.  What are changed:

  * Place converted files into temporary directory (dostmp).
  * Set dependencies between input, temporary and output files.
  * Use upper case letters for commands which derived from DOS.

As a result of these changes, we can execute tests very easily.

  $ nmake -f Make_dos.mak win32
  $ nmake -f Make_dos.mak test87.out
  $ hg status
  (nothing changed, when test was succeeded)

Please check an attached patch.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 0d4e0cde36e15e6cc585b839fe1685e7030d129e

diff -r 0d4e0cde36e1 .hgignore
--- a/.hgignore	Fri Jul 05 21:01:22 2013 +0200
+++ b/.hgignore	Sat Jul 06 12:29:02 2013 +0900
@@ -58,4 +58,6 @@
 src/testdir/small.vim 
 src/testdir/tiny.vim 
 src/testdir/test*.out
+src/testdir/test*.failed
 src/testdir/test.log
+src/testdir/dostmp/*
diff -r 0d4e0cde36e1 src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak	Fri Jul 05 21:01:22 2013 +0200
+++ b/src/testdir/Make_dos.mak	Sat Jul 06 12:29:02 2013 +0900
@@ -36,17 +36,53 @@
 
 SCRIPTS32 =	test50.out test70.out
 
-SCRIPTS_GUI = test16.out
+SCRIPTS_GUI =	test16.out
+
+TEST_OUTFILES = $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) $(SCRIPTS_GUI)
+DOSTMP = dostmp
+DOSTMP_OUTFILES = $(TEST_OUTFILES:test=dostmp\test)
+DOSTMP_INFILES = $(DOSTMP_OUTFILES:.out=.in)
 
 .SUFFIXES: .in .out
 
-nongui:	fixff $(SCRIPTS16) $(SCRIPTS) report
+nongui:	nolog $(SCRIPTS16) $(SCRIPTS) report
 
-small:	report
+small:	nolog report
 
-gui:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) report
+gui:	nolog $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) report
 
-win32:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) report
+win32:	nolog $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) report
+
+$(DOSTMP_INFILES): $(*B).in
+	IF NOT EXIST $(DOSTMP)\NUL MD $(DOSTMP)
+	IF EXIST $@ DEL $@
+	$(VIMPROG) -u dos.vim --noplugin "+set ff=dos|f $@|wq" $(*B).in
+
+$(DOSTMP_OUTFILES): $*.in
+	-@IF EXIST test.out DEL test.out
+	MOVE $(*B).in $(*B).in.bak
+	COPY $*.in $(*B).in
+	COPY $(*B).ok test.ok
+	$(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $(*B).in
+	-@IF EXIST test.out MOVE /y test.out $@
+	-@IF EXIST $(*B).in.bak \
+		( DEL $(*B).in & MOVE $(*B).in.bak $(*B).in )
+	-@IF EXIST test.in DEL test.in
+	-@IF EXIST X* DEL X*
+	-@IF EXIST test.ok DEL test.ok
+	-@IF EXIST Xdir1 RD /s /q Xdir1
+	-@IF EXIST Xfind RD /s /q Xfind
+	-@IF EXIST viminfo DEL viminfo
+
+$(TEST_OUTFILES): $(DOSTMP)\$(*B).out
+	IF EXIST test.out DEL test.out
+	$(VIMPROG) -u dos.vim --noplugin "+set ff=unix|f test.out|wq" \
+		$(DOSTMP)\$(*B).out
+	@diff test.out $*.ok & IF ERRORLEVEL 1 \
+		( MOVE /y test.out $*.failed \
+		 & DEL $(DOSTMP)\$(*B).out \
+		 & ECHO $* FAILED >> test.log ) \
+		ELSE ( MOVE /y test.out $*.out )
 
 fixff:
 	-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
@@ -54,38 +90,27 @@
 		dotest.in test60.ok test71.ok test74.ok
 
 report:
-	@echo ""
-	@echo Test results:
-	@IF EXIST test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
+	@ECHO ""
+	@ECHO Test results:
+	@IF EXIST test.log ( TYPE test.log & ECHO TEST FAILURE & EXIT /b 1 ) \
 		ELSE ( ECHO ALL DONE )
 
 clean:
-	-del *.out
-	-del *.failed
-	-if exist test.ok del test.ok
-	-if exist small.vim del small.vim
-	-if exist tiny.vim del tiny.vim
-	-if exist mbyte.vim del mbyte.vim
-	-if exist mzscheme.vim del mzscheme.vim
-	-if exist lua.vim del lua.vim
-	-del X*
-	-if exist Xdir1 rd /s /q Xdir1
-	-if exist Xfind rd /s /q Xfind
-	-if exist viminfo del viminfo
-	-del test.log
-
-.in.out:
-	-if exist $*.failed del $*.failed
-	copy $*.ok test.ok
-	$(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
-	@diff test.out $*.ok & if errorlevel 1 \
-		( move /y test.out $*.failed & echo $* FAILED >> test.log ) \
-		else ( move /y test.out $*.out )
-	-del X*
-	-del test.ok
-	-if exist Xdir1 rd /s /q Xdir1
-	-if exist Xfind rd /s /q Xfind
-	-if exist viminfo del viminfo
+	-IF EXIST *.out DEL *.out
+	-IF EXIST *.failed DEL *.failed
+	-IF EXIST $(DOSTMP) RD /s /q $(DOSTMP)
+	-IF EXIST test.in DEL test.in
+	-IF EXIST test.ok DEL test.ok
+	-IF EXIST test.log DEL test.log
+	-IF EXIST small.vim DEL small.

workaround test87 failure with python 3.3

2013-07-05 Fir de Conversatie Taro MURAOKA
Hi list.


test87 is failed because of python 3.3 shows different messages of
exceptions from python 3.2.

I have made workaround for it.  Please check an attached patch.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 9fb0ed5612cef7b19042e9967cda5ccfafd69447
diff -r 9fb0ed5612ce -r a6808c31a999 src/testdir/test87.in
--- a/src/testdir/test87.in	Sat Jul 06 12:29:02 2013 +0900
+++ b/src/testdir/test87.in	Sat Jul 06 13:23:39 2013 +0900
@@ -829,6 +829,10 @@
 :fun D()
 :endfun
 py3 << EOF
+import re
+
+py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$')
+
 def ee(expr, g=globals(), l=locals()):
 try:
 try:
@@ -836,6 +840,15 @@
 except Exception as e:
 if sys.version_info >= (3, 3) and e.__class__ is AttributeError and str(e).find('has no attribute')>=0 and not str(e).startswith("'vim."):
 cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1]
+elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0:
+cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", '')
+elif sys.version_info >= (3, 3) and e.__class__ is TypeError:
+m = py33_type_error_pattern.search(str(e))
+if m:
+msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2))
+cb.append(expr + ':' + repr((e.__class__, TypeError(msg
+else:
+cb.append(expr + ':' + repr((e.__class__, e)))
 else:
 cb.append(expr + ':' + repr((e.__class__, e)))
 else:


test89 failed with 1302 on DOS/Windows

2013-07-04 Fir de Conversatie Taro MURAOKA
Vim 7.3.1302 fails about test89 on DOS/Windows.
I wrote an attached patch, please check it.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 2d628033fabc13d1a8938841b83d86b3638352f1
diff -r 2d628033fabc -r d17318354d49 src/testdir/test89.in
--- a/src/testdir/test89.in	Thu Jul 04 21:06:50 2013 +0900
+++ b/src/testdir/test89.in	Thu Jul 04 21:10:45 2013 +0900
@@ -55,11 +55,14 @@
 :$put =''
 :$put ='Testing findfile'
 :$put =''
+:let save_ssl=&ssl
+:set ssl
 :$put =findfile('test19.in','src/test*')
 :exe "cd" cwd
 :cd ..
 :$put =findfile('test19.in','test*')
 :$put =findfile('test19.in','testdir')
+:let &ssl=save_ssl
 :exe "cd" cwd
 :/^results/,$w! test.out
 :q!


Re: A warning on 64bit environment.

2013-06-24 Fir de Conversatie Taro MURAOKA
> So we probably need to use an #ifdef. 

Indeed.  I have updated the patch.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 18d034458b2bae92b0b8340c5ae00eea4a6ddf48

diff -r 18d034458b2b src/if_python.c
--- a/src/if_python.c	Mon Jun 24 19:24:53 2013 +0900
+++ b/src/if_python.c	Mon Jun 24 19:31:54 2013 +0900
@@ -365,7 +365,11 @@
 static PyObject* (*dll_PyObject_Call)(PyObject *, PyObject *, PyObject *);
 static PyObject* (*dll_PyObject_Repr)(PyObject *);
 static char*(*dll_PyString_AsString)(PyObject *);
+#if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x0205
+static int(*dll_PyString_AsStringAndSize)(PyObject *, char **, Py_ssize_t *);
+#else
 static int(*dll_PyString_AsStringAndSize)(PyObject *, char **, int *);
+#endif
 static PyObject*(*dll_PyString_FromString)(const char *);
 static PyObject*(*dll_PyString_FromFormat)(const char *, ...);
 static PyObject*(*dll_PyString_FromStringAndSize)(const char *, PyInt);


A warning on 64bit environment.

2013-06-23 Fir de Conversatie Taro MURAOKA
I have found and fix a warning when compile for 64bit environment.
It was happend for *dynamic* Python2 and 64bit environment,
because third parameter of PyString_AsStringAndSize is expected as Py_ssize_t*,
but it is defined as int* by stub macro of dynamic Python.


Please check attached patch.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 420704bc419137ac4361ebe891f91ffbb2aa1bc3
diff -r 420704bc4191 -r fe84b2ecda5c src/if_python.c
--- a/src/if_python.c	Mon Jun 24 08:28:47 2013 +0900
+++ b/src/if_python.c	Mon Jun 24 08:36:25 2013 +0900
@@ -365,7 +365,7 @@
 static PyObject* (*dll_PyObject_Call)(PyObject *, PyObject *, PyObject *);
 static PyObject* (*dll_PyObject_Repr)(PyObject *);
 static char*(*dll_PyString_AsString)(PyObject *);
-static int(*dll_PyString_AsStringAndSize)(PyObject *, char **, int *);
+static int(*dll_PyString_AsStringAndSize)(PyObject *, char **, Py_ssize_t *);
 static PyObject*(*dll_PyString_FromString)(const char *);
 static PyObject*(*dll_PyString_FromFormat)(const char *, ...);
 static PyObject*(*dll_PyString_FromStringAndSize)(const char *, PyInt);


Compile failure on MSVC10

2013-06-23 Fir de Conversatie Taro MURAOKA
I have found and fixed compile failures of 7.3.1237 on MSVC10.
It seems failures of macro expansion, but I don't know the reason.
Please check attached patch.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 713c2e7480dab00d0bea78798e92147622a516ad
diff -r 713c2e7480da -r 420704bc4191 src/if_py_both.h
--- a/src/if_py_both.h	Mon Jun 24 08:02:00 2013 +0900
+++ b/src/if_py_both.h	Mon Jun 24 08:28:47 2013 +0900
@@ -139,13 +139,15 @@
 }
 else
 {
+#if PY_MAJOR_VERSION < 3
 	PyErr_FORMAT(PyExc_TypeError,
-#if PY_MAJOR_VERSION < 3
 		N_("expected str() or unicode() instance, but got %s")
+		, Py_TYPE_NAME(obj));
 #else
+	PyErr_FORMAT(PyExc_TypeError,
 		N_("expected bytes() or str() instance, but got %s")
+		, Py_TYPE_NAME(obj));
 #endif
-		, Py_TYPE_NAME(obj));
 	return NULL;
 }
 
@@ -191,15 +193,17 @@
 }
 else
 {
+#if PY_MAJOR_VERSION < 3
 	PyErr_FORMAT(PyExc_TypeError,
-#if PY_MAJOR_VERSION < 3
 		N_("expected int(), long() or something supporting "
 		   "coercing to long(), but got %s")
+		, Py_TYPE_NAME(obj));
 #else
+	PyErr_FORMAT(PyExc_TypeError,
 		N_("expected int() or something supporting coercing to int(), "
 		   "but got %s")
+		, Py_TYPE_NAME(obj));
 #endif
-		, Py_TYPE_NAME(obj));
 	return -1;
 }
 


Re: Test 86 fails with statis Python

2013-06-19 Fir de Conversatie Taro MURAOKA
I could reproduce it on travis-ci at past.

Failed build:
https://travis-ci.org/vim-jp/vim-ci/builds/8117238

Its build and test log:
https://s3.amazonaws.com/archive.travis-ci.org/jobs/8117240/log.txt

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




fix tests for DOS/Windows

2013-06-17 Fir de Conversatie Taro MURAOKA
Hi list.


There are tests failed on DOS/Windows environment.
I have fixed two of them.
Please check attached patches.


test50: Short name seems depending on OS version.
On my Win7, "c:/x.x.y" has short name "c:/XX9B80~1.Y", it will not be matched.
So I made it flexible.


test77: failed when "cksum" available (MinGW or Cygwin).


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent fd270c3511646ced68a1746406677fa44b6c2ae3
diff -r fd270c351164 -r 357de3c47ce6 src/testdir/test50.in
--- a/src/testdir/test50.in	Tue Jun 18 08:17:50 2013 +0900
+++ b/src/testdir/test50.in	Tue Jun 18 08:49:30 2013 +0900
@@ -33,7 +33,7 @@
 	" This could change for CygWin to //cygdrive/c
 	let dir1='c:/x.x.y'
 	if filereadable(dir1) || isdirectory(dir1)
-		call confirm( "'".dir1."' exists, cannot run test" )
+		echo "FATAL: '".dir1."' exists, cannot run test"
 		return
 	endif
 	let file1=dir1.'/zz.y.txt'
@@ -41,13 +41,18 @@
 	let dir2=dir1.'/VimIsTheGreatestSinceSlicedBread'
 	let file2=dir2.'/z.txt'
 	let nofile2=dir2.'/zz.txt'
-	let resdir1='c:/XX2235~1.Y'
+	call MakeDir( dir1 )
+	let resdir1 = substitute(fnamemodify(dir1, ':p:8'), '\\$', '', '')
+	if resdir1 !~ '\V\^c:/XX\x\x\x\x~1.Y\$'
+		echo "FATAL: unexpected short name: " . resdir1
+		echo "INFO: please report your OS to vim-dev"
+		return
+	endif
 	let resfile1=resdir1.'/ZZY~1.TXT'
 	let resnofile1=resdir1.'/z.y.txt'
 	let resdir2=resdir1.'/VIMIST~1'
 	let resfile2=resdir2.'/z.txt'
 	let resnofile2=resdir2.'/zz.txt'
-	call MakeDir( dir1 )
 	call MakeDir( dir2 )
 	call MakeFile( file1 )
 	call MakeFile( file2 )
# HG changeset patch
# Parent 51018ee51cc10a21b2ec0e0ca804476a0d5209cb
diff -r 51018ee51cc1 -r eb5084aff8e6 src/testdir/test77.in
--- a/src/testdir/test77.in	Tue Jun 18 08:04:56 2013 +0900
+++ b/src/testdir/test77.in	Tue Jun 18 08:08:43 2013 +0900
@@ -23,6 +23,7 @@
 :w! Xtest
 :r !cksum Xtest
 :s/\s/ /g
+:set fileformat&
 :.w! test.out
 :qa!
 ENDTEST


test report for DOS/Windows

2013-06-16 Fir de Conversatie Taro MURAOKA
Hi list.


I have implemented "test report" feature for DOS/Windows.
"test report" is implemented for UNIX, so I made DOS/Windows equivalent.

Please check an attached patch.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 454a6ebf1c194cb4c967229d6e4e20396db996c2

diff -r 454a6ebf1c19 .hgignore
--- a/.hgignore	Sat Jun 15 23:00:30 2013 +0200
+++ b/.hgignore	Sun Jun 16 18:04:09 2013 +0900
@@ -55,3 +55,4 @@
 src/testdir/small.vim 
 src/testdir/tiny.vim 
 src/testdir/test*.out
+src/testdir/test.log
diff -r 454a6ebf1c19 src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak	Sat Jun 15 23:00:30 2013 +0200
+++ b/src/testdir/Make_dos.mak	Sun Jun 16 18:04:09 2013 +0900
@@ -40,23 +40,25 @@
 
 .SUFFIXES: .in .out
 
-nongui:	fixff $(SCRIPTS16) $(SCRIPTS)
-	echo ALL DONE
+nongui:	fixff $(SCRIPTS16) $(SCRIPTS) report
 
-small:
-	echo ALL DONE
+small:	report
 
-gui:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI)
-	echo ALL DONE
+gui:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS_GUI) report
 
-win32:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32)
-	echo ALL DONE
+win32:	fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32) report
 
 fixff:
 	-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
 	-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \
 		dotest.in test60.ok test71.ok test74.ok
 
+report:
+	@echo ""
+	@echo Test results:
+	@IF EXIST test.log ( type test.log & echo TEST FAILURE & exit /b 1 ) \
+		ELSE ( ECHO ALL DONE )
+
 clean:
 	-del *.out
 	-if exist test.ok del test.ok
@@ -67,15 +69,18 @@
 	-if exist lua.vim del lua.vim
 	-del X*
 	-if exist viminfo del viminfo
+	-del test.log
 
 .in.out:
 	copy $*.ok test.ok
 	$(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
-	diff test.out $*.ok
-	-if exist $*.out del $*.out
-	rename test.out $*.out
+	@diff test.out $*.ok & if errorlevel 1 (echo $* FAILED >> test.log ) \
+		else ( del /F $*.out & rename test.out $*.out )
 	-del X*
 	-del X*.*
 	-del test.ok
 	-rd /s /q Xfind
 	-if exist viminfo del viminfo
+
+nolog:
+	-del test.log


use RD instead of RMDIR on Windows

2013-06-09 Fir de Conversatie Taro MURAOKA
Hi list.


On Windows which MinGW or Cygwin is installed,
"rmdir" in Make_dos.mak invokes MinGW/Cygwin's "rmdir.exe".
It expected to invoke built-in "rmdir" of cmd.exe.

We can avoid this by just using "rd" instead "rmdir" easily.
Please check attached patch.


Thanks.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 99c9dd23883f4503603cd45db133d9e3306eb8f3
diff -r 99c9dd23883f -r 07ffa02780dc src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak	Sat Jun 08 23:30:04 2013 +0200
+++ b/src/testdir/Make_dos.mak	Sun Jun 09 08:31:07 2013 +0900
@@ -77,5 +77,5 @@
 	-del X*
 	-del X*.*
 	-del test.ok
-	-rmdir /s /q Xfind
+	-rd /s /q Xfind
 	-if exist viminfo del viminfo


Re: Why C? If so how is the best way to have simple lists ?

2013-06-08 Fir de Conversatie Taro MURAOKA
> Yeah, basic C is missing containers.  There are libraries for them, but 
> there doesn't seem to be one clear winner. 

How about define common containers for Vim by C?
And rewriting Vim by using that containers gradually.

Absence of common containers in Vim, have caused duplication of
implementations like single linked list.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




fix: py3xxx commands completion

2013-05-31 Fir de Conversatie Taro MURAOKA
Hi list.

Vim can't complete commands which starts with 'py3'
 when typing ':py3' in command line.

I wrote a patch: https://gist.github.com/koron/5685200

Please check it.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: vim-nox reminder

2013-05-27 Fir de Conversatie Taro MURAOKA
+1

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




NFA pretty dump

2013-05-24 Fir de Conversatie Taro MURAOKA
I wrote a patch to make NFA state dump more pretty.

Before patch:

> (11) NFA_MOPEN(0) (-991) (id=11)
> (10) NFA_SPLIT  (-1024) (id=10)
> ( 8) NFA_MOPEN(1) (-990) (id=8)
> ( 7) NFA_SPLIT  (-1024) (id=7)
> ( 1) CHAR(f) (102) (id=1)
> ( 2) CHAR(o) (111) (id=2)
> ( 3) CHAR(o) (111) (id=3)
> ( 9) NFA_MCLOSE(1) (-980) (id=9)
> (10) NFA_SPLIT  (-1024) (id=10)
> ( 4) CHAR(b) (98) (id=4)
> ( 5) CHAR(a) (97) (id=5)
> ( 6) CHAR(r) (114) (id=6)
> ( 9) NFA_MCLOSE(1) (-980) (id=9)
> (12) NFA_MCLOSE(0) (-981) (id=12)
> ( 0) NFA_MATCH  (-1023) (id=0)

After patch:

> (11) NFA_MOPEN(0) (-991) (id=11)
> (10) +-NFA_SPLIT  (-1024) (id=10)
> ( 8)   +-NFA_MOPEN(1) (-990) (id=8)
> ( 7)   | +-NFA_SPLIT  (-1024) (id=7)
> ( 1)   |   +-CHAR(f) (102) (id=1)
> ( 2)   |   | +-CHAR(o) (111) (id=2)
> ( 3)   |   |   +-CHAR(o) (111) (id=3)
> ( 9)   |   | +-NFA_MCLOSE(1) (-980) (id=9)
> (10)   |   |   +-NFA_SPLIT  (-1024) (id=10)
> ( 4)   |   +-CHAR(b) (98) (id=4)
> ( 5)   | +-CHAR(a) (97) (id=5)
> ( 6)   |   +-CHAR(r) (114) (id=6)
> ( 9)   | +-NFA_MCLOSE(1) (-980) (id=9)
> (12)   +-NFA_MCLOSE(0) (-981) (id=12)
> ( 0) +-NFA_MATCH  (-1023) (id=0)

This will be great help to debugging NFA with complex patterns.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent e782f5be8263bed448060c473adaec560ec83aed

diff -r e782f5be8263 src/regexp_nfa.c
--- a/src/regexp_nfa.c	Thu May 23 22:43:08 2013 +0200
+++ b/src/regexp_nfa.c	Sat May 25 08:54:21 2013 +0900
@@ -170,7 +170,8 @@
 #ifdef DEBUG
 static void nfa_set_code __ARGS((int c));
 static void nfa_postfix_dump __ARGS((char_u *expr, int retval));
-static void nfa_print_state __ARGS((FILE *debugf, nfa_state_T *state, int ident));
+static void nfa_print_state __ARGS((FILE *debugf, nfa_state_T *state));
+static void nfa_print_state2 __ARGS((FILE *debugf, nfa_state_T *state, garray_T *indent));
 static void nfa_dump __ARGS((nfa_regprog_T *prog));
 #endif
 static int *re2post __ARGS((void));
@@ -1841,29 +1842,75 @@
  * Print the NFA starting with a root node "state".
  */
 static void
-nfa_print_state(debugf, state, ident)
+nfa_print_state(debugf, state)
 FILE *debugf;
 nfa_state_T *state;
-int ident;
 {
-int i;
+garray_T indent;
+
+ga_init2(&indent, 1, 64);
+ga_append(&indent, '\0');
+nfa_print_state2(debugf, state, &indent);
+fclose(debugf);
+ga_clear(&indent);
+}
+
+static void
+nfa_print_state2(debugf, state, indent)
+FILE *debugf;
+nfa_state_T *state;
+garray_T *indent;
+{
+char_u  *p;
 
 if (state == NULL)
 	return;
 
 fprintf(debugf, "(%2d)", abs(state->id));
-for (i = 0; i < ident; i++)
-	fprintf(debugf, "%c", ' ');
+
+/* Output indent */
+p = (char_u *)indent->ga_data;
+if (indent->ga_len >= 3)
+{
+	int	last = indent->ga_len - 3;
+	char_u	save[2];
+
+	STRNCPY(save, &p[last], 2);
+	STRNCPY(&p[last], "+-", 2);
+	fprintf(debugf, " %s", p);
+	STRNCPY(&p[last], save, 2);
+}
+else
+	fprintf(debugf, " %s", p);
 
 nfa_set_code(state->c);
-fprintf(debugf, "%s %s (%d) (id=%d)\n",
-		 state->negated ? "NOT" : "", code, state->c, abs(state->id));
+fprintf(debugf, "%s%s (%d) (id=%d)\n",
+		 state->negated ? "NOT " : "", code, state->c, abs(state->id));
 if (state->id < 0)
 	return;
 
 state->id = abs(state->id) * -1;
-nfa_print_state(debugf, state->out, ident + 4);
-nfa_print_state(debugf, state->out1, ident + 4);
+
+/* grow indent for state->out */
+indent->ga_len -= 1;
+if (state->out1)
+	ga_concat(indent, "| ");
+else
+	ga_concat(indent, "  ");
+ga_append(indent, '\0');
+
+nfa_print_state2(debugf, state->out, indent);
+
+/* replace last part of indent for state->out1 */
+indent->ga_len -= 3;
+ga_concat(indent, "  ");
+ga_append(indent, '\0');
+
+nfa_print_state2(debugf, state->out1, indent);
+
+/* shrink indent */
+indent->ga_len -= 3;
+ga_append(indent, '\0');
 }
 
 /*
@@ -1876,10 +1923,7 @@
 FILE *debugf = fopen("LOG.log", "a");
 
 if (debugf != NULL)
-{
-	nfa_print_state(debugf, prog->start, 0);
-	fclose(debugf);
-}
+	nfa_print_state(debugf, prog->start);
 }
 #endif	/* ENABLE_LOG */
 #endif	/* DEBUG */
@@ -3519,7 +3563,7 @@
 #endif
 	fprintf(f, "\tInput text is \"%s\" \n", r

improve NFA log

2013-05-24 Fir de Conversatie Taro MURAOKA
I have improved logging of NFA regexp engine.

- refine macros for logging.
- add comments for logging.

Please check attached patch.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent e782f5be8263bed448060c473adaec560ec83aed
diff -r e782f5be8263 -r cca83de64090 src/regexp_nfa.c
--- a/src/regexp_nfa.c	Thu May 23 22:43:08 2013 +0200
+++ b/src/regexp_nfa.c	Sat May 25 06:03:03 2013 +0900
@@ -5,12 +5,30 @@
  * This file is included in "regexp.c".
  */
 
+/*
+ * Logging of NFA engine:
+ *
+ * NFA engine output four log files.  One of them is error log, it is enabled
+ * always.  Other three: dump, run and debug logs are enabled when compiled as
+ * debug mode.
+ *
+ * Error log: contains NFA engine's fatal errors.
+ *
+ * Dump log: contains compiled NFA state machine's information.  Enabled on
+ * debug mode.
+ *
+ * Run log: contains information of matching procedure.  Enabled on debug mode.
+ *
+ * Debug log: contains detailed information of matching procedure. Enabled on
+ * debug mode, but it can be disabled if undefined NFA_REGEXP_DEBUG_LOG.
+ */
+#define NFA_REGEXP_ERROR_LOG	"nfa_regexp_error.log"
 #ifdef DEBUG
 /* Comment this out to disable log files. They can get pretty big */
 # define ENABLE_LOG
-# define LOG_NAME "log_nfarun.log"
-# define NFA_REGEXP_DEBUG_LOG
-# define NFA_REGEXP_DEBUG_LOG_NAME	"nfa_regexp_debug.log"
+# define NFA_REGEXP_DUMP_LOG	"nfa_regexp_dump.log"
+# define NFA_REGEXP_RUN_LOG	"nfa_regexp_run.log"
+# define NFA_REGEXP_DEBUG_LOG	"nfa_regexp_debug.log"
 #endif
 
 /* Upper limit allowed for {m,n} repetitions handled by NFA */
@@ -1815,7 +1833,7 @@
 int *p;
 FILE *f;
 
-f = fopen("LOG.log", "a");
+f = fopen(NFA_REGEXP_DUMP_LOG, "a");
 if (f != NULL)
 {
 	fprintf(f, "\n-\n");
@@ -1873,7 +1891,7 @@
 nfa_dump(prog)
 nfa_regprog_T *prog;
 {
-FILE *debugf = fopen("LOG.log", "a");
+FILE *debugf = fopen(NFA_REGEXP_DUMP_LOG, "a");
 
 if (debugf != NULL)
 {
@@ -2047,7 +2065,7 @@
 FILE *df;
 int *p2;
 
-df = fopen("stack.err", "a");
+df = fopen(NFA_REGEXP_ERROR_LOG, "a");
 if (df)
 {
 	fprintf(df, "Error popping the stack!\n");
@@ -2867,11 +2885,11 @@
 int		j = 0;
 int		len = 0;
 #ifdef NFA_REGEXP_DEBUG_LOG
-FILE	*debug = fopen(NFA_REGEXP_DEBUG_LOG_NAME, "a");
+FILE	*debug = fopen(NFA_REGEXP_DEBUG_LOG, "a");
 
 if (debug == NULL)
 {
-	EMSG2(_("(NFA) COULD NOT OPEN %s !"), NFA_REGEXP_DEBUG_LOG_NAME);
+	EMSG2(_("(NFA) COULD NOT OPEN %s !"), NFA_REGEXP_DEBUG_LOG);
 	return FALSE;
 }
 #endif
@@ -2888,7 +2906,7 @@
 vim_memset(list[2].t, 0, size);
 
 #ifdef ENABLE_LOG
-log_fd = fopen(LOG_NAME, "a");
+log_fd = fopen(NFA_REGEXP_RUN_LOG, "a");
 if (log_fd != NULL)
 {
 	fprintf(log_fd, "**\n");
@@ -3077,7 +3095,7 @@
 		nfa_restore_listids(start, listids);
 
 #ifdef ENABLE_LOG
-		log_fd = fopen(LOG_NAME, "a");
+		log_fd = fopen(NFA_REGEXP_RUN_LOG, "a");
 		if (log_fd != NULL)
 		{
 		fprintf(log_fd, "\n");
@@ -3509,7 +3527,7 @@
 need_clear_subexpr = TRUE;
 
 #ifdef ENABLE_LOG
-f = fopen(LOG_NAME, "a");
+f = fopen(NFA_REGEXP_RUN_LOG, "a");
 if (f != NULL)
 {
 	fprintf(f, "\n\n\n\n\n\n\t\t===\n");
@@ -3702,7 +3720,7 @@
  */
 #ifdef ENABLE_LOG
 {
-	FILE *f = fopen(LOG_NAME, "a");
+	FILE *f = fopen(NFA_REGEXP_RUN_LOG, "a");
 
 	if (f != NULL)
 	{


Re: remove a dust from options.txt

2013-05-24 Fir de Conversatie Taro MURAOKA
Please ignore this report.

Sorry, it was reported at past.
I realize it just now.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




remove a dust from options.txt

2013-05-24 Fir de Conversatie Taro MURAOKA
I found a dust abount 'regexpengine' in options.txt, and removed it.
Please check an attached patch.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


diff -r e782f5be8263 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Thu May 23 22:43:08 2013 +0200
+++ b/runtime/doc/options.txt	Sat May 25 04:14:37 2013 +0900
@@ -5516,7 +5516,7 @@
 	matches will be highlighted.  This is used to avoid that Vim hangs
 	when using a very complicated pattern.
 
-		*'regexpengine''* *'re'*
+		*'regexpengine'* *'re'*
 'regexpengine' 're'	number	(default 0)
 			global
 			{not in Vi}


regexp debug log file has general name.

2013-05-20 Fir de Conversatie Taro MURAOKA
Name of regexp debug log files are very general.

  NFA Engine: list.log
  BT Engine: debug.log

I change those as self describing, like this:

  NFA Engine: list.log -> nfa_regexp_debug.log
  BT Engine: debug.log -> bt_regexp_debug.log

Please check attached patch.

I also added two flags to control output of those regexp debug logs
 separately from DEBUG flag.

  NFA_REGEXP_DEBUG_LOG
  BT_REGEXP_DEBUG_LOG


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent f91821dec803253588e268a1a56296224d065d8a
diff -r f91821dec803 -r 1ca6ebea38f8 src/regexp.c
--- a/src/regexp.c	Mon May 20 13:55:21 2013 +0200
+++ b/src/regexp.c	Mon May 20 21:57:50 2013 +0900
@@ -51,6 +51,8 @@
 # define BT_REGEXP_DUMP
 /* save the debugging data to a file instead of displaying it */
 # define BT_REGEXP_LOG
+# define BT_REGEXP_DEBUG_LOG
+# define BT_REGEXP_DEBUG_LOG_NAME	"bt_regexp_debug.log"
 #endif
 
 /*
@@ -7828,11 +7830,11 @@
 
 if (prog == NULL)	/* error compiling regexp with initial engine */
 {
-#ifdef DEBUG
+#ifdef BT_REGEXP_DEBUG_LOG
 	if (regexp_engine != BACKTRACKING_ENGINE)   /* debugging log for NFA */
 	{
 	FILE *f;
-	f = fopen("debug.log", "a");
+	f = fopen(BT_REGEXP_DEBUG_LOG_NAME, "a");
 	if (f)
 	{
 		if (!syntax_error)
@@ -7842,7 +7844,8 @@
 		fclose(f);
 	}
 	else
-		EMSG("(NFA) Could not open \"debug.log\" to write !!!");
+		EMSG2("(NFA) Could not open \"%s\" to write !!!",
+BT_REGEXP_DEBUG_LOG_NAME);
 	/*
 	if (syntax_error)
 		EMSG("NFA Regexp: Syntax Error !");
diff -r f91821dec803 -r 1ca6ebea38f8 src/regexp_nfa.c
--- a/src/regexp_nfa.c	Mon May 20 13:55:21 2013 +0200
+++ b/src/regexp_nfa.c	Mon May 20 21:57:50 2013 +0900
@@ -9,6 +9,8 @@
 /* Comment this out to disable log files. They can get pretty big */
 # define ENABLE_LOG
 # define LOG_NAME "log_nfarun.log"
+# define NFA_REGEXP_DEBUG_LOG
+# define NFA_REGEXP_DEBUG_LOG_NAME	"nfa_regexp_debug.log"
 #endif
 
 /* Upper limit allowed for {m,n} repetitions handled by NFA */
@@ -2849,12 +2851,12 @@
 int		*listids = NULL;
 int		j = 0;
 int		len = 0;
-#ifdef DEBUG
-FILE	*debug = fopen("list.log", "a");
+#ifdef NFA_REGEXP_DEBUG_LOG
+FILE	*debug = fopen(NFA_REGEXP_DEBUG_LOG_NAME, "a");
 
 if (debug == NULL)
 {
-	EMSG(_("(NFA) COULD NOT OPEN list.log !"));
+	EMSG2(_("(NFA) COULD NOT OPEN %s !"), NFA_REGEXP_DEBUG_LOG_NAME);
 	return FALSE;
 }
 #endif
@@ -2950,7 +2952,7 @@
 	fprintf(log_fd, "\n");
 #endif
 
-#ifdef DEBUG
+#ifdef NFA_REGEXP_DEBUG_LOG
 	fprintf(debug, "\n---\n");
 #endif
 
@@ -2966,7 +2968,7 @@
 	else
 		t = &thislist->t[i];
 
-#ifdef DEBUG
+#ifdef NFA_REGEXP_DEBUG_LOG
 	nfa_set_code(t->state->c);
 	fprintf(debug, "%s, ", code);
 #endif
@@ -3436,7 +3438,7 @@
 if (listids != NULL)
 	vim_free(listids);
 #undef ADD_POS_NEG_STATE
-#ifdef DEBUG
+#ifdef NFA_REGEXP_DEBUG_LOG
 fclose(debug);
 #endif
 


Re: Patch 7.3.970

2013-05-19 Fir de Conversatie Taro MURAOKA
I got a report that 970 causes crash when do this:

:echo search("[^A-z]")

# reported at here in Japanese -> https://github.com/vim-jp/issues/issues/386

Yasuhiro Matsumoto try to write a patch to fix this,
but it seems that there are some other similar problems.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Patch 7.3.970

2013-05-19 Fir de Conversatie Taro MURAOKA
This makes vim (debug build) slow to startup.
New NFA engine seems to write huge log files in debug build.
And it causes this terrible slow down.

Added files are generated like this:

gvim -u NONE -U NONE --noplugin --startuptime startuptime-7.3.XXX.txt

I'll look into source codes later, but reported at first.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




times in msec
 clock   self+sourced   self:  sourced script
 clock   elapsed:  other lines

000.000  000.000: --- VIM STARTING ---
000.000  000.000: Allocated generic buffers
000.000  000.000: locale set
000.000  000.000: GUI prepared
000.000  000.000: clipboard setup
000.000  000.000: window checked
002.000  002.000: inits 1
007.000  005.000: parsing arguments
007.000  000.000: expanding arguments
007.000  000.000: shell init
007.000  000.000: inits 2
007.000  000.000: init highlight
007.000  000.000: sourcing vimrc file(s)
007.000  000.000: inits 3
011.000  002.000  002.000: sourcing 
c:\Local\App\vim73-kaoriya-win64\vim73\lang/menu_japanese_japan.932.vim
011.000  002.000  000.000: sourcing 
c:\Local\App\vim73-kaoriya-win64\vim73\lang\menu_ja.cp932.vim
013.000  000.000  000.000: sourcing 
c:\Local\App\vim73-kaoriya-win64\vim73\autoload\paste.vim
043.000  035.000  033.000: sourcing $VIMRUNTIME\menu.vim
061.000  019.000: starting GUI
063.000  002.000: GUI delay
063.000  000.000: setting raw mode
063.000  000.000: start termcap
063.000  000.000: clearing screen
063.000  000.000: opening buffers
063.000  000.000: BufEnter autocommands
063.000  000.000: editing files in windows
065.000  002.000: VimEnter autocommands
065.000  000.000: before starting main loop
068.000  003.000: first screen update
068.000  000.000: --- VIM STARTED ---


times in msec
 clock   self+sourced   self:  sourced script
 clock   elapsed:  other lines

000.000  000.000: --- VIM STARTING ---
000.000  000.000: Allocated generic buffers
001.000  001.000: locale set
001.000  000.000: GUI prepared
001.000  000.000: clipboard setup
001.000  000.000: window checked
003.000  002.000: inits 1
008.000  005.000: parsing arguments
008.000  000.000: expanding arguments
009.000  001.000: shell init
009.000  000.000: inits 2
009.000  000.000: init highlight
009.000  000.000: sourcing vimrc file(s)
009.000  000.000: inits 3
019.000  002.000  002.000: sourcing 
c:\Local\App\vim73-kaoriya-win64\vim73\lang/menu_japanese_japan.932.vim
019.000  003.000  001.000: sourcing 
c:\Local\App\vim73-kaoriya-win64\vim73\lang\menu_ja.cp932.vim
021.000  000.000  000.000: sourcing 
c:\Local\App\vim73-kaoriya-win64\vim73\autoload\paste.vim
3099.000  3089.000  3086.000: sourcing $VIMRUNTIME\menu.vim
3118.000  020.000: starting GUI
3120.000  002.000: GUI delay
3120.000  000.000: setting raw mode
3120.000  000.000: start termcap
3120.000  000.000: clearing screen
3120.000  000.000: opening buffers
3120.000  000.000: BufEnter autocommands
3120.000  000.000: editing files in windows
3126.000  006.000: VimEnter autocommands
3126.000  000.000: before starting main loop
3129.000  003.000: first screen update
3129.000  000.000: --- VIM STARTED ---


Windows doesn't support -f option

2013-05-18 Fir de Conversatie Taro MURAOKA
Hi list.


Windows GUI version doesn't support "-f" starting option.
So I add a note about it to starting.txt.


Please check attached patch.



Thanks.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


diff -r 34f806b8147f runtime/doc/starting.txt
--- a/runtime/doc/starting.txt	Sat May 18 20:55:35 2013 +0200
+++ b/runtime/doc/starting.txt	Sun May 19 13:23:32 2013 +0900
@@ -438,6 +438,8 @@
 		option should be used when Vim is started by a program that
 		will wait for the edit session to finish (e.g., mail or
 		readnews).  See |amiga-window|.
+
+		MS-Windows: Doesn't support this option.
 		{not in Vi}
 
 


Re: using DirectX/DirectWrite for rendering text.

2013-05-14 Fir de Conversatie Taro MURAOKA
I added license notation for new files which I have wrote.
Of course, those are under VIM LICENSE! ;-)

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 1981e49cd65e2441280d2856908d7c24a501c7ab

diff -r 1981e49cd65e runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Tue May 14 21:06:43 2013 +0900
+++ b/runtime/doc/eval.txt	Tue May 14 21:15:49 2013 +0900
@@ -6344,6 +6344,7 @@
 dialog_gui		Compiled with GUI dialog support.
 diff			Compiled with |vimdiff| and 'diff' support.
 digraphs		Compiled with support for digraphs.
+directx			Compiled with support for 'directx'.
 dnd			Compiled with support for the "~ register |quote_~|.
 dos16			16 bits DOS version of Vim.
 dos32			32 bits DOS (DJGPP) version of Vim.
diff -r 1981e49cd65e runtime/doc/options.txt
--- a/runtime/doc/options.txt	Tue May 14 21:06:43 2013 +0900
+++ b/runtime/doc/options.txt	Tue May 14 21:15:49 2013 +0900
@@ -,6 +,77 @@
 	this option at the default "on".  Only switch it off when working with
 	old Vi scripts.
 
+   *'renderoptions'* *'rop'*
+'renderoptions' 'rop'	string  (default: empty)
+			global
+			{not in Vi}
+			{only available when compiled with GUI and DIRECTX
+			enabled for MS-Windows}
+	Select a text renderer and set its options.  The options are depends
+	on the renderer.
+
+	Syntax: >
+		set rop=type:{renderer}(,{name}:{value})*
+<
+	Currently, only one renderer is available.
+
+	render	behavior~
+	directx	Vim will draw text using DirectX (DirectWrite).  It makes
+		drawn glyphs more beautiful than default GDI.
+		It requires 'encoding' is "utf-8", and only works on
+		MS-Windows Vista or newer version.
+
+		Options:
+		  name	meaning		type	value   ~
+		  gamma	gamma		float	1.0 - 2.2 (maybe)
+		  contrast  enhancedContrast	float	(unknown)
+		  level	clearTypeLevel	float	(unknown)
+		  geom	pixelGeometry	int	0 - 2 (see below)
+		  renmode   renderingMode	int	0 - 6 (see below)
+		  taamode   textAntialiasMode	int	0 - 3 (see below)
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368190.aspx
+
+		For geom: structure of a device pixel.
+		  0 - DWRITE_PIXEL_GEOMETRY_FLAT
+		  1 - DWRITE_PIXEL_GEOMETRY_RGB
+		  2 - DWRITE_PIXEL_GEOMETRY_BGR
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368114.aspx
+
+		For renmode: method of rendering glyphs.
+		  0 - DWRITE_RENDERING_MODE_DEFAULT
+		  1 - DWRITE_RENDERING_MODE_ALIASED
+		  2 - DWRITE_RENDERING_MODE_GDI_CLASSIC
+		  3 - DWRITE_RENDERING_MODE_GDI_NATURAL
+		  4 - DWRITE_RENDERING_MODE_NATURAL
+		  5 - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
+		  6 - DWRITE_RENDERING_MODE_OUTLINE
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368118.aspx
+
+		For taamode: antialiasing mode used for drawing text.
+		  0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
+		  1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
+		  2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
+		  3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368170.aspx
+
+		Example: >
+		  set encoding=utf-8
+		  set gfn=Ricty_Diminished:h12:cSHIFTJIS
+		  set rop=type:directx
+<
+		If select a raster font (Courier, Terminal or FixedSys) to
+		'guifont', it fallbacks to be drawn by GDI automatically.
+
+	Other render types are not supported currently.
+
 		*'report'*
 'report'		number	(default 2)
 			global
diff -r 1981e49cd65e runtime/doc/various.txt
--- a/runtime/doc/various.txt	Tue May 14 21:06:43 2013 +0900
+++ b/runtime/doc/various.txt	Tue May 14 21:15:49 2013 +0900
@@ -320,6 +320,7 @@
 N  *+dialog_con_gui*	Support for |:confirm| with GUI and console dialog.
 N  *+diff*		|vimdiff| and 'diff'
 N  *+digraphs*		|digraphs| *E196*
+m  *+directx*		Win32 GUI only: |'directx'|
*+dnd*		Support for DnD into the "~ register |quote_~|.
 B  *+emacs_tags*	|emacs-tags| files
 N  *+eval*		expression evaluation |eval.txt|
diff -r 1981e49cd65e src/Make_cyg.mak
--- a/src/Make_cyg.mak	Tue May 14 21:06:43 2013 +0900
+++ b/src/Make_cyg.mak	Tue May 14 21:15:49 2013 +0900
@@ -8,6 +8,7 @@
 # Cygwin application use the Makefile (just like on Unix).
 #
 # GUI		no or yes: set to yes if you want the GUI version (yes)
+# DIRECTX	no or yes: set to yes if you want use DirectWrite (no)
 # PERL		define to path to Perl dir to get Perl support (not defined)
 #   PERL_VER	  define to version of Perl being used (56)
 #   DYNAMIC_PERL  no or yes: set to yes to load the Perl DLL dynamically (yes)
@@ -88,6 +89,10 @@
 ARCH

Re: Plans for Vim 7.4

2013-05-08 Fir de Conversatie Taro MURAOKA
> 2. Include the fast regexp engine patch that has been floating around 
>for a long time. With some clever logic to fall back to the old 
>regexp engine for patterns that might not work with the new one. 

I want to look into this patch from view point of multibyte characters.
Where can I get it?

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Patch 7.3.924

2013-05-05 Fir de Conversatie Taro MURAOKA
After this patch,  build on MSVC with Python3 is failed.
Attached patch fix this, please check it.

Error cause is variable declaration order violation in strict C language.

Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 504b928f9a1c58dd4c1f7590ffb9444096b73fd4

diff -r 504b928f9a1c src/if_py_both.h
--- a/src/if_py_both.h	Mon May 06 04:50:35 2013 +0200
+++ b/src/if_py_both.h	Mon May 06 12:01:00 2013 +0900
@@ -1521,12 +1521,11 @@
 int		flags;
 long	numval;
 char_u	*stringval;
+DICTKEY_DECL
 
 if (this->Check(this->from))
 	return NULL;
 
-DICTKEY_DECL
-
 DICTKEY_GET_NOTEMPTY(NULL)
 
 flags = get_option_value_strict(key, &numval, &stringval,
@@ -1616,12 +1615,11 @@
 int		flags;
 int		opt_flags;
 int		r = 0;
+DICTKEY_DECL
 
 if (this->Check(this->from))
 	return -1;
 
-DICTKEY_DECL
-
 DICTKEY_GET_NOTEMPTY(-1)
 
 flags = get_option_value_strict(key, NULL, NULL,


proposal: including golang plugins

2013-04-28 Fir de Conversatie Taro MURAOKA
Hi list.


Golang has very good plugins for vim.  See this URL:

https://code.google.com/p/go/source/browse/#hg%2Fmisc%2Fvim

It would be great that if those are included in vim (7.4 maybe), wouldn't it?

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




fencs trial is terminated unexpectedly.

2013-04-23 Fir de Conversatie Taro MURAOKA
Hi list.


When 'enc' is "utf-8" and 'fencs' includes "ucs-2",
and open a file which is not "ucs-2" encoding,
then fencs trial is terminated at "ucs-2" unexpectedly.

For example:

:set enc=utf-8
:set fencs=ucs-2
:e abc.txt

It is failed when opening attached "abc.txt".


I wrote an attached patch to fix this.
Please check it.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


abcdiff -r ef341d8811b2 src/fileio.c
--- a/src/fileio.c	Mon Apr 15 22:22:58 2013 +0200
+++ b/src/fileio.c	Tue Apr 23 22:13:07 2013 +0900
@@ -1380,6 +1380,8 @@
 # endif
 			   )
 			{
+			if (can_retry)
+goto rewind_retry;
 			if (conv_error == 0)
 conv_error = curbuf->b_ml.ml_line_count
 - linecnt + 1;


Re: using DirectX/DirectWrite for rendering text.

2013-04-03 Fir de Conversatie Taro MURAOKA
Ken Takata send me another patch to fix typos.
I have merged it and updated the patch.

I hope it would be final version.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 73ed2bb6def5b7eb1153ecb6961868601ad4a7c0

diff -r 73ed2bb6def5 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/eval.txt	Wed Apr 03 20:57:36 2013 +0900
@@ -6348,6 +6348,7 @@
 dialog_gui		Compiled with GUI dialog support.
 diff			Compiled with |vimdiff| and 'diff' support.
 digraphs		Compiled with support for digraphs.
+directx			Compiled with support for 'directx'.
 dnd			Compiled with support for the "~ register |quote_~|.
 dos16			16 bits DOS version of Vim.
 dos32			32 bits DOS (DJGPP) version of Vim.
diff -r 73ed2bb6def5 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/options.txt	Wed Apr 03 20:57:36 2013 +0900
@@ -5553,6 +5553,77 @@
 	this option at the default "on".  Only switch it off when working with
 	old Vi scripts.
 
+   *'renderoptions'* *'rop'*
+'renderoptions' 'rop'	string  (default: empty)
+			global
+			{not in Vi}
+			{only available when compiled with GUI and DIRECTX
+			enabled for MS-Windows}
+	Select a text renderer and set its options.  The options are depends
+	on the renderer.
+
+	Syntax: >
+		set rop=type:{renderer}(,{name}:{value})*
+<
+	Currently, only one renderer is available.
+
+	render	behavior~
+	directx	Vim will draw text using DirectX (DirectWrite).  It makes
+		drawn glyphs more beautiful than default GDI.
+		It requires 'encoding' is "utf-8", and only works on
+		MS-Windows Vista or newer version.
+
+		Options:
+		  name	meaning		type	value   ~
+		  gamma	gamma		float	1.0 - 2.2 (maybe)
+		  contrast  enhancedContrast	float	(unknown)
+		  level	clearTypeLevel	float	(unknown)
+		  geom	pixelGeometry	int	0 - 2 (see below)
+		  renmode   renderingMode	int	0 - 6 (see below)
+		  taamode   textAntialiasMode	int	0 - 3 (see below)
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368190.aspx
+
+		For geom: structure of a device pixel.
+		  0 - DWRITE_PIXEL_GEOMETRY_FLAT
+		  1 - DWRITE_PIXEL_GEOMETRY_RGB
+		  2 - DWRITE_PIXEL_GEOMETRY_BGR
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368114.aspx
+
+		For renmode: method of rendering glyphs.
+		  0 - DWRITE_RENDERING_MODE_DEFAULT
+		  1 - DWRITE_RENDERING_MODE_ALIASED
+		  2 - DWRITE_RENDERING_MODE_GDI_CLASSIC
+		  3 - DWRITE_RENDERING_MODE_GDI_NATURAL
+		  4 - DWRITE_RENDERING_MODE_NATURAL
+		  5 - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
+		  6 - DWRITE_RENDERING_MODE_OUTLINE
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368118.aspx
+
+		For taamode: antialiasing mode used for drawing text.
+		  0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
+		  1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
+		  2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
+		  3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368170.aspx
+
+		Example: >
+		  set encoding=utf-8
+		  set gfn=Ricty_Diminished:h12:cSHIFTJIS
+		  set rop=type:directx
+<
+		If select a raster font (Courier, Terminal or FixedSys) to
+		'guifont', it fallbacks to be drawn by GDI automatically.
+
+	Other render types are not supported currently.
+
 		*'report'*
 'report'		number	(default 2)
 			global
diff -r 73ed2bb6def5 runtime/doc/various.txt
--- a/runtime/doc/various.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/various.txt	Wed Apr 03 20:57:36 2013 +0900
@@ -320,6 +320,7 @@
 N  *+dialog_con_gui*	Support for |:confirm| with GUI and console dialog.
 N  *+diff*		|vimdiff| and 'diff'
 N  *+digraphs*		|digraphs| *E196*
+m  *+directx*		Win32 GUI only: |'directx'|
*+dnd*		Support for DnD into the "~ register |quote_~|.
 B  *+emacs_tags*	|emacs-tags| files
 N  *+eval*		expression evaluation |eval.txt|
diff -r 73ed2bb6def5 src/Make_cyg.mak
--- a/src/Make_cyg.mak	Sun Mar 24 10:08:39 2013 +0900
+++ b/src/Make_cyg.mak	Wed Apr 03 20:57:36 2013 +0900
@@ -8,6 +8,7 @@
 # Cygwin application use the Makefile (just like on Unix).
 #
 # GUI		no or yes: set to yes if you want the GUI version (yes)
+# DIRECTX	no or yes: set to yes if you want use DirectWrite (no)
 # PERL		define to path to Perl dir to get Perl support (not defined)
 #   PERL_VER	  define to version of Perl being used (56)
 #   DYNAMIC_PERL  no or yes: set to yes to load the Perl DLL dynamically (yes)
@@ -8

Re: using DirectX/DirectWrite for rendering text.

2013-04-02 Fir de Conversatie Taro MURAOKA
Thank you Ken!


It seems OK for me.
And I merged your patch and updated mine.


Please check it!

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 73ed2bb6def5b7eb1153ecb6961868601ad4a7c0

diff -r 73ed2bb6def5 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/eval.txt	Wed Apr 03 01:57:32 2013 +0900
@@ -6348,6 +6348,7 @@
 dialog_gui		Compiled with GUI dialog support.
 diff			Compiled with |vimdiff| and 'diff' support.
 digraphs		Compiled with support for digraphs.
+directx			Compiled with support for 'directx'.
 dnd			Compiled with support for the "~ register |quote_~|.
 dos16			16 bits DOS version of Vim.
 dos32			32 bits DOS (DJGPP) version of Vim.
diff -r 73ed2bb6def5 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/options.txt	Wed Apr 03 01:57:32 2013 +0900
@@ -5553,6 +5553,77 @@
 	this option at the default "on".  Only switch it off when working with
 	old Vi scripts.
 
+   *'renderoptions'* *'rop'*
+'renderoptions' 'rop'	string  (default: empty)
+			global
+			{not in Vi}
+			{only available when compiled with GUI and DIRECTX
+			enabled for MS-Windows}
+	Select a text renderer and set its options.  The options are depends
+	on the renderer.
+
+	Syntax: >
+		set rop=type:{renderer}(,{name}:{value})*
+<
+	Currently, only one renderer is available.
+
+	render	behavior~
+	directx	Vim will draw text using DirectX (DirectWrite).  It makes
+		drawn glyphs more beautiful than default GDI.
+		It requires 'encoding' is "utf-8", and only works on
+		MS-Windows Vista or newer version.
+
+		Options:
+		  name	meaning		type	value   ~
+		  gamma	gamma		float	1.0 - 2.2 (maybe)
+		  contrast  enhancedContrast	float	(unknown)
+		  level	clearTypeLevel	float	(unknown)
+		  geom	pixelGeometry	int	0 - 2 (see below)
+		  renmode   renderingMode	int	0 - 6 (see below)
+		  taamode   textAntialiasMode	int	0 - 3 (see below)
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368190.aspx
+
+		For geom: structure of a device pixel.
+		  0 - DWRITE_PIXEL_GEOMETRY_FLAT
+		  1 - DWRITE_PIXEL_GEOMETRY_RGB
+		  2 - DWRITE_PIXEL_GEOMETRY_BGR
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368114.aspx
+
+		For renmode: method of rendering glyphs.
+		  0 - DWRITE_RENDERING_MODE_DEFAULT
+		  1 - DWRITE_RENDERING_MODE_ALIASED
+		  2 - DWRITE_RENDERING_MODE_GDI_CLASSIC
+		  3 - DWRITE_RENDERING_MODE_GDI_NATURAL
+		  4 - DWRITE_RENDERING_MODE_NATURAL
+		  5 - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
+		  6 - DWRITE_RENDERING_MODE_OUTLINE
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368118.aspx
+
+		For taamode: antialiasing mode used for drawing text.
+		  0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
+		  1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
+		  2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
+		  3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368170.aspx
+
+		Example: >
+		  set encoding=utf-8
+		  set gfn=Ricty_Diminished:h12:cSHIFTJIS
+		  set rop=type:directx
+<
+		If select a raster font (Courier, Terminal or FixedSys) to
+		'guifont', it fallbacks to be drawn by GDI automatically.
+
+	Other render types are not supported currently.
+
 		*'report'*
 'report'		number	(default 2)
 			global
diff -r 73ed2bb6def5 runtime/doc/various.txt
--- a/runtime/doc/various.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/various.txt	Wed Apr 03 01:57:32 2013 +0900
@@ -320,6 +320,7 @@
 N  *+dialog_con_gui*	Support for |:confirm| with GUI and console dialog.
 N  *+diff*		|vimdiff| and 'diff'
 N  *+digraphs*		|digraphs| *E196*
+m  *+directx*		Win32 GUI only: |'directx'|
*+dnd*		Support for DnD into the "~ register |quote_~|.
 B  *+emacs_tags*	|emacs-tags| files
 N  *+eval*		expression evaluation |eval.txt|
diff -r 73ed2bb6def5 src/Make_cyg.mak
--- a/src/Make_cyg.mak	Sun Mar 24 10:08:39 2013 +0900
+++ b/src/Make_cyg.mak	Wed Apr 03 01:57:32 2013 +0900
@@ -8,6 +8,7 @@
 # Cygwin application use the Makefile (just like on Unix).
 #
 # GUI		no or yes: set to yes if you want the GUI version (yes)
+# DIRECTX	no or yes: set to yes if you want use DirectWrite (no)
 # PERL		define to path to Perl dir to get Perl support (not defined)
 #   PERL_VER	  define to version of Perl being used (56)
 #   DYNAMIC_PERL  no or yes: set to yes to load the Perl DLL dynamically (yes)
@@ -88,6 +89,10 @@
 ARCH = i3

Re: using DirectX/DirectWrite for rendering text.

2013-04-02 Fir de Conversatie Taro MURAOKA
Thank you!  And please give me more time to fix it.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: using DirectX/DirectWrite for rendering text.

2013-04-02 Fir de Conversatie Taro MURAOKA
Leong

Please check your DPI of screen on your both machines, and tell me those.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: using DirectX/DirectWrite for rendering text.

2013-04-01 Fir de Conversatie Taro MURAOKA
> What other information you'd require for you to diagnose? 

Please verify your installed font files: Consolas and NSimSun.
Check those hashes between OK and NG machine, or some method.

I doubt fonts are cause of this issue.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: using DirectX/DirectWrite for rendering text.

2013-03-31 Fir de Conversatie Taro MURAOKA
Hi Leong.


I and k-takata tried to reproduce your report on last week end.
But we cannot reproduce it.

To understand cause of your report, please try the binary which I
have compiled.

http://files.kaoriya.net/var/vim73-kaoriya-dw96e-20130401.zip

This archive include both of 32bit and 64bit version of gvim.
Ant it contains DirectWrite patch.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: using DirectX/DirectWrite for rendering text.

2013-03-30 Fir de Conversatie Taro MURAOKA
Mike Williams wrote:
> There is a bug in gui_mch_set_rendering_options() when setting 
> param.textAntialiasMode, the test is on dx_taamode instead of dx_flags. 


Thank you reporting this!

I have fixed my patch about that.  You can get it from here.

https://bitbucket.org/koron/vim-kaoriya-vim-mq-ex/src/2ab295fc4b4695899d9848c0d1b2dbdd01cf20e3/patch-direct_write-r3.diff

Thanks.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: using DirectX/DirectWrite for rendering text.

2013-03-29 Fir de Conversatie Taro MURAOKA
> I have one questions:

Addtion:

Please tell me your settings (result of ":set").

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: using DirectX/DirectWrite for rendering text.

2013-03-29 Fir de Conversatie Taro MURAOKA
Hi Leong:


I have one questions:
Which a patch did you use?  patch-direct_write-r3d.diff?


Thanks.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: using DirectX/DirectWrite for rendering text.

2013-03-29 Fir de Conversatie Taro MURAOKA
I updated the patch which attached.  I have changed these:

  * Add document which describe enum values.
  * Rename "mode" to "renmode".
  * Add "taamode" for text antialising mode.

> there needs to be a call to SetTextAntialiasMode() to specify if
> grayscale or ClearType anti-aliasing should be done.

I have implemented this.  But I don't know is it correct or not.  If it
is not work as you expected, please check and fix source code and send a
patch.

> To avoid confusion how about renaming the mode option as geom (since
> it relates to geometry of rgb components of a pixel) and geom as
> positioning as it affects character layout.

I think we should not use a word "positioning" because Microsoft does
not used.

> It may be useful to document at least the modes.

Indeed.  I have wrote enumeration keywords that help users be able to
learn with Microsoft's document, instead of writing detail descriptions
which are arranged by us.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 73ed2bb6def5b7eb1153ecb6961868601ad4a7c0

diff -r 73ed2bb6def5 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/eval.txt	Fri Mar 29 21:40:04 2013 +0900
@@ -6348,6 +6348,7 @@
 dialog_gui		Compiled with GUI dialog support.
 diff			Compiled with |vimdiff| and 'diff' support.
 digraphs		Compiled with support for digraphs.
+directx			Compiled with support for 'directx'.
 dnd			Compiled with support for the "~ register |quote_~|.
 dos16			16 bits DOS version of Vim.
 dos32			32 bits DOS (DJGPP) version of Vim.
diff -r 73ed2bb6def5 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/options.txt	Fri Mar 29 21:40:04 2013 +0900
@@ -5553,6 +5553,77 @@
 	this option at the default "on".  Only switch it off when working with
 	old Vi scripts.
 
+   *'renderoptions'* *'rop'*
+'renderoptions' 'rop'	string  (default: empty)
+			global
+			{not in Vi}
+			{only available when compiled with GUI and DIRECTX
+			enabled for MS-Windows}
+	Select a text renderer and set its options.  The options are depends
+	on the renderer.
+
+	Syntax: >
+		set rop=type:{renderer}(,{name}:{value})*
+<
+	Currently, only one renderer is available.
+
+	render	behavior~
+	directx	Vim will draw text using DirectX (DirectWrite).  It makes
+		drawn glyphs more beautiful than default GDI.
+		It requires 'encoding' is "utf-8", and only works on
+		MS-Windows Vista or newer version.
+
+		Options:
+		  name	meaning		type	value   ~
+		  gamma	gamma		float	1.0 - 2.2 (maybe)
+		  contrast  enhancedContrast	float	(unknown)
+		  level	clearTypeLevel	float	(unknown)
+		  geom	pixelGeometry	int	0 - 2 (see below)
+		  renmode   renderingMode	int	0 - 6 (see below)
+		  taamode   textAntialiasMode	int	0 - 3 (see below)
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368190.aspx
+
+		For geom: structure of a device pixel.
+		  0 - DWRITE_PIXEL_GEOMETRY_FLAT
+		  1 - DWRITE_PIXEL_GEOMETRY_RGB
+		  2 - DWRITE_PIXEL_GEOMETRY_BGR
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368114.aspx
+
+		For renmode: method of rendering glyphs.
+		  0 - DWRITE_RENDERING_MODE_DEFAULT
+		  1 - DWRITE_RENDERING_MODE_ALIASED
+		  2 - DWRITE_RENDERING_MODE_GDI_CLASSIC
+		  3 - DWRITE_RENDERING_MODE_GDI_NATURAL
+		  4 - DWRITE_RENDERING_MODE_NATURAL
+		  5 - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
+		  6 - DWRITE_RENDERING_MODE_OUTLINE
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368118.aspx
+
+		For taamode: antialiasing mode used for drawing text.
+		  0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
+		  1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
+		  2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
+		  3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
+
+		See this URL for detail:
+		  http://msdn.microsoft.com/en-us/library/dd368170.aspx
+
+		Example: >
+		  set encoding=utf-8
+		  set gfn=Ricty_Diminished:h12:cSHIFTJIS
+		  set rop=type:directx
+<
+		If select a raster font (Courier, Terminal or FixedSys) to
+		'guifont', it fallbacks to be drawn by GDI automatically.
+
+	Other render types are not supported currently.
+
 		*'report'*
 'report'		number	(default 2)
 			global
diff -r 73ed2bb6def5 runtime/doc/various.txt
--- a/runtime/doc/various.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/various.txt	Fri Mar 29 21:40:04 2013 +0900
@@ -320,6 +320,7 @@
 N  *+dialog_con_gui*	Support for |:confirm| with GUI and console d

Re: correct indent of ifdef/endif (trivial patch)

2013-03-26 Fir de Conversatie Taro MURAOKA
I have wrote a script to correct indentations with considering
ifdef/endif nests.

https://gist.github.com/koron/5250637

USAGE:

  1. open a source file.
  2. :source fix-ifdef-indent.vim
  3. check and save.

This script will correct indents and show line numbers which were
corrected.


Thanks.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




correct indent of ifdef/endif (trivial patch)

2013-03-26 Fir de Conversatie Taro MURAOKA
I have corrected indentations of ifdef/endif pair,
which might be just mistake.

Please check attached patch.

Thanks.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


diff -r acf7368a2acc src/gui.c
--- a/src/gui.c	Thu Mar 21 22:53:50 2013 +0100
+++ b/src/gui.c	Wed Mar 27 08:26:10 2013 +0900
@@ -991,7 +991,7 @@
 }
 
 gui_mch_free_font(gui.wide_font);
-#ifdef FEAT_GUI_GTK
+# ifdef FEAT_GUI_GTK
 /* Avoid unnecessary overhead if 'guifontwide' is equal to 'guifont'. */
 if (font != NOFONT && gui.norm_font != NOFONT
 			 && pango_font_description_equal(font, gui.norm_font))
@@ -1000,11 +1000,11 @@
 	gui_mch_free_font(font);
 }
 else
-#endif
+# endif
 	gui.wide_font = font;
-#ifdef FEAT_GUI_MSWIN
+# ifdef FEAT_GUI_MSWIN
 gui_mch_wide_font_changed();
-#endif
+# endif
 return OK;
 }
 #endif


Re: using DirectX/DirectWrite for rendering text.

2013-03-26 Fir de Conversatie Taro MURAOKA
I have fixed a problem which ":set" is crash.


Best.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 73ed2bb6def5b7eb1153ecb6961868601ad4a7c0

diff -r 73ed2bb6def5 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/eval.txt	Tue Mar 26 21:15:32 2013 +0900
@@ -6348,6 +6348,7 @@
 dialog_gui		Compiled with GUI dialog support.
 diff			Compiled with |vimdiff| and 'diff' support.
 digraphs		Compiled with support for digraphs.
+directx			Compiled with support for 'directx'.
 dnd			Compiled with support for the "~ register |quote_~|.
 dos16			16 bits DOS version of Vim.
 dos32			32 bits DOS (DJGPP) version of Vim.
diff -r 73ed2bb6def5 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/options.txt	Tue Mar 26 21:15:32 2013 +0900
@@ -5553,6 +5553,46 @@
 	this option at the default "on".  Only switch it off when working with
 	old Vi scripts.
 
+   *'renderoptions'* *'rop'*
+'renderoptions' 'rop'
+   string  (default: empty)
+   global
+   {not in Vi}
+   {only available when compiled with GUI and DIRECTX
+   enabled for MS-Windows}
+   Select a text renderer and set its options.  The options are depends
+   on the renderer.
+
+   Syntax: >
+   set rop=type:{renderer}(,{name}:{value})*
+<
+   Currently, only one renderer is available.
+
+   rendererbehavior~
+   directx Vim will draw text using DirectX (DirectWrite).  It makes
+   drawn glyphs more beautiful than default GDI.
+   It requires 'encoding' is "utf-8", and only works on
+   MS-Windows Vista or newer version.
+
+   Options:
+   name  meaning   typevalue   ~
+   gamma gamma float   1.0 - 2.2 (maybe)
+   contrast  enhancedContrast  float   (unknown)
+   level clearTypeLevelfloat   (unknown)
+   geom  pixelGeometry int 0 - 2
+   mode  renderingMode int 0 - 6
+
+   See the following page for detail:
+   http://msdn.microsoft.com/en-us/library/dd368190.aspx
+
+   Example: >
+   set encoding=utf-8
+   set gfn=Ricty_Diminished:h12:cSHIFTJIS
+   set rop=type:directx
+<
+   If select a raster font (Courier, Terminal or FixedSys) to
+   'guifont', it fallbacks to be drawn by GDI automatically.
+
 		*'report'*
 'report'		number	(default 2)
 			global
diff -r 73ed2bb6def5 runtime/doc/various.txt
--- a/runtime/doc/various.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/various.txt	Tue Mar 26 21:15:32 2013 +0900
@@ -320,6 +320,7 @@
 N  *+dialog_con_gui*	Support for |:confirm| with GUI and console dialog.
 N  *+diff*		|vimdiff| and 'diff'
 N  *+digraphs*		|digraphs| *E196*
+m  *+directx*		Win32 GUI only: |'directx'|
*+dnd*		Support for DnD into the "~ register |quote_~|.
 B  *+emacs_tags*	|emacs-tags| files
 N  *+eval*		expression evaluation |eval.txt|
diff -r 73ed2bb6def5 src/Make_cyg.mak
--- a/src/Make_cyg.mak	Sun Mar 24 10:08:39 2013 +0900
+++ b/src/Make_cyg.mak	Tue Mar 26 21:15:32 2013 +0900
@@ -8,6 +8,7 @@
 # Cygwin application use the Makefile (just like on Unix).
 #
 # GUI		no or yes: set to yes if you want the GUI version (yes)
+# DIRECTX	no or yes: set to yes if you want use DirectWrite (no)
 # PERL		define to path to Perl dir to get Perl support (not defined)
 #   PERL_VER	  define to version of Perl being used (56)
 #   DYNAMIC_PERL  no or yes: set to yes to load the Perl DLL dynamically (yes)
@@ -88,6 +89,10 @@
 ARCH = i386
 endif
 
+ifndef DIRECTX
+DIRECTX = no
+endif
+
 ifndef WINVER
 WINVER = 0x0500
 endif
@@ -469,6 +474,15 @@
 endif
 
 ##
+ifeq (yes, $(DIRECTX))
+# Only allow DIRECTX for a GUI build.
+DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
+EXTRA_OBJS += $(OUTDIR)/gui_dwrite.o
+EXTRA_LIBS += -ld2d1 -ldwrite
+USE_STDCPLUS = yes
+endif
+
+##
 ifdef XPM
 # Only allow XPM for a GUI build.
 DEFINES += -DFEAT_XPM_W32
@@ -494,11 +508,7 @@
 DEFINES += -DFEAT_OLE
 EXTRA_OBJS += $(OUTDIR)/if_ole.o
 EXTRA_LIBS += -loleaut32
-ifeq (yes, $(STATIC_STDCPLUS))
-EXTRA_L

Re: using DirectX/DirectWrite for rendering text.

2013-03-23 Fir de Conversatie Taro MURAOKA
I have updated the patch.

I have got a report from k-takata that previous one breaks cygwin build.

Please check this new version.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 73ed2bb6def5b7eb1153ecb6961868601ad4a7c0

diff -r 73ed2bb6def5 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/eval.txt	Sun Mar 24 12:31:30 2013 +0900
@@ -6348,6 +6348,7 @@
 dialog_gui		Compiled with GUI dialog support.
 diff			Compiled with |vimdiff| and 'diff' support.
 digraphs		Compiled with support for digraphs.
+directx			Compiled with support for 'directx'.
 dnd			Compiled with support for the "~ register |quote_~|.
 dos16			16 bits DOS version of Vim.
 dos32			32 bits DOS (DJGPP) version of Vim.
diff -r 73ed2bb6def5 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/options.txt	Sun Mar 24 12:31:30 2013 +0900
@@ -5553,6 +5553,46 @@
 	this option at the default "on".  Only switch it off when working with
 	old Vi scripts.
 
+   *'renderingoptions'* *'renopt'*
+'renderingoptions' 'renopt'
+   string  (default: empty)
+   global
+   {not in Vi}
+   {only available when compiled with GUI and DIRECTX
+   enabled for MS-Windows}
+   Select a text renderer and set its options.  The options are depends
+   on the renderer.
+
+   Syntax: >
+   set renopt=type:{renderer}(,{name}:{value})*
+<
+   Currently, only one renderer is available.
+
+   rendererbehavior~
+   directx Vim will draw text using DirectX (DirectWrite).  It makes
+   drawn glyphs more beautiful than default GDI.
+   It requires 'encoding' is "utf-8", and only works on
+   MS-Windows Vista or newer version.
+
+   Options:
+   name  meaning   typevalue   ~
+   gamma gamma float   1.0 - 2.2 (maybe)
+   contrast  enhancedContrast  float   (unknown)
+   level clearTypeLevelfloat   (unknown)
+   geom  pixelGeometry int 0 - 2
+   mode  renderingMode int 0 - 6
+
+   See the following page for detail:
+   http://msdn.microsoft.com/en-us/library/dd368190.aspx
+
+   Example: >
+   set encoding=utf-8
+   set gfn=Ricty_Diminished:h12:cSHIFTJIS
+   set renopt=type:directx
+<
+   If select a raster font (Courier, Terminal or FixedSys) to
+   'guifont', it fallbacks to be drawn by GDI automatically.
+
 		*'report'*
 'report'		number	(default 2)
 			global
diff -r 73ed2bb6def5 runtime/doc/various.txt
--- a/runtime/doc/various.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/various.txt	Sun Mar 24 12:31:30 2013 +0900
@@ -320,6 +320,7 @@
 N  *+dialog_con_gui*	Support for |:confirm| with GUI and console dialog.
 N  *+diff*		|vimdiff| and 'diff'
 N  *+digraphs*		|digraphs| *E196*
+m  *+directx*		Win32 GUI only: |'directx'|
*+dnd*		Support for DnD into the "~ register |quote_~|.
 B  *+emacs_tags*	|emacs-tags| files
 N  *+eval*		expression evaluation |eval.txt|
diff -r 73ed2bb6def5 src/Make_cyg.mak
--- a/src/Make_cyg.mak	Sun Mar 24 10:08:39 2013 +0900
+++ b/src/Make_cyg.mak	Sun Mar 24 12:31:30 2013 +0900
@@ -8,6 +8,7 @@
 # Cygwin application use the Makefile (just like on Unix).
 #
 # GUI		no or yes: set to yes if you want the GUI version (yes)
+# DIRECTX	no or yes: set to yes if you want use DirectWrite (no)
 # PERL		define to path to Perl dir to get Perl support (not defined)
 #   PERL_VER	  define to version of Perl being used (56)
 #   DYNAMIC_PERL  no or yes: set to yes to load the Perl DLL dynamically (yes)
@@ -88,6 +89,10 @@
 ARCH = i386
 endif
 
+ifndef DIRECTX
+DIRECTX = no
+endif
+
 ifndef WINVER
 WINVER = 0x0500
 endif
@@ -469,6 +474,15 @@
 endif
 
 ##
+ifeq (yes, $(DIRECTX))
+# Only allow DIRECTX for a GUI build.
+DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
+EXTRA_OBJS += $(OUTDIR)/gui_dwrite.o
+EXTRA_LIBS += -ld2d1 -ldwrite
+USE_STDCPLUS = yes
+endif
+
+##
 ifdef XPM
 # Only allow XPM for a GUI build.
 DEFINES += -DFEAT_XPM_W32
@@ -494,11 +508,7 @@
 DEFINES += -DFEAT_OLE
 EXT

Re: using DirectX/DirectWrite for rendering text.

2013-03-23 Fir de Conversatie Taro MURAOKA
Hi all!


At last, I have worked on this issue, and attached an updated patch.
Please check it.

To enable DirectWrite, you should set an option 'renderingoptions', like this:

   :set renopt=type:directx

Now, this option can take some sub parameters, like this:

   :set renopt=type:directx,gamma:1.4,geom:0,mode=3

Please check options.txt about detail of sub parameters.


If you want to see some repository of this patch,  please see here:

https://bitbucket.org/koron/vim-kaoriya-vim-mq-ex/src/a4fb89fcfead2e48d959e94d339e44e5ebe76abe/patch-direct_write-r3.diff?at=default


Best regards.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 73ed2bb6def5b7eb1153ecb6961868601ad4a7c0

diff -r 73ed2bb6def5 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/eval.txt	Sun Mar 24 10:51:56 2013 +0900
@@ -6348,6 +6348,7 @@
 dialog_gui		Compiled with GUI dialog support.
 diff			Compiled with |vimdiff| and 'diff' support.
 digraphs		Compiled with support for digraphs.
+directx			Compiled with support for 'directx'.
 dnd			Compiled with support for the "~ register |quote_~|.
 dos16			16 bits DOS version of Vim.
 dos32			32 bits DOS (DJGPP) version of Vim.
diff -r 73ed2bb6def5 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/options.txt	Sun Mar 24 10:51:56 2013 +0900
@@ -5553,6 +5553,46 @@
 	this option at the default "on".  Only switch it off when working with
 	old Vi scripts.
 
+   *'renderingoptions'* *'renopt'*
+'renderingoptions' 'renopt'
+   string  (default: empty)
+   global
+   {not in Vi}
+   {only available when compiled with GUI and DIRECTX
+   enabled for MS-Windows}
+   Select a text renderer and set its options.  The options are depends
+   on the renderer.
+
+   Syntax: >
+   set renopt=type:{renderer}(,{name}:{value})*
+<
+   Currently, only one renderer is available.
+
+   rendererbehavior~
+   directx Vim will draw text using DirectX (DirectWrite).  It makes
+   drawn glyphs more beautiful than default GDI.
+   It requires 'encoding' is "utf-8", and only works on
+   MS-Windows Vista or newer version.
+
+   Options:
+   name  meaning   typevalue   ~
+   gamma gamma float   1.0 - 2.2 (maybe)
+   contrast  enhancedContrast  float   (unknown)
+   level clearTypeLevelfloat   (unknown)
+   geom  pixelGeometry int 0 - 2
+   mode  renderingMode int 0 - 6
+
+   See the following page for detail:
+   http://msdn.microsoft.com/en-us/library/dd368190.aspx
+
+   Example: >
+   set encoding=utf-8
+   set gfn=Ricty_Diminished:h12:cSHIFTJIS
+   set renopt=type:directx
+<
+   If select a raster font (Courier, Terminal or FixedSys) to
+   'guifont', it fallbacks to be drawn by GDI automatically.
+
 		*'report'*
 'report'		number	(default 2)
 			global
diff -r 73ed2bb6def5 runtime/doc/various.txt
--- a/runtime/doc/various.txt	Sun Mar 24 10:08:39 2013 +0900
+++ b/runtime/doc/various.txt	Sun Mar 24 10:51:56 2013 +0900
@@ -320,6 +320,7 @@
 N  *+dialog_con_gui*	Support for |:confirm| with GUI and console dialog.
 N  *+diff*		|vimdiff| and 'diff'
 N  *+digraphs*		|digraphs| *E196*
+m  *+directx*		Win32 GUI only: |'directx'|
*+dnd*		Support for DnD into the "~ register |quote_~|.
 B  *+emacs_tags*	|emacs-tags| files
 N  *+eval*		expression evaluation |eval.txt|
diff -r 73ed2bb6def5 src/Make_cyg.mak
--- a/src/Make_cyg.mak	Sun Mar 24 10:08:39 2013 +0900
+++ b/src/Make_cyg.mak	Sun Mar 24 10:51:56 2013 +0900
@@ -8,6 +8,7 @@
 # Cygwin application use the Makefile (just like on Unix).
 #
 # GUI		no or yes: set to yes if you want the GUI version (yes)
+# DIRECTX	no or yes: set to yes if you want use DirectWrite (no)
 # PERL		define to path to Perl dir to get Perl support (not defined)
 #   PERL_VER	  define to version of Perl being used (56)
 #   DYNAMIC_PERL  no or yes: set to yes to load the Perl DLL dynamically (yes)
@@ -88,6 +89,10 @@
 ARCH = i386
 endif
 
+ifndef DIRECTX
+DIRECTX = no
+endif

Re: using DirectX/DirectWrite for rendering text.

2013-01-25 Fir de Conversatie Taro MURAOKA
Hi Ingo.


How about recycle an existing 'antialias' option for this purpose.
It is an option for MacOSX to control font rendering.
I know this is not good idea, but there is a platform depended option already.
Why can't we recycle it?


# 'antialias' maybe added by me so long ago, and I forgot it entirely ;)

-- 
-- 
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





Re: using DirectX/DirectWrite for rendering text.

2013-01-25 Fir de Conversatie Taro MURAOKA
> I have a build warning for you


Thank you reporting it!

The definition of p_directx in options.h is wrong.
It was int pointer, must be int correctly.

I'll fix later.

-- 
-- 
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





Re: using DirectX/DirectWrite for rendering text.

2013-01-25 Fir de Conversatie Taro MURAOKA
I have updated the patch.  What are changed:

  * support raster fonts.
  * delay to load DirectX dlls until enabled first time.

What are not changed yet:

  * make switching option generic.

-- 
-- 
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



# HG changeset patch
# Parent 1e34ffdfbabb9cb0705735f8bbed10899e6eda45

diff -r 1e34ffdfbabb runtime/doc/eval.txt
--- a/runtime/doc/eval.txt	Fri Jan 25 21:20:17 2013 +0900
+++ b/runtime/doc/eval.txt	Sat Jan 26 01:59:26 2013 +0900
@@ -6319,6 +6319,7 @@
 dialog_gui		Compiled with GUI dialog support.
 diff			Compiled with |vimdiff| and 'diff' support.
 digraphs		Compiled with support for digraphs.
+directx			Compiled with support for 'directx'.
 dnd			Compiled with support for the "~ register |quote_~|.
 dos16			16 bits DOS version of Vim.
 dos32			32 bits DOS (DJGPP) version of Vim.
diff -r 1e34ffdfbabb runtime/doc/options.txt
--- a/runtime/doc/options.txt	Fri Jan 25 21:20:17 2013 +0900
+++ b/runtime/doc/options.txt	Sat Jan 26 01:59:26 2013 +0900
@@ -2518,6 +2518,24 @@
 	security reasons.
 	{Vi: directory to put temp file in, defaults to "/tmp"}
 
+	*'directx'* *'dx'*
+'directx' 'dx'		boolean (default: off)
+			global
+			{not in Vi}
+			{only available when compiled with GUI and DIRECTX
+			enabled for MS-Windows, and run on Vista or newer}
+	When on, Vim will draw text using DirectX (DirectWrite).  It makes
+	drawn glyphs more beautiful than default GDI.  It requires 'encoding'
+	is "utf-8", and only works on MS-Windows Vista or newer version.
+
+	Example: >
+		set encoding=utf-8
+		set gfn=Ricty_Diminished:h12:cSHIFTJIS
+		set directx
+<
+	If select a raster font (Courier, Terminal or FixedSys) to 'guifont',
+	it fallbacks to be drawn by GDI automatically.
+
 	*'display'* *'dy'*
 'display' 'dy'		string	(default "")
 			global
diff -r 1e34ffdfbabb runtime/doc/various.txt
--- a/runtime/doc/various.txt	Fri Jan 25 21:20:17 2013 +0900
+++ b/runtime/doc/various.txt	Sat Jan 26 01:59:26 2013 +0900
@@ -310,6 +310,7 @@
 N  *+dialog_con_gui*	Support for |:confirm| with GUI and console dialog.
 N  *+diff*		|vimdiff| and 'diff'
 N  *+digraphs*		|digraphs| *E196*
+   *+directx*		MS-Windows only: |'directx'|
*+dnd*		Support for DnD into the "~ register |quote_~|.
 B  *+emacs_tags*	|emacs-tags| files
 N  *+eval*		expression evaluation |eval.txt|
diff -r 1e34ffdfbabb src/Make_cyg.mak
--- a/src/Make_cyg.mak	Fri Jan 25 21:20:17 2013 +0900
+++ b/src/Make_cyg.mak	Sat Jan 26 01:59:26 2013 +0900
@@ -8,6 +8,7 @@
 # Cygwin application use the Makefile (just like on Unix).
 #
 # GUI		no or yes: set to yes if you want the GUI version (yes)
+# DIRECTX	no or yes: set to yes if you want use DirectWrite (no)
 # PERL		define to path to Perl dir to get Perl support (not defined)
 #   PERL_VER	  define to version of Perl being used (56)
 #   DYNAMIC_PERL  no or yes: set to yes to load the Perl DLL dynamically (yes)
@@ -88,6 +89,10 @@
 ARCH = i386
 endif
 
+ifndef DIRECTX
+DIRECTX = no
+endif
+
 ifndef WINVER
 WINVER = 0x0500
 endif
@@ -106,6 +111,13 @@
 OPTIMIZE = MAXSPEED
 endif
 
+
+# Link against the shared version of libstdc++ by default.  Set
+# STATIC_STDCPLUS to "yes" to link against static version instead.
+ifndef STATIC_STDCPLUS
+STATIC_STDCPLUS=no
+endif
+
 ### See feature.h for a list of optionals.
 ### Any other defines can be included here.
 
@@ -436,6 +448,15 @@
 endif
 
 ##
+ifeq (yes, $(DIRECTX))
+# Only allow DIRECTX for a GUI build.
+DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
+EXTRA_OBJS += $(OUTDIR)/gui_dwrite.o
+EXTRA_LIBS += -ld2d1 -ldwrite
+USE_STDCPLUS = yes
+endif
+
+##
 ifdef XPM
 # Only allow XPM for a GUI build.
 DEFINES += -DFEAT_XPM_W32
@@ -460,7 +481,8 @@
 ifeq (yes, $(OLE))
 DEFINES += -DFEAT_OLE
 EXTRA_OBJS += $(OUTDIR)/if_ole.o
-EXTRA_LIBS += -loleaut32 -lstdc++
+EXTRA_LIBS += -loleaut32
+USE_STDCPLUS = yes
 endif
 
 ##
@@ -474,6 +496,15 @@
 DIRSLASH = \\
 endif
 
+##
+ifeq (yes, $(USE_STDCPLUS))
+ifeq (yes, $(STATIC_STDCPLUS))
+EXTRA_LIBS += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
+else
+EXTRA_LIBS += -lstdc++
+endif
+endif
+
 #> end of choices
 ###
 
@@ -603,6 +634,9 @@
 $(OUTDIR)/gui_w32.o:	gui_w32.c gui_w48.c $(INCL)
 	$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
 
+$(OUTDIR)/gui_dwrite.o:	gui_dwrite.cpp $(INCL) gui_dwrite.h
+	$(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
+
 $(OUTDIR)/if_cscope.o:	if_cscope.c $(INCL) if_cscope.h
 	$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
 
diff -r 1e34ffdfbabb src/Make_ming.mak
--- a/src/Make_ming.mak	Fri Jan 25 21:20:17 2013 +0900
+++ b/src/Make_ming.mak	Sat Jan 26 01:59:26 2013 +0900
@@ -31,6 +31,8 @@
 OPTIMIZE=MAXSPEED
 # set to yes to make gvim, no for vim

Re: using DirectX/DirectWrite for rendering text.

2013-01-25 Fir de Conversatie Taro MURAOKA
Thanks!

> set guifont=Courier:h10:cANSI
> 
> This is on Windows 7 x64 Professional.


I can reproduce it, will investigate.

-- 
-- 
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





Re: using DirectX/DirectWrite for rendering text.

2013-01-25 Fir de Conversatie Taro MURAOKA
Mike, thank you for reporting!

> However, the patch does not work with bitmap fonts such as Courier - all 
> the text just disappears.  The code needs to check the font format to 
> decide whether to use DirectX for font rendering.

Please tell me your 'guifont' setting, about this.

-- 
-- 
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





Re: using DirectX/DirectWrite for rendering text.

2013-01-25 Fir de Conversatie Taro MURAOKA
Ingo, thank you interesting and commented.


> How about making "directx" a (first) value of a new generic 'guirender' 
> option?!


It sounds good to make it generic.
But how about adding a new flag to 'guioptions'

Like this:
  :set guioptions +=X

When writing this patch, I was in two mind about it,
between creating a new option and adding a new flag to 'guioptions'.


Best.

-- 
-- 
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





increase speed drawing wide characters.

2013-01-23 Fir de Conversatie Taro MURAOKA
When using 'guifontwide', it causes slow down of drawing wide characters,
because gui_mch_draw_string() draws only one wide character in a call.

I wrote a patch: https://gist.github.com/4608418
It make drawing with grouping characters by its width.

Please check it.

-- 
-- 
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





Re: Patch 7.3.598

2012-07-10 Fir de Conversatie Taro MURAOKA
2012年7月11日水曜日 1時03分21秒 UTC+9 Bram Moolenaar:
> I wrote:
> 
> > Patch 7.3.598
> > Problem:Cannot act upon end of completion. (Taro Muraoka)
> > Solution:   Add an autocommand event that is triggered when completion 
> has
> >  finished. (Idea by Florian Klein)
> > Files:   src/edit.c, src/fileio.c, src/vim.h
> 
> Let me know if this is not sufficient for your purposes.  We could pass
> some information to the autocommand.
> 
> -- 
> hundred-and-one symptoms of being an internet addict:
> 107. When using your phone you forget that you don't have to use your
>  keyboard.
> 
>  /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
> ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org///
>  \\\help me help AIDS victims -- http://ICCF-Holland.org///


Bram wrote:
> We could pass some information to the autocommand. 


I finished to investigation, and realized two items are required.

  1. Which a word did user selected at completion.  (MUST)
  2. a:base string which used to determine those candidates.  (NICE TO HAVE)

2 is optional, although it may be better for complete functions authors.


Best regards.

-- 
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


Re: Request to link Japanese translation

2012-04-30 Fir de Conversatie Taro MURAOKA
Thank you very much John!
I'm impressed by your speedy work!

-- 
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


Request to link Japanese translation

2012-04-29 Fir de Conversatie Taro MURAOKA
Hi list.


We holds translated Vim's documentation in Japanese at here.

http://vim-jp.org/vimdoc-ja/

Please add a link for it to http://www.vim.org/translations.php
Or who are best to ask it?


Thanks.

-- 
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


Re: Syntax error in autoload/netrw.vim

2012-04-09 Fir de Conversatie Taro MURAOKA
There is an unbalanced "endif" at here on the mercurial repos.

http://code.google.com/p/vim/source/browse/runtime/autoload/netrw.vim#327

May it be a problem on the mercurial repos only?

-- 
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


Re: Patch 7.3.490

2012-04-05 Fir de Conversatie Taro MURAOKA
This break vim build, what happens are

  1. can't be compiled with Lua 5.1
  2. can't be compiled with dyn/dll

I wrote a patch please check it.

https://gist.github.com/2315325

-- 
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


Re: Adding events for completefunc

2012-01-31 Fir de Conversatie Taro MURAOKA
Hi!


I had wrote and sent a patch similar purpose.  And it was gone into TODO 
list.

https://groups.google.com/forum/#!topic/vim_dev/DaSiidfQQ5E 

See this too

-- 
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


Re: Performance of joining lines by backslash in Vim scripts.

2012-01-12 Fir de Conversatie Taro MURAOKA
I wrote a patch for that against latest 7.3.401.

  https://gist.github.com/1600566

And measure benchmarks with this script (by MATSUMOTO Yasuhiro).

  https://gist.github.com/1599910 

Then it makes about 90 times faster in my environment!

Original benchmark scores:
> 0.048741
> 0.049043
> 0.048773

Patched benchmark scores:
> 0.000525
> 0.000569
> 0.000537

Please try it.

-- 
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


Re: Fix confused references in if_lua.

2012-01-09 Fir de Conversatie Taro MURAOKA
Hi Luis Carvalho.
 

>  wouldn't a simpler solution be to just
> avoid checking if the value is interned? 
>
I think it will cause some problems.
"Checking interned" has two important meanings at least.
1st one is efficiency as you wrote.
2nd one is avoiding infinite loop for cyclic refrenced value.
(List a has a reference to list b, and list b has a reference to list a)

Point of my patch is separeting two tables for its purpose.

  * A table for interned check, it has very short lifetime.
  * A table to manage lifecycle's buffer/window, it has long lifetime.

I implemented those using the registry, but it is not important.
If you have better solution (upvalue or so?), I won't object it.


Best regards.

-- 
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


Re: Fix confused references in if_lua.

2012-01-08 Fir de Conversatie Taro MURAOKA
Sorry, previous patch has problems on system which without dynamic lua.
Attached new patch have fixed it.  Please check it.

-- 
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
# HG changeset patch
# Parent 2e546d787ee8d12f7ea1b22172b9d491652c1ed7
Fix confused references related with an environment table

diff -r 2e546d787ee8 src/if_lua.c
--- a/src/if_lua.c	Thu Jan 05 09:14:30 2012 +0900
+++ b/src/if_lua.c	Sun Jan 08 19:19:42 2012 +0900
@@ -73,6 +73,7 @@
 #define lua_gettop dll_lua_gettop
 #define lua_settop dll_lua_settop
 #define lua_pushvalue dll_lua_pushvalue
+#define lua_insert dll_lua_insert
 #define lua_replace dll_lua_replace
 #define lua_isnumber dll_lua_isnumber
 #define lua_isstring dll_lua_isstring
@@ -135,6 +136,7 @@
 int (*dll_lua_gettop) (lua_State *L);
 void (*dll_lua_settop) (lua_State *L, int idx);
 void (*dll_lua_pushvalue) (lua_State *L, int idx);
+void (*dll_lua_insert) (lua_State *L, int idx);
 void (*dll_lua_replace) (lua_State *L, int idx);
 int (*dll_lua_isnumber) (lua_State *L, int idx);
 int (*dll_lua_isstring) (lua_State *L, int idx);
@@ -204,6 +206,7 @@
 {"lua_gettop", (luaV_function) &dll_lua_gettop},
 {"lua_settop", (luaV_function) &dll_lua_settop},
 {"lua_pushvalue", (luaV_function) &dll_lua_pushvalue},
+{"lua_insert", (luaV_function) &dll_lua_insert},
 {"lua_replace", (luaV_function) &dll_lua_replace},
 {"lua_isnumber", (luaV_function) &dll_lua_isnumber},
 {"lua_isstring", (luaV_function) &dll_lua_isstring},
@@ -297,6 +300,143 @@
 
 /* ===   Internal   === */
 
+/**
+ * Push a lua object which associated to the pointer to the stack, and return
+ * 1.  If no objects associated, nil is pushed to the stack, and return 0.
+ *
+ * [+1, 0, -]
+ */
+static int
+luaV_get_associated_luavalue(lua_State *L, void *rawptr)
+{
+lua_pushlightuserdata(L, rawptr);
+lua_rawget(L, LUA_REGISTRYINDEX);
+return lua_isnil(L, -1) ? 0 : 1;
+}
+
+/**
+ * A lua object is associated with a C native pointer return 1, otherwise 0.
+ *
+ * [0, 0, -]
+ */
+static int
+luaV_is_associated_luavalue(lua_State *L, void *rawptr)
+{
+int retval = luaV_get_associated_luavalue(L, rawptr);
+lua_pop(L, 1); /* obj */
+return retval;
+}
+
+/**
+ * Associate a lua object which specified by index with a C native pointer.
+ *
+ * [0, 0, -]
+ */
+static void
+luaV_set_associated_luavalue(lua_State *L, void *rawptr, int idx)
+{
+lua_pushvalue(L, idx);
+lua_pushlightuserdata(L, rawptr);
+lua_pushvalue(L, -2);
+lua_rawset(L, LUA_REGISTRYINDEX);
+lua_pop(L, 1);
+}
+
+/**
+ * Reset any associated values to associated with a C native pointer.
+ *
+ * [0, 0, -]
+ */
+static void
+luaV_reset_associated_luavalue(lua_State *L, void *rawptr)
+{
+lua_pushnil(L);
+luaV_set_associated_luavalue(L, rawptr, -1);
+lua_pop(L, 1);
+}
+
+/**
+ * Setup a cache table be identified by cacheKey.
+ *
+ * [0, 0, -]
+ */
+static void
+luaV_open_cachetable(lua_State *L, void *cacheKey)
+{
+lua_pushlightuserdata(L, cacheKey);
+lua_newtable(L);
+lua_rawset(L, LUA_REGISTRYINDEX);
+}
+
+/**
+ * Dispose a cache table be identified by cacheKey.
+ *
+ * [0, 0, -]
+ */
+static void
+luaV_close_cachetable(lua_State *L, void *cacheKey)
+{
+lua_pushlightuserdata(L, cacheKey);
+lua_pushnil(L);
+lua_rawset(L, LUA_REGISTRYINDEX);
+}
+
+/**
+ * Push a lua object associated with a pointer in the cachetable which
+ * associated with cacheKey to the stack, and return 1.  If no objects
+ * associated, nil is pushed to the stack, and return 0.
+ *
+ * [+1, 0, -]
+ */
+static int
+luaV_get_cachetable(lua_State *L, void *cacheKey, void *rawptr)
+{
+lua_pushlightuserdata(L, cacheKey);
+lua_rawget(L, LUA_REGISTRYINDEX);
+if (!lua_istable(L, -1))
+{
+/*
+ * FIXME: This will causes if luaV_open_cachetable() isn't called.  It
+ * may be failed by assertion or so.
+ */
+lua_pop(L, 1); /* {not table} */
+lua_pushnil(L);
+return 0;
+}
+else
+{
+lua_pushlightuserdata(L, rawptr);
+lua_rawget(L, -2);
+lua_insert(L, -2); /* (table, object) -> (object, table) */
+lua_pop(L, 1); /* table */
+return lua_isnil(L, -1) ? 0 : 1;
+}
+}
+
+/**
+ * [0, 0, -]
+ */
+static void
+luaV_set_cachetable(lua_State *L, void *cacheKey, void *rawptr, int idx)
+{
+lua_pushvalue(L, idx);
+
+/* Push a cacheable for cacheKey. */
+lua_pushlightuserdata(L, cacheKey);
+lua_rawget(L, LUA_REGISTRYINDEX);
+if (!lua_istable(L, -1))
+{
+lua_pop(L, 2); /* idx, {not table} */
+}
+else
+{
+lua_pushlightuserdata(L, rawptr);
+lua_pushvalue(L, -3);
+lua_rawset(L, -3);
+lua_pop(L, 2); /* idx, table */
+}
+}
+
 static void
 luaV_newmetat