per DB's patch, don't translate the option strings for -Z/--restricted;
also add a few more minor cosmetic fixes of mine git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1882 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
c53ab2a854
commit
22fac783f5
|
@ -71,6 +71,8 @@ CVS code -
|
||||||
(DLR and David Benbennick)
|
(DLR and David Benbennick)
|
||||||
- Automatically install a symlink "rnano" pointing to nano.
|
- Automatically install a symlink "rnano" pointing to nano.
|
||||||
Changes to src/Marefile.am. (DLR)
|
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:
|
- files.c:
|
||||||
close_open_file()
|
close_open_file()
|
||||||
- Tweak to no longer rely on the return values of
|
- Tweak to no longer rely on the return values of
|
||||||
|
@ -95,6 +97,9 @@ CVS code -
|
||||||
thanks_for_all_the_fish()
|
thanks_for_all_the_fish()
|
||||||
- Delete topwin, edit, and bottomwin. (David Benbennick)
|
- Delete topwin, edit, and bottomwin. (David Benbennick)
|
||||||
- nano.c:
|
- nano.c:
|
||||||
|
usage()
|
||||||
|
- Don't translate the option strings for -Z/--restricted.
|
||||||
|
(David Benbennick)
|
||||||
do_enter()
|
do_enter()
|
||||||
- Don't treat it as a special case when the user presses 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
|
on the last line of the screen and smooth scrolling is on, for
|
||||||
|
|
22
src/nano.c
22
src/nano.c
|
@ -72,6 +72,10 @@ static struct sigaction act; /* For all our fun signal handlers */
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
static sigjmp_buf jmpbuf; /* Used to return to mainloop after
|
static sigjmp_buf jmpbuf; /* Used to return to mainloop after
|
||||||
SIGWINCH */
|
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
|
#endif
|
||||||
|
|
||||||
/* What we do when we're all set to exit. */
|
/* What we do when we're all set to exit. */
|
||||||
|
@ -604,8 +608,8 @@ void renumber(filestruct *fileptr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print one usage string to the screen, removes lots of duplicate
|
/* Print one usage string to the screen. This cuts down on duplicate
|
||||||
* strings to translate and takes out the parts that shouldn't be
|
* strings to translate and leaves out the parts that shouldn't be
|
||||||
* translatable (the flag names). */
|
* translatable (the flag names). */
|
||||||
void print1opt(const char *shortflag, const char *longflag, const char
|
void print1opt(const char *shortflag, const char *longflag, const char
|
||||||
*desc)
|
*desc)
|
||||||
|
@ -670,7 +674,7 @@ void usage(void)
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
print1opt(_("-Y [str]"), _("--syntax [str]"), _("Syntax definition to use"));
|
print1opt(_("-Y [str]"), _("--syntax [str]"), _("Syntax definition to use"));
|
||||||
#endif
|
#endif
|
||||||
print1opt(_("-Z"), _("--restricted"), _("Restricted mode"));
|
print1opt("-Z", "--restricted", _("Restricted mode"));
|
||||||
print1opt("-c", "--const", _("Constantly show cursor position"));
|
print1opt("-c", "--const", _("Constantly show cursor position"));
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
print1opt("-d", "--rebinddelete", _("Fix Backspace/Delete confusion problem"));
|
print1opt("-d", "--rebinddelete", _("Fix Backspace/Delete confusion problem"));
|
||||||
|
@ -699,7 +703,7 @@ void usage(void)
|
||||||
print1opt("-x", "--nohelp", _("Don't show help window"));
|
print1opt("-x", "--nohelp", _("Don't show help window"));
|
||||||
print1opt("-z", "--suspend", _("Enable suspend"));
|
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)"));
|
printf(" %s\t\t\t%s\n","-a, -b, -e, -f, -g, -j", _("(ignored, for Pico compatibility)"));
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -779,9 +783,6 @@ void nano_disabled_msg(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#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)
|
RETSIGTYPE cancel_fork(int signal)
|
||||||
{
|
{
|
||||||
if (kill(pid, SIGKILL) == -1)
|
if (kill(pid, SIGKILL) == -1)
|
||||||
|
@ -793,7 +794,8 @@ int open_pipe(const char *command)
|
||||||
int fd[2];
|
int fd[2];
|
||||||
FILE *f;
|
FILE *f;
|
||||||
struct sigaction oldaction, newaction;
|
struct sigaction oldaction, newaction;
|
||||||
/* original and temporary handlers for SIGINT */
|
/* Original and temporary handlers for
|
||||||
|
* SIGINT. */
|
||||||
int cancel_sigs = 0;
|
int cancel_sigs = 0;
|
||||||
/* cancel_sigs == 1 means that sigaction() failed without changing
|
/* cancel_sigs == 1 means that sigaction() failed without changing
|
||||||
* the signal handlers. cancel_sigs == 2 means the signal handler
|
* the signal handlers. cancel_sigs == 2 means the signal handler
|
||||||
|
@ -856,8 +858,8 @@ int open_pipe(const char *command)
|
||||||
nperror("fdopen");
|
nperror("fdopen");
|
||||||
|
|
||||||
read_file(f, "stdin", 0);
|
read_file(f, "stdin", 0);
|
||||||
/* if multibuffer mode is on, we could be here in view mode; if so,
|
/* If multibuffer mode is on, we could be here in view mode. If so,
|
||||||
don't set the modification flag */
|
* don't set the modification flag. */
|
||||||
if (!ISSET(VIEW_MODE))
|
if (!ISSET(VIEW_MODE))
|
||||||
set_modified();
|
set_modified();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue