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

Pierre Joye pierre.php at xxxxx
Mon Feb 18 17:35:19 UTC 2008


Hi Enrico,

On Feb 18, 2008 6:18 PM, Enrico Tröger <enrico.troeger at uvena.de> wrote:
> On Mon, 18 Feb 2008 16:45:46 +0100, "Pierre Joye"
> <pierre.php at gmail.com> wrote:
>
> Hi,
>
> > Here is a first draft version of VCDiff windows support. It behaves
> Cool, looks fine.
> There seems to be a little problem with the "Diff from current file"
> action: it seems it generates always a diff from the directory of the
> current file instead of the current file itself.

I don't understand what you mean, the two "current file"s confuse me :)


> I didn't do much testing but I guess it's only a small error.
>
> > It uses its own spawn functions based on CreateProcess and CreatePipe.
> > Ideally we may create a common wrapper for all platform specific spawn
> > (until glib works correctly). It is not yet complete as I was not sure
> Yes, this would be a good idea and especially to save duplicate code
> because we need your code in Geany, in the vcdiff plugin and Frank and
> Yura probably want to use it also in their GeanyVC plugin. Not to
> mention any other plugins which want to execute some programs on
> Windows.
> Maybe we should put your code into src/win32.c. And we create a wrapper
> function for g_spawn_sync() and g_spawn_async() which just call these
> functions on non-Windows systems, else the Win32 specific versions.
> Could you also create a geany_w32_spawn_async()?

I first tried to do that but win32 functions are not exported and thus
not callable by plugins. It will require a dllexport first (and
probably some def files too). However I agree, the win32 function fits
best there. The "geany_spawn_async()" may be put somewhere else,
cmd_invoke.c and exposed (for the plugins), thoughts?

> And we should file a bug report in GLib's bugzilla.

Yes, I will have to create a small app to reproduce the problem and
see if it is fixable in glib.

> > about the error management in geany,. I use mix of printf and dialog
> > boxes for now. What is the common method to tell the user that
> > something went wrong? And which kind of error (or level of details) do
> > we display?
> We never defined explicit rules for displaying error messages, but in
> general it's something like this:
> - real errors (ongoing action could not be performed): dialog box
> - common errors & warnings (action could not performed completely or not
> as expected): status bar
> - all other things should go to the conosle with geany_debug().

Ah did not know about geany_debug, thanks!

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



More information about the Users mailing list