nano

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

commit cb04b56c920f0a1d0efc149aaa000ca5df9f61aa
parent 5d7a1017eff803bbc4ab606d98f5b8901c91431e
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Tue,  9 Jan 2007 22:56:56 +0000

more miscellaneous comment fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4022 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
Msrc/nano.c | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -523,7 +523,7 @@ void print_view_warning(void) statusbar(_("Key invalid in view mode")); } -/* What we do when we're all set to exit. */ +/* Make nano exit gracefully. */ void finish(void) { /* Blank the statusbar (and shortcut list, if applicable), and move @@ -547,10 +547,11 @@ void finish(void) thanks_for_all_the_fish(); #endif + /* Get out. */ exit(0); } -/* Die (gracefully?). */ +/* Make nano die gracefully. */ void die(const char *msg, ...) { va_list ap; @@ -605,8 +606,8 @@ void die_save_file(const char *die_filename) if (ISSET(RESTRICTED)) return; - /* If we can't save, we have REAL bad problems, but we might as well - * TRY. */ + /* If we can't save, we have really bad problems, but we might as + * well try. */ if (die_filename[0] == '\0') die_filename = "nano"; @@ -698,7 +699,7 @@ void mouse_init(void) /* Print one usage string to the screen. This cuts down on duplicate * strings to translate, and leaves out the parts that shouldn't be - * translatable (the flag names). */ + * translatable (i.e. the flag names). */ void print_opt_full(const char *shortflag #ifdef HAVE_GETOPT_LONG , const char *longflag @@ -924,6 +925,11 @@ void nano_disabled_msg(void) statusbar(_("Sorry, support for this function has been disabled")); } +/* If the current file buffer has been modified, and the TEMP_FILE flag + * isn't set, ask whether or not to save the file buffer. If the + * TEMP_FILE flag is set, save it unconditionally. Then, if more than + * one file buffer is open, close the current file buffer and switch to + * the next one. If only one file buffer is open, exit from nano. */ void do_exit(void) { int i;