> On Tuesday 19 December 2000 7:39 pm, you wrote:
>
> Wow. I'm impressed, that was *quick*.
Well, it took almost 3 hours (debugging regexps takes time),
so it was not that quick. Of course if hadn't borrowed 95%
of the code from winapi_check it would have taken _much_ longer.
> > It is a little more complicated than that.
> > You can have comments in the prototype and
> > all sort of nasty things.
>
> Yeah, its well above my level. I never got past small mods to
> other peoples
> scripts myself. Theres always times I wish I knew Perl better
> though (and awk
> too, come to think of it).
Why do you wish to know awk (except to read awk applications)?
Perl is much better.
> > Note that it uses heuristics (the bad kind) which means that
> > it will only work and/or produce the correct result for
> > reasonable input.
>
> Thats fair enough, the idea is only to save a lot of typing.
> If you have to
> add some functions by hand you still save a lot of work...
The big problem is that is crashes for some input files.
It can be fixed but must often be so in case by case basis.
This currently happens in about 1% of the files I have tested
and fixing it was non-trivial so I haven't done it yet.
Also strange function protypes that can't be identified as such
are simple skipped and it is hard for me to know if that happends.
Please report to me if you find any.
But as you say 100% perfection isn't needed.
> > Was this what you had in mind?
>
> Exactly, except that it returns multiple lines if there is
> more than one
> instance of the declaration (as silly MS are want to do). I
> can easily work
> around that though.
Yes, it just outputs data as it finds it.
Also note that it can't handle preprocessor
directives so that can sometimes make functions
be outputed twice because of that.
Anyway I'm not sure it really should handle such things.
After all you can alway use sort and uniq or
a simple perl script. It isn't very useful
at its current form so some formating is needed anyway.
> I'm putting the code in to call it now.
> Thanks a *lot* !!
>
> Cheers,
> Jon (back when I have something working..)
Your welcome.