mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-06 01:22:15 +03:00
cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3936 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
366c509304
commit
4967eb8fc0
@ -1,4 +1,6 @@
|
|||||||
CVS code -
|
CVS code -
|
||||||
|
- General:
|
||||||
|
- Miscellaneous comment fixes. (DLR)
|
||||||
|
|
||||||
GNU nano 2.0.0 - 2006.11.06
|
GNU nano 2.0.0 - 2006.11.06
|
||||||
- General:
|
- General:
|
||||||
|
16
src/files.c
16
src/files.c
@ -959,8 +959,8 @@ char *get_full_path(const char *origpath)
|
|||||||
/* If stat()ing d_there fails, assume that d_there refers to a new
|
/* If stat()ing d_there fails, assume that d_there refers to a new
|
||||||
* file that hasn't been saved to disk yet. Set path_only to TRUE
|
* file that hasn't been saved to disk yet. Set path_only to TRUE
|
||||||
* if d_there refers to a directory, and FALSE otherwise. */
|
* if d_there refers to a directory, and FALSE otherwise. */
|
||||||
path_only = stat(d_there, &fileinfo) == 0 &&
|
path_only = (stat(d_there, &fileinfo) != -1 &&
|
||||||
S_ISDIR(fileinfo.st_mode);
|
S_ISDIR(fileinfo.st_mode));
|
||||||
|
|
||||||
/* If path_only is TRUE, make sure d_there ends in a slash. */
|
/* If path_only is TRUE, make sure d_there ends in a slash. */
|
||||||
if (path_only) {
|
if (path_only) {
|
||||||
@ -1145,10 +1145,10 @@ void init_operating_dir(void)
|
|||||||
* so that tab completion will work. */
|
* so that tab completion will work. */
|
||||||
bool check_operating_dir(const char *currpath, bool allow_tabcomp)
|
bool check_operating_dir(const char *currpath, bool allow_tabcomp)
|
||||||
{
|
{
|
||||||
/* The char *full_operating_dir is global for mem cleanup. It
|
/* full_operating_dir is global for memory cleanup. It should have
|
||||||
* should have already been initialized by init_operating_dir().
|
* already been initialized by init_operating_dir(). Also, a
|
||||||
* Also, a relative operating directory path will only be handled
|
* relative operating directory path will only be handled properly
|
||||||
* properly if this is done. */
|
* if this is done. */
|
||||||
|
|
||||||
char *fullpath;
|
char *fullpath;
|
||||||
bool retval = FALSE;
|
bool retval = FALSE;
|
||||||
@ -1873,7 +1873,7 @@ int do_writeout(bool exiting)
|
|||||||
openfile->filename) != 0) {
|
openfile->filename) != 0) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
if (!stat(answer, &st)) {
|
if (stat(answer, &st) != -1) {
|
||||||
i = do_yesno_prompt(FALSE,
|
i = do_yesno_prompt(FALSE,
|
||||||
_("File exists, OVERWRITE ? "));
|
_("File exists, OVERWRITE ? "));
|
||||||
if (i == 0 || i == -1)
|
if (i == 0 || i == -1)
|
||||||
@ -1904,7 +1904,7 @@ int do_writeout(bool exiting)
|
|||||||
if (!ISSET(RESTRICTED) && !exiting && openfile->mark_set)
|
if (!ISSET(RESTRICTED) && !exiting && openfile->mark_set)
|
||||||
retval = write_marked_file(answer, NULL, FALSE, append);
|
retval = write_marked_file(answer, NULL, FALSE, append);
|
||||||
else
|
else
|
||||||
#endif /* !NANO_TINY */
|
#endif
|
||||||
retval = write_file(answer, NULL, FALSE, append, FALSE);
|
retval = write_file(answer, NULL, FALSE, append, FALSE);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -999,7 +999,7 @@ int get_prompt_string(bool allow_tabs,
|
|||||||
wnoutrefresh(bottomwin);
|
wnoutrefresh(bottomwin);
|
||||||
|
|
||||||
/* If we're using restricted mode, we aren't allowed to change the
|
/* If we're using restricted mode, we aren't allowed to change the
|
||||||
* name of a file once it has one because that would allow writing
|
* name of a file once it has one, because that would allow writing
|
||||||
* to files not specified on the command line. In this case,
|
* to files not specified on the command line. In this case,
|
||||||
* disable all keys that would change the text if the filename isn't
|
* disable all keys that would change the text if the filename isn't
|
||||||
* blank and we're at the "Write File" prompt. */
|
* blank and we're at the "Write File" prompt. */
|
||||||
|
Loading…
Reference in New Issue
Block a user