Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

textbox.c File Reference

#include "dialog.h"

Include dependency graph for textbox.c:

Go to the source code of this file.

Functions

static void back_lines (int n)
static void print_page (WINDOW *win, int height, int width)
static void print_line (WINDOW *win, int row, int width)
static char * get_line (void)
static void print_position (WINDOW *win, int height, int width)
int dialog_textbox (const char *title, const char *file, int height, int width)

Variables

static int hscroll = 0
static int fd
static int file_size
static int bytes_read
static int begin_reached = 1
static int end_reached = 0
static int page_length
static char * buf
static char * page


Function Documentation

static void back_lines int  n  )  [static]
 

Definition at line 328 of file textbox.c.

References begin_reached, buf, BUF_SIZE, bytes_read, end_reached, exit, fd, fprintf, i, page, read, SEEK_CUR, SEEK_SET, and stderr.

Referenced by dialog_textbox().

int dialog_textbox const char *  title,
const char *  file,
int  height,
int  width
 

Definition at line 38 of file textbox.c.

References ACS_HLINE, ACS_LTEE, ACS_RTEE, attr_clear(), back_lines(), begin_reached, border_attr, buf, BUF_SIZE, bytes_read, close(), COLS, dialog_attr, draw_box(), draw_shadow(), end_reached, ESC, exit, FALSE, fd, file_size, fprintf, free(), get_line(), hscroll, i, KEY_DOWN, KEY_END, KEY_HOME, KEY_LEFT, KEY_RIGHT, KEY_UP, malloc(), MAX_LEN, memcpy, NULL, O_RDONLY, page, page_length, print_button(), print_line(), print_page(), print_position(), read, scroll(), SEEK_CUR, SEEK_END, SEEK_SET, stderr, strlen, text, title_attr, TRUE, WINDOW, x, and y.

Referenced by j_textbox().

Here is the call graph for this function:

static char * get_line void   )  [static]
 

Definition at line 490 of file textbox.c.

References buf, BUF_SIZE, bytes_read, end_reached, exit, fd, file_size, fprintf, i, line, MAX_LEN, page, read, SEEK_CUR, and stderr.

Referenced by dialog_textbox(), and print_line().

static void print_line WINDOW *  win,
int  row,
int  width
[static]
 

Definition at line 460 of file textbox.c.

References get_line(), hscroll, i, line, MIN, strlen, x, and y.

Referenced by dialog_textbox(), and print_page().

Here is the call graph for this function:

static void print_page WINDOW *  win,
int  height,
int  width
[static]
 

Definition at line 441 of file textbox.c.

References end_reached, i, page_length, and print_line().

Referenced by dialog_textbox().

Here is the call graph for this function:

static void print_position WINDOW *  win,
int  height,
int  width
[static]
 

Definition at line 541 of file textbox.c.

References buf, bytes_read, exit, fd, file_size, fprintf, page, position_indicator_attr, SEEK_CUR, and stderr.

Referenced by dialog_textbox().


Variable Documentation

int begin_reached = 1 [static]
 

Definition at line 31 of file textbox.c.

Referenced by back_lines(), and dialog_textbox().

char* buf [static]
 

Definition at line 32 of file textbox.c.

int bytes_read [static]
 

Definition at line 30 of file textbox.c.

Referenced by _zft_read(), back_lines(), dialog_textbox(), ftape_read_segment_fraction(), get_line(), idetape_add_chrdev_read_request(), idetape_chrdev_read(), print_position(), read_scanner(), and sparcaudio_read().

int end_reached = 0 [static]
 

Definition at line 31 of file textbox.c.

Referenced by back_lines(), dialog_textbox(), get_line(), and print_page().

int fd [static]
 

Definition at line 30 of file textbox.c.

int file_size [static]
 

Definition at line 30 of file textbox.c.

Referenced by dialog_textbox(), get_line(), and print_position().

int hscroll = 0 [static]
 

Definition at line 30 of file textbox.c.

Referenced by dialog_textbox(), and print_line().

char * page [static]
 

Definition at line 32 of file textbox.c.

int page_length [static]
 

Definition at line 31 of file textbox.c.

Referenced by dialog_textbox(), and print_page().