mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-29 08:03:19 +03:00
tweaks: elide a function that is used just once and is a oneliner
This commit is contained in:
parent
9e2a12b62a
commit
e9ba058f3d
@ -62,7 +62,7 @@ bool has_valid_path(const char *filename)
|
|||||||
/* Add an item to the circular list of openfile structs. */
|
/* Add an item to the circular list of openfile structs. */
|
||||||
void make_new_buffer(void)
|
void make_new_buffer(void)
|
||||||
{
|
{
|
||||||
openfilestruct *newnode = make_new_opennode();
|
openfilestruct *newnode = nmalloc(sizeof(openfilestruct));
|
||||||
|
|
||||||
if (openfile == NULL) {
|
if (openfile == NULL) {
|
||||||
/* Make the first open file the only element in the list. */
|
/* Make the first open file the only element in the list. */
|
||||||
|
@ -502,12 +502,6 @@ void copy_from_buffer(filestruct *somebuffer)
|
|||||||
ingraft_buffer(the_copy);
|
ingraft_buffer(the_copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new openfile node. */
|
|
||||||
openfilestruct *make_new_opennode(void)
|
|
||||||
{
|
|
||||||
return (openfilestruct *)nmalloc(sizeof(openfilestruct));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
/* Unlink a node from the rest of the circular list, and delete it. */
|
/* Unlink a node from the rest of the circular list, and delete it. */
|
||||||
void unlink_opennode(openfilestruct *fileptr)
|
void unlink_opennode(openfilestruct *fileptr)
|
||||||
|
@ -398,7 +398,6 @@ void extract_buffer(filestruct **file_top, filestruct **file_bot,
|
|||||||
filestruct *top, size_t top_x, filestruct *bot, size_t bot_x);
|
filestruct *top, size_t top_x, filestruct *bot, size_t bot_x);
|
||||||
void ingraft_buffer(filestruct *somebuffer);
|
void ingraft_buffer(filestruct *somebuffer);
|
||||||
void copy_from_buffer(filestruct *somebuffer);
|
void copy_from_buffer(filestruct *somebuffer);
|
||||||
openfilestruct *make_new_opennode(void);
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
void unlink_opennode(openfilestruct *fileptr);
|
void unlink_opennode(openfilestruct *fileptr);
|
||||||
void delete_opennode(openfilestruct *fileptr);
|
void delete_opennode(openfilestruct *fileptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user