Main Page | Class List | File List | Class Members | File Members

ansi.c File Reference

#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

void clrscr (void)
void goxy (int x, int y)
void hilight (void)
void underline (void)
void blink (void)
void reverse (void)
void invisible (void)
void norm (void)
void up (int x)
void down (int x)
void left (int x)
void right (int x)


Function Documentation

void blink void   ) 
 

Definition at line 25 of file ansi.c.

00026 {
00027   printf("\033[5m");
00028 }

void clrscr void   ) 
 

Definition at line 5 of file ansi.c.

Referenced by do_cmd().

00006 {
00007   printf("\033[2J");
00008 }

void down int  x  ) 
 

Definition at line 55 of file ansi.c.

00056 {
00057   if (x)
00058     printf("\033[%dB", x);
00059   else
00060     printf("\033[B");
00061 }

void goxy int  x,
int  y
 

Definition at line 10 of file ansi.c.

00011 {
00012   printf("\033[%d;%dH", y, x);
00013 }

void hilight void   ) 
 

Definition at line 15 of file ansi.c.

00016 {
00017   printf("\033[1m");
00018 }

void invisible void   ) 
 

Definition at line 35 of file ansi.c.

00036 {
00037   printf("\033[8m");
00038 }

void left int  x  ) 
 

Definition at line 63 of file ansi.c.

00064 {
00065   if (x)
00066     printf("\033[%dD", x);
00067   else
00068     printf("\033[D");
00069 }

void norm void   ) 
 

Definition at line 40 of file ansi.c.

00041 {
00042   printf("\033[0m");
00043 }

void reverse void   ) 
 

Definition at line 30 of file ansi.c.

00031 {
00032   printf("\033[7m");
00033 }

void right int  x  ) 
 

Definition at line 71 of file ansi.c.

Referenced by prompt().

00072 {
00073   if (x)
00074     printf("\033[%dC", x);
00075   else
00076     printf("\033[C");
00077 }

void underline void   ) 
 

Definition at line 20 of file ansi.c.

00021 {
00022   printf("\033[4m");
00023 }

void up int  x  ) 
 

Definition at line 47 of file ansi.c.

Referenced by prompt().

00048 {
00049   if (x)
00050     printf("\033[%dA", x);
00051   else
00052     printf("\033[A");
00053 }


Generated on Sun Jul 16 16:27:45 2006 by  doxygen 1.3.9.1