- Simplify by reusing variables whereever possible, and add a
parameter execute to indicate whether or not to be in "Execute
Command" mode. (DLR)
+- open_prevfile(), open_nextfile()
+ - Translate the "New Buffer" string when displaying "Switched
+ to" messages on the statusbar. (DLR)
- global.c:
shortcut_init()
- Remove redundant NANO_SMALL #ifdef. (DLR)
* FALSE, a new entry is created; otherwise, the current entry is
* updated.
*/
-void add_open_file(int update)
+void add_open_file(bool update)
{
openfilestruct *tmp;
* Otherwise, we are about to close that entry, so don't bother doing
* so.
*/
-void open_prevfile(int closing_file)
+void open_prevfile(bool closing_file)
{
if (open_files == NULL)
return;
load_open_file();
statusbar(_("Switched to %s"),
- ((open_files->filename[0] == '\0') ? "New Buffer" :
+ ((open_files->filename[0] == '\0') ? _("New Buffer") :
open_files->filename));
#ifdef DEBUG
* FALSE, update the current entry before switching from it. Otherwise,
* we are about to close that entry, so don't bother doing so.
*/
-void open_nextfile(int closing_file)
+void open_nextfile(bool closing_file)
{
if (open_files == NULL)
return;
load_open_file();
statusbar(_("Switched to %s"),
- ((open_files->filename[0] == '\0') ? "New Buffer" :
+ ((open_files->filename[0] == '\0') ? _("New Buffer") :
open_files->filename));
#ifdef DEBUG
/*
* Delete an entry from the open_files filestruct. After deletion of an
* entry, the next or previous entry is opened, whichever is found first.
- * Return 0 on success or 1 on error.
+ * Return TRUE on success or FALSE on error.
*/
-int close_open_file(void)
+bool close_open_file(void)
{
openfilestruct *tmp;
if (open_files == NULL)
- return 1;
+ return FALSE;
/* make sure open_files->fileage and fileage, and open_files->filebot
and filebot, are in sync; they might not be if lines have been cut
else if (open_files->prev != NULL)
open_prevfile(TRUE);
else
- return 1;
+ return FALSE;
unlink_opennode(tmp);
delete_opennode(tmp);
shortcut_init(FALSE);
display_main_list();
- return 0;
+ return TRUE;
}
#endif /* ENABLE_MULTIBUFFER */
void unlink_opennode(const openfilestruct *fileptr);
void delete_opennode(openfilestruct *fileptr);
void free_openfilestruct(openfilestruct *src);
-void add_open_file(int update);
+void add_open_file(bool update);
void load_open_file(void);
-void open_prevfile(int closing_file);
+void open_prevfile(bool closing_file);
void open_prevfile_void(void);
-void open_nextfile(int closing_file);
+void open_nextfile(bool closing_file);
void open_nextfile_void(void);
-int close_open_file(void);
+bool close_open_file(void);
#endif
#if !defined(DISABLE_SPELLER) || !defined(DISABLE_OPERATINGDIR)
char *get_full_path(const char *origpath);