msi [1/5]: Implement MsiDatabaseImport

Alexandre Julliard julliard at winehq.org
Tue Sep 26 13:08:41 CDT 2006


"James Hawkins" <truiken at gmail.com> writes:

> +static const WCHAR insert_fmts[][100] =
> +{
> +    {'I','N','S','E','R','T',' ','I','N','T','O',' ','`','%','s','`',' ','(',' ',0},
> +    {'`','%','s','`',',',' ',0},
> +    {' ',')',' ','V','A','L','U','E','S',' ','(',' ',0},
> +    {'\'','%','s','\'',',',' ',0},
> +    {'%','s',',',' ',0},
> +    {' ',')',0},
> +};

It would be cleaner to use separate variables for the separate
strings, there's no reason this needs to be an array. It would avoid
wasting a lot of space, and make it more explicit what the strings
mean, unlike something like insert_fmts[3]. Also since all you do is
copy strings, it may be even cleaner to avoid sprintf and simply
strcat the strings and the separators.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list