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

Kirill K. Smirnov lich at math.spbu.ru
Sun Nov 19 04:55:53 CST 2006


В сообщении от 19 ноября 2006 10:37 вы написали:

> 1/ you forgot to include the changes (at least) to hlpfile.h
Thanks! I've messed a little.

> 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
I messed here too...

Also, I stumbled upon the following problem: HLPFILE_FreeCnt is never called! 
There is something bad with hlpfile->wRefCount - it's 4 (!) instead of 1 
after just opening and closing file.

--Kirill K. Smirnov



More information about the wine-devel mailing list