"Vitaly Perov" <[EMAIL PROTECTED]> 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. 



Reply via email to