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
de36e1c1
Commit
de36e1c1
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a variable, to be more general
parent
a8c1dc14
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/rcfile.c
+11
-11
src/rcfile.c
with
11 additions
and
11 deletions
+11
-11
src/rcfile.c
View file @
de36e1c1
...
...
@@ -648,7 +648,7 @@ void parse_colors(char *ptr, int rex_flags)
{
short
fg
,
bg
;
bool
bright
=
FALSE
;
char
*
fgstr
;
char
*
item
;
assert
(
ptr
!=
NULL
);
...
...
@@ -664,9 +664,9 @@ void parse_colors(char *ptr, int rex_flags)
return
;
}
fgstr
=
ptr
;
item
=
ptr
;
ptr
=
parse_next_word
(
ptr
);
if
(
!
parse_color_names
(
fgstr
,
&
fg
,
&
bg
,
&
bright
))
if
(
!
parse_color_names
(
item
,
&
fg
,
&
bg
,
&
bright
))
return
;
if
(
*
ptr
==
'\0'
)
{
...
...
@@ -696,16 +696,16 @@ void parse_colors(char *ptr, int rex_flags)
continue
;
}
fgstr
=
++
ptr
;
item
=
++
ptr
;
ptr
=
parse_next_regex
(
ptr
);
if
(
ptr
==
NULL
)
break
;
if
(
*
fgstr
==
'\0'
)
{
if
(
*
item
==
'\0'
)
{
rcfile_error
(
N_
(
"Empty regex string"
));
goodstart
=
FALSE
;
}
else
goodstart
=
nregcomp
(
fgstr
,
rex_flags
);
goodstart
=
nregcomp
(
item
,
rex_flags
);
/* If the starting regex is valid, initialize a new color struct,
* and hook it in at the tail of the linked list. */
...
...
@@ -717,7 +717,7 @@ void parse_colors(char *ptr, int rex_flags)
newcolor
->
bright
=
bright
;
newcolor
->
rex_flags
=
rex_flags
;
newcolor
->
start_regex
=
mallocstrcpy
(
NULL
,
fgstr
);
newcolor
->
start_regex
=
mallocstrcpy
(
NULL
,
item
);
newcolor
->
start
=
NULL
;
newcolor
->
end_regex
=
NULL
;
...
...
@@ -750,12 +750,12 @@ void parse_colors(char *ptr, int rex_flags)
continue
;
}
fgstr
=
++
ptr
;
item
=
++
ptr
;
ptr
=
parse_next_regex
(
ptr
);
if
(
ptr
==
NULL
)
break
;
if
(
*
fgstr
==
'\0'
)
{
if
(
*
item
==
'\0'
)
{
rcfile_error
(
N_
(
"Empty regex string"
));
continue
;
}
...
...
@@ -766,8 +766,8 @@ void parse_colors(char *ptr, int rex_flags)
continue
;
/* If it's valid, save the ending regex string. */
if
(
nregcomp
(
fgstr
,
rex_flags
))
newcolor
->
end_regex
=
mallocstrcpy
(
NULL
,
fgstr
);
if
(
nregcomp
(
item
,
rex_flags
))
newcolor
->
end_regex
=
mallocstrcpy
(
NULL
,
item
);
/* Lame way to skip another static counter. */
newcolor
->
id
=
live_syntax
->
nmultis
;
...
...
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