This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mount command and text/binary mode


Hi!

Tuesday, 03 April, 2001 Earnie Boyd earnie_boyd@yahoo.com wrote:

>> >Another thing was mine program (it was waiting for stdin and sends
>> >encrypted file to output) in command line works correctly, but from
>> >tcl interpreter it isn't.
>> 
>> tcl isn't a cygwin program, unfortunately.  So it doesn't adhere to
>> cygwin rules.
>> 

EB> Correct, however, you may be helped by adding the `binmode' option to
EB> the CYGWIN environment variable before starting any Cygwin processes.

it's also possible to set modes in your program on per file basis, like this:

#include <io.h>
#include <sys/fcntl.h>
...
int main (int argc, char** argv)
{
  ...
  setmode (0, O_BINARY); /* set stdin mode to binary */
  setmode (1, O_TEXT);
  setmode (2, O_TEXT);   /* while stdout and stderr to text */
  ...
}

of course, in your case, particular modes may be different.

egor.            mailto:deo@logos-m.ru icq 5165414 fidonet 2:5020/496.19



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]