]> git.wh0rd.org Git - nano.git/commitdiff
make sure the "historylog" option isn't included in tiny mode
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 6 Sep 2003 21:44:37 +0000 (21:44 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 6 Sep 2003 21:44:37 +0000 (21:44 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
files.c
nano.c
rcfile.c

index fad6727885f92ffcb68feb762b13a1547df0972c..cf475c90819808dbb409e87dd05417db71e02c42 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,8 @@ CVS code -
          new functions do_para_operation(), do_para_begin(), and
          do_para_end().  Note that the last three functions are
          disabled if justification is disabled. (DLR)
+       - Make sure the "historylog" option isn't included at all if
+         NANO_SMALL is defined. (DLR)
 - files.c:
   do_browser()
        - Some of the Pico compatibility options in the file browser
diff --git a/files.c b/files.c
index a95385d1552f668ba610b1e3b7f98480866d85c6..c918eb7d54b5987261c2aa0823ee5ccd6582a058 100644 (file)
--- a/files.c
+++ b/files.c
@@ -2870,7 +2870,7 @@ void load_history(void)
 
     if (homenv != NULL || userage != NULL) {
        hist = fopen(nanohist, "r");
-       if (!hist) {
+       if (hist == NULL) {
             if (errno != ENOENT) {
                /* Don't save history when we quit. */
                UNSET(HISTORYLOG);
@@ -2923,7 +2923,7 @@ void save_history(void)
 
     if (homenv != NULL || userage != NULL) {
        hist = fopen(nanohist, "wb");
-       if (!hist) {
+       if (hist == NULL) {
            rcfile_msg(_("Unable to write ~/.nano_history file, %s"), strerror(errno));
        } else {
            /* set rw only by owner for security ?? */
diff --git a/nano.c b/nano.c
index cba0ef6fc2abe9af48a59c24c704a3315dca0370..0a5e60780a307c0606752d9267e546a76c46e338 100644 (file)
--- a/nano.c
+++ b/nano.c
@@ -630,7 +630,9 @@ void usage(void)
     print1opt("-F", "--multibuffer", _("Enable multiple file buffers"));
 #endif
 #ifdef ENABLE_NANORC
+#ifndef NANO_SMALL
     print1opt("-H", "--historylog", _("Log & read search/replace string history"));
+#endif
     print1opt("-I", "--ignorercfiles", _("Don't look at nanorc files"));
 #endif
 #ifndef NANO_SMALL
@@ -3128,7 +3130,9 @@ int main(int argc, char *argv[])
        {"multibuffer", 0, 0, 'F'},
 #endif
 #ifdef ENABLE_NANORC
+#ifndef NANO_SMALL
        {"historylog", 0, 0, 'H'},
+#endif
        {"ignorercfiles", 0, 0, 'I'},
 #endif
 #ifndef DISABLE_JUSTIFY
@@ -3223,9 +3227,11 @@ int main(int argc, char *argv[])
            break;
 #endif
 #ifdef ENABLE_NANORC
+#ifndef NANO_SMALL
        case 'H':
            SET(HISTORYLOG);
            break;
+#endif
        case 'I':
            SET(NO_RCFILE);
            break;
index 4c37b6b3af41020a25c4ac51aed65b06164dabf4..42beb5095735ba79cbf8f1ff9be7402b47855e98 100644 (file)
--- a/rcfile.c
+++ b/rcfile.c
@@ -49,6 +49,9 @@ const static rcoption rcopts[] = {
 #ifndef DISABLE_WRAPJUSTIFY
     {"fill", 0},
 #endif
+#ifndef NANO_SMALL
+    {"historylog", HISTORYLOG},
+#endif
 #if !defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION)
     {"mouse", USE_MOUSE},
 #endif
@@ -84,7 +87,6 @@ const static rcoption rcopts[] = {
     {"tabsize", 0},
     {"tempfile", TEMP_OPT},
     {"view", VIEW_MODE},
-    {"historylog", HISTORYLOG},
     {NULL, 0}
 };