[Geany] [Patch] draft version of vcdiff support on win32

Pierre Joye pierre.php at xxxxx
Sat Feb 23 17:57:41 UTC 2008


Hi Enrico,

On Sat, Feb 23, 2008 at 6:32 PM, Enrico Tröger <enrico.troeger at uvena.de> wrote:

>  > I can wait a lot, I use sources on both windows and unix :)
>  Finally, I added the code to my local working copy and I'll commit the
>  code soon (the Subversion repository at Sourceforge is currently not
>  accessible).

That's great news, thanks!

>  Changes:
>  - renamed geany_w32_spawn_sync in win32_spawn
>  - added utils_spawn_async() which calls g_spawn_async() on non-Win32
>  systems, else it calls win32_spawn (for now)
>  - added GError argument to utils_spawn_* functions

What does it do on windows? We may add getLastError and create a
GError from its content (have to see what exactly is a GError :)

>  - made helper functions in win32.c static
>  - some little coding style changes, just cosmetics
>
>  Questions:
>  You told win32_spawn() always creates processes asynchronous? If so, it
>  should be ok to use it for g_spawn_sync and g_spawn_async calls, right?
>  I must admit I didn't test the code much, yet.

on Windows? They don't work in a reliable way, that's the problem. But
the same base code can be used for both functions yes. That's what
does glib too as far as I can see.

>  Do you think it's possible to create g_spawn_async_with_pipes() on
>  Windows?

It is possible yes, I use a similar solution already to fetch the
content. It uses pipes for the stdin/out/err.

> We use the _with_pipes variant for the whole Build system code
>  as well as for the Custom commands and Find in Files search. This
>  doesn't need to be exported to the plugin API but it would be really
>  useful in Geany itself. But only if you like to and if you have time
>  for it.

Yes, I can do it as well and add support for the async versions of the
glib spawn functions. I can do it once I had the time to look closer
to the existing geany code and how it works :)

The same spawn_with_pipes may be used to have a shell on windows, but
my little tests are not yet ready for public reviews.

Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org



More information about the Users mailing list