Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
9936a635
Commit
9936a635
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a parameter and a variable, to be more fitting
parent
899bf0ae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/nano.c
+8
-8
src/nano.c
src/proto.h
+1
-1
src/proto.h
with
9 additions
and
9 deletions
+9
-9
src/nano.c
View file @
9936a635
...
...
@@ -174,20 +174,20 @@ void free_filestruct(filestruct *src)
delete_node
(
src
);
}
/* Renumber the lines in a buffer, starting with
fileptr
. */
void
renumber
(
filestruct
*
fileptr
)
/* Renumber the lines in a buffer, starting with
the given line
. */
void
renumber
(
filestruct
*
line
)
{
ssize_t
line
;
ssize_t
number
;
if
(
fileptr
==
NULL
)
if
(
line
==
NULL
)
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
)
fileptr
->
lineno
=
++
line
;
for
(;
line
!=
NULL
;
line
=
line
->
next
)
line
->
lineno
=
++
number
;
}
/* Partition the current buffer so that it appears to begin at (top, top_x)
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
9936a635
...
...
@@ -404,7 +404,7 @@ void unlink_node(filestruct *fileptr);
void
delete_node
(
filestruct
*
fileptr
);
filestruct
*
copy_filestruct
(
const
filestruct
*
src
);
void
free_filestruct
(
filestruct
*
src
);
void
renumber
(
filestruct
*
fileptr
);
void
renumber
(
filestruct
*
line
);
partition
*
partition_filestruct
(
filestruct
*
top
,
size_t
top_x
,
filestruct
*
bot
,
size_t
bot_x
);
void
unpartition_filestruct
(
partition
**
p
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment