From cef24f2254ec6b5b470792ab1b4a8570adf953f4 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 3 Jun 2005 01:36:05 +0000 Subject: [PATCH] fix #ifdefs so the tiny version of nano compiles again; prepending a file now uses safe_tempfile() instead of mkstemp() directly, and safe_tempfile() requires get_full_path() and check_writable_directory() git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2580 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/files.c | 4 ---- src/proto.h | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/files.c b/src/files.c index 11783a91..5e298111 100644 --- a/src/files.c +++ b/src/files.c @@ -982,7 +982,6 @@ bool close_open_file(void) } #endif /* ENABLE_MULTIBUFFER */ -#if !defined(DISABLE_SPELLER) || !defined(DISABLE_OPERATINGDIR) /* When passed "[relative path]" or "[relative path][filename]" in * origpath, return "[full path]" or "[full path][filename]" on success, * or NULL on error. Do this if the file doesn't exist but the relative @@ -1109,9 +1108,7 @@ char *get_full_path(const char *origpath) return d_there; } -#endif /* !DISABLE_SPELLER || !DISABLE_OPERATINGDIR */ -#ifndef DISABLE_SPELLER /* Return the full version of path, as returned by get_full_path(). On * error, if path doesn't reference a directory, or if the directory * isn't writable, return NULL. */ @@ -1176,7 +1173,6 @@ char *safe_tempfile(FILE **f) return full_tempdir; } -#endif /* !DISABLE_SPELLER */ #ifndef DISABLE_OPERATINGDIR /* Initialize full_operating_dir based on operating_dir. */ diff --git a/src/proto.h b/src/proto.h index 7efa41e2..293c0f1a 100644 --- a/src/proto.h +++ b/src/proto.h @@ -275,13 +275,9 @@ void open_prevfile_void(void); void open_nextfile_void(void); bool close_open_file(void); #endif -#if !defined(DISABLE_SPELLER) || !defined(DISABLE_OPERATINGDIR) char *get_full_path(const char *origpath); -#endif -#ifndef DISABLE_SPELLER char *check_writable_directory(const char *path); char *safe_tempfile(FILE **f); -#endif #ifndef DISABLE_OPERATINGDIR void init_operating_dir(void); bool check_operating_dir(const char *currpath, bool allow_tabcomp);