winhelp: add preliminary *.cnt file support (parser)

Eric Pouech eric.pouech at wanadoo.fr
Sun Nov 19 01:37:47 CST 2006


Kirill K. Smirnov a écrit :
>   ChangeLog:
>     Add preliminary *.cnt file support (parser)
>   
Hi Kirill,
good to see someone enhancing winhelp!!
a few comments though about your patch

1/ you forgot to include the changes (at least) to hlpfile.h
2/ internal function definitions
> +static BOOL  HLPFILE_ReadCntFile(HLPFILE*);
> +static void  HLPFILE_FreeCnt(HLPFILE_CNT*);
>   
I think those two functions are not correctly designed... I'd more 
likely see something like:

+static HLPFILE_CNT*  HLPFILE_ReadCntFile(const char*);
+static void  HLPFILE_FreeCnt(HLPFILE_CNT*);

this makes the two functions consistent in what they depend on (either 
both of them are passed a HLPFILE* or none of them), and also allows to 
return the newly created HLPFILE_CNT which you never store in HLPFILE
3/ don't use C++ comments in C code
> +            if (cur->level == entry->level) // level exists
> +            {
> +                entry->parent = cur->parent;
> +                cur->next = entry;
> +            }
> +            else // entry on new level
>   
A+



More information about the wine-devel mailing list