cabinet.dll -> FDICopy: Test added

Dmitry Timoshkov dmitry at codeweavers.com
Mon Mar 17 10:36:42 CDT 2008


"Vitaly Perov" <vitperov at etersoft.ru> wrote:

> +void CreateEmptyCab(void)
> +{
> +    static char file_array [] = {77, 83, 67, 70, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 3, 1, 
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

It should be 'static const char' ?

> +    FILE* fp;
> +    int i;
> +
> +    fp = fopen("test1.cab", "wb" );
> +   if (!fp) trace("Can't create file test1.cab\n");

That should be an assert.

> +    for (i = 0; i < sizeof(file_array); i++)
> +        fputc(file_array[i], fp);

What about fwrite?

> +    fclose(fp);
> +}

Functions you add should be static. Use Win32 APIs to create a temporary
file. Set tab size to 8, and avoid using tabs to indent code at all. Avoid
trailing spaces.


-- 
Dmitry. 




More information about the wine-devel mailing list