⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aee.h

📁 aee是一种易使用的文本编辑器。你可以不用说明书来使用它。它提供终端接口和本地的X-windows接口。它的特性包括即弹的菜单
💻 H
📖 第 1 页 / 共 2 页
字号:
/* |	aee.h | |	$Header: /home/hugh/sources/aee/RCS/aee.h,v 1.36 1999/02/01 01:09:37 hugh Exp $ | |	Copyright (c) 1986 - 1988, 1991 - 1996, 1999 Hugh Mahon. | */#include <signal.h>#include <fcntl.h>#include <sys/types.h>#include <sys/stat.h>#include <errno.h>#include <string.h>#include <pwd.h>#include <limits.h>#ifdef HAS_SYS_WAIT#include <sys/wait.h>#endif#ifdef HAS_STDLIB#include <stdlib.h>#endif#ifdef HAS_STDARG#include <stdarg.h>#endif#ifdef HAS_UNISTD#include <unistd.h>#endif#ifdef HAS_CTYPE#include <ctype.h>#endifextern int eightbit;		/* eight bit character flag		*/#ifndef XAE#ifdef NCURSE#include "new_curse.h"#else#include <curses.h>#endif#else	/* ifdef XAE	*/#ifdef xae11#include "Xcurse.h"#else#include "X10curse.h"#endif	/* xae11 */#endif	/* XAE */extern struct stat buf;#ifndef XAE#ifdef SYS5			/* System V specific tty operations	*/extern struct termio old_term;extern struct termio new_term;#include <fcntl.h>#elseextern struct sgttyb old_term;extern struct sgttyb new_term;#endif#endif	/* XAE */#ifndef SIGCHLD#define SIGCHLD SIGCLD#endif#define TAB 9#ifdef NAME_MAX#define MAX_NAME_LEN NAME_MAX#else#define MAX_NAME_LEN 15#endif	/* NAME_MAX	*/#ifndef NO_CATGETS#include <locale.h>#include <nl_types.h>extern nl_catd catalog;#else#define catgetlocal(a, b) (b)#endif /* NO_CATGETS */#ifndef max#define max(a, b) ((a) > (b) ? (a) : (b))#endif /* max */#ifndef min#define min(a, b) ((a) < (b) ? (a) : (b))#endif /* min */#define Mark 1	/* mark text (don't keep previous paste buffer contents)  */#define Append 2	/* place new text into paste buffer after contents  */#define Prefix 3	/* place new text into paste buffer before contents */extern int errno;#define NO_FURTHER_LINES 0x0 /* indicates end of data, since offset 				will never be zero in journal file (file name 				is written there, not data)      */struct ae_file_info {			/* info about line in journal file */	unsigned long info_location;	/* location of this info in file*/	unsigned long prev_info;	/* info for previous line	*/	unsigned long next_info;	/* info for next line		*/	unsigned long line_location;	/* actual data in line		*/	/* use length of line in bytes from the text data structure below */	};struct text {	char *line;			/* line of characters		*/	int line_number;		/* line number			*/	int line_length;  /* actual number of characters in the line 					   (includes NULL at end of line) */	int max_length; /* maximum number of characters the line handles */	int vert_len;	/* number of lines the current line occupies on the screen */	struct text *next_line;		/* next line of text		*/	struct text *prev_line;		/* previous line of text	*/	struct ae_file_info file_info;	char changed;		/* flag indicating info in line changed */	};extern struct text *first_line;	/* first line of current buffer		*/extern struct text *dlt_line;	/* structure for info on deleted line	*/extern struct text *curr_line;	/* current line cursor is on		*/extern struct text *fpste_line;	/* first line of select buffer		*/extern struct text *cpste_line;	/* current paste/select line		*/extern struct text *paste_buff;	/* first line of paste buffer		*/extern struct text *pste_tmp;	/* temporary paste pointer		*/extern struct text *tmp_line;	/* temporary line pointer		*/extern struct text *srch_line;	/* temporary pointer for search routine */struct files {		/* structure to store names of files to be edited*/	char *name;		/* name of file				*/	struct files *next_name;	};extern struct files *top_of_stack;struct bufr {			/* structure for names of buffers	*/	char *name;		/* name of buffer			*/	struct text *first_line;/* pointer to first line of buffer	*/	struct bufr *next_buff; /* pointer to next record		*/	struct text *curr_line;	/* pointer to the current line in buffer*/	int scr_vert;		/* the last vertical value of buffer	*/	int scr_horz;		/* the last horizontal value in buffer	*/	int scr_pos;		/* horizontal offset from start of line	*/	int position;		/* the last value of position in buffer */	int abs_pos;		/* 'absolute' horizontal position	*/	char *pointer;		/* the last value of point in buffer	*/	WINDOW *win;		/* the window pointer for buffer	*/	WINDOW *footer;		/* window containing name of window	*/	int lines;		/* number of lines			*/	int last_line;		/* last line visible in window		*/	int last_col;		/* last column visible in the window	*/	int num_of_lines;	/* number of lines of text total in buffer  */	int absolute_lin;	/* number of lines from top		*/	int window_top;	/* # of lines top of window is from top of screen  */	int journ_fd;		/* file descriptor for journal file	*/	char journalling;	/* flag indicating if journalling active 							for this buffer */	char *journal_file;	/* name of journal file for this buffer	*/	char *file_name;	/* name of file being edited		*/	char *full_name;	/* full name of file being edited	*/	char changed;		/* contents of the buffer have changed	*/	char *orig_dir;		/* original directory where edit started */	char main_buffer;	/* true if this is the first buffer 	*/	char edit_buffer;	/* true if created as a result of edit cmd */	char dos_file;		/* true if file uses (or is to use) CR/LF 				   instead of just LF as line terminator   */	};extern struct bufr *first_buff;	/* first buffer in list			*/extern struct bufr *curr_buff;	/* pointer to current buffer		*/extern struct bufr *t_buff;	/* temporary pointer for buffers	*/struct tab_stops {		/* structure to store tab stops		*/	int column;		/* column for tab			*/	struct tab_stops *next_stop;	};extern struct tab_stops *tabs;struct del_buffs {	int flag;	char character;	char *string;	int length;	struct del_buffs *prev;	struct del_buffs *next;	};/* |	structure for mapping journal files to file names */struct journal_db {	char *file_name;	char *journal_name;	struct journal_db *next;	};extern struct del_buffs *undel_first;extern struct del_buffs *undel_current;extern WINDOW *com_win;		/* command window			*/extern WINDOW *help_win;	/* window for help facility		*/extern int windows;		/* flag for windows or no windows	*/extern WINDOW *info_win;extern int lines_moved;		/* number of lines moved in search	*/extern int d_wrd_len;		/* length of deleted word		*/extern int value;		/* temporary integer value		*/extern int tmp_pos;		/* temporary position			*/extern int tmp_vert;		/* temporary vertical position		*/extern int tmp_horz;		/* temporary horizontal position	*/extern int repl_length;		/* length of string to replace		*/extern int pst_pos;		/* position in cpste_line->line		*/extern int gold_count;		/* number of times to execute pressed key */extern int fildes;		/* file descriptor			*/extern int get_fd;		/* get file descriptor			*/extern int write_fd;		/* write file descriptor		*/extern int num_of_bufs;		/* the number of buffers that exist	*/extern int temp_stdin;		/* temporary storage for stdin		*/extern int temp_stdout;		/* temp storage for stdout descriptor	*/extern int temp_stderr;		/* temp storage for stderr descriptor	*/extern int pipe_out[2];		/* pipe file desc for output		*/extern int pipe_in[2];		/* pipe file descriptors for input	*/extern int line_wrap;		/* should line extend forever?		*/extern int right_margin;	/* right margin	(if observ_margins = TRUE) */extern int left_margin;		/* left margin				*/extern int info_type;extern int info_win_height;extern int local_LINES;	/* copy of LINES, to detect when win resizes	*/extern int local_COLS;	/* copy of COLS, to detect when win resizes	*/extern int bit_bucket;	/* file descriptor to /dev/null			*/extern int tab_spacing;	/* spacing for tabs				*//* |	boolean flags */extern char mark_text;		/* flag to indicate if MARK is active	*/extern char journ_on;		/* flag for journaling			*/extern char input_file;		/* indicate to read input file		*/extern char recv_file;		/* indicate reading a file		*/extern char edit;		/* continue executing while true	*/extern char gold;		/* 'gold' function key pressed		*/extern char recover;		/* set true if recover operation to occur */extern char case_sen;		/* case sensitive search flag		*/extern char change;		/* indicate changes have been made to file*/extern char go_on;		/* loop control for help function	*/extern char clr_cmd_line;	/* flag set to clear command line	*/extern char literal;		/* is search string to be interpreted literally? */extern char forward;	/* if TRUE, search after cursor, else search before cursor */extern char echo_flag;		/* allow/disallow echo in init file	*/extern char status_line;	/* place status info in the bottom line	*/extern char overstrike;		/* overstrike / insert mode flag	*/extern char indent;		/* auto-indent mode flag		*/extern char expand;		/* expand tabs flag			*/extern char shell_fork;extern char out_pipe;		/* flag that info is piped out		*/extern char in_pipe;		/* flag that info is piped in		*/extern char observ_margins;	/* should margins be observed		*/extern char right_justify;	/* justify right margin when formatting */extern char free_d_line;	/* free d_line (already freed from del list) */extern char free_d_word;	/* free d_word (already freed from del list) */extern char info_window;	/* is info window displayed?		*/extern char auto_format;	/* automatically format paragraph	*/extern char formatted;		/* has paragraph been formatted?	*/extern char window_resize;	/* flag to indicate a resize has occurred */extern char change_dir_allowed;	/* flag to indicate if chdir is allowed */extern char restricted;		/* flag to indicate restricted mode	*/extern char com_win_initialized;extern char text_only;		/* editor is to treat file being read as 				   text only (not a binary file)	*/#define CHAR_DELETED 1#define CHAR_BACKSPACE 2#define WORD_DELETED 3#define LINE_DELETED 4extern long mask;		/* mask for sigblock			*/#ifdef XAEextern int win_width;		/* width and height of edit session window */extern int win_height;extern char *xsrch_string;extern char *xold_string;extern char *xnew_string;extern Window testwin;#endifextern char in_string[513];	/* input buffer string			*/extern char *pst_line;		/* start of paste line			*/extern char *pst_pnt;		/* current position within paste line	*/extern char *pste1;		/* temporary pointers for cut/paste ops */extern char *pste2;extern char *pste3;extern char *old_string;	/* old string to be replaced		*/extern char *u_old_string;	/* upper case verson of old_string	*/extern char *new_string;	/* new string to insert instead of old	*/extern char *srch_str;		/* pointer for search string		*/extern char *u_srch_str;	/* pointer to non-case sensitive search */extern char *in_file_name;	/* name of input file and path		*/extern char *short_file_name;	/* name of input file only		*/extern char *journ;		/* name of journal file			*/extern char *journal_dir;	/* name of journal directory		*/extern char *out_file;		/* name of output file if not input file*/extern char *tmp_file;		/* temporary file name			*/extern char d_char;		/* deleted character			*/extern char *d_word;		/* deleted word				*/extern char *d_line;		/* deleted line				*/extern char *term_type;		/* type of terminal being used		*/extern char *help_line;		/* input line for help facility		*/extern char *sline;		/* temporary line pointer for help fac	*/extern char *subject;		/* subject user wants to learn about	*/extern char *start_of_string;	/* start of search string		*/extern char match_char;		/* character found by search for match	*/extern char in_buff_name[128];	/* input buffer name			*/extern char out_buff_name[128];	/* output buffer name			*/extern char *start_at_line;	/* move to this line at start of session*/extern char *print_command;	/* string to hold command for printing file */extern char nohighlight;extern char *ctr[32];		/* control key strings			*/extern char ctr_changed[32];	/* control key strings changed flags	*/extern char *g_ctr[32];		/* gold control key strings		*/extern char g_ctr_changed[32];	/* gold control key strings changed 	*/extern char *f[64];		/* function key strings			*/extern char f_changed[64];	/* function key strings			*/extern char *g_f[64];		/* gold function key strings		*/extern char g_f_changed[64];	/* gold function key strings		*/extern char *ctrl_table[];extern char *keypads[5];	/* keypad keys from terminfo		*/extern char *g_keypads[5];	/* keypad keys from terminfo		*/extern char *ctrl_table[];extern int in;			/* input character			*/extern FILE *fp;		/* file pointer for input		*/extern FILE *outp;		/* pointer for output file		*/extern FILE *temp_fp;		/* temporary file pointer		*/extern FILE *get_fp;		/* read file pointer			*/extern FILE *write_fp;		/* write file pointer			*/#define MAX_HELP_LINES	15#define MAX_HELP_COLS	129extern char info_data[MAX_HELP_LINES][MAX_HELP_COLS];struct edit_keys {	char *macro;	char *description;	short fkey, gfkey, ckey, gckey;	};extern struct edit_keys assignment[];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -