home *** CD-ROM | disk | FTP | other *** search
- 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
- Newsgroups: comp.lang.c
- Subject: Hex escaping in strings, (porting from gcc to cc)
- Message-ID: <1ifpjnINNkck@zephyr.grace.cri.nz>
- From: chrisp@grace.cri.nz
- Date: Tue, 5 Jan 93 23:21:59 GMT
- Organization: Industrial Research Ltd., New Zealand.
- NNTP-Posting-Host: grv.grace.cri.nz
- Lines: 13
-
- Hi,
- I have a problem with porting from gcc to cc (on a sun sparc station)
-
- puts("\x1b="); /* set's the terminals keypad mode */
-
- Works fine with gcc, the "\x1b" is interpreted as ascii 27, escape. But
- on cc it just prints "x1b=".
-
- Is the hex code escape an ansii extension, how else can I do it?, I would
- rather avoid:
- sprintf(tmp,"%c=",27);
-
- Thanks, Chris. chrisp@grv.grace.cri.nz
-