- Remove do_preserve_msg, as using -p still gives Pico-style string behavior, so an annoying message every invocation is probably unneeded (all cheer)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1458 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
d0845df735
commit
bcc8688a3b
|
@ -16,6 +16,9 @@ CVS code
|
||||||
- Change various const char *s to char *s because Irix curses
|
- Change various const char *s to char *s because Irix curses
|
||||||
waddnstr() complains about const char's, I imagine this is a
|
waddnstr() complains about const char's, I imagine this is a
|
||||||
common System V curses issue.
|
common System V curses issue.
|
||||||
|
- Remove do_preserve_msg, as using -p still gives Pico-style
|
||||||
|
string behavior, so an annoying message every invocation is
|
||||||
|
probably unneeded (all cheer).
|
||||||
- files.c:
|
- files.c:
|
||||||
cwd_tab_completion()
|
cwd_tab_completion()
|
||||||
- Memory leak fix (David Benbennick).
|
- Memory leak fix (David Benbennick).
|
||||||
|
|
29
nano.c
29
nano.c
|
@ -780,16 +780,6 @@ void nano_disabled_msg(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void do_preserve_msg(void)
|
|
||||||
{
|
|
||||||
fprintf(stderr, _("\nThe -p flag now invokes the Pico \"preserve\" flag.\n"
|
|
||||||
"The Pico compatibility flag has been removed as nano\n"
|
|
||||||
"now fully Pico compatible. Please see the nano FAQ\n"
|
|
||||||
"for more info on this change...\n\n"
|
|
||||||
"Press return to continue\n"));
|
|
||||||
while (getchar() != '\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
static int pid; /* This is the PID of the newly forked process
|
static int pid; /* This is the PID of the newly forked process
|
||||||
* below. It must be global since the signal
|
* below. It must be global since the signal
|
||||||
|
@ -3025,9 +3015,6 @@ int main(int argc, char *argv[])
|
||||||
int keyhandled = 0; /* Have we handled the keystroke yet? */
|
int keyhandled = 0; /* Have we handled the keystroke yet? */
|
||||||
int kbinput = -1; /* Input from keyboard */
|
int kbinput = -1; /* Input from keyboard */
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_LONG
|
|
||||||
int preserveopt = 0; /* Did the cmdline include --preserve? */
|
|
||||||
#endif
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
const toggle *t;
|
const toggle *t;
|
||||||
#endif
|
#endif
|
||||||
|
@ -3098,20 +3085,6 @@ int main(int argc, char *argv[])
|
||||||
textdomain(PACKAGE);
|
textdomain(PACKAGE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_LONG
|
|
||||||
{
|
|
||||||
/* Check for the --preserve flag, and report error if people are
|
|
||||||
still using --pico. */
|
|
||||||
int i;
|
|
||||||
for (i = 1; i < argc; i++) {
|
|
||||||
if (!strcmp(argv[i], "--preserve"))
|
|
||||||
preserveopt = 1;
|
|
||||||
else if (!strcmp(argv[i], "--pico"))
|
|
||||||
do_preserve_msg();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(ENABLE_NANORC) && defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
|
#if !defined(ENABLE_NANORC) && defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
|
||||||
/* if we don't have rcfile support, we're root, and
|
/* if we don't have rcfile support, we're root, and
|
||||||
--disable-wrapping-as-root is used, turn wrapping off */
|
--disable-wrapping-as-root is used, turn wrapping off */
|
||||||
|
@ -3237,8 +3210,6 @@ int main(int argc, char *argv[])
|
||||||
case 'p':
|
case 'p':
|
||||||
SET(PRESERVE);
|
SET(PRESERVE);
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
if (!preserveopt)
|
|
||||||
do_preserve_msg();
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#ifndef DISABLE_WRAPJUSTIFY
|
#ifndef DISABLE_WRAPJUSTIFY
|
||||||
|
|
1
proto.h
1
proto.h
|
@ -261,7 +261,6 @@ int no_help(void);
|
||||||
#if defined(DISABLE_JUSTIFY) || defined(DISABLE_SPELLER) || defined(DISABLE_HELP) || defined(NANO_SMALL)
|
#if defined(DISABLE_JUSTIFY) || defined(DISABLE_SPELLER) || defined(DISABLE_HELP) || defined(NANO_SMALL)
|
||||||
void nano_disabled_msg(void);
|
void nano_disabled_msg(void);
|
||||||
#endif
|
#endif
|
||||||
void do_preserve_msg(void);
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
RETSIGTYPE cancel_fork(int signal);
|
RETSIGTYPE cancel_fork(int signal);
|
||||||
int open_pipe(const char *command);
|
int open_pipe(const char *command);
|
||||||
|
|
Loading…
Reference in New Issue