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

📄 aee.h

📁 aee是一种易使用的文本编辑器。你可以不用说明书来使用它。它提供终端接口和本地的X-windows接口。它的特性包括即弹的菜单
💻 H
📖 第 1 页 / 共 2 页
字号:
#define gold_key_index 65#define READ_FILE 1#define WRITE_FILE 2#define SAVE_FILE 3/* |	The following structure allows menu items to be flexibly declared. |	The first item is the string describing the selection, the second  |	is the address of the procedure to call when the item is selected, |	and the third is the argument for the procedure. | |	The first menu item will be the title of the menu, with NULL  |	parameters for the procedure and argument, followed by the menu items. | |	If the 'argument' value for the menu title is 1 (MENU_WARN) the  |	menu is to be used to display info to the user (the message about  |	using Escape is not displayed). | |	If the procedure value is NULL, the menu item is displayed, but no  |	procedure is called when the item is selected.  The number of the  |	item will be returned.  If the sixth (argument) parameter is -1, no  |	argument is given to the procedure when it is called. */#if defined(__STDC__) || defined(__cplusplus)#define P_(s) s#else#define P_(s) ()#endif#define MENU_WARN 1struct menu_entries {	char *item_string;	int (*procedure)P_((struct menu_entries *));	struct menu_entries *ptr_argument;	int (*iprocedure)P_((int));	void (*nprocedure)P_((void));	unsigned int argument;	};#undef P_/* |	allocate space here for the strings that will be in the menu */extern struct menu_entries modes_menu[];extern int modes_initialized;#define NUM_MODES_ITEMS 19extern char *mode_strings[NUM_MODES_ITEMS];extern struct menu_entries config_dump_menu[];extern struct menu_entries leave_menu[];extern struct menu_entries leave_menu_2[];extern struct menu_entries file_menu[];extern struct menu_entries search_menu[];extern struct menu_entries spell_menu[];extern struct menu_entries misc_menu[];extern struct menu_entries edit_menu[];extern struct menu_entries main_menu[];extern struct menu_entries del_buff_menu[];extern struct menu_entries rae_err_menu[];#define INFO_WIN_HEIGHT_DEF 6/* |	defines for type of data to show in info window */#define CONTROL_KEYS 1#define COMMANDS     2extern char *commands[70];extern char *init_strings[40];/* |	memory debugging macros */#ifdef DEBUGextern char *dxalloc();extern char *drealloc();#define xalloc(a) dxalloc(a, __LINE__)#define resiz_line(a, b, c) dresiz_line(a, b, c, __LINE__)extern FILE *error_fp;#endif /* DEBUG *//* |	declaration for localizable strings */extern char *ae_help_file, *SL_line_str, *SL_col_str, *SL_lit_str, *SL_nolit_str;extern char *SL_fwd_str, *SL_rev_str, *SL_over_str, *SL_insrt_str, *SL_indent_str;extern char *SL_noindnt_str, *SL_marg_str, *SL_nomarg_str, *SL_mark_str, *ascii_code_str;extern char *left_err_msg, *right_err_msg, *help_err_msg, *prompt_for_more, *topic_prompt;extern char *topic_err_msg, *continue_prompt, *printing_msg, *EXPAND_str, *NOEXPAND_str;extern char *NOJUSTIFY_str, *JUSTIFY_str, *EXIT_str, *QUIT_str, *AUTOFORMAT_str;extern char *NOAUTOFORMAT_str, *INFO_str, *NOINFO_str, *TABS_str, *UNTABS_str;extern char *WRITE_str, *READ_str, *SAVE_str, *LITERAL_str, *NOLITERAL_str;extern char *STATUS_str, *NOSTATUS_str, *MARGINS_str, *NOMARGINS_str, *INDENT_str;extern char *NOINDENT_str, *OVERSTRIKE_str, *NOOVERSTRIKE_str, *LEFTMARGIN_str, *RIGHTMARGIN_str;extern char *LINE_str, *FILE_str, *COPYRIGHT_str, *CHARACTER_str, *REDRAW_str;extern char *RESEQUENCE_str, *AUTHOR_str, *VERSION_str, *CASE_str, *NOCASE_str;extern char *EIGHT_str, *NOEIGHT_str, *WINDOWS_str, *NOWINDOWS_str, *DEFINE_str;extern char *SHOW_str, *HELP_str, *PRINT_str, *BUFFER_str, *DELETE_str;extern char *GOLD_str, *tab_msg, *file_write_prompt_str, *file_read_prompt_str, *left_mrg_err_msg;extern char *right_mrg_err_msg, *left_mrg_setting, *right_mrg_setting, *line_num_str, *lines_from_top;extern char *total_lines_str, *current_file_str, *char_str, *key_def_msg, *unkn_syntax_msg;extern char *current_buff_msg, *unkn_cmd_msg, *usage_str, *read_only_msg, *no_rcvr_fil_msg;extern char *cant_opn_rcvr_fil_msg, *fin_read_file_msg, *rcvr_op_comp_msg, *file_is_dir_msg, *path_not_a_dir_msg;extern char *access_not_allowed_msg, *new_file_msg, *cant_open_msg, *bad_rcvr_msg, *reading_file_msg;extern char *file_read_lines_msg, *other_buffs_exist_msg, *changes_made_prompt, *no_write_access_msg, *file_exists_prompt;extern char *cant_creat_fil_msg, *writing_msg, *file_written_msg, *searching_msg, *fwd_srch_msg;extern char *rev_srch_msg, *str_str, *not_fnd_str, *search_prompt_str, *mark_not_actv_str;extern char *mark_active_str, *mark_alrdy_actv_str, *no_buff_named_str, *press_ret_to_cont_str, *fn_GOLD_str;extern char *fn_DL_str, *fn_DC_str, *fn_CL_str, *fn_NP_str, *fn_PP_str;extern char *fn_NB_str, *fn_PB_str, *fn_UDL_str, *fn_UDC_str, *fn_DW_str;extern char *fn_UDW_str, *fn_UND_str, *fn_EOL_str, *fn_BOL_str, *fn_BOT_str;extern char *fn_EOT_str, *fn_FORMAT_str, *fn_MARGINS_str, *fn_NOMARGINS_str, *fn_IL_str;extern char *fn_PRP_str, *fn_RP_str, *fn_MC_str, *fn_PSRCH_str, *fn_SRCH_str;extern char *fn_AL_str, *fn_AW_str, *fn_AC_str, *fn_PW_str, *fn_CUT_str;extern char *fn_FWD_str, *fn_REV_str, *fn_MARK_str, *fn_UNMARK_str, *fn_APPEND_str;extern char *fn_PREFIX_str, *fn_COPY_str, *fn_CMD_str, *fn_PST_str, *fn_RD_str;extern char *fn_UP_str, *fn_DOWN_str, *fn_LEFT_str, *fn_RIGHT_str, *fn_BCK_str;extern char *fn_CR_str, *fn_EXPAND_str, *fn_NOEXPAND_str, *fn_EXIT_str, *fn_QUIT_str;extern char *fn_LITERAL_str, *fn_NOLITERAL_str, *fn_STATUS_str, *fn_NOSTATUS_str, *fn_INDENT_str;extern char *fn_NOINDENT_str, *fn_OVERSTRIKE_str, *fn_NOOVERSTRIKE_str, *fn_CASE_str, *fn_NOCASE_str;extern char *fn_WINDOWS_str, *fn_NOWINDOWS_str, *fn_HELP_str, *fn_MENU_str, *fwd_mode_str;extern char *rev_mode_str, *ECHO_str, *cmd_prompt, *PRINTCOMMAND_str, *replace_action_prompt;extern char *replace_prompt_str, *replace_r_char, *replace_skip_char, *replace_all_char, *quit_char;extern char *yes_char, *no_char, *cant_find_match_str, *fmting_par_msg, *cancel_string;extern char *menu_too_lrg_msg, *shell_cmd_prompt, *shell_echo_msg, *spell_in_prog_msg, *left_marg_prompt;extern char *left_mrgn_err_msg, *right_mrgn_prompt, *right_mrgn_err_msg, *cant_redef_msg, *buff_msg;extern char *cant_chng_while_mark_msg, *too_many_parms_msg, *buff_is_main_msg, *cant_del_while_mark, *main_buffer_name;extern char *cant_del_buf_msg, *HIGHLIGHT_str, *NOHIGHLIGHT_str;extern char *non_unique_cmd_msg;extern char *ON, *OFF;extern char *save_file_name_prompt, *file_not_saved_msg, *cant_reopen_journ;extern char *write_err_msg, *jrnl_dir, *CD_str;extern char 	*no_dir_entered_msg,  *path_not_dir_msg, *path_not_permitted_msg;extern char *path_chng_failed_msg, *no_chng_dir_msg, *SPACING_str, *SPACING_msg;extern char *pwd_cmd_str, *pwd_err_msg;extern char *help_file_str;extern char *no_file_string, *no_chng_no_save, *changes_made_title;extern char *save_then_delete, *dont_delete, *delete_anyway_msg;extern char *edit_cmd_str, *edit_err_msg, *restricted_msg, *rae_no_file_msg;extern char *more_above_str, *more_below_str, *recover_name_prompt;extern char *no_file_name_string, *recover_menu_title, *other_recover_file_str;extern char *info_win_height_prompt, *info_win_height_err;extern char *info_win_height_cmd_str, *info_win_height_msg_str;extern char *conf_not_saved_msg;extern char *conf_dump_err_msg;extern char *conf_dump_success_msg;extern char *info_help_msg;extern char *unix_text_msg, *dos_text_msg;extern char *text_cmd, *binary_cmd;extern char *text_msg, *binary_msg, *dos_msg, *unix_msg;extern char *copyright_notice;extern char *version_string;/* |	Declare addresses for routines referenced in menus below. *//* --- */#if defined(__STDC__) || defined(__cplusplus)#define P_(s) s#else#define P_(s) ()#endifint main P_((int argc, char *argv[]));void get_input P_((WINDOW *win_ptr));void status_display P_((void));char *xalloc P_((int size));char *resiz_line P_((int factor, struct text *rline, int rpos));void dummy P_((int foo));void insert P_((int character));int scanline P_((struct text *m_line, int pos));void tab_insert P_((void));void unset_tab P_((char *string));void tab_set P_((char *string));int tabshift P_((int temp_int));int out_char P_((WINDOW *window, int character, int abscolumn, int row, int offset));void draw_line P_((int vertical, int horiz, char *ptr, int t_pos, struct text *dr_l));void insert_line P_((int disp));struct text *txtalloc P_((void));struct files *name_alloc P_((void));struct bufr *buf_alloc P_((void));char *next_word P_((char *string));int scan P_((char *line, int offset, int column));char *get_string P_((char *prompt, int advance));int len_char P_((int character, int column));void ascii P_((void));void print_buffer P_((void));int compare P_((char *string1, char *string2, int sensitive));void goto_line P_((char *cmd_str));void make_win P_((void));void no_windows P_((void));void midscreen P_((int line, int count));void get_options P_((int numargs, char *arguments[]));void show_pwd P_((void));char *get_full_path P_((char *path, char *orig_path));char *ae_basename P_((char *name));char *ae_dirname P_((char *path));char *buff_name_generator P_((void));int open_for_edit P_((char *string));void recover_op P_((void));int check_fp P_((void));void get_file P_((char *file_name));void get_line P_((int length, char *in_string, int *append));void finish P_((char *string));int delete_all_buffers P_((void));void quit P_((char *string));void abort_edit P_((int foo));int write_file P_((char *file_name));void sh_command P_((char *string));void redraw P_((void));void repaint_screen P_((void));void copy_str P_((char *str1, char *str2));void echo_string P_((char *string));void ae_init P_((void));char *is_in_string P_((char *string, char *substring));char *resolve_name P_((char *name));int file_write_success P_((void));int menu_op P_((struct menu_entries menu_list[]));void paint_menu P_((struct menu_entries menu_list[], int max_width, int max_height, int list_size, int top_offset, WINDOW *menu_win, int off_start, int vert_size));void shell_op P_((void));void leave_op P_((void));void spell_op P_((void));void ispell_op P_((void));void modes_op P_((void));void search_op P_((void));int file_op P_((int arg));void info_op P_((void));int macro_assign P_((char *keys[], char *macro_string));void get_key_assgn P_((void));void paint_information P_((void));void paint_info_win P_((void));int unique_test P_((char *string, char *list[]));void command_prompt P_((void));void command P_((char *cmd_str));void init_keys P_((void));void parse P_((char *string));int restrict_mode P_((void));void dump_aee_conf P_((void));void del_char P_((int save_flag));void undel_char P_((void));char *del_string P_((int length));void undel_string P_((char *string, int length));void del_word P_((int save_flag));void undel_word P_((void));void Clear_line P_((int save_flag));void del_line P_((int save_flag));void undel_line P_((void));void last_deleted P_((int flag, int length, char *string));void undel_last P_((void));void delete_text P_((void));void undel_init P_((void));int delete P_((int disp));int Blank_Line P_((struct text *test_line));void Format P_((void));int first_word_len P_((struct text *test_line));void Auto_Format P_((void));void help P_((void));void outfile P_((void));void ask P_((void));void write_journal P_((struct bufr *buffer, struct text *line));void update_journal_entry P_((struct bufr *buffer, struct text *line));void remove_journ_line P_((struct bufr *buffer, struct text *line));void journ_info_init P_((struct bufr *buffer, struct text *line));void read_journal_entry P_((struct bufr *buffer, struct text *line));int recover_from_journal P_((struct bufr *buffer, char *file_name));void unlock_journal_fd P_((void));struct journal_db * read_journal_db P_((void));int create_dir P_((char *name));void journal_name P_((struct bufr *buffer, char *file_name));void open_journal_for_write P_((struct bufr *buffer));void remove_journal_file P_((struct bufr *buffer));void control P_((void));void function_key P_((void));void gold_func P_((void));void keyboard P_((void));void def_key P_((char *string));void strings_init P_((void));void copy P_((void));void paste P_((void));void unmark_text P_((void));void cut P_((void));void cut_up P_((void));void cut_down P_((void));void cut_line P_((void));void fast_left P_((void));void fast_right P_((void));void fast_line P_((char *direct));int slct P_((int flag));void slct_dlt P_((void));void slct_right P_((void));void slct_left P_((void));void slct_line P_((char *direct));void bottom P_((void));void top P_((void));void nextline P_((void));void prevline P_((void));void left P_((int disp));int right P_((int disp));void find_pos P_((void));void up P_((void));void down P_((void));void adv_word P_((void));void prev_word P_((void));void move_rel P_((char *direction, int lines));void eol P_((void));void bol P_((void));void adv_line P_((void));void next_page P_((void));void prev_page P_((void));int search P_((int move_cursor, struct text *start_line, int offset, char *pointer, int s_str_off, int srch_short, int disp));int upper P_((int value));int search_prompt P_((int flag));void replace P_((void));int repl_prompt P_((int flag));void match P_((void));void new_screen P_((void));struct bufr *add_buf P_((char *ident));void chng_buf P_((char *name));int del_buf P_((void));void redo_win P_((void));void resize_check P_((void));void set_up_term P_((void));#ifdef XAEvoid event_init P_((void));void event_manage P_((void));void move_to_xy P_((int x, int y));void eopl P_((void));void cut_text P_((void));void raise_window P_((void));void set_window_name P_((char *name));#endif /* XAE */#undef P_

⌨️ 快捷键说明

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