(DLR and David Benbennick)
- Automatically install a symlink "rnano" pointing to nano.
Changes to src/Marefile.am. (DLR)
+ - Move the static int pid to the beginning of nano.c with all
+ the other static variables. (DLR)
- files.c:
close_open_file()
- Tweak to no longer rely on the return values of
thanks_for_all_the_fish()
- Delete topwin, edit, and bottomwin. (David Benbennick)
- nano.c:
+ usage()
+ - Don't translate the option strings for -Z/--restricted.
+ (David Benbennick)
do_enter()
- Don't treat it as a special case when the user presses Enter
on the last line of the screen and smooth scrolling is on, for
#ifndef NANO_SMALL
static sigjmp_buf jmpbuf; /* Used to return to mainloop after
SIGWINCH */
+static int pid; /* The PID of the newly forked process
+ * in open_pipe(). It must be global
+ * because the signal handler needs
+ * it. */
#endif
/* What we do when we're all set to exit. */
}
}
-/* Print one usage string to the screen, removes lots of duplicate
- * strings to translate and takes out the parts that shouldn't be
+/* 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). */
void print1opt(const char *shortflag, const char *longflag, const char
*desc)
#ifdef ENABLE_COLOR
print1opt(_("-Y [str]"), _("--syntax [str]"), _("Syntax definition to use"));
#endif
- print1opt(_("-Z"), _("--restricted"), _("Restricted mode"));
+ print1opt("-Z", "--restricted", _("Restricted mode"));
print1opt("-c", "--const", _("Constantly show cursor position"));
#ifndef NANO_SMALL
print1opt("-d", "--rebinddelete", _("Fix Backspace/Delete confusion problem"));
print1opt("-x", "--nohelp", _("Don't show help window"));
print1opt("-z", "--suspend", _("Enable suspend"));
- /* this is a special case */
+ /* This is a special case. */
printf(" %s\t\t\t%s\n","-a, -b, -e, -f, -g, -j", _("(ignored, for Pico compatibility)"));
exit(0);
}
#ifndef NANO_SMALL
-static int pid; /* This is the PID of the newly forked process
- * below. It must be global since the signal
- * handler needs it. */
RETSIGTYPE cancel_fork(int signal)
{
if (kill(pid, SIGKILL) == -1)
int fd[2];
FILE *f;
struct sigaction oldaction, newaction;
- /* original and temporary handlers for SIGINT */
+ /* Original and temporary handlers for
+ * SIGINT. */
int cancel_sigs = 0;
/* cancel_sigs == 1 means that sigaction() failed without changing
* the signal handlers. cancel_sigs == 2 means the signal handler
nperror("fdopen");
read_file(f, "stdin", 0);
- /* if multibuffer mode is on, we could be here in view mode; if so,
- don't set the modification flag */
+ /* If multibuffer mode is on, we could be here in view mode. If so,
+ * don't set the modification flag. */
if (!ISSET(VIEW_MODE))
set_modified();