tty.h File Reference

Go to the source code of this file.

Defines

#define prompt(a, b)   e_prompt((a),(b),0);

Functions

void curses_init ()
void curses_display ()
int curses_getch ()
void curses_end ()
void fatalerror (char *msg)
void e_prompt (char *msg, char *input, int becho)
void p_dir (struct parse_list *head)
char c_prompt (char *msg)
void error (char *msg)
void status (char *msg)
void header (char *msg)
void set_line (int set)
int get_line ()
int inc_line ()
int dec_line ()


Detailed Description

Terminal handling (via Curses).

Define Documentation

#define prompt ( a,
 )     e_prompt((a),(b),0);

Macro for ease of use. Like e_prompt() but always echoes.


Function Documentation

char c_prompt ( char *  msg  ) 

Prompts the user with a message, but only waits for one character.

Parameters:
msg The message to prompt.
Returns:
The character the user gave us.

void curses_display (  ) 

Display the window.

void curses_end (  ) 

Destroy the curses window.

int curses_getch (  ) 

Wrapper function for outside usage.

void curses_init (  ) 

Simple curses initialization.

int dec_line (  ) 

See inc_line().

void e_prompt ( char *  msg,
char *  input,
int  becho 
)

Prompts the user with a message, and waits for newline. Then it returns the input without the trailing newline.

Parameters:
msg The prompt message.
input Used to store the user's input.
becho Is the input echoed or not?

void error ( char *  msg  ) 

A non-fatal error; simply output msg to the error line and update the display.

Parameters:
msg Our new error message.

void fatalerror ( char *  msg  ) 

A "fatal" error; exit the program and print msg.

Parameters:
msg The msg to print.

int get_line (  ) 

Returns:
The hi_line so outside functions can know it.

void header ( char *  msg  ) 

Output a message to the header line and update display.

Parameters:
msg Our new header message.

int inc_line (  ) 

Increments the line counter.

/return 0 normally, 1 if out of bounds.

void p_dir ( struct parse_list head  ) 

Prints the directory listing starting from the head.

Parameters:
head The beginning of the directory listing.

void set_line ( int  set  ) 

Sets the highlighted line to set.

Parameters:
set Which line?

void status ( char *  msg  ) 

Output a message to the status line and update display.

Parameters:
msg Our new status message.


Generated by  doxygen 1.4.7.
SourceForge.net Logo