winebuild & (name, heap, init)

Patrik Stridvall ps at
Wed Sep 11 09:16:58 CDT 2002

> On September 11, 2002 06:18 am, Patrik Stridvall wrote:
> > However I might be able to write a very specialized parser, that
> > pipes the .c files through the C preprosessor, that work all of the
> > time, but this is quite some work as well.
> But we shouldn't need that. Wine has a very good strucutre right now,
> and were that's broken, we can fix...

Sure. But what would tell you that it was broken?

winapi_check currently, among other thing, compares
the .spec files with the source code.

When it reports something there are three possibillities
1. winapi_check is broken (because the code doesn't have good structure)
2. the .spec file is broken
3. the .c file is broken

Currently I check manually and I try to make an educated guess of which
is the cases and then fix it.

If you extract the information from the source you don't have that luxury.
If it misses a function or have some other bug you have no backup.

Since the .spec files exists winapi_check knows what functions it is
expected to find in the source code and if is doesn't it reports it.

So if for example we have function Foo that looks like.

#define HELPER(x,y,z) DWORD WINAPI x(y arg1, z *arg1)

  /* ... */

winapi_check will miss it (since it in an ad hoc parser), but
since Bar is declared in some .spec file it will complain
that Bar was never found. Then I manually search the source,
and try to fix the problem somehow.

If you on the other hand extract the .spec files (of .def files)
from the source the function Bar would be missed and you would
never detect it...

That is why the parser needs to be so good that it "always" works.

More information about the wine-devel mailing list