diff -ur nano/ChangeLog nano-fixed/ChangeLog --- nano/ChangeLog 2004-02-28 11:24:31.000000000 -0500 +++ nano-fixed/ChangeLog 2004-02-28 11:27:37.000000000 -0500 @@ -30,6 +30,7 @@ Add function init_backup_dir() to handle relative paths correctly, use get_full_path() to get the canonical pathname, and use tail() to get the filename if get_full_path() fails. + - Port to nsr-tandem-nsk. (Tom Bates; minor tweaks by DLR) - files.c: add_open_files() - Make the saving of marked status in open_files->file_flags diff -ur nano/src/nano.c nano-fixed/src/nano.c --- nano/src/nano.c 2004-02-28 11:24:31.000000000 -0500 +++ nano-fixed/src/nano.c 2004-02-28 11:27:01.000000000 -0500 @@ -3173,7 +3173,7 @@ #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 @@ -3415,7 +3415,7 @@ 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 */ diff -ur nano/src/nano.h nano-fixed/src/nano.h --- nano/src/nano.h 2004-02-26 22:06:28.000000000 -0500 +++ nano-fixed/src/nano.h 2004-02-28 11:27:01.000000000 -0500 @@ -22,6 +22,13 @@ #ifndef NANO_H #define NANO_H 1 +#ifdef __TANDEM +#include +#define NANO_ROOT_UID 65535 +#else +#define NANO_ROOT_UID 0 +#endif + #ifdef HAVE_LIMITS_H #include #endif diff -ur nano/src/rcfile.c nano-fixed/src/rcfile.c --- nano/src/rcfile.c 2004-02-28 11:24:31.000000000 -0500 +++ nano-fixed/src/rcfile.c 2004-02-28 11:27:01.000000000 -0500 @@ -678,7 +678,7 @@ #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) {