I've been programmin on and off for some time.
But today I saw something I hadnt seen before

Some thing like

void error            OF((const char *msg));
void gz_compress      OF((FILE   *in, gzFile out));
#ifdef USE_MMAP
int  gz_compress_mmap OF((FILE   *in, gzFile out));
#endif
void gz_uncompress    OF((gzFile in, FILE   *out));
void file_compress    OF((char  *file, char *mode));
void file_uncompress  OF((char  *file));
int  main             OF((int argc, char *argv[]));

Can anyone clarify the what the OF does?

thanks

Recommended Answers

All 3 Replies

It's defined on line 166 of http://fxr.googlebit.com/source/lib/libz/zconf.h (same library different site) which is included in zlib.h which your file includes. It checks for this STDC value which I assume means whether the system supports standard C. It seems to expand to a prototype of the functions. I know precious little about *nix, but I was curious myself so hopefully that gives you a head start to find more info on it.

It's defined on line 166 of http://fxr.googlebit.com/source/lib/libz/zconf.h (same library different site) which is included in zlib.h which your file includes. It checks for this STDC value which I assume means whether the system supports standard C. It seems to expand to a prototype of the functions. I know precious little about *nix, but I was curious myself so hopefully that gives you a head start to find more info on it.

Ahh thanks.
That was helpfull :)
btw how did you find this, what did you google?
I had problems finding useful results because of the name "OF"
Thanks again.

Once I found your code and that it included zlib.h I googled for that and got that googlebit.com site. The links within the code on there were nice I could work my way back up the source tree until I got it. Luckily it wasn't too far. Yeah, I googled OF also, but was disappointed (normally it is "smarter" about things like searching for C but it was ignoring () ).
I think I've seen something like this a really old code as I don't think prototypes were required in K+R C (I'm sure someone out there knows a lot more about that than I do).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.