[Try 3] [programs/uninstaller] Check HKCU for uninstall entries

Tom Spear speeddymon at gmail.com
Tue Apr 24 17:14:39 CDT 2007


On 4/24/07, James Hawkins <truiken at gmail.com> wrote:
> On 4/24/07, Tom Spear <speeddymon at gmail.com> wrote:
> > This patch makes the wine uninstaller check HKCU for uninstall entries
> > in addition to HKLM.
> >
>
> +const int numrootkeys = 2;
> +static const DWORD maxSubkeyNameLen = 255;
>
> const variables should be all uppercase to differentiate them from
> non-const variables.  One of the const variables is static and the
> other not, what gives?

Fixed the names to all caps, and removed numrootkeys as it was not used anyways.

> @@ -148,7 +149,6 @@
>                  WINE_ERR( "The remove option requires a parameter.\n");
>                  return 1;
>              }
> -
>              RemoveSpecificProgram( argv[i++] );
>
> Don't make random whitespace changes.

Undid the random whitespace change.  Any others?

> +    for (x=0; x<sizeof(hkeyroot[0]); ++x)
> +    {
>
> sizeof(hkeyroot[0]) = 4, which means you're going to index hkeyroot
> two indexes out of bounds.  I think you're looking for
> sizeof(hkeyroot) / sizeof(hkeyroot[0]).

Fixed

> +               WINE_TRACE("allocated entry #%d: %s (%s), %s\n",
> +                numentries, wine_dbgstr_w(entries[numentries-1].key),
> wine_dbgstr_w(entries[numentries-1].descr),
> wine_dbgstr_w(entries[numentries-1].command));
>
> You mixed tabs and spaces, and that line is too long.

Who originally wrote this damn code and how did it get by you in the
first place?  If it's too long, please give more info on how I can
make it shorter, while still getting the same output.  Especially
since I didnt write that line.

Tab was due to vim, and has been fixed.


New patch attached.
> --
> James Hawkins
>


-- 
Thanks

Tom

Check out this new 3D Instant Messenger called IMVU.  It's the best I
have seen yet!



http://imvu.com/catalog/web_invitation.php?userId=1547373&from=power-email
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uninstaller.patch
Type: application/octet-stream
Size: 8409 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070424/89663e8b/uninstaller-0001.obj


More information about the wine-devel mailing list