public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Rahul" <rahul_cali_us@yahoo.com>
To: "Cygwin@Cygwin. Com" <cygwin@cygwin.com>
Subject: help needed in fixing C programming error using cygwin !
Date: Wed, 12 Dec 2001 18:05:00 -0000	[thread overview]
Message-ID: <MPEEJLCLNNBJGHJEPBAFOEGOCMAA.rahul_cali_us@yahoo.com> (raw)

Hi,

I am sorry for this little email, I failed to find any help anywhere else so
I am sending it to you guyz.

I am calculating LRC character and appending it at end of a string. It works
fine, except when the character is null.
i.e.. when (int)lrc = 0

This string is to be send to a modem port and I cannot figure out how to do
it. I am using cygwin and gcc compiler for this program.


Sample: Say "xmessage" is a big string of size 216 which already contain
some ASCII data.
I calculate LRC character,
then create a new string,
append STX to the new string,
followed by xmessage and
at end I append storelrc.
Problem : When LRC int value is 0 (zero) it do not get appended to message.
Part of program is below.
/* Now define LRC character */
auto char lrc='a';
auto char storelrc[2]="";
int I;
/* calculate lrc */
for(lrc=xmessage[0], I=1; xmessage[i]; I++) lrc^=xmessage[i];
/* and copy the LRC stored in lrc to storelrc variable */
(void) sprintf(storelrc,"");
(void) sprintf(storelrc,"%c", lrc);
/* create send message */
auto char revmesg[96];
(void) sprintf(revmesg, "");
(void) sprintf(revmesg, "%c" , STX);
(void) strcat(revmesg,xmessage);
/* will not work if (int)lrc is zero */
(void) strcat(revmesg,storelrc);
....
........


I appreciate any suggestions. Please accept my apology if you find it off
the topic.

Feedback
*********

Also there is a feedback on cygwin from my experience. It looks great works
good. But for newbies the installer lay out is very confusing. When we start
installer and it shows the screen from where one can choose what all
packages we want to download, source code etc .. the options are very
confusing and it seems lot of stuff is put on one single screen. It needs
few hit and trial to figure out  how to change options. Also the cygwin
desktop icon can be made a little more "sexier", Now that I am fan of
cygwin, I want its icon to look better than windows icons ... LOL ;-) For
Redhat it should not be a big deal to improve the graphics of a tiny icon.
Thanks for listening.

Regards,
Rahul




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
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/

             reply	other threads:[~2001-12-13  1:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-12 18:05 Rahul [this message]
2001-12-12 19:24 ` Jerrold Heyman
2001-12-12 20:48 ` Eric M. Monsler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MPEEJLCLNNBJGHJEPBAFOEGOCMAA.rahul_cali_us@yahoo.com \
    --to=rahul_cali_us@yahoo.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).