From: Steffen Prohaska Date: Sat, 12 Jul 2008 06:45:08 GMT Subject: Re: [PATCH 3/3 FIXED] help (Windows): Display HTML in default browser using Windows' shell API Message-ID: <8D150442-8B57-4025-9110-BC4C23C2310C@zib.de> In-Reply-To: <7vtzevhjf8.fsf@gitster.siamese.dyndns.org> On Jul 12, 2008, at 5:26 AM, Junio C Hamano wrote: > Steffen Prohaska writes: > >> diff --git a/compat/mingw.c b/compat/mingw.c >> index 3a05fe7..0ca73f7 100644 >> --- a/compat/mingw.c >> +++ b/compat/mingw.c >> @@ -1017,3 +1017,24 @@ sig_handler_t mingw_signal(int sig, >> sig_handler_t handler) >> ... >> +void mingw_open_html(const char *unixpath) >> +{ >> + const char *htmlpath = make_backslash_path(unixpath); >> + printf("Launching default browser to display HTML ...\n"); >> + ShellExecute(NULL, "open", htmlpath, NULL, "\\", 0); >> +} > > Do you mean to have that printf() or is it a leftover debugging > statement? I mean to have it. It takes some time until a fresh browser starts up if no browser has been running before. Impatient people (like me) could start believing that nothing would happen. But this certainly depends on your machine. I run Windows inside a virtual machine on a Laptop, which is probably rather slow compared to a desktop machine running Windows natively. Steffen