Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
0f1f53a4
Commit
0f1f53a4
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: drop a handful of unhelpful asserts
parent
bf1a0809
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nano.c
+1
-14
src/nano.c
with
1 addition
and
14 deletions
+1
-14
src/nano.c
View file @
0f1f53a4
...
...
@@ -204,12 +204,7 @@ void renumber(filestruct *line)
partition
*
partition_filestruct
(
filestruct
*
top
,
size_t
top_x
,
filestruct
*
bot
,
size_t
bot_x
)
{
partition
*
p
;
assert
(
top
!=
NULL
&&
bot
!=
NULL
&&
openfile
->
fileage
!=
NULL
&&
openfile
->
filebot
!=
NULL
);
/* Initialize the partition. */
p
=
(
partition
*
)
nmalloc
(
sizeof
(
partition
));
partition
*
p
=
nmalloc
(
sizeof
(
partition
));
/* If the top and bottom of the partition are different from the top
* and bottom of the buffer, save the latter and then set them
...
...
@@ -252,8 +247,6 @@ partition *partition_filestruct(filestruct *top, size_t top_x,
* to (filebot, $) again. */
void
unpartition_filestruct
(
partition
**
p
)
{
assert
(
p
!=
NULL
&&
openfile
->
fileage
!=
NULL
&&
openfile
->
filebot
!=
NULL
);
/* Reattach the line above the top of the partition, and restore the
* text before top_x from top_data. Free top_data when we're done
* with it. */
...
...
@@ -304,8 +297,6 @@ void extract_buffer(filestruct **file_top, filestruct **file_bot,
bool
same_line
=
FALSE
;
#endif
assert
(
file_top
!=
NULL
&&
file_bot
!=
NULL
&&
top
!=
NULL
&&
bot
!=
NULL
);
/* If (top, top_x)-(bot, bot_x) doesn't cover any text, get out. */
if
(
top
==
bot
&&
top_x
==
bot_x
)
return
;
...
...
@@ -417,8 +408,6 @@ void ingraft_buffer(filestruct *somebuffer)
bool
right_side_up
=
FALSE
,
single_line
=
FALSE
;
#endif
assert
(
somebuffer
!=
NULL
);
#ifndef NANO_TINY
/* Keep track of whether the mark begins inside the partition and
* will need adjustment. */
...
...
@@ -516,8 +505,6 @@ openfilestruct *make_new_opennode(void)
/* Unlink a node from the rest of the circular list, and delete it. */
void
unlink_opennode
(
openfilestruct
*
fileptr
)
{
assert
(
fileptr
!=
fileptr
->
prev
&&
fileptr
!=
fileptr
->
next
);
#ifdef ENABLE_MULTIBUFFER
if
(
fileptr
==
firstfile
)
firstfile
=
firstfile
->
next
;
...
...
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
Menu
Projects
Groups
Snippets
Help