home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
editors
/
tde150.arj
/
CFGMODES.H
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-01
|
3KB
|
108 lines
#define Ins 0
#define Ind 1
#define Tab 2
#define Write_Z 3
#define Crlf 4
#define Trim 5
#define Eol 6
#define WW 7
#define Left 8
#define Para 9
#define Right 10
#define Size 11
#define Backup 12
#define Ruler 13
/*
* cursor size
*/
#define SMALL_INS 0
#define BIG_INS 1
/*
* "mode_infos" contain the editor mode variables. The configuration
* utility modifies this structure to custimize the start-up tde
* configuration
*/
typedef struct {
int color_scheme; /* color to start out with */
int sync; /* sync the cursor movement command? */
int sync_sem; /* sync the cursor movement command? */
int insert; /* in insert mode? */
int indent; /* in auto-indent mode? */
int tab_size; /* characters between tab stops */
int backup; /* copy file to .bak? */
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 do_backups; /* create backup or ".bak" files? T or F */
int ruler; /* show ruler at top of window? T or F */
} MODE_INFO;
/*
* flags used for opening files to write either in binary or text mode.
* crlf is for opening files in text mode - Operating System converts
* lf to crlf automatically. in binary mode, lf is not translated.
*/
#define CRLF 1
#define LF 2
char *mode_screen[] = {
" Default editor modes ",
" ",
" Insert/Overwrite mode: ",
" Indent mode: ",
" Tab Size: ",
" ^Z at end of file: ",
" End of line on file output: ",
" Trailing space: ",
" Display end of line character: ",
" Word wrap mode: ",
" Left margin: ",
" Paragraph margin: ",
" Right margin: ",
" Insert cursor size: ",
" Create .bak backup files: ",
" Ruler at top of window: ",
" ",
" ",
" \x1b, \x1a = change values \x18, \x19 = move cursor F3 = Quit F10 = Save and Quit",
NULL
};
struct {
int line;
int col;
int mode;
void (*show_me)( void );
} mode[14] = {
{ 5, 36, 0, show_insert_mode },
{ 6, 36, 0, show_indent_mode },
{ 7, 36, 0, show_tabsize },
{ 8, 36, 0, show_controlz },
{ 9, 36, 0, show_eol_out },
{ 10, 36, 0, show_trail },
{ 11, 36, 0, show_eol_display },
{ 12, 36, 0, show_ww },
{ 13, 36, 0, show_left },
{ 14, 36, 0, show_para },
{ 15, 36, 0, show_right },
{ 16, 36, 0, show_cursor_size },
{ 17, 36, 0, show_backup_mode },
{ 18, 36, 0, show_ruler_mode }
};