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-d3aeb78583b8master
parent
8d07efac66
commit
cef24f2254
|
@ -982,7 +982,6 @@ bool close_open_file(void)
|
||||||
}
|
}
|
||||||
#endif /* ENABLE_MULTIBUFFER */
|
#endif /* ENABLE_MULTIBUFFER */
|
||||||
|
|
||||||
#if !defined(DISABLE_SPELLER) || !defined(DISABLE_OPERATINGDIR)
|
|
||||||
/* When passed "[relative path]" or "[relative path][filename]" in
|
/* When passed "[relative path]" or "[relative path][filename]" in
|
||||||
* origpath, return "[full path]" or "[full path][filename]" on success,
|
* 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
|
* 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;
|
return d_there;
|
||||||
}
|
}
|
||||||
#endif /* !DISABLE_SPELLER || !DISABLE_OPERATINGDIR */
|
|
||||||
|
|
||||||
#ifndef DISABLE_SPELLER
|
|
||||||
/* Return the full version of path, as returned by get_full_path(). On
|
/* 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
|
* error, if path doesn't reference a directory, or if the directory
|
||||||
* isn't writable, return NULL. */
|
* isn't writable, return NULL. */
|
||||||
|
@ -1176,7 +1173,6 @@ char *safe_tempfile(FILE **f)
|
||||||
|
|
||||||
return full_tempdir;
|
return full_tempdir;
|
||||||
}
|
}
|
||||||
#endif /* !DISABLE_SPELLER */
|
|
||||||
|
|
||||||
#ifndef DISABLE_OPERATINGDIR
|
#ifndef DISABLE_OPERATINGDIR
|
||||||
/* Initialize full_operating_dir based on operating_dir. */
|
/* Initialize full_operating_dir based on operating_dir. */
|
||||||
|
|
|
@ -275,13 +275,9 @@ void open_prevfile_void(void);
|
||||||
void open_nextfile_void(void);
|
void open_nextfile_void(void);
|
||||||
bool close_open_file(void);
|
bool close_open_file(void);
|
||||||
#endif
|
#endif
|
||||||
#if !defined(DISABLE_SPELLER) || !defined(DISABLE_OPERATINGDIR)
|
|
||||||
char *get_full_path(const char *origpath);
|
char *get_full_path(const char *origpath);
|
||||||
#endif
|
|
||||||
#ifndef DISABLE_SPELLER
|
|
||||||
char *check_writable_directory(const char *path);
|
char *check_writable_directory(const char *path);
|
||||||
char *safe_tempfile(FILE **f);
|
char *safe_tempfile(FILE **f);
|
||||||
#endif
|
|
||||||
#ifndef DISABLE_OPERATINGDIR
|
#ifndef DISABLE_OPERATINGDIR
|
||||||
void init_operating_dir(void);
|
void init_operating_dir(void);
|
||||||
bool check_operating_dir(const char *currpath, bool allow_tabcomp);
|
bool check_operating_dir(const char *currpath, bool allow_tabcomp);
|
||||||
|
|
Loading…
Reference in New Issue