Commit cb04b56c authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

more miscellaneous comment fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4022 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 11 additions and 5 deletions
+11 -5
...@@ -523,7 +523,7 @@ void print_view_warning(void) ...@@ -523,7 +523,7 @@ void print_view_warning(void)
statusbar(_("Key invalid in view mode")); statusbar(_("Key invalid in view mode"));
} }
/* What we do when we're all set to exit. */ /* Make nano exit gracefully. */
void finish(void) void finish(void)
{ {
/* Blank the statusbar (and shortcut list, if applicable), and move /* Blank the statusbar (and shortcut list, if applicable), and move
...@@ -547,10 +547,11 @@ void finish(void) ...@@ -547,10 +547,11 @@ void finish(void)
thanks_for_all_the_fish(); thanks_for_all_the_fish();
#endif #endif
/* Get out. */
exit(0); exit(0);
} }
/* Die (gracefully?). */ /* Make nano die gracefully. */
void die(const char *msg, ...) void die(const char *msg, ...)
{ {
va_list ap; va_list ap;
...@@ -605,8 +606,8 @@ void die_save_file(const char *die_filename) ...@@ -605,8 +606,8 @@ void die_save_file(const char *die_filename)
if (ISSET(RESTRICTED)) if (ISSET(RESTRICTED))
return; return;
/* If we can't save, we have REAL bad problems, but we might as well /* If we can't save, we have really bad problems, but we might as
* TRY. */ * well try. */
if (die_filename[0] == '\0') if (die_filename[0] == '\0')
die_filename = "nano"; die_filename = "nano";
...@@ -698,7 +699,7 @@ void mouse_init(void) ...@@ -698,7 +699,7 @@ void mouse_init(void)
/* Print one usage string to the screen. This cuts down on duplicate /* Print one usage string to the screen. This cuts down on duplicate
* strings to translate, and leaves out the parts that shouldn't be * 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 void print_opt_full(const char *shortflag
#ifdef HAVE_GETOPT_LONG #ifdef HAVE_GETOPT_LONG
, const char *longflag , const char *longflag
...@@ -924,6 +925,11 @@ void nano_disabled_msg(void) ...@@ -924,6 +925,11 @@ void nano_disabled_msg(void)
statusbar(_("Sorry, support for this function has been disabled")); 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) void do_exit(void)
{ {
int i; int i;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment