ARPDAS_QNX6 1.0
|
#include <stdio.h>
#include <stdlib.h>
#include <ncurses.h>
#include <unistd.h>
#include "nortlib.h"
#include "nctable.h"
#include "tm.h"
#include "nl_assert.h"
#include "oui.h"
#include <fcntl.h>
#include <unix.h>
#include <sys/select.h>
Go to the source code of this file.
Classes | |
struct | nct_display_t |
Defines | |
#define | MAX_DEVS 34 |
#define | IBUFSIZE 16 |
Functions | |
static void | nct_select (int n) |
static void | mark_dirty (void) |
static int | is_dirty (int n) |
void | nct_args (char *dev_name) |
void | nct_init_options (int argc, char **argv) |
static void | nct_shutdown (void) |
int | nct_init (const char *winname, int n_rows, int n_cols) |
int | nct_cmdclt_init () |
void | nct_refresh (void) |
void | nct_string (int winnum, int attr, int row, int col, const char *text) |
Write string to an ncurses display. | |
void | nct_clear (int winnum) |
void | nct_charset (int n) |
void | nct_hrule (int winnum, int attr, int row, int col, unsigned char *rule) |
void | nct_vrule (int winnum, int attr, int row, int col, unsigned char *rule) |
char | nct_getch (void) |
Variables | |
static nct_display_t | nct_display [MAX_DEVS] |
static int | n_devs = 0 |
static int | n_scrs = 0 |
static int | cur_scr_num |
static char * | ttype |
static int | ifds_opened = 0 |
static int | nct_cmd_quit_fd = -1 |
static unsigned char | grphchar [81] |
static unsigned char | asciichar [81] |
static unsigned char * | nct_boxchars = grphchar |
#define IBUFSIZE 16 |
Definition at line 376 of file nctable.c.
Referenced by nct_getch().
#define MAX_DEVS 34 |
Definition at line 11 of file nctable.c.
Referenced by nct_args().
static int is_dirty | ( | int | n | ) | [inline, static] |
Definition at line 41 of file nctable.c.
References nct_display_t::dirty.
Referenced by nct_refresh().
static void mark_dirty | ( | void | ) | [inline, static] |
Definition at line 37 of file nctable.c.
References cur_scr_num, and nct_display_t::dirty.
Referenced by nct_clear(), and nct_string().
void nct_args | ( | char * | dev_name | ) |
Definition at line 45 of file nctable.c.
References nct_display_t::dev_name, MAX_DEVS, n_devs, and nl_error.
Referenced by nct_init_options().
void nct_charset | ( | int | n | ) |
Definition at line 335 of file nctable.c.
References asciichar, grphchar, nct_boxchars, NCT_CHARS_ASCII, NCT_CHARS_GR, and nl_error.
Referenced by nct_init_options().
void nct_clear | ( | int | winnum | ) |
Definition at line 159 of file nctable.c.
References mark_dirty(), and nct_select().
int nct_cmdclt_init | ( | void | ) |
Definition at line 126 of file nctable.c.
References cic_cmd_quit_fd, cic_init(), nct_cmd_quit_fd, and nct_init().
char nct_getch | ( | void | ) |
Definition at line 378 of file nctable.c.
References nct_display_t::dev_name, IBUFSIZE, nct_display_t::ifd, ifds_opened, n_devs, n_scrs, nct_cmd_quit_fd, nct_select(), nl_assert, and nl_error.
void nct_hrule | ( | int | winnum, |
int | attr, | ||
int | row, | ||
int | col, | ||
unsigned char * | rule | ||
) |
Definition at line 348 of file nctable.c.
References nct_boxchars, and nct_select().
int nct_init | ( | const char * | winname, |
int | n_rows, | ||
int | n_cols | ||
) |
Initializes an ncurses display. nct_init() cannot be called after nct_getch().
Definition at line 95 of file nctable.c.
References nct_display_t::dev_name, nct_display_t::dirty, nct_display_t::ifp, n_devs, n_scrs, nct_shutdown(), nl_error, nct_display_t::ofp, nct_display_t::screen, and ttype.
Referenced by nct_cmdclt_init().
void nct_init_options | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 51 of file nctable.c.
References nct_args(), NCT_CHARS_ASCII, nct_charset(), nl_error, opt_string, and OPTIND_RESET.
void nct_refresh | ( | void | ) |
Definition at line 133 of file nctable.c.
References nct_display_t::dirty, is_dirty(), n_scrs, and nct_select().
Referenced by nc_data_client::read().
static void nct_select | ( | int | n | ) | [inline, static] |
Definition at line 29 of file nctable.c.
References cur_scr_num, n_scrs, and nl_assert.
Referenced by nct_clear(), nct_getch(), nct_hrule(), nct_refresh(), nct_string(), and nct_vrule().
static void nct_shutdown | ( | void | ) | [static] |
Definition at line 72 of file nctable.c.
References ifds_opened, nct_display_t::ifp, n_scrs, nct_display_t::ofp, and nct_display_t::screen.
Referenced by nct_init().
void nct_string | ( | int | winnum, |
int | attr, | ||
int | row, | ||
int | col, | ||
const char * | text | ||
) |
Write string to an ncurses display.
winnum is the window number returned by nct_init(); attr is the atribute number (a small integer) as set by nctable. This should map to screen colors, but the implementation of that will have to wait.
Definition at line 152 of file nctable.c.
References mark_dirty(), and nct_select().
void nct_vrule | ( | int | winnum, |
int | attr, | ||
int | row, | ||
int | col, | ||
unsigned char * | rule | ||
) |
Definition at line 360 of file nctable.c.
References nct_boxchars, and nct_select().
unsigned char asciichar[81] [static] |
Definition at line 249 of file nctable.c.
Referenced by nct_charset().
int cur_scr_num [static] |
Definition at line 24 of file nctable.c.
Referenced by mark_dirty(), and nct_select().
unsigned char grphchar[81] [static] |
Definition at line 165 of file nctable.c.
Referenced by nct_charset().
int ifds_opened = 0 [static] |
Definition at line 26 of file nctable.c.
Referenced by nct_getch(), and nct_shutdown().
int n_devs = 0 [static] |
Definition at line 22 of file nctable.c.
Referenced by nct_args(), nct_getch(), and nct_init().
int n_scrs = 0 [static] |
Definition at line 23 of file nctable.c.
Referenced by nct_getch(), nct_init(), nct_refresh(), nct_select(), and nct_shutdown().
unsigned char* nct_boxchars = grphchar [static] |
Definition at line 333 of file nctable.c.
Referenced by nct_charset(), nct_hrule(), and nct_vrule().
int nct_cmd_quit_fd = -1 [static] |
Definition at line 27 of file nctable.c.
Referenced by nct_cmdclt_init(), and nct_getch().
nct_display_t nct_display[MAX_DEVS] [static] |
char* ttype [static] |
Definition at line 25 of file nctable.c.
Referenced by nct_init().