Dominique Pellé | 14 Feb 20:24 2016
Picon

[patch] fixed compilation warning in os_unix.c

Hi

Attached patch fixes this compilation warning with vim-7.4.1318:

os_unix.c:5126:8: warning: ‘channel’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
     if (channel != NULL)
        ^

It's a real bug, since there is a path where channel_free(channel);
could be called on an uninitialized channel variable.

Regards
Dominique

-- 
--

-- 
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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Christian J. Robinson | 14 Feb 19:47 2016
Picon
Gravatar

Small channel.c patch


One of the latest patches made compiling fail. Attached patch fixes 
it.

- Christian

--

-- 
 		      Entropy isn't what it used to be.
Christian J. Robinson <heptite <at> gmail.com>      http://christianrobinson.name/
Attachment (channel.c.patch): application/octet-stream, 399 bytes
Bram Moolenaar | 14 Feb 19:13 2016
Picon
Picon

Patch 7.4.1318


Patch 7.4.1318
Problem:    Channel with pipes doesn't work in GUI.
Solution:   Register input handlers for pipes.
Files:      src/structs.h, src/feature.h, src/channel.c, src/eval.c,
            src/os_unix.c, src/os_win32.c, src/gui_w48.c, src/proto/channel.pro

*** ../vim-7.4.1317/src/structs.h	2016-02-13 23:22:35.077363718 +0100
--- src/structs.h	2016-02-14 19:05:06.792167742 +0100
***************
*** 1301,1335 ****
      MODE_JS
  } ch_mode_T;

! struct channel_S {
!     channel_T	*ch_next;
!     channel_T	*ch_prev;
! 
!     int		ch_id;		/* ID of the channel */

!     sock_T	ch_sock;	/* the socket, -1 for a closed channel */

  #ifdef UNIX
  # define CHANNEL_PIPES
-     int		ch_in;		/* stdin of the job, -1 if not used */
-     int		ch_out;		/* stdout of the job, -1 if not used */
-     int		ch_err;		/* stderr of the job, -1 if not used */

! # if defined(UNIX) && !defined(HAVE_SELECT)
!     int		ch_sock_idx;	/* used by channel_poll_setup() */
(Continue reading)

mattn | 14 Feb 14:17 2016
Picon
Gravatar

NETBEANS is not required when CHANNEL is defined

Hi,

When set CHANNEL=yes for make, libwsock32.a should be linked on windows.

diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak
index 026c966..4bca8be 100644
--- a/src/Make_cyg_ming.mak
+++ b/src/Make_cyg_ming.mak
 <at>  <at>  -689,10 +689,8  <at>  <at>  endif

 ifeq ($(CHANNEL),yes)
 OBJ += $(OUTDIR)/channel.o
-ifneq ($(NETBEANS),yes)
 LIB += -lwsock32
 endif
-endif

 ifeq ($(DIRECTX),yes)
 # Only allow DIRECTX for a GUI build.

-- 
--

-- 
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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
(Continue reading)

Bram Moolenaar | 14 Feb 00:20 2016
Picon
Picon

Patch 7.4.1317


Patch 7.4.1317
Problem:    MS-Windows: channel test fails.
Solution:   Temporarily disable Test_connect_waittime().
Files:      src/testdir/test_channel.vim

*** ../vim-7.4.1316/src/testdir/test_channel.vim	2016-02-13 23:28:17.637753771 +0100
--- src/testdir/test_channel.vim	2016-02-14 00:18:35.253838685 +0100
***************
*** 252,257 ****
--- 252,261 ----

  " Test that trying to connect to a non-existing port fails quickly.
  func Test_connect_waittime()
+   if !has('unix')
+     " TODO: Make this work again for MS-Windows.
+     return
+   endif
    let start = reltime()
    let handle = ch_open('localhost:9876', s:chopt)
    if ch_status(handle) == "fail"
*** ../vim-7.4.1316/src/version.c	2016-02-13 23:50:03.743961279 +0100
--- src/version.c	2016-02-14 00:17:56.482249754 +0100
***************
*** 749,750 ****
--- 749,752 ----
  {   /* Add new patch number below this line */
+ /**/
+     1317,
  /**/
(Continue reading)

Bram Moolenaar | 13 Feb 23:58 2016
Picon
Picon

Re: Channel & job design


Marcin Szamotulski wrote:

> > > That's a really great feature.  I am trying to implemented a gulp plugin
> > > (gulp is a node package used to build web apps) based on channels and
> > > there are two things that I has a problem with:
> > 
> > Thanks for the feedback.  Keep in mind that the feature is still being
> > developed.  Some things may just be missing.  But there can also be bugs
> > and things that don't work for you, so feedback is useful anyway.
> 
> Yes I understand that, the idea is to contribute to the development in
> some fruitful way.

Note that the type of the channel handle has changed.  That mainly
matters for when checking whether ch_open() worked.

> > > 1) when I use `job_start()` to start a server in the background and
> > > immediately after I call `ch_open()` to open channel to that server I am
> > > always refused: `E896: read from channel: Connection refused`.
> > > 
> > > However, if I check `job_status` in between (which is what
> > > I should do anyway), then the following `ch_open` runs fine.  There is
> > > no way now to communicate from the job that started that what it runs is
> > > ready to connect to.
> > 
> > It's normal for a process to have some initialization time before the
> > socket is ready for use.  This is implemented, it already existed for
> > netbeans.  Did you add a "waittime" argument?  The default is zero.
> 
(Continue reading)

Dominique Pellé | 13 Feb 23:51 2016
Picon

Updated Esperanto translation of Vim-7.4.1315

Hi

I've updated the Esperanto translation (src/po/eo.po)
with the latest Vim-7.4.1315. See attachment.

Regards
Dominique

-- 
--

-- 
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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Attachment (eo.po): text/x-gettext-translation, 237 KiB
Bram Moolenaar | 13 Feb 23:50 2016
Picon
Picon

Patch 7.4.1316


Patch 7.4.1316
Problem:    Can't build MS-Windows console version. (Tux)
Solution:   Add #ifdefs.
Files:      src/eval.c

*** ../vim-7.4.1315/src/eval.c	2016-02-13 23:22:35.089363591 +0100
--- src/eval.c	2016-02-13 23:48:00.729265261 +0100
***************
*** 627,633 ****
--- 627,635 ----
  static void f_islocked(typval_T *argvars, typval_T *rettv);
  static void f_items(typval_T *argvars, typval_T *rettv);
  #ifdef FEAT_JOB
+ # ifdef FEAT_CHANNEL
  static void f_job_getchannel(typval_T *argvars, typval_T *rettv);
+ # endif
  static void f_job_start(typval_T *argvars, typval_T *rettv);
  static void f_job_stop(typval_T *argvars, typval_T *rettv);
  static void f_job_status(typval_T *argvars, typval_T *rettv);
***************
*** 7741,7746 ****
--- 7743,7749 ----
      static void
  job_free(job_T *job)
  {
+ # ifdef FEAT_CHANNEL
      if (job->jv_channel != NULL)
      {
  	/* The channel doesn't count as a references for the job, we need to
(Continue reading)

Bram Moolenaar | 13 Feb 23:27 2016
Picon
Picon

Patch 7.4.1315


NOTE: The type that ch_open() returns changed from a number to Channel.

Patch 7.4.1315
Problem:    Using a channel handle does not allow for freeing it when unused.
Solution:   Add the Channel variable type.
Files:      src/structs.h, src/channel.c, src/misc2.c, src/eval.c,
            src/if_python.c, src/if_python3.c, src/json.c, src/gui_w48.c,
            src/netbeans.c, src/proto/channel.pro, src/os_unix.c,
	    src/testdir/test_channel.py, src/testdir/test_channel.vim


*** ../vim-7.4.1314/src/structs.h	2016-02-13 17:04:08.426819018 +0100
--- src/structs.h	2016-02-13 22:08:28.312195961 +0100
***************
*** 1127,1133 ****
      VAR_DICT,	 /* "v_dict" is used */
      VAR_FLOAT,	 /* "v_float" is used */
      VAR_SPECIAL, /* "v_number" is used */
!     VAR_JOB	 /* "v_job" is used */
  } vartype_T;
  
  /*
--- 1127,1134 ----
      VAR_DICT,	 /* "v_dict" is used */
      VAR_FLOAT,	 /* "v_float" is used */
      VAR_SPECIAL, /* "v_number" is used */
!     VAR_JOB,	 /* "v_job" is used */
!     VAR_CHANNEL	 /* "v_channel" is used */
  } vartype_T;
(Continue reading)

Bram Moolenaar | 13 Feb 22:09 2016
Picon
Picon

Re: [patch] fixed grammatical mistakes in src/testdir/README.txt


Dominique wrote:

> Attached patch fixes grammatical mistakes in src/testdir/README.txt.

Thanks!

-- 
If you're sending someone Styrofoam, what do you pack it in?

 /// Bram Moolenaar -- Bram <at> 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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian Brabandt | 13 Feb 22:00 2016

[patch] document undo_indent variable

Bram,
it seems b:undo_indent variable is undocumented. So here is a patch for 
that.

Best,
Christian
-- 
Hallo Lindenstraßen-Gucker!

-- 
--

-- 
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+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Attachment (undo_indent_doc.diff): text/x-diff, 725 bytes

Gmane