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
23d66949
Commit
23d66949
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: frob four comments, and rewrap two lines
parent
184bb11f
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/proto.h
+2
-2
src/proto.h
src/utils.c
+9
-13
src/utils.c
with
11 additions
and
15 deletions
+11
-15
src/proto.h
View file @
23d66949
...
...
@@ -607,8 +607,8 @@ void new_magicline(void);
void
remove_magicline
(
void
);
#endif
#ifndef NANO_TINY
void
mark_order
(
const
filestruct
**
top
,
size_t
*
top_x
,
const
filestruct
**
bot
,
size_t
*
bot_x
,
bool
*
right_side_up
);
void
mark_order
(
const
filestruct
**
top
,
size_t
*
top_x
,
const
filestruct
**
bot
,
size_t
*
bot_x
,
bool
*
right_side_up
);
void
get_range
(
const
filestruct
**
top
,
const
filestruct
**
bot
);
#endif
size_t
get_totsize
(
const
filestruct
*
begin
,
const
filestruct
*
end
);
...
...
This diff is collapsed.
Click to expand it.
src/utils.c
View file @
23d66949
...
...
@@ -348,8 +348,7 @@ void nperror(const char *s)
}
/* This is a wrapper for the malloc() function that properly handles
* things when we run out of memory. Thanks, BG, many people have been
* asking for this... */
* things when we run out of memory. */
void
*
nmalloc
(
size_t
howmuch
)
{
void
*
r
=
malloc
(
howmuch
);
...
...
@@ -479,7 +478,7 @@ size_t strlenpt(const char *text)
return
span
;
}
/* Append a new magicline to
filebot
. */
/* Append a new magicline to
the end of the buffer
. */
void
new_magicline
(
void
)
{
openfile
->
filebot
->
next
=
make_new_node
(
openfile
->
filebot
);
...
...
@@ -489,9 +488,8 @@ void new_magicline(void)
}
#if !defined(NANO_TINY) || defined(ENABLE_HELP)
/* Remove the magicline from filebot, if there is one and it isn't the
* only line in the file. Assume that edittop and current are not at
* filebot. */
/* Remove the magicline from the end of the buffer, if there is one and
* it isn't the only line in the file. */
void
remove_magicline
(
void
)
{
if
(
openfile
->
filebot
->
data
[
0
]
==
'\0'
&&
...
...
@@ -505,13 +503,11 @@ void remove_magicline(void)
#endif
#ifndef NANO_TINY
/* Set top_x and bot_x to the top and bottom x-coordinates of the mark,
* respectively, based on the locations of top and bot. If
* right_side_up isn't NULL, set it to TRUE if the mark begins with
* (mark_begin, mark_begin_x) and ends with (current, current_x), or
* FALSE otherwise. */
void
mark_order
(
const
filestruct
**
top
,
size_t
*
top_x
,
const
filestruct
**
bot
,
size_t
*
bot_x
,
bool
*
right_side_up
)
/* Set (top, top_x) and (bot, bot_x) to the start and end "coordinates" of
* the marked region. If right_side_up isn't NULL, set it to TRUE when the
* mark is at the top of the marked region, and to FALSE otherwise. */
void
mark_order
(
const
filestruct
**
top
,
size_t
*
top_x
,
const
filestruct
**
bot
,
size_t
*
bot_x
,
bool
*
right_side_up
)
{
if
((
openfile
->
current
->
lineno
==
openfile
->
mark
->
lineno
&&
openfile
->
current_x
>
openfile
->
mark_x
)
||
...
...
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