is set, handler in main to run handle_sigwinch() when set.
Should fix segfaults when nano is initially suspended while
reading in a file (found by Mike Frysinger).
+ - Port to the Tandem NonStop Kernel (nsr-tandem-nsk). (Tom
+ Bates; minor tweaks by DLR)
- nano.c:
handle_sigwinch()
- Rework so that nano properly redraws the screen on systems
#246956 (no warning when trying to open non-readable file).
- Add an extra titlebar() call (useful when reading in a big
file).
+- nano.h:
+ - Move the NANO_H include guard up before the first #include.
+ (DLR)
- configure.ac:
- Remove the checks for resizeterm() and wresize(), as they're
no longer needed. (DLR)
#if !defined(ENABLE_NANORC) && defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
/* if we don't have rcfile support, we're root, and
--disable-wrapping-as-root is used, turn wrapping off */
- if (geteuid() == 0)
+ if (geteuid() == NANO_ROOT_UID)
SET(NO_WRAP);
#endif
flags |= flags_cpy;
}
#if defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
- else if (geteuid() == 0)
+ else if (geteuid() == NANO_ROOT_UID)
SET(NO_WRAP);
#endif
#endif /* ENABLE_NANORC */
* *
**************************************************************************/
+#ifndef NANO_H
+#define NANO_H 1
+
+#ifdef __TANDEM
+/* Tandem NonStop Kernel */
+#include <floss.h>
+#define NANO_ROOT_UID 65535
+#else
+#define NANO_ROOT_UID 0
+#endif
+
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
-#ifndef NANO_H
-#define NANO_H 1
-
/* Macros for the flags int... */
#define SET(bit) flags |= bit
#define UNSET(bit) flags &= ~bit
#if defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
/* If we've already read $SYSCONFDIR/nanorc (if it's there), we're
root, and --disable-wrapping-as-root is used, turn wrapping off */
- if (euid == 0)
+ if (euid == NANO_ROOT_UID)
SET(NO_WRAP);
#endif
if ((rcstream = fopen(nanorc, "r")) == NULL) {