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
bf72cdd8
Commit
bf72cdd8
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename two variables, to make a little sense
And rename a third variable, to match another in its style.
parent
8e3f4015
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/rcfile.c
+8
-8
src/rcfile.c
src/text.c
+2
-2
src/text.c
with
10 additions
and
10 deletions
+10
-10
src/rcfile.c
View file @
bf72cdd8
...
...
@@ -899,23 +899,23 @@ void pick_up_name(const char *kind, char *ptr, char **storage)
if
(
!
strcmp
(
ptr
,
"
\"\"
"
))
*
storage
=
NULL
;
else
if
(
*
ptr
==
'"'
)
{
char
*
p
,
*
q
;
char
*
look
,
*
take
;
p
=
q
=
*
storage
=
mallocstrcpy
(
NULL
,
++
ptr
);
look
=
take
=
*
storage
=
mallocstrcpy
(
NULL
,
++
ptr
);
/* Snip out the backslashes of escaped characters. */
while
(
*
p
!=
'"'
)
{
if
(
*
p
==
'\0'
)
{
while
(
*
look
!=
'"'
)
{
if
(
*
look
==
'\0'
)
{
rcfile_error
(
N_
(
"Argument of '%s' lacks closing
\"
"
),
kind
);
free
(
*
storage
);
*
storage
=
NULL
;
return
;
}
else
if
(
*
p
==
'\\'
&&
*
(
p
+
1
)
!=
'\0'
)
{
p
++
;
}
else
if
(
*
look
==
'\\'
&&
*
(
look
+
1
)
!=
'\0'
)
{
look
++
;
}
*
q
++
=
*
p
++
;
*
take
++
=
*
look
++
;
}
*
q
=
'\0'
;
*
take
=
'\0'
;
}
else
*
storage
=
mallocstrcpy
(
NULL
,
ptr
);
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
bf72cdd8
...
...
@@ -1494,7 +1494,7 @@ bool do_wrap(filestruct *line)
/* The length of next_line. */
size_t
old_x
=
openfile
->
current_x
;
filestruct
*
old
L
ine
=
openfile
->
current
;
filestruct
*
old
_l
ine
=
openfile
->
current
;
/* There are three steps. First, we decide where to wrap. Then, we
* create the new wrap line. Finally, we clean up. */
...
...
@@ -1600,7 +1600,7 @@ bool do_wrap(filestruct *line)
if
(
old_x
<
wrap_loc
)
{
openfile
->
current_x
=
old_x
;
openfile
->
current
=
old
L
ine
;
openfile
->
current
=
old
_l
ine
;
prepend_wrap
=
TRUE
;
}
else
{
openfile
->
current_x
+=
(
old_x
-
wrap_loc
);
...
...
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