home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:12586 comp.sys.ibm.pc:434
- Newsgroups: comp.lang.c,comp.sys.ibm.pc
- Path: sparky!uunet!emba-news.uvm.edu!moose.uvm.edu!cblaise
- From: cblaise@moose.uvm.edu.UUCP (Chris Blaise)
- Subject: Re: Using ANSI.SYS codes from C? (Turbo)
- Message-ID: <1992Aug20.193006.11669@uvm.edu>
- Originator: cblaise@moose.uvm.edu
- Sender: news@uvm.edu
- Organization: University of Vermont -- Division of EMBA Computer Facility
- References: <1992Aug18.013912.12547@cs.umb.edu>
- Date: Thu, 20 Aug 1992 19:30:06 GMT
- Lines: 28
-
- From article <1992Aug18.013912.12547@cs.umb.edu>, by cteague@ra.cs.umb.edu (Charles F. Teague II):
- >
- > Is there any way to use ANSI.SYS escape sequences from C? (TurboC++v1.0)
- > I'm hoping to use this just to get a simple coloring of my text, without
- > using conio.h, and staggering cprintf()s with textcolor() and/or textattr().
- >
- > I've tried several different output fns, and none of them seem to be able
- > to do what a simple echo command in a batch file can do: change the text
- > color by using ansi codes. If anyone can help me out, I'd appreciate it.
- >
-
-
- Yes, it is possible. I created my header file using Qedit,
- > character (control-P <esc>). My ANSIVT.H file looks something like:
-
- #define CURSORUP(X) "<esc>["X"A"
- and other VT escape codes...
-
- Color works out like:
-
- #define RED "<esc>[31m"
-
- Works out real slick....
-
- TTYL
- Chris
-
- simply because it was easier to make the <esc
-