curses.c File Reference

#include "config.h"
#include "vi.h"
#include <termios.h>
#include <sys/ioctl.h>

Include dependency graph for curses.c:

Go to the source code of this file.

Functions

char * getenv ()
static void starttcap ()
void initscr ()
void endwin ()
void suspend_curses ()
void resume_curses (int quietly)
static void mayhave (char **T, char *s)
static void musthave (char **T, char *s)
static void pair (char **T, char **U, char *sT, char *sU)
static void starttcap (char *term)
int getsize (int signo)
int faddch (int ch)
void qaddstr (char *str)
void attrset (int a)
void insch (int ch)
void wrefresh ()
void wqrefresh ()
int ansiquit ()
int ansicolor (int cmode, int attrbyte)
 endcolor ()

Variables

char * termtype
short ospeed
char PC
WINDOWstdscr
WINDOW kbuf [KBSIZ]
int LINES
int COLS
int AM
int PT
char * VB
char * UP
char * SO = ""
char * SE = ""
char * US = ""
char * UE = ""
char * MD = ""
char * ME = ""
char * AS = ""
char * AE = ""
char * MV
char * CM
char * CE
char * CD
char * AL
char * DL
char * SR
char * KS = ""
char * KE = ""
char * KU
char * KD
char * KL
char * KR
char * HM
char * EN
char * PU
char * PD
char * KI
char * FKEY [NFKEYS]
char * IM = ""
char * IC = ""
char * EI = ""
char * DC
char * TI = ""
char * TE = ""
char * CQ = (char *)0
char * CX = (char *)1
char * CV = (char *)2
char * CI = (char *)3
char * CR = (char *)4
char * aend = ""
char ERASEKEY
char normalcolor [16]
char SOcolor [16]
char SEcolor [16]
char UScolor [16]
char UEcolor [16]
char MDcolor [16]
char MEcolor [16]
char AScolor [16]
char AEcolor [16]
char POPUPcolor [16]
char VISIBLEcolor [16]
static struct termios oldtermio
static struct termios newtermio
static char * capbuf
static int curses_active = FALSE


Function Documentation

int ansicolor int  cmode,
int  attrbyte
 

Definition at line 836 of file curses.c.

References A_ALTCHARSET, A_BOLD, A_NORMAL, A_POPUP, A_STANDOUT, A_UNDERLINE, A_VISIBLE, AEcolor, AScolor, faddch(), MDcolor, MEcolor, msg, normalcolor, POPUPcolor, SEcolor, SOcolor, sprintf(), strcmp, strcpy(), tputs(), UEcolor, UP, UScolor, and VISIBLEcolor.

int ansiquit  ) 
 

Definition at line 820 of file curses.c.

References clrtoeol, faddch(), strcmp, tputs(), and UP.

void attrset int  a  ) 
 

Definition at line 759 of file curses.c.

References A_ALTCHARSET, A_BOLD, A_UNDERLINE, AE, aend, do_aend, do_AS, do_MD, do_US, ME, and UE.

endcolor  ) 
 

Definition at line 915 of file curses.c.

References AE, AEcolor, aend, faddch(), ME, MEcolor, SE, SEcolor, tputs(), UE, and UEcolor.

void endwin  ) 
 

Definition at line 240 of file curses.c.

Referenced by Abort(), cleanup(), deathtrap(), fillkeybuf(), getsize(), main(), ScreenEnd(), and terminate().

int faddch int  ch  ) 
 

Definition at line 728 of file curses.c.

References addch.

Referenced by ansicolor(), ansiquit(), and endcolor().

char* getenv  ) 
 

int getsize int  signo  ) 
 

Definition at line 639 of file curses.c.

References COLS, endwin(), exit(), Input, ioctl, LINES, lines, o_columns, o_lines, Read, signal(), SIGWINCH, size, sscanf(), strcmp, termtype, tgetnum(), TIOCGWINSZ, write, and Write().

Referenced by starttcap().

void initscr  ) 
 

Definition at line 153 of file curses.c.

Referenced by init(), initialize(), Initialize(), main(), and ScreenInit().

void insch int  ch  ) 
 

Definition at line 786 of file curses.c.

References do_EI, do_IC, do_IM, has_EI, has_IM, and qaddch.

static void mayhave char **  T,
char *  s
[static]
 

Definition at line 394 of file curses.c.

References capbuf, tgetstr(), and val.

Referenced by musthave(), pair(), and starttcap().

static void musthave char **  T,
char *  s
[static]
 

Definition at line 409 of file curses.c.

References exit(), mayhave(), and write.

Referenced by casepart(), command(), dogroup(), nested(), pattern(), starttcap(), synio(), and yyparse().

static void pair char **  T,
char **  U,
char *  sT,
char *  sU
[static]
 

Definition at line 430 of file curses.c.

References mayhave().

Referenced by starttcap().

void qaddstr char *  str  ) 
 

Definition at line 739 of file curses.c.

References qaddch, REG, and stdscr.

Referenced by cmd_color(), cmd_make(), cmd_print(), do_digraph(), drawtext(), fillkeybuf(), getabkey(), m_wsrch(), msg(), resume_curses(), showmsg(), and v_popup().

void resume_curses int  quietly  ) 
 

Definition at line 298 of file curses.c.

References addch, c, termios::c_cc, termios::c_iflag, termios::c_lflag, termios::c_oflag, cfgetospeed, ctrl, curses_active, do_KS, do_SE, do_SO, do_TI, ERASEKEY, exwrote, FALSE, has_KS, has_TI, IGNBRK, ISIG, ISTRIP, IXOFF, IXON, kbuf, LINES, MARK_UNSET, MODE_COLON, MODE_VI, move, newtermio, oldtermio, OPOST, ospeed, qaddstr(), read, redraw(), refresh, SIG_IGN, SIGINT, signal(), TCSADRAIN, tcsetattr, trapint(), TRUE, ttyread(), VERASE, VINTR, VMIN, VSUSP, and VTIME.

Referenced by cmd_make(), cmd_shell(), initscr(), trapint(), and v_keyword().

static void starttcap char *  term  )  [static]
 

Definition at line 447 of file curses.c.

References AE, AEcolor, AL, AM, AS, AScolor, capbuf, CD, CE, CI, CM, CQ, CR, CV, CX, DC, DL, EI, EN, exit(), FKEY, getsize(), has_CQ, HM, IC, IM, kbuf, KD, KE, KI, KL, KR, KS, KU, mayhave(), MD, MDcolor, ME, MEcolor, musthave(), MV, pair(), PD, POPUPcolor, PT, PU, SE, SEcolor, SO, SOcolor, SR, strcpy(), TE, termtype, tgetent(), tgetflag(), tgetnum(), tgetstr(), TI, UE, UEcolor, UP, US, UScolor, VB, VISIBLEcolor, and write.

static void starttcap  )  [static]
 

Referenced by initscr().

void suspend_curses  ) 
 

Definition at line 253 of file curses.c.

References curses_active, do_CQ, do_KE, do_TE, FALSE, has_CQ, has_KE, has_TE, oldtermio, quitcolor, refresh, TCSADRAIN, and tcsetattr.

Referenced by cmd_make(), cmd_shell(), endwin(), and v_keyword().

void wqrefresh  ) 
 

Definition at line 806 of file curses.c.

References kbuf, stdscr, ttywrite, and VOIDBIOS.

void wrefresh  ) 
 

Definition at line 797 of file curses.c.

Referenced by initialize(), makscr(), mvscanw(), mvwscanw(), scanw(), ScreenInit(), ScreenMsg(), ScreenPut(), ScreenWho(), setup_screen(), user_interface(), and wscanw().


Variable Documentation

char* AE = ""
 

Definition at line 70 of file curses.c.

Referenced by attrset(), endcolor(), and starttcap().

char AEcolor[16]
 

Definition at line 130 of file curses.c.

Referenced by ansicolor(), endcolor(), and starttcap().

char* aend = ""
 

Definition at line 119 of file curses.c.

Referenced by attrset(), and endcolor().

char* AL
 

Definition at line 77 of file curses.c.

int AM
 

Definition at line 59 of file curses.c.

Referenced by do_line(), ini_terminal(), and starttcap().

char* AS = ""
 

Definition at line 69 of file curses.c.

char AScolor[16]
 

Definition at line 129 of file curses.c.

Referenced by ansicolor(), and starttcap().

char* capbuf [static]
 

Definition at line 149 of file curses.c.

Referenced by mayhave(), and starttcap().

char* CD
 

Definition at line 76 of file curses.c.

Referenced by starttcap().

char* CE
 

Definition at line 75 of file curses.c.

Referenced by bottom_line(), clrbline(), display(), ini_terminal(), PU(), put_line(), RD(), scrollb(), starttcap(), and SU().

char* CI = (char *)3
 

Definition at line 109 of file curses.c.

Referenced by starttcap().

char* CM
 

Definition at line 74 of file curses.c.

Referenced by ini_terminal(), mgoto(), set_cursor(), starttcap(), and window().

int COLS
 

Definition at line 58 of file curses.c.

Referenced by clrupdate(), cmd_args(), do_digraph(), do_line(), fillkeybuf(), getsize(), give_prompt(), ini_terminal(), initopts(), initscr(), input(), mvcur(), mvwin(), newwin(), Putchar(), readline(), ScreenInit(), ScreenPut(), ScreenWho(), setterm(), v_popup(), and window().

char* CQ = (char *)0
 

Definition at line 106 of file curses.c.

Referenced by starttcap().

char* CR = (char *)4
 

Definition at line 110 of file curses.c.

int curses_active = FALSE [static]
 

Definition at line 250 of file curses.c.

Referenced by resume_curses(), and suspend_curses().

char* CV = (char *)2
 

Definition at line 108 of file curses.c.

char* CX = (char *)1
 

Definition at line 107 of file curses.c.

char* DC
 

Definition at line 101 of file curses.c.

char* DL
 

Definition at line 78 of file curses.c.

char* EI = ""
 

Definition at line 100 of file curses.c.

Referenced by starttcap().

char* EN
 

Definition at line 91 of file curses.c.

Referenced by starttcap().

char ERASEKEY
 

Definition at line 120 of file curses.c.

Referenced by getabkey(), main(), and resume_curses().

char* FKEY[NFKEYS]
 

Definition at line 96 of file curses.c.

Referenced by starttcap().

char* HM
 

Definition at line 90 of file curses.c.

Referenced by starttcap().

char* IC = ""
 

Definition at line 99 of file curses.c.

Referenced by starttcap().

char* IM = ""
 

Definition at line 98 of file curses.c.

Referenced by starttcap().

WINDOW kbuf[KBSIZ]
 

Definition at line 56 of file curses.c.

char* KD
 

Definition at line 87 of file curses.c.

Referenced by starttcap().

char* KE = ""
 

Definition at line 85 of file curses.c.

Referenced by starttcap().

char* KI
 

Definition at line 94 of file curses.c.

Referenced by starttcap().

char* KL
 

Definition at line 88 of file curses.c.

Referenced by starttcap().

char* KR
 

Definition at line 89 of file curses.c.

Referenced by starttcap().

char* KS = ""
 

Definition at line 84 of file curses.c.

Referenced by starttcap().

char* KU
 

Definition at line 86 of file curses.c.

Referenced by starttcap().

int LINES
 

Definition at line 57 of file curses.c.

char* MD = ""
 

Definition at line 67 of file curses.c.

Referenced by ini_terminal(), and starttcap().

char MDcolor[16]
 

Definition at line 127 of file curses.c.

Referenced by ansicolor(), and starttcap().

char* ME = ""
 

Definition at line 68 of file curses.c.

char MEcolor[16]
 

Definition at line 128 of file curses.c.

Referenced by ansicolor(), endcolor(), and starttcap().

char* MV
 

Definition at line 72 of file curses.c.

Referenced by main(), starttcap(), and usage().

struct termios newtermio [static]
 

Definition at line 141 of file curses.c.

Referenced by resume_curses().

char normalcolor[16]
 

Definition at line 122 of file curses.c.

Referenced by ansicolor().

struct termios oldtermio [static]
 

Definition at line 140 of file curses.c.

Referenced by initscr(), resume_curses(), and suspend_curses().

short ospeed
 

Definition at line 48 of file curses.c.

char PC
 

Definition at line 53 of file curses.c.

char* PD
 

Definition at line 93 of file curses.c.

Referenced by EF(), and starttcap().

char POPUPcolor[16]
 

Definition at line 132 of file curses.c.

Referenced by ansicolor(), and starttcap().

int PT
 

Definition at line 60 of file curses.c.

Referenced by starttcap().

char* PU
 

Definition at line 92 of file curses.c.

Referenced by HO(), and starttcap().

char* SE = ""
 

Definition at line 64 of file curses.c.

char SEcolor[16]
 

Definition at line 124 of file curses.c.

Referenced by ansicolor(), endcolor(), and starttcap().

char* SO = ""
 

Definition at line 63 of file curses.c.

char SOcolor[16]
 

Definition at line 123 of file curses.c.

Referenced by ansicolor(), and starttcap().

char* SR
 

Definition at line 82 of file curses.c.

Referenced by ini_terminal(), scrollb(), and starttcap().

WINDOW* stdscr
 

Definition at line 55 of file curses.c.

Referenced by endwin(), exrefresh(), initscr(), main(), mvinch(), mvprintw(), mvscanw(), printw(), qaddstr(), scanw(), setscrreg(), tabsize(), wqrefresh(), and wrefresh().

char* TE = ""
 

Definition at line 103 of file curses.c.

Referenced by ini_terminal(), resettty(), and starttcap().

char* termtype
 

Definition at line 47 of file curses.c.

Referenced by getsize(), initopts(), initscr(), and starttcap().

char* TI = ""
 

Definition at line 102 of file curses.c.

char* UE = ""
 

Definition at line 66 of file curses.c.

Referenced by attrset(), endcolor(), ini_terminal(), and starttcap().

char UEcolor[16]
 

Definition at line 126 of file curses.c.

Referenced by ansicolor(), endcolor(), and starttcap().

char* UP
 

Definition at line 62 of file curses.c.

char* US = ""
 

Definition at line 65 of file curses.c.

char UScolor[16]
 

Definition at line 125 of file curses.c.

Referenced by ansicolor(), and starttcap().

char* VB
 

Definition at line 61 of file curses.c.

Referenced by starttcap().

char VISIBLEcolor[16]
 

Definition at line 135 of file curses.c.

Referenced by ansicolor(), and starttcap().


Generated on Fri Apr 14 23:02:57 2006 for minix by  doxygen 1.4.6