- Changed #ifdefs to check for both DISABLE_TABCOMP and
NANO_SMALL, makes tiny option leave out tab completion, which
shoudl be left out in that circumstance. Saves at least 5k.
+ - Previous change to #ifdefs DISABLE_TABCOMP and NANO_SMALL rolled
+ back.
+ - Changed nano.h to automatically define 5 DISABLE varibles when
+ NANO_SMALL (enable-tiny) is requested at configure.
- configure.in:
- Fix for _use_keypad check breaking slang support (Christian
Weisgerber).
fprintf(stderr, "filename is %s", answer);
#endif
-#if !defined(DISABLE_TABCOMP) && !defined(NANO_SMALL)
+#ifndef DISABLE_TABCOMP
realname = real_dir_from_tilde(answer);
#else
realname = mallocstrcpy(realname, answer);
char *tmp = do_browse_from(realname);
-#if defined(DISABLE_TABCOMP)
+#ifdef DISABLE_TABCOMP
realname = NULL;
#endif
if (tmp != NULL)
if (buf != NULL)
free(buf);
-#if !defined(DISABLE_TABCOMP) && !defined(NANO_SMALL)
+#ifndef DISABLE_TABCOMP
realname = real_dir_from_tilde(name);
#else
realname = mallocstrcpy(realname, name);
return do_writeout(filename, 0);
}
-#if !defined(DISABLE_TABCOMP) && !defined(NANO_SMALL)
+#ifndef DISABLE_TABCOMP
static char **homedirs;
/* Return a malloc()ed string containing the actual directory, used
#ifndef NANO_H
#define NANO_H 1
+/* Define this to make the nano executable as small as possible */
+#ifdef NANO_SMALL
+
+ #ifndef DISABLE_TABCOMP
+ #define DISABLE_TABCOMP 1
+ #endif
+
+ #ifndef DISABLE_JUSTIFY
+ #define DISABLE_JUSTIFY 1
+ #endif
+
+ #ifndef DISABLE_SPELLER
+ #define DISABLE_SPELLER 1
+ #endif
+
+ #ifndef DISABLE_HELP
+ #define DISABLE_HELP 1
+ #endif
+
+ #ifndef DISABLE_BROWSER
+ #define DISABLE_BROWSER 1
+ #endif
+
+#endif /* NANO_SMALL */
+
/* Macros for the flags int... */
#define SET(bit) flags |= bit
#define UNSET(bit) flags &= ~bit
totsize++;
}
-#if !defined(DISABLE_TABCOMP) && !defined(NANO_SMALL)
+#ifndef DISABLE_TABCOMP
/*
* Routine to see if a text string is matched by a wildcard pattern.
* Returns TRUE if the text is matched, or FALSE if it is not matched
int kbinput = 0, j = 0, x = 0, xend;
int x_left = 0, inputlen, tabbed = 0;
char *inputbuf;
-#if !defined(DISABLE_TABCOMP) && !defined(NANO_SMALL)
+#ifndef DISABLE_TABCOMP
int shift = 0;
#endif
x--;
nanoget_repaint(buf, inputbuf, x);
break;
-#if !defined(DISABLE_TABCOMP) && !defined(NANO_SMALL)
+#ifndef DISABLE_TABCOMP
case NANO_CONTROL_I:
if (allowtabs) {
shift = 0;