home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19272 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  856 b 

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wupost!waikato.ac.nz!comp.vuw.ac.nz!grace.cri.nz!zephyr.grace.cri.nz!zephyr.grace.cri.nz!usenet
  2. Newsgroups: comp.lang.c
  3. Subject: Hex escaping in strings, (porting from gcc to cc)
  4. Message-ID: <1ifpjnINNkck@zephyr.grace.cri.nz>
  5. From: chrisp@grace.cri.nz
  6. Date: Tue,  5 Jan 93 23:21:59 GMT
  7. Organization: Industrial Research Ltd., New Zealand.
  8. NNTP-Posting-Host: grv.grace.cri.nz
  9. Lines: 13
  10.  
  11. Hi,
  12.   I have a problem with porting from gcc to cc (on a sun sparc station)
  13.         
  14.     puts("\x1b=");        /* set's the terminals keypad mode */
  15.  
  16.  Works fine with gcc, the "\x1b" is interpreted as ascii 27, escape.  But
  17.  on cc it just prints "x1b=".
  18.  
  19.  Is the hex code escape an ansii extension,  how else can I do it?, I would
  20.  rather avoid:
  21.     sprintf(tmp,"%c=",27);
  22.  
  23.                 Thanks,  Chris.       chrisp@grv.grace.cri.nz
  24.