* src/help.c (help_line_len): Rename and reorder most of it.
* src/nano.c (make_new_opennode), src/files.c (initialize_buffer):
Remove some duplication in the initialization of a new openfile node.
+ * src/nano.c (make_new_opennode): Don't bother setting things to NULL
+ when they will be intialized right away.
+ * src/files.c (make_new_buffer): Don't bother with a separate function
+ when it's used only once, right there.
2015-08-13 Benno Schulenberg <bensberg@justemail.net>
* src/search.c (do_find_bracket): Remove mistaken comparison between
exitfunc->desc = close_tag;
}
- /* Initialize the new buffer. */
- initialize_buffer();
-}
-
-/* Initialize the current entry of the openfile openfilestruct. */
-void initialize_buffer(void)
-{
- assert(openfile != NULL);
-
+ /* Start initializing the new buffer. */
openfile->filename = mallocstrcpy(NULL, "");
initialize_buffer_text();
/* Create a new openfilestruct node. */
openfilestruct *make_new_opennode(void)
{
- openfilestruct *newnode =
- (openfilestruct *)nmalloc(sizeof(openfilestruct));
-
- newnode->filename = NULL;
- newnode->fileage = NULL;
- newnode->filebot = NULL;
- newnode->edittop = NULL;
- newnode->current = NULL;
-
- return newnode;
+ return (openfilestruct *)nmalloc(sizeof(openfilestruct));
}
/* Splice a node into an existing openfilestruct. */
/* All functions in files.c. */
void make_new_buffer(void);
-void initialize_buffer(void);
void initialize_buffer_text(void);
void open_buffer(const char *filename, bool undoable);
#ifndef DISABLE_SPELLER