📄 tdestr.h
字号:
int prow; /* logical number of rows in partial row */
int vcols; /* number of virtual columns, if any */
int nfiles; /* number of files on screen */
int avail; /* number of available slots for files */
int select; /* current file under cursor */
int flist_col[5]; /* offset from col to display each column */
} DIRECTORY;
typedef struct {
int pattern_length; /* number of chars in pattern */
int search_defined; /* search pattern defined? */
unsigned char pattern[MAX_COLS]; /* search pattern */
int forward_md2; /* forward mini-delta2 */
int backward_md2; /* backward mini-delta2 */
char skip_forward[256]; /* boyer array for forward searches */
char skip_backward[256]; /* boyer array for back searches */
} boyer_moore_type;
/*
* "mode_infos" contain the editor mode variables. The configuration
* utility modifies this structure to custimize the start-up tde
* configuration
*/
typedef struct {
char sig[8]; /* signature, so we can find struct in .exe */
int color_scheme; /* color to start out with */
int sync; /* sync the cursor movement command? */
int sync_sem; /* sync the cursor movement command? */
int record; /* are we recording keystrokes? */
int insert; /* in insert mode? */
int indent; /* in auto-indent mode? */
int ptab_size; /* physical tab stops */
int ltab_size; /* logical tab stops */
int smart_tab; /* smart tab mode on or off? */
int inflate_tabs; /* inflate tabs? T or F */
int search_case; /* consider case? IGNORE or MATCH */
int enh_kbd; /* type of keyboard */
int cursor_size; /* insert cursor big or small? */
char *eof; /* message to display at end of file */
int control_z; /* write ^Z - t or f */
int crlf; /* <cr><lf> toggle CRLF or LF */
int trailing; /* remove trailing space? T or F */
int show_eol; /* show lf at eol? T or F */
int word_wrap; /* in word wrap mode? */
int left_margin; /* left margin */
int parg_margin; /* column for 1st word in paragraph */
int right_margin; /* right margin */
int right_justify; /* boolean, justify right margin? T or F */
int format_sem; /* format semaphore */
int undo_max; /* max number of lines in undo stack */
int do_backups; /* create backup or ".bak" files? T or F */
int ruler; /* show ruler at top of window? T or F */
int date_style; /* date style for date and time stamp */
int time_style; /* time style for date and time stamp */
} mode_infos;
/*
* "displays" contain all the status information about what attributes are
* used for what purposes, which attribute is currently set, and so on.
* The editor only knows about one physical screen.
*/
typedef struct {
int nlines; /* lines on display device */
int ncols; /* columns on display device */
int line_length; /* length of longest line */
int mode_line; /* line to display editor modes - fmd */
int head_color; /* file header color */
int text_color; /* text area color */
int dirty_color; /* text area color */
int mode_color; /* mode line color - footer */
int block_color; /* hilited area of blocked region */
int message_color; /* color of editor messages */
int help_color; /* color of help screen */
int diag_color; /* color for diagnostics in mode line */
int eof_color; /* color for end of file line */
int curl_color; /* color of cursor line */
int ruler_color; /* color of ruler line */
int ruler_pointer; /* color of ruler pointer */
int hilited_file; /* color of current file in dir list */
int overscan; /* color of overscan color */
int old_overscan; /* color of old overscan */
int adapter; /* VGA, EGA, CGA, or MDA? */
unsigned int overw_cursor; /* hi part = top scan line, lo part = bottom */
unsigned int insert_cursor; /* hi part = top scan line, lo part = bottom */
char far *display_address; /* address of display memory */
} displays;
/*
* "WINDOW" contains all the information that is unique to a given
* window.
*/
typedef struct s_window {
struct s_file_infos *file_info; /* file in window */
line_list_ptr ll; /* pointer to current node in linked list */
int ccol; /* column cursor logically in */
int rcol; /* column cursor actually in */
int bcol; /* base column to start display */
int cline; /* line cursor logically in */
long rline; /* real line cursor in */
long bin_offset; /* offset, in bytes from beg of bin file */
int top_line; /* top line in window */
int bottom_line; /* bottom line in window */
int vertical; /* boolean. is window split vertically? */
int start_col; /* starting column on physical screen */
int end_col; /* ending column on physical screen */
int page; /* no. of lines to scroll for one page */
int visible; /* window hidden or visible */
int letter; /* window letter */
int ruler; /* show ruler in this window? */
char ruler_line[MAX_COLS+2]; /* ruler for this window */
struct s_window *next; /* next window in doubly linked list */
struct s_window *prev; /* previous window in doubly linked list */
} WINDOW;
/*
* struct for find first and find next functions. see DOS technical ref
* manuals for more info on DTA structures.
*/
typedef struct {
char reserved[21];
unsigned char attrib;
unsigned time;
unsigned date;
long size;
char name[13];
} DTA;
/*
* "status_infos" contain all the editor status information that is
* global to the entire editor (i.e. not dependent on the file or
* window)
*/
typedef struct {
WINDOW *current_window; /* current active window */
struct s_file_infos *current_file; /* current active file */
struct s_file_infos *file_list; /* all active files */
WINDOW *window_list; /* all active windows */
int window_count; /* number of windows - displayed and hidden */
int file_count; /* number of files currently open */
int arg; /* current argument pointer */
int found_first; /* have we found the first file? */
int argc; /* argument count */
char **argv; /* argument variables - same as *argv[] */
char path[MAX_COLS]; /* path for files on command line */
DTA dta; /* disk transfer address for find next */
int file_mode; /* mode to open sas files, TEXT or BINARY */
int file_chunk; /* if opened BINARY, bytes per line */
int sas_defined; /* has search and seize been defined */
int sas_search_type; /* if defined, Boyer-Moore or reg expression? */
int sas_arg; /* current argument pointer */
int sas_argc; /* argument count */
char **sas_argv; /* argument variables - same as *argv[] */
char sas_tokens[MAX_COLS]; /* storage for file tokens */
char sas_path[MAX_COLS]; /* path for files on search list */
char *sas_arg_pointers[SAS_P]; /* array of pointers to tokens in sas_path */
int sas_found_first; /* have we found the first file? */
DTA sas_dta; /* disk transfer address for find next */
long sas_rline; /* line number of sas find */
int sas_rcol; /* column number of sas find */
int sas_mode; /* mode to open sas files, TEXT or BINARY */
int sas_chunk; /* if opened BINARY, bytes per line */
line_list_ptr sas_ll; /* linked list node pointing to line */
int marked; /* has block been marked? */
int prompt_line; /* line to display cursor */
int prompt_col; /* column to display cursor */
struct s_file_infos *marked_file; /* pointer to file w/ marked block */
char rw_name[MAX_COLS]; /* name of last file read or written */
char pattern[MAX_COLS]; /* last search pattern */
char subst[MAX_COLS]; /* last substitute text */
int replace_flag; /* prompt or noprompt b4 replacing */
int replace_defined; /* replace defined ? */
int overlap; /* overlap between pages for page up etc */
line_list_ptr buff_node; /* address of node in line_buff */
int copied; /* has line been copied to file? */
char line_buff[BUFF_SIZE*2+8]; /* for currently edited line */
char tabout_buff[BUFF_SIZE+8]; /* for exanding tabs */
int line_buff_len; /* length of line in the line_buff */
int tabout_buff_len; /* length of line in the tabout_buff */
int command; /* function of key just entered */
int key_pressed; /* key pressed by user */
int key_pending; /* is two-key command waiting for next key? */
int first_key; /* first key of the two-key sequence */
int wrapped; /* is the wrapped message on mode line? */
int stop; /* stop indicator */
int control_break; /* control break pressed? */
int recording_key; /* key we are assigning keystrokes to */
int stroke_count; /* free keys in stroke buffer */
int macro_next; /* pointer to next key in macro */
int macro_executing; /* flag set if macro is executing */
int mstack_pointer; /* pointer to macro stack */
int current_macro; /* index of currently executing macro */
int screen_display; /* screen display off or on? */
} status_infos;
/*
* marker structure used to save file positions.
*/
typedef struct {
long rline; /* real line of marker */
int rcol; /* real column of marker */
int ccol; /* logical column of marker */
int bcol; /* base column of marker */
int marked; /* boolean: has this marker been set? */
} MARKER;
/*
* "file_infos" contain all the information unique to a given file
*/
typedef struct s_file_infos {
line_list_ptr line_list; /* pointer to first node in linked list */
line_list_ptr line_list_end; /* pointer to last node in linked list */
line_list_ptr undo_top; /* pointer to top node in undo stack */
line_list_ptr undo_bot; /* pointer to last node in undo stack */
int undo_count; /* number of lines in undo stack */
MARKER marker[NO_MARKERS]; /* number of file markers */
long length; /* number of lines in file */
int modified; /* file has been modified since save? */
int dirty; /* file in window modified? */
int new_file; /* is current file new? */
int backed_up; /* has ".bak" file been created? */
int crlf; /* when read, did lines end CRLF or LF? */
int open_mode; /* opened in BINARY or TEXT */
char file_name[MAX_COLS]; /* name of current file being edited */
char backup_fname[MAX_COLS];/* name of backup of current file */
int block_type; /* block type - line or box */
line_list_ptr block_start; /* beginning block position */
line_list_ptr block_end; /* ending block position */
int block_bc; /* beginning column */
long block_br; /* beginning row */
int block_ec; /* ending column */
long block_er; /* ending row */
int file_no; /* file number */
int ref_count; /* no. of windows referring to file */
int next_letter; /* next window letter */
unsigned int file_attrib; /* file attributes (rwx etc) */
struct s_file_infos *next; /* next file in doubly linked list */
struct s_file_infos *prev; /* previous file in doubly linked list */
} file_infos;
/*
* structure for recording and playing back one keystroke.
*/
typedef struct {
int key; /* key assinged to this node, which may be text or function */
int next; /* pointer to next node in macro def */
} STROKES;
/*
* structure for the macro buffer.
*/
typedef struct {
char sig[8]; /* signature, easy to find in .exe */
int first_stroke[MAX_KEYS]; /* pointer to first key in macro */
STROKES strokes[STROKE_LIMIT]; /* buffer to hold key strokes */
} MACRO;
/*
* structure for the local macro stack in macro processor.
*/
typedef struct {
int key; /* key to begin execution in macro */
int macro; /* macro we were executing */
} MACRO_STACK;
/*
* structure for critical error handler. check the flag for errors on
* each I/O call.
*/
typedef struct {
int flag; /* 0 = no error, -1 = error */
int code; /* error code from di */
int rw; /* read or write operation? */
int drive; /* drive number of error */
int extended; /* extended error code, func 0x59 */
int class; /* error class */
int action; /* suggested action from DOS */
int locus; /* locus of error: drive, network, etc... */
int dattr; /* device attribute, 0 = drive, 1 = serial */
char dname[10]; /* device name */
} CEH;
/*
* structure for sort strings
*/
typedef struct {
text_ptr pivot_ptr;
int direction;
unsigned char *order_array;
int block_len;
int pivot_len;
int bc;
int ec;
} SORT;
typedef struct {
unsigned char ignore[256];
unsigned char match[256];
} SORT_ORDER;
/*
* structure for diff. let's only diff two windows at a time.
*/
typedef struct {
int defined; /* initially FALSE */
int leading; /* skip leading spaces t/f */
int all_space; /* skip all space t/f */
int blank_lines; /* skip blank lines t/f */
int ignore_eol; /* skip end of line t/f */
WINDOW *w1; /* pointer to first diff window */
WINDOW *w2; /* pointer to second diff window */
line_list_ptr d1; /* pointer to text in window 1 */
line_list_ptr d2; /* pointer to text in window 2 */
long rline1; /* line number in window 1 */
long rline2; /* line number in window 2 */
long bin_offset1; /* binary offset in window 1 */
long bin_offset2; /* binary offset in window 2 */
} DIFF;
/*
* structures for regular expression searches.
*/
typedef struct {
int pattern_length; /* number of chars in pattern */
int search_defined; /* search pattern defined? */
int node_count; /* number of nodes in the nfa */
unsigned char pattern[MAX_COLS]; /* search pattern */
} REGX_INFO;
typedef struct {
int node_type[REGX_SIZE];
int term_type[REGX_SIZE];
int c[REGX_SIZE];
char *class[REGX_SIZE];
int next1[REGX_SIZE];
int next2[REGX_SIZE];
} NFA_TYPE;
typedef struct parse_tree {
int node_type;
int leaf_char;
char *leaf_string;
struct parse_tree *r_pt;
struct parse_tree *l_pt;
} PARSE_TREE;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -