Hello Markus,

On Tue, Dec 09, 2008 at 01:41:37AM +0100, Markus Heidelberg wrote:
> 
> Birgi Tamersoy, 08.12.2008:
> > Hello Everybody,
> > 
> > I fixed this problem with a simple patch. I also had to add something to
> > the Makefile. I decided to separate the Vim source tree patches related
> > to CodeCheck from the direct code_check.c patches. That is why I am
> > attaching two files. Please let me know if this is not a good idea, or
> > there is another common way of doing it. I will fix it accordingly.
> 
> What's the benefit from splitting up the patch?
> 
I initially thought having a separate list of patches to code_check.c
will be cleaner, at least until the project gets mature enough. But, I
just realized that it will make things much more complex for the users.

> Yet some comments. After discussion I will include the fixes.
> 
> > +++ code_check.c    2008-12-08 10:59:10.000000000 -0600
> > @@ -361,7 +363,9 @@
> >   */
> >      void
> >  cc_update_screen(void) {
> > +#ifdef FEAT_GUI
> >      if (!gui.in_use) {
> > +#endif
> >     /* in console mode updating the screen from the worker thread
> >      * does not cause any problems. */
> >     update_topline();
> > @@ -370,6 +374,7 @@
> >     setcursor();
> >     cursor_on();
> >     out_flush();
> > +#ifdef FEAT_GUI
> >      } else {
> >     /* updating the screen in gui mode is troublesome. */
> >     char_u  bytes[3];
> > @@ -380,6 +385,7 @@
> >  
> >     add_to_input_buf(bytes, 3);
> >      }
> > +#endif
> >  }
> >  
> >  /*
> 
> Why not interchanging the "then" and "else" path?
> 
I did not see any clear advantage in doing that. Do you think it will be
more readable?

> 
> > +++ Makefile        2008-12-08 11:45:56.000000000 -0600
> > @@ -1363,6 +1363,9 @@
> >  
> >  TAGS_INCL = *.h
> >  
> > +# CodeCheck requires the pthreads library.
> > +EXTRA_LIBS = -lpthread
> > +
> >  BASIC_SRC = \
> >     buffer.c \
> >     charset.c \
> 
> Is this needed? It already linked and worked without it. And doesn't
> this break linking on systems without pthread?
> 
This is actually needed in the ``./configure --disable-gui'' option.
Previously it was linking because, one of the gui libraries was
including the pthread library.

However you are right, it will break in systems without pthread. 

I will try to come up with a clean solution to this library problem
and create a new combined patch.

Thanks,
-- 
Birgi

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui