Commit 9936a635 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: rename a parameter and a variable, to be more fitting

No related merge requests found
Showing with 9 additions and 9 deletions
+9 -9
...@@ -174,20 +174,20 @@ void free_filestruct(filestruct *src) ...@@ -174,20 +174,20 @@ void free_filestruct(filestruct *src)
delete_node(src); delete_node(src);
} }
/* Renumber the lines in a buffer, starting with fileptr. */ /* Renumber the lines in a buffer, starting with the given line. */
void renumber(filestruct *fileptr) void renumber(filestruct *line)
{ {
ssize_t line; ssize_t number;
if (fileptr == NULL) if (line == NULL)
return; return;
line = (fileptr->prev == NULL) ? 0 : fileptr->prev->lineno; number = (line->prev == NULL) ? 0 : line->prev->lineno;
assert(fileptr != fileptr->next); assert(line != line->next);
for (; fileptr != NULL; fileptr = fileptr->next) for (; line != NULL; line = line->next)
fileptr->lineno = ++line; line->lineno = ++number;
} }
/* Partition the current buffer so that it appears to begin at (top, top_x) /* Partition the current buffer so that it appears to begin at (top, top_x)
......
...@@ -404,7 +404,7 @@ void unlink_node(filestruct *fileptr); ...@@ -404,7 +404,7 @@ void unlink_node(filestruct *fileptr);
void delete_node(filestruct *fileptr); void delete_node(filestruct *fileptr);
filestruct *copy_filestruct(const filestruct *src); filestruct *copy_filestruct(const filestruct *src);
void free_filestruct(filestruct *src); void free_filestruct(filestruct *src);
void renumber(filestruct *fileptr); void renumber(filestruct *line);
partition *partition_filestruct(filestruct *top, size_t top_x, partition *partition_filestruct(filestruct *top, size_t top_x,
filestruct *bot, size_t bot_x); filestruct *bot, size_t bot_x);
void unpartition_filestruct(partition **p); void unpartition_filestruct(partition **p);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment