open_buffer(), rename load_open_file() load_buffer(), rename
open_prevnext_file() switch_to_prevnext_buffer(), rename
open_prevfile_void() switch_to_prev_buffer(), rename
- open_nextfile_void() switch_to_next_buffer(), remove
- load_file(), rename cancel_fork() cancel_command(),
- rename open_pipe() execute_command(), remove
- execute_command(), and remove resize_variables(). (DLR)
+ open_nextfile_void() switch_to_next_buffer(), rename
+ write_marked() write_marked_file(), remove load_file(), rename
+ cancel_fork() cancel_command(), rename open_pipe()
+ execute_command(), remove execute_command(), and remove
+ resize_variables(). (DLR)
- Replace all mvwaddstr(hblank) calls with a new function that
does the same thing without the need for hblank. New function
blank_line(); changes to do_browser(), blank_titlebar(),
blank_topbar(), blank_edit(), blank_statusbar(),
blank_bottombars(), update_line(), and edit_refresh(). (DLR)
+ - Make the static pid variable used by execute_command() and
+ cancel_command() a pid_t instead of an int, for consistency.
+ (DLR)
- files.c:
open_file()
- Assert that filename isn't NULL, and don't do anything special
openfile->current = openfile->fileage;
openfile->current_x = 0;
- openfile->current_y = 0;
openfile->placewewant = 0;
-
-#ifndef NANO_SMALL
- openfile->mark_begin = NULL;
- openfile->mark_begin_x = 0;
-#endif
+ openfile->current_y = 0;
openfile->totlines = 1;
openfile->totsize = 0;
#ifndef NANO_SMALL
openfile->mark_set = FALSE;
+ openfile->mark_begin = NULL;
+ openfile->mark_begin_x = 0;
+
openfile->fmt = NIX_FILE;
memset(&openfile->originalfilestat, 0, sizeof(struct stat));
* with nonamechange set to TRUE so that we don't change the current
* filename. Finally, set fileage and filebot back to their old values
* and return. */
-int write_marked(const char *name, FILE *f_open, bool tmp, int append)
+int write_marked_file(const char *name, FILE *f_open, bool tmp, int
+ append)
{
int retval = -1;
bool old_modified = openfile->modified;
* disabled since it allows reading from or writing to files
* not specified on the command line. */
if (!ISSET(RESTRICTED) && !exiting && openfile->mark_set)
- retval = write_marked(answer, NULL, FALSE, append);
+ retval = write_marked_file(answer, NULL, FALSE, append);
else
#endif /* !NANO_SMALL */
retval = write_file(answer, NULL, FALSE, append, FALSE);
#ifndef NANO_SMALL
static sigjmp_buf jmpbuf; /* Used to return to main() after a
SIGWINCH. */
-static int pid; /* The PID of the newly forked process
+static pid_t pid; /* The PID of the newly forked process
* in execute_command(). It must be
* global because the signal handler
* needs it. */
#ifndef NANO_SMALL
if (openfile->mark_set)
- i = write_marked(temp, temp_file, TRUE, FALSE);
+ i = write_marked_file(temp, temp_file, TRUE, FALSE);
else
#endif
i = write_file(temp, temp_file, TRUE, FALSE, FALSE);
filestruct *current; /* Current file's line. */
size_t current_x; /* Current file's x-coordinate
* position. */
+ size_t placewewant; /* Current file's place we want. */
ssize_t current_y; /* Current file's y-coordinate
* position. */
- size_t placewewant; /* Current file's place we want. */
-#ifndef NANO_SMALL
- filestruct *mark_begin; /* Current file's beginning marked
- * line. */
- size_t mark_begin_x; /* Current file's beginning marked
- * line's x-coordinate position. */
-#endif
size_t totlines; /* Current file's total number of
* lines. */
size_t totsize; /* Current file's total size. */
* status. */
#ifndef NANO_SMALL
bool mark_set; /* Current file's marking status. */
+ filestruct *mark_begin; /* Current file's beginning marked
+ * line. */
+ size_t mark_begin_x; /* Current file's beginning marked
+ * line's x-coordinate position. */
file_format fmt; /* Current file's format. */
struct stat originalfilestat;
/* Current file's stat. */
int write_file(const char *name, FILE *f_open, bool tmp, int append,
bool nonamechange);
#ifndef NANO_SMALL
-int write_marked(const char *name, FILE *f_open, bool tmp, int append);
+int write_marked_file(const char *name, FILE *f_open, bool tmp, int
+ append);
#endif
int do_writeout(bool exiting);
void do_writeout_void(void);