nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

prototypes.h (20794B)


      1 /**************************************************************************
      2  *   prototypes.h  --  This file is part of GNU nano.                     *
      3  *                                                                        *
      4  *   Copyright (C) 1999-2011, 2013-2025 Free Software Foundation, Inc.    *
      5  *                                                                        *
      6  *   GNU nano is free software: you can redistribute it and/or modify     *
      7  *   it under the terms of the GNU General Public License as published    *
      8  *   by the Free Software Foundation, either version 3 of the License,    *
      9  *   or (at your option) any later version.                               *
     10  *                                                                        *
     11  *   GNU nano is distributed in the hope that it will be useful,          *
     12  *   but WITHOUT ANY WARRANTY; without even the implied warranty          *
     13  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.              *
     14  *   See the GNU General Public License for more details.                 *
     15  *                                                                        *
     16  *   You should have received a copy of the GNU General Public License    *
     17  *   along with this program.  If not, see https://gnu.org/licenses/.     *
     18  *                                                                        *
     19  **************************************************************************/
     20 
     21 #include "definitions.h"
     22 
     23 /* All external variables.  See global.c for their descriptions. */
     24 
     25 #ifndef NANO_TINY
     26 extern volatile sig_atomic_t the_window_resized;
     27 #endif
     28 
     29 extern bool on_a_vt;
     30 extern bool using_utf8;
     31 extern bool shifted_metas;
     32 
     33 extern bool meta_key;
     34 extern bool shift_held;
     35 extern bool mute_modifiers;
     36 
     37 extern bool we_are_running;
     38 extern bool more_than_one;
     39 extern bool report_size;
     40 
     41 extern bool ran_a_tool;
     42 extern char *foretext;
     43 
     44 extern int final_status;
     45 
     46 extern bool inhelp;
     47 extern char *title;
     48 
     49 extern bool focusing;
     50 
     51 extern bool as_an_at;
     52 
     53 extern bool control_C_was_pressed;
     54 
     55 extern message_type lastmessage;
     56 
     57 extern linestruct *pletion_line;
     58 
     59 extern bool also_the_last;
     60 
     61 extern char *answer;
     62 
     63 extern char *last_search;
     64 extern int didfind;
     65 
     66 extern char *present_path;
     67 
     68 extern unsigned flags[4];
     69 
     70 extern int controlleft, controlright;
     71 extern int controlup, controldown;
     72 extern int controlhome, controlend;
     73 #ifndef NANO_TINY
     74 extern int controldelete, controlshiftdelete;
     75 extern int shiftup, shiftdown;
     76 extern int shiftcontrolleft, shiftcontrolright;
     77 extern int shiftcontrolup, shiftcontroldown;
     78 extern int shiftcontrolhome, shiftcontrolend;
     79 extern int altleft, altright;
     80 extern int altup, altdown;
     81 extern int althome, altend;
     82 extern int altpageup, altpagedown;
     83 extern int altinsert, altdelete;
     84 extern int shiftaltleft, shiftaltright;
     85 extern int shiftaltup, shiftaltdown;
     86 #endif
     87 extern int mousefocusin, mousefocusout;
     88 
     89 #ifdef ENABLED_WRAPORJUSTIFY
     90 extern ssize_t fill;
     91 extern size_t wrap_at;
     92 #endif
     93 
     94 extern WINDOW *topwin;
     95 extern WINDOW *midwin;
     96 extern WINDOW *footwin;
     97 extern int editwinrows;
     98 extern int editwincols;
     99 extern int margin;
    100 extern int sidebar;
    101 #ifndef NANO_TINY
    102 extern int *bardata;
    103 extern ssize_t stripe_column;
    104 extern int cycling_aim;
    105 #endif
    106 
    107 extern linestruct *cutbuffer;
    108 extern linestruct *cutbottom;
    109 extern bool keep_cutbuffer;
    110 
    111 extern openfilestruct *openfile;
    112 #ifdef ENABLE_MULTIBUFFER
    113 extern openfilestruct *startfile;
    114 #endif
    115 
    116 #ifndef NANO_TINY
    117 extern char *matchbrackets;
    118 extern char *whitespace;
    119 extern int whitelen[2];
    120 #endif
    121 
    122 extern const char *exit_tag;
    123 extern const char *close_tag;
    124 #ifdef ENABLE_JUSTIFY
    125 extern char *punct;
    126 extern char *brackets;
    127 extern char *quotestr;
    128 extern regex_t quotereg;
    129 #endif
    130 
    131 extern char *word_chars;
    132 
    133 extern ssize_t tabsize;
    134 
    135 #ifndef NANO_TINY
    136 extern char *backup_dir;
    137 #endif
    138 #ifdef ENABLE_OPERATINGDIR
    139 extern char *operating_dir;
    140 #endif
    141 
    142 #ifdef ENABLE_SPELLER
    143 extern char *alt_speller;
    144 #endif
    145 
    146 #ifdef ENABLE_COLOR
    147 extern syntaxtype *syntaxes;
    148 extern char *syntaxstr;
    149 extern bool have_palette;
    150 extern bool rescind_colors;
    151 extern bool perturbed;
    152 extern bool recook;
    153 #endif
    154 
    155 extern bool refresh_needed;
    156 
    157 extern int currmenu;
    158 extern keystruct *sclist;
    159 extern funcstruct *allfuncs;
    160 extern funcstruct *exitfunc;
    161 
    162 extern linestruct *search_history;
    163 extern linestruct *replace_history;
    164 extern linestruct *execute_history;
    165 #ifdef ENABLE_HISTORIES
    166 extern linestruct *searchtop;
    167 extern linestruct *searchbot;
    168 extern linestruct *replacetop;
    169 extern linestruct *replacebot;
    170 extern linestruct *executetop;
    171 extern linestruct *executebot;
    172 #endif
    173 
    174 extern regex_t search_regexp;
    175 extern regmatch_t regmatches[10];
    176 
    177 extern int hilite_attribute;
    178 #ifdef ENABLE_COLOR
    179 extern colortype *color_combo[NUMBER_OF_ELEMENTS];
    180 #endif
    181 extern int interface_color_pair[NUMBER_OF_ELEMENTS];
    182 
    183 extern char *homedir;
    184 extern char *statedir;
    185 #if defined(ENABLE_NANORC) || defined(ENABLE_HISTORIES)
    186 extern char *startup_problem;
    187 #endif
    188 #ifdef ENABLE_NANORC
    189 extern char *custom_nanorc;
    190 
    191 extern char *commandname;
    192 extern keystruct *planted_shortcut;
    193 #endif
    194 
    195 extern bool spotlighted;
    196 extern size_t light_from_col;
    197 extern size_t light_to_col;
    198 
    199 typedef void (*functionptrtype)(void);
    200 
    201 /* The two needed functions from browser.c. */
    202 #ifdef ENABLE_BROWSER
    203 void browser_refresh(void);
    204 char *browse_in(const char *inpath);
    205 void to_first_file(void);
    206 void to_last_file(void);
    207 #endif
    208 
    209 /* Most functions in chars.c. */
    210 bool is_alpha_char(const char *c);
    211 bool is_blank_char(const char *c);
    212 bool is_cntrl_char(const char *c);
    213 bool is_word_char(const char *c, bool allow_punct);
    214 char control_mbrep(const char *c, bool isdata);
    215 #ifdef ENABLE_UTF8
    216 int mbtowide(wchar_t *wc, const char *c);
    217 bool is_doublewidth(const char *ch);
    218 bool is_zerowidth(const char *ch);
    219 #endif
    220 int char_length(const char *pointer);
    221 size_t mbstrlen(const char *pointer);
    222 int collect_char(const char *string, char *thechar);
    223 int advance_over(const char *string, size_t *column);
    224 size_t step_left(const char *buf, size_t pos);
    225 size_t step_right(const char *buf, size_t pos);
    226 int mbstrcasecmp(const char *s1, const char *s2);
    227 int mbstrncasecmp(const char *s1, const char *s2, size_t n);
    228 char *mbstrcasestr(const char *haystack, const char *needle);
    229 char *revstrstr(const char *haystack, const char *needle, const char *pointer);
    230 char *mbrevstrcasestr(const char *haystack, const char *needle, const char *pointer);
    231 #if !defined(NANO_TINY) || defined(ENABLE_JUSTIFY)
    232 char *mbstrchr(const char *string, const char *chr);
    233 #endif
    234 #ifndef NANO_TINY
    235 char *mbstrpbrk(const char *string, const char *accept);
    236 char *mbrevstrpbrk(const char *head, const char *accept, const char *pointer);
    237 #endif
    238 #if defined(ENABLE_NANORC) && (!defined(NANO_TINY) || defined(ENABLE_JUSTIFY))
    239 bool has_blank_char(const char *string);
    240 #endif
    241 bool white_string(const char *string);
    242 #if defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
    243 void strip_leading_blanks_from(char *string);
    244 #endif
    245 
    246 /* Most functions in color.c. */
    247 #ifdef ENABLE_COLOR
    248 void set_interface_colorpairs(void);
    249 void prepare_palette(void);
    250 void find_and_prime_applicable_syntax(void);
    251 void check_the_multis(linestruct *line);
    252 void precalc_multicolorinfo(void);
    253 #endif
    254 
    255 /* Most functions in cut.c. */
    256 void expunge(undo_type action);
    257 void do_delete(void);
    258 void do_backspace(void);
    259 #ifndef NANO_TINY
    260 void chop_previous_word(void);
    261 void chop_next_word(void);
    262 #endif
    263 void extract_segment(linestruct *top, size_t top_x, linestruct *bot, size_t bot_x);
    264 void ingraft_buffer(linestruct *topline);
    265 void copy_from_buffer(linestruct *somebuffer);
    266 #ifndef NANO_TINY
    267 void cut_marked_region(void);
    268 #endif
    269 void do_snip(bool marked, bool until_eof, bool append);
    270 void cut_text(void);
    271 #ifndef NANO_TINY
    272 void cut_till_eof(void);
    273 void zap_text(void);
    274 void copy_marked_region(void);
    275 #endif
    276 void copy_text(void);
    277 void paste_text(void);
    278 
    279 /* Most functions in files.c. */
    280 void make_new_buffer(void);
    281 #ifndef NANO_TINY
    282 bool delete_lockfile(const char *lockfilename);
    283 #endif
    284 bool open_buffer(const char *filename, bool new_one);
    285 void set_modified(void);
    286 void prepare_for_display(void);
    287 #ifdef ENABLE_MULTIBUFFER
    288 void mention_name_and_linecount(void);
    289 void switch_to_prev_buffer(void);
    290 void switch_to_next_buffer(void);
    291 void close_buffer(void);
    292 #endif
    293 void read_file(FILE *f, int fd, const char *filename, bool undoable);
    294 int open_file(const char *filename, bool new_one, FILE **f);
    295 char *get_next_filename(const char *name, const char *suffix);
    296 void do_insertfile(void);
    297 #ifndef NANO_TINY
    298 void do_execute(void);
    299 #endif
    300 char *get_full_path(const char *origpath);
    301 char *safe_tempfile(FILE **stream);
    302 #ifdef ENABLE_OPERATINGDIR
    303 void init_operating_dir(void);
    304 bool outside_of_confinement(const char *currpath, bool allow_tabcomp);
    305 #endif
    306 #ifndef NANO_TINY
    307 void init_backup_dir(void);
    308 #endif
    309 int copy_file(FILE *inn, FILE *out, bool close_out);
    310 bool write_file(const char *name, FILE *thefile, bool normal,
    311 				kind_of_writing_type method, bool annotate);
    312 #ifndef NANO_TINY
    313 bool write_region_to_file(const char *name, FILE *stream, bool normal,
    314 				kind_of_writing_type method);
    315 #endif
    316 int write_it_out(bool exiting, bool withprompt);
    317 void do_writeout(void);
    318 void do_savefile(void);
    319 char *real_dir_from_tilde(const char *path);
    320 #if defined(ENABLE_TABCOMP) || defined(ENABLE_BROWSER)
    321 int diralphasort(const void *va, const void *vb);
    322 #endif
    323 #ifdef ENABLE_TABCOMP
    324 char *input_tab(char *buf, size_t *place, void (*refresh_func)(void), bool *listed);
    325 #endif
    326 
    327 /* Some functions in global.c. */
    328 const keystruct *first_sc_for(int menu, void (*function)(void));
    329 size_t shown_entries_for(int menu);
    330 const keystruct *get_shortcut(const int keycode);
    331 functionptrtype func_from_key(const int keycode);
    332 #if defined(ENABLE_BROWSER) || defined(ENABLE_HELP)
    333 functionptrtype interpret(const int keycode);
    334 #endif
    335 int keycode_from_string(const char *keystring);
    336 void shortcut_init(void);
    337 const char *epithet_of_flag(int flag);
    338 
    339 /* Some functions in help.c. */
    340 #ifdef ENABLE_HELP
    341 void wrap_help_text_into_buffer(void);
    342 #endif
    343 void do_help(void);
    344 
    345 /* Most functions in history.c. */
    346 #ifdef ENABLE_HISTORIES
    347 void history_init(void);
    348 void reset_history_pointer_for(const linestruct *list);
    349 void update_history(linestruct **item, const char *text, bool avoid_duplicates);
    350 #ifdef ENABLE_TABCOMP
    351 char *get_history_completion(linestruct **h, char *s, size_t len);
    352 #endif
    353 bool have_statedir(void);
    354 void load_history(void);
    355 void save_history(void);
    356 void load_poshistory(void);
    357 void update_poshistory(void);
    358 void restore_cursor_position_if_any(void);
    359 #endif
    360 
    361 /* Most functions in move.c. */
    362 void to_first_line(void);
    363 void to_last_line(void);
    364 void do_page_up(void);
    365 void do_page_down(void);
    366 #ifndef NANO_TINY
    367 void to_top_row(void);
    368 void to_bottom_row(void);
    369 void do_cycle(void);
    370 void do_center(void);
    371 #endif
    372 #ifdef ENABLE_JUSTIFY
    373 void do_para_begin(linestruct **line);
    374 void do_para_end(linestruct **line);
    375 void to_para_begin(void);
    376 void to_para_end(void);
    377 #endif
    378 void to_prev_block(void);
    379 void to_next_block(void);
    380 void do_prev_word(void);
    381 bool do_next_word(bool after_ends);
    382 void to_prev_word(void);
    383 void to_next_word(void);
    384 void do_home(void);
    385 void do_end(void);
    386 void do_up(void);
    387 void do_down(void);
    388 #if !defined(NANO_TINY) || defined(ENABLE_HELP)
    389 void do_scroll_up(void);
    390 void do_scroll_down(void);
    391 #endif
    392 void do_left(void);
    393 void do_right(void);
    394 
    395 /* Most functions in nano.c. */
    396 linestruct *make_new_node(linestruct *prevnode);
    397 void splice_node(linestruct *afterthis, linestruct *newnode);
    398 void unlink_node(linestruct *line);
    399 void delete_node(linestruct *line);
    400 linestruct *copy_buffer(const linestruct *src);
    401 void free_lines(linestruct *src);
    402 void renumber_from(linestruct *line);
    403 void print_view_warning(void);
    404 bool in_restricted_mode(void);
    405 #ifndef NANO_TINY
    406 void suggest_ctrlT_ctrlZ(void);
    407 #endif
    408 void finish(void);
    409 void close_and_go(void);
    410 void do_exit(void);
    411 void die(const char *msg, ...);
    412 void window_init(void);
    413 void install_handler_for_Ctrl_C(void);
    414 void restore_handler_for_Ctrl_C(void);
    415 #ifndef NANO_TINY
    416 void reconnect_and_store_state(void);
    417 #endif
    418 void handle_hupterm(int signal);
    419 #ifndef DEBUG
    420 void handle_crash(int signal);
    421 #endif
    422 void suspend_nano(int signal);
    423 void do_suspend(void);
    424 void continue_nano(int signal);
    425 #if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
    426 void block_sigwinch(bool blockit);
    427 #endif
    428 #ifndef NANO_TINY
    429 void handle_sigwinch(int signal);
    430 void regenerate_screen(void);
    431 #endif
    432 void disable_kb_interrupt(void);
    433 void enable_kb_interrupt(void);
    434 void disable_flow_control(void);
    435 void enable_flow_control(void);
    436 void terminal_init(void);
    437 #ifdef ENABLE_LINENUMBERS
    438 void confirm_margin(void);
    439 #endif
    440 void unbound_key(int code);
    441 bool changes_something(functionptrtype f);
    442 void suck_up_input_and_paste_it(void);
    443 void inject(char *burst, size_t count);
    444 
    445 /* Most functions in prompt.c. */
    446 size_t get_statusbar_page_start(size_t base, size_t column);
    447 void put_cursor_at_end_of_answer(void);
    448 void add_or_remove_pipe_symbol_from_answer(void);
    449 int do_prompt(int menu, const char *provided, linestruct **history_list,
    450 		void (*refresh_func)(void), const char *msg, ...);
    451 int ask_user(bool withall, const char *question);
    452 
    453 /* Most functions in rcfile.c. */
    454 #if defined(ENABLE_NANORC) || defined(ENABLE_HISTORIES)
    455 void display_rcfile_errors(void);
    456 void jot_error(const char *msg, ...);
    457 #endif
    458 #ifdef ENABLE_NANORC
    459 keystruct *strtosc(const char *input);
    460 #ifdef ENABLE_COLOR
    461 void parse_one_include(char *file, syntaxtype *syntax);
    462 void grab_and_store(const char *kind, char *ptr, regexlisttype **storage);
    463 bool parse_syntax_commands(char *keyword, char *ptr);
    464 #endif
    465 void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only);
    466 void do_rcfiles(void);
    467 #endif /* ENABLE_NANORC */
    468 
    469 /* Most functions in search.c. */
    470 bool regexp_init(const char *regexp);
    471 void tidy_up_after_search(void);
    472 int findnextstr(const char *needle, bool whole_word_only, int modus,
    473 		size_t *match_len, bool skipone, const linestruct *begin, size_t begin_x);
    474 void do_search_forward(void);
    475 void do_search_backward(void);
    476 void do_findprevious(void);
    477 void do_findnext(void);
    478 void not_found_msg(const char *str);
    479 void go_looking(void);
    480 ssize_t do_replace_loop(const char *needle, bool whole_word_only,
    481 		const linestruct *real_current, size_t *real_current_x);
    482 void do_replace(void);
    483 void ask_for_and_do_replacements(void);
    484 #if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined (ENABLE_LINTER) || defined (ENABLE_FORMATTER)
    485 void goto_line_posx(ssize_t line, size_t pos_x);
    486 #endif
    487 void goto_line_and_column(ssize_t line, ssize_t column, bool retain_answer,
    488 		bool interactive);
    489 void do_gotolinecolumn(void);
    490 #ifndef NANO_TINY
    491 void do_find_bracket(void);
    492 void put_or_lift_anchor(void);
    493 void to_prev_anchor(void);
    494 void to_next_anchor(void);
    495 #endif
    496 
    497 /* Most functions in text.c. */
    498 #ifndef NANO_TINY
    499 void do_mark(void);
    500 #endif
    501 void do_tab(void);
    502 #ifndef NANO_TINY
    503 void do_indent(void);
    504 void do_unindent(void);
    505 #endif
    506 #ifdef ENABLE_COMMENT
    507 void do_comment(void);
    508 #endif
    509 void do_undo(void);
    510 void do_redo(void);
    511 void do_enter(void);
    512 #ifndef NANO_TINY
    513 void discard_until(const undostruct *thisitem);
    514 void add_undo(undo_type action, const char *message);
    515 void update_multiline_undo(ssize_t lineno, char *indentation);
    516 void update_undo(undo_type action);
    517 #endif /* !NANO_TINY */
    518 #ifdef ENABLE_WRAPPING
    519 void do_wrap(void);
    520 #endif
    521 #if defined(ENABLE_HELP) || defined(ENABLED_WRAPORJUSTIFY)
    522 ssize_t break_line(const char *textstart, ssize_t goal, bool snap_at_nl);
    523 #endif
    524 #if !defined(NANO_TINY) || defined(ENABLED_WRAPORJUSTIFY)
    525 size_t indent_length(const char *line);
    526 #endif
    527 #ifdef ENABLE_JUSTIFY
    528 size_t quote_length(const char *line);
    529 bool begpar(const linestruct *const line, int depth);
    530 bool inpar(const linestruct *const line);
    531 void do_justify(void);
    532 void do_full_justify(void);
    533 #endif
    534 #ifdef ENABLE_SPELLER
    535 void do_spell(void);
    536 #endif
    537 #ifdef ENABLE_LINTER
    538 void do_linter(void);
    539 #endif
    540 #ifdef ENABLE_FORMATTER
    541 void do_formatter(void);
    542 #endif
    543 #ifndef NANO_TINY
    544 void count_lines_words_and_characters(void);
    545 #endif
    546 void do_verbatim_input(void);
    547 #ifdef ENABLE_WORDCOMPLETION
    548 void complete_a_word(void);
    549 #endif
    550 
    551 /* All functions in utils.c. */
    552 void get_homedir(void);
    553 const char *tail(const char *path);
    554 char *concatenate(const char *path, const char *name);
    555 int digits(ssize_t n);
    556 bool parse_num(const char *str, ssize_t *result);
    557 bool parse_line_column(const char *str, ssize_t *line, ssize_t *column);
    558 void recode_NUL_to_LF(char *string, size_t length);
    559 size_t recode_LF_to_NUL(char *string);
    560 #if !defined(ENABLE_TINY) || defined(ENABLE_TABCOMP) || defined(ENABLE_BROWSER)
    561 void free_chararray(char **array, size_t len);
    562 #endif
    563 #ifdef ENABLE_SPELLER
    564 bool is_separate_word(size_t position, size_t length, const char *buf);
    565 #endif
    566 const char *strstrwrapper(const char *haystack, const char *needle,
    567 		const char *start);
    568 void *nmalloc(size_t howmuch);
    569 void *nrealloc(void *ptr, size_t howmuch);
    570 char *measured_copy(const char *string, size_t count);
    571 char *mallocstrcpy(char *dest, const char *src);
    572 char *copy_of(const char *string);
    573 char *free_and_assign(char *dest, char *src);
    574 size_t get_page_start(size_t column);
    575 size_t xplustabs(void);
    576 size_t actual_x(const char *text, size_t column);
    577 size_t wideness(const char *text, size_t maxlen);
    578 size_t breadth(const char *text);
    579 void new_magicline(void);
    580 #if !defined(NANO_TINY) || defined(ENABLE_HELP)
    581 void remove_magicline(void);
    582 #endif
    583 #ifndef NANO_TINY
    584 bool mark_is_before_cursor(void);
    585 void get_region(linestruct **top, size_t *top_x, linestruct **bot, size_t *bot_x);
    586 void get_range(linestruct **top, linestruct **bot);
    587 #endif
    588 size_t number_of_characters_in(const linestruct *begin, const linestruct *end);
    589 #if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined (ENABLE_LINTER) || defined (ENABLE_FORMATTER)
    590 linestruct *line_from_number(ssize_t number);
    591 #endif
    592 
    593 /* Most functions in winio.c. */
    594 #ifndef NANO_TINY
    595 void record_macro(void);
    596 void run_macro(void);
    597 #endif
    598 size_t waiting_keycodes(void);
    599 void put_back(int keycode);
    600 #ifdef ENABLE_NANORC
    601 void implant(const char *string);
    602 #endif
    603 int get_input(WINDOW *win);
    604 int get_kbinput(WINDOW *win, bool showcursor);
    605 char *get_verbatim_kbinput(WINDOW *win, size_t *count);
    606 #ifdef ENABLE_MOUSE
    607 int get_mouseinput(int *mouse_y, int *mouse_x, bool allow_shortcuts);
    608 #endif
    609 void blank_edit(void);
    610 void blank_statusbar(void);
    611 void wipe_statusbar(void);
    612 void blank_bottombars(void);
    613 void blank_it_when_expired(void);
    614 void set_blankdelay_to_one(void);
    615 char *display_string(const char *buf, size_t column, size_t span,
    616 						bool isdata, bool isprompt);
    617 void titlebar(const char *path);
    618 void minibar(void);
    619 void statusline(message_type importance, const char *msg, ...);
    620 void statusbar(const char *msg);
    621 void warn_and_briefly_pause(const char *msg);
    622 void bottombars(int menu);
    623 void post_one_key(const char *keystroke, const char *tag, int width);
    624 void place_the_cursor(void);
    625 int update_line(linestruct *line, size_t index);
    626 #ifndef NANO_TINY
    627 int update_softwrapped_line(linestruct *line);
    628 #endif
    629 bool line_needs_update(const size_t old_column, const size_t new_column);
    630 int go_back_chunks(int nrows, linestruct **line, size_t *leftedge);
    631 int go_forward_chunks(int nrows, linestruct **line, size_t *leftedge);
    632 bool less_than_a_screenful(size_t was_lineno, size_t was_leftedge);
    633 void edit_scroll(bool direction);
    634 #ifndef NANO_TINY
    635 size_t get_softwrap_breakpoint(const char *linedata, size_t leftedge,
    636 								bool *kickoff, bool *end_of_line);
    637 size_t get_chunk_and_edge(size_t column, linestruct *line, size_t *leftedge);
    638 size_t chunk_for(size_t column, linestruct *line);
    639 size_t leftedge_for(size_t column, linestruct *line);
    640 size_t extra_chunks_in(linestruct *line);
    641 void ensure_firstcolumn_is_aligned(void);
    642 #endif
    643 size_t actual_last_column(size_t leftedge, size_t column);
    644 void edit_redraw(linestruct *old_current, update_type manner);
    645 void edit_refresh(void);
    646 void adjust_viewport(update_type manner);
    647 void full_refresh(void);
    648 void draw_all_subwindows(void);
    649 void report_cursor_position(void);
    650 void spotlight(size_t from_col, size_t to_col);
    651 #ifndef NANO_TINY
    652 void spotlight_softwrapped(size_t from_col, size_t to_col);
    653 #endif
    654 #ifdef ENABLE_EXTRA
    655 void do_credits(void);
    656 #endif
    657 
    658 /* These are just name definitions. */
    659 void case_sens_void(void);
    660 void regexp_void(void);
    661 void backwards_void(void);
    662 #ifdef ENABLE_HISTORIES
    663 void get_older_item(void);
    664 void get_newer_item(void);
    665 #endif
    666 void flip_replace(void);
    667 void flip_goto(void);
    668 #ifdef ENABLE_BROWSER
    669 void to_files(void);
    670 void goto_dir(void);
    671 #endif
    672 #ifndef NANO_TINY
    673 void do_nothing(void);
    674 void do_toggle(void);
    675 void dos_format(void);
    676 void mac_format(void);
    677 void append_it(void);
    678 void prepend_it(void);
    679 void back_it_up(void);
    680 void flip_execute(void);
    681 void flip_pipe(void);
    682 void flip_convert(void);
    683 #endif
    684 #ifdef ENABLE_MULTIBUFFER
    685 void flip_newbuffer(void);
    686 #endif
    687 void discard_buffer(void);
    688 void do_cancel(void);