edit.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. #ifndef __EDIT_H
  2. #define __EDIT_H
  3. #ifdef MIDNIGHT
  4. # include <stdio.h>
  5. # include <stdarg.h>
  6. # include <sys/types.h>
  7. # ifdef HAVE_UNISTD_H
  8. # include <unistd.h>
  9. # endif
  10. # include <string.h>
  11. # include "src/tty.h"
  12. # include <sys/stat.h>
  13. # include <errno.h>
  14. # ifdef HAVE_FCNTL_H
  15. # include <fcntl.h>
  16. # endif
  17. # include <stdlib.h>
  18. # include <malloc.h>
  19. #else
  20. # include "global.h"
  21. # include <stdio.h>
  22. # include <stdarg.h>
  23. # include <sys/types.h>
  24. # ifdef HAVE_UNISTD_H
  25. # include <unistd.h>
  26. # endif
  27. # include <my_string.h>
  28. # include <sys/stat.h>
  29. # ifdef HAVE_FCNTL_H
  30. # include <fcntl.h>
  31. # endif
  32. # include <stdlib.h>
  33. # include <stdarg.h>
  34. # if TIME_WITH_SYS_TIME
  35. # include <sys/time.h>
  36. # include <time.h>
  37. # else
  38. # if HAVE_SYS_TIME_H
  39. # include <sys/time.h>
  40. # else
  41. # include <time.h>
  42. # endif
  43. # endif
  44. # include "regex.h"
  45. #endif
  46. #ifndef MIDNIGHT
  47. # include <signal.h>
  48. # include <X11/Xlib.h>
  49. # include <X11/Xutil.h>
  50. # include <X11/Xresource.h>
  51. # include "lkeysym.h"
  52. # include "coolwidget.h"
  53. # include "app_glob.c"
  54. # include "coollocal.h"
  55. # include "stringtools.h"
  56. #else
  57. # include "src/main.h" /* for char *shell */
  58. # include "src/mad.h"
  59. # include "src/dlg.h"
  60. # include "src/widget.h"
  61. # include "src/color.h"
  62. # include "src/dialog.h"
  63. # include "src/mouse.h"
  64. # include "src/global.h"
  65. # include "src/help.h"
  66. # include "src/key.h"
  67. # include "src/wtools.h" /* for QuickWidgets */
  68. # include "src/win.h"
  69. # include "vfs/vfs.h"
  70. # include "src/menu.h"
  71. # include "src/regex.h"
  72. # define WANT_WIDGETS
  73. # define WIDGET_COMMAND (WIDGET_USER + 10)
  74. # define N_menus 5
  75. #endif
  76. #define SEARCH_DIALOG_OPTION_NO_SCANF 1
  77. #define SEARCH_DIALOG_OPTION_NO_REGEX 2
  78. #define SEARCH_DIALOG_OPTION_NO_CASE 4
  79. #define SEARCH_DIALOG_OPTION_BACKWARDS 8
  80. #define CLIP_FILE "/.cedit/cooledit.clip"
  81. #define MACRO_FILE "/.cedit/cooledit.macros"
  82. #define BLOCK_FILE "/.cedit/cooledit.block"
  83. #define ERROR_FILE "/.cedit/cooledit.error"
  84. #define TEMP_FILE "/.cedit/cooledit.temp"
  85. #define SCRIPT_FILE "/.cedit/cooledit.script"
  86. #define EDIT_DIR "/.cedit"
  87. #define EDIT_KEY_EMULATION_NORMAL 0
  88. #define EDIT_KEY_EMULATION_EMACS 1
  89. #define REDRAW_LINE (1 << 0)
  90. #define REDRAW_LINE_ABOVE (1 << 1)
  91. #define REDRAW_LINE_BELOW (1 << 2)
  92. #define REDRAW_AFTER_CURSOR (1 << 3)
  93. #define REDRAW_BEFORE_CURSOR (1 << 4)
  94. #define REDRAW_PAGE (1 << 5)
  95. #define REDRAW_IN_BOUNDS (1 << 6)
  96. #define REDRAW_CHAR_ONLY (1 << 7)
  97. #define REDRAW_COMPLETELY (1 << 8)
  98. #define MOD_ABNORMAL (1 << 0)
  99. #define MOD_UNDERLINED (1 << 1)
  100. #define MOD_BOLD (1 << 2)
  101. #define MOD_HIGHLIGHTED (1 << 3)
  102. #define MOD_MARKED (1 << 4)
  103. #define MOD_ITALIC (1 << 5)
  104. #define MOD_CURSOR (1 << 6)
  105. #define MOD_INVERSE (1 << 7)
  106. #ifndef MIDNIGHT
  107. # define EDIT_TEXT_HORIZONTAL_OFFSET 4
  108. # define EDIT_TEXT_VERTICAL_OFFSET 3
  109. #else
  110. # define EDIT_TEXT_HORIZONTAL_OFFSET 0
  111. # define EDIT_TEXT_VERTICAL_OFFSET 1
  112. # define FONT_OFFSET_X 0
  113. # define FONT_OFFSET_Y 0
  114. #endif
  115. #define EDIT_RIGHT_EXTREME option_edit_right_extreme
  116. #define EDIT_LEFT_EXTREME option_edit_left_extreme
  117. #define EDIT_TOP_EXTREME option_edit_top_extreme
  118. #define EDIT_BOTTOM_EXTREME option_edit_bottom_extreme
  119. #define MAX_MACRO_LENGTH 1024
  120. /*there are a maximum of ... */
  121. #define MAXBUFF 1024
  122. /*... edit buffers, each of which is ... */
  123. #define EDIT_BUF_SIZE 16384
  124. /* ...bytes in size. */
  125. /*x / EDIT_BUF_SIZE equals x >> ... */
  126. #define S_EDIT_BUF_SIZE 14
  127. /* x % EDIT_BUF_SIZE is equal to x && ... */
  128. #define M_EDIT_BUF_SIZE 16383
  129. #define SIZE_LIMIT (EDIT_BUF_SIZE * (MAXBUFF - 2))
  130. /* Note a 16k stack is 64k of data and enough to hold (usually) around 10
  131. pages of undo info. */
  132. /* undo stack */
  133. #define START_STACK_SIZE 32
  134. /*some codes that may be pushed onto or returned from the undo stack: */
  135. #define CURS_LEFT 601
  136. #define CURS_RIGHT 602
  137. #define DELETE 603
  138. #define BACKSPACE 604
  139. #define STACK_BOTTOM 605
  140. #define CURS_LEFT_LOTS 606
  141. #define CURS_RIGHT_LOTS 607
  142. #define MARK_1 1000
  143. #define MARK_2 700000000
  144. #define KEY_PRESS 1400000000
  145. /*Tabs spaces: (sofar only HALF_TAB_SIZE is used: */
  146. #define TAB_SIZE option_tab_spacing
  147. #define HALF_TAB_SIZE ((int) option_tab_spacing / 2)
  148. struct macro {
  149. short command;
  150. short ch;
  151. };
  152. struct selection {
  153. unsigned char * text;
  154. int len;
  155. };
  156. struct editor_widget {
  157. #ifdef MIDNIGHT
  158. Widget widget;
  159. #else
  160. struct cool_widget *widget;
  161. #endif
  162. #define from_here num_widget_lines
  163. int num_widget_lines;
  164. int num_widget_columns;
  165. #ifdef MIDNIGHT
  166. int have_frame;
  167. #else
  168. int stopped;
  169. #endif
  170. char *filename; /* Name of the file */
  171. char *dir; /* current directory */
  172. /* dynamic buffers and curser position for editor: */
  173. long curs1; /*position of the cursor from the beginning of the file. */
  174. long curs2; /*position from the end of the file */
  175. unsigned char *buffers1[MAXBUFF + 1]; /*all data up to curs1 */
  176. unsigned char *buffers2[MAXBUFF + 1]; /*all data from end of file down to curs2 */
  177. /* search variables */
  178. long search_start; /* First character to start searching from */
  179. int found_len; /* Length of found string or 0 if none was found */
  180. long found_start; /* the found word from a search - start position */
  181. /* display information */
  182. long last_byte; /* Last byte of file */
  183. long start_display; /* First char displayed */
  184. long start_col; /* First displayed column, negative */
  185. long curs_row; /*row position of curser on the screen */
  186. long curs_col; /*column position on screen */
  187. int force; /* how much of the screen do we redraw? */
  188. unsigned char overwrite;
  189. unsigned char modified; /*has the file been changed?: 1 if char inserted or
  190. deleted at all since last load or save */
  191. #ifdef MIDNIGHT
  192. int delete_file; /* has the file been created in edit_load_file? Delete
  193. it at end of editing when it hasn't been modified
  194. or saved */
  195. #endif
  196. unsigned char highlight;
  197. long prev_col; /*recent column position of the curser - used when moving
  198. up or down past lines that are shorter than the current line */
  199. long curs_line; /*line number of the cursor. */
  200. long start_line; /*line nummber of the top of the page */
  201. /* file info */
  202. long total_lines; /*total lines in the file */
  203. long mark1; /*position of highlight start */
  204. long mark2; /*position of highlight end */
  205. int column1; /*position of column highlight start */
  206. int column2; /*position of column highlight end */
  207. long bracket; /*position of a matching bracket */
  208. /* undo stack and pointers */
  209. unsigned long stack_pointer;
  210. long *undo_stack;
  211. unsigned long stack_size;
  212. unsigned long stack_size_mask;
  213. unsigned long stack_bottom;
  214. struct stat stat;
  215. int to_here; /* dummy marker */
  216. /* macro stuff */
  217. int macro_i; /* -1 if not recording index to macro[] otherwise */
  218. struct macro macro[MAX_MACRO_LENGTH];
  219. };
  220. typedef struct editor_widget WEdit;
  221. #ifndef MIDNIGHT
  222. void edit_render_expose (WEdit * edit, XExposeEvent * xexpose);
  223. void edit_render_tidbits (struct cool_widget *w);
  224. int eh_editor (CWidget * w, XEvent * xevent, CEvent * cwevent);
  225. void edit_draw_menus (Window parent, int x, int y);
  226. void edit_run_make (void);
  227. void edit_change_directory (void);
  228. int edit_man_page_cmd (WEdit * edit);
  229. void edit_search_replace_dialog (Window parent, int x, int y, char **search_text, char **replace_text, char **arg_order, char *heading, int option);
  230. void edit_search_dialog (WEdit * edit, char **search_text);
  231. long edit_find (long search_start, unsigned char *exp, int *len, long last_byte, int (*get_byte) (void *, long), void *data);
  232. void edit_set_foreground_colors (unsigned long normal, unsigned long bold, unsigned long italic);
  233. void edit_set_background_colors (unsigned long normal, unsigned long abnormal, unsigned long marked, unsigned long marked_abnormal, unsigned long highlighted);
  234. void edit_set_cursor_color (unsigned long c);
  235. void draw_options_dialog (Window parent, int x, int y);
  236. void CRefreshEditor (WEdit * edit);
  237. void edit_set_user_command (void (*func) (WEdit *, int));
  238. void edit_draw_this_line_proportional (WEdit * edit, long b, int curs_row, int start_column, int end_column);
  239. unsigned char get_international_character (unsigned char key_press);
  240. void edit_set_user_key_function (int (*user_def_key_func) (unsigned int, unsigned int, KeySym keysym));
  241. #else
  242. int edit_drop_hotkey_menu (WEdit * e, int key);
  243. void edit_menu_cmd (WEdit * e);
  244. void edit_init_menu_emacs (void);
  245. void edit_init_menu_normal (void);
  246. void edit_done_menu (void);
  247. int edit_raw_key_query (char *heading, char *query, int cancel);
  248. char *strcasechr (const unsigned char *s, int c);
  249. int edit (const char *_file, int line);
  250. int edit_translate_key (WEdit * edit, unsigned int x_keycode, long x_key, int x_state, int *cmd, int *ch);
  251. #endif
  252. int edit_get_byte (WEdit * edit, long byte_index);
  253. char *edit_get_buffer_as_text (WEdit * edit);
  254. int edit_load_file (WEdit * edit, const char *filename, const char *text, unsigned long text_size);
  255. int edit_count_lines (WEdit * edit, long current, int upto);
  256. long edit_move_forward (WEdit * edit, long current, int lines, long upto);
  257. long edit_move_forward3 (WEdit * edit, long current, int cols, long upto);
  258. long edit_move_backward (WEdit * edit, long current, int lines);
  259. void edit_scroll_screen_over_cursor (WEdit * edit);
  260. void edit_render_keypress (WEdit * edit);
  261. void edit_scroll_upward (WEdit * edit, unsigned long i);
  262. void edit_scroll_downward (WEdit * edit, int i);
  263. void edit_scroll_right (WEdit * edit, int i);
  264. void edit_scroll_left (WEdit * edit, int i);
  265. int edit_get_col (WEdit * edit);
  266. long edit_bol (WEdit * edit, long current);
  267. long edit_eol (WEdit * edit, long current);
  268. void edit_update_curs_row (WEdit * edit);
  269. void edit_update_curs_col (WEdit * edit);
  270. void edit_block_copy_cmd (WEdit * edit);
  271. void edit_block_move_cmd (WEdit * edit);
  272. int edit_block_delete_cmd (WEdit * edit);
  273. int edit_delete (WEdit * edit);
  274. void edit_insert (WEdit * edit, int c);
  275. int edit_cursor_move (WEdit * edit, long increment);
  276. void edit_push_action (WEdit * edit, long c,...);
  277. void edit_push_key_press (WEdit * edit);
  278. void edit_insert_ahead (WEdit * edit, int c);
  279. int edit_save_file (WEdit * edit, const char *filename);
  280. int edit_save_cmd (WEdit * edit);
  281. int edit_save_confirm_cmd (WEdit * edit);
  282. int edit_save_as_cmd (WEdit * edit);
  283. WEdit *edit_init (WEdit * edit, int lines, int columns, const char *filename, const char *text, const char *dir, unsigned long text_size);
  284. int edit_clean (WEdit * edit);
  285. int edit_renew (WEdit * edit);
  286. int edit_new_cmd (WEdit * edit);
  287. int edit_reload (WEdit * edit, const char *filename, const char *text, const char *dir, unsigned long text_size);
  288. int edit_load_cmd (WEdit * edit);
  289. void edit_mark_cmd (WEdit * edit, int unmark);
  290. void edit_set_markers (WEdit * edit, long m1, long m2, int c1, int c2);
  291. void edit_push_markers (WEdit * edit);
  292. void edit_quit_cmd (WEdit * edit);
  293. void edit_replace_cmd (WEdit * edit, int again);
  294. void edit_search_cmd (WEdit * edit, int again);
  295. int edit_save_block_cmd (WEdit * edit);
  296. int edit_insert_file_cmd (WEdit * edit);
  297. int edit_insert_file (WEdit * edit, const char *filename);
  298. void edit_block_process_cmd (WEdit * edit, const char *shell_cmd, int block);
  299. char *catstrs (const char *first,...);
  300. void edit_refresh_cmd (WEdit * edit);
  301. void edit_date_cmd (WEdit * edit);
  302. void edit_goto_cmd (WEdit * edit);
  303. int eval_marks (WEdit * edit, long *start_mark, long *end_mark);
  304. void edit_status (WEdit * edit);
  305. int edit_execute_command (WEdit * edit, int command, int char_for_insertion);
  306. int edit_execute_key_command (WEdit * edit, int command, int char_for_insertion);
  307. void edit_update_screen (WEdit * edit);
  308. int edit_printf (WEdit * e, const char *fmt,...);
  309. int edit_print_string (WEdit * e, const char *s);
  310. void edit_move_to_line (WEdit * e, long line);
  311. void edit_move_display (WEdit * e, long line);
  312. void edit_word_wrap (WEdit * edit);
  313. unsigned char *edit_get_block (WEdit * edit, long start, long finish, int *l);
  314. int edit_sort_cmd (WEdit * edit);
  315. void edit_help_cmd (WEdit * edit);
  316. void edit_left_word_move (WEdit * edit);
  317. void edit_right_word_move (WEdit * edit);
  318. void edit_get_selection (WEdit * edit);
  319. int edit_save_macro_cmd (WEdit * edit, struct macro macro[], int n);
  320. int edit_load_macro_cmd (WEdit * edit, struct macro macro[], int *n, int k);
  321. void edit_delete_macro_cmd (WEdit * edit);
  322. int edit_copy_to_X_buf_cmd (WEdit * edit);
  323. int edit_cut_to_X_buf_cmd (WEdit * edit);
  324. void edit_paste_from_X_buf_cmd (WEdit * edit);
  325. void edit_paste_from_history (WEdit *edit);
  326. void edit_split_filename (WEdit * edit, char *name);
  327. /* put OS2/NT/WIN95 defines here */
  328. # ifdef OS2_NT
  329. # define MY_O_TEXT O_TEXT
  330. # else
  331. # define MY_O_TEXT 0
  332. # endif
  333. # define FONT_PIX_PER_LINE 1
  334. # define FONT_MEAN_WIDTH 1
  335. # define get_sys_error(s) (s)
  336. # define open mc_open
  337. # define close(f) mc_close(f)
  338. # define read(f,b,c) mc_read(f,b,c)
  339. # define write(f,b,c) mc_write(f,b,c)
  340. # define stat(f,s) mc_stat(f,s)
  341. # define mkdir(s,m) mc_mkdir(s,m)
  342. # define itoa MY_itoa
  343. # define edit_get_load_file(d,f,h) input_dialog (h, " Enter file name: ", f)
  344. # define edit_get_save_file(d,f,h) input_dialog (h, " Enter file name: ", f)
  345. # define CMalloc(x) malloc(x)
  346. # define set_error_msg(s) edit_init_error_msg = strdup(s)
  347. # ifdef _EDIT_C
  348. # define edit_error_dialog(h,s) set_error_msg(s)
  349. char *edit_init_error_msg = NULL;
  350. # else /* ! _EDIT_C */
  351. # define edit_error_dialog(h,s) query_dialog (h, s, 0, 1, "Cancel")
  352. # define edit_message_dialog(h,s) query_dialog (h, s, 0, 1, "Ok")
  353. extern char *edit_init_error_msg;
  354. # endif /* ! _EDIT_C */
  355. # define get_error_msg(s) edit_init_error_msg
  356. # define edit_query_dialog2(h,t,a,b) query_dialog(h,t,0,2,a,b)
  357. # define edit_query_dialog3(h,t,a,b,c) query_dialog(h,t,0,3,a,b,c)
  358. # define edit_query_dialog4(h,t,a,b,c,d) query_dialog(h,t,0,4,a,b,c,d)
  359. #else /* ! MIDNIGHT */
  360. # define MY_O_TEXT 0
  361. # define WIN_MESSAGES edit->widget->mainid, 20, 20
  362. # define edit_get_load_file(d,f,h) CGetLoadFile(WIN_MESSAGES,d,f,h)
  363. # define edit_get_save_file(d,f,h) CGetSaveFile(WIN_MESSAGES,d,f,h)
  364. # define edit_error_dialog(h,t) CErrorDialog(WIN_MESSAGES,h,"%s",t)
  365. # define edit_message_dialog(h,t) CMessageDialog(WIN_MESSAGES,0,h,"%s",t)
  366. # define edit_query_dialog2(h,t,a,b) CQueryDialog(WIN_MESSAGES,h,t,a,b,0)
  367. # define edit_query_dialog3(h,t,a,b,c) CQueryDialog(WIN_MESSAGES,h,t,a,b,c,0)
  368. # define edit_query_dialog4(h,t,a,b,c,d) CQueryDialog(WIN_MESSAGES,h,t,a,b,c,d,0)
  369. #endif /* ! MIDNIGHT */
  370. extern char *home_dir;
  371. #define NUM_SELECTION_HISTORY 32
  372. #ifdef _EDIT_C
  373. struct selection selection =
  374. {0, 0};
  375. int current_selection = 0;
  376. /* Note: selection.text = selection_history[current_selection].text */
  377. struct selection selection_history[NUM_SELECTION_HISTORY] =
  378. {
  379. {0, 0},
  380. {0, 0},
  381. {0, 0},
  382. {0, 0},
  383. {0, 0},
  384. {0, 0},
  385. {0, 0},
  386. {0, 0},
  387. {0, 0},
  388. {0, 0},
  389. };
  390. #ifdef MIDNIGHT
  391. /*
  392. what editor are we going to emulate? one of EDIT_KEY_EMULATION_NORMAL
  393. or EDIT_KEY_EMULATION_EMACS
  394. */
  395. int edit_key_emulation = EDIT_KEY_EMULATION_NORMAL;
  396. #endif /* ! MIDNIGHT */
  397. int option_word_wrap_line_length = 72;
  398. int option_typewriter_wrap = 0;
  399. int option_auto_para_formatting = 0;
  400. int option_international_characters = 0;
  401. int option_tab_spacing = 8;
  402. int option_fill_tabs_with_spaces = 0;
  403. int option_return_does_auto_indent = 1;
  404. int option_backspace_through_tabs = 0;
  405. int option_fake_half_tabs = 1;
  406. int option_save_mode = 0;
  407. int option_backup_ext_int = -1;
  408. int option_find_bracket = 1;
  409. int option_max_undo = 8192;
  410. int option_editor_fg_normal = 26;
  411. int option_editor_fg_bold = 8;
  412. int option_editor_fg_italic = 10;
  413. int option_edit_right_extreme = 0;
  414. int option_edit_left_extreme = 0;
  415. int option_edit_top_extreme = 0;
  416. int option_edit_bottom_extreme = 0;
  417. int option_editor_bg_normal = 1;
  418. int option_editor_bg_abnormal = 0;
  419. int option_editor_bg_marked = 2;
  420. int option_editor_bg_marked_abnormal = 9;
  421. int option_editor_bg_highlighted = 12;
  422. int option_editor_fg_cursor = 18;
  423. char *option_whole_chars_search = "0123456789abcdefghijklmnopqrstuvwxyz_";
  424. char *option_whole_chars_move = "0123456789abcdefghijklmnopqrstuvwxyz_; ,[](){}";
  425. char *option_backup_ext = "~";
  426. #else /* ! _EDIT_C */
  427. extern struct selection selection;
  428. extern struct selection selection_history[];
  429. extern int current_selection;
  430. #ifdef MIDNIGHT
  431. /*
  432. what editor are we going to emulate? one of EDIT_KEY_EMULATION_NORMAL
  433. or EDIT_KEY_EMULATION_EMACS
  434. */
  435. extern int edit_key_emulation;
  436. #endif /* ! MIDNIGHT */
  437. extern int option_word_wrap_line_length;
  438. extern int option_typewriter_wrap;
  439. extern int option_auto_para_formatting;
  440. extern int option_international_characters;
  441. extern int option_tab_spacing;
  442. extern int option_fill_tabs_with_spaces;
  443. extern int option_return_does_auto_indent;
  444. extern int option_backspace_through_tabs;
  445. extern int option_fake_half_tabs;
  446. extern int option_save_mode;
  447. extern int option_backup_ext_int;
  448. extern int option_find_bracket;
  449. extern int option_max_undo;
  450. extern int option_editor_fg_normal;
  451. extern int option_editor_fg_bold;
  452. extern int option_editor_fg_italic;
  453. extern int option_edit_right_extreme;
  454. extern int option_edit_left_extreme;
  455. extern int option_edit_top_extreme;
  456. extern int option_edit_bottom_extreme;
  457. extern int option_editor_bg_normal;
  458. extern int option_editor_bg_abnormal;
  459. extern int option_editor_bg_marked;
  460. extern int option_editor_bg_marked_abnormal;
  461. extern int option_editor_bg_highlighted;
  462. extern int option_editor_fg_cursor;
  463. extern char *option_whole_chars_search;
  464. extern char *option_whole_chars_move;
  465. extern char *option_backup_ext;
  466. extern int edit_confirm_save;
  467. #endif /* ! _EDIT_C */