[vorbis-dev] RE: vorbis under win32

Monty xiphmont at xiph.org
Tue Nov 16 21:03:47 PST 1999



> One of the "best" examples is writing a binary file to stdout:
> 
>     if (!strcmp(bs_filenam, "-")) {
>       /* Write to standard output. */
> #ifdef __EMX__
>       _fsetmode(stdout,"b");
> #elif (defined  __BORLANDC__)
>       setmode(_fileno(stdout), O_BINARY);
> #elif (defined  __CYGWIN__)
>       setmode(fileno(stdout), _O_BINARY);
> #elif (defined _WIN32)
>       _setmode(_fileno(stdout), _O_BINARY);
> #endif
>       bs->pt = stdout;

My that's ugly.  Thanks for the tip Mark :-)

Monty

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list