2008-08-28 Chris Allegretta <chrisa@asty.org>
* configure.ac, rcfile.c: Add support for an alternate rcfilename at configure time. Maybe this should become a command line option some day, but I don't see the need currently. Start of fix for Savannah bug #24128: Add nanorc support to win32 platform. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
dc7136a082
commit
faeeb5bd7e
|
@ -1,3 +1,8 @@
|
||||||
|
2008-08-28 Chris Allegretta <chrisa@asty.org>
|
||||||
|
* configure.ac, rcfile.c: Add support for an alternate rcfilename at configure time. Maybe this
|
||||||
|
should become a command line option some day, but I don't see the need currently. Start of
|
||||||
|
fix for Savannah bug #24128: Add nanorc support to win32 platform.
|
||||||
|
|
||||||
2008-08-21 Chris Allegretta <chrisa@asty.org>
|
2008-08-21 Chris Allegretta <chrisa@asty.org>
|
||||||
* text.c: Change error messages where we may possibly get into a bad state and urge
|
* text.c: Change error messages where we may possibly get into a bad state and urge
|
||||||
the user to save when this happens. Originally by Benno Schulenberg <bensberg@justemail.net>
|
the user to save when this happens. Originally by Benno Schulenberg <bensberg@justemail.net>
|
||||||
|
|
|
@ -387,6 +387,12 @@ fi
|
||||||
AM_CONDITIONAL(USE_COLOR, test x$color_support = xyes)
|
AM_CONDITIONAL(USE_COLOR, test x$color_support = xyes)
|
||||||
AM_CONDITIONAL(USE_NANORC, test x$nanorc_support = xyes)
|
AM_CONDITIONAL(USE_NANORC, test x$nanorc_support = xyes)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(altrcname,
|
||||||
|
[ --enable-altrcname Specify alternate rcfile name (default: .nanorc)],
|
||||||
|
[if test x$enableval != no; then
|
||||||
|
AC_DEFINE_UNQUOTED(RCFILE_NAME, "$enableval", [Specify alternate rcfile name (default: .nanorc)]) rcfilename=$enableval
|
||||||
|
fi])
|
||||||
|
|
||||||
dnl Checks for functions.
|
dnl Checks for functions.
|
||||||
|
|
||||||
AC_CHECK_FUNCS(getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen vsnprintf)
|
AC_CHECK_FUNCS(getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen vsnprintf)
|
||||||
|
|
|
@ -1044,8 +1044,11 @@ void do_rcfile(void)
|
||||||
if (homedir == NULL)
|
if (homedir == NULL)
|
||||||
rcfile_error(N_("I can't find my home directory! Wah!"));
|
rcfile_error(N_("I can't find my home directory! Wah!"));
|
||||||
else {
|
else {
|
||||||
nanorc = charealloc(nanorc, strlen(homedir) + 9);
|
#ifndef RCFILE_NAME
|
||||||
sprintf(nanorc, "%s/.nanorc", homedir);
|
#define RCFILE_NAME ".nanorc"
|
||||||
|
#endif
|
||||||
|
nanorc = charealloc(nanorc, strlen(homedir) + strlen(RCFILE_NAME) + 2);
|
||||||
|
sprintf(nanorc, "%s/%s", homedir, RCFILE_NAME);
|
||||||
|
|
||||||
/* Don't open directories, character files, or block files. */
|
/* Don't open directories, character files, or block files. */
|
||||||
if (stat(nanorc, &rcinfo) != -1) {
|
if (stat(nanorc, &rcinfo) != -1) {
|
||||||
|
|
Loading…
Reference in New Issue