Hi,

On Tue, 22 Jan 2008, Kirill wrote:

> It is totally possible that I missed a group/list/site, dedicated to 
> Git-Cheetah project. If so, could you please point me in the right 
> direction?

There is none.  So it makes sense to discuss cheetah here.

> Long story short, I came up with three patches, but have slim-to-none
> idea what to do with them [besides bugging the whole msysGit group].

That's fine by me!

> Could somebody explain me what to do next?

The best thing to do: just push to the "mob" branch:

        $ git config remote.mob.url ssh://[EMAIL PROTECTED]/git-cheetah.git/
        ยง git push mob master:mob

(That assumes that your current branch is "master"; the first line is only 
necessary the first time you do it.)

> truth to be told, English is a foreign language to me too :)

Heh; that seems to apply to most of us, here.

> Also, I've got couple more questions.
> 1. It seems like the code is mixing C Run-Time and Win32 API. Is there
> a reason to not settle with one set of API? E.g. mbstowcs is in CRT,
> lstrcpynW is in Win32; why not strncpy?

Basically because I am way more familiar with standard C libraries.  Is 
there a performance hit, or any other problem with mixing them?

> 2. Could someone please review the following patch (size is the size
> of a string buffer, passed to IContextMenu::GetCommandString):
> diff --git a/menu.c b/menu.c
> index 544be7e..53a1190 100644
> --- a/menu.c
> +++ b/menu.c
> @@ -185,9 +185,9 @@ static STDMETHODIMP get_command_string(void *p, UINT id,
>                 LPWSTR tw = malloc((strlen(text)+1)*sizeof(wchar_t));
>                 mbstowcs(tw, text, strlen(text));
>                 if (flags & GCS_UNICODE)
> -                       lstrcpynW((LPWSTR)name, tw, size);
> +                       lstrcpynW((LPWSTR)name, tw, strlen(text));
>                 else
> -                       lstrcpynA(name, text, size);
> +                       lstrcpynA(name, text, strlen(text));
>                 free(tw);
>                 return S_OK;
>         }

I _think_ that you are correct.  But would it not be _even_ nicer to say 
"len = strlen(text);" before it all, and use that variable?  Looks more 
elegant IMHO.

Thanks for working on cheetah!
Dscho

Reply via email to