Re: [patch] Automatically generate syntax/vim.vim

2016-04-08 Fir de Conversatie h_east
Hi Vim script developers,

2016-3-9(Wed) 13:31:10 UTC+9 h_east:
> Hi Vim script developers,
> 
> This is a syntax/vim.vim that corresponding to the latest Vim.
> http://vim-jp.org/gen_syn_vim/
> 
> It has been created automatically from Vim C source code.
> Only creating trigger is manual.
> 
> Let's try it!
> 
> Thanks.

We changed repository name and branch names.
And We have restructured the repository contents.

An excellent Vim's syntax highlighting file for Vim script.
https://github.com/vim-jp/syntax-vim-ex

Of course, we have to follow the updates of the latest of Vim! (7.4.1721)
Please check it.

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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: Patches for Tests Which Fail Due to ASCII-EBCDIC Differences

2016-04-08 Fir de Conversatie Owen Leibman


> -Original Message-
> From: vim_dev@googlegroups.com [mailto:vim_dev@googlegroups.com] On
> Behalf Of Owen Leibman
> Sent: Thursday, April 07, 2016 8:56 PM
> To: vim_dev@googlegroups.com
> Subject: Patches for Tests Which Fail Due to ASCII-EBCDIC Differences
> 
> There are a number of tests which fail on z/OS.
> Many of these are due to encoding differences between ISO8859-1 and IBM-
> 1047.
> The attached zip file contains changes to allow these tests to succeed
> on z/OS.
> It includes the following files:
> 
> 1. test_repl55.vim (I assume you will come up with a better name for
> these files)
>Sort order differed between ISO8859-1 and IBM-1047 in some cases.
>This is a complete new-style replacement for test55.in/ok, which can
> be deleted.
> 2. test_repl57.vim
>Sort order differed between ISO8859-1 and IBM-1047 in some cases.
>This is a complete new-style replacement for test57.in/ok, which can
> be deleted.
> 3. test_sort.patch
>Sort order differed between ISO8859-1 and IBM-1047 in some cases.
>The test_sort tests are much less comprehensive than test_repl57.
> 4. test_repl64.vim, test64.in.patch, test64.ok.patch,
> test_visualfail.vim
>Only a very few tests were failing in test64, due to the use of
> decimal/hexadecimal/octal
>values in regular expressions which matched ISO8859-1 characters but
> not IBM-1047.
>At first, I was just going to move these to a separate test file, but
> test64 was
>particularly well suited for converting from old-style to new-style.
>So I moved almost all the tests to new-style test_repl64.vim.
>I could get all but 3 of the tests working. All 3 of those involved
> the "Visual" feature,
>which I am not familiar with. I thought some combination of "exe" and
> "normal" would work,
>but I couldn't succeed. My failed efforts are in test_visualfail.vim,
> in case somebody
>wants to take a look and fix it, or tell me how to do it.
>In the absence of a good new-style solution for those 3 cases, I
> removed all except those
>three cases from test64.in/ok, hence the two patch files
> test64.in.patch and test64.ok.patch.

I have managed to figure out my problems with Visual, normal, and execute.
I will send an updated version of test_repl64.vim some time this weekend.

> 5. test_repl77.vim
>Checksum works on binary values, and, since ISO8859-1 and IBM-1047
> use different binary representations ...
>This is a complete new-style replacement for test77.in/ok, which can
> be deleted.
> 6. test_repl90.vim
>SHA256 works on binary values, and, since ISO8859-1 and IBM-1047 use
> different binary representations ...
>This is a complete new-style replacement for test90.in/ok, which can
> be deleted.
> 7. README_os390.patch
>Updates list of expected test failures (under the assumption that all
> of the above will be implemented).
>It identifies new issues, at least some of which I want to research
> further, but I probably won't
>be able to get to for a while.
> 
> This email and any files transmitted with it are confidential,
> proprietary and intended solely for the individual or entity to whom
> they are addressed. If you have received this email in error please
> delete it immediately.
> 
> --
> --
> 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.

This email and any files transmitted with it are confidential, proprietary and 
intended solely for the individual or entity to whom they are addressed. If you 
have received this email in error please delete it immediately.

-- 
-- 
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/vim] Character À eats up the next two characters when in scriptin in :source! (#728)

2016-04-08 Fir de Conversatie Christian Brabandt
On Do, 07 Apr 2016, Christian Brabandt wrote:
> Bram wrote:
> 
> > Can you give an explanation why this change is needed?
> 
> when reading the script, Vim finds the `À`,  whose second byte is the 80. And 
> this is K_SPECIAL in Vim source and needs to be replaced by K_SPECIAL 
> KS_SPECIAL KE_FILLER to be correctly parsed later in vgetorpeek when Vim sees 
> the K_SPECIAL and increments the offset pointer of the typebuf struct by 2, 
> thinking, that it needs to skip the next 2 special bytes. But since the 
> K_SPECIAL has not been escaped correctly, it will skip two chars from the 
> script file.
> 
> > When recording key strokes and playing them back, does that still work?
> 
> I will check and will try to create a test for that behaviour later when I 
> come up with a proper patch.

Here is a patch, including a test.

I verified, that recording and replaying works as expected. 
Unfortunately, replaying the macro does not work at all in the test and 
I am not sure why. It fails however in the unpatched and patched version 
the same way, so I assume, this is caused by the way the tests are 
executed, because when running the test interactively, it works as 
expected.

Best,
Christian
-- 
Durch Abwesenheit seine Hochschätzung oder Verehrung befördern: Wie 
die Gegenwart den Ruhm vermindert, so vermehrt ihn die Abwesenheit.
-- Baltasar Gracián y Morales (Handorakel und Kunst der 
Weltklugheit)

-- 
-- 
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.
commit 75fb75012ae16db42439143b83deb52cbaf87b64
Author: Christian Brabandt 
Date:   Fri Apr 8 22:13:16 2016 +0200

Fix input handling of reading 0x80 bytes using :source!

closes #728

diff --git a/src/getchar.c b/src/getchar.c
index 4a225e1..75c083b 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -3059,7 +3059,7 @@ inchar(
 if (typebuf_changed(tb_change_cnt))
 	return 0;
 
-return fix_input_buffer(buf, len, script_char >= 0);
+return fix_input_buffer(buf, len);
 }
 
 /*
@@ -3070,8 +3070,7 @@ inchar(
 int
 fix_input_buffer(
 char_u	*buf,
-int		len,
-int		script)		/* TRUE when reading from a script */
+int		len)
 {
 int		i;
 char_u	*p = buf;
@@ -3105,7 +3104,7 @@ fix_input_buffer(
 	}
 	else
 #endif
-	if (p[0] == NUL || (p[0] == K_SPECIAL && !script
+	if (p[0] == NUL || (p[0] == K_SPECIAL
 #ifdef FEAT_AUTOCMD
 		/* timeout may generate K_CURSORHOLD */
 		&& (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD)
diff --git a/src/misc1.c b/src/misc1.c
index ddd9a07..99303c7 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -3410,7 +3410,7 @@ get_keystroke(void)
 	if (n > 0)
 	{
 	/* Replace zero and CSI by a special key code. */
-	n = fix_input_buffer(buf + len, n, FALSE);
+	n = fix_input_buffer(buf + len, n);
 	len += n;
 	waited = 0;
 	}
diff --git a/src/proto/getchar.pro b/src/proto/getchar.pro
index 97a2828..fd6ec5d 100644
--- a/src/proto/getchar.pro
+++ b/src/proto/getchar.pro
@@ -48,7 +48,7 @@ int vpeekc_any(void);
 int char_avail(void);
 void vungetc(int c);
 int inchar(char_u *buf, int maxlen, long wait_time, int tb_change_cnt);
-int fix_input_buffer(char_u *buf, int len, int script);
+int fix_input_buffer(char_u *buf, int len);
 int input_available(void);
 int do_map(int maptype, char_u *arg, int mode, int abbrev);
 int get_map_mode(char_u **cmdp, int forceit);
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 1eb76a6..b6bcce7 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -22,6 +22,7 @@ source test_reltime.vim
 source test_searchpos.vim
 source test_set.vim
 source test_sort.vim
+source test_source.vim
 source test_statusline.vim
 source test_syn_attr.vim
 source test_timers.vim
diff --git a/src/testdir/test_source.vim b/src/testdir/test_source.vim
new file mode 100644
index 000..57a748d
--- /dev/null
+++ b/src/testdir/test_source.vim
@@ -0,0 +1,43 @@
+" Test for using source!
+
+let g:text=['sobre se a constante divulgação das À nossa foo à nossa informações afeta',
+   \  'sobre se a constante divulgação das À nossa foo à nossa informações afeta']
+
+function SetupSplitWindow()
+  sp Xfile.txt
+  call append('$', g:text)
+  w!
+endfunction
+
+function Test_read_and_source()
+  let lines = [ ':%s/À nossa/--À nossa--/g' ]
+  call writefile(lines, 'Xscript')
+  call SetupSplitWindow()
+  try
+source! Xscript
+  catch
+  endtry
+  call assert_equal(['', 'sobre se a constante divulgação das --À nossa-- foo à nossa informações afeta',
+  \ 'sobre se a 

Patch 7.4.1721

2016-04-08 Fir de Conversatie Bram Moolenaar

Patch 7.4.1721
Problem:The vimtbar files are unused.
Solution:   Remove them. (Ken Takata)
Files:  src/vimtbar.dll, src/vimtbar.h, src/vimtbar.lib, Filelist


*** ../vim-7.4.1720/src/vimtbar.dll 2010-05-15 13:04:10.0 +0200
--- src/vimtbar.dll 1970-01-01 01:00:00.0 +0100
***
*** 1,498 
- MZP~ø Vÿv
-  èXø‰Fúƒ~ú¸ÿÿëaƒ~ u Ä^ &ƒ?�ƒì  ÿt4 Wè þŒFþ‰~ü_ ƒï &‹] &‹ & G&‹G -  G*   - ô 
B õ I ÷ S ú V ü ^ ý r þ xE H Z ] b s t u y ‡ • £ ´ µ º Â Ñ ó ö û  
 "*29;AFLQW]uw|Ž“¾ÃÆËÐÖáåç 
 
 
 
D
P
Z
`
 
“
˜
œ
¦
¬
¹
¾
Ä
Ò
×
Û
ö
  
 $ * 9 E H Q Y ^ a e p s z } €   ’ ª ® ½ Æ Ï Ú á ç ù   K N c }   œ ­ Á 
ç ê ð ù   # ( * B S V ^ x ‡ ‰ Ž ” ¥ ¬ ² ß ä ì ï ÷ E K [ k t } … ˜ Ÿ Á Æ É Ô ò õ 
  + : @ H K \ _ o € ƒ œ ® À È Ï Õ ß æ õ ý eefbutton is enabled
- #define TBSTATE_HIDDEN0x08// button is hidden
- #define TBSTATE_INDETERMINATE   0x10// button is indeterminate
- #define TBSTATE_SELECTED  0x20// mouse hovering over button (for 
coolbar look)
- 
- 
- 
- typedef struct tagADJUSTINFO
- {
- TBBUTTON tbButton;
- char szDescription[1];
- } ADJUSTINFO;
- 
- typedef ADJUSTINFO NEAR* PADJUSTINFO;
- typedef ADJUSTINFO FAR* LPADJUSTINFO;
- 
- 
- HWND WINAPI CreateToolbar(HWND hwnd, DWORD ws, WORD wID, int nBitmaps,
-   HINSTANCE hBMInst, WORD wBMID,
-   LPCTBBUTTON lpButtons, int iNumButtons);
- 
- #define CMB_DISCARDABLE 0x01// create bitmap as discardable
- #define CMB_MASKED  0x02// create image/mask pair in bitmap
- 
- 
- #define TB_ENABLEBUTTON   (WM_USER + 1)
- // wParam: UINT, button ID
- // lParam: BOOL LOWORD, enable if nonzero; HIWORD not used, 0
- // return: not used
- //
- 
- #define TB_CHECKBUTTON(WM_USER + 2)
- // wParam: UINT, button ID
- // lParam: BOOL LOWORD, check if nonzero; HIWORD not used, 0
- // return: not used
- //
- 
- #define TB_PRESSBUTTON(WM_USER + 3)
- // wParam: UINT, button ID
- // lParam: BOOL LOWORD, press if nonzero; HIWORD not used, 0
- // return: not used
- //
- 
- #define TB_HIDEBUTTON (WM_USER + 4)
- // wParam: UINT, button ID
- // lParam: BOOL LOWORD, hide if nonzero; HIWORD not used, 0
- // return: not used
- //
- #define TB_INDETERMINATE  (WM_USER + 5)
- // wParam: UINT, button ID
- // lParam: BOOL LOWORD, make indeterminate if nonzero; HIWORD not used, 0
- // return: not used
- //
- 
- #define TB_ISBUTTONENABLED(WM_USER + 9)
- // wParam: UINT, button ID
- // lParam: not used, 0
- // return: BOOL LOWORD, enabled if nonzero; HIWORD not used
- //
- 
- #define TB_ISBUTTONCHECKED(WM_USER + 10)
- // wParam: UINT, button ID
- // lParam: not used, 0
- // return: BOOL LOWORD, checked if nonzero; HIWORD not used
- //
- 
- #define TB_ISBUTTONPRESSED(WM_USER + 11)
- // wParam: UINT, button ID
- // lParam: not used, 0
- // return: BOOL LOWORD, pressed if nonzero; HIWORD not used
- //
- 
- #define TB_ISBUTTONHIDDEN (WM_USER + 12)
- // wParam: UINT, button ID
- // lParam: not used, 0
- // return: BOOL LOWORD, hidden if nonzero; HIWORD not used
- //
- 
- #define TB_ISBUTTONINDETERMINATE  (WM_USER + 13)
- // wParam: UINT, button ID
- // lParam: not used, 0
- // return: BOOL LOWORD, indeterminate if nonzero; HIWORD not used
- //
- 
- #define TB_SETSTATE   (WM_USER + 17)
- // wParam: UINT, button ID
- // lParam: UINT LOWORD, state bits; HIWORD not used, 0
- // return: not used
- //
- 
- #define TB_GETSTATE   (WM_USER + 18)
- // wParam: UINT, button ID
- // lParam: not used, 0
- // return: UINT LOWORD, state bits; HIWORD not used
- //
- 
- #define TB_ADDBITMAP  (WM_USER + 19)
- // wParam: UINT, number of button graphics in bitmap
- // lParam: one of:
- //   HINSTANCE LOWORD, module handle; UINT HIWORD, resource id
- //   HINSTANCE LOWORD, NULL; HBITMAP HIWORD, bitmap handle
- // return: one of:
- //   int LOWORD, index for first new button; HIWORD not used
- //   int LOWORD, -1 indicating error; HIWORD not used
- //
- 
- #define TB_ADDBUTTONS (WM_USER + 20)
- // wParam: UINT, number of buttons to add
- // lParam: LPTBBUTTON, pointer to array of TBBUTTON structures
- // return: not used
- //
- 
- #define TB_INSERTBUTTON   (WM_USER + 21)
- // wParam: UINT, index for insertion (appended if index doesn't exist)
- // lParam: LPTBBUTTON, pointer to one TBBUTTON structure
- // return: not used
- //
- 
- #define TB_DELETEBUTTON   (WM_USER + 22)
- // wParam: UINT, index of button to delete
- // lParam: not used, 0
- // return: not used
- //
- 
- #define TB_GETBUTTON  (WM_USER + 23)
- // wParam: UINT, index of button to get
- // lParam: LPTBBUTTON, pointer to TBBUTTON buffer to receive button
- // return: not used
- //
- 
- #define TB_BUTTONCOUNT(WM_USER + 24)
- // wParam: not used, 0
- // lParam: not used, 0
- // return: UINT LOWORD, number of buttons; HIWORD not used
- //
- 
- #define TB_COMMANDTOINDEX (WM_USER + 25)
- // 

Re: BSD specific cType's for syntax highlighting

2016-04-08 Fir de Conversatie Charles E Campbell
frantisek holop wrote:
> Christian Brabandt, 08 Apr 2016 08:08:
>> I don't have any saying in that, but I guess what Bram wants is 
>> something like this:
>>
>> if exists("c_bsd_types")
>> syn keyword cType   u_int8_t u_int16_t u_int32_t u_int64_t
>> endif
>>
>> And then add an entry at runtime/doc/syntax.txt below *ft-c-syntax* and 
>> document the variable.
> ah, i see.  i am of course slightly biased in favor of
> having this cType's, but i think for non-bsd people
> this would be mostly a no-op so if the condition is
> desired, an opt-out ("c_no_bsd_types") might be nicer :}
>
For the vast majority, I agree that your new types would not have much
effect.  However, its a big world, and there are bound to be people who
have ginned up their own (conflicting) types.  I agree with Christian
that it should be an optional (c_bsd_types) inclusion.

Regards,
Chip Campbell

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

2016-04-08 Fir de Conversatie Bram Moolenaar

Ken Takata wrote:

> 2016/2/20 Sat 21:56:27 UTC+9 Bram Moolenaar wrote:
> > Patch 7.4.1364
> > Problem:The Win 16 code is not maintained and unused.
> > Solution:   Remove the Win 16 support.
> > Files:  src/gui_w16.c, src/gui_w32.c, src/gui_w48.c, src/Make_w16.mak,
> > src/Makefile, src/Make_cyg_ming.mak, src/Make_mvc.mak,
> > src/proto/gui_w16.pro, src/proto/os_win16.pro, src/guiw16rc.h,
> > src/vim16.rc, src/vim16.def, src/tools16.bmp, src/eval.c,
> > src/gui.c, src/misc2.c, src/option.c, src/os_msdos.c,
> > src/os_mswin.c, src/os_win16.c, src/os_win16.h, src/version.c,
> > src/winclip.c, src/feature.h, src/proto.h, src/vim.h, Filelist
> 
> The following files are also for Win16 and they can be removed now:
> 
>   src/vimtbar.dll
>   src/vimtbar.h
>   src/vimtbar.lib
> 
> (FileList should also be updated.)

Thanks for the hint!

-- 
hundred-and-one symptoms of being an internet addict:
248. You sign your letters with your e-mail address instead of your name.

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

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

2016-04-08 Fir de Conversatie Ken Takata
Hi Bram,

2016/2/20 Sat 21:56:27 UTC+9 Bram Moolenaar wrote:
> Patch 7.4.1364
> Problem:The Win 16 code is not maintained and unused.
> Solution:   Remove the Win 16 support.
> Files:  src/gui_w16.c, src/gui_w32.c, src/gui_w48.c, src/Make_w16.mak,
> src/Makefile, src/Make_cyg_ming.mak, src/Make_mvc.mak,
> src/proto/gui_w16.pro, src/proto/os_win16.pro, src/guiw16rc.h,
> src/vim16.rc, src/vim16.def, src/tools16.bmp, src/eval.c,
> src/gui.c, src/misc2.c, src/option.c, src/os_msdos.c,
> src/os_mswin.c, src/os_win16.c, src/os_win16.h, src/version.c,
> src/winclip.c, src/feature.h, src/proto.h, src/vim.h, Filelist

The following files are also for Win16 and they can be removed now:

  src/vimtbar.dll
  src/vimtbar.h
  src/vimtbar.lib

(FileList should also be updated.)

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.


Patch 7.4.1720

2016-04-08 Fir de Conversatie Bram Moolenaar

Patch 7.4.1720
Problem:Tests fail without the job feature.
Solution:   Skip tests when the job feature is not present.
Files:  src/testdir/test_partial.vim


*** ../vim-7.4.1719/src/testdir/test_partial.vim2016-04-08 
17:07:09.546160667 +0200
--- src/testdir/test_partial.vim2016-04-08 17:23:44.695656664 +0200
***
*** 243,255 
  endfunc
  
  func Test_cycle_partial_job()
!   let job = job_start('echo')
!   call job_setoptions(job, {'exit_cb': function('Ignored', [job])})
!   unlet job
  endfunc
  
  func Test_ref_job_partial_dict()
!   let g:ref_job = job_start('echo')
!   let d = {'a': 'b'}
!   call job_setoptions(g:ref_job, {'exit_cb': function('string', [], d)})
  endfunc
--- 243,259 
  endfunc
  
  func Test_cycle_partial_job()
!   if has('job')
! let job = job_start('echo')
! call job_setoptions(job, {'exit_cb': function('Ignored', [job])})
! unlet job
!   endif
  endfunc
  
  func Test_ref_job_partial_dict()
!   if has('job')
! let g:ref_job = job_start('echo')
! let d = {'a': 'b'}
! call job_setoptions(g:ref_job, {'exit_cb': function('string', [], d)})
!   endif
  endfunc
*** ../vim-7.4.1719/src/version.c   2016-04-08 17:07:09.546160667 +0200
--- src/version.c   2016-04-08 17:24:35.855117280 +0200
***
*** 750,751 
--- 750,753 
  {   /* Add new patch number below this line */
+ /**/
+ 1720,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
247. You use www.switchboard.com instead of dialing 411 and 555-12-12
 for directory assistance.

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

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


Patch 7.4.1719

2016-04-08 Fir de Conversatie Bram Moolenaar

Patch 7.4.1719
Problem:Leaking memory when there is a cycle involving a job and a
partial.
Solution:   Add a copyID to job and channel.  Set references in items referred
by them.  Go through all jobs and channels to find unreferenced
items.  Also, decrement reference counts when garbage collecting.
Files:  src/eval.c, src/channel.c, src/globals.h, src/ops.c,
src/regexp.c, src/tag.c, src/proto/channel.pro,
src/proto/eval.pro, src/testdir/test_partial.vim,
src/structs.h


*** ../vim-7.4.1718/src/eval.c  2016-04-07 22:16:26.484303131 +0200
--- src/eval.c  2016-04-08 16:03:27.602304722 +0200
***
*** 430,435 
--- 430,437 
  static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate);
  static int get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate);
  static int get_list_tv(char_u **arg, typval_T *rettv, int evaluate);
+ static void list_free_contents(list_T  *l);
+ static void list_free_list(list_T  *l);
  static long list_len(list_T *l);
  static int list_equal(list_T *l1, list_T *l2, int ic, int recursive);
  static int dict_equal(dict_T *d1, dict_T *d2, int ic, int recursive);
***
*** 459,464 
--- 461,469 
  static void emsg_funcname(char *ermsg, char_u *name);
  static int non_zero_arg(typval_T *argvars);
  
+ static void dict_free_contents(dict_T *d);
+ static void dict_free_dict(dict_T *d);
+ 
  #ifdef FEAT_FLOAT
  static void f_abs(typval_T *argvars, typval_T *rettv);
  static void f_acos(typval_T *argvars, typval_T *rettv);
***
*** 5589,5595 
{
if (list_append_tv(l, >li_tv) == FAIL)
{
!   list_free(l, TRUE);
return FAIL;
}
item = item->li_next;
--- 5594,5600 
{
if (list_append_tv(l, >li_tv) == FAIL)
{
!   list_free(l);
return FAIL;
}
item = item->li_next;
***
*** 5930,5949 
  }
  
  static void
! partial_free(partial_T *pt, int recursive)
  {
  int i;
  
  for (i = 0; i < pt->pt_argc; ++i)
! {
!   typval_T *tv = >pt_argv[i];
! 
!   if (recursive || (tv->v_type != VAR_DICT && tv->v_type != VAR_LIST))
!   clear_tv(tv);
! }
  vim_free(pt->pt_argv);
! if (recursive)
!   dict_unref(pt->pt_dict);
  func_unref(pt->pt_name);
  vim_free(pt->pt_name);
  vim_free(pt);
--- 5935,5948 
  }
  
  static void
! partial_free(partial_T *pt)
  {
  int i;
  
  for (i = 0; i < pt->pt_argc; ++i)
!   clear_tv(>pt_argv[i]);
  vim_free(pt->pt_argv);
! dict_unref(pt->pt_dict);
  func_unref(pt->pt_name);
  vim_free(pt->pt_name);
  vim_free(pt);
***
*** 5957,5983 
  partial_unref(partial_T *pt)
  {
  if (pt != NULL && --pt->pt_refcount <= 0)
!   partial_free(pt, TRUE);
! }
! 
! /*
!  * Like clear_tv(), but do not free lists or dictionaries.
!  * This is when called via free_unref_items().
!  */
! static void
! clear_tv_no_recurse(typval_T *tv)
! {
! if (tv->v_type == VAR_PARTIAL)
! {
!   partial_T *pt = tv->vval.v_partial;
! 
!   /* We unref the partial but not the dict or any list it
!* refers to. */
!   if (pt != NULL && --pt->pt_refcount == 0)
!   partial_free(pt, FALSE);
! }
! else if (tv->v_type != VAR_LIST && tv->v_type != VAR_DICT)
!   clear_tv(tv);
  }
  
  /*
--- 5956,5962 
  partial_unref(partial_T *pt)
  {
  if (pt != NULL && --pt->pt_refcount <= 0)
!   partial_free(pt);
  }
  
  /*
***
*** 6031,6037 
EMSG2(_("E697: Missing end of List ']': %s"), *arg);
  failret:
if (evaluate)
!   list_free(l, TRUE);
return FAIL;
  }
  
--- 6010,6016 
EMSG2(_("E697: Missing end of List ']': %s"), *arg);
  failret:
if (evaluate)
!   list_free(l);
return FAIL;
  }
  
***
*** 6095,6114 
  list_unref(list_T *l)
  {
  if (l != NULL && --l->lv_refcount <= 0)
!   list_free(l, TRUE);
  }
  
  /*
   * Free a list, including all non-container items it points to.
   * Ignores the reference count.
   */
! void
! list_free(
! list_T  *l,
! int   recurse)/* Free Lists and Dictionaries recursively. */
  {
  listitem_T *item;
  
  /* Remove the list from the list of lists for garbage collection. */
  if (l->lv_used_prev == NULL)
first_list = l->lv_used_next;
--- 6074,6103 
  list_unref(list_T *l)
  {
  if (l != NULL && --l->lv_refcount <= 0)
!   list_free(l);
  }
  
  /*
   * Free a list, including all non-container items it points to.
   * Ignores the reference count.
   */
! static void
! 

Re: BSD specific cType's for syntax highlighting

2016-04-08 Fir de Conversatie frantisek holop
Christian Brabandt, 08 Apr 2016 08:08:
> I don't have any saying in that, but I guess what Bram wants is 
> something like this:
> 
> if exists("c_bsd_types")
> syn keyword cType   u_int8_t u_int16_t u_int32_t u_int64_t
> endif
> 
> And then add an entry at runtime/doc/syntax.txt below *ft-c-syntax* and 
> document the variable.

ah, i see.  i am of course slightly biased in favor of
having this cType's, but i think for non-bsd people
this would be mostly a no-op so if the condition is
desired, an opt-out ("c_no_bsd_types") might be nicer :}

-f
-- 
pi seconds is a nanocentury.

-- 
-- 
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: Compile Error for Z/OS in regexp_nfa.c

2016-04-08 Fir de Conversatie Ralf Schandl

On 29.03.2016 01:27, Owen Leibman wrote:

Porting the current source code (latest stable version vim-7.4.tar.bz2 from 
vim.org download page) to z/OS, I encountered the following problem:
ERROR CCN3052 ./regexp_nfa.c:745   Duplicate case label for value 193. Labels 
must be unique.

There were many other messages for similar errors.

The cause is similar to an error reported and fixed in 2010 
(http://comments.gmane.org/gmane.editors.vim.devel/28288),
although that problem was in regexp.c, not regexp_nfa.c (which is included from 
regexp.c).

I am attaching a patch which allows the compile to proceed in z/OS. The 
resulting executable appears to function correctly.
I have also tested the patch on an ASCII system, where it builds correctly, and 
"make test" reports no errors.

Owen Leibman

This email and any files transmitted with it are confidential, proprietary and 
intended solely for the individual or entity to whom they are addressed. If you 
have received this email in error please delete it immediately.



Owen,

great that you fixed Vim for Z/OS!

Did you also look at the files 	READMEdir/README_os390.txt and 
runtime/doc/os_390.txt? This files were originally written when I first 
ported Vim 15 years ago and weren't much updated since then.


Ralf

--
--
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: Editing vim source through VS

2016-04-08 Fir de Conversatie Christian Brabandt
On Do, 07 Apr 2016, 224182...@qq.com wrote:

> How to set the environment of VS through the vim makefile? Or who can
> share a copy of vim74 of VS to me? Thanks for your pleasant,E-mail
> address is 224182...@qq.com. We can learn coding from each other
> starting with vim74 source,because it is powerful!

Can you please explain what exactly you want? I don't understand this 
request. If you want some visual studio compiled version of Vim, you can 
get it here:
https://github.com/vim/vim-win32-installer/releases

Best,
Christian
-- 
Streiten sich zwei Arbeitskollegen.
"Sie trennt nicht viel von einem Fachidioten."
"Sie haben recht, nur ein Schreibtisch!"

-- 
-- 
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: BSD specific cType's for syntax highlighting

2016-04-08 Fir de Conversatie Christian Brabandt
Hi frantisek!

On Do, 07 Apr 2016, frantisek holop wrote:

> Bram Moolenaar, 07 Apr 2016 22:16:
> > > good day,
> > > 
> > > please find attached a simple patch to add some C types
> > > used on some BSD systems to the C syntax highlighting file.
> > 
> > BSD specific?  Well, I can include them.  Although some people maybe
> > would prefer to do this conditionally?
> 
> yes, the BSD family does have these:
> http://fxr.watson.org/fxr/source/sys/types.h?v=OPENBSD
> 
> the patch actually comes from OpenBSD's local patch
> for the vim package[0], but i think it would be nice
> to have it in vim proper.
> 
> i think the change is very small and mostly
> non-intrusive.  what condition do you have in mind?
> can it be done easily?

I don't have any saying in that, but I guess what Bram wants is 
something like this:

if exists("c_bsd_types")
syn keyword cType   u_int8_t u_int16_t u_int32_t u_int64_t
endif

And then add an entry at runtime/doc/syntax.txt below *ft-c-syntax* and 
document the variable.

Best,
Christian
-- 
Fällt der Bauer auf sein' Stengel, wird's nichts mit dem nächsten Bengel.

-- 
-- 
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 7.5 or Vim 8?

2016-04-08 Fir de Conversatie 单眼皮
+10024

2016-04-05 4:16 GMT+08:00 Christian J. Robinson :

> On Mon, 4 Apr 2016, Bram Moolenaar wrote:
>
> I have been wondering if the next release should be called 7.5 or 8.
>>
>
> I'm inclined to think it should be version 8.
>
> - Christian
>
> --
>   Nurphy's law:  Anything that can't be misspelled will be.
> Christian J. Robinson 
> http://christianrobinson.name/
>

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


Editing vim source through VS

2016-04-08 Fir de Conversatie 224182379
How to set the environment of VS through the vim makefile?
Or who can share a copy of vim74 of VS to me?
Thanks for your pleasant,E-mail address is 224182...@qq.com.
We can learn coding from each other starting with vim74 source,because it is 
powerful!

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