Connecting Tech Pros Worldwide Forums | Help | Site Map

WTF is this?

Psymaster
Guest
 
Posts: n/a
#1: Jul 19 '05
extern unzFile ZEXPORT unzOpen OF((const char *path));


What is this mess? It's from the zlib source.

Victor Bazarov
Guest
 
Posts: n/a
#2: Jul 19 '05

re: WTF is this?


"Psymaster" <nosmapplease@somewhere.com> wrote...[color=blue]
> extern unzFile ZEXPORT unzOpen OF((const char *path));
>
>
> What is this mess? It's from the zlib source.[/color]

How the F should we know? Search the headers.

If I had to guess, the 'ZEXPORT' is a macro expanding into
some kind of compiler-specific nonsense like "__dllexport"
and 'OF' is a macro expanding into a function declaration
(or only the parameter list). 'unzFile' can be the return
value type, and 'unzOpen' is the actual name of the function
(if 'OF' is the function header without the name).

Victor


Medi Montaseri
Guest
 
Posts: n/a
#3: Jul 19 '05

re: WTF is this?


"Victor Bazarov" <v.Abazarov@attAbi.com> wrote in message news:<vil9vh82v92mc9@corp.supernews.com>...[color=blue]
> "Psymaster" <nosmapplease@somewhere.com> wrote...[color=green]
> > extern unzFile ZEXPORT unzOpen OF((const char *path));
> >
> >
> > What is this mess? It's from the zlib source.[/color]
>
> How the F should we know? Search the headers.
>
> If I had to guess, the 'ZEXPORT' is a macro expanding into
> some kind of compiler-specific nonsense like "__dllexport"
> and 'OF' is a macro expanding into a function declaration
> (or only the parameter list). 'unzFile' can be the return
> value type, and 'unzOpen' is the actual name of the function
> (if 'OF' is the function header without the name).
>
> Victor[/color]

Run the source code thru the CPP and see what you get. gcc -E could do that as well.
Psymaster
Guest
 
Posts: n/a
#4: Jul 19 '05

re: WTF is this?


Andrey Tarasevich <andreytarasevich@hotmail.com> wrote on
Sat, 02 Aug 2003 00:48:03 GMT in comp.lang.c++:
[color=blue]
> The latter is used with older versions of C compiler
> (K&R), which don't expect to see parameter list in function
> prototypes.
>[/color]

Thanks a lot for the reply, it seems everything is what you
guessed.
Closed Thread