home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12465 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  1.3 KB

  1. Xref: sparky comp.lang.c:12465 comp.sys.ibm.pc:428
  2. Newsgroups: comp.lang.c,comp.sys.ibm.pc
  3. Path: sparky!uunet!mcsun!Germany.EU.net!nixpbe!uranium!josef
  4. From: Josef Moellers <mollers.pad@sni.de>
  5. Subject: Re: Using ANSI.SYS codes from C? (Turbo)
  6. Sender: josef@nixpbe.sni.de (Moellers)
  7. Message-ID: <josef.714123379@uranium>
  8. Date: Tue, 18 Aug 1992 07:36:19 GMT
  9. References: <1992Aug18.013912.12547@cs.umb.edu>
  10. Organization: Siemens Nixdorf Info.Sys. AG, Paderborn, Germany
  11. Lines: 21
  12.  
  13. In <1992Aug18.013912.12547@cs.umb.edu> cteague@ra.cs.umb.edu (Charles F. Teague II) writes:
  14.  
  15.  
  16. >  Is there any way to use ANSI.SYS escape sequences from C?  (TurboC++v1.0)
  17. >I'm hoping to use this just to get a simple coloring of my text, without
  18. >using conio.h, and staggering cprintf()s with textcolor() and/or textattr().
  19.  
  20. >  I've tried several different output fns, and none of them seem to be able
  21. >to do what a simple echo command in a batch file can do:  change the text
  22. >color by using ansi codes.  If anyone can help me out, I'd appreciate it.
  23.  
  24. >    Thanks,
  25.  
  26. I've never tried this, but something like
  27.     printf("\033[3mText\033[0m");
  28. should do something to Your "Text".
  29.  
  30. -- 
  31. | Josef Moellers        | c/o Siemens Nixdorf Informationssysteme AG  |
  32. |  USA: mollers.pad@sni-usa.com    | Abt. STO-XS 113       | Riemekestrasse   |
  33. | !USA: mollers.pad@sni.de    | Phone: (+49) 5251 835124 | D-4790 Paderborn |
  34.