This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: help needed in fixing C programming error using cygwin !
- From: "Eric M. Monsler" <emonsler at beamreachnetworks dot com>
- To: rahul_cali_us at yahoo dot com
- Cc: "Cygwin at Cygwin dot Com" <cygwin at cygwin dot com>
- Date: Wed, 12 Dec 2001 19:48:31 -0800
- Subject: Re: help needed in fixing C programming error using cygwin !
- References: <MPEEJLCLNNBJGHJEPBAFOEGOCMAA.rahul_cali_us@yahoo.com>
Don't use strings for binary data.
Use an explicit character array, keeping track of the length yourself.
When you send it to a device, you'll have to use read/write rather than
string operations.
It does seem convenient to use string functions, but you'll never get
around the magic nature of null characters without more trouble than it
is worth. I went through this doing messaging across a serial port.
Eric M. Monsler
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/