blob: 621f3d928f43ff891d21120f780c44c9ba48bf07 [file] [log] [blame]
Chris Allegretta11b00112000-08-06 21:13:45 +00001/* $Id$ */
Chris Allegrettaa2ea1932000-06-06 05:53:49 +00002/**************************************************************************
3 * proto.h *
4 * *
David Lawrence Ramseyf28f50e2004-01-09 23:04:55 +00005 * Copyright (C) 1999-2004 Chris Allegretta *
Chris Allegrettaa2ea1932000-06-06 05:53:49 +00006 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
Chris Allegretta3a24f3f2001-10-24 11:33:54 +00008 * the Free Software Foundation; either version 2, or (at your option) *
Chris Allegrettaa2ea1932000-06-06 05:53:49 +00009 * any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * 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, write to the Free Software *
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
19 * *
20 **************************************************************************/
21
David Lawrence Ramseyf28f50e2004-01-09 23:04:55 +000022/* Externs. */
Chris Allegrettaa2ea1932000-06-06 05:53:49 +000023
David Lawrence Ramseyfd3039a2004-07-17 19:49:12 +000024#include <sys/types.h>
David Lawrence Ramsey84d0d592004-11-04 03:53:11 +000025#include <sys/stat.h>
Chris Allegretta805c26d2000-09-06 13:39:17 +000026#ifdef HAVE_REGEX_H
Chris Allegretta9fc8d432000-07-07 01:49:52 +000027#include <regex.h>
Chris Allegretta805c26d2000-09-06 13:39:17 +000028#endif
Chris Allegrettaa2ea1932000-06-06 05:53:49 +000029#include "nano.h"
30
David Lawrence Ramseyf5b256b2003-10-03 20:26:25 +000031#ifndef DISABLE_WRAPJUSTIFY
David Lawrence Ramsey49c3f242004-07-12 16:07:14 +000032extern ssize_t wrap_at;
David Lawrence Ramseyf5b256b2003-10-03 20:26:25 +000033#endif
Chris Allegretta17dcb722001-01-20 21:40:07 +000034extern int editwinrows;
David Lawrence Ramsey7a97e182004-10-30 01:03:15 +000035extern size_t current_x;
36extern int current_y;
37extern int totlines;
David Lawrence Ramsey86e851b2004-07-28 20:46:25 +000038extern size_t placewewant;
David Lawrence Ramsey9b13ff32002-12-22 16:30:00 +000039#ifndef NANO_SMALL
David Lawrence Ramsey687776b2004-10-30 01:16:08 +000040extern size_t mark_beginx;
David Lawrence Ramsey9b13ff32002-12-22 16:30:00 +000041#endif
Chris Allegrettab3655b42001-10-22 03:15:31 +000042extern long totsize;
David Lawrence Ramseyedab0cc2004-07-03 03:09:12 +000043extern long flags;
David Lawrence Ramsey49c3f242004-07-12 16:07:14 +000044extern ssize_t tabsize;
Chris Allegretta6b58acd2001-04-12 03:01:53 +000045extern int currslen;
Chris Allegrettaa2ea1932000-06-06 05:53:49 +000046
David Lawrence Ramsey89bb9372004-05-29 16:47:52 +000047#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
48extern char *whitespace;
49#endif
50
Chris Allegrettae4f940d2002-03-03 22:36:36 +000051#ifndef DISABLE_JUSTIFY
David Lawrence Ramsey2c62b072004-05-29 16:38:57 +000052extern char *punct;
53extern char *brackets;
Chris Allegretta45329a12002-03-10 01:22:21 +000054extern char *quotestr;
David Lawrence Ramsey819c7f02004-07-30 03:54:34 +000055#ifdef HAVE_REGEX_H
56extern regex_t quotereg;
57extern int quoterc;
58extern char *quoteerr;
59#else
60extern size_t quotelen;
61#endif
Chris Allegrettae4f940d2002-03-03 22:36:36 +000062#endif
63
David Lawrence Ramsey04e42a62004-02-28 16:24:31 +000064#ifndef NANO_SMALL
65extern char *backup_dir;
66#endif
67
David Lawrence Ramseyd7fd2002004-05-18 01:20:36 +000068extern WINDOW *topwin, *edit, *bottomwin;
Chris Allegretta1a6e9042000-12-14 13:56:28 +000069extern char *filename;
David Lawrence Ramsey5db0cdc2002-06-28 22:45:14 +000070extern struct stat originalfilestat;
Chris Allegretta31925e42000-11-02 04:40:39 +000071extern char *answer;
Chris Allegretta6df90f52002-07-19 01:08:59 +000072extern char *hblank;
73#ifndef DISABLE_HELP
74extern char *help_text;
75#endif
Chris Allegretta27eb13f2000-11-05 16:52:21 +000076extern char *last_search;
77extern char *last_replace;
Chris Allegrettae1f14522001-09-19 03:19:43 +000078#ifndef DISABLE_OPERATINGDIR
79extern char *operating_dir;
Chris Allegrettaf5de33a2002-02-27 04:14:16 +000080extern char *full_operating_dir;
Chris Allegrettae1f14522001-09-19 03:19:43 +000081#endif
Chris Allegretta8d8e0122001-04-18 04:28:54 +000082#ifndef DISABLE_SPELLER
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +000083extern char *alt_speller;
Chris Allegretta6df90f52002-07-19 01:08:59 +000084#endif
85
Chris Allegrettaa2ea1932000-06-06 05:53:49 +000086extern struct stat fileinfo;
David Lawrence Ramseyb9775152004-03-19 02:15:42 +000087extern filestruct *current, *fileage, *edittop, *filebot;
David Lawrence Ramsey9b13ff32002-12-22 16:30:00 +000088extern filestruct *cutbuffer;
David Lawrence Ramsey93c84052004-11-23 04:08:28 +000089#ifndef DISABLE_JUSTIFY
90extern filestruct *jusbuffer;
91#endif
David Lawrence Ramsey40bdb682004-11-03 22:03:41 +000092extern partition *filepart;
David Lawrence Ramseyb73c0c02004-11-05 15:25:53 +000093#ifndef NANO_SMALL
David Lawrence Ramsey9b13ff32002-12-22 16:30:00 +000094extern filestruct *mark_beginbuf;
95#endif
Chris Allegretta2d7893d2001-07-11 02:08:33 +000096
Chris Allegretta355fbe52001-07-14 19:32:47 +000097#ifdef ENABLE_MULTIBUFFER
Chris Allegrettaf2387fb2002-04-10 02:31:20 +000098extern openfilestruct *open_files;
Chris Allegretta2d7893d2001-07-11 02:08:33 +000099#endif
100
Chris Allegretta08893e02001-11-29 02:42:27 +0000101#ifdef ENABLE_COLOR
David Lawrence Ramsey1f28b8f2002-09-27 14:21:59 +0000102extern const colortype *colorstrings;
Chris Allegrettab6c5dc22002-05-04 03:47:33 +0000103extern syntaxtype *syntaxes;
Chris Allegretta09900ff2002-05-04 04:23:30 +0000104extern char *syntaxstr;
Chris Allegretta08893e02001-11-29 02:42:27 +0000105#endif
106
Chris Allegrettaa2ea1932000-06-06 05:53:49 +0000107extern shortcut *shortcut_list;
Chris Allegrettaa8c22572002-02-15 19:17:02 +0000108extern shortcut *main_list, *whereis_list;
David Lawrence Ramseye5d8f322004-09-30 22:07:21 +0000109extern shortcut *replace_list, *gotoline_list;
Chris Allegrettaa8c22572002-02-15 19:17:02 +0000110extern shortcut *writefile_list, *insertfile_list;
Chris Allegretta201f1d92003-02-05 02:51:19 +0000111extern shortcut *replace_list_2;
Chris Allegretta7162e3d2002-04-06 05:02:14 +0000112#ifndef NANO_SMALL
113extern shortcut *extcmd_list;
114#endif
Chris Allegretta201f1d92003-02-05 02:51:19 +0000115#ifndef DISABLE_HELP
Chris Allegrettaa8c22572002-02-15 19:17:02 +0000116extern shortcut *help_list;
Chris Allegretta201f1d92003-02-05 02:51:19 +0000117#endif
118#ifndef DISABLE_SPELLER
119extern shortcut *spell_list;
120#endif
Rocco Corsiaf5c3022001-01-12 07:51:05 +0000121#ifndef DISABLE_BROWSER
Chris Allegrettaa8c22572002-02-15 19:17:02 +0000122extern shortcut *browser_list, *gotodir_list;
Chris Allegrettaf4b96012001-01-03 07:11:47 +0000123#endif
Chris Allegretta201f1d92003-02-05 02:51:19 +0000124
David Lawrence Ramseyf5b256b2003-10-03 20:26:25 +0000125#if !defined(DISABLE_BROWSER) || !defined(DISABLE_HELP) || !defined(DISABLE_MOUSE)
Chris Allegretta6df90f52002-07-19 01:08:59 +0000126extern const shortcut *currshortcut;
Chris Allegretta201f1d92003-02-05 02:51:19 +0000127#endif
Chris Allegretta805c26d2000-09-06 13:39:17 +0000128
129#ifdef HAVE_REGEX_H
Chris Allegretta9fc8d432000-07-07 01:49:52 +0000130extern regex_t search_regexp;
David Lawrence Ramseyc3724882004-05-27 18:39:16 +0000131extern regmatch_t regmatches[10];
Chris Allegretta3533a342002-03-24 23:19:32 +0000132#ifdef ENABLE_COLOR
Chris Allegrettab6c5dc22002-05-04 03:47:33 +0000133extern regex_t syntaxfile_regexp;
David Lawrence Ramseyc3724882004-05-27 18:39:16 +0000134extern regmatch_t synfilematches[1];
Chris Allegretta7162e3d2002-04-06 05:02:14 +0000135#endif /* ENABLE_COLOR */
Chris Allegretta6df90f52002-07-19 01:08:59 +0000136#endif /* HAVE_REGEX_H */
137
138#ifndef NANO_SMALL
139extern toggle *toggles;
Chris Allegretta805c26d2000-09-06 13:39:17 +0000140#endif
141
Chris Allegretta5beed502003-01-05 20:41:21 +0000142#ifndef NANO_SMALL
143extern historyheadtype search_history;
144extern historyheadtype replace_history;
145#endif
146
David Lawrence Ramsey76356bd2004-08-12 04:30:22 +0000147extern bool curses_ended;
Chris Allegrettaa0d89972003-02-03 03:32:08 +0000148
David Lawrence Ramseya27bd652004-08-17 05:23:38 +0000149#ifdef ENABLE_NANORC
150extern char *homedir;
151#endif
152
David Lawrence Ramseyf28f50e2004-01-09 23:04:55 +0000153/* Functions we want available. */
Chris Allegrettaa2ea1932000-06-06 05:53:49 +0000154
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000155/* Public functions in color.c. */
Chris Allegretta6df90f52002-07-19 01:08:59 +0000156#ifdef ENABLE_COLOR
David Lawrence Ramsey1f28b8f2002-09-27 14:21:59 +0000157void set_colorpairs(void);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000158void do_colorinit(void);
159void update_color(void);
160#endif /* ENABLE_COLOR */
Chris Allegrettaa2ea1932000-06-06 05:53:49 +0000161
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000162/* Public functions in cut.c. */
David Lawrence Ramseyc833d9e2004-05-29 15:36:58 +0000163void cutbuffer_reset(void);
David Lawrence Ramsey93c84052004-11-23 04:08:28 +0000164void cut_line(void);
David Lawrence Ramsey50af6ea2004-11-07 15:29:40 +0000165#ifndef NANO_SMALL
David Lawrence Ramsey93c84052004-11-23 04:08:28 +0000166void cut_marked(void);
David Lawrence Ramsey50af6ea2004-11-07 15:29:40 +0000167#endif
David Lawrence Ramsey93c84052004-11-23 04:08:28 +0000168void cut_to_eol(void);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000169void do_cut_text(void);
170void do_uncut_text(void);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000171
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000172/* Public functions in files.c. */
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000173void new_file(void);
David Lawrence Ramsey02517e02004-09-05 21:40:31 +0000174filestruct *read_line(char *buf, filestruct *prev, bool *first_line_ins,
175 size_t len);
176void load_file(void);
177void read_file(FILE *f, const char *filename);
178int open_file(const char *filename, bool newfie, FILE **f);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000179char *get_next_filename(const char *name);
David Lawrence Ramsey02517e02004-09-05 21:40:31 +0000180#ifndef NANO_SMALL
181void execute_command(const char *command);
182#endif
183void load_buffer(const char *name);
David Lawrence Ramseybe908f62004-10-01 18:34:30 +0000184void do_insertfile(
185#ifndef NANO_SMALL
186 bool execute
187#else
188 void
189#endif
190 );
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000191void do_insertfile_void(void);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000192#ifdef ENABLE_MULTIBUFFER
David Lawrence Ramsey5b3dd0f2004-11-25 04:39:07 +0000193openfilestruct *make_new_opennode(void);
David Lawrence Ramseyf7080372004-07-08 17:15:10 +0000194void splice_opennode(openfilestruct *begin, openfilestruct *newnode,
195 openfilestruct *end);
David Lawrence Ramsey5b3dd0f2004-11-25 04:39:07 +0000196void unlink_opennode(openfilestruct *fileptr);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000197void delete_opennode(openfilestruct *fileptr);
David Lawrence Ramsey5b3dd0f2004-11-25 04:39:07 +0000198#ifdef DEBUG
Chris Allegretta6df90f52002-07-19 01:08:59 +0000199void free_openfilestruct(openfilestruct *src);
David Lawrence Ramsey5b3dd0f2004-11-25 04:39:07 +0000200#endif
David Lawrence Ramsey3e189a82004-10-03 19:18:48 +0000201void add_open_file(bool update);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000202void load_open_file(void);
David Lawrence Ramsey5b3dd0f2004-11-25 04:39:07 +0000203void open_prevnext_file(bool next);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000204void open_prevfile_void(void);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000205void open_nextfile_void(void);
David Lawrence Ramsey3e189a82004-10-03 19:18:48 +0000206bool close_open_file(void);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000207#endif
208#if !defined(DISABLE_SPELLER) || !defined(DISABLE_OPERATINGDIR)
David Lawrence Ramseye21adfa2002-09-13 18:14:04 +0000209char *get_full_path(const char *origpath);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000210#endif
211#ifndef DISABLE_SPELLER
David Lawrence Ramseye21adfa2002-09-13 18:14:04 +0000212char *check_writable_directory(const char *path);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000213char *safe_tempnam(const char *dirname, const char *filename_prefix);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000214#endif
215#ifndef DISABLE_OPERATINGDIR
David Lawrence Ramseye21adfa2002-09-13 18:14:04 +0000216void init_operating_dir(void);
217int check_operating_dir(const char *currpath, int allow_tabcomp);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000218#endif
David Lawrence Ramsey04e42a62004-02-28 16:24:31 +0000219#ifndef NANO_SMALL
220void init_backup_dir(void);
221#endif
David Lawrence Ramsey819c7f02004-07-30 03:54:34 +0000222int copy_file(FILE *inn, FILE *out);
David Lawrence Ramsey8c16bac2004-11-06 15:10:57 +0000223int write_file(const char *name, bool tmp, int append, bool
224 nonamechange);
David Lawrence Ramsey35961c42004-01-23 19:34:03 +0000225#ifndef NANO_SMALL
David Lawrence Ramsey8c16bac2004-11-06 15:10:57 +0000226int write_marked(const char *name, bool tmp, int append);
David Lawrence Ramsey35961c42004-01-23 19:34:03 +0000227#endif
David Lawrence Ramsey951d7142004-10-04 15:23:47 +0000228int do_writeout(bool exiting);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000229void do_writeout_void(void);
David Lawrence Ramseye21adfa2002-09-13 18:14:04 +0000230char *real_dir_from_tilde(const char *buf);
Chris Allegretta7662c862003-01-13 01:35:15 +0000231#ifndef DISABLE_TABCOMP
David Lawrence Ramsey4d44d2d2004-08-01 22:35:31 +0000232int append_slash_if_dir(char *buf, bool *lastwastab, int *place);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000233char **username_tab_completion(char *buf, int *num_matches);
234char **cwd_tab_completion(char *buf, int *num_matches);
David Lawrence Ramsey4d44d2d2004-08-01 22:35:31 +0000235char *input_tab(char *buf, int place, bool *lastwastab, int *newplace,
236 bool *list);
Chris Allegretta7662c862003-01-13 01:35:15 +0000237#endif
David Lawrence Ramsey04e42a62004-02-28 16:24:31 +0000238const char *tail(const char *foo);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000239#ifndef DISABLE_BROWSER
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000240int diralphasort(const void *va, const void *vb);
David Lawrence Ramseyd7fd2002004-05-18 01:20:36 +0000241void free_charptrarray(char **array, size_t len);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000242void striponedir(char *foo);
Chris Allegretta858d9d92003-01-30 00:53:32 +0000243int readable_dir(const char *path);
David Lawrence Ramseye21adfa2002-09-13 18:14:04 +0000244char **browser_init(const char *path, int *longest, int *numents);
245char *do_browser(const char *inpath);
246char *do_browse_from(const char *inpath);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000247#endif
David Lawrence Ramsey6420d442004-08-11 05:13:08 +0000248#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
David Lawrence Ramseya27bd652004-08-17 05:23:38 +0000249char *histfilename(void);
David Lawrence Ramsey6420d442004-08-11 05:13:08 +0000250void load_history(void);
David Lawrence Ramseya27bd652004-08-17 05:23:38 +0000251bool writehist(FILE *hist, historyheadtype *histhead);
David Lawrence Ramsey6420d442004-08-11 05:13:08 +0000252void save_history(void);
253#endif
Chris Allegretta6df90f52002-07-19 01:08:59 +0000254
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000255/* Public functions in global.c. */
David Lawrence Ramseyebd0d7c2004-07-01 18:59:52 +0000256size_t length_of_list(const shortcut *s);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000257#ifndef NANO_SMALL
David Lawrence Ramsey2ad32092004-07-07 14:36:44 +0000258void toggle_init_one(int val, const char *desc, long flag);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000259void toggle_init(void);
260#ifdef DEBUG
261void free_toggles(void);
262#endif
263#endif
David Lawrence Ramsey576bf332004-07-12 03:10:30 +0000264void sc_init_one(shortcut **shortcutage, int key, const char *desc,
265#ifndef DISABLE_HELP
266 const char *help,
267#endif
268 int metaval, int funcval, int miscval, int view, void
269 (*func)(void));
David Lawrence Ramsey1f1ebb82004-11-11 21:50:01 +0000270void shortcut_init(bool unjustify);
David Lawrence Ramsey576bf332004-07-12 03:10:30 +0000271void free_shortcutage(shortcut **shortcutage);
Chris Allegretta6232d662002-05-12 19:52:15 +0000272#ifdef DEBUG
Chris Allegrettadab017e2002-04-23 10:56:06 +0000273void thanks_for_all_the_fish(void);
Chris Allegretta6232d662002-05-12 19:52:15 +0000274#endif
Chris Allegrettadab017e2002-04-23 10:56:06 +0000275
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000276/* Public functions in move.c. */
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000277void do_first_line(void);
278void do_last_line(void);
279void do_home(void);
280void do_end(void);
281void do_page_up(void);
282void do_page_down(void);
283void do_up(void);
284void do_down(void);
285void do_left(int allow_update);
286void do_left_void(void);
287void do_right(int allow_update);
288void do_right_void(void);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000289
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000290/* Public functions in nano.c. */
David Lawrence Ramseyda141062004-05-25 19:41:11 +0000291void finish(void);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000292void die(const char *msg, ...);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000293void die_save_file(const char *die_filename);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000294void die_too_small(void);
295void print_view_warning(void);
David Lawrence Ramseyce62e822004-08-05 22:10:22 +0000296void global_init(bool save_cutbuffer);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000297void window_init(void);
David Lawrence Ramseyf5b256b2003-10-03 20:26:25 +0000298#ifndef DISABLE_MOUSE
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000299void mouse_init(void);
David Lawrence Ramsey9b13ff32002-12-22 16:30:00 +0000300#endif
Chris Allegretta6df90f52002-07-19 01:08:59 +0000301#ifndef DISABLE_HELP
302void help_init(void);
Chris Allegrettaf2387fb2002-04-10 02:31:20 +0000303#endif
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000304filestruct *make_new_node(filestruct *prevnode);
305filestruct *copy_node(const filestruct *src);
David Lawrence Ramseyf7080372004-07-08 17:15:10 +0000306void splice_node(filestruct *begin, filestruct *newnode, filestruct
307 *end);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000308void unlink_node(const filestruct *fileptr);
309void delete_node(filestruct *fileptr);
310filestruct *copy_filestruct(const filestruct *src);
311void free_filestruct(filestruct *src);
David Lawrence Ramsey40bdb682004-11-03 22:03:41 +0000312partition *partition_filestruct(filestruct *top, size_t top_x,
313 filestruct *bot, size_t bot_x);
David Lawrence Ramsey74d87072004-11-22 00:16:23 +0000314void unpartition_filestruct(partition **p);
David Lawrence Ramsey93c84052004-11-23 04:08:28 +0000315void move_to_filestruct(filestruct **file_top, filestruct **file_bot,
316 filestruct *top, size_t top_x, filestruct *bot, size_t bot_x);
317void copy_from_filestruct(filestruct *file_top, filestruct *file_bot);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000318void renumber_all(void);
319void renumber(filestruct *fileptr);
David Lawrence Ramseyf7080372004-07-08 17:15:10 +0000320void print1opt(const char *shortflag, const char *longflag, const char
321 *desc);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000322void usage(void);
323void version(void);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000324int no_help(void);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000325void nano_disabled_msg(void);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000326#ifndef NANO_SMALL
327RETSIGTYPE cancel_fork(int signal);
David Lawrence Ramseyce62e822004-08-05 22:10:22 +0000328bool open_pipe(const char *command);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000329#endif
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000330void do_char(char ch);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000331void do_verbatim_input(void);
332void do_backspace(void);
333void do_delete(void);
334void do_tab(void);
335void do_enter(void);
David Lawrence Ramseyc97acfb2003-09-10 20:08:00 +0000336#ifndef NANO_SMALL
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000337void do_next_word(void);
338void do_prev_word(void);
339void do_mark(void);
David Lawrence Ramseyd893fa92004-04-30 04:49:02 +0000340#endif
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000341#ifndef DISABLE_WRAPPING
David Lawrence Ramseyc97acfb2003-09-10 20:08:00 +0000342void wrap_reset(void);
David Lawrence Ramseyce62e822004-08-05 22:10:22 +0000343bool do_wrap(filestruct *inptr);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000344#endif
345#ifndef DISABLE_SPELLER
David Lawrence Ramseyce62e822004-08-05 22:10:22 +0000346bool do_int_spell_fix(const char *word);
347const char *do_int_speller(const char *tempfile_name);
David Lawrence Ramseyfa394042004-05-23 21:11:14 +0000348const char *do_alt_speller(char *tempfile_name);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000349void do_spell(void);
David Lawrence Ramseyd893fa92004-04-30 04:49:02 +0000350#endif
David Lawrence Ramseybb50b302004-08-12 21:43:00 +0000351#if !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY)
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000352size_t indent_length(const char *line);
353#endif
354#ifndef DISABLE_JUSTIFY
David Lawrence Ramsey1cadddd2004-05-17 20:32:51 +0000355void justify_format(filestruct *line, size_t skip);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000356size_t quote_length(const char *line);
David Lawrence Ramseyce62e822004-08-05 22:10:22 +0000357bool quotes_match(const char *a_line, size_t a_quote, const char
358 *b_line);
359bool indents_match(const char *a_line, size_t a_indent, const char
David Lawrence Ramseyd4693cb2004-05-14 01:17:25 +0000360 *b_line, size_t b_indent);
David Lawrence Ramsey819c7f02004-07-30 03:54:34 +0000361bool begpar(const filestruct *const foo);
362void do_para_begin(void);
363bool inpar(const char *str);
364void do_para_end(void);
David Lawrence Ramseyd4693cb2004-05-14 01:17:25 +0000365filestruct *backup_lines(filestruct *first_line, size_t par_len, size_t
366 quote_len);
David Lawrence Ramseyd08348b2004-09-18 22:02:21 +0000367bool breakable(const char *line, ssize_t goal);
368ssize_t break_line(const char *line, ssize_t goal, bool force);
David Lawrence Ramsey819c7f02004-07-30 03:54:34 +0000369bool do_para_search(size_t *const quote, size_t *const par);
David Lawrence Ramseyce62e822004-08-05 22:10:22 +0000370void do_justify(bool full_justify);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000371void do_justify_void(void);
372void do_full_justify(void);
David Lawrence Ramseyd893fa92004-04-30 04:49:02 +0000373#endif /* !DISABLE_JUSTIFY */
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000374void do_exit(void);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000375void signal_init(void);
David Lawrence Ramsey2ab03f62002-10-17 02:19:31 +0000376RETSIGTYPE handle_hupterm(int signal);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000377RETSIGTYPE do_suspend(int signal);
378RETSIGTYPE do_cont(int signal);
379#ifndef NANO_SMALL
380void handle_sigwinch(int s);
David Lawrence Ramseyce62e822004-08-05 22:10:22 +0000381void allow_pending_sigwinch(bool allow);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000382#endif
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000383#ifndef NANO_SMALL
384void do_toggle(const toggle *which);
385#endif
David Lawrence Ramsey013344c2004-09-22 22:45:08 +0000386void disable_extended_input(void);
David Lawrence Ramseyd7fd2002004-05-18 01:20:36 +0000387void disable_signals(void);
David Lawrence Ramseyd7fd2002004-05-18 01:20:36 +0000388#ifndef NANO_SMALL
389void enable_signals(void);
390#endif
391void disable_flow_control(void);
392void enable_flow_control(void);
David Lawrence Ramsey8aaf0302004-07-27 16:46:35 +0000393void terminal_init(void);
Chris Allegrettaf2387fb2002-04-10 02:31:20 +0000394
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000395/* Public functions in rcfile.c. */
Chris Allegretta7a500092001-04-19 21:13:46 +0000396#ifdef ENABLE_NANORC
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000397void rcfile_error(const char *msg, ...);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000398char *parse_next_word(char *ptr);
399char *parse_argument(char *ptr);
400#ifdef ENABLE_COLOR
401int colortoint(const char *colorname, int *bright);
402char *parse_next_regex(char *ptr);
David Lawrence Ramseyedab0cc2004-07-03 03:09:12 +0000403int nregcomp(regex_t *preg, const char *regex, int eflags);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000404void parse_syntax(char *ptr);
405void parse_colors(char *ptr);
406#endif /* ENABLE_COLOR */
407void parse_rcfile(FILE *rcstream);
Chris Allegretta8d8e0122001-04-18 04:28:54 +0000408void do_rcfile(void);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000409#endif /* ENABLE_NANORC */
Chris Allegretta8d8e0122001-04-18 04:28:54 +0000410
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000411/* Public functions in search.c. */
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000412#ifdef HAVE_REGEX_H
Chris Allegretta5d715142003-01-29 04:18:37 +0000413int regexp_init(const char *regexp);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000414void regexp_cleanup(void);
415#endif
416void not_found_msg(const char *str);
417void search_abort(void);
418void search_init_globals(void);
David Lawrence Ramseyd532f192004-10-04 22:37:56 +0000419int search_init(bool replacing, bool use_answer);
David Lawrence Ramseyc5100422004-08-27 20:28:34 +0000420bool is_whole_word(int curr_pos, const char *datastr, const char
David Lawrence Ramsey1044d742004-02-24 20:41:39 +0000421 *searchword);
David Lawrence Ramseyc5100422004-08-27 20:28:34 +0000422bool findnextstr(bool can_display_wrap, bool wholeword, bool
423 no_sameline, const filestruct *begin, size_t beginx, const char
David Lawrence Ramsey77b284a2004-10-27 02:21:01 +0000424 *needle, size_t *needle_len);
David Lawrence Ramseye5e88fd2004-10-31 13:20:30 +0000425void findnextstr_wrap_reset(void);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000426void do_search(void);
David Lawrence Ramsey5aa39832004-05-05 21:36:50 +0000427#ifndef NANO_SMALL
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000428void do_research(void);
David Lawrence Ramsey5aa39832004-05-05 21:36:50 +0000429#endif
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000430void replace_abort(void);
431#ifdef HAVE_REGEX_H
David Lawrence Ramseyc5100422004-08-27 20:28:34 +0000432int replace_regexp(char *string, bool create_flag);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000433#endif
David Lawrence Ramsey1044d742004-02-24 20:41:39 +0000434char *replace_line(const char *needle);
David Lawrence Ramsey182b2c92004-11-03 16:02:41 +0000435ssize_t do_replace_loop(const char *needle, const filestruct
436 *real_current, size_t *real_current_x, bool wholewords, bool
437 *canceled);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000438void do_replace(void);
David Lawrence Ramseyc53ab2a2004-08-04 18:24:53 +0000439void do_gotoline(int line, bool save_pos);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000440void do_gotoline_void(void);
David Lawrence Ramsey02517e02004-09-05 21:40:31 +0000441#if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_SPELLER)
David Lawrence Ramsey7a97e182004-10-30 01:03:15 +0000442void do_gotopos(int line, size_t pos_x, int pos_y, size_t pos_pww);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000443#endif
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000444void do_find_bracket(void);
Chris Allegretta5beed502003-01-05 20:41:21 +0000445#ifndef NANO_SMALL
446void history_init(void);
David Lawrence Ramsey6420d442004-08-11 05:13:08 +0000447historytype *find_node(historytype *h, const char *s);
Chris Allegretta5beed502003-01-05 20:41:21 +0000448void remove_node(historytype *r);
449void insert_node(historytype *h, const char *s);
David Lawrence Ramsey6420d442004-08-11 05:13:08 +0000450void update_history(historyheadtype *h, const char *s);
Chris Allegretta5beed502003-01-05 20:41:21 +0000451char *get_history_older(historyheadtype *h);
452char *get_history_newer(historyheadtype *h);
453char *get_history_completion(historyheadtype *h, char *s);
David Lawrence Ramsey6420d442004-08-11 05:13:08 +0000454#ifdef DEBUG
Chris Allegretta5beed502003-01-05 20:41:21 +0000455void free_history(historyheadtype *h);
Chris Allegrettaf3de8b52003-01-16 23:44:46 +0000456#endif
Chris Allegretta5beed502003-01-05 20:41:21 +0000457#endif
Chris Allegretta6df90f52002-07-19 01:08:59 +0000458
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000459/* Public functions in utils.c. */
David Lawrence Ramsey1044d742004-02-24 20:41:39 +0000460#ifdef HAVE_REGEX_H
Chris Allegrettad8451932003-03-11 03:50:40 +0000461#ifdef BROKEN_REGEXEC
462int regexec_safe(const regex_t *preg, const char *string, size_t nmatch,
463 regmatch_t pmatch[], int eflags);
464#endif
David Lawrence Ramsey1044d742004-02-24 20:41:39 +0000465int regexp_bol_or_eol(const regex_t *preg, const char *string);
466#endif
David Lawrence Ramsey9830d752004-05-13 17:19:54 +0000467#ifndef HAVE_ISBLANK
468int is_blank_char(int c);
469#endif
Chris Allegrettacf287c82002-07-20 13:57:41 +0000470int is_cntrl_char(int c);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000471int num_of_digits(int n);
David Lawrence Ramseyc53ab2a2004-08-04 18:24:53 +0000472bool parse_num(const char *str, ssize_t *val);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000473void align(char **strp);
474void null_at(char **data, size_t index);
475void unsunder(char *str, size_t true_len);
476void sunder(char *str);
Chris Allegretta4f5335d2003-08-04 02:51:12 +0000477#ifndef HAVE_STRCASECMP
478int nstricmp(const char *s1, const char *s2);
479#endif
480#ifndef HAVE_STRNCASECMP
481int nstrnicmp(const char *s1, const char *s2, size_t n);
482#endif
David Lawrence Ramsey14bf8032004-05-22 20:19:15 +0000483#ifndef HAVE_STRCASESTR
David Lawrence Ramseya3370c42004-04-05 01:08:14 +0000484const char *nstristr(const char *haystack, const char *needle);
David Lawrence Ramsey14bf8032004-05-22 20:19:15 +0000485#endif
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000486#ifndef NANO_SMALL
David Lawrence Ramseya3370c42004-04-05 01:08:14 +0000487const char *revstrstr(const char *haystack, const char *needle, const
488 char *rev_start);
489const char *revstristr(const char *haystack, const char *needle, const
490 char *rev_start);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000491#endif
David Lawrence Ramseyfa394042004-05-23 21:11:14 +0000492#ifndef HAVE_STRNLEN
493size_t nstrnlen(const char *s, size_t maxlen);
494#endif
David Lawrence Ramseya8834702004-08-17 20:34:57 +0000495#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
David Lawrence Ramseya27bd652004-08-17 05:23:38 +0000496#ifndef HAVE_GETLINE
497ssize_t ngetline(char **lineptr, size_t *n, FILE *stream);
498#endif
499#ifndef HAVE_GETDELIM
500ssize_t ngetdelim(char **lineptr, size_t *n, int delim, FILE *stream);
501#endif
David Lawrence Ramseya8834702004-08-17 20:34:57 +0000502#endif /* !NANO_SMALL && ENABLE_NANORC */
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000503const char *strstrwrapper(const char *haystack, const char *needle,
David Lawrence Ramsey1044d742004-02-24 20:41:39 +0000504 const char *start);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000505void nperror(const char *s);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000506void *nmalloc(size_t howmuch);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000507void *nrealloc(void *ptr, size_t howmuch);
David Lawrence Ramsey4a1fc552004-11-02 15:18:30 +0000508char *mallocstrncpy(char *dest, const char *src, size_t n);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000509char *mallocstrcpy(char *dest, const char *src);
David Lawrence Ramsey02517e02004-09-05 21:40:31 +0000510char *mallocstrassn(char *dest, char *src);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000511void new_magicline(void);
David Lawrence Ramsey5ffbec52003-09-16 01:16:49 +0000512#ifndef NANO_SMALL
David Lawrence Ramsey40bdb682004-11-03 22:03:41 +0000513void remove_magicline(void);
David Lawrence Ramseyf7080372004-07-08 17:15:10 +0000514void mark_order(const filestruct **top, size_t *top_x, const filestruct
David Lawrence Ramsey90e59c12004-11-05 23:03:03 +0000515 **bot, size_t *bot_x, bool *right_side_up);
David Lawrence Ramsey5ffbec52003-09-16 01:16:49 +0000516#endif
David Lawrence Ramsey93c84052004-11-23 04:08:28 +0000517void get_totals(const filestruct *begin, const filestruct *end, int
518 *lines, long *size);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000519#ifndef DISABLE_TABCOMP
520int check_wildcard_match(const char *text, const char *pattern);
521#endif
Chris Allegretta6df90f52002-07-19 01:08:59 +0000522
David Lawrence Ramsey8001e272004-11-12 00:48:18 +0000523/* Public functions in winio.c. */
David Lawrence Ramsey48ae9862004-05-28 17:23:33 +0000524#ifndef NANO_SMALL
525void reset_kbinput(void);
526#endif
David Lawrence Ramseyc59979f2004-10-23 02:47:39 +0000527void unget_kbinput(int kbinput, bool meta_key, bool func_key);
David Lawrence Ramseyeb16f432004-09-27 01:04:50 +0000528int get_kbinput(WINDOW *win, bool *meta_key, bool *func_key);
David Lawrence Ramsey4e8e4952004-10-14 21:59:45 +0000529int get_translated_kbinput(int kbinput, seq_type *seq
David Lawrence Ramsey48ae9862004-05-28 17:23:33 +0000530#ifndef NANO_SMALL
David Lawrence Ramseya0b5ba22004-08-25 15:39:10 +0000531 , bool reset
David Lawrence Ramsey48ae9862004-05-28 17:23:33 +0000532#endif
533 );
534int get_ascii_kbinput(int kbinput, size_t ascii_digits
535#ifndef NANO_SMALL
David Lawrence Ramseya0b5ba22004-08-25 15:39:10 +0000536 , bool reset
David Lawrence Ramsey48ae9862004-05-28 17:23:33 +0000537#endif
538 );
539int get_control_kbinput(int kbinput);
David Lawrence Ramsey5780b242004-10-14 20:48:38 +0000540int get_escape_seq_kbinput(const int *escape_seq, size_t es_len, bool
David Lawrence Ramseye65e6392004-06-04 18:18:17 +0000541 *ignore_seq);
David Lawrence Ramseyc2c5a512004-01-23 19:26:17 +0000542int get_escape_seq_abcd(int kbinput);
David Lawrence Ramsey6da969e2004-08-28 15:51:07 +0000543int *get_verbatim_kbinput(WINDOW *win, int first, int *v_kbinput, size_t
544 *v_len, bool allow_ascii);
David Lawrence Ramseya0b5ba22004-08-25 15:39:10 +0000545int get_untranslated_kbinput(int kbinput, size_t position, bool
David Lawrence Ramsey48ae9862004-05-28 17:23:33 +0000546 allow_ascii
547#ifndef NANO_SMALL
David Lawrence Ramseya0b5ba22004-08-25 15:39:10 +0000548 , bool reset
David Lawrence Ramsey48ae9862004-05-28 17:23:33 +0000549#endif
550 );
David Lawrence Ramsey14bf8032004-05-22 20:19:15 +0000551#ifndef DISABLE_MOUSE
David Lawrence Ramseya0b5ba22004-08-25 15:39:10 +0000552bool get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts);
553#endif
554const shortcut *get_shortcut(const shortcut *s_list, int kbinput, bool
David Lawrence Ramseyeb16f432004-09-27 01:04:50 +0000555 *meta_key, bool *func_key);
David Lawrence Ramseya0b5ba22004-08-25 15:39:10 +0000556#ifndef NANO_SMALL
557const toggle *get_toggle(int kbinput, bool meta_key);
558#endif
David Lawrence Ramseyd994ad52004-11-23 21:40:26 +0000559int get_edit_input(bool *meta_key, bool *func_key, bool allow_funcs);
David Lawrence Ramseya0b5ba22004-08-25 15:39:10 +0000560#ifndef DISABLE_MOUSE
561bool get_edit_mouse(void);
David Lawrence Ramsey14bf8032004-05-22 20:19:15 +0000562#endif
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000563size_t xplustabs(void);
David Lawrence Ramsey5ffbec52003-09-16 01:16:49 +0000564size_t actual_x(const char *str, size_t xplus);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000565size_t strnlenpt(const char *buf, size_t size);
566size_t strlenpt(const char *buf);
David Lawrence Ramseyd7fd2002004-05-18 01:20:36 +0000567void blank_titlebar(void);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000568void blank_edit(void);
569void blank_statusbar(void);
David Lawrence Ramseye5d8f322004-09-30 22:07:21 +0000570void check_statusblank(void);
David Lawrence Ramseyd7fd2002004-05-18 01:20:36 +0000571void blank_bottombars(void);
572char *display_string(const char *buf, size_t start_col, size_t len);
David Lawrence Ramsey5ffbec52003-09-16 01:16:49 +0000573void nanoget_repaint(const char *buf, const char *inputbuf, size_t x);
David Lawrence Ramsey045883a2004-10-05 20:11:31 +0000574int nanogetstr(bool allow_tabs, const char *buf, const char *def,
Chris Allegretta5beed502003-01-05 20:41:21 +0000575#ifndef NANO_SMALL
576 historyheadtype *history_list,
577#endif
David Lawrence Ramsey045883a2004-10-05 20:11:31 +0000578 const shortcut *s
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000579#ifndef DISABLE_TABCOMP
David Lawrence Ramsey4d44d2d2004-08-01 22:35:31 +0000580 , bool *list
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000581#endif
Chris Allegretta65f075d2003-02-13 03:03:49 +0000582 );
David Lawrence Ramsey045883a2004-10-05 20:11:31 +0000583int statusq(bool allow_tabs, const shortcut *s, const char *def,
584#ifndef NANO_SMALL
585 historyheadtype *history_list,
586#endif
587 const char *msg, ...);
588void statusq_abort(void);
Chris Allegrettaf717f982003-02-13 22:25:01 +0000589void titlebar(const char *path);
David Lawrence Ramseyd7fd2002004-05-18 01:20:36 +0000590void set_modified(void);
591void statusbar(const char *msg, ...);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000592void bottombars(const shortcut *s);
David Lawrence Ramseyfa394042004-05-23 21:11:14 +0000593void onekey(const char *keystroke, const char *desc, size_t len);
David Lawrence Ramsey1f28b8f2002-09-27 14:21:59 +0000594#ifndef NDEBUG
595int check_linenumbers(const filestruct *fileptr);
596#endif
David Lawrence Ramsey2dd7ed12003-09-29 05:15:24 +0000597size_t get_page_start(size_t column);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000598void reset_cursor(void);
David Lawrence Ramsey07d3feb2004-04-16 05:15:11 +0000599void edit_add(const filestruct *fileptr, const char *converted, int
600 yval, size_t start);
David Lawrence Ramsey5ffbec52003-09-16 01:16:49 +0000601void update_line(const filestruct *fileptr, size_t index);
David Lawrence Ramsey86e851b2004-07-28 20:46:25 +0000602int need_horizontal_update(size_t old_pww);
603int need_vertical_update(size_t old_pww);
David Lawrence Ramsey2ed225f2004-05-28 20:44:09 +0000604void edit_scroll(updown direction, int nlines);
David Lawrence Ramsey86e851b2004-07-28 20:46:25 +0000605void edit_redraw(const filestruct *old_current, size_t old_pww);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000606void edit_refresh(void);
David Lawrence Ramsey20b83502004-08-26 18:07:58 +0000607void edit_update(topmidnone location);
David Lawrence Ramsey045883a2004-10-05 20:11:31 +0000608int do_yesno(bool all, const char *msg);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000609void total_refresh(void);
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000610void display_main_list(void);
David Lawrence Ramseya0b5ba22004-08-25 15:39:10 +0000611void do_cursorpos(bool constant);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000612void do_cursorpos_void(void);
David Lawrence Ramsey8037fe02004-07-23 12:30:40 +0000613#ifndef DISABLE_HELP
614int help_line_len(const char *ptr);
David Lawrence Ramsey72e51ab2004-07-02 14:31:03 +0000615void do_help(void);
David Lawrence Ramsey8037fe02004-07-23 12:30:40 +0000616#endif
David Lawrence Ramseyad40fdb2002-09-06 20:35:28 +0000617void do_replace_highlight(int highlight_flag, const char *word);
Chris Allegretta6df90f52002-07-19 01:08:59 +0000618#ifdef DEBUG
619void dump_buffer(const filestruct *inptr);
620void dump_buffer_reverse(void);
621#endif
Chris Allegretta8a0de3b2000-11-24 20:45:14 +0000622#ifdef NANO_EXTRA
Chris Allegretta34318ed2001-01-31 23:22:36 +0000623void do_credits(void);
Chris Allegretta8a0de3b2000-11-24 20:45:14 +0000624#endif