Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mmintl.UUCP Path: utzoo!linus!philabs!pwa-b!mmintl!kevinp From: kevinp@mmintl.UUCP (Kevin Piette) Newsgroups: net.micro.pc Subject: Re: Setting colors in C Message-ID: <352@mmintl.UUCP> Date: Mon, 29-Apr-85 17:34:17 EDT Article-I.D.: mmintl.352 Posted: Mon Apr 29 17:34:17 1985 Date-Received: Wed, 1-May-85 06:01:41 EDT References: <1442@aecom.UUCP> Organization: Multimate International, E. Hartford, CT Lines: 16 The following paraphrased from origional context : 'Does anyone know of an easy way to set character colors from Lattice C programs using ANSI.SYS?... ...the DOS call only outputs one character at a time... ...would appreciate hearing of a better way...' I have written applications in Lattice C which rely upon ANSI.SYS to provide cursor addressing and attribute selection for displayed text. Within these applications I simply use printf. Below is an example of a Lattice C statement to set the foreground attribute to cyan. #define ESC 0x1B ... printf("%c[36m", ESC); This approach was chosen to provide MS-DOS portablility provided the target system has an ANSI.SYS device driver. There are other methods which enable faster display output at the cost of portability. -- Kevin Piette Phone: (203) 522-2116 Multimate International Corporation, Research & Development UUCP: ...!seismo!cmcl2!philabs!pwa-b!mmintl!kevinp