[cc65] cr/lf translation?

Date view Thread view Subject view

From: MagerValp (MagerValp_at_cling.gu.se)
Date: 2002-07-12 02:47:31


I started porting the Serial Slave tools to C (the tools need a
rewrite), and I ran into a weird issue with cr and lf:

  if (sendstring("<$\r\n") != OK) {
    return(ERROR);
  }

gives me 3c 24 0a 0d 00 as the string. Fair enough. So I changed it to

  if (sendstring("<$\x0d\x0a") != OK) {
    return(ERROR);
  }

but that also gave me 3c 24 0a 0d 00 as the string. Surely, this can't
be right? Oh well, \n\r works, but it looks weird...

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp_at_cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-07-12 02:53:15 CEST