delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <3C18250F.8A2569BF@beamreachnetworks.com> |
Date: | Wed, 12 Dec 2001 19:48:31 -0800 |
From: | "Eric M. Monsler" <emonsler AT beamreachnetworks DOT com> |
X-Mailer: | Mozilla 4.76 [en] (WinNT; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | rahul_cali_us AT yahoo DOT com |
CC: | "Cygwin AT Cygwin. Com" <cygwin AT cygwin DOT com> |
Subject: | Re: help needed in fixing C programming error using cygwin ! |
References: | <MPEEJLCLNNBJGHJEPBAFOEGOCMAA DOT rahul_cali_us AT yahoo DOT 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |