home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
TELECOM
/
GNU_ATP_1_40.lzh
/
SRC
/
ansi.c
next >
Wrap
Text File
|
1993-08-16
|
3KB
|
174 lines
/*
ATP QWK MAIL READER FOR READING AND REPLYING TO QWK MAIL PACKETS.
Copyright ( C ) 1992 Thomas McWilliams
Copyright ( C ) 1990 Rene Cougnenc
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or ( at your option )
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; ifnot, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* Change Log:
$Log: ansi.c,v $
* Revision 2.000 1993/08/03 wrh
* first version for C compiler version 3.2 and OS-9/68000 version 2.4 wrh
*
* Revision 1.400 1992/11/28 09:56:28 root
* second release
*
* Revision 1.310 1992/07/08 23:15:14 root
* first release -- minor bug fix in read.c
*
* Revision 1.30 1992/07/05 15:36:19 root
* first release of ATP
*
* Revision 1.2 1992/04/19 12:46:31 root
* 1st semifunctional UNIX version.
*
*/
#include <stdio.h>
#include "ansi.h"
extern int ansi; /* Will just return on ansi==0 */
#define ESC 27
void clear() /* Reset Attributes */
{
if( ansi )
printf( "%c[0m",ESC );
}
void high() /* HigLitht ( or BoldFace ) */
{
if( ansi )
printf( "%c[1m",ESC );
}
void blink() /* blink mode */
{
if( ansi )
printf( "%c[5m",ESC );
}
void reverse() /* Revers video mode */
{
if( ansi )
printf( "%c[7m",ESC );
}
/*------------- Foreground colors ---------------------*/
void black()
{
if( ansi )
printf( "%c[30m",ESC );
}
void red()
{
if( ansi )
printf( "%c[31m",ESC );
}
void green()
{
if( ansi )
printf( "%c[32m",ESC );
}
void yellow()
{
if( ansi )
printf( "%c[33m",ESC );
}
void blue()
{
if( ansi )
printf( "%c[34m",ESC );
}
void magenta()
{
if( ansi )
printf( "%c[35m",ESC );
}
void cyan()
{
if( ansi )
printf( "%c[36m",ESC );
}
void white()
{
if( ansi )
printf( "%c[37m",ESC );
}
/*------------- BackGround colors ---------------------*/
void bblack()
{
if( ansi )
printf( "%c[40m",ESC );
}
void bred()
{
if( ansi )
printf( "%c[41m",ESC );
}
void bgreen()
{
if( ansi )
printf( "%c[42m",ESC );
}
void byellow()
{
if( ansi )
printf( "%c[43m",ESC );
}
void bblue()
{
if( ansi )
printf( "%c[44m",ESC );
}
void bmagenta()
{
if( ansi )
printf( "%c[45m",ESC );
}
void bcyan()
{
if( ansi )
printf( "%c[46m",ESC );
}
void bwhite()
{
if( ansi )
printf( "%c[47m",ESC );
}